diff --git a/CMake/VTKmDetectCUDAVersion.cu b/CMake/VTKmDetectCUDAVersion.cu index 43c7eaa87..a5b6031db 100644 --- a/CMake/VTKmDetectCUDAVersion.cu +++ b/CMake/VTKmDetectCUDAVersion.cu @@ -25,25 +25,33 @@ int main() { int count = 0; - if (cudaSuccess != cudaGetDeviceCount(&count)) return 1; - if (count == 0) return 1; + if (cudaSuccess != cudaGetDeviceCount(&count)) + return 1; + if (count == 0) + return 1; int prev_arch = 0; for (int device = 0; device < count; ++device) - { + { cudaDeviceProp prop; if (cudaSuccess == cudaGetDeviceProperties(&prop, device)) - { + { int arch = (prop.major * 10) + prop.minor; int compute_level = arch; //arch 21 has no equivalent compute level. - if(compute_level == 21) { compute_level = 20; } + if (compute_level == 21) + { + compute_level = 20; + } //handle multiple cards of the same architecture - if(arch == prev_arch) { continue; } + if (arch == prev_arch) + { + continue; + } prev_arch = arch; printf(" --generate-code=arch=compute_%d,code=sm_%d", compute_level, arch); - } } + } return 0; } diff --git a/examples/clipping/Clipping.cxx b/examples/clipping/Clipping.cxx index c5d075609..b0bd60c5c 100644 --- a/examples/clipping/Clipping.cxx +++ b/examples/clipping/Clipping.cxx @@ -34,29 +34,24 @@ typedef vtkm::Vec FloatVec3; - -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { if (argc < 4) { std::cout << "Usage: " << std::endl - << "$ " << argv[0] - << " [fieldName] " + << "$ " << argv[0] << " [fieldName] " << std::endl; return 1; } typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; - std::cout << "Device Adapter Name: " - << vtkm::cont::DeviceAdapterTraits::GetName() + std::cout << "Device Adapter Name: " << vtkm::cont::DeviceAdapterTraits::GetName() << std::endl; vtkm::io::reader::VTKDataSetReader reader(argv[1]); vtkm::cont::DataSet input = reader.ReadDataSet(); - vtkm::cont::Field scalarField = (argc == 5) ? - input.GetField(argv[2]) : - input.GetField(0); + vtkm::cont::Field scalarField = (argc == 5) ? input.GetField(argv[2]) : input.GetField(0); vtkm::Float32 clipValue = std::stof(argv[argc - 2]); vtkm::worklet::Clip clip; @@ -64,10 +59,8 @@ int main(int argc, char *argv[]) vtkm::cont::Timer total; vtkm::cont::Timer timer; vtkm::cont::CellSetExplicit<> outputCellSet = - clip.Run(input.GetCellSet(0), - scalarField.GetData().ResetTypeList(vtkm::TypeListTagScalarAll()), - clipValue, - DeviceAdapter()); + clip.Run(input.GetCellSet(0), scalarField.GetData().ResetTypeList(vtkm::TypeListTagScalarAll()), + clipValue, DeviceAdapter()); vtkm::Float64 clipTime = timer.GetElapsedTime(); vtkm::cont::DataSet output; @@ -75,7 +68,7 @@ int main(int argc, char *argv[]) timer.Reset(); vtkm::cont::DynamicArrayHandle coords = - clip.ProcessField(input.GetCoordinateSystem(0), DeviceAdapter()); + clip.ProcessField(input.GetCoordinateSystem(0), DeviceAdapter()); vtkm::Float64 processCoordinatesTime = timer.GetElapsedTime(); output.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coords)); @@ -88,10 +81,8 @@ int main(int argc, char *argv[]) continue; // clip only supports point fields for now. } vtkm::cont::DynamicArrayHandle data = - clip.ProcessField(inField.GetData().ResetTypeList(vtkm::TypeListTagAll()), - DeviceAdapter()); - output.AddField(vtkm::cont::Field(inField.GetName(), - vtkm::cont::Field::ASSOC_POINTS, data)); + clip.ProcessField(inField.GetData().ResetTypeList(vtkm::TypeListTagAll()), DeviceAdapter()); + output.AddField(vtkm::cont::Field(inField.GetName(), vtkm::cont::Field::ASSOC_POINTS, data)); } vtkm::Float64 processScalarsTime = timer.GetElapsedTime(); diff --git a/examples/contour_tree/ContourTreeMesh2D.cxx b/examples/contour_tree/ContourTreeMesh2D.cxx index e3a33e7b2..ecd8ac9ca 100644 --- a/examples/contour_tree/ContourTreeMesh2D.cxx +++ b/examples/contour_tree/ContourTreeMesh2D.cxx @@ -20,48 +20,48 @@ // Copyright (c) 2016, Los Alamos National Security, LLC // All rights reserved. // -// Copyright 2016. Los Alamos National Security, LLC. -// This software was produced under U.S. Government contract DE-AC52-06NA25396 -// for Los Alamos National Laboratory (LANL), which is operated by -// Los Alamos National Security, LLC for the U.S. Department of Energy. -// The U.S. Government has rights to use, reproduce, and distribute this -// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC -// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE -// USE OF THIS SOFTWARE. If software is modified to produce derivative works, -// such modified software should be clearly marked, so as not to confuse it +// Copyright 2016. Los Alamos National Security, LLC. +// This software was produced under U.S. Government contract DE-AC52-06NA25396 +// for Los Alamos National Laboratory (LANL), which is operated by +// Los Alamos National Security, LLC for the U.S. Department of Energy. +// The U.S. Government has rights to use, reproduce, and distribute this +// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC +// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE +// USE OF THIS SOFTWARE. If software is modified to produce derivative works, +// such modified software should be clearly marked, so as not to confuse it // with the version available from LANL. // -// Additionally, redistribution and use in source and binary forms, with or -// without modification, are permitted provided that the following conditions +// Additionally, redistribution and use in source and binary forms, with or +// without modification, are permitted provided that the following conditions // are met: // -// 1. Redistributions of source code must retain the above copyright notice, +// 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. -// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos -// National Laboratory, LANL, the U.S. Government, nor the names of its -// contributors may be used to endorse or promote products derived from +// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos +// National Laboratory, LANL, the U.S. Government, nor the names of its +// contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND -// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS -// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS +// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //============================================================================ -// This code is based on the algorithm presented in the paper: -// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” -// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. -// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization +// This code is based on the algorithm presented in the paper: +// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” +// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. +// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization // (LDAV), October 2016, Baltimore, Maryland. #ifndef VTKM_DEVICE_ADAPTER @@ -81,7 +81,8 @@ int main(int argc, char* argv[]) { std::cout << "ContourTreeMesh2D Example" << std::endl; - if (argc != 2) { + if (argc != 2) + { std::cout << "Parameter is fileName" << std::endl; std::cout << "File is expected to be ASCII with xdim ydim integers " << std::endl; std::cout << "followed by vector data last dimension varying fastest" << std::endl; @@ -90,7 +91,8 @@ int main(int argc, char* argv[]) // open input file std::ifstream inFile(argv[1]); - if (inFile.bad()) return 0; + if (inFile.bad()) + return 0; // read size of mesh vtkm::Id2 vdims; @@ -120,8 +122,8 @@ int main(int argc, char* argv[]) vtkm::filter::ContourTreeMesh2D filter; result = filter.Execute(inDataSet, std::string("values")); - vtkm::cont::Field resultField = result.GetField(); - vtkm::cont::ArrayHandle > saddlePeak; + vtkm::cont::Field resultField = result.GetField(); + vtkm::cont::ArrayHandle> saddlePeak; resultField.GetData().CopyTo(saddlePeak); return 0; diff --git a/examples/contour_tree/ContourTreeMesh3D.cxx b/examples/contour_tree/ContourTreeMesh3D.cxx index 1625ecb7e..f21d587e3 100644 --- a/examples/contour_tree/ContourTreeMesh3D.cxx +++ b/examples/contour_tree/ContourTreeMesh3D.cxx @@ -20,48 +20,48 @@ // Copyright (c) 2016, Los Alamos National Security, LLC // All rights reserved. // -// Copyright 2016. Los Alamos National Security, LLC. -// This software was produced under U.S. Government contract DE-AC52-06NA25396 -// for Los Alamos National Laboratory (LANL), which is operated by -// Los Alamos National Security, LLC for the U.S. Department of Energy. -// The U.S. Government has rights to use, reproduce, and distribute this -// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC -// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE -// USE OF THIS SOFTWARE. If software is modified to produce derivative works, -// such modified software should be clearly marked, so as not to confuse it +// Copyright 2016. Los Alamos National Security, LLC. +// This software was produced under U.S. Government contract DE-AC52-06NA25396 +// for Los Alamos National Laboratory (LANL), which is operated by +// Los Alamos National Security, LLC for the U.S. Department of Energy. +// The U.S. Government has rights to use, reproduce, and distribute this +// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC +// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE +// USE OF THIS SOFTWARE. If software is modified to produce derivative works, +// such modified software should be clearly marked, so as not to confuse it // with the version available from LANL. // -// Additionally, redistribution and use in source and binary forms, with or -// without modification, are permitted provided that the following conditions +// Additionally, redistribution and use in source and binary forms, with or +// without modification, are permitted provided that the following conditions // are met: // -// 1. Redistributions of source code must retain the above copyright notice, +// 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. -// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos -// National Laboratory, LANL, the U.S. Government, nor the names of its -// contributors may be used to endorse or promote products derived from +// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos +// National Laboratory, LANL, the U.S. Government, nor the names of its +// contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND -// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS -// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS +// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //============================================================================ -// This code is based on the algorithm presented in the paper: -// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” -// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. -// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization +// This code is based on the algorithm presented in the paper: +// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” +// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. +// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization // (LDAV), October 2016, Baltimore, Maryland. #ifndef VTKM_DEVICE_ADAPTER @@ -81,7 +81,8 @@ int main(int argc, char* argv[]) { std::cout << "ContourTreeMesh3D Example" << std::endl; - if (argc != 2) { + if (argc != 2) + { std::cout << "Parameter is fileName" << std::endl; std::cout << "File is expected to be ASCII with xdim ydim zdim integers " << std::endl; std::cout << "followed by vector data last dimension varying fastest" << std::endl; @@ -90,15 +91,15 @@ int main(int argc, char* argv[]) // open input file std::ifstream inFile(argv[1]); - if (inFile.bad()) return 0; + if (inFile.bad()) + return 0; // read size of mesh vtkm::Id3 vdims; inFile >> vdims[0]; inFile >> vdims[1]; inFile >> vdims[2]; - std::size_t nVertices = - static_cast(vdims[0] * vdims[1] * vdims[2]); + std::size_t nVertices = static_cast(vdims[0] * vdims[1] * vdims[2]); // read data std::vector values(nVertices); @@ -122,8 +123,8 @@ int main(int argc, char* argv[]) vtkm::filter::ContourTreeMesh3D filter; result = filter.Execute(inDataSet, std::string("values")); - vtkm::cont::Field resultField = result.GetField(); - vtkm::cont::ArrayHandle > saddlePeak; + vtkm::cont::Field resultField = result.GetField(); + vtkm::cont::ArrayHandle> saddlePeak; resultField.GetData().CopyTo(saddlePeak); return 0; diff --git a/examples/demo/Demo.cxx b/examples/demo/Demo.cxx index 17f1e8bce..02b3725d2 100644 --- a/examples/demo/Demo.cxx +++ b/examples/demo/Demo.cxx @@ -34,17 +34,11 @@ #include -void makeScene(const vtkm::cont::DataSet &inputData, - const vtkm::rendering::ColorTable &colorTable, - const std::string &fieldName, - vtkm::rendering::Scene &scene) +void makeScene(const vtkm::cont::DataSet& inputData, const vtkm::rendering::ColorTable& colorTable, + const std::string& fieldName, vtkm::rendering::Scene& scene) { - scene.AddActor(vtkm::rendering::Actor(inputData.GetCellSet(), - inputData.GetCoordinateSystem(), - inputData.GetField(fieldName), - colorTable)); - - + scene.AddActor(vtkm::rendering::Actor(inputData.GetCellSet(), inputData.GetCoordinateSystem(), + inputData.GetField(fieldName), colorTable)); } // This example reads an input vtk file specified on the command-line (or generates a default @@ -78,7 +72,7 @@ int main(int argc, char* argv[]) fieldName = "SCALARS:pointvar"; } - typedef vtkm::rendering::MapperRayTracer Mapper; + typedef vtkm::rendering::MapperRayTracer Mapper; typedef vtkm::rendering::CanvasRayTracer Canvas; // Set up a camera for rendering the input data @@ -91,7 +85,7 @@ int main(int argc, char* argv[]) camera.ResetToBounds(coordsBounds); - vtkm::Vec totalExtent; + vtkm::Vec totalExtent; totalExtent[0] = vtkm::Float32(coordsBounds.X.Max - coordsBounds.X.Min); totalExtent[1] = vtkm::Float32(coordsBounds.Y.Max - coordsBounds.Y.Min); totalExtent[2] = vtkm::Float32(coordsBounds.Z.Max - coordsBounds.Z.Min); @@ -107,15 +101,11 @@ int main(int argc, char* argv[]) // Create a scene for rendering the input data vtkm::rendering::Scene scene; vtkm::rendering::Color bg(0.2f, 0.2f, 0.2f, 1.0f); - Canvas canvas(512,512); + Canvas canvas(512, 512); makeScene(inputData, colorTable, fieldName, scene); // Create a view and use it to render the input data using OS Mesa - vtkm::rendering::View3D view(scene, - mapper, - canvas, - camera, - bg); + vtkm::rendering::View3D view(scene, mapper, canvas, camera, bg); view.Initialize(); view.Paint(); view.SaveAs("demo_input.pnm"); @@ -125,8 +115,7 @@ int main(int argc, char* argv[]) filter.SetGenerateNormals(false); filter.SetMergeDuplicatePoints(false); filter.SetIsoValue(0, isovalue); - vtkm::filter::ResultDataSet result = filter.Execute( inputData, - inputData.GetField(fieldName) ); + vtkm::filter::ResultDataSet result = filter.Execute(inputData, inputData.GetField(fieldName)); filter.MapFieldOntoOutput(result, inputData.GetField(fieldName)); vtkm::cont::DataSet& outputData = result.GetDataSet(); // Render a separate image with the output isosurface @@ -134,12 +123,7 @@ int main(int argc, char* argv[]) vtkm::rendering::Scene scene2; makeScene(outputData, colorTable, fieldName, scene2); - - vtkm::rendering::View3D view2(scene2, - mapper, - canvas, - camera, - bg); + vtkm::rendering::View3D view2(scene2, mapper, canvas, camera, bg); view2.Initialize(); view2.Paint(); view2.SaveAs("demo_output.pnm"); diff --git a/examples/dynamic_dispatcher/main.cxx b/examples/dynamic_dispatcher/main.cxx index 80dc3ec0c..5fc8f9f2c 100644 --- a/examples/dynamic_dispatcher/main.cxx +++ b/examples/dynamic_dispatcher/main.cxx @@ -31,18 +31,13 @@ struct ExampleFieldWorklet : public vtkm::worklet::WorkletMapField { - typedef void ControlSignature( FieldIn<>, FieldIn<>, FieldIn<>, - FieldOut<>, FieldOut<>, FieldOut<> ); - typedef void ExecutionSignature( _1, _2, _3, _4, _5, _6 ); + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldIn<>, FieldOut<>, FieldOut<>, + FieldOut<>); + typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - template - VTKM_EXEC - void operator()( const vtkm::Vec< T, 3 > & vec, - const U & scalar1, - const V& scalar2, - vtkm::Vec& out_vec, - U& out_scalar1, - V& out_scalar2 ) const + template + VTKM_EXEC void operator()(const vtkm::Vec& vec, const U& scalar1, const V& scalar2, + vtkm::Vec& out_vec, U& out_scalar1, V& out_scalar2) const { out_vec = vec * scalar1; out_scalar1 = static_cast(scalar1 + scalar2); @@ -50,46 +45,35 @@ struct ExampleFieldWorklet : public vtkm::worklet::WorkletMapField std::cout << "hello world" << std::endl; } - template - VTKM_EXEC - void operator()( const T &, - const U &, - const V&, - W&, - X&, - Y& ) const + template + VTKM_EXEC void operator()(const T&, const U&, const V&, W&, X&, Y&) const { - //no-op + //no-op } }; - int main(int argc, char** argv) { (void)argc; (void)argv; - std::vector< vtkm::Vec > inputVec(10); - std::vector< vtkm::Int32 > inputScalar1(10); - std::vector< vtkm::Float64 > inputScalar2(10); + std::vector> inputVec(10); + std::vector inputScalar1(10); + std::vector inputScalar2(10); - vtkm::cont::ArrayHandle< vtkm::Vec > handleV = + vtkm::cont::ArrayHandle> handleV = vtkm::cont::make_ArrayHandle(inputVec); - vtkm::cont::ArrayHandle< vtkm::Int32 > handleS1 = - vtkm::cont::make_ArrayHandle(inputScalar1); + vtkm::cont::ArrayHandle handleS1 = vtkm::cont::make_ArrayHandle(inputScalar1); - vtkm::cont::ArrayHandle< vtkm::Float64 > handleS2 = - vtkm::cont::make_ArrayHandle(inputScalar2); + vtkm::cont::ArrayHandle handleS2 = vtkm::cont::make_ArrayHandle(inputScalar2); - vtkm::cont::ArrayHandle< vtkm::Vec > handleOV; - vtkm::cont::ArrayHandle< vtkm::Int32 > handleOS1; - vtkm::cont::ArrayHandle< vtkm::Float64 > handleOS2; + vtkm::cont::ArrayHandle> handleOV; + vtkm::cont::ArrayHandle handleOS1; + vtkm::cont::ArrayHandle handleOS2; vtkm::cont::DynamicArrayHandle out1(handleOV), out2(handleOS1), out3(handleOS2); vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(handleV, handleS1, handleS2, out1, out2, out3); - } - diff --git a/examples/hello_world/HelloWorld.cxx b/examples/hello_world/HelloWorld.cxx index 25778bebe..7ad404f98 100644 --- a/examples/hello_world/HelloWorld.cxx +++ b/examples/hello_world/HelloWorld.cxx @@ -35,25 +35,25 @@ //Suppress warnings about glut being deprecated on OSX #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif //OpenGL Graphics includes //glew needs to go before glut //that is why this is after the TransferToOpenGL include -#if defined (__APPLE__) -# include +#if defined(__APPLE__) +#include #else -# include +#include #endif #include "LoadShaders.h" -template< typename DeviceAdapter, typename T > +template struct HelloVTKMInterop { - vtkm::Vec< vtkm::Int32, 2 > Dims; + vtkm::Vec Dims; GLuint ProgramId; GLuint VAOId; @@ -63,71 +63,69 @@ struct HelloVTKMInterop vtkm::cont::Timer Timer; - std::vector< vtkm::Vec< T, 3 > > InputData; - vtkm::cont::ArrayHandle< vtkm::Vec< T, 3 > > InHandle; - vtkm::cont::ArrayHandle< vtkm::Vec< T, 3 > > OutCoords; - vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::UInt8, 4 > > OutColors; + std::vector> InputData; + vtkm::cont::ArrayHandle> InHandle; + vtkm::cont::ArrayHandle> OutCoords; + vtkm::cont::ArrayHandle> OutColors; - HelloVTKMInterop(vtkm::Int32 width, vtkm::Int32 height): - Dims(256,256), - ProgramId(), - VAOId(), - VBOState(), - ColorState(), - Timer(), - InputData(), - InHandle(), - OutCoords(), - OutColors() + HelloVTKMInterop(vtkm::Int32 width, vtkm::Int32 height) + : Dims(256, 256) + , ProgramId() + , VAOId() + , VBOState() + , ColorState() + , Timer() + , InputData() + , InHandle() + , OutCoords() + , OutColors() { int dim = 256; - this->InputData.reserve( static_cast(dim*dim) ); - for (int i = 0; i < dim; ++i ) + this->InputData.reserve(static_cast(dim * dim)); + for (int i = 0; i < dim; ++i) { - for (int j = 0; j < dim; ++j ) + for (int j = 0; j < dim; ++j) { - this->InputData.push_back(vtkm::Vec(2.f*static_cast(i/dim)-1.f, - 0.f, - 2.f*static_cast(j/dim)-1.f)); + this->InputData.push_back(vtkm::Vec(2.f * static_cast(i / dim) - 1.f, 0.f, + 2.f * static_cast(j / dim) - 1.f)); } } - this->Dims = vtkm::Vec< vtkm::Int32, 2 >( dim, dim ); + this->Dims = vtkm::Vec(dim, dim); this->InHandle = vtkm::cont::make_ArrayHandle(this->InputData); - glGenVertexArrays( 1, &this->VAOId ); - glBindVertexArray( this->VAOId ); + glGenVertexArrays(1, &this->VAOId); + glBindVertexArray(this->VAOId); this->ProgramId = LoadShaders(); - glUseProgram( this->ProgramId ); + glUseProgram(this->ProgramId); - glClearColor( .08f, .08f, .08f, 0.f ); - glViewport(0, 0, width, height ); + glClearColor(.08f, .08f, .08f, 0.f); + glViewport(0, 0, width, height); } void render() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - vtkm::Int32 arraySize = this->Dims[0]*this->Dims[1]; + vtkm::Int32 arraySize = this->Dims[0] * this->Dims[1]; //precomputed based on 1027x768 render window size - vtkm::Float32 mvp[16] = {-1.79259f, 0.f, 0.f, 0.f, - 0.f, 1.26755f, -0.721392f, -0.707107f, - 0.f, 1.26755f, 0.721392f, 0.707107f, - 0.f, 0.f, 1.24076f, 1.41421f}; + vtkm::Float32 mvp[16] = { -1.79259f, 0.f, 0.f, 0.f, 0.f, 1.26755f, + -0.721392f, -0.707107f, 0.f, 1.26755f, 0.721392f, 0.707107f, + 0.f, 0.f, 1.24076f, 1.41421f }; - GLint unifLoc = glGetUniformLocation( this->ProgramId, "MVP"); - glUniformMatrix4fv( unifLoc, 1, GL_FALSE, mvp ); + GLint unifLoc = glGetUniformLocation(this->ProgramId, "MVP"); + glUniformMatrix4fv(unifLoc, 1, GL_FALSE, mvp); glEnableVertexAttribArray(0); glBindBuffer(GL_ARRAY_BUFFER, *this->VBOState.GetHandle()); - glVertexAttribPointer( 0, 3, GL_FLOAT, GL_FALSE, 0, 0 ); + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0); glEnableClientState(GL_COLOR_ARRAY); glBindBuffer(GL_ARRAY_BUFFER, *this->ColorState.GetHandle()); - glColorPointer(4, GL_UNSIGNED_BYTE, 0, 0 ); + glColorPointer(4, GL_UNSIGNED_BYTE, 0, 0); - glDrawArrays( GL_POINTS, 0, arraySize ); + glDrawArrays(GL_POINTS, 0, arraySize); glDisableClientState(GL_COLOR_ARRAY); glDisableVertexAttribArray(0); @@ -136,51 +134,53 @@ struct HelloVTKMInterop struct GenerateSurfaceWorklet : public vtkm::worklet::WorkletMapField { vtkm::Float32 t; - GenerateSurfaceWorklet(vtkm::Float32 st) : t(st) {} + GenerateSurfaceWorklet(vtkm::Float32 st) + : t(st) + { + } - typedef void ControlSignature( FieldIn<>, FieldOut<>, FieldOut<> ); - typedef void ExecutionSignature( _1, _2, _3 ); + typedef void ControlSignature(FieldIn<>, FieldOut<>, FieldOut<>); + typedef void ExecutionSignature(_1, _2, _3); VTKM_EXEC - void operator()( const vtkm::Vec< T, 3 > & input, - vtkm::Vec & output, - vtkm::Vec& color ) const + void operator()(const vtkm::Vec& input, vtkm::Vec& output, + vtkm::Vec& color) const { output[0] = input[0]; - output[1] = 0.25f * vtkm::Sin( input[0] * 10.f + t ) * vtkm::Cos( input[2] * 10.f + t ); + output[1] = 0.25f * vtkm::Sin(input[0] * 10.f + t) * vtkm::Cos(input[2] * 10.f + t); output[2] = input[2]; color[0] = 0; - color[1] = static_cast(160 + 96*vtkm::Sin(input[0]*10.f+t)); - color[2] = static_cast(160 + 96*vtkm::Cos(input[2]*5.f+t)); + color[1] = static_cast(160 + 96 * vtkm::Sin(input[0] * 10.f + t)); + color[2] = static_cast(160 + 96 * vtkm::Cos(input[2] * 5.f + t)); color[3] = 255; } }; - void renderFrame( ) + void renderFrame() { - typedef vtkm::worklet::DispatcherMapField DispatcherType; + typedef vtkm::worklet::DispatcherMapField DispatcherType; - vtkm::Float32 t = static_cast(this->Timer.GetElapsedTime()); + vtkm::Float32 t = static_cast(this->Timer.GetElapsedTime()); - GenerateSurfaceWorklet worklet( t ); - DispatcherType(worklet).Invoke( this->InHandle, this->OutCoords, this->OutColors ); + GenerateSurfaceWorklet worklet(t); + DispatcherType(worklet).Invoke(this->InHandle, this->OutCoords, this->OutColors); - vtkm::interop::TransferToOpenGL( this->OutCoords, this->VBOState, DeviceAdapter() ); - vtkm::interop::TransferToOpenGL( this->OutColors, this->ColorState, DeviceAdapter() ); + vtkm::interop::TransferToOpenGL(this->OutCoords, this->VBOState, DeviceAdapter()); + vtkm::interop::TransferToOpenGL(this->OutColors, this->ColorState, DeviceAdapter()); - this->render(); - if(t > 10) - { - //after 10seconds quit the demo - exit(0); - } + this->render(); + if (t > 10) + { + //after 10seconds quit the demo + exit(0); + } } }; //global static so that glut callback can access it typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; -HelloVTKMInterop< DeviceAdapter, vtkm::Float32 >* helloWorld = nullptr; +HelloVTKMInterop* helloWorld = nullptr; // Render the output using simple OpenGL void run() @@ -197,26 +197,26 @@ void idle() int main(int argc, char** argv) { typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; - std::cout << "Running Hello World example on device adapter: " - << DeviceAdapterTraits::GetName() << std::endl; + std::cout << "Running Hello World example on device adapter: " << DeviceAdapterTraits::GetName() + << std::endl; glewExperimental = GL_TRUE; glutInit(&argc, argv); - const vtkm::UInt32 width = 1024; + const vtkm::UInt32 width = 1024; const vtkm::UInt32 height = 768; - glutInitWindowSize ( width, height ); - glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); + glutInitWindowSize(width, height); + glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); glutCreateWindow("VTK-m Hello World OpenGL Interop"); - GLenum err = glewInit(); + GLenum err = glewInit(); if (GLEW_OK != err) { - std::cout << "glewInit failed\n"; + std::cout << "glewInit failed\n"; } - HelloVTKMInterop< DeviceAdapter, vtkm::Float32 > hw(width,height); + HelloVTKMInterop hw(width, height); helloWorld = &hw; glutDisplayFunc(run); @@ -225,5 +225,5 @@ int main(int argc, char** argv) } #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif diff --git a/examples/hello_world/LoadShaders.h b/examples/hello_world/LoadShaders.h index a5da4474c..b06d85848 100644 --- a/examples/hello_world/LoadShaders.h +++ b/examples/hello_world/LoadShaders.h @@ -21,113 +21,109 @@ #ifndef LOAD_SHADERS #define LOAD_SHADERS -#if defined (__APPLE__) -# include +#if defined(__APPLE__) +#include #else -# include +#include #endif namespace shaders { static std::string const& make_fragment_shader_code() { - static std::string const data = -"#version 120\n" -"void main(void)" -"{" -" gl_FragColor = gl_Color;" -"}"; + static std::string const data = "#version 120\n" + "void main(void)" + "{" + " gl_FragColor = gl_Color;" + "}"; return data; } static std::string const& make_vertex_shader_code() { - static std::string const data = -"#version 120\n" -"attribute vec3 posAttr;" -"uniform mat4 MVP;" -"void main()" -"{" -" vec4 pos = vec4( posAttr, 1.0 );" -" gl_FrontColor = gl_Color;" -" gl_Position = MVP * pos;" -"}"; + static std::string const data = "#version 120\n" + "attribute vec3 posAttr;" + "uniform mat4 MVP;" + "void main()" + "{" + " vec4 pos = vec4( posAttr, 1.0 );" + " gl_FrontColor = gl_Color;" + " gl_Position = MVP * pos;" + "}"; return data; } - } inline GLuint LoadShaders() { - // Create the shaders - GLuint VertexShaderID = glCreateShader(GL_VERTEX_SHADER); - GLuint FragmentShaderID = glCreateShader(GL_FRAGMENT_SHADER); + // Create the shaders + GLuint VertexShaderID = glCreateShader(GL_VERTEX_SHADER); + GLuint FragmentShaderID = glCreateShader(GL_FRAGMENT_SHADER); - // Get the Vertex Shader code - std::string VertexShaderCode = shaders::make_vertex_shader_code(); + // Get the Vertex Shader code + std::string VertexShaderCode = shaders::make_vertex_shader_code(); - // Get the Fragment Shader code - std::string FragmentShaderCode = shaders::make_fragment_shader_code(); + // Get the Fragment Shader code + std::string FragmentShaderCode = shaders::make_fragment_shader_code(); - GLint Result = GL_FALSE; - int InfoLogLength; + GLint Result = GL_FALSE; + int InfoLogLength; - // Compile Vertex Shader - std::cout << "Compiling vertex shader" << std::endl; - char const * VertexSourcePointer = VertexShaderCode.c_str(); - glShaderSource(VertexShaderID, 1, &VertexSourcePointer, nullptr); - glCompileShader(VertexShaderID); + // Compile Vertex Shader + std::cout << "Compiling vertex shader" << std::endl; + char const* VertexSourcePointer = VertexShaderCode.c_str(); + glShaderSource(VertexShaderID, 1, &VertexSourcePointer, nullptr); + glCompileShader(VertexShaderID); - // Check Vertex Shader - glGetShaderiv(VertexShaderID, GL_COMPILE_STATUS, &Result); - glGetShaderiv(VertexShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength); - std::vector VertexShaderErrorMessage( static_cast(InfoLogLength) ); - if(VertexShaderErrorMessage.size() > 0) - { - glGetShaderInfoLog(VertexShaderID, InfoLogLength, nullptr, &VertexShaderErrorMessage[0]); - std::cout << &VertexShaderErrorMessage[0] << std::endl; - } + // Check Vertex Shader + glGetShaderiv(VertexShaderID, GL_COMPILE_STATUS, &Result); + glGetShaderiv(VertexShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength); + std::vector VertexShaderErrorMessage(static_cast(InfoLogLength)); + if (VertexShaderErrorMessage.size() > 0) + { + glGetShaderInfoLog(VertexShaderID, InfoLogLength, nullptr, &VertexShaderErrorMessage[0]); + std::cout << &VertexShaderErrorMessage[0] << std::endl; + } - // Compile Fragment Shader - std::cout << "Compiling fragment shader" << std::endl; - char const * FragmentSourcePointer = FragmentShaderCode.c_str(); - glShaderSource(FragmentShaderID, 1, &FragmentSourcePointer, nullptr); - glCompileShader(FragmentShaderID); + // Compile Fragment Shader + std::cout << "Compiling fragment shader" << std::endl; + char const* FragmentSourcePointer = FragmentShaderCode.c_str(); + glShaderSource(FragmentShaderID, 1, &FragmentSourcePointer, nullptr); + glCompileShader(FragmentShaderID); - // Check Fragment Shader - glGetShaderiv(FragmentShaderID, GL_COMPILE_STATUS, &Result); - glGetShaderiv(FragmentShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength); - std::vector FragmentShaderErrorMessage( static_cast(InfoLogLength) ); - if(FragmentShaderErrorMessage.size() > 0) - { - glGetShaderInfoLog(FragmentShaderID, InfoLogLength, nullptr, &FragmentShaderErrorMessage[0]); - std::cout << &FragmentShaderErrorMessage[0] << std::endl; - } + // Check Fragment Shader + glGetShaderiv(FragmentShaderID, GL_COMPILE_STATUS, &Result); + glGetShaderiv(FragmentShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength); + std::vector FragmentShaderErrorMessage(static_cast(InfoLogLength)); + if (FragmentShaderErrorMessage.size() > 0) + { + glGetShaderInfoLog(FragmentShaderID, InfoLogLength, nullptr, &FragmentShaderErrorMessage[0]); + std::cout << &FragmentShaderErrorMessage[0] << std::endl; + } - // Link the program - std::cout << "Linking program" << std::endl; - GLuint ProgramID = glCreateProgram(); - glAttachShader(ProgramID, VertexShaderID); - glAttachShader(ProgramID, FragmentShaderID); - glLinkProgram(ProgramID); + // Link the program + std::cout << "Linking program" << std::endl; + GLuint ProgramID = glCreateProgram(); + glAttachShader(ProgramID, VertexShaderID); + glAttachShader(ProgramID, FragmentShaderID); + glLinkProgram(ProgramID); - // Check the program - glGetProgramiv(ProgramID, GL_LINK_STATUS, &Result); - glGetProgramiv(ProgramID, GL_INFO_LOG_LENGTH, &InfoLogLength); - std::vector ProgramErrorMessage( static_cast(InfoLogLength) ); - if(ProgramErrorMessage.size() > 0) - { - glGetProgramInfoLog(ProgramID, InfoLogLength, nullptr, &ProgramErrorMessage[0]); - std::cout << &ProgramErrorMessage[0] << std::endl; - } + // Check the program + glGetProgramiv(ProgramID, GL_LINK_STATUS, &Result); + glGetProgramiv(ProgramID, GL_INFO_LOG_LENGTH, &InfoLogLength); + std::vector ProgramErrorMessage(static_cast(InfoLogLength)); + if (ProgramErrorMessage.size() > 0) + { + glGetProgramInfoLog(ProgramID, InfoLogLength, nullptr, &ProgramErrorMessage[0]); + std::cout << &ProgramErrorMessage[0] << std::endl; + } + glDeleteShader(VertexShaderID); + glDeleteShader(FragmentShaderID); - glDeleteShader(VertexShaderID); - glDeleteShader(FragmentShaderID); - - return ProgramID; + return ProgramID; } #endif diff --git a/examples/isosurface/IsosurfaceUniformGrid.cxx b/examples/isosurface/IsosurfaceUniformGrid.cxx index aab96054b..3b237a709 100644 --- a/examples/isosurface/IsosurfaceUniformGrid.cxx +++ b/examples/isosurface/IsosurfaceUniformGrid.cxx @@ -34,14 +34,14 @@ //Suppress warnings about glut being deprecated on OSX #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -#if defined (__APPLE__) -# include +#if defined(__APPLE__) +#include #else -# include +#include #endif #include "quaternion.h" @@ -49,13 +49,14 @@ #include static vtkm::Id3 dims(256, 256, 256); -static vtkm::cont::ArrayHandle > verticesArray, normalsArray; +static vtkm::cont::ArrayHandle> verticesArray, normalsArray; static vtkm::cont::ArrayHandle scalarsArray; static Quaternion qrot; static int lastx, lasty; static int mouse_state = 1; -namespace { +namespace +{ // Define the tangle field for the input data class TangleField : public vtkm::worklet::WorkletMapField @@ -70,29 +71,40 @@ public: const vtkm::Id cellsPerLayer; VTKM_CONT - TangleField(const vtkm::Id3 dims, const vtkm::Float32 mins[3], const vtkm::Float32 maxs[3]) : xdim(dims[0]), ydim(dims[1]), zdim(dims[2]), - xmin(mins[0]), ymin(mins[1]), zmin(mins[2]), xmax(maxs[0]), ymax(maxs[1]), zmax(maxs[2]), cellsPerLayer((xdim) * (ydim)) { }; + TangleField(const vtkm::Id3 dims, const vtkm::Float32 mins[3], const vtkm::Float32 maxs[3]) + : xdim(dims[0]) + , ydim(dims[1]) + , zdim(dims[2]) + , xmin(mins[0]) + , ymin(mins[1]) + , zmin(mins[2]) + , xmax(maxs[0]) + , ymax(maxs[1]) + , zmax(maxs[2]) + , cellsPerLayer((xdim) * (ydim)){}; VTKM_EXEC - void operator()(const vtkm::Id &vertexId, vtkm::Float32 &v) const + void operator()(const vtkm::Id& vertexId, vtkm::Float32& v) const { const vtkm::Id x = vertexId % (xdim); const vtkm::Id y = (vertexId / (xdim)) % (ydim); const vtkm::Id z = vertexId / cellsPerLayer; - const vtkm::Float32 fx = static_cast(x) / static_cast(xdim-1); - const vtkm::Float32 fy = static_cast(y) / static_cast(xdim-1); - const vtkm::Float32 fz = static_cast(z) / static_cast(xdim-1); + const vtkm::Float32 fx = static_cast(x) / static_cast(xdim - 1); + const vtkm::Float32 fy = static_cast(y) / static_cast(xdim - 1); + const vtkm::Float32 fz = static_cast(z) / static_cast(xdim - 1); - const vtkm::Float32 xx = 3.0f*(xmin+(xmax-xmin)*(fx)); - const vtkm::Float32 yy = 3.0f*(ymin+(ymax-ymin)*(fy)); - const vtkm::Float32 zz = 3.0f*(zmin+(zmax-zmin)*(fz)); + const vtkm::Float32 xx = 3.0f * (xmin + (xmax - xmin) * (fx)); + const vtkm::Float32 yy = 3.0f * (ymin + (ymax - ymin) * (fy)); + const vtkm::Float32 zz = 3.0f * (zmin + (zmax - zmin) * (fz)); - v = (xx*xx*xx*xx - 5.0f*xx*xx + yy*yy*yy*yy - 5.0f*yy*yy + zz*zz*zz*zz - 5.0f*zz*zz + 11.8f) * 0.2f + 0.5f; + v = (xx * xx * xx * xx - 5.0f * xx * xx + yy * yy * yy * yy - 5.0f * yy * yy + + zz * zz * zz * zz - 5.0f * zz * zz + 11.8f) * + 0.2f + + 0.5f; } }; - // Construct an input data set using the tangle field worklet vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims) { @@ -100,24 +112,23 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims) const vtkm::Id3 vdims(dims[0] + 1, dims[1] + 1, dims[2] + 1); - vtkm::Float32 mins[3] = {-1.0f, -1.0f, -1.0f}; - vtkm::Float32 maxs[3] = {1.0f, 1.0f, 1.0f}; + vtkm::Float32 mins[3] = { -1.0f, -1.0f, -1.0f }; + vtkm::Float32 maxs[3] = { 1.0f, 1.0f, 1.0f }; vtkm::cont::ArrayHandle fieldArray; - vtkm::cont::ArrayHandleCounting vertexCountImplicitArray(0, 1, vdims[0]*vdims[1]*vdims[2]); - vtkm::worklet::DispatcherMapField tangleFieldDispatcher(TangleField(vdims, mins, maxs)); + vtkm::cont::ArrayHandleCounting vertexCountImplicitArray(0, 1, vdims[0] * vdims[1] * + vdims[2]); + vtkm::worklet::DispatcherMapField tangleFieldDispatcher( + TangleField(vdims, mins, maxs)); tangleFieldDispatcher.Invoke(vertexCountImplicitArray, fieldArray); - vtkm::Vec origin(0.0f, 0.0f, 0.0f); - vtkm::Vec spacing( - 1.0f/static_cast(dims[0]), - 1.0f/static_cast(dims[2]), - 1.0f/static_cast(dims[1])); + vtkm::Vec origin(0.0f, 0.0f, 0.0f); + vtkm::Vec spacing(1.0f / static_cast(dims[0]), + 1.0f / static_cast(dims[2]), + 1.0f / static_cast(dims[1])); - vtkm::cont::ArrayHandleUniformPointCoordinates - coordinates(vdims, origin, spacing); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vdims, origin, spacing); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); dataSet.AddField(vtkm::cont::Field("nodevar", vtkm::cont::Field::ASSOC_POINTS, fieldArray)); @@ -128,10 +139,8 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims) return dataSet; } - } - // Initialize the OpenGL state void initializeGL() { @@ -157,7 +166,6 @@ void initializeGL() glEnable(GL_COLOR_MATERIAL); } - // Render the output using simple OpenGL void displayCall() { @@ -166,7 +174,7 @@ void displayCall() glMatrixMode(GL_PROJECTION); glLoadIdentity(); - gluPerspective( 45.0f, 1.0f, 1.0f, 20.0f); + gluPerspective(45.0f, 1.0f, 1.0f, 20.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); @@ -181,7 +189,7 @@ void displayCall() glColor3f(0.1f, 0.1f, 0.6f); glBegin(GL_TRIANGLES); - for (vtkm::IdComponent i=0; i curNormal = normalsArray.GetPortalConstControl().Get(i); vtkm::Vec curVertex = verticesArray.GetPortalConstControl().Get(i); @@ -194,7 +202,6 @@ void displayCall() glutSwapBuffers(); } - // Allow rotations of the view void mouseMove(int x, int y) { @@ -205,11 +212,11 @@ void mouseMove(int x, int y) { vtkm::Float32 pideg = static_cast(vtkm::Pi_2()); Quaternion newRotX; - newRotX.setEulerAngles(-0.2f*dx*pideg/180.0f, 0.0f, 0.0f); + newRotX.setEulerAngles(-0.2f * dx * pideg / 180.0f, 0.0f, 0.0f); qrot.mul(newRotX); Quaternion newRotY; - newRotY.setEulerAngles(0.0f, 0.0f, -0.2f*dy*pideg/180.0f); + newRotY.setEulerAngles(0.0f, 0.0f, -0.2f * dy * pideg / 180.0f); qrot.mul(newRotY); } lastx = x; @@ -218,15 +225,18 @@ void mouseMove(int x, int y) glutPostRedisplay(); } - // Respond to mouse button void mouseCall(int button, int state, int x, int y) { - if (button == 0) mouse_state = state; - if ((button == 0) && (state == 0)) { lastx = x; lasty = y; } + if (button == 0) + mouse_state = state; + if ((button == 0) && (state == 0)) + { + lastx = x; + lasty = y; + } } - // Compute and render an isosurface for a uniform grid example int main(int argc, char* argv[]) { @@ -236,21 +246,20 @@ int main(int argc, char* argv[]) filter.SetGenerateNormals(true); filter.SetMergeDuplicatePoints(false); filter.SetIsoValue(0, 0.5); - vtkm::filter::ResultDataSet result = - filter.Execute( dataSet, dataSet.GetField("nodevar") ); + vtkm::filter::ResultDataSet result = filter.Execute(dataSet, dataSet.GetField("nodevar")); filter.MapFieldOntoOutput(result, dataSet.GetField("nodevar")); //need to extract vertices, normals, and scalars vtkm::cont::DataSet& outputData = result.GetDataSet(); - - typedef vtkm::cont::ArrayHandle< vtkm::Vec > VertType; + typedef vtkm::cont::ArrayHandle> VertType; vtkm::cont::CoordinateSystem coords = outputData.GetCoordinateSystem(); verticesArray = coords.GetData().Cast(); normalsArray = outputData.GetField("normals").GetData().Cast(); - scalarsArray = outputData.GetField("nodevar").GetData().Cast< vtkm::cont::ArrayHandle >(); + scalarsArray = + outputData.GetField("nodevar").GetData().Cast>(); std::cout << "Number of output vertices: " << verticesArray.GetNumberOfValues() << std::endl; @@ -282,5 +291,5 @@ int main(int argc, char* argv[]) } #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif diff --git a/examples/isosurface/quaternion.h b/examples/isosurface/quaternion.h index f8ea767fd..d00361361 100644 --- a/examples/isosurface/quaternion.h +++ b/examples/isosurface/quaternion.h @@ -36,55 +36,84 @@ class Quaternion { public: - Quaternion() { x = y = z = 0.0; w = 1.0; } - Quaternion(double ax, double ay, double az, double aw) : x(ax), y(ay), z(az), w(aw) {}; - void set(double ax, double ay, double az, double aw) { x = ax; y = ay; z = az; w = aw; } - void normalize() - { - float norm = static_cast(sqrt(x*x + y*y + z*z + w*w)); - if (norm > 0.00001) { x /= norm; y /= norm; z /= norm; w /= norm; } - } - void mul(Quaternion q) - { - double tx, ty, tz, tw; - tx = w*q.x + x*q.w + y*q.z - z*q.y; - ty = w*q.y + y*q.w + z*q.x - x*q.z; - tz = w*q.z + z*q.w + x*q.y - y*q.x; - tw = w*q.w - x*q.x - y*q.y - z*q.z; + Quaternion() + { + x = y = z = 0.0; + w = 1.0; + } + Quaternion(double ax, double ay, double az, double aw) + : x(ax) + , y(ay) + , z(az) + , w(aw){}; + void set(double ax, double ay, double az, double aw) + { + x = ax; + y = ay; + z = az; + w = aw; + } + void normalize() + { + float norm = static_cast(sqrt(x * x + y * y + z * z + w * w)); + if (norm > 0.00001) + { + x /= norm; + y /= norm; + z /= norm; + w /= norm; + } + } + void mul(Quaternion q) + { + double tx, ty, tz, tw; + tx = w * q.x + x * q.w + y * q.z - z * q.y; + ty = w * q.y + y * q.w + z * q.x - x * q.z; + tz = w * q.z + z * q.w + x * q.y - y * q.x; + tw = w * q.w - x * q.x - y * q.y - z * q.z; - x = tx; y = ty; z = tz; w = tw; - } - void setEulerAngles(float pitch, float yaw, float roll) - { - w = cos(pitch/2.0)*cos(yaw/2.0)*cos(roll/2.0) - sin(pitch/2.0)*sin(yaw/2.0)*sin(roll/2.0); - x = sin(pitch/2.0)*sin(yaw/2.0)*cos(roll/2.0) + cos(pitch/2.0)*cos(yaw/2.0)*sin(roll/2.0); - y = sin(pitch/2.0)*cos(yaw/2.0)*cos(roll/2.0) + cos(pitch/2.0)*sin(yaw/2.0)*sin(roll/2.0); - z = cos(pitch/2.0)*sin(yaw/2.0)*cos(roll/2.0) - sin(pitch/2.0)*cos(yaw/2.0)*sin(roll/2.0); + x = tx; + y = ty; + z = tz; + w = tw; + } + void setEulerAngles(float pitch, float yaw, float roll) + { + w = cos(pitch / 2.0) * cos(yaw / 2.0) * cos(roll / 2.0) - + sin(pitch / 2.0) * sin(yaw / 2.0) * sin(roll / 2.0); + x = sin(pitch / 2.0) * sin(yaw / 2.0) * cos(roll / 2.0) + + cos(pitch / 2.0) * cos(yaw / 2.0) * sin(roll / 2.0); + y = sin(pitch / 2.0) * cos(yaw / 2.0) * cos(roll / 2.0) + + cos(pitch / 2.0) * sin(yaw / 2.0) * sin(roll / 2.0); + z = cos(pitch / 2.0) * sin(yaw / 2.0) * cos(roll / 2.0) - + sin(pitch / 2.0) * cos(yaw / 2.0) * sin(roll / 2.0); - normalize(); - } + normalize(); + } - void getRotMat(float* m) const - { - for (int i=0; i<16; i++) {m[i] = 0.0;} + void getRotMat(float* m) const + { + for (int i = 0; i < 16; i++) + { + m[i] = 0.0; + } - m[0] = static_cast(1.0 - 2.0*y*y - 2.0*z*z); - m[1] = static_cast(2.0*x*y - 2.0*z*w); - m[2] = static_cast(2.0*x*z + 2.0*y*w); + m[0] = static_cast(1.0 - 2.0 * y * y - 2.0 * z * z); + m[1] = static_cast(2.0 * x * y - 2.0 * z * w); + m[2] = static_cast(2.0 * x * z + 2.0 * y * w); - m[4] = static_cast(2.0*x*y + 2.0*z*w); - m[5] = static_cast(1.0 - 2.0*x*x - 2.0*z*z); - m[6] = static_cast(2.0*y*z - 2.0*x*w); + m[4] = static_cast(2.0 * x * y + 2.0 * z * w); + m[5] = static_cast(1.0 - 2.0 * x * x - 2.0 * z * z); + m[6] = static_cast(2.0 * y * z - 2.0 * x * w); - m[8] = static_cast(2.0*x*z - 2.0*y*w); - m[9] = static_cast(2.0*y*z + 2.0*x*w); - m[10] = static_cast(1.0 - 2.0*x*x - 2.0*y*y); + m[8] = static_cast(2.0 * x * z - 2.0 * y * w); + m[9] = static_cast(2.0 * y * z + 2.0 * x * w); + m[10] = static_cast(1.0 - 2.0 * x * x - 2.0 * y * y); m[15] = 1.0; - } + } - double x,y,z,w; + double x, y, z, w; }; - #endif /* QUATERNION_H_ */ diff --git a/examples/multi_backend/MultiBackend.cxx b/examples/multi_backend/MultiBackend.cxx index 00297b332..e7879a96a 100644 --- a/examples/multi_backend/MultiBackend.cxx +++ b/examples/multi_backend/MultiBackend.cxx @@ -31,25 +31,26 @@ #include #include -typedef vtkm::Vec< vtkm::Float32, 3 > FloatVec3; -typedef vtkm::Vec< vtkm::UInt8, 4 > Uint8Vec4; +typedef vtkm::Vec FloatVec3; +typedef vtkm::Vec Uint8Vec4; struct GenerateSurfaceWorklet : public vtkm::worklet::WorkletMapField { vtkm::Float32 t; - GenerateSurfaceWorklet(vtkm::Float32 st) : t(st) {} + GenerateSurfaceWorklet(vtkm::Float32 st) + : t(st) + { + } - typedef void ControlSignature( FieldIn<>, FieldOut<>, FieldOut<> ); - typedef void ExecutionSignature( _1, _2, _3 ); + typedef void ControlSignature(FieldIn<>, FieldOut<>, FieldOut<>); + typedef void ExecutionSignature(_1, _2, _3); - template - VTKM_EXEC - void operator()( const vtkm::Vec< T, 3 > & input, - vtkm::Vec & output, - vtkm::Vec& color ) const + template + VTKM_EXEC void operator()(const vtkm::Vec& input, vtkm::Vec& output, + vtkm::Vec& color) const { output[0] = input[0]; - output[1] = 0.25f * vtkm::Sin( input[0] * 10.f + t ) * vtkm::Cos( input[2] * 10.f + t ); + output[1] = 0.25f * vtkm::Sin(input[0] * 10.f + t) * vtkm::Cos(input[2] * 10.f + t); output[2] = input[2]; color[0] = 0; @@ -61,65 +62,58 @@ struct GenerateSurfaceWorklet : public vtkm::worklet::WorkletMapField struct RunGenerateSurfaceWorklet { - template - bool operator()(DeviceAdapterTag ) const + template + bool operator()(DeviceAdapterTag) const { //At this point we know we have runtime support typedef vtkm::cont::DeviceAdapterTraits DeviceTraits; - typedef vtkm::worklet::DispatcherMapField DispatcherType; + typedef vtkm::worklet::DispatcherMapField + DispatcherType; - std::cout << "Running a worklet on device adapter: " - << DeviceTraits::GetName() << std::endl; + std::cout << "Running a worklet on device adapter: " << DeviceTraits::GetName() << std::endl; - GenerateSurfaceWorklet worklet( 0.05f ); - DispatcherType(worklet).Invoke( this->In, - this->Out, - this->Color); + GenerateSurfaceWorklet worklet(0.05f); + DispatcherType(worklet).Invoke(this->In, this->Out, this->Color); - return true; + return true; } - vtkm::cont::ArrayHandle< FloatVec3 > In; - vtkm::cont::ArrayHandle< FloatVec3 > Out; - vtkm::cont::ArrayHandle< Uint8Vec4 > Color; + vtkm::cont::ArrayHandle In; + vtkm::cont::ArrayHandle Out; + vtkm::cont::ArrayHandle Color; }; - -template -std::vector< vtkm::Vec > make_testData(int size) +template +std::vector> make_testData(int size) { - std::vector< vtkm::Vec< T, 3 > > data; - data.reserve( static_cast(size*size) ); - for (int i = 0; i < size; ++i ) + std::vector> data; + data.reserve(static_cast(size * size)); + for (int i = 0; i < size; ++i) + { + for (int j = 0; j < size; ++j) { - for (int j = 0; j < size; ++j ) - { - data.push_back( vtkm::Vec(2.f*static_cast(i/size)-1.f, - 0.f, - 2.f*static_cast(j/size)-1.f)); - } + data.push_back(vtkm::Vec(2.f * static_cast(i / size) - 1.f, 0.f, + 2.f * static_cast(j / size) - 1.f)); } + } return data; } //This is the list of devices to compile in support for. The order of the //devices determines the runtime preference. struct DevicesToTry - : vtkm::ListTagBase< - vtkm::cont::DeviceAdapterTagCuda, - vtkm::cont::DeviceAdapterTagTBB, - vtkm::cont::DeviceAdapterTagSerial> { }; - + : vtkm::ListTagBase +{ +}; int main(int, char**) { - std::vector< FloatVec3 > data = make_testData(1024); + std::vector data = make_testData(1024); //make array handles for the data - // TryExecutes takes a functor and a list of devices. It then tries to run // the functor for each device (in the order given in the list) until the // execution succeeds. This allows you to compile in support for multiple @@ -136,7 +130,4 @@ int main(int, char**) RunGenerateSurfaceWorklet task; task.In = vtkm::cont::make_ArrayHandle(data); vtkm::cont::TryExecute(task, DevicesToTry()); - } - - diff --git a/examples/rendering/Rendering.cxx b/examples/rendering/Rendering.cxx index 9a06fd779..f1c5ffe5e 100644 --- a/examples/rendering/Rendering.cxx +++ b/examples/rendering/Rendering.cxx @@ -30,16 +30,16 @@ //Suppress warnings about glut being deprecated on OSX #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif #include //Required for compile.... -#if defined (__APPLE__) -# include +#if defined(__APPLE__) +#include #else -# include +#include #endif #include @@ -47,113 +47,109 @@ #include #include -vtkm::rendering::View3D *view = nullptr; +vtkm::rendering::View3D* view = nullptr; const vtkm::Int32 W = 512, H = 512; -int buttonStates[3] = {GLUT_UP, GLUT_UP, GLUT_UP}; +int buttonStates[3] = { GLUT_UP, GLUT_UP, GLUT_UP }; bool shiftKey = false; -int lastx=-1, lasty=-1; +int lastx = -1, lasty = -1; -void -reshape(int, int) +void reshape(int, int) { - //Don't allow resizing window. - glutReshapeWindow(W,H); + //Don't allow resizing window. + glutReshapeWindow(W, H); } // Render the output using simple OpenGL void displayCall() { - view->Paint(); - glutSwapBuffers(); + view->Paint(); + glutSwapBuffers(); } // Allow rotations of the camera void mouseMove(int x, int y) { - const vtkm::Id width = view->GetCanvas().GetWidth(); - const vtkm::Id height = view->GetCanvas().GetHeight(); - - //Map to XY - y = static_cast(height-y); - - if (lastx != -1 && lasty != -1) + const vtkm::Id width = view->GetCanvas().GetWidth(); + const vtkm::Id height = view->GetCanvas().GetHeight(); + + //Map to XY + y = static_cast(height - y); + + if (lastx != -1 && lasty != -1) + { + vtkm::Float32 x1 = vtkm::Float32(lastx * 2) / vtkm::Float32(width) - 1.0f; + vtkm::Float32 y1 = vtkm::Float32(lasty * 2) / vtkm::Float32(height) - 1.0f; + vtkm::Float32 x2 = vtkm::Float32(x * 2) / vtkm::Float32(width) - 1.0f; + vtkm::Float32 y2 = vtkm::Float32(y * 2) / vtkm::Float32(height) - 1.0f; + + if (buttonStates[0] == GLUT_DOWN) { - vtkm::Float32 x1 = vtkm::Float32(lastx*2)/vtkm::Float32(width) - 1.0f; - vtkm::Float32 y1 = vtkm::Float32(lasty*2)/vtkm::Float32(height) - 1.0f; - vtkm::Float32 x2 = vtkm::Float32(x*2)/vtkm::Float32(width) - 1.0f; - vtkm::Float32 y2 = vtkm::Float32(y*2)/vtkm::Float32(height) - 1.0f; - - if (buttonStates[0] == GLUT_DOWN) - { - if (shiftKey) - view->GetCamera().Pan(x2-x1, y2-y1); - else - view->GetCamera().TrackballRotate(x1,y1, x2,y2); - } - else if (buttonStates[1] == GLUT_DOWN) - view->GetCamera().Zoom(y2-y1); + if (shiftKey) + view->GetCamera().Pan(x2 - x1, y2 - y1); + else + view->GetCamera().TrackballRotate(x1, y1, x2, y2); } + else if (buttonStates[1] == GLUT_DOWN) + view->GetCamera().Zoom(y2 - y1); + } - lastx = x; - lasty = y; - glutPostRedisplay(); + lastx = x; + lasty = y; + glutPostRedisplay(); } - // Respond to mouse button void mouseCall(int button, int state, int vtkmNotUsed(x), int vtkmNotUsed(y)) { - int modifiers = glutGetModifiers(); - shiftKey = modifiers & GLUT_ACTIVE_SHIFT; - buttonStates[button] = state; + int modifiers = glutGetModifiers(); + shiftKey = modifiers & GLUT_ACTIVE_SHIFT; + buttonStates[button] = state; - //std::cout<<"Buttons: "<Initialize(); - glutMainLoop(); + //Create vtkm rendering stuff. + view = new vtkm::rendering::View3D(scene, mapper, canvas, bg); + view->Initialize(); + glutMainLoop(); - return 0; + return 0; } #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif diff --git a/examples/streamline/StreamLineUniformGrid.cxx b/examples/streamline/StreamLineUniformGrid.cxx old mode 100755 new mode 100644 index a8159c532..e766978a7 --- a/examples/streamline/StreamLineUniformGrid.cxx +++ b/examples/streamline/StreamLineUniformGrid.cxx @@ -36,14 +36,14 @@ //Suppress warnings about glut being deprecated on OSX #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -#if defined (__APPLE__) -# include +#if defined(__APPLE__) +#include #else -# include +#include #endif #include "../isosurface/quaternion.h" @@ -51,7 +51,7 @@ typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; // Output data set shared with opengl -static vtkm::worklet::StreamLineFilterUniformGrid *streamLineFilter; +static vtkm::worklet::StreamLineFilterUniformGrid* streamLineFilter; static vtkm::cont::DataSet outDataSet; // Input parameters @@ -61,7 +61,7 @@ const vtkm::Float32 tStep = 0.5f; const vtkm::Id direction = vtkm::worklet::internal::BOTH; // Point location of vertices from a CastAndCall but needs a static cast eventually -static vtkm::cont::ArrayHandle > vertexArray; +static vtkm::cont::ArrayHandle> vertexArray; // OpenGL display variables Quaternion qrot; @@ -76,16 +76,14 @@ int mouse_state = 1; struct GetVertexArray { template - VTKM_CONT - void operator()(ArrayHandleType array) const + VTKM_CONT void operator()(ArrayHandleType array) const { this->GetVertexPortal(array.GetPortalConstControl()); } private: template - VTKM_CONT - void GetVertexPortal(const PortalType &portal) const + VTKM_CONT void GetVertexPortal(const PortalType& portal) const { for (vtkm::Id index = 0; index < portal.GetNumberOfValues(); index++) { @@ -131,7 +129,7 @@ void displayCall() glMatrixMode(GL_PROJECTION); glLoadIdentity(); - gluPerspective( 60.0f, 1.0f, 1.0f, 100.0f); + gluPerspective(60.0f, 1.0f, 1.0f, 100.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); @@ -147,8 +145,8 @@ void displayCall() // Get the cell set, coordinate system and coordinate data vtkm::cont::CellSetExplicit<> cellSet; outDataSet.GetCellSet(0).CopyTo(cellSet); - const vtkm::cont::DynamicArrayHandleCoordinateSystem &coordArray = - outDataSet.GetCoordinateSystem().GetData(); + const vtkm::cont::DynamicArrayHandleCoordinateSystem& coordArray = + outDataSet.GetCoordinateSystem().GetData(); vtkm::Id numberOfCells = cellSet.GetNumberOfCells(); vtkm::Id numberOfPoints = coordArray.GetNumberOfValues(); @@ -169,7 +167,7 @@ void displayCall() glBegin(GL_LINE_STRIP); for (vtkm::IdComponent i = 0; i < numIndices; i++) { - vtkm::Vec pt = vertexArray.GetPortalConstControl().Get(polylineIndices[i]); + vtkm::Vec pt = vertexArray.GetPortalConstControl().Get(polylineIndices[i]); glVertex3f(pt[0], pt[1], pt[2]); } glEnd(); @@ -201,19 +199,23 @@ void mouseMove(int x, int y) glutPostRedisplay(); } - // Respond to mouse button void mouseCall(int button, int state, int x, int y) { - if (button == 0) mouse_state = state; - if ((button == 0) && (state == 0)) { lastx = x; lasty = y; } + if (button == 0) + mouse_state = state; + if ((button == 0) && (state == 0)) + { + lastx = x; + lasty = y; + } } -namespace { +namespace +{ template -VTKM_EXEC_CONT -vtkm::Vec Normalize(vtkm::Vec v) +VTKM_EXEC_CONT vtkm::Vec Normalize(vtkm::Vec v) { T magnitude = static_cast(sqrt(vtkm::dot(v, v))); T zero = static_cast(0.0); @@ -223,50 +225,50 @@ vtkm::Vec Normalize(vtkm::Vec v) else return one / magnitude * v; } - } // Run streamlines on a uniform grid of vector data int main(int argc, char* argv[]) { std::cout << "StreamLineUniformGrid Example" << std::endl; - std::cout << "Parameters are fileName [numSeeds maxSteps timeStep direction]" << std::endl << std::endl; + std::cout << "Parameters are fileName [numSeeds maxSteps timeStep direction]" << std::endl + << std::endl; std::cout << "Direction is FORWARD=0 BACKWARD=1 BOTH=2" << std::endl << std::endl; std::cout << "File is expected to be binary with xdim ydim zdim as 32 bit integers " << std::endl; std::cout << "followed by vector data per dimension point as 32 bit float" << std::endl; // Read in the vector data for testing - FILE * pFile = fopen(argv[1], "rb"); - if (pFile == nullptr) perror ("Error opening file"); + FILE* pFile = fopen(argv[1], "rb"); + if (pFile == nullptr) + perror("Error opening file"); size_t ret_code = 0; // Size of the dataset int dims[3]; ret_code = fread(dims, sizeof(int), 3, pFile); - if(ret_code != 3) - { + if (ret_code != 3) + { perror("Error reading size of data"); fclose(pFile); return 0; - } + } const vtkm::Id3 vdims(dims[0], dims[1], dims[2]); // Read vector data at each point of the uniform grid and store vtkm::Id nElements = vdims[0] * vdims[1] * vdims[2] * 3; float* data = new float[static_cast(nElements)]; ret_code = fread(data, sizeof(float), static_cast(nElements), pFile); - if( ret_code != static_cast(nElements) ) - { + if (ret_code != static_cast(nElements)) + { perror("Error reading vector data"); fclose(pFile); return 0; - } - + } //We are done with the file now, so release the file descriptor fclose(pFile); - std::vector > field; + std::vector> field; for (vtkm::Id i = 0; i < nElements; i++) { vtkm::Float32 x = data[i]; @@ -275,7 +277,7 @@ int main(int argc, char* argv[]) vtkm::Vec vecData(x, y, z); field.push_back(Normalize(vecData)); } - vtkm::cont::ArrayHandle > fieldArray; + vtkm::cont::ArrayHandle> fieldArray; fieldArray = vtkm::cont::make_ArrayHandle(field); // Construct the input dataset (uniform) to hold the input and set vector data @@ -290,12 +292,7 @@ int main(int argc, char* argv[]) // Create and run the filter streamLineFilter = new vtkm::worklet::StreamLineFilterUniformGrid(); - outDataSet = streamLineFilter->Run(inDataSet, - direction, - nSeeds, - nSteps, - tStep); - + outDataSet = streamLineFilter->Run(inDataSet, direction, nSeeds, nSteps, tStep); // Render the output dataset of polylines lastx = lasty = 0; @@ -320,5 +317,5 @@ int main(int argc, char* argv[]) } #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif diff --git a/examples/tetrahedra/TetrahedralizeExplicitGrid.cxx b/examples/tetrahedra/TetrahedralizeExplicitGrid.cxx index 29e32c350..0d2e5d768 100644 --- a/examples/tetrahedra/TetrahedralizeExplicitGrid.cxx +++ b/examples/tetrahedra/TetrahedralizeExplicitGrid.cxx @@ -32,27 +32,28 @@ //Suppress warnings about glut being deprecated on OSX #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -#if defined (__APPLE__) -# include +#if defined(__APPLE__) +#include #else -# include +#include #endif #include "../isosurface/quaternion.h" typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; -namespace { +namespace +{ // Takes input uniform grid and outputs unstructured grid of tets static vtkm::cont::DataSet outDataSet; // Point location of vertices from a CastAndCall but needs a static cast eventually -static vtkm::cont::ArrayHandle > vertexArray; +static vtkm::cont::ArrayHandle> vertexArray; // OpenGL display variables Quaternion qrot; @@ -69,24 +70,24 @@ vtkm::cont::DataSet MakeTetrahedralizeExplicitDataSet() vtkm::cont::DataSetBuilderExplicitIterative builder; builder.Begin(); - builder.AddPoint( 0, 0, 0); - builder.AddPoint( 1, 0, 0); - builder.AddPoint( 2, 0, 0); - builder.AddPoint( 3, 0, 0); - builder.AddPoint( 0, 1, 0); - builder.AddPoint( 1, 1, 0); - builder.AddPoint( 2, 1, 0); - builder.AddPoint( 2.5, 1.0, 0.0); - builder.AddPoint( 0, 2, 0); - builder.AddPoint( 1, 2, 0); - builder.AddPoint( 0.5, 0.5, 1.0); - builder.AddPoint( 1, 0, 1); - builder.AddPoint( 2, 0, 1); - builder.AddPoint( 3, 0, 1); - builder.AddPoint( 1, 1, 1); - builder.AddPoint( 2, 1, 1); - builder.AddPoint( 2.5, 1.0, 1.0); - builder.AddPoint( 0.5, 1.5, 1.0); + builder.AddPoint(0, 0, 0); + builder.AddPoint(1, 0, 0); + builder.AddPoint(2, 0, 0); + builder.AddPoint(3, 0, 0); + builder.AddPoint(0, 1, 0); + builder.AddPoint(1, 1, 0); + builder.AddPoint(2, 1, 0); + builder.AddPoint(2.5, 1.0, 0.0); + builder.AddPoint(0, 2, 0); + builder.AddPoint(1, 2, 0); + builder.AddPoint(0.5, 0.5, 1.0); + builder.AddPoint(1, 0, 1); + builder.AddPoint(2, 0, 1); + builder.AddPoint(3, 0, 1); + builder.AddPoint(1, 1, 1); + builder.AddPoint(2, 1, 1); + builder.AddPoint(2.5, 1.0, 1.0); + builder.AddPoint(0.5, 1.5, 1.0); builder.AddCell(vtkm::CELL_SHAPE_TETRA); builder.AddCellPoint(0); @@ -130,16 +131,14 @@ vtkm::cont::DataSet MakeTetrahedralizeExplicitDataSet() struct GetVertexArray { template - VTKM_CONT - void operator()(ArrayHandleType array) const + VTKM_CONT void operator()(ArrayHandleType array) const { this->GetVertexPortal(array.GetPortalConstControl()); } private: template - VTKM_CONT - void GetVertexPortal(const PortalType &portal) const + VTKM_CONT void GetVertexPortal(const PortalType& portal) const { for (vtkm::Id index = 0; index < portal.GetNumberOfValues(); index++) { @@ -175,7 +174,6 @@ void initializeGL() glEnable(GL_COLOR_MATERIAL); } - // // Render the output using simple OpenGL // @@ -186,7 +184,7 @@ void displayCall() glMatrixMode(GL_PROJECTION); glLoadIdentity(); - gluPerspective( 45.0f, 1.0f, 1.0f, 40.0f); + gluPerspective(45.0f, 1.0f, 1.0f, 40.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); @@ -209,15 +207,14 @@ void displayCall() vtkm::cont::CastAndCall(outDataSet.GetCoordinateSystem(), GetVertexArray()); // Draw the five tetrahedra belonging to each hexadron - vtkm::Float32 color[5][3] = { - {1.0f, 0.0f, 0.0f}, - {0.0f, 1.0f, 0.0f}, - {0.0f, 0.0f, 1.0f}, - {1.0f, 0.0f, 1.0f}, - {1.0f, 1.0f, 0.0f} - }; + vtkm::Float32 color[5][3] = { { 1.0f, 0.0f, 0.0f }, + { 0.0f, 1.0f, 0.0f }, + { 0.0f, 0.0f, 1.0f }, + { 1.0f, 0.0f, 1.0f }, + { 1.0f, 1.0f, 0.0f } }; - for (vtkm::Id tetra = 0; tetra < numberOfCells; tetra++) { + for (vtkm::Id tetra = 0; tetra < numberOfCells; tetra++) + { vtkm::Id indx = tetra % 5; glColor3f(color[indx][0], color[indx][1], color[indx][2]); @@ -226,13 +223,13 @@ void displayCall() cellSet.GetIndices(tetra, tetIndices); // Get the vertex points for this tetrahedron - vtkm::Vec pt0 = vertexArray.GetPortalConstControl().Get(tetIndices[0]); - vtkm::Vec pt1 = vertexArray.GetPortalConstControl().Get(tetIndices[1]); - vtkm::Vec pt2 = vertexArray.GetPortalConstControl().Get(tetIndices[2]); - vtkm::Vec pt3 = vertexArray.GetPortalConstControl().Get(tetIndices[3]); + vtkm::Vec pt0 = vertexArray.GetPortalConstControl().Get(tetIndices[0]); + vtkm::Vec pt1 = vertexArray.GetPortalConstControl().Get(tetIndices[1]); + vtkm::Vec pt2 = vertexArray.GetPortalConstControl().Get(tetIndices[2]); + vtkm::Vec pt3 = vertexArray.GetPortalConstControl().Get(tetIndices[3]); // Draw the tetrahedron filled with alternating colors - glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glBegin(GL_TRIANGLE_STRIP); glVertex3d(pt0[0], pt0[1], pt0[2]); glVertex3d(pt1[0], pt1[1], pt1[2]); @@ -244,7 +241,7 @@ void displayCall() // Draw the tetrahedron wireframe glColor3f(1.0f, 1.0f, 1.0f); - glPolygonMode( GL_FRONT_AND_BACK, GL_LINE ); + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glBegin(GL_TRIANGLE_STRIP); glVertex3d(pt0[0], pt0[1], pt0[2]); glVertex3d(pt1[0], pt1[1], pt1[2]); @@ -258,7 +255,6 @@ void displayCall() glutSwapBuffers(); } - // Allow rotations of the view void mouseMove(int x, int y) { @@ -282,15 +278,18 @@ void mouseMove(int x, int y) glutPostRedisplay(); } - // Respond to mouse button void mouseCall(int button, int state, int x, int y) { - if (button == 0) mouse_state = state; - if ((button == 0) && (state == 0)) { lastx = x; lasty = y; } + if (button == 0) + mouse_state = state; + if ((button == 0) && (state == 0)) + { + lastx = x; + lasty = y; + } } - // Tetrahedralize and render uniform grid example int main(int argc, char* argv[]) { @@ -329,5 +328,5 @@ int main(int argc, char* argv[]) } #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif diff --git a/examples/tetrahedra/TetrahedralizeUniformGrid.cxx b/examples/tetrahedra/TetrahedralizeUniformGrid.cxx index dfe20ffe2..e022bb401 100644 --- a/examples/tetrahedra/TetrahedralizeUniformGrid.cxx +++ b/examples/tetrahedra/TetrahedralizeUniformGrid.cxx @@ -31,14 +31,14 @@ //Suppress warnings about glut being deprecated on OSX #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -#if defined (__APPLE__) -# include +#if defined(__APPLE__) +#include #else -# include +#include #endif #include "../isosurface/quaternion.h" @@ -46,14 +46,14 @@ typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; // Default size of the example -static vtkm::Id3 dims(4,4,4); +static vtkm::Id3 dims(4, 4, 4); static vtkm::Id cellsToDisplay = 64; // Takes input uniform grid and outputs unstructured grid of tets static vtkm::cont::DataSet tetDataSet; // Point location of vertices from a CastAndCall but needs a static cast eventually -static vtkm::cont::ArrayHandle > vertexArray; +static vtkm::cont::ArrayHandle> vertexArray; // OpenGL display variables static Quaternion qrot; @@ -71,14 +71,12 @@ vtkm::cont::DataSet MakeTetrahedralizeTestDataSet(vtkm::Id3 dim) const vtkm::Id3 vdims(dim[0] + 1, dim[1] + 1, dim[2] + 1); const vtkm::Vec origin = vtkm::make_Vec(0.0f, 0.0f, 0.0f); const vtkm::Vec spacing = vtkm::make_Vec( - 1.0f/static_cast(dim[0]), - 1.0f/static_cast(dim[1]), - 1.0f/static_cast(dim[2])); + 1.0f / static_cast(dim[0]), 1.0f / static_cast(dim[1]), + 1.0f / static_cast(dim[2])); // Generate coordinate system vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vdims, origin, spacing); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); // Generate cell set vtkm::cont::CellSetStructured<3> cellSet("cells"); @@ -96,16 +94,14 @@ vtkm::cont::DataSet MakeTetrahedralizeTestDataSet(vtkm::Id3 dim) struct GetVertexArray { template - VTKM_CONT - void operator()(ArrayHandleType array) const + VTKM_CONT void operator()(ArrayHandleType array) const { this->GetVertexPortal(array.GetPortalConstControl()); } private: template - VTKM_CONT - void GetVertexPortal(const PortalType &portal) const + VTKM_CONT void GetVertexPortal(const PortalType& portal) const { for (vtkm::Id index = 0; index < portal.GetNumberOfValues(); index++) { @@ -141,7 +137,6 @@ void initializeGL() glEnable(GL_COLOR_MATERIAL); } - // // Render the output using simple OpenGL // @@ -152,7 +147,7 @@ void displayCall() glMatrixMode(GL_PROJECTION); glLoadIdentity(); - gluPerspective( 45.0f, 1.0f, 1.0f, 20.0f); + gluPerspective(45.0f, 1.0f, 1.0f, 20.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); @@ -176,14 +171,11 @@ void displayCall() // Draw the five tetrahedra belonging to each hexadron vtkm::Id tetra = 0; - vtkm::Float32 color[5][3] = - { - {1.0f, 0.0f, 0.0f}, - {0.0f, 1.0f, 0.0f}, - {0.0f, 0.0f, 1.0f}, - {1.0f, 0.0f, 1.0f}, - {1.0f, 1.0f, 0.0f} - }; + vtkm::Float32 color[5][3] = { { 1.0f, 0.0f, 0.0f }, + { 0.0f, 1.0f, 0.0f }, + { 0.0f, 0.0f, 1.0f }, + { 1.0f, 0.0f, 1.0f }, + { 1.0f, 1.0f, 0.0f } }; for (vtkm::Id hex = 0; hex < cellsToDisplay; hex++) { @@ -197,13 +189,13 @@ void displayCall() cellSet.GetIndices(tetra, tetIndices); // Get the vertex points for this tetrahedron - vtkm::Vec pt0 = vertexArray.GetPortalConstControl().Get(tetIndices[0]); - vtkm::Vec pt1 = vertexArray.GetPortalConstControl().Get(tetIndices[1]); - vtkm::Vec pt2 = vertexArray.GetPortalConstControl().Get(tetIndices[2]); - vtkm::Vec pt3 = vertexArray.GetPortalConstControl().Get(tetIndices[3]); + vtkm::Vec pt0 = vertexArray.GetPortalConstControl().Get(tetIndices[0]); + vtkm::Vec pt1 = vertexArray.GetPortalConstControl().Get(tetIndices[1]); + vtkm::Vec pt2 = vertexArray.GetPortalConstControl().Get(tetIndices[2]); + vtkm::Vec pt3 = vertexArray.GetPortalConstControl().Get(tetIndices[3]); // Draw the tetrahedron filled with alternating colors - glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glBegin(GL_TRIANGLE_STRIP); glVertex3d(pt0[0], pt0[1], pt0[2]); glVertex3d(pt1[0], pt1[1], pt1[2]); @@ -215,7 +207,7 @@ void displayCall() // Draw the tetrahedron wireframe glColor3f(1.0f, 1.0f, 1.0f); - glPolygonMode( GL_FRONT_AND_BACK, GL_LINE ); + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glBegin(GL_TRIANGLE_STRIP); glVertex3d(pt0[0], pt0[1], pt0[2]); glVertex3d(pt1[0], pt1[1], pt1[2]); @@ -233,7 +225,6 @@ void displayCall() glutSwapBuffers(); } - // Allow rotations of the view void mouseMove(int x, int y) { @@ -257,15 +248,18 @@ void mouseMove(int x, int y) glutPostRedisplay(); } - // Respond to mouse button void mouseCall(int button, int state, int x, int y) { - if (button == 0) mouse_state = state; - if ((button == 0) && (state == 0)) { lastx = x; lasty = y; } + if (button == 0) + mouse_state = state; + if ((button == 0) && (state == 0)) + { + lastx = x; + lasty = y; + } } - // Tetrahedralize and render uniform grid example int main(int argc, char* argv[]) { @@ -280,7 +274,8 @@ int main(int argc, char* argv[]) dims[2] = atoi(argv[3]); cellsToDisplay = dims[0] * dims[1] * dims[2]; } - if (argc == 5) { + if (argc == 5) + { cellsToDisplay = atoi(argv[4]); } @@ -314,5 +309,5 @@ int main(int argc, char* argv[]) } #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif diff --git a/examples/tetrahedra/TriangulateExplicitGrid.cxx b/examples/tetrahedra/TriangulateExplicitGrid.cxx index 4cf90777f..9f3d02341 100644 --- a/examples/tetrahedra/TriangulateExplicitGrid.cxx +++ b/examples/tetrahedra/TriangulateExplicitGrid.cxx @@ -31,26 +31,27 @@ //Suppress warnings about glut being deprecated on OSX #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -#if defined (__APPLE__) -# include +#if defined(__APPLE__) +#include #else -# include +#include #endif typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; -namespace { +namespace +{ // Takes input uniform grid and outputs unstructured grid of triangles static vtkm::cont::DataSet outDataSet; static vtkm::Id numberOfInPoints; // Point location of vertices from a CastAndCall but needs a static cast eventually -static vtkm::cont::ArrayHandle > vertexArray; +static vtkm::cont::ArrayHandle> vertexArray; } // anonymous namespace @@ -132,16 +133,14 @@ vtkm::cont::DataSet MakeTriangulateExplicitDataSet() struct GetVertexArray { template - VTKM_CONT - void operator()(ArrayHandleType array) const + VTKM_CONT void operator()(ArrayHandleType array) const { this->GetVertexPortal(array.GetPortalConstControl()); } private: template - VTKM_CONT - void GetVertexPortal(const PortalType &portal) const + VTKM_CONT void GetVertexPortal(const PortalType& portal) const { for (vtkm::Id index = 0; index < portal.GetNumberOfValues(); index++) { @@ -161,7 +160,6 @@ void initializeGL() glOrtho(-0.5f, 3.5f, -0.5f, 4.5f, -1.0f, 1.0f); } - // // Render the output using simple OpenGL // @@ -182,13 +180,11 @@ void displayCall() // Draw the two triangles belonging to each quad vtkm::Float32 color[4][3] = { - {1.0f, 0.0f, 0.0f}, - {0.0f, 1.0f, 0.0f}, - {0.0f, 0.0f, 1.0f}, - {1.0f, 1.0f, 0.0f} + { 1.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f }, { 1.0f, 1.0f, 0.0f } }; - for (vtkm::Id triangle = 0; triangle < numberOfCells; triangle++) { + for (vtkm::Id triangle = 0; triangle < numberOfCells; triangle++) + { vtkm::Id indx = triangle % 4; glColor3f(color[indx][0], color[indx][1], color[indx][2]); @@ -197,16 +193,16 @@ void displayCall() cellSet.GetIndices(triangle, triIndices); // Get the vertex points for this triangle - vtkm::Vec pt0 = vertexArray.GetPortalConstControl().Get(triIndices[0]); - vtkm::Vec pt1 = vertexArray.GetPortalConstControl().Get(triIndices[1]); - vtkm::Vec pt2 = vertexArray.GetPortalConstControl().Get(triIndices[2]); + vtkm::Vec pt0 = vertexArray.GetPortalConstControl().Get(triIndices[0]); + vtkm::Vec pt1 = vertexArray.GetPortalConstControl().Get(triIndices[1]); + vtkm::Vec pt2 = vertexArray.GetPortalConstControl().Get(triIndices[2]); // Draw the triangle filled with alternating colors - glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glBegin(GL_TRIANGLES); - glVertex3d(pt0[0], pt0[1], pt0[2]); - glVertex3d(pt1[0], pt1[1], pt1[2]); - glVertex3d(pt2[0], pt2[1], pt2[2]); + glVertex3d(pt0[0], pt0[1], pt0[2]); + glVertex3d(pt1[0], pt1[1], pt1[2]); + glVertex3d(pt2[0], pt2[1], pt2[2]); glEnd(); } glFlush(); @@ -248,5 +244,5 @@ int main(int argc, char* argv[]) } #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif diff --git a/examples/tetrahedra/TriangulateUniformGrid.cxx b/examples/tetrahedra/TriangulateUniformGrid.cxx index 586d829c3..d0fc2ea21 100644 --- a/examples/tetrahedra/TriangulateUniformGrid.cxx +++ b/examples/tetrahedra/TriangulateUniformGrid.cxx @@ -31,27 +31,27 @@ //Suppress warnings about glut being deprecated on OSX #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -#if defined (__APPLE__) -# include +#if defined(__APPLE__) +#include #else -# include +#include #endif typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; // Default size of the example -static vtkm::Id2 dims(4,4); +static vtkm::Id2 dims(4, 4); static vtkm::Id cellsToDisplay = 16; // Takes input uniform grid and outputs unstructured grid of triangles static vtkm::cont::DataSet triDataSet; // Point location of vertices from a CastAndCall but needs a static cast eventually -static vtkm::cont::ArrayHandle > vertexArray; +static vtkm::cont::ArrayHandle> vertexArray; // // Construct an input data set with uniform grid of indicated dimensions, origin and spacing @@ -64,14 +64,11 @@ vtkm::cont::DataSet MakeTriangulateTestDataSet(vtkm::Id2 dim) const vtkm::Id3 vdims(dim[0] + 1, dim[1] + 1, 1); const vtkm::Vec origin = vtkm::make_Vec(0.0f, 0.0f, 0.0f); const vtkm::Vec spacing = vtkm::make_Vec( - 1.0f/static_cast(dim[0]), - 1.0f/static_cast(dim[1]), - 0.0f); + 1.0f / static_cast(dim[0]), 1.0f / static_cast(dim[1]), 0.0f); // Generate coordinate system vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vdims, origin, spacing); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); // Generate cell set vtkm::cont::CellSetStructured<2> cellSet("cells"); @@ -89,16 +86,14 @@ vtkm::cont::DataSet MakeTriangulateTestDataSet(vtkm::Id2 dim) struct GetVertexArray { template - VTKM_CONT - void operator()(ArrayHandleType array) const + VTKM_CONT void operator()(ArrayHandleType array) const { this->GetVertexPortal(array.GetPortalConstControl()); } private: template - VTKM_CONT - void GetVertexPortal(const PortalType &portal) const + VTKM_CONT void GetVertexPortal(const PortalType& portal) const { for (vtkm::Id index = 0; index < portal.GetNumberOfValues(); index++) { @@ -118,7 +113,6 @@ void initializeGL() glOrtho(-0.5f, 1.5f, -0.5f, 1.5f, -1.0f, 1.0f); } - // // Render the output using simple OpenGL // @@ -138,12 +132,8 @@ void displayCall() // Draw the two triangles belonging to each quad vtkm::Id triangle = 0; - vtkm::Float32 color[4][3] = - { - {1.0f, 0.0f, 0.0f}, - {0.0f, 1.0f, 0.0f}, - {0.0f, 0.0f, 1.0f}, - {1.0f, 1.0f, 0.0f} + vtkm::Float32 color[4][3] = { + { 1.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f }, { 1.0f, 1.0f, 0.0f } }; for (vtkm::Id quad = 0; quad < cellsToDisplay; quad++) @@ -158,16 +148,16 @@ void displayCall() cellSet.GetIndices(triangle, triIndices); // Get the vertex points for this triangle - vtkm::Vec pt0 = vertexArray.GetPortalConstControl().Get(triIndices[0]); - vtkm::Vec pt1 = vertexArray.GetPortalConstControl().Get(triIndices[1]); - vtkm::Vec pt2 = vertexArray.GetPortalConstControl().Get(triIndices[2]); + vtkm::Vec pt0 = vertexArray.GetPortalConstControl().Get(triIndices[0]); + vtkm::Vec pt1 = vertexArray.GetPortalConstControl().Get(triIndices[1]); + vtkm::Vec pt2 = vertexArray.GetPortalConstControl().Get(triIndices[2]); // Draw the triangle filled with alternating colors - glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glBegin(GL_TRIANGLES); - glVertex3d(pt0[0], pt0[1], pt0[2]); - glVertex3d(pt1[0], pt1[1], pt1[2]); - glVertex3d(pt2[0], pt2[1], pt2[2]); + glVertex3d(pt0[0], pt0[1], pt0[2]); + glVertex3d(pt1[0], pt1[1], pt1[2]); + glVertex3d(pt2[0], pt2[1], pt2[2]); glEnd(); triangle++; @@ -222,5 +212,5 @@ int main(int argc, char* argv[]) } #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif diff --git a/examples/unified_memory/UnifiedMemory.cu b/examples/unified_memory/UnifiedMemory.cu index d44626c2d..989a9e59d 100644 --- a/examples/unified_memory/UnifiedMemory.cu +++ b/examples/unified_memory/UnifiedMemory.cu @@ -31,8 +31,8 @@ #include #include - -namespace { +namespace +{ // Define the tangle field for the input data class TangleField : public vtkm::worklet::WorkletMapField @@ -47,29 +47,40 @@ public: const vtkm::Id cellsPerLayer; VTKM_CONT - TangleField(const vtkm::Id3 dims, const vtkm::Float32 mins[3], const vtkm::Float32 maxs[3]) : xdim(dims[0]), ydim(dims[1]), zdim(dims[2]), - xmin(mins[0]), ymin(mins[1]), zmin(mins[2]), xmax(maxs[0]), ymax(maxs[1]), zmax(maxs[2]), cellsPerLayer((xdim) * (ydim)) { }; + TangleField(const vtkm::Id3 dims, const vtkm::Float32 mins[3], const vtkm::Float32 maxs[3]) + : xdim(dims[0]) + , ydim(dims[1]) + , zdim(dims[2]) + , xmin(mins[0]) + , ymin(mins[1]) + , zmin(mins[2]) + , xmax(maxs[0]) + , ymax(maxs[1]) + , zmax(maxs[2]) + , cellsPerLayer((xdim) * (ydim)){}; VTKM_EXEC - void operator()(const vtkm::Id &vertexId, vtkm::Float32 &v) const + void operator()(const vtkm::Id& vertexId, vtkm::Float32& v) const { const vtkm::Id x = vertexId % (xdim); const vtkm::Id y = (vertexId / (xdim)) % (ydim); const vtkm::Id z = vertexId / cellsPerLayer; - const vtkm::Float32 fx = static_cast(x) / static_cast(xdim-1); - const vtkm::Float32 fy = static_cast(y) / static_cast(xdim-1); - const vtkm::Float32 fz = static_cast(z) / static_cast(xdim-1); + const vtkm::Float32 fx = static_cast(x) / static_cast(xdim - 1); + const vtkm::Float32 fy = static_cast(y) / static_cast(xdim - 1); + const vtkm::Float32 fz = static_cast(z) / static_cast(xdim - 1); - const vtkm::Float32 xx = 3.0f*(xmin+(xmax-xmin)*(fx)); - const vtkm::Float32 yy = 3.0f*(ymin+(ymax-ymin)*(fy)); - const vtkm::Float32 zz = 3.0f*(zmin+(zmax-zmin)*(fz)); + const vtkm::Float32 xx = 3.0f * (xmin + (xmax - xmin) * (fx)); + const vtkm::Float32 yy = 3.0f * (ymin + (ymax - ymin) * (fy)); + const vtkm::Float32 zz = 3.0f * (zmin + (zmax - zmin) * (fz)); - v = (xx*xx*xx*xx - 5.0f*xx*xx + yy*yy*yy*yy - 5.0f*yy*yy + zz*zz*zz*zz - 5.0f*zz*zz + 11.8f) * 0.2f + 0.5f; + v = (xx * xx * xx * xx - 5.0f * xx * xx + yy * yy * yy * yy - 5.0f * yy * yy + + zz * zz * zz * zz - 5.0f * zz * zz + 11.8f) * + 0.2f + + 0.5f; } }; - // Construct an input data set using the tangle field worklet vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims) { @@ -77,24 +88,23 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims) const vtkm::Id3 vdims(dims[0] + 1, dims[1] + 1, dims[2] + 1); - vtkm::Float32 mins[3] = {-1.0f, -1.0f, -1.0f}; - vtkm::Float32 maxs[3] = {1.0f, 1.0f, 1.0f}; + vtkm::Float32 mins[3] = { -1.0f, -1.0f, -1.0f }; + vtkm::Float32 maxs[3] = { 1.0f, 1.0f, 1.0f }; vtkm::cont::ArrayHandle fieldArray; - vtkm::cont::ArrayHandleCounting vertexCountImplicitArray(0, 1, vdims[0]*vdims[1]*vdims[2]); - vtkm::worklet::DispatcherMapField tangleFieldDispatcher(TangleField(vdims, mins, maxs)); + vtkm::cont::ArrayHandleCounting vertexCountImplicitArray(0, 1, vdims[0] * vdims[1] * + vdims[2]); + vtkm::worklet::DispatcherMapField tangleFieldDispatcher( + TangleField(vdims, mins, maxs)); tangleFieldDispatcher.Invoke(vertexCountImplicitArray, fieldArray); - vtkm::Vec origin(0.0f, 0.0f, 0.0f); - vtkm::Vec spacing( - 1.0f/static_cast(dims[0]), - 1.0f/static_cast(dims[2]), - 1.0f/static_cast(dims[1])); + vtkm::Vec origin(0.0f, 0.0f, 0.0f); + vtkm::Vec spacing(1.0f / static_cast(dims[0]), + 1.0f / static_cast(dims[2]), + 1.0f / static_cast(dims[1])); - vtkm::cont::ArrayHandleUniformPointCoordinates - coordinates(vdims, origin, spacing); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vdims, origin, spacing); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); dataSet.AddField(vtkm::cont::Field("nodevar", vtkm::cont::Field::ASSOC_POINTS, fieldArray)); @@ -105,10 +115,8 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims) return dataSet; } - } - namespace vtkm { namespace worklet @@ -120,26 +128,26 @@ public: typedef _2 ExecutionSignature(_1, WorkIndex); VTKM_EXEC - vtkm::Float32 operator()(vtkm::Int64 x, vtkm::Id& index) const { - return (vtkm::Sin(1.0*x)); - } + vtkm::Float32 operator()(vtkm::Int64 x, vtkm::Id& index) const { return (vtkm::Sin(1.0 * x)); } }; } } - // Run a simple worklet, and compute an isosurface int main(int argc, char* argv[]) { - vtkm::Int64 N = 1024*1024*1024; - if (argc > 1) N = N*atoi(argv[1]); - else N = N*4; + vtkm::Int64 N = 1024 * 1024 * 1024; + if (argc > 1) + N = N * atoi(argv[1]); + else + N = N * 4; std::cout << "Testing streaming worklet with size " << N << std::endl; vtkm::cont::ArrayHandle input; vtkm::cont::ArrayHandle output; - std::vector data(N); - for (vtkm::Int64 i=0; i data(N); + for (vtkm::Int64 i = 0; i < N; i++) + data[i] = i; input = vtkm::cont::make_ArrayHandle(data); typedef vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; @@ -148,30 +156,29 @@ int main(int argc, char* argv[]) #ifdef VTKM_USE_UNIFIED_MEMORY std::cout << "Testing with unified memory" << std::endl; - vtkm::worklet::DispatcherMapField - dispatcher(sineWorklet); + vtkm::worklet::DispatcherMapField dispatcher(sineWorklet); vtkm::cont::Timer<> timer; dispatcher.Invoke(input, output); - std::cout << output.GetPortalConstControl().Get(output.GetNumberOfValues()-1) << std::endl; + std::cout << output.GetPortalConstControl().Get(output.GetNumberOfValues() - 1) << std::endl; vtkm::Float64 elapsedTime = timer.GetElapsedTime(); std::cout << "Time: " << elapsedTime << std::endl; #else - vtkm::worklet::DispatcherStreamingMapField - dispatcher(sineWorklet); - vtkm::Id NBlocks = N/(1024*1024*1024); + vtkm::worklet::DispatcherStreamingMapField dispatcher(sineWorklet); + vtkm::Id NBlocks = N / (1024 * 1024 * 1024); NBlocks *= 2; dispatcher.SetNumberOfBlocks(NBlocks); - std::cout << "Testing with streaming (without unified memory) with " << NBlocks << " blocks" << std::endl; + std::cout << "Testing with streaming (without unified memory) with " << NBlocks << " blocks" + << std::endl; vtkm::cont::Timer<> timer; dispatcher.Invoke(input, output); - std::cout << output.GetPortalConstControl().Get(output.GetNumberOfValues()-1) << std::endl; + std::cout << output.GetPortalConstControl().Get(output.GetNumberOfValues() - 1) << std::endl; vtkm::Float64 elapsedTime = timer.GetElapsedTime(); std::cout << "Time: " << elapsedTime << std::endl; @@ -179,32 +186,33 @@ int main(int argc, char* argv[]) #endif int dim = 128; - if (argc > 2) dim = atoi(argv[2]); + if (argc > 2) + dim = atoi(argv[2]); std::cout << "Testing Marching Cubes with size " << dim << "x" << dim << "x" << dim << std::endl; vtkm::Id3 dims(dim, dim, dim); - vtkm::cont::ArrayHandle > verticesArray, normalsArray; + vtkm::cont::ArrayHandle> verticesArray, normalsArray; vtkm::cont::ArrayHandle scalarsArray; vtkm::cont::DataSet dataSet = MakeIsosurfaceTestDataSet(dims); vtkm::filter::MarchingCubes filter; filter.SetGenerateNormals(true); - filter.SetMergeDuplicatePoints( false ); - filter.SetIsoValue( 0.5 ); - vtkm::filter::ResultDataSet result = - filter.Execute( dataSet, dataSet.GetField("nodevar") ); + filter.SetMergeDuplicatePoints(false); + filter.SetIsoValue(0.5); + vtkm::filter::ResultDataSet result = filter.Execute(dataSet, dataSet.GetField("nodevar")); filter.MapFieldOntoOutput(result, dataSet.GetField("nodevar")); //need to extract vertices, normals, and scalars vtkm::cont::DataSet& outputData = result.GetDataSet(); - typedef vtkm::cont::ArrayHandle< vtkm::Vec > VertType; + typedef vtkm::cont::ArrayHandle> VertType; vtkm::cont::CoordinateSystem coords = outputData.GetCoordinateSystem(); verticesArray = coords.GetData().Cast(); normalsArray = outputData.GetField("normals").GetData().Cast(); - scalarsArray = outputData.GetField("nodevar").GetData().Cast< vtkm::cont::ArrayHandle >(); + scalarsArray = + outputData.GetField("nodevar").GetData().Cast>(); std::cout << "Number of output vertices: " << verticesArray.GetNumberOfValues() << std::endl; @@ -220,4 +228,3 @@ int main(int argc, char* argv[]) return 0; } - diff --git a/vtkm/.gitattributes b/vtkm/.gitattributes new file mode 100644 index 000000000..5c89bc8a9 --- /dev/null +++ b/vtkm/.gitattributes @@ -0,0 +1,2 @@ +# Generated. +TypeListTag.h -format.clang-format diff --git a/vtkm/Assert.h b/vtkm/Assert.h index 624644c95..4d3de9400 100644 --- a/vtkm/Assert.h +++ b/vtkm/Assert.h @@ -37,11 +37,9 @@ /// for the possibility that the condition is never evaluated. /// #if !defined(NDEBUG) -#define VTKM_ASSERT(condition) \ - assert(condition) +#define VTKM_ASSERT(condition) assert(condition) #else #define VTKM_ASSERT(condition) #endif - #endif //vtk_m_Assert_h diff --git a/vtkm/BaseComponent.h b/vtkm/BaseComponent.h index dcd7046a0..bd31d573d 100644 --- a/vtkm/BaseComponent.h +++ b/vtkm/BaseComponent.h @@ -20,37 +20,38 @@ #ifndef vtk_m_BaseComponent_h #define vtk_m_BaseComponent_h - #include #include #include -namespace vtkm { +namespace vtkm +{ -namespace detail { +namespace detail +{ -template +template struct BaseComponentImpl; -template +template struct BaseComponentImpl { private: using ComponentType = typename vtkm::VecTraits::ComponentType; + public: using Type = - typename BaseComponentImpl< - ComponentType, - typename vtkm::TypeTraits::DimensionalityTag - >::Type; + typename BaseComponentImpl::DimensionalityTag>::Type; }; -template +template struct BaseComponentImpl : BaseComponentImpl -{ }; +{ +}; -template +template struct BaseComponentImpl { using Type = ScalarType; @@ -60,13 +61,12 @@ struct BaseComponentImpl // Finds the base component type of a Vec. If you have a Vec of Vecs, it will // descend all Vecs until you get to the scalar type. -template +template struct BaseComponent { using Type = - typename detail::BaseComponentImpl< - VecType, - typename vtkm::TypeTraits::DimensionalityTag>::Type; + typename detail::BaseComponentImpl::DimensionalityTag>::Type; }; } // namespace vtkm diff --git a/vtkm/BinaryOperators.h b/vtkm/BinaryOperators.h index a0ba01101..a438a19ba 100644 --- a/vtkm/BinaryOperators.h +++ b/vtkm/BinaryOperators.h @@ -23,7 +23,8 @@ #include #include -namespace vtkm { +namespace vtkm +{ // Disable conversion warnings for Sum and Product on GCC only. // GCC creates false positive warnings for signed/unsigned char* operations. @@ -41,7 +42,7 @@ namespace vtkm { /// Note: Requires Type \p T implement the + operator. struct Sum { - template + template VTKM_EXEC_CONT T operator()(const T& x, const T& y) const { return x + y; @@ -53,7 +54,7 @@ struct Sum /// Note: Requires Type \p T implement the * operator. struct Product { - template + template VTKM_EXEC_CONT T operator()(const T& x, const T& y) const { return x * y; @@ -64,17 +65,16 @@ struct Product #pragma GCC diagnostic pop #endif // gcc || clang - /// Binary Predicate that takes two arguments argument \c x, and \c y and /// returns the \c x if x > y otherwise returns \c y. /// Note: Requires Type \p T implement the < operator. //needs to be full length to not clash with vtkm::math function Max. struct Maximum { - template + template VTKM_EXEC_CONT T operator()(const T& x, const T& y) const { - return x < y ? y: x; + return x < y ? y : x; } }; @@ -84,14 +84,13 @@ struct Maximum //needs to be full length to not clash with vtkm::math function Min. struct Minimum { - template + template VTKM_EXEC_CONT T operator()(const T& x, const T& y) const { - return x < y ? x: y; + return x < y ? x : y; } }; - /// Binary Predicate that takes two arguments argument \c x, and \c y and /// returns a vtkm::Vec that represents the minimum and maximum values /// Note: Requires Type \p T implement the vtkm::Min and vtkm::Max functions. @@ -99,27 +98,25 @@ template struct MinAndMax { VTKM_EXEC_CONT - vtkm::Vec operator()(const T& a, const T& b) const + vtkm::Vec operator()(const T& a, const T& b) const { return vtkm::make_Vec(vtkm::Min(a, b), vtkm::Max(a, b)); } VTKM_EXEC_CONT - vtkm::Vec operator()( - const vtkm::Vec& a, const vtkm::Vec& b) const + vtkm::Vec operator()(const vtkm::Vec& a, const vtkm::Vec& b) const { - return vtkm::make_Vec( - vtkm::Min(a[0], b[0]), vtkm::Max(a[1], b[1])); + return vtkm::make_Vec(vtkm::Min(a[0], b[0]), vtkm::Max(a[1], b[1])); } VTKM_EXEC_CONT - vtkm::Vec operator()(const T& a, const vtkm::Vec& b) const + vtkm::Vec operator()(const T& a, const vtkm::Vec& b) const { return vtkm::make_Vec(vtkm::Min(a, b[0]), vtkm::Max(a, b[1])); } VTKM_EXEC_CONT - vtkm::Vec operator()(const vtkm::Vec& a, const T& b) const + vtkm::Vec operator()(const vtkm::Vec& a, const T& b) const { return vtkm::make_Vec(vtkm::Min(a[0], b), vtkm::Max(a[1], b)); } @@ -130,7 +127,7 @@ struct MinAndMax /// Note: Requires Type \p T implement the & operator. struct BitwiseAnd { - template + template VTKM_EXEC_CONT T operator()(const T& x, const T& y) const { return x & y; @@ -142,7 +139,7 @@ struct BitwiseAnd /// Note: Requires Type \p T implement the | operator. struct BitwiseOr { - template + template VTKM_EXEC_CONT T operator()(const T& x, const T& y) const { return x | y; @@ -154,14 +151,13 @@ struct BitwiseOr /// Note: Requires Type \p T implement the ^ operator. struct BitwiseXor { - template + template VTKM_EXEC_CONT T operator()(const T& x, const T& y) const { return x ^ y; } }; - } // namespace vtkm #endif //vtk_m_BinaryOperators_h diff --git a/vtkm/BinaryPredicates.h b/vtkm/BinaryPredicates.h index 3a3b20742..516740dcc 100644 --- a/vtkm/BinaryPredicates.h +++ b/vtkm/BinaryPredicates.h @@ -22,14 +22,15 @@ #include -namespace vtkm { +namespace vtkm +{ /// Binary Predicate that takes two arguments argument \c x, and \c y and /// returns True if and only if \c x is equal to \c y. /// Note: Requires Type \p T implement the == operator. struct Equal { - template + template VTKM_EXEC_CONT bool operator()(const T& x, const T& y) const { return x == y; @@ -41,7 +42,7 @@ struct Equal /// Note: Requires Type \p T implement the != operator. struct NotEqual { - template + template VTKM_EXEC_CONT bool operator()(const T& x, const T& y) const { return x != y; @@ -53,7 +54,7 @@ struct NotEqual /// Note: Requires Type \p T implement the < operator. struct SortLess { - template + template VTKM_EXEC_CONT bool operator()(const T& x, const T& y) const { return x < y; @@ -66,7 +67,7 @@ struct SortLess /// comparison struct SortGreater { - template + template VTKM_EXEC_CONT bool operator()(const T& x, const T& y) const { return y < x; @@ -79,7 +80,7 @@ struct SortGreater /// && operator. struct LogicalAnd { - template + template VTKM_EXEC_CONT bool operator()(const T& x, const T& y) const { return x && y; @@ -92,7 +93,7 @@ struct LogicalAnd /// || operator. struct LogicalOr { - template + template VTKM_EXEC_CONT bool operator()(const T& x, const T& y) const { return x || y; diff --git a/vtkm/Bounds.h b/vtkm/Bounds.h index 4410b83b9..97864fe55 100644 --- a/vtkm/Bounds.h +++ b/vtkm/Bounds.h @@ -23,7 +23,8 @@ #include -namespace vtkm { +namespace vtkm +{ /// \brief Represent an axis-aligned 3D bounds in space. /// @@ -42,53 +43,49 @@ struct Bounds vtkm::Range Z; VTKM_EXEC_CONT - Bounds() { } + Bounds() {} VTKM_EXEC_CONT - Bounds(const vtkm::Range &xRange, - const vtkm::Range &yRange, - const vtkm::Range &zRange) - : X(xRange), Y(yRange), Z(zRange) { } + Bounds(const vtkm::Range& xRange, const vtkm::Range& yRange, const vtkm::Range& zRange) + : X(xRange) + , Y(yRange) + , Z(zRange) + { + } - template - VTKM_EXEC_CONT - Bounds(const T1 &minX, const T2 &maxX, - const T3 &minY, const T4 &maxY, - const T5 &minZ, const T6 &maxZ) - : X(vtkm::Range(minX, maxX)), - Y(vtkm::Range(minY, maxY)), - Z(vtkm::Range(minZ, maxZ)) - { } + template + VTKM_EXEC_CONT Bounds(const T1& minX, const T2& maxX, const T3& minY, const T4& maxY, + const T5& minZ, const T6& maxZ) + : X(vtkm::Range(minX, maxX)) + , Y(vtkm::Range(minY, maxY)) + , Z(vtkm::Range(minZ, maxZ)) + { + } /// Initialize bounds with an array of 6 values in the order xmin, xmax, /// ymin, ymax, zmin, zmax. /// - template - VTKM_EXEC_CONT - explicit Bounds(const T bounds[6]) - : X(vtkm::Range(bounds[0], bounds[1])), - Y(vtkm::Range(bounds[2], bounds[3])), - Z(vtkm::Range(bounds[4], bounds[5])) - { } + template + VTKM_EXEC_CONT explicit Bounds(const T bounds[6]) + : X(vtkm::Range(bounds[0], bounds[1])) + , Y(vtkm::Range(bounds[2], bounds[3])) + , Z(vtkm::Range(bounds[4], bounds[5])) + { + } /// Initialize bounds with the minimum corner point and the maximum corner /// point. /// - template - VTKM_EXEC_CONT - Bounds(const vtkm::Vec &minPoint, const vtkm::Vec &maxPoint) - : X(vtkm::Range(minPoint[0], maxPoint[0])), - Y(vtkm::Range(minPoint[1], maxPoint[1])), - Z(vtkm::Range(minPoint[2], maxPoint[2])) - { } + template + VTKM_EXEC_CONT Bounds(const vtkm::Vec& minPoint, const vtkm::Vec& maxPoint) + : X(vtkm::Range(minPoint[0], maxPoint[0])) + , Y(vtkm::Range(minPoint[1], maxPoint[1])) + , Z(vtkm::Range(minPoint[2], maxPoint[2])) + { + } VTKM_EXEC_CONT - const vtkm::Bounds &operator=(const vtkm::Bounds &src) + const vtkm::Bounds& operator=(const vtkm::Bounds& src) { this->X = src.X; this->Y = src.Y; @@ -105,20 +102,15 @@ struct Bounds VTKM_EXEC_CONT bool IsNonEmpty() const { - return (this->X.IsNonEmpty() && - this->Y.IsNonEmpty() && - this->Z.IsNonEmpty()); + return (this->X.IsNonEmpty() && this->Y.IsNonEmpty() && this->Z.IsNonEmpty()); } /// \b Determines if a point coordinate is within the bounds. /// - template - VTKM_EXEC_CONT - bool Contains(const vtkm::Vec &point) const + template + VTKM_EXEC_CONT bool Contains(const vtkm::Vec& point) const { - return (this->X.Contains(point[0]) && - this->Y.Contains(point[1]) && - this->Z.Contains(point[2])); + return (this->X.Contains(point[0]) && this->Y.Contains(point[1]) && this->Z.Contains(point[2])); } /// \b Returns the center of the range. @@ -127,11 +119,9 @@ struct Bounds /// are empty, the results are undefined. /// VTKM_EXEC_CONT - vtkm::Vec Center() const + vtkm::Vec Center() const { - return vtkm::Vec(this->X.Center(), - this->Y.Center(), - this->Z.Center()); + return vtkm::Vec(this->X.Center(), this->Y.Center(), this->Z.Center()); } /// \b Expand bounds to include a point. @@ -140,9 +130,8 @@ struct Bounds /// given point coordinates. If the bounds already include this point, then /// nothing is done. /// - template - VTKM_EXEC_CONT - void Include(const vtkm::Vec &point) + template + VTKM_EXEC_CONT void Include(const vtkm::Vec& point) { this->X.Include(point[0]); this->Y.Include(point[1]); @@ -155,7 +144,7 @@ struct Bounds /// that of another bounds. Esentially it is the union of the two bounds. /// VTKM_EXEC_CONT - void Include(const vtkm::Bounds &bounds) + void Include(const vtkm::Bounds& bounds) { this->X.Include(bounds.X); this->Y.Include(bounds.Y); @@ -167,7 +156,7 @@ struct Bounds /// This is a nondestructive form of \c Include. /// VTKM_EXEC_CONT - vtkm::Bounds Union(const vtkm::Bounds &otherBounds) const + vtkm::Bounds Union(const vtkm::Bounds& otherBounds) const { vtkm::Bounds unionBounds(*this); unionBounds.Include(otherBounds); @@ -177,25 +166,18 @@ struct Bounds /// \b Operator for union /// VTKM_EXEC_CONT - vtkm::Bounds operator+(const vtkm::Bounds &otherBounds) const + vtkm::Bounds operator+(const vtkm::Bounds& otherBounds) const { return this->Union(otherBounds); } + + VTKM_EXEC_CONT + bool operator==(const vtkm::Bounds& bounds) const { - return this->Union(otherBounds); + return ((this->X == bounds.X) && (this->Y == bounds.Y) && (this->Z == bounds.Z)); } VTKM_EXEC_CONT - bool operator==(const vtkm::Bounds &bounds) const + bool operator!=(const vtkm::Bounds& bounds) const { - return ((this->X == bounds.X) && - (this->Y == bounds.Y) && - (this->Z == bounds.Z)); - } - - VTKM_EXEC_CONT - bool operator!=(const vtkm::Bounds &bounds) const - { - return ((this->X != bounds.X) || - (this->Y != bounds.Y) || - (this->Z != bounds.Z)); + return ((this->X != bounds.X) || (this->Y != bounds.Y) || (this->Z != bounds.Z)); } }; @@ -203,12 +185,9 @@ struct Bounds /// Helper function for printing bounds during testing /// -static inline VTKM_CONT -std::ostream &operator<<(std::ostream &stream, const vtkm::Bounds &bounds) +static inline VTKM_CONT std::ostream& operator<<(std::ostream& stream, const vtkm::Bounds& bounds) { - return stream << "{ X:" << bounds.X - << ", Y:" << bounds.Y - << ", Z:" << bounds.Z << " }"; + return stream << "{ X:" << bounds.X << ", Y:" << bounds.Y << ", Z:" << bounds.Z << " }"; } #endif //vtk_m_Bounds_h diff --git a/vtkm/CellShape.h b/vtkm/CellShape.h index 9843b76b6..cde24a6d8 100644 --- a/vtkm/CellShape.h +++ b/vtkm/CellShape.h @@ -23,7 +23,8 @@ #include #include -namespace vtkm { +namespace vtkm +{ /// CellShapeId identifies the type of each cell. Currently these are designed /// to match up with VTK cell types. @@ -31,21 +32,21 @@ namespace vtkm { enum CellShapeIdEnum { // Linear cells - CELL_SHAPE_EMPTY = 0, - CELL_SHAPE_VERTEX = 1, + CELL_SHAPE_EMPTY = 0, + CELL_SHAPE_VERTEX = 1, //CELL_SHAPE_POLY_VERTEX = 2, - CELL_SHAPE_LINE = 3, + CELL_SHAPE_LINE = 3, //CELL_SHAPE_POLY_LINE = 4, - CELL_SHAPE_TRIANGLE = 5, + CELL_SHAPE_TRIANGLE = 5, //CELL_SHAPE_TRIANGLE_STRIP = 6, - CELL_SHAPE_POLYGON = 7, + CELL_SHAPE_POLYGON = 7, //CELL_SHAPE_PIXEL = 8, - CELL_SHAPE_QUAD = 9, - CELL_SHAPE_TETRA = 10, + CELL_SHAPE_QUAD = 9, + CELL_SHAPE_TETRA = 10, //CELL_SHAPE_VOXEL = 11, - CELL_SHAPE_HEXAHEDRON = 12, - CELL_SHAPE_WEDGE = 13, - CELL_SHAPE_PYRAMID = 14, + CELL_SHAPE_HEXAHEDRON = 12, + CELL_SHAPE_WEDGE = 13, + CELL_SHAPE_PYRAMID = 14, NUMBER_OF_CELL_SHAPES }; @@ -56,13 +57,16 @@ enum CellShapeIdEnum // There are also many other cell-specific features that code might expect such // as \c CellTraits and interpolations. -namespace internal { +namespace internal +{ /// A class that can be used to determine if a class is a CellShapeTag or not. /// The class will be either std::true_type or std::false_type. /// -template -struct CellShapeTagCheck : std::false_type { }; +template +struct CellShapeTagCheck : std::false_type +{ +}; } // namespace internal @@ -70,15 +74,15 @@ struct CellShapeTagCheck : std::false_type { }; /// concept check to make sure that a template argument is a proper cell shape /// tag. /// -#define VTKM_IS_CELL_SHAPE_TAG(tag) \ - VTKM_STATIC_ASSERT_MSG( \ - ::vtkm::internal::CellShapeTagCheck::value, \ - "Provided type is not a valid VTK-m cell shape tag.") +#define VTKM_IS_CELL_SHAPE_TAG(tag) \ + VTKM_STATIC_ASSERT_MSG(::vtkm::internal::CellShapeTagCheck::value, \ + "Provided type is not a valid VTK-m cell shape tag.") /// A traits-like class to get an CellShapeId known at compile time to a tag. /// -template -struct CellShapeIdToTag { +template +struct CellShapeIdToTag +{ // If you get a compile error for this class about Id not being defined, that // probably means you are using an ID that does not have a defined cell // shape. @@ -86,29 +90,32 @@ struct CellShapeIdToTag { typedef std::false_type valid; }; - // Define a tag for each cell shape as well as the support structs to go // between tags and ids. The following macro is only valid here. -#define VTKM_DEFINE_CELL_TAG(name, idname) \ - struct CellShapeTag ## name { \ - static const vtkm::UInt8 Id = vtkm::idname; \ - }; \ - namespace internal { \ - template<> \ - struct CellShapeTagCheck : std::true_type { }; \ - } \ - static inline VTKM_EXEC_CONT \ - const char *GetCellShapeName(vtkm::CellShapeTag ## name) { \ - return #name; \ - } \ - template<> \ - struct CellShapeIdToTag { \ - typedef std::true_type valid; \ - typedef vtkm::CellShapeTag ## name Tag; \ +#define VTKM_DEFINE_CELL_TAG(name, idname) \ + struct CellShapeTag##name \ + { \ + static const vtkm::UInt8 Id = vtkm::idname; \ + }; \ + namespace internal \ + { \ + template <> \ + struct CellShapeTagCheck : std::true_type \ + { \ + }; \ + } \ + static inline VTKM_EXEC_CONT const char* GetCellShapeName(vtkm::CellShapeTag##name) \ + { \ + return #name; \ + } \ + template <> \ + struct CellShapeIdToTag \ + { \ + typedef std::true_type valid; \ + typedef vtkm::CellShapeTag##name Tag; \ } - VTKM_DEFINE_CELL_TAG(Empty, CELL_SHAPE_EMPTY); VTKM_DEFINE_CELL_TAG(Vertex, CELL_SHAPE_VERTEX); //VTKM_DEFINE_CELL_TAG(PolyVertex, CELL_SHAPE_POLY_VERTEX); @@ -127,28 +134,29 @@ VTKM_DEFINE_CELL_TAG(Pyramid, CELL_SHAPE_PYRAMID); #undef VTKM_DEFINE_CELL_TAG - /// A special cell shape tag that holds a cell shape that is not known at /// compile time. Unlike other cell set tags, the Id field is set at runtime /// so its value cannot be used in template parameters. You need to use /// \c vtkmGenericCellShapeMacro to specialize on the cell type. /// -struct CellShapeTagGeneric { +struct CellShapeTagGeneric +{ VTKM_EXEC_CONT - CellShapeTagGeneric(vtkm::UInt8 shape) : Id(shape) { } + CellShapeTagGeneric(vtkm::UInt8 shape) + : Id(shape) + { + } vtkm::UInt8 Id; }; - -#define vtkmGenericCellShapeMacroCase(cellShapeId, call) \ - case vtkm::cellShapeId: \ - { \ - typedef \ - vtkm::CellShapeIdToTag::Tag CellShapeTag; \ - call; \ - } \ - break +#define vtkmGenericCellShapeMacroCase(cellShapeId, call) \ + case vtkm::cellShapeId: \ + { \ + typedef vtkm::CellShapeIdToTag::Tag CellShapeTag; \ + call; \ + } \ + break /// \brief A macro used in a \c switch statement to determine cell shape. /// @@ -180,16 +188,16 @@ struct CellShapeTagGeneric { /// Note that \c vtkmGenericCellShapeMacro does not have a default case. You /// should consider adding one that gives a /// -#define vtkmGenericCellShapeMacro(call) \ - vtkmGenericCellShapeMacroCase(CELL_SHAPE_EMPTY, call); \ - vtkmGenericCellShapeMacroCase(CELL_SHAPE_VERTEX, call); \ - vtkmGenericCellShapeMacroCase(CELL_SHAPE_LINE, call); \ - vtkmGenericCellShapeMacroCase(CELL_SHAPE_TRIANGLE, call); \ - vtkmGenericCellShapeMacroCase(CELL_SHAPE_POLYGON, call); \ - vtkmGenericCellShapeMacroCase(CELL_SHAPE_QUAD, call); \ - vtkmGenericCellShapeMacroCase(CELL_SHAPE_TETRA, call); \ - vtkmGenericCellShapeMacroCase(CELL_SHAPE_HEXAHEDRON, call); \ - vtkmGenericCellShapeMacroCase(CELL_SHAPE_WEDGE, call); \ +#define vtkmGenericCellShapeMacro(call) \ + vtkmGenericCellShapeMacroCase(CELL_SHAPE_EMPTY, call); \ + vtkmGenericCellShapeMacroCase(CELL_SHAPE_VERTEX, call); \ + vtkmGenericCellShapeMacroCase(CELL_SHAPE_LINE, call); \ + vtkmGenericCellShapeMacroCase(CELL_SHAPE_TRIANGLE, call); \ + vtkmGenericCellShapeMacroCase(CELL_SHAPE_POLYGON, call); \ + vtkmGenericCellShapeMacroCase(CELL_SHAPE_QUAD, call); \ + vtkmGenericCellShapeMacroCase(CELL_SHAPE_TETRA, call); \ + vtkmGenericCellShapeMacroCase(CELL_SHAPE_HEXAHEDRON, call); \ + vtkmGenericCellShapeMacroCase(CELL_SHAPE_WEDGE, call); \ vtkmGenericCellShapeMacroCase(CELL_SHAPE_PYRAMID, call) } // namespace vtkm diff --git a/vtkm/CellTraits.h b/vtkm/CellTraits.h index cffa37204..0ded65feb 100644 --- a/vtkm/CellTraits.h +++ b/vtkm/CellTraits.h @@ -22,22 +22,29 @@ #include -namespace vtkm { +namespace vtkm +{ /// \c vtkm::CellTraits::TopologyDimensionType is typedef to this with the /// template parameter set to \c TOPOLOGICAL_DIMENSIONS. See \c /// vtkm::CellTraits for more information. /// -template -struct CellTopologicalDimensionsTag { }; +template +struct CellTopologicalDimensionsTag +{ +}; /// \brief Tag for cell shapes with a fixed number of points. /// -struct CellTraitsTagSizeFixed { }; +struct CellTraitsTagSizeFixed +{ +}; /// \brief Tag for cell shapes that can have a variable number of points. /// -struct CellTraitsTagSizeVariable { }; +struct CellTraitsTagSizeVariable +{ +}; /// \brief Information about a cell based on its tag. /// @@ -45,7 +52,7 @@ struct CellTraitsTagSizeVariable { }; /// about cells (like the number of vertices in the cell or its /// dimensionality). /// -template +template struct CellTraits #ifdef VTKM_DOXYGEN_ONLY { @@ -59,8 +66,7 @@ struct CellTraits /// a convenient way to overload a function based on topological dimensions /// (which is usually more efficient than conditionals). /// - typedef vtkm::CellTopologicalDimensionsTag - TopologicalDimensionsTag; + typedef vtkm::CellTopologicalDimensionsTag TopologicalDimensionsTag; /// \brief A tag specifying whether the number of points is fixed. /// @@ -77,31 +83,31 @@ struct CellTraits /// static const vtkm::IdComponent NUM_POINTS = 3; }; -#else // VTKM_DOXYGEN_ONLY - ; +#else // VTKM_DOXYGEN_ONLY + ; #endif // VTKM_DOXYGEN_ONLY //----------------------------------------------------------------------------- // Define traits for every cell type. -#define VTKM_DEFINE_CELL_TRAITS(name, dimensions, numPoints) \ - template<> \ - struct CellTraits { \ - const static vtkm::IdComponent TOPOLOGICAL_DIMENSIONS = dimensions; \ - typedef vtkm::CellTopologicalDimensionsTag \ - TopologicalDimensionsTag; \ - typedef vtkm::CellTraitsTagSizeFixed IsSizeFixed; \ - static const vtkm::IdComponent NUM_POINTS = numPoints; \ +#define VTKM_DEFINE_CELL_TRAITS(name, dimensions, numPoints) \ + template <> \ + struct CellTraits \ + { \ + const static vtkm::IdComponent TOPOLOGICAL_DIMENSIONS = dimensions; \ + typedef vtkm::CellTopologicalDimensionsTag TopologicalDimensionsTag; \ + typedef vtkm::CellTraitsTagSizeFixed IsSizeFixed; \ + static const vtkm::IdComponent NUM_POINTS = numPoints; \ } -#define VTKM_DEFINE_CELL_TRAITS_VARIABLE(name, dimensions) \ - template<> \ - struct CellTraits { \ - const static vtkm::IdComponent TOPOLOGICAL_DIMENSIONS = dimensions; \ - typedef vtkm::CellTopologicalDimensionsTag \ - TopologicalDimensionsTag; \ - typedef vtkm::CellTraitsTagSizeVariable IsSizeFixed; \ +#define VTKM_DEFINE_CELL_TRAITS_VARIABLE(name, dimensions) \ + template <> \ + struct CellTraits \ + { \ + const static vtkm::IdComponent TOPOLOGICAL_DIMENSIONS = dimensions; \ + typedef vtkm::CellTopologicalDimensionsTag TopologicalDimensionsTag; \ + typedef vtkm::CellTraitsTagSizeVariable IsSizeFixed; \ } VTKM_DEFINE_CELL_TRAITS(Empty, 0, 0); diff --git a/vtkm/ListTag.h b/vtkm/ListTag.h index f40e18106..365301a45 100644 --- a/vtkm/ListTag.h +++ b/vtkm/ListTag.h @@ -27,15 +27,16 @@ #include -namespace vtkm { - -namespace internal { - -template -struct ListTagCheck : std::is_base_of +namespace vtkm { - static VTKM_CONSTEXPR bool Valid = std::is_base_of::value; + +namespace internal +{ + +template +struct ListTagCheck : std::is_base_of +{ + static VTKM_CONSTEXPR bool Valid = std::is_base_of::value; }; } // namespace internal @@ -45,49 +46,47 @@ struct ListTagCheck : std::is_base_of /// actually a device adapter tag. (You can get weird errors elsewhere in the /// code when a mistake is made.) /// -#define VTKM_IS_LIST_TAG(tag) \ - VTKM_STATIC_ASSERT_MSG( \ - (::vtkm::internal::ListTagCheck::value), \ - "Provided type is not a valid VTK-m list tag.") - +#define VTKM_IS_LIST_TAG(tag) \ + VTKM_STATIC_ASSERT_MSG((::vtkm::internal::ListTagCheck::value), \ + "Provided type is not a valid VTK-m list tag.") /// A special tag for a list that represents holding all potential values /// /// Note: Can not be used with ForEach for obvious reasons. -struct ListTagUniversal : detail::ListRoot { +struct ListTagUniversal : detail::ListRoot +{ using list = vtkm::detail::ListBase; }; /// A special tag for an empty list. /// -struct ListTagEmpty : detail::ListRoot { +struct ListTagEmpty : detail::ListRoot +{ using list = vtkm::detail::ListBase<>; }; /// A tag that is a construction of two other tags joined together. This struct /// can be subclassed and still behave like a list tag. -template -struct ListTagJoin : detail::ListRoot { - using list = typename detail::ListJoin< - typename ListTag1::list, - typename ListTag2::list>::type; +template +struct ListTagJoin : detail::ListRoot +{ + using list = typename detail::ListJoin::type; }; /// A tag that consits of elements that are found in both tags. This struct /// can be subclassed and still behave like a list tag. -template -struct ListTagIntersect : detail::ListRoot { - using list = typename detail::ListIntersect< - typename ListTag1::list, - typename ListTag2::list>::type; +template +struct ListTagIntersect : detail::ListRoot +{ + using list = + typename detail::ListIntersect::type; }; /// For each typename represented by the list tag, call the functor with a /// default instance of that type. /// -template -VTKM_CONT -void ListForEach(Functor &f, ListTag) +template +VTKM_CONT void ListForEach(Functor& f, ListTag) { VTKM_IS_LIST_TAG(ListTag); detail::ListForEachImpl(f, typename ListTag::list()); @@ -96,9 +95,8 @@ void ListForEach(Functor &f, ListTag) /// For each typename represented by the list tag, call the functor with a /// default instance of that type. /// -template -VTKM_CONT -void ListForEach(const Functor &f, ListTag) +template +VTKM_CONT void ListForEach(const Functor& f, ListTag) { VTKM_IS_LIST_TAG(ListTag); detail::ListForEachImpl(f, typename ListTag::list()); @@ -108,12 +106,11 @@ void ListForEach(const Functor &f, ListTag) /// There is a static boolean named \c value that is set to true if the type is /// contained in the list and false otherwise. /// -template +template struct ListContains { VTKM_IS_LIST_TAG(ListTag); - static VTKM_CONSTEXPR bool value = - detail::ListContainsImpl::value; + static VTKM_CONSTEXPR bool value = detail::ListContainsImpl::value; }; } // namespace vtkm diff --git a/vtkm/Math.h b/vtkm/Math.h index 74d8fe5db..680e17477 100644 --- a/vtkm/Math.h +++ b/vtkm/Math.h @@ -45,1004 +45,915 @@ #include #endif -#define VTKM_CUDA_MATH_FUNCTION_32(func) func ## f +#define VTKM_CUDA_MATH_FUNCTION_32(func) func##f #define VTKM_CUDA_MATH_FUNCTION_64(func) func - - - - - - - - -namespace vtkm { +namespace vtkm +{ //----------------------------------------------------------------------------- /// Returns the constant 2 times Pi. /// -static inline VTKM_EXEC_CONT -vtkm::Float64 TwoPi() +static inline VTKM_EXEC_CONT vtkm::Float64 TwoPi() { return 6.28318530717958647692528676655900576; } /// Returns the constant Pi. /// -static inline VTKM_EXEC_CONT -vtkm::Float64 Pi() +static inline VTKM_EXEC_CONT vtkm::Float64 Pi() { return 3.14159265358979323846264338327950288; } /// Returns the constant Pi halves. /// -static inline VTKM_EXEC_CONT -vtkm::Float64 Pi_2() +static inline VTKM_EXEC_CONT vtkm::Float64 Pi_2() { return 1.57079632679489661923132169163975144; } /// Returns the constant Pi thirds. /// -static inline VTKM_EXEC_CONT -vtkm::Float64 Pi_3() +static inline VTKM_EXEC_CONT vtkm::Float64 Pi_3() { return 1.04719755119659774615421446109316762; } /// Returns the constant Pi fourths. /// -static inline VTKM_EXEC_CONT -vtkm::Float64 Pi_4() +static inline VTKM_EXEC_CONT vtkm::Float64 Pi_4() { return 0.78539816339744830961566084581987572; } -namespace detail { +namespace detail +{ - template - struct FloatingPointReturnCondition : - std::enable_if::ComponentType, vtkm::Float32>::value || - std::is_same::ComponentType, const vtkm::Float32>::value> - { - }; - - template - struct FloatingPointReturnType - { - typedef vtkm::Float64 Type; - }; +template +struct FloatingPointReturnCondition + : std::enable_if< + std::is_same::ComponentType, vtkm::Float32>::value || + std::is_same::ComponentType, const vtkm::Float32>::value> +{ +}; - template - struct FloatingPointReturnType::type> - { - typedef vtkm::Float32 Type; - }; +template +struct FloatingPointReturnType +{ + typedef vtkm::Float64 Type; +}; +template +struct FloatingPointReturnType::type> +{ + typedef vtkm::Float32 Type; +}; } /// Compute the sine of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Sin(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Sin(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(sin)(static_cast(x)); #else return std::sin(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Sin(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Sin(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(sin)(x); #else return std::sin(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Sin(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Sin(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(sin)(x); #else return std::sin(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Sin(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Sin( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Sin(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Sin(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Sin(x[0]), - vtkm::Sin(x[1]), - vtkm::Sin(x[2]), - vtkm::Sin(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Sin( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Sin(x[0]), vtkm::Sin(x[1]), vtkm::Sin(x[2]), vtkm::Sin(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Sin(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Sin(x[0]), - vtkm::Sin(x[1]), - vtkm::Sin(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Sin( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Sin(x[0]), vtkm::Sin(x[1]), vtkm::Sin(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Sin(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Sin(x[0]), - vtkm::Sin(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Sin( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Sin(x[0]), + vtkm::Sin(x[1])); } /// Compute the cosine of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Cos(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Cos(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(cos)(static_cast(x)); #else return std::cos(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Cos(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Cos(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(cos)(x); #else return std::cos(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Cos(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Cos(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(cos)(x); #else return std::cos(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Cos(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Cos( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Cos(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Cos(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Cos(x[0]), - vtkm::Cos(x[1]), - vtkm::Cos(x[2]), - vtkm::Cos(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Cos( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Cos(x[0]), vtkm::Cos(x[1]), vtkm::Cos(x[2]), vtkm::Cos(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Cos(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Cos(x[0]), - vtkm::Cos(x[1]), - vtkm::Cos(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Cos( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Cos(x[0]), vtkm::Cos(x[1]), vtkm::Cos(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Cos(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Cos(x[0]), - vtkm::Cos(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Cos( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Cos(x[0]), + vtkm::Cos(x[1])); } /// Compute the tangent of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Tan(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Tan(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(tan)(static_cast(x)); #else return std::tan(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Tan(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Tan(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(tan)(x); #else return std::tan(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Tan(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Tan(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(tan)(x); #else return std::tan(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Tan(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Tan( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Tan(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Tan(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Tan(x[0]), - vtkm::Tan(x[1]), - vtkm::Tan(x[2]), - vtkm::Tan(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Tan( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Tan(x[0]), vtkm::Tan(x[1]), vtkm::Tan(x[2]), vtkm::Tan(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Tan(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Tan(x[0]), - vtkm::Tan(x[1]), - vtkm::Tan(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Tan( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Tan(x[0]), vtkm::Tan(x[1]), vtkm::Tan(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Tan(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Tan(x[0]), - vtkm::Tan(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Tan( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Tan(x[0]), + vtkm::Tan(x[1])); } /// Compute the arc sine of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -ASin(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type ASin(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(asin)(static_cast(x)); #else return std::asin(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ASin(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ASin(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(asin)(x); #else return std::asin(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ASin(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ASin(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(asin)(x); #else return std::asin(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -ASin(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> ASin( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::ASin(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -ASin(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::ASin(x[0]), - vtkm::ASin(x[1]), - vtkm::ASin(x[2]), - vtkm::ASin(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> ASin( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::ASin(x[0]), vtkm::ASin(x[1]), vtkm::ASin(x[2]), vtkm::ASin(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -ASin(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::ASin(x[0]), - vtkm::ASin(x[1]), - vtkm::ASin(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> ASin( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::ASin(x[0]), vtkm::ASin(x[1]), vtkm::ASin(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -ASin(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::ASin(x[0]), - vtkm::ASin(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> ASin( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::ASin(x[0]), + vtkm::ASin(x[1])); } /// Compute the arc cosine of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -ACos(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type ACos(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(acos)(static_cast(x)); #else return std::acos(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ACos(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ACos(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(acos)(x); #else return std::acos(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ACos(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ACos(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(acos)(x); #else return std::acos(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -ACos(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> ACos( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::ACos(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -ACos(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::ACos(x[0]), - vtkm::ACos(x[1]), - vtkm::ACos(x[2]), - vtkm::ACos(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> ACos( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::ACos(x[0]), vtkm::ACos(x[1]), vtkm::ACos(x[2]), vtkm::ACos(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -ACos(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::ACos(x[0]), - vtkm::ACos(x[1]), - vtkm::ACos(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> ACos( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::ACos(x[0]), vtkm::ACos(x[1]), vtkm::ACos(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -ACos(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::ACos(x[0]), - vtkm::ACos(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> ACos( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::ACos(x[0]), + vtkm::ACos(x[1])); } /// Compute the arc tangent of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -ATan(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type ATan(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(atan)(static_cast(x)); #else return std::atan(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ATan(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ATan(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(atan)(x); #else return std::atan(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ATan(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ATan(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(atan)(x); #else return std::atan(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -ATan(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> ATan( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::ATan(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -ATan(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::ATan(x[0]), - vtkm::ATan(x[1]), - vtkm::ATan(x[2]), - vtkm::ATan(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> ATan( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::ATan(x[0]), vtkm::ATan(x[1]), vtkm::ATan(x[2]), vtkm::ATan(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -ATan(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::ATan(x[0]), - vtkm::ATan(x[1]), - vtkm::ATan(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> ATan( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::ATan(x[0]), vtkm::ATan(x[1]), vtkm::ATan(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -ATan(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::ATan(x[0]), - vtkm::ATan(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> ATan( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::ATan(x[0]), + vtkm::ATan(x[1])); } /// Compute the arc tangent of \p x / \p y using the signs of both arguments /// to determine the quadrant of the return value. /// -static inline VTKM_EXEC_CONT -vtkm::Float32 ATan2(vtkm::Float32 x, vtkm::Float32 y) { +static inline VTKM_EXEC_CONT vtkm::Float32 ATan2(vtkm::Float32 x, vtkm::Float32 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_32(atan2)(x,y); + return VTKM_CUDA_MATH_FUNCTION_32(atan2)(x, y); #else - return std::atan2(x,y); + return std::atan2(x, y); #endif } -static inline VTKM_EXEC_CONT -vtkm::Float64 ATan2(vtkm::Float64 x, vtkm::Float64 y) { +static inline VTKM_EXEC_CONT vtkm::Float64 ATan2(vtkm::Float64 x, vtkm::Float64 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_64(atan2)(x,y); + return VTKM_CUDA_MATH_FUNCTION_64(atan2)(x, y); #else - return std::atan2(x,y); + return std::atan2(x, y); #endif } /// Compute the hyperbolic sine of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -SinH(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type SinH(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(sinh)(static_cast(x)); #else return std::sinh(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -SinH(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type SinH(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(sinh)(x); #else return std::sinh(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -SinH(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type SinH(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(sinh)(x); #else return std::sinh(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -SinH(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> SinH( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::SinH(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -SinH(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::SinH(x[0]), - vtkm::SinH(x[1]), - vtkm::SinH(x[2]), - vtkm::SinH(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> SinH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::SinH(x[0]), vtkm::SinH(x[1]), vtkm::SinH(x[2]), vtkm::SinH(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -SinH(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::SinH(x[0]), - vtkm::SinH(x[1]), - vtkm::SinH(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> SinH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::SinH(x[0]), vtkm::SinH(x[1]), vtkm::SinH(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -SinH(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::SinH(x[0]), - vtkm::SinH(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> SinH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::SinH(x[0]), + vtkm::SinH(x[1])); } /// Compute the hyperbolic cosine of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -CosH(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type CosH(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(cosh)(static_cast(x)); #else return std::cosh(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -CosH(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type CosH(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(cosh)(x); #else return std::cosh(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -CosH(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type CosH(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(cosh)(x); #else return std::cosh(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -CosH(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> CosH( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::CosH(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -CosH(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::CosH(x[0]), - vtkm::CosH(x[1]), - vtkm::CosH(x[2]), - vtkm::CosH(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> CosH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::CosH(x[0]), vtkm::CosH(x[1]), vtkm::CosH(x[2]), vtkm::CosH(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -CosH(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::CosH(x[0]), - vtkm::CosH(x[1]), - vtkm::CosH(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> CosH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::CosH(x[0]), vtkm::CosH(x[1]), vtkm::CosH(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -CosH(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::CosH(x[0]), - vtkm::CosH(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> CosH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::CosH(x[0]), + vtkm::CosH(x[1])); } /// Compute the hyperbolic tangent of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -TanH(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type TanH(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(tanh)(static_cast(x)); #else return std::tanh(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -TanH(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type TanH(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(tanh)(x); #else return std::tanh(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -TanH(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type TanH(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(tanh)(x); #else return std::tanh(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -TanH(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> TanH( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::TanH(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -TanH(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::TanH(x[0]), - vtkm::TanH(x[1]), - vtkm::TanH(x[2]), - vtkm::TanH(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> TanH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::TanH(x[0]), vtkm::TanH(x[1]), vtkm::TanH(x[2]), vtkm::TanH(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -TanH(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::TanH(x[0]), - vtkm::TanH(x[1]), - vtkm::TanH(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> TanH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::TanH(x[0]), vtkm::TanH(x[1]), vtkm::TanH(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -TanH(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::TanH(x[0]), - vtkm::TanH(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> TanH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::TanH(x[0]), + vtkm::TanH(x[1])); } /// Compute the hyperbolic arc sine of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -ASinH(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type ASinH(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(asinh)(static_cast(x)); #else return std::asinh(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ASinH(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ASinH(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(asinh)(x); #else return std::asinh(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ASinH(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ASinH(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(asinh)(x); #else return std::asinh(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -ASinH(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> ASinH( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::ASinH(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -ASinH(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::ASinH(x[0]), - vtkm::ASinH(x[1]), - vtkm::ASinH(x[2]), - vtkm::ASinH(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> ASinH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::ASinH(x[0]), vtkm::ASinH(x[1]), vtkm::ASinH(x[2]), vtkm::ASinH(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -ASinH(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::ASinH(x[0]), - vtkm::ASinH(x[1]), - vtkm::ASinH(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> ASinH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::ASinH(x[0]), vtkm::ASinH(x[1]), vtkm::ASinH(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -ASinH(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::ASinH(x[0]), - vtkm::ASinH(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> ASinH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::ASinH(x[0]), + vtkm::ASinH(x[1])); } /// Compute the hyperbolic arc cosine of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -ACosH(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type ACosH(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(acosh)(static_cast(x)); #else return std::acosh(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ACosH(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ACosH(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(acosh)(x); #else return std::acosh(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ACosH(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ACosH(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(acosh)(x); #else return std::acosh(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -ACosH(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> ACosH( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::ACosH(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -ACosH(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::ACosH(x[0]), - vtkm::ACosH(x[1]), - vtkm::ACosH(x[2]), - vtkm::ACosH(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> ACosH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::ACosH(x[0]), vtkm::ACosH(x[1]), vtkm::ACosH(x[2]), vtkm::ACosH(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -ACosH(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::ACosH(x[0]), - vtkm::ACosH(x[1]), - vtkm::ACosH(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> ACosH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::ACosH(x[0]), vtkm::ACosH(x[1]), vtkm::ACosH(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -ACosH(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::ACosH(x[0]), - vtkm::ACosH(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> ACosH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::ACosH(x[0]), + vtkm::ACosH(x[1])); } /// Compute the hyperbolic arc tangent of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -ATanH(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type ATanH(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(atanh)(static_cast(x)); #else return std::atanh(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ATanH(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ATanH(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(atanh)(x); #else return std::atanh(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ATanH(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ATanH(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(atanh)(x); #else return std::atanh(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -ATanH(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> ATanH( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::ATanH(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -ATanH(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::ATanH(x[0]), - vtkm::ATanH(x[1]), - vtkm::ATanH(x[2]), - vtkm::ATanH(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> ATanH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::ATanH(x[0]), vtkm::ATanH(x[1]), vtkm::ATanH(x[2]), vtkm::ATanH(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -ATanH(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::ATanH(x[0]), - vtkm::ATanH(x[1]), - vtkm::ATanH(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> ATanH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::ATanH(x[0]), vtkm::ATanH(x[1]), vtkm::ATanH(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -ATanH(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::ATanH(x[0]), - vtkm::ATanH(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> ATanH( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::ATanH(x[0]), + vtkm::ATanH(x[1])); } //----------------------------------------------------------------------------- /// Computes \p x raised to the power of \p y. /// -static inline VTKM_EXEC_CONT -vtkm::Float32 Pow(vtkm::Float32 x, vtkm::Float32 y) { +static inline VTKM_EXEC_CONT vtkm::Float32 Pow(vtkm::Float32 x, vtkm::Float32 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_32(pow)(x,y); + return VTKM_CUDA_MATH_FUNCTION_32(pow)(x, y); #else - return std::pow(x,y); + return std::pow(x, y); #endif } -static inline VTKM_EXEC_CONT -vtkm::Float64 Pow(vtkm::Float64 x, vtkm::Float64 y) { +static inline VTKM_EXEC_CONT vtkm::Float64 Pow(vtkm::Float64 x, vtkm::Float64 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_64(pow)(x,y); + return VTKM_CUDA_MATH_FUNCTION_64(pow)(x, y); #else - return std::pow(x,y); + return std::pow(x, y); #endif } /// Compute the square root of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Sqrt(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Sqrt(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(sqrt)(static_cast(x)); #else return std::sqrt(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Sqrt(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Sqrt(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(sqrt)(x); #else return std::sqrt(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Sqrt(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Sqrt(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(sqrt)(x); #else return std::sqrt(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Sqrt(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Sqrt( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Sqrt(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Sqrt(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Sqrt(x[0]), - vtkm::Sqrt(x[1]), - vtkm::Sqrt(x[2]), - vtkm::Sqrt(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Sqrt( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Sqrt(x[0]), vtkm::Sqrt(x[1]), vtkm::Sqrt(x[2]), vtkm::Sqrt(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Sqrt(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Sqrt(x[0]), - vtkm::Sqrt(x[1]), - vtkm::Sqrt(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Sqrt( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Sqrt(x[0]), vtkm::Sqrt(x[1]), vtkm::Sqrt(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Sqrt(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Sqrt(x[0]), - vtkm::Sqrt(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Sqrt( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Sqrt(x[0]), + vtkm::Sqrt(x[1])); } /// Compute the reciprocal square root of \p x. The result of this function is @@ -1051,137 +962,128 @@ Sqrt(const vtkm::Vec &x) { /// should use this function whenever dividing by the square root. /// #ifdef VTKM_CUDA -static inline VTKM_EXEC_CONT -vtkm::Float32 RSqrt(vtkm::Float32 x) { +static inline VTKM_EXEC_CONT vtkm::Float32 RSqrt(vtkm::Float32 x) +{ return rsqrtf(x); } -static inline VTKM_EXEC_CONT -vtkm::Float64 RSqrt(vtkm::Float64 x) { +static inline VTKM_EXEC_CONT vtkm::Float64 RSqrt(vtkm::Float64 x) +{ return rsqrt(x); } -template -static inline VTKM_EXEC_CONT -vtkm::Float64 RSqrt(T x) { +template +static inline VTKM_EXEC_CONT vtkm::Float64 RSqrt(T x) +{ return rsqrt(static_cast(x)); } -#else // !VTKM_CUDA -static inline VTKM_EXEC_CONT -vtkm::Float32 RSqrt(vtkm::Float32 x) { - return 1/vtkm::Sqrt(x); +#else // !VTKM_CUDA +static inline VTKM_EXEC_CONT vtkm::Float32 RSqrt(vtkm::Float32 x) +{ + return 1 / vtkm::Sqrt(x); } -static inline VTKM_EXEC_CONT -vtkm::Float64 RSqrt(vtkm::Float64 x) { - return 1/vtkm::Sqrt(x); +static inline VTKM_EXEC_CONT vtkm::Float64 RSqrt(vtkm::Float64 x) +{ + return 1 / vtkm::Sqrt(x); } -template -static inline VTKM_EXEC_CONT -vtkm::Float64 RSqrt(T x) { - return 1/static_cast(x); +template +static inline VTKM_EXEC_CONT vtkm::Float64 RSqrt(T x) +{ + return 1 / static_cast(x); } #endif // !VTKM_CUDA -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -RSqrt(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> RSqrt( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::RSqrt(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -RSqrt(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::RSqrt(x[0]), - vtkm::RSqrt(x[1]), - vtkm::RSqrt(x[2]), - vtkm::RSqrt(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> RSqrt( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::RSqrt(x[0]), vtkm::RSqrt(x[1]), vtkm::RSqrt(x[2]), vtkm::RSqrt(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -RSqrt(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::RSqrt(x[0]), - vtkm::RSqrt(x[1]), - vtkm::RSqrt(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> RSqrt( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::RSqrt(x[0]), vtkm::RSqrt(x[1]), vtkm::RSqrt(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -RSqrt(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::RSqrt(x[0]), - vtkm::RSqrt(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> RSqrt( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::RSqrt(x[0]), + vtkm::RSqrt(x[1])); } /// Compute the cube root of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Cbrt(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Cbrt(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(cbrt)(static_cast(x)); #else return std::cbrt(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Cbrt(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Cbrt(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(cbrt)(x); #else return std::cbrt(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Cbrt(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Cbrt(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(cbrt)(x); #else return std::cbrt(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Cbrt(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Cbrt( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Cbrt(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Cbrt(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Cbrt(x[0]), - vtkm::Cbrt(x[1]), - vtkm::Cbrt(x[2]), - vtkm::Cbrt(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Cbrt( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Cbrt(x[0]), vtkm::Cbrt(x[1]), vtkm::Cbrt(x[2]), vtkm::Cbrt(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Cbrt(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Cbrt(x[0]), - vtkm::Cbrt(x[1]), - vtkm::Cbrt(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Cbrt( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Cbrt(x[0]), vtkm::Cbrt(x[1]), vtkm::Cbrt(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Cbrt(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Cbrt(x[0]), - vtkm::Cbrt(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Cbrt( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Cbrt(x[0]), + vtkm::Cbrt(x[1])); } /// Compute the reciprocal cube root of \p x. The result of this function is @@ -1190,727 +1092,673 @@ Cbrt(const vtkm::Vec &x) { /// should use this function whenever dividing by the cube root. /// #ifdef VTKM_CUDA -static inline VTKM_EXEC_CONT -vtkm::Float32 RCbrt(vtkm::Float32 x) { +static inline VTKM_EXEC_CONT vtkm::Float32 RCbrt(vtkm::Float32 x) +{ return rcbrtf(x); } -static inline VTKM_EXEC_CONT -vtkm::Float64 RCbrt(vtkm::Float64 x) { +static inline VTKM_EXEC_CONT vtkm::Float64 RCbrt(vtkm::Float64 x) +{ return rcbrt(x); } -template -static inline VTKM_EXEC_CONT -vtkm::Float64 RCbrt(T x) { +template +static inline VTKM_EXEC_CONT vtkm::Float64 RCbrt(T x) +{ return rcbrt(static_cast(x)); } -#else // !VTKM_CUDA -static inline VTKM_EXEC_CONT -vtkm::Float32 RCbrt(vtkm::Float32 x) { - return 1/vtkm::Cbrt(x); +#else // !VTKM_CUDA +static inline VTKM_EXEC_CONT vtkm::Float32 RCbrt(vtkm::Float32 x) +{ + return 1 / vtkm::Cbrt(x); } -static inline VTKM_EXEC_CONT -vtkm::Float64 RCbrt(vtkm::Float64 x) { - return 1/vtkm::Cbrt(x); +static inline VTKM_EXEC_CONT vtkm::Float64 RCbrt(vtkm::Float64 x) +{ + return 1 / vtkm::Cbrt(x); } -template -static inline VTKM_EXEC_CONT -vtkm::Float64 RCbrt(T x) { - return 1/vtkm::Cbrt(static_cast(x)); +template +static inline VTKM_EXEC_CONT vtkm::Float64 RCbrt(T x) +{ + return 1 / vtkm::Cbrt(static_cast(x)); } #endif // !VTKM_CUDA -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -RCbrt(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> RCbrt( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::RCbrt(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -RCbrt(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::RCbrt(x[0]), - vtkm::RCbrt(x[1]), - vtkm::RCbrt(x[2]), - vtkm::RCbrt(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> RCbrt( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::RCbrt(x[0]), vtkm::RCbrt(x[1]), vtkm::RCbrt(x[2]), vtkm::RCbrt(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -RCbrt(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::RCbrt(x[0]), - vtkm::RCbrt(x[1]), - vtkm::RCbrt(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> RCbrt( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::RCbrt(x[0]), vtkm::RCbrt(x[1]), vtkm::RCbrt(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -RCbrt(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::RCbrt(x[0]), - vtkm::RCbrt(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> RCbrt( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::RCbrt(x[0]), + vtkm::RCbrt(x[1])); } /// Computes e**\p x, the base-e exponential of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Exp(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Exp(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(exp)(static_cast(x)); #else return std::exp(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Exp(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Exp(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(exp)(x); #else return std::exp(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Exp(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Exp(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(exp)(x); #else return std::exp(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Exp(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Exp( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Exp(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Exp(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Exp(x[0]), - vtkm::Exp(x[1]), - vtkm::Exp(x[2]), - vtkm::Exp(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Exp( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Exp(x[0]), vtkm::Exp(x[1]), vtkm::Exp(x[2]), vtkm::Exp(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Exp(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Exp(x[0]), - vtkm::Exp(x[1]), - vtkm::Exp(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Exp( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Exp(x[0]), vtkm::Exp(x[1]), vtkm::Exp(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Exp(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Exp(x[0]), - vtkm::Exp(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Exp( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Exp(x[0]), + vtkm::Exp(x[1])); } /// Computes 2**\p x, the base-2 exponential of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Exp2(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Exp2(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(exp2)(static_cast(x)); #else return std::exp2(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Exp2(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Exp2(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(exp2)(x); #else return std::exp2(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Exp2(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Exp2(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(exp2)(x); #else return std::exp2(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Exp2(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Exp2( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Exp2(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Exp2(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Exp2(x[0]), - vtkm::Exp2(x[1]), - vtkm::Exp2(x[2]), - vtkm::Exp2(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Exp2( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Exp2(x[0]), vtkm::Exp2(x[1]), vtkm::Exp2(x[2]), vtkm::Exp2(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Exp2(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Exp2(x[0]), - vtkm::Exp2(x[1]), - vtkm::Exp2(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Exp2( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Exp2(x[0]), vtkm::Exp2(x[1]), vtkm::Exp2(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Exp2(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Exp2(x[0]), - vtkm::Exp2(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Exp2( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Exp2(x[0]), + vtkm::Exp2(x[1])); } /// Computes (e**\p x) - 1, the of base-e exponental of \p x then minus 1. The /// accuracy of this function is good even for very small values of x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -ExpM1(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type ExpM1(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(expm1)(static_cast(x)); #else return std::expm1(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ExpM1(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ExpM1(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(expm1)(x); #else return std::expm1(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -ExpM1(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type ExpM1(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(expm1)(x); #else return std::expm1(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -ExpM1(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> ExpM1( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::ExpM1(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -ExpM1(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::ExpM1(x[0]), - vtkm::ExpM1(x[1]), - vtkm::ExpM1(x[2]), - vtkm::ExpM1(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> ExpM1( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::ExpM1(x[0]), vtkm::ExpM1(x[1]), vtkm::ExpM1(x[2]), vtkm::ExpM1(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -ExpM1(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::ExpM1(x[0]), - vtkm::ExpM1(x[1]), - vtkm::ExpM1(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> ExpM1( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::ExpM1(x[0]), vtkm::ExpM1(x[1]), vtkm::ExpM1(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -ExpM1(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::ExpM1(x[0]), - vtkm::ExpM1(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> ExpM1( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::ExpM1(x[0]), + vtkm::ExpM1(x[1])); } /// Computes 10**\p x, the base-10 exponential of \p x. /// #ifdef VTKM_CUDA -static inline VTKM_EXEC_CONT -vtkm::Float32 Exp10(vtkm::Float32 x) { +static inline VTKM_EXEC_CONT vtkm::Float32 Exp10(vtkm::Float32 x) +{ return exp10f(x); } -static inline VTKM_EXEC_CONT -vtkm::Float64 Exp10(vtkm::Float64 x) { +static inline VTKM_EXEC_CONT vtkm::Float64 Exp10(vtkm::Float64 x) +{ return exp10(x); } -template -static inline VTKM_EXEC_CONT -vtkm::Float64 Exp10(T x) { +template +static inline VTKM_EXEC_CONT vtkm::Float64 Exp10(T x) +{ return exp10(static_cast(x)); } -#else // !VTKM_CUDA -static inline VTKM_EXEC_CONT -vtkm::Float32 Exp10(vtkm::Float32 x) { - return vtkm::Pow(10, x);; +#else // !VTKM_CUDA +static inline VTKM_EXEC_CONT vtkm::Float32 Exp10(vtkm::Float32 x) +{ + return vtkm::Pow(10, x); + ; } -static inline VTKM_EXEC_CONT -vtkm::Float64 Exp10(vtkm::Float64 x) { - return vtkm::Pow(10, x);; +static inline VTKM_EXEC_CONT vtkm::Float64 Exp10(vtkm::Float64 x) +{ + return vtkm::Pow(10, x); + ; } -template -static inline VTKM_EXEC_CONT -vtkm::Float64 Exp10(T x) { - return vtkm::Pow(10, static_cast(x));; +template +static inline VTKM_EXEC_CONT vtkm::Float64 Exp10(T x) +{ + return vtkm::Pow(10, static_cast(x)); + ; } #endif // !VTKM_CUDA -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Exp10(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Exp10( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Exp10(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Exp10(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Exp10(x[0]), - vtkm::Exp10(x[1]), - vtkm::Exp10(x[2]), - vtkm::Exp10(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Exp10( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Exp10(x[0]), vtkm::Exp10(x[1]), vtkm::Exp10(x[2]), vtkm::Exp10(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Exp10(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Exp10(x[0]), - vtkm::Exp10(x[1]), - vtkm::Exp10(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Exp10( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Exp10(x[0]), vtkm::Exp10(x[1]), vtkm::Exp10(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Exp10(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Exp10(x[0]), - vtkm::Exp10(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Exp10( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Exp10(x[0]), + vtkm::Exp10(x[1])); } /// Computes the natural logarithm of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Log(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Log(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(log)(static_cast(x)); #else return std::log(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Log(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Log(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(log)(x); #else return std::log(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Log(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Log(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(log)(x); #else return std::log(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Log(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Log( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Log(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Log(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Log(x[0]), - vtkm::Log(x[1]), - vtkm::Log(x[2]), - vtkm::Log(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Log( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Log(x[0]), vtkm::Log(x[1]), vtkm::Log(x[2]), vtkm::Log(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Log(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Log(x[0]), - vtkm::Log(x[1]), - vtkm::Log(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Log( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Log(x[0]), vtkm::Log(x[1]), vtkm::Log(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Log(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Log(x[0]), - vtkm::Log(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Log( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Log(x[0]), + vtkm::Log(x[1])); } /// Computes the logarithm base 2 of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Log2(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Log2(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(log2)(static_cast(x)); #else return std::log2(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Log2(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Log2(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(log2)(x); #else return std::log2(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Log2(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Log2(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(log2)(x); #else return std::log2(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Log2(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Log2( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Log2(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Log2(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Log2(x[0]), - vtkm::Log2(x[1]), - vtkm::Log2(x[2]), - vtkm::Log2(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Log2( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Log2(x[0]), vtkm::Log2(x[1]), vtkm::Log2(x[2]), vtkm::Log2(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Log2(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Log2(x[0]), - vtkm::Log2(x[1]), - vtkm::Log2(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Log2( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Log2(x[0]), vtkm::Log2(x[1]), vtkm::Log2(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Log2(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Log2(x[0]), - vtkm::Log2(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Log2( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Log2(x[0]), + vtkm::Log2(x[1])); } /// Computes the logarithm base 10 of \p x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Log10(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Log10(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(log10)(static_cast(x)); #else return std::log10(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Log10(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Log10(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(log10)(x); #else return std::log10(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Log10(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Log10(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(log10)(x); #else return std::log10(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Log10(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Log10( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Log10(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Log10(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Log10(x[0]), - vtkm::Log10(x[1]), - vtkm::Log10(x[2]), - vtkm::Log10(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Log10( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Log10(x[0]), vtkm::Log10(x[1]), vtkm::Log10(x[2]), vtkm::Log10(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Log10(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Log10(x[0]), - vtkm::Log10(x[1]), - vtkm::Log10(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Log10( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Log10(x[0]), vtkm::Log10(x[1]), vtkm::Log10(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Log10(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Log10(x[0]), - vtkm::Log10(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Log10( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Log10(x[0]), + vtkm::Log10(x[1])); } /// Computes the value of log(1+x) accurately for very small values of x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Log1P(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Log1P(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(log1p)(static_cast(x)); #else return std::log1p(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Log1P(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Log1P(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(log1p)(x); #else return std::log1p(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Log1P(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Log1P(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(log1p)(x); #else return std::log1p(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Log1P(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Log1P( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Log1P(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Log1P(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Log1P(x[0]), - vtkm::Log1P(x[1]), - vtkm::Log1P(x[2]), - vtkm::Log1P(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Log1P( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Log1P(x[0]), vtkm::Log1P(x[1]), vtkm::Log1P(x[2]), vtkm::Log1P(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Log1P(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Log1P(x[0]), - vtkm::Log1P(x[1]), - vtkm::Log1P(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Log1P( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Log1P(x[0]), vtkm::Log1P(x[1]), vtkm::Log1P(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Log1P(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Log1P(x[0]), - vtkm::Log1P(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Log1P( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Log1P(x[0]), + vtkm::Log1P(x[1])); } //----------------------------------------------------------------------------- /// Returns \p x or \p y, whichever is larger. /// -template -static inline VTKM_EXEC_CONT -T Max(const T &x, const T &y); +template +static inline VTKM_EXEC_CONT T Max(const T& x, const T& y); #ifdef VTKM_USE_STL -static inline VTKM_EXEC_CONT -vtkm::Float32 Max(vtkm::Float32 x, vtkm::Float32 y) { +static inline VTKM_EXEC_CONT vtkm::Float32 Max(vtkm::Float32 x, vtkm::Float32 y) +{ return (std::max)(x, y); } -static inline VTKM_EXEC_CONT -vtkm::Float64 Max(vtkm::Float64 x, vtkm::Float64 y) { +static inline VTKM_EXEC_CONT vtkm::Float64 Max(vtkm::Float64 x, vtkm::Float64 y) +{ return (std::max)(x, y); } #else // !VTKM_USE_STL -static inline VTKM_EXEC_CONT -vtkm::Float32 Max(vtkm::Float32 x, vtkm::Float32 y) { +static inline VTKM_EXEC_CONT vtkm::Float32 Max(vtkm::Float32 x, vtkm::Float32 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_32(fmax)(x,y); + return VTKM_CUDA_MATH_FUNCTION_32(fmax)(x, y); #else - return std::fmax(x,y); + return std::fmax(x, y); #endif } -static inline VTKM_EXEC_CONT -vtkm::Float64 Max(vtkm::Float64 x, vtkm::Float64 y) { +static inline VTKM_EXEC_CONT vtkm::Float64 Max(vtkm::Float64 x, vtkm::Float64 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_64(fmax)(x,y); + return VTKM_CUDA_MATH_FUNCTION_64(fmax)(x, y); #else - return std::fmax(x,y); + return std::fmax(x, y); #endif } #endif // !VTKM_USE_STL /// Returns \p x or \p y, whichever is smaller. /// -template -static inline VTKM_EXEC_CONT -T Min(const T &x, const T &y); +template +static inline VTKM_EXEC_CONT T Min(const T& x, const T& y); #ifdef VTKM_USE_STL -static inline VTKM_EXEC_CONT -vtkm::Float32 Min(vtkm::Float32 x, vtkm::Float32 y) { +static inline VTKM_EXEC_CONT vtkm::Float32 Min(vtkm::Float32 x, vtkm::Float32 y) +{ return (std::min)(x, y); } -static inline VTKM_EXEC_CONT -vtkm::Float64 Min(vtkm::Float64 x, vtkm::Float64 y) { +static inline VTKM_EXEC_CONT vtkm::Float64 Min(vtkm::Float64 x, vtkm::Float64 y) +{ return (std::min)(x, y); } #else // !VTKM_USE_STL -static inline VTKM_EXEC_CONT -vtkm::Float32 Min(vtkm::Float32 x, vtkm::Float32 y) { +static inline VTKM_EXEC_CONT vtkm::Float32 Min(vtkm::Float32 x, vtkm::Float32 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_32(fmin)(x,y); + return VTKM_CUDA_MATH_FUNCTION_32(fmin)(x, y); #else - return std::fmin(x,y); + return std::fmin(x, y); #endif } -static inline VTKM_EXEC_CONT -vtkm::Float64 Min(vtkm::Float64 x, vtkm::Float64 y) { +static inline VTKM_EXEC_CONT vtkm::Float64 Min(vtkm::Float64 x, vtkm::Float64 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_64(fmin)(x,y); + return VTKM_CUDA_MATH_FUNCTION_64(fmin)(x, y); #else - return std::fmin(x,y); + return std::fmin(x, y); #endif } #endif // !VTKM_USE_STL -namespace detail { +namespace detail +{ -template -static inline VTKM_EXEC_CONT -T Max(T x, T y, vtkm::TypeTraitsScalarTag) +template +static inline VTKM_EXEC_CONT T Max(T x, T y, vtkm::TypeTraitsScalarTag) { return (x < y) ? y : x; } -template -static inline VTKM_EXEC_CONT -T Max(const T &x, const T &y, vtkm::TypeTraitsVectorTag) +template +static inline VTKM_EXEC_CONT T Max(const T& x, const T& y, vtkm::TypeTraitsVectorTag) { typedef vtkm::VecTraits Traits; T result; for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; index++) { - Traits::SetComponent(result, - index, - vtkm::Max(Traits::GetComponent(x, index), - Traits::GetComponent(y, index))); + Traits::SetComponent(result, index, + vtkm::Max(Traits::GetComponent(x, index), Traits::GetComponent(y, index))); } return result; } -template -static inline VTKM_EXEC_CONT -T Min(T x, T y, vtkm::TypeTraitsScalarTag) +template +static inline VTKM_EXEC_CONT T Min(T x, T y, vtkm::TypeTraitsScalarTag) { return (x < y) ? x : y; } -template -static inline VTKM_EXEC_CONT -T Min(const T &x, const T &y, vtkm::TypeTraitsVectorTag) +template +static inline VTKM_EXEC_CONT T Min(const T& x, const T& y, vtkm::TypeTraitsVectorTag) { typedef vtkm::VecTraits Traits; T result; for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; index++) { - Traits::SetComponent(result, - index, - vtkm::Min(Traits::GetComponent(x, index), - Traits::GetComponent(y, index))); + Traits::SetComponent(result, index, + vtkm::Min(Traits::GetComponent(x, index), Traits::GetComponent(y, index))); } return result; } @@ -1919,21 +1767,20 @@ T Min(const T &x, const T &y, vtkm::TypeTraitsVectorTag) /// Returns \p x or \p y, whichever is larger. /// -template -static inline VTKM_EXEC_CONT -T Max(const T &x, const T &y) { +template +static inline VTKM_EXEC_CONT T Max(const T& x, const T& y) +{ return detail::Max(x, y, typename vtkm::TypeTraits::DimensionalityTag()); } /// Returns \p x or \p y, whichever is smaller. /// -template -static inline VTKM_EXEC_CONT -T Min(const T &x, const T &y) { +template +static inline VTKM_EXEC_CONT T Min(const T& x, const T& y) +{ return detail::Min(x, y, typename vtkm::TypeTraits::DimensionalityTag()); } - //----------------------------------------------------------------------------- //#ifdef VTKM_CUDA @@ -1942,141 +1789,153 @@ T Min(const T &x, const T &y) { #ifdef VTKM_USE_IEEE_NONFINITE -namespace detail { +namespace detail +{ union IEEE754Bits32 { vtkm::UInt32 bits; vtkm::Float32 scalar; }; -#define VTKM_NAN_BITS_32 0x7FC00000U -#define VTKM_INF_BITS_32 0x7F800000U -#define VTKM_NEG_INF_BITS_32 0xFF800000U -#define VTKM_EPSILON_32 1e-5f +#define VTKM_NAN_BITS_32 0x7FC00000U +#define VTKM_INF_BITS_32 0x7F800000U +#define VTKM_NEG_INF_BITS_32 0xFF800000U +#define VTKM_EPSILON_32 1e-5f union IEEE754Bits64 { vtkm::UInt64 bits; vtkm::Float64 scalar; }; -#define VTKM_NAN_BITS_64 0x7FF8000000000000ULL -#define VTKM_INF_BITS_64 0x7FF0000000000000ULL -#define VTKM_NEG_INF_BITS_64 0xFFF0000000000000ULL -#define VTKM_EPSILON_64 1e-9 +#define VTKM_NAN_BITS_64 0x7FF8000000000000ULL +#define VTKM_INF_BITS_64 0x7FF0000000000000ULL +#define VTKM_NEG_INF_BITS_64 0xFFF0000000000000ULL +#define VTKM_EPSILON_64 1e-9 -template struct FloatLimits; +template +struct FloatLimits; -template<> +template <> struct FloatLimits { typedef vtkm::detail::IEEE754Bits32 BitsType; VTKM_EXEC_CONT - static vtkm::Float32 Nan() { - BitsType nan = {VTKM_NAN_BITS_32}; + static vtkm::Float32 Nan() + { + BitsType nan = { VTKM_NAN_BITS_32 }; return nan.scalar; } VTKM_EXEC_CONT - static vtkm::Float32 Infinity() { - BitsType inf = {VTKM_INF_BITS_32}; + static vtkm::Float32 Infinity() + { + BitsType inf = { VTKM_INF_BITS_32 }; return inf.scalar; } VTKM_EXEC_CONT - static vtkm::Float32 NegativeInfinity() { - BitsType neginf = {VTKM_NEG_INF_BITS_32}; + static vtkm::Float32 NegativeInfinity() + { + BitsType neginf = { VTKM_NEG_INF_BITS_32 }; return neginf.scalar; } VTKM_EXEC_CONT - static vtkm::Float32 Epsilon() { - return VTKM_EPSILON_32; - } + static vtkm::Float32 Epsilon() { return VTKM_EPSILON_32; } }; -template -struct FloatLimits< vtkm::Vec > +template +struct FloatLimits> { typedef vtkm::detail::IEEE754Bits32 BitsType; VTKM_EXEC_CONT - static vtkm::Vec Nan() { - BitsType nan = {VTKM_NAN_BITS_32}; - return vtkm::Vec(nan.scalar); + static vtkm::Vec Nan() + { + BitsType nan = { VTKM_NAN_BITS_32 }; + return vtkm::Vec(nan.scalar); } VTKM_EXEC_CONT - static vtkm::Vec Infinity() { - BitsType inf = {VTKM_INF_BITS_32}; - return vtkm::Vec(inf.scalar); + static vtkm::Vec Infinity() + { + BitsType inf = { VTKM_INF_BITS_32 }; + return vtkm::Vec(inf.scalar); } VTKM_EXEC_CONT - static vtkm::Vec NegativeInfinity() { - BitsType neginf = {VTKM_NEG_INF_BITS_32}; - return vtkm::Vec(neginf.scalar); + static vtkm::Vec NegativeInfinity() + { + BitsType neginf = { VTKM_NEG_INF_BITS_32 }; + return vtkm::Vec(neginf.scalar); } VTKM_EXEC_CONT - static vtkm::Vec Epsilon() { - return vtkm::Vec(VTKM_EPSILON_32); + static vtkm::Vec Epsilon() + { + return vtkm::Vec(VTKM_EPSILON_32); } }; -template<> +template <> struct FloatLimits { typedef vtkm::detail::IEEE754Bits64 BitsType; VTKM_EXEC_CONT - static vtkm::Float64 Nan() { - BitsType nan = {VTKM_NAN_BITS_64}; + static vtkm::Float64 Nan() + { + BitsType nan = { VTKM_NAN_BITS_64 }; return nan.scalar; } VTKM_EXEC_CONT - static vtkm::Float64 Infinity() { - BitsType inf = {VTKM_INF_BITS_64}; + static vtkm::Float64 Infinity() + { + BitsType inf = { VTKM_INF_BITS_64 }; return inf.scalar; } VTKM_EXEC_CONT - static vtkm::Float64 NegativeInfinity() { - BitsType neginf = {VTKM_NEG_INF_BITS_64}; + static vtkm::Float64 NegativeInfinity() + { + BitsType neginf = { VTKM_NEG_INF_BITS_64 }; return neginf.scalar; } VTKM_EXEC_CONT - static vtkm::Float64 Epsilon() { - return VTKM_EPSILON_64; - } + static vtkm::Float64 Epsilon() { return VTKM_EPSILON_64; } }; -template -struct FloatLimits< vtkm::Vec > +template +struct FloatLimits> { typedef vtkm::detail::IEEE754Bits64 BitsType; VTKM_EXEC_CONT - static vtkm::Vec Nan() { - BitsType nan = {VTKM_NAN_BITS_64}; - return vtkm::Vec(nan.scalar); + static vtkm::Vec Nan() + { + BitsType nan = { VTKM_NAN_BITS_64 }; + return vtkm::Vec(nan.scalar); } VTKM_EXEC_CONT - static vtkm::Vec Infinity() { - BitsType inf = {VTKM_INF_BITS_64}; - return vtkm::Vec(inf.scalar); + static vtkm::Vec Infinity() + { + BitsType inf = { VTKM_INF_BITS_64 }; + return vtkm::Vec(inf.scalar); } VTKM_EXEC_CONT - static vtkm::Vec NegativeInfinity() { - BitsType neginf = {VTKM_NEG_INF_BITS_64}; - return vtkm::Vec(neginf.scalar); + static vtkm::Vec NegativeInfinity() + { + BitsType neginf = { VTKM_NEG_INF_BITS_64 }; + return vtkm::Vec(neginf.scalar); } VTKM_EXEC_CONT - static vtkm::Vec Epsilon() { - return vtkm::Vec(VTKM_EPSILON_64); + static vtkm::Vec Epsilon() + { + return vtkm::Vec(VTKM_EPSILON_64); } }; @@ -2093,27 +1952,24 @@ struct FloatLimits< vtkm::Vec > /// Returns the representation for not-a-number (NaN). /// -template -static inline VTKM_EXEC_CONT -T Nan() +template +static inline VTKM_EXEC_CONT T Nan() { return detail::FloatLimits::Nan(); } /// Returns the representation for infinity. /// -template -static inline VTKM_EXEC_CONT -T Infinity() +template +static inline VTKM_EXEC_CONT T Infinity() { return detail::FloatLimits::Infinity(); } /// Returns the representation for negative infinity. /// -template -static inline VTKM_EXEC_CONT -T NegativeInfinity() +template +static inline VTKM_EXEC_CONT T NegativeInfinity() { return detail::FloatLimits::NegativeInfinity(); } @@ -2121,38 +1977,34 @@ T NegativeInfinity() /// Returns the difference between 1 and the least value greater than 1 /// that is representable. /// -template -static inline VTKM_EXEC_CONT -T Epsilon() +template +static inline VTKM_EXEC_CONT T Epsilon() { return detail::FloatLimits::Epsilon(); } -#else // !VTKM_USE_IEEE_NONFINITE +#else // !VTKM_USE_IEEE_NONFINITE /// Returns the representation for not-a-number (NaN). /// -template -static inline VTKM_EXEC_CONT -T Nan() +template +static inline VTKM_EXEC_CONT T Nan() { return std::numeric_limits::quiet_NaN(); } /// Returns the representation for infinity. /// -template -static inline VTKM_EXEC_CONT -T Infinity() +template +static inline VTKM_EXEC_CONT T Infinity() { return std::numeric_limits::infinity(); } /// Returns the representation for negative infinity. /// -template -static inline VTKM_EXEC_CONT -T NegativeInfinity() +template +static inline VTKM_EXEC_CONT T NegativeInfinity() { return -std::numeric_limits::infinity(); } @@ -2160,9 +2012,8 @@ T NegativeInfinity() /// Returns the difference between 1 and the least value greater than 1 /// that is representable. /// -template -static inline VTKM_EXEC_CONT -T Epsilon() +template +static inline VTKM_EXEC_CONT T Epsilon() { return std::numeric_limits::epsilon(); } @@ -2170,28 +2021,34 @@ T Epsilon() /// Returns the representation for not-a-number (NaN). /// -static inline VTKM_EXEC_CONT vtkm::Float32 Nan32() { +static inline VTKM_EXEC_CONT vtkm::Float32 Nan32() +{ return vtkm::Nan(); } -static inline VTKM_EXEC_CONT vtkm::Float64 Nan64() { +static inline VTKM_EXEC_CONT vtkm::Float64 Nan64() +{ return vtkm::Nan(); } /// Returns the representation for infinity. /// -static inline VTKM_EXEC_CONT vtkm::Float32 Infinity32() { +static inline VTKM_EXEC_CONT vtkm::Float32 Infinity32() +{ return vtkm::Infinity(); } -static inline VTKM_EXEC_CONT vtkm::Float64 Infinity64() { +static inline VTKM_EXEC_CONT vtkm::Float64 Infinity64() +{ return vtkm::Infinity(); } /// Returns the representation for negative infinity. /// -static inline VTKM_EXEC_CONT vtkm::Float32 NegativeInfinity32() { +static inline VTKM_EXEC_CONT vtkm::Float32 NegativeInfinity32() +{ return vtkm::NegativeInfinity(); } -static inline VTKM_EXEC_CONT vtkm::Float64 NegativeInfinity64() { +static inline VTKM_EXEC_CONT vtkm::Float64 NegativeInfinity64() +{ return vtkm::NegativeInfinity(); } @@ -2210,9 +2067,8 @@ static inline VTKM_EXEC_CONT vtkm::Float64 Epsilon64() //----------------------------------------------------------------------------- /// Returns true if \p x is not a number. /// -template -static inline VTKM_EXEC_CONT -bool IsNan(T x) +template +static inline VTKM_EXEC_CONT bool IsNan(T x) { #ifndef VTKM_CUDA using std::isnan; @@ -2222,9 +2078,8 @@ bool IsNan(T x) /// Returns true if \p x is positive or negative infinity. /// -template -static inline VTKM_EXEC_CONT -bool IsInf(T x) +template +static inline VTKM_EXEC_CONT bool IsInf(T x) { #ifndef VTKM_CUDA using std::isinf; @@ -2234,9 +2089,8 @@ bool IsInf(T x) /// Returns true if \p x is a normal number (not NaN or infinite). /// -template -static inline VTKM_EXEC_CONT -bool IsFinite(T x) +template +static inline VTKM_EXEC_CONT bool IsFinite(T x) { #ifndef VTKM_CUDA using std::isfinite; @@ -2247,206 +2101,188 @@ bool IsFinite(T x) //----------------------------------------------------------------------------- /// Round \p x to the smallest integer value not less than x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Ceil(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Ceil(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(ceil)(static_cast(x)); #else return std::ceil(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Ceil(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Ceil(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(ceil)(x); #else return std::ceil(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Ceil(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Ceil(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(ceil)(x); #else return std::ceil(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Ceil(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Ceil( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Ceil(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Ceil(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Ceil(x[0]), - vtkm::Ceil(x[1]), - vtkm::Ceil(x[2]), - vtkm::Ceil(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Ceil( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Ceil(x[0]), vtkm::Ceil(x[1]), vtkm::Ceil(x[2]), vtkm::Ceil(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Ceil(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Ceil(x[0]), - vtkm::Ceil(x[1]), - vtkm::Ceil(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Ceil( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Ceil(x[0]), vtkm::Ceil(x[1]), vtkm::Ceil(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Ceil(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Ceil(x[0]), - vtkm::Ceil(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Ceil( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Ceil(x[0]), + vtkm::Ceil(x[1])); } /// Round \p x to the largest integer value not greater than x. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Floor(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Floor(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(floor)(static_cast(x)); #else return std::floor(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Floor(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Floor(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(floor)(x); #else return std::floor(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Floor(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Floor(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(floor)(x); #else return std::floor(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Floor(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Floor( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Floor(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Floor(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Floor(x[0]), - vtkm::Floor(x[1]), - vtkm::Floor(x[2]), - vtkm::Floor(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Floor( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Floor(x[0]), vtkm::Floor(x[1]), vtkm::Floor(x[2]), vtkm::Floor(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Floor(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Floor(x[0]), - vtkm::Floor(x[1]), - vtkm::Floor(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Floor( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Floor(x[0]), vtkm::Floor(x[1]), vtkm::Floor(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Floor(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Floor(x[0]), - vtkm::Floor(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Floor( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Floor(x[0]), + vtkm::Floor(x[1])); } /// Round \p x to the nearest integral value. /// -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Round(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Round(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(round)(static_cast(x)); #else return std::round(static_cast(x)); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Round(vtkm::Float32 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Round(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(round)(x); #else return std::round(x); #endif } -template<> -inline VTKM_EXEC_CONT -detail::FloatingPointReturnType::Type -Round(vtkm::Float64 x) { +template <> +inline VTKM_EXEC_CONT detail::FloatingPointReturnType::Type Round(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(round)(x); #else return std::round(x); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,N> -Round(const vtkm::Vec &x) { - vtkm::Vec::Type,N> result; +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, N> Round( + const vtkm::Vec& x) +{ + vtkm::Vec::Type, N> result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Round(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,4> -Round(const vtkm::Vec &x) { - return vtkm::Vec::Type,4>(vtkm::Round(x[0]), - vtkm::Round(x[1]), - vtkm::Round(x[2]), - vtkm::Round(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 4> Round( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 4>( + vtkm::Round(x[0]), vtkm::Round(x[1]), vtkm::Round(x[2]), vtkm::Round(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Round(const vtkm::Vec &x) { - return vtkm::Vec::Type,3>(vtkm::Round(x[0]), - vtkm::Round(x[1]), - vtkm::Round(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 3> Round( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 3>( + vtkm::Round(x[0]), vtkm::Round(x[1]), vtkm::Round(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec::Type,2> -Round(const vtkm::Vec &x) { - return vtkm::Vec::Type,2>(vtkm::Round(x[0]), - vtkm::Round(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec::Type, 2> Round( + const vtkm::Vec& x) +{ + return vtkm::Vec::Type, 2>(vtkm::Round(x[0]), + vtkm::Round(x[1])); } //----------------------------------------------------------------------------- @@ -2455,20 +2291,20 @@ Round(const vtkm::Vec &x) { /// numerator divided by \p denominator rounded towards zero to an integer. For /// example, FMod(6.5, 2.3) returns 1.9, which is 6.5 - 2*2.3. /// -static inline VTKM_EXEC_CONT -vtkm::Float32 FMod(vtkm::Float32 x, vtkm::Float32 y) { +static inline VTKM_EXEC_CONT vtkm::Float32 FMod(vtkm::Float32 x, vtkm::Float32 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_32(fmod)(x,y); + return VTKM_CUDA_MATH_FUNCTION_32(fmod)(x, y); #else - return std::fmod(x,y); + return std::fmod(x, y); #endif } -static inline VTKM_EXEC_CONT -vtkm::Float64 FMod(vtkm::Float64 x, vtkm::Float64 y) { +static inline VTKM_EXEC_CONT vtkm::Float64 FMod(vtkm::Float64 x, vtkm::Float64 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_64(fmod)(x,y); + return VTKM_CUDA_MATH_FUNCTION_64(fmod)(x, y); #else - return std::fmod(x,y); + return std::fmod(x, y); #endif } @@ -2479,28 +2315,27 @@ vtkm::Float64 FMod(vtkm::Float64 x, vtkm::Float64 y) { /// returns -0.4, which is 6.5 - 3*2.3. /// #ifdef VTKM_MSVC -template -static inline VTKM_EXEC_CONT -T Remainder(T numerator, T denominator) +template +static inline VTKM_EXEC_CONT T Remainder(T numerator, T denominator) { - T quotient = vtkm::Round(numerator/denominator); - return numerator - quotient*denominator; + T quotient = vtkm::Round(numerator / denominator); + return numerator - quotient * denominator; } #else // !VTKM_MSVC -static inline VTKM_EXEC_CONT -vtkm::Float32 Remainder(vtkm::Float32 x, vtkm::Float32 y) { +static inline VTKM_EXEC_CONT vtkm::Float32 Remainder(vtkm::Float32 x, vtkm::Float32 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_32(remainder)(x,y); + return VTKM_CUDA_MATH_FUNCTION_32(remainder)(x, y); #else - return std::remainder(x,y); + return std::remainder(x, y); #endif } -static inline VTKM_EXEC_CONT -vtkm::Float64 Remainder(vtkm::Float64 x, vtkm::Float64 y) { +static inline VTKM_EXEC_CONT vtkm::Float64 Remainder(vtkm::Float64 x, vtkm::Float64 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_64(remainder)(x,y); + return VTKM_CUDA_MATH_FUNCTION_64(remainder)(x, y); #else - return std::remainder(x,y); + return std::remainder(x, y); #endif } #endif // !VTKM_MSVC @@ -2509,22 +2344,20 @@ vtkm::Float64 Remainder(vtkm::Float64 x, vtkm::Float64 y) { /// Remainder. In addition, this function also returns the \c quotient used to /// get that remainder. /// -template -static inline VTKM_EXEC_CONT -vtkm::Float32 RemainderQuotient(vtkm::Float32 numerator, - vtkm::Float32 denominator, - QType "ient) +template +static inline VTKM_EXEC_CONT vtkm::Float32 RemainderQuotient(vtkm::Float32 numerator, + vtkm::Float32 denominator, + QType& quotient) { int iQuotient; vtkm::Float32 result = std::remquo(numerator, denominator, &iQuotient); quotient = iQuotient; return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Float64 RemainderQuotient(vtkm::Float64 numerator, - vtkm::Float64 denominator, - QType "ient) +template +static inline VTKM_EXEC_CONT vtkm::Float64 RemainderQuotient(vtkm::Float64 numerator, + vtkm::Float64 denominator, + QType& quotient) { int iQuotient; vtkm::Float64 result = std::remquo(numerator, denominator, &iQuotient); @@ -2535,13 +2368,11 @@ vtkm::Float64 RemainderQuotient(vtkm::Float64 numerator, /// Gets the integral and fractional parts of \c x. The return value is the /// fractional part and \c integral is set to the integral part. /// -static inline VTKM_EXEC_CONT -vtkm::Float32 ModF(vtkm::Float32 x, vtkm::Float32 &integral) +static inline VTKM_EXEC_CONT vtkm::Float32 ModF(vtkm::Float32 x, vtkm::Float32& integral) { return std::modf(x, &integral); } -static inline VTKM_EXEC_CONT -vtkm::Float64 ModF(vtkm::Float64 x, vtkm::Float64 &integral) +static inline VTKM_EXEC_CONT vtkm::Float64 ModF(vtkm::Float64 x, vtkm::Float64& integral) { return std::modf(x, &integral); } @@ -2550,8 +2381,7 @@ vtkm::Float64 ModF(vtkm::Float64 x, vtkm::Float64 &integral) /// Return the absolute value of \p x. That is, return \p x if it is positive or /// \p -x if it is negative. /// -static inline VTKM_EXEC_CONT -vtkm::Int32 Abs(vtkm::Int32 x) +static inline VTKM_EXEC_CONT vtkm::Int32 Abs(vtkm::Int32 x) { #if VTKM_SIZE_INT == 4 return abs(x); @@ -2559,8 +2389,7 @@ vtkm::Int32 Abs(vtkm::Int32 x) #error Unknown size of Int32. #endif } -static inline VTKM_EXEC_CONT -vtkm::Int64 Abs(vtkm::Int64 x) +static inline VTKM_EXEC_CONT vtkm::Int64 Abs(vtkm::Int64 x) { #if VTKM_SIZE_LONG == 8 return labs(x); @@ -2570,75 +2399,68 @@ vtkm::Int64 Abs(vtkm::Int64 x) #error Unknown size of Int64. #endif } -static inline VTKM_EXEC_CONT -vtkm::Float32 Abs(vtkm::Float32 x) { +static inline VTKM_EXEC_CONT vtkm::Float32 Abs(vtkm::Float32 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_32(fabs)(x); #else return std::fabs(x); #endif } -static inline VTKM_EXEC_CONT -vtkm::Float64 Abs(vtkm::Float64 x) { +static inline VTKM_EXEC_CONT vtkm::Float64 Abs(vtkm::Float64 x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(fabs)(x); #else return std::fabs(x); #endif } -template -static inline VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Abs(T x) { +template +static inline VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Abs(T x) +{ #ifdef VTKM_CUDA return VTKM_CUDA_MATH_FUNCTION_64(fabs)(static_cast(x)); #else return std::fabs(static_cast(x)); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec Abs(const vtkm::Vec &x) { - vtkm::Vec result; +template +static inline VTKM_EXEC_CONT vtkm::Vec Abs(const vtkm::Vec& x) +{ + vtkm::Vec result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::Abs(x[index]); } return result; } -template -static inline VTKM_EXEC_CONT -vtkm::Vec Abs(const vtkm::Vec &x) { - return vtkm::Vec(vtkm::Abs(x[0]), - vtkm::Abs(x[1]), - vtkm::Abs(x[2]), - vtkm::Abs(x[3])); +template +static inline VTKM_EXEC_CONT vtkm::Vec Abs(const vtkm::Vec& x) +{ + return vtkm::Vec(vtkm::Abs(x[0]), vtkm::Abs(x[1]), vtkm::Abs(x[2]), vtkm::Abs(x[3])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec Abs(const vtkm::Vec &x) { - return vtkm::Vec(vtkm::Abs(x[0]), - vtkm::Abs(x[1]), - vtkm::Abs(x[2])); +template +static inline VTKM_EXEC_CONT vtkm::Vec Abs(const vtkm::Vec& x) +{ + return vtkm::Vec(vtkm::Abs(x[0]), vtkm::Abs(x[1]), vtkm::Abs(x[2])); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec Abs(const vtkm::Vec &x) { - return vtkm::Vec(vtkm::Abs(x[0]), - vtkm::Abs(x[1])); +template +static inline VTKM_EXEC_CONT vtkm::Vec Abs(const vtkm::Vec& x) +{ + return vtkm::Vec(vtkm::Abs(x[0]), vtkm::Abs(x[1])); } /// Returns a nonzero value if \p x is negative. /// -static inline VTKM_EXEC_CONT -vtkm::Int32 SignBit(vtkm::Float32 x) { +static inline VTKM_EXEC_CONT vtkm::Int32 SignBit(vtkm::Float32 x) +{ #ifndef VTKM_CUDA using std::signbit; #endif return static_cast(signbit(x)); } -static inline VTKM_EXEC_CONT -vtkm::Int32 SignBit(vtkm::Float64 x) { +static inline VTKM_EXEC_CONT vtkm::Int32 SignBit(vtkm::Float64 x) +{ #ifndef VTKM_CUDA using std::signbit; #endif @@ -2647,40 +2469,40 @@ vtkm::Int32 SignBit(vtkm::Float64 x) { /// Returns true if \p x is less than zero, false otherwise. /// -static inline VTKM_EXEC_CONT -bool IsNegative(vtkm::Float32 x) { +static inline VTKM_EXEC_CONT bool IsNegative(vtkm::Float32 x) +{ return (vtkm::SignBit(x) != 0); } -static inline VTKM_EXEC_CONT -bool IsNegative(vtkm::Float64 x) { +static inline VTKM_EXEC_CONT bool IsNegative(vtkm::Float64 x) +{ return (vtkm::SignBit(x) != 0); } /// Copies the sign of \p y onto \p x. If \p y is positive, returns Abs(\p x). /// If \p y is negative, returns -Abs(\p x). /// -static inline VTKM_EXEC_CONT -vtkm::Float32 CopySign(vtkm::Float32 x, vtkm::Float32 y) { +static inline VTKM_EXEC_CONT vtkm::Float32 CopySign(vtkm::Float32 x, vtkm::Float32 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_32(copysign)(x,y); + return VTKM_CUDA_MATH_FUNCTION_32(copysign)(x, y); #else - return std::copysign(x,y); + return std::copysign(x, y); #endif } -static inline VTKM_EXEC_CONT -vtkm::Float64 CopySign(vtkm::Float64 x, vtkm::Float64 y) { +static inline VTKM_EXEC_CONT vtkm::Float64 CopySign(vtkm::Float64 x, vtkm::Float64 y) +{ #ifdef VTKM_CUDA - return VTKM_CUDA_MATH_FUNCTION_64(copysign)(x,y); + return VTKM_CUDA_MATH_FUNCTION_64(copysign)(x, y); #else - return std::copysign(x,y); + return std::copysign(x, y); #endif } -template -static inline VTKM_EXEC_CONT -vtkm::Vec CopySign(const vtkm::Vec &x, const vtkm::Vec &y) +template +static inline VTKM_EXEC_CONT vtkm::Vec CopySign(const vtkm::Vec& x, + const vtkm::Vec& y) { - vtkm::Vec result; + vtkm::Vec result; for (vtkm::IdComponent index = 0; index < N; index++) { result[index] = vtkm::CopySign(x[index], y[index]); diff --git a/vtkm/Matrix.h b/vtkm/Matrix.h index ad49a461b..43ff8b1fd 100644 --- a/vtkm/Matrix.h +++ b/vtkm/Matrix.h @@ -28,7 +28,8 @@ #include #include -namespace vtkm { +namespace vtkm +{ /// \brief Basic Matrix type. /// @@ -40,26 +41,29 @@ namespace vtkm { /// per-thread data structure to hold information like geometric transforms and /// tensors. /// -template -class Matrix { +template +class Matrix +{ public: typedef T ComponentType; static const vtkm::IdComponent NUM_ROWS = NumRow; static const vtkm::IdComponent NUM_COLUMNS = NumCol; VTKM_EXEC_CONT - Matrix() { } + Matrix() {} VTKM_EXEC_CONT - explicit Matrix(const ComponentType &value) - : Components(vtkm::Vec(value)) { } + explicit Matrix(const ComponentType& value) + : Components(vtkm::Vec(value)) + { + } /// Brackets are used to reference a matrix like a 2D array (i.e. /// matrix[row][column]). /// VTKM_EXEC_CONT - const vtkm::Vec & - operator[](vtkm::IdComponent rowIndex) const { + const vtkm::Vec& operator[](vtkm::IdComponent rowIndex) const + { VTKM_ASSERT(rowIndex >= 0); VTKM_ASSERT(rowIndex < NUM_ROWS); return this->Components[rowIndex]; @@ -69,8 +73,8 @@ public: /// matrix[row][column]. /// VTKM_EXEC_CONT - vtkm::Vec & - operator[](vtkm::IdComponent rowIndex) { + vtkm::Vec& operator[](vtkm::IdComponent rowIndex) + { VTKM_ASSERT(rowIndex >= 0); VTKM_ASSERT(rowIndex < NUM_ROWS); return this->Components[rowIndex]; @@ -80,8 +84,8 @@ public: /// notation i.e. matrix(row,column). /// VTKM_EXEC_CONT - const ComponentType & - operator()(vtkm::IdComponent rowIndex, vtkm::IdComponent colIndex) const { + const ComponentType& operator()(vtkm::IdComponent rowIndex, vtkm::IdComponent colIndex) const + { VTKM_ASSERT(rowIndex >= 0); VTKM_ASSERT(rowIndex < NUM_ROWS); VTKM_ASSERT(colIndex >= 0); @@ -93,8 +97,8 @@ public: /// notation i.e. matrix(row,column). /// VTKM_EXEC_CONT - ComponentType & - operator()(vtkm::IdComponent rowIndex, vtkm::IdComponent colIndex) { + ComponentType& operator()(vtkm::IdComponent rowIndex, vtkm::IdComponent colIndex) + { VTKM_ASSERT(rowIndex >= 0); VTKM_ASSERT(rowIndex < NUM_ROWS); VTKM_ASSERT(colIndex >= 0); @@ -109,10 +113,9 @@ private: /// Returns a tuple containing the given row (indexed from 0) of the given /// matrix. /// -template -VTKM_EXEC_CONT -const vtkm::Vec &MatrixGetRow( - const vtkm::Matrix &matrix, vtkm::IdComponent rowIndex) +template +VTKM_EXEC_CONT const vtkm::Vec& MatrixGetRow( + const vtkm::Matrix& matrix, vtkm::IdComponent rowIndex) { return matrix[rowIndex]; } @@ -120,10 +123,9 @@ const vtkm::Vec &MatrixGetRow( /// Returns a tuple containing the given column (indexed from 0) of the given /// matrix. Might not be as efficient as the \c MatrixGetRow function. /// -template -VTKM_EXEC_CONT -vtkm::Vec MatrixGetColumn( - const vtkm::Matrix &matrix, vtkm::IdComponent columnIndex) +template +VTKM_EXEC_CONT vtkm::Vec MatrixGetColumn(const vtkm::Matrix& matrix, + vtkm::IdComponent columnIndex) { vtkm::Vec columnValues; for (vtkm::IdComponent rowIndex = 0; rowIndex < NumRow; rowIndex++) @@ -135,22 +137,19 @@ vtkm::Vec MatrixGetColumn( /// Convenience function for setting a row of a matrix. /// -template -VTKM_EXEC_CONT -void MatrixSetRow(vtkm::Matrix &matrix, - vtkm::IdComponent rowIndex, - const vtkm::Vec &rowValues) +template +VTKM_EXEC_CONT void MatrixSetRow(vtkm::Matrix& matrix, + vtkm::IdComponent rowIndex, const vtkm::Vec& rowValues) { matrix[rowIndex] = rowValues; } /// Convenience function for setting a column of a matrix. /// -template -VTKM_EXEC_CONT -void MatrixSetColumn(vtkm::Matrix &matrix, - vtkm::IdComponent columnIndex, - const vtkm::Vec &columnValues) +template +VTKM_EXEC_CONT void MatrixSetColumn(vtkm::Matrix& matrix, + vtkm::IdComponent columnIndex, + const vtkm::Vec& columnValues) { for (vtkm::IdComponent rowIndex = 0; rowIndex < NumRow; rowIndex++) { @@ -160,27 +159,21 @@ void MatrixSetColumn(vtkm::Matrix &matrix, /// Standard matrix multiplication. /// -template -VTKM_EXEC_CONT -vtkm::Matrix MatrixMultiply( - const vtkm::Matrix &leftFactor, - const vtkm::Matrix &rightFactor) +template +VTKM_EXEC_CONT vtkm::Matrix MatrixMultiply( + const vtkm::Matrix& leftFactor, + const vtkm::Matrix& rightFactor) { - vtkm::Matrix result; + vtkm::Matrix result; for (vtkm::IdComponent rowIndex = 0; rowIndex < NumRow; rowIndex++) { for (vtkm::IdComponent colIndex = 0; colIndex < NumCol; colIndex++) { T sum = T(leftFactor(rowIndex, 0) * rightFactor(0, colIndex)); - for (vtkm::IdComponent internalIndex = 1; - internalIndex < NumInternal; - internalIndex++) + for (vtkm::IdComponent internalIndex = 1; internalIndex < NumInternal; internalIndex++) { - sum = T(sum + (leftFactor(rowIndex, internalIndex) - * rightFactor(internalIndex, colIndex))); + sum = T(sum + (leftFactor(rowIndex, internalIndex) * rightFactor(internalIndex, colIndex))); } result(rowIndex, colIndex) = sum; } @@ -190,70 +183,60 @@ vtkm::Matrix MatrixMultiply( /// Standard matrix-vector multiplication. /// -template -VTKM_EXEC_CONT -vtkm::Vec MatrixMultiply( - const vtkm::Matrix &leftFactor, - const vtkm::Vec &rightFactor) +template +VTKM_EXEC_CONT vtkm::Vec MatrixMultiply( + const vtkm::Matrix& leftFactor, const vtkm::Vec& rightFactor) { - vtkm::Vec product; + vtkm::Vec product; for (vtkm::IdComponent rowIndex = 0; rowIndex < NumRow; rowIndex++) { - product[rowIndex] = - vtkm::dot(vtkm::MatrixGetRow(leftFactor,rowIndex), rightFactor); + product[rowIndex] = vtkm::dot(vtkm::MatrixGetRow(leftFactor, rowIndex), rightFactor); } return product; } /// Standard vector-matrix multiplication /// -template -VTKM_EXEC_CONT -vtkm::Vec MatrixMultiply( - const vtkm::Vec &leftFactor, - const vtkm::Matrix &rightFactor) +template +VTKM_EXEC_CONT vtkm::Vec MatrixMultiply( + const vtkm::Vec& leftFactor, const vtkm::Matrix& rightFactor) { - vtkm::Vec product; + vtkm::Vec product; for (vtkm::IdComponent colIndex = 0; colIndex < NumCol; colIndex++) { - product[colIndex] = - vtkm::dot(leftFactor, - vtkm::MatrixGetColumn(rightFactor, colIndex)); + product[colIndex] = vtkm::dot(leftFactor, vtkm::MatrixGetColumn(rightFactor, colIndex)); } return product; } /// Returns the identity matrix. /// -template -VTKM_EXEC_CONT -vtkm::Matrix MatrixIdentity() +template +VTKM_EXEC_CONT vtkm::Matrix MatrixIdentity() { - vtkm::Matrix result(T(0)); + vtkm::Matrix result(T(0)); for (vtkm::IdComponent index = 0; index < Size; index++) { - result(index,index) = T(1.0); + result(index, index) = T(1.0); } return result; } /// Fills the given matrix with the identity matrix. /// -template -VTKM_EXEC_CONT -void MatrixIdentity(vtkm::Matrix &matrix) +template +VTKM_EXEC_CONT void MatrixIdentity(vtkm::Matrix& matrix) { - matrix = vtkm::MatrixIdentity(); + matrix = vtkm::MatrixIdentity(); } /// Returns the transpose of the given matrix. /// -template -VTKM_EXEC_CONT -vtkm::Matrix MatrixTranspose( - const vtkm::Matrix &matrix) +template +VTKM_EXEC_CONT vtkm::Matrix MatrixTranspose( + const vtkm::Matrix& matrix) { - vtkm::Matrix result; + vtkm::Matrix result; for (vtkm::IdComponent index = 0; index < NumRows; index++) { vtkm::MatrixSetColumn(result, index, vtkm::MatrixGetRow(matrix, index)); @@ -270,22 +253,19 @@ vtkm::Matrix MatrixTranspose( return result; } -namespace detail { +namespace detail +{ // Used with MatrixLUPFactor. -template -VTKM_EXEC_CONT -void MatrixLUPFactorFindPivot(vtkm::Matrix &A, - vtkm::Vec &permutation, - vtkm::IdComponent topCornerIndex, - T &inversionParity, - bool &valid) +template +VTKM_EXEC_CONT void MatrixLUPFactorFindPivot(vtkm::Matrix& A, + vtkm::Vec& permutation, + vtkm::IdComponent topCornerIndex, T& inversionParity, + bool& valid) { vtkm::IdComponent maxRowIndex = topCornerIndex; T maxValue = vtkm::Abs(A(maxRowIndex, topCornerIndex)); - for (vtkm::IdComponent rowIndex = topCornerIndex + 1; - rowIndex < Size; - rowIndex++) + for (vtkm::IdComponent rowIndex = topCornerIndex + 1; rowIndex < Size; rowIndex++) { T compareValue = vtkm::Abs(A(rowIndex, topCornerIndex)); if (maxValue < compareValue) @@ -295,15 +275,16 @@ void MatrixLUPFactorFindPivot(vtkm::Matrix &A, } } - if (maxValue < vtkm::Epsilon()) { valid = false; } + if (maxValue < vtkm::Epsilon()) + { + valid = false; + } if (maxRowIndex != topCornerIndex) { // Swap rows in matrix. - vtkm::Vec maxRow = vtkm::MatrixGetRow(A, maxRowIndex); - vtkm::MatrixSetRow(A, - maxRowIndex, - vtkm::MatrixGetRow(A,topCornerIndex)); + vtkm::Vec maxRow = vtkm::MatrixGetRow(A, maxRowIndex); + vtkm::MatrixSetRow(A, maxRowIndex, vtkm::MatrixGetRow(A, topCornerIndex)); vtkm::MatrixSetRow(A, topCornerIndex, maxRow); // Record change in permutation matrix. @@ -317,30 +298,22 @@ void MatrixLUPFactorFindPivot(vtkm::Matrix &A, } // Used with MatrixLUPFactor -template -VTKM_EXEC_CONT -void MatrixLUPFactorFindUpperTriangleElements(vtkm::Matrix &A, - vtkm::IdComponent topCornerIndex) +template +VTKM_EXEC_CONT void MatrixLUPFactorFindUpperTriangleElements(vtkm::Matrix& A, + vtkm::IdComponent topCornerIndex) { // Compute values for upper triangle on row topCornerIndex - for (vtkm::IdComponent colIndex = topCornerIndex+1; - colIndex < Size; - colIndex++) + for (vtkm::IdComponent colIndex = topCornerIndex + 1; colIndex < Size; colIndex++) { - A(topCornerIndex,colIndex) /= A(topCornerIndex,topCornerIndex); + A(topCornerIndex, colIndex) /= A(topCornerIndex, topCornerIndex); } // Update the rest of the matrix for calculations on subsequent rows - for (vtkm::IdComponent rowIndex = topCornerIndex+1; - rowIndex < Size; - rowIndex++) + for (vtkm::IdComponent rowIndex = topCornerIndex + 1; rowIndex < Size; rowIndex++) { - for (vtkm::IdComponent colIndex = topCornerIndex+1; - colIndex < Size; - colIndex++) + for (vtkm::IdComponent colIndex = topCornerIndex + 1; colIndex < Size; colIndex++) { - A(rowIndex,colIndex) -= - A(rowIndex,topCornerIndex)*A(topCornerIndex,colIndex); + A(rowIndex, colIndex) -= A(rowIndex, topCornerIndex) * A(topCornerIndex, colIndex); } } } @@ -375,12 +348,10 @@ void MatrixLUPFactorFindUpperTriangleElements(vtkm::Matrix &A, /// LUP-factorization. If the LUP-factorization succeeds, valid is set to true. /// Otherwise, valid is set to false and the result is indeterminant. /// -template -VTKM_EXEC_CONT -void MatrixLUPFactor(vtkm::Matrix &A, - vtkm::Vec &permutation, - T &inversionParity, - bool &valid) +template +VTKM_EXEC_CONT void MatrixLUPFactor(vtkm::Matrix& A, + vtkm::Vec& permutation, + T& inversionParity, bool& valid) { // Initialize permutation. for (vtkm::IdComponent index = 0; index < Size; index++) @@ -401,12 +372,10 @@ void MatrixLUPFactor(vtkm::Matrix &A, /// system Ax = b. Instead of A, this method takes in the LU and P /// matrices calculated by MatrixLUPFactor from A. The x matrix is returned. /// -template -VTKM_EXEC_CONT -vtkm::Vec -MatrixLUPSolve(const vtkm::Matrix &LU, - const vtkm::Vec &permutation, - const vtkm::Vec &b) +template +VTKM_EXEC_CONT vtkm::Vec MatrixLUPSolve( + const vtkm::Matrix& LU, const vtkm::Vec& permutation, + const vtkm::Vec& b) { // The LUP-factorization gives us PA = LU or equivalently A = inv(P)LU. // Substituting into Ax = b gives us inv(P)LUx = b or LUx = Pb. @@ -414,28 +383,28 @@ MatrixLUPSolve(const vtkm::Matrix &LU, // Substituting in the previous two equations yields Ly = Pb. // Solving Ly = Pb is easy because L is triangular and P is just a // permutation. - vtkm::Vec y; + vtkm::Vec y; for (vtkm::IdComponent rowIndex = 0; rowIndex < Size; rowIndex++) - { + { y[rowIndex] = b[permutation[rowIndex]]; // Recall that L is stored in the lower triangle of LU including diagonal. for (vtkm::IdComponent colIndex = 0; colIndex < rowIndex; colIndex++) - { - y[rowIndex] -= LU(rowIndex,colIndex)*y[colIndex]; - } - y[rowIndex] /= LU(rowIndex,rowIndex); + { + y[rowIndex] -= LU(rowIndex, colIndex) * y[colIndex]; } + y[rowIndex] /= LU(rowIndex, rowIndex); + } // Now that we have y, we can easily solve Ux = y for x. - vtkm::Vec x; - for (vtkm::IdComponent rowIndex = Size-1; rowIndex >= 0; rowIndex--) + vtkm::Vec x; + for (vtkm::IdComponent rowIndex = Size - 1; rowIndex >= 0; rowIndex--) { // Recall that U is stored in the upper triangle of LU with the diagonal // implicitly all 1's. x[rowIndex] = y[rowIndex]; - for (vtkm::IdComponent colIndex = rowIndex+1; colIndex < Size; colIndex++) + for (vtkm::IdComponent colIndex = rowIndex + 1; colIndex < Size; colIndex++) { - x[rowIndex] -= LU(rowIndex,colIndex)*x[colIndex]; + x[rowIndex] -= LU(rowIndex, colIndex) * x[colIndex]; } } @@ -447,16 +416,14 @@ MatrixLUPSolve(const vtkm::Matrix &LU, /// Solve the linear system Ax = b for x. If a single solution is found, valid /// is set to true, false otherwise. /// -template -VTKM_EXEC_CONT -vtkm::Vec SolveLinearSystem(const vtkm::Matrix &A, - const vtkm::Vec &b, - bool &valid) +template +VTKM_EXEC_CONT vtkm::Vec SolveLinearSystem(const vtkm::Matrix& A, + const vtkm::Vec& b, bool& valid) { // First, we will make an LUP-factorization to help us. - vtkm::Matrix LU = A; - vtkm::Vec permutation; - T inversionParity; // Unused. + vtkm::Matrix LU = A; + vtkm::Vec permutation; + T inversionParity; // Unused. detail::MatrixLUPFactor(LU, permutation, inversionParity, valid); // Next, use the decomposition to solve the system. @@ -466,48 +433,49 @@ vtkm::Vec SolveLinearSystem(const vtkm::Matrix &A, /// Find and return the inverse of the given matrix. If the matrix is singular, /// the inverse will not be correct and valid will be set to false. /// -template -VTKM_EXEC_CONT -vtkm::Matrix MatrixInverse(const vtkm::Matrix &A, - bool &valid) +template +VTKM_EXEC_CONT vtkm::Matrix MatrixInverse(const vtkm::Matrix& A, + bool& valid) { // First, we will make an LUP-factorization to help us. - vtkm::Matrix LU = A; - vtkm::Vec permutation; - T inversionParity; // Unused + vtkm::Matrix LU = A; + vtkm::Vec permutation; + T inversionParity; // Unused detail::MatrixLUPFactor(LU, permutation, inversionParity, valid); // We will use the decomposition to solve AX = I for X where X is // clearly the inverse of A. Our solve method only works for vectors, // so we solve for one column of invA at a time. - vtkm::Matrix invA; - vtkm::Vec ICol(T(0)); + vtkm::Matrix invA; + vtkm::Vec ICol(T(0)); for (vtkm::IdComponent colIndex = 0; colIndex < Size; colIndex++) - { + { ICol[colIndex] = 1; - vtkm::Vec invACol = detail::MatrixLUPSolve(LU, permutation, ICol); + vtkm::Vec invACol = detail::MatrixLUPSolve(LU, permutation, ICol); ICol[colIndex] = 0; vtkm::MatrixSetColumn(invA, colIndex, invACol); - } + } return invA; } /// Compute the determinant of a matrix. /// -template -VTKM_EXEC_CONT -T MatrixDeterminant(const vtkm::Matrix &A) +template +VTKM_EXEC_CONT T MatrixDeterminant(const vtkm::Matrix& A) { // First, we will make an LUP-factorization to help us. - vtkm::Matrix LU = A; - vtkm::Vec permutation; + vtkm::Matrix LU = A; + vtkm::Vec permutation; T inversionParity; bool valid; detail::MatrixLUPFactor(LU, permutation, inversionParity, valid); // If the matrix is singular, the factorization is invalid, but in that // case we know that the determinant is 0. - if (!valid) { return 0; } + if (!valid) + { + return 0; + } // The determinant is equal to the product of the diagonal of the L matrix, // possibly negated depending on the parity of the inversion. The @@ -515,35 +483,31 @@ T MatrixDeterminant(const vtkm::Matrix &A) // respectively. This sign determines whether the product should be negated. T product = inversionParity; for (vtkm::IdComponent index = 0; index < Size; index++) - { - product *= LU(index,index); - } + { + product *= LU(index, index); + } return product; } // Specializations for common small determinants. -template -VTKM_EXEC_CONT -T MatrixDeterminant(const vtkm::Matrix &A) +template +VTKM_EXEC_CONT T MatrixDeterminant(const vtkm::Matrix& A) { - return A(0,0); + return A(0, 0); } -template -VTKM_EXEC_CONT -T MatrixDeterminant(const vtkm::Matrix &A) +template +VTKM_EXEC_CONT T MatrixDeterminant(const vtkm::Matrix& A) { - return A(0,0)*A(1,1) - A(1,0)*A(0,1); + return A(0, 0) * A(1, 1) - A(1, 0) * A(0, 1); } -template -VTKM_EXEC_CONT -T MatrixDeterminant(const vtkm::Matrix &A) +template +VTKM_EXEC_CONT T MatrixDeterminant(const vtkm::Matrix& A) { - return A(0,0) * A(1,1) * A(2,2) + A(1,0) * A(2,1) * A(0,2) + - A(2,0) * A(0,1) * A(1,2) - A(0,0) * A(2,1) * A(1,2) - - A(1,0) * A(0,1) * A(2,2) - A(2,0) * A(1,1) * A(0,2); + return A(0, 0) * A(1, 1) * A(2, 2) + A(1, 0) * A(2, 1) * A(0, 2) + A(2, 0) * A(0, 1) * A(1, 2) - + A(0, 0) * A(2, 1) * A(1, 2) - A(1, 0) * A(0, 1) * A(2, 2) - A(2, 0) * A(1, 1) * A(0, 2); } //--------------------------------------------------------------------------- @@ -552,49 +516,50 @@ T MatrixDeterminant(const vtkm::Matrix &A) /// Tag used to identify 2 dimensional types (matrices). A TypeTraits class /// will typedef this class to DimensionalityTag. /// -struct TypeTraitsMatrixTag {}; +struct TypeTraitsMatrixTag +{ +}; -template -struct TypeTraits > { +template +struct TypeTraits> +{ typedef typename TypeTraits::NumericTag NumericTag; typedef TypeTraitsMatrixTag DimensionalityTag; }; /// A matrix has vector traits to implement component-wise operations. /// -template -struct VecTraits > { +template +struct VecTraits> +{ private: typedef vtkm::Matrix MatrixType; + public: typedef T ComponentType; - static const vtkm::IdComponent NUM_COMPONENTS = NumRow*NumCol; + static const vtkm::IdComponent NUM_COMPONENTS = NumRow * NumCol; typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents; typedef vtkm::VecTraitsTagSizeStatic IsSizeStatic; VTKM_EXEC_CONT - static vtkm::IdComponent GetNumberOfComponents(const MatrixType &) { - return NUM_COMPONENTS; - } + static vtkm::IdComponent GetNumberOfComponents(const MatrixType&) { return NUM_COMPONENTS; } VTKM_EXEC_CONT - static const ComponentType &GetComponent(const MatrixType &matrix, - vtkm::IdComponent component) { + static const ComponentType& GetComponent(const MatrixType& matrix, vtkm::IdComponent component) + { vtkm::IdComponent colIndex = component % NumCol; vtkm::IdComponent rowIndex = component / NumCol; - return matrix(rowIndex,colIndex); + return matrix(rowIndex, colIndex); } VTKM_EXEC_CONT - static ComponentType &GetComponent(MatrixType &matrix, - vtkm::IdComponent component) { + static ComponentType& GetComponent(MatrixType& matrix, vtkm::IdComponent component) + { vtkm::IdComponent colIndex = component % NumCol; vtkm::IdComponent rowIndex = component / NumCol; - return matrix(rowIndex,colIndex); + return matrix(rowIndex, colIndex); } VTKM_EXEC_CONT - static void SetComponent(MatrixType &matrix, - vtkm::IdComponent component, - T value) + static void SetComponent(MatrixType& matrix, vtkm::IdComponent component, T value) { GetComponent(matrix, component) = value; } @@ -605,24 +570,23 @@ public: //--------------------------------------------------------------------------- // Basic comparison operators. -template -VTKM_EXEC_CONT -bool operator==(const vtkm::Matrix &a, - const vtkm::Matrix &b) +template +VTKM_EXEC_CONT bool operator==(const vtkm::Matrix& a, + const vtkm::Matrix& b) { for (vtkm::IdComponent colIndex = 0; colIndex < NumCol; colIndex++) { for (vtkm::IdComponent rowIndex = 0; rowIndex < NumRow; rowIndex++) { - if (a(rowIndex, colIndex) != b(rowIndex, colIndex)) return false; + if (a(rowIndex, colIndex) != b(rowIndex, colIndex)) + return false; } } return true; } -template -VTKM_EXEC_CONT -bool operator!=(const vtkm::Matrix &a, - const vtkm::Matrix &b) +template +VTKM_EXEC_CONT bool operator!=(const vtkm::Matrix& a, + const vtkm::Matrix& b) { return !(a == b); } diff --git a/vtkm/NewtonsMethod.h b/vtkm/NewtonsMethod.h index e8502be76..1ecc6146c 100644 --- a/vtkm/NewtonsMethod.h +++ b/vtkm/NewtonsMethod.h @@ -23,7 +23,8 @@ #include #include -namespace vtkm { +namespace vtkm +{ /// Uses Newton's method (a.k.a. Newton-Raphson method) to solve a nonlinear /// system of equations. This function assumes that the number of variables @@ -36,30 +37,22 @@ namespace vtkm { /// returned. /// VTKM_SUPPRESS_EXEC_WARNINGS -template -VTKM_EXEC_CONT -vtkm::Vec -NewtonsMethod(JacobianFunctor jacobianEvaluator, - FunctionFunctor functionEvaluator, - vtkm::Vec desiredFunctionOutput, - vtkm::Vec initialGuess - = vtkm::Vec(ScalarType(0)), - ScalarType convergeDifference = ScalarType(1e-3), - vtkm::IdComponent maxIterations = 10) +template +VTKM_EXEC_CONT vtkm::Vec NewtonsMethod( + JacobianFunctor jacobianEvaluator, FunctionFunctor functionEvaluator, + vtkm::Vec desiredFunctionOutput, + vtkm::Vec initialGuess = vtkm::Vec(ScalarType(0)), + ScalarType convergeDifference = ScalarType(1e-3), vtkm::IdComponent maxIterations = 10) { - typedef vtkm::Vec VectorType; - typedef vtkm::Matrix MatrixType; + typedef vtkm::Vec VectorType; + typedef vtkm::Matrix MatrixType; VectorType x = initialGuess; bool converged = false; - for (vtkm::IdComponent iteration = 0; - !converged && (iteration < maxIterations); - iteration++) - { + for (vtkm::IdComponent iteration = 0; !converged && (iteration < maxIterations); iteration++) + { // For Newton's method, we solve the linear system // // Jacobian x deltaX = currentFunctionOutput - desiredFunctionOutput @@ -72,21 +65,18 @@ NewtonsMethod(JacobianFunctor jacobianEvaluator, MatrixType jacobian = jacobianEvaluator(x); VectorType currentFunctionOutput = functionEvaluator(x); - bool valid; // Ignored. + bool valid; // Ignored. VectorType deltaX = - vtkm::SolveLinearSystem( - jacobian, - currentFunctionOutput - desiredFunctionOutput, - valid); + vtkm::SolveLinearSystem(jacobian, currentFunctionOutput - desiredFunctionOutput, valid); x = x - deltaX; converged = true; for (vtkm::IdComponent index = 0; index < Size; index++) - { + { converged &= (vtkm::Abs(deltaX[index]) < convergeDifference); - } } + } // Not checking whether converged. return x; diff --git a/vtkm/Pair.h b/vtkm/Pair.h index f0fab83fb..b1467e51e 100644 --- a/vtkm/Pair.h +++ b/vtkm/Pair.h @@ -27,7 +27,8 @@ #include #include -namespace vtkm { +namespace vtkm +{ /// A \c vtkm::Pair is essentially the same as an STL pair object except that /// the methods (constructors and operators) are defined to work in both the @@ -64,37 +65,50 @@ struct Pair SecondType second; VTKM_EXEC_CONT - Pair() : first(), second() { } + Pair() + : first() + , second() + { + } VTKM_EXEC_CONT - Pair(const FirstType &firstSrc, const SecondType &secondSrc) - : first(firstSrc), second(secondSrc) { } + Pair(const FirstType& firstSrc, const SecondType& secondSrc) + : first(firstSrc) + , second(secondSrc) + { + } template - VTKM_EXEC_CONT - Pair(const vtkm::Pair &src) - : first(src.first), second(src.second) { } + VTKM_EXEC_CONT Pair(const vtkm::Pair& src) + : first(src.first) + , second(src.second) + { + } template - VTKM_EXEC_CONT - Pair(const std::pair &src) - : first(src.first), second(src.second) { } + VTKM_EXEC_CONT Pair(const std::pair& src) + : first(src.first) + , second(src.second) + { + } VTKM_EXEC_CONT - vtkm::Pair & - operator=(const vtkm::Pair &src) { + vtkm::Pair& operator=(const vtkm::Pair& src) + { this->first = src.first; this->second = src.second; return *this; } VTKM_EXEC_CONT - bool operator==(const vtkm::Pair &other) const { + bool operator==(const vtkm::Pair& other) const + { return ((this->first == other.first) && (this->second == other.second)); } VTKM_EXEC_CONT - bool operator!=(const vtkm::Pair &other) const { + bool operator!=(const vtkm::Pair& other) const + { return !(*this == other); } @@ -102,54 +116,46 @@ struct Pair /// first are equal. /// VTKM_EXEC_CONT - bool operator<(const vtkm::Pair &other) const { - return ((this->first < other.first) - || (!(other.first < this->first) && (this->second < other.second))); + bool operator<(const vtkm::Pair& other) const + { + return ((this->first < other.first) || + (!(other.first < this->first) && (this->second < other.second))); } /// Tests ordering on the first object, and then on the second object if the /// first are equal. /// VTKM_EXEC_CONT - bool operator>(const vtkm::Pair &other) const { - return (other < *this); - } + bool operator>(const vtkm::Pair& other) const { return (other < *this); } /// Tests ordering on the first object, and then on the second object if the /// first are equal. /// VTKM_EXEC_CONT - bool operator<=(const vtkm::Pair &other) const { - return !(other < *this); - } + bool operator<=(const vtkm::Pair& other) const { return !(other < *this); } /// Tests ordering on the first object, and then on the second object if the /// first are equal. /// VTKM_EXEC_CONT - bool operator>=(const vtkm::Pair &other) const { - return !(*this < other); - } + bool operator>=(const vtkm::Pair& other) const { return !(*this < other); } }; /// Pairwise Add. /// This is done by adding the two objects separately. /// Useful for Reduce operation on a zipped array -template -VTKM_EXEC_CONT -vtkm::Pair operator+(const vtkm::Pair& a, const vtkm::Pair &b) +template +VTKM_EXEC_CONT vtkm::Pair operator+(const vtkm::Pair& a, const vtkm::Pair& b) { - return vtkm::Pair(a.first + b.first, a.second + b.second); + return vtkm::Pair(a.first + b.first, a.second + b.second); } template -VTKM_EXEC_CONT -vtkm::Pair make_Pair(const T1 &firstSrc, const T2 &secondSrc) +VTKM_EXEC_CONT vtkm::Pair make_Pair(const T1& firstSrc, const T2& secondSrc) { - return vtkm::Pair(firstSrc, secondSrc); + return vtkm::Pair(firstSrc, secondSrc); } - } // namespace vtkm #endif //vtk_m_Pair_h diff --git a/vtkm/Range.h b/vtkm/Range.h index 27a4843f8..e6dbfff12 100644 --- a/vtkm/Range.h +++ b/vtkm/Range.h @@ -25,7 +25,8 @@ #include #include -namespace vtkm { +namespace vtkm +{ /// \brief Represent a continuous scalar range of values. /// @@ -42,16 +43,21 @@ struct Range vtkm::Float64 Max; VTKM_EXEC_CONT - Range() : Min(vtkm::Infinity64()), Max(vtkm::NegativeInfinity64()) { } + Range() + : Min(vtkm::Infinity64()) + , Max(vtkm::NegativeInfinity64()) + { + } - template - VTKM_EXEC_CONT - Range(const T1 &min, const T2 &max) - : Min(static_cast(min)), Max(static_cast(max)) - { } + template + VTKM_EXEC_CONT Range(const T1& min, const T2& max) + : Min(static_cast(min)) + , Max(static_cast(max)) + { + } VTKM_EXEC_CONT - const vtkm::Range &operator=(const vtkm::Range &src) + const vtkm::Range& operator=(const vtkm::Range& src) { this->Min = src.Min; this->Max = src.Max; @@ -68,10 +74,7 @@ struct Range /// are equal then true is returned. /// VTKM_EXEC_CONT - bool IsNonEmpty() const - { - return (this->Min <= this->Max); - } + bool IsNonEmpty() const { return (this->Min <= this->Max); } /// \b Determines if a value is within the range. /// @@ -79,9 +82,8 @@ struct Range /// otherwise. \c Contains treats the min and max as inclusive. That is, if /// the value is exactly the min or max, true is returned. /// - template - VTKM_EXEC_CONT - bool Contains(const T &value) const + template + VTKM_EXEC_CONT bool Contains(const T& value) const { return ((this->Min <= static_cast(value)) && (this->Max >= static_cast(value))); @@ -115,7 +117,7 @@ struct Range { if (this->IsNonEmpty()) { - return 0.5*(this->Max + this->Min); + return 0.5 * (this->Max + this->Min); } else { @@ -129,9 +131,8 @@ struct Range /// given value. If the range already includes this value, then nothing is /// done. /// - template - VTKM_EXEC_CONT - void Include(const T &value) + template + VTKM_EXEC_CONT void Include(const T& value) { this->Min = vtkm::Min(this->Min, static_cast(value)); this->Max = vtkm::Max(this->Max, static_cast(value)); @@ -143,7 +144,7 @@ struct Range /// of another range. Esentially it is the union of the two ranges. /// VTKM_EXEC_CONT - void Include(const vtkm::Range &range) + void Include(const vtkm::Range& range) { this->Include(range.Min); this->Include(range.Max); @@ -154,7 +155,7 @@ struct Range /// This is a nondestructive form of \c Include. /// VTKM_EXEC_CONT - vtkm::Range Union(const vtkm::Range &otherRange) const + vtkm::Range Union(const vtkm::Range& otherRange) const { vtkm::Range unionRange(*this); unionRange.Include(otherRange); @@ -164,19 +165,16 @@ struct Range /// \b Operator for union /// VTKM_EXEC_CONT - vtkm::Range operator+(const vtkm::Range &otherRange) const - { - return this->Union(otherRange); - } + vtkm::Range operator+(const vtkm::Range& otherRange) const { return this->Union(otherRange); } VTKM_EXEC_CONT - bool operator==(const vtkm::Range &otherRange) const + bool operator==(const vtkm::Range& otherRange) const { return ((this->Min == otherRange.Min) && (this->Max == otherRange.Max)); } VTKM_EXEC_CONT - bool operator!=(const vtkm::Range &otherRange) const + bool operator!=(const vtkm::Range& otherRange) const { return ((this->Min != otherRange.Min) || (this->Max != otherRange.Max)); } @@ -186,8 +184,7 @@ struct Range /// Helper function for printing ranges during testing /// -static inline VTKM_CONT -std::ostream &operator<<(std::ostream &stream, const vtkm::Range &range) +static inline VTKM_CONT std::ostream& operator<<(std::ostream& stream, const vtkm::Range& range) { return stream << "[" << range.Min << ".." << range.Max << "]"; } diff --git a/vtkm/StaticAssert.h b/vtkm/StaticAssert.h index 5d15f69b3..33beda831 100644 --- a/vtkm/StaticAssert.h +++ b/vtkm/StaticAssert.h @@ -23,10 +23,8 @@ #include #include -#define VTKM_STATIC_ASSERT(condition) \ - static_assert( (condition), "Failed static assert: " #condition) -#define VTKM_STATIC_ASSERT_MSG(condition, message) \ - static_assert( (condition), message) - +#define VTKM_STATIC_ASSERT(condition) \ + static_assert((condition), "Failed static assert: " #condition) +#define VTKM_STATIC_ASSERT_MSG(condition, message) static_assert((condition), message) #endif //vtk_m_StaticAssert_h diff --git a/vtkm/TopologyElementTag.h b/vtkm/TopologyElementTag.h index 21582ada9..540b1a50e 100644 --- a/vtkm/TopologyElementTag.h +++ b/vtkm/TopologyElementTag.h @@ -22,7 +22,8 @@ #include -namespace vtkm { +namespace vtkm +{ /// \brief A tag used to identify the cell elements in a topology. /// @@ -30,7 +31,9 @@ namespace vtkm { /// example, a 3D mesh has points, edges, faces, and cells. Each of these is an /// example of a topology element and has its own tag. /// -struct TopologyElementTagCell { }; +struct TopologyElementTagCell +{ +}; /// \brief A tag used to identify the point elements in a topology. /// @@ -38,7 +41,9 @@ struct TopologyElementTagCell { }; /// example, a 3D mesh has points, edges, faces, and cells. Each of these is an /// example of a topology element and has its own tag. /// -struct TopologyElementTagPoint { }; +struct TopologyElementTagPoint +{ +}; /// \brief A tag used to identify the edge elements in a topology. /// @@ -46,7 +51,9 @@ struct TopologyElementTagPoint { }; /// example, a 3D mesh has points, edges, faces, and cells. Each of these is an /// example of a topology element and has its own tag. /// -struct TopologyElementTagEdge { }; +struct TopologyElementTagEdge +{ +}; /// \brief A tag used to identify the face elements in a topology. /// @@ -54,10 +61,12 @@ struct TopologyElementTagEdge { }; /// example, a 3D mesh has points, edges, faces, and cells. Each of these is an /// example of a topology element and has its own tag. /// -struct TopologyElementTagFace { }; +struct TopologyElementTagFace +{ +}; - -namespace internal { +namespace internal +{ /// Checks to see if the given object is a topology element tag.This check is /// compatible with C++11 type_traits. @@ -65,35 +74,34 @@ namespace internal { /// std::false_type. Both of these have a typedef named value with the /// respective boolean value. /// -template +template struct TopologyElementTagCheck : std::false_type { }; -template<> +template <> struct TopologyElementTagCheck : std::true_type { }; -template<> +template <> struct TopologyElementTagCheck : std::true_type { }; -template<> +template <> struct TopologyElementTagCheck : std::true_type { }; -template<> +template <> struct TopologyElementTagCheck : std::true_type { }; - -#define VTKM_IS_TOPOLOGY_ELEMENT_TAG(type) \ - static_assert( ::vtkm::internal::TopologyElementTagCheck::value, \ - "Invalid Topology Element Tag being used") +#define VTKM_IS_TOPOLOGY_ELEMENT_TAG(type) \ + static_assert(::vtkm::internal::TopologyElementTagCheck::value, \ + "Invalid Topology Element Tag being used") } // namespace internal diff --git a/vtkm/Transform3D.h b/vtkm/Transform3D.h index 6cfd9757b..28f60a3be 100644 --- a/vtkm/Transform3D.h +++ b/vtkm/Transform3D.h @@ -28,7 +28,8 @@ #include #include -namespace vtkm { +namespace vtkm +{ /// \brief Transform a 3D point by a transformation matrix. /// @@ -41,16 +42,14 @@ namespace vtkm { /// (such as translate, scale, and rotate), but not for perspective /// transformations. /// -template -VTKM_EXEC_CONT -vtkm::Vec Transform3DPoint(const vtkm::Matrix &matrix, - const vtkm::Vec &point) +template +VTKM_EXEC_CONT vtkm::Vec Transform3DPoint(const vtkm::Matrix& matrix, + const vtkm::Vec& point) { - vtkm::Vec homogeneousPoint(point[0], point[1], point[2], T(1)); - return vtkm::Vec( - vtkm::dot(vtkm::MatrixGetRow(matrix,0), homogeneousPoint), - vtkm::dot(vtkm::MatrixGetRow(matrix,1), homogeneousPoint), - vtkm::dot(vtkm::MatrixGetRow(matrix,2), homogeneousPoint)); + vtkm::Vec homogeneousPoint(point[0], point[1], point[2], T(1)); + return vtkm::Vec(vtkm::dot(vtkm::MatrixGetRow(matrix, 0), homogeneousPoint), + vtkm::dot(vtkm::MatrixGetRow(matrix, 1), homogeneousPoint), + vtkm::dot(vtkm::MatrixGetRow(matrix, 2), homogeneousPoint)); } /// \brief Transform a 3D point by a transformation matrix with perspective. @@ -62,17 +61,15 @@ vtkm::Vec Transform3DPoint(const vtkm::Matrix &matrix, /// transformed homogeneous coordiante. This makes it applicable for perspective /// transformations, but requires some more computations. /// -template -VTKM_EXEC_CONT -vtkm::Vec Transform3DPointPerspective(const vtkm::Matrix &matrix, - const vtkm::Vec &point) +template +VTKM_EXEC_CONT vtkm::Vec Transform3DPointPerspective(const vtkm::Matrix& matrix, + const vtkm::Vec& point) { - vtkm::Vec homogeneousPoint(point[0], point[1], point[2], T(1)); - T inverseW = 1/vtkm::dot(vtkm::MatrixGetRow(matrix,3), homogeneousPoint); - return vtkm::Vec( - vtkm::dot(vtkm::MatrixGetRow(matrix,0), homogeneousPoint)*inverseW, - vtkm::dot(vtkm::MatrixGetRow(matrix,1), homogeneousPoint)*inverseW, - vtkm::dot(vtkm::MatrixGetRow(matrix,2), homogeneousPoint)*inverseW); + vtkm::Vec homogeneousPoint(point[0], point[1], point[2], T(1)); + T inverseW = 1 / vtkm::dot(vtkm::MatrixGetRow(matrix, 3), homogeneousPoint); + return vtkm::Vec(vtkm::dot(vtkm::MatrixGetRow(matrix, 0), homogeneousPoint) * inverseW, + vtkm::dot(vtkm::MatrixGetRow(matrix, 1), homogeneousPoint) * inverseW, + vtkm::dot(vtkm::MatrixGetRow(matrix, 2), homogeneousPoint) * inverseW); } /// \brief Transform a 3D vector by a transformation matrix. @@ -81,17 +78,13 @@ vtkm::Vec Transform3DPointPerspective(const vtkm::Matrix &matrix, /// transformed by the given matrix in homogeneous coordinates. Unlike points, /// vectors do not get translated. /// -template -VTKM_EXEC_CONT -vtkm::Vec Transform3DVector(const vtkm::Matrix &matrix, - const vtkm::Vec &vector) +template +VTKM_EXEC_CONT vtkm::Vec Transform3DVector(const vtkm::Matrix& matrix, + const vtkm::Vec& vector) { - vtkm::Vec homogeneousVector(vector[0], vector[1], vector[2], T(0)); + vtkm::Vec homogeneousVector(vector[0], vector[1], vector[2], T(0)); homogeneousVector = vtkm::MatrixMultiply(matrix, homogeneousVector); - return vtkm::Vec( - homogeneousVector[0], - homogeneousVector[1], - homogeneousVector[2]); + return vtkm::Vec(homogeneousVector[0], homogeneousVector[1], homogeneousVector[2]); } /// \brief Returns a scale matrix. @@ -99,16 +92,15 @@ vtkm::Vec Transform3DVector(const vtkm::Matrix &matrix, /// Given a scale factor for the x, y, and z directions, returns a /// transformation matrix for those scales. /// -template -VTKM_EXEC_CONT -vtkm::Matrix -Transform3DScale(const T &scaleX, const T &scaleY, const T &scaleZ) +template +VTKM_EXEC_CONT vtkm::Matrix Transform3DScale(const T& scaleX, const T& scaleY, + const T& scaleZ) { - vtkm::Matrix scaleMatrix(T(0)); - scaleMatrix(0,0) = scaleX; - scaleMatrix(1,1) = scaleY; - scaleMatrix(2,2) = scaleZ; - scaleMatrix(3,3) = T(1); + vtkm::Matrix scaleMatrix(T(0)); + scaleMatrix(0, 0) = scaleX; + scaleMatrix(1, 1) = scaleY; + scaleMatrix(2, 2) = scaleZ; + scaleMatrix(3, 3) = T(1); return scaleMatrix; } @@ -117,9 +109,8 @@ Transform3DScale(const T &scaleX, const T &scaleY, const T &scaleZ) /// Given a scale factor for the x, y, and z directions (defined in a Vec), /// returns a transformation matrix for those scales. /// -template -VTKM_EXEC_CONT -vtkm::Matrix Transform3DScale(const vtkm::Vec &scaleVec) +template +VTKM_EXEC_CONT vtkm::Matrix Transform3DScale(const vtkm::Vec& scaleVec) { return vtkm::Transform3DScale(scaleVec[0], scaleVec[1], scaleVec[2]); } @@ -129,29 +120,26 @@ vtkm::Matrix Transform3DScale(const vtkm::Vec &scaleVec) /// Given a uniform scale factor, returns a transformation matrix for those /// scales. /// -template -VTKM_EXEC_CONT -vtkm::Matrix Transform3DScale(const T &scale) +template +VTKM_EXEC_CONT vtkm::Matrix Transform3DScale(const T& scale) { return vtkm::Transform3DScale(scale, scale, scale); } /// \brief Returns a translation matrix. /// -template -VTKM_EXEC_CONT -vtkm::Matrix Transform3DTranslate(const T &x, const T &y, const T &z) +template +VTKM_EXEC_CONT vtkm::Matrix Transform3DTranslate(const T& x, const T& y, const T& z) { - vtkm::Matrix translateMatrix; + vtkm::Matrix translateMatrix; vtkm::MatrixIdentity(translateMatrix); - translateMatrix(0,3) = x; - translateMatrix(1,3) = y; - translateMatrix(2,3) = z; + translateMatrix(0, 3) = x; + translateMatrix(1, 3) = y; + translateMatrix(2, 3) = z; return translateMatrix; } -template -VTKM_EXEC_CONT -vtkm::Matrix Transform3DTranslate(const vtkm::Vec &v) +template +VTKM_EXEC_CONT vtkm::Matrix Transform3DTranslate(const vtkm::Vec& v) { return vtkm::Transform3DTranslate(v[0], v[1], v[2]); } @@ -163,54 +151,51 @@ vtkm::Matrix Transform3DTranslate(const vtkm::Vec &v) /// follows the right-hand rule, so if the vector points toward the user, the /// rotation will be counterclockwise. /// -template -VTKM_EXEC_CONT -vtkm::Matrix Transform3DRotate(T angleDegrees, - const vtkm::Vec &axisOfRotation) +template +VTKM_EXEC_CONT vtkm::Matrix Transform3DRotate(T angleDegrees, + const vtkm::Vec& axisOfRotation) { - T angleRadians = static_cast(vtkm::Pi()/180)*angleDegrees; - const vtkm::Vec normAxis = vtkm::Normal(axisOfRotation); + T angleRadians = static_cast(vtkm::Pi() / 180) * angleDegrees; + const vtkm::Vec normAxis = vtkm::Normal(axisOfRotation); T sinAngle = vtkm::Sin(angleRadians); T cosAngle = vtkm::Cos(angleRadians); - vtkm::Matrix matrix; + vtkm::Matrix matrix; - matrix(0,0) = normAxis[0]*normAxis[0]*(1-cosAngle) + cosAngle; - matrix(0,1) = normAxis[0]*normAxis[1]*(1-cosAngle) - normAxis[2]*sinAngle; - matrix(0,2) = normAxis[0]*normAxis[2]*(1-cosAngle) + normAxis[1]*sinAngle; - matrix(0,3) = T(0); + matrix(0, 0) = normAxis[0] * normAxis[0] * (1 - cosAngle) + cosAngle; + matrix(0, 1) = normAxis[0] * normAxis[1] * (1 - cosAngle) - normAxis[2] * sinAngle; + matrix(0, 2) = normAxis[0] * normAxis[2] * (1 - cosAngle) + normAxis[1] * sinAngle; + matrix(0, 3) = T(0); - matrix(1,0) = normAxis[1]*normAxis[0]*(1-cosAngle) + normAxis[2]*sinAngle; - matrix(1,1) = normAxis[1]*normAxis[1]*(1-cosAngle) + cosAngle; - matrix(1,2) = normAxis[1]*normAxis[2]*(1-cosAngle) - normAxis[0]*sinAngle; - matrix(1,3) = T(0); + matrix(1, 0) = normAxis[1] * normAxis[0] * (1 - cosAngle) + normAxis[2] * sinAngle; + matrix(1, 1) = normAxis[1] * normAxis[1] * (1 - cosAngle) + cosAngle; + matrix(1, 2) = normAxis[1] * normAxis[2] * (1 - cosAngle) - normAxis[0] * sinAngle; + matrix(1, 3) = T(0); - matrix(2,0) = normAxis[2]*normAxis[0]*(1-cosAngle) - normAxis[1]*sinAngle; - matrix(2,1) = normAxis[2]*normAxis[1]*(1-cosAngle) + normAxis[0]*sinAngle; - matrix(2,2) = normAxis[2]*normAxis[2]*(1-cosAngle) + cosAngle; - matrix(2,3) = T(0); + matrix(2, 0) = normAxis[2] * normAxis[0] * (1 - cosAngle) - normAxis[1] * sinAngle; + matrix(2, 1) = normAxis[2] * normAxis[1] * (1 - cosAngle) + normAxis[0] * sinAngle; + matrix(2, 2) = normAxis[2] * normAxis[2] * (1 - cosAngle) + cosAngle; + matrix(2, 3) = T(0); - matrix(3,0) = T(0); - matrix(3,1) = T(0); - matrix(3,2) = T(0); - matrix(3,3) = T(1); + matrix(3, 0) = T(0); + matrix(3, 1) = T(0); + matrix(3, 2) = T(0); + matrix(3, 3) = T(1); return matrix; } -template -VTKM_EXEC_CONT -vtkm::Matrix Transform3DRotate(T angleDegrees, T x, T y, T z) +template +VTKM_EXEC_CONT vtkm::Matrix Transform3DRotate(T angleDegrees, T x, T y, T z) { - return vtkm::Transform3DRotate(angleDegrees, vtkm::Vec(x,y,z)); + return vtkm::Transform3DRotate(angleDegrees, vtkm::Vec(x, y, z)); } /// \brief Returns a rotation matrix. /// /// Returns a transformation matrix that rotates around the x axis. /// -template -VTKM_EXEC_CONT -vtkm::Matrix Transform3DRotateX(T angleDegrees) +template +VTKM_EXEC_CONT vtkm::Matrix Transform3DRotateX(T angleDegrees) { return vtkm::Transform3DRotate(angleDegrees, T(1), T(0), T(0)); } @@ -219,9 +204,8 @@ vtkm::Matrix Transform3DRotateX(T angleDegrees) /// /// Returns a transformation matrix that rotates around the y axis. /// -template -VTKM_EXEC_CONT -vtkm::Matrix Transform3DRotateY(T angleDegrees) +template +VTKM_EXEC_CONT vtkm::Matrix Transform3DRotateY(T angleDegrees) { return vtkm::Transform3DRotate(angleDegrees, T(0), T(1), T(0)); } @@ -230,9 +214,8 @@ vtkm::Matrix Transform3DRotateY(T angleDegrees) /// /// Returns a transformation matrix that rotates around the z axis. /// -template -VTKM_EXEC_CONT -vtkm::Matrix Transform3DRotateZ(T angleDegrees) +template +VTKM_EXEC_CONT vtkm::Matrix Transform3DRotateZ(T angleDegrees) { return vtkm::Transform3DRotate(angleDegrees, T(0), T(0), T(1)); } diff --git a/vtkm/TypeTraits.h b/vtkm/TypeTraits.h index ae4ed58b1..5426aff97 100644 --- a/vtkm/TypeTraits.h +++ b/vtkm/TypeTraits.h @@ -22,42 +22,52 @@ #include -namespace vtkm { +namespace vtkm +{ /// Tag used to identify types that aren't Real, Integer, Scalar or Vector. /// -struct TypeTraitsUnknownTag {}; +struct TypeTraitsUnknownTag +{ +}; /// Tag used to identify types that store real (floating-point) numbers. A /// TypeTraits class will typedef this class to NumericTag if it stores real /// numbers (or vectors of real numbers). /// -struct TypeTraitsRealTag {}; +struct TypeTraitsRealTag +{ +}; /// Tag used to identify types that store integer numbers. A TypeTraits class /// will typedef this class to NumericTag if it stores integer numbers (or /// vectors of integers). /// -struct TypeTraitsIntegerTag {}; +struct TypeTraitsIntegerTag +{ +}; /// Tag used to identify 0 dimensional types (scalars). Scalars can also be /// treated like vectors when used with VecTraits. A TypeTraits class will /// typedef this class to DimensionalityTag. /// -struct TypeTraitsScalarTag {}; +struct TypeTraitsScalarTag +{ +}; /// Tag used to identify 1 dimensional types (vectors). A TypeTraits class will /// typedef this class to DimensionalityTag. /// -struct TypeTraitsVectorTag {}; - +struct TypeTraitsVectorTag +{ +}; /// The TypeTraits class provides helpful compile-time information about the /// basic types used in VTKm (and a few others for convienience). The majority /// of TypeTraits contents are typedefs to tags that can be used to easily /// override behavior of called functions. /// -template +template class TypeTraits { public: @@ -77,27 +87,32 @@ public: // Const types should have the same traits as their non-const counterparts. // -template +template struct TypeTraits : TypeTraits -{ }; +{ +}; -#define VTKM_BASIC_REAL_TYPE(T) \ - template<> struct TypeTraits { \ - typedef TypeTraitsRealTag NumericTag; \ - typedef TypeTraitsScalarTag DimensionalityTag; \ - VTKM_EXEC_CONT static T ZeroInitialization() { return T(); } \ +#define VTKM_BASIC_REAL_TYPE(T) \ + template <> \ + struct TypeTraits \ + { \ + typedef TypeTraitsRealTag NumericTag; \ + typedef TypeTraitsScalarTag DimensionalityTag; \ + VTKM_EXEC_CONT static T ZeroInitialization() { return T(); } \ }; -#define VTKM_BASIC_INTEGER_TYPE(T) \ - template<> struct TypeTraits< T > { \ - typedef TypeTraitsIntegerTag NumericTag; \ - typedef TypeTraitsScalarTag DimensionalityTag; \ - VTKM_EXEC_CONT static T ZeroInitialization() \ - { \ - typedef T ReturnType; \ - return ReturnType(); \ - } \ - }; \ +#define VTKM_BASIC_INTEGER_TYPE(T) \ + template <> \ + struct TypeTraits \ + { \ + typedef TypeTraitsIntegerTag NumericTag; \ + typedef TypeTraitsScalarTag DimensionalityTag; \ + VTKM_EXEC_CONT static T ZeroInitialization() \ + { \ + typedef T ReturnType; \ + return ReturnType(); \ + } \ + }; /// Traits for basic C++ types. /// @@ -117,64 +132,61 @@ VTKM_BASIC_INTEGER_TYPE(unsigned long) VTKM_BASIC_INTEGER_TYPE(long long) VTKM_BASIC_INTEGER_TYPE(unsigned long long) - #undef VTKM_BASIC_REAL_TYPE #undef VTKM_BASIC_INTEGER_TYPE /// Traits for Vec types. /// -template -struct TypeTraits > +template +struct TypeTraits> { typedef typename vtkm::TypeTraits::NumericTag NumericTag; typedef TypeTraitsVectorTag DimensionalityTag; VTKM_EXEC_CONT - static vtkm::Vec ZeroInitialization() + static vtkm::Vec ZeroInitialization() { - return vtkm::Vec(vtkm::TypeTraits::ZeroInitialization()); + return vtkm::Vec(vtkm::TypeTraits::ZeroInitialization()); } }; /// Traits for VecCConst types. /// -template -struct TypeTraits > +template +struct TypeTraits> { using NumericTag = typename vtkm::TypeTraits::NumericTag; using DimensionalityTag = TypeTraitsVectorTag; VTKM_EXEC_CONT - static vtkm::VecCConst ZeroInitialization() - { return vtkm::VecCConst(); } + static vtkm::VecCConst ZeroInitialization() { return vtkm::VecCConst(); } }; /// Traits for VecC types. /// -template -struct TypeTraits > +template +struct TypeTraits> { using NumericTag = typename vtkm::TypeTraits::NumericTag; using DimensionalityTag = TypeTraitsVectorTag; VTKM_EXEC_CONT - static vtkm::VecC ZeroInitialization() - { return vtkm::VecC(); } + static vtkm::VecC ZeroInitialization() { return vtkm::VecC(); } }; /// \brief Traits for Pair types. /// -template -struct TypeTraits > +template +struct TypeTraits> { typedef TypeTraitsUnknownTag NumericTag; typedef TypeTraitsScalarTag DimensionalityTag; VTKM_EXEC_CONT - static vtkm::Pair ZeroInitialization() + static vtkm::Pair ZeroInitialization() { - return vtkm::Pair(TypeTraits::ZeroInitialization(), - TypeTraits::ZeroInitialization()); + return vtkm::Pair(TypeTraits::ZeroInitialization(), + TypeTraits::ZeroInitialization()); } }; diff --git a/vtkm/Types.h b/vtkm/Types.h index 24957e339..29711f97b 100644 --- a/vtkm/Types.h +++ b/vtkm/Types.h @@ -81,7 +81,8 @@ * */ -namespace vtkm { +namespace vtkm +{ //***************************************************************************** // Typedefs for basic types. //***************************************************************************** @@ -168,7 +169,8 @@ typedef vtkm::Float32 FloatDefault; #endif //VTKM_USE_DOUBLE_PRECISION -namespace internal { +namespace internal +{ //----------------------------------------------------------------------------- @@ -182,9 +184,8 @@ struct NullType template struct VecComponentWiseUnaryOperation { - template - VTKM_EXEC_CONT - T operator()(const T &v, const UnaryOpType &unaryOp) const + template + VTKM_EXEC_CONT T operator()(const T& v, const UnaryOpType& unaryOp) const { T result; for (vtkm::IdComponent i = 0; i < Size; ++i) @@ -195,92 +196,90 @@ struct VecComponentWiseUnaryOperation } }; -template<> +template <> struct VecComponentWiseUnaryOperation<1> { - template - VTKM_EXEC_CONT - T operator()(const T &v, const UnaryOpType &unaryOp) const + template + VTKM_EXEC_CONT T operator()(const T& v, const UnaryOpType& unaryOp) const { return T(unaryOp(v[0])); } }; -template<> +template <> struct VecComponentWiseUnaryOperation<2> { - template - VTKM_EXEC_CONT - T operator()(const T &v, const UnaryOpType &unaryOp) const + template + VTKM_EXEC_CONT T operator()(const T& v, const UnaryOpType& unaryOp) const { return T(unaryOp(v[0]), unaryOp(v[1])); } }; -template<> +template <> struct VecComponentWiseUnaryOperation<3> { - template - VTKM_EXEC_CONT - T operator()(const T &v, const UnaryOpType &unaryOp) const + template + VTKM_EXEC_CONT T operator()(const T& v, const UnaryOpType& unaryOp) const { return T(unaryOp(v[0]), unaryOp(v[1]), unaryOp(v[2])); } }; -template<> +template <> struct VecComponentWiseUnaryOperation<4> { - template - VTKM_EXEC_CONT - T operator()(const T &v, const UnaryOpType &unaryOp) const + template + VTKM_EXEC_CONT T operator()(const T& v, const UnaryOpType& unaryOp) const { return T(unaryOp(v[0]), unaryOp(v[1]), unaryOp(v[2]), unaryOp(v[3])); } }; -template +template struct BindLeftBinaryOp { // Warning: a reference. const T& LeftValue; const BinaryOpType BinaryOp; VTKM_EXEC_CONT - BindLeftBinaryOp(const T &leftValue, BinaryOpType binaryOp = BinaryOpType()) - : LeftValue(leftValue), BinaryOp(binaryOp) { } - - template - VTKM_EXEC_CONT - ReturnT operator()(const RightT &rightValue) const + BindLeftBinaryOp(const T& leftValue, BinaryOpType binaryOp = BinaryOpType()) + : LeftValue(leftValue) + , BinaryOp(binaryOp) { - return static_cast(this->BinaryOp(this->LeftValue, - static_cast(rightValue))); + } + + template + VTKM_EXEC_CONT ReturnT operator()(const RightT& rightValue) const + { + return static_cast(this->BinaryOp(this->LeftValue, static_cast(rightValue))); } private: - void operator=(const BindLeftBinaryOp &) = delete; + void operator=(const BindLeftBinaryOp&) = delete; }; -template +template struct BindRightBinaryOp { // Warning: a reference. const T& RightValue; const BinaryOpType BinaryOp; VTKM_EXEC_CONT - BindRightBinaryOp(const T &rightValue, BinaryOpType binaryOp = BinaryOpType()) - : RightValue(rightValue), BinaryOp(binaryOp) { } - - template - VTKM_EXEC_CONT - ReturnT operator()(const LeftT &leftValue) const + BindRightBinaryOp(const T& rightValue, BinaryOpType binaryOp = BinaryOpType()) + : RightValue(rightValue) + , BinaryOp(binaryOp) { - return static_cast(this->BinaryOp(static_cast(leftValue), - this->RightValue)); + } + + template + VTKM_EXEC_CONT ReturnT operator()(const LeftT& leftValue) const + { + return static_cast(this->BinaryOp(static_cast(leftValue), this->RightValue)); } private: - void operator=(const BindRightBinaryOp &) = delete; + void operator=(const BindRightBinaryOp&) = delete; }; } // namespace internal @@ -297,8 +296,8 @@ private: #endif // gcc || clang struct Add { - template - VTKM_EXEC_CONT T operator()(const T &a, const T &b) const + template + VTKM_EXEC_CONT T operator()(const T& a, const T& b) const { return T(a + b); } @@ -306,8 +305,8 @@ struct Add struct Subtract { - template - VTKM_EXEC_CONT T operator()(const T &a, const T &b) const + template + VTKM_EXEC_CONT T operator()(const T& a, const T& b) const { return T(a - b); } @@ -315,8 +314,8 @@ struct Subtract struct Multiply { - template - VTKM_EXEC_CONT T operator()(const T &a, const T &b) const + template + VTKM_EXEC_CONT T operator()(const T& a, const T& b) const { return T(a * b); } @@ -324,8 +323,8 @@ struct Multiply struct Divide { - template - VTKM_EXEC_CONT T operator()(const T &a, const T &b) const + template + VTKM_EXEC_CONT T operator()(const T& a, const T& b) const { return T(a / b); } @@ -333,8 +332,8 @@ struct Divide struct Negate { - template - VTKM_EXEC_CONT T operator()(const T &x) const + template + VTKM_EXEC_CONT T operator()(const T& x) const { return T(-x); } @@ -350,13 +349,14 @@ struct Negate template class VTKM_ALWAYS_EXPORT Vec; -template +template class VTKM_ALWAYS_EXPORTVecC; -template +template class VTKM_ALWAYS_EXPORT VecCConst; -namespace detail { +namespace detail +{ /// Base implementation of all Vec and VecC classes. /// @@ -374,8 +374,8 @@ namespace detail { #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" -#endif // gcc || clang -#endif // use cuda < 8 +#endif // gcc || clang +#endif // use cuda < 8 template class VTKM_ALWAYS_EXPORT VecBaseCommon { @@ -384,64 +384,43 @@ public: protected: VTKM_EXEC_CONT - VecBaseCommon() - { - } + VecBaseCommon() {} VTKM_EXEC_CONT - const DerivedClass &Derived() const - { - return *static_cast(this); - } + const DerivedClass& Derived() const { return *static_cast(this); } VTKM_EXEC_CONT - DerivedClass &Derived() - { - return *static_cast(this); - } + DerivedClass& Derived() { return *static_cast(this); } private: // Only for internal use VTKM_EXEC_CONT - vtkm::IdComponent NumComponents() const - { - return this->Derived().GetNumberOfComponents(); - } + vtkm::IdComponent NumComponents() const { return this->Derived().GetNumberOfComponents(); } // Only for internal use VTKM_EXEC_CONT - const T &Component(vtkm::IdComponent index) const - { - return this->Derived()[index]; - } + const T& Component(vtkm::IdComponent index) const { return this->Derived()[index]; } // Only for internal use VTKM_EXEC_CONT - T &Component(vtkm::IdComponent index) - { - return this->Derived()[index]; - } + T& Component(vtkm::IdComponent index) { return this->Derived()[index]; } public: template - VTKM_EXEC_CONT void CopyInto( - vtkm::Vec& dest) const + VTKM_EXEC_CONT void CopyInto(vtkm::Vec& dest) const { - for (vtkm::IdComponent index = 0; - (index < this->NumComponents()) && (index < OtherSize); + for (vtkm::IdComponent index = 0; (index < this->NumComponents()) && (index < OtherSize); index++) { dest[index] = this->Component(index); } } - template - VTKM_EXEC_CONT - DerivedClass& - operator=( - const vtkm::detail::VecBaseCommon& src) + template + VTKM_EXEC_CONT DerivedClass& operator=( + const vtkm::detail::VecBaseCommon& src) { - const OtherVecType &srcDerived = static_cast(src); + const OtherVecType& srcDerived = static_cast(src); VTKM_ASSERT(this->NumComponents() == srcDerived.GetNumberOfComponents()); for (vtkm::IdComponent i = 0; i < this->NumComponents(); ++i) { @@ -453,8 +432,8 @@ public: VTKM_EXEC_CONT bool operator==(const DerivedClass& other) const { - bool equal=true; - for(vtkm::IdComponent i=0; i < this->NumComponents() && equal; ++i) + bool equal = true; + for (vtkm::IdComponent i = 0; i < this->NumComponents() && equal; ++i) { equal = (this->Component(i) == other[i]); } @@ -481,26 +460,20 @@ public: } VTKM_EXEC_CONT - bool operator!=(const DerivedClass& other) const - { - return !(this->operator==(other)); - } + bool operator!=(const DerivedClass& other) const { return !(this->operator==(other)); } VTKM_EXEC_CONT - ComponentType - Dot(const VecBaseCommon& other) const + ComponentType Dot(const VecBaseCommon& other) const { // Why the static_cast here and below? Because * on small integers (char, // short) promotes the result to a 32-bit int. After helpfully promoting // the width of the result, some compilers then warn you about casting it // back to the type you were expecting in the first place. The static_cast // suppresses this warning. - ComponentType result = - static_cast(this->Component(0) * other.Component(0)); + ComponentType result = static_cast(this->Component(0) * other.Component(0)); for (vtkm::IdComponent i = 1; i < this->NumComponents(); ++i) { - result = static_cast( - result + this->Component(i) * other.Component(i)); + result = static_cast(result + this->Component(i) * other.Component(i)); } return result; } @@ -509,16 +482,15 @@ public: #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" -#endif // gcc || clang -#endif // not using cuda < 8 +#endif // gcc || clang +#endif // not using cuda < 8 - template - VTKM_EXEC_CONT - vtkm::Vec - operator+(const vtkm::Vec &other) const + template + VTKM_EXEC_CONT vtkm::Vec operator+( + const vtkm::Vec& other) const { VTKM_ASSERT(Size == this->NumComponents()); - vtkm::Vec result; + vtkm::Vec result; for (vtkm::IdComponent i = 0; i < Size; ++i) { result[i] = this->Component(i) + other[i]; @@ -526,13 +498,10 @@ public: return result; } - template - VTKM_EXEC_CONT - DerivedClass & - operator+=(const VecBaseCommon &other) + template + VTKM_EXEC_CONT DerivedClass& operator+=(const VecBaseCommon& other) { - const OtherClass &other_derived = - static_cast(other); + const OtherClass& other_derived = static_cast(other); VTKM_ASSERT(this->NumComponents() == other_derived.GetNumberOfComponents()); for (vtkm::IdComponent i = 0; i < this->NumComponents(); ++i) { @@ -541,13 +510,12 @@ public: return this->Derived(); } - template - VTKM_EXEC_CONT - vtkm::Vec - operator-(const vtkm::Vec &other) const + template + VTKM_EXEC_CONT vtkm::Vec operator-( + const vtkm::Vec& other) const { VTKM_ASSERT(Size == this->NumComponents()); - vtkm::Vec result; + vtkm::Vec result; for (vtkm::IdComponent i = 0; i < Size; ++i) { result[i] = this->Component(i) - other[i]; @@ -555,13 +523,10 @@ public: return result; } - template - VTKM_EXEC_CONT - DerivedClass & - operator-=(const VecBaseCommon &other) + template + VTKM_EXEC_CONT DerivedClass& operator-=(const VecBaseCommon& other) { - const OtherClass &other_derived = - static_cast(other); + const OtherClass& other_derived = static_cast(other); VTKM_ASSERT(this->NumComponents() == other_derived.GetNumberOfComponents()); for (vtkm::IdComponent i = 0; i < this->NumComponents(); ++i) { @@ -570,12 +535,11 @@ public: return this->Derived(); } - template - VTKM_EXEC_CONT - vtkm::Vec - operator*(const vtkm::Vec &other) const + template + VTKM_EXEC_CONT vtkm::Vec operator*( + const vtkm::Vec& other) const { - vtkm::Vec result; + vtkm::Vec result; for (vtkm::IdComponent i = 0; i < Size; ++i) { result[i] = this->Component(i) * other[i]; @@ -583,13 +547,10 @@ public: return result; } - template - VTKM_EXEC_CONT - DerivedClass & - operator*=(const VecBaseCommon &other) + template + VTKM_EXEC_CONT DerivedClass& operator*=(const VecBaseCommon& other) { - const OtherClass &other_derived = - static_cast(other); + const OtherClass& other_derived = static_cast(other); VTKM_ASSERT(this->NumComponents() == other_derived.GetNumberOfComponents()); for (vtkm::IdComponent i = 0; i < this->NumComponents(); ++i) { @@ -598,12 +559,11 @@ public: return this->Derived(); } - template - VTKM_EXEC_CONT - vtkm::Vec - operator/(const vtkm::Vec &other) const + template + VTKM_EXEC_CONT vtkm::Vec operator/( + const vtkm::Vec& other) const { - vtkm::Vec result; + vtkm::Vec result; for (vtkm::IdComponent i = 0; i < Size; ++i) { result[i] = this->Component(i) / other[i]; @@ -611,13 +571,10 @@ public: return result; } - template - VTKM_EXEC_CONT - DerivedClass & - operator/=(const VecBaseCommon &other) + template + VTKM_EXEC_CONT DerivedClass& operator/=(const VecBaseCommon& other) { - const OtherClass &other_derived = - static_cast(other); + const OtherClass& other_derived = static_cast(other); VTKM_ASSERT(this->NumComponents() == other_derived.GetNumberOfComponents()); for (vtkm::IdComponent i = 0; i < this->NumComponents(); ++i) { @@ -629,26 +586,20 @@ public: #if (!(defined(VTKM_CUDA) && (__CUDACC_VER_MAJOR__ < 8))) #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) #pragma GCC diagnostic pop -#endif // gcc || clang -#endif // not using cuda < 8 +#endif // gcc || clang +#endif // not using cuda < 8 VTKM_EXEC_CONT - ComponentType* GetPointer() - { - return &this->Component(0); - } + ComponentType* GetPointer() { return &this->Component(0); } VTKM_EXEC_CONT - const ComponentType* GetPointer() const - { - return &this->Component(0); - } + const ComponentType* GetPointer() const { return &this->Component(0); } }; #if (defined(VTKM_CUDA) && (__CUDACC_VER_MAJOR__ < 8)) #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) #pragma GCC diagnostic pop -#endif // gcc || clang -#endif // use cuda < 8 +#endif // gcc || clang +#endif // use cuda < 8 /// Base implementation of all Vec classes. /// @@ -661,9 +612,7 @@ public: protected: VTKM_EXEC_CONT - VecBase() - { - } + VecBase() {} VTKM_EXEC_CONT explicit VecBase(const ComponentType& value) @@ -675,8 +624,7 @@ protected: } template - VTKM_EXEC_CONT - VecBase(const VecBase& src) + VTKM_EXEC_CONT VecBase(const VecBase& src) { for (vtkm::IdComponent i = 0; i < Size; ++i) { @@ -686,10 +634,7 @@ protected: public: VTKM_EXEC_CONT - vtkm::IdComponent GetNumberOfComponents() const - { - return NUM_COMPONENTS; - } + vtkm::IdComponent GetNumberOfComponents() const { return NUM_COMPONENTS; } VTKM_EXEC_CONT const ComponentType& operator[](vtkm::IdComponent idx) const @@ -710,77 +655,65 @@ public: #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" -#endif // gcc || clang -#endif // not using cuda < 8 +#endif // gcc || clang +#endif // not using cuda < 8 - template - VTKM_EXEC_CONT - DerivedClass - operator+(const VecBaseCommon &other) const + template + VTKM_EXEC_CONT DerivedClass + operator+(const VecBaseCommon& other) const { - const OtherClass &other_derived = - static_cast(other); + const OtherClass& other_derived = static_cast(other); VTKM_ASSERT(NUM_COMPONENTS == other_derived.GetNumberOfComponents()); DerivedClass result; for (vtkm::IdComponent i = 0; i < NUM_COMPONENTS; ++i) { - result[i] = - this->Components[i] + static_cast(other_derived[i]); + result[i] = this->Components[i] + static_cast(other_derived[i]); } return result; } - template - VTKM_EXEC_CONT - DerivedClass - operator-(const VecBaseCommon &other) const + template + VTKM_EXEC_CONT DerivedClass + operator-(const VecBaseCommon& other) const { - const OtherClass &other_derived = - static_cast(other); + const OtherClass& other_derived = static_cast(other); VTKM_ASSERT(NUM_COMPONENTS == other_derived.GetNumberOfComponents()); DerivedClass result; for (vtkm::IdComponent i = 0; i < NUM_COMPONENTS; ++i) { - result[i] = - this->Components[i] - static_cast(other_derived[i]); + result[i] = this->Components[i] - static_cast(other_derived[i]); } return result; } - template - VTKM_EXEC_CONT - DerivedClass - operator*(const VecBaseCommon &other) const + template + VTKM_EXEC_CONT DerivedClass + operator*(const VecBaseCommon& other) const { - const OtherClass &other_derived = - static_cast(other); + const OtherClass& other_derived = static_cast(other); VTKM_ASSERT(NUM_COMPONENTS == other_derived.GetNumberOfComponents()); DerivedClass result; for (vtkm::IdComponent i = 0; i < NUM_COMPONENTS; ++i) { - result[i] = - this->Components[i] * static_cast(other_derived[i]); + result[i] = this->Components[i] * static_cast(other_derived[i]); } return result; } - template - VTKM_EXEC_CONT - DerivedClass - operator/(const VecBaseCommon &other) const + template + VTKM_EXEC_CONT DerivedClass + operator/(const VecBaseCommon& other) const { - const OtherClass &other_derived = - static_cast(other); + const OtherClass& other_derived = static_cast(other); VTKM_ASSERT(NUM_COMPONENTS == other_derived.GetNumberOfComponents()); DerivedClass result; for (vtkm::IdComponent i = 0; i < NUM_COMPONENTS; ++i) { - result[i] = - this->Components[i] / static_cast(other_derived[i]); + result[i] = this->Components[i] / static_cast(other_derived[i]); } return result; } @@ -788,8 +721,8 @@ public: #if (!(defined(VTKM_CUDA) && (__CUDACC_VER_MAJOR__ < 8))) #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) #pragma GCC diagnostic pop -#endif // gcc || clang -#endif // not using cuda < 8 +#endif // gcc || clang +#endif // not using cuda < 8 protected: ComponentType Components[NUM_COMPONENTS]; @@ -802,9 +735,7 @@ class VTKM_ALWAYS_EXPORT VecCBase : public vtkm::detail::VecBaseCommon -class VTKM_ALWAYS_EXPORT Vec : public detail::VecBase > +template +class VTKM_ALWAYS_EXPORT Vec : public detail::VecBase> { - typedef detail::VecBase > Superclass; + typedef detail::VecBase> Superclass; + public: #ifdef VTKM_DOXYGEN_ONLY typedef T ComponentType; @@ -837,12 +769,17 @@ public: #endif VTKM_EXEC_CONT Vec() {} - VTKM_EXEC_CONT explicit Vec(const T& value) : Superclass(value) { } + VTKM_EXEC_CONT explicit Vec(const T& value) + : Superclass(value) + { + } // VTKM_EXEC_CONT explicit Vec(const T* values) : Superclass(values) { } - template - VTKM_EXEC_CONT - Vec(const Vec &src) : Superclass(src) { } + template + VTKM_EXEC_CONT Vec(const Vec& src) + : Superclass(src) + { + } }; //----------------------------------------------------------------------------- @@ -851,7 +788,7 @@ public: // A vector of size 0 cannot use VecBase because it will try to create a // zero length array which troubles compilers. Vecs of size 0 are a bit // pointless but might occur in some generic functions or classes. -template +template class VTKM_ALWAYS_EXPORT Vec { public: @@ -859,76 +796,80 @@ public: static const vtkm::IdComponent NUM_COMPONENTS = 0; VTKM_EXEC_CONT Vec() {} - VTKM_EXEC_CONT explicit Vec(const ComponentType&) { } + VTKM_EXEC_CONT explicit Vec(const ComponentType&) {} - template - VTKM_EXEC_CONT Vec(const Vec &) { } + template + VTKM_EXEC_CONT Vec(const Vec&) + { + } VTKM_EXEC_CONT - Vec & - operator=(const Vec &) + Vec& operator=(const Vec&) { return *this; } VTKM_EXEC_CONT - ComponentType operator[](vtkm::IdComponent vtkmNotUsed(idx)) const - { - return ComponentType(); - } + ComponentType operator[](vtkm::IdComponent vtkmNotUsed(idx)) const { return ComponentType(); } VTKM_EXEC_CONT - bool operator==(const Vec &vtkmNotUsed(other)) const - { - return true; - } + bool operator==(const Vec& vtkmNotUsed(other)) const { return true; } VTKM_EXEC_CONT - bool operator!=(const Vec &vtkmNotUsed(other)) const - { - return false; - } + bool operator!=(const Vec& vtkmNotUsed(other)) const { return false; } }; // Vectors of size 1 should implicitly convert between the scalar and the // vector. Otherwise, it should behave the same. -template -class VTKM_ALWAYS_EXPORT Vec : public detail::VecBase > +template +class VTKM_ALWAYS_EXPORT Vec : public detail::VecBase> { - typedef detail::VecBase > Superclass; + typedef detail::VecBase> Superclass; public: VTKM_EXEC_CONT Vec() {} - VTKM_EXEC_CONT explicit Vec(const T& value) : Superclass(value) { } + VTKM_EXEC_CONT explicit Vec(const T& value) + : Superclass(value) + { + } - template - VTKM_EXEC_CONT Vec(const Vec &src) : Superclass(src) { } + template + VTKM_EXEC_CONT Vec(const Vec& src) + : Superclass(src) + { + } // This convenience operator removed because it was causing ambiguous // overload errors -// VTKM_EXEC_CONT -// operator T() const -// { -// return this->Components[0]; -// } + // VTKM_EXEC_CONT + // operator T() const + // { + // return this->Components[0]; + // } }; //----------------------------------------------------------------------------- // Specializations for common tuple sizes (with special names). -template -class VTKM_ALWAYS_EXPORT Vec : public detail::VecBase > +template +class VTKM_ALWAYS_EXPORT Vec : public detail::VecBase> { - typedef detail::VecBase > Superclass; + typedef detail::VecBase> Superclass; public: VTKM_EXEC_CONT Vec() {} - VTKM_EXEC_CONT explicit Vec(const T& value) : Superclass(value) { } + VTKM_EXEC_CONT explicit Vec(const T& value) + : Superclass(value) + { + } - template - VTKM_EXEC_CONT Vec(const Vec &src) : Superclass(src) { } + template + VTKM_EXEC_CONT Vec(const Vec& src) + : Superclass(src) + { + } VTKM_EXEC_CONT - Vec(const T &x, const T &y) + Vec(const T& x, const T& y) { this->Components[0] = x; this->Components[1] = y; @@ -936,22 +877,28 @@ public: }; /// Id2 corresponds to a 2-dimensional index -typedef vtkm::Vec Id2; +typedef vtkm::Vec Id2; - -template -class VTKM_ALWAYS_EXPORT Vec : public detail::VecBase > +template +class VTKM_ALWAYS_EXPORT Vec : public detail::VecBase> { - typedef detail::VecBase > Superclass; + typedef detail::VecBase> Superclass; + public: VTKM_EXEC_CONT Vec() {} - VTKM_EXEC_CONT explicit Vec(const T& value) : Superclass(value) { } + VTKM_EXEC_CONT explicit Vec(const T& value) + : Superclass(value) + { + } - template - VTKM_EXEC_CONT Vec(const Vec &src) : Superclass(src) { } + template + VTKM_EXEC_CONT Vec(const Vec& src) + : Superclass(src) + { + } VTKM_EXEC_CONT - Vec(const T &x, const T &y, const T &z) + Vec(const T& x, const T& y, const T& z) { this->Components[0] = x; this->Components[1] = y; @@ -961,22 +908,28 @@ public: /// Id3 corresponds to a 3-dimensional index for 3d arrays. Note that /// the precision of each index may be less than vtkm::Id. -typedef vtkm::Vec Id3; +typedef vtkm::Vec Id3; - -template -class VTKM_ALWAYS_EXPORT Vec : public detail::VecBase > +template +class VTKM_ALWAYS_EXPORT Vec : public detail::VecBase> { - typedef detail::VecBase > Superclass; + typedef detail::VecBase> Superclass; + public: VTKM_EXEC_CONT Vec() {} - VTKM_EXEC_CONT explicit Vec(const T& value) : Superclass(value) { } + VTKM_EXEC_CONT explicit Vec(const T& value) + : Superclass(value) + { + } - template - VTKM_EXEC_CONT Vec(const Vec &src) : Superclass(src) { } + template + VTKM_EXEC_CONT Vec(const Vec& src) + : Superclass(src) + { + } VTKM_EXEC_CONT - Vec(const T &x, const T &y, const T &z, const T &w) + Vec(const T& x, const T& y, const T& z, const T& w) { this->Components[0] = x; this->Components[1] = y; @@ -1002,29 +955,26 @@ struct VecOrScalar /// Initializes and returns a Vec of length 2. /// -template -VTKM_EXEC_CONT -vtkm::Vec make_Vec(const T &x, const T &y) +template +VTKM_EXEC_CONT vtkm::Vec make_Vec(const T& x, const T& y) { - return vtkm::Vec(x, y); + return vtkm::Vec(x, y); } /// Initializes and returns a Vec of length 3. /// -template -VTKM_EXEC_CONT -vtkm::Vec make_Vec(const T &x, const T &y, const T &z) +template +VTKM_EXEC_CONT vtkm::Vec make_Vec(const T& x, const T& y, const T& z) { - return vtkm::Vec(x, y, z); + return vtkm::Vec(x, y, z); } /// Initializes and returns a Vec of length 4. /// -template -VTKM_EXEC_CONT -vtkm::Vec make_Vec(const T &x, const T &y, const T &z, const T &w) +template +VTKM_EXEC_CONT vtkm::Vec make_Vec(const T& x, const T& y, const T& z, const T& w) { - return vtkm::Vec(x, y, z, w); + return vtkm::Vec(x, y, z, w); } /// \brief A Vec-like representation for short arrays. @@ -1045,15 +995,14 @@ vtkm::Vec make_Vec(const T &x, const T &y, const T &z, const T &w) /// non-mutable \c VecC, the \c VecCConst class (e.g. /// VecCConst). /// -template -class VTKM_ALWAYS_EXPORT VecC : public detail::VecCBase > +template +class VTKM_ALWAYS_EXPORT VecC : public detail::VecCBase> { - using Superclass = detail::VecCBase >; + using Superclass = detail::VecCBase>; - VTKM_STATIC_ASSERT_MSG( - std::is_const::value == false, - "You cannot use VecC with a const type as its template argument. " - "Use either const VecC or VecCConst."); + VTKM_STATIC_ASSERT_MSG(std::is_const::value == false, + "You cannot use VecC with a const type as its template argument. " + "Use either const VecC or VecCConst."); public: #ifdef VTKM_DOXYGEN_ONLY @@ -1062,32 +1011,41 @@ public: VTKM_EXEC_CONT VecC() - : Components(nullptr), NumberOfComponents(0) - { } + : Components(nullptr) + , NumberOfComponents(0) + { + } VTKM_EXEC_CONT - VecC(T *array, vtkm::IdComponent size) - : Components(array), NumberOfComponents(size) - { } + VecC(T* array, vtkm::IdComponent size) + : Components(array) + , NumberOfComponents(size) + { + } - template - VTKM_EXEC_CONT - VecC(vtkm::Vec &src) - : Components(src.GetPointer()), NumberOfComponents(Size) - { } + template + VTKM_EXEC_CONT VecC(vtkm::Vec& src) + : Components(src.GetPointer()) + , NumberOfComponents(Size) + { + } VTKM_EXEC_CONT - explicit VecC(T &src) - : Components(&src), NumberOfComponents(1) - { } + explicit VecC(T& src) + : Components(&src) + , NumberOfComponents(1) + { + } VTKM_EXEC_CONT - VecC(const VecC &src) - : Components(src.Components), NumberOfComponents(src.NumberOfComponents) - { } + VecC(const VecC& src) + : Components(src.Components) + , NumberOfComponents(src.NumberOfComponents) + { + } VTKM_EXEC_CONT - const T &operator[](vtkm::IdComponent index) const + const T& operator[](vtkm::IdComponent index) const { VTKM_ASSERT(index >= 0); VTKM_ASSERT(index < this->NumberOfComponents); @@ -1095,7 +1053,7 @@ public: } VTKM_EXEC_CONT - T &operator[](vtkm::IdComponent index) + T& operator[](vtkm::IdComponent index) { VTKM_ASSERT(index >= 0); VTKM_ASSERT(index < this->NumberOfComponents); @@ -1103,13 +1061,10 @@ public: } VTKM_EXEC_CONT - vtkm::IdComponent GetNumberOfComponents() const - { - return this->NumberOfComponents; - } + vtkm::IdComponent GetNumberOfComponents() const { return this->NumberOfComponents; } VTKM_EXEC_CONT - VecC &operator=(const VecC &src) + VecC& operator=(const VecC& src) { VTKM_ASSERT(this->NumberOfComponents == src.GetNumberOfComponents()); for (vtkm::IdComponent index = 0; index < this->NumberOfComponents; index++) @@ -1121,7 +1076,7 @@ public: } private: - T * const Components; + T* const Components; vtkm::IdComponent NumberOfComponents; }; @@ -1134,15 +1089,14 @@ private: /// versa, so function arguments should use \c VecCConst when the data do not /// need to be changed. /// -template -class VTKM_ALWAYS_EXPORT VecCConst : public detail::VecCBase > +template +class VTKM_ALWAYS_EXPORT VecCConst : public detail::VecCBase> { - using Superclass = detail::VecCBase >; + using Superclass = detail::VecCBase>; - VTKM_STATIC_ASSERT_MSG( - std::is_const::value == false, - "You cannot use VecCConst with a const type as its template argument. " - "Remove the const from the type."); + VTKM_STATIC_ASSERT_MSG(std::is_const::value == false, + "You cannot use VecCConst with a const type as its template argument. " + "Remove the const from the type."); public: #ifdef VTKM_DOXYGEN_ONLY @@ -1151,37 +1105,48 @@ public: VTKM_EXEC_CONT VecCConst() - : Components(nullptr), NumberOfComponents(0) - { } + : Components(nullptr) + , NumberOfComponents(0) + { + } VTKM_EXEC_CONT - VecCConst(const T *array, vtkm::IdComponent size) - : Components(array), NumberOfComponents(size) - { } + VecCConst(const T* array, vtkm::IdComponent size) + : Components(array) + , NumberOfComponents(size) + { + } - template - VTKM_EXEC_CONT - VecCConst(const vtkm::Vec &src) - : Components(src.GetPointer()), NumberOfComponents(Size) - { } + template + VTKM_EXEC_CONT VecCConst(const vtkm::Vec& src) + : Components(src.GetPointer()) + , NumberOfComponents(Size) + { + } VTKM_EXEC_CONT - explicit VecCConst(const T &src) - : Components(&src), NumberOfComponents(1) - { } + explicit VecCConst(const T& src) + : Components(&src) + , NumberOfComponents(1) + { + } VTKM_EXEC_CONT - VecCConst(const VecCConst &src) - : Components(src.Components), NumberOfComponents(src.NumberOfComponents) - { } + VecCConst(const VecCConst& src) + : Components(src.Components) + , NumberOfComponents(src.NumberOfComponents) + { + } VTKM_EXEC_CONT - VecCConst(const VecC &src) - : Components(src.Components), NumberOfComponents(src.NumberOfComponents) - { } + VecCConst(const VecC& src) + : Components(src.Components) + , NumberOfComponents(src.NumberOfComponents) + { + } VTKM_EXEC_CONT - const T &operator[](vtkm::IdComponent index) const + const T& operator[](vtkm::IdComponent index) const { VTKM_ASSERT(index >= 0); VTKM_ASSERT(index < this->NumberOfComponents); @@ -1189,53 +1154,44 @@ public: } VTKM_EXEC_CONT - vtkm::IdComponent GetNumberOfComponents() const - { - return this->NumberOfComponents; - } + vtkm::IdComponent GetNumberOfComponents() const { return this->NumberOfComponents; } private: - const T * const Components; + const T* const Components; vtkm::IdComponent NumberOfComponents; // You are not allowed to assign to a VecCConst, so these operators are not // implemented and are disallowed. - void operator=(const VecCConst &) = delete; - void operator+=(const VecCConst &) = delete; - void operator-=(const VecCConst &) = delete; - void operator*=(const VecCConst &) = delete; - void operator/=(const VecCConst &) = delete; + void operator=(const VecCConst&) = delete; + void operator+=(const VecCConst&) = delete; + void operator-=(const VecCConst&) = delete; + void operator*=(const VecCConst&) = delete; + void operator/=(const VecCConst&) = delete; }; /// Creates a \c VecC from an input array. /// -template -VTKM_EXEC_CONT -static inline -vtkm::VecC make_VecC(T *array, vtkm::IdComponent size) +template +VTKM_EXEC_CONT static inline vtkm::VecC make_VecC(T* array, vtkm::IdComponent size) { return vtkm::VecC(array, size); } /// Creates a \c VecCConst from a constant input array. /// -template -VTKM_EXEC_CONT -static inline -vtkm::VecCConst make_VecC(const T *array, vtkm::IdComponent size) +template +VTKM_EXEC_CONT static inline vtkm::VecCConst make_VecC(const T* array, vtkm::IdComponent size) { return vtkm::VecCConst(array, size); } // A pre-declaration of vtkm::Pair so that classes templated on them can refer // to it. The actual implementation is in vtkm/Pair.h. -template +template struct Pair; -template -static inline -VTKM_EXEC_CONT -T dot(const vtkm::Vec &a, const vtkm::Vec &b) +template +static inline VTKM_EXEC_CONT T dot(const vtkm::Vec& a, const vtkm::Vec& b) { T result = T(a[0] * b[0]); for (vtkm::IdComponent i = 1; i < Size; ++i) @@ -1245,42 +1201,33 @@ T dot(const vtkm::Vec &a, const vtkm::Vec &b) return result; } -template -static inline -VTKM_EXEC_CONT -T dot(const vtkm::Vec &a, const vtkm::Vec &b) +template +static inline VTKM_EXEC_CONT T dot(const vtkm::Vec& a, const vtkm::Vec& b) { - return T((a[0]*b[0]) + (a[1]*b[1])); -} - -template -static inline -VTKM_EXEC_CONT -T dot(const vtkm::Vec &a, const vtkm::Vec &b) -{ - return T((a[0]*b[0]) + (a[1]*b[1]) + (a[2]*b[2])); + return T((a[0] * b[0]) + (a[1] * b[1])); } template -static inline -VTKM_EXEC_CONT T -dot(const vtkm::Vec& a, const vtkm::Vec& b) +static inline VTKM_EXEC_CONT T dot(const vtkm::Vec& a, const vtkm::Vec& b) +{ + return T((a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2])); +} + +template +static inline VTKM_EXEC_CONT T dot(const vtkm::Vec& a, const vtkm::Vec& b) { return T((a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]) + (a[3] * b[3])); } -template -static inline -VTKM_EXEC_CONT T -dot(const vtkm::detail::VecBaseCommon &a, - const vtkm::detail::VecBaseCommon &b) +template +static inline VTKM_EXEC_CONT T dot(const vtkm::detail::VecBaseCommon& a, + const vtkm::detail::VecBaseCommon& b) { return a.Dot(b); } template -VTKM_EXEC_CONT T -ReduceSum(const vtkm::Vec& a) +VTKM_EXEC_CONT T ReduceSum(const vtkm::Vec& a) { T result = a[0]; for (vtkm::IdComponent i = 1; i < Size; ++i) @@ -1291,29 +1238,25 @@ ReduceSum(const vtkm::Vec& a) } template -VTKM_EXEC_CONT T -ReduceSum(const vtkm::Vec& a) +VTKM_EXEC_CONT T ReduceSum(const vtkm::Vec& a) { return a[0] + a[1]; } template -VTKM_EXEC_CONT T -ReduceSum(const vtkm::Vec& a) +VTKM_EXEC_CONT T ReduceSum(const vtkm::Vec& a) { return a[0] + a[1] + a[2]; } template -VTKM_EXEC_CONT T -ReduceSum(const vtkm::Vec& a) +VTKM_EXEC_CONT T ReduceSum(const vtkm::Vec& a) { return a[0] + a[1] + a[2] + a[3]; } template -VTKM_EXEC_CONT T -ReduceProduct(const vtkm::Vec& a) +VTKM_EXEC_CONT T ReduceProduct(const vtkm::Vec& a) { T result = a[0]; for (vtkm::IdComponent i = 1; i < Size; ++i) @@ -1324,44 +1267,33 @@ ReduceProduct(const vtkm::Vec& a) } template -VTKM_EXEC_CONT T -ReduceProduct(const vtkm::Vec& a) +VTKM_EXEC_CONT T ReduceProduct(const vtkm::Vec& a) { return a[0] * a[1]; } template -VTKM_EXEC_CONT T -ReduceProduct(const vtkm::Vec& a) +VTKM_EXEC_CONT T ReduceProduct(const vtkm::Vec& a) { return a[0] * a[1] * a[2]; } template -VTKM_EXEC_CONT T -ReduceProduct(const vtkm::Vec& a) +VTKM_EXEC_CONT T ReduceProduct(const vtkm::Vec& a) { return a[0] * a[1] * a[2] * a[3]; } // Integer types of a width less than an integer get implicitly casted to // an integer when doing a multiplication. -#define VTK_M_INTEGER_PROMOTION_SCALAR_DOT(type) \ - static inline \ - VTKM_EXEC_CONT type dot(type a, type b) \ - { \ - return static_cast(a * b); \ - } +#define VTK_M_INTEGER_PROMOTION_SCALAR_DOT(type) \ + static inline VTKM_EXEC_CONT type dot(type a, type b) { return static_cast(a * b); } VTK_M_INTEGER_PROMOTION_SCALAR_DOT(vtkm::Int8) VTK_M_INTEGER_PROMOTION_SCALAR_DOT(vtkm::UInt8) VTK_M_INTEGER_PROMOTION_SCALAR_DOT(vtkm::Int16) VTK_M_INTEGER_PROMOTION_SCALAR_DOT(vtkm::UInt16) -#define VTK_M_SCALAR_DOT(type) \ - static inline \ - VTKM_EXEC_CONT type dot(type a, type b) \ - { \ - return a * b; \ - } +#define VTK_M_SCALAR_DOT(type) \ + static inline VTKM_EXEC_CONT type dot(type a, type b) { return a * b; } VTK_M_SCALAR_DOT(vtkm::Int32) VTK_M_SCALAR_DOT(vtkm::UInt32) VTK_M_SCALAR_DOT(vtkm::Int64) @@ -1373,137 +1305,105 @@ VTK_M_SCALAR_DOT(vtkm::Float64) // Declared outside of vtkm namespace so that the operator works with all code. -template -VTKM_EXEC_CONT -vtkm::Vec operator*(T scalar, const vtkm::Vec &vec) +template +VTKM_EXEC_CONT vtkm::Vec operator*(T scalar, const vtkm::Vec& vec) { return vtkm::internal::VecComponentWiseUnaryOperation()( - vec, - vtkm::internal::BindLeftBinaryOp(scalar)); + vec, vtkm::internal::BindLeftBinaryOp(scalar)); } -template -VTKM_EXEC_CONT -vtkm::Vec operator*(const vtkm::Vec &vec, T scalar) +template +VTKM_EXEC_CONT vtkm::Vec operator*(const vtkm::Vec& vec, T scalar) { return vtkm::internal::VecComponentWiseUnaryOperation()( - vec, - vtkm::internal::BindRightBinaryOp(scalar)); + vec, vtkm::internal::BindRightBinaryOp(scalar)); } -template -VTKM_EXEC_CONT -vtkm::Vec -operator*(vtkm::Float64 scalar, const vtkm::Vec &vec) +template +VTKM_EXEC_CONT vtkm::Vec operator*(vtkm::Float64 scalar, const vtkm::Vec& vec) { - return vtkm::Vec( - vtkm::internal::VecComponentWiseUnaryOperation()( - vec, - vtkm::internal::BindLeftBinaryOp< - vtkm::Float64,vtkm::Multiply,T>(scalar))); + return vtkm::Vec(vtkm::internal::VecComponentWiseUnaryOperation()( + vec, vtkm::internal::BindLeftBinaryOp(scalar))); } -template -VTKM_EXEC_CONT -vtkm::Vec -operator*(const vtkm::Vec &vec, vtkm::Float64 scalar) +template +VTKM_EXEC_CONT vtkm::Vec operator*(const vtkm::Vec& vec, vtkm::Float64 scalar) { - return vtkm::Vec( - vtkm::internal::VecComponentWiseUnaryOperation()( - vec, - vtkm::internal::BindRightBinaryOp< - vtkm::Float64,vtkm::Multiply,T>(scalar))); + return vtkm::Vec(vtkm::internal::VecComponentWiseUnaryOperation()( + vec, vtkm::internal::BindRightBinaryOp(scalar))); } -template -VTKM_EXEC_CONT -vtkm::Vec -operator*(vtkm::Float64 scalar, const vtkm::Vec &vec) +template +VTKM_EXEC_CONT vtkm::Vec operator*(vtkm::Float64 scalar, + const vtkm::Vec& vec) { return vtkm::internal::VecComponentWiseUnaryOperation()( - vec, - vtkm::internal::BindLeftBinaryOp< - vtkm::Float64,vtkm::Multiply>(scalar)); + vec, vtkm::internal::BindLeftBinaryOp(scalar)); } -template -VTKM_EXEC_CONT -vtkm::Vec -operator*(const vtkm::Vec &vec, vtkm::Float64 scalar) +template +VTKM_EXEC_CONT vtkm::Vec operator*(const vtkm::Vec& vec, + vtkm::Float64 scalar) { return vtkm::internal::VecComponentWiseUnaryOperation()( - vec, - vtkm::internal::BindRightBinaryOp< - vtkm::Float64,vtkm::Multiply>(scalar)); + vec, vtkm::internal::BindRightBinaryOp(scalar)); } -template -VTKM_EXEC_CONT -vtkm::Vec operator/(const vtkm::Vec &vec, T scalar) +template +VTKM_EXEC_CONT vtkm::Vec operator/(const vtkm::Vec& vec, T scalar) { return vtkm::internal::VecComponentWiseUnaryOperation()( - vec, - vtkm::internal::BindRightBinaryOp(scalar)); + vec, vtkm::internal::BindRightBinaryOp(scalar)); } -template -VTKM_EXEC_CONT -vtkm::Vec -operator/(const vtkm::Vec &vec, vtkm::Float64 scalar) +template +VTKM_EXEC_CONT vtkm::Vec operator/(const vtkm::Vec& vec, vtkm::Float64 scalar) { - return vtkm::Vec( - vtkm::internal::VecComponentWiseUnaryOperation()( - vec, - vtkm::internal::BindRightBinaryOp< - vtkm::Float64,vtkm::Divide,T>(scalar))); + return vtkm::Vec(vtkm::internal::VecComponentWiseUnaryOperation()( + vec, vtkm::internal::BindRightBinaryOp(scalar))); } -template -VTKM_EXEC_CONT -vtkm::Vec -operator/(const vtkm::Vec &vec, vtkm::Float64 scalar) +template +VTKM_EXEC_CONT vtkm::Vec operator/(const vtkm::Vec& vec, + vtkm::Float64 scalar) { return vtkm::internal::VecComponentWiseUnaryOperation()( - vec, - vtkm::internal::BindRightBinaryOp< - vtkm::Float64,vtkm::Divide>(scalar)); + vec, vtkm::internal::BindRightBinaryOp(scalar)); } + +// clang-format off // The enable_if for this operator is effectively disabling the negate // operator for Vec of unsigned integers. Another approach would be // to use enable_if. That would be more inclusive but would // also allow other types like Vec >. If necessary, we could // change this implementation to be more inclusive. -template +template VTKM_EXEC_CONT -typename std::enable_if< - (std::is_floating_point::value || std::is_signed::value), - vtkm::Vec - >::type -operator-(const vtkm::Vec &x) +typename std::enable_if<(std::is_floating_point::value || std::is_signed::value), + vtkm::Vec>::type +operator-(const vtkm::Vec& x) { - return vtkm::internal::VecComponentWiseUnaryOperation()( - x, vtkm::Negate()); + return vtkm::internal::VecComponentWiseUnaryOperation()(x, vtkm::Negate()); } +// clang-format on /// Helper function for printing out vectors during testing. /// -template -VTKM_CONT -std::ostream &operator<<(std::ostream &stream, const vtkm::Vec &vec) +template +VTKM_CONT std::ostream& operator<<(std::ostream& stream, const vtkm::Vec& vec) { stream << "["; - for (vtkm::IdComponent component = 0; component < Size-1; component++) + for (vtkm::IdComponent component = 0; component < Size - 1; component++) { stream << vec[component] << ","; } - return stream << vec[Size-1] << "]"; + return stream << vec[Size - 1] << "]"; } /// Helper function for printing out pairs during testing. /// -template -VTKM_EXEC_CONT -std::ostream &operator<<(std::ostream &stream, const vtkm::Pair &vec) +template +VTKM_EXEC_CONT std::ostream& operator<<(std::ostream& stream, const vtkm::Pair& vec) { return stream << "[" << vec.first << "," << vec.second << "]"; } diff --git a/vtkm/UnaryPredicates.h b/vtkm/UnaryPredicates.h index fbcf72f44..c60a066b4 100644 --- a/vtkm/UnaryPredicates.h +++ b/vtkm/UnaryPredicates.h @@ -23,16 +23,17 @@ #include #include -namespace vtkm { +namespace vtkm +{ /// Predicate that takes a single argument \c x, and returns /// True if it is the identity of the Type \p T. struct IsZeroInitialized { - template - VTKM_EXEC_CONT bool operator()(const T &x) const + template + VTKM_EXEC_CONT bool operator()(const T& x) const { - return (x == vtkm::TypeTraits::ZeroInitialization() ); + return (x == vtkm::TypeTraits::ZeroInitialization()); } }; @@ -40,10 +41,10 @@ struct IsZeroInitialized /// True if it isn't the identity of the Type \p T. struct NotZeroInitialized { - template - VTKM_EXEC_CONT bool operator()(const T &x) const + template + VTKM_EXEC_CONT bool operator()(const T& x) const { - return (x != vtkm::TypeTraits::ZeroInitialization() ); + return (x != vtkm::TypeTraits::ZeroInitialization()); } }; @@ -53,7 +54,7 @@ struct NotZeroInitialized /// ! operator. struct LogicalNot { - template + template VTKM_EXEC_CONT bool operator()(const T& x) const { return !x; diff --git a/vtkm/VecFromPortal.h b/vtkm/VecFromPortal.h index d48cc2b64..3491bb9b6 100644 --- a/vtkm/VecFromPortal.h +++ b/vtkm/VecFromPortal.h @@ -27,39 +27,42 @@ #include -namespace vtkm { +namespace vtkm +{ /// \brief A short variable-length array from a window in an ArrayPortal. /// /// The \c VecFromPortal class is a Vec-like class that holds an array portal /// and exposes a small window of that portal as if it were a \c Vec. /// -template +template class VecFromPortal { public: - using ComponentType = - typename std::remove_const::type; + using ComponentType = typename std::remove_const::type; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - VecFromPortal() : NumComponents(0), Offset(0) { } - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - VecFromPortal(const PortalType &portal, - vtkm::IdComponent numComponents = 0, - vtkm::Id offset = 0) - : Portal(portal), NumComponents(numComponents), Offset(offset) { } - - VTKM_EXEC_CONT - vtkm::IdComponent GetNumberOfComponents() const { - return this->NumComponents; + VecFromPortal() + : NumComponents(0) + , Offset(0) + { } - template + VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - void CopyInto(vtkm::Vec &dest) const + VecFromPortal(const PortalType& portal, vtkm::IdComponent numComponents = 0, vtkm::Id offset = 0) + : Portal(portal) + , NumComponents(numComponents) + , Offset(offset) + { + } + + VTKM_EXEC_CONT + vtkm::IdComponent GetNumberOfComponents() const { return this->NumComponents; } + + template + VTKM_EXEC_CONT void CopyInto(vtkm::Vec& dest) const { vtkm::IdComponent numComponents = vtkm::Min(DestSize, this->NumComponents); for (vtkm::IdComponent index = 0; index < numComponents; index++) @@ -70,11 +73,10 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - vtkm::internal::ArrayPortalValueReference - operator[](vtkm::IdComponent index) const + vtkm::internal::ArrayPortalValueReference operator[](vtkm::IdComponent index) const { - return vtkm::internal::ArrayPortalValueReference( - this->Portal, index + this->Offset); + return vtkm::internal::ArrayPortalValueReference(this->Portal, + index + this->Offset); } private: @@ -83,8 +85,8 @@ private: vtkm::Id Offset; }; -template -struct TypeTraits > +template +struct TypeTraits> { private: typedef typename PortalType::ValueType ComponentType; @@ -101,8 +103,8 @@ public: } }; -template -struct VecTraits > +template +struct VecTraits> { typedef vtkm::VecFromPortal VecType; @@ -112,23 +114,21 @@ struct VecTraits > VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - static vtkm::IdComponent GetNumberOfComponents(const VecType &vector) { + static vtkm::IdComponent GetNumberOfComponents(const VecType& vector) + { return vector.GetNumberOfComponents(); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - static ComponentType GetComponent(const VecType &vector, - vtkm::IdComponent componentIndex) + static ComponentType GetComponent(const VecType& vector, vtkm::IdComponent componentIndex) { return vector[componentIndex]; } VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC_CONT - static void CopyInto(const VecType &src, - vtkm::Vec &dest) + template + VTKM_EXEC_CONT static void CopyInto(const VecType& src, vtkm::Vec& dest) { src.CopyInto(dest); } diff --git a/vtkm/VecFromPortalPermute.h b/vtkm/VecFromPortalPermute.h index a2d4ac2c2..f83a80de5 100644 --- a/vtkm/VecFromPortalPermute.h +++ b/vtkm/VecFromPortalPermute.h @@ -25,7 +25,8 @@ #include #include -namespace vtkm { +namespace vtkm +{ /// \brief A short vector from an ArrayPortal and a vector of indices. /// @@ -33,36 +34,33 @@ namespace vtkm { /// portal and a second Vec-like containing indices into the array. Each value /// of this vector is the value from the array with the respective index. /// -template +template class VecFromPortalPermute { public: - using ComponentType = - typename std::remove_const::type; - + using ComponentType = typename std::remove_const::type; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - VecFromPortalPermute() { } + VecFromPortalPermute() {} VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - VecFromPortalPermute(const IndexVecType *indices, const PortalType &portal) - : Indices(indices), Portal(portal) { } - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - vtkm::IdComponent GetNumberOfComponents() const { - return this->Indices->GetNumberOfComponents(); + VecFromPortalPermute(const IndexVecType* indices, const PortalType& portal) + : Indices(indices) + , Portal(portal) + { } VTKM_SUPPRESS_EXEC_WARNINGS - template VTKM_EXEC_CONT - void CopyInto(vtkm::Vec &dest) const + vtkm::IdComponent GetNumberOfComponents() const { return this->Indices->GetNumberOfComponents(); } + + VTKM_SUPPRESS_EXEC_WARNINGS + template + VTKM_EXEC_CONT void CopyInto(vtkm::Vec& dest) const { - vtkm::IdComponent numComponents = - vtkm::Min(DestSize, this->GetNumberOfComponents()); + vtkm::IdComponent numComponents = vtkm::Min(DestSize, this->GetNumberOfComponents()); for (vtkm::IdComponent index = 0; index < numComponents; index++) { dest[index] = (*this)[index]; @@ -77,17 +75,15 @@ public: } private: - const IndexVecType *Indices; + const IndexVecType* Indices; PortalType Portal; }; -template -struct TypeTraits< - vtkm::VecFromPortalPermute > +template +struct TypeTraits> { private: - typedef vtkm::VecFromPortalPermute - VecType; + typedef vtkm::VecFromPortalPermute VecType; typedef typename PortalType::ValueType ComponentType; public: @@ -96,18 +92,13 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - static VecType ZeroInitialization() - { - return VecType(); - } + static VecType ZeroInitialization() { return VecType(); } }; -template -struct VecTraits< - vtkm::VecFromPortalPermute > +template +struct VecTraits> { - typedef vtkm::VecFromPortalPermute - VecType; + typedef vtkm::VecFromPortalPermute VecType; typedef typename VecType::ComponentType ComponentType; typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents; @@ -115,23 +106,21 @@ struct VecTraits< VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - static vtkm::IdComponent GetNumberOfComponents(const VecType &vector) { + static vtkm::IdComponent GetNumberOfComponents(const VecType& vector) + { return vector.GetNumberOfComponents(); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - static ComponentType GetComponent(const VecType &vector, - vtkm::IdComponent componentIndex) + static ComponentType GetComponent(const VecType& vector, vtkm::IdComponent componentIndex) { return vector[componentIndex]; } VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC_CONT - static void CopyInto(const VecType &src, - vtkm::Vec &dest) + template + VTKM_EXEC_CONT static void CopyInto(const VecType& src, vtkm::Vec& dest) { src.CopyInto(dest); } diff --git a/vtkm/VecRectilinearPointCoordinates.h b/vtkm/VecRectilinearPointCoordinates.h index 97b9b972b..b8434b30e 100644 --- a/vtkm/VecRectilinearPointCoordinates.h +++ b/vtkm/VecRectilinearPointCoordinates.h @@ -25,29 +25,31 @@ #include #include -namespace vtkm { +namespace vtkm +{ -namespace detail { +namespace detail +{ /// Specifies the size of VecRectilinearPointCoordinates for the given /// dimension. /// -template +template struct VecRectilinearPointCoordinatesNumComponents; -template<> +template <> struct VecRectilinearPointCoordinatesNumComponents<1> { static const vtkm::IdComponent NUM_COMPONENTS = 2; }; -template<> +template <> struct VecRectilinearPointCoordinatesNumComponents<2> { static const vtkm::IdComponent NUM_COMPONENTS = 4; }; -template<> +template <> struct VecRectilinearPointCoordinatesNumComponents<3> { static const vtkm::IdComponent NUM_COMPONENTS = 8; @@ -55,14 +57,8 @@ struct VecRectilinearPointCoordinatesNumComponents<3> VTKM_EXEC_CONSTANT const vtkm::FloatDefault VecRectilinearPointCoordinatesOffsetTable[8][3] = { - { 0.0f, 0.0f, 0.0f }, - { 1.0f, 0.0f, 0.0f }, - { 1.0f, 1.0f, 0.0f }, - { 0.0f, 1.0f, 0.0f }, - { 0.0f, 0.0f, 1.0f }, - { 1.0f, 0.0f, 1.0f }, - { 1.0f, 1.0f, 1.0f }, - { 0.0f, 1.0f, 1.0f } + { 0.0f, 0.0f, 0.0f }, { 1.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, + { 0.0f, 0.0f, 1.0f }, { 1.0f, 0.0f, 1.0f }, { 1.0f, 1.0f, 1.0f }, { 0.0f, 1.0f, 1.0f } }; } // namespace detail @@ -74,29 +70,30 @@ const vtkm::FloatDefault VecRectilinearPointCoordinatesOffsetTable[8][3] = { /// dimensions of the cell, which can be 1 (for a line), 2 (for a pixel), or 3 /// (for a voxel). /// -template +template class VecRectilinearPointCoordinates { public: - typedef vtkm::Vec ComponentType; + typedef vtkm::Vec ComponentType; static const vtkm::IdComponent NUM_COMPONENTS = - detail::VecRectilinearPointCoordinatesNumComponents::NUM_COMPONENTS; + detail::VecRectilinearPointCoordinatesNumComponents::NUM_COMPONENTS; VTKM_EXEC_CONT - VecRectilinearPointCoordinates(ComponentType origin = ComponentType(0,0,0), - ComponentType spacing = ComponentType(1,1,1)) - : Origin(origin), Spacing(spacing) { } + VecRectilinearPointCoordinates(ComponentType origin = ComponentType(0, 0, 0), + ComponentType spacing = ComponentType(1, 1, 1)) + : Origin(origin) + , Spacing(spacing) + { + } VTKM_EXEC_CONT vtkm::IdComponent GetNumberOfComponents() const { return NUM_COMPONENTS; } - template - VTKM_EXEC_CONT - void CopyInto(vtkm::Vec &dest) const + template + VTKM_EXEC_CONT void CopyInto(vtkm::Vec& dest) const { - vtkm::IdComponent numComponents = - vtkm::Min(DestSize, this->GetNumberOfComponents()); + vtkm::IdComponent numComponents = vtkm::Min(DestSize, this->GetNumberOfComponents()); for (vtkm::IdComponent index = 0; index < numComponents; index++) { dest[index] = (*this)[index]; @@ -106,18 +103,17 @@ public: VTKM_EXEC_CONT ComponentType operator[](vtkm::IdComponent index) const { - const vtkm::FloatDefault *offset = - detail::VecRectilinearPointCoordinatesOffsetTable[index]; - return ComponentType(this->Origin[0] + offset[0]*this->Spacing[0], - this->Origin[1] + offset[1]*this->Spacing[1], - this->Origin[2] + offset[2]*this->Spacing[2]); + const vtkm::FloatDefault* offset = detail::VecRectilinearPointCoordinatesOffsetTable[index]; + return ComponentType(this->Origin[0] + offset[0] * this->Spacing[0], + this->Origin[1] + offset[1] * this->Spacing[1], + this->Origin[2] + offset[2] * this->Spacing[2]); } VTKM_EXEC_CONT - const ComponentType &GetOrigin() const { return this->Origin; } + const ComponentType& GetOrigin() const { return this->Origin; } VTKM_EXEC_CONT - const ComponentType &GetSpacing() const { return this->Spacing; } + const ComponentType& GetSpacing() const { return this->Spacing; } private: // Position of lower left point. @@ -127,49 +123,42 @@ private: ComponentType Spacing; }; -template -struct TypeTraits > +template +struct TypeTraits> { typedef vtkm::TypeTraitsRealTag NumericTag; typedef TypeTraitsVectorTag DimensionalityTag; VTKM_EXEC_CONT - static vtkm::VecRectilinearPointCoordinates - ZeroInitialization() + static vtkm::VecRectilinearPointCoordinates ZeroInitialization() { return vtkm::VecRectilinearPointCoordinates( - vtkm::Vec(0,0,0), - vtkm::Vec(0,0,0)); + vtkm::Vec(0, 0, 0), vtkm::Vec(0, 0, 0)); } }; -template -struct VecTraits > +template +struct VecTraits> { typedef vtkm::VecRectilinearPointCoordinates VecType; - typedef vtkm::Vec ComponentType; + typedef vtkm::Vec ComponentType; typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents; typedef vtkm::VecTraitsTagSizeStatic IsSizeStatic; static const vtkm::IdComponent NUM_COMPONENTS = VecType::NUM_COMPONENTS; VTKM_EXEC_CONT - static vtkm::IdComponent GetNumberOfComponents(const VecType &) { - return NUM_COMPONENTS; - } + static vtkm::IdComponent GetNumberOfComponents(const VecType&) { return NUM_COMPONENTS; } VTKM_EXEC_CONT - static ComponentType GetComponent(const VecType &vector, - vtkm::IdComponent componentIndex) + static ComponentType GetComponent(const VecType& vector, vtkm::IdComponent componentIndex) { return vector[componentIndex]; } - template - VTKM_EXEC_CONT - static void CopyInto(const VecType &src, - vtkm::Vec &dest) + template + VTKM_EXEC_CONT static void CopyInto(const VecType& src, vtkm::Vec& dest) { src.CopyInto(dest); } diff --git a/vtkm/VecTraits.h b/vtkm/VecTraits.h index 1d0f1c77e..15f378906 100644 --- a/vtkm/VecTraits.h +++ b/vtkm/VecTraits.h @@ -22,36 +22,46 @@ #include -namespace vtkm { +namespace vtkm +{ /// A tag for vectors that are "true" vectors (i.e. have more than one /// component). /// -struct VecTraitsTagMultipleComponents { }; +struct VecTraitsTagMultipleComponents +{ +}; /// A tag for vectors that are really just scalars (i.e. have only one /// component) /// -struct VecTraitsTagSingleComponent { }; +struct VecTraitsTagSingleComponent +{ +}; /// A tag for vectors where the number of components are known at compile time. /// -struct VecTraitsTagSizeStatic { }; +struct VecTraitsTagSizeStatic +{ +}; /// A tag for vectors where the number of components are not determined until /// run time. /// -struct VecTraitsTagSizeVariable { }; +struct VecTraitsTagSizeVariable +{ +}; -namespace internal { +namespace internal +{ -template +template struct VecTraitsMultipleComponentChooser { typedef VecTraitsTagMultipleComponents Type; }; -template<> +template <> struct VecTraitsMultipleComponentChooser<1> { typedef VecTraitsTagSingleComponent Type; @@ -62,7 +72,7 @@ struct VecTraitsMultipleComponentChooser<1> /// The VecTraits class gives several static members that define how /// to use a given type as a vector. /// -template +template struct VecTraits #ifdef VTKM_DOXYGEN_ONLY { @@ -78,15 +88,15 @@ struct VecTraits /// Number of components in the given vector. /// - static vtkm::IdComponent GetNumberOfComponents(const VecType &vec); + static vtkm::IdComponent GetNumberOfComponents(const VecType& vec); /// \brief A tag specifying whether this vector has multiple components (i.e. is a "real" vector). /// /// This tag can be useful for creating specialized functions when a vector /// is really just a scalar. /// - typedef typename internal::VecTraitsMultipleComponentChooser< - NUM_COMPONENTS>::Type HasMultipleComponents; + typedef typename internal::VecTraitsMultipleComponentChooser::Type + HasMultipleComponents; /// \brief A tag specifying whether the size of this vector is known at compile time. /// @@ -98,41 +108,37 @@ struct VecTraits /// Returns the value in a given component of the vector. /// - VTKM_EXEC_CONT static const ComponentType &GetComponent( - const typename std::remove_const::type &vector, - vtkm::IdComponent component); - VTKM_EXEC_CONT static ComponentType &GetComponent( - typename std::remove_const::type &vector, - vtkm::IdComponent component); + VTKM_EXEC_CONT static const ComponentType& GetComponent( + const typename std::remove_const::type& vector, vtkm::IdComponent component); + VTKM_EXEC_CONT static ComponentType& GetComponent( + typename std::remove_const::type& vector, vtkm::IdComponent component); /// Changes the value in a given component of the vector. /// - VTKM_EXEC_CONT static void SetComponent(VecType &vector, - vtkm::IdComponent component, - ComponentType value); + VTKM_EXEC_CONT static void SetComponent(VecType& vector, vtkm::IdComponent component, + ComponentType value); /// Copies the components in the given vector into a given Vec object. /// - template - VTKM_EXEC_CONT - static void - CopyInto(const VecType &src, vtkm::Vec &dest); + template + VTKM_EXEC_CONT static void CopyInto(const VecType& src, vtkm::Vec& dest); }; -#else // VTKM_DOXYGEN_ONLY - ; +#else // VTKM_DOXYGEN_ONLY + ; #endif // VTKM_DOXYGEN_ONLY // This partial specialization allows you to define a non-const version of // VecTraits and have it still work for const version. // -template +template struct VecTraits : VecTraits -{ }; - -template -struct VecTraits > { - typedef vtkm::Vec VecType; +}; + +template +struct VecTraits> +{ + typedef vtkm::Vec VecType; /// Type of the components in the vector. /// @@ -145,16 +151,14 @@ struct VecTraits > /// Number of components in the given vector. /// VTKM_EXEC_CONT - static vtkm::IdComponent GetNumberOfComponents(const VecType &) { - return NUM_COMPONENTS; - } + static vtkm::IdComponent GetNumberOfComponents(const VecType&) { return NUM_COMPONENTS; } /// A tag specifying whether this vector has multiple components (i.e. is a /// "real" vector). This tag can be useful for creating specialized functions /// when a vector is really just a scalar. /// - typedef typename internal::VecTraitsMultipleComponentChooser< - NUM_COMPONENTS>::Type HasMultipleComponents; + typedef typename internal::VecTraitsMultipleComponentChooser::Type + HasMultipleComponents; /// A tag specifying whether the size of this vector is known at compile /// time. If set to \c VecTraitsTagSizeStatic, then \c NUM_COMPONENTS is set. @@ -167,37 +171,35 @@ struct VecTraits > /// Returns the value in a given component of the vector. /// VTKM_EXEC_CONT - static const ComponentType &GetComponent(const VecType &vector, - vtkm::IdComponent component) + static const ComponentType& GetComponent(const VecType& vector, vtkm::IdComponent component) { return vector[component]; } VTKM_EXEC_CONT - static ComponentType &GetComponent(VecType &vector, vtkm::IdComponent component) { + static ComponentType& GetComponent(VecType& vector, vtkm::IdComponent component) + { return vector[component]; } /// Changes the value in a given component of the vector. /// - VTKM_EXEC_CONT static void SetComponent(VecType &vector, - vtkm::IdComponent component, - ComponentType value) { + VTKM_EXEC_CONT static void SetComponent(VecType& vector, vtkm::IdComponent component, + ComponentType value) + { vector[component] = value; } /// Converts whatever type this vector is into the standard VTKm Tuple. /// - template - VTKM_EXEC_CONT - static void - CopyInto(const VecType &src, vtkm::Vec &dest) + template + VTKM_EXEC_CONT static void CopyInto(const VecType& src, vtkm::Vec& dest) { src.CopyInto(dest); } }; -template -struct VecTraits > +template +struct VecTraits> { using VecType = vtkm::VecC; @@ -208,7 +210,7 @@ struct VecTraits > /// Number of components in the given vector. /// VTKM_EXEC_CONT - static vtkm::IdComponent GetNumberOfComponents(const VecType &vector) + static vtkm::IdComponent GetNumberOfComponents(const VecType& vector) { return vector.GetNumberOfComponents(); } @@ -234,38 +236,35 @@ struct VecTraits > /// Returns the value in a given component of the vector. /// VTKM_EXEC_CONT - static const ComponentType &GetComponent(const VecType &vector, - vtkm::IdComponent component) + static const ComponentType& GetComponent(const VecType& vector, vtkm::IdComponent component) { return vector[component]; } VTKM_EXEC_CONT - static ComponentType &GetComponent(VecType &vector, vtkm::IdComponent component) { + static ComponentType& GetComponent(VecType& vector, vtkm::IdComponent component) + { return vector[component]; } /// Changes the value in a given component of the vector. /// VTKM_EXEC_CONT - static void SetComponent(VecType &vector, - vtkm::IdComponent component, - ComponentType value) { + static void SetComponent(VecType& vector, vtkm::IdComponent component, ComponentType value) + { vector[component] = value; } /// Converts whatever type this vector is into the standard VTKm Tuple. /// - template - VTKM_EXEC_CONT - static void - CopyInto(const VecType &src, vtkm::Vec &dest) + template + VTKM_EXEC_CONT static void CopyInto(const VecType& src, vtkm::Vec& dest) { src.CopyInto(dest); } }; -template -struct VecTraits > +template +struct VecTraits> { using VecType = vtkm::VecCConst; @@ -276,7 +275,7 @@ struct VecTraits > /// Number of components in the given vector. /// VTKM_EXEC_CONT - static vtkm::IdComponent GetNumberOfComponents(const VecType &vector) + static vtkm::IdComponent GetNumberOfComponents(const VecType& vector) { return vector.GetNumberOfComponents(); } @@ -302,8 +301,7 @@ struct VecTraits > /// Returns the value in a given component of the vector. /// VTKM_EXEC_CONT - static const ComponentType &GetComponent(const VecType &vector, - vtkm::IdComponent component) + static const ComponentType& GetComponent(const VecType& vector, vtkm::IdComponent component) { return vector[component]; } @@ -311,59 +309,51 @@ struct VecTraits > /// Changes the value in a given component of the vector. /// VTKM_EXEC_CONT - static void SetComponent(VecType &vector, - vtkm::IdComponent component, - ComponentType value) { + static void SetComponent(VecType& vector, vtkm::IdComponent component, ComponentType value) + { vector[component] = value; } /// Converts whatever type this vector is into the standard VTKm Tuple. /// - template - VTKM_EXEC_CONT - static void - CopyInto(const VecType &src, vtkm::Vec &dest) + template + VTKM_EXEC_CONT static void CopyInto(const VecType& src, vtkm::Vec& dest) { src.CopyInto(dest); } }; -namespace internal { +namespace internal +{ /// Used for overriding VecTraits for basic scalar types. /// -template -struct VecTraitsBasic { +template +struct VecTraitsBasic +{ typedef ScalarType ComponentType; static const vtkm::IdComponent NUM_COMPONENTS = 1; typedef VecTraitsTagSingleComponent HasMultipleComponents; typedef vtkm::VecTraitsTagSizeStatic IsSizeStatic; VTKM_EXEC_CONT - static vtkm::IdComponent GetNumberOfComponents(const ScalarType &) { - return 1; - } + static vtkm::IdComponent GetNumberOfComponents(const ScalarType&) { return 1; } VTKM_EXEC_CONT - static const ComponentType &GetComponent( - const ScalarType &vector, - vtkm::IdComponent) { + static const ComponentType& GetComponent(const ScalarType& vector, vtkm::IdComponent) + { return vector; } VTKM_EXEC_CONT - static ComponentType &GetComponent(ScalarType &vector, vtkm::IdComponent) { - return vector; - } + static ComponentType& GetComponent(ScalarType& vector, vtkm::IdComponent) { return vector; } - VTKM_EXEC_CONT static void SetComponent(ScalarType &vector, - vtkm::IdComponent, - ComponentType value) { + VTKM_EXEC_CONT static void SetComponent(ScalarType& vector, vtkm::IdComponent, + ComponentType value) + { vector = value; } - template - VTKM_EXEC_CONT - static void CopyInto(const ScalarType &src, - vtkm::Vec &dest) + template + VTKM_EXEC_CONT static void CopyInto(const ScalarType& src, vtkm::Vec& dest) { dest[0] = src; } @@ -377,19 +367,20 @@ struct VecTraitsBasic { /// every component, and a pair in general has a different type for each /// component. Thus we treat a pair as a "scalar" unit. /// -template -struct VecTraits > - : public vtkm::internal::VecTraitsBasic > +template +struct VecTraits> : public vtkm::internal::VecTraitsBasic> { }; } // anonymous namespace -#define VTKM_BASIC_TYPE_VECTOR(type) \ - namespace vtkm { \ - template<> \ - struct VecTraits \ - : public vtkm::internal::VecTraitsBasic { }; \ +#define VTKM_BASIC_TYPE_VECTOR(type) \ + namespace vtkm \ + { \ + template <> \ + struct VecTraits : public vtkm::internal::VecTraitsBasic \ + { \ + }; \ } /// Allows you to treat basic types as if they were vectors. @@ -409,7 +400,6 @@ VTKM_BASIC_TYPE_VECTOR(unsigned long) VTKM_BASIC_TYPE_VECTOR(long long) VTKM_BASIC_TYPE_VECTOR(unsigned long long) - //#undef VTKM_BASIC_TYPE_VECTOR #endif //vtk_m_VecTraits_h diff --git a/vtkm/VecVariable.h b/vtkm/VecVariable.h index d7684dad7..5116038c4 100644 --- a/vtkm/VecVariable.h +++ b/vtkm/VecVariable.h @@ -26,7 +26,8 @@ #include #include -namespace vtkm { +namespace vtkm +{ /// \brief A short variable-length array with maximum length. /// @@ -35,18 +36,20 @@ namespace vtkm { /// specified at compile time. Internally, \c VecVariable holds a \c Vec of /// the maximum length and exposes a subsection of it. /// -template +template class VecVariable { public: typedef T ComponentType; VTKM_EXEC_CONT - VecVariable() : NumComponents(0) { } + VecVariable() + : NumComponents(0) + { + } - template - VTKM_EXEC_CONT - VecVariable(const vtkm::VecVariable &src) + template + VTKM_EXEC_CONT VecVariable(const vtkm::VecVariable& src) : NumComponents(src.GetNumberOfComponents()) { VTKM_ASSERT(this->NumComponents <= MaxSize); @@ -56,9 +59,8 @@ public: } } - template - VTKM_EXEC_CONT - VecVariable(const vtkm::Vec &src) + template + VTKM_EXEC_CONT VecVariable(const vtkm::Vec& src) : NumComponents(SrcSize) { VTKM_ASSERT(this->NumComponents <= MaxSize); @@ -69,13 +71,10 @@ public: } VTKM_EXEC_CONT - vtkm::IdComponent GetNumberOfComponents() const { - return this->NumComponents; - } + vtkm::IdComponent GetNumberOfComponents() const { return this->NumComponents; } - template - VTKM_EXEC_CONT - void CopyInto(vtkm::Vec &dest) const + template + VTKM_EXEC_CONT void CopyInto(vtkm::Vec& dest) const { vtkm::IdComponent numComponents = vtkm::Min(DestSize, this->NumComponents); for (vtkm::IdComponent index = 0; index < numComponents; index++) @@ -85,16 +84,10 @@ public: } VTKM_EXEC_CONT - const ComponentType &operator[](vtkm::IdComponent index) const - { - return this->Data[index]; - } + const ComponentType& operator[](vtkm::IdComponent index) const { return this->Data[index]; } VTKM_EXEC_CONT - ComponentType &operator[](vtkm::IdComponent index) - { - return this->Data[index]; - } + ComponentType& operator[](vtkm::IdComponent index) { return this->Data[index]; } VTKM_EXEC_CONT void Append(ComponentType value) @@ -105,62 +98,58 @@ public: } private: - vtkm::Vec Data; + vtkm::Vec Data; vtkm::IdComponent NumComponents; }; -template -struct TypeTraits > +template +struct TypeTraits> { typedef typename vtkm::TypeTraits::NumericTag NumericTag; typedef TypeTraitsVectorTag DimensionalityTag; VTKM_EXEC_CONT - static vtkm::VecVariable ZeroInitialization() + static vtkm::VecVariable ZeroInitialization() { - return vtkm::VecVariable(); + return vtkm::VecVariable(); } }; -template -struct VecTraits > +template +struct VecTraits> { - typedef vtkm::VecVariable VecType; + typedef vtkm::VecVariable VecType; typedef typename VecType::ComponentType ComponentType; typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents; typedef vtkm::VecTraitsTagSizeVariable IsSizeStatic; VTKM_EXEC_CONT - static vtkm::IdComponent GetNumberOfComponents(const VecType &vector) { + static vtkm::IdComponent GetNumberOfComponents(const VecType& vector) + { return vector.GetNumberOfComponents(); } VTKM_EXEC_CONT - static const ComponentType &GetComponent(const VecType &vector, - vtkm::IdComponent componentIndex) + static const ComponentType& GetComponent(const VecType& vector, vtkm::IdComponent componentIndex) { return vector[componentIndex]; } VTKM_EXEC_CONT - static ComponentType &GetComponent(VecType &vector, - vtkm::IdComponent componentIndex) + static ComponentType& GetComponent(VecType& vector, vtkm::IdComponent componentIndex) { return vector[componentIndex]; } VTKM_EXEC_CONT - static void SetComponent(VecType &vector, - vtkm::IdComponent componentIndex, - const ComponentType &value) + static void SetComponent(VecType& vector, vtkm::IdComponent componentIndex, + const ComponentType& value) { vector[componentIndex] = value; } - template - VTKM_EXEC_CONT - static void CopyInto(const VecType &src, - vtkm::Vec &dest) + template + VTKM_EXEC_CONT static void CopyInto(const VecType& src, vtkm::Vec& dest) { src.CopyInto(dest); } diff --git a/vtkm/VectorAnalysis.h b/vtkm/VectorAnalysis.h index 9180ddde2..9521ec4fe 100644 --- a/vtkm/VectorAnalysis.h +++ b/vtkm/VectorAnalysis.h @@ -29,8 +29,8 @@ #include #include -namespace vtkm { - +namespace vtkm +{ // ---------------------------------------------------------------------------- /// \brief Returns the linear interpolation of two values based on weight @@ -40,30 +40,26 @@ namespace vtkm { /// vector of the same length as x and y. If w is outside [0,1] then lerp /// extrapolates. If w=0 => v0 is returned if w=1 => v1 is returned. /// -template -VTKM_EXEC_CONT -ValueType Lerp(const ValueType &value0, - const ValueType &value1, - const WeightType &weight) +template +VTKM_EXEC_CONT ValueType Lerp(const ValueType& value0, const ValueType& value1, + const WeightType& weight) { - return static_cast((WeightType(1)-weight)*value0+weight*value1); + return static_cast((WeightType(1) - weight) * value0 + weight * value1); } -template -VTKM_EXEC_CONT -vtkm::Vec Lerp(const vtkm::Vec &value0, - const vtkm::Vec &value1, - const WeightType &weight) +template +VTKM_EXEC_CONT vtkm::Vec Lerp(const vtkm::Vec& value0, + const vtkm::Vec& value1, + const WeightType& weight) { - return (WeightType(1)-weight)*value0+weight*value1; + return (WeightType(1) - weight) * value0 + weight * value1; } -template -VTKM_EXEC_CONT -vtkm::Vec Lerp(const vtkm::Vec &value0, - const vtkm::Vec &value1, - const vtkm::Vec &weight) +template +VTKM_EXEC_CONT vtkm::Vec Lerp(const vtkm::Vec& value0, + const vtkm::Vec& value1, + const vtkm::Vec& weight) { - static const vtkm::Vec One(ValueType(1)); - return (One-weight)*value0+weight*value1; + static const vtkm::Vec One(ValueType(1)); + return (One - weight) * value0 + weight * value1; } // ---------------------------------------------------------------------------- @@ -73,28 +69,25 @@ vtkm::Vec Lerp(const vtkm::Vec &value0, /// square, so you should use this function in place of Magnitude or RMagnitude /// when possible. /// -template -VTKM_EXEC_CONT -typename vtkm::VecTraits::ComponentType -MagnitudeSquared(const T &x) +template +VTKM_EXEC_CONT typename vtkm::VecTraits::ComponentType MagnitudeSquared(const T& x) { - return vtkm::dot(x,x); + return vtkm::dot(x, x); } // ---------------------------------------------------------------------------- -namespace detail { -template -VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -MagnitudeTemplate(T x, vtkm::TypeTraitsScalarTag) +namespace detail +{ +template +VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type MagnitudeTemplate( + T x, vtkm::TypeTraitsScalarTag) { return static_cast::Type>(vtkm::Abs(x)); } -template -VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -MagnitudeTemplate(const T &x, vtkm::TypeTraitsVectorTag) +template +VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type MagnitudeTemplate( + const T& x, vtkm::TypeTraitsVectorTag) { return vtkm::Sqrt(vtkm::MagnitudeSquared(x)); } @@ -109,29 +102,25 @@ MagnitudeTemplate(const T &x, vtkm::TypeTraitsVectorTag) /// to find the reciprocal magnitude, so RMagnitude should be used if you /// actually plan to divide by the magnitude. /// -template -VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -Magnitude(const T &x) +template +VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type Magnitude(const T& x) { - return detail::MagnitudeTemplate( - x, typename vtkm::TypeTraits::DimensionalityTag()); + return detail::MagnitudeTemplate(x, typename vtkm::TypeTraits::DimensionalityTag()); } // ---------------------------------------------------------------------------- -namespace detail { -template -VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -RMagnitudeTemplate(T x, vtkm::TypeTraitsScalarTag) +namespace detail { - return T(1)/vtkm::Abs(x); +template +VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type RMagnitudeTemplate( + T x, vtkm::TypeTraitsScalarTag) +{ + return T(1) / vtkm::Abs(x); } -template -VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -RMagnitudeTemplate(const T &x, vtkm::TypeTraitsVectorTag) +template +VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type RMagnitudeTemplate( + const T& x, vtkm::TypeTraitsVectorTag) { return vtkm::RSqrt(vtkm::MagnitudeSquared(x)); } @@ -142,29 +131,25 @@ RMagnitudeTemplate(const T &x, vtkm::TypeTraitsVectorTag) /// On some hardware RMagnitude is faster than Magnitude, but neither is /// as fast as MagnitudeSquared. /// -template -VTKM_EXEC_CONT -typename detail::FloatingPointReturnType::Type -RMagnitude(const T &x) +template +VTKM_EXEC_CONT typename detail::FloatingPointReturnType::Type RMagnitude(const T& x) { - return detail::RMagnitudeTemplate( - x, typename vtkm::TypeTraits::DimensionalityTag()); + return detail::RMagnitudeTemplate(x, typename vtkm::TypeTraits::DimensionalityTag()); } // ---------------------------------------------------------------------------- -namespace detail { -template -VTKM_EXEC_CONT -T NormalTemplate(T x, vtkm::TypeTraitsScalarTag) +namespace detail +{ +template +VTKM_EXEC_CONT T NormalTemplate(T x, vtkm::TypeTraitsScalarTag) { return vtkm::CopySign(T(1), x); } -template -VTKM_EXEC_CONT -T NormalTemplate(const T &x, vtkm::TypeTraitsVectorTag) +template +VTKM_EXEC_CONT T NormalTemplate(const T& x, vtkm::TypeTraitsVectorTag) { - return vtkm::RMagnitude(x)*x; + return vtkm::RMagnitude(x) * x; } } // namespace detail @@ -172,12 +157,10 @@ T NormalTemplate(const T &x, vtkm::TypeTraitsVectorTag) /// /// The resulting vector points in the same direction but has unit length. /// -template -VTKM_EXEC_CONT -T Normal(const T &x) +template +VTKM_EXEC_CONT T Normal(const T& x) { - return detail::NormalTemplate( - x, typename vtkm::TypeTraits::DimensionalityTag()); + return detail::NormalTemplate(x, typename vtkm::TypeTraits::DimensionalityTag()); } // ---------------------------------------------------------------------------- @@ -185,9 +168,8 @@ T Normal(const T &x) /// /// The given vector is scaled to be unit length. /// -template -VTKM_EXEC_CONT -void Normalize(T &x) +template +VTKM_EXEC_CONT void Normalize(T& x) { x = vtkm::Normal(x); } @@ -195,14 +177,12 @@ void Normalize(T &x) // ---------------------------------------------------------------------------- /// \brief Find the cross product of two vectors. /// -template -VTKM_EXEC_CONT -vtkm::Vec::Type,3> -Cross(const vtkm::Vec &x, const vtkm::Vec &y) +template +VTKM_EXEC_CONT vtkm::Vec::Type, 3> Cross( + const vtkm::Vec& x, const vtkm::Vec& y) { - return vtkm::Vec::Type,3>(x[1]*y[2] - x[2]*y[1], - x[2]*y[0] - x[0]*y[2], - x[0]*y[1] - x[1]*y[0]); + return vtkm::Vec::Type, 3>( + x[1] * y[2] - x[2] * y[1], x[2] * y[0] - x[0] * y[2], x[0] * y[1] - x[1] * y[0]); } //----------------------------------------------------------------------------- @@ -212,17 +192,13 @@ Cross(const vtkm::Vec &x, const vtkm::Vec &y) /// a triangle and the plane the triangle is on, returns a vector perpendicular /// to that triangle/plane. /// -template -VTKM_EXEC_CONT -vtkm::Vec::Type,3> -TriangleNormal(const vtkm::Vec &a, - const vtkm::Vec &b, - const vtkm::Vec &c) +template +VTKM_EXEC_CONT vtkm::Vec::Type, 3> TriangleNormal( + const vtkm::Vec& a, const vtkm::Vec& b, const vtkm::Vec& c) { - return vtkm::Cross(b-a, c-a); + return vtkm::Cross(b - a, c - a); } - } // namespace vtkm #endif //vtk_m_VectorAnalysis_h diff --git a/vtkm/benchmarking/BenchmarkDeviceAdapter.cxx b/vtkm/benchmarking/BenchmarkDeviceAdapter.cxx index 384b8c74c..2bc7b73d7 100644 --- a/vtkm/benchmarking/BenchmarkDeviceAdapter.cxx +++ b/vtkm/benchmarking/BenchmarkDeviceAdapter.cxx @@ -33,7 +33,6 @@ #include #include - #include #include #include @@ -42,115 +41,132 @@ #include -namespace vtkm { -namespace benchmarking { +namespace vtkm +{ +namespace benchmarking +{ #define ARRAY_SIZE (1 << 21) const static std::string DIVIDER(40, '-'); -enum BenchmarkName { - COPY = 1, - COPY_IF = 1 << 1, - LOWER_BOUNDS = 1 << 2, - REDUCE = 1 << 3, - REDUCE_BY_KEY = 1 << 4, +enum BenchmarkName +{ + COPY = 1, + COPY_IF = 1 << 1, + LOWER_BOUNDS = 1 << 2, + REDUCE = 1 << 3, + REDUCE_BY_KEY = 1 << 4, SCAN_INCLUSIVE = 1 << 5, SCAN_EXCLUSIVE = 1 << 6, - SORT = 1 << 7, - SORT_BY_KEY = 1 << 8, - UNIQUE = 1 << 9, - UPPER_BOUNDS = 1 << 10, - ALL = COPY | COPY_IF | LOWER_BOUNDS | REDUCE | REDUCE_BY_KEY | SCAN_INCLUSIVE - | SCAN_EXCLUSIVE | SORT | SORT_BY_KEY | UNIQUE | UPPER_BOUNDS + SORT = 1 << 7, + SORT_BY_KEY = 1 << 8, + UNIQUE = 1 << 9, + UPPER_BOUNDS = 1 << 10, + ALL = COPY | COPY_IF | LOWER_BOUNDS | REDUCE | REDUCE_BY_KEY | SCAN_INCLUSIVE | SCAN_EXCLUSIVE | + SORT | + SORT_BY_KEY | + UNIQUE | + UPPER_BOUNDS }; /// This class runs a series of micro-benchmarks to measure /// performance of the parallel primitives provided by each /// device adapter -template -class BenchmarkDeviceAdapter { +template +class BenchmarkDeviceAdapter +{ typedef vtkm::cont::StorageTagBasic StorageTag; typedef vtkm::cont::ArrayHandle IdArrayHandle; - typedef vtkm::cont::DeviceAdapterAlgorithm - Algorithm; + typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; typedef vtkm::cont::Timer Timer; public: // Various kernels used by the different benchmarks to accelerate // initialization of data - template - struct FillTestValueKernel : vtkm::exec::FunctorBase { + template + struct FillTestValueKernel : vtkm::exec::FunctorBase + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; - typedef typename ValueArrayHandle::template ExecutionTypes - ::Portal PortalType; + typedef typename ValueArrayHandle::template ExecutionTypes::Portal PortalType; PortalType Output; VTKM_CONT - FillTestValueKernel(PortalType out) : Output(out){} - - VTKM_EXEC void operator()(vtkm::Id i) const { - Output.Set(i, TestValue(i, Value())); + FillTestValueKernel(PortalType out) + : Output(out) + { } + + VTKM_EXEC void operator()(vtkm::Id i) const { Output.Set(i, TestValue(i, Value())); } }; - template - struct FillScaledTestValueKernel : vtkm::exec::FunctorBase { + template + struct FillScaledTestValueKernel : vtkm::exec::FunctorBase + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; - typedef typename ValueArrayHandle::template ExecutionTypes - ::Portal PortalType; + typedef typename ValueArrayHandle::template ExecutionTypes::Portal PortalType; PortalType Output; const vtkm::Id IdScale; VTKM_CONT - FillScaledTestValueKernel(vtkm::Id id_scale, PortalType out) : Output(out), IdScale(id_scale) {} - - VTKM_EXEC void operator()(vtkm::Id i) const { - Output.Set(i, TestValue(i * IdScale, Value())); + FillScaledTestValueKernel(vtkm::Id id_scale, PortalType out) + : Output(out) + , IdScale(id_scale) + { } + + VTKM_EXEC void operator()(vtkm::Id i) const { Output.Set(i, TestValue(i * IdScale, Value())); } }; - template - struct FillModuloTestValueKernel : vtkm::exec::FunctorBase { + template + struct FillModuloTestValueKernel : vtkm::exec::FunctorBase + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; - typedef typename ValueArrayHandle::template ExecutionTypes - ::Portal PortalType; + typedef typename ValueArrayHandle::template ExecutionTypes::Portal PortalType; PortalType Output; const vtkm::Id Modulus; VTKM_CONT - FillModuloTestValueKernel(vtkm::Id modulus, PortalType out) : Output(out), Modulus(modulus) {} - - VTKM_EXEC void operator()(vtkm::Id i) const { - Output.Set(i, TestValue(i % Modulus, Value())); + FillModuloTestValueKernel(vtkm::Id modulus, PortalType out) + : Output(out) + , Modulus(modulus) + { } + + VTKM_EXEC void operator()(vtkm::Id i) const { Output.Set(i, TestValue(i % Modulus, Value())); } }; - template - struct FillBinaryTestValueKernel : vtkm::exec::FunctorBase { + template + struct FillBinaryTestValueKernel : vtkm::exec::FunctorBase + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; - typedef typename ValueArrayHandle::template ExecutionTypes - ::Portal PortalType; + typedef typename ValueArrayHandle::template ExecutionTypes::Portal PortalType; PortalType Output; const vtkm::Id Modulus; VTKM_CONT - FillBinaryTestValueKernel(vtkm::Id modulus, PortalType out) : Output(out), Modulus(modulus) {} + FillBinaryTestValueKernel(vtkm::Id modulus, PortalType out) + : Output(out) + , Modulus(modulus) + { + } - VTKM_EXEC void operator()(vtkm::Id i) const { + VTKM_EXEC void operator()(vtkm::Id i) const + { Output.Set(i, i % Modulus == 0 ? TestValue(vtkm::Id(1), Value()) : Value()); } }; private: - template - struct BenchCopy { + template + struct BenchCopy + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; ValueArrayHandle ValueHandle_src; @@ -158,32 +174,37 @@ private: std::mt19937 Rng; VTKM_CONT - BenchCopy(){ + BenchCopy() + { ValueHandle_src.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag()); ValueHandle_dst.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag()); } VTKM_CONT - vtkm::Float64 operator()(){ - for (vtkm::Id i = 0; i < ValueHandle_src.GetNumberOfValues(); ++i){ - ValueHandle_src.GetPortalControl().Set(vtkm::Id(i), TestValue(vtkm::Id(Rng()), Value())); + vtkm::Float64 operator()() + { + for (vtkm::Id i = 0; i < ValueHandle_src.GetNumberOfValues(); ++i) + { + ValueHandle_src.GetPortalControl().Set(vtkm::Id(i), TestValue(vtkm::Id(Rng()), Value())); } Timer timer; - Algorithm::Copy(ValueHandle_src,ValueHandle_dst); + Algorithm::Copy(ValueHandle_src, ValueHandle_dst); return timer.GetElapsedTime(); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "Copy " << ARRAY_SIZE << " values"; return description.str(); } }; - VTKM_MAKE_BENCHMARK(Copy, BenchCopy); + VTKM_MAKE_BENCHMARK(Copy, BenchCopy); - template - struct BenchCopyIf { + template + struct BenchCopyIf + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; const vtkm::Id N_VALID; @@ -191,28 +212,32 @@ private: IdArrayHandle StencilHandle; VTKM_CONT - BenchCopyIf(vtkm::Id percent_valid) : N_VALID((ARRAY_SIZE * percent_valid) / 100) + BenchCopyIf(vtkm::Id percent_valid) + : N_VALID((ARRAY_SIZE * percent_valid) / 100) { vtkm::Id modulo = ARRAY_SIZE / N_VALID; - Algorithm::Schedule(FillTestValueKernel( - ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); - Algorithm::Schedule(FillBinaryTestValueKernel(modulo, - StencilHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); + Algorithm::Schedule( + FillTestValueKernel(ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); + Algorithm::Schedule(FillBinaryTestValueKernel( + modulo, StencilHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); } VTKM_CONT - vtkm::Float64 operator()() { + vtkm::Float64 operator()() + { Timer timer; Algorithm::CopyIf(ValueHandle, StencilHandle, OutHandle); return timer.GetElapsedTime(); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "CopyIf on " << ARRAY_SIZE << " " - << " values with " << OutHandle.GetNumberOfValues() - << " valid values"; + << " values with " << OutHandle.GetNumberOfValues() << " valid values"; return description.str(); } }; @@ -223,8 +248,9 @@ private: VTKM_MAKE_BENCHMARK(CopyIf25, BenchCopyIf, 25); VTKM_MAKE_BENCHMARK(CopyIf30, BenchCopyIf, 30); - template - struct BenchLowerBounds { + template + struct BenchLowerBounds + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; const vtkm::Id N_VALS; @@ -232,26 +258,30 @@ private: IdArrayHandle OutHandle; VTKM_CONT - BenchLowerBounds(vtkm::Id value_percent) : N_VALS((ARRAY_SIZE * value_percent) / 100) + BenchLowerBounds(vtkm::Id value_percent) + : N_VALS((ARRAY_SIZE * value_percent) / 100) { - Algorithm::Schedule(FillTestValueKernel( - InputHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); - Algorithm::Schedule(FillScaledTestValueKernel(2, - ValueHandle.PrepareForOutput(N_VALS, DeviceAdapterTag())), N_VALS); + Algorithm::Schedule( + FillTestValueKernel(InputHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); + Algorithm::Schedule(FillScaledTestValueKernel( + 2, ValueHandle.PrepareForOutput(N_VALS, DeviceAdapterTag())), + N_VALS); } VTKM_CONT - vtkm::Float64 operator()(){ + vtkm::Float64 operator()() + { Timer timer; Algorithm::LowerBounds(InputHandle, ValueHandle, OutHandle); return timer.GetElapsedTime(); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; - description << "LowerBounds on " << ARRAY_SIZE << " input and " - << N_VALS << " values"; + description << "LowerBounds on " << ARRAY_SIZE << " input and " << N_VALS << " values"; return description.str(); } }; @@ -262,27 +292,32 @@ private: VTKM_MAKE_BENCHMARK(LowerBounds25, BenchLowerBounds, 25); VTKM_MAKE_BENCHMARK(LowerBounds30, BenchLowerBounds, 30); - template - struct BenchReduce { + template + struct BenchReduce + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; ValueArrayHandle InputHandle; VTKM_CONT - BenchReduce(){ - Algorithm::Schedule(FillTestValueKernel( - InputHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); + BenchReduce() + { + Algorithm::Schedule( + FillTestValueKernel(InputHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); } VTKM_CONT - vtkm::Float64 operator()(){ + vtkm::Float64 operator()() + { Timer timer; Algorithm::Reduce(InputHandle, Value()); return timer.GetElapsedTime(); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "Reduce on " << ARRAY_SIZE << " values"; return description.str(); @@ -290,8 +325,9 @@ private: }; VTKM_MAKE_BENCHMARK(Reduce, BenchReduce); - template - struct BenchReduceByKey { + template + struct BenchReduceByKey + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; const vtkm::Id N_KEYS; @@ -299,28 +335,32 @@ private: IdArrayHandle KeyHandle, KeysOut; VTKM_CONT - BenchReduceByKey(vtkm::Id key_percent) : N_KEYS((ARRAY_SIZE * key_percent) / 100) + BenchReduceByKey(vtkm::Id key_percent) + : N_KEYS((ARRAY_SIZE * key_percent) / 100) { - Algorithm::Schedule(FillTestValueKernel( - ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); - Algorithm::Schedule(FillModuloTestValueKernel(N_KEYS, - KeyHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); + Algorithm::Schedule( + FillTestValueKernel(ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); + Algorithm::Schedule(FillModuloTestValueKernel( + N_KEYS, KeyHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); Algorithm::SortByKey(KeyHandle, ValueHandle); } VTKM_CONT - vtkm::Float64 operator()(){ + vtkm::Float64 operator()() + { Timer timer; - Algorithm::ReduceByKey(KeyHandle, ValueHandle, KeysOut, ValuesOut, - vtkm::Add()); + Algorithm::ReduceByKey(KeyHandle, ValueHandle, KeysOut, ValuesOut, vtkm::Add()); return timer.GetElapsedTime(); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; - description << "ReduceByKey on " << ARRAY_SIZE - << " values with " << N_KEYS << " distinct vtkm::Id keys"; + description << "ReduceByKey on " << ARRAY_SIZE << " values with " << N_KEYS + << " distinct vtkm::Id keys"; return description.str(); } }; @@ -331,26 +371,31 @@ private: VTKM_MAKE_BENCHMARK(ReduceByKey25, BenchReduceByKey, 25); VTKM_MAKE_BENCHMARK(ReduceByKey30, BenchReduceByKey, 30); - template - struct BenchScanInclusive { + template + struct BenchScanInclusive + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; ValueArrayHandle ValueHandle, OutHandle; VTKM_CONT - BenchScanInclusive(){ - Algorithm::Schedule(FillTestValueKernel( - ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); + BenchScanInclusive() + { + Algorithm::Schedule( + FillTestValueKernel(ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); } VTKM_CONT - vtkm::Float64 operator()(){ + vtkm::Float64 operator()() + { Timer timer; Algorithm::ScanInclusive(ValueHandle, OutHandle); return timer.GetElapsedTime(); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "ScanInclusive on " << ARRAY_SIZE << " values"; return description.str(); @@ -358,27 +403,32 @@ private: }; VTKM_MAKE_BENCHMARK(ScanInclusive, BenchScanInclusive); - template - struct BenchScanExclusive { + template + struct BenchScanExclusive + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; ValueArrayHandle ValueHandle, OutHandle; VTKM_CONT - BenchScanExclusive(){ - Algorithm::Schedule(FillTestValueKernel( - ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); + BenchScanExclusive() + { + Algorithm::Schedule( + FillTestValueKernel(ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); } VTKM_CONT - vtkm::Float64 operator()(){ + vtkm::Float64 operator()() + { Timer timer; Algorithm::ScanExclusive(ValueHandle, OutHandle); return timer.GetElapsedTime(); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "ScanExclusive on " << ARRAY_SIZE << " values"; return description.str(); @@ -386,21 +436,22 @@ private: }; VTKM_MAKE_BENCHMARK(ScanExclusive, BenchScanExclusive); - template - struct BenchSort { + template + struct BenchSort + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; ValueArrayHandle ValueHandle; std::mt19937 Rng; VTKM_CONT - BenchSort(){ - ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag()); - } + BenchSort() { ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag()); } VTKM_CONT - vtkm::Float64 operator()(){ - for (vtkm::Id i = 0; i < ValueHandle.GetNumberOfValues(); ++i){ + vtkm::Float64 operator()() + { + for (vtkm::Id i = 0; i < ValueHandle.GetNumberOfValues(); ++i) + { ValueHandle.GetPortalControl().Set(vtkm::Id(i), TestValue(vtkm::Id(Rng()), Value())); } Timer timer; @@ -409,7 +460,8 @@ private: } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "Sort on " << ARRAY_SIZE << " random values"; return description.str(); @@ -417,8 +469,9 @@ private: }; VTKM_MAKE_BENCHMARK(Sort, BenchSort); - template - struct BenchSortByKey { + template + struct BenchSortByKey + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; std::mt19937 Rng; @@ -427,27 +480,33 @@ private: IdArrayHandle KeyHandle; VTKM_CONT - BenchSortByKey(vtkm::Id percent_key) : N_KEYS((ARRAY_SIZE * percent_key) / 100){ + BenchSortByKey(vtkm::Id percent_key) + : N_KEYS((ARRAY_SIZE * percent_key) / 100) + { ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag()); } VTKM_CONT - vtkm::Float64 operator()(){ - for (vtkm::Id i = 0; i < ValueHandle.GetNumberOfValues(); ++i){ + vtkm::Float64 operator()() + { + for (vtkm::Id i = 0; i < ValueHandle.GetNumberOfValues(); ++i) + { ValueHandle.GetPortalControl().Set(vtkm::Id(i), TestValue(vtkm::Id(Rng()), Value())); } - Algorithm::Schedule(FillModuloTestValueKernel(N_KEYS, - KeyHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); + Algorithm::Schedule(FillModuloTestValueKernel( + N_KEYS, KeyHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); Timer timer; Algorithm::SortByKey(ValueHandle, KeyHandle); return timer.GetElapsedTime(); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; - description << "SortByKey on " << ARRAY_SIZE - << " random values with " << N_KEYS << " different vtkm::Id keys"; + description << "SortByKey on " << ARRAY_SIZE << " random values with " << N_KEYS + << " different vtkm::Id keys"; return description.str(); } }; @@ -458,21 +517,26 @@ private: VTKM_MAKE_BENCHMARK(SortByKey25, BenchSortByKey, 25); VTKM_MAKE_BENCHMARK(SortByKey30, BenchSortByKey, 30); - template - struct BenchUnique { + template + struct BenchUnique + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; const vtkm::Id N_VALID; ValueArrayHandle ValueHandle; VTKM_CONT - BenchUnique(vtkm::Id percent_valid) : N_VALID((ARRAY_SIZE * percent_valid) / 100) - {} + BenchUnique(vtkm::Id percent_valid) + : N_VALID((ARRAY_SIZE * percent_valid) / 100) + { + } VTKM_CONT - vtkm::Float64 operator()(){ - Algorithm::Schedule(FillModuloTestValueKernel(N_VALID, - ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); + vtkm::Float64 operator()() + { + Algorithm::Schedule(FillModuloTestValueKernel( + N_VALID, ValueHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); Algorithm::Sort(ValueHandle); Timer timer; Algorithm::Unique(ValueHandle); @@ -480,10 +544,11 @@ private: } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "Unique on " << ARRAY_SIZE << " values with " - << ValueHandle.GetNumberOfValues() << " valid values"; + << ValueHandle.GetNumberOfValues() << " valid values"; return description.str(); } }; @@ -494,8 +559,9 @@ private: VTKM_MAKE_BENCHMARK(Unique25, BenchUnique, 25); VTKM_MAKE_BENCHMARK(Unique30, BenchUnique, 30); - template - struct BenchUpperBounds { + template + struct BenchUpperBounds + { typedef vtkm::cont::ArrayHandle ValueArrayHandle; const vtkm::Id N_VALS; @@ -503,26 +569,30 @@ private: IdArrayHandle OutHandle; VTKM_CONT - BenchUpperBounds(vtkm::Id percent_vals) : N_VALS((ARRAY_SIZE * percent_vals) / 100) + BenchUpperBounds(vtkm::Id percent_vals) + : N_VALS((ARRAY_SIZE * percent_vals) / 100) { - Algorithm::Schedule(FillTestValueKernel( - InputHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); - Algorithm::Schedule(FillScaledTestValueKernel(2, - ValueHandle.PrepareForOutput(N_VALS, DeviceAdapterTag())), N_VALS); + Algorithm::Schedule( + FillTestValueKernel(InputHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); + Algorithm::Schedule(FillScaledTestValueKernel( + 2, ValueHandle.PrepareForOutput(N_VALS, DeviceAdapterTag())), + N_VALS); } VTKM_CONT - vtkm::Float64 operator()(){ + vtkm::Float64 operator()() + { Timer timer; Algorithm::UpperBounds(InputHandle, ValueHandle, OutHandle); return timer.GetElapsedTime(); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; - description << "UpperBounds on " << ARRAY_SIZE << " input and " - << N_VALS << " values"; + description << "UpperBounds on " << ARRAY_SIZE << " input and " << N_VALS << " values"; return description.str(); } }; @@ -534,22 +604,25 @@ private: VTKM_MAKE_BENCHMARK(UpperBounds30, BenchUpperBounds, 30); public: + struct ValueTypes + : vtkm::ListTagBase, vtkm::Vec, vtkm::Float32, + vtkm::Float64, vtkm::Vec, vtkm::Vec> + { + }; - struct ValueTypes : vtkm::ListTagBase, - vtkm::Vec, vtkm::Float32, - vtkm::Float64, vtkm::Vec, - vtkm::Vec >{}; - - static VTKM_CONT int Run(int benchmarks){ + static VTKM_CONT int Run(int benchmarks) + { std::cout << DIVIDER << "\nRunning DeviceAdapter benchmarks\n"; - if (benchmarks & COPY) { + if (benchmarks & COPY) + { std::cout << DIVIDER << "\nBenchmarking Copy\n"; VTKM_RUN_BENCHMARK(Copy, ValueTypes()); } - if (benchmarks & COPY_IF){ + if (benchmarks & COPY_IF) + { std::cout << "\n" << DIVIDER << "\nBenchmarking CopyIf\n"; VTKM_RUN_BENCHMARK(CopyIf5, ValueTypes()); VTKM_RUN_BENCHMARK(CopyIf10, ValueTypes()); @@ -559,7 +632,8 @@ public: VTKM_RUN_BENCHMARK(CopyIf30, ValueTypes()); } - if (benchmarks & LOWER_BOUNDS){ + if (benchmarks & LOWER_BOUNDS) + { std::cout << DIVIDER << "\nBenchmarking LowerBounds\n"; VTKM_RUN_BENCHMARK(LowerBounds5, ValueTypes()); VTKM_RUN_BENCHMARK(LowerBounds10, ValueTypes()); @@ -569,12 +643,14 @@ public: VTKM_RUN_BENCHMARK(LowerBounds30, ValueTypes()); } - if (benchmarks & REDUCE){ + if (benchmarks & REDUCE) + { std::cout << "\n" << DIVIDER << "\nBenchmarking Reduce\n"; VTKM_RUN_BENCHMARK(Reduce, ValueTypes()); } - if (benchmarks & REDUCE_BY_KEY){ + if (benchmarks & REDUCE_BY_KEY) + { std::cout << "\n" << DIVIDER << "\nBenchmarking ReduceByKey\n"; VTKM_RUN_BENCHMARK(ReduceByKey5, ValueTypes()); VTKM_RUN_BENCHMARK(ReduceByKey10, ValueTypes()); @@ -584,22 +660,26 @@ public: VTKM_RUN_BENCHMARK(ReduceByKey30, ValueTypes()); } - if (benchmarks & SCAN_INCLUSIVE){ + if (benchmarks & SCAN_INCLUSIVE) + { std::cout << "\n" << DIVIDER << "\nBenchmarking ScanInclusive\n"; VTKM_RUN_BENCHMARK(ScanInclusive, ValueTypes()); } - if (benchmarks & SCAN_EXCLUSIVE){ + if (benchmarks & SCAN_EXCLUSIVE) + { std::cout << "\n" << DIVIDER << "\nBenchmarking ScanExclusive\n"; VTKM_RUN_BENCHMARK(ScanExclusive, ValueTypes()); } - if (benchmarks & SORT){ + if (benchmarks & SORT) + { std::cout << "\n" << DIVIDER << "\nBenchmarking Sort\n"; VTKM_RUN_BENCHMARK(Sort, ValueTypes()); } - if (benchmarks & SORT_BY_KEY){ + if (benchmarks & SORT_BY_KEY) + { std::cout << "\n" << DIVIDER << "\nBenchmarking SortByKey\n"; VTKM_RUN_BENCHMARK(SortByKey5, ValueTypes()); VTKM_RUN_BENCHMARK(SortByKey10, ValueTypes()); @@ -609,7 +689,8 @@ public: VTKM_RUN_BENCHMARK(SortByKey30, ValueTypes()); } - if (benchmarks & UNIQUE){ + if (benchmarks & UNIQUE) + { std::cout << "\n" << DIVIDER << "\nBenchmarking Unique\n"; VTKM_RUN_BENCHMARK(Unique5, ValueTypes()); VTKM_RUN_BENCHMARK(Unique10, ValueTypes()); @@ -619,7 +700,8 @@ public: VTKM_RUN_BENCHMARK(Unique30, ValueTypes()); } - if (benchmarks & UPPER_BOUNDS){ + if (benchmarks & UPPER_BOUNDS) + { std::cout << "\n" << DIVIDER << "\nBenchmarking UpperBounds\n"; VTKM_RUN_BENCHMARK(UpperBounds5, ValueTypes()); VTKM_RUN_BENCHMARK(UpperBounds10, ValueTypes()); @@ -633,54 +715,68 @@ public: }; #undef ARRAY_SIZE - } } // namespace vtkm::benchmarking -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { int benchmarks = 0; - if (argc < 2){ + if (argc < 2) + { benchmarks = vtkm::benchmarking::ALL; } - else { - for (int i = 1; i < argc; ++i){ + else + { + for (int i = 1; i < argc; ++i) + { std::string arg = argv[i]; std::transform(arg.begin(), arg.end(), arg.begin(), ::tolower); - if (arg == "copy"){ + if (arg == "copy") + { benchmarks |= vtkm::benchmarking::COPY; } - else if (arg == "copyif"){ + else if (arg == "copyif") + { benchmarks |= vtkm::benchmarking::COPY_IF; } - else if (arg == "lowerbounds"){ + else if (arg == "lowerbounds") + { benchmarks |= vtkm::benchmarking::LOWER_BOUNDS; } - else if (arg == "reduce"){ + else if (arg == "reduce") + { benchmarks |= vtkm::benchmarking::REDUCE; } - else if (arg == "reducebykey"){ + else if (arg == "reducebykey") + { benchmarks |= vtkm::benchmarking::REDUCE_BY_KEY; } - else if (arg == "scaninclusive"){ + else if (arg == "scaninclusive") + { benchmarks |= vtkm::benchmarking::SCAN_INCLUSIVE; } - else if (arg == "scanexclusive"){ + else if (arg == "scanexclusive") + { benchmarks |= vtkm::benchmarking::SCAN_EXCLUSIVE; } - else if (arg == "sort"){ + else if (arg == "sort") + { benchmarks |= vtkm::benchmarking::SORT; } - else if (arg == "sortbykey"){ + else if (arg == "sortbykey") + { benchmarks |= vtkm::benchmarking::SORT_BY_KEY; } - else if (arg == "unique"){ + else if (arg == "unique") + { benchmarks |= vtkm::benchmarking::UNIQUE; } - else if (arg == "upperbounds"){ + else if (arg == "upperbounds") + { benchmarks |= vtkm::benchmarking::UPPER_BOUNDS; } - else { + else + { std::cout << "Unrecognized benchmark: " << argv[i] << std::endl; return 1; } @@ -688,7 +784,6 @@ int main(int argc, char *argv[]) } //now actually execute the benchmarks - return vtkm::benchmarking::BenchmarkDeviceAdapter - ::Run(benchmarks); + return vtkm::benchmarking::BenchmarkDeviceAdapter::Run( + benchmarks); } - diff --git a/vtkm/benchmarking/BenchmarkFieldAlgorithms.cxx b/vtkm/benchmarking/BenchmarkFieldAlgorithms.cxx index 0b8232410..58fc0ccdc 100644 --- a/vtkm/benchmarking/BenchmarkFieldAlgorithms.cxx +++ b/vtkm/benchmarking/BenchmarkFieldAlgorithms.cxx @@ -18,7 +18,6 @@ // this software. //============================================================================ - #include #include @@ -39,101 +38,100 @@ #include #include -namespace vtkm { -namespace benchmarking { +namespace vtkm +{ +namespace benchmarking +{ #define ARRAY_SIZE (1 << 22) #define CUBE_SIZE 256 const static std::string DIVIDER(40, '-'); -enum BenchmarkName { +enum BenchmarkName +{ BLACK_SCHOLES = 1, MATH = 1 << 1, FUSED_MATH = 1 << 2, INTERPOLATE_FIELD = 1 << 3, IMPLICIT_FUNCTION = 1 << 4, - ALL = BLACK_SCHOLES | - MATH | - FUSED_MATH | - INTERPOLATE_FIELD | - IMPLICIT_FUNCTION + ALL = BLACK_SCHOLES | MATH | FUSED_MATH | INTERPOLATE_FIELD | IMPLICIT_FUNCTION }; -template +template class BlackScholes : public vtkm::worklet::WorkletMapField { T Riskfree; T Volatility; -public: - typedef void ControlSignature(FieldIn, FieldIn, - FieldIn, FieldOut, - FieldOut); - typedef void ExecutionSignature(_1,_2,_3,_4,_5); - BlackScholes(T risk, T volatility): - Riskfree(risk), - Volatility(volatility) +public: + typedef void ControlSignature(FieldIn, FieldIn, FieldIn, FieldOut, + FieldOut); + typedef void ExecutionSignature(_1, _2, _3, _4, _5); + + BlackScholes(T risk, T volatility) + : Riskfree(risk) + , Volatility(volatility) { } VTKM_EXEC T CumulativeNormalDistribution(T d) const { - const vtkm::Float32 A1 = 0.31938153f; - const vtkm::Float32 A2 = -0.356563782f; - const vtkm::Float32 A3 = 1.781477937f; - const vtkm::Float32 A4 = -1.821255978f; - const vtkm::Float32 A5 = 1.330274429f; - const vtkm::Float32 RSQRT2PI = 0.39894228040143267793994605993438f; + const vtkm::Float32 A1 = 0.31938153f; + const vtkm::Float32 A2 = -0.356563782f; + const vtkm::Float32 A3 = 1.781477937f; + const vtkm::Float32 A4 = -1.821255978f; + const vtkm::Float32 A5 = 1.330274429f; + const vtkm::Float32 RSQRT2PI = 0.39894228040143267793994605993438f; const vtkm::Float32 df = static_cast(d); - const vtkm::Float32 K = 1.0f / ( 1.0f + 0.2316419f * vtkm::Abs(df)); + const vtkm::Float32 K = 1.0f / (1.0f + 0.2316419f * vtkm::Abs(df)); - vtkm::Float32 cnd = RSQRT2PI * vtkm::Exp(-0.5f * df * df) * - (K * (A1 + K * (A2 + K * (A3 + K * (A4 + K * A5))))); + vtkm::Float32 cnd = + RSQRT2PI * vtkm::Exp(-0.5f * df * df) * (K * (A1 + K * (A2 + K * (A3 + K * (A4 + K * A5))))); - if(df > 0.0f) - { + if (df > 0.0f) + { cnd = 1.0f - cnd; - } + } return static_cast(cnd); } template - VTKM_EXEC void operator()(const U& sp, const V& os, const W& oy, - T& callResult, T& putResult) const + VTKM_EXEC void operator()(const U& sp, const V& os, const W& oy, T& callResult, + T& putResult) const { - const T stockPrice = static_cast(sp); - const T optionStrike = static_cast(os); - const T optionYears = static_cast(oy); + const T stockPrice = static_cast(sp); + const T optionStrike = static_cast(os); + const T optionYears = static_cast(oy); - // Black-Scholes formula for both call and put - const T sqrtYears = vtkm::Sqrt(optionYears); - const T volMultSqY = this->Volatility * sqrtYears; + // Black-Scholes formula for both call and put + const T sqrtYears = vtkm::Sqrt(optionYears); + const T volMultSqY = this->Volatility * sqrtYears; - const T d1 = ( vtkm::Log(stockPrice / optionStrike) + (this->Riskfree + 0.5f * Volatility * Volatility) * optionYears) / (volMultSqY); - const T d2 = d1 - volMultSqY; - const T CNDD1 = CumulativeNormalDistribution(d1); - const T CNDD2 = CumulativeNormalDistribution(d2); + const T d1 = (vtkm::Log(stockPrice / optionStrike) + + (this->Riskfree + 0.5f * Volatility * Volatility) * optionYears) / + (volMultSqY); + const T d2 = d1 - volMultSqY; + const T CNDD1 = CumulativeNormalDistribution(d1); + const T CNDD2 = CumulativeNormalDistribution(d2); - //Calculate Call and Put simultaneously - T expRT = vtkm::Exp( - this->Riskfree * optionYears); - callResult = stockPrice * CNDD1 - optionStrike * expRT * CNDD2; - putResult = optionStrike * expRT * (1.0f - CNDD2) - stockPrice * (1.0f - CNDD1); + //Calculate Call and Put simultaneously + T expRT = vtkm::Exp(-this->Riskfree * optionYears); + callResult = stockPrice * CNDD1 - optionStrike * expRT * CNDD2; + putResult = optionStrike * expRT * (1.0f - CNDD2) - stockPrice * (1.0f - CNDD1); } - }; class Mag : public vtkm::worklet::WorkletMapField { public: typedef void ControlSignature(FieldIn, FieldOut); - typedef void ExecutionSignature(_1,_2); + typedef void ExecutionSignature(_1, _2); - template - VTKM_EXEC - void operator()(const vtkm::Vec& vec, U& result) const + template + VTKM_EXEC void operator()(const vtkm::Vec& vec, U& result) const { result = static_cast(vtkm::Magnitude(vec)); } @@ -143,11 +141,10 @@ class Square : public vtkm::worklet::WorkletMapField { public: typedef void ControlSignature(FieldIn, FieldOut); - typedef void ExecutionSignature(_1,_2); + typedef void ExecutionSignature(_1, _2); - template - VTKM_EXEC - void operator()(T input, U& output) const + template + VTKM_EXEC void operator()(T input, U& output) const { output = static_cast(input * input); } @@ -157,11 +154,10 @@ class Sin : public vtkm::worklet::WorkletMapField { public: typedef void ControlSignature(FieldIn, FieldOut); - typedef void ExecutionSignature(_1,_2); + typedef void ExecutionSignature(_1, _2); - template - VTKM_EXEC - void operator()(T input, U& output) const + template + VTKM_EXEC void operator()(T input, U& output) const { output = static_cast(vtkm::Sin(input)); } @@ -171,11 +167,10 @@ class Cos : public vtkm::worklet::WorkletMapField { public: typedef void ControlSignature(FieldIn, FieldOut); - typedef void ExecutionSignature(_1,_2); + typedef void ExecutionSignature(_1, _2); - template - VTKM_EXEC - void operator()(T input, U& output) const + template + VTKM_EXEC void operator()(T input, U& output) const { output = static_cast(vtkm::Cos(input)); } @@ -185,19 +180,17 @@ class FusedMath : public vtkm::worklet::WorkletMapField { public: typedef void ControlSignature(FieldIn, FieldOut); - typedef void ExecutionSignature(_1,_2); + typedef void ExecutionSignature(_1, _2); - template - VTKM_EXEC - void operator()(const vtkm::Vec& vec, T& result) const + template + VTKM_EXEC void operator()(const vtkm::Vec& vec, T& result) const { const T m = vtkm::Magnitude(vec); - result = vtkm::Cos( vtkm::Sin(m) * vtkm::Sin(m) ); + result = vtkm::Cos(vtkm::Sin(m) * vtkm::Sin(m)); } - template - VTKM_EXEC - void operator()(const vtkm::Vec& , U& ) const + template + VTKM_EXEC void operator()(const vtkm::Vec&, U&) const { this->RaiseError("Mixed types unsupported."); } @@ -206,30 +199,25 @@ public: class GenerateEdges : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature( CellSetIn cellset, WholeArrayOut< > edgeIds); + typedef void ControlSignature(CellSetIn cellset, WholeArrayOut<> edgeIds); typedef void ExecutionSignature(PointIndices, ThreadIndices, _2); typedef _1 InputDomain; - template - VTKM_EXEC - void operator()(const ConnectivityInVec &connectivity, - const ThreadIndicesType threadIndices, - const IdPairTableType &edgeIds) const + template + VTKM_EXEC void operator()(const ConnectivityInVec& connectivity, + const ThreadIndicesType threadIndices, + const IdPairTableType& edgeIds) const { - const vtkm::Id writeOffset = (threadIndices.GetInputIndex() * 12); + const vtkm::Id writeOffset = (threadIndices.GetInputIndex() * 12); - const vtkm::IdComponent edgeTable[24] = { 0, 1, 1, 2, 3, 2, 0, 3, - 4, 5, 5, 6, 7, 6, 4, 7, - 0, 4, 1, 5, 2, 6, 3, 7 }; + const vtkm::IdComponent edgeTable[24] = { 0, 1, 1, 2, 3, 2, 0, 3, 4, 5, 5, 6, + 7, 6, 4, 7, 0, 4, 1, 5, 2, 6, 3, 7 }; - for(vtkm::Id i=0; i < 12; ++i) + for (vtkm::Id i = 0; i < 12; ++i) { - const vtkm::Id offset = (i*2); - const vtkm::Id2 edge( connectivity[ edgeTable[offset] ], - connectivity[ edgeTable[offset+1] ] ); - edgeIds.Set(writeOffset+i, edge); + const vtkm::Id offset = (i * 2); + const vtkm::Id2 edge(connectivity[edgeTable[offset]], connectivity[edgeTable[offset + 1]]); + edgeIds.Set(writeOffset + i, edge); } } }; @@ -237,33 +225,24 @@ public: class InterpolateField : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn< Id2Type > interpolation_ids, - FieldIn< Scalar > interpolation_weights, - WholeArrayIn<> inputField, - FieldOut<> output - ); + typedef void ControlSignature(FieldIn interpolation_ids, + FieldIn interpolation_weights, WholeArrayIn<> inputField, + FieldOut<> output); typedef void ExecutionSignature(_1, _2, _3, _4); typedef _1 InputDomain; template - VTKM_EXEC - void operator()(const vtkm::Id2& low_high, - const WeightType &weight, - const vtkm::exec::ExecutionWholeArrayConst& inPortal, - T &result) const + VTKM_EXEC void operator()(const vtkm::Id2& low_high, const WeightType& weight, + const vtkm::exec::ExecutionWholeArrayConst& inPortal, + T& result) const { //fetch the low / high values from inPortal - result = vtkm::Lerp(inPortal.Get(low_high[0]), - inPortal.Get(low_high[1]), - weight); + result = vtkm::Lerp(inPortal.Get(low_high[0]), inPortal.Get(low_high[1]), weight); } template - VTKM_EXEC - void operator()(const vtkm::Id2& , - const WeightType &, - const vtkm::exec::ExecutionWholeArrayConst& , - U &) const + VTKM_EXEC void operator()(const vtkm::Id2&, const WeightType&, + const vtkm::exec::ExecutionWholeArrayConst&, U&) const { //the inPortal and result need to be the same type so this version only //exists to generate code when using dynamic arrays @@ -278,13 +257,13 @@ public: typedef void ControlSignature(FieldIn, FieldOut); typedef void ExecutionSignature(_1, _2); - EvaluateImplicitFunction(const ImplicitFunction &function) + EvaluateImplicitFunction(const ImplicitFunction& function) : Function(function) - { } + { + } - template - VTKM_EXEC - void operator()(const VecType &point, ScalarType &val) const + template + VTKM_EXEC void operator()(const VecType& point, ScalarType& val) const { val = this->Function.Value(point); } @@ -300,13 +279,14 @@ public: typedef void ControlSignature(FieldIn, FieldOut); typedef void ExecutionSignature(_1, _2); - Evaluate2ImplicitFunctions(const T1 &f1, const T2 &f2) - : Function1(f1), Function2(f2) - { } + Evaluate2ImplicitFunctions(const T1& f1, const T2& f2) + : Function1(f1) + , Function2(f2) + { + } - template - VTKM_EXEC - void operator()(const VecType &point, ScalarType &val) const + template + VTKM_EXEC void operator()(const VecType& point, ScalarType& val) const { val = this->Function1.Value(point) + this->Function2.Value(point); } @@ -316,35 +296,37 @@ private: T2 Function2; }; -struct ValueTypes : vtkm::ListTagBase{}; +struct ValueTypes : vtkm::ListTagBase +{ +}; -struct InterpValueTypes : vtkm::ListTagBase, - vtkm::Vec< vtkm::Float64, 3> - >{}; +struct InterpValueTypes + : vtkm::ListTagBase, + vtkm::Vec> +{ +}; using StorageListTag = ::vtkm::cont::StorageListTagBasic; /// This class runs a series of micro-benchmarks to measure /// performance of different field operations -template -class BenchmarkFieldAlgorithms { +template +class BenchmarkFieldAlgorithms +{ typedef vtkm::cont::StorageTagBasic StorageTag; typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; typedef vtkm::cont::Timer Timer; - using ValueDynamicHandle = - vtkm::cont::DynamicArrayHandleBase; - using InterpDynamicHandle = - vtkm::cont::DynamicArrayHandleBase; + using ValueDynamicHandle = vtkm::cont::DynamicArrayHandleBase; + using InterpDynamicHandle = vtkm::cont::DynamicArrayHandleBase; using IdDynamicHandle = - vtkm::cont::DynamicArrayHandleBase; + vtkm::cont::DynamicArrayHandleBase; private: - template - struct BenchBlackScholes { + template + struct BenchBlackScholes + { using ValueArrayHandle = vtkm::cont::ArrayHandle; ValueArrayHandle StockPrice; @@ -359,14 +341,14 @@ private: BenchBlackScholes() { std::mt19937 rng; - std::uniform_real_distribution price_range(Value(5.0f),Value(30.0f)); - std::uniform_real_distribution strike_range(Value(1.0f),Value(100.0f)); - std::uniform_real_distribution year_range(Value(0.25f),Value(10.0f)); + std::uniform_real_distribution price_range(Value(5.0f), Value(30.0f)); + std::uniform_real_distribution strike_range(Value(1.0f), Value(100.0f)); + std::uniform_real_distribution year_range(Value(0.25f), Value(10.0f)); this->price.resize(ARRAY_SIZE); this->strike.resize(ARRAY_SIZE); this->years.resize(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i ) + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) { this->price[i] = price_range(rng); this->strike[i] = strike_range(rng); @@ -387,14 +369,10 @@ private: Timer timer; BlackScholes worklet(RISKFREE, VOLATILITY); - vtkm::worklet::DispatcherMapField< BlackScholes > dispatcher(worklet); + vtkm::worklet::DispatcherMapField> dispatcher(worklet); - dispatcher.Invoke( this->StockPrice, - this->OptionStrike, - this->OptionYears, - callResultHandle, - putResultHandle - ); + dispatcher.Invoke(this->StockPrice, this->OptionStrike, this->OptionYears, callResultHandle, + putResultHandle); return timer.GetElapsedTime(); } @@ -402,7 +380,8 @@ private: virtual std::string Type() const { return std::string("Static"); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "BlackScholes " << "[" << this->Type() << "] " @@ -411,8 +390,9 @@ private: } }; - template - struct BenchBlackScholesDynamic : public BenchBlackScholes { + template + struct BenchBlackScholesDynamic : public BenchBlackScholes + { VTKM_CONT vtkm::Float64 operator()() @@ -427,30 +407,24 @@ private: Timer timer; BlackScholes worklet(RISKFREE, VOLATILITY); - vtkm::worklet::DispatcherMapField< BlackScholes > dispatcher(worklet); + vtkm::worklet::DispatcherMapField> dispatcher(worklet); - dispatcher.Invoke( dstocks, - dstrikes, - doptions, - callResultHandle, - putResultHandle - ); + dispatcher.Invoke(dstocks, dstrikes, doptions, callResultHandle, putResultHandle); return timer.GetElapsedTime(); } virtual std::string Type() const { return std::string("Dynamic"); } - }; VTKM_MAKE_BENCHMARK(BlackScholes, BenchBlackScholes); VTKM_MAKE_BENCHMARK(BlackScholesDynamic, BenchBlackScholesDynamic); - - template - struct BenchMath { - std::vector< vtkm::Vec > input; - vtkm::cont::ArrayHandle< vtkm::Vec, StorageTag> InputHandle; + template + struct BenchMath + { + std::vector> input; + vtkm::cont::ArrayHandle, StorageTag> InputHandle; VTKM_CONT BenchMath() @@ -459,11 +433,9 @@ private: std::uniform_real_distribution range; this->input.resize(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i ) + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) { - this->input[i] = vtkm::Vec(range(rng), - range(rng), - range(rng)); + this->input[i] = vtkm::Vec(range(rng), range(rng), range(rng)); } this->InputHandle = vtkm::cont::make_ArrayHandle(this->input); @@ -477,10 +449,10 @@ private: Timer timer; - vtkm::worklet::DispatcherMapField< Mag >().Invoke( InputHandle, tempHandle1 ); - vtkm::worklet::DispatcherMapField< Sin >().Invoke( tempHandle1, tempHandle2 ); - vtkm::worklet::DispatcherMapField< Square >().Invoke( tempHandle2, tempHandle1 ); - vtkm::worklet::DispatcherMapField< Cos >().Invoke( tempHandle1, tempHandle2 ); + vtkm::worklet::DispatcherMapField().Invoke(InputHandle, tempHandle1); + vtkm::worklet::DispatcherMapField().Invoke(tempHandle1, tempHandle2); + vtkm::worklet::DispatcherMapField().Invoke(tempHandle2, tempHandle1); + vtkm::worklet::DispatcherMapField().Invoke(tempHandle1, tempHandle2); return timer.GetElapsedTime(); } @@ -488,7 +460,8 @@ private: virtual std::string Type() const { return std::string("Static"); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "Magnitude -> Sine -> Square -> Cosine " << "[" << this->Type() << "] " @@ -497,15 +470,14 @@ private: } }; - template - struct BenchMathDynamic : public BenchMath { + template + struct BenchMathDynamic : public BenchMath + { VTKM_CONT vtkm::Float64 operator()() { - using MathTypes = vtkm::ListTagBase, - vtkm::Vec< vtkm::Float64, 3> - >; + using MathTypes = vtkm::ListTagBase, vtkm::Vec>; vtkm::cont::ArrayHandle temp1; vtkm::cont::ArrayHandle temp2; @@ -515,25 +487,25 @@ private: Timer timer; - vtkm::worklet::DispatcherMapField< Mag >().Invoke( dinput, dtemp1 ); - vtkm::worklet::DispatcherMapField< Sin >().Invoke( dtemp1, dtemp2 ); - vtkm::worklet::DispatcherMapField< Square >().Invoke( dtemp2, dtemp1 ); - vtkm::worklet::DispatcherMapField< Cos >().Invoke( dtemp1, dtemp2 ); + vtkm::worklet::DispatcherMapField().Invoke(dinput, dtemp1); + vtkm::worklet::DispatcherMapField().Invoke(dtemp1, dtemp2); + vtkm::worklet::DispatcherMapField().Invoke(dtemp2, dtemp1); + vtkm::worklet::DispatcherMapField().Invoke(dtemp1, dtemp2); return timer.GetElapsedTime(); } virtual std::string Type() const { return std::string("Dynamic"); } - }; VTKM_MAKE_BENCHMARK(Math, BenchMath); VTKM_MAKE_BENCHMARK(MathDynamic, BenchMathDynamic); - template - struct BenchFusedMath { - std::vector< vtkm::Vec > input; - vtkm::cont::ArrayHandle< vtkm::Vec, StorageTag> InputHandle; + template + struct BenchFusedMath + { + std::vector> input; + vtkm::cont::ArrayHandle, StorageTag> InputHandle; VTKM_CONT BenchFusedMath() @@ -542,11 +514,9 @@ private: std::uniform_real_distribution range; this->input.resize(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i ) + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) { - this->input[i] = vtkm::Vec(range(rng), - range(rng), - range(rng)); + this->input[i] = vtkm::Vec(range(rng), range(rng), range(rng)); } this->InputHandle = vtkm::cont::make_ArrayHandle(this->input); @@ -558,14 +528,15 @@ private: vtkm::cont::ArrayHandle result; Timer timer; - vtkm::worklet::DispatcherMapField< FusedMath >().Invoke( this->InputHandle, result ); + vtkm::worklet::DispatcherMapField().Invoke(this->InputHandle, result); return timer.GetElapsedTime(); } virtual std::string Type() const { return std::string("Static"); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "Fused Magnitude -> Sine -> Square -> Cosine " << "[" << this->Type() << "] " @@ -574,22 +545,21 @@ private: } }; - template - struct BenchFusedMathDynamic : public BenchFusedMath { + template + struct BenchFusedMathDynamic : public BenchFusedMath + { VTKM_CONT vtkm::Float64 operator()() { - using MathTypes = vtkm::ListTagBase, - vtkm::Vec< vtkm::Float64, 3> - >; + using MathTypes = vtkm::ListTagBase, vtkm::Vec>; vtkm::cont::DynamicArrayHandleBase dinput(this->InputHandle); vtkm::cont::ArrayHandle result; Timer timer; - vtkm::worklet::DispatcherMapField< FusedMath >().Invoke( dinput, result ); + vtkm::worklet::DispatcherMapField().Invoke(dinput, result); return timer.GetElapsedTime(); } @@ -599,21 +569,22 @@ private: VTKM_MAKE_BENCHMARK(FusedMath, BenchFusedMath); VTKM_MAKE_BENCHMARK(FusedMathDynamic, BenchFusedMathDynamic); - template - struct BenchEdgeInterp { + template + struct BenchEdgeInterp + { std::vector weight; std::vector field; - vtkm::cont::ArrayHandle< vtkm::Float32, StorageTag> WeightHandle; + vtkm::cont::ArrayHandle WeightHandle; vtkm::cont::ArrayHandle FieldHandle; - vtkm::cont::ArrayHandle< vtkm::Id2, StorageTag> EdgePairHandle; + vtkm::cont::ArrayHandle EdgePairHandle; VTKM_CONT BenchEdgeInterp() { using CT = typename vtkm::VecTraits::ComponentType; std::mt19937 rng; - std::uniform_real_distribution weight_range(0.0f,1.0f); + std::uniform_real_distribution weight_range(0.0f, 1.0f); std::uniform_real_distribution field_range; //basically the core challenge is to generate an array whose @@ -623,24 +594,23 @@ private: //cell and place them into array. // vtkm::cont::CellSetStructured<3> cellSet; - cellSet.SetPointDimensions( vtkm::Id3(CUBE_SIZE,CUBE_SIZE,CUBE_SIZE) ); + cellSet.SetPointDimensions(vtkm::Id3(CUBE_SIZE, CUBE_SIZE, CUBE_SIZE)); const vtkm::Id numberOfEdges = cellSet.GetNumberOfCells() * 12; const std::size_t esize = static_cast(numberOfEdges); const std::size_t psize = static_cast(cellSet.GetNumberOfPoints()); - this->EdgePairHandle.Allocate( numberOfEdges ); - vtkm::worklet::DispatcherMapTopology< GenerateEdges >().Invoke( cellSet, - this->EdgePairHandle ); + this->EdgePairHandle.Allocate(numberOfEdges); + vtkm::worklet::DispatcherMapTopology().Invoke(cellSet, this->EdgePairHandle); - this->weight.resize( esize ); - for(std::size_t i=0; i < esize; ++i ) + this->weight.resize(esize); + for (std::size_t i = 0; i < esize; ++i) { this->weight[i] = weight_range(rng); } - this->field.resize( psize ); - for(std::size_t i=0; i < psize; ++i ) + this->field.resize(psize); + for (std::size_t i = 0; i < psize; ++i) { this->field[i] = Value(field_range(rng)); } @@ -655,21 +625,18 @@ private: vtkm::cont::ArrayHandle result; Timer timer; - vtkm::worklet::DispatcherMapField< - InterpolateField, - DeviceAdapterTag>().Invoke(this->EdgePairHandle, - this->WeightHandle, - this->FieldHandle, - result); + vtkm::worklet::DispatcherMapField().Invoke( + this->EdgePairHandle, this->WeightHandle, this->FieldHandle, result); return timer.GetElapsedTime(); } virtual std::string Type() const { return std::string("Static"); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; - const std::size_t size = (CUBE_SIZE-1)*(CUBE_SIZE-1)*(CUBE_SIZE-1)*12; + const std::size_t size = (CUBE_SIZE - 1) * (CUBE_SIZE - 1) * (CUBE_SIZE - 1) * 12; description << "Edge Interpolation " << "[" << this->Type() << "] " << "with a domain size of: " << size; @@ -677,8 +644,9 @@ private: } }; - template - struct BenchEdgeInterpDynamic : public BenchEdgeInterp { + template + struct BenchEdgeInterpDynamic : public BenchEdgeInterp + { VTKM_CONT vtkm::Float64 operator()() @@ -689,12 +657,8 @@ private: vtkm::cont::ArrayHandle result; Timer timer; - vtkm::worklet::DispatcherMapField< - InterpolateField, - DeviceAdapterTag>().Invoke(dedges, - dweight, - dfield, - result); + vtkm::worklet::DispatcherMapField().Invoke( + dedges, dweight, dfield, result); return timer.GetElapsedTime(); } @@ -704,7 +668,6 @@ private: VTKM_MAKE_BENCHMARK(EdgeInterp, BenchEdgeInterp); VTKM_MAKE_BENCHMARK(EdgeInterpDynamic, BenchEdgeInterpDynamic); - struct ImplicitFunctionBenchData { vtkm::cont::ArrayHandle> Points; @@ -732,18 +695,19 @@ private: portal.Set(i, vtkm::make_Vec(distx(rangen), disty(rangen), distz(rangen))); } - data.Sphere1 = vtkm::cont::Sphere({0.22f, 0.33f, 0.44f}, 0.55f); - data.Sphere2 = vtkm::cont::Sphere({0.22f, 0.33f, 0.11f}, 0.77f); + data.Sphere1 = vtkm::cont::Sphere({ 0.22f, 0.33f, 0.44f }, 0.55f); + data.Sphere2 = vtkm::cont::Sphere({ 0.22f, 0.33f, 0.11f }, 0.77f); return data; } - template + template struct BenchImplicitFunction { BenchImplicitFunction() : Internal(MakeImplicitFunctionBenchData()) - { } + { + } VTKM_CONT vtkm::Float64 operator()() @@ -763,20 +727,20 @@ private: { std::stringstream description; description << "Implicit Function (vtkm::cont::Sphere) on " - << Internal.Points.GetNumberOfValues() - << " points"; + << Internal.Points.GetNumberOfValues() << " points"; return description.str(); } ImplicitFunctionBenchData Internal; }; - template + template struct BenchDynamicImplicitFunction { BenchDynamicImplicitFunction() : Internal(MakeImplicitFunctionBenchData()) - { } + { + } VTKM_CONT vtkm::Float64 operator()() @@ -796,20 +760,20 @@ private: { std::stringstream description; description << "Implicit Function (DynamicImplicitFunction) on " - << Internal.Points.GetNumberOfValues() - << " points"; + << Internal.Points.GetNumberOfValues() << " points"; return description.str(); } ImplicitFunctionBenchData Internal; }; - template + template struct Bench2ImplicitFunctions { Bench2ImplicitFunctions() : Internal(MakeImplicitFunctionBenchData()) - { } + { + } VTKM_CONT vtkm::Float64 operator()() @@ -829,26 +793,26 @@ private: { std::stringstream description; description << "Implicit Function 2x(vtkm::cont::Sphere) on " - << Internal.Points.GetNumberOfValues() - << " points"; + << Internal.Points.GetNumberOfValues() << " points"; return description.str(); } ImplicitFunctionBenchData Internal; }; - template + template struct Bench2DynamicImplicitFunctions { Bench2DynamicImplicitFunctions() : Internal(MakeImplicitFunctionBenchData()) - { } + { + } VTKM_CONT vtkm::Float64 operator()() { - using EvalWorklet = Evaluate2ImplicitFunctions; + using EvalWorklet = + Evaluate2ImplicitFunctions; using EvalDispatcher = vtkm::worklet::DispatcherMapField; EvalWorklet eval(Internal.Sphere1.PrepareForExecution(DeviceAdapterTag()), @@ -864,8 +828,7 @@ private: { std::stringstream description; description << "Implicit Function 2x(DynamicImplicitFunction) on " - << Internal.Points.GetNumberOfValues() - << " points"; + << Internal.Points.GetNumberOfValues() << " points"; return description.str(); } @@ -878,35 +841,40 @@ private: VTKM_MAKE_BENCHMARK(ImplicitFunctionDynamic2, Bench2DynamicImplicitFunctions); public: - - static VTKM_CONT int Run(int benchmarks){ + static VTKM_CONT int Run(int benchmarks) + { std::cout << DIVIDER << "\nRunning Field Algorithm benchmarks\n"; - if (benchmarks & BLACK_SCHOLES) { + if (benchmarks & BLACK_SCHOLES) + { std::cout << DIVIDER << "\nBenchmarking BlackScholes\n"; VTKM_RUN_BENCHMARK(BlackScholes, ValueTypes()); VTKM_RUN_BENCHMARK(BlackScholesDynamic, ValueTypes()); } - if (benchmarks & MATH){ + if (benchmarks & MATH) + { std::cout << DIVIDER << "\nBenchmarking Multiple Math Worklets\n"; VTKM_RUN_BENCHMARK(Math, ValueTypes()); VTKM_RUN_BENCHMARK(MathDynamic, ValueTypes()); } - if (benchmarks & FUSED_MATH){ + if (benchmarks & FUSED_MATH) + { std::cout << DIVIDER << "\nBenchmarking Single Fused Math Worklet\n"; VTKM_RUN_BENCHMARK(FusedMath, ValueTypes()); VTKM_RUN_BENCHMARK(FusedMathDynamic, ValueTypes()); } - if (benchmarks & INTERPOLATE_FIELD){ + if (benchmarks & INTERPOLATE_FIELD) + { std::cout << DIVIDER << "\nBenchmarking Edge Based Field InterpolationWorklet\n"; VTKM_RUN_BENCHMARK(EdgeInterp, InterpValueTypes()); VTKM_RUN_BENCHMARK(EdgeInterpDynamic, InterpValueTypes()); } - if (benchmarks & IMPLICIT_FUNCTION) { + if (benchmarks & IMPLICIT_FUNCTION) + { using FloatDefaultType = vtkm::ListTagBase; std::cout << "\nBenchmarking Implicit Function\n"; @@ -920,20 +888,21 @@ public: } }; - #undef ARRAY_SIZE - } } // namespace vtkm::benchmarking -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { int benchmarks = 0; - if (argc < 2){ + if (argc < 2) + { benchmarks = vtkm::benchmarking::ALL; } - else { - for (int i = 1; i < argc; ++i){ + else + { + for (int i = 1; i < argc; ++i) + { std::string arg = argv[i]; std::transform(arg.begin(), arg.end(), arg.begin(), ::tolower); if (arg == "blackscholes") @@ -965,6 +934,6 @@ int main(int argc, char *argv[]) } //now actually execute the benchmarks - return vtkm::benchmarking::BenchmarkFieldAlgorithms - ::Run(benchmarks); + return vtkm::benchmarking::BenchmarkFieldAlgorithms::Run( + benchmarks); } diff --git a/vtkm/benchmarking/BenchmarkTopologyAlgorithms.cxx b/vtkm/benchmarking/BenchmarkTopologyAlgorithms.cxx index aed93d057..56b91bfca 100644 --- a/vtkm/benchmarking/BenchmarkTopologyAlgorithms.cxx +++ b/vtkm/benchmarking/BenchmarkTopologyAlgorithms.cxx @@ -35,41 +35,39 @@ #include #include -namespace vtkm { -namespace benchmarking { +namespace vtkm +{ +namespace benchmarking +{ #define CUBE_SIZE 256 const static std::string DIVIDER(40, '-'); -enum BenchmarkName { +enum BenchmarkName +{ CELL_TO_POINT = 1 << 1, POINT_TO_CELL = 1 << 2, MC_CLASSIFY = 1 << 3, - ALL = CELL_TO_POINT | - POINT_TO_CELL | - MC_CLASSIFY + ALL = CELL_TO_POINT | POINT_TO_CELL | MC_CLASSIFY }; class AveragePointToCell : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(FieldInPoint<> inPoints, - CellSetIn cellset, + typedef void ControlSignature(FieldInPoint<> inPoints, CellSetIn cellset, FieldOutCell<> outCells); typedef void ExecutionSignature(_1, PointCount, _3); typedef _2 InputDomain; - template - VTKM_EXEC - void operator()(const PointValueVecType &pointValues, - const vtkm::IdComponent &numPoints, - OutType &average) const + template + VTKM_EXEC void operator()(const PointValueVecType& pointValues, + const vtkm::IdComponent& numPoints, OutType& average) const { OutType sum = static_cast(pointValues[0]); for (vtkm::IdComponent pointIndex = 1; pointIndex < numPoints; ++pointIndex) - { + { sum = sum + static_cast(pointValues[pointIndex]); - } + } average = sum / static_cast(numPoints); } @@ -78,17 +76,13 @@ public: class AverageCellToPoint : public vtkm::worklet::WorkletMapCellToPoint { public: - typedef void ControlSignature(FieldInCell<> inCells, - CellSetIn topology, - FieldOut<> outPoints); + typedef void ControlSignature(FieldInCell<> inCells, CellSetIn topology, FieldOut<> outPoints); typedef void ExecutionSignature(_1, _3, CellCount); typedef _2 InputDomain; - template - VTKM_EXEC - void operator()(const CellVecType &cellValues, - OutType &avgVal, - const vtkm::IdComponent &numCellIDs) const + template + VTKM_EXEC void operator()(const CellVecType& cellValues, OutType& avgVal, + const vtkm::IdComponent& numCellIDs) const { //simple functor that returns the average cell Value. avgVal = static_cast(cellValues[0]); @@ -101,107 +95,102 @@ public: }; // ----------------------------------------------------------------------------- -template +template class Classification : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature( - FieldInPoint<> inNodes, - CellSetIn cellset, - FieldOutCell< IdComponentType > outCaseId); + typedef void ControlSignature(FieldInPoint<> inNodes, CellSetIn cellset, + FieldOutCell outCaseId); typedef void ExecutionSignature(_1, _3); typedef _2 InputDomain; T IsoValue; VTKM_CONT - Classification(T isovalue) : - IsoValue(isovalue) + Classification(T isovalue) + : IsoValue(isovalue) { } - template - VTKM_EXEC - void operator()(const FieldInType &fieldIn, - vtkm::IdComponent &caseNumber) const + template + VTKM_EXEC void operator()(const FieldInType& fieldIn, vtkm::IdComponent& caseNumber) const { typedef typename vtkm::VecTraits::ComponentType FieldType; const FieldType iso = static_cast(this->IsoValue); - caseNumber= ((fieldIn[0] > iso) | - (fieldIn[1] > iso) << 1 | - (fieldIn[2] > iso) << 2 | - (fieldIn[3] > iso) << 3 | - (fieldIn[4] > iso) << 4 | - (fieldIn[5] > iso) << 5 | - (fieldIn[6] > iso) << 6 | - (fieldIn[7] > iso) << 7); + caseNumber = ((fieldIn[0] > iso) | (fieldIn[1] > iso) << 1 | (fieldIn[2] > iso) << 2 | + (fieldIn[3] > iso) << 3 | (fieldIn[4] > iso) << 4 | (fieldIn[5] > iso) << 5 | + (fieldIn[6] > iso) << 6 | (fieldIn[7] > iso) << 7); } }; -struct ValueTypes : vtkm::ListTagBase{}; +struct ValueTypes + : vtkm::ListTagBase +{ +}; using StorageListTag = ::vtkm::cont::StorageListTagBasic; /// This class runs a series of micro-benchmarks to measure /// performance of different field operations -template -class BenchmarkTopologyAlgorithms { +template +class BenchmarkTopologyAlgorithms +{ typedef vtkm::cont::StorageTagBasic StorageTag; typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; typedef vtkm::cont::Timer Timer; - using ValueDynamicHandle = - vtkm::cont::DynamicArrayHandleBase; + using ValueDynamicHandle = vtkm::cont::DynamicArrayHandleBase; private: + template + struct NumberGenerator + { + }; - template struct NumberGenerator {}; - - template - struct NumberGenerator::value - >::type - > + template + struct NumberGenerator::value>::type> { std::mt19937 rng; std::uniform_real_distribution distribution; - NumberGenerator(T low, T high): rng(), distribution(low,high) {} + NumberGenerator(T low, T high) + : rng() + , distribution(low, high) + { + } T next() { return distribution(rng); } }; - template - struct NumberGenerator::value - >::type - > + template + struct NumberGenerator::value>::type> { std::mt19937 rng; std::uniform_int_distribution distribution; - NumberGenerator(T low, T high): rng(), distribution(low,high) {} + NumberGenerator(T low, T high) + : rng() + , distribution(low, high) + { + } T next() { return distribution(rng); } }; - template - struct BenchCellToPointAvg { - std::vector< Value > input; - vtkm::cont::ArrayHandle< Value, StorageTag> InputHandle; + template + struct BenchCellToPointAvg + { + std::vector input; + vtkm::cont::ArrayHandle InputHandle; std::size_t DomainSize; VTKM_CONT BenchCellToPointAvg() { - NumberGenerator generator(static_cast(1.0), - static_cast(100.0)); + NumberGenerator generator(static_cast(1.0), static_cast(100.0)); //cube size is points in each dim - this->DomainSize = (CUBE_SIZE-1)*(CUBE_SIZE-1)*(CUBE_SIZE-1); - this->input.resize( DomainSize ); - for(std::size_t i=0; i < DomainSize; ++i ) + this->DomainSize = (CUBE_SIZE - 1) * (CUBE_SIZE - 1) * (CUBE_SIZE - 1); + this->input.resize(DomainSize); + for (std::size_t i = 0; i < DomainSize; ++i) { this->input[i] = generator.next(); } @@ -212,15 +201,13 @@ private: vtkm::Float64 operator()() { vtkm::cont::CellSetStructured<3> cellSet; - cellSet.SetPointDimensions( vtkm::Id3(CUBE_SIZE,CUBE_SIZE,CUBE_SIZE) ); - vtkm::cont::ArrayHandle result; + cellSet.SetPointDimensions(vtkm::Id3(CUBE_SIZE, CUBE_SIZE, CUBE_SIZE)); + vtkm::cont::ArrayHandle result; Timer timer; - vtkm::worklet::DispatcherMapTopology< AverageCellToPoint > dispatcher; - dispatcher.Invoke( this->InputHandle, - cellSet, - result); + vtkm::worklet::DispatcherMapTopology dispatcher; + dispatcher.Invoke(this->InputHandle, cellSet, result); //result.SyncControlArray(); return timer.GetElapsedTime(); @@ -229,7 +216,8 @@ private: virtual std::string Type() const { return std::string("Static"); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "Computing Cell To Point Average " @@ -239,25 +227,24 @@ private: } }; - template - struct BenchCellToPointAvgDynamic : public BenchCellToPointAvg { + template + struct BenchCellToPointAvgDynamic : public BenchCellToPointAvg + { VTKM_CONT vtkm::Float64 operator()() { vtkm::cont::CellSetStructured<3> cellSet; - cellSet.SetPointDimensions( vtkm::Id3(CUBE_SIZE,CUBE_SIZE,CUBE_SIZE) ); + cellSet.SetPointDimensions(vtkm::Id3(CUBE_SIZE, CUBE_SIZE, CUBE_SIZE)); ValueDynamicHandle dinput(this->InputHandle); - vtkm::cont::ArrayHandle result; + vtkm::cont::ArrayHandle result; Timer timer; - vtkm::worklet::DispatcherMapTopology< AverageCellToPoint > dispatcher; + vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke( dinput, - cellSet, - result); + dispatcher.Invoke(dinput, cellSet, result); //result.SyncControlArray(); return timer.GetElapsedTime(); @@ -269,21 +256,21 @@ private: VTKM_MAKE_BENCHMARK(CellToPointAvg, BenchCellToPointAvg); VTKM_MAKE_BENCHMARK(CellToPointAvgDynamic, BenchCellToPointAvgDynamic); - template - struct BenchPointToCellAvg { - std::vector< Value > input; - vtkm::cont::ArrayHandle< Value, StorageTag> InputHandle; + template + struct BenchPointToCellAvg + { + std::vector input; + vtkm::cont::ArrayHandle InputHandle; std::size_t DomainSize; VTKM_CONT BenchPointToCellAvg() { - NumberGenerator generator(static_cast(1.0), - static_cast(100.0)); + NumberGenerator generator(static_cast(1.0), static_cast(100.0)); - this->DomainSize = (CUBE_SIZE)*(CUBE_SIZE)*(CUBE_SIZE); - this->input.resize( DomainSize ); - for(std::size_t i=0; i < DomainSize; ++i ) + this->DomainSize = (CUBE_SIZE) * (CUBE_SIZE) * (CUBE_SIZE); + this->input.resize(DomainSize); + for (std::size_t i = 0; i < DomainSize; ++i) { this->input[i] = generator.next(); } @@ -294,15 +281,13 @@ private: vtkm::Float64 operator()() { vtkm::cont::CellSetStructured<3> cellSet; - cellSet.SetPointDimensions( vtkm::Id3(CUBE_SIZE,CUBE_SIZE,CUBE_SIZE) ); - vtkm::cont::ArrayHandle result; + cellSet.SetPointDimensions(vtkm::Id3(CUBE_SIZE, CUBE_SIZE, CUBE_SIZE)); + vtkm::cont::ArrayHandle result; Timer timer; - vtkm::worklet::DispatcherMapTopology< AveragePointToCell > dispatcher; - dispatcher.Invoke( this->InputHandle, - cellSet, - result); + vtkm::worklet::DispatcherMapTopology dispatcher; + dispatcher.Invoke(this->InputHandle, cellSet, result); //result.SyncControlArray(); return timer.GetElapsedTime(); @@ -311,7 +296,8 @@ private: virtual std::string Type() const { return std::string("Static"); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "Computing Point To Cell Average " @@ -321,24 +307,23 @@ private: } }; - template - struct BenchPointToCellAvgDynamic : public BenchPointToCellAvg { + template + struct BenchPointToCellAvgDynamic : public BenchPointToCellAvg + { VTKM_CONT vtkm::Float64 operator()() { vtkm::cont::CellSetStructured<3> cellSet; - cellSet.SetPointDimensions( vtkm::Id3(CUBE_SIZE,CUBE_SIZE,CUBE_SIZE) ); + cellSet.SetPointDimensions(vtkm::Id3(CUBE_SIZE, CUBE_SIZE, CUBE_SIZE)); ValueDynamicHandle dinput(this->InputHandle); - vtkm::cont::ArrayHandle result; + vtkm::cont::ArrayHandle result; Timer timer; - vtkm::worklet::DispatcherMapTopology< AveragePointToCell > dispatcher; - dispatcher.Invoke( dinput, - cellSet, - result); + vtkm::worklet::DispatcherMapTopology dispatcher; + dispatcher.Invoke(dinput, cellSet, result); //result.SyncControlArray(); return timer.GetElapsedTime(); @@ -350,22 +335,22 @@ private: VTKM_MAKE_BENCHMARK(PointToCellAvg, BenchPointToCellAvg); VTKM_MAKE_BENCHMARK(PointToCellAvgDynamic, BenchPointToCellAvgDynamic); - template - struct BenchClassification { - std::vector< Value > input; - vtkm::cont::ArrayHandle< Value, StorageTag> InputHandle; + template + struct BenchClassification + { + std::vector input; + vtkm::cont::ArrayHandle InputHandle; Value IsoValue; size_t DomainSize; VTKM_CONT BenchClassification() { - NumberGenerator generator(static_cast(1.0), - static_cast(100.0)); + NumberGenerator generator(static_cast(1.0), static_cast(100.0)); - this->DomainSize = (CUBE_SIZE)*(CUBE_SIZE)*(CUBE_SIZE); - this->input.resize( DomainSize ); - for(std::size_t i=0; i < DomainSize; ++i ) + this->DomainSize = (CUBE_SIZE) * (CUBE_SIZE) * (CUBE_SIZE); + this->input.resize(DomainSize); + for (std::size_t i = 0; i < DomainSize; ++i) { this->input[i] = generator.next(); } @@ -377,18 +362,16 @@ private: vtkm::Float64 operator()() { vtkm::cont::CellSetStructured<3> cellSet; - cellSet.SetPointDimensions( vtkm::Id3(CUBE_SIZE,CUBE_SIZE,CUBE_SIZE) ); - vtkm::cont::ArrayHandle< vtkm::IdComponent, StorageTag> result; + cellSet.SetPointDimensions(vtkm::Id3(CUBE_SIZE, CUBE_SIZE, CUBE_SIZE)); + vtkm::cont::ArrayHandle result; ValueDynamicHandle dinput(this->InputHandle); Timer timer; Classification worklet(this->IsoValue); - vtkm::worklet::DispatcherMapTopology< Classification > dispatcher(worklet); - dispatcher.Invoke( dinput, - cellSet, - result); + vtkm::worklet::DispatcherMapTopology> dispatcher(worklet); + dispatcher.Invoke(dinput, cellSet, result); //result.SyncControlArray(); return timer.GetElapsedTime(); @@ -397,7 +380,8 @@ private: virtual std::string Type() const { return std::string("Static"); } VTKM_CONT - std::string Description() const { + std::string Description() const + { std::stringstream description; description << "Computing Marching Cubes Classification " @@ -407,22 +391,21 @@ private: } }; - template - struct BenchClassificationDynamic : public BenchClassification { + template + struct BenchClassificationDynamic : public BenchClassification + { VTKM_CONT vtkm::Float64 operator()() { vtkm::cont::CellSetStructured<3> cellSet; - cellSet.SetPointDimensions( vtkm::Id3(CUBE_SIZE,CUBE_SIZE,CUBE_SIZE) ); - vtkm::cont::ArrayHandle< vtkm::IdComponent, StorageTag> result; + cellSet.SetPointDimensions(vtkm::Id3(CUBE_SIZE, CUBE_SIZE, CUBE_SIZE)); + vtkm::cont::ArrayHandle result; Timer timer; Classification worklet(this->IsoValue); - vtkm::worklet::DispatcherMapTopology< Classification > dispatcher(worklet); - dispatcher.Invoke( this->InputHandle, - cellSet, - result); + vtkm::worklet::DispatcherMapTopology> dispatcher(worklet); + dispatcher.Invoke(this->InputHandle, cellSet, result); //result.SyncControlArray(); return timer.GetElapsedTime(); @@ -435,23 +418,26 @@ private: VTKM_MAKE_BENCHMARK(ClassificationDynamic, BenchClassificationDynamic); public: - - static VTKM_CONT int Run(int benchmarks){ + static VTKM_CONT int Run(int benchmarks) + { std::cout << DIVIDER << "\nRunning Topology Algorithm benchmarks\n"; - if (benchmarks & CELL_TO_POINT) { + if (benchmarks & CELL_TO_POINT) + { std::cout << DIVIDER << "\nBenchmarking Cell To Point Average\n"; VTKM_RUN_BENCHMARK(CellToPointAvg, ValueTypes()); VTKM_RUN_BENCHMARK(CellToPointAvgDynamic, ValueTypes()); } - if (benchmarks & POINT_TO_CELL){ + if (benchmarks & POINT_TO_CELL) + { std::cout << DIVIDER << "\nBenchmarking Point to Cell Average\n"; VTKM_RUN_BENCHMARK(PointToCellAvg, ValueTypes()); VTKM_RUN_BENCHMARK(PointToCellAvgDynamic, ValueTypes()); } - if (benchmarks & MC_CLASSIFY){ + if (benchmarks & MC_CLASSIFY) + { std::cout << DIVIDER << "\nBenchmarking Hex/Voxel MC Classification\n"; VTKM_RUN_BENCHMARK(Classification, ValueTypes()); VTKM_RUN_BENCHMARK(ClassificationDynamic, ValueTypes()); @@ -461,20 +447,21 @@ public: } }; - #undef ARRAY_SIZE - } } // namespace vtkm::benchmarking -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { int benchmarks = 0; - if (argc < 2){ + if (argc < 2) + { benchmarks = vtkm::benchmarking::ALL; } - else { - for (int i = 1; i < argc; ++i){ + else + { + for (int i = 1; i < argc; ++i) + { std::string arg = argv[i]; std::transform(arg.begin(), arg.end(), arg.begin(), ::tolower); if (arg == "celltopoint") @@ -489,7 +476,8 @@ int main(int argc, char *argv[]) { benchmarks |= vtkm::benchmarking::MC_CLASSIFY; } - else { + else + { std::cout << "Unrecognized benchmark: " << argv[i] << std::endl; return 1; } @@ -497,6 +485,6 @@ int main(int argc, char *argv[]) } //now actually execute the benchmarks - return vtkm::benchmarking::BenchmarkTopologyAlgorithms - ::Run(benchmarks); + return vtkm::benchmarking::BenchmarkTopologyAlgorithms::Run( + benchmarks); } diff --git a/vtkm/benchmarking/Benchmarker.h b/vtkm/benchmarking/Benchmarker.h index 99b287487..80d69a627 100644 --- a/vtkm/benchmarking/Benchmarker.h +++ b/vtkm/benchmarking/Benchmarker.h @@ -87,13 +87,14 @@ * instance of your benchmark for the type being benchmarked. The VA_ARGS are used to * pass any extra arguments needed by your benchmark */ -#define VTKM_MAKE_BENCHMARK(Name, Bench, ...) \ - struct MakeBench##Name { \ - template \ - VTKM_CONT \ - Bench operator()(const Value vtkmNotUsed(v)) const { \ - return Bench(__VA_ARGS__); \ - } \ +#define VTKM_MAKE_BENCHMARK(Name, Bench, ...) \ + struct MakeBench##Name \ + { \ + template \ + VTKM_CONT Bench operator()(const Value vtkmNotUsed(v)) const \ + { \ + return Bench(__VA_ARGS__); \ + } \ } /* @@ -101,20 +102,26 @@ * You must have previously defined a maker functor with VTKM_MAKE_BENCHMARK that this * macro will look for and use */ -#define VTKM_RUN_BENCHMARK(Name, Types) \ +#define VTKM_RUN_BENCHMARK(Name, Types) \ vtkm::benchmarking::BenchmarkTypes(MakeBench##Name(), (Types)) -namespace vtkm { -namespace benchmarking { -namespace stats { +namespace vtkm +{ +namespace benchmarking +{ +namespace stats +{ // Checks that the sequence is sorted, returns true if it's sorted, false // otherwise -template -bool is_sorted(ForwardIt first, ForwardIt last){ +template +bool is_sorted(ForwardIt first, ForwardIt last) +{ ForwardIt next = first; ++next; - for (; next != last; ++next, ++first){ - if (*first > *next){ + for (; next != last; ++next, ++first) + { + if (*first > *next) + { return false; } } @@ -123,16 +130,19 @@ bool is_sorted(ForwardIt first, ForwardIt last){ // Get the value representing the `percent` percentile of the // sorted samples using linear interpolation -vtkm::Float64 PercentileValue(const std::vector &samples, const vtkm::Float64 percent){ +vtkm::Float64 PercentileValue(const std::vector& samples, + const vtkm::Float64 percent) +{ VTKM_ASSERT(!samples.empty()); - if (samples.size() == 1){ + if (samples.size() == 1) + { return samples.front(); } VTKM_ASSERT(percent >= 0.0); VTKM_ASSERT(percent <= 100.0); - VTKM_ASSERT( - vtkm::benchmarking::stats::is_sorted(samples.begin(), samples.end())); - if (percent == 100.0){ + VTKM_ASSERT(vtkm::benchmarking::stats::is_sorted(samples.begin(), samples.end())); + if (percent == 100.0) + { return samples.back(); } // Find the two nearest percentile values and linearly @@ -149,45 +159,56 @@ vtkm::Float64 PercentileValue(const std::vector &samples, const v // Will replace all samples below `percent` and above 100 - `percent` percentiles // with the value at the percentile // NOTE: Assumes the samples have been sorted, as we make use of PercentileValue -void Winsorize(std::vector &samples, const vtkm::Float64 percent){ +void Winsorize(std::vector& samples, const vtkm::Float64 percent) +{ const vtkm::Float64 low_percentile = PercentileValue(samples, percent); const vtkm::Float64 high_percentile = PercentileValue(samples, 100.0 - percent); - for (std::vector::iterator it = samples.begin(); it != samples.end(); ++it){ - if (*it < low_percentile){ + for (std::vector::iterator it = samples.begin(); it != samples.end(); ++it) + { + if (*it < low_percentile) + { *it = low_percentile; } - else if (*it > high_percentile){ + else if (*it > high_percentile) + { *it = high_percentile; } } } // Compute the mean value of the dataset -vtkm::Float64 Mean(const std::vector &samples){ +vtkm::Float64 Mean(const std::vector& samples) +{ vtkm::Float64 mean = 0; - for (std::vector::const_iterator it = samples.begin(); it != samples.end(); ++it){ + for (std::vector::const_iterator it = samples.begin(); it != samples.end(); ++it) + { mean += *it; } return mean / static_cast(samples.size()); } // Compute the sample variance of the samples -vtkm::Float64 Variance(const std::vector &samples){ +vtkm::Float64 Variance(const std::vector& samples) +{ vtkm::Float64 mean = Mean(samples); vtkm::Float64 square_deviations = 0; - for (std::vector::const_iterator it = samples.begin(); it != samples.end(); ++it){ + for (std::vector::const_iterator it = samples.begin(); it != samples.end(); ++it) + { square_deviations += vtkm::Pow(*it - mean, 2.0); } return square_deviations / (static_cast(samples.size()) - 1.0); } // Compute the standard deviation of the samples -vtkm::Float64 StandardDeviation(const std::vector &samples){ +vtkm::Float64 StandardDeviation(const std::vector& samples) +{ return vtkm::Sqrt(Variance(samples)); } // Compute the median absolute deviation of the dataset -vtkm::Float64 MedianAbsDeviation(const std::vector &samples){ +vtkm::Float64 MedianAbsDeviation(const std::vector& samples) +{ std::vector abs_deviations; abs_deviations.reserve(samples.size()); const vtkm::Float64 median = PercentileValue(samples, 50.0); - for (std::vector::const_iterator it = samples.begin(); it != samples.end(); ++it){ + for (std::vector::const_iterator it = samples.begin(); it != samples.end(); ++it) + { abs_deviations.push_back(vtkm::Abs(*it - median)); } std::sort(abs_deviations.begin(), abs_deviations.end()); @@ -202,15 +223,20 @@ vtkm::Float64 MedianAbsDeviation(const std::vector &samples){ * in seconds, this lets us avoid including any per-run setup time in the benchmark. * However any one-time setup should be done in the functor's constructor */ -struct Benchmarker { +struct Benchmarker +{ const vtkm::Float64 MAX_RUNTIME; const size_t MAX_ITERATIONS; - Benchmarker() : MAX_RUNTIME(30), MAX_ITERATIONS(500){} + Benchmarker() + : MAX_RUNTIME(30) + , MAX_ITERATIONS(500) + { + } - template - VTKM_CONT - void operator()(Functor func) const { + template + VTKM_CONT void operator()(Functor func) const + { std::vector samples; // Do a warm-up run. If the benchmark allocates any additional memory // eg. storage for output results, this will let it do that and @@ -224,50 +250,49 @@ struct Benchmarker { // could be increased size_t iter = 0; for (vtkm::Float64 elapsed = 0.0; elapsed < MAX_RUNTIME && iter < MAX_ITERATIONS; - elapsed += samples.back(), ++iter) + elapsed += samples.back(), ++iter) { samples.push_back(func()); } std::sort(samples.begin(), samples.end()); stats::Winsorize(samples, 5.0); - std::cout << "Benchmark \'" - << func.Description() << "\' results:\n" - << "\tmedian = " << stats::PercentileValue(samples, 50.0) << "s\n" - << "\tmedian abs dev = " << stats::MedianAbsDeviation(samples) << "s\n" - << "\tmean = " << stats::Mean(samples) << "s\n" - << "\tstd dev = " << stats::StandardDeviation(samples) << "s\n" - << "\tmin = " << samples.front() << "s\n" - << "\tmax = " << samples.back() << "s\n"; + std::cout << "Benchmark \'" << func.Description() << "\' results:\n" + << "\tmedian = " << stats::PercentileValue(samples, 50.0) << "s\n" + << "\tmedian abs dev = " << stats::MedianAbsDeviation(samples) << "s\n" + << "\tmean = " << stats::Mean(samples) << "s\n" + << "\tstd dev = " << stats::StandardDeviation(samples) << "s\n" + << "\tmin = " << samples.front() << "s\n" + << "\tmax = " << samples.back() << "s\n"; } }; -template -class InternalPrintTypeAndBench { +template +class InternalPrintTypeAndBench +{ MakerFunctor Maker; public: VTKM_CONT - InternalPrintTypeAndBench(MakerFunctor maker) : Maker(maker) {} + InternalPrintTypeAndBench(MakerFunctor maker) + : Maker(maker) + { + } - template - VTKM_CONT - void operator()(T t) const { - std::cout << "*** " - << vtkm::testing::TypeName::Name() - << " ***************" << std::endl; + template + VTKM_CONT void operator()(T t) const + { + std::cout << "*** " << vtkm::testing::TypeName::Name() << " ***************" << std::endl; Benchmarker bench; bench(Maker(t)); } }; -template -VTKM_CONT -void BenchmarkTypes(const MakerFunctor &maker, TypeList){ +template +VTKM_CONT void BenchmarkTypes(const MakerFunctor& maker, TypeList) +{ vtkm::ListForEach(InternalPrintTypeAndBench(maker), TypeList()); } - } } #endif - diff --git a/vtkm/cont/ArrayHandle.cxx b/vtkm/cont/ArrayHandle.cxx index c1ed5112b..55e5fb42d 100644 --- a/vtkm/cont/ArrayHandle.cxx +++ b/vtkm/cont/ArrayHandle.cxx @@ -22,11 +22,15 @@ #include #ifdef VTKM_MSVC -#define _VTKM_SHARED_PTR_INSTANTIATE(Type) \ - template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle::InternalStruct >; \ - template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>::InternalStruct >; \ - template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>::InternalStruct >; \ - template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>::InternalStruct >; +#define _VTKM_SHARED_PTR_INSTANTIATE(Type) \ + template class VTKM_CONT_EXPORT \ + std::shared_ptr::InternalStruct>; \ + template class VTKM_CONT_EXPORT std::shared_ptr< \ + vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>::InternalStruct>; \ + template class VTKM_CONT_EXPORT std::shared_ptr< \ + vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>::InternalStruct>; \ + template class VTKM_CONT_EXPORT std::shared_ptr< \ + vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>::InternalStruct>; _VTKM_SHARED_PTR_INSTANTIATE(char) _VTKM_SHARED_PTR_INSTANTIATE(vtkm::Int8) @@ -43,23 +47,29 @@ _VTKM_SHARED_PTR_INSTANTIATE(vtkm::Float64) #undef _VTKM_SHARED_PTR_INSTANTIATE #endif // VTKM_MSVC -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -#define _VTKM_ARRAYHANDLE_INSTANTIATE(Type) \ - template class VTKM_CONT_EXPORT ArrayHandle; \ - template class VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>; \ - template class VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>; \ - template class VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>; \ - namespace internal { \ - template class VTKM_CONT_EXPORT ArrayHandleExecutionManagerBase; \ - template class VTKM_CONT_EXPORT ArrayHandleExecutionManagerBase, StorageTagBasic>; \ - template class VTKM_CONT_EXPORT ArrayHandleExecutionManagerBase, StorageTagBasic>; \ - template class VTKM_CONT_EXPORT ArrayHandleExecutionManagerBase, StorageTagBasic>; \ - template class VTKM_CONT_EXPORT ArrayPortalFromIterators; \ - template class VTKM_CONT_EXPORT ArrayPortalFromIterators*>; \ - template class VTKM_CONT_EXPORT ArrayPortalFromIterators*>; \ - template class VTKM_CONT_EXPORT ArrayPortalFromIterators*>; \ +#define _VTKM_ARRAYHANDLE_INSTANTIATE(Type) \ + template class VTKM_CONT_EXPORT ArrayHandle; \ + template class VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>; \ + template class VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>; \ + template class VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>; \ + namespace internal \ + { \ + template class VTKM_CONT_EXPORT ArrayHandleExecutionManagerBase; \ + template class VTKM_CONT_EXPORT \ + ArrayHandleExecutionManagerBase, StorageTagBasic>; \ + template class VTKM_CONT_EXPORT \ + ArrayHandleExecutionManagerBase, StorageTagBasic>; \ + template class VTKM_CONT_EXPORT \ + ArrayHandleExecutionManagerBase, StorageTagBasic>; \ + template class VTKM_CONT_EXPORT ArrayPortalFromIterators; \ + template class VTKM_CONT_EXPORT ArrayPortalFromIterators*>; \ + template class VTKM_CONT_EXPORT ArrayPortalFromIterators*>; \ + template class VTKM_CONT_EXPORT ArrayPortalFromIterators*>; \ } /* end namespace internal */ _VTKM_ARRAYHANDLE_INSTANTIATE(char) @@ -75,6 +85,5 @@ _VTKM_ARRAYHANDLE_INSTANTIATE(vtkm::Float32) _VTKM_ARRAYHANDLE_INSTANTIATE(vtkm::Float64) #undef _VTKM_ARRAYHANDLE_INSTANTIATE - } } // end vtkm::cont diff --git a/vtkm/cont/ArrayHandle.h b/vtkm/cont/ArrayHandle.h index ad19dfa14..ab0896869 100644 --- a/vtkm/cont/ArrayHandle.h +++ b/vtkm/cont/ArrayHandle.h @@ -38,11 +38,13 @@ #include #include +namespace vtkm +{ +namespace cont +{ -namespace vtkm { -namespace cont { - -namespace internal { +namespace internal +{ /// \brief Base class of all ArrayHandle classes. /// @@ -50,7 +52,9 @@ namespace internal { /// ArrayHandle class (or at least something that behaves exactly like one). /// The \c ArrayHandle template class inherits from this. /// -class VTKM_CONT_EXPORT ArrayHandleBase { }; +class VTKM_CONT_EXPORT ArrayHandleBase +{ +}; /// Checks to see if the given type and storage can form a valid array handle /// (some storage objects cannot support all types). This check is compatible @@ -58,14 +62,14 @@ class VTKM_CONT_EXPORT ArrayHandleBase { }; /// typedef named type that is either std::true_type or std::false_type. /// Both of these have a typedef named value with the respective boolean value. /// -template -struct IsValidArrayHandle { +template +struct IsValidArrayHandle +{ //need to add the not - using type = std::integral_constant - >::value)>; + using type = + std::integral_constant>::value)>; }; /// Checks to see if the ArrayHandle for the given DeviceAdatper allows @@ -75,10 +79,11 @@ struct IsValidArrayHandle { /// std::true_type or std::false_type. /// Both of these have a typedef named value with the respective boolean value. /// -template -struct IsWriteableArrayHandle { +template +struct IsWriteableArrayHandle +{ private: - template + template using ExecutionTypes = typename ArrayHandle::template ExecutionTypes; using ValueType = typename ExecutionTypes::Portal::ValueType; @@ -87,6 +92,7 @@ private: //will have a value type of void*, which is what we are trying to detect using RawValueType = typename std::remove_pointer::type; using IsVoidType = std::is_void; + public: using type = std::integral_constant; }; @@ -103,22 +109,23 @@ public: /// class is used to ensure that a given type is an \c ArrayHandle. It is /// used internally in the VTKM_IS_ARRAY_HANDLE macro. /// -template +template struct ArrayHandleCheck { - using type = typename std::is_base_of< - ::vtkm::cont::internal::ArrayHandleBase, T>::type; + using type = typename std::is_base_of<::vtkm::cont::internal::ArrayHandleBase, T>::type; }; -#define VTKM_IS_ARRAY_HANDLE(T) \ +#define VTKM_IS_ARRAY_HANDLE(T) \ VTKM_STATIC_ASSERT(::vtkm::cont::internal::ArrayHandleCheck::type::value) } // namespace internal -namespace detail { +namespace detail +{ -template struct GetTypeInParentheses; -template +template +struct GetTypeInParentheses; +template struct GetTypeInParentheses { typedef T type; @@ -127,29 +134,39 @@ struct GetTypeInParentheses } // namespace detail // Implementation for VTKM_ARRAY_HANDLE_SUBCLASS macros -#define VTK_M_ARRAY_HANDLE_SUBCLASS_IMPL(classname, fullclasstype, superclass, typename__) \ - typedef typename__ vtkm::cont::detail::GetTypeInParentheses::type Thisclass;\ - typedef typename__ vtkm::cont::detail::GetTypeInParentheses::type Superclass;\ - \ - VTKM_IS_ARRAY_HANDLE(Superclass); \ - \ - VTKM_CONT \ - classname() : Superclass() { } \ - \ - VTKM_CONT \ - classname(const Thisclass &src) : Superclass(src) { } \ - \ - VTKM_CONT \ - classname(const vtkm::cont::ArrayHandle &src) : Superclass(src) { } \ - \ - VTKM_CONT \ - Thisclass &operator=(const Thisclass &src) \ - { \ - this->Superclass::operator=(src); \ - return *this; \ - } \ - \ - typedef typename__ Superclass::ValueType ValueType; \ +#define VTK_M_ARRAY_HANDLE_SUBCLASS_IMPL(classname, fullclasstype, superclass, typename__) \ + typedef typename__ vtkm::cont::detail::GetTypeInParentheses::type Thisclass; \ + typedef typename__ vtkm::cont::detail::GetTypeInParentheses::type Superclass; \ + \ + VTKM_IS_ARRAY_HANDLE(Superclass); \ + \ + VTKM_CONT \ + classname() \ + : Superclass() \ + { \ + } \ + \ + VTKM_CONT \ + classname(const Thisclass& src) \ + : Superclass(src) \ + { \ + } \ + \ + VTKM_CONT \ + classname(const vtkm::cont::ArrayHandle& src) \ + : Superclass(src) \ + { \ + } \ + \ + VTKM_CONT \ + Thisclass& operator=(const Thisclass& src) \ + { \ + this->Superclass::operator=(src); \ + return *this; \ + } \ + \ + typedef typename__ Superclass::ValueType ValueType; \ typedef typename__ Superclass::StorageTag StorageTag /// \brief Macro to make default methods in ArrayHandle subclasses. @@ -173,7 +190,7 @@ struct GetTypeInParentheses /// templated. For ArrayHandle sublcasses that are not templates, use /// VTKM_ARRAY_HANDLE_SUBCLASS_NT. /// -#define VTKM_ARRAY_HANDLE_SUBCLASS(classname, fullclasstype, superclass) \ +#define VTKM_ARRAY_HANDLE_SUBCLASS(classname, fullclasstype, superclass) \ VTK_M_ARRAY_HANDLE_SUBCLASS_IMPL(classname, fullclasstype, superclass, typename) /// \brief Macro to make default methods in ArrayHandle subclasses. @@ -196,7 +213,7 @@ struct GetTypeInParentheses /// templated. For ArrayHandle sublcasses that are are templates, use /// VTKM_ARRAY_HANDLE_SUBCLASS. /// -#define VTKM_ARRAY_HANDLE_SUBCLASS_NT(classname, superclass) \ +#define VTKM_ARRAY_HANDLE_SUBCLASS_NT(classname, superclass) \ VTK_M_ARRAY_HANDLE_SUBCLASS_IMPL(classname, (classname), superclass, ) /// \brief Manages an array-worth of data. @@ -220,16 +237,15 @@ struct GetTypeInParentheses /// allocated memory is released. /// /// -template< - typename T, - typename StorageTag_ = VTKM_DEFAULT_STORAGE_TAG> +template class VTKM_ALWAYS_EXPORT ArrayHandle : public internal::ArrayHandleBase { private: - typedef vtkm::cont::internal::ArrayHandleExecutionManagerBase - ExecutionManagerType; + typedef vtkm::cont::internal::ArrayHandleExecutionManagerBase + ExecutionManagerType; + public: - typedef vtkm::cont::internal::Storage StorageType; + typedef vtkm::cont::internal::Storage StorageType; typedef T ValueType; typedef StorageTag_ StorageTag; typedef typename StorageType::PortalType PortalControl; @@ -237,10 +253,9 @@ public: template struct ExecutionTypes { - typedef typename ExecutionManagerType - ::template ExecutionTypes::Portal Portal; - typedef typename ExecutionManagerType - ::template ExecutionTypes::PortalConst PortalConst; + typedef typename ExecutionManagerType::template ExecutionTypes::Portal Portal; + typedef typename ExecutionManagerType::template ExecutionTypes::PortalConst + PortalConst; }; /// Constructs an empty ArrayHandle. Typically used for output or @@ -255,7 +270,7 @@ public: /// with CUDA), then the automatically generated copy constructor could be /// created for all devices, and it would not be valid for all devices. /// - ArrayHandle(const vtkm::cont::ArrayHandle &src); + ArrayHandle(const vtkm::cont::ArrayHandle& src); /// Move constructor. /// @@ -264,14 +279,13 @@ public: /// with CUDA), then the automatically generated move constructor could be /// created for all devices, and it would not be valid for all devices. /// - ArrayHandle(vtkm::cont::ArrayHandle &&src); - + ArrayHandle(vtkm::cont::ArrayHandle&& src); /// Special constructor for subclass specializations that need to set the /// initial state of the control array. When this constructor is used, it /// is assumed that the control array is valid. /// - ArrayHandle(const StorageType &storage); + ArrayHandle(const StorageType& storage); /// Destructs an empty ArrayHandle. /// @@ -285,25 +299,25 @@ public: /// \brief Copies an ArrayHandle /// VTKM_CONT - vtkm::cont::ArrayHandle & - operator=(const vtkm::cont::ArrayHandle &src); + vtkm::cont::ArrayHandle& operator=( + const vtkm::cont::ArrayHandle& src); /// \brief Move and Assignment of an ArrayHandle /// VTKM_CONT - vtkm::cont::ArrayHandle & - operator=(vtkm::cont::ArrayHandle &&src); + vtkm::cont::ArrayHandle& operator=( + vtkm::cont::ArrayHandle&& src); /// Like a pointer, two \c ArrayHandles are considered equal if they point /// to the same location in memory. /// VTKM_CONT - bool operator==(const ArrayHandle &rhs) const + bool operator==(const ArrayHandle& rhs) const { return (this->Internals == rhs.Internals); } VTKM_CONT - bool operator!=(const ArrayHandle &rhs) const + bool operator!=(const ArrayHandle& rhs) const { return (this->Internals != rhs.Internals); } @@ -331,7 +345,7 @@ public: /// Copies data into the given iterator for the control environment. This /// method can skip copying into an internally managed control array. /// - template + template VTKM_CONT void CopyInto(IteratorType dest, DeviceAdapterTag) const; /// \brief Allocates an array large enough to hold the given number of values. @@ -385,16 +399,17 @@ public: } } + // clang-format off /// Prepares this array to be used as an input to an operation in the /// execution environment. If necessary, copies data to the execution /// environment. Can throw an exception if this array does not yet contain /// any data. Returns a portal that can be used in code running in the /// execution environment. /// - template + template VTKM_CONT - typename ExecutionTypes::PortalConst - PrepareForInput(DeviceAdapterTag) const; + typename ExecutionTypes::PortalConst PrepareForInput(DeviceAdapterTag) const; + // clang-format on /// Prepares (allocates) this array to be used as an output from an operation /// in the execution environment. The internal state of this class is set to @@ -403,10 +418,9 @@ public: /// called). Returns a portal that can be used in code running in the /// execution environment. /// - template - VTKM_CONT - typename ExecutionTypes::Portal - PrepareForOutput(vtkm::Id numberOfValues, DeviceAdapterTag); + template + VTKM_CONT typename ExecutionTypes::Portal PrepareForOutput( + vtkm::Id numberOfValues, DeviceAdapterTag); /// Prepares this array to be used in an in-place operation (both as input /// and output) in the execution environment. If necessary, copies data to @@ -414,19 +428,16 @@ public: /// yet contain any data. Returns a portal that can be used in code running /// in the execution environment. /// - template - VTKM_CONT - typename ExecutionTypes::Portal - PrepareForInPlace(DeviceAdapterTag); + template + VTKM_CONT typename ExecutionTypes::Portal PrepareForInPlace(DeviceAdapterTag); /// Gets this array handle ready to interact with the given device. If the /// array handle has already interacted with this device, then this method /// does nothing. Although the internal state of this class can change, the /// method is declared const because logically the data does not. /// - template - VTKM_CONT - void PrepareForDevice(DeviceAdapterTag) const; + template + VTKM_CONT void PrepareForDevice(DeviceAdapterTag) const; /// Synchronizes the control array with the execution array. If either the /// user array or control array is already valid, this method does nothing @@ -451,47 +462,40 @@ public: StorageType ControlArray; bool ControlArrayValid; - std::unique_ptr< - vtkm::cont::internal::ArrayHandleExecutionManagerBase< - ValueType,StorageTag> > ExecutionArray; + std::unique_ptr> + ExecutionArray; bool ExecutionArrayValid; }; VTKM_CONT ArrayHandle(const std::shared_ptr& i) : Internals(i) - { } + { + } std::shared_ptr Internals; }; /// A convenience function for creating an ArrayHandle from a standard C array. /// -template -VTKM_CONT -vtkm::cont::ArrayHandle -make_ArrayHandle(const T *array, - vtkm::Id length) +template +VTKM_CONT vtkm::cont::ArrayHandle make_ArrayHandle(const T* array, + vtkm::Id length) { - typedef vtkm::cont::ArrayHandle - ArrayHandleType; - typedef vtkm::cont::internal::Storage - StorageType; + typedef vtkm::cont::ArrayHandle ArrayHandleType; + typedef vtkm::cont::internal::Storage StorageType; return ArrayHandleType(StorageType(array, length)); } /// A convenience function for creating an ArrayHandle from an std::vector. /// -template -VTKM_CONT -vtkm::cont::ArrayHandle -make_ArrayHandle(const std::vector &array) +template +VTKM_CONT vtkm::cont::ArrayHandle make_ArrayHandle( + const std::vector& array) { if (!array.empty()) { - return make_ArrayHandle(&array.front(), - static_cast(array.size())); + return make_ArrayHandle(&array.front(), static_cast(array.size())); } else { @@ -500,43 +504,37 @@ make_ArrayHandle(const std::vector &array) } } -namespace detail { +namespace detail +{ -template -VTKM_NEVER_EXPORT -VTKM_CONT -inline void printSummary_ArrayHandle_Value(const T &value, - std::ostream &out, - vtkm::VecTraitsTagSingleComponent) +template +VTKM_NEVER_EXPORT VTKM_CONT inline void printSummary_ArrayHandle_Value( + const T& value, std::ostream& out, vtkm::VecTraitsTagSingleComponent) { out << value; } -template -VTKM_NEVER_EXPORT -VTKM_CONT -inline void printSummary_ArrayHandle_Value(const T &value, - std::ostream &out, - vtkm::VecTraitsTagMultipleComponents) +template +VTKM_NEVER_EXPORT VTKM_CONT inline void printSummary_ArrayHandle_Value( + const T& value, std::ostream& out, vtkm::VecTraitsTagMultipleComponents) { using Traits = vtkm::VecTraits; using ComponentType = typename Traits::ComponentType; using IsVecOfVec = typename vtkm::VecTraits::HasMultipleComponents; vtkm::IdComponent numComponents = Traits::GetNumberOfComponents(value); out << "("; - printSummary_ArrayHandle_Value(Traits::GetComponent(value,0), out, IsVecOfVec()); + printSummary_ArrayHandle_Value(Traits::GetComponent(value, 0), out, IsVecOfVec()); for (vtkm::IdComponent index = 1; index < numComponents; ++index) { out << ","; - printSummary_ArrayHandle_Value(Traits::GetComponent(value,index), out, IsVecOfVec()); + printSummary_ArrayHandle_Value(Traits::GetComponent(value, index), out, IsVecOfVec()); } out << ")"; } VTKM_NEVER_EXPORT VTKM_CONT -inline void printSummary_ArrayHandle_Value(UInt8 value, - std::ostream &out, +inline void printSummary_ArrayHandle_Value(UInt8 value, std::ostream& out, vtkm::VecTraitsTagSingleComponent) { out << static_cast(value); @@ -544,62 +542,49 @@ inline void printSummary_ArrayHandle_Value(UInt8 value, VTKM_NEVER_EXPORT VTKM_CONT -inline void printSummary_ArrayHandle_Value(Int8 value, - std::ostream &out, +inline void printSummary_ArrayHandle_Value(Int8 value, std::ostream& out, vtkm::VecTraitsTagSingleComponent) { out << static_cast(value); } -template -VTKM_NEVER_EXPORT -VTKM_CONT -inline void printSummary_ArrayHandle_Value(const vtkm::Pair &value, - std::ostream &out, - vtkm::VecTraitsTagSingleComponent) +template +VTKM_NEVER_EXPORT VTKM_CONT inline void printSummary_ArrayHandle_Value( + const vtkm::Pair& value, std::ostream& out, vtkm::VecTraitsTagSingleComponent) { out << "{"; - printSummary_ArrayHandle_Value( - value.first, - out, - typename vtkm::VecTraits::HasMultipleComponents()); + printSummary_ArrayHandle_Value(value.first, out, + typename vtkm::VecTraits::HasMultipleComponents()); out << ","; - printSummary_ArrayHandle_Value( - value.second, - out, - typename vtkm::VecTraits::HasMultipleComponents()); + printSummary_ArrayHandle_Value(value.second, out, + typename vtkm::VecTraits::HasMultipleComponents()); out << "}"; } } // namespace detail -template -VTKM_NEVER_EXPORT -VTKM_CONT -inline void -printSummary_ArrayHandle(const vtkm::cont::ArrayHandle &array, - std::ostream &out) +template +VTKM_NEVER_EXPORT VTKM_CONT inline void printSummary_ArrayHandle( + const vtkm::cont::ArrayHandle& array, std::ostream& out) { - using ArrayType = vtkm::cont::ArrayHandle; + using ArrayType = vtkm::cont::ArrayHandle; using PortalType = typename ArrayType::PortalConstControl; using IsVec = typename vtkm::VecTraits::HasMultipleComponents; vtkm::Id sz = array.GetNumberOfValues(); - out << "valueType=" << typeid(T).name() - << " storageType=" << typeid(StorageT).name() - << " numValues=" << sz - << " ["; + out << "valueType=" << typeid(T).name() << " storageType=" << typeid(StorageT).name() + << " numValues=" << sz << " ["; PortalType portal = array.GetPortalConstControl(); if (sz <= 7) { - for (vtkm::Id i = 0 ; i < sz; i++) + for (vtkm::Id i = 0; i < sz; i++) { detail::printSummary_ArrayHandle_Value(portal.Get(i), out, IsVec()); - if (i != (sz-1)) + if (i != (sz - 1)) { - out<<" "; + out << " "; } } } @@ -611,15 +596,14 @@ printSummary_ArrayHandle(const vtkm::cont::ArrayHandle &array, out << " "; detail::printSummary_ArrayHandle_Value(portal.Get(2), out, IsVec()); out << " ... "; - detail::printSummary_ArrayHandle_Value(portal.Get(sz-3), out, IsVec()); + detail::printSummary_ArrayHandle_Value(portal.Get(sz - 3), out, IsVec()); out << " "; - detail::printSummary_ArrayHandle_Value(portal.Get(sz-2), out, IsVec()); + detail::printSummary_ArrayHandle_Value(portal.Get(sz - 2), out, IsVec()); out << " "; - detail::printSummary_ArrayHandle_Value(portal.Get(sz-1), out, IsVec()); + detail::printSummary_ArrayHandle_Value(portal.Get(sz - 1), out, IsVec()); } - out<<"]\n"; + out << "]\n"; } - } } //namespace vtkm::cont @@ -629,11 +613,15 @@ printSummary_ArrayHandle(const vtkm::cont::ArrayHandle &array, #ifndef vtkm_cont_ArrayHandle_cxx #ifdef VTKM_MSVC -#define _VTKM_SHARED_PTR_EXPORT(Type) \ - extern template class VTKM_CONT_TEMPLATE_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle::InternalStruct >; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>::InternalStruct >; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>::InternalStruct >; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>::InternalStruct >; +#define _VTKM_SHARED_PTR_EXPORT(Type) \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + std::shared_ptr::InternalStruct>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT std::shared_ptr< \ + vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>::InternalStruct>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT std::shared_ptr< \ + vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>::InternalStruct>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT std::shared_ptr< \ + vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>::InternalStruct>; _VTKM_SHARED_PTR_EXPORT(char) _VTKM_SHARED_PTR_EXPORT(vtkm::Int8) @@ -650,23 +638,33 @@ _VTKM_SHARED_PTR_EXPORT(vtkm::Float64) #undef _VTKM_SHARED_PTR_EXPORT #endif // VTKM_MSVC -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -#define _VTKM_ARRAYHANDLE_EXPORT(Type) \ - extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandle; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandle, StorageTagBasic>; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandle, StorageTagBasic>; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandle, StorageTagBasic>; \ - namespace internal { \ - extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandleExecutionManagerBase; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandleExecutionManagerBase, StorageTagBasic>; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandleExecutionManagerBase, StorageTagBasic>; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandleExecutionManagerBase, StorageTagBasic>; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayPortalFromIterators; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayPortalFromIterators*>; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayPortalFromIterators*>; \ - extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayPortalFromIterators*>; \ +#define _VTKM_ARRAYHANDLE_EXPORT(Type) \ + extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandle; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandle, StorageTagBasic>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandle, StorageTagBasic>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandle, StorageTagBasic>; \ + namespace internal \ + { \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandleExecutionManagerBase; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandleExecutionManagerBase, StorageTagBasic>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandleExecutionManagerBase, StorageTagBasic>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandleExecutionManagerBase, StorageTagBasic>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayPortalFromIterators; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayPortalFromIterators*>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayPortalFromIterators*>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayPortalFromIterators*>; \ } /* end namespace internal */ _VTKM_ARRAYHANDLE_EXPORT(char) @@ -682,7 +680,6 @@ _VTKM_ARRAYHANDLE_EXPORT(vtkm::Float32) _VTKM_ARRAYHANDLE_EXPORT(vtkm::Float64) #undef _VTKM_ARRAYHANDLE_EXPORT - } } // end vtkm::cont diff --git a/vtkm/cont/ArrayHandle.hxx b/vtkm/cont/ArrayHandle.hxx index b795738e8..0be500adf 100644 --- a/vtkm/cont/ArrayHandle.hxx +++ b/vtkm/cont/ArrayHandle.hxx @@ -18,29 +18,33 @@ // this software. //============================================================================ -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -template -ArrayHandle::ArrayHandle() +template +ArrayHandle::ArrayHandle() : Internals(new InternalStruct) { this->Internals->ControlArrayValid = false; this->Internals->ExecutionArrayValid = false; } -template -ArrayHandle::ArrayHandle(const ArrayHandle &src) +template +ArrayHandle::ArrayHandle(const ArrayHandle& src) : Internals(src.Internals) -{ } +{ +} -template -ArrayHandle::ArrayHandle(ArrayHandle &&src) +template +ArrayHandle::ArrayHandle(ArrayHandle&& src) : Internals(std::move(src.Internals)) -{ } +{ +} -template -ArrayHandle::ArrayHandle(const typename ArrayHandle::StorageType &storage) +template +ArrayHandle::ArrayHandle(const typename ArrayHandle::StorageType& storage) : Internals(new InternalStruct) { this->Internals->ControlArray = storage; @@ -48,30 +52,27 @@ ArrayHandle::ArrayHandle(const typename ArrayHandle::StorageType &stor this->Internals->ExecutionArrayValid = false; } -template -ArrayHandle::~ArrayHandle() +template +ArrayHandle::~ArrayHandle() { } -template -ArrayHandle& -ArrayHandle::operator=(const ArrayHandle &src) +template +ArrayHandle& ArrayHandle::operator=(const ArrayHandle& src) { this->Internals = src.Internals; return *this; } -template -ArrayHandle& -ArrayHandle::operator=(ArrayHandle &&src) +template +ArrayHandle& ArrayHandle::operator=(ArrayHandle&& src) { this->Internals = std::move(src.Internals); return *this; } -template -typename ArrayHandle::StorageType& -ArrayHandle::GetStorage() +template +typename ArrayHandle::StorageType& ArrayHandle::GetStorage() { this->SyncControlArray(); if (this->Internals->ControlArrayValid) @@ -85,9 +86,8 @@ ArrayHandle::GetStorage() } } -template -const typename ArrayHandle::StorageType& -ArrayHandle::GetStorage() const +template +const typename ArrayHandle::StorageType& ArrayHandle::GetStorage() const { this->SyncControlArray(); if (this->Internals->ControlArrayValid) @@ -101,9 +101,8 @@ ArrayHandle::GetStorage() const } } -template -typename ArrayHandle::PortalControl -ArrayHandle::GetPortalControl() +template +typename ArrayHandle::PortalControl ArrayHandle::GetPortalControl() { this->SyncControlArray(); if (this->Internals->ControlArrayValid) @@ -117,13 +116,12 @@ ArrayHandle::GetPortalControl() else { throw vtkm::cont::ErrorInternal( - "ArrayHandle::SyncControlArray did not make control array valid."); + "ArrayHandle::SyncControlArray did not make control array valid."); } } -template -typename ArrayHandle::PortalConstControl -ArrayHandle::GetPortalConstControl() const +template +typename ArrayHandle::PortalConstControl ArrayHandle::GetPortalConstControl() const { this->SyncControlArray(); if (this->Internals->ControlArrayValid) @@ -133,12 +131,12 @@ ArrayHandle::GetPortalConstControl() const else { throw vtkm::cont::ErrorInternal( - "ArrayHandle::SyncControlArray did not make control array valid."); + "ArrayHandle::SyncControlArray did not make control array valid."); } } -template -vtkm::Id ArrayHandle::GetNumberOfValues() const +template +vtkm::Id ArrayHandle::GetNumberOfValues() const { if (this->Internals->ControlArrayValid) { @@ -154,50 +152,46 @@ vtkm::Id ArrayHandle::GetNumberOfValues() const } } -template -template -void ArrayHandle::CopyInto(IteratorType dest, DeviceAdapterTag) const +template +template +void ArrayHandle::CopyInto(IteratorType dest, DeviceAdapterTag) const { using pointer_type = typename std::iterator_traits::pointer; using value_type = typename std::remove_pointer::type; - static_assert( !std::is_const::value, - "CopyInto requires a non const iterator." ); + static_assert(!std::is_const::value, "CopyInto requires a non const iterator."); VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag); - if (!this->Internals->ControlArrayValid && - !this->Internals->ExecutionArrayValid) - { - throw vtkm::cont::ErrorBadValue( - "ArrayHandle has no data to copy into Iterator."); - } + if (!this->Internals->ControlArrayValid && !this->Internals->ExecutionArrayValid) + { + throw vtkm::cont::ErrorBadValue("ArrayHandle has no data to copy into Iterator."); + } if (!this->Internals->ControlArrayValid && this->Internals->ExecutionArray->IsDeviceAdapter(DeviceAdapterTag())) - { - /// Dynamically cast ArrayHandleExecutionManagerBase into a concrete - /// class and call CopyInto. The dynamic conversion will be sucessful - /// becuase the check to ensure the ExecutionArray is of the type - /// DeviceAdapterTag has already passed - typedef vtkm::cont::internal::ArrayHandleExecutionManager< - T, StorageTag, DeviceAdapterTag> ConcreteType; - ConcreteType *ConcreteExecutionArray = - dynamic_cast(this->Internals->ExecutionArray.get()); + { + /// Dynamically cast ArrayHandleExecutionManagerBase into a concrete + /// class and call CopyInto. The dynamic conversion will be sucessful + /// becuase the check to ensure the ExecutionArray is of the type + /// DeviceAdapterTag has already passed + typedef vtkm::cont::internal::ArrayHandleExecutionManager + ConcreteType; + ConcreteType* ConcreteExecutionArray = + dynamic_cast(this->Internals->ExecutionArray.get()); - ConcreteExecutionArray->CopyInto(dest); - } + ConcreteExecutionArray->CopyInto(dest); + } else - { + { PortalConstControl portal = this->GetPortalConstControl(); std::copy(vtkm::cont::ArrayPortalToIteratorBegin(portal), - vtkm::cont::ArrayPortalToIteratorEnd(portal), - dest); - } + vtkm::cont::ArrayPortalToIteratorEnd(portal), dest); + } } -template -void ArrayHandle::Shrink(vtkm::Id numberOfValues) +template +void ArrayHandle::Shrink(vtkm::Id numberOfValues) { VTKM_ASSERT(numberOfValues >= 0); @@ -222,8 +216,7 @@ void ArrayHandle::Shrink(vtkm::Id numberOfValues) } else // numberOfValues > originalNumberOfValues { - throw vtkm::cont::ErrorBadValue( - "ArrayHandle::Shrink cannot be used to grow array."); + throw vtkm::cont::ErrorBadValue("ArrayHandle::Shrink cannot be used to grow array."); } VTKM_ASSERT(this->GetNumberOfValues() == numberOfValues); @@ -237,15 +230,14 @@ void ArrayHandle::Shrink(vtkm::Id numberOfValues) } } -template -template -typename ArrayHandle::template ExecutionTypes::PortalConst -ArrayHandle::PrepareForInput(DeviceAdapterTag) const +template +template +typename ArrayHandle::template ExecutionTypes::PortalConst + ArrayHandle::PrepareForInput(DeviceAdapterTag) const { VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag); - if (!this->Internals->ControlArrayValid - && !this->Internals->ExecutionArrayValid) + if (!this->Internals->ControlArrayValid && !this->Internals->ExecutionArrayValid) { // Want to use an empty array. // Set up ArrayHandle state so this actually works. @@ -255,18 +247,18 @@ ArrayHandle::PrepareForInput(DeviceAdapterTag) const this->PrepareForDevice(DeviceAdapterTag()); typename ExecutionTypes::PortalConst portal = - this->Internals->ExecutionArray->PrepareForInput( - !this->Internals->ExecutionArrayValid, DeviceAdapterTag()); + this->Internals->ExecutionArray->PrepareForInput(!this->Internals->ExecutionArrayValid, + DeviceAdapterTag()); this->Internals->ExecutionArrayValid = true; return portal; } -template -template -typename ArrayHandle::template ExecutionTypes::Portal -ArrayHandle::PrepareForOutput(vtkm::Id numberOfValues, DeviceAdapterTag) +template +template +typename ArrayHandle::template ExecutionTypes::Portal +ArrayHandle::PrepareForOutput(vtkm::Id numberOfValues, DeviceAdapterTag) { VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag); @@ -277,8 +269,7 @@ ArrayHandle::PrepareForOutput(vtkm::Id numberOfValues, DeviceAdapterTag) this->PrepareForDevice(DeviceAdapterTag()); typename ExecutionTypes::Portal portal = - this->Internals->ExecutionArray->PrepareForOutput(numberOfValues, - DeviceAdapterTag()); + this->Internals->ExecutionArray->PrepareForOutput(numberOfValues, DeviceAdapterTag()); // We are assuming that the calling code will fill the array using the // iterators we are returning, so go ahead and mark the execution array as @@ -294,15 +285,14 @@ ArrayHandle::PrepareForOutput(vtkm::Id numberOfValues, DeviceAdapterTag) return portal; } -template -template -typename ArrayHandle::template ExecutionTypes::Portal -ArrayHandle::PrepareForInPlace(DeviceAdapterTag) +template +template +typename ArrayHandle::template ExecutionTypes::Portal + ArrayHandle::PrepareForInPlace(DeviceAdapterTag) { VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag); - if (!this->Internals->ControlArrayValid - && !this->Internals->ExecutionArrayValid) + if (!this->Internals->ControlArrayValid && !this->Internals->ExecutionArrayValid) { // Want to use an empty array. // Set up ArrayHandle state so this actually works. @@ -312,8 +302,8 @@ ArrayHandle::PrepareForInPlace(DeviceAdapterTag) this->PrepareForDevice(DeviceAdapterTag()); typename ExecutionTypes::Portal portal = - this->Internals->ExecutionArray->PrepareForInPlace( - !this->Internals->ExecutionArrayValid, DeviceAdapterTag()); + this->Internals->ExecutionArray->PrepareForInPlace(!this->Internals->ExecutionArrayValid, + DeviceAdapterTag()); this->Internals->ExecutionArrayValid = true; @@ -325,9 +315,9 @@ ArrayHandle::PrepareForInPlace(DeviceAdapterTag) return portal; } -template -template -void ArrayHandle::PrepareForDevice(DeviceAdapterTag) const +template +template +void ArrayHandle::PrepareForDevice(DeviceAdapterTag) const { if (this->Internals->ExecutionArray != nullptr) { @@ -347,34 +337,30 @@ void ArrayHandle::PrepareForDevice(DeviceAdapterTag) const this->SyncControlArray(); // Need to change some state that does not change the logical state from // an external point of view. - InternalStruct *internals - = const_cast(this->Internals.get()); + InternalStruct* internals = const_cast(this->Internals.get()); internals->ExecutionArray.reset(); internals->ExecutionArrayValid = false; - } } + } VTKM_ASSERT(this->Internals->ExecutionArray == nullptr); VTKM_ASSERT(!this->Internals->ExecutionArrayValid); // Need to change some state that does not change the logical state from // an external point of view. - InternalStruct *internals - = const_cast(this->Internals.get()); + InternalStruct* internals = const_cast(this->Internals.get()); internals->ExecutionArray.reset( - new vtkm::cont::internal::ArrayHandleExecutionManager< - T, StorageTag, DeviceAdapterTag>(&internals->ControlArray)); + new vtkm::cont::internal::ArrayHandleExecutionManager( + &internals->ControlArray)); } - -template -void ArrayHandle::SyncControlArray() const +template +void ArrayHandle::SyncControlArray() const { if (!this->Internals->ControlArrayValid) { // Need to change some state that does not change the logical state from // an external point of view. - InternalStruct *internals - = const_cast(this->Internals.get()); + InternalStruct* internals = const_cast(this->Internals.get()); if (this->Internals->ExecutionArrayValid) { internals->ExecutionArray->RetrieveOutputData(&internals->ControlArray); @@ -390,7 +376,5 @@ void ArrayHandle::SyncControlArray() const } } } - - } } diff --git a/vtkm/cont/ArrayHandleCartesianProduct.h b/vtkm/cont/ArrayHandleCartesianProduct.h index 01cac9fd1..0ac98ddf4 100644 --- a/vtkm/cont/ArrayHandleCartesianProduct.h +++ b/vtkm/cont/ArrayHandleCartesianProduct.h @@ -25,16 +25,17 @@ #include #include -namespace vtkm { -namespace exec { -namespace internal { +namespace vtkm +{ +namespace exec +{ +namespace internal +{ /// \brief An array portal that acts as a 3D cartesian product of 3 arrays. /// -template +template class VTKM_ALWAYS_EXPORT ArrayPortalCartesianProduct { public: @@ -47,37 +48,42 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT ArrayPortalCartesianProduct() - : PortalFirst(), PortalSecond(), PortalThird() - { } //needs to be host and device so that cuda can create lvalue of these + : PortalFirst() + , PortalSecond() + , PortalThird() + { + } //needs to be host and device so that cuda can create lvalue of these VTKM_CONT - ArrayPortalCartesianProduct(const PortalTypeFirst &portalfirst, - const PortalTypeSecond &portalsecond, - const PortalTypeThird &portalthird) - : PortalFirst(portalfirst), PortalSecond(portalsecond), PortalThird(portalthird) - { } + ArrayPortalCartesianProduct(const PortalTypeFirst& portalfirst, + const PortalTypeSecond& portalsecond, + const PortalTypeThird& portalthird) + : PortalFirst(portalfirst) + , PortalSecond(portalsecond) + , PortalThird(portalthird) + { + } /// Copy constructor for any other ArrayPortalCartesianProduct with an iterator /// type that can be copied to this iterator type. This allows us to do any /// type casting that the iterators do (like the non-const to const cast). /// - template - VTKM_CONT - ArrayPortalCartesianProduct(const ArrayPortalCartesianProduct &src) - : PortalFirst(src.GetPortalFirst()), - PortalSecond(src.GetPortalSecond()), - PortalThird(src.GetPortalThird()) - { } - + template + VTKM_CONT ArrayPortalCartesianProduct( + const ArrayPortalCartesianProduct& src) + : PortalFirst(src.GetPortalFirst()) + , PortalSecond(src.GetPortalSecond()) + , PortalThird(src.GetPortalThird()) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT vtkm::Id GetNumberOfValues() const { - return this->PortalFirst.GetNumberOfValues() * - this->PortalSecond.GetNumberOfValues() * - this->PortalThird.GetNumberOfValues(); + return this->PortalFirst.GetNumberOfValues() * this->PortalSecond.GetNumberOfValues() * + this->PortalThird.GetNumberOfValues(); } VTKM_SUPPRESS_EXEC_WARNINGS @@ -89,27 +95,26 @@ public: vtkm::Id dim1 = this->PortalFirst.GetNumberOfValues(); vtkm::Id dim2 = this->PortalSecond.GetNumberOfValues(); - vtkm::Id dim12 = dim1*dim2; + vtkm::Id dim12 = dim1 * dim2; vtkm::Id idx12 = index % dim12; vtkm::Id i1 = idx12 % dim1; vtkm::Id i2 = idx12 / dim1; vtkm::Id i3 = index / dim12; - return vtkm::make_Vec(this->PortalFirst.Get(i1), - this->PortalSecond.Get(i2), + return vtkm::make_Vec(this->PortalFirst.Get(i1), this->PortalSecond.Get(i2), this->PortalThird.Get(i3)); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - void Set(vtkm::Id index, const ValueType &value) const + void Set(vtkm::Id index, const ValueType& value) const { VTKM_ASSERT(index >= 0); VTKM_ASSERT(index < this->GetNumberOfValues()); vtkm::Id dim1 = this->PortalFirst.GetNumberOfValues(); vtkm::Id dim2 = this->PortalSecond.GetNumberOfValues(); - vtkm::Id dim12 = dim1*dim2; + vtkm::Id dim12 = dim1 * dim2; vtkm::Id idx12 = index % dim12; vtkm::Id i1 = idx12 % dim1; @@ -123,57 +128,59 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - const PortalTypeFirst &GetFirstPortal() const { return this->PortalFirst; } + const PortalTypeFirst& GetFirstPortal() const { return this->PortalFirst; } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - const PortalTypeSecond &GetSecondPortal() const { return this->PortalSecond; } + const PortalTypeSecond& GetSecondPortal() const { return this->PortalSecond; } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - const PortalTypeThird &GetThirdPortal() const { return this->PortalThird; } - + const PortalTypeThird& GetThirdPortal() const { return this->PortalThird; } private: PortalTypeFirst PortalFirst; PortalTypeSecond PortalSecond; PortalTypeThird PortalThird; }; - } } } // namespace vtkm::exec::internal +namespace vtkm +{ +namespace cont +{ -namespace vtkm { -namespace cont { +namespace internal +{ -namespace internal { - -template -struct VTKM_ALWAYS_EXPORT StorageTagCartesianProduct { }; +template +struct VTKM_ALWAYS_EXPORT StorageTagCartesianProduct +{ +}; /// This helper struct defines the value type for a zip container containing /// the given two array handles. /// -template -struct ArrayHandleCartesianProductTraits { +template +struct ArrayHandleCartesianProductTraits +{ /// The ValueType (a pair containing the value types of the two arrays). /// - typedef vtkm::Vec ValueType; + typedef vtkm::Vec ValueType; /// The appropriately templated tag. /// - typedef StorageTagCartesianProduct Tag; + typedef StorageTagCartesianProduct Tag; /// The superclass for ArrayHandleCartesianProduct. /// - typedef vtkm::cont::ArrayHandle Superclass; + typedef vtkm::cont::ArrayHandle Superclass; }; - -template -class Storage > +template +class Storage> { VTKM_IS_ARRAY_HANDLE(FirstHandleType); VTKM_IS_ARRAY_HANDLE(SecondHandleType); @@ -182,60 +189,64 @@ class Storage PortalType; - typedef vtkm::exec::internal::ArrayPortalCartesianProduct< ValueType, - typename FirstHandleType::PortalConstControl, - typename SecondHandleType::PortalConstControl, - typename ThirdHandleType::PortalConstControl> - PortalConstType; + typedef vtkm::exec::internal::ArrayPortalCartesianProduct< + ValueType, typename FirstHandleType::PortalControl, typename SecondHandleType::PortalControl, + typename ThirdHandleType::PortalControl> + PortalType; + typedef vtkm::exec::internal::ArrayPortalCartesianProduct< + ValueType, typename FirstHandleType::PortalConstControl, + typename SecondHandleType::PortalConstControl, typename ThirdHandleType::PortalConstControl> + PortalConstType; VTKM_CONT - Storage() : FirstArray(), SecondArray(), ThirdArray() { } - - VTKM_CONT - Storage(const FirstHandleType &array1, const SecondHandleType &array2, const ThirdHandleType &array3) - : FirstArray(array1), SecondArray(array2), ThirdArray(array3) + Storage() + : FirstArray() + , SecondArray() + , ThirdArray() { + } + VTKM_CONT + Storage(const FirstHandleType& array1, const SecondHandleType& array2, + const ThirdHandleType& array3) + : FirstArray(array1) + , SecondArray(array2) + , ThirdArray(array3) + { } VTKM_CONT PortalType GetPortal() { - return PortalType(this->FirstArray.GetPortalControl(), - this->SecondArray.GetPortalControl(), - this->ThirdArray.GetPortalControl()); + return PortalType(this->FirstArray.GetPortalControl(), this->SecondArray.GetPortalControl(), + this->ThirdArray.GetPortalControl()); } VTKM_CONT PortalConstType GetPortalConst() const { - return PortalConstType(this->FirstArray.GetPortalConstControl(), - this->SecondArray.GetPortalConstControl(), - this->ThirdArray.GetPortalConstControl()); + return PortalConstType(this->FirstArray.GetPortalConstControl(), + this->SecondArray.GetPortalConstControl(), + this->ThirdArray.GetPortalConstControl()); } VTKM_CONT vtkm::Id GetNumberOfValues() const { - return this->FirstArray.GetNumberOfValues() * - this->SecondArray.GetNumberOfValues() * - this->ThirdArray.GetNumberOfValues(); + return this->FirstArray.GetNumberOfValues() * this->SecondArray.GetNumberOfValues() * + this->ThirdArray.GetNumberOfValues(); } VTKM_CONT void Allocate(vtkm::Id /*numberOfValues*/) { - throw vtkm::cont::ErrorBadAllocation("Does not make sense."); + throw vtkm::cont::ErrorBadAllocation("Does not make sense."); } VTKM_CONT void Shrink(vtkm::Id /*numberOfValues*/) { - throw vtkm::cont::ErrorBadAllocation("Does not make sense."); + throw vtkm::cont::ErrorBadAllocation("Does not make sense."); } VTKM_CONT @@ -246,22 +257,13 @@ public: } VTKM_CONT - const FirstHandleType &GetFirstArray() const - { - return this->FirstArray; - } + const FirstHandleType& GetFirstArray() const { return this->FirstArray; } VTKM_CONT - const SecondHandleType &GetSecondArray() const - { - return this->SecondArray; - } + const SecondHandleType& GetSecondArray() const { return this->SecondArray; } VTKM_CONT - const ThirdHandleType &GetThirdArray() const - { - return this->ThirdArray; - } + const ThirdHandleType& GetThirdArray() const { return this->ThirdArray; } private: FirstHandleType FirstArray; @@ -269,15 +271,12 @@ private: ThirdHandleType ThirdArray; }; -template +template class ArrayTransfer< - T, StorageTagCartesianProduct, Device> + T, StorageTagCartesianProduct, Device> { - typedef StorageTagCartesianProduct StorageTag; + typedef StorageTagCartesianProduct StorageTag; typedef vtkm::cont::internal::Storage StorageType; public: @@ -287,38 +286,35 @@ public: typedef typename StorageType::PortalConstType PortalConstControl; typedef vtkm::exec::internal::ArrayPortalCartesianProduct< - ValueType, - typename FirstHandleType::template ExecutionTypes::Portal, - typename SecondHandleType::template ExecutionTypes::Portal, - typename ThirdHandleType::template ExecutionTypes::Portal - > PortalExecution; + ValueType, typename FirstHandleType::template ExecutionTypes::Portal, + typename SecondHandleType::template ExecutionTypes::Portal, + typename ThirdHandleType::template ExecutionTypes::Portal> + PortalExecution; typedef vtkm::exec::internal::ArrayPortalCartesianProduct< - ValueType, - typename FirstHandleType::template ExecutionTypes::PortalConst, - typename SecondHandleType::template ExecutionTypes::PortalConst, - typename ThirdHandleType::template ExecutionTypes::PortalConst - > PortalConstExecution; + ValueType, typename FirstHandleType::template ExecutionTypes::PortalConst, + typename SecondHandleType::template ExecutionTypes::PortalConst, + typename ThirdHandleType::template ExecutionTypes::PortalConst> + PortalConstExecution; VTKM_CONT - ArrayTransfer(StorageType *storage) - : FirstArray(storage->GetFirstArray()), - SecondArray(storage->GetSecondArray()), - ThirdArray(storage->GetThirdArray()) - { } - + ArrayTransfer(StorageType* storage) + : FirstArray(storage->GetFirstArray()) + , SecondArray(storage->GetSecondArray()) + , ThirdArray(storage->GetThirdArray()) + { + } VTKM_CONT vtkm::Id GetNumberOfValues() const { - return this->FirstArray.GetNumberOfValues() * - this->SecondArray.GetNumberOfValues() * - this->ThirdArray.GetNumberOfValues(); - + return this->FirstArray.GetNumberOfValues() * this->SecondArray.GetNumberOfValues() * + this->ThirdArray.GetNumberOfValues(); } VTKM_CONT - PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) { + PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) + { return PortalConstExecution(this->FirstArray.PrepareForInput(Device()), this->SecondArray.PrepareForInput(Device()), this->ThirdArray.PrepareForInput(Device())); @@ -328,20 +324,20 @@ public: PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData)) { throw vtkm::cont::ErrorBadAllocation( - "Cannot write to an ArrayHandleCartesianProduct. It does not make " - "sense because there is overlap in the data."); + "Cannot write to an ArrayHandleCartesianProduct. It does not make " + "sense because there is overlap in the data."); } VTKM_CONT PortalExecution PrepareForOutput(vtkm::Id vtkmNotUsed(numberOfValues)) { throw vtkm::cont::ErrorBadAllocation( - "Cannot write to an ArrayHandleCartesianProduct. It does not make " - "sense because there is overlap in the data."); + "Cannot write to an ArrayHandleCartesianProduct. It does not make " + "sense because there is overlap in the data."); } VTKM_CONT - void RetrieveOutputData(StorageType *vtkmNotUsed(storage)) const + void RetrieveOutputData(StorageType* vtkmNotUsed(storage)) const { // Implementation of this method should be unnecessary. The internal // first and second array handles should automatically retrieve the @@ -351,7 +347,7 @@ public: VTKM_CONT void Shrink(vtkm::Id /*numberOfValues*/) { - throw vtkm::cont::ErrorBadAllocation("Does not make sense."); + throw vtkm::cont::ErrorBadAllocation("Does not make sense."); } VTKM_CONT @@ -362,7 +358,6 @@ public: this->ThirdArray.ReleaseResourcesExecution(); } - private: FirstHandleType FirstArray; SecondHandleType SecondArray; @@ -374,11 +369,10 @@ private: /// array handle and makes a new handle that access the corresponding entries /// in these arrays as a pair. /// -template +template class ArrayHandleCartesianProduct - : public internal::ArrayHandleCartesianProductTraits::Superclass + : public internal::ArrayHandleCartesianProductTraits::Superclass { // If the following line gives a compile error, then the FirstHandleType // template argument is not a valid ArrayHandle type. @@ -388,37 +382,36 @@ class ArrayHandleCartesianProduct public: VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleCartesianProduct, - (ArrayHandleCartesianProduct), - (typename internal::ArrayHandleCartesianProductTraits< - FirstHandleType,SecondHandleType,ThirdHandleType>::Superclass)); + ArrayHandleCartesianProduct, + (ArrayHandleCartesianProduct), + (typename internal::ArrayHandleCartesianProductTraits::Superclass)); private: typedef vtkm::cont::internal::Storage StorageType; public: VTKM_CONT - ArrayHandleCartesianProduct(const FirstHandleType &firstArray, - const SecondHandleType &secondArray, - const ThirdHandleType &thirdArray) - : Superclass(StorageType(firstArray, secondArray, thirdArray)) { } + ArrayHandleCartesianProduct(const FirstHandleType& firstArray, + const SecondHandleType& secondArray, + const ThirdHandleType& thirdArray) + : Superclass(StorageType(firstArray, secondArray, thirdArray)) + { + } }; /// A convenience function for creating an ArrayHandleCartesianProduct. It takes the two /// arrays to be zipped together. /// -template +template VTKM_CONT -vtkm::cont::ArrayHandleCartesianProduct -make_ArrayHandleCartesianProduct(const FirstHandleType &first, - const SecondHandleType &second, - const ThirdHandleType &third) + vtkm::cont::ArrayHandleCartesianProduct + make_ArrayHandleCartesianProduct(const FirstHandleType& first, const SecondHandleType& second, + const ThirdHandleType& third) { - return ArrayHandleCartesianProduct(first, second,third); + return ArrayHandleCartesianProduct( + first, second, third); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayHandleCast.h b/vtkm/cont/ArrayHandleCast.h index de4871d48..5e823d75b 100644 --- a/vtkm/cont/ArrayHandleCast.h +++ b/vtkm/cont/ArrayHandleCast.h @@ -24,24 +24,23 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace internal { +namespace internal +{ -template +template struct VTKM_ALWAYS_EXPORT Cast { VTKM_EXEC_CONT - ToType operator()(const FromType &val) const - { - return static_cast(val); - } + ToType operator()(const FromType& val) const { return static_cast(val); } }; } // namespace internal - /// \brief Cast the values of an array to the specified type, on demand. /// /// ArrayHandleCast is a specialization of ArrayHandleTransform. Given an ArrayHandle @@ -49,39 +48,33 @@ struct VTKM_ALWAYS_EXPORT Cast /// to the specified type. /// template -class ArrayHandleCast : - public vtkm::cont::ArrayHandleTransform< - T, - ArrayHandleType, - internal::Cast, - internal::Cast > +class ArrayHandleCast + : public vtkm::cont::ArrayHandleTransform, + internal::Cast> { public: VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleCast, - (ArrayHandleCast), - (vtkm::cont::ArrayHandleTransform< - T, - ArrayHandleType, - internal::Cast, - internal::Cast >)); + ArrayHandleCast, (ArrayHandleCast), + (vtkm::cont::ArrayHandleTransform, + internal::Cast>)); - ArrayHandleCast(const ArrayHandleType &handle) + ArrayHandleCast(const ArrayHandleType& handle) : Superclass(handle) - { } + { + } }; /// make_ArrayHandleCast is convenience function to generate an /// ArrayHandleCast. /// template -VTKM_CONT -ArrayHandleCast make_ArrayHandleCast(const HandleType &handle, - const T& = T()) +VTKM_CONT ArrayHandleCast make_ArrayHandleCast(const HandleType& handle, + const T& = T()) { return ArrayHandleCast(handle); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayHandleCompositeVector.h b/vtkm/cont/ArrayHandleCompositeVector.h index 1ad909514..e177c2a59 100644 --- a/vtkm/cont/ArrayHandleCompositeVector.h +++ b/vtkm/cont/ArrayHandleCompositeVector.h @@ -31,133 +31,138 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace internal { +namespace internal +{ -namespace detail { +namespace detail +{ -template +template struct VTKM_ALWAYS_EXPORT CompositeVectorSwizzleFunctor { - static const vtkm::IdComponent NUM_COMPONENTS = - vtkm::VecTraits::NUM_COMPONENTS; + static const vtkm::IdComponent NUM_COMPONENTS = vtkm::VecTraits::NUM_COMPONENTS; typedef vtkm::Vec ComponentMapType; // Caution! This is a reference. - const ComponentMapType &SourceComponents; + const ComponentMapType& SourceComponents; VTKM_EXEC_CONT - CompositeVectorSwizzleFunctor(const ComponentMapType &sourceComponents) - : SourceComponents(sourceComponents) { } + CompositeVectorSwizzleFunctor(const ComponentMapType& sourceComponents) + : SourceComponents(sourceComponents) + { + } // Currently only supporting 1-4 components. - template - VTKM_EXEC_CONT - ValueType operator()(const T1 &p1) const { - return ValueType( - vtkm::VecTraits::GetComponent(p1, this->SourceComponents[0])); + template + VTKM_EXEC_CONT ValueType operator()(const T1& p1) const + { + return ValueType(vtkm::VecTraits::GetComponent(p1, this->SourceComponents[0])); } - template - VTKM_EXEC_CONT - ValueType operator()(const T1 &p1, const T2 &p2) const { - return ValueType( - vtkm::VecTraits::GetComponent(p1, this->SourceComponents[0]), - vtkm::VecTraits::GetComponent(p2, this->SourceComponents[1])); + template + VTKM_EXEC_CONT ValueType operator()(const T1& p1, const T2& p2) const + { + return ValueType(vtkm::VecTraits::GetComponent(p1, this->SourceComponents[0]), + vtkm::VecTraits::GetComponent(p2, this->SourceComponents[1])); } - template - VTKM_EXEC_CONT - ValueType operator()(const T1 &p1, const T2 &p2, const T3 &p3) const { - return ValueType( - vtkm::VecTraits::GetComponent(p1, this->SourceComponents[0]), - vtkm::VecTraits::GetComponent(p2, this->SourceComponents[1]), - vtkm::VecTraits::GetComponent(p3, this->SourceComponents[2])); + template + VTKM_EXEC_CONT ValueType operator()(const T1& p1, const T2& p2, const T3& p3) const + { + return ValueType(vtkm::VecTraits::GetComponent(p1, this->SourceComponents[0]), + vtkm::VecTraits::GetComponent(p2, this->SourceComponents[1]), + vtkm::VecTraits::GetComponent(p3, this->SourceComponents[2])); } - template - VTKM_EXEC_CONT - ValueType operator()(const T1 &p1, - const T2 &p2, - const T3 &p3, - const T4 &p4) const { - return ValueType( - vtkm::VecTraits::GetComponent(p1, this->SourceComponents[0]), - vtkm::VecTraits::GetComponent(p2, this->SourceComponents[1]), - vtkm::VecTraits::GetComponent(p3, this->SourceComponents[2]), - vtkm::VecTraits::GetComponent(p4, this->SourceComponents[3])); + template + VTKM_EXEC_CONT ValueType operator()(const T1& p1, const T2& p2, const T3& p3, const T4& p4) const + { + return ValueType(vtkm::VecTraits::GetComponent(p1, this->SourceComponents[0]), + vtkm::VecTraits::GetComponent(p2, this->SourceComponents[1]), + vtkm::VecTraits::GetComponent(p3, this->SourceComponents[2]), + vtkm::VecTraits::GetComponent(p4, this->SourceComponents[3])); } }; -template +template struct VTKM_ALWAYS_EXPORT CompositeVectorPullValueFunctor { vtkm::Id Index; VTKM_EXEC - CompositeVectorPullValueFunctor(vtkm::Id index) : Index(index) { } + CompositeVectorPullValueFunctor(vtkm::Id index) + : Index(index) + { + } // This form is to pull values out of array arguments. VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC_CONT - typename PortalType::ValueType operator()(const PortalType &portal) const { + template + VTKM_EXEC_CONT typename PortalType::ValueType operator()(const PortalType& portal) const + { return portal.Get(this->Index); } // This form is an identity to pass the return value back. VTKM_EXEC_CONT - const ReturnValueType &operator()(const ReturnValueType &value) const { - return value; - } + const ReturnValueType& operator()(const ReturnValueType& value) const { return value; } }; -struct CompositeVectorArrayToPortalCont { - template - struct ReturnType { +struct CompositeVectorArrayToPortalCont +{ + template + struct ReturnType + { typedef typename ArrayHandleType::PortalConstControl type; }; - template - VTKM_CONT - typename ReturnType::type - operator()(const ArrayHandleType &array, - vtkm::internal::IndexTag) const { + template + VTKM_CONT typename ReturnType::type operator()( + const ArrayHandleType& array, vtkm::internal::IndexTag) const + { return array.GetPortalConstControl(); } }; -template -struct CompositeVectorArrayToPortalExec { - template - struct ReturnType { - typedef typename ArrayHandleType::template ExecutionTypes< - DeviceAdapterTag>::PortalConst type; +template +struct CompositeVectorArrayToPortalExec +{ + template + struct ReturnType + { + typedef typename ArrayHandleType::template ExecutionTypes::PortalConst type; }; - template - VTKM_CONT - typename ReturnType::type - operator()(const ArrayHandleType &array, - vtkm::internal::IndexTag) const { + template + VTKM_CONT typename ReturnType::type operator()( + const ArrayHandleType& array, vtkm::internal::IndexTag) const + { return array.PrepareForInput(DeviceAdapterTag()); } }; -struct CheckArraySizeFunctor { +struct CheckArraySizeFunctor +{ vtkm::Id ExpectedSize; - CheckArraySizeFunctor(vtkm::Id expectedSize) : ExpectedSize(expectedSize) { } + CheckArraySizeFunctor(vtkm::Id expectedSize) + : ExpectedSize(expectedSize) + { + } - template - void operator()(const T &a, vtkm::internal::IndexTag) const { + template + void operator()(const T& a, vtkm::internal::IndexTag) const + { if (a.GetNumberOfValues() != this->ExpectedSize) { std::stringstream message; message << "All input arrays to ArrayHandleCompositeVector must be the same size.\n" - << "Array " << Index-1 << " has " << a.GetNumberOfValues() - << ". Expected " << this->ExpectedSize << "."; + << "Array " << Index - 1 << " has " << a.GetNumberOfValues() << ". Expected " + << this->ExpectedSize << "."; throw vtkm::cont::ErrorBadValue(message.str().c_str()); } } @@ -169,15 +174,14 @@ struct CheckArraySizeFunctor { /// /// This is the portal used within ArrayHandleCompositeVector. /// -template +template class VTKM_ALWAYS_EXPORT ArrayPortalCompositeVector { typedef vtkm::internal::FunctionInterface PortalTypes; public: typedef typename PortalTypes::ResultType ValueType; - static const vtkm::IdComponent NUM_COMPONENTS = - vtkm::VecTraits::NUM_COMPONENTS; + static const vtkm::IdComponent NUM_COMPONENTS = vtkm::VecTraits::NUM_COMPONENTS; // Used internally. typedef vtkm::Vec ComponentMapType; @@ -186,61 +190,64 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalCompositeVector() { } + ArrayPortalCompositeVector() {} VTKM_SUPPRESS_EXEC_WARNINGS VTKM_CONT - ArrayPortalCompositeVector( - const PortalTypes portals, - vtkm::Vec sourceComponents) - : Portals(portals), SourceComponents(sourceComponents) { } + ArrayPortalCompositeVector(const PortalTypes portals, + vtkm::Vec sourceComponents) + : Portals(portals) + , SourceComponents(sourceComponents) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const { + vtkm::Id GetNumberOfValues() const + { return this->Portals.template GetParameter<1>().GetNumberOfValues(); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ValueType Get(vtkm::Id index) const { + ValueType Get(vtkm::Id index) const + { // This might be inefficient because we are copying all the portals only // because they are coupled with the return value. PortalTypes localPortals = this->Portals; localPortals.InvokeExec( - detail::CompositeVectorSwizzleFunctor(this->SourceComponents), - detail::CompositeVectorPullValueFunctor(index)); + detail::CompositeVectorSwizzleFunctor(this->SourceComponents), + detail::CompositeVectorPullValueFunctor(index)); return localPortals.GetReturnValue(); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - void Set(vtkm::Id vtkmNotUsed(index), - const ValueType &vtkmNotUsed(value)) const + void Set(vtkm::Id vtkmNotUsed(index), const ValueType& vtkmNotUsed(value)) const { // There is no technical reason why this cannot be implemented. As of this // writing no one has needed to write to a composite vector yet. - VTKM_ASSERT(false && "Set not yet implemented for composite vector. Do you volunteer to implement it?"); + VTKM_ASSERT(false && + "Set not yet implemented for composite vector. Do you volunteer to implement it?"); } - private: PortalTypes Portals; ComponentMapType SourceComponents; }; -template -struct VTKM_ALWAYS_EXPORT StorageTagCompositeVector { }; +template +struct VTKM_ALWAYS_EXPORT StorageTagCompositeVector +{ +}; /// A convenience class that provides a typedef to the appropriate tag for /// a composite storage. -template +template struct ArrayHandleCompositeVectorTraits { - typedef vtkm::cont::internal::StorageTagCompositeVector - Tag; - typedef typename vtkm::internal::FunctionInterface::ResultType - ValueType; + typedef vtkm::cont::internal::StorageTagCompositeVector Tag; + typedef typename vtkm::internal::FunctionInterface::ResultType ValueType; typedef vtkm::cont::internal::Storage StorageType; typedef vtkm::cont::ArrayHandle Superclass; }; @@ -248,19 +255,16 @@ struct ArrayHandleCompositeVectorTraits // It may seem weird that this specialization throws an exception for // everything, but that is because all the functionality is handled in the // ArrayTransfer class. -template -class Storage< - typename ArrayHandleCompositeVectorTraits::ValueType, - vtkm::cont::internal::StorageTagCompositeVector > +template +class Storage::ValueType, + vtkm::cont::internal::StorageTagCompositeVector> { - typedef vtkm::internal::FunctionInterface - FunctionInterfaceWithArrays; + typedef vtkm::internal::FunctionInterface FunctionInterfaceWithArrays; static const vtkm::IdComponent NUM_COMPONENTS = FunctionInterfaceWithArrays::ARITY; typedef vtkm::Vec ComponentMapType; typedef typename FunctionInterfaceWithArrays::template StaticTransformType< - detail::CompositeVectorArrayToPortalCont>::type - FunctionInterfaceWithPortals; + detail::CompositeVectorArrayToPortalCont>::type FunctionInterfaceWithPortals; typedef typename FunctionInterfaceWithPortals::Signature SignatureWithPortals; public: @@ -269,64 +273,71 @@ public: typedef typename PortalType::ValueType ValueType; VTKM_CONT - Storage() : Valid(false) { } - - VTKM_CONT - Storage(const FunctionInterfaceWithArrays &arrays, - const ComponentMapType &sourceComponents) - : Arrays(arrays), SourceComponents(sourceComponents), Valid(true) + Storage() + : Valid(false) { - arrays.ForEachCont( - detail::CheckArraySizeFunctor(this->GetNumberOfValues())); } VTKM_CONT - PortalType GetPortal() { - throw vtkm::cont::ErrorBadValue( - "Composite vector arrays are read only."); + Storage(const FunctionInterfaceWithArrays& arrays, const ComponentMapType& sourceComponents) + : Arrays(arrays) + , SourceComponents(sourceComponents) + , Valid(true) + { + arrays.ForEachCont(detail::CheckArraySizeFunctor(this->GetNumberOfValues())); } VTKM_CONT - PortalConstType GetPortalConst() const { + PortalType GetPortal() + { + throw vtkm::cont::ErrorBadValue("Composite vector arrays are read only."); + } + + VTKM_CONT + PortalConstType GetPortalConst() const + { if (!this->Valid) { throw vtkm::cont::ErrorBadValue( - "Tried to use an ArrayHandleCompositeHandle without dependent arrays."); + "Tried to use an ArrayHandleCompositeHandle without dependent arrays."); } - return PortalConstType(this->Arrays.StaticTransformCont( - detail::CompositeVectorArrayToPortalCont()), - this->SourceComponents); + return PortalConstType( + this->Arrays.StaticTransformCont(detail::CompositeVectorArrayToPortalCont()), + this->SourceComponents); } VTKM_CONT - vtkm::Id GetNumberOfValues() const { + vtkm::Id GetNumberOfValues() const + { if (!this->Valid) { throw vtkm::cont::ErrorBadValue( - "Tried to use an ArrayHandleCompositeHandle without dependent arrays."); + "Tried to use an ArrayHandleCompositeHandle without dependent arrays."); } return this->Arrays.template GetParameter<1>().GetNumberOfValues(); } VTKM_CONT - void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) { + void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) + { throw vtkm::cont::ErrorInternal( - "The allocate method for the composite vector storage should never " - "have been called. The allocate is generally only called by the " - "execution array manager, and the array transfer for the composite " - "storage should prevent the execution array manager from being " - "directly used."); + "The allocate method for the composite vector storage should never " + "have been called. The allocate is generally only called by the " + "execution array manager, and the array transfer for the composite " + "storage should prevent the execution array manager from being " + "directly used."); } VTKM_CONT - void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorBadValue( - "Composite vector arrays are read-only."); + void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) + { + throw vtkm::cont::ErrorBadValue("Composite vector arrays are read-only."); } VTKM_CONT - void ReleaseResources() { + void ReleaseResources() + { if (this->Valid) { // TODO: Implement this. @@ -334,13 +345,15 @@ public: } VTKM_CONT - const FunctionInterfaceWithArrays &GetArrays() const { + const FunctionInterfaceWithArrays& GetArrays() const + { VTKM_ASSERT(this->Valid); return this->Arrays; } VTKM_CONT - const ComponentMapType &GetSourceComponents() const { + const ComponentMapType& GetSourceComponents() const + { VTKM_ASSERT(this->Valid); return this->SourceComponents; } @@ -351,27 +364,22 @@ private: bool Valid; }; -template -class ArrayTransfer< - typename ArrayHandleCompositeVectorTraits::ValueType, - vtkm::cont::internal::StorageTagCompositeVector, - DeviceAdapterTag> +template +class ArrayTransfer::ValueType, + vtkm::cont::internal::StorageTagCompositeVector, + DeviceAdapterTag> { VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag); - typedef typename ArrayHandleCompositeVectorTraits::StorageType - StorageType; + typedef typename ArrayHandleCompositeVectorTraits::StorageType StorageType; - typedef vtkm::internal::FunctionInterface - FunctionWithArrays; + typedef vtkm::internal::FunctionInterface FunctionWithArrays; typedef typename FunctionWithArrays::template StaticTransformType< - detail::CompositeVectorArrayToPortalExec >::type - FunctionWithPortals; + detail::CompositeVectorArrayToPortalExec>::type FunctionWithPortals; typedef typename FunctionWithPortals::Signature SignatureWithPortals; public: - typedef typename ArrayHandleCompositeVectorTraits::ValueType - ValueType; + typedef typename ArrayHandleCompositeVectorTraits::ValueType ValueType; // These are not currently fully implemented. typedef typename StorageType::PortalType PortalControl; @@ -381,21 +389,20 @@ public: typedef ArrayPortalCompositeVector PortalConstExecution; VTKM_CONT - ArrayTransfer(StorageType *storage) : Storage(storage) { } + ArrayTransfer(StorageType* storage) + : Storage(storage) + { + } VTKM_CONT - vtkm::Id GetNumberOfValues() const { - return this->Storage->GetNumberOfValues(); - } + vtkm::Id GetNumberOfValues() const { return this->Storage->GetNumberOfValues(); } VTKM_CONT PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) const { - return - PortalConstExecution( - this->Storage->GetArrays().StaticTransformCont( - detail::CompositeVectorArrayToPortalExec()), - this->Storage->GetSourceComponents()); + return PortalConstExecution(this->Storage->GetArrays().StaticTransformCont( + detail::CompositeVectorArrayToPortalExec()), + this->Storage->GetSourceComponents()); } VTKM_CONT @@ -404,7 +411,7 @@ public: // It may be the case a composite vector could be used for in place // operations, but this is not implemented currently. throw vtkm::cont::ErrorBadValue( - "Composite vector arrays cannot be used for output or in place."); + "Composite vector arrays cannot be used for output or in place."); } VTKM_CONT @@ -413,31 +420,26 @@ public: // It may be the case a composite vector could be used for output if you // want the delegate arrays to be resized, but this is not implemented // currently. - throw vtkm::cont::ErrorBadValue( - "Composite vector arrays cannot be used for output."); + throw vtkm::cont::ErrorBadValue("Composite vector arrays cannot be used for output."); } VTKM_CONT - void RetrieveOutputData(StorageType *vtkmNotUsed(storage)) const + void RetrieveOutputData(StorageType* vtkmNotUsed(storage)) const { - throw vtkm::cont::ErrorBadValue( - "Composite vector arrays cannot be used for output."); + throw vtkm::cont::ErrorBadValue("Composite vector arrays cannot be used for output."); } VTKM_CONT void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorBadValue( - "Composite vector arrays cannot be resized."); + throw vtkm::cont::ErrorBadValue("Composite vector arrays cannot be resized."); } VTKM_CONT - void ReleaseResources() { - this->Storage->ReleaseResources(); - } + void ReleaseResources() { this->Storage->ReleaseResources(); } private: - StorageType *Storage; + StorageType* Storage; }; } // namespace internal @@ -452,91 +454,70 @@ private: /// The easiest way to create and type an \c ArrayHandleCompositeVector is /// to use the \c make_ArrayHandleCompositeVector functions. /// -template +template class ArrayHandleCompositeVector - : public internal::ArrayHandleCompositeVectorTraits::Superclass + : public internal::ArrayHandleCompositeVectorTraits::Superclass { - typedef typename internal::ArrayHandleCompositeVectorTraits::StorageType - StorageType; - typedef typename internal::ArrayPortalCompositeVector::ComponentMapType - ComponentMapType; + typedef typename internal::ArrayHandleCompositeVectorTraits::StorageType StorageType; + typedef + typename internal::ArrayPortalCompositeVector::ComponentMapType ComponentMapType; public: VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleCompositeVector, - (ArrayHandleCompositeVector), - (typename internal::ArrayHandleCompositeVectorTraits::Superclass)); + ArrayHandleCompositeVector, (ArrayHandleCompositeVector), + (typename internal::ArrayHandleCompositeVectorTraits::Superclass)); VTKM_CONT - ArrayHandleCompositeVector( - const vtkm::internal::FunctionInterface &arrays, - const ComponentMapType &sourceComponents) + ArrayHandleCompositeVector(const vtkm::internal::FunctionInterface& arrays, + const ComponentMapType& sourceComponents) : Superclass(StorageType(arrays, sourceComponents)) - { } + { + } /// Template constructors for passing in types. You'll get weird compile /// errors if the argument types do not actually match the types in the /// signature. /// - template - VTKM_CONT - ArrayHandleCompositeVector(const ArrayHandleType1 &array1, - vtkm::IdComponent sourceComponent1) + template + VTKM_CONT ArrayHandleCompositeVector(const ArrayHandleType1& array1, + vtkm::IdComponent sourceComponent1) + : Superclass(StorageType(vtkm::internal::make_FunctionInterface(array1), + ComponentMapType(sourceComponent1))) + { + } + template + VTKM_CONT ArrayHandleCompositeVector(const ArrayHandleType1& array1, + vtkm::IdComponent sourceComponent1, + const ArrayHandleType2& array2, + vtkm::IdComponent sourceComponent2) + : Superclass(StorageType(vtkm::internal::make_FunctionInterface(array1, array2), + ComponentMapType(sourceComponent1, sourceComponent2))) + { + } + template + VTKM_CONT ArrayHandleCompositeVector(const ArrayHandleType1& array1, + vtkm::IdComponent sourceComponent1, + const ArrayHandleType2& array2, + vtkm::IdComponent sourceComponent2, + const ArrayHandleType3& array3, + vtkm::IdComponent sourceComponent3) + : Superclass( + StorageType(vtkm::internal::make_FunctionInterface(array1, array2, array3), + ComponentMapType(sourceComponent1, sourceComponent2, sourceComponent3))) + { + } + template + VTKM_CONT ArrayHandleCompositeVector( + const ArrayHandleType1& array1, vtkm::IdComponent sourceComponent1, + const ArrayHandleType2& array2, vtkm::IdComponent sourceComponent2, + const ArrayHandleType3& array3, vtkm::IdComponent sourceComponent3, + const ArrayHandleType4& array4, vtkm::IdComponent sourceComponent4) : Superclass(StorageType( - vtkm::internal::make_FunctionInterface(array1), - ComponentMapType(sourceComponent1))) - { } - template - VTKM_CONT - ArrayHandleCompositeVector(const ArrayHandleType1 &array1, - vtkm::IdComponent sourceComponent1, - const ArrayHandleType2 &array2, - vtkm::IdComponent sourceComponent2) - : Superclass(StorageType( - vtkm::internal::make_FunctionInterface( - array1, array2), - ComponentMapType(sourceComponent1, - sourceComponent2))) - { } - template - VTKM_CONT - ArrayHandleCompositeVector(const ArrayHandleType1 &array1, - vtkm::IdComponent sourceComponent1, - const ArrayHandleType2 &array2, - vtkm::IdComponent sourceComponent2, - const ArrayHandleType3 &array3, - vtkm::IdComponent sourceComponent3) - : Superclass(StorageType( - vtkm::internal::make_FunctionInterface( - array1, array2, array3), - ComponentMapType(sourceComponent1, - sourceComponent2, - sourceComponent3))) - { } - template - VTKM_CONT - ArrayHandleCompositeVector(const ArrayHandleType1 &array1, - vtkm::IdComponent sourceComponent1, - const ArrayHandleType2 &array2, - vtkm::IdComponent sourceComponent2, - const ArrayHandleType3 &array3, - vtkm::IdComponent sourceComponent3, - const ArrayHandleType4 &array4, - vtkm::IdComponent sourceComponent4) - : Superclass(StorageType( - vtkm::internal::make_FunctionInterface( - array1, array2, array3, array4), - ComponentMapType(sourceComponent1, - sourceComponent2, - sourceComponent3, - sourceComponent4))) - { } + vtkm::internal::make_FunctionInterface(array1, array2, array3, array4), + ComponentMapType(sourceComponent1, sourceComponent2, sourceComponent3, sourceComponent4))) + { + } }; /// \brief Get the type for an ArrayHandleCompositeVector @@ -552,164 +533,138 @@ public: /// OutArrayType outArray = vtkm::cont::make_ArrayHandleCompositeVector(a1,a2); /// \endcode /// -template +template struct ArrayHandleCompositeVectorType { VTKM_IS_ARRAY_HANDLE(ArrayHandleType1); VTKM_IS_ARRAY_HANDLE(ArrayHandleType2); VTKM_IS_ARRAY_HANDLE(ArrayHandleType3); VTKM_IS_ARRAY_HANDLE(ArrayHandleType4); + private: - typedef typename vtkm::VecTraits::ComponentType - ComponentType; - typedef vtkm::Vec Signature( - ArrayHandleType1,ArrayHandleType2,ArrayHandleType3,ArrayHandleType4); + typedef + typename vtkm::VecTraits::ComponentType ComponentType; + typedef vtkm::Vec Signature(ArrayHandleType1, ArrayHandleType2, + ArrayHandleType3, ArrayHandleType4); + public: typedef vtkm::cont::ArrayHandleCompositeVector type; }; -template -struct ArrayHandleCompositeVectorType< - ArrayHandleType1,ArrayHandleType2,ArrayHandleType3> +template +struct ArrayHandleCompositeVectorType { VTKM_IS_ARRAY_HANDLE(ArrayHandleType1); VTKM_IS_ARRAY_HANDLE(ArrayHandleType2); VTKM_IS_ARRAY_HANDLE(ArrayHandleType3); + private: - typedef typename vtkm::VecTraits::ComponentType - ComponentType; - typedef vtkm::Vec Signature( - ArrayHandleType1,ArrayHandleType2,ArrayHandleType3); + typedef + typename vtkm::VecTraits::ComponentType ComponentType; + typedef vtkm::Vec Signature(ArrayHandleType1, ArrayHandleType2, + ArrayHandleType3); + public: typedef vtkm::cont::ArrayHandleCompositeVector type; }; -template -struct ArrayHandleCompositeVectorType +template +struct ArrayHandleCompositeVectorType { VTKM_IS_ARRAY_HANDLE(ArrayHandleType1); VTKM_IS_ARRAY_HANDLE(ArrayHandleType2); + private: - typedef typename vtkm::VecTraits::ComponentType - ComponentType; - typedef vtkm::Vec Signature( - ArrayHandleType1,ArrayHandleType2); + typedef + typename vtkm::VecTraits::ComponentType ComponentType; + typedef vtkm::Vec Signature(ArrayHandleType1, ArrayHandleType2); + public: typedef vtkm::cont::ArrayHandleCompositeVector type; }; -template +template struct ArrayHandleCompositeVectorType { VTKM_IS_ARRAY_HANDLE(ArrayHandleType1); + private: - typedef typename vtkm::VecTraits::ComponentType - ComponentType; + typedef + typename vtkm::VecTraits::ComponentType ComponentType; typedef ComponentType Signature(ArrayHandleType1); + public: typedef vtkm::cont::ArrayHandleCompositeVector type; }; +// clang-format off /// Create a composite vector array from other arrays. /// -template +template VTKM_CONT -typename ArrayHandleCompositeVectorType< - vtkm::cont::ArrayHandle >::type -make_ArrayHandleCompositeVector( - const vtkm::cont::ArrayHandle &array1, - vtkm::IdComponent sourceComponent1) -{ - return typename ArrayHandleCompositeVectorType< - vtkm::cont::ArrayHandle >::type(array1, - sourceComponent1); -} -template -VTKM_CONT -typename ArrayHandleCompositeVectorType::type -make_ArrayHandleCompositeVector(const ArrayHandleType1 &array1, +typename ArrayHandleCompositeVectorType>::type +make_ArrayHandleCompositeVector(const vtkm::cont::ArrayHandle& array1, vtkm::IdComponent sourceComponent1) { - VTKM_IS_ARRAY_HANDLE(ArrayHandleType1); - return typename ArrayHandleCompositeVectorType< - ArrayHandleType1>::type(array1, sourceComponent1); + return + typename ArrayHandleCompositeVectorType>::type( + array1, sourceComponent1); } -template -VTKM_CONT -typename ArrayHandleCompositeVectorType< - ArrayHandleType1, ArrayHandleType2>::type -make_ArrayHandleCompositeVector(const ArrayHandleType1 &array1, - vtkm::IdComponent sourceComponent1, - const ArrayHandleType2 &array2, - vtkm::IdComponent sourceComponent2) +// clang-format on + +template +VTKM_CONT typename ArrayHandleCompositeVectorType::type +make_ArrayHandleCompositeVector(const ArrayHandleType1& array1, vtkm::IdComponent sourceComponent1) +{ + VTKM_IS_ARRAY_HANDLE(ArrayHandleType1); + return typename ArrayHandleCompositeVectorType::type(array1, sourceComponent1); +} +template +VTKM_CONT typename ArrayHandleCompositeVectorType::type +make_ArrayHandleCompositeVector(const ArrayHandleType1& array1, vtkm::IdComponent sourceComponent1, + const ArrayHandleType2& array2, vtkm::IdComponent sourceComponent2) { VTKM_IS_ARRAY_HANDLE(ArrayHandleType1); VTKM_IS_ARRAY_HANDLE(ArrayHandleType2); - return typename ArrayHandleCompositeVectorType< - ArrayHandleType1, - ArrayHandleType2>::type(array1, sourceComponent1, - array2, sourceComponent2); + return typename ArrayHandleCompositeVectorType::type( + array1, sourceComponent1, array2, sourceComponent2); } -template -VTKM_CONT -typename ArrayHandleCompositeVectorType< - ArrayHandleType1, ArrayHandleType2, ArrayHandleType3>::type -make_ArrayHandleCompositeVector(const ArrayHandleType1 &array1, - vtkm::IdComponent sourceComponent1, - const ArrayHandleType2 &array2, - vtkm::IdComponent sourceComponent2, - const ArrayHandleType3 &array3, - vtkm::IdComponent sourceComponent3) +template +VTKM_CONT typename ArrayHandleCompositeVectorType::type +make_ArrayHandleCompositeVector(const ArrayHandleType1& array1, vtkm::IdComponent sourceComponent1, + const ArrayHandleType2& array2, vtkm::IdComponent sourceComponent2, + const ArrayHandleType3& array3, vtkm::IdComponent sourceComponent3) { VTKM_IS_ARRAY_HANDLE(ArrayHandleType1); VTKM_IS_ARRAY_HANDLE(ArrayHandleType2); VTKM_IS_ARRAY_HANDLE(ArrayHandleType3); - return typename ArrayHandleCompositeVectorType< - ArrayHandleType1, - ArrayHandleType2, - ArrayHandleType3>::type(array1, sourceComponent1, - array2, sourceComponent2, - array3, sourceComponent3); + return typename ArrayHandleCompositeVectorType::type(array1, sourceComponent1, + array2, sourceComponent2, + array3, sourceComponent3); } -template -VTKM_CONT -typename ArrayHandleCompositeVectorType< - ArrayHandleType1, ArrayHandleType2, ArrayHandleType3, ArrayHandleType4>::type -make_ArrayHandleCompositeVector(const ArrayHandleType1 &array1, - vtkm::IdComponent sourceComponent1, - const ArrayHandleType2 &array2, - vtkm::IdComponent sourceComponent2, - const ArrayHandleType3 &array3, - vtkm::IdComponent sourceComponent3, - const ArrayHandleType4 &array4, - vtkm::IdComponent sourceComponent4) +template +VTKM_CONT typename ArrayHandleCompositeVectorType::type +make_ArrayHandleCompositeVector(const ArrayHandleType1& array1, vtkm::IdComponent sourceComponent1, + const ArrayHandleType2& array2, vtkm::IdComponent sourceComponent2, + const ArrayHandleType3& array3, vtkm::IdComponent sourceComponent3, + const ArrayHandleType4& array4, vtkm::IdComponent sourceComponent4) { VTKM_IS_ARRAY_HANDLE(ArrayHandleType1); VTKM_IS_ARRAY_HANDLE(ArrayHandleType2); VTKM_IS_ARRAY_HANDLE(ArrayHandleType3); VTKM_IS_ARRAY_HANDLE(ArrayHandleType4); - return typename ArrayHandleCompositeVectorType< - ArrayHandleType1, - ArrayHandleType2, - ArrayHandleType3, - ArrayHandleType4>::type(array1, sourceComponent1, - array2, sourceComponent2, - array3, sourceComponent3, - array4, sourceComponent4); + return + typename ArrayHandleCompositeVectorType::type(array1, sourceComponent1, + array2, sourceComponent2, + array3, sourceComponent3, + array4, sourceComponent4); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayHandleConcatenate.h b/vtkm/cont/ArrayHandleConcatenate.h index 1f257fd26..450db8990 100644 --- a/vtkm/cont/ArrayHandleConcatenate.h +++ b/vtkm/cont/ArrayHandleConcatenate.h @@ -24,243 +24,252 @@ #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ -template< typename PortalType1, typename PortalType2 > +template class VTKM_ALWAYS_EXPORT ArrayPortalConcatenate { public: typedef typename PortalType1::ValueType ValueType; VTKM_EXEC_CONT - ArrayPortalConcatenate() : portal1(), portal2() {} + ArrayPortalConcatenate() + : portal1() + , portal2() + { + } VTKM_EXEC_CONT - ArrayPortalConcatenate( const PortalType1 &p1, const PortalType2 &p2 ) - : portal1( p1 ), portal2( p2 ) {} + ArrayPortalConcatenate(const PortalType1& p1, const PortalType2& p2) + : portal1(p1) + , portal2(p2) + { + } // Copy constructor - template< typename OtherP1, typename OtherP2 > - VTKM_EXEC_CONT - ArrayPortalConcatenate( const ArrayPortalConcatenate< OtherP1, OtherP2 > &src ) - : portal1( src.GetPortal1() ), portal2( src.GetPortal2() ) {} + template + VTKM_EXEC_CONT ArrayPortalConcatenate(const ArrayPortalConcatenate& src) + : portal1(src.GetPortal1()) + , portal2(src.GetPortal2()) + { + } VTKM_EXEC_CONT vtkm::Id GetNumberOfValues() const { - return this->portal1.GetNumberOfValues() + - this->portal2.GetNumberOfValues() ; + return this->portal1.GetNumberOfValues() + this->portal2.GetNumberOfValues(); } VTKM_EXEC_CONT - ValueType Get( vtkm::Id index) const + ValueType Get(vtkm::Id index) const { - if( index < this->portal1.GetNumberOfValues() ) - return this->portal1.Get( index ); + if (index < this->portal1.GetNumberOfValues()) + return this->portal1.Get(index); else - return this->portal2.Get( index - this->portal1.GetNumberOfValues() ); + return this->portal2.Get(index - this->portal1.GetNumberOfValues()); } VTKM_EXEC_CONT - void Set( vtkm::Id index, const ValueType &value ) const + void Set(vtkm::Id index, const ValueType& value) const { - if( index < this->portal1.GetNumberOfValues() ) - this->portal1.Set( index, value ); + if (index < this->portal1.GetNumberOfValues()) + this->portal1.Set(index, value); else - this->portal2.Set( index - this->portal1.GetNumberOfValues(), value ); + this->portal2.Set(index - this->portal1.GetNumberOfValues(), value); } VTKM_EXEC_CONT - const PortalType1 &GetPortal1() const - { - return this->portal1; - } + const PortalType1& GetPortal1() const { return this->portal1; } VTKM_EXEC_CONT - const PortalType2 &GetPortal2() const - { - return this->portal2; - } + const PortalType2& GetPortal2() const { return this->portal2; } private: PortalType1 portal1; PortalType2 portal2; -}; // class ArrayPortalConcatenate +}; // class ArrayPortalConcatenate -} // namespace internal +} // namespace internal +template +class StorageTagConcatenate +{ +}; -template< typename ArrayHandleType1, typename ArrayHandleType2 > -class StorageTagConcatenate {}; +namespace internal +{ - -namespace internal { - -template< typename ArrayHandleType1, typename ArrayHandleType2 > -class Storage< typename ArrayHandleType1::ValueType, - StorageTagConcatenate< ArrayHandleType1, ArrayHandleType2> > +template +class Storage> { public: typedef typename ArrayHandleType1::ValueType ValueType; - typedef ArrayPortalConcatenate< typename ArrayHandleType1::PortalControl, - typename ArrayHandleType2::PortalControl > PortalType; - typedef ArrayPortalConcatenate< - typename ArrayHandleType1::PortalConstControl, - typename ArrayHandleType2::PortalConstControl > PortalConstType; + typedef ArrayPortalConcatenate + PortalType; + typedef ArrayPortalConcatenate + PortalConstType; VTKM_CONT - Storage() : valid( false ) { } + Storage() + : valid(false) + { + } VTKM_CONT - Storage( const ArrayHandleType1 &a1, const ArrayHandleType2 &a2 ) - : array1( a1 ), array2( a2 ), valid( true ) {}; + Storage(const ArrayHandleType1& a1, const ArrayHandleType2& a2) + : array1(a1) + , array2(a2) + , valid(true){}; VTKM_CONT PortalConstType GetPortalConst() const { - VTKM_ASSERT( this->valid ); - return PortalConstType( this->array1.GetPortalConstControl(), - this->array2.GetPortalConstControl() ); + VTKM_ASSERT(this->valid); + return PortalConstType(this->array1.GetPortalConstControl(), + this->array2.GetPortalConstControl()); } VTKM_CONT PortalType GetPortal() { - VTKM_ASSERT( this->valid ); - return PortalType( this->array1.GetPortalControl(), - this->array2.GetPortalControl() ); + VTKM_ASSERT(this->valid); + return PortalType(this->array1.GetPortalControl(), this->array2.GetPortalControl()); } VTKM_CONT vtkm::Id GetNumberOfValues() const { - VTKM_ASSERT( this->valid ); + VTKM_ASSERT(this->valid); return this->array1.GetNumberOfValues() + this->array2.GetNumberOfValues(); } VTKM_CONT - void Allocate( vtkm::Id vtkmNotUsed(numberOfValues) ) + void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorInternal( - "ArrayHandleConcatenate should not be allocated explicitly. " ); + throw vtkm::cont::ErrorInternal("ArrayHandleConcatenate should not be allocated explicitly. "); } VTKM_CONT - void Shrink( vtkm::Id numberOfValues ) + void Shrink(vtkm::Id numberOfValues) { - VTKM_ASSERT( this->valid ); - if( numberOfValues < this->array1.GetNumberOfValues() ) + VTKM_ASSERT(this->valid); + if (numberOfValues < this->array1.GetNumberOfValues()) { - this->array1.Shrink( numberOfValues ); - this->array2.Shrink( 0 ); + this->array1.Shrink(numberOfValues); + this->array2.Shrink(0); } else - this->array2.Shrink( numberOfValues - this->array1.GetNumberOfValues() ); + this->array2.Shrink(numberOfValues - this->array1.GetNumberOfValues()); } VTKM_CONT - void ReleaseResources( ) + void ReleaseResources() { - VTKM_ASSERT( this->valid ); + VTKM_ASSERT(this->valid); this->array1.ReleaseResources(); this->array2.ReleaseResources(); } VTKM_CONT - const ArrayHandleType1 &GetArray1() const + const ArrayHandleType1& GetArray1() const { - VTKM_ASSERT( this->valid ); + VTKM_ASSERT(this->valid); return this->array1; } VTKM_CONT - const ArrayHandleType2 &GetArray2() const + const ArrayHandleType2& GetArray2() const { - VTKM_ASSERT( this->valid ); + VTKM_ASSERT(this->valid); return this->array2; } private: ArrayHandleType1 array1; ArrayHandleType2 array2; - bool valid; -}; // class Storage + bool valid; +}; // class Storage - -template< typename ArrayHandleType1, typename ArrayHandleType2, typename Device > -class ArrayTransfer< typename ArrayHandleType1::ValueType, - StorageTagConcatenate< ArrayHandleType1, ArrayHandleType2>, - Device > +template +class ArrayTransfer, Device> { public: typedef typename ArrayHandleType1::ValueType ValueType; private: - typedef StorageTagConcatenate< ArrayHandleType1, ArrayHandleType2 > StorageTag; - typedef vtkm::cont::internal::Storage< ValueType, StorageTag> StorageType; + typedef StorageTagConcatenate StorageTag; + typedef vtkm::cont::internal::Storage StorageType; public: typedef typename StorageType::PortalType PortalControl; typedef typename StorageType::PortalConstType PortalConstControl; + typedef ArrayPortalConcatenate::Portal, + typename ArrayHandleType2::template ExecutionTypes::Portal> + PortalExecution; typedef ArrayPortalConcatenate< - typename ArrayHandleType1::template ExecutionTypes< Device >::Portal, - typename ArrayHandleType2::template ExecutionTypes< Device >::Portal > - PortalExecution; - typedef ArrayPortalConcatenate< - typename ArrayHandleType1::template ExecutionTypes< Device >::PortalConst, - typename ArrayHandleType2::template ExecutionTypes< Device >::PortalConst > - PortalConstExecution; + typename ArrayHandleType1::template ExecutionTypes::PortalConst, + typename ArrayHandleType2::template ExecutionTypes::PortalConst> + PortalConstExecution; VTKM_CONT - ArrayTransfer( StorageType* storage ) - : array1( storage->GetArray1() ), array2( storage->GetArray2() ) {} + ArrayTransfer(StorageType* storage) + : array1(storage->GetArray1()) + , array2(storage->GetArray2()) + { + } VTKM_CONT vtkm::Id GetNumberOfValues() const { - return this->array1.GetNumberOfValues() + this->array2.GetNumberOfValues() ; + return this->array1.GetNumberOfValues() + this->array2.GetNumberOfValues(); } VTKM_CONT - PortalConstExecution PrepareForInput( bool vtkmNotUsed( updateData ) ) + PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) { - return PortalConstExecution( this->array1.PrepareForInput( Device() ), - this->array2.PrepareForInput( Device() )); + return PortalConstExecution(this->array1.PrepareForInput(Device()), + this->array2.PrepareForInput(Device())); } VTKM_CONT - PortalExecution PrepareForInPlace( bool vtkmNotUsed( updateData ) ) + PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData)) { - return PortalExecution( this->array1.PrepareForInPlace( Device() ), - this->array2.PrepareForInPlace( Device() )); + return PortalExecution(this->array1.PrepareForInPlace(Device()), + this->array2.PrepareForInPlace(Device())); } VTKM_CONT - PortalExecution PrepareForOutput( vtkm::Id vtkmNotUsed(numberOfValues) ) + PortalExecution PrepareForOutput(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorInternal( - "ArrayHandleConcatenate is derived and read-only. " ); + throw vtkm::cont::ErrorInternal("ArrayHandleConcatenate is derived and read-only. "); } VTKM_CONT - void RetrieveOutputData( StorageType* vtkmNotUsed(storage) ) const + void RetrieveOutputData(StorageType* vtkmNotUsed(storage)) const { // not need to implement } VTKM_CONT - void Shrink( vtkm::Id numberOfValues ) + void Shrink(vtkm::Id numberOfValues) { - if( numberOfValues < this->array1.GetNumberOfValues() ) + if (numberOfValues < this->array1.GetNumberOfValues()) { - this->array1.Shrink( numberOfValues ); - this->array2.Shrink( 0 ); + this->array1.Shrink(numberOfValues); + this->array2.Shrink(0); } else - this->array2.Shrink( numberOfValues - this->array1.GetNumberOfValues() ); + this->array2.Shrink(numberOfValues - this->array1.GetNumberOfValues()); } VTKM_CONT @@ -273,53 +282,45 @@ public: private: ArrayHandleType1 array1; ArrayHandleType2 array2; - }; - } } } // namespace vtkm::cont::internal +namespace vtkm +{ +namespace cont +{ - -namespace vtkm { -namespace cont { - -template< typename ArrayHandleType1, typename ArrayHandleType2 > +template class ArrayHandleConcatenate - : public vtkm::cont::ArrayHandle< typename ArrayHandleType1::ValueType, - StorageTagConcatenate< ArrayHandleType1, ArrayHandleType2> > + : public vtkm::cont::ArrayHandle> { public: - VTKM_ARRAY_HANDLE_SUBCLASS( ArrayHandleConcatenate, - ( ArrayHandleConcatenate< ArrayHandleType1, ArrayHandleType2> ), - ( vtkm::cont::ArrayHandle< typename ArrayHandleType1::ValueType, - StorageTagConcatenate< ArrayHandleType1, ArrayHandleType2 > > )); + VTKM_ARRAY_HANDLE_SUBCLASS( + ArrayHandleConcatenate, (ArrayHandleConcatenate), + (vtkm::cont::ArrayHandle>)); protected: - typedef vtkm::cont::internal::Storage< ValueType, StorageTag > StorageType; + typedef vtkm::cont::internal::Storage StorageType; public: - VTKM_CONT - ArrayHandleConcatenate( const ArrayHandleType1 &array1, - const ArrayHandleType2 &array2 ) - : Superclass( StorageType( array1, array2 ) ) - {} - + ArrayHandleConcatenate(const ArrayHandleType1& array1, const ArrayHandleType2& array2) + : Superclass(StorageType(array1, array2)) + { + } }; - -template< typename ArrayHandleType1, typename ArrayHandleType2 > -VTKM_CONT -ArrayHandleConcatenate< ArrayHandleType1, ArrayHandleType2 > -make_ArrayHandleConcatenate( const ArrayHandleType1 &array1, - const ArrayHandleType2 &array2 ) +template +VTKM_CONT ArrayHandleConcatenate make_ArrayHandleConcatenate( + const ArrayHandleType1& array1, const ArrayHandleType2& array2) { - return ArrayHandleConcatenate< ArrayHandleType1, ArrayHandleType2 >( array1, array2 ); + return ArrayHandleConcatenate(array1, array2); } - } -} // namespace vtkm::cont +} // namespace vtkm::cont #endif //vtk_m_ArrayHandleConcatenate_h diff --git a/vtkm/cont/ArrayHandleConstant.h b/vtkm/cont/ArrayHandleConstant.h index 0659ff1fc..c442ef8fe 100644 --- a/vtkm/cont/ArrayHandleConstant.h +++ b/vtkm/cont/ArrayHandleConstant.h @@ -24,22 +24,25 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace detail { +namespace detail +{ -template +template struct VTKM_ALWAYS_EXPORT ConstantFunctor { VTKM_EXEC_CONT - ConstantFunctor(const ValueType &value = ValueType()) : Value(value) { } + ConstantFunctor(const ValueType& value = ValueType()) + : Value(value) + { + } VTKM_EXEC_CONT - ValueType operator()(vtkm::Id vtkmNotUsed(index)) const - { - return this->Value; - } + ValueType operator()(vtkm::Id vtkmNotUsed(index)) const { return this->Value; } private: ValueType Value; @@ -55,32 +58,29 @@ private: /// given in the constructor. The array is defined implicitly, so there it /// takes (almost) no memory. /// -template -class ArrayHandleConstant - : public vtkm::cont::ArrayHandleImplicit > +template +class ArrayHandleConstant : public vtkm::cont::ArrayHandleImplicit> { public: - VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleConstant, - (ArrayHandleConstant), - (vtkm::cont::ArrayHandleImplicit >)); + VTKM_ARRAY_HANDLE_SUBCLASS(ArrayHandleConstant, (ArrayHandleConstant), + (vtkm::cont::ArrayHandleImplicit>)); VTKM_CONT ArrayHandleConstant(T value, vtkm::Id numberOfValues = 0) - : Superclass(detail::ConstantFunctor(value), numberOfValues) { } + : Superclass(detail::ConstantFunctor(value), numberOfValues) + { + } }; /// make_ArrayHandleConstant is convenience function to generate an /// ArrayHandleImplicit. It takes a functor and the virtual length of the /// array. /// -template -vtkm::cont::ArrayHandleConstant -make_ArrayHandleConstant(T value, vtkm::Id numberOfValues) +template +vtkm::cont::ArrayHandleConstant make_ArrayHandleConstant(T value, vtkm::Id numberOfValues) { return vtkm::cont::ArrayHandleConstant(value, numberOfValues); } - } } // vtkm::cont diff --git a/vtkm/cont/ArrayHandleCounting.h b/vtkm/cont/ArrayHandleCounting.h index d4197c388..23d0c252a 100644 --- a/vtkm/cont/ArrayHandleCounting.h +++ b/vtkm/cont/ArrayHandleCounting.h @@ -25,49 +25,52 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace internal { +namespace internal +{ /// \brief An implicit array portal that returns an counting value. template class VTKM_ALWAYS_EXPORT ArrayPortalCounting { - typedef typename vtkm::VecTraits::ComponentType - ComponentType; + typedef typename vtkm::VecTraits::ComponentType ComponentType; public: typedef CountingValueType ValueType; VTKM_EXEC_CONT - ArrayPortalCounting() : - Start(0), - Step(1), - NumberOfValues(0) - { } - - VTKM_EXEC_CONT - ArrayPortalCounting(ValueType start, ValueType step, vtkm::Id numValues) : - Start(start), - Step(step), - NumberOfValues(numValues) - { } - - template - VTKM_EXEC_CONT - ArrayPortalCounting(const ArrayPortalCounting &src) - : Start(src.Start), - Step(src.Step), - NumberOfValues(src.NumberOfValues) - { } - - template - VTKM_EXEC_CONT - ArrayPortalCounting &operator=( - const ArrayPortalCounting &src) + ArrayPortalCounting() + : Start(0) + , Step(1) + , NumberOfValues(0) { - this->Start= src.Start; + } + + VTKM_EXEC_CONT + ArrayPortalCounting(ValueType start, ValueType step, vtkm::Id numValues) + : Start(start) + , Step(step) + , NumberOfValues(numValues) + { + } + + template + VTKM_EXEC_CONT ArrayPortalCounting(const ArrayPortalCounting& src) + : Start(src.Start) + , Step(src.Step) + , NumberOfValues(src.NumberOfValues) + { + } + + template + VTKM_EXEC_CONT ArrayPortalCounting& operator=( + const ArrayPortalCounting& src) + { + this->Start = src.Start; this->Step = src.Step; this->NumberOfValues = src.NumberOfValues; return *this; @@ -77,14 +80,13 @@ public: vtkm::Id GetNumberOfValues() const { return this->NumberOfValues; } VTKM_EXEC_CONT - ValueType Get(vtkm::Id index) const { - return ValueType(this->Start + - this->Step*ValueType(static_cast(index))); + ValueType Get(vtkm::Id index) const + { + return ValueType(this->Start + this->Step * ValueType(static_cast(index))); } VTKM_EXEC_CONT - void Set(vtkm::Id vtkmNotUsed(index), - const ValueType &vtkmNotUsed(value)) const + void Set(vtkm::Id vtkmNotUsed(index), const ValueType& vtkmNotUsed(value)) const { VTKM_ASSERT(false && "Cannot write to read-only counting array."); } @@ -97,11 +99,12 @@ private: /// A convenience class that provides a typedef to the appropriate tag for /// a counting storage. -template +template struct ArrayHandleCountingTraits { typedef vtkm::cont::StorageTagImplicit< - vtkm::cont::internal::ArrayPortalCounting > Tag; + vtkm::cont::internal::ArrayPortalCounting> + Tag; }; } // namespace internal @@ -111,43 +114,30 @@ struct ArrayHandleCountingTraits /// and the passed in length template class ArrayHandleCounting - : public vtkm::cont::ArrayHandle < - CountingValueType, - typename internal::ArrayHandleCountingTraits::Tag - > + : public vtkm::cont::ArrayHandle< + CountingValueType, typename internal::ArrayHandleCountingTraits::Tag> { public: VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleCounting, - (ArrayHandleCounting), - (vtkm::cont::ArrayHandle< - CountingValueType, - typename internal::ArrayHandleCountingTraits::Tag - >)); + ArrayHandleCounting, (ArrayHandleCounting), + (vtkm::cont::ArrayHandle< + CountingValueType, typename internal::ArrayHandleCountingTraits::Tag>)); VTKM_CONT - ArrayHandleCounting(CountingValueType start, - CountingValueType step, - vtkm::Id length) - :Superclass(typename Superclass::PortalConstControl(start, step, length)) + ArrayHandleCounting(CountingValueType start, CountingValueType step, vtkm::Id length) + : Superclass(typename Superclass::PortalConstControl(start, step, length)) { } }; /// A convenience function for creating an ArrayHandleCounting. It takes the /// value to start counting from and and the number of times to increment. -template -VTKM_CONT -vtkm::cont::ArrayHandleCounting -make_ArrayHandleCounting(CountingValueType start, - CountingValueType step, - vtkm::Id length) +template +VTKM_CONT vtkm::cont::ArrayHandleCounting make_ArrayHandleCounting( + CountingValueType start, CountingValueType step, vtkm::Id length) { - return vtkm::cont::ArrayHandleCounting(start, - step, - length); + return vtkm::cont::ArrayHandleCounting(start, step, length); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayHandleDiscard.h b/vtkm/cont/ArrayHandleDiscard.h index 50bf139b7..96fd5e2e5 100644 --- a/vtkm/cont/ArrayHandleDiscard.h +++ b/vtkm/cont/ArrayHandleDiscard.h @@ -23,9 +23,12 @@ #include #include -namespace vtkm { -namespace exec { -namespace internal { +namespace vtkm +{ +namespace exec +{ +namespace internal +{ /// \brief An output-only array portal with no storage. All written values are /// discarded. @@ -39,30 +42,30 @@ public: VTKM_EXEC_CONT ArrayPortalDiscard() : NumberOfValues(0) - { } // needs to be host and device so that cuda can create lvalue of these + { + } // needs to be host and device so that cuda can create lvalue of these VTKM_CONT explicit ArrayPortalDiscard(vtkm::Id numValues) : NumberOfValues(numValues) - { } + { + } /// Copy constructor for any other ArrayPortalDiscard with an iterator /// type that can be copied to this iterator type. This allows us to do any /// type casting that the iterators do (like the non-const to const cast). /// - template - VTKM_CONT - ArrayPortalDiscard(const ArrayPortalDiscard &src) + template + VTKM_CONT ArrayPortalDiscard(const ArrayPortalDiscard& src) : NumberOfValues(src.NumberOfValues) - { } - - VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const { - return this->NumberOfValues; } - ValueType Get(vtkm::Id index) const { + VTKM_EXEC_CONT + vtkm::Id GetNumberOfValues() const { return this->NumberOfValues; } + + ValueType Get(vtkm::Id index) const + { VTKM_ASSERT(index < this->GetNumberOfValues()); VTKM_ASSERT("Method not supported for ArrayPortalDiscard." && false); (void)index; @@ -70,7 +73,7 @@ public: } VTKM_EXEC - void Set(vtkm::Id index, const ValueType &) const + void Set(vtkm::Id index, const ValueType&) const { VTKM_ASSERT(index < this->GetNumberOfValues()); (void)index; @@ -84,11 +87,15 @@ private: } // end namespace internal } // end namespace exec -namespace cont { +namespace cont +{ -namespace internal { +namespace internal +{ -struct VTKM_ALWAYS_EXPORT StorageTagDiscard { }; +struct VTKM_ALWAYS_EXPORT StorageTagDiscard +{ +}; template class Storage @@ -99,43 +106,25 @@ public: using PortalConstType = vtkm::exec::internal::ArrayPortalDiscard; VTKM_CONT - Storage() { } + Storage() {} VTKM_CONT - PortalType GetPortal() - { - return PortalType(this->NumberOfValues); - } + PortalType GetPortal() { return PortalType(this->NumberOfValues); } VTKM_CONT - PortalConstType GetPortalConst() - { - return PortalConstType(this->NumberOfValues); - } + PortalConstType GetPortalConst() { return PortalConstType(this->NumberOfValues); } VTKM_CONT - vtkm::Id GetNumberOfValues() const - { - return this->NumberOfValues; - } + vtkm::Id GetNumberOfValues() const { return this->NumberOfValues; } VTKM_CONT - void Allocate(vtkm::Id numValues) - { - this->NumberOfValues = numValues; - } + void Allocate(vtkm::Id numValues) { this->NumberOfValues = numValues; } VTKM_CONT - void Shrink(vtkm::Id numValues) - { - this->NumberOfValues = numValues; - } + void Shrink(vtkm::Id numValues) { this->NumberOfValues = numValues; } VTKM_CONT - void ReleaseResources() - { - this->NumberOfValues = 0; - } + void ReleaseResources() { this->NumberOfValues = 0; } private: vtkm::Id NumberOfValues; @@ -155,9 +144,10 @@ public: using PortalConstExecution = vtkm::exec::internal::ArrayPortalDiscard; VTKM_CONT - ArrayTransfer(StorageType *storage) + ArrayTransfer(StorageType* storage) : Internal(storage) - { } + { + } VTKM_CONT vtkm::Id GetNumberOfValues() const @@ -169,17 +159,15 @@ public: VTKM_CONT PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) { - throw vtkm::cont::ErrorBadValue( - "Input access not supported: " - "Cannot read from an ArrayHandleDiscard."); + throw vtkm::cont::ErrorBadValue("Input access not supported: " + "Cannot read from an ArrayHandleDiscard."); } VTKM_CONT PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData)) { - throw vtkm::cont::ErrorBadValue( - "InPlace access not supported: " - "Cannot read from an ArrayHandleDiscard."); + throw vtkm::cont::ErrorBadValue("InPlace access not supported: " + "Cannot read from an ArrayHandleDiscard."); } VTKM_CONT @@ -191,7 +179,7 @@ public: } VTKM_CONT - void RetrieveOutputData(StorageType *storage) const + void RetrieveOutputData(StorageType* storage) const { VTKM_ASSERT(storage == this->Internal); (void)storage; @@ -213,7 +201,7 @@ public: } private: - StorageType *Internal; + StorageType* Internal; }; template @@ -230,14 +218,11 @@ struct ArrayHandleDiscardTraits /// it. This can be used to save memory when a filter provides optional outputs /// that are not needed. template -class ArrayHandleDiscard - : public internal::ArrayHandleDiscardTraits::Superclass +class ArrayHandleDiscard : public internal::ArrayHandleDiscardTraits::Superclass { public: - VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleDiscard, - (ArrayHandleDiscard), - (typename internal::ArrayHandleDiscardTraits::Superclass)); + VTKM_ARRAY_HANDLE_SUBCLASS(ArrayHandleDiscard, (ArrayHandleDiscard), + (typename internal::ArrayHandleDiscardTraits::Superclass)); }; } // end namespace cont diff --git a/vtkm/cont/ArrayHandleGroupVec.h b/vtkm/cont/ArrayHandleGroupVec.h index 06ea753b9..0d46ad665 100644 --- a/vtkm/cont/ArrayHandleGroupVec.h +++ b/vtkm/cont/ArrayHandleGroupVec.h @@ -24,47 +24,54 @@ #include #include -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ -namespace internal { +namespace internal +{ -template +template class VTKM_ALWAYS_EXPORT ArrayPortalGroupVec { public: static const vtkm::IdComponent NUM_COMPONENTS = _NUM_COMPONENTS; typedef _SourcePortalType SourcePortalType; - typedef typename - std::remove_const::type - ComponentType; + typedef typename std::remove_const::type ComponentType; typedef vtkm::Vec ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalGroupVec() : SourcePortal() { } + ArrayPortalGroupVec() + : SourcePortal() + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalGroupVec(const SourcePortalType &sourcePortal) - : SourcePortal(sourcePortal) { } + ArrayPortalGroupVec(const SourcePortalType& sourcePortal) + : SourcePortal(sourcePortal) + { + } /// Copy constructor for any other ArrayPortalConcatenate with a portal type /// that can be copied to this portal type. This allows us to do any type /// casting that the portals do (like the non-const to const cast). VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC_CONT - ArrayPortalGroupVec( - const ArrayPortalGroupVec &src) - : SourcePortal(src.GetPortal()) { } + template + VTKM_EXEC_CONT ArrayPortalGroupVec( + const ArrayPortalGroupVec& src) + : SourcePortal(src.GetPortal()) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT vtkm::Id GetNumberOfValues() const { - return this->SourcePortal.GetNumberOfValues()/NUM_COMPONENTS; + return this->SourcePortal.GetNumberOfValues() / NUM_COMPONENTS; } VTKM_SUPPRESS_EXEC_WARNINGS @@ -72,10 +79,8 @@ public: ValueType Get(vtkm::Id index) const { ValueType result; - vtkm::Id sourceIndex = index*NUM_COMPONENTS; - for (vtkm::IdComponent componentIndex = 0; - componentIndex < NUM_COMPONENTS; - componentIndex++) + vtkm::Id sourceIndex = index * NUM_COMPONENTS; + for (vtkm::IdComponent componentIndex = 0; componentIndex < NUM_COMPONENTS; componentIndex++) { result[componentIndex] = this->SourcePortal.Get(sourceIndex); sourceIndex++; @@ -85,12 +90,10 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - void Set(vtkm::Id index, const ValueType &value) const + void Set(vtkm::Id index, const ValueType& value) const { - vtkm::Id sourceIndex = index*NUM_COMPONENTS; - for (vtkm::IdComponent componentIndex = 0; - componentIndex < NUM_COMPONENTS; - componentIndex++) + vtkm::Id sourceIndex = index * NUM_COMPONENTS; + for (vtkm::IdComponent componentIndex = 0; componentIndex < NUM_COMPONENTS; componentIndex++) { this->SourcePortal.Set(sourceIndex, value[componentIndex]); sourceIndex++; @@ -99,49 +102,56 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - const SourcePortalType &GetPortal() const { return this->SourcePortal; } + const SourcePortalType& GetPortal() const { return this->SourcePortal; } private: SourcePortalType SourcePortal; }; - } } } // namespace vtkm::exec::internal -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace internal { +namespace internal +{ -template -struct VTKM_ALWAYS_EXPORT StorageTagGroupVec { }; +template +struct VTKM_ALWAYS_EXPORT StorageTagGroupVec +{ +}; -template -class Storage< - vtkm::Vec, - vtkm::cont::internal::StorageTagGroupVec< - SourceArrayHandleType, NUM_COMPONENTS> > +template +class Storage, + vtkm::cont::internal::StorageTagGroupVec> { typedef typename SourceArrayHandleType::ValueType ComponentType; public: - typedef vtkm::Vec ValueType; + typedef vtkm::Vec ValueType; + typedef vtkm::exec::internal::ArrayPortalGroupVec + PortalType; typedef vtkm::exec::internal::ArrayPortalGroupVec< - typename SourceArrayHandleType::PortalControl, - NUM_COMPONENTS> PortalType; - typedef vtkm::exec::internal::ArrayPortalGroupVec< - typename SourceArrayHandleType::PortalConstControl, - NUM_COMPONENTS> PortalConstType; + typename SourceArrayHandleType::PortalConstControl, NUM_COMPONENTS> + PortalConstType; VTKM_CONT - Storage() : Valid(false) { } + Storage() + : Valid(false) + { + } VTKM_CONT - Storage(const SourceArrayHandleType &sourceArray) - : SourceArray(sourceArray), Valid(true) { } + Storage(const SourceArrayHandleType& sourceArray) + : SourceArray(sourceArray) + , Valid(true) + { + } VTKM_CONT PortalType GetPortal() @@ -162,26 +172,26 @@ public: { VTKM_ASSERT(this->Valid); vtkm::Id sourceSize = this->SourceArray.GetNumberOfValues(); - if(sourceSize%NUM_COMPONENTS != 0) + if (sourceSize % NUM_COMPONENTS != 0) { throw vtkm::cont::ErrorBadValue( - "ArrayHandleGroupVec's source array does not divide evenly into Vecs."); + "ArrayHandleGroupVec's source array does not divide evenly into Vecs."); } - return sourceSize/NUM_COMPONENTS; + return sourceSize / NUM_COMPONENTS; } VTKM_CONT void Allocate(vtkm::Id numberOfValues) { VTKM_ASSERT(this->Valid); - this->SourceArray.Allocate(numberOfValues*NUM_COMPONENTS); + this->SourceArray.Allocate(numberOfValues * NUM_COMPONENTS); } VTKM_CONT void Shrink(vtkm::Id numberOfValues) { VTKM_ASSERT(this->Valid); - this->SourceArray.Shrink(numberOfValues*NUM_COMPONENTS); + this->SourceArray.Shrink(numberOfValues * NUM_COMPONENTS); } VTKM_CONT @@ -195,7 +205,7 @@ public: // Required for later use in ArrayTransfer class VTKM_CONT - const SourceArrayHandleType &GetSourceArray() const + const SourceArrayHandleType& GetSourceArray() const { VTKM_ASSERT(this->Valid); return this->SourceArray; @@ -206,22 +216,18 @@ private: bool Valid; }; -template -class ArrayTransfer< - vtkm::Vec, - vtkm::cont::internal::StorageTagGroupVec< - SourceArrayHandleType, NUM_COMPONENTS>, - Device> +template +class ArrayTransfer, + vtkm::cont::internal::StorageTagGroupVec, + Device> { public: typedef typename SourceArrayHandleType::ValueType ComponentType; typedef vtkm::Vec ValueType; private: - typedef vtkm::cont::internal::StorageTagGroupVec< - SourceArrayHandleType, NUM_COMPONENTS> StorageTag; + typedef vtkm::cont::internal::StorageTagGroupVec + StorageTag; typedef vtkm::cont::internal::Storage StorageType; public: @@ -229,37 +235,37 @@ public: typedef typename StorageType::PortalConstType PortalConstControl; typedef vtkm::exec::internal::ArrayPortalGroupVec< - typename SourceArrayHandleType::template ExecutionTypes::Portal, - NUM_COMPONENTS> + typename SourceArrayHandleType::template ExecutionTypes::Portal, NUM_COMPONENTS> PortalExecution; typedef vtkm::exec::internal::ArrayPortalGroupVec< - typename SourceArrayHandleType::template ExecutionTypes::PortalConst, - NUM_COMPONENTS> + typename SourceArrayHandleType::template ExecutionTypes::PortalConst, NUM_COMPONENTS> PortalConstExecution; VTKM_CONT - ArrayTransfer(StorageType *storage) - : SourceArray(storage->GetSourceArray()) { } + ArrayTransfer(StorageType* storage) + : SourceArray(storage->GetSourceArray()) + { + } VTKM_CONT vtkm::Id GetNumberOfValues() const { vtkm::Id sourceSize = this->SourceArray.GetNumberOfValues(); - if (sourceSize%NUM_COMPONENTS != 0) + if (sourceSize % NUM_COMPONENTS != 0) { throw vtkm::cont::ErrorBadValue( - "ArrayHandleGroupVec's source array does not divide evenly into Vecs."); + "ArrayHandleGroupVec's source array does not divide evenly into Vecs."); } - return sourceSize/NUM_COMPONENTS; + return sourceSize / NUM_COMPONENTS; } VTKM_CONT PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) { - if (this->SourceArray.GetNumberOfValues()%NUM_COMPONENTS != 0) + if (this->SourceArray.GetNumberOfValues() % NUM_COMPONENTS != 0) { throw vtkm::cont::ErrorBadValue( - "ArrayHandleGroupVec's source array does not divide evenly into Vecs."); + "ArrayHandleGroupVec's source array does not divide evenly into Vecs."); } return PortalConstExecution(this->SourceArray.PrepareForInput(Device())); } @@ -267,10 +273,10 @@ public: VTKM_CONT PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData)) { - if (this->SourceArray.GetNumberOfValues()%NUM_COMPONENTS != 0) + if (this->SourceArray.GetNumberOfValues() % NUM_COMPONENTS != 0) { throw vtkm::cont::ErrorBadValue( - "ArrayHandleGroupVec's source array does not divide evenly into Vecs."); + "ArrayHandleGroupVec's source array does not divide evenly into Vecs."); } return PortalExecution(this->SourceArray.PrepareForInPlace(Device())); } @@ -278,12 +284,12 @@ public: VTKM_CONT PortalExecution PrepareForOutput(vtkm::Id numberOfValues) { - return PortalExecution(this->SourceArray.PrepareForOutput( - numberOfValues*NUM_COMPONENTS, Device())); + return PortalExecution( + this->SourceArray.PrepareForOutput(numberOfValues * NUM_COMPONENTS, Device())); } VTKM_CONT - void RetrieveOutputData(StorageType *vtkmNotUsed(storage)) const + void RetrieveOutputData(StorageType* vtkmNotUsed(storage)) const { // Implementation of this method should be unnecessary. The internal // array handles should automatically retrieve the output data as @@ -293,14 +299,11 @@ public: VTKM_CONT void Shrink(vtkm::Id numberOfValues) { - this->SourceArray.Shrink(numberOfValues*NUM_COMPONENTS); + this->SourceArray.Shrink(numberOfValues * NUM_COMPONENTS); } VTKM_CONT - void ReleaseResources() - { - this->SourceArray.ReleaseResourcesExecution(); - } + void ReleaseResources() { this->SourceArray.ReleaseResourcesExecution(); } private: SourceArrayHandleType SourceArray; @@ -320,23 +323,20 @@ private: /// to 3, you get an array that looks like it contains two values of \c Vec /// values of size 3 with the data [0,1,2], [3,4,5]. /// -template +template class ArrayHandleGroupVec - : public vtkm::cont::ArrayHandle< - vtkm::Vec, - vtkm::cont::internal::StorageTagGroupVec< - SourceArrayHandleType, NUM_COMPONENTS> > + : public vtkm::cont::ArrayHandle< + vtkm::Vec, + vtkm::cont::internal::StorageTagGroupVec> { VTKM_IS_ARRAY_HANDLE(SourceArrayHandleType); public: VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleGroupVec, - (ArrayHandleGroupVec), - (vtkm::cont::ArrayHandle< - vtkm::Vec, - vtkm::cont::internal::StorageTagGroupVec< - SourceArrayHandleType, NUM_COMPONENTS> >)); + ArrayHandleGroupVec, (ArrayHandleGroupVec), + (vtkm::cont::ArrayHandle< + vtkm::Vec, + vtkm::cont::internal::StorageTagGroupVec>)); typedef typename SourceArrayHandleType::ValueType ComponentType; @@ -345,8 +345,10 @@ private: public: VTKM_CONT - ArrayHandleGroupVec(const SourceArrayHandleType &sourceArray) - : Superclass(StorageType(sourceArray)) { } + ArrayHandleGroupVec(const SourceArrayHandleType& sourceArray) + : Superclass(StorageType(sourceArray)) + { + } }; /// \c make_ArrayHandleGroupVec is convenience function to generate an @@ -354,15 +356,12 @@ public: /// (as a specified template parameter), and returns an array handle with /// consecutive entries grouped in a Vec. /// -template -VTKM_CONT -vtkm::cont::ArrayHandleGroupVec -make_ArrayHandleGroupVec(const ArrayHandleType &array) +template +VTKM_CONT vtkm::cont::ArrayHandleGroupVec make_ArrayHandleGroupVec( + const ArrayHandleType& array) { - return vtkm::cont::ArrayHandleGroupVec(array); + return vtkm::cont::ArrayHandleGroupVec(array); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayHandleGroupVecVariable.h b/vtkm/cont/ArrayHandleGroupVecVariable.h index 535148ac6..87d243b2c 100644 --- a/vtkm/cont/ArrayHandleGroupVecVariable.h +++ b/vtkm/cont/ArrayHandleGroupVecVariable.h @@ -32,47 +32,53 @@ #include -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ -namespace internal { +namespace internal +{ -template +template class VTKM_ALWAYS_EXPORT ArrayPortalGroupVecVariable { public: - using ComponentType = - typename std::remove_const::type; + using ComponentType = typename std::remove_const::type; using ValueType = vtkm::VecFromPortal; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalGroupVecVariable() : SourcePortal(), OffsetsPortal() { } + ArrayPortalGroupVecVariable() + : SourcePortal() + , OffsetsPortal() + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalGroupVecVariable(const SourcePortalType &sourcePortal, - const OffsetsPortalType &offsetsPortal) - : SourcePortal(sourcePortal), OffsetsPortal(offsetsPortal) { } + ArrayPortalGroupVecVariable(const SourcePortalType& sourcePortal, + const OffsetsPortalType& offsetsPortal) + : SourcePortal(sourcePortal) + , OffsetsPortal(offsetsPortal) + { + } /// Copy constructor for any other ArrayPortalConcatenate with a portal type /// that can be copied to this portal type. This allows us to do any type /// casting that the portals do (like the non-const to const cast). VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC_CONT - ArrayPortalGroupVecVariable( - const ArrayPortalGroupVecVariable &src) - : SourcePortal(src.GetSourcePortal()), - OffsetsPortal(src.GetOffsetsPortal()) - { } + template + VTKM_EXEC_CONT ArrayPortalGroupVecVariable( + const ArrayPortalGroupVecVariable& src) + : SourcePortal(src.GetSourcePortal()) + , OffsetsPortal(src.GetOffsetsPortal()) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const - { - return this->OffsetsPortal.GetNumberOfValues(); - } + vtkm::Id GetNumberOfValues() const { return this->OffsetsPortal.GetNumberOfValues(); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT @@ -80,25 +86,22 @@ public: { vtkm::Id offsetIndex = this->OffsetsPortal.Get(index); vtkm::Id nextOffsetIndex; - if (index+1 < this->GetNumberOfValues()) + if (index + 1 < this->GetNumberOfValues()) { - nextOffsetIndex = this->OffsetsPortal.Get(index+1); + nextOffsetIndex = this->OffsetsPortal.Get(index + 1); } else { nextOffsetIndex = this->SourcePortal.GetNumberOfValues(); } - return - ValueType(this->SourcePortal, - static_cast(nextOffsetIndex-offsetIndex), - offsetIndex); + return ValueType(this->SourcePortal, + static_cast(nextOffsetIndex - offsetIndex), offsetIndex); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - void Set(vtkm::Id vtkmNotUsed(index), - const ValueType &vtkmNotUsed(value)) const + void Set(vtkm::Id vtkmNotUsed(index), const ValueType& vtkmNotUsed(value)) const { // The ValueType (VecFromPortal) operates on demand. Thus, if you set // something in the value, it has already been passed to the array. Perhaps @@ -108,17 +111,11 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - const SourcePortalType &GetSourcePortal() const - { - return this->SourcePortal; - } + const SourcePortalType& GetSourcePortal() const { return this->SourcePortal; } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - const OffsetsPortalType &GetOffsetsPortal() const - { - return this->OffsetsPortal; - } + const OffsetsPortalType& GetOffsetsPortal() const { return this->OffsetsPortal; } private: SourcePortalType SourcePortal; @@ -127,7 +124,8 @@ private: } // namespace internal (in vtkm::exec) -namespace arg { +namespace arg +{ // We need to override the fetch for output fields using // ArrayPortalGroupVecVariable because this portal does not behave like most @@ -136,33 +134,25 @@ namespace arg { // Instead, you need to implement the Load to point to the array portal. You // can also ignore the Store because the data is already set in the array at // that point. -template -struct Fetch< - vtkm::exec::arg::FetchTagArrayDirectOut, - vtkm::exec::arg::AspectTagDefault, - ThreadIndicesType, - vtkm::exec::internal::ArrayPortalGroupVecVariable > +template +struct Fetch> { using ExecObjectType = - vtkm::exec::internal::ArrayPortalGroupVecVariable< - SourcePortalType,OffsetsPortalType>; + vtkm::exec::internal::ArrayPortalGroupVecVariable; using ValueType = typename ExecObjectType::ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Load(const ThreadIndicesType &indices, - const ExecObjectType &arrayPortal) const + ValueType Load(const ThreadIndicesType& indices, const ExecObjectType& arrayPortal) const { return arrayPortal.Get(indices.GetOutputIndex()); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // We can actually ignore this because the VecFromPortal will already have // set new values in the array. @@ -170,52 +160,56 @@ struct Fetch< }; } // namespace arg (in vtkm::exec) - } } // namespace vtkm::exec -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace internal { +namespace internal +{ -template -struct VTKM_ALWAYS_EXPORT StorageTagGroupVecVariable { }; +template +struct VTKM_ALWAYS_EXPORT StorageTagGroupVecVariable +{ +}; -template +template class Storage< - vtkm::VecFromPortal, - vtkm::cont::internal::StorageTagGroupVecVariable< - SourceArrayHandleType, OffsetsArrayHandleType> > + vtkm::VecFromPortal, + vtkm::cont::internal::StorageTagGroupVecVariable> { using ComponentType = typename SourceArrayHandleType::ValueType; public: - using ValueType = - vtkm::VecFromPortal; + using ValueType = vtkm::VecFromPortal; - using PortalType = - vtkm::exec::internal::ArrayPortalGroupVecVariable< - typename SourceArrayHandleType::PortalControl, - typename OffsetsArrayHandleType::PortalControl>; - using PortalConstType = - vtkm::exec::internal::ArrayPortalGroupVecVariable< - typename SourceArrayHandleType::PortalConstControl, - typename OffsetsArrayHandleType::PortalConstControl>; + using PortalType = vtkm::exec::internal::ArrayPortalGroupVecVariable< + typename SourceArrayHandleType::PortalControl, typename OffsetsArrayHandleType::PortalControl>; + using PortalConstType = vtkm::exec::internal::ArrayPortalGroupVecVariable< + typename SourceArrayHandleType::PortalConstControl, + typename OffsetsArrayHandleType::PortalConstControl>; VTKM_CONT - Storage() : Valid(false) { } + Storage() + : Valid(false) + { + } VTKM_CONT - Storage(const SourceArrayHandleType &sourceArray, - const OffsetsArrayHandleType &offsetsArray) - : SourceArray(sourceArray), OffsetsArray(offsetsArray), Valid(true) { } + Storage(const SourceArrayHandleType& sourceArray, const OffsetsArrayHandleType& offsetsArray) + : SourceArray(sourceArray) + , OffsetsArray(offsetsArray) + , Valid(true) + { + } VTKM_CONT PortalType GetPortal() { - return PortalType(this->SourceArray.GetPortalControl(), - this->OffsetsArray.GetPortalControl()); + return PortalType(this->SourceArray.GetPortalControl(), this->OffsetsArray.GetPortalControl()); } VTKM_CONT @@ -235,8 +229,7 @@ public: VTKM_CONT void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) { - VTKM_ASSERT( - "Allocate not supported for ArrayhandleGroupVecVariable" && false); + VTKM_ASSERT("Allocate not supported for ArrayhandleGroupVecVariable" && false); } VTKM_CONT @@ -258,7 +251,7 @@ public: // Required for later use in ArrayTransfer class VTKM_CONT - const SourceArrayHandleType &GetSourceArray() const + const SourceArrayHandleType& GetSourceArray() const { VTKM_ASSERT(this->Valid); return this->SourceArray; @@ -266,7 +259,7 @@ public: // Required for later use in ArrayTransfer class VTKM_CONT - const OffsetsArrayHandleType &GetOffsetsArray() const + const OffsetsArrayHandleType& GetOffsetsArray() const { VTKM_ASSERT(this->Valid); return this->OffsetsArray; @@ -278,51 +271,42 @@ private: bool Valid; }; -template +template class ArrayTransfer< - vtkm::VecFromPortal, - vtkm::cont::internal::StorageTagGroupVecVariable< - SourceArrayHandleType, OffsetsArrayHandleType>, - Device> + vtkm::VecFromPortal, + vtkm::cont::internal::StorageTagGroupVecVariable, + Device> { public: using ComponentType = typename SourceArrayHandleType::ValueType; - using ValueType = - vtkm::VecFromPortal; + using ValueType = vtkm::VecFromPortal; private: using StorageTag = - vtkm::cont::internal::StorageTagGroupVecVariable< - SourceArrayHandleType, OffsetsArrayHandleType>; + vtkm::cont::internal::StorageTagGroupVecVariable; using StorageType = vtkm::cont::internal::Storage; public: using PortalControl = typename StorageType::PortalType; using PortalConstControl = typename StorageType::PortalConstType; - using PortalExecution = - vtkm::exec::internal::ArrayPortalGroupVecVariable< - typename SourceArrayHandleType::template ExecutionTypes::Portal, - typename OffsetsArrayHandleType::template ExecutionTypes::PortalConst>; - using PortalConstExecution = - vtkm::exec::internal::ArrayPortalGroupVecVariable< - typename SourceArrayHandleType::template ExecutionTypes::PortalConst, - typename OffsetsArrayHandleType::template ExecutionTypes::PortalConst>; + using PortalExecution = vtkm::exec::internal::ArrayPortalGroupVecVariable< + typename SourceArrayHandleType::template ExecutionTypes::Portal, + typename OffsetsArrayHandleType::template ExecutionTypes::PortalConst>; + using PortalConstExecution = vtkm::exec::internal::ArrayPortalGroupVecVariable< + typename SourceArrayHandleType::template ExecutionTypes::PortalConst, + typename OffsetsArrayHandleType::template ExecutionTypes::PortalConst>; VTKM_CONT - ArrayTransfer(StorageType *storage) - : SourceArray(storage->GetSourceArray()), - OffsetsArray(storage->GetOffsetsArray()) - { } - - VTKM_CONT - vtkm::Id GetNumberOfValues() const + ArrayTransfer(StorageType* storage) + : SourceArray(storage->GetSourceArray()) + , OffsetsArray(storage->GetOffsetsArray()) { - return this->OffsetsArray.GetNumberOfValues(); } + VTKM_CONT + vtkm::Id GetNumberOfValues() const { return this->OffsetsArray.GetNumberOfValues(); } + VTKM_CONT PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) { @@ -342,13 +326,13 @@ public: { // Cannot reallocate an ArrayHandleGroupVecVariable VTKM_ASSERT(numberOfValues == this->OffsetsArray.GetNumberOfValues()); - return PortalExecution(this->SourceArray.PrepareForOutput( - this->SourceArray.GetNumberOfValues(), Device()), - this->OffsetsArray.PrepareForInput(Device())); + return PortalExecution( + this->SourceArray.PrepareForOutput(this->SourceArray.GetNumberOfValues(), Device()), + this->OffsetsArray.PrepareForInput(Device())); } VTKM_CONT - void RetrieveOutputData(StorageType *vtkmNotUsed(storage)) const + void RetrieveOutputData(StorageType* vtkmNotUsed(storage)) const { // Implementation of this method should be unnecessary. The internal // array handles should automatically retrieve the output data as @@ -356,10 +340,7 @@ public: } VTKM_CONT - void Shrink(vtkm::Id numberOfValues) - { - this->OffsetsArray.Shrink(numberOfValues); - } + void Shrink(vtkm::Id numberOfValues) { this->OffsetsArray.Shrink(numberOfValues); } VTKM_CONT void ReleaseResources() @@ -407,24 +388,23 @@ private: /// components for each entry) and get an array of offsets needed for \c /// ArrayHandleGroupVecVariable. /// -template +template class ArrayHandleGroupVecVariable - : public vtkm::cont::ArrayHandle< - vtkm::VecFromPortal, - vtkm::cont::internal::StorageTagGroupVecVariable< - SourceArrayHandleType, OffsetsArrayHandleType> > + : public vtkm::cont::ArrayHandle< + vtkm::VecFromPortal, + vtkm::cont::internal::StorageTagGroupVecVariable> { VTKM_IS_ARRAY_HANDLE(SourceArrayHandleType); VTKM_IS_ARRAY_HANDLE(OffsetsArrayHandleType); public: VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleGroupVecVariable, - (ArrayHandleGroupVecVariable), - (vtkm::cont::ArrayHandle< - vtkm::VecFromPortal, - vtkm::cont::internal::StorageTagGroupVecVariable< - SourceArrayHandleType, OffsetsArrayHandleType> >)); + ArrayHandleGroupVecVariable, + (ArrayHandleGroupVecVariable), + (vtkm::cont::ArrayHandle, + vtkm::cont::internal::StorageTagGroupVecVariable< + SourceArrayHandleType, OffsetsArrayHandleType>>)); using ComponentType = typename SourceArrayHandleType::ValueType; @@ -433,9 +413,11 @@ private: public: VTKM_CONT - ArrayHandleGroupVecVariable(const SourceArrayHandleType &sourceArray, - const OffsetsArrayHandleType &offsetsArray) - : Superclass(StorageType(sourceArray, offsetsArray)) { } + ArrayHandleGroupVecVariable(const SourceArrayHandleType& sourceArray, + const OffsetsArrayHandleType& offsetsArray) + : Superclass(StorageType(sourceArray, offsetsArray)) + { + } }; /// \c make_ArrayHandleGroupVecVariable is convenience function to generate an @@ -443,21 +425,19 @@ public: /// array handle of offsets and returns an array handle with consecutive /// entries grouped in a Vec. /// -template -VTKM_CONT -vtkm::cont::ArrayHandleGroupVecVariable< - SourceArrayHandleType, OffsetsArrayHandleType> -make_ArrayHandleGroupVecVariable(const SourceArrayHandleType &sourceArray, - const OffsetsArrayHandleType &offsetsArray) +template +VTKM_CONT vtkm::cont::ArrayHandleGroupVecVariable +make_ArrayHandleGroupVecVariable(const SourceArrayHandleType& sourceArray, + const OffsetsArrayHandleType& offsetsArray) { - return vtkm::cont::ArrayHandleGroupVecVariable< - SourceArrayHandleType, OffsetsArrayHandleType>(sourceArray, offsetsArray); + return vtkm::cont::ArrayHandleGroupVecVariable( + sourceArray, offsetsArray); } -namespace detail { +namespace detail +{ -template +template struct ConvertNumComponentsToOffsetsFunctor { const NumComponentsArrayType NumComponentsArray; @@ -465,43 +445,38 @@ struct ConvertNumComponentsToOffsetsFunctor vtkm::Id SourceArraySize; VTKM_CONT - ConvertNumComponentsToOffsetsFunctor( - const NumComponentsArrayType &numCompArray) - : NumComponentsArray(numCompArray), SourceArraySize(0) - { } - - template - VTKM_CONT - bool operator()(Device) + ConvertNumComponentsToOffsetsFunctor(const NumComponentsArrayType& numCompArray) + : NumComponentsArray(numCompArray) + , SourceArraySize(0) { - this->SourceArraySize = - vtkm::cont::DeviceAdapterAlgorithm:: - ScanExclusive(this->NumComponentsArray, this->OffsetsArray); + } + + template + VTKM_CONT bool operator()(Device) + { + this->SourceArraySize = vtkm::cont::DeviceAdapterAlgorithm::ScanExclusive( + this->NumComponentsArray, this->OffsetsArray); return true; } }; -template -VTKM_CONT -void DoConvertNumComponentsToOffsets( - const NumComponentsArrayType &numComponentsArray, - OffsetsArrayType &offsetsArray, - vtkm::Id &sourceArraySize) +template +VTKM_CONT void DoConvertNumComponentsToOffsets(const NumComponentsArrayType& numComponentsArray, + OffsetsArrayType& offsetsArray, + vtkm::Id& sourceArraySize) { VTKM_IS_ARRAY_HANDLE(NumComponentsArrayType); VTKM_IS_ARRAY_HANDLE(OffsetsArrayType); - detail::ConvertNumComponentsToOffsetsFunctor< - NumComponentsArrayType,OffsetsArrayType> functor(numComponentsArray); + detail::ConvertNumComponentsToOffsetsFunctor functor( + numComponentsArray); bool success = vtkm::cont::TryExecute(functor); if (!success) { // Internal error? Maybe need to make a failed to execute error. - throw vtkm::cont::ErrorInternal( - "Failed to run ExclusiveScan on any device."); + throw vtkm::cont::ErrorInternal("Failed to run ExclusiveScan on any device."); } sourceArraySize = functor.SourceArraySize; @@ -518,54 +493,41 @@ void DoConvertNumComponentsToOffsets( /// If an optional second parameter is given, the expected size of the source /// values array is returned in it. /// -template -VTKM_CONT -void ConvertNumComponentsToOffsets( - const NumComponentsArrayType &numComponentsArray, - vtkm::cont::ArrayHandle &offsetsArray, - vtkm::Id &sourceArraySize) +template +VTKM_CONT void ConvertNumComponentsToOffsets( + const NumComponentsArrayType& numComponentsArray, + vtkm::cont::ArrayHandle& offsetsArray, vtkm::Id& sourceArraySize) { VTKM_IS_ARRAY_HANDLE(NumComponentsArrayType); detail::DoConvertNumComponentsToOffsets( - vtkm::cont::make_ArrayHandleCast(numComponentsArray), - offsetsArray, - sourceArraySize); + vtkm::cont::make_ArrayHandleCast(numComponentsArray), offsetsArray, sourceArraySize); } -template -VTKM_CONT -void ConvertNumComponentsToOffsets( - const NumComponentsArrayType &numComponentsArray, - vtkm::cont::ArrayHandle &offsetsArray) +template +VTKM_CONT void ConvertNumComponentsToOffsets( + const NumComponentsArrayType& numComponentsArray, + vtkm::cont::ArrayHandle& offsetsArray) { vtkm::Id dummy; - vtkm::cont::ConvertNumComponentsToOffsets( - numComponentsArray, offsetsArray, dummy); + vtkm::cont::ConvertNumComponentsToOffsets(numComponentsArray, offsetsArray, dummy); } -template -VTKM_CONT -vtkm::cont::ArrayHandle -ConvertNumComponentsToOffsets(const NumComponentsArrayType &numComponentsArray, - vtkm::Id &sourceArraySize) +template +VTKM_CONT vtkm::cont::ArrayHandle ConvertNumComponentsToOffsets( + const NumComponentsArrayType& numComponentsArray, vtkm::Id& sourceArraySize) { VTKM_IS_ARRAY_HANDLE(NumComponentsArrayType); vtkm::cont::ArrayHandle offsetsArray; - vtkm::cont::ConvertNumComponentsToOffsets( - numComponentsArray, offsetsArray, sourceArraySize); + vtkm::cont::ConvertNumComponentsToOffsets(numComponentsArray, offsetsArray, sourceArraySize); return offsetsArray; } -template -VTKM_CONT -vtkm::cont::ArrayHandle -ConvertNumComponentsToOffsets(const NumComponentsArrayType &numComponentsArray) +template +VTKM_CONT vtkm::cont::ArrayHandle ConvertNumComponentsToOffsets( + const NumComponentsArrayType& numComponentsArray) { vtkm::Id dummy; return vtkm::cont::ConvertNumComponentsToOffsets(numComponentsArray, dummy); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayHandleImplicit.h b/vtkm/cont/ArrayHandleImplicit.h index c848af3f0..22904835c 100644 --- a/vtkm/cont/ArrayHandleImplicit.h +++ b/vtkm/cont/ArrayHandleImplicit.h @@ -25,11 +25,13 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ - -namespace detail { +namespace detail +{ /// \brief An array portal that returns the result of a functor /// /// This array portal is similar to an implicit array i.e an array that is @@ -39,7 +41,7 @@ namespace detail { /// The \c ArrayPortalImplicit is used in an ArrayHandle with an /// \c StorageImplicit container. /// -template +template class VTKM_ALWAYS_EXPORT ArrayPortalImplicit { public: @@ -47,15 +49,18 @@ public: typedef FunctorType_ FunctorType; VTKM_EXEC_CONT - ArrayPortalImplicit() : - Functor(), - NumberOfValues(0) { } + ArrayPortalImplicit() + : Functor() + , NumberOfValues(0) + { + } VTKM_EXEC_CONT - ArrayPortalImplicit(FunctorType f, vtkm::Id numValues) : - Functor(f), - NumberOfValues(numValues) - { } + ArrayPortalImplicit(FunctorType f, vtkm::Id numValues) + : Functor(f) + , NumberOfValues(numValues) + { + } VTKM_EXEC_CONT vtkm::Id GetNumberOfValues() const { return this->NumberOfValues; } @@ -65,22 +70,18 @@ public: ValueType Get(vtkm::Id index) const { return this->Functor(index); } VTKM_EXEC_CONT - void Set(vtkm::Id vtkmNotUsed(index), - const ValueType &vtkmNotUsed(value)) const + void Set(vtkm::Id vtkmNotUsed(index), const ValueType& vtkmNotUsed(value)) const { #if !(defined(VTKM_MSVC) && defined(VTKM_CUDA)) VTKM_ASSERT(false && "Cannot write to read-only implicit array."); #endif } - typedef vtkm::cont::internal::IteratorFromArrayPortal< - ArrayPortalImplicit > IteratorType; + typedef vtkm::cont::internal::IteratorFromArrayPortal> + IteratorType; VTKM_CONT - IteratorType GetIteratorBegin() const - { - return IteratorType(*this); - } + IteratorType GetIteratorBegin() const { return IteratorType(*this); } private: FunctorType Functor; @@ -89,18 +90,17 @@ private: /// A convenience class that provides a typedef to the appropriate tag for /// a implicit array container. -template +template struct ArrayHandleImplicitTraits { typedef vtkm::cont::StorageTagImplicit< - vtkm::cont::detail::ArrayPortalImplicit > StorageTag; - typedef vtkm::cont::ArrayHandle Superclass; + vtkm::cont::detail::ArrayPortalImplicit> + StorageTag; + typedef vtkm::cont::ArrayHandle Superclass; }; } // namespace detail - /// \brief An \c ArrayHandle that computes values on the fly. /// /// \c ArrayHandleImplicit is a specialization of ArrayHandle. @@ -108,24 +108,21 @@ struct ArrayHandleImplicitTraits /// The functor returns the result of the functor as the value of this /// array at that position. /// -template -class ArrayHandleImplicit - : public detail::ArrayHandleImplicitTraits::Superclass +template +class ArrayHandleImplicit : public detail::ArrayHandleImplicitTraits::Superclass { private: - typedef typename detail::ArrayHandleImplicitTraits ArrayTraits; + typedef typename detail::ArrayHandleImplicitTraits ArrayTraits; public: - VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleImplicit, - (ArrayHandleImplicit), - (typename ArrayTraits::Superclass)); + VTKM_ARRAY_HANDLE_SUBCLASS(ArrayHandleImplicit, (ArrayHandleImplicit), + (typename ArrayTraits::Superclass)); VTKM_CONT ArrayHandleImplicit(FunctorType functor, vtkm::Id length) - : Superclass(typename Superclass::PortalConstControl(functor,length)) - { } + : Superclass(typename Superclass::PortalConstControl(functor, length)) + { + } }; /// make_ArrayHandleImplicit is convenience function to generate an @@ -133,14 +130,11 @@ public: /// arry. template -VTKM_CONT -vtkm::cont::ArrayHandleImplicit -make_ArrayHandleImplicit(FunctorType functor, vtkm::Id length) +VTKM_CONT vtkm::cont::ArrayHandleImplicit make_ArrayHandleImplicit( + FunctorType functor, vtkm::Id length) { - return ArrayHandleImplicit(functor,length); + return ArrayHandleImplicit(functor, length); } - - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayHandleIndex.h b/vtkm/cont/ArrayHandleIndex.h index 371c29c6d..c0f573e54 100644 --- a/vtkm/cont/ArrayHandleIndex.h +++ b/vtkm/cont/ArrayHandleIndex.h @@ -24,12 +24,16 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace detail { +namespace detail +{ -struct VTKM_ALWAYS_EXPORT IndexFunctor { +struct VTKM_ALWAYS_EXPORT IndexFunctor +{ VTKM_EXEC_CONT vtkm::Id operator()(vtkm::Id index) const { return index; } }; @@ -42,19 +46,18 @@ struct VTKM_ALWAYS_EXPORT IndexFunctor { /// 0, 1, 2, 3,... to a specified size. Every value in the array is the same /// as the index to that value. /// -class ArrayHandleIndex - : public vtkm::cont::ArrayHandleImplicit +class ArrayHandleIndex : public vtkm::cont::ArrayHandleImplicit { public: - VTKM_ARRAY_HANDLE_SUBCLASS_NT( - ArrayHandleIndex, - (vtkm::cont::ArrayHandleImplicit)); + VTKM_ARRAY_HANDLE_SUBCLASS_NT(ArrayHandleIndex, + (vtkm::cont::ArrayHandleImplicit)); VTKM_CONT ArrayHandleIndex(vtkm::Id length) - : Superclass(detail::IndexFunctor(), length) { } + : Superclass(detail::IndexFunctor(), length) + { + } }; - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayHandlePermutation.h b/vtkm/cont/ArrayHandlePermutation.h index 9049408df..51b73abfc 100644 --- a/vtkm/cont/ArrayHandlePermutation.h +++ b/vtkm/cont/ArrayHandlePermutation.h @@ -26,11 +26,14 @@ #include #include -namespace vtkm { -namespace exec { -namespace internal { +namespace vtkm +{ +namespace exec +{ +namespace internal +{ -template +template class VTKM_ALWAYS_EXPORT ArrayPortalPermutation { public: @@ -38,15 +41,19 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalPermutation( ) - : IndexPortal(), ValuePortal() { } + ArrayPortalPermutation() + : IndexPortal() + , ValuePortal() + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalPermutation( - const IndexPortalType &indexPortal, - const ValuePortalType &valuePortal) - : IndexPortal(indexPortal), ValuePortal(valuePortal) { } + ArrayPortalPermutation(const IndexPortalType& indexPortal, const ValuePortalType& valuePortal) + : IndexPortal(indexPortal) + , ValuePortal(valuePortal) + { + } /// Copy constructor for any other ArrayPortalPermutation with delegate /// portal types that can be copied to these portal types. This allows us to @@ -54,62 +61,65 @@ public: /// const cast). /// VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC_CONT - ArrayPortalPermutation( - const ArrayPortalPermutation &src) - : IndexPortal(src.GetIndexPortal()), ValuePortal(src.GetValuePortal()) - { } - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const { - return this->IndexPortal.GetNumberOfValues(); + template + VTKM_EXEC_CONT ArrayPortalPermutation(const ArrayPortalPermutation& src) + : IndexPortal(src.GetIndexPortal()) + , ValuePortal(src.GetValuePortal()) + { } + VTKM_SUPPRESS_EXEC_WARNINGS + VTKM_EXEC_CONT + vtkm::Id GetNumberOfValues() const { return this->IndexPortal.GetNumberOfValues(); } + VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Get(vtkm::Id index) const { + ValueType Get(vtkm::Id index) const + { vtkm::Id permutedIndex = this->IndexPortal.Get(index); return this->ValuePortal.Get(permutedIndex); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - void Set(vtkm::Id index, const ValueType &value) const { + void Set(vtkm::Id index, const ValueType& value) const + { vtkm::Id permutedIndex = this->IndexPortal.Get(index); this->ValuePortal.Set(permutedIndex, value); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - const IndexPortalType &GetIndexPortal() const { return this->IndexPortal; } + const IndexPortalType& GetIndexPortal() const { return this->IndexPortal; } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - const ValuePortalType &GetValuePortal() const { return this->ValuePortal; } + const ValuePortalType& GetValuePortal() const { return this->ValuePortal; } private: IndexPortalType IndexPortal; ValuePortalType ValuePortal; }; - } } } // namespace vtkm::exec::internal -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace internal { +namespace internal +{ -template -struct VTKM_ALWAYS_EXPORT StorageTagPermutation { }; +template +struct VTKM_ALWAYS_EXPORT StorageTagPermutation +{ +}; -template -class Storage< - typename ValueArrayType::ValueType, - StorageTagPermutation > +template +class Storage> { VTKM_IS_ARRAY_HANDLE(IndexArrayType); VTKM_IS_ARRAY_HANDLE(ValueArrayType); @@ -117,64 +127,75 @@ class Storage< public: typedef typename ValueArrayType::ValueType ValueType; - typedef vtkm::exec::internal::ArrayPortalPermutation< - typename IndexArrayType::PortalConstControl, - typename ValueArrayType::PortalControl> PortalType; - typedef vtkm::exec::internal::ArrayPortalPermutation< - typename IndexArrayType::PortalConstControl, - typename ValueArrayType::PortalConstControl> PortalConstType; + typedef vtkm::exec::internal::ArrayPortalPermutation + PortalType; + typedef vtkm::exec::internal::ArrayPortalPermutation + PortalConstType; VTKM_CONT - Storage() : Valid(false) { } + Storage() + : Valid(false) + { + } VTKM_CONT - Storage(const IndexArrayType &indexArray, const ValueArrayType &valueArray) - : IndexArray(indexArray), ValueArray(valueArray), Valid(true) { } + Storage(const IndexArrayType& indexArray, const ValueArrayType& valueArray) + : IndexArray(indexArray) + , ValueArray(valueArray) + , Valid(true) + { + } VTKM_CONT - PortalType GetPortal() { + PortalType GetPortal() + { VTKM_ASSERT(this->Valid); return PortalType(this->IndexArray.GetPortalConstControl(), this->ValueArray.GetPortalControl()); } VTKM_CONT - PortalConstType GetPortalConst() const { + PortalConstType GetPortalConst() const + { VTKM_ASSERT(this->Valid); return PortalConstType(this->IndexArray.GetPortalConstControl(), this->ValueArray.GetPortalConstControl()); } VTKM_CONT - vtkm::Id GetNumberOfValues() const { + vtkm::Id GetNumberOfValues() const + { VTKM_ASSERT(this->Valid); return this->IndexArray.GetNumberOfValues(); } VTKM_CONT - void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorBadType( - "ArrayHandlePermutation cannot be allocated."); + void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) + { + throw vtkm::cont::ErrorBadType("ArrayHandlePermutation cannot be allocated."); } VTKM_CONT - void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorBadType( - "ArrayHandlePermutation cannot shrink."); + void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) + { + throw vtkm::cont::ErrorBadType("ArrayHandlePermutation cannot shrink."); } VTKM_CONT - void ReleaseResources() { + void ReleaseResources() + { // This request is ignored since it is asking to release the resources // of the delegate array, which may be used elsewhere. Should the behavior // be different? } VTKM_CONT - const IndexArrayType &GetIndexArray() const { return this->IndexArray; } + const IndexArrayType& GetIndexArray() const { return this->IndexArray; } VTKM_CONT - const ValueArrayType &GetValueArray() const { return this->ValueArray; } + const ValueArrayType& GetValueArray() const { return this->ValueArray; } private: IndexArrayType IndexArray; @@ -182,11 +203,9 @@ private: bool Valid; }; -template -class ArrayTransfer< - typename ValueArrayType::ValueType, - StorageTagPermutation, - Device> +template +class ArrayTransfer, Device> { public: typedef typename ValueArrayType::ValueType ValueType; @@ -200,32 +219,34 @@ public: typedef typename StorageType::PortalConstType PortalConstControl; typedef vtkm::exec::internal::ArrayPortalPermutation< - typename IndexArrayType::template ExecutionTypes::PortalConst, - typename ValueArrayType::template ExecutionTypes::Portal> + typename IndexArrayType::template ExecutionTypes::PortalConst, + typename ValueArrayType::template ExecutionTypes::Portal> PortalExecution; typedef vtkm::exec::internal::ArrayPortalPermutation< - typename IndexArrayType::template ExecutionTypes::PortalConst, - typename ValueArrayType::template ExecutionTypes::PortalConst> + typename IndexArrayType::template ExecutionTypes::PortalConst, + typename ValueArrayType::template ExecutionTypes::PortalConst> PortalConstExecution; VTKM_CONT - ArrayTransfer(StorageType *storage) - : IndexArray(storage->GetIndexArray()), - ValueArray(storage->GetValueArray()) { } - - VTKM_CONT - vtkm::Id GetNumberOfValues() const { - return this->IndexArray.GetNumberOfValues(); + ArrayTransfer(StorageType* storage) + : IndexArray(storage->GetIndexArray()) + , ValueArray(storage->GetValueArray()) + { } VTKM_CONT - PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) { + vtkm::Id GetNumberOfValues() const { return this->IndexArray.GetNumberOfValues(); } + + VTKM_CONT + PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) + { return PortalConstExecution(this->IndexArray.PrepareForInput(Device()), this->ValueArray.PrepareForInput(Device())); } VTKM_CONT - PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData)) { + PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData)) + { return PortalExecution(this->IndexArray.PrepareForInput(Device()), this->ValueArray.PrepareForInPlace(Device())); } @@ -233,11 +254,12 @@ public: VTKM_CONT PortalExecution PrepareForOutput(vtkm::Id numberOfValues) { - if (numberOfValues != this->GetNumberOfValues()) { + if (numberOfValues != this->GetNumberOfValues()) + { throw vtkm::cont::ErrorBadValue( - "An ArrayHandlePermutation can be used as an output array, " - "but it cannot be resized. Make sure the index array is sized " - "to the appropriate length before trying to prepare for output."); + "An ArrayHandlePermutation can be used as an output array, " + "but it cannot be resized. Make sure the index array is sized " + "to the appropriate length before trying to prepare for output."); } // We cannot practically allocate ValueArray because we do not know the @@ -247,30 +269,32 @@ public: if ((numberOfValues > 0) && (this->ValueArray.GetNumberOfValues() < 1)) { throw vtkm::cont::ErrorBadValue( - "The value array must be pre-allocated before it is used for the " - "output of ArrayHandlePermutation."); + "The value array must be pre-allocated before it is used for the " + "output of ArrayHandlePermutation."); } - return PortalExecution(this->IndexArray.PrepareForInput(Device()), - this->ValueArray.PrepareForOutput( - this->ValueArray.GetNumberOfValues(), Device())); + return PortalExecution( + this->IndexArray.PrepareForInput(Device()), + this->ValueArray.PrepareForOutput(this->ValueArray.GetNumberOfValues(), Device())); } VTKM_CONT - void RetrieveOutputData(StorageType *vtkmNotUsed(storage)) const { + void RetrieveOutputData(StorageType* vtkmNotUsed(storage)) const + { // Implementation of this method should be unnecessary. The internal // array handles should automatically retrieve the output data as // necessary. } VTKM_CONT - void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorBadType( - "ArrayHandlePermutation cannot shrink."); + void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) + { + throw vtkm::cont::ErrorBadType("ArrayHandlePermutation cannot shrink."); } VTKM_CONT - void ReleaseResources() { + void ReleaseResources() + { this->IndexArray.ReleaseResourcesExecution(); this->ValueArray.ReleaseResourcesExecution(); } @@ -307,9 +331,9 @@ private: /// template class ArrayHandlePermutation - : public vtkm::cont::ArrayHandle< - typename ValueArrayHandleType::ValueType, - internal::StorageTagPermutation > + : public vtkm::cont::ArrayHandle< + typename ValueArrayHandleType::ValueType, + internal::StorageTagPermutation> { // If the following line gives a compile error, then the ArrayHandleType // template argument is not a valid ArrayHandle type. @@ -318,22 +342,21 @@ class ArrayHandlePermutation public: VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandlePermutation, - (ArrayHandlePermutation), - (vtkm::cont::ArrayHandle< - typename ValueArrayHandleType::ValueType, - internal::StorageTagPermutation< - IndexArrayHandleType,ValueArrayHandleType> >)); + ArrayHandlePermutation, (ArrayHandlePermutation), + (vtkm::cont::ArrayHandle< + typename ValueArrayHandleType::ValueType, + internal::StorageTagPermutation>)); private: - typedef vtkm::cont::internal::Storage - StorageType; + typedef vtkm::cont::internal::Storage StorageType; - public: +public: VTKM_CONT - ArrayHandlePermutation(const IndexArrayHandleType &indexArray, - const ValueArrayHandleType &valueArray) - : Superclass(StorageType(indexArray, valueArray)) { } + ArrayHandlePermutation(const IndexArrayHandleType& indexArray, + const ValueArrayHandleType& valueArray) + : Superclass(StorageType(indexArray, valueArray)) + { + } }; /// make_ArrayHandleTransform is convenience function to generate an @@ -341,15 +364,11 @@ private: /// to apply to each element of the Handle. template -VTKM_CONT -vtkm::cont::ArrayHandlePermutation -make_ArrayHandlePermutation(IndexArrayHandleType indexArray, - ValueArrayHandleType valueArray) +VTKM_CONT vtkm::cont::ArrayHandlePermutation +make_ArrayHandlePermutation(IndexArrayHandleType indexArray, ValueArrayHandleType valueArray) { - return ArrayHandlePermutation( - indexArray, valueArray); + return ArrayHandlePermutation(indexArray, valueArray); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayHandleReverse.h b/vtkm/cont/ArrayHandleReverse.h index a40d7d9e2..05ee4482c 100644 --- a/vtkm/cont/ArrayHandleReverse.h +++ b/vtkm/cont/ArrayHandleReverse.h @@ -20,113 +20,126 @@ // //============================================================================= - #ifndef vtk_m_cont_ArrayHandleReverse_h #define vtk_m_cont_ArrayHandleReverse_h #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace internal { +namespace internal +{ -template< typename PortalType > +template class VTKM_ALWAYS_EXPORT ArrayPortalReverse { public: typedef typename PortalType::ValueType ValueType; VTKM_EXEC_CONT - ArrayPortalReverse() : portal() {} - - VTKM_EXEC_CONT - ArrayPortalReverse(const PortalType &p) : portal(p) {} - - template< typename OtherPortal > - VTKM_EXEC_CONT - ArrayPortalReverse(const ArrayPortalReverse &src) : portal(src.GetPortal()) {} - - VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const { - return this->portal.GetNumberOfValues(); + ArrayPortalReverse() + : portal() + { } VTKM_EXEC_CONT - ValueType Get(vtkm::Id index) const { + ArrayPortalReverse(const PortalType& p) + : portal(p) + { + } + + template + VTKM_EXEC_CONT ArrayPortalReverse(const ArrayPortalReverse& src) + : portal(src.GetPortal()) + { + } + + VTKM_EXEC_CONT + vtkm::Id GetNumberOfValues() const { return this->portal.GetNumberOfValues(); } + + VTKM_EXEC_CONT + ValueType Get(vtkm::Id index) const + { return this->portal.Get(portal.GetNumberOfValues() - index - 1); } VTKM_EXEC_CONT - void Set(vtkm::Id index, const ValueType &value) const { + void Set(vtkm::Id index, const ValueType& value) const + { this->portal1.Set(portal.GetNumberOfValues() - index - 1, value); } private: PortalType portal; - }; } -template< typename ArrayHandleType > +template class StorageTagReverse { }; -namespace internal { +namespace internal +{ -template< typename ArrayHandleType > -class Storage< typename ArrayHandleType::ValueType, StorageTagReverse > +template +class Storage> { public: typedef typename ArrayHandleType::ValueType ValueType; - typedef ArrayPortalReverse< typename ArrayHandleType::PortalControl > PortalType; - typedef ArrayPortalReverse< typename ArrayHandleType::PortalConstControl > PortalConstType; + typedef ArrayPortalReverse PortalType; + typedef ArrayPortalReverse PortalConstType; VTKM_CONT - Storage() : valid( false ) { } + Storage() + : valid(false) + { + } VTKM_CONT - Storage( const ArrayHandleType &a1 ) - : array( a1 ), valid( true ) {}; + Storage(const ArrayHandleType& a1) + : array(a1) + , valid(true){}; VTKM_CONT PortalConstType GetPortalConst() const { - VTKM_ASSERT( this->valid ); - return PortalConstType( this->array.GetPortalConstControl() ); + VTKM_ASSERT(this->valid); + return PortalConstType(this->array.GetPortalConstControl()); } VTKM_CONT PortalType GetPortal() { - VTKM_ASSERT( this->valid ); - return PortalType( this->array.GetPortalControl() ); + VTKM_ASSERT(this->valid); + return PortalType(this->array.GetPortalControl()); } VTKM_CONT vtkm::Id GetNumberOfValues() const { - VTKM_ASSERT( this->valid ); + VTKM_ASSERT(this->valid); return this->array.GetNumberOfValues(); } VTKM_CONT - void Allocate( vtkm::Id vtkmNotUsed(numberOfValues) ) + void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorInternal( - "ArrayHandleReverse should not be allocated explicitly. " ); + throw vtkm::cont::ErrorInternal("ArrayHandleReverse should not be allocated explicitly. "); } VTKM_CONT - void Shrink( vtkm::Id vtkmNotUsed(numberOfValues) ) + void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) { -// throw vtkm::cont::ErrorBadType( -// "ArrayHandleReverse cannot shrink."); + // throw vtkm::cont::ErrorBadType( + // "ArrayHandleReverse cannot shrink."); } VTKM_CONT - void ReleaseResources( ) + void ReleaseResources() { // This request is ignored since it is asking to release the resources // of the delegate array, which may be used elsewhere. Should the behavior @@ -134,80 +147,78 @@ public: } VTKM_CONT - const ArrayHandleType &GetArray() const + const ArrayHandleType& GetArray() const { - VTKM_ASSERT( this->valid ); + VTKM_ASSERT(this->valid); return this->array; } private: ArrayHandleType array; - bool valid; + bool valid; }; // class storage -template< typename ArrayHandleType, typename Device > -class ArrayTransfer< typename ArrayHandleType::ValueType, StorageTagReverse< ArrayHandleType >, Device > +template +class ArrayTransfer, Device> { public: typedef typename ArrayHandleType::ValueType ValueType; private: - typedef StorageTagReverse< ArrayHandleType > StorageTag; - typedef vtkm::cont::internal::Storage< ValueType, StorageTag> StorageType; + typedef StorageTagReverse StorageTag; + typedef vtkm::cont::internal::Storage StorageType; public: typedef typename StorageType::PortalType PortalControl; typedef typename StorageType::PortalConstType PortalConstControl; - typedef ArrayPortalReverse::Portal> PortalExecution; - typedef ArrayPortalReverse::PortalConst> PortalConstExecution; + typedef ArrayPortalReverse::Portal> + PortalExecution; + typedef ArrayPortalReverse::PortalConst> + PortalConstExecution; VTKM_CONT - ArrayTransfer( StorageType* storage ) - : array( storage->GetArray() ) {} - - VTKM_CONT - vtkm::Id GetNumberOfValues() const + ArrayTransfer(StorageType* storage) + : array(storage->GetArray()) { - return this->array.GetNumberOfValues(); } VTKM_CONT - PortalConstExecution PrepareForInput( bool vtkmNotUsed( updateData ) ) + vtkm::Id GetNumberOfValues() const { return this->array.GetNumberOfValues(); } + + VTKM_CONT + PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) { - return PortalConstExecution( this->array.PrepareForInput( Device() )); + return PortalConstExecution(this->array.PrepareForInput(Device())); } VTKM_CONT - PortalExecution PrepareForInPlace( bool vtkmNotUsed( updateData ) ) + PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData)) { - return PortalExecution( this->array.PrepareForInPlace( Device() )); + return PortalExecution(this->array.PrepareForInPlace(Device())); } VTKM_CONT - PortalExecution PrepareForOutput( vtkm::Id vtkmNotUsed(numberOfValues) ) + PortalExecution PrepareForOutput(vtkm::Id vtkmNotUsed(numberOfValues)) { - return PortalExecution( this->array.PrepareForOutput( Device() )); + return PortalExecution(this->array.PrepareForOutput(Device())); } VTKM_CONT - void RetrieveOutputData( StorageType* vtkmNotUsed(storage) ) const + void RetrieveOutputData(StorageType* vtkmNotUsed(storage)) const { // not need to implement } VTKM_CONT - void Shrink( vtkm::Id vtkmNotUsed(numberOfValues) ) + void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) { -// throw vtkm::cont::ErrorBadType( -// "ArrayHandleReverse cannot shrink."); + // throw vtkm::cont::ErrorBadType( + // "ArrayHandleReverse cannot shrink."); } VTKM_CONT - void ReleaseResources() - { - this->array.ReleaseResourcesExecution(); - } + void ReleaseResources() { this->array.ReleaseResourcesExecution(); } private: ArrayHandleType array; @@ -221,33 +232,34 @@ private: /// it creates a new handle that returns the elements of the array in reverse /// order (i.e. from end to beginning). /// -template< typename ArrayHandleType > +template class ArrayHandleReverse : public vtkm::cont::ArrayHandle > + StorageTagReverse> { public: - VTKM_ARRAY_HANDLE_SUBCLASS(ArrayHandleReverse, - (ArrayHandleReverse), - (vtkm::cont::ArrayHandle >)); + VTKM_ARRAY_HANDLE_SUBCLASS(ArrayHandleReverse, (ArrayHandleReverse), + (vtkm::cont::ArrayHandle>)); - protected: - typedef vtkm::cont::internal::Storage< ValueType, StorageTag > StorageType; +protected: + typedef vtkm::cont::internal::Storage StorageType; public: - ArrayHandleReverse(const ArrayHandleType &handle) - : Superclass(handle) {} + ArrayHandleReverse(const ArrayHandleType& handle) + : Superclass(handle) + { + } }; /// make_ArrayHandleReverse is convenience function to generate an /// ArrayHandleReverse. /// -template< typename HandleType > -VTKM_CONT -ArrayHandleReverse make_ArrayHandleReverse(const HandleType &handle) { +template +VTKM_CONT ArrayHandleReverse make_ArrayHandleReverse(const HandleType& handle) +{ return ArrayHandleReverse(handle); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayHandleStreaming.h b/vtkm/cont/ArrayHandleStreaming.h index 76dbe72af..edf122eff 100644 --- a/vtkm/cont/ArrayHandleStreaming.h +++ b/vtkm/cont/ArrayHandleStreaming.h @@ -23,11 +23,14 @@ #include #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ -template +template class VTKM_ALWAYS_EXPORT ArrayPortalStreaming { public: @@ -35,39 +38,50 @@ public: typedef typename PortalType::ValueType ValueType; VTKM_CONT - ArrayPortalStreaming() : InputPortal(), BlockIndex(0), BlockSize(0), CurBlockSize(0) { } - - VTKM_CONT - ArrayPortalStreaming(const PortalType &inputPortal, vtkm::Id blockIndex, - vtkm::Id blockSize, vtkm::Id curBlockSize) : - InputPortal(inputPortal), BlockIndex(blockIndex), - BlockSize(blockSize), CurBlockSize(curBlockSize) { } - - template - VTKM_CONT - ArrayPortalStreaming(const ArrayPortalStreaming &src) : - InputPortal(src.GetPortal()), - BlockIndex(src.GetBlockIndex()), - BlockSize(src.GetBlockSize()), - CurBlockSize(src.GetCurBlockSize()) { } - - VTKM_CONT - vtkm::Id GetNumberOfValues() const { - return this->CurBlockSize; + ArrayPortalStreaming() + : InputPortal() + , BlockIndex(0) + , BlockSize(0) + , CurBlockSize(0) + { } VTKM_CONT - ValueType Get(vtkm::Id index) const { - return this->InputPortal.Get(this->BlockIndex*this->BlockSize + index); + ArrayPortalStreaming(const PortalType& inputPortal, vtkm::Id blockIndex, vtkm::Id blockSize, + vtkm::Id curBlockSize) + : InputPortal(inputPortal) + , BlockIndex(blockIndex) + , BlockSize(blockSize) + , CurBlockSize(curBlockSize) + { + } + + template + VTKM_CONT ArrayPortalStreaming(const ArrayPortalStreaming& src) + : InputPortal(src.GetPortal()) + , BlockIndex(src.GetBlockIndex()) + , BlockSize(src.GetBlockSize()) + , CurBlockSize(src.GetCurBlockSize()) + { } VTKM_CONT - void Set(vtkm::Id index, const ValueType &value) const { - this->InputPortal.Set(this->BlockIndex*this->BlockSize + index, value); + vtkm::Id GetNumberOfValues() const { return this->CurBlockSize; } + + VTKM_CONT + ValueType Get(vtkm::Id index) const + { + return this->InputPortal.Get(this->BlockIndex * this->BlockSize + index); } VTKM_CONT - const PortalType &GetPortal() const { return this->InputPortal; } + void Set(vtkm::Id index, const ValueType& value) const + { + this->InputPortal.Set(this->BlockIndex * this->BlockSize + index, value); + } + + VTKM_CONT + const PortalType& GetPortal() const { return this->InputPortal; } VTKM_CONT void SetBlockSize(vtkm::Id blockSize) { this->BlockSize = blockSize; } @@ -96,79 +110,96 @@ private: } // internal -template -struct VTKM_ALWAYS_EXPORT StorageTagStreaming { }; +template +struct VTKM_ALWAYS_EXPORT StorageTagStreaming +{ +}; -namespace internal { +namespace internal +{ -template -class Storage< - typename ArrayHandleInputType::ValueType, - StorageTagStreaming > +template +class Storage> { public: typedef typename ArrayHandleInputType::ValueType ValueType; + typedef vtkm::cont::internal::ArrayPortalStreaming + PortalType; typedef vtkm::cont::internal::ArrayPortalStreaming< - typename ArrayHandleInputType::PortalControl> PortalType; - typedef vtkm::cont::internal::ArrayPortalStreaming< - typename ArrayHandleInputType::PortalConstControl> PortalConstType; + typename ArrayHandleInputType::PortalConstControl> + PortalConstType; VTKM_CONT - Storage() : Valid(false) { } - - VTKM_CONT - Storage(const ArrayHandleInputType inputArray, vtkm::Id blockSize, - vtkm::Id blockIndex, vtkm::Id curBlockSize) : - InputArray(inputArray), BlockSize(blockSize), - BlockIndex(blockIndex), CurBlockSize(curBlockSize), Valid(true) { } - - VTKM_CONT - PortalType GetPortal() { - VTKM_ASSERT(this->Valid); - return PortalType(this->InputArray.GetPortalControl(), - BlockSize, BlockIndex, CurBlockSize); + Storage() + : Valid(false) + { } VTKM_CONT - PortalConstType GetPortalConst() const { - VTKM_ASSERT(this->Valid); - return PortalConstType(this->InputArray.GetPortalConstControl(), - BlockSize, BlockIndex, CurBlockSize); + Storage(const ArrayHandleInputType inputArray, vtkm::Id blockSize, vtkm::Id blockIndex, + vtkm::Id curBlockSize) + : InputArray(inputArray) + , BlockSize(blockSize) + , BlockIndex(blockIndex) + , CurBlockSize(curBlockSize) + , Valid(true) + { } VTKM_CONT - vtkm::Id GetNumberOfValues() const { + PortalType GetPortal() + { + VTKM_ASSERT(this->Valid); + return PortalType(this->InputArray.GetPortalControl(), BlockSize, BlockIndex, CurBlockSize); + } + + VTKM_CONT + PortalConstType GetPortalConst() const + { + VTKM_ASSERT(this->Valid); + return PortalConstType(this->InputArray.GetPortalConstControl(), BlockSize, BlockIndex, + CurBlockSize); + } + + VTKM_CONT + vtkm::Id GetNumberOfValues() const + { VTKM_ASSERT(this->Valid); return CurBlockSize; } VTKM_CONT - void Allocate(vtkm::Id numberOfValues) const { + void Allocate(vtkm::Id numberOfValues) const + { (void)numberOfValues; // Do nothing, since we only allocate a streaming array once at the beginning } VTKM_CONT - void AllocateFullArray(vtkm::Id numberOfValues) { + void AllocateFullArray(vtkm::Id numberOfValues) + { VTKM_ASSERT(this->Valid); this->InputArray.Allocate(numberOfValues); } VTKM_CONT - void Shrink(vtkm::Id numberOfValues) { + void Shrink(vtkm::Id numberOfValues) + { VTKM_ASSERT(this->Valid); this->InputArray.Shrink(numberOfValues); } VTKM_CONT - void ReleaseResources() { + void ReleaseResources() + { VTKM_ASSERT(this->Valid); this->InputArray.ReleaseResources(); } VTKM_CONT - const ArrayHandleInputType &GetArray() const { + const ArrayHandleInputType& GetArray() const + { VTKM_ASSERT(this->Valid); return this->InputArray; } @@ -180,37 +211,33 @@ private: vtkm::Id CurBlockSize; bool Valid; }; - } } } -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -template +template class ArrayHandleStreaming - : public vtkm::cont::ArrayHandle< - typename ArrayHandleInputType::ValueType, - StorageTagStreaming > + : public vtkm::cont::ArrayHandle> { public: - VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleStreaming, - (ArrayHandleStreaming), - (vtkm::cont::ArrayHandle< - typename ArrayHandleInputType::ValueType, - StorageTagStreaming >)); + VTKM_ARRAY_HANDLE_SUBCLASS(ArrayHandleStreaming, (ArrayHandleStreaming), + (vtkm::cont::ArrayHandle>)); private: - typedef vtkm::cont::internal::Storage StorageType; + typedef vtkm::cont::internal::Storage StorageType; public: VTKM_CONT - ArrayHandleStreaming(const ArrayHandleInputType &inputArray, - const vtkm::Id blockIndex, const vtkm::Id blockSize, - const vtkm::Id curBlockSize) - : Superclass(StorageType(inputArray, blockIndex, blockSize, curBlockSize)) + ArrayHandleStreaming(const ArrayHandleInputType& inputArray, const vtkm::Id blockIndex, + const vtkm::Id blockSize, const vtkm::Id curBlockSize) + : Superclass(StorageType(inputArray, blockIndex, blockSize, curBlockSize)) { this->GetPortalConstControl().SetBlockIndex(blockIndex); this->GetPortalConstControl().SetBlockSize(blockSize); @@ -218,14 +245,13 @@ public: } VTKM_CONT - void AllocateFullArray(vtkm::Id numberOfValues) { + void AllocateFullArray(vtkm::Id numberOfValues) + { this->ReleaseResourcesExecutionInternal(); this->Internals->ControlArray.AllocateFullArray(numberOfValues); this->Internals->ControlArrayValid = true; } - }; - } } diff --git a/vtkm/cont/ArrayHandleTransform.h b/vtkm/cont/ArrayHandleTransform.h index 6c86e60b1..6a3265da3 100644 --- a/vtkm/cont/ArrayHandleTransform.h +++ b/vtkm/cont/ArrayHandleTransform.h @@ -26,31 +26,39 @@ #include #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ /// Tag used in place of an inverse functor. -struct NullFunctorType {}; - +struct NullFunctorType +{ +}; } } } // namespace vtkm::cont::internal -namespace vtkm { -namespace exec { -namespace internal { +namespace vtkm +{ +namespace exec +{ +namespace internal +{ typedef vtkm::cont::internal::NullFunctorType NullFunctorType; /// \brief An array portal that transforms a value from another portal. /// -template +template class VTKM_ALWAYS_EXPORT ArrayPortalTransform; -template -class VTKM_ALWAYS_EXPORT ArrayPortalTransform +template +class VTKM_ALWAYS_EXPORT + ArrayPortalTransform { public: typedef PortalType_ PortalType; @@ -59,64 +67,63 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalTransform(const PortalType &portal = PortalType(), - const FunctorType &functor = FunctorType()) - : Portal(portal), Functor(functor) - { } + ArrayPortalTransform(const PortalType& portal = PortalType(), + const FunctorType& functor = FunctorType()) + : Portal(portal) + , Functor(functor) + { + } /// Copy constructor for any other ArrayPortalTransform with an iterator /// type that can be copied to this iterator type. This allows us to do any /// type casting that the iterators do (like the non-const to const cast). /// VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC_CONT - ArrayPortalTransform(const ArrayPortalTransform &src) - : Portal(src.GetPortal()), - Functor(src.GetFunctor()) - { } - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const { - return this->Portal.GetNumberOfValues(); + template + VTKM_EXEC_CONT ArrayPortalTransform(const ArrayPortalTransform& src) + : Portal(src.GetPortal()) + , Functor(src.GetFunctor()) + { } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ValueType Get(vtkm::Id index) const { - return this->Functor(this->Portal.Get(index)); - } + vtkm::Id GetNumberOfValues() const { return this->Portal.GetNumberOfValues(); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - void Set(vtkm::Id vtkmNotUsed(index), - const ValueType &vtkmNotUsed(value)) const + ValueType Get(vtkm::Id index) const { return this->Functor(this->Portal.Get(index)); } + + VTKM_SUPPRESS_EXEC_WARNINGS + VTKM_EXEC_CONT + void Set(vtkm::Id vtkmNotUsed(index), const ValueType& vtkmNotUsed(value)) const { #if !(defined(VTKM_MSVC) && defined(VTKM_CUDA)) - VTKM_ASSERT(false && "Cannot write to read-only transform array. (No inverse transform given.)"); + VTKM_ASSERT(false && + "Cannot write to read-only transform array. (No inverse transform given.)"); #endif } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - const PortalType &GetPortal() const { return this->Portal; } + const PortalType& GetPortal() const { return this->Portal; } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - const FunctorType &GetFunctor() const { return this->Functor; } + const FunctorType& GetFunctor() const { return this->Functor; } protected: PortalType Portal; FunctorType Functor; }; -template -class VTKM_ALWAYS_EXPORT ArrayPortalTransform : public ArrayPortalTransform +template +class VTKM_ALWAYS_EXPORT ArrayPortalTransform + : public ArrayPortalTransform { public: - typedef ArrayPortalTransform Superclass; + typedef ArrayPortalTransform Superclass; typedef PortalType_ PortalType; typedef ValueType_ ValueType; typedef FunctorType_ FunctorType; @@ -124,51 +131,57 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalTransform(const PortalType &portal = PortalType(), - const FunctorType &functor = FunctorType(), - const InverseFunctorType& inverseFunctor = InverseFunctorType()) - : Superclass(portal,functor), InverseFunctor(inverseFunctor) - { } + ArrayPortalTransform(const PortalType& portal = PortalType(), + const FunctorType& functor = FunctorType(), + const InverseFunctorType& inverseFunctor = InverseFunctorType()) + : Superclass(portal, functor) + , InverseFunctor(inverseFunctor) + { + } VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC_CONT - ArrayPortalTransform(const ArrayPortalTransform &src) - : Superclass(src), InverseFunctor(src.GetInverseFunctor()) - { } - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - void Set(vtkm::Id index, const ValueType& value) const { - return this->Portal.Set(index,this->InverseFunctor(value)); + template + VTKM_EXEC_CONT ArrayPortalTransform( + const ArrayPortalTransform& src) + : Superclass(src) + , InverseFunctor(src.GetInverseFunctor()) + { } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - const InverseFunctorType &GetInverseFunctor() const { - return this->InverseFunctor; } + void Set(vtkm::Id index, const ValueType& value) const + { + return this->Portal.Set(index, this->InverseFunctor(value)); + } + + VTKM_SUPPRESS_EXEC_WARNINGS + VTKM_EXEC_CONT + const InverseFunctorType& GetInverseFunctor() const { return this->InverseFunctor; } private: InverseFunctorType InverseFunctor; - }; - } } } // namespace vtkm::exec::internal +namespace vtkm +{ +namespace cont +{ -namespace vtkm { -namespace cont { +namespace internal +{ -namespace internal { +template +struct VTKM_ALWAYS_EXPORT StorageTagTransform +{ +}; -template -struct VTKM_ALWAYS_EXPORT StorageTagTransform {}; - -template -class Storage > +template +class Storage> { public: typedef T ValueType; @@ -177,71 +190,78 @@ public: // should only be able to use the const version. struct PortalType { - typedef void *ValueType; - typedef void *IteratorType; + typedef void* ValueType; + typedef void* IteratorType; }; typedef vtkm::exec::internal::ArrayPortalTransform< - ValueType, typename ArrayHandleType::PortalConstControl, FunctorType> + ValueType, typename ArrayHandleType::PortalConstControl, FunctorType> PortalConstType; VTKM_CONT - Storage() : Valid(false) { } - - VTKM_CONT - Storage(const ArrayHandleType &array, - const FunctorType &functor = FunctorType()) - : Array(array), Functor(functor), Valid(true) { } - - VTKM_CONT - PortalType GetPortal() { - VTKM_ASSERT(this->Valid); - return PortalType(this->Array.GetPortalControl(), - this->Functor); + Storage() + : Valid(false) + { } VTKM_CONT - PortalConstType GetPortalConst() const { - VTKM_ASSERT(this->Valid); - return PortalConstType(this->Array.GetPortalConstControl(), - this->Functor); + Storage(const ArrayHandleType& array, const FunctorType& functor = FunctorType()) + : Array(array) + , Functor(functor) + , Valid(true) + { } VTKM_CONT - vtkm::Id GetNumberOfValues() const { + PortalType GetPortal() + { + VTKM_ASSERT(this->Valid); + return PortalType(this->Array.GetPortalControl(), this->Functor); + } + + VTKM_CONT + PortalConstType GetPortalConst() const + { + VTKM_ASSERT(this->Valid); + return PortalConstType(this->Array.GetPortalConstControl(), this->Functor); + } + + VTKM_CONT + vtkm::Id GetNumberOfValues() const + { VTKM_ASSERT(this->Valid); return this->Array.GetNumberOfValues(); } VTKM_CONT - void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorBadType( - "ArrayHandleTransform is read only. It cannot be allocated."); + void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) + { + throw vtkm::cont::ErrorBadType("ArrayHandleTransform is read only. It cannot be allocated."); } VTKM_CONT - void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorBadType( - "ArrayHandleTransform is read only. It cannot shrink."); + void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) + { + throw vtkm::cont::ErrorBadType("ArrayHandleTransform is read only. It cannot shrink."); } VTKM_CONT - void ReleaseResources() { + void ReleaseResources() + { // This request is ignored since it is asking to release the resources // of the delegate array, which may be used elsewhere. Should the behavior // be different? } VTKM_CONT - const ArrayHandleType &GetArray() const { + const ArrayHandleType& GetArray() const + { VTKM_ASSERT(this->Valid); return this->Array; } VTKM_CONT - const FunctorType &GetFunctor() const { - return this->Functor; - } + const FunctorType& GetFunctor() const { return this->Functor; } private: ArrayHandleType Array; @@ -249,84 +269,86 @@ private: bool Valid; }; -template -class Storage > +template +class Storage> { public: typedef T ValueType; - typedef vtkm::exec::internal::ArrayPortalTransform + typedef vtkm::exec::internal::ArrayPortalTransform< + ValueType, typename ArrayHandleType::PortalControl, FunctorType, InverseFunctorType> PortalType; - typedef vtkm::exec::internal::ArrayPortalTransform + typedef vtkm::exec::internal::ArrayPortalTransform< + ValueType, typename ArrayHandleType::PortalConstControl, FunctorType, InverseFunctorType> PortalConstType; VTKM_CONT - Storage() : Valid(false) { } - - VTKM_CONT - Storage(const ArrayHandleType &array, - const FunctorType &functor, - const InverseFunctorType &inverseFunctor) - : Array(array), Functor(functor), InverseFunctor(inverseFunctor), Valid(true) { } - - VTKM_CONT - PortalType GetPortal() { - VTKM_ASSERT(this->Valid); - return PortalType(this->Array.GetPortalControl(), - this->Functor, - this->InverseFunctor); + Storage() + : Valid(false) + { } VTKM_CONT - PortalConstType GetPortalConst() const { + Storage(const ArrayHandleType& array, const FunctorType& functor, + const InverseFunctorType& inverseFunctor) + : Array(array) + , Functor(functor) + , InverseFunctor(inverseFunctor) + , Valid(true) + { + } + + VTKM_CONT + PortalType GetPortal() + { VTKM_ASSERT(this->Valid); - return PortalConstType(this->Array.GetPortalConstControl(), - this->Functor, + return PortalType(this->Array.GetPortalControl(), this->Functor, this->InverseFunctor); + } + + VTKM_CONT + PortalConstType GetPortalConst() const + { + VTKM_ASSERT(this->Valid); + return PortalConstType(this->Array.GetPortalConstControl(), this->Functor, this->InverseFunctor); } VTKM_CONT - vtkm::Id GetNumberOfValues() const { + vtkm::Id GetNumberOfValues() const + { VTKM_ASSERT(this->Valid); return this->Array.GetNumberOfValues(); } VTKM_CONT - void Allocate(vtkm::Id numberOfValues) { + void Allocate(vtkm::Id numberOfValues) + { this->Array.Allocate(numberOfValues); this->Valid = true; } VTKM_CONT - void Shrink(vtkm::Id numberOfValues) { - this->Array.Shrink(numberOfValues); - } + void Shrink(vtkm::Id numberOfValues) { this->Array.Shrink(numberOfValues); } VTKM_CONT - void ReleaseResources() { + void ReleaseResources() + { this->Array.ReleaseResources(); this->Valid = false; } VTKM_CONT - const ArrayHandleType &GetArray() const { + const ArrayHandleType& GetArray() const + { VTKM_ASSERT(this->Valid); return this->Array; } VTKM_CONT - const FunctorType &GetFunctor() const { - return this->Functor; - } + const FunctorType& GetFunctor() const { return this->Functor; } VTKM_CONT - const InverseFunctorType &GetInverseFunctor() const { - return this->InverseFunctor; - } + const InverseFunctorType& GetInverseFunctor() const { return this->InverseFunctor; } private: ArrayHandleType Array; @@ -335,14 +357,10 @@ private: bool Valid; }; -template -class ArrayTransfer< - T, StorageTagTransform, Device> +template +class ArrayTransfer, Device> { - typedef StorageTagTransform StorageTag; + typedef StorageTagTransform StorageTag; typedef vtkm::cont::internal::Storage StorageType; public: @@ -354,72 +372,67 @@ public: //meant to be an invalid writeable execution portal typedef typename StorageType::PortalType PortalExecution; typedef vtkm::exec::internal::ArrayPortalTransform< - ValueType, - typename ArrayHandleType::template ExecutionTypes::PortalConst, - FunctorType> PortalConstExecution; + ValueType, typename ArrayHandleType::template ExecutionTypes::PortalConst, FunctorType> + PortalConstExecution; VTKM_CONT - ArrayTransfer(StorageType *storage) - : Array(storage->GetArray()), Functor(storage->GetFunctor()) { } - - VTKM_CONT - vtkm::Id GetNumberOfValues() const { - return this->Array.GetNumberOfValues(); + ArrayTransfer(StorageType* storage) + : Array(storage->GetArray()) + , Functor(storage->GetFunctor()) + { } VTKM_CONT - PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) { + vtkm::Id GetNumberOfValues() const { return this->Array.GetNumberOfValues(); } + + VTKM_CONT + PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) + { return PortalConstExecution(this->Array.PrepareForInput(Device()), this->Functor); } VTKM_CONT - PortalExecution PrepareForInPlace(bool &vtkmNotUsed(updateData)) { - throw vtkm::cont::ErrorBadType( - "ArrayHandleTransform read only. " - "Cannot be used for in-place operations."); + PortalExecution PrepareForInPlace(bool& vtkmNotUsed(updateData)) + { + throw vtkm::cont::ErrorBadType("ArrayHandleTransform read only. " + "Cannot be used for in-place operations."); } VTKM_CONT - PortalExecution PrepareForOutput(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorBadType( - "ArrayHandleTransform read only. Cannot be used as output."); + PortalExecution PrepareForOutput(vtkm::Id vtkmNotUsed(numberOfValues)) + { + throw vtkm::cont::ErrorBadType("ArrayHandleTransform read only. Cannot be used as output."); } VTKM_CONT - void RetrieveOutputData(StorageType *vtkmNotUsed(storage)) const { + void RetrieveOutputData(StorageType* vtkmNotUsed(storage)) const + { throw vtkm::cont::ErrorInternal( - "ArrayHandleTransform read only. " - "There should be no occurance of the ArrayHandle trying to pull " - "data from the execution environment."); + "ArrayHandleTransform read only. " + "There should be no occurance of the ArrayHandle trying to pull " + "data from the execution environment."); } VTKM_CONT - void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorBadType( - "ArrayHandleTransform read only. Cannot shrink."); + void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) + { + throw vtkm::cont::ErrorBadType("ArrayHandleTransform read only. Cannot shrink."); } VTKM_CONT - void ReleaseResources() { - this->Array.ReleaseResourcesExecution(); - } + void ReleaseResources() { this->Array.ReleaseResourcesExecution(); } private: ArrayHandleType Array; FunctorType Functor; }; -template -class ArrayTransfer< - T, StorageTagTransform, - Device> +template +class ArrayTransfer, + Device> { - typedef StorageTagTransform StorageTag; + typedef StorageTagTransform StorageTag; typedef vtkm::cont::internal::Storage StorageType; public: @@ -429,56 +442,58 @@ public: typedef typename StorageType::PortalConstType PortalConstControl; typedef vtkm::exec::internal::ArrayPortalTransform< - ValueType, - typename ArrayHandleType::template ExecutionTypes::Portal, - FunctorType, InverseFunctorType> PortalExecution; + ValueType, typename ArrayHandleType::template ExecutionTypes::Portal, FunctorType, + InverseFunctorType> + PortalExecution; typedef vtkm::exec::internal::ArrayPortalTransform< - ValueType, - typename ArrayHandleType::template ExecutionTypes::PortalConst, - FunctorType, InverseFunctorType> PortalConstExecution; + ValueType, typename ArrayHandleType::template ExecutionTypes::PortalConst, FunctorType, + InverseFunctorType> + PortalConstExecution; VTKM_CONT - ArrayTransfer(StorageType *storage) - : Array(storage->GetArray()), - Functor(storage->GetFunctor()), - InverseFunctor(storage->GetInverseFunctor()) { } - - VTKM_CONT - vtkm::Id GetNumberOfValues() const { - return this->Array.GetNumberOfValues(); + ArrayTransfer(StorageType* storage) + : Array(storage->GetArray()) + , Functor(storage->GetFunctor()) + , InverseFunctor(storage->GetInverseFunctor()) + { } VTKM_CONT - PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) { - return PortalConstExecution(this->Array.PrepareForInput(Device()),this->Functor,this->InverseFunctor); + vtkm::Id GetNumberOfValues() const { return this->Array.GetNumberOfValues(); } + + VTKM_CONT + PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) + { + return PortalConstExecution(this->Array.PrepareForInput(Device()), this->Functor, + this->InverseFunctor); } VTKM_CONT - PortalExecution PrepareForInPlace(bool &vtkmNotUsed(updateData)) { - return PortalExecution(this->Array.PrepareForInPlace(Device()),this->Functor,this->InverseFunctor); + PortalExecution PrepareForInPlace(bool& vtkmNotUsed(updateData)) + { + return PortalExecution(this->Array.PrepareForInPlace(Device()), this->Functor, + this->InverseFunctor); } VTKM_CONT - PortalExecution PrepareForOutput(vtkm::Id numberOfValues) { - return PortalExecution(this->Array.PrepareForOutput(numberOfValues, - Device()),this->Functor,this->InverseFunctor); + PortalExecution PrepareForOutput(vtkm::Id numberOfValues) + { + return PortalExecution(this->Array.PrepareForOutput(numberOfValues, Device()), this->Functor, + this->InverseFunctor); } VTKM_CONT - void RetrieveOutputData(StorageType *vtkmNotUsed(storage)) const { + void RetrieveOutputData(StorageType* vtkmNotUsed(storage)) const + { // Implementation of this method should be unnecessary. The internal // array handle should automatically retrieve the output data as necessary. } VTKM_CONT - void Shrink(vtkm::Id numberOfValues) { - this->Array.Shrink(numberOfValues); - } + void Shrink(vtkm::Id numberOfValues) { this->Array.Shrink(numberOfValues); } VTKM_CONT - void ReleaseResources() { - this->Array.ReleaseResourcesExecution(); - } + void ReleaseResources() { this->Array.ReleaseResourcesExecution(); } private: ArrayHandleType Array; @@ -499,18 +514,14 @@ private: /// the functor operator should work in both the control and execution /// environments. /// -template +template class ArrayHandleTransform; -template -class ArrayHandleTransform - : public vtkm::cont::ArrayHandle< - T, internal::StorageTagTransform > +template +class ArrayHandleTransform + : public vtkm::cont::ArrayHandle> { // If the following line gives a compile error, then the ArrayHandleType // template argument is not a valid ArrayHandle type. @@ -518,19 +529,18 @@ class ArrayHandleTransform), - (vtkm::cont::ArrayHandle< - T, internal::StorageTagTransform >)); + ArrayHandleTransform, (ArrayHandleTransform), + (vtkm::cont::ArrayHandle>)); private: typedef vtkm::cont::internal::Storage StorageType; public: VTKM_CONT - ArrayHandleTransform(const ArrayHandleType &handle, - const FunctorType &functor = FunctorType()) - : Superclass(StorageType(handle, functor)) { } + ArrayHandleTransform(const ArrayHandleType& handle, const FunctorType& functor = FunctorType()) + : Superclass(StorageType(handle, functor)) + { + } }; /// make_ArrayHandleTransform is convenience function to generate an @@ -538,53 +548,46 @@ public: /// to apply to each element of the Handle. template -VTKM_CONT -vtkm::cont::ArrayHandleTransform -make_ArrayHandleTransform(HandleType handle, FunctorType functor) +VTKM_CONT vtkm::cont::ArrayHandleTransform make_ArrayHandleTransform( + HandleType handle, FunctorType functor) { - return ArrayHandleTransform(handle,functor); + return ArrayHandleTransform(handle, functor); } // ArrayHandleTransform with inverse functors enabled (no need to subclass from // ArrayHandleTransform without inverse functors: nothing to inherit). -template +template class ArrayHandleTransform - : public vtkm::cont::ArrayHandle< - T, - internal::StorageTagTransform > + : public vtkm::cont::ArrayHandle< + T, internal::StorageTagTransform> { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); public: VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleTransform, - (ArrayHandleTransform), - (vtkm::cont::ArrayHandle< - T, internal::StorageTagTransform >)); + ArrayHandleTransform, + (ArrayHandleTransform), + (vtkm::cont::ArrayHandle< + T, internal::StorageTagTransform>)); private: typedef vtkm::cont::internal::Storage StorageType; - public: - ArrayHandleTransform(const ArrayHandleType &handle, - const FunctorType &functor = FunctorType(), - const InverseFunctorType &inverseFunctor = InverseFunctorType()) - : Superclass(StorageType(handle, functor, inverseFunctor)) { } +public: + ArrayHandleTransform(const ArrayHandleType& handle, const FunctorType& functor = FunctorType(), + const InverseFunctorType& inverseFunctor = InverseFunctorType()) + : Superclass(StorageType(handle, functor, inverseFunctor)) + { + } }; template -VTKM_CONT -vtkm::cont::ArrayHandleTransform +VTKM_CONT vtkm::cont::ArrayHandleTransform make_ArrayHandleTransform(HandleType handle, FunctorType functor, InverseFunctorType inverseFunctor) { - return ArrayHandleTransform(handle,functor,inverseFunctor); + return ArrayHandleTransform(handle, functor, + inverseFunctor); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayHandleUniformPointCoordinates.h b/vtkm/cont/ArrayHandleUniformPointCoordinates.h index 91a2261a8..7a1f638c9 100644 --- a/vtkm/cont/ArrayHandleUniformPointCoordinates.h +++ b/vtkm/cont/ArrayHandleUniformPointCoordinates.h @@ -24,8 +24,10 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// ArrayHandleUniformPointCoordinates is a specialization of ArrayHandle. It /// contains the information necessary to compute the point coordinates in a @@ -33,34 +35,30 @@ namespace cont { /// computes these coordinates in its array portal. /// class ArrayHandleUniformPointCoordinates - : public vtkm::cont::ArrayHandle< - vtkm::Vec, - vtkm::cont::StorageTagImplicit< - vtkm::internal::ArrayPortalUniformPointCoordinates> > + : public vtkm::cont::ArrayHandle< + vtkm::Vec, + vtkm::cont::StorageTagImplicit> { public: VTKM_ARRAY_HANDLE_SUBCLASS_NT( - ArrayHandleUniformPointCoordinates, - (vtkm::cont::ArrayHandle< - vtkm::Vec, - vtkm::cont::StorageTagImplicit< - vtkm::internal::ArrayPortalUniformPointCoordinates> >)); + ArrayHandleUniformPointCoordinates, + (vtkm::cont::ArrayHandle< + vtkm::Vec, + vtkm::cont::StorageTagImplicit>)); private: typedef vtkm::cont::internal::Storage StorageType; public: VTKM_CONT - ArrayHandleUniformPointCoordinates( - vtkm::Id3 dimensions, - ValueType origin = ValueType(0.0f, 0.0f, 0.0f), - ValueType spacing = ValueType(1.0f, 1.0f, 1.0f)) - : Superclass( - StorageType(vtkm::internal::ArrayPortalUniformPointCoordinates( - dimensions, origin, spacing))) - { } + ArrayHandleUniformPointCoordinates(vtkm::Id3 dimensions, + ValueType origin = ValueType(0.0f, 0.0f, 0.0f), + ValueType spacing = ValueType(1.0f, 1.0f, 1.0f)) + : Superclass(StorageType( + vtkm::internal::ArrayPortalUniformPointCoordinates(dimensions, origin, spacing))) + { + } }; - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayHandleZip.h b/vtkm/cont/ArrayHandleZip.h index 92e2e04ec..4289d4358 100644 --- a/vtkm/cont/ArrayHandleZip.h +++ b/vtkm/cont/ArrayHandleZip.h @@ -23,15 +23,16 @@ #include #include -namespace vtkm { -namespace exec { -namespace internal { +namespace vtkm +{ +namespace exec +{ +namespace internal +{ /// \brief An array portal that zips two portals together into a single value /// for the execution environment -template +template class ArrayPortalZip { public: @@ -43,88 +44,94 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT ArrayPortalZip() - : PortalFirst(), PortalSecond() - { } //needs to be host and device so that cuda can create lvalue of these + : PortalFirst() + , PortalSecond() + { + } //needs to be host and device so that cuda can create lvalue of these VTKM_CONT - ArrayPortalZip(const PortalTypeFirst &portalfirst, - const PortalTypeSecond &portalsecond) - : PortalFirst(portalfirst), PortalSecond(portalsecond) - { } + ArrayPortalZip(const PortalTypeFirst& portalfirst, const PortalTypeSecond& portalsecond) + : PortalFirst(portalfirst) + , PortalSecond(portalsecond) + { + } /// Copy constructor for any other ArrayPortalZip with an iterator /// type that can be copied to this iterator type. This allows us to do any /// type casting that the iterators do (like the non-const to const cast). /// - template - VTKM_CONT - ArrayPortalZip(const ArrayPortalZip &src) - : PortalFirst(src.GetFirstPortal()), - PortalSecond(src.GetSecondPortal()) - { } + template + VTKM_CONT ArrayPortalZip(const ArrayPortalZip& src) + : PortalFirst(src.GetFirstPortal()) + , PortalSecond(src.GetSecondPortal()) + { + } VTKM_EXEC_CONT vtkm::Id GetNumberOfValues() const { return this->PortalFirst.GetNumberOfValues(); } VTKM_EXEC - ValueType Get(vtkm::Id index) const { - return vtkm::make_Pair(this->PortalFirst.Get(index), - this->PortalSecond.Get(index)); + ValueType Get(vtkm::Id index) const + { + return vtkm::make_Pair(this->PortalFirst.Get(index), this->PortalSecond.Get(index)); } VTKM_EXEC - void Set(vtkm::Id index, const ValueType &value) const { + void Set(vtkm::Id index, const ValueType& value) const + { this->PortalFirst.Set(index, value.first); this->PortalSecond.Set(index, value.second); } VTKM_EXEC_CONT - const PortalTypeFirst &GetFirstPortal() const { return this->PortalFirst; } + const PortalTypeFirst& GetFirstPortal() const { return this->PortalFirst; } VTKM_EXEC_CONT - const PortalTypeSecond &GetSecondPortal() const { return this->PortalSecond; } - + const PortalTypeSecond& GetSecondPortal() const { return this->PortalSecond; } private: PortalTypeFirst PortalFirst; PortalTypeSecond PortalSecond; }; - } } } // namespace vtkm::exec::internal +namespace vtkm +{ +namespace cont +{ -namespace vtkm { -namespace cont { +namespace internal +{ -namespace internal { - -template -struct VTKM_ALWAYS_EXPORT StorageTagZip { }; +template +struct VTKM_ALWAYS_EXPORT StorageTagZip +{ +}; /// This helper struct defines the value type for a zip container containing /// the given two array handles. /// -template -struct ArrayHandleZipTraits { +template +struct ArrayHandleZipTraits +{ /// The ValueType (a pair containing the value types of the two arrays). /// - typedef vtkm::Pair ValueType; + typedef vtkm::Pair + ValueType; /// The appropriately templated tag. /// - typedef StorageTagZip Tag; + typedef StorageTagZip Tag; /// The superclass for ArrayHandleZip. /// - typedef vtkm::cont::ArrayHandle Superclass; + typedef vtkm::cont::ArrayHandle Superclass; }; - -template -class Storage > +template +class Storage> { VTKM_IS_ARRAY_HANDLE(FirstHandleType); VTKM_IS_ARRAY_HANDLE(SecondHandleType); @@ -132,84 +139,84 @@ class Storage > public: typedef T ValueType; - typedef vtkm::exec::internal::ArrayPortalZip< ValueType, - typename FirstHandleType::PortalControl, - typename SecondHandleType::PortalControl> PortalType; - typedef vtkm::exec::internal::ArrayPortalZip< ValueType, - typename FirstHandleType::PortalConstControl, - typename SecondHandleType::PortalConstControl> - PortalConstType; + typedef vtkm::exec::internal::ArrayPortalZip + PortalType; + typedef vtkm::exec::internal::ArrayPortalZip + PortalConstType; VTKM_CONT - Storage() : FirstArray(), SecondArray() { } - - VTKM_CONT - Storage(const FirstHandleType &farray, const SecondHandleType &sarray) - : FirstArray(farray), SecondArray(sarray) + Storage() + : FirstArray() + , SecondArray() { - } VTKM_CONT - PortalType GetPortal() { - return PortalType(this->FirstArray.GetPortalControl(), - this->SecondArray.GetPortalControl()); + Storage(const FirstHandleType& farray, const SecondHandleType& sarray) + : FirstArray(farray) + , SecondArray(sarray) + { } VTKM_CONT - PortalConstType GetPortalConst() const { + PortalType GetPortal() + { + return PortalType(this->FirstArray.GetPortalControl(), this->SecondArray.GetPortalControl()); + } + + VTKM_CONT + PortalConstType GetPortalConst() const + { return PortalConstType(this->FirstArray.GetPortalConstControl(), this->SecondArray.GetPortalConstControl()); } VTKM_CONT - vtkm::Id GetNumberOfValues() const { - VTKM_ASSERT(this->FirstArray.GetNumberOfValues() - == this->SecondArray.GetNumberOfValues()); + vtkm::Id GetNumberOfValues() const + { + VTKM_ASSERT(this->FirstArray.GetNumberOfValues() == this->SecondArray.GetNumberOfValues()); return this->FirstArray.GetNumberOfValues(); } VTKM_CONT - void Allocate(vtkm::Id numberOfValues) { + void Allocate(vtkm::Id numberOfValues) + { this->FirstArray.Allocate(numberOfValues); this->SecondArray.Allocate(numberOfValues); } VTKM_CONT - void Shrink(vtkm::Id numberOfValues) { + void Shrink(vtkm::Id numberOfValues) + { this->FirstArray.Shrink(numberOfValues); this->SecondArray.Shrink(numberOfValues); } VTKM_CONT - void ReleaseResources() { + void ReleaseResources() + { // This request is ignored since it is asking to release the resources // of the two zipped array, which may be used elsewhere. } VTKM_CONT - const FirstHandleType &GetFirstArray() const { - return this->FirstArray; - } + const FirstHandleType& GetFirstArray() const { return this->FirstArray; } VTKM_CONT - const SecondHandleType &GetSecondArray() const { - return this->SecondArray; - } + const SecondHandleType& GetSecondArray() const { return this->SecondArray; } private: FirstHandleType FirstArray; SecondHandleType SecondArray; }; -template -class ArrayTransfer< - T, StorageTagZip, Device> +template +class ArrayTransfer, Device> { - typedef StorageTagZip StorageTag; + typedef StorageTagZip StorageTag; typedef vtkm::cont::internal::Storage StorageType; public: @@ -219,40 +226,39 @@ public: typedef typename StorageType::PortalConstType PortalConstControl; typedef vtkm::exec::internal::ArrayPortalZip< - ValueType, - typename FirstHandleType::template ExecutionTypes::Portal, - typename SecondHandleType::template ExecutionTypes::Portal - > PortalExecution; + ValueType, typename FirstHandleType::template ExecutionTypes::Portal, + typename SecondHandleType::template ExecutionTypes::Portal> + PortalExecution; typedef vtkm::exec::internal::ArrayPortalZip< - ValueType, - typename FirstHandleType::template ExecutionTypes::PortalConst, - typename SecondHandleType::template ExecutionTypes::PortalConst - > PortalConstExecution; + ValueType, typename FirstHandleType::template ExecutionTypes::PortalConst, + typename SecondHandleType::template ExecutionTypes::PortalConst> + PortalConstExecution; VTKM_CONT - ArrayTransfer(StorageType *storage) - : FirstArray(storage->GetFirstArray()), - SecondArray(storage->GetSecondArray()) - { } - + ArrayTransfer(StorageType* storage) + : FirstArray(storage->GetFirstArray()) + , SecondArray(storage->GetSecondArray()) + { + } VTKM_CONT vtkm::Id GetNumberOfValues() const { - VTKM_ASSERT( this->FirstArray.GetNumberOfValues() - == this->SecondArray.GetNumberOfValues() ); + VTKM_ASSERT(this->FirstArray.GetNumberOfValues() == this->SecondArray.GetNumberOfValues()); return this->FirstArray.GetNumberOfValues(); } VTKM_CONT - PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) { + PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) + { return PortalConstExecution(this->FirstArray.PrepareForInput(Device()), this->SecondArray.PrepareForInput(Device())); } VTKM_CONT - PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData)) { + PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData)) + { return PortalExecution(this->FirstArray.PrepareForInPlace(Device()), this->SecondArray.PrepareForInPlace(Device())); } @@ -260,30 +266,32 @@ public: VTKM_CONT PortalExecution PrepareForOutput(vtkm::Id numberOfValues) { - return PortalExecution( this->FirstArray.PrepareForOutput(numberOfValues, Device()), - this->SecondArray.PrepareForOutput(numberOfValues, Device()) ); + return PortalExecution(this->FirstArray.PrepareForOutput(numberOfValues, Device()), + this->SecondArray.PrepareForOutput(numberOfValues, Device())); } VTKM_CONT - void RetrieveOutputData(StorageType *vtkmNotUsed(storage)) const { + void RetrieveOutputData(StorageType* vtkmNotUsed(storage)) const + { // Implementation of this method should be unnecessary. The internal // first and second array handles should automatically retrieve the // output data as necessary. } VTKM_CONT - void Shrink(vtkm::Id numberOfValues) { + void Shrink(vtkm::Id numberOfValues) + { this->FirstArray.Shrink(numberOfValues); this->SecondArray.Shrink(numberOfValues); } VTKM_CONT - void ReleaseResources() { + void ReleaseResources() + { this->FirstArray.ReleaseResourcesExecution(); this->SecondArray.ReleaseResourcesExecution(); } - private: FirstHandleType FirstArray; SecondHandleType SecondArray; @@ -294,10 +302,9 @@ private: /// array handle and makes a new handle that access the corresponding entries /// in these arrays as a pair. /// -template +template class ArrayHandleZip - : public internal::ArrayHandleZipTraits::Superclass + : public internal::ArrayHandleZipTraits::Superclass { // If the following line gives a compile error, then the FirstHandleType // template argument is not a valid ArrayHandle type. @@ -309,33 +316,29 @@ class ArrayHandleZip public: VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleZip, - (ArrayHandleZip), - (typename internal::ArrayHandleZipTraits< - FirstHandleType,SecondHandleType>::Superclass)); + ArrayHandleZip, (ArrayHandleZip), + (typename internal::ArrayHandleZipTraits::Superclass)); private: typedef vtkm::cont::internal::Storage StorageType; public: VTKM_CONT - ArrayHandleZip(const FirstHandleType &firstArray, - const SecondHandleType &secondArray) - : Superclass( StorageType( firstArray, secondArray ) ) { } + ArrayHandleZip(const FirstHandleType& firstArray, const SecondHandleType& secondArray) + : Superclass(StorageType(firstArray, secondArray)) + { + } }; /// A convenience function for creating an ArrayHandleZip. It takes the two /// arrays to be zipped together. /// -template -VTKM_CONT -vtkm::cont::ArrayHandleZip -make_ArrayHandleZip(const FirstHandleType &first, - const SecondHandleType &second) +template +VTKM_CONT vtkm::cont::ArrayHandleZip make_ArrayHandleZip( + const FirstHandleType& first, const SecondHandleType& second) { - return ArrayHandleZip(first, second); + return ArrayHandleZip(first, second); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayPortal.h b/vtkm/cont/ArrayPortal.h index 04e1cea91..374ae222e 100644 --- a/vtkm/cont/ArrayPortal.h +++ b/vtkm/cont/ArrayPortal.h @@ -22,8 +22,10 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ #ifdef VTKM_DOXYGEN_ONLY @@ -53,7 +55,7 @@ namespace cont { /// Although portals are defined in the execution environment, they are also /// used in the control environment for accessing data on the host. /// -template +template class ArrayPortal { public: @@ -77,11 +79,10 @@ public: /// this case the behavior is undefined. /// VTKM_CONT - void Set(vtkm::Id index, const ValueType &value) const; + void Set(vtkm::Id index, const ValueType& value) const; }; #endif // VTKM_DOXYGEN_ONLY - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayPortalToIterators.h b/vtkm/cont/ArrayPortalToIterators.h index c14cd1068..fdcccbc8d 100644 --- a/vtkm/cont/ArrayPortalToIterators.h +++ b/vtkm/cont/ArrayPortalToIterators.h @@ -23,8 +23,10 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// \brief Convert an \c ArrayPortal to STL iterators. /// @@ -39,7 +41,7 @@ namespace cont { /// ArrayPortalFromIterator has a specialization to return the original /// iterators. /// -template +template class ArrayPortalToIterators { public: @@ -48,28 +50,26 @@ public: /// VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalToIterators(const PortalType &portal) : Portal(portal) { } + ArrayPortalToIterators(const PortalType& portal) + : Portal(portal) + { + } /// The type of the iterator. /// - typedef vtkm::cont::internal::IteratorFromArrayPortal - IteratorType; + typedef vtkm::cont::internal::IteratorFromArrayPortal IteratorType; /// Returns an iterator pointing to the beginning of the ArrayPortal. /// VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - IteratorType GetBegin() const { - return vtkm::cont::internal::make_IteratorBegin(this->Portal); - } + IteratorType GetBegin() const { return vtkm::cont::internal::make_IteratorBegin(this->Portal); } /// Returns an iterator pointing to one past the end of the ArrayPortal. /// VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - IteratorType GetEnd() const { - return vtkm::cont::internal::make_IteratorEnd(this->Portal); - } + IteratorType GetEnd() const { return vtkm::cont::internal::make_IteratorEnd(this->Portal); } private: PortalType Portal; @@ -78,10 +78,9 @@ private: /// Convienience function for converting an ArrayPortal to a begin iterator. /// VTKM_SUPPRESS_EXEC_WARNINGS -template -VTKM_EXEC_CONT -typename vtkm::cont::ArrayPortalToIterators::IteratorType -ArrayPortalToIteratorBegin(const PortalType &portal) +template +VTKM_EXEC_CONT typename vtkm::cont::ArrayPortalToIterators::IteratorType +ArrayPortalToIteratorBegin(const PortalType& portal) { vtkm::cont::ArrayPortalToIterators iterators(portal); return iterators.GetBegin(); @@ -90,15 +89,13 @@ ArrayPortalToIteratorBegin(const PortalType &portal) /// Convienience function for converting an ArrayPortal to an end iterator. /// VTKM_SUPPRESS_EXEC_WARNINGS -template -VTKM_EXEC_CONT -typename vtkm::cont::ArrayPortalToIterators::IteratorType -ArrayPortalToIteratorEnd(const PortalType &portal) +template +VTKM_EXEC_CONT typename vtkm::cont::ArrayPortalToIterators::IteratorType +ArrayPortalToIteratorEnd(const PortalType& portal) { vtkm::cont::ArrayPortalToIterators iterators(portal); return iterators.GetEnd(); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayRangeCompute.cxx b/vtkm/cont/ArrayRangeCompute.cxx index d0058106c..c796181f0 100644 --- a/vtkm/cont/ArrayRangeCompute.cxx +++ b/vtkm/cont/ArrayRangeCompute.cxx @@ -20,26 +20,27 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -#define VTKM_ARRAY_RANGE_COMPUTE_IMPL_T(T, Storage) \ - VTKM_CONT \ - vtkm::cont::ArrayHandle \ - ArrayRangeCompute(const vtkm::cont::ArrayHandle &input, \ - vtkm::cont::RuntimeDeviceTracker tracker) \ - { \ - return detail::ArrayRangeComputeImpl(input,tracker); \ - } \ +#define VTKM_ARRAY_RANGE_COMPUTE_IMPL_T(T, Storage) \ + VTKM_CONT \ + vtkm::cont::ArrayHandle ArrayRangeCompute( \ + const vtkm::cont::ArrayHandle& input, vtkm::cont::RuntimeDeviceTracker tracker) \ + { \ + return detail::ArrayRangeComputeImpl(input, tracker); \ + } \ struct SwallowSemicolon -#define VTKM_ARRAY_RANGE_COMPUTE_IMPL_VEC(T, N, Storage) \ - VTKM_CONT \ - vtkm::cont::ArrayHandle \ - ArrayRangeCompute(const vtkm::cont::ArrayHandle, Storage> &input, \ - vtkm::cont::RuntimeDeviceTracker tracker) \ - { \ - return detail::ArrayRangeComputeImpl(input,tracker); \ - } \ +#define VTKM_ARRAY_RANGE_COMPUTE_IMPL_VEC(T, N, Storage) \ + VTKM_CONT \ + vtkm::cont::ArrayHandle ArrayRangeCompute( \ + const vtkm::cont::ArrayHandle, Storage>& input, \ + vtkm::cont::RuntimeDeviceTracker tracker) \ + { \ + return detail::ArrayRangeComputeImpl(input, tracker); \ + } \ struct SwallowSemicolon VTKM_ARRAY_RANGE_COMPUTE_IMPL_T(char, vtkm::cont::StorageTagBasic); @@ -73,30 +74,24 @@ VTKM_ARRAY_RANGE_COMPUTE_IMPL_VEC(vtkm::Float64, 4, vtkm::cont::StorageTagBasic) #undef VTKM_ARRAY_RANGE_COMPUTE_IMPL_T #undef VTKM_ARRAY_RANGE_COMPUTE_IMPL_VEC - // Special implementation for regular point coordinates, which are easy // to determine. VTKM_CONT -vtkm::cont::ArrayHandle -ArrayRangeCompute(const vtkm::cont::ArrayHandle< - vtkm::Vec, - vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag> - &array, - vtkm::cont::RuntimeDeviceTracker) +vtkm::cont::ArrayHandle ArrayRangeCompute( + const vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag>& array, + vtkm::cont::RuntimeDeviceTracker) { - vtkm::internal::ArrayPortalUniformPointCoordinates portal = - array.GetPortalConstControl(); + vtkm::internal::ArrayPortalUniformPointCoordinates portal = array.GetPortalConstControl(); // In this portal we know that the min value is the first entry and the // max value is the last entry. - vtkm::Vec minimum = portal.Get(0); - vtkm::Vec maximum = - portal.Get(portal.GetNumberOfValues()-1); + vtkm::Vec minimum = portal.Get(0); + vtkm::Vec maximum = portal.Get(portal.GetNumberOfValues() - 1); vtkm::cont::ArrayHandle rangeArray; rangeArray.Allocate(3); - vtkm::cont::ArrayHandle::PortalControl outPortal = - rangeArray.GetPortalControl(); + vtkm::cont::ArrayHandle::PortalControl outPortal = rangeArray.GetPortalControl(); outPortal.Set(0, vtkm::Range(minimum[0], maximum[0])); outPortal.Set(1, vtkm::Range(minimum[1], maximum[1])); outPortal.Set(2, vtkm::Range(minimum[2], maximum[2])); @@ -106,36 +101,27 @@ ArrayRangeCompute(const vtkm::cont::ArrayHandle< // Special implementation for composite vectors. VTKM_CONT -vtkm::cont::ArrayHandle -ArrayRangeCompute(const vtkm::cont::ArrayHandle< - vtkm::Vec, - typename vtkm::cont::ArrayHandleCompositeVector< - vtkm::Vec( - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle) - >::StorageTag - > &input, - vtkm::cont::RuntimeDeviceTracker tracker) +vtkm::cont::ArrayHandle ArrayRangeCompute( + const vtkm::cont::ArrayHandle< + vtkm::Vec, + typename vtkm::cont::ArrayHandleCompositeVector( + vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle)>::StorageTag>& input, + vtkm::cont::RuntimeDeviceTracker tracker) { - return detail::ArrayRangeComputeImpl(input,tracker); + return detail::ArrayRangeComputeImpl(input, tracker); } VTKM_CONT -vtkm::cont::ArrayHandle -ArrayRangeCompute(const vtkm::cont::ArrayHandle< - vtkm::Vec, - typename vtkm::cont::ArrayHandleCompositeVector< - vtkm::Vec( - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle) - >::StorageTag - > &input, - vtkm::cont::RuntimeDeviceTracker tracker) +vtkm::cont::ArrayHandle ArrayRangeCompute( + const vtkm::cont::ArrayHandle< + vtkm::Vec, + typename vtkm::cont::ArrayHandleCompositeVector( + vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle)>::StorageTag>& input, + vtkm::cont::RuntimeDeviceTracker tracker) { - return detail::ArrayRangeComputeImpl(input,tracker); + return detail::ArrayRangeComputeImpl(input, tracker); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/ArrayRangeCompute.h b/vtkm/cont/ArrayRangeCompute.h index 9f4e1e3c3..ea185e61c 100644 --- a/vtkm/cont/ArrayRangeCompute.h +++ b/vtkm/cont/ArrayRangeCompute.h @@ -28,8 +28,10 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// \brief Compute the range of the data in an array handle. /// @@ -44,28 +46,24 @@ namespace cont { /// one value in the returned array for every component of the input's value /// type. /// -template -VTKM_CONT -vtkm::cont::ArrayHandle -ArrayRangeCompute(const ArrayHandleType &input, - vtkm::cont::RuntimeDeviceTracker tracker = - vtkm::cont::GetGlobalRuntimeDeviceTracker()); +template +VTKM_CONT vtkm::cont::ArrayHandle ArrayRangeCompute( + const ArrayHandleType& input, + vtkm::cont::RuntimeDeviceTracker tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker()); // Precompiled versions of ArrayRangeCompute -#define VTKM_ARRAY_RANGE_COMPUTE_EXPORT_T(T, Storage) \ - VTKM_CONT_EXPORT \ - VTKM_CONT \ - vtkm::cont::ArrayHandle \ - ArrayRangeCompute(const vtkm::cont::ArrayHandle &input, \ - vtkm::cont::RuntimeDeviceTracker tracker = \ - vtkm::cont::GetGlobalRuntimeDeviceTracker()) -#define VTKM_ARRAY_RANGE_COMPUTE_EXPORT_VEC(T, N, Storage) \ - VTKM_CONT_EXPORT \ - VTKM_CONT \ - vtkm::cont::ArrayHandle \ - ArrayRangeCompute(const vtkm::cont::ArrayHandle, Storage> &input, \ - vtkm::cont::RuntimeDeviceTracker tracker = \ - vtkm::cont::GetGlobalRuntimeDeviceTracker()) +#define VTKM_ARRAY_RANGE_COMPUTE_EXPORT_T(T, Storage) \ + VTKM_CONT_EXPORT \ + VTKM_CONT \ + vtkm::cont::ArrayHandle ArrayRangeCompute( \ + const vtkm::cont::ArrayHandle& input, \ + vtkm::cont::RuntimeDeviceTracker tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker()) +#define VTKM_ARRAY_RANGE_COMPUTE_EXPORT_VEC(T, N, Storage) \ + VTKM_CONT_EXPORT \ + VTKM_CONT \ + vtkm::cont::ArrayHandle ArrayRangeCompute( \ + const vtkm::cont::ArrayHandle, Storage>& input, \ + vtkm::cont::RuntimeDeviceTracker tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker()) VTKM_ARRAY_RANGE_COMPUTE_EXPORT_T(char, vtkm::cont::StorageTagBasic); VTKM_ARRAY_RANGE_COMPUTE_EXPORT_T(vtkm::Int8, vtkm::cont::StorageTagBasic); @@ -95,9 +93,8 @@ VTKM_ARRAY_RANGE_COMPUTE_EXPORT_VEC(vtkm::UInt8, 4, vtkm::cont::StorageTagBasic) VTKM_ARRAY_RANGE_COMPUTE_EXPORT_VEC(vtkm::Float32, 4, vtkm::cont::StorageTagBasic); VTKM_ARRAY_RANGE_COMPUTE_EXPORT_VEC(vtkm::Float64, 4, vtkm::cont::StorageTagBasic); -VTKM_ARRAY_RANGE_COMPUTE_EXPORT_VEC( - vtkm::FloatDefault, 3, - vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag); +VTKM_ARRAY_RANGE_COMPUTE_EXPORT_VEC(vtkm::FloatDefault, 3, + vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag); #undef VTKM_ARRAY_RANGE_COMPUTE_EXPORT_T #undef VTKM_ARRAY_RANGE_COMPUTE_EXPORT_VEC @@ -105,48 +102,30 @@ VTKM_ARRAY_RANGE_COMPUTE_EXPORT_VEC( // Implementation of composite vectors VTKM_CONT_EXPORT VTKM_CONT -vtkm::cont::ArrayHandle -ArrayRangeCompute(const vtkm::cont::ArrayHandle< - vtkm::Vec, - typename vtkm::cont::ArrayHandleCompositeVector< - vtkm::Vec( - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle) - >::StorageTag - > &input, - vtkm::cont::RuntimeDeviceTracker tracker = - vtkm::cont::GetGlobalRuntimeDeviceTracker()); +vtkm::cont::ArrayHandle ArrayRangeCompute( + const vtkm::cont::ArrayHandle< + vtkm::Vec, + typename vtkm::cont::ArrayHandleCompositeVector( + vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle)>::StorageTag>& input, + vtkm::cont::RuntimeDeviceTracker tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker()); VTKM_CONT_EXPORT VTKM_CONT -vtkm::cont::ArrayHandle -ArrayRangeCompute(const vtkm::cont::ArrayHandle< - vtkm::Vec, - typename vtkm::cont::ArrayHandleCompositeVector< - vtkm::Vec( - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle) - >::StorageTag - > &input, - vtkm::cont::RuntimeDeviceTracker tracker = - vtkm::cont::GetGlobalRuntimeDeviceTracker()); +vtkm::cont::ArrayHandle ArrayRangeCompute( + const vtkm::cont::ArrayHandle< + vtkm::Vec, + typename vtkm::cont::ArrayHandleCompositeVector( + vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle)>::StorageTag>& input, + vtkm::cont::RuntimeDeviceTracker tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker()); // Implementation of cartesian products -template -VTKM_CONT -inline -vtkm::cont::ArrayHandle -ArrayRangeCompute(const vtkm::cont::ArrayHandle > &input, - vtkm::cont::RuntimeDeviceTracker tracker = - vtkm::cont::GetGlobalRuntimeDeviceTracker()) +template +VTKM_CONT inline vtkm::cont::ArrayHandle ArrayRangeCompute( + const vtkm::cont::ArrayHandle< + T, vtkm::cont::internal::StorageTagCartesianProduct>& input, + vtkm::cont::RuntimeDeviceTracker tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker()) { vtkm::cont::ArrayHandle result; result.Allocate(3); @@ -171,7 +150,6 @@ ArrayRangeCompute(const vtkm::cont::ArrayHandle #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace detail { +namespace detail +{ -template +template struct ArrayRangeComputeFunctor { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); @@ -42,13 +45,13 @@ struct ArrayRangeComputeFunctor vtkm::cont::ArrayHandle RangeArray; VTKM_CONT - ArrayRangeComputeFunctor(const ArrayHandleType &input) + ArrayRangeComputeFunctor(const ArrayHandleType& input) : InputArray(input) - { } + { + } - template - VTKM_CONT - bool operator()(Device) + template + VTKM_CONT bool operator()(Device) { VTKM_IS_DEVICE_ADAPTER_TAG(Device); @@ -69,31 +72,25 @@ struct ArrayRangeComputeFunctor return true; } - vtkm::Vec initial( - this->InputArray.GetPortalConstControl().Get(0)); + vtkm::Vec initial(this->InputArray.GetPortalConstControl().Get(0)); vtkm::Vec result = - Algorithm::Reduce(this->InputArray, - initial, - vtkm::MinAndMax()); + Algorithm::Reduce(this->InputArray, initial, vtkm::MinAndMax()); for (vtkm::IdComponent i = 0; i < NumberOfComponents; ++i) { this->RangeArray.GetPortalControl().Set( - i, vtkm::Range(VecTraits::GetComponent(result[0], i), - VecTraits::GetComponent(result[1], i))); + i, + vtkm::Range(VecTraits::GetComponent(result[0], i), VecTraits::GetComponent(result[1], i))); } return true; } }; - -template -inline -vtkm::cont::ArrayHandle -ArrayRangeComputeImpl(const ArrayHandleType &input, - vtkm::cont::RuntimeDeviceTracker tracker) +template +inline vtkm::cont::ArrayHandle ArrayRangeComputeImpl( + const ArrayHandleType& input, vtkm::cont::RuntimeDeviceTracker tracker) { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); @@ -101,8 +98,7 @@ ArrayRangeComputeImpl(const ArrayHandleType &input, if (!vtkm::cont::TryExecute(functor, tracker)) { - throw vtkm::cont::ErrorExecution( - "Failed to run ArrayRangeComputation on any device."); + throw vtkm::cont::ErrorExecution("Failed to run ArrayRangeComputation on any device."); } return functor.RangeArray; @@ -110,18 +106,14 @@ ArrayRangeComputeImpl(const ArrayHandleType &input, } // namespace detail -template -inline -vtkm::cont::ArrayHandle -ArrayRangeCompute(const ArrayHandleType &input, - vtkm::cont::RuntimeDeviceTracker tracker) +template +inline vtkm::cont::ArrayHandle ArrayRangeCompute( + const ArrayHandleType& input, vtkm::cont::RuntimeDeviceTracker tracker) { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); return detail::ArrayRangeComputeImpl(input, tracker); } - - } } // namespace vtkm::cont diff --git a/vtkm/cont/CellSet.cxx b/vtkm/cont/CellSet.cxx index 701326dc9..fbaa50b9c 100644 --- a/vtkm/cont/CellSet.cxx +++ b/vtkm/cont/CellSet.cxx @@ -20,14 +20,13 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ CellSet::~CellSet() { - } - - } } // namespace vtkm::cont diff --git a/vtkm/cont/CellSet.h b/vtkm/cont/CellSet.h index 8945ed5c9..d368c5ee8 100644 --- a/vtkm/cont/CellSet.h +++ b/vtkm/cont/CellSet.h @@ -29,25 +29,28 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ class VTKM_CONT_EXPORT CellSet { public: VTKM_CONT - CellSet(const std::string &name) + CellSet(const std::string& name) : Name(name) { } VTKM_CONT - CellSet(const vtkm::cont::CellSet &src) + CellSet(const vtkm::cont::CellSet& src) : Name(src.Name) - { } + { + } VTKM_CONT - CellSet &operator=(const vtkm::cont::CellSet &src) + CellSet& operator=(const vtkm::cont::CellSet& src) { this->Name = src.Name; return *this; @@ -55,10 +58,7 @@ public: virtual ~CellSet(); - std::string GetName() const - { - return this->Name; - } + std::string GetName() const { return this->Name; } virtual vtkm::Id GetNumberOfCells() const = 0; @@ -71,27 +71,26 @@ public: virtual void PrintSummary(std::ostream&) const = 0; protected: - std::string Name; + std::string Name; }; -namespace internal { +namespace internal +{ /// Checks to see if the given object is a cell set. It contains a /// typedef named \c type that is either std::true_type or /// std::false_type. Both of these have a typedef named value with the /// respective boolean value. /// -template +template struct CellSetCheck { using type = typename std::is_base_of; }; -#define VTKM_IS_CELL_SET(T) \ - VTKM_STATIC_ASSERT(::vtkm::cont::internal::CellSetCheck::type::value) +#define VTKM_IS_CELL_SET(T) VTKM_STATIC_ASSERT(::vtkm::cont::internal::CellSetCheck::type::value) } // namespace internal - } } // namespace vtkm::cont diff --git a/vtkm/cont/CellSetExplicit.h b/vtkm/cont/CellSetExplicit.h index fdb3e2c4d..d9ab7d9ad 100644 --- a/vtkm/cont/CellSetExplicit.h +++ b/vtkm/cont/CellSetExplicit.h @@ -35,21 +35,22 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace detail { +namespace detail +{ -template +template struct CellSetExplicitConnectivityChooser { - typedef vtkm::cont::internal::ConnectivityExplicitInternals<> - ConnectivityType; + typedef vtkm::cont::internal::ConnectivityExplicitInternals<> ConnectivityType; }; } // namespace detail - #ifndef VTKM_DEFAULT_SHAPE_STORAGE_TAG #define VTKM_DEFAULT_SHAPE_STORAGE_TAG VTKM_DEFAULT_STORAGE_TAG #endif @@ -66,39 +67,34 @@ struct CellSetExplicitConnectivityChooser #define VTKM_DEFAULT_OFFSETS_STORAGE_TAG VTKM_DEFAULT_STORAGE_TAG #endif -template +template class VTKM_ALWAYS_EXPORT CellSetExplicit : public CellSet { - typedef CellSetExplicit< ShapeStorageTag, - NumIndicesStorageTag, - ConnectivityStorageTag, - OffsetsStorageTag > Thisclass; + typedef CellSetExplicit + Thisclass; - template + template struct ConnectivityChooser { typedef typename detail::CellSetExplicitConnectivityChooser< - Thisclass, - FromTopology, - ToTopology>::ConnectivityType ConnectivityType; + Thisclass, FromTopology, ToTopology>::ConnectivityType ConnectivityType; typedef typename ConnectivityType::ShapeArrayType ShapeArrayType; typedef typename ConnectivityType::NumIndicesArrayType NumIndicesArrayType; typedef typename ConnectivityType::ConnectivityArrayType ConnectivityArrayType; typedef typename ConnectivityType::IndexOffsetArrayType IndexOffsetArrayType; - }; - public: typedef vtkm::Id SchedulingRangeType; //point to cell is used when iterating cells and asking for point properties - typedef ConnectivityChooser< vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell > PointToCellConnectivityType; + typedef ConnectivityChooser + PointToCellConnectivityType; typedef typename PointToCellConnectivityType::ShapeArrayType ShapeArrayType; typedef typename PointToCellConnectivityType::NumIndicesArrayType NumIndicesArrayType; @@ -106,26 +102,27 @@ public: typedef typename PointToCellConnectivityType::IndexOffsetArrayType IndexOffsetArrayType; VTKM_CONT - CellSetExplicit(const std::string &name = std::string()) - : CellSet(name), - ConnectivityAdded(-1), - NumberOfCellsAdded(-1), - NumberOfPoints(0) + CellSetExplicit(const std::string& name = std::string()) + : CellSet(name) + , ConnectivityAdded(-1) + , NumberOfCellsAdded(-1) + , NumberOfPoints(0) { } VTKM_CONT - CellSetExplicit(const Thisclass &src) - : CellSet(src), - PointToCell(src.PointToCell), - CellToPoint(src.CellToPoint), - ConnectivityAdded(src.ConnectivityAdded), - NumberOfCellsAdded(src.NumberOfCellsAdded), - NumberOfPoints(src.NumberOfPoints) - { } + CellSetExplicit(const Thisclass& src) + : CellSet(src) + , PointToCell(src.PointToCell) + , CellToPoint(src.CellToPoint) + , ConnectivityAdded(src.ConnectivityAdded) + , NumberOfCellsAdded(src.NumberOfCellsAdded) + , NumberOfPoints(src.NumberOfPoints) + { + } VTKM_CONT - Thisclass &operator=(const Thisclass &src) + Thisclass& operator=(const Thisclass& src) { this->CellSet::operator=(src); this->PointToCell = src.PointToCell; @@ -136,17 +133,14 @@ public: return *this; } - virtual ~CellSetExplicit() { } + virtual ~CellSetExplicit() {} vtkm::Id GetNumberOfCells() const VTKM_OVERRIDE { return this->PointToCell.GetNumberOfElements(); } - vtkm::Id GetNumberOfPoints() const VTKM_OVERRIDE - { - return this->NumberOfPoints; - } + vtkm::Id GetNumberOfPoints() const VTKM_OVERRIDE { return this->NumberOfPoints; } vtkm::Id GetNumberOfFaces() const VTKM_OVERRIDE { return -1; } @@ -177,16 +171,13 @@ public: } template - VTKM_CONT - void GetIndices(vtkm::Id index, - vtkm::Vec &ids) const + VTKM_CONT void GetIndices(vtkm::Id index, vtkm::Vec& ids) const { this->PointToCell.BuildIndexOffsets(VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); vtkm::IdComponent numIndices = this->GetNumberOfPointsInCell(index); - vtkm::Id start = - this->PointToCell.IndexOffsets.GetPortalConstControl().Get(index); - for (vtkm::IdComponent i=0; iPointToCell.Connectivity.GetPortalConstControl().Get(start+i); + vtkm::Id start = this->PointToCell.IndexOffsets.GetPortalConstControl().Get(index); + for (vtkm::IdComponent i = 0; i < numIndices && i < ItemTupleLength; i++) + ids[i] = this->PointToCell.Connectivity.GetPortalConstControl().Get(start + i); } /// First method to add cells -- one at a time. @@ -202,43 +193,36 @@ public: } template - VTKM_CONT - void AddCell(vtkm::UInt8 cellType, - vtkm::IdComponent numVertices, - const IdVecType &ids) + VTKM_CONT void AddCell(vtkm::UInt8 cellType, vtkm::IdComponent numVertices, const IdVecType& ids) { using Traits = vtkm::VecTraits; - VTKM_STATIC_ASSERT_MSG( - (std::is_same::value), - "CellSetSingleType::AddCell requires vtkm::Id for indices."); + VTKM_STATIC_ASSERT_MSG((std::is_same::value), + "CellSetSingleType::AddCell requires vtkm::Id for indices."); if (Traits::GetNumberOfComponents(ids) < numVertices) { - throw vtkm::cont::ErrorBadValue( - "Not enough indices given to CellSetSingleType::AddCell."); + throw vtkm::cont::ErrorBadValue("Not enough indices given to CellSetSingleType::AddCell."); } if (this->NumberOfCellsAdded >= this->PointToCell.Shapes.GetNumberOfValues()) { - throw vtkm::cont::ErrorBadValue( - "Added more cells then expected."); + throw vtkm::cont::ErrorBadValue("Added more cells then expected."); } - if (this->ConnectivityAdded+numVertices > - this->PointToCell.Connectivity.GetNumberOfValues()) + if (this->ConnectivityAdded + numVertices > this->PointToCell.Connectivity.GetNumberOfValues()) { throw vtkm::cont::ErrorBadValue( - "Connectivity increased passed estimated maximum connectivity."); + "Connectivity increased passed estimated maximum connectivity."); } this->PointToCell.Shapes.GetPortalControl().Set(this->NumberOfCellsAdded, cellType); this->PointToCell.NumIndices.GetPortalControl().Set(this->NumberOfCellsAdded, numVertices); - for (vtkm::IdComponent iVec=0; iVec < numVertices; ++iVec) + for (vtkm::IdComponent iVec = 0; iVec < numVertices; ++iVec) { - this->PointToCell.Connectivity.GetPortalControl().Set( - this->ConnectivityAdded+iVec, Traits::GetComponent(ids,iVec)); + this->PointToCell.Connectivity.GetPortalControl().Set(this->ConnectivityAdded + iVec, + Traits::GetComponent(ids, iVec)); } - this->PointToCell.IndexOffsets.GetPortalControl().Set( - this->NumberOfCellsAdded, this->ConnectivityAdded); + this->PointToCell.IndexOffsets.GetPortalControl().Set(this->NumberOfCellsAdded, + this->ConnectivityAdded); this->NumberOfCellsAdded++; this->ConnectivityAdded += numVertices; } @@ -253,8 +237,7 @@ public: if (this->NumberOfCellsAdded != this->GetNumberOfCells()) { - throw vtkm::cont::ErrorBadValue( - "Did not add as many cells as expected."); + throw vtkm::cont::ErrorBadValue("Did not add as many cells as expected."); } this->NumberOfCellsAdded = -1; @@ -266,11 +249,11 @@ public: /// the way you can fill the memory from another system without copying VTKM_CONT void Fill(vtkm::Id numPoints, - const vtkm::cont::ArrayHandle &cellTypes, - const vtkm::cont::ArrayHandle &numIndices, - const vtkm::cont::ArrayHandle &connectivity, - const vtkm::cont::ArrayHandle &offsets - = vtkm::cont::ArrayHandle() ) + const vtkm::cont::ArrayHandle& cellTypes, + const vtkm::cont::ArrayHandle& numIndices, + const vtkm::cont::ArrayHandle& connectivity, + const vtkm::cont::ArrayHandle& offsets = + vtkm::cont::ArrayHandle()) { this->NumberOfPoints = numPoints; this->PointToCell.Shapes = cellTypes; @@ -279,7 +262,7 @@ public: this->PointToCell.ElementsValid = true; - if(offsets.GetNumberOfValues() == cellTypes.GetNumberOfValues()) + if (offsets.GetNumberOfValues() == cellTypes.GetNumberOfValues()) { this->PointToCell.IndexOffsets = offsets; this->PointToCell.IndexOffsetsValid = true; @@ -289,9 +272,8 @@ public: this->PointToCell.IndexOffsetsValid = false; if (offsets.GetNumberOfValues() != 0) { - throw vtkm::cont::ErrorBadValue( - "Explicit cell offsets array unexpected size. " - "Use an empty array to automatically generate."); + throw vtkm::cont::ErrorBadValue("Explicit cell offsets array unexpected size. " + "Use an empty array to automatically generate."); } } } @@ -303,63 +285,57 @@ public: VTKM_IS_TOPOLOGY_ELEMENT_TAG(FromTopology); VTKM_IS_TOPOLOGY_ELEMENT_TAG(ToTopology); - typedef ConnectivityChooser ConnectivityTypes; + typedef ConnectivityChooser ConnectivityTypes; - typedef typename ConnectivityTypes::ShapeArrayType::template ExecutionTypes::PortalConst ShapePortalType; - typedef typename ConnectivityTypes::NumIndicesArrayType::template ExecutionTypes::PortalConst IndicePortalType; - typedef typename ConnectivityTypes::ConnectivityArrayType::template ExecutionTypes::PortalConst ConnectivityPortalType; - typedef typename ConnectivityTypes::IndexOffsetArrayType::template ExecutionTypes::PortalConst IndexOffsetPortalType; + typedef typename ConnectivityTypes::ShapeArrayType::template ExecutionTypes< + DeviceAdapter>::PortalConst ShapePortalType; + typedef typename ConnectivityTypes::NumIndicesArrayType::template ExecutionTypes< + DeviceAdapter>::PortalConst IndicePortalType; + typedef typename ConnectivityTypes::ConnectivityArrayType::template ExecutionTypes< + DeviceAdapter>::PortalConst ConnectivityPortalType; + typedef typename ConnectivityTypes::IndexOffsetArrayType::template ExecutionTypes< + DeviceAdapter>::PortalConst IndexOffsetPortalType; - typedef vtkm::exec::ConnectivityExplicit ExecObjectType; + typedef vtkm::exec::ConnectivityExplicit + ExecObjectType; }; - template - typename ExecutionTypes::ExecObjectType - PrepareForInput(Device, FromTopology, ToTopology) const + template + typename ExecutionTypes::ExecObjectType PrepareForInput( + Device, FromTopology, ToTopology) const { this->BuildConnectivity(Device(), FromTopology(), ToTopology()); - const typename - ConnectivityChooser::ConnectivityType - &connectivity = this->GetConnectivity(FromTopology(), ToTopology()); + const typename ConnectivityChooser::ConnectivityType& connectivity = + this->GetConnectivity(FromTopology(), ToTopology()); VTKM_ASSERT(connectivity.ElementsValid); - typedef typename - ExecutionTypes::ExecObjectType - ExecObjType; + typedef typename ExecutionTypes::ExecObjectType ExecObjType; return ExecObjType(connectivity.Shapes.PrepareForInput(Device()), connectivity.NumIndices.PrepareForInput(Device()), connectivity.Connectivity.PrepareForInput(Device()), connectivity.IndexOffsets.PrepareForInput(Device())); } - template - VTKM_CONT - void BuildConnectivity(Device, FromTopology, ToTopology) const + template + VTKM_CONT void BuildConnectivity(Device, FromTopology, ToTopology) const { - typedef CellSetExplicit CSE; + typedef CellSetExplicit + CSE; - CSE *self = const_cast(this); + CSE* self = const_cast(this); self->CreateConnectivity(Device(), FromTopology(), ToTopology()); - self->GetConnectivity(FromTopology(), ToTopology()). - BuildIndexOffsets(Device()); + self->GetConnectivity(FromTopology(), ToTopology()).BuildIndexOffsets(Device()); } - template - VTKM_CONT - void CreateConnectivity(Device, - vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell) + template + VTKM_CONT void CreateConnectivity(Device, vtkm::TopologyElementTagPoint, + vtkm::TopologyElementTagCell) { // nothing to do } @@ -368,22 +344,17 @@ public: class ExpandIndices : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn<> cellIndex, - FieldIn<> offset, - FieldIn<> numIndices, + typedef void ControlSignature(FieldIn<> cellIndex, FieldIn<> offset, FieldIn<> numIndices, WholeArrayOut<> cellIndices); - typedef void ExecutionSignature(_1,_2,_3,_4); + typedef void ExecutionSignature(_1, _2, _3, _4); typedef _1 InputDomain; VTKM_CONT ExpandIndices() {} - template - VTKM_EXEC - void operator()(const vtkm::Id &cellIndex, - const vtkm::Id &offset, - const vtkm::Id &numIndices, - const PortalType &cellIndices) const + template + VTKM_EXEC void operator()(const vtkm::Id& cellIndex, const vtkm::Id& offset, + const vtkm::Id& numIndices, const PortalType& cellIndices) const { VTKM_ASSERT(cellIndices.GetNumberOfValues() >= offset + numIndices); vtkm::Id startIndex = offset; @@ -394,11 +365,9 @@ public: } }; - template - VTKM_CONT - void CreateConnectivity(Device, - vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint) + template + VTKM_CONT void CreateConnectivity(Device, vtkm::TopologyElementTagCell, + vtkm::TopologyElementTagPoint) { // PointToCell connectivity array (point indices) will be // transformed into the CellToPoint numIndices array using reduction @@ -428,15 +397,13 @@ public: this->PointToCell.BuildIndexOffsets(Device()); vtkm::worklet::DispatcherMapField expandDispatcher; - expandDispatcher.Invoke(index, - this->PointToCell.IndexOffsets, - this->PointToCell.NumIndices, + expandDispatcher.Invoke(index, this->PointToCell.IndexOffsets, this->PointToCell.NumIndices, this->CellToPoint.Connectivity); // SortByKey where key is PointToCell connectivity and value is the expanded cellIndex Algorithm::SortByKey(pointIndices, this->CellToPoint.Connectivity); - if(this->GetNumberOfPoints() <= 0) + if (this->GetNumberOfPoints() <= 0) { this->NumberOfPoints = pointIndices.GetPortalControl().Get(connectivityLength - 1) + 1; } @@ -449,9 +416,7 @@ public: uniquePoints.Allocate(numberOfPoints); numIndices.Allocate(numberOfPoints); - Algorithm::ReduceByKey(pointIndices, numArray, - uniquePoints, numIndices, - vtkm::Add()); + Algorithm::ReduceByKey(pointIndices, numArray, uniquePoints, numIndices, vtkm::Add()); // Set the CellToPoint information this->CellToPoint.Shapes = vtkm::cont::make_ArrayHandleConstant( @@ -462,7 +427,7 @@ public: this->CellToPoint.IndexOffsetsValid = false; } - void PrintSummary(std::ostream &out) const VTKM_OVERRIDE + void PrintSummary(std::ostream& out) const VTKM_OVERRIDE { out << " ExplicitCellSet: " << this->Name << std::endl; out << " PointToCell: " << std::endl; @@ -471,73 +436,63 @@ public: this->CellToPoint.PrintSummary(out); } - template - VTKM_CONT - const typename ConnectivityChooser::ShapeArrayType & - GetShapesArray(FromTopology,ToTopology) const + template + VTKM_CONT const typename ConnectivityChooser::ShapeArrayType& + GetShapesArray(FromTopology, ToTopology) const { return this->GetConnectivity(FromTopology(), ToTopology()).Shapes; } - template - VTKM_CONT - const typename ConnectivityChooser::NumIndicesArrayType & - GetNumIndicesArray(FromTopology,ToTopology) const + template + VTKM_CONT const typename ConnectivityChooser::NumIndicesArrayType& + GetNumIndicesArray(FromTopology, ToTopology) const { return this->GetConnectivity(FromTopology(), ToTopology()).NumIndices; } - template - VTKM_CONT - const typename ConnectivityChooser::ConnectivityArrayType & - GetConnectivityArray(FromTopology,ToTopology) const + template + VTKM_CONT const typename ConnectivityChooser::ConnectivityArrayType& + GetConnectivityArray(FromTopology, ToTopology) const { return this->GetConnectivity(FromTopology(), ToTopology()).Connectivity; } - template - VTKM_CONT - const typename ConnectivityChooser::IndexOffsetArrayType & - GetIndexOffsetArray(FromTopology,ToTopology) const + template + VTKM_CONT const typename ConnectivityChooser::IndexOffsetArrayType& + GetIndexOffsetArray(FromTopology, ToTopology) const { return this->GetConnectivity(FromTopology(), ToTopology()).IndexOffsets; } protected: - typename ConnectivityChooser< - vtkm::TopologyElementTagPoint,vtkm::TopologyElementTagCell>:: - ConnectivityType PointToCell; + typename ConnectivityChooser::ConnectivityType PointToCell; // TODO: Actually implement CellToPoint and other connectivity. (That is, // derive the connectivity from PointToCell. - typename ConnectivityChooser< - vtkm::TopologyElementTagCell,vtkm::TopologyElementTagPoint>:: - ConnectivityType CellToPoint; -private: + typename ConnectivityChooser::ConnectivityType CellToPoint; - // A set of overloaded methods to get the connectivity from a pair of - // topology element types. -#define VTKM_GET_CONNECTIVITY_METHOD(FromTopology,ToTopology,Ivar) \ - VTKM_CONT \ - const typename ConnectivityChooser< \ - FromTopology,ToTopology>::ConnectivityType & \ - GetConnectivity(FromTopology, ToTopology) const \ - { \ - return this->Ivar; \ - } \ - VTKM_CONT \ - typename ConnectivityChooser< \ - FromTopology,ToTopology>::ConnectivityType & \ - GetConnectivity(FromTopology, ToTopology) \ - { \ - return this->Ivar; \ +private: +// A set of overloaded methods to get the connectivity from a pair of +// topology element types. +#define VTKM_GET_CONNECTIVITY_METHOD(FromTopology, ToTopology, Ivar) \ + VTKM_CONT \ + const typename ConnectivityChooser::ConnectivityType& GetConnectivity( \ + FromTopology, ToTopology) const \ + { \ + return this->Ivar; \ + } \ + VTKM_CONT \ + typename ConnectivityChooser::ConnectivityType& GetConnectivity( \ + FromTopology, ToTopology) \ + { \ + return this->Ivar; \ } - VTKM_GET_CONNECTIVITY_METHOD(vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell, + VTKM_GET_CONNECTIVITY_METHOD(vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, PointToCell) - VTKM_GET_CONNECTIVITY_METHOD(vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint, + VTKM_GET_CONNECTIVITY_METHOD(vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint, CellToPoint) #undef VTKM_GET_CONNECTIVITY_METHOD @@ -551,33 +506,31 @@ protected: vtkm::Id NumberOfPoints; }; -namespace detail { - -template -struct CellSetExplicitConnectivityChooser< - vtkm::cont::CellSetExplicit, - vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell> +namespace detail { - typedef vtkm::cont::internal::ConnectivityExplicitInternals< - Storage1,Storage2,Storage3,Storage4> ConnectivityType; + +template +struct CellSetExplicitConnectivityChooser< + vtkm::cont::CellSetExplicit, + vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell> +{ + typedef vtkm::cont::internal::ConnectivityExplicitInternals + ConnectivityType; }; - -template -struct CellSetExplicitConnectivityChooser< - CellSetType, - vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint> +template +struct CellSetExplicitConnectivityChooser { //only specify the shape type as it will be constant as everything //is a vertex. otherwise use the defaults. typedef vtkm::cont::internal::ConnectivityExplicitInternals< - typename ArrayHandleConstant::StorageTag > ConnectivityType; + typename ArrayHandleConstant::StorageTag> + ConnectivityType; }; } // namespace detail - } } // namespace vtkm::cont diff --git a/vtkm/cont/CellSetListTag.h b/vtkm/cont/CellSetListTag.h index 87d5cd10c..af2711d9b 100644 --- a/vtkm/cont/CellSetListTag.h +++ b/vtkm/cont/CellSetListTag.h @@ -30,54 +30,55 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ struct VTKM_ALWAYS_EXPORT CellSetListTagStructured1D - : vtkm::ListTagBase > { }; + : vtkm::ListTagBase> +{ +}; struct VTKM_ALWAYS_EXPORT CellSetListTagStructured2D - : vtkm::ListTagBase > { }; + : vtkm::ListTagBase> +{ +}; struct VTKM_ALWAYS_EXPORT CellSetListTagStructured3D - : vtkm::ListTagBase > { }; + : vtkm::ListTagBase> +{ +}; -template +template struct VTKM_ALWAYS_EXPORT CellSetListTagExplicit - : vtkm::ListTagBase< - vtkm::cont::CellSetExplicit< - ShapeStorageTag, - NumIndicesStorageTag, - ConnectivityStorageTag, - OffsetsStorageTag> > { }; - -struct VTKM_ALWAYS_EXPORT CellSetListTagExplicitDefault - : CellSetListTagExplicit<> { }; + : vtkm::ListTagBase> +{ +}; +struct VTKM_ALWAYS_EXPORT CellSetListTagExplicitDefault : CellSetListTagExplicit<> +{ +}; struct VTKM_ALWAYS_EXPORT CellSetListTagCommon - : vtkm::ListTagBase< - vtkm::cont::CellSetStructured<2>, - vtkm::cont::CellSetStructured<3>, - vtkm::cont::CellSetExplicit<>, - vtkm::cont::CellSetSingleType<> - > { }; + : vtkm::ListTagBase, vtkm::cont::CellSetStructured<3>, + vtkm::cont::CellSetExplicit<>, vtkm::cont::CellSetSingleType<>> +{ +}; struct VTKM_ALWAYS_EXPORT CellSetListTagStructured - : vtkm::ListTagBase< - vtkm::cont::CellSetStructured<2>, - vtkm::cont::CellSetStructured<3> - > { }; + : vtkm::ListTagBase, vtkm::cont::CellSetStructured<3>> +{ +}; struct VTKM_ALWAYS_EXPORT CellSetListTagUnstructured - : vtkm::ListTagBase< - vtkm::cont::CellSetExplicit<>, - vtkm::cont::CellSetSingleType<> - > { }; - + : vtkm::ListTagBase, vtkm::cont::CellSetSingleType<>> +{ +}; } } // namespace vtkm::cont diff --git a/vtkm/cont/CellSetPermutation.h b/vtkm/cont/CellSetPermutation.h index 0a9634e11..4e52970ae 100644 --- a/vtkm/cont/CellSetPermutation.h +++ b/vtkm/cont/CellSetPermutation.h @@ -27,46 +27,43 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -template< typename OriginalCellSet, typename ValidCellArrayHandleType> class CellSetPermutation; +template +class CellSetPermutation; -namespace internal { +namespace internal +{ -template< typename OriginalCellSet, typename PermutationArrayHandleType > +template class CellSetGeneralPermutation : public CellSet { public: VTKM_CONT CellSetGeneralPermutation(const PermutationArrayHandleType& validCellIds, - const OriginalCellSet& cellset, - const std::string &name) - : CellSet(name), - ValidCellIds(validCellIds), - FullCellSet(cellset) + const OriginalCellSet& cellset, const std::string& name) + : CellSet(name) + , ValidCellIds(validCellIds) + , FullCellSet(cellset) { } VTKM_CONT - CellSetGeneralPermutation(const std::string &name) - : CellSet(name), - ValidCellIds(), - FullCellSet() + CellSetGeneralPermutation(const std::string& name) + : CellSet(name) + , ValidCellIds() + , FullCellSet() { } VTKM_CONT - vtkm::Id GetNumberOfCells() const VTKM_OVERRIDE - { - return this->ValidCellIds.GetNumberOfValues(); - } + vtkm::Id GetNumberOfCells() const VTKM_OVERRIDE { return this->ValidCellIds.GetNumberOfValues(); } VTKM_CONT - vtkm::Id GetNumberOfPoints() const VTKM_OVERRIDE - { - return this->FullCellSet.GetNumberOfPoints(); - } + vtkm::Id GetNumberOfPoints() const VTKM_OVERRIDE { return this->FullCellSet.GetNumberOfPoints(); } vtkm::Id GetNumberOfFaces() const VTKM_OVERRIDE { return -1; } @@ -74,50 +71,48 @@ public: //This is the way you can fill the memory from another system without copying VTKM_CONT - void Fill(const PermutationArrayHandleType &validCellIds, - const OriginalCellSet& cellset) + void Fill(const PermutationArrayHandleType& validCellIds, const OriginalCellSet& cellset) { ValidCellIds = validCellIds; FullCellSet = cellset; } - template - VTKM_CONT - vtkm::Id GetSchedulingRange(TopologyElement) const { + template + VTKM_CONT vtkm::Id GetSchedulingRange(TopologyElement) const + { VTKM_IS_TOPOLOGY_ELEMENT_TAG(TopologyElement); return this->ValidCellIds.GetNumberOfValues(); } - template - struct ExecutionTypes { + template + struct ExecutionTypes + { VTKM_IS_DEVICE_ADAPTER_TAG(Device); VTKM_IS_TOPOLOGY_ELEMENT_TAG(FromTopology); VTKM_IS_TOPOLOGY_ELEMENT_TAG(ToTopology); - typedef typename PermutationArrayHandleType::template ExecutionTypes::PortalConst ExecPortalType; + typedef typename PermutationArrayHandleType::template ExecutionTypes::PortalConst + ExecPortalType; typedef typename OriginalCellSet::template ExecutionTypes< - Device, - FromTopology, - ToTopology>::ExecObjectType OrigExecObjectType; + Device, FromTopology, ToTopology>::ExecObjectType OrigExecObjectType; - typedef vtkm::exec::ConnectivityPermuted< ExecPortalType, OrigExecObjectType> ExecObjectType; + typedef vtkm::exec::ConnectivityPermuted ExecObjectType; }; - template - typename ExecutionTypes::ExecObjectType - PrepareForInput(Device d, FromTopology f, ToTopology t) const + template + typename ExecutionTypes::ExecObjectType PrepareForInput( + Device d, FromTopology f, ToTopology t) const { - typedef typename - ExecutionTypes::ExecObjectType - ConnectivityType; + typedef + typename ExecutionTypes::ExecObjectType ConnectivityType; return ConnectivityType(this->ValidCellIds.PrepareForInput(d), - this->FullCellSet.PrepareForInput(d,f,t) ); + this->FullCellSet.PrepareForInput(d, f, t)); } - void PrintSummary(std::ostream &out) const VTKM_OVERRIDE + void PrintSummary(std::ostream& out) const VTKM_OVERRIDE { - out << " CellSetGeneralPermutation of: "<< std::endl; + out << " CellSetGeneralPermutation of: " << std::endl; this->FullCellSet.PrintSummary(out); } @@ -132,67 +127,64 @@ private: #define VTKM_DEFAULT_CELLSET_PERMUTATION_STORAGE_TAG VTKM_DEFAULT_STORAGE_TAG #endif -template< typename OriginalCellSet, - typename PermutationArrayHandleType = vtkm::cont::ArrayHandle< vtkm::Id, VTKM_DEFAULT_CELLSET_PERMUTATION_STORAGE_TAG > > -class CellSetPermutation : public vtkm::cont::internal::CellSetGeneralPermutation +template > +class CellSetPermutation + : public vtkm::cont::internal::CellSetGeneralPermutation { VTKM_IS_CELL_SET(OriginalCellSet); VTKM_IS_ARRAY_HANDLE(PermutationArrayHandleType); - typedef typename vtkm::cont::internal::CellSetGeneralPermutation< - OriginalCellSet, PermutationArrayHandleType> ParentType; -public: + typedef typename vtkm::cont::internal::CellSetGeneralPermutation + ParentType; +public: VTKM_CONT - CellSetPermutation(const PermutationArrayHandleType& validCellIds, - const OriginalCellSet& cellset, - const std::string &name = std::string()) + CellSetPermutation(const PermutationArrayHandleType& validCellIds, const OriginalCellSet& cellset, + const std::string& name = std::string()) : ParentType(validCellIds, cellset, name) { } VTKM_CONT - CellSetPermutation(const std::string &name = std::string()) - : ParentType(name) + CellSetPermutation(const std::string& name = std::string()) + : ParentType(name) { } VTKM_CONT - CellSetPermutation& - operator=(const CellSetPermutation &src) + CellSetPermutation& operator=( + const CellSetPermutation& src) { ParentType::operator=(src); return *this; } - }; -template -vtkm::cont::CellSetPermutation -make_CellSetPermutation(const PermutationArrayHandleType &cellIndexMap, - const OriginalCellSet &cellSet, - const std::string &name) +template +vtkm::cont::CellSetPermutation make_CellSetPermutation( + const PermutationArrayHandleType& cellIndexMap, const OriginalCellSet& cellSet, + const std::string& name) { VTKM_IS_CELL_SET(OriginalCellSet); VTKM_IS_ARRAY_HANDLE(PermutationArrayHandleType); - return vtkm::cont::CellSetPermutation< - OriginalCellSet,PermutationArrayHandleType>( - cellIndexMap, cellSet, name); + return vtkm::cont::CellSetPermutation(cellIndexMap, + cellSet, name); } -template -vtkm::cont::CellSetPermutation -make_CellSetPermutation(const PermutationArrayHandleType &cellIndexMap, - const OriginalCellSet &cellSet) +template +vtkm::cont::CellSetPermutation make_CellSetPermutation( + const PermutationArrayHandleType& cellIndexMap, const OriginalCellSet& cellSet) { VTKM_IS_CELL_SET(OriginalCellSet); VTKM_IS_ARRAY_HANDLE(PermutationArrayHandleType); - return vtkm::cont::make_CellSetPermutation( - cellIndexMap, cellSet, cellSet.GetName()); + return vtkm::cont::make_CellSetPermutation(cellIndexMap, cellSet, cellSet.GetName()); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/CellSetSingleType.h b/vtkm/cont/CellSetSingleType.h index 866070e5c..4b553e133 100644 --- a/vtkm/cont/CellSetSingleType.h +++ b/vtkm/cont/CellSetSingleType.h @@ -30,49 +30,51 @@ #include #include -namespace vtkm { -namespace cont { - +namespace vtkm +{ +namespace cont +{ //Only works with fixed sized cell sets -template< typename ConnectivityStorageTag = VTKM_DEFAULT_CONNECTIVITY_STORAGE_TAG > -class VTKM_ALWAYS_EXPORT CellSetSingleType : - public vtkm::cont::CellSetExplicit< - typename vtkm::cont::ArrayHandleConstant::StorageTag, //ShapeStorageTag - typename vtkm::cont::ArrayHandleConstant::StorageTag, //NumIndicesStorageTag - ConnectivityStorageTag, - typename vtkm::cont::ArrayHandleCounting::StorageTag //IndexOffsetStorageTag - > +template +class VTKM_ALWAYS_EXPORT CellSetSingleType + : public vtkm::cont::CellSetExplicit< + typename vtkm::cont::ArrayHandleConstant::StorageTag, //ShapeStorageTag + typename vtkm::cont::ArrayHandleConstant< + vtkm::IdComponent>::StorageTag, //NumIndicesStorageTag + ConnectivityStorageTag, + typename vtkm::cont::ArrayHandleCounting::StorageTag //IndexOffsetStorageTag + > { typedef vtkm::cont::CellSetSingleType Thisclass; typedef vtkm::cont::CellSetExplicit< - typename vtkm::cont::ArrayHandleConstant::StorageTag, - typename vtkm::cont::ArrayHandleConstant::StorageTag, - ConnectivityStorageTag, - typename vtkm::cont::ArrayHandleCounting::StorageTag > Superclass; + typename vtkm::cont::ArrayHandleConstant::StorageTag, + typename vtkm::cont::ArrayHandleConstant::StorageTag, ConnectivityStorageTag, + typename vtkm::cont::ArrayHandleCounting::StorageTag> + Superclass; public: - VTKM_CONT - CellSetSingleType(const std::string &name = std::string()) - : Superclass(name), - ExpectedNumberOfCellsAdded(-1), - CellShapeAsId(CellShapeTagEmpty::Id), - NumberOfPointsPerCell(0) + CellSetSingleType(const std::string& name = std::string()) + : Superclass(name) + , ExpectedNumberOfCellsAdded(-1) + , CellShapeAsId(CellShapeTagEmpty::Id) + , NumberOfPointsPerCell(0) { } VTKM_CONT - CellSetSingleType(const Thisclass &src) - : Superclass(src), - ExpectedNumberOfCellsAdded(-1), - CellShapeAsId(src.CellShapeAsId), - NumberOfPointsPerCell(src.NumberOfPointsPerCell) - { } + CellSetSingleType(const Thisclass& src) + : Superclass(src) + , ExpectedNumberOfCellsAdded(-1) + , CellShapeAsId(src.CellShapeAsId) + , NumberOfPointsPerCell(src.NumberOfPointsPerCell) + { + } VTKM_CONT - Thisclass &operator=(const Thisclass &src) + Thisclass& operator=(const Thisclass& src) { this->Superclass::operator=(src); this->CellShapeAsId = src.CellShapeAsId; @@ -80,12 +82,11 @@ public: return *this; } - virtual ~CellSetSingleType() { } + virtual ~CellSetSingleType() {} /// First method to add cells -- one at a time. VTKM_CONT - void PrepareToAddCells(vtkm::Id numCells, - vtkm::Id connectivityMaxLen) + void PrepareToAddCells(vtkm::Id numCells, vtkm::Id connectivityMaxLen) { this->CellShapeAsId = vtkm::CELL_SHAPE_EMPTY; @@ -98,35 +99,28 @@ public: /// Second method to add cells -- one at a time. template - VTKM_CONT - void AddCell(vtkm::UInt8 shapeId, - vtkm::IdComponent numVertices, - const IdVecType &ids) + VTKM_CONT void AddCell(vtkm::UInt8 shapeId, vtkm::IdComponent numVertices, const IdVecType& ids) { using Traits = vtkm::VecTraits; - VTKM_STATIC_ASSERT_MSG( - (std::is_same::value), - "CellSetSingleType::AddCell requires vtkm::Id for indices."); + VTKM_STATIC_ASSERT_MSG((std::is_same::value), + "CellSetSingleType::AddCell requires vtkm::Id for indices."); if (Traits::GetNumberOfComponents(ids) < numVertices) { - throw vtkm::cont::ErrorBadValue( - "Not enough indices given to CellSetSingleType::AddCell."); + throw vtkm::cont::ErrorBadValue("Not enough indices given to CellSetSingleType::AddCell."); } - if (this->ConnectivityAdded+numVertices > - this->PointToCell.Connectivity.GetNumberOfValues()) + if (this->ConnectivityAdded + numVertices > this->PointToCell.Connectivity.GetNumberOfValues()) { throw vtkm::cont::ErrorBadValue( - "Connectivity increased passed estimated maximum connectivity."); + "Connectivity increased passed estimated maximum connectivity."); } if (this->CellShapeAsId == vtkm::CELL_SHAPE_EMPTY) { if (shapeId == vtkm::CELL_SHAPE_EMPTY) { - throw vtkm::cont::ErrorBadValue( - "Cannot create cells of type empty."); + throw vtkm::cont::ErrorBadValue("Cannot create cells of type empty."); } this->CellShapeAsId = shapeId; this->CheckNumberOfPointsPerCell(numVertices); @@ -136,19 +130,18 @@ public: { if (shapeId != this->GetCellShape(0)) { - throw vtkm::cont::ErrorBadValue( - "Cannot have differing shapes in CellSetSingleType."); + throw vtkm::cont::ErrorBadValue("Cannot have differing shapes in CellSetSingleType."); } if (numVertices != this->NumberOfPointsPerCell) { throw vtkm::cont::ErrorBadValue( - "Inconsistent number of points in cells for CellSetSingleType."); + "Inconsistent number of points in cells for CellSetSingleType."); } } - for (vtkm::IdComponent iVert=0; iVert < numVertices; ++iVert) + for (vtkm::IdComponent iVert = 0; iVert < numVertices; ++iVert) { - this->PointToCell.Connectivity.GetPortalControl().Set( - this->ConnectivityAdded+iVert, Traits::GetComponent(ids,iVert)); + this->PointToCell.Connectivity.GetPortalControl().Set(this->ConnectivityAdded + iVert, + Traits::GetComponent(ids, iVert)); } this->NumberOfCellsAdded++; this->ConnectivityAdded += numVertices; @@ -164,23 +157,18 @@ public: vtkm::Id numCells = this->NumberOfCellsAdded; this->PointToCell.Shapes = - vtkm::cont::make_ArrayHandleConstant(this->GetCellShape(0), numCells); + vtkm::cont::make_ArrayHandleConstant(this->GetCellShape(0), numCells); this->PointToCell.NumIndices = - vtkm::cont::make_ArrayHandleConstant(this->NumberOfPointsPerCell, - numCells); - this->PointToCell.IndexOffsets = - vtkm::cont::make_ArrayHandleCounting( - vtkm::Id(0), - static_cast(this->NumberOfPointsPerCell), - numCells); + vtkm::cont::make_ArrayHandleConstant(this->NumberOfPointsPerCell, numCells); + this->PointToCell.IndexOffsets = vtkm::cont::make_ArrayHandleCounting( + vtkm::Id(0), static_cast(this->NumberOfPointsPerCell), numCells); this->PointToCell.ElementsValid = true; this->PointToCell.IndexOffsetsValid = true; if (this->ExpectedNumberOfCellsAdded != this->GetNumberOfCells()) { - throw vtkm::cont::ErrorBadValue( - "Did not add the expected number of cells."); + throw vtkm::cont::ErrorBadValue("Did not add the expected number of cells."); } this->NumberOfCellsAdded = -1; @@ -190,27 +178,19 @@ public: //This is the way you can fill the memory from another system without copying VTKM_CONT - void Fill(vtkm::Id numPoints, - vtkm::UInt8 shapeId, - vtkm::IdComponent numberOfPointsPerCell, - const vtkm::cont::ArrayHandle - &connectivity) + void Fill(vtkm::Id numPoints, vtkm::UInt8 shapeId, vtkm::IdComponent numberOfPointsPerCell, + const vtkm::cont::ArrayHandle& connectivity) { this->NumberOfPoints = numPoints; this->CellShapeAsId = shapeId; this->CheckNumberOfPointsPerCell(numberOfPointsPerCell); - const vtkm::Id numCells = - connectivity.GetNumberOfValues() / numberOfPointsPerCell; + const vtkm::Id numCells = connectivity.GetNumberOfValues() / numberOfPointsPerCell; VTKM_ASSERT((connectivity.GetNumberOfValues() % numberOfPointsPerCell) == 0); - this->PointToCell.Shapes = - vtkm::cont::make_ArrayHandleConstant(shapeId, numCells); + this->PointToCell.Shapes = vtkm::cont::make_ArrayHandleConstant(shapeId, numCells); this->PointToCell.NumIndices = - vtkm::cont::make_ArrayHandleConstant(numberOfPointsPerCell, - numCells); - this->PointToCell.IndexOffsets = - vtkm::cont::make_ArrayHandleCounting(vtkm::Id(0), - static_cast(numberOfPointsPerCell), - numCells ); + vtkm::cont::make_ArrayHandleConstant(numberOfPointsPerCell, numCells); + this->PointToCell.IndexOffsets = vtkm::cont::make_ArrayHandleCounting( + vtkm::Id(0), static_cast(numberOfPointsPerCell), numCells); this->PointToCell.Connectivity = connectivity; this->PointToCell.ElementsValid = true; @@ -218,10 +198,7 @@ public: } VTKM_CONT - vtkm::Id GetCellShapeAsId() const - { - return this->CellShapeAsId; - } + vtkm::Id GetCellShapeAsId() const { return this->CellShapeAsId; } VTKM_CONT vtkm::UInt8 GetCellShape(vtkm::Id vtkmNotUsed(cellIndex)) const @@ -229,9 +206,10 @@ public: return static_cast(this->CellShapeAsId); } - virtual void PrintSummary(std::ostream &out) const + virtual void PrintSummary(std::ostream& out) const { - out << " ExplicitSingleCellSet: " << this->Name << " Type "<CellShapeAsId<Name << " Type " << this->CellShapeAsId + << std::endl; out << " PointToCell: " << std::endl; this->PointToCell.PrintSummary(out); out << " CellToPoint: " << std::endl; @@ -239,21 +217,18 @@ public: } private: - template< typename CellShapeTag> - void CheckNumberOfPointsPerCell(CellShapeTag, - vtkm::CellTraitsTagSizeFixed, + template + void CheckNumberOfPointsPerCell(CellShapeTag, vtkm::CellTraitsTagSizeFixed, vtkm::IdComponent numVertices) const { if (numVertices != vtkm::CellTraits::NUM_POINTS) { - throw vtkm::cont::ErrorBadValue( - "Passed invalid number of points for cell shape."); + throw vtkm::cont::ErrorBadValue("Passed invalid number of points for cell shape."); } } - template< typename CellShapeTag> - void CheckNumberOfPointsPerCell(CellShapeTag, - vtkm::CellTraitsTagSizeVariable, + template + void CheckNumberOfPointsPerCell(CellShapeTag, vtkm::CellTraitsTagSizeVariable, vtkm::IdComponent vtkmNotUsed(numVertices)) const { // Technically, a shape with a variable number of points probably has a @@ -261,18 +236,14 @@ private: // check that. Instead, just pass the check by returning without error. } - void CheckNumberOfPointsPerCell(vtkm::IdComponent numVertices) const { switch (this->CellShapeAsId) { - vtkmGenericCellShapeMacro( - this->CheckNumberOfPointsPerCell(CellShapeTag(), - vtkm::CellTraits::IsSizeFixed(), - numVertices) ); + vtkmGenericCellShapeMacro(this->CheckNumberOfPointsPerCell( + CellShapeTag(), vtkm::CellTraits::IsSizeFixed(), numVertices)); default: - throw vtkm::cont::ErrorBadValue( - "CellSetSingleType unable to determine the cell type"); + throw vtkm::cont::ErrorBadValue("CellSetSingleType unable to determine the cell type"); } } @@ -280,7 +251,6 @@ private: vtkm::Id CellShapeAsId; vtkm::IdComponent NumberOfPointsPerCell; }; - } } // namespace vtkm::cont diff --git a/vtkm/cont/CellSetStructured.cxx b/vtkm/cont/CellSetStructured.cxx index 9f52f787b..a0cc1602b 100644 --- a/vtkm/cont/CellSetStructured.cxx +++ b/vtkm/cont/CellSetStructured.cxx @@ -21,12 +21,13 @@ #define vtkm_cont_CellSetStructured_cxx #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ template class VTKM_CONT_EXPORT CellSetStructured<1>; template class VTKM_CONT_EXPORT CellSetStructured<2>; template class VTKM_CONT_EXPORT CellSetStructured<3>; - } -} \ No newline at end of file +} diff --git a/vtkm/cont/CellSetStructured.h b/vtkm/cont/CellSetStructured.h index bf0da72e4..f6bea466f 100644 --- a/vtkm/cont/CellSetStructured.h +++ b/vtkm/cont/CellSetStructured.h @@ -28,40 +28,36 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -template +template class VTKM_ALWAYS_EXPORT CellSetStructured : public CellSet { private: typedef vtkm::cont::CellSetStructured Thisclass; - typedef vtkm::internal::ConnectivityStructuredInternals - InternalsType; + typedef vtkm::internal::ConnectivityStructuredInternals InternalsType; public: - static const vtkm::IdComponent Dimension=DIMENSION; + static const vtkm::IdComponent Dimension = DIMENSION; typedef typename InternalsType::SchedulingRangeType SchedulingRangeType; - CellSetStructured(const std::string &name = std::string()) - : CellSet(name), Structure() + CellSetStructured(const std::string& name = std::string()) + : CellSet(name) + , Structure() { } - CellSetStructured(const Thisclass &src); + CellSetStructured(const Thisclass& src); - Thisclass &operator=(const Thisclass &src); + Thisclass& operator=(const Thisclass& src); - virtual vtkm::Id GetNumberOfCells() const - { - return this->Structure.GetNumberOfCells(); - } + virtual vtkm::Id GetNumberOfCells() const { return this->Structure.GetNumberOfCells(); } - virtual vtkm::Id GetNumberOfPoints() const - { - return this->Structure.GetNumberOfPoints(); - } + virtual vtkm::Id GetNumberOfPoints() const { return this->Structure.GetNumberOfPoints(); } virtual vtkm::Id GetNumberOfFaces() const { return -1; } @@ -72,43 +68,34 @@ public: this->Structure.SetPointDimensions(dimensions); } - SchedulingRangeType GetPointDimensions() - { - return this->Structure.GetPointDimensions(); - } + SchedulingRangeType GetPointDimensions() { return this->Structure.GetPointDimensions(); } - SchedulingRangeType GetCellDimensions() - { - return this->Structure.GetCellDimensions(); - } + SchedulingRangeType GetCellDimensions() { return this->Structure.GetCellDimensions(); } - vtkm::IdComponent - GetNumberOfPointsInCell(vtkm::Id vtkmNotUsed(cellIndex)=0) const + vtkm::IdComponent GetNumberOfPointsInCell(vtkm::Id vtkmNotUsed(cellIndex) = 0) const { return this->Structure.GetNumberOfPointsInCell(); } - vtkm::IdComponent GetCellShape() const - { - return this->Structure.GetCellShape(); - } + vtkm::IdComponent GetCellShape() const { return this->Structure.GetCellShape(); } - template + template SchedulingRangeType GetSchedulingRange(TopologyElement) const; - template - struct ExecutionTypes { + template + struct ExecutionTypes + { VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapter); VTKM_IS_TOPOLOGY_ELEMENT_TAG(FromTopology); VTKM_IS_TOPOLOGY_ELEMENT_TAG(ToTopology); - typedef vtkm::exec::ConnectivityStructured ExecObjectType; + typedef vtkm::exec::ConnectivityStructured ExecObjectType; }; - template - typename ExecutionTypes::ExecObjectType - PrepareForInput(DeviceAdapter, FromTopology, ToTopology) const; + template + typename ExecutionTypes::ExecObjectType PrepareForInput( + DeviceAdapter, FromTopology, ToTopology) const; - virtual void PrintSummary(std::ostream &out) const; + virtual void PrintSummary(std::ostream& out) const; private: InternalsType Structure; @@ -119,7 +106,6 @@ extern template class VTKM_CONT_TEMPLATE_EXPORT CellSetStructured<1>; extern template class VTKM_CONT_TEMPLATE_EXPORT CellSetStructured<2>; extern template class VTKM_CONT_TEMPLATE_EXPORT CellSetStructured<3>; #endif - } } // namespace vtkm::cont diff --git a/vtkm/cont/CellSetStructured.hxx b/vtkm/cont/CellSetStructured.hxx index 8fa727d79..3a0476e9f 100644 --- a/vtkm/cont/CellSetStructured.hxx +++ b/vtkm/cont/CellSetStructured.hxx @@ -18,52 +18,52 @@ // this software. //============================================================================ -namespace vtkm { -namespace cont { - -template -CellSetStructured::CellSetStructured(const CellSetStructured &src) - : CellSet(src), Structure(src.Structure) +namespace vtkm +{ +namespace cont { +template +CellSetStructured::CellSetStructured(const CellSetStructured& src) + : CellSet(src) + , Structure(src.Structure) +{ } -template -CellSetStructured& -CellSetStructured::operator=(const CellSetStructured &src) +template +CellSetStructured& CellSetStructured::operator=( + const CellSetStructured& src) { this->CellSet::operator=(src); this->Structure = src.Structure; return *this; } -template -template +template +template typename CellSetStructured::SchedulingRangeType -CellSetStructured::GetSchedulingRange(TopologyElement) const + CellSetStructured::GetSchedulingRange(TopologyElement) const { VTKM_IS_TOPOLOGY_ELEMENT_TAG(TopologyElement); return this->Structure.GetSchedulingRange(TopologyElement()); } -template -template -typename CellSetStructured::template ExecutionTypes::ExecObjectType -CellSetStructured::PrepareForInput(DeviceAdapter, FromTopology, ToTopology) const +template +template +typename CellSetStructured::template ExecutionTypes::ExecObjectType + CellSetStructured::PrepareForInput(DeviceAdapter, FromTopology, ToTopology) const { - typedef typename - ExecutionTypes::ExecObjectType - ConnectivityType; + typedef typename ExecutionTypes::ExecObjectType + ConnectivityType; return ConnectivityType(this->Structure); } -template -void CellSetStructured::PrintSummary(std::ostream &out) const +template +void CellSetStructured::PrintSummary(std::ostream& out) const { out << " StructuredCellSet: " << this->GetName() << std::endl; this->Structure.PrintSummary(out); } - - } } diff --git a/vtkm/cont/CoordinateSystem.cxx b/vtkm/cont/CoordinateSystem.cxx index 5f6a450f9..c27d75ba5 100644 --- a/vtkm/cont/CoordinateSystem.cxx +++ b/vtkm/cont/CoordinateSystem.cxx @@ -20,32 +20,30 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ VTKM_CONT -void CoordinateSystem::PrintSummary(std::ostream &out) const +void CoordinateSystem::PrintSummary(std::ostream& out) const { out << " Coordinate System "; this->Superclass::PrintSummary(out); } VTKM_CONT -void CoordinateSystem::GetRange(vtkm::Range *range) const +void CoordinateSystem::GetRange(vtkm::Range* range) const { - this->Superclass::GetRange( - range, - VTKM_DEFAULT_COORDINATE_SYSTEM_TYPE_LIST_TAG(), - VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG()); + this->Superclass::GetRange(range, VTKM_DEFAULT_COORDINATE_SYSTEM_TYPE_LIST_TAG(), + VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG()); } VTKM_CONT -const vtkm::cont::ArrayHandle& -CoordinateSystem::GetRange() const +const vtkm::cont::ArrayHandle& CoordinateSystem::GetRange() const { - return this->Superclass::GetRange( - VTKM_DEFAULT_COORDINATE_SYSTEM_TYPE_LIST_TAG(), - VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG()); + return this->Superclass::GetRange(VTKM_DEFAULT_COORDINATE_SYSTEM_TYPE_LIST_TAG(), + VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG()); } VTKM_CONT @@ -54,6 +52,5 @@ vtkm::Bounds CoordinateSystem::GetBounds() const return this->GetBounds(VTKM_DEFAULT_COORDINATE_SYSTEM_TYPE_LIST_TAG(), VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG()); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/CoordinateSystem.h b/vtkm/cont/CoordinateSystem.h index 6cecc2ba2..556c18bba 100644 --- a/vtkm/cont/CoordinateSystem.h +++ b/vtkm/cont/CoordinateSystem.h @@ -28,31 +28,29 @@ #include #ifndef VTKM_DEFAULT_COORDINATE_SYSTEM_TYPE_LIST_TAG -#define VTKM_DEFAULT_COORDINATE_SYSTEM_TYPE_LIST_TAG \ - ::vtkm::TypeListTagFieldVec3 +#define VTKM_DEFAULT_COORDINATE_SYSTEM_TYPE_LIST_TAG ::vtkm::TypeListTagFieldVec3 #endif #ifndef VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG -#define VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG \ +#define VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG \ ::vtkm::cont::StorageListTagCoordinateSystemDefault #endif -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace detail { +namespace detail +{ typedef vtkm::cont::ArrayHandleCompositeVectorType< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle >::type - ArrayHandleCompositeVectorFloat32_3Default; + vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle>::type ArrayHandleCompositeVectorFloat32_3Default; typedef vtkm::cont::ArrayHandleCompositeVectorType< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle >::type - ArrayHandleCompositeVectorFloat64_3Default; + vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle>::type ArrayHandleCompositeVectorFloat64_3Default; } // namespace detail @@ -62,20 +60,18 @@ typedef vtkm::cont::ArrayHandleCompositeVectorType< /// by default (unless it is defined before including VTK-m headers. /// struct StorageListTagCoordinateSystemDefault - : vtkm::ListTagBase< - vtkm::cont::StorageTagBasic, - vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag, - detail::ArrayHandleCompositeVectorFloat32_3Default::StorageTag, - detail::ArrayHandleCompositeVectorFloat64_3Default::StorageTag, - vtkm::cont::ArrayHandleCartesianProduct< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle >::StorageTag > -{ }; + : vtkm::ListTagBase< + vtkm::cont::StorageTagBasic, vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag, + detail::ArrayHandleCompositeVectorFloat32_3Default::StorageTag, + detail::ArrayHandleCompositeVectorFloat64_3Default::StorageTag, + vtkm::cont::ArrayHandleCartesianProduct< + vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle>::StorageTag> +{ +}; -typedef vtkm::cont::DynamicArrayHandleBase< - VTKM_DEFAULT_COORDINATE_SYSTEM_TYPE_LIST_TAG, - VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG> +typedef vtkm::cont::DynamicArrayHandleBase DynamicArrayHandleCoordinateSystem; class VTKM_CONT_EXPORT CoordinateSystem : public vtkm::cont::Field @@ -84,164 +80,145 @@ class VTKM_CONT_EXPORT CoordinateSystem : public vtkm::cont::Field public: VTKM_CONT - CoordinateSystem() : Superclass() { } + CoordinateSystem() + : Superclass() + { + } VTKM_CONT - CoordinateSystem(std::string name, - const vtkm::cont::DynamicArrayHandle &data) - : Superclass(name, ASSOC_POINTS, data) { } + CoordinateSystem(std::string name, const vtkm::cont::DynamicArrayHandle& data) + : Superclass(name, ASSOC_POINTS, data) + { + } - template - VTKM_CONT - CoordinateSystem(std::string name, - const ArrayHandle &data) - : Superclass(name, ASSOC_POINTS, data) { } + template + VTKM_CONT CoordinateSystem(std::string name, const ArrayHandle& data) + : Superclass(name, ASSOC_POINTS, data) + { + } - template - VTKM_CONT - CoordinateSystem(std::string name, - const std::vector &data) - : Superclass(name, ASSOC_POINTS, data) { } + template + VTKM_CONT CoordinateSystem(std::string name, const std::vector& data) + : Superclass(name, ASSOC_POINTS, data) + { + } - template - VTKM_CONT - CoordinateSystem(std::string name, - const T *data, - vtkm::Id numberOfValues) - : Superclass(name, ASSOC_POINTS, data, numberOfValues) { } + template + VTKM_CONT CoordinateSystem(std::string name, const T* data, vtkm::Id numberOfValues) + : Superclass(name, ASSOC_POINTS, data, numberOfValues) + { + } /// This constructor of coordinate system sets up a regular grid of points. /// VTKM_CONT - CoordinateSystem(std::string name, - vtkm::Id3 dimensions, - vtkm::Vec origin - = vtkm::Vec(0.0f, 0.0f, 0.0f), - vtkm::Vec spacing - = vtkm::Vec(1.0f, 1.0f, 1.0f)) - : Superclass(name, - ASSOC_POINTS, + CoordinateSystem( + std::string name, vtkm::Id3 dimensions, + vtkm::Vec origin = vtkm::Vec(0.0f, 0.0f, 0.0f), + vtkm::Vec spacing = vtkm::Vec(1.0f, 1.0f, 1.0f)) + : Superclass(name, ASSOC_POINTS, vtkm::cont::DynamicArrayHandle( vtkm::cont::ArrayHandleUniformPointCoordinates(dimensions, origin, spacing))) - { } + { + } VTKM_CONT - CoordinateSystem &operator=(const vtkm::cont::CoordinateSystem &src) = default; + CoordinateSystem& operator=(const vtkm::cont::CoordinateSystem& src) = default; VTKM_CONT vtkm::cont::DynamicArrayHandleCoordinateSystem GetData() const { - return vtkm::cont::DynamicArrayHandleCoordinateSystem( - this->Superclass::GetData()); + return vtkm::cont::DynamicArrayHandleCoordinateSystem(this->Superclass::GetData()); } VTKM_CONT vtkm::cont::DynamicArrayHandleCoordinateSystem GetData() { - return vtkm::cont::DynamicArrayHandleCoordinateSystem( - this->Superclass::GetData()); + return vtkm::cont::DynamicArrayHandleCoordinateSystem(this->Superclass::GetData()); } VTKM_CONT - void GetRange(vtkm::Range *range) const; + void GetRange(vtkm::Range* range) const; - template - VTKM_CONT - void GetRange(vtkm::Range *range, TypeList) const + template + VTKM_CONT void GetRange(vtkm::Range* range, TypeList) const { VTKM_IS_LIST_TAG(TypeList); - this->Superclass::GetRange( - range, - TypeList(), - VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG()); + this->Superclass::GetRange(range, TypeList(), + VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG()); } - template - VTKM_CONT - void GetRange(vtkm::Range *range, TypeList, StorageList) const + template + VTKM_CONT void GetRange(vtkm::Range* range, TypeList, StorageList) const { VTKM_IS_LIST_TAG(TypeList); VTKM_IS_LIST_TAG(StorageList); - this->Superclass::GetRange( - range, - TypeList(), - StorageList()); + this->Superclass::GetRange(range, TypeList(), StorageList()); } VTKM_CONT const vtkm::cont::ArrayHandle& GetRange() const; - template - VTKM_CONT - const vtkm::cont::ArrayHandle& GetRange(TypeList) const + template + VTKM_CONT const vtkm::cont::ArrayHandle& GetRange(TypeList) const { VTKM_IS_LIST_TAG(TypeList); - return this->Superclass::GetRange( - TypeList(), - VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG()); + return this->Superclass::GetRange(TypeList(), + VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG()); } - template - VTKM_CONT - const vtkm::cont::ArrayHandle& GetRange(TypeList, - StorageList) const + template + VTKM_CONT const vtkm::cont::ArrayHandle& GetRange(TypeList, StorageList) const { VTKM_IS_LIST_TAG(TypeList); VTKM_IS_LIST_TAG(StorageList); - return this->Superclass::GetRange( - TypeList(), - StorageList()); + return this->Superclass::GetRange(TypeList(), StorageList()); } VTKM_CONT vtkm::Bounds GetBounds() const; - template - VTKM_CONT - vtkm::Bounds GetBounds(TypeList) const + template + VTKM_CONT vtkm::Bounds GetBounds(TypeList) const { VTKM_IS_LIST_TAG(TypeList); - return this->GetBounds(TypeList(), - VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG()); + return this->GetBounds(TypeList(), VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG()); } - template - VTKM_CONT - vtkm::Bounds GetBounds(TypeList, StorageList) const + template + VTKM_CONT vtkm::Bounds GetBounds(TypeList, StorageList) const { VTKM_IS_LIST_TAG(TypeList); VTKM_IS_LIST_TAG(StorageList); - vtkm::cont::ArrayHandle ranges = - this->GetRange(TypeList(), StorageList()); + vtkm::cont::ArrayHandle ranges = this->GetRange(TypeList(), StorageList()); VTKM_ASSERT(ranges.GetNumberOfValues() == 3); vtkm::cont::ArrayHandle::PortalConstControl rangePortal = - ranges.GetPortalConstControl(); + ranges.GetPortalConstControl(); - return vtkm::Bounds(rangePortal.Get(0), - rangePortal.Get(1), - rangePortal.Get(2)); + return vtkm::Bounds(rangePortal.Get(0), rangePortal.Get(1), rangePortal.Get(2)); } - virtual void PrintSummary(std::ostream &out) const; + virtual void PrintSummary(std::ostream& out) const; }; -template -void CastAndCall(const vtkm::cont::CoordinateSystem& coords, const Functor &f) +template +void CastAndCall(const vtkm::cont::CoordinateSystem& coords, const Functor& f) { coords.GetData().CastAndCall(f); } -namespace internal { +namespace internal +{ -template<> +template <> struct DynamicTransformTraits { typedef vtkm::cont::internal::DynamicTransformTagCastAndCall DynamicTag; @@ -251,5 +228,4 @@ struct DynamicTransformTraits } // namespace cont } // namespace vtkm - #endif //vtk_m_cont_CoordinateSystem_h diff --git a/vtkm/cont/DataSet.h b/vtkm/cont/DataSet.h index bb75f6914..a49472699 100644 --- a/vtkm/cont/DataSet.h +++ b/vtkm/cont/DataSet.h @@ -28,16 +28,16 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ class DataSet { public: VTKM_CONT - DataSet() - { - } + DataSet() {} VTKM_CONT void Clear() @@ -48,24 +48,18 @@ public: } VTKM_CONT - void AddField(Field field) - { - this->Fields.push_back(field); - } + void AddField(Field field) { this->Fields.push_back(field); } VTKM_CONT - const vtkm::cont::Field &GetField(vtkm::Id index) const + const vtkm::cont::Field& GetField(vtkm::Id index) const { - VTKM_ASSERT((index >= 0) && - (index < this->GetNumberOfFields())); + VTKM_ASSERT((index >= 0) && (index < this->GetNumberOfFields())); return this->Fields[static_cast(index)]; } VTKM_CONT - bool HasField( - const std::string &name, - vtkm::cont::Field::AssociationEnum assoc = vtkm::cont::Field::ASSOC_ANY) - const + bool HasField(const std::string& name, + vtkm::cont::Field::AssociationEnum assoc = vtkm::cont::Field::ASSOC_ANY) const { bool found; this->FindFieldIndex(name, assoc, found); @@ -73,10 +67,8 @@ public: } VTKM_CONT - vtkm::Id GetFieldIndex( - const std::string &name, - vtkm::cont::Field::AssociationEnum assoc = vtkm::cont::Field::ASSOC_ANY) - const + vtkm::Id GetFieldIndex(const std::string& name, vtkm::cont::Field::AssociationEnum assoc = + vtkm::cont::Field::ASSOC_ANY) const { bool found; vtkm::Id index = this->FindFieldIndex(name, assoc, found); @@ -86,48 +78,42 @@ public: } else { - throw vtkm::cont::ErrorBadValue( - "No field with requested name: " + name); + throw vtkm::cont::ErrorBadValue("No field with requested name: " + name); } } VTKM_CONT - const vtkm::cont::Field &GetField(const std::string &name, - vtkm::cont::Field::AssociationEnum assoc = vtkm::cont::Field::ASSOC_ANY) - const + const vtkm::cont::Field& GetField( + const std::string& name, + vtkm::cont::Field::AssociationEnum assoc = vtkm::cont::Field::ASSOC_ANY) const { return this->GetField(this->GetFieldIndex(name, assoc)); } VTKM_CONT - const vtkm::cont::Field &GetCellField(const std::string &name) const + const vtkm::cont::Field& GetCellField(const std::string& name) const { return this->GetField(name, vtkm::cont::Field::ASSOC_CELL_SET); } VTKM_CONT - const vtkm::cont::Field &GetPointField(const std::string &name) const + const vtkm::cont::Field& GetPointField(const std::string& name) const { return this->GetField(name, vtkm::cont::Field::ASSOC_POINTS); } VTKM_CONT - void AddCoordinateSystem(vtkm::cont::CoordinateSystem cs) - { - this->CoordSystems.push_back(cs); - } + void AddCoordinateSystem(vtkm::cont::CoordinateSystem cs) { this->CoordSystems.push_back(cs); } VTKM_CONT - const vtkm::cont::CoordinateSystem & - GetCoordinateSystem(vtkm::Id index=0) const + const vtkm::cont::CoordinateSystem& GetCoordinateSystem(vtkm::Id index = 0) const { - VTKM_ASSERT((index >= 0) && - (index < this->GetNumberOfCoordinateSystems())); + VTKM_ASSERT((index >= 0) && (index < this->GetNumberOfCoordinateSystems())); return this->CoordSystems[static_cast(index)]; } VTKM_CONT - bool HasCoordinateSystem(const std::string &name) const + bool HasCoordinateSystem(const std::string& name) const { bool found; this->FindCoordinateSystemIndex(name, found); @@ -135,7 +121,7 @@ public: } VTKM_CONT - vtkm::Id GetCoordinateSystemIndex(const std::string &name) const + vtkm::Id GetCoordinateSystemIndex(const std::string& name) const { bool found; vtkm::Id index = this->FindCoordinateSystemIndex(name, found); @@ -145,42 +131,35 @@ public: } else { - throw vtkm::cont::ErrorBadValue( - "No coordinate system with requested name"); + throw vtkm::cont::ErrorBadValue("No coordinate system with requested name"); } } VTKM_CONT - const vtkm::cont::CoordinateSystem & - GetCoordinateSystem(const std::string &name) const + const vtkm::cont::CoordinateSystem& GetCoordinateSystem(const std::string& name) const { return this->GetCoordinateSystem(this->GetCoordinateSystemIndex(name)); } VTKM_CONT - void AddCellSet(vtkm::cont::DynamicCellSet cellSet) - { - this->CellSets.push_back(cellSet); - } + void AddCellSet(vtkm::cont::DynamicCellSet cellSet) { this->CellSets.push_back(cellSet); } - template - VTKM_CONT - void AddCellSet(const CellSetType &cellSet) + template + VTKM_CONT void AddCellSet(const CellSetType& cellSet) { VTKM_IS_CELL_SET(CellSetType); this->CellSets.push_back(vtkm::cont::DynamicCellSet(cellSet)); } VTKM_CONT - vtkm::cont::DynamicCellSet GetCellSet(vtkm::Id index=0) const + vtkm::cont::DynamicCellSet GetCellSet(vtkm::Id index = 0) const { - VTKM_ASSERT((index >= 0) && - (index < this->GetNumberOfCellSets())); + VTKM_ASSERT((index >= 0) && (index < this->GetNumberOfCellSets())); return this->CellSets[static_cast(index)]; } VTKM_CONT - bool HasCellSet(const std::string &name) const + bool HasCellSet(const std::string& name) const { bool found; this->FindCellSetIndex(name, found); @@ -188,7 +167,7 @@ public: } VTKM_CONT - vtkm::Id GetCellSetIndex(const std::string &name) const + vtkm::Id GetCellSetIndex(const std::string& name) const { bool found; vtkm::Id index = this->FindCellSetIndex(name, found); @@ -203,7 +182,7 @@ public: } VTKM_CONT - vtkm::cont::DynamicCellSet GetCellSet(const std::string &name) const + vtkm::cont::DynamicCellSet GetCellSet(const std::string& name) const { return this->GetCellSet(this->GetCellSetIndex(name)); } @@ -227,26 +206,26 @@ public: } VTKM_CONT - void PrintSummary(std::ostream &out) const + void PrintSummary(std::ostream& out) const { - out<<"DataSet:\n"; - out<<" CoordSystems["<CoordSystems.size()<<"]\n"; - for (std::size_t index = 0; index < this->CoordSystems.size(); index++) - { - this->CoordSystems[index].PrintSummary(out); - } + out << "DataSet:\n"; + out << " CoordSystems[" << this->CoordSystems.size() << "]\n"; + for (std::size_t index = 0; index < this->CoordSystems.size(); index++) + { + this->CoordSystems[index].PrintSummary(out); + } - out<<" CellSets["<GetNumberOfCellSets()<<"]\n"; - for (vtkm::Id index = 0; index < this->GetNumberOfCellSets(); index++) - { - this->GetCellSet(index).PrintSummary(out); - } + out << " CellSets[" << this->GetNumberOfCellSets() << "]\n"; + for (vtkm::Id index = 0; index < this->GetNumberOfCellSets(); index++) + { + this->GetCellSet(index).PrintSummary(out); + } - out<<" Fields["<GetNumberOfFields()<<"]\n"; - for (vtkm::Id index = 0; index < this->GetNumberOfFields(); index++) - { - this->GetField(index).PrintSummary(out); - } + out << " Fields[" << this->GetNumberOfFields() << "]\n"; + for (vtkm::Id index = 0; index < this->GetNumberOfFields(); index++) + { + this->GetField(index).PrintSummary(out); + } } private: @@ -255,17 +234,16 @@ private: std::vector CellSets; VTKM_CONT - vtkm::Id FindFieldIndex(const std::string &name, - vtkm::cont::Field::AssociationEnum association, - bool &found) const + vtkm::Id FindFieldIndex(const std::string& name, vtkm::cont::Field::AssociationEnum association, + bool& found) const { - for (std::size_t index=0; index < this->Fields.size(); ++index) + for (std::size_t index = 0; index < this->Fields.size(); ++index) { if ((association == vtkm::cont::Field::ASSOC_ANY || association == this->Fields[index].GetAssociation()) && this->Fields[index].GetName() == name) { - found= true; + found = true; return static_cast(index); } } @@ -274,9 +252,9 @@ private: } VTKM_CONT - vtkm::Id FindCoordinateSystemIndex(const std::string &name, bool &found) const + vtkm::Id FindCoordinateSystemIndex(const std::string& name, bool& found) const { - for (std::size_t index=0; index < this->CoordSystems.size(); ++index) + for (std::size_t index = 0; index < this->CoordSystems.size(); ++index) { if (this->CoordSystems[index].GetName() == name) { @@ -289,9 +267,9 @@ private: } VTKM_CONT - vtkm::Id FindCellSetIndex(const std::string &name, bool &found) const + vtkm::Id FindCellSetIndex(const std::string& name, bool& found) const { - for (std::size_t index=0; index < static_cast(this->GetNumberOfCellSets()); ++index) + for (std::size_t index = 0; index < static_cast(this->GetNumberOfCellSets()); ++index) { if (this->CellSets[index].GetName() == name) { @@ -307,5 +285,4 @@ private: } // namespace cont } // namespace vtkm - #endif //vtk_m_cont_DataSet_h diff --git a/vtkm/cont/DataSetBuilderExplicit.h b/vtkm/cont/DataSetBuilderExplicit.h index 48c65cd62..a81b1e480 100644 --- a/vtkm/cont/DataSetBuilderExplicit.h +++ b/vtkm/cont/DataSetBuilderExplicit.h @@ -25,24 +25,23 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ //Coordinates builder?? //Need a singlecellset handler. class DataSetBuilderExplicit { - template - VTKM_CONT - static - void CopyInto(const std::vector& input, - vtkm::cont::ArrayHandle& output ) + template + VTKM_CONT static void CopyInto(const std::vector& input, vtkm::cont::ArrayHandle& output) { - output.Allocate( static_cast(input.size()) ); - std::copy( input.begin(), input.end(), - ArrayPortalToIteratorBegin(output.GetPortalControl()) ); + output.Allocate(static_cast(input.size())); + std::copy(input.begin(), input.end(), ArrayPortalToIteratorBegin(output.GetPortalControl())); } + public: VTKM_CONT DataSetBuilderExplicit() {} @@ -51,185 +50,121 @@ public: //TODO //Zoo explicit cell - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const std::vector &xVals, - const std::vector &shapes, - const std::vector &numIndices, - const std::vector &connectivity, - const std::string &coordsNm="coords", - const std::string &cellNm="cells") + template + VTKM_CONT static vtkm::cont::DataSet Create(const std::vector& xVals, + const std::vector& shapes, + const std::vector& numIndices, + const std::vector& connectivity, + const std::string& coordsNm = "coords", + const std::string& cellNm = "cells") { - std::vector yVals(xVals.size(),0), zVals(xVals.size(),0); - return DataSetBuilderExplicit::Create(xVals,yVals,zVals, - shapes,numIndices,connectivity, - coordsNm,cellNm); - } - - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const std::vector &xVals, - const std::vector &yVals, - const std::vector &shapes, - const std::vector &numIndices, - const std::vector &connectivity, - const std::string &coordsNm="coords", - const std::string &cellNm="cells") - { - std::vector zVals(xVals.size(),0); - return DataSetBuilderExplicit::Create(xVals,yVals,zVals, - shapes,numIndices,connectivity, - coordsNm,cellNm); + std::vector yVals(xVals.size(), 0), zVals(xVals.size(), 0); + return DataSetBuilderExplicit::Create(xVals, yVals, zVals, shapes, numIndices, connectivity, + coordsNm, cellNm); } - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const std::vector &xVals, - const std::vector &yVals, - const std::vector &zVals, - const std::vector &shapes, - const std::vector &numIndices, - const std::vector &connectivity, - const std::string &coordsNm="coords", - const std::string &cellNm="cells"); - - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const vtkm::cont::ArrayHandle &xVals, - const vtkm::cont::ArrayHandle &yVals, - const vtkm::cont::ArrayHandle &zVals, - const vtkm::cont::ArrayHandle &shapes, - const vtkm::cont::ArrayHandle &numIndices, - const vtkm::cont::ArrayHandle &connectivity, - const std::string &coordsNm="coords", - const std::string &cellNm="cells") + template + VTKM_CONT static vtkm::cont::DataSet Create(const std::vector& xVals, + const std::vector& yVals, + const std::vector& shapes, + const std::vector& numIndices, + const std::vector& connectivity, + const std::string& coordsNm = "coords", + const std::string& cellNm = "cells") { - return DataSetBuilderExplicit::BuildDataSet( - xVals,yVals,zVals, - shapes,numIndices,connectivity, - coordsNm,cellNm); + std::vector zVals(xVals.size(), 0); + return DataSetBuilderExplicit::Create(xVals, yVals, zVals, shapes, numIndices, connectivity, + coordsNm, cellNm); } + template + VTKM_CONT static vtkm::cont::DataSet Create( + const std::vector& xVals, const std::vector& yVals, const std::vector& zVals, + const std::vector& shapes, const std::vector& numIndices, + const std::vector& connectivity, const std::string& coordsNm = "coords", + const std::string& cellNm = "cells"); - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const std::vector > &coords, - const std::vector &shapes, - const std::vector &numIndices, - const std::vector &connectivity, - const std::string &coordsNm="coords", - const std::string &cellNm="cells"); - - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const vtkm::cont::ArrayHandle > &coords, - const vtkm::cont::ArrayHandle &shapes, - const vtkm::cont::ArrayHandle &numIndices, - const vtkm::cont::ArrayHandle &connectivity, - const std::string &coordsNm="coords", - const std::string &cellNm="cells") + template + VTKM_CONT static vtkm::cont::DataSet Create( + const vtkm::cont::ArrayHandle& xVals, const vtkm::cont::ArrayHandle& yVals, + const vtkm::cont::ArrayHandle& zVals, const vtkm::cont::ArrayHandle& shapes, + const vtkm::cont::ArrayHandle& numIndices, + const vtkm::cont::ArrayHandle& connectivity, const std::string& coordsNm = "coords", + const std::string& cellNm = "cells") { - return DataSetBuilderExplicit::BuildDataSet(coords, - shapes, - numIndices, - connectivity, - coordsNm, + return DataSetBuilderExplicit::BuildDataSet(xVals, yVals, zVals, shapes, numIndices, + connectivity, coordsNm, cellNm); + } + + template + VTKM_CONT static vtkm::cont::DataSet Create(const std::vector>& coords, + const std::vector& shapes, + const std::vector& numIndices, + const std::vector& connectivity, + const std::string& coordsNm = "coords", + const std::string& cellNm = "cells"); + + template + VTKM_CONT static vtkm::cont::DataSet Create( + const vtkm::cont::ArrayHandle>& coords, + const vtkm::cont::ArrayHandle& shapes, + const vtkm::cont::ArrayHandle& numIndices, + const vtkm::cont::ArrayHandle& connectivity, const std::string& coordsNm = "coords", + const std::string& cellNm = "cells") + { + return DataSetBuilderExplicit::BuildDataSet(coords, shapes, numIndices, connectivity, coordsNm, cellNm); } - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const std::vector > &coords, - CellShapeTag tag, - vtkm::IdComponent numberOfPointsPerCell, - const std::vector &connectivity, - const std::string &coordsNm="coords", - const std::string &cellNm="cells"); + template + VTKM_CONT static vtkm::cont::DataSet Create(const std::vector>& coords, + CellShapeTag tag, + vtkm::IdComponent numberOfPointsPerCell, + const std::vector& connectivity, + const std::string& coordsNm = "coords", + const std::string& cellNm = "cells"); - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const vtkm::cont::ArrayHandle > &coords, - CellShapeTag tag, - vtkm::IdComponent numberOfPointsPerCell, - const vtkm::cont::ArrayHandle &connectivity, - const std::string &coordsNm="coords", - const std::string &cellNm="cells") + template + VTKM_CONT static vtkm::cont::DataSet Create( + const vtkm::cont::ArrayHandle>& coords, CellShapeTag tag, + vtkm::IdComponent numberOfPointsPerCell, const vtkm::cont::ArrayHandle& connectivity, + const std::string& coordsNm = "coords", const std::string& cellNm = "cells") { - return DataSetBuilderExplicit::BuildDataSet(coords, - tag, - numberOfPointsPerCell, - connectivity, - coordsNm, - cellNm); + return DataSetBuilderExplicit::BuildDataSet(coords, tag, numberOfPointsPerCell, connectivity, + coordsNm, cellNm); } private: - template - static - vtkm::cont::DataSet - BuildDataSet(const vtkm::cont::ArrayHandle &X, - const vtkm::cont::ArrayHandle &Y, - const vtkm::cont::ArrayHandle &Z, - const vtkm::cont::ArrayHandle &shapes, - const vtkm::cont::ArrayHandle &numIndices, - const vtkm::cont::ArrayHandle &connectivity, - const std::string &coordsNm, - const std::string &cellNm); + template + static vtkm::cont::DataSet BuildDataSet( + const vtkm::cont::ArrayHandle& X, const vtkm::cont::ArrayHandle& Y, + const vtkm::cont::ArrayHandle& Z, const vtkm::cont::ArrayHandle& shapes, + const vtkm::cont::ArrayHandle& numIndices, + const vtkm::cont::ArrayHandle& connectivity, const std::string& coordsNm, + const std::string& cellNm); - template - VTKM_CONT - static - vtkm::cont::DataSet - BuildDataSet(const vtkm::cont::ArrayHandle > &coords, - const vtkm::cont::ArrayHandle &shapes, - const vtkm::cont::ArrayHandle &numIndices, - const vtkm::cont::ArrayHandle &connectivity, - const std::string &coordsNm, - const std::string &cellNm); + template + VTKM_CONT static vtkm::cont::DataSet BuildDataSet( + const vtkm::cont::ArrayHandle>& coords, + const vtkm::cont::ArrayHandle& shapes, + const vtkm::cont::ArrayHandle& numIndices, + const vtkm::cont::ArrayHandle& connectivity, const std::string& coordsNm, + const std::string& cellNm); - template - VTKM_CONT - static - vtkm::cont::DataSet - BuildDataSet(const vtkm::cont::ArrayHandle > &coords, - CellShapeTag tag, - vtkm::IdComponent numberOfPointsPerCell, - const vtkm::cont::ArrayHandle &connectivity, - const std::string &coordsNm, - const std::string &cellNm); + template + VTKM_CONT static vtkm::cont::DataSet BuildDataSet( + const vtkm::cont::ArrayHandle>& coords, CellShapeTag tag, + vtkm::IdComponent numberOfPointsPerCell, const vtkm::cont::ArrayHandle& connectivity, + const std::string& coordsNm, const std::string& cellNm); }; -template -inline VTKM_CONT -vtkm::cont::DataSet -DataSetBuilderExplicit::Create(const std::vector &xVals, - const std::vector &yVals, - const std::vector &zVals, - const std::vector &shapes, - const std::vector &numIndices, - const std::vector &connectivity, - const std::string &coordsNm, - const std::string &cellNm) +template +inline VTKM_CONT vtkm::cont::DataSet DataSetBuilderExplicit::Create( + const std::vector& xVals, const std::vector& yVals, const std::vector& zVals, + const std::vector& shapes, const std::vector& numIndices, + const std::vector& connectivity, const std::string& coordsNm, const std::string& cellNm) { - VTKM_ASSERT(xVals.size() == yVals.size() && - yVals.size() == zVals.size() && - xVals.size() > 0); + VTKM_ASSERT(xVals.size() == yVals.size() && yVals.size() == zVals.size() && xVals.size() > 0); vtkm::cont::ArrayHandle Xc, Yc, Zc; DataSetBuilderExplicit::CopyInto(xVals, Xc); @@ -243,32 +178,24 @@ DataSetBuilderExplicit::Create(const std::vector &xVals, DataSetBuilderExplicit::CopyInto(numIndices, Nc); DataSetBuilderExplicit::CopyInto(connectivity, Cc); - return DataSetBuilderExplicit::BuildDataSet( - Xc,Yc,Zc, Sc,Nc,Cc, coordsNm, cellNm); + return DataSetBuilderExplicit::BuildDataSet(Xc, Yc, Zc, Sc, Nc, Cc, coordsNm, cellNm); } -template -inline VTKM_CONT -vtkm::cont::DataSet -DataSetBuilderExplicit::BuildDataSet( - const vtkm::cont::ArrayHandle &X, - const vtkm::cont::ArrayHandle &Y, - const vtkm::cont::ArrayHandle &Z, - const vtkm::cont::ArrayHandle &shapes, - const vtkm::cont::ArrayHandle &numIndices, - const vtkm::cont::ArrayHandle &connectivity, - const std::string &coordsNm, - const std::string &cellNm) +template +inline VTKM_CONT vtkm::cont::DataSet DataSetBuilderExplicit::BuildDataSet( + const vtkm::cont::ArrayHandle& X, const vtkm::cont::ArrayHandle& Y, + const vtkm::cont::ArrayHandle& Z, const vtkm::cont::ArrayHandle& shapes, + const vtkm::cont::ArrayHandle& numIndices, + const vtkm::cont::ArrayHandle& connectivity, const std::string& coordsNm, + const std::string& cellNm) { VTKM_ASSERT(X.GetNumberOfValues() == Y.GetNumberOfValues() && - Y.GetNumberOfValues() == Z.GetNumberOfValues() && - X.GetNumberOfValues() > 0 && - shapes.GetNumberOfValues() == numIndices.GetNumberOfValues()); + Y.GetNumberOfValues() == Z.GetNumberOfValues() && X.GetNumberOfValues() > 0 && + shapes.GetNumberOfValues() == numIndices.GetNumberOfValues()); vtkm::cont::DataSet dataSet; dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem(coordsNm, - make_ArrayHandleCompositeVector(X,0, Y,0, Z,0))); + vtkm::cont::CoordinateSystem(coordsNm, make_ArrayHandleCompositeVector(X, 0, Y, 0, Z, 0))); vtkm::Id nPts = X.GetNumberOfValues(); vtkm::cont::CellSetExplicit<> cellSet(cellNm); @@ -278,17 +205,13 @@ DataSetBuilderExplicit::BuildDataSet( return dataSet; } -template -inline VTKM_CONT -vtkm::cont::DataSet -DataSetBuilderExplicit::Create(const std::vector > &coords, - const std::vector &shapes, - const std::vector &numIndices, - const std::vector &connectivity, - const std::string &coordsNm, - const std::string &cellNm) +template +inline VTKM_CONT vtkm::cont::DataSet DataSetBuilderExplicit::Create( + const std::vector>& coords, const std::vector& shapes, + const std::vector& numIndices, const std::vector& connectivity, + const std::string& coordsNm, const std::string& cellNm) { - vtkm::cont::ArrayHandle > coordsArray; + vtkm::cont::ArrayHandle> coordsArray; DataSetBuilderExplicit::CopyInto(coords, coordsArray); vtkm::cont::ArrayHandle Sc; @@ -298,24 +221,20 @@ DataSetBuilderExplicit::Create(const std::vector > &coords, DataSetBuilderExplicit::CopyInto(numIndices, Nc); DataSetBuilderExplicit::CopyInto(connectivity, Cc); - return DataSetBuilderExplicit::Create( - coordsArray, Sc, Nc, Cc, coordsNm, cellNm); + return DataSetBuilderExplicit::Create(coordsArray, Sc, Nc, Cc, coordsNm, cellNm); } -template -inline VTKM_CONT -vtkm::cont::DataSet -DataSetBuilderExplicit::BuildDataSet(const vtkm::cont::ArrayHandle > &coords, - const vtkm::cont::ArrayHandle &shapes, - const vtkm::cont::ArrayHandle &numIndices, - const vtkm::cont::ArrayHandle &connectivity, - const std::string &coordsNm, - const std::string &cellNm) +template +inline VTKM_CONT vtkm::cont::DataSet DataSetBuilderExplicit::BuildDataSet( + const vtkm::cont::ArrayHandle>& coords, + const vtkm::cont::ArrayHandle& shapes, + const vtkm::cont::ArrayHandle& numIndices, + const vtkm::cont::ArrayHandle& connectivity, const std::string& coordsNm, + const std::string& cellNm) { vtkm::cont::DataSet dataSet; - dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem(coordsNm, - coords)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem(coordsNm, coords)); vtkm::Id nPts = static_cast(coords.GetNumberOfValues()); vtkm::cont::CellSetExplicit<> cellSet(cellNm); @@ -325,51 +244,39 @@ DataSetBuilderExplicit::BuildDataSet(const vtkm::cont::ArrayHandle -inline VTKM_CONT -vtkm::cont::DataSet -DataSetBuilderExplicit::Create(const std::vector > &coords, - CellShapeTag tag, - vtkm::IdComponent numberOfPointsPerCell, - const std::vector &connectivity, - const std::string &coordsNm, - const std::string &cellNm) +template +inline VTKM_CONT vtkm::cont::DataSet DataSetBuilderExplicit::Create( + const std::vector>& coords, CellShapeTag tag, + vtkm::IdComponent numberOfPointsPerCell, const std::vector& connectivity, + const std::string& coordsNm, const std::string& cellNm) { - vtkm::cont::ArrayHandle > coordsArray; + vtkm::cont::ArrayHandle> coordsArray; DataSetBuilderExplicit::CopyInto(coords, coordsArray); vtkm::cont::ArrayHandle Cc; DataSetBuilderExplicit::CopyInto(connectivity, Cc); - return DataSetBuilderExplicit::Create( - coordsArray, tag, numberOfPointsPerCell, Cc, coordsNm, cellNm); + return DataSetBuilderExplicit::Create(coordsArray, tag, numberOfPointsPerCell, Cc, coordsNm, + cellNm); } -template -inline VTKM_CONT -vtkm::cont::DataSet -DataSetBuilderExplicit::BuildDataSet(const vtkm::cont::ArrayHandle > &coords, - CellShapeTag tag, - vtkm::IdComponent numberOfPointsPerCell, - const vtkm::cont::ArrayHandle &connectivity, - const std::string &coordsNm, - const std::string &cellNm) +template +inline VTKM_CONT vtkm::cont::DataSet DataSetBuilderExplicit::BuildDataSet( + const vtkm::cont::ArrayHandle>& coords, CellShapeTag tag, + vtkm::IdComponent numberOfPointsPerCell, const vtkm::cont::ArrayHandle& connectivity, + const std::string& coordsNm, const std::string& cellNm) { vtkm::cont::DataSet dataSet; dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem(coordsNm, coords)); vtkm::cont::CellSetSingleType<> cellSet(cellNm); - cellSet.Fill(coords.GetNumberOfValues(), - tag.Id, - numberOfPointsPerCell, - connectivity); + cellSet.Fill(coords.GetNumberOfValues(), tag.Id, numberOfPointsPerCell, connectivity); dataSet.AddCellSet(cellSet); return dataSet; } - class DataSetBuilderExplicitIterative { public: @@ -377,8 +284,7 @@ public: DataSetBuilderExplicitIterative() {} VTKM_CONT - void Begin(const std::string &coordName="coords", - const std::string &cellName="cells") + void Begin(const std::string& coordName = "coords", const std::string& cellName = "cells") { this->coordNm = coordName; this->cellNm = cellName; @@ -393,7 +299,7 @@ public: vtkm::cont::DataSet Create(); VTKM_CONT - vtkm::Id AddPoint(const vtkm::Vec &pt) + vtkm::Id AddPoint(const vtkm::Vec& pt) { points.push_back(pt); vtkm::Id id = static_cast(points.size()); @@ -401,29 +307,24 @@ public: } VTKM_CONT - vtkm::Id AddPoint(const vtkm::Float32 &x, - const vtkm::Float32 &y, - const vtkm::Float32 &z=0) + vtkm::Id AddPoint(const vtkm::Float32& x, const vtkm::Float32& y, const vtkm::Float32& z = 0) { - points.push_back(vtkm::make_Vec(x,y,z)); + points.push_back(vtkm::make_Vec(x, y, z)); vtkm::Id id = static_cast(points.size()); return id; } - template - VTKM_CONT - vtkm::Id AddPoint(const T &x, const T &y, const T &z=0) + template + VTKM_CONT vtkm::Id AddPoint(const T& x, const T& y, const T& z = 0) { - return AddPoint(static_cast(x), - static_cast(y), - static_cast(z)); + return AddPoint(static_cast(x), static_cast(y), + static_cast(z)); } - template - VTKM_CONT - vtkm::Id AddPoint(const vtkm::Vec &pt) + template + VTKM_CONT vtkm::Id AddPoint(const vtkm::Vec& pt) { - return AddPoint(static_cast >(pt)); + return AddPoint(static_cast>(pt)); } //Define cells. @@ -435,7 +336,7 @@ public: } VTKM_CONT - void AddCell(const vtkm::UInt8 &shape, const std::vector &conn) + void AddCell(const vtkm::UInt8& shape, const std::vector& conn) { this->shapes.push_back(shape); this->numIdx.push_back(static_cast(conn.size())); @@ -443,14 +344,14 @@ public: } VTKM_CONT - void AddCell(const vtkm::UInt8 &shape, const vtkm::Id *conn, const vtkm::IdComponent &n) + void AddCell(const vtkm::UInt8& shape, const vtkm::Id* conn, const vtkm::IdComponent& n) { this->shapes.push_back(shape); this->numIdx.push_back(n); for (int i = 0; i < n; i++) - { - connectivity.push_back(conn[i]); - } + { + connectivity.push_back(conn[i]); + } } VTKM_CONT @@ -464,21 +365,17 @@ public: private: std::string coordNm, cellNm; - std::vector > points; + std::vector> points; std::vector shapes; std::vector numIdx; std::vector connectivity; }; -inline VTKM_CONT -vtkm::cont::DataSet -DataSetBuilderExplicitIterative::Create() +inline VTKM_CONT vtkm::cont::DataSet DataSetBuilderExplicitIterative::Create() { DataSetBuilderExplicit dsb; return dsb.Create(points, shapes, numIdx, connectivity, coordNm, cellNm); } - - } } diff --git a/vtkm/cont/DataSetBuilderRectilinear.h b/vtkm/cont/DataSetBuilderRectilinear.h index ad941cbd3..7860fa3ff 100644 --- a/vtkm/cont/DataSetBuilderRectilinear.h +++ b/vtkm/cont/DataSetBuilderRectilinear.h @@ -26,235 +26,188 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ class DataSetBuilderRectilinear { - template - VTKM_CONT - static - void CopyInto(const std::vector& input, - vtkm::cont::ArrayHandle& output ) + template + VTKM_CONT static void CopyInto(const std::vector& input, vtkm::cont::ArrayHandle& output) { - DataSetBuilderRectilinear::CopyInto( - vtkm::cont::make_ArrayHandle(input), output); + DataSetBuilderRectilinear::CopyInto(vtkm::cont::make_ArrayHandle(input), output); } - template - VTKM_CONT - static - void CopyInto(const vtkm::cont::ArrayHandle& input, - vtkm::cont::ArrayHandle& output ) + template + VTKM_CONT static void CopyInto(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output) { - typedef vtkm::cont::DeviceAdapterAlgorithm< - vtkm::cont::DeviceAdapterTagSerial> Algorithm; + typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; Algorithm::Copy(input, output); } - template - VTKM_CONT - static - void CopyInto(const T* input, vtkm::Id len, - vtkm::cont::ArrayHandle& output ) + template + VTKM_CONT static void CopyInto(const T* input, vtkm::Id len, vtkm::cont::ArrayHandle& output) { - DataSetBuilderRectilinear::CopyInto( - vtkm::cont::make_ArrayHandle(input, len), output); + DataSetBuilderRectilinear::CopyInto(vtkm::cont::make_ArrayHandle(input, len), output); } + public: VTKM_CONT DataSetBuilderRectilinear() {} //1D grids. - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const std::vector &xvals, - std::string coordNm="coords", std::string cellNm="cells") + template + VTKM_CONT static vtkm::cont::DataSet Create(const std::vector& xvals, + std::string coordNm = "coords", + std::string cellNm = "cells") { - std::vector yvals(1,0), zvals(1,0); - return DataSetBuilderRectilinear::BuildDataSet( - 1, xvals,yvals,zvals, coordNm,cellNm); + std::vector yvals(1, 0), zvals(1, 0); + return DataSetBuilderRectilinear::BuildDataSet(1, xvals, yvals, zvals, coordNm, cellNm); } - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(vtkm::Id nx, T *xvals, - std::string coordNm="coords", std::string cellNm="cells") + template + VTKM_CONT static vtkm::cont::DataSet Create(vtkm::Id nx, T* xvals, std::string coordNm = "coords", + std::string cellNm = "cells") { T yvals = 0, zvals = 0; - return DataSetBuilderRectilinear::BuildDataSet( - 1, nx,1, 1, xvals, &yvals, &zvals, coordNm, cellNm); + return DataSetBuilderRectilinear::BuildDataSet(1, nx, 1, 1, xvals, &yvals, &zvals, coordNm, + cellNm); } - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const vtkm::cont::ArrayHandle &xvals, - std::string coordNm="coords", std::string cellNm="cells") + template + VTKM_CONT static vtkm::cont::DataSet Create(const vtkm::cont::ArrayHandle& xvals, + std::string coordNm = "coords", + std::string cellNm = "cells") { vtkm::cont::ArrayHandle yvals, zvals; yvals.Allocate(1); - yvals.GetPortalControl().Set(0,0.0); + yvals.GetPortalControl().Set(0, 0.0); zvals.Allocate(1); - zvals.GetPortalControl().Set(0,0.0); - return DataSetBuilderRectilinear::BuildDataSet( - 1, xvals,yvals,zvals, coordNm, cellNm); + zvals.GetPortalControl().Set(0, 0.0); + return DataSetBuilderRectilinear::BuildDataSet(1, xvals, yvals, zvals, coordNm, cellNm); } //2D grids. - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const std::vector &xvals, const std::vector &yvals, - std::string coordNm="coords", std::string cellNm="cells") + template + VTKM_CONT static vtkm::cont::DataSet Create(const std::vector& xvals, + const std::vector& yvals, + std::string coordNm = "coords", + std::string cellNm = "cells") { - std::vector zvals(1,0); - return DataSetBuilderRectilinear::BuildDataSet( - 2, xvals,yvals,zvals, coordNm,cellNm); + std::vector zvals(1, 0); + return DataSetBuilderRectilinear::BuildDataSet(2, xvals, yvals, zvals, coordNm, cellNm); } - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(vtkm::Id nx, vtkm::Id ny, - T *xvals, T *yvals, - std::string coordNm="coords", std::string cellNm="cells") + template + VTKM_CONT static vtkm::cont::DataSet Create(vtkm::Id nx, vtkm::Id ny, T* xvals, T* yvals, + std::string coordNm = "coords", + std::string cellNm = "cells") { T zvals = 0; - return DataSetBuilderRectilinear::BuildDataSet( - 2, nx,ny, 1, xvals, yvals, &zvals, coordNm, cellNm); + return DataSetBuilderRectilinear::BuildDataSet(2, nx, ny, 1, xvals, yvals, &zvals, coordNm, + cellNm); } - - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const vtkm::cont::ArrayHandle &xvals, - const vtkm::cont::ArrayHandle &yvals, - std::string coordNm="coords", std::string cellNm="cells") + + template + VTKM_CONT static vtkm::cont::DataSet Create(const vtkm::cont::ArrayHandle& xvals, + const vtkm::cont::ArrayHandle& yvals, + std::string coordNm = "coords", + std::string cellNm = "cells") { vtkm::cont::ArrayHandle zvals; zvals.Allocate(1); - zvals.GetPortalControl().Set(0,0.0); - return DataSetBuilderRectilinear::BuildDataSet( - 2, xvals,yvals,zvals, coordNm, cellNm); + zvals.GetPortalControl().Set(0, 0.0); + return DataSetBuilderRectilinear::BuildDataSet(2, xvals, yvals, zvals, coordNm, cellNm); } //3D grids. - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(vtkm::Id nx, vtkm::Id ny, vtkm::Id nz, - T *xvals, T *yvals, T *zvals, - std::string coordNm="coords", std::string cellNm="cells") + template + VTKM_CONT static vtkm::cont::DataSet Create(vtkm::Id nx, vtkm::Id ny, vtkm::Id nz, T* xvals, + T* yvals, T* zvals, std::string coordNm = "coords", + std::string cellNm = "cells") { - return DataSetBuilderRectilinear::BuildDataSet( - 3, nx,ny,nz, xvals, yvals, zvals, coordNm, cellNm); + return DataSetBuilderRectilinear::BuildDataSet(3, nx, ny, nz, xvals, yvals, zvals, coordNm, + cellNm); } - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const std::vector &xvals, - const std::vector &yvals, - const std::vector &zvals, - std::string coordNm="coords", std::string cellNm="cells") + template + VTKM_CONT static vtkm::cont::DataSet Create(const std::vector& xvals, + const std::vector& yvals, + const std::vector& zvals, + std::string coordNm = "coords", + std::string cellNm = "cells") { - return DataSetBuilderRectilinear::BuildDataSet( - 3, xvals, yvals, zvals, coordNm, cellNm); + return DataSetBuilderRectilinear::BuildDataSet(3, xvals, yvals, zvals, coordNm, cellNm); } - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const vtkm::cont::ArrayHandle &xvals, - const vtkm::cont::ArrayHandle &yvals, - const vtkm::cont::ArrayHandle &zvals, - std::string coordNm="coords", std::string cellNm="cells") + template + VTKM_CONT static vtkm::cont::DataSet Create(const vtkm::cont::ArrayHandle& xvals, + const vtkm::cont::ArrayHandle& yvals, + const vtkm::cont::ArrayHandle& zvals, + std::string coordNm = "coords", + std::string cellNm = "cells") { - return DataSetBuilderRectilinear::BuildDataSet( - 3, xvals,yvals,zvals, coordNm, cellNm); + return DataSetBuilderRectilinear::BuildDataSet(3, xvals, yvals, zvals, coordNm, cellNm); } private: - template - VTKM_CONT - static - vtkm::cont::DataSet - BuildDataSet(int dim, - const std::vector &xvals, - const std::vector &yvals, - const std::vector &zvals, - std::string coordNm, std::string cellNm) + template + VTKM_CONT static vtkm::cont::DataSet BuildDataSet(int dim, const std::vector& xvals, + const std::vector& yvals, + const std::vector& zvals, + std::string coordNm, std::string cellNm) { - VTKM_ASSERT((dim==1 && xvals.size()>1 && yvals.size()==1 && zvals.size()==1) || - (dim==2 && xvals.size()>1 && yvals.size()>1 && zvals.size()==1) || - (dim==3 && xvals.size()>1 && yvals.size()>1 && zvals.size()>1)); + VTKM_ASSERT((dim == 1 && xvals.size() > 1 && yvals.size() == 1 && zvals.size() == 1) || + (dim == 2 && xvals.size() > 1 && yvals.size() > 1 && zvals.size() == 1) || + (dim == 3 && xvals.size() > 1 && yvals.size() > 1 && zvals.size() > 1)); vtkm::cont::ArrayHandle Xc, Yc, Zc; DataSetBuilderRectilinear::CopyInto(xvals, Xc); DataSetBuilderRectilinear::CopyInto(yvals, Yc); DataSetBuilderRectilinear::CopyInto(zvals, Zc); - return DataSetBuilderRectilinear::BuildDataSet( - dim, Xc,Yc,Zc, coordNm, cellNm); + return DataSetBuilderRectilinear::BuildDataSet(dim, Xc, Yc, Zc, coordNm, cellNm); } - template - VTKM_CONT - static - vtkm::cont::DataSet - BuildDataSet(int dim, vtkm::Id nx, vtkm::Id ny, vtkm::Id nz, - const T *xvals, const T *yvals, const T *zvals, - std::string coordNm, std::string cellNm) + template + VTKM_CONT static vtkm::cont::DataSet BuildDataSet(int dim, vtkm::Id nx, vtkm::Id ny, vtkm::Id nz, + const T* xvals, const T* yvals, const T* zvals, + std::string coordNm, std::string cellNm) { - VTKM_ASSERT((dim==1 && nx>1 && ny==1 && nz==1) || - (dim==2 && nx>1 && ny>1 && nz==1) || - (dim==3 && nx>1 && ny>1 && nz>1)); + VTKM_ASSERT((dim == 1 && nx > 1 && ny == 1 && nz == 1) || + (dim == 2 && nx > 1 && ny > 1 && nz == 1) || + (dim == 3 && nx > 1 && ny > 1 && nz > 1)); vtkm::cont::ArrayHandle Xc, Yc, Zc; DataSetBuilderRectilinear::CopyInto(xvals, nx, Xc); DataSetBuilderRectilinear::CopyInto(yvals, ny, Yc); DataSetBuilderRectilinear::CopyInto(zvals, nz, Zc); - return DataSetBuilderRectilinear::BuildDataSet( - dim, Xc,Yc,Zc, coordNm, cellNm); - } + return DataSetBuilderRectilinear::BuildDataSet(dim, Xc, Yc, Zc, coordNm, cellNm); + } - template - VTKM_CONT - static - vtkm::cont::DataSet - BuildDataSet(int dim, - const vtkm::cont::ArrayHandle &X, - const vtkm::cont::ArrayHandle &Y, - const vtkm::cont::ArrayHandle &Z, - std::string coordNm, std::string cellNm) + template + VTKM_CONT static vtkm::cont::DataSet BuildDataSet(int dim, const vtkm::cont::ArrayHandle& X, + const vtkm::cont::ArrayHandle& Y, + const vtkm::cont::ArrayHandle& Z, + std::string coordNm, std::string cellNm) { vtkm::cont::DataSet dataSet; //Convert all coordinates to floatDefault. - vtkm::cont::ArrayHandleCartesianProduct< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > coords; + vtkm::cont::ArrayHandleCartesianProduct, + vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle> + coords; vtkm::cont::ArrayHandle Xc, Yc, Zc; DataSetBuilderRectilinear::CopyInto(X, Xc); DataSetBuilderRectilinear::CopyInto(Y, Yc); DataSetBuilderRectilinear::CopyInto(Z, Zc); - coords = vtkm::cont::make_ArrayHandleCartesianProduct(Xc,Yc,Zc); + coords = vtkm::cont::make_ArrayHandleCartesianProduct(Xc, Yc, Zc); vtkm::cont::CoordinateSystem cs(coordNm, coords); dataSet.AddCoordinateSystem(cs); @@ -262,25 +215,23 @@ private: { vtkm::cont::CellSetStructured<1> cellSet(cellNm); cellSet.SetPointDimensions(Xc.GetNumberOfValues()); - dataSet.AddCellSet(cellSet); + dataSet.AddCellSet(cellSet); } else if (dim == 2) { vtkm::cont::CellSetStructured<2> cellSet(cellNm); - cellSet.SetPointDimensions(vtkm::make_Vec(Xc.GetNumberOfValues(), - Yc.GetNumberOfValues())); + cellSet.SetPointDimensions(vtkm::make_Vec(Xc.GetNumberOfValues(), Yc.GetNumberOfValues())); dataSet.AddCellSet(cellSet); } else if (dim == 3) { vtkm::cont::CellSetStructured<3> cellSet(cellNm); - cellSet.SetPointDimensions(vtkm::make_Vec(Xc.GetNumberOfValues(), - Yc.GetNumberOfValues(), - Zc.GetNumberOfValues())); + cellSet.SetPointDimensions( + vtkm::make_Vec(Xc.GetNumberOfValues(), Yc.GetNumberOfValues(), Zc.GetNumberOfValues())); dataSet.AddCellSet(cellSet); } else - throw vtkm::cont::ErrorBadValue("Invalid cell set dimension"); + throw vtkm::cont::ErrorBadValue("Invalid cell set dimension"); return dataSet; } diff --git a/vtkm/cont/DataSetBuilderUniform.h b/vtkm/cont/DataSetBuilderUniform.h index 183aea98b..66ad2f6bb 100644 --- a/vtkm/cont/DataSetBuilderUniform.h +++ b/vtkm/cont/DataSetBuilderUniform.h @@ -23,153 +23,131 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ class DataSetBuilderUniform { - typedef vtkm::Vec VecType; + typedef vtkm::Vec VecType; + public: - VTKM_CONT - DataSetBuilderUniform() {} + VTKM_CONT + DataSetBuilderUniform() {} - //1D uniform grid - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const vtkm::Id &dimension, - const T &origin, const T &spacing, - std::string coordNm="coords", std::string cellNm="cells") - { - return DataSetBuilderUniform::CreateDataSet(1, - dimension,1,1, - VecType(static_cast(origin), - 0,0), - VecType(static_cast(spacing), - 1,1), - coordNm, cellNm); - } - - VTKM_CONT - static - vtkm::cont::DataSet - Create(const vtkm::Id &dimension, - std::string coordNm="coords", std::string cellNm="cells") - { - return CreateDataSet(1, dimension, 1, 1, - VecType(0), VecType(1), coordNm, cellNm); - } + //1D uniform grid + template + VTKM_CONT static vtkm::cont::DataSet Create(const vtkm::Id& dimension, const T& origin, + const T& spacing, std::string coordNm = "coords", + std::string cellNm = "cells") + { + return DataSetBuilderUniform::CreateDataSet( + 1, dimension, 1, 1, VecType(static_cast(origin), 0, 0), + VecType(static_cast(spacing), 1, 1), coordNm, cellNm); + } - //2D uniform grids. - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const vtkm::Id2 &dimensions, - const vtkm::Vec &origin, const vtkm::Vec &spacing, - std::string coordNm="coords", std::string cellNm="cells") - { - return DataSetBuilderUniform::CreateDataSet(2, - dimensions[0],dimensions[1],1, - VecType(static_cast(origin[0]), - static_cast(origin[1]), - 0), - VecType(static_cast(spacing[0]), - static_cast(spacing[1]), - 1), - coordNm, cellNm); - } - - VTKM_CONT - static - vtkm::cont::DataSet - Create(const vtkm::Id2 &dimensions, - std::string coordNm="coords", std::string cellNm="cells") - { - return CreateDataSet(2, dimensions[0], dimensions[1], 1, - VecType(0), VecType(1), coordNm, cellNm); - } + VTKM_CONT + static vtkm::cont::DataSet Create(const vtkm::Id& dimension, std::string coordNm = "coords", + std::string cellNm = "cells") + { + return CreateDataSet(1, dimension, 1, 1, VecType(0), VecType(1), coordNm, cellNm); + } - //3D uniform grids. - template - VTKM_CONT - static - vtkm::cont::DataSet - Create(const vtkm::Id3 &dimensions, - const vtkm::Vec &origin, const vtkm::Vec &spacing, - std::string coordNm="coords", std::string cellNm="cells") - { - return DataSetBuilderUniform::CreateDataSet(3, - dimensions[0],dimensions[1],dimensions[2], - VecType(static_cast(origin[0]), - static_cast(origin[1]), - static_cast(origin[2])), - VecType(static_cast(spacing[0]), - static_cast(spacing[1]), - static_cast(spacing[2])), - coordNm, cellNm); - } - - VTKM_CONT - static - vtkm::cont::DataSet - Create(const vtkm::Id3 &dimensions, - std::string coordNm="coords", std::string cellNm="cells") - { - return CreateDataSet(3, dimensions[0], dimensions[1], dimensions[2], - VecType(0), VecType(1), coordNm, cellNm); - } + //2D uniform grids. + template + VTKM_CONT static vtkm::cont::DataSet Create(const vtkm::Id2& dimensions, + const vtkm::Vec& origin, + const vtkm::Vec& spacing, + std::string coordNm = "coords", + std::string cellNm = "cells") + { + return DataSetBuilderUniform::CreateDataSet( + 2, dimensions[0], dimensions[1], 1, VecType(static_cast(origin[0]), + static_cast(origin[1]), 0), + VecType(static_cast(spacing[0]), + static_cast(spacing[1]), 1), + coordNm, cellNm); + } + + VTKM_CONT + static vtkm::cont::DataSet Create(const vtkm::Id2& dimensions, std::string coordNm = "coords", + std::string cellNm = "cells") + { + return CreateDataSet(2, dimensions[0], dimensions[1], 1, VecType(0), VecType(1), coordNm, + cellNm); + } + + //3D uniform grids. + template + VTKM_CONT static vtkm::cont::DataSet Create(const vtkm::Id3& dimensions, + const vtkm::Vec& origin, + const vtkm::Vec& spacing, + std::string coordNm = "coords", + std::string cellNm = "cells") + { + return DataSetBuilderUniform::CreateDataSet( + 3, dimensions[0], dimensions[1], dimensions[2], + VecType(static_cast(origin[0]), + static_cast(origin[1]), + static_cast(origin[2])), + VecType(static_cast(spacing[0]), + static_cast(spacing[1]), + static_cast(spacing[2])), + coordNm, cellNm); + } + + VTKM_CONT + static vtkm::cont::DataSet Create(const vtkm::Id3& dimensions, std::string coordNm = "coords", + std::string cellNm = "cells") + { + return CreateDataSet(3, dimensions[0], dimensions[1], dimensions[2], VecType(0), VecType(1), + coordNm, cellNm); + } private: - VTKM_CONT - static - vtkm::cont::DataSet - CreateDataSet(int dim, vtkm::Id nx, vtkm::Id ny, vtkm::Id nz, - const vtkm::Vec &origin, - const vtkm::Vec &spacing, - std::string coordNm, std::string cellNm) + VTKM_CONT + static vtkm::cont::DataSet CreateDataSet(int dim, vtkm::Id nx, vtkm::Id ny, vtkm::Id nz, + const vtkm::Vec& origin, + const vtkm::Vec& spacing, + std::string coordNm, std::string cellNm) + { + VTKM_ASSERT((dim == 1 && nx > 1 && ny == 1 && nz == 1) || + (dim == 2 && nx > 1 && ny > 1 && nz == 1) || + (dim == 3 && nx > 1 && ny > 1 && nz > 1)); + VTKM_ASSERT(spacing[0] > 0 && spacing[1] > 0 && spacing[2] > 0); + + vtkm::cont::DataSet dataSet; + vtkm::cont::ArrayHandleUniformPointCoordinates coords(vtkm::Id3(nx, ny, nz), origin, spacing); + vtkm::cont::CoordinateSystem cs(coordNm, coords); + dataSet.AddCoordinateSystem(cs); + + if (dim == 1) { - VTKM_ASSERT((dim==1 && nx>1 && ny==1 && nz==1) || - (dim==2 && nx>1 && ny>1 && nz==1) || - (dim==3 && nx>1 && ny>1 && nz>1)); - VTKM_ASSERT(spacing[0]>0 && spacing[1]>0 && spacing[2]>0); - - vtkm::cont::DataSet dataSet; - vtkm::cont::ArrayHandleUniformPointCoordinates - coords(vtkm::Id3(nx, ny, nz), - origin, spacing); - vtkm::cont::CoordinateSystem cs(coordNm, coords); - dataSet.AddCoordinateSystem(cs); - - if (dim == 1) - { - vtkm::cont::CellSetStructured<1> cellSet(cellNm); - cellSet.SetPointDimensions(nx); - dataSet.AddCellSet(cellSet); - } - else if (dim == 2) - { - vtkm::cont::CellSetStructured<2> cellSet(cellNm); - cellSet.SetPointDimensions(vtkm::make_Vec(nx,ny)); - dataSet.AddCellSet(cellSet); - } - else if (dim == 3) - { - vtkm::cont::CellSetStructured<3> cellSet(cellNm); - cellSet.SetPointDimensions(vtkm::make_Vec(nx,ny,nz)); - dataSet.AddCellSet(cellSet); - } - else - throw vtkm::cont::ErrorBadValue("Invalid cell set dimension"); - - return dataSet; + vtkm::cont::CellSetStructured<1> cellSet(cellNm); + cellSet.SetPointDimensions(nx); + dataSet.AddCellSet(cellSet); } + else if (dim == 2) + { + vtkm::cont::CellSetStructured<2> cellSet(cellNm); + cellSet.SetPointDimensions(vtkm::make_Vec(nx, ny)); + dataSet.AddCellSet(cellSet); + } + else if (dim == 3) + { + vtkm::cont::CellSetStructured<3> cellSet(cellNm); + cellSet.SetPointDimensions(vtkm::make_Vec(nx, ny, nz)); + dataSet.AddCellSet(cellSet); + } + else + throw vtkm::cont::ErrorBadValue("Invalid cell set dimension"); + return dataSet; + } }; } // namespace cont } // namespace vtkm - #endif //vtk_m_cont_DataSetBuilderUniform_h diff --git a/vtkm/cont/DataSetFieldAdd.h b/vtkm/cont/DataSetFieldAdd.h index 655edb236..9fea00d81 100644 --- a/vtkm/cont/DataSetFieldAdd.h +++ b/vtkm/cont/DataSetFieldAdd.h @@ -24,161 +24,110 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ class DataSetFieldAdd { public: - VTKM_CONT - DataSetFieldAdd() {} + VTKM_CONT + DataSetFieldAdd() {} - //Point centered fields. - VTKM_CONT - static - void AddPointField(vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - const vtkm::cont::DynamicArrayHandle &field) - { - dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_POINTS, - field)); - } + //Point centered fields. + VTKM_CONT + static void AddPointField(vtkm::cont::DataSet& dataSet, const std::string& fieldName, + const vtkm::cont::DynamicArrayHandle& field) + { + dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_POINTS, field)); + } - template - VTKM_CONT - static - void AddPointField(vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - const vtkm::cont::ArrayHandle &field) - { - dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_POINTS, - field)); - } + template + VTKM_CONT static void AddPointField(vtkm::cont::DataSet& dataSet, const std::string& fieldName, + const vtkm::cont::ArrayHandle& field) + { + dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_POINTS, field)); + } - template - VTKM_CONT - static - void AddPointField(vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - const std::vector &field) - { - dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_POINTS, - field)); - } + template + VTKM_CONT static void AddPointField(vtkm::cont::DataSet& dataSet, const std::string& fieldName, + const std::vector& field) + { + dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_POINTS, field)); + } - template - VTKM_CONT - static - void AddPointField(vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - const T *field, const vtkm::Id &n) - { - dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_POINTS, - field, n)); - } + template + VTKM_CONT static void AddPointField(vtkm::cont::DataSet& dataSet, const std::string& fieldName, + const T* field, const vtkm::Id& n) + { + dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_POINTS, field, n)); + } - //Cell centered field - VTKM_CONT - static - void AddCellField(vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - const vtkm::cont::DynamicArrayHandle &field, - const std::string &cellSetName) - { - dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_CELL_SET, - cellSetName, field)); - } + //Cell centered field + VTKM_CONT + static void AddCellField(vtkm::cont::DataSet& dataSet, const std::string& fieldName, + const vtkm::cont::DynamicArrayHandle& field, + const std::string& cellSetName) + { + dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_CELL_SET, cellSetName, field)); + } - template - VTKM_CONT - static - void AddCellField(vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - const vtkm::cont::ArrayHandle &field, - const std::string &cellSetName) - { - dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_CELL_SET, - cellSetName, field)); - } + template + VTKM_CONT static void AddCellField(vtkm::cont::DataSet& dataSet, const std::string& fieldName, + const vtkm::cont::ArrayHandle& field, + const std::string& cellSetName) + { + dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_CELL_SET, cellSetName, field)); + } - template - VTKM_CONT - static - void AddCellField(vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - const std::vector &field, - const std::string &cellSetName) - { - dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_CELL_SET, - cellSetName, field)); - } + template + VTKM_CONT static void AddCellField(vtkm::cont::DataSet& dataSet, const std::string& fieldName, + const std::vector& field, const std::string& cellSetName) + { + dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_CELL_SET, cellSetName, field)); + } - template - VTKM_CONT - static - void AddCellField(vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - const T *field, const vtkm::Id &n, - const std::string &cellSetName) - { - dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_CELL_SET, - cellSetName, field, n)); - } - - VTKM_CONT - static - void AddCellField(vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - const vtkm::cont::DynamicArrayHandle &field, - vtkm::Id cellSetIndex = 0) - { - std::string cellSetName = - dataSet.GetCellSet(cellSetIndex).GetName(); - DataSetFieldAdd::AddCellField(dataSet, fieldName, field, cellSetName); - } - template - VTKM_CONT - static - void AddCellField(vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - const vtkm::cont::ArrayHandle &field, - vtkm::Id cellSetIndex = 0) - { - std::string cellSetName = - dataSet.GetCellSet(cellSetIndex).GetName(); - DataSetFieldAdd::AddCellField(dataSet, fieldName, field, cellSetName); - } - template - VTKM_CONT - static - void AddCellField(vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - const std::vector &field, - vtkm::Id cellSetIndex = 0) - { - std::string cellSetName = - dataSet.GetCellSet(cellSetIndex).GetName(); - DataSetFieldAdd::AddCellField(dataSet, fieldName, field, cellSetName); - } - - template - VTKM_CONT - static - void AddCellField(vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - const T *field, const vtkm::Id &n, - vtkm::Id cellSetIndex = 0) - { - std::string cellSetName = - dataSet.GetCellSet(cellSetIndex).GetName(); - DataSetFieldAdd::AddCellField(dataSet, fieldName, field, n, cellSetName); - } + template + VTKM_CONT static void AddCellField(vtkm::cont::DataSet& dataSet, const std::string& fieldName, + const T* field, const vtkm::Id& n, + const std::string& cellSetName) + { + dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_CELL_SET, cellSetName, field, n)); + } + VTKM_CONT + static void AddCellField(vtkm::cont::DataSet& dataSet, const std::string& fieldName, + const vtkm::cont::DynamicArrayHandle& field, vtkm::Id cellSetIndex = 0) + { + std::string cellSetName = dataSet.GetCellSet(cellSetIndex).GetName(); + DataSetFieldAdd::AddCellField(dataSet, fieldName, field, cellSetName); + } + template + VTKM_CONT static void AddCellField(vtkm::cont::DataSet& dataSet, const std::string& fieldName, + const vtkm::cont::ArrayHandle& field, + vtkm::Id cellSetIndex = 0) + { + std::string cellSetName = dataSet.GetCellSet(cellSetIndex).GetName(); + DataSetFieldAdd::AddCellField(dataSet, fieldName, field, cellSetName); + } + template + VTKM_CONT static void AddCellField(vtkm::cont::DataSet& dataSet, const std::string& fieldName, + const std::vector& field, vtkm::Id cellSetIndex = 0) + { + std::string cellSetName = dataSet.GetCellSet(cellSetIndex).GetName(); + DataSetFieldAdd::AddCellField(dataSet, fieldName, field, cellSetName); + } + template + VTKM_CONT static void AddCellField(vtkm::cont::DataSet& dataSet, const std::string& fieldName, + const T* field, const vtkm::Id& n, vtkm::Id cellSetIndex = 0) + { + std::string cellSetName = dataSet.GetCellSet(cellSetIndex).GetName(); + DataSetFieldAdd::AddCellField(dataSet, fieldName, field, n, cellSetName); + } }; - } -}//namespace vtkm::cont - +} //namespace vtkm::cont #endif //vtk_m_cont_DataSetFieldAdd_h diff --git a/vtkm/cont/DeviceAdapter.h b/vtkm/cont/DeviceAdapter.h index 5d2cb8214..ab7987731 100644 --- a/vtkm/cont/DeviceAdapter.h +++ b/vtkm/cont/DeviceAdapter.h @@ -31,8 +31,10 @@ #include // clang-format on -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ #ifdef VTKM_DOXYGEN_ONLY /// \brief A tag specifying the interface between the control and execution environments. @@ -62,15 +64,16 @@ namespace cont { /// documentation on all the functions and classes that must be /// overloaded/specialized to create a new device adapter. /// -struct DeviceAdapterTag___ { }; +struct DeviceAdapterTag___ +{ +}; #endif //VTKM_DOXYGEN_ONLY -namespace internal { +namespace internal +{ } // namespace internal - } } // namespace vtkm::cont - #endif //vtk_m_cont_DeviceAdapter_h diff --git a/vtkm/cont/DeviceAdapterAlgorithm.h b/vtkm/cont/DeviceAdapterAlgorithm.h index fa4d18390..435881c56 100644 --- a/vtkm/cont/DeviceAdapterAlgorithm.h +++ b/vtkm/cont/DeviceAdapterAlgorithm.h @@ -34,8 +34,10 @@ #include #endif -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// \brief Struct containing device adapter algorithms. /// @@ -44,7 +46,7 @@ namespace cont { /// struct is not implemented. Device adapter implementations must specialize /// the template. /// -template +template struct DeviceAdapterAlgorithm #ifdef VTKM_DOXYGEN_ONLY { @@ -54,9 +56,9 @@ struct DeviceAdapterAlgorithm /// allocated to the same size of \c input. If output has already been /// allocated we will reallocate and clear any current values. /// - template - VTKM_CONT static void Copy(const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle &output); + template + VTKM_CONT static void Copy(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output); /// \brief Conditionally copy elements in the input array to the output array. /// @@ -69,11 +71,10 @@ struct DeviceAdapterAlgorithm /// the number of elements that will be removed by the stream compaction /// algorithm. /// - template - VTKM_CONT static void CopyIf( - const vtkm::cont::ArrayHandle &input, - const vtkm::cont::ArrayHandle &stencil, - vtkm::cont::ArrayHandle &output); + template + VTKM_CONT static void CopyIf(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& stencil, + vtkm::cont::ArrayHandle& output); /// \brief Conditionally copy elements in the input array to the output array. /// @@ -86,13 +87,11 @@ struct DeviceAdapterAlgorithm /// the number of elements that will be removed by the stream compaction /// algorithm. /// - template - VTKM_CONT static void CopyIf( - const vtkm::cont::ArrayHandle &input, - const vtkm::cont::ArrayHandle &stencil, - vtkm::cont::ArrayHandle &output, - UnaryPredicate unary_predicate); + template + VTKM_CONT static void CopyIf(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& stencil, + vtkm::cont::ArrayHandle& output, + UnaryPredicate unary_predicate); /// \brief Copy the contents of a section of one ArrayHandle to another /// @@ -111,12 +110,11 @@ struct DeviceAdapterAlgorithm /// \par Requirements: /// \arg \c input must already be sorted /// - template - VTKM_CONT static bool CopySubRange(const vtkm::cont::ArrayHandle &input, - vtkm::Id inputStartIndex, - vtkm::Id numberOfElementsToCopy, - vtkm::cont::ArrayHandle &output, - vtkm::Id outputIndex = 0); + template + VTKM_CONT static bool CopySubRange(const vtkm::cont::ArrayHandle& input, + vtkm::Id inputStartIndex, vtkm::Id numberOfElementsToCopy, + vtkm::cont::ArrayHandle& output, + vtkm::Id outputIndex = 0); /// \brief Output is the first index in input for each item in values that wouldn't alter the ordering of input /// @@ -127,11 +125,10 @@ struct DeviceAdapterAlgorithm /// \par Requirements: /// \arg \c input must already be sorted /// - template - VTKM_CONT static void LowerBounds( - const vtkm::cont::ArrayHandle& input, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output); + template + VTKM_CONT static void LowerBounds(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output); /// \brief Output is the first index in input for each item in values that wouldn't alter the ordering of input /// @@ -143,12 +140,11 @@ struct DeviceAdapterAlgorithm /// \par Requirements: /// \arg \c input must already be sorted /// - template - VTKM_CONT static void LowerBounds( - const vtkm::cont::ArrayHandle& input, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output, - BinaryCompare binary_compare); + template + VTKM_CONT static void LowerBounds(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output, + BinaryCompare binary_compare); /// \brief A special version of LowerBounds that does an in place operation. /// @@ -157,10 +153,9 @@ struct DeviceAdapterAlgorithm /// where it occurs. Because this is an in place operation, the type of the /// arrays is limited to vtkm::Id. /// - template - VTKM_CONT static void LowerBounds( - const vtkm::cont::ArrayHandle& input, - vtkm::cont::ArrayHandle& values_output); + template + VTKM_CONT static void LowerBounds(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& values_output); /// \brief Compute a accumulated sum operation on the input ArrayHandle /// @@ -171,10 +166,8 @@ struct DeviceAdapterAlgorithm /// or you will get inconsistent results. /// /// \return The total sum. - template - VTKM_CONT static U Reduce( - const vtkm::cont::ArrayHandle &input, - U initialValue); + template + VTKM_CONT static U Reduce(const vtkm::cont::ArrayHandle& input, U initialValue); /// \brief Compute a accumulated sum operation on the input ArrayHandle /// @@ -186,11 +179,9 @@ struct DeviceAdapterAlgorithm /// inconsistent results. /// /// \return The total sum. - template - VTKM_CONT static U Reduce( - const vtkm::cont::ArrayHandle &input, - U initialValue, - BinaryFunctor binary_functor); + template + VTKM_CONT static U Reduce(const vtkm::cont::ArrayHandle& input, U initialValue, + BinaryFunctor binary_functor); /// \brief Compute a accumulated sum operation on the input key value pairs /// @@ -200,16 +191,13 @@ struct DeviceAdapterAlgorithm /// values inside that range. Once finished a single key and value is created /// for each segment. /// - template - VTKM_CONT static void ReduceByKey( - const vtkm::cont::ArrayHandle &keys, - const vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle& keys_output, - vtkm::cont::ArrayHandle& values_output, - BinaryFunctor binary_functor); + template + VTKM_CONT static void ReduceByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& keys_output, + vtkm::cont::ArrayHandle& values_output, + BinaryFunctor binary_functor); /// \brief Compute an inclusive prefix sum operation on the input ArrayHandle. /// @@ -223,10 +211,9 @@ struct DeviceAdapterAlgorithm /// /// \return The total sum. /// - template - VTKM_CONT static T ScanInclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output); + template + VTKM_CONT static T ScanInclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output); /// \brief Streaming version of scan inclusive /// @@ -234,11 +221,10 @@ struct DeviceAdapterAlgorithm /// /// \return The total sum. /// - template - VTKM_CONT static T StreamingScanInclusive( - const vtkm::Id numBlocks, - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output); + template + VTKM_CONT static T StreamingScanInclusive(const vtkm::Id numBlocks, + const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output); /// \brief Compute an inclusive prefix sum operation on the input ArrayHandle. /// @@ -252,11 +238,10 @@ struct DeviceAdapterAlgorithm /// /// \return The total sum. /// - template - VTKM_CONT static T ScanInclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output, - BinaryFunctor binary_functor); + template + VTKM_CONT static T ScanInclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output, + BinaryFunctor binary_functor); /// \brief Compute a segmented inclusive prefix sum operation on the input key value pairs. /// @@ -266,14 +251,12 @@ struct DeviceAdapterAlgorithm /// applied to all values inside that range. Once finished the result is /// stored in \c values_output ArrayHandle. /// - template - VTKM_CONT static void ScanInclusiveByKey( - const vtkm::cont::ArrayHandle &keys, - const vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle &values_output, - BinaryFunctor binary_functor); + template + VTKM_CONT static void ScanInclusiveByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& values_output, + BinaryFunctor binary_functor); /// \brief Compute a segmented inclusive prefix sum operation on the input key value pairs. /// @@ -282,13 +265,10 @@ struct DeviceAdapterAlgorithm /// equal keys with the binary operation vtkm::Add applied to all values inside /// that range. Once finished the result is stored in \c values_output ArrayHandle. /// - template - VTKM_CONT static void ScanInclusiveByKey( - const vtkm::cont::ArrayHandle &keys, - const vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle &values_output); + template + VTKM_CONT static void ScanInclusiveByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& values_output); /// \brief Streaming version of scan inclusive /// @@ -296,12 +276,11 @@ struct DeviceAdapterAlgorithm /// /// \return The total sum. /// - template - VTKM_CONT static T StreamingScanInclusive( - const vtkm::Id numBlocks, - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output, - BinaryFunctor binary_functor); + template + VTKM_CONT static T StreamingScanInclusive(const vtkm::Id numBlocks, + const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output, + BinaryFunctor binary_functor); /// \brief Compute an exclusive prefix sum operation on the input ArrayHandle. /// @@ -315,10 +294,9 @@ struct DeviceAdapterAlgorithm /// /// \return The total sum. /// - template - VTKM_CONT static T ScanExclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output); + template + VTKM_CONT static T ScanExclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output); /// \brief Compute a segmented exclusive prefix sum operation on the input key value pairs. /// @@ -328,15 +306,11 @@ struct DeviceAdapterAlgorithm /// applied to all values inside that range. Once finished the result is /// stored in \c values_output ArrayHandle. /// - template - VTKM_CONT static void ScanExclusiveByKey( - const vtkm::cont::ArrayHandle& keys, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output, - const U& initialValue, - BinaryFunctor binaryFunctor); + template + VTKM_CONT static void ScanExclusiveByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output, + const U& initialValue, BinaryFunctor binaryFunctor); /// \brief Compute a segmented exclusive prefix sum operation on the input key value pairs. /// @@ -345,11 +319,10 @@ struct DeviceAdapterAlgorithm /// equal keys with the binary operation vtkm::Add applied to all values inside /// that range. Once finished the result is stored in \c values_output ArrayHandle. /// - template - VTKM_CONT static void ScanExclusiveByKey( - const vtkm::cont::ArrayHandle& keys, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output); + template + VTKM_CONT static void ScanExclusiveByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output); /// \brief Schedule many instances of a function to run on concurrent threads. /// @@ -368,9 +341,8 @@ struct DeviceAdapterAlgorithm /// instance of the invocation. There should be one invocation for each index /// in the range [0, \c numInstances]. /// - template - VTKM_CONT static void Schedule(Functor functor, - vtkm::Id numInstances); + template + VTKM_CONT static void Schedule(Functor functor, vtkm::Id numInstances); /// \brief Schedule many instances of a function to run on concurrent threads. /// @@ -394,17 +366,16 @@ struct DeviceAdapterAlgorithm /// If 1D indices are used, this Schedule behaves as if Schedule(functor, /// rangeMax[0]*rangeMax[1]*rangeMax[2]) were called. /// - template - VTKM_CONT static void Schedule(Functor functor, - vtkm::Id3 rangeMax); + template + VTKM_CONT static void Schedule(Functor functor, vtkm::Id3 rangeMax); /// \brief Unstable ascending sort of input array. /// /// Sorts the contents of \c values so that they in ascending value. Doesn't /// guarantee stability /// - template - VTKM_CONT static void Sort(vtkm::cont::ArrayHandle &values); + template + VTKM_CONT static void Sort(vtkm::cont::ArrayHandle& values); /// \brief Unstable ascending sort of input array. /// @@ -413,19 +384,18 @@ struct DeviceAdapterAlgorithm /// /// BinaryCompare should be a strict weak ordering comparison operator /// - template - VTKM_CONT static void Sort(vtkm::cont::ArrayHandle &values, - BinaryCompare binary_compare); + template + VTKM_CONT static void Sort(vtkm::cont::ArrayHandle& values, + BinaryCompare binary_compare); /// \brief Unstable ascending sort of keys and values. /// /// Sorts the contents of \c keys and \c values so that they in ascending value based /// on the values of keys. /// - template - VTKM_CONT static void SortByKey( - vtkm::cont::ArrayHandle &keys, - vtkm::cont::ArrayHandle &values); + template + VTKM_CONT static void SortByKey(vtkm::cont::ArrayHandle& keys, + vtkm::cont::ArrayHandle& values); /// \brief Unstable ascending sort of keys and values. /// @@ -434,17 +404,16 @@ struct DeviceAdapterAlgorithm /// /// BinaryCompare should be a strict weak ordering comparison operator /// - template - VTKM_CONT static void SortByKey( - vtkm::cont::ArrayHandle &keys, - vtkm::cont::ArrayHandle &values, - BinaryCompare binary_compare) + template + VTKM_CONT static void SortByKey(vtkm::cont::ArrayHandle& keys, + vtkm::cont::ArrayHandle& values, + BinaryCompare binary_compare) - /// \brief Completes any asynchronous operations running on the device. - /// - /// Waits for any asynchronous operations running on the device to complete. - /// - VTKM_CONT static void Synchronize(); + /// \brief Completes any asynchronous operations running on the device. + /// + /// Waits for any asynchronous operations running on the device to complete. + /// + VTKM_CONT static void Synchronize(); /// \brief Reduce an array to only the unique values it contains /// @@ -453,9 +422,8 @@ struct DeviceAdapterAlgorithm /// duplicate values that aren't adjacent. Note the values array size might /// be modified by this operation. /// - template - VTKM_CONT static void Unique( - vtkm::cont::ArrayHandle& values); + template + VTKM_CONT static void Unique(vtkm::cont::ArrayHandle& values); /// \brief Reduce an array to only the unique values it contains /// @@ -467,10 +435,9 @@ struct DeviceAdapterAlgorithm /// Uses the custom binary predicate Comparison to determine if something /// is unique. The predicate must return true if the two items are the same. /// - template - VTKM_CONT static void Unique( - vtkm::cont::ArrayHandle& values, - BinaryCompare binary_compare); + template + VTKM_CONT static void Unique(vtkm::cont::ArrayHandle& values, + BinaryCompare binary_compare); /// \brief Output is the last index in input for each item in values that wouldn't alter the ordering of input /// @@ -481,11 +448,10 @@ struct DeviceAdapterAlgorithm /// \par Requirements: /// \arg \c input must already be sorted /// - template - VTKM_CONT static void UpperBounds( - const vtkm::cont::ArrayHandle& input, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output); + template + VTKM_CONT static void UpperBounds(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output); /// \brief Output is the last index in input for each item in values that wouldn't alter the ordering of input /// @@ -497,12 +463,11 @@ struct DeviceAdapterAlgorithm /// \par Requirements: /// \arg \c input must already be sorted /// - template - VTKM_CONT static void UpperBounds( - const vtkm::cont::ArrayHandle& input, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output, - BinaryCompare binary_compare); + template + VTKM_CONT static void UpperBounds(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output, + BinaryCompare binary_compare); /// \brief A special version of UpperBounds that does an in place operation. /// @@ -511,13 +476,12 @@ struct DeviceAdapterAlgorithm /// \c input where it occurs. Because this is an in place operation, the type /// of the arrays is limited to vtkm::Id. /// - template - VTKM_CONT static void UpperBounds( - const vtkm::cont::ArrayHandle& input, - vtkm::cont::ArrayHandle& values_output); + template + VTKM_CONT static void UpperBounds(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& values_output); }; -#else // VTKM_DOXYGEN_ONLY - ; +#else // VTKM_DOXYGEN_ONLY + ; #endif //VTKM_DOXYGEN_ONLY /// \brief Class providing a device-specific timer. @@ -527,26 +491,20 @@ struct DeviceAdapterAlgorithm /// one (in conjunction with DeviceAdapterAlgorithm) where appropriate. The /// interface for this class is exactly the same as vtkm::cont::Timer. /// -template +template class DeviceAdapterTimerImplementation { public: /// When a timer is constructed, all threads are synchronized and the /// current time is marked so that GetElapsedTime returns the number of /// seconds elapsed since the construction. - VTKM_CONT DeviceAdapterTimerImplementation() - { - this->Reset(); - } + VTKM_CONT DeviceAdapterTimerImplementation() { this->Reset(); } /// Resets the timer. All further calls to GetElapsedTime will report the /// number of seconds elapsed since the call to this. This method /// synchronizes all asynchronous operations. /// - VTKM_CONT void Reset() - { - this->StartTime = this->GetCurrentTime(); - } + VTKM_CONT void Reset() { this->StartTime = this->GetCurrentTime(); } /// Returns the elapsed time in seconds between the construction of this /// class or the last call to Reset and the time this function is called. The @@ -560,9 +518,8 @@ public: vtkm::Float64 elapsedTime; elapsedTime = vtkm::Float64(currentTime.Seconds - this->StartTime.Seconds); - elapsedTime += - (vtkm::Float64(currentTime.Microseconds - this->StartTime.Microseconds) - /vtkm::Float64(1000000)); + elapsedTime += (vtkm::Float64(currentTime.Microseconds - this->StartTime.Microseconds) / + vtkm::Float64(1000000)); return elapsedTime; } @@ -575,15 +532,14 @@ public: VTKM_CONT TimeStamp GetCurrentTime() { - vtkm::cont::DeviceAdapterAlgorithm - ::Synchronize(); + vtkm::cont::DeviceAdapterAlgorithm::Synchronize(); TimeStamp retval; #ifdef _WIN32 timeb currentTime; ::ftime(¤tTime); retval.Seconds = currentTime.time; - retval.Microseconds = 1000*currentTime.millitm; + retval.Microseconds = 1000 * currentTime.millitm; #else timeval currentTime; gettimeofday(¤tTime, nullptr); @@ -603,11 +559,10 @@ public: /// physical hardware or other special runtime requirements should provide /// one (in conjunction with DeviceAdapterAlgorithm) where appropriate. /// -template +template class DeviceAdapterRuntimeDetector { public: - /// Returns true if the given device adapter is supported on the current /// machine. /// @@ -626,9 +581,8 @@ public: /// The class provide the actual implementation used by /// vtkm::cont::DeviceAdapterAtomicArrayImplementation. /// -template +template class DeviceAdapterAtomicArrayImplementation; - } } // namespace vtkm::cont diff --git a/vtkm/cont/DeviceAdapterListTag.h b/vtkm/cont/DeviceAdapterListTag.h index a6ae7b66e..993829be8 100644 --- a/vtkm/cont/DeviceAdapterListTag.h +++ b/vtkm/cont/DeviceAdapterListTag.h @@ -21,8 +21,7 @@ #define vtk_m_cont_DeviceAdapterListTag_h #ifndef VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG -#define VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG \ - ::vtkm::cont::DeviceAdapterListTagCommon +#define VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG ::vtkm::cont::DeviceAdapterListTagCommon #endif #include @@ -31,15 +30,16 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ struct DeviceAdapterListTagCommon - : vtkm::ListTagBase< - vtkm::cont::DeviceAdapterTagCuda, - vtkm::cont::DeviceAdapterTagTBB, - vtkm::cont::DeviceAdapterTagSerial> { }; - + : vtkm::ListTagBase +{ +}; } } // namespace vtkm::cont diff --git a/vtkm/cont/DynamicArrayHandle.cxx b/vtkm/cont/DynamicArrayHandle.cxx index 109dd7be2..401c95d31 100644 --- a/vtkm/cont/DynamicArrayHandle.cxx +++ b/vtkm/cont/DynamicArrayHandle.cxx @@ -20,20 +20,20 @@ #include -namespace vtkm { -namespace cont { -namespace detail { +namespace vtkm +{ +namespace cont +{ +namespace detail +{ PolymorphicArrayHandleContainerBase::PolymorphicArrayHandleContainerBase() { - } PolymorphicArrayHandleContainerBase::~PolymorphicArrayHandleContainerBase() { - } - } } } // namespace vtkm::cont::detail diff --git a/vtkm/cont/DynamicArrayHandle.h b/vtkm/cont/DynamicArrayHandle.h index 54b5cc8a4..e1eb525ee 100644 --- a/vtkm/cont/DynamicArrayHandle.h +++ b/vtkm/cont/DynamicArrayHandle.h @@ -33,14 +33,17 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ // Forward declaration -template +template class DynamicArrayHandleBase; -namespace detail { +namespace detail +{ /// \brief Base class for PolymorphicArrayHandleContainer /// @@ -54,10 +57,9 @@ struct VTKM_CONT_EXPORT PolymorphicArrayHandleContainerBase virtual vtkm::IdComponent GetNumberOfComponents() const = 0; virtual vtkm::Id GetNumberOfValues() const = 0; - virtual void PrintSummary(std::ostream &out) const = 0; + virtual void PrintSummary(std::ostream& out) const = 0; - virtual std::shared_ptr - NewInstance() const = 0; + virtual std::shared_ptr NewInstance() const = 0; }; /// \brief ArrayHandle container that can use C++ run-time type information. @@ -68,41 +70,42 @@ struct VTKM_CONT_EXPORT PolymorphicArrayHandleContainerBase /// (with different template parameters) so that it can polymorphically answer /// simple questions about the object. /// -template +template struct VTKM_ALWAYS_EXPORT PolymorphicArrayHandleContainer - : public PolymorphicArrayHandleContainerBase + : public PolymorphicArrayHandleContainerBase { typedef vtkm::cont::ArrayHandle ArrayHandleType; ArrayHandleType Array; VTKM_CONT - PolymorphicArrayHandleContainer() : Array() { } + PolymorphicArrayHandleContainer() + : Array() + { + } VTKM_CONT - PolymorphicArrayHandleContainer(const ArrayHandleType &array) - : Array(array) { } + PolymorphicArrayHandleContainer(const ArrayHandleType& array) + : Array(array) + { + } virtual vtkm::IdComponent GetNumberOfComponents() const { return vtkm::VecTraits::NUM_COMPONENTS; } - virtual vtkm::Id GetNumberOfValues() const - { - return this->Array.GetNumberOfValues(); - } + virtual vtkm::Id GetNumberOfValues() const { return this->Array.GetNumberOfValues(); } - virtual void PrintSummary(std::ostream &out) const + virtual void PrintSummary(std::ostream& out) const { vtkm::cont::printSummary_ArrayHandle(this->Array, out); } - virtual std::shared_ptr - NewInstance() const + virtual std::shared_ptr NewInstance() const { return std::shared_ptr( - new PolymorphicArrayHandleContainer()); + new PolymorphicArrayHandleContainer()); } }; @@ -111,12 +114,11 @@ struct VTKM_ALWAYS_EXPORT PolymorphicArrayHandleContainer // construct a DynamicArrayHandle from another DynamicArrayHandle of any other // type. Since you cannot partially specialize friendship, use this accessor // class to get at the internals for the copy constructor. -struct DynamicArrayHandleCopyHelper { - template - VTKM_CONT - static - const std::shared_ptr& - GetArrayHandleContainer(const vtkm::cont::DynamicArrayHandleBase &src) +struct DynamicArrayHandleCopyHelper +{ + template + VTKM_CONT static const std::shared_ptr& + GetArrayHandleContainer(const vtkm::cont::DynamicArrayHandleBase& src) { return src.ArrayContainer; } @@ -125,16 +127,13 @@ struct DynamicArrayHandleCopyHelper { // A simple function to downcast an ArrayHandle encapsulated in a // PolymorphicArrayHandleContainerBase to the given type of ArrayHandle. If the // conversion cannot be done, nullptr is returned. -template -VTKM_CONT -vtkm::cont::ArrayHandle * -DynamicArrayHandleTryCast( - vtkm::cont::detail::PolymorphicArrayHandleContainerBase *arrayContainer) +template +VTKM_CONT vtkm::cont::ArrayHandle* DynamicArrayHandleTryCast( + vtkm::cont::detail::PolymorphicArrayHandleContainerBase* arrayContainer) { - vtkm::cont::detail::PolymorphicArrayHandleContainer * - downcastContainer = dynamic_cast< - vtkm::cont::detail::PolymorphicArrayHandleContainer *>( - arrayContainer); + vtkm::cont::detail::PolymorphicArrayHandleContainer* downcastContainer = + dynamic_cast*>( + arrayContainer); if (downcastContainer != nullptr) { return &downcastContainer->Array; @@ -145,13 +144,11 @@ DynamicArrayHandleTryCast( } } -template -VTKM_CONT -vtkm::cont::ArrayHandle * -DynamicArrayHandleTryCast( +template +VTKM_CONT vtkm::cont::ArrayHandle* DynamicArrayHandleTryCast( const std::shared_ptr& arrayContainer) { - return detail::DynamicArrayHandleTryCast(arrayContainer.get()); + return detail::DynamicArrayHandleTryCast(arrayContainer.get()); } } // namespace detail @@ -189,39 +186,38 @@ DynamicArrayHandleTryCast( /// typedef of \c DynamicArrayHandleBase with the default type and storage /// lists. /// -template +template class VTKM_ALWAYS_EXPORT DynamicArrayHandleBase { public: VTKM_CONT - DynamicArrayHandleBase() { } + DynamicArrayHandleBase() {} - template - VTKM_CONT - DynamicArrayHandleBase(const vtkm::cont::ArrayHandle &array) - : ArrayContainer(new vtkm::cont::detail::PolymorphicArrayHandleContainer< - Type,Storage>(array)) - { } + template + VTKM_CONT DynamicArrayHandleBase(const vtkm::cont::ArrayHandle& array) + : ArrayContainer(new vtkm::cont::detail::PolymorphicArrayHandleContainer(array)) + { + } VTKM_CONT - DynamicArrayHandleBase( - const DynamicArrayHandleBase &src) - : ArrayContainer(src.ArrayContainer) { } + DynamicArrayHandleBase(const DynamicArrayHandleBase& src) + : ArrayContainer(src.ArrayContainer) + { + } - template - VTKM_CONT - explicit DynamicArrayHandleBase( - const DynamicArrayHandleBase &src) - : ArrayContainer( - detail::DynamicArrayHandleCopyHelper::GetArrayHandleContainer(src)) - { } + template + VTKM_CONT explicit DynamicArrayHandleBase( + const DynamicArrayHandleBase& src) + : ArrayContainer(detail::DynamicArrayHandleCopyHelper::GetArrayHandleContainer(src)) + { + } VTKM_CONT - ~DynamicArrayHandleBase() { } + ~DynamicArrayHandleBase() {} VTKM_CONT - vtkm::cont::DynamicArrayHandleBase & - operator=(const vtkm::cont::DynamicArrayHandleBase &src) + vtkm::cont::DynamicArrayHandleBase& operator=( + const vtkm::cont::DynamicArrayHandleBase& src) { this->ArrayContainer = src.ArrayContainer; return *this; @@ -230,32 +226,28 @@ public: /// Returns true if this array is of the provided type and uses the provided /// storage. /// - template - VTKM_CONT - bool IsTypeAndStorage() const { - return ( - detail::DynamicArrayHandleTryCast(this->ArrayContainer) - != nullptr); + template + VTKM_CONT bool IsTypeAndStorage() const + { + return (detail::DynamicArrayHandleTryCast(this->ArrayContainer) != nullptr); } /// Returns true if this array matches the array handle type passed in. /// - template - VTKM_CONT - bool IsType() + template + VTKM_CONT bool IsType() { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); typedef typename ArrayHandleType::ValueType ValueType; typedef typename ArrayHandleType::StorageTag StorageTag; - return this->IsTypeAndStorage(); + return this->IsTypeAndStorage(); } /// Returns true if the array held in this object is the same (or equivalent) /// type as the object given. /// - template - VTKM_CONT - bool IsSameType(const ArrayHandleType &) + template + VTKM_CONT bool IsSameType(const ArrayHandleType&) { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); return this->IsType(); @@ -266,12 +258,11 @@ public: /// \c IsTypeAndStorage to check if the cast can happen. /// /// - template - VTKM_CONT - vtkm::cont::ArrayHandle - CastToTypeStorage() const { - vtkm::cont::ArrayHandle *downcastArray = - detail::DynamicArrayHandleTryCast(this->ArrayContainer); + template + VTKM_CONT vtkm::cont::ArrayHandle CastToTypeStorage() const + { + vtkm::cont::ArrayHandle* downcastArray = + detail::DynamicArrayHandleTryCast(this->ArrayContainer); if (downcastArray == nullptr) { throw vtkm::cont::ErrorBadType("Bad cast of dynamic array."); @@ -286,16 +277,16 @@ public: /// ErrorBadType if the cast does not work. Use \c IsType /// to check if the cast can happen. /// - template - VTKM_CONT - ArrayHandleType Cast() const { + template + VTKM_CONT ArrayHandleType Cast() const + { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); typedef typename ArrayHandleType::ValueType ValueType; typedef typename ArrayHandleType::StorageTag StorageTag; // Technically, this method returns a copy of the \c ArrayHandle. But // because \c ArrayHandle acts like a shared pointer, it is valid to // do the copy. - return this->CastToTypeStorage(); + return this->CastToTypeStorage(); } /// Given a refernce to an ArrayHandle object, casts this array to the @@ -306,9 +297,9 @@ public: /// Note that this is a shallow copy. The data are not copied and a change /// in the data in one array will be reflected in the other. /// - template - VTKM_CONT - void CopyTo(ArrayHandleType &array) const { + template + VTKM_CONT void CopyTo(ArrayHandleType& array) const + { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); array = this->Cast(); } @@ -320,12 +311,12 @@ public: /// narrow down (or expand) the types when using an array of particular /// constraints. /// - template - VTKM_CONT - DynamicArrayHandleBase - ResetTypeList(NewTypeList = NewTypeList()) const { + template + VTKM_CONT DynamicArrayHandleBase ResetTypeList( + NewTypeList = NewTypeList()) const + { VTKM_IS_LIST_TAG(NewTypeList); - return DynamicArrayHandleBase(*this); + return DynamicArrayHandleBase(*this); } /// Changes the array storage types to try casting to when resolving this @@ -335,12 +326,12 @@ public: /// method is particularly useful to narrow down (or expand) the types when /// using an array of particular constraints. /// - template - VTKM_CONT - DynamicArrayHandleBase - ResetStorageList(NewStorageList = NewStorageList()) const { + template + VTKM_CONT DynamicArrayHandleBase ResetStorageList( + NewStorageList = NewStorageList()) const + { VTKM_IS_LIST_TAG(NewStorageList); - return DynamicArrayHandleBase(*this); + return DynamicArrayHandleBase(*this); } /// Changes the value, and array storage types to try casting to when @@ -349,14 +340,13 @@ public: /// object. This method is particularly useful when you have both custom /// types and traits. /// - template - VTKM_CONT - DynamicArrayHandleBase - ResetTypeAndStorageLists(NewTypeList = NewTypeList(), - NewStorageList = NewStorageList()) const { + template + VTKM_CONT DynamicArrayHandleBase ResetTypeAndStorageLists( + NewTypeList = NewTypeList(), NewStorageList = NewStorageList()) const + { VTKM_IS_LIST_TAG(NewTypeList); VTKM_IS_LIST_TAG(NewStorageList); - return DynamicArrayHandleBase(*this); + return DynamicArrayHandleBase(*this); } /// Attempts to cast the held array to a specific value type and storage, @@ -366,9 +356,8 @@ public: /// two lists to VTKM_DEFAULT_TYPE_LIST_TAG and VTK_DEFAULT_STORAGE_LIST_TAG, /// respectively. /// - template - VTKM_CONT - void CastAndCall(const Functor &f) const; + template + VTKM_CONT void CastAndCall(const Functor& f) const; /// \brief Create a new array of the same type as this array. /// @@ -377,9 +366,9 @@ public: /// creating output arrays that should be the same type as some input array. /// VTKM_CONT - DynamicArrayHandleBase NewInstance() const + DynamicArrayHandleBase NewInstance() const { - DynamicArrayHandleBase newArray; + DynamicArrayHandleBase newArray; newArray.ArrayContainer = this->ArrayContainer->NewInstance(); return newArray; } @@ -399,86 +388,90 @@ public: /// \brief Get the number of values in the array. /// VTKM_CONT - vtkm::Id GetNumberOfValues() const - { - return this->ArrayContainer->GetNumberOfValues(); - } + vtkm::Id GetNumberOfValues() const { return this->ArrayContainer->GetNumberOfValues(); } VTKM_CONT - void PrintSummary(std::ostream &out) const - { - this->ArrayContainer->PrintSummary(out); - } + void PrintSummary(std::ostream& out) const { this->ArrayContainer->PrintSummary(out); } private: - std::shared_ptr - ArrayContainer; + std::shared_ptr ArrayContainer; friend struct detail::DynamicArrayHandleCopyHelper; }; -typedef vtkm::cont::DynamicArrayHandleBase< - VTKM_DEFAULT_TYPE_LIST_TAG, VTKM_DEFAULT_STORAGE_LIST_TAG> - DynamicArrayHandle; +typedef vtkm::cont::DynamicArrayHandleBase + DynamicArrayHandle; -namespace detail { +namespace detail +{ -template -struct DynamicArrayHandleTryStorage { +template +struct DynamicArrayHandleTryStorage +{ const DynamicArrayHandle* const Array; - const Functor &Function; + const Functor& Function; bool FoundCast; VTKM_CONT - DynamicArrayHandleTryStorage(const DynamicArrayHandle &array, - const Functor &f) - : Array(&array), Function(f), FoundCast(false) { } + DynamicArrayHandleTryStorage(const DynamicArrayHandle& array, const Functor& f) + : Array(&array) + , Function(f) + , FoundCast(false) + { + } - template - VTKM_CONT - void operator()(Storage) { + template + VTKM_CONT void operator()(Storage) + { this->DoCast(Storage(), - typename vtkm::cont::internal::IsValidArrayHandle::type()); + typename vtkm::cont::internal::IsValidArrayHandle::type()); } private: - template + template void DoCast(Storage, std::true_type) { - if (!this->FoundCast && - this->Array->template IsTypeAndStorage()) + if (!this->FoundCast && this->Array->template IsTypeAndStorage()) { - this->Function(this->Array->template CastToTypeStorage()); + this->Function(this->Array->template CastToTypeStorage()); this->FoundCast = true; } } - template + template void DoCast(Storage, std::false_type) { // This type of array handle cannot exist, so do nothing. } - void operator=(const DynamicArrayHandleTryStorage &) = delete; + void operator=(const DynamicArrayHandleTryStorage&) = delete; }; -template -struct DynamicArrayHandleTryType { +template +struct DynamicArrayHandleTryType +{ const DynamicArrayHandle* const Array; - const Functor &Function; + const Functor& Function; bool FoundCast; VTKM_CONT - DynamicArrayHandleTryType(const DynamicArrayHandle &array, const Functor &f) - : Array(&array), Function(f), FoundCast(false) { } + DynamicArrayHandleTryType(const DynamicArrayHandle& array, const Functor& f) + : Array(&array) + , Function(f) + , FoundCast(false) + { + } - template - VTKM_CONT - void operator()(Type) { - if (this->FoundCast) { return; } + template + VTKM_CONT void operator()(Type) + { + if (this->FoundCast) + { + return; + } typedef DynamicArrayHandleTryStorage TryStorageType; - TryStorageType tryStorage = - TryStorageType(*this->Array, this->Function); + TryStorageType tryStorage = TryStorageType(*this->Array, this->Function); vtkm::ListForEach(tryStorage, StorageList()); if (tryStorage.FoundCast) @@ -488,16 +481,14 @@ struct DynamicArrayHandleTryType { } private: - void operator=(const DynamicArrayHandleTryType &) = delete; + void operator=(const DynamicArrayHandleTryType&) = delete; }; } // namespace detail -template -template -VTKM_CONT -void DynamicArrayHandleBase:: - CastAndCall(const Functor &f) const +template +template +VTKM_CONT void DynamicArrayHandleBase::CastAndCall(const Functor& f) const { VTKM_IS_LIST_TAG(TypeList); VTKM_IS_LIST_TAG(StorageList); @@ -526,16 +517,13 @@ void DynamicArrayHandleBase:: } } -template<> -template -VTKM_CONT -void DynamicArrayHandleBase:: - CastAndCall(const Functor &f) const +template <> +template +VTKM_CONT void DynamicArrayHandleBase< + VTKM_DEFAULT_TYPE_LIST_TAG, VTKM_DEFAULT_STORAGE_LIST_TAG>::CastAndCall(const Functor& f) const { - typedef detail::DynamicArrayHandleTryType TryTypeType; + typedef detail::DynamicArrayHandleTryType TryTypeType; // We can remove the copy, as the current DynamicArrayHandle is already // the default one, and no reason to do an atomic increment and increase @@ -545,22 +533,20 @@ void DynamicArrayHandleBase -struct DynamicTransformTraits< - vtkm::cont::DynamicArrayHandleBase > +template +struct DynamicTransformTraits> { typedef vtkm::cont::internal::DynamicTransformTagCastAndCall DynamicTag; }; } // namespace internal - } } // namespace vtkm::cont diff --git a/vtkm/cont/DynamicCellSet.h b/vtkm/cont/DynamicCellSet.h index 5bf99fbdf..292d63b53 100644 --- a/vtkm/cont/DynamicCellSet.h +++ b/vtkm/cont/DynamicCellSet.h @@ -27,26 +27,28 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ // Forward declaration. -template +template class DynamicCellSetBase; -namespace detail { +namespace detail +{ // One instance of a template class cannot access the private members of // another instance of a template class. However, I want to be able to copy // construct a DynamicCellSet from another DynamicCellSet of any other type. // Since you cannot partially specialize friendship, use this accessor class to // get at the internals for the copy constructor. -struct DynamicCellSetCopyHelper { - template - VTKM_CONT - static - const std::shared_ptr& - GetCellSetContainer(const vtkm::cont::DynamicCellSetBase &src) +struct DynamicCellSetCopyHelper +{ + template + VTKM_CONT static const std::shared_ptr& + GetCellSetContainer(const vtkm::cont::DynamicCellSetBase& src) { return src.CellSetContainer; } @@ -55,16 +57,12 @@ struct DynamicCellSetCopyHelper { // A simple function to downcast a CellSet encapsulated in a // SimplePolymorphicContainerBase to the given subclass of CellSet. If the // conversion cannot be done, nullptr is returned. -template -VTKM_CONT -CellSetType * -DynamicCellSetTryCast( - vtkm::cont::internal::SimplePolymorphicContainerBase *cellSetContainer) +template +VTKM_CONT CellSetType* DynamicCellSetTryCast( + vtkm::cont::internal::SimplePolymorphicContainerBase* cellSetContainer) { - vtkm::cont::internal::SimplePolymorphicContainer * - downcastContainer = dynamic_cast< - vtkm::cont::internal::SimplePolymorphicContainer *>( - cellSetContainer); + vtkm::cont::internal::SimplePolymorphicContainer* downcastContainer = + dynamic_cast*>(cellSetContainer); if (downcastContainer != nullptr) { return &downcastContainer->Item; @@ -75,10 +73,8 @@ DynamicCellSetTryCast( } } -template -VTKM_CONT -CellSetType * -DynamicCellSetTryCast( +template +VTKM_CONT CellSetType* DynamicCellSetTryCast( const std::shared_ptr& cellSetContainer) { return detail::DynamicCellSetTryCast(cellSetContainer.get()); @@ -115,42 +111,40 @@ DynamicCellSetTryCast( /// types. \c DynamicCellSet is really just a typedef of \c DynamicCellSetBase /// with the default cell set list. /// -template +template class VTKM_ALWAYS_EXPORT DynamicCellSetBase { VTKM_IS_LIST_TAG(CellSetList); + public: VTKM_CONT - DynamicCellSetBase() { } + DynamicCellSetBase() {} - template - VTKM_CONT - DynamicCellSetBase(const CellSetType &cellSet) - : CellSetContainer( - new vtkm::cont::internal::SimplePolymorphicContainer( - cellSet)) + template + VTKM_CONT DynamicCellSetBase(const CellSetType& cellSet) + : CellSetContainer(new vtkm::cont::internal::SimplePolymorphicContainer(cellSet)) { VTKM_IS_CELL_SET(CellSetType); } VTKM_CONT - DynamicCellSetBase(const DynamicCellSetBase &src) - : CellSetContainer(src.CellSetContainer) { } + DynamicCellSetBase(const DynamicCellSetBase& src) + : CellSetContainer(src.CellSetContainer) + { + } - template - VTKM_CONT - explicit - DynamicCellSetBase(const DynamicCellSetBase &src) - : CellSetContainer( - detail::DynamicCellSetCopyHelper::GetCellSetContainer(src)) - { } + template + VTKM_CONT explicit DynamicCellSetBase(const DynamicCellSetBase& src) + : CellSetContainer(detail::DynamicCellSetCopyHelper::GetCellSetContainer(src)) + { + } VTKM_CONT - ~DynamicCellSetBase() { } + ~DynamicCellSetBase() {} VTKM_CONT - vtkm::cont::DynamicCellSetBase & - operator=(const vtkm::cont::DynamicCellSetBase &src) + vtkm::cont::DynamicCellSetBase& operator=( + const vtkm::cont::DynamicCellSetBase& src) { this->CellSetContainer = src.CellSetContainer; return *this; @@ -158,39 +152,38 @@ public: /// Returns true if this cell set is of the provided type. /// - template - VTKM_CONT - bool IsType() const { - return (detail::DynamicCellSetTryCast(this->CellSetContainer) - != nullptr); + template + VTKM_CONT bool IsType() const + { + return (detail::DynamicCellSetTryCast(this->CellSetContainer) != nullptr); } /// Returns true if this cell set is the same (or equivalent) type as the /// object provided. /// - template - VTKM_CONT - bool IsSameType(const CellSetType &) const { + template + VTKM_CONT bool IsSameType(const CellSetType&) const + { return this->IsType(); } /// Returns the contained cell set as the abstract \c CellSet type. /// VTKM_CONT - const vtkm::cont::CellSet &CastToBase() const { - return *reinterpret_cast( - this->CellSetContainer->GetVoidPointer()); + const vtkm::cont::CellSet& CastToBase() const + { + return *reinterpret_cast(this->CellSetContainer->GetVoidPointer()); } /// Returns this cell set cast to the given \c CellSet type. Throws \c /// ErrorBadType if the cast does not work. Use \c IsType to check if /// the cast can happen. /// - template - VTKM_CONT - CellSetType &Cast() const { - CellSetType *cellSetPointer = - detail::DynamicCellSetTryCast(this->CellSetContainer); + template + VTKM_CONT CellSetType& Cast() const + { + CellSetType* cellSetPointer = + detail::DynamicCellSetTryCast(this->CellSetContainer); if (cellSetPointer == nullptr) { throw vtkm::cont::ErrorBadType("Bad cast of dynamic cell set."); @@ -206,9 +199,9 @@ public: /// Note that this is a shallow copy. Any data in associated arrays are not /// copied. /// - template - VTKM_CONT - void CopyTo(CellSetType &cellSet) const { + template + VTKM_CONT void CopyTo(CellSetType& cellSet) const + { cellSet = this->Cast(); } @@ -219,10 +212,10 @@ public: /// This method is particularly useful to narrow down (or expand) the types /// when using a cell set of particular constraints. /// - template - VTKM_CONT - DynamicCellSetBase - ResetCellSetList(NewCellSetList = NewCellSetList()) const { + template + VTKM_CONT DynamicCellSetBase ResetCellSetList( + NewCellSetList = NewCellSetList()) const + { VTKM_IS_LIST_TAG(NewCellSetList); return DynamicCellSetBase(*this); } @@ -234,9 +227,8 @@ public: /// DynamicCellSet). You can use \c ResetCellSetList to get different /// behavior from \c CastAndCall. /// - template - VTKM_CONT - void CastAndCall(const Functor &f) const; + template + VTKM_CONT void CastAndCall(const Functor& f) const; /// \brief Create a new cell set of the same type as this cell set. /// @@ -254,71 +246,54 @@ public: } VTKM_CONT - std::string GetName() const - { - return this->CastToBase().GetName(); - } + std::string GetName() const { return this->CastToBase().GetName(); } VTKM_CONT - vtkm::Id GetNumberOfCells() const - { - return this->CastToBase().GetNumberOfCells(); - } + vtkm::Id GetNumberOfCells() const { return this->CastToBase().GetNumberOfCells(); } VTKM_CONT - vtkm::Id GetNumberOfFaces() const - { - return this->CastToBase().GetNumberOfFaces(); - } + vtkm::Id GetNumberOfFaces() const { return this->CastToBase().GetNumberOfFaces(); } VTKM_CONT - vtkm::Id GetNumberOfEdges() const - { - return this->CastToBase().GetNumberOfEdges(); - } + vtkm::Id GetNumberOfEdges() const { return this->CastToBase().GetNumberOfEdges(); } VTKM_CONT - vtkm::Id GetNumberOfPoints() const - { - return this->CastToBase().GetNumberOfPoints(); - } + vtkm::Id GetNumberOfPoints() const { return this->CastToBase().GetNumberOfPoints(); } VTKM_CONT - void PrintSummary(std::ostream& stream) const - { - return this->CastToBase().PrintSummary(stream); - } - + void PrintSummary(std::ostream& stream) const { return this->CastToBase().PrintSummary(stream); } private: - std::shared_ptr - CellSetContainer; + std::shared_ptr CellSetContainer; friend struct detail::DynamicCellSetCopyHelper; }; -namespace detail { +namespace detail +{ -template +template struct DynamicCellSetTryCellSet { - vtkm::cont::internal::SimplePolymorphicContainerBase *CellSetContainer; - const Functor &Function; + vtkm::cont::internal::SimplePolymorphicContainerBase* CellSetContainer; + const Functor& Function; bool FoundCast; VTKM_CONT - DynamicCellSetTryCellSet( - vtkm::cont::internal::SimplePolymorphicContainerBase *cellSetContainer, - const Functor &f) - : CellSetContainer(cellSetContainer), Function(f), FoundCast(false) { } + DynamicCellSetTryCellSet(vtkm::cont::internal::SimplePolymorphicContainerBase* cellSetContainer, + const Functor& f) + : CellSetContainer(cellSetContainer) + , Function(f) + , FoundCast(false) + { + } - template - VTKM_CONT - void operator()(CellSetType) { + template + VTKM_CONT void operator()(CellSetType) + { if (!this->FoundCast) { - CellSetType *cellSet = - detail::DynamicCellSetTryCast(this->CellSetContainer); + CellSetType* cellSet = detail::DynamicCellSetTryCast(this->CellSetContainer); if (cellSet != nullptr) { this->Function(*cellSet); @@ -328,15 +303,14 @@ struct DynamicCellSetTryCellSet } private: - void operator=(const DynamicCellSetTryCellSet &) = delete; + void operator=(const DynamicCellSetTryCellSet&) = delete; }; } // namespace detail -template -template -VTKM_CONT -void DynamicCellSetBase::CastAndCall(const Functor &f) const +template +template +VTKM_CONT void DynamicCellSetBase::CastAndCall(const Functor& f) const { typedef detail::DynamicCellSetTryCellSet TryCellSetType; TryCellSetType tryCellSet = TryCellSetType(this->CellSetContainer.get(), f); @@ -344,52 +318,50 @@ void DynamicCellSetBase::CastAndCall(const Functor &f) const vtkm::ListForEach(tryCellSet, CellSetList()); if (!tryCellSet.FoundCast) { - throw vtkm::cont::ErrorBadValue( - "Could not find appropriate cast for cell set."); + throw vtkm::cont::ErrorBadValue("Could not find appropriate cast for cell set."); } } -typedef DynamicCellSetBase< VTKM_DEFAULT_CELL_SET_LIST_TAG > DynamicCellSet; +typedef DynamicCellSetBase DynamicCellSet; -namespace internal { +namespace internal +{ -template -struct DynamicTransformTraits< - vtkm::cont::DynamicCellSetBase > +template +struct DynamicTransformTraits> { typedef vtkm::cont::internal::DynamicTransformTagCastAndCall DynamicTag; }; } // namespace internal -namespace internal { +namespace internal +{ /// Checks to see if the given object is a dynamic cell set. It contains a /// typedef named \c type that is either std::true_type or std::false_type. /// Both of these have a typedef named value with the respective boolean value. /// -template +template struct DynamicCellSetCheck { using type = std::false_type; }; -template -struct DynamicCellSetCheck > +template +struct DynamicCellSetCheck> { using type = std::true_type; }; -#define VTKM_IS_DYNAMIC_CELL_SET(T) \ +#define VTKM_IS_DYNAMIC_CELL_SET(T) \ VTKM_STATIC_ASSERT(::vtkm::cont::internal::DynamicCellSetCheck::type::value) -#define VTKM_IS_DYNAMIC_OR_STATIC_CELL_SET(T) \ - VTKM_STATIC_ASSERT( \ - ::vtkm::cont::internal::CellSetCheck::type::value || \ - ::vtkm::cont::internal::DynamicCellSetCheck::type::value) +#define VTKM_IS_DYNAMIC_OR_STATIC_CELL_SET(T) \ + VTKM_STATIC_ASSERT(::vtkm::cont::internal::CellSetCheck::type::value || \ + ::vtkm::cont::internal::DynamicCellSetCheck::type::value) } // namespace internal - } } // namespace vtkm::cont diff --git a/vtkm/cont/Error.h b/vtkm/cont/Error.h index d518a37e1..3f4fb228f 100644 --- a/vtkm/cont/Error.h +++ b/vtkm/cont/Error.h @@ -29,8 +29,10 @@ #include // For VTKM_OVERRIDE -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START @@ -41,38 +43,34 @@ class VTKM_ALWAYS_EXPORT Error : public std::exception public: //See note about GetMessage macro below. #ifndef GetMessage - const std::string &GetMessage() const { return this->Message; } + const std::string& GetMessage() const { return this->Message; } #endif //GetMessage is a macro defined by to redirrect to //GetMessageA or W depending on if you are using ansi or unicode. //To get around this we make our own A/W variants on windows. #ifdef _WIN32 - const std::string &GetMessageA() const { return this->Message; } - const std::string &GetMessageW() const { return this->Message; } + const std::string& GetMessageA() const { return this->Message; } + const std::string& GetMessageW() const { return this->Message; } #endif // For std::exception compatibility: - const char* what() const VTKM_NOEXCEPT VTKM_OVERRIDE - { - return this->Message.c_str(); - } + const char* what() const VTKM_NOEXCEPT VTKM_OVERRIDE { return this->Message.c_str(); } protected: - Error() { } - Error(const std::string message) : Message(message) { } - - void SetMessage(const std::string &message) + Error() {} + Error(const std::string message) + : Message(message) { - this->Message = message; } + void SetMessage(const std::string& message) { this->Message = message; } + private: std::string Message; }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } // namespace vtkm::cont diff --git a/vtkm/cont/ErrorBadAllocation.h b/vtkm/cont/ErrorBadAllocation.h index f42e90328..5ad05076e 100644 --- a/vtkm/cont/ErrorBadAllocation.h +++ b/vtkm/cont/ErrorBadAllocation.h @@ -22,8 +22,10 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START @@ -33,12 +35,13 @@ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKM_ALWAYS_EXPORT ErrorBadAllocation : public Error { public: - ErrorBadAllocation(const std::string &message) - : Error(message) { } + ErrorBadAllocation(const std::string& message) + : Error(message) + { + } }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } // namespace vtkm::cont diff --git a/vtkm/cont/ErrorBadType.h b/vtkm/cont/ErrorBadType.h index 2c70f80dd..a533bb45c 100644 --- a/vtkm/cont/ErrorBadType.h +++ b/vtkm/cont/ErrorBadType.h @@ -22,8 +22,10 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START @@ -33,12 +35,13 @@ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKM_ALWAYS_EXPORT ErrorBadType : public Error { public: - ErrorBadType(const std::string &message) - : Error(message) { } + ErrorBadType(const std::string& message) + : Error(message) + { + } }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } // namespace vtkm::cont diff --git a/vtkm/cont/ErrorBadValue.h b/vtkm/cont/ErrorBadValue.h index b6e1d428f..2a99f69b8 100644 --- a/vtkm/cont/ErrorBadValue.h +++ b/vtkm/cont/ErrorBadValue.h @@ -22,8 +22,10 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START @@ -33,12 +35,13 @@ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKM_ALWAYS_EXPORT ErrorBadValue : public Error { public: - ErrorBadValue(const std::string &message) - : Error(message) { } + ErrorBadValue(const std::string& message) + : Error(message) + { + } }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } // namespace vtkm::cont diff --git a/vtkm/cont/ErrorExecution.h b/vtkm/cont/ErrorExecution.h index bc59c3cb8..e8772f2d0 100644 --- a/vtkm/cont/ErrorExecution.h +++ b/vtkm/cont/ErrorExecution.h @@ -22,8 +22,10 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START @@ -33,13 +35,14 @@ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKM_ALWAYS_EXPORT ErrorExecution : public vtkm::cont::Error { public: - ErrorExecution(const std::string &message) - : Error(message) { } + ErrorExecution(const std::string& message) + : Error(message) + { + } }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } -} // namespace vtkm::cont +} // namespace vtkm::cont #endif //vtk_m_cont_ErrorExecution_h diff --git a/vtkm/cont/ErrorInternal.h b/vtkm/cont/ErrorInternal.h index 2eaf1be96..20d1d8504 100644 --- a/vtkm/cont/ErrorInternal.h +++ b/vtkm/cont/ErrorInternal.h @@ -22,8 +22,10 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START @@ -34,12 +36,13 @@ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKM_ALWAYS_EXPORT ErrorInternal : public Error { public: - ErrorInternal(const std::string &message) - : Error(message) { } + ErrorInternal(const std::string& message) + : Error(message) + { + } }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } // namespace vtkm::cont diff --git a/vtkm/cont/Field.cxx b/vtkm/cont/Field.cxx index 7ea3f05ad..f97da5856 100644 --- a/vtkm/cont/Field.cxx +++ b/vtkm/cont/Field.cxx @@ -20,60 +20,67 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ VTKM_CONT -void Field::PrintSummary(std::ostream &out) const +void Field::PrintSummary(std::ostream& out) const { - out<<" "<Name; - out<<" assoc= "; + out << " " << this->Name; + out << " assoc= "; switch (this->GetAssociation()) { - case ASSOC_ANY: out<<"Any "; break; - case ASSOC_WHOLE_MESH: out<<"Mesh "; break; - case ASSOC_POINTS: out<<"Points "; break; - case ASSOC_CELL_SET: out<<"Cells "; break; - case ASSOC_LOGICAL_DIM: out<<"LogicalDim "; break; + case ASSOC_ANY: + out << "Any "; + break; + case ASSOC_WHOLE_MESH: + out << "Mesh "; + break; + case ASSOC_POINTS: + out << "Points "; + break; + case ASSOC_CELL_SET: + out << "Cells "; + break; + case ASSOC_LOGICAL_DIM: + out << "LogicalDim "; + break; } this->Data.PrintSummary(out); } VTKM_CONT -const vtkm::cont::ArrayHandle & -Field::GetRange() const +const vtkm::cont::ArrayHandle& Field::GetRange() const { - return this->GetRange(VTKM_DEFAULT_TYPE_LIST_TAG(), - VTKM_DEFAULT_STORAGE_LIST_TAG()); + return this->GetRange(VTKM_DEFAULT_TYPE_LIST_TAG(), VTKM_DEFAULT_STORAGE_LIST_TAG()); } VTKM_CONT -void Field::GetRange(vtkm::Range *range) const +void Field::GetRange(vtkm::Range* range) const { - this->GetRange(range, - VTKM_DEFAULT_TYPE_LIST_TAG(), - VTKM_DEFAULT_STORAGE_LIST_TAG()); + this->GetRange(range, VTKM_DEFAULT_TYPE_LIST_TAG(), VTKM_DEFAULT_STORAGE_LIST_TAG()); } VTKM_CONT -const vtkm::cont::DynamicArrayHandle &Field::GetData() const +const vtkm::cont::DynamicArrayHandle& Field::GetData() const { return this->Data; } VTKM_CONT -vtkm::cont::DynamicArrayHandle &Field::GetData() +vtkm::cont::DynamicArrayHandle& Field::GetData() { this->ModifiedFlag = true; return this->Data; } VTKM_CONT -const vtkm::cont::ArrayHandle & -Field::GetRange(VTKM_DEFAULT_TYPE_LIST_TAG, VTKM_DEFAULT_STORAGE_LIST_TAG) const +const vtkm::cont::ArrayHandle& Field::GetRange(VTKM_DEFAULT_TYPE_LIST_TAG, + VTKM_DEFAULT_STORAGE_LIST_TAG) const { return this->GetRangeImpl(VTKM_DEFAULT_TYPE_LIST_TAG(), VTKM_DEFAULT_STORAGE_LIST_TAG()); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/Field.h b/vtkm/cont/Field.h index 296744e9c..db04b2d2c 100644 --- a/vtkm/cont/Field.h +++ b/vtkm/cont/Field.h @@ -30,36 +30,40 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace internal { +namespace internal +{ class ComputeRange { public: - ComputeRange(ArrayHandle& range) : Range(&range) {} + ComputeRange(ArrayHandle& range) + : Range(&range) + { + } - template - void operator()(const ArrayHandleType &input) const + template + void operator()(const ArrayHandleType& input) const { *this->Range = vtkm::cont::ArrayRangeCompute(input); } private: - vtkm::cont::ArrayHandle *Range; + vtkm::cont::ArrayHandle* Range; }; } // namespace internal - /// A \c Field encapsulates an array on some piece of the mesh, such as /// the points, a cell set, a point logical dimension, or the whole mesh. /// class VTKM_CONT_EXPORT Field { public: - enum AssociationEnum { ASSOC_ANY, @@ -71,137 +75,110 @@ public: /// constructors for points / whole mesh VTKM_CONT - Field(std::string name, - AssociationEnum association, - const vtkm::cont::DynamicArrayHandle &data) - : Name(name), - Association(association), - AssocCellSetName(), - AssocLogicalDim(-1), - Data(data), - Range(), - ModifiedFlag(true) + Field(std::string name, AssociationEnum association, const vtkm::cont::DynamicArrayHandle& data) + : Name(name) + , Association(association) + , AssocCellSetName() + , AssocLogicalDim(-1) + , Data(data) + , Range() + , ModifiedFlag(true) { - VTKM_ASSERT(this->Association == ASSOC_WHOLE_MESH || - this->Association == ASSOC_POINTS); + VTKM_ASSERT(this->Association == ASSOC_WHOLE_MESH || this->Association == ASSOC_POINTS); } - template - VTKM_CONT - Field(std::string name, - AssociationEnum association, - const ArrayHandle &data) - : Name(name), - Association(association), - AssocCellSetName(), - AssocLogicalDim(-1), - Data(data), - Range(), - ModifiedFlag(true) + template + VTKM_CONT Field(std::string name, AssociationEnum association, + const ArrayHandle& data) + : Name(name) + , Association(association) + , AssocCellSetName() + , AssocLogicalDim(-1) + , Data(data) + , Range() + , ModifiedFlag(true) { - VTKM_ASSERT((this->Association == ASSOC_WHOLE_MESH) || - (this->Association == ASSOC_POINTS)); + VTKM_ASSERT((this->Association == ASSOC_WHOLE_MESH) || (this->Association == ASSOC_POINTS)); } template - VTKM_CONT - Field(std::string name, - AssociationEnum association, - const std::vector &data) - : Name(name), - Association(association), - AssocCellSetName(), - AssocLogicalDim(-1), - Range(), - ModifiedFlag(true) + VTKM_CONT Field(std::string name, AssociationEnum association, const std::vector& data) + : Name(name) + , Association(association) + , AssocCellSetName() + , AssocLogicalDim(-1) + , Range() + , ModifiedFlag(true) { - VTKM_ASSERT((this->Association == ASSOC_WHOLE_MESH) || - (this->Association == ASSOC_POINTS)); + VTKM_ASSERT((this->Association == ASSOC_WHOLE_MESH) || (this->Association == ASSOC_POINTS)); this->CopyData(&data[0], static_cast(data.size())); } template - VTKM_CONT - Field(std::string name, - AssociationEnum association, - const T *data, - vtkm::Id nvals) - : Name(name), - Association(association), - AssocCellSetName(), - AssocLogicalDim(-1), - Range(), - ModifiedFlag(true) + VTKM_CONT Field(std::string name, AssociationEnum association, const T* data, vtkm::Id nvals) + : Name(name) + , Association(association) + , AssocCellSetName() + , AssocLogicalDim(-1) + , Range() + , ModifiedFlag(true) { - VTKM_ASSERT((this->Association == ASSOC_WHOLE_MESH) || - (this->Association == ASSOC_POINTS)); + VTKM_ASSERT((this->Association == ASSOC_WHOLE_MESH) || (this->Association == ASSOC_POINTS)); this->CopyData(data, nvals); } /// constructors for cell set associations VTKM_CONT - Field(std::string name, - AssociationEnum association, - const std::string& cellSetName, - const vtkm::cont::DynamicArrayHandle &data) - : Name(name), - Association(association), - AssocCellSetName(cellSetName), - AssocLogicalDim(-1), - Data(data), - Range(), - ModifiedFlag(true) + Field(std::string name, AssociationEnum association, const std::string& cellSetName, + const vtkm::cont::DynamicArrayHandle& data) + : Name(name) + , Association(association) + , AssocCellSetName(cellSetName) + , AssocLogicalDim(-1) + , Data(data) + , Range() + , ModifiedFlag(true) { VTKM_ASSERT(this->Association == ASSOC_CELL_SET); } template - VTKM_CONT - Field(std::string name, - AssociationEnum association, - const std::string& cellSetName, - const vtkm::cont::ArrayHandle &data) - : Name(name), - Association(association), - AssocCellSetName(cellSetName), - AssocLogicalDim(-1), - Data(data), - Range(), - ModifiedFlag(true) + VTKM_CONT Field(std::string name, AssociationEnum association, const std::string& cellSetName, + const vtkm::cont::ArrayHandle& data) + : Name(name) + , Association(association) + , AssocCellSetName(cellSetName) + , AssocLogicalDim(-1) + , Data(data) + , Range() + , ModifiedFlag(true) { VTKM_ASSERT(this->Association == ASSOC_CELL_SET); } template - VTKM_CONT - Field(std::string name, - AssociationEnum association, - const std::string& cellSetName, - const std::vector &data) - : Name(name), - Association(association), - AssocCellSetName(cellSetName), - AssocLogicalDim(-1), - Range(), - ModifiedFlag(true) + VTKM_CONT Field(std::string name, AssociationEnum association, const std::string& cellSetName, + const std::vector& data) + : Name(name) + , Association(association) + , AssocCellSetName(cellSetName) + , AssocLogicalDim(-1) + , Range() + , ModifiedFlag(true) { VTKM_ASSERT(this->Association == ASSOC_CELL_SET); this->CopyData(&data[0], static_cast(data.size())); } template - VTKM_CONT - Field(std::string name, - AssociationEnum association, - const std::string& cellSetName, - const T *data, - vtkm::Id nvals) - : Name(name), - Association(association), - AssocCellSetName(cellSetName), - AssocLogicalDim(-1), - Range(), - ModifiedFlag(true) + VTKM_CONT Field(std::string name, AssociationEnum association, const std::string& cellSetName, + const T* data, vtkm::Id nvals) + : Name(name) + , Association(association) + , AssocCellSetName(cellSetName) + , AssocLogicalDim(-1) + , Range() + , ModifiedFlag(true) { VTKM_ASSERT(this->Association == ASSOC_CELL_SET); this->CopyData(data, nvals); @@ -209,64 +186,53 @@ public: /// constructors for logical dimension associations VTKM_CONT - Field(std::string name, - AssociationEnum association, - vtkm::IdComponent logicalDim, - const vtkm::cont::DynamicArrayHandle &data) - : Name(name), - Association(association), - AssocCellSetName(), - AssocLogicalDim(logicalDim), - Data(data), - Range(), - ModifiedFlag(true) + Field(std::string name, AssociationEnum association, vtkm::IdComponent logicalDim, + const vtkm::cont::DynamicArrayHandle& data) + : Name(name) + , Association(association) + , AssocCellSetName() + , AssocLogicalDim(logicalDim) + , Data(data) + , Range() + , ModifiedFlag(true) { VTKM_ASSERT(this->Association == ASSOC_LOGICAL_DIM); } template - VTKM_CONT - Field(std::string name, - AssociationEnum association, - vtkm::IdComponent logicalDim, - const vtkm::cont::ArrayHandle &data) - : Name(name), - Association(association), - AssocLogicalDim(logicalDim), - Data(data), - Range(), - ModifiedFlag(true) + VTKM_CONT Field(std::string name, AssociationEnum association, vtkm::IdComponent logicalDim, + const vtkm::cont::ArrayHandle& data) + : Name(name) + , Association(association) + , AssocLogicalDim(logicalDim) + , Data(data) + , Range() + , ModifiedFlag(true) { VTKM_ASSERT(this->Association == ASSOC_LOGICAL_DIM); } template - VTKM_CONT - Field(std::string name, - AssociationEnum association, - vtkm::IdComponent logicalDim, - const std::vector &data) - : Name(name), - Association(association), - AssocLogicalDim(logicalDim), - Range(), - ModifiedFlag(true) + VTKM_CONT Field(std::string name, AssociationEnum association, vtkm::IdComponent logicalDim, + const std::vector& data) + : Name(name) + , Association(association) + , AssocLogicalDim(logicalDim) + , Range() + , ModifiedFlag(true) { VTKM_ASSERT(this->Association == ASSOC_LOGICAL_DIM); this->CopyData(&data[0], static_cast(data.size())); } template - VTKM_CONT - Field(std::string name, - AssociationEnum association, - vtkm::IdComponent logicalDim, - const T *data, vtkm::Id nvals) - : Name(name), - Association(association), - AssocLogicalDim(logicalDim), - Range(), - ModifiedFlag(true) + VTKM_CONT Field(std::string name, AssociationEnum association, vtkm::IdComponent logicalDim, + const T* data, vtkm::Id nvals) + : Name(name) + , Association(association) + , AssocLogicalDim(logicalDim) + , Range() + , ModifiedFlag(true) { VTKM_ASSERT(this->Association == ASSOC_LOGICAL_DIM); CopyData(data, nvals); @@ -274,48 +240,34 @@ public: VTKM_CONT Field() - : Name(), - Association(ASSOC_ANY), - AssocCellSetName(), - AssocLogicalDim(), - Data(), - Range(), - ModifiedFlag(true) + : Name() + , Association(ASSOC_ANY) + , AssocCellSetName() + , AssocLogicalDim() + , Data() + , Range() + , ModifiedFlag(true) { //Generate an empty field } VTKM_CONT - Field &operator=(const vtkm::cont::Field &src) = default; + Field& operator=(const vtkm::cont::Field& src) = default; VTKM_CONT - const std::string &GetName() const - { - return this->Name; - } + const std::string& GetName() const { return this->Name; } VTKM_CONT - AssociationEnum GetAssociation() const - { - return this->Association; - } + AssociationEnum GetAssociation() const { return this->Association; } VTKM_CONT - std::string GetAssocCellSet() const - { - return this->AssocCellSetName; - } + std::string GetAssocCellSet() const { return this->AssocCellSetName; } VTKM_CONT - vtkm::IdComponent GetAssocLogicalDim() const - { - return this->AssocLogicalDim; - } + vtkm::IdComponent GetAssocLogicalDim() const { return this->AssocLogicalDim; } - template - VTKM_CONT - const vtkm::cont::ArrayHandle& - GetRange(TypeList, StorageList) const + template + VTKM_CONT const vtkm::cont::ArrayHandle& GetRange(TypeList, StorageList) const { VTKM_IS_LIST_TAG(TypeList); VTKM_IS_LIST_TAG(StorageList); @@ -324,14 +276,11 @@ public: } VTKM_CONT - const vtkm::cont::ArrayHandle& - GetRange(VTKM_DEFAULT_TYPE_LIST_TAG, VTKM_DEFAULT_STORAGE_LIST_TAG) const; + const vtkm::cont::ArrayHandle& GetRange(VTKM_DEFAULT_TYPE_LIST_TAG, + VTKM_DEFAULT_STORAGE_LIST_TAG) const; - template - VTKM_CONT - void GetRange(vtkm::Range *range, - TypeList, - StorageList) const + template + VTKM_CONT void GetRange(vtkm::Range* range, TypeList, StorageList) const { VTKM_IS_LIST_TAG(TypeList); VTKM_IS_LIST_TAG(StorageList); @@ -345,64 +294,55 @@ public: } } - template - VTKM_CONT - const vtkm::cont::ArrayHandle& GetRange(TypeList) const + template + VTKM_CONT const vtkm::cont::ArrayHandle& GetRange(TypeList) const { VTKM_IS_LIST_TAG(TypeList); - return this->GetRange(TypeList(), - VTKM_DEFAULT_STORAGE_LIST_TAG()); + return this->GetRange(TypeList(), VTKM_DEFAULT_STORAGE_LIST_TAG()); } - template - VTKM_CONT - void GetRange(vtkm::Range *range, TypeList) const + template + VTKM_CONT void GetRange(vtkm::Range* range, TypeList) const { VTKM_IS_LIST_TAG(TypeList); - this->GetRange(range, - TypeList(), - VTKM_DEFAULT_STORAGE_LIST_TAG()); + this->GetRange(range, TypeList(), VTKM_DEFAULT_STORAGE_LIST_TAG()); } VTKM_CONT const vtkm::cont::ArrayHandle& GetRange() const; VTKM_CONT - void GetRange(vtkm::Range *range) const; + void GetRange(vtkm::Range* range) const; - const vtkm::cont::DynamicArrayHandle &GetData() const; - - vtkm::cont::DynamicArrayHandle &GetData(); + const vtkm::cont::DynamicArrayHandle& GetData() const; + vtkm::cont::DynamicArrayHandle& GetData(); template - VTKM_CONT - void SetData(const vtkm::cont::ArrayHandle &newdata) + VTKM_CONT void SetData(const vtkm::cont::ArrayHandle& newdata) { this->Data = newdata; this->ModifiedFlag = true; } VTKM_CONT - void SetData(const vtkm::cont::DynamicArrayHandle &newdata) + void SetData(const vtkm::cont::DynamicArrayHandle& newdata) { this->Data = newdata; this->ModifiedFlag = true; } template - VTKM_CONT - void CopyData(const T *ptr, vtkm::Id nvals) + VTKM_CONT void CopyData(const T* ptr, vtkm::Id nvals) { //allocate main memory using an array handle vtkm::cont::ArrayHandle tmp; tmp.Allocate(nvals); //copy into the memory owned by the array handle - std::copy(ptr, - ptr + static_cast(nvals), + std::copy(ptr, ptr + static_cast(nvals), vtkm::cont::ArrayPortalToIteratorBegin(tmp.GetPortalControl())); //assign to the dynamic array handle @@ -411,23 +351,21 @@ public: } VTKM_CONT - virtual void PrintSummary(std::ostream &out) const; + virtual void PrintSummary(std::ostream& out) const; private: - std::string Name; ///< name of field + std::string Name; ///< name of field - AssociationEnum Association; - std::string AssocCellSetName; ///< only populate if assoc is cells + AssociationEnum Association; + std::string AssocCellSetName; ///< only populate if assoc is cells vtkm::IdComponent AssocLogicalDim; ///< only populate if assoc is logical dim vtkm::cont::DynamicArrayHandle Data; mutable vtkm::cont::ArrayHandle Range; mutable bool ModifiedFlag; - template - VTKM_CONT - const vtkm::cont::ArrayHandle& - GetRangeImpl(TypeList, StorageList) const + template + VTKM_CONT const vtkm::cont::ArrayHandle& GetRangeImpl(TypeList, StorageList) const { VTKM_IS_LIST_TAG(TypeList); VTKM_IS_LIST_TAG(StorageList); @@ -435,7 +373,7 @@ private: if (this->ModifiedFlag) { internal::ComputeRange computeRange(this->Range); - this->Data.ResetTypeAndStorageLists(TypeList(),StorageList()).CastAndCall(computeRange); + this->Data.ResetTypeAndStorageLists(TypeList(), StorageList()).CastAndCall(computeRange); this->ModifiedFlag = false; } @@ -443,20 +381,20 @@ private: } }; -template -void CastAndCall(const vtkm::cont::Field& field, const Functor &f) +template +void CastAndCall(const vtkm::cont::Field& field, const Functor& f) { field.GetData().CastAndCall(f); } -namespace internal { -template<> +namespace internal +{ +template <> struct DynamicTransformTraits { typedef vtkm::cont::internal::DynamicTransformTagCastAndCall DynamicTag; }; - } // namespace internal } // namespace cont } // namespace vtkm diff --git a/vtkm/cont/ImplicitFunction.cxx b/vtkm/cont/ImplicitFunction.cxx index 8bba1a17c..d348c4325 100644 --- a/vtkm/cont/ImplicitFunction.cxx +++ b/vtkm/cont/ImplicitFunction.cxx @@ -19,10 +19,11 @@ //============================================================================ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ ImplicitFunction::~ImplicitFunction() = default; - } } // vtkm::cont diff --git a/vtkm/cont/ImplicitFunction.h b/vtkm/cont/ImplicitFunction.h index 0ca776f8c..774a06620 100644 --- a/vtkm/cont/ImplicitFunction.h +++ b/vtkm/cont/ImplicitFunction.h @@ -27,15 +27,17 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ class VTKM_CONT_EXPORT ImplicitFunction { public: virtual ~ImplicitFunction(); - template + template vtkm::exec::ImplicitFunction PrepareForExecution(DeviceAdapter device) const { if (!this->Cache->GetValid()) @@ -45,24 +47,22 @@ public: return this->Cache->GetVirtualObject(device); } - void Modified() - { - this->Cache->SetRefreshFlag(true); - } + void Modified() { this->Cache->SetRefreshFlag(true); } protected: using CacheType = vtkm::cont::VirtualObjectCache; - ImplicitFunction() : Cache(new CacheType) + ImplicitFunction() + : Cache(new CacheType) { } - ImplicitFunction(ImplicitFunction &&other) + ImplicitFunction(ImplicitFunction&& other) : Cache(std::move(other.Cache)) { } - ImplicitFunction& operator=(ImplicitFunction &&other) + ImplicitFunction& operator=(ImplicitFunction&& other) { if (this != &other) { @@ -76,12 +76,11 @@ protected: std::unique_ptr Cache; }; - -template +template class VTKM_ALWAYS_EXPORT ImplicitFunctionImpl : public ImplicitFunction { public: - template + template void ResetDevices(DeviceAdapterList devices) { this->Cache->Bind(static_cast(this), devices); @@ -89,35 +88,29 @@ public: protected: ImplicitFunctionImpl() = default; - ImplicitFunctionImpl(const ImplicitFunctionImpl &) : ImplicitFunction() + ImplicitFunctionImpl(const ImplicitFunctionImpl&) + : ImplicitFunction() { } // Cannot default due to a bug in VS2013 - ImplicitFunctionImpl(ImplicitFunctionImpl &&other) + ImplicitFunctionImpl(ImplicitFunctionImpl&& other) : ImplicitFunction(std::move(other)) { } - ImplicitFunctionImpl& operator=(const ImplicitFunctionImpl &) - { - return *this; - } + ImplicitFunctionImpl& operator=(const ImplicitFunctionImpl&) { return *this; } // Cannot default due to a bug in VS2013 - ImplicitFunctionImpl& operator=(ImplicitFunctionImpl &&other) + ImplicitFunctionImpl& operator=(ImplicitFunctionImpl&& other) { ImplicitFunction::operator=(std::move(other)); return *this; } - void SetDefaultDevices() const override - { - this->Cache->Bind(static_cast(this)); - } + void SetDefaultDevices() const override { this->Cache->Bind(static_cast(this)); } }; - //============================================================================ // ImplicitFunctions: @@ -128,46 +121,42 @@ class VTKM_ALWAYS_EXPORT Box : public ImplicitFunctionImpl public: Box(); Box(vtkm::Vec minPoint, vtkm::Vec maxPoint); - Box(FloatDefault xmin, FloatDefault xmax, - FloatDefault ymin, FloatDefault ymax, - FloatDefault zmin, FloatDefault zmax); + Box(FloatDefault xmin, FloatDefault xmax, FloatDefault ymin, FloatDefault ymax, FloatDefault zmin, + FloatDefault zmax); - void SetMinPoint(const vtkm::Vec &point); - void SetMaxPoint(const vtkm::Vec &point); + void SetMinPoint(const vtkm::Vec& point); + void SetMaxPoint(const vtkm::Vec& point); const vtkm::Vec& GetMinPoint() const; const vtkm::Vec& GetMaxPoint() const; VTKM_EXEC_CONT - FloatDefault Value(const vtkm::Vec &x) const; + FloatDefault Value(const vtkm::Vec& x) const; VTKM_EXEC_CONT FloatDefault Value(FloatDefault x, FloatDefault y, FloatDefault z) const; VTKM_EXEC_CONT - vtkm::Vec Gradient(const vtkm::Vec &x) const; + vtkm::Vec Gradient(const vtkm::Vec& x) const; VTKM_EXEC_CONT - vtkm::Vec - Gradient(FloatDefault x, FloatDefault y, FloatDefault z) const; + vtkm::Vec Gradient(FloatDefault x, FloatDefault y, FloatDefault z) const; private: vtkm::Vec MinPoint; vtkm::Vec MaxPoint; }; - //============================================================================ /// \brief Implicit function for a cylinder class VTKM_ALWAYS_EXPORT Cylinder : public ImplicitFunctionImpl { public: Cylinder(); - Cylinder(const vtkm::Vec &axis, FloatDefault radius); - Cylinder(const vtkm::Vec ¢er, - const vtkm::Vec &axis, + Cylinder(const vtkm::Vec& axis, FloatDefault radius); + Cylinder(const vtkm::Vec& center, const vtkm::Vec& axis, FloatDefault radius); - void SetCenter(const vtkm::Vec ¢er); - void SetAxis(const vtkm::Vec &axis); + void SetCenter(const vtkm::Vec& center); + void SetAxis(const vtkm::Vec& axis); void SetRadius(FloatDefault radius); const vtkm::Vec& GetCenter() const; @@ -175,15 +164,14 @@ public: FloatDefault GetRadius() const; VTKM_EXEC_CONT - FloatDefault Value(const vtkm::Vec &x) const; + FloatDefault Value(const vtkm::Vec& x) const; VTKM_EXEC_CONT FloatDefault Value(FloatDefault x, FloatDefault y, FloatDefault z) const; VTKM_EXEC_CONT - vtkm::Vec Gradient(const vtkm::Vec &x) const; + vtkm::Vec Gradient(const vtkm::Vec& x) const; VTKM_EXEC_CONT - vtkm::Vec - Gradient(FloatDefault x, FloatDefault y, FloatDefault z) const; + vtkm::Vec Gradient(FloatDefault x, FloatDefault y, FloatDefault z) const; private: vtkm::Vec Center; @@ -191,24 +179,20 @@ private: FloatDefault Radius; }; - //============================================================================ /// \brief Implicit function for a frustum class VTKM_ALWAYS_EXPORT Frustum : public ImplicitFunctionImpl { public: Frustum(); - Frustum(const vtkm::Vec points[6], - const vtkm::Vec normals[6]); + Frustum(const vtkm::Vec points[6], const vtkm::Vec normals[6]); explicit Frustum(const vtkm::Vec points[8]); void SetPlanes(const vtkm::Vec points[6], const vtkm::Vec normals[6]); - void SetPlane(int idx, vtkm::Vec &point, - vtkm::Vec &normal); + void SetPlane(int idx, vtkm::Vec& point, vtkm::Vec& normal); - void GetPlanes(vtkm::Vec points[6], - vtkm::Vec normals[6]) const; + void GetPlanes(vtkm::Vec points[6], vtkm::Vec normals[6]) const; const vtkm::Vec* GetPoints() const; const vtkm::Vec* GetNormals() const; @@ -218,11 +202,10 @@ public: VTKM_EXEC_CONT FloatDefault Value(FloatDefault x, FloatDefault y, FloatDefault z) const; VTKM_EXEC_CONT - FloatDefault Value(const vtkm::Vec &x) const; + FloatDefault Value(const vtkm::Vec& x) const; VTKM_EXEC_CONT - vtkm::Vec - Gradient(FloatDefault, FloatDefault, FloatDefault) const; + vtkm::Vec Gradient(FloatDefault, FloatDefault, FloatDefault) const; VTKM_EXEC_CONT vtkm::Vec Gradient(const vtkm::Vec&) const; @@ -231,19 +214,17 @@ private: vtkm::Vec Normals[6]; }; - //============================================================================ /// \brief Implicit function for a plane class VTKM_ALWAYS_EXPORT Plane : public ImplicitFunctionImpl { public: Plane(); - explicit Plane(const vtkm::Vec &normal); - Plane(const vtkm::Vec &origin, - const vtkm::Vec &normal); + explicit Plane(const vtkm::Vec& normal); + Plane(const vtkm::Vec& origin, const vtkm::Vec& normal); - void SetOrigin(const vtkm::Vec &origin); - void SetNormal(const vtkm::Vec &normal); + void SetOrigin(const vtkm::Vec& origin); + void SetNormal(const vtkm::Vec& normal); const vtkm::Vec& GetOrigin() const; const vtkm::Vec& GetNormal() const; @@ -251,11 +232,10 @@ public: VTKM_EXEC_CONT FloatDefault Value(FloatDefault x, FloatDefault y, FloatDefault z) const; VTKM_EXEC_CONT - FloatDefault Value(const vtkm::Vec &x) const; + FloatDefault Value(const vtkm::Vec& x) const; VTKM_EXEC_CONT - vtkm::Vec - Gradient(FloatDefault, FloatDefault, FloatDefault) const; + vtkm::Vec Gradient(FloatDefault, FloatDefault, FloatDefault) const; VTKM_EXEC_CONT vtkm::Vec Gradient(const vtkm::Vec&) const; @@ -264,7 +244,6 @@ private: vtkm::Vec Normal; }; - //============================================================================ /// \brief Implicit function for a sphere class VTKM_ALWAYS_EXPORT Sphere : public ImplicitFunctionImpl @@ -275,7 +254,7 @@ public: Sphere(vtkm::Vec center, FloatDefault radius); void SetRadius(FloatDefault radius); - void SetCenter(const vtkm::Vec ¢er); + void SetCenter(const vtkm::Vec& center); FloatDefault GetRadius() const; const vtkm::Vec& GetCenter() const; @@ -283,20 +262,17 @@ public: VTKM_EXEC_CONT FloatDefault Value(FloatDefault x, FloatDefault y, FloatDefault z) const; VTKM_EXEC_CONT - FloatDefault Value(const vtkm::Vec &x) const; + FloatDefault Value(const vtkm::Vec& x) const; VTKM_EXEC_CONT - vtkm::Vec - Gradient(FloatDefault x, FloatDefault y, FloatDefault z) const; + vtkm::Vec Gradient(FloatDefault x, FloatDefault y, FloatDefault z) const; VTKM_EXEC_CONT - vtkm::Vec - Gradient(const vtkm::Vec &x) const; + vtkm::Vec Gradient(const vtkm::Vec& x) const; private: FloatDefault Radius; vtkm::Vec Center; }; - } } // vtkm::cont diff --git a/vtkm/cont/ImplicitFunction.hxx b/vtkm/cont/ImplicitFunction.hxx index 8485ca0b1..72d45c8c0 100644 --- a/vtkm/cont/ImplicitFunction.hxx +++ b/vtkm/cont/ImplicitFunction.hxx @@ -23,37 +23,42 @@ #include #include - -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ //============================================================================ inline Box::Box() - : MinPoint(vtkm::Vec(FloatDefault(0))), - MaxPoint(vtkm::Vec(FloatDefault(1))) -{ } - -inline Box::Box(vtkm::Vec minPoint, - vtkm::Vec maxPoint) - : MinPoint(minPoint), MaxPoint(maxPoint) -{ } - -inline Box::Box(FloatDefault xmin, FloatDefault xmax, - FloatDefault ymin, FloatDefault ymax, - FloatDefault zmin, FloatDefault zmax) + : MinPoint(vtkm::Vec(FloatDefault(0))) + , MaxPoint(vtkm::Vec(FloatDefault(1))) { - MinPoint[0] = xmin; MaxPoint[0] = xmax; - MinPoint[1] = ymin; MaxPoint[1] = ymax; - MinPoint[2] = zmin; MaxPoint[2] = zmax; } -inline void Box::SetMinPoint(const vtkm::Vec &point) +inline Box::Box(vtkm::Vec minPoint, vtkm::Vec maxPoint) + : MinPoint(minPoint) + , MaxPoint(maxPoint) +{ +} + +inline Box::Box(FloatDefault xmin, FloatDefault xmax, FloatDefault ymin, FloatDefault ymax, + FloatDefault zmin, FloatDefault zmax) +{ + MinPoint[0] = xmin; + MaxPoint[0] = xmax; + MinPoint[1] = ymin; + MaxPoint[1] = ymax; + MinPoint[2] = zmin; + MaxPoint[2] = zmax; +} + +inline void Box::SetMinPoint(const vtkm::Vec& point) { this->MinPoint = point; this->Modified(); } -inline void Box::SetMaxPoint(const vtkm::Vec &point) +inline void Box::SetMaxPoint(const vtkm::Vec& point) { this->MaxPoint = point; this->Modified(); @@ -70,22 +75,20 @@ inline const vtkm::Vec& Box::GetMaxPoint() const } VTKM_EXEC_CONT -inline FloatDefault -Box::Value(FloatDefault x, FloatDefault y, FloatDefault z) const +inline FloatDefault Box::Value(FloatDefault x, FloatDefault y, FloatDefault z) const { - return this->Value(vtkm::Vec(x, y, z)); + return this->Value(vtkm::Vec(x, y, z)); } VTKM_EXEC_CONT -inline vtkm::Vec -Box::Gradient(FloatDefault x, FloatDefault y, FloatDefault z) const +inline vtkm::Vec Box::Gradient(FloatDefault x, FloatDefault y, + FloatDefault z) const { return this->Gradient(vtkm::Vec(x, y, z)); } VTKM_EXEC_CONT -inline FloatDefault -Box::Value(const vtkm::Vec &x) const +inline FloatDefault Box::Value(const vtkm::Vec& x) const { FloatDefault minDistance = vtkm::NegativeInfinity32(); FloatDefault diff, t, dist; @@ -138,7 +141,7 @@ Box::Value(const vtkm::Vec &x) const } if (dist > FloatDefault(0.0)) { - distance += dist*dist; + distance += dist * dist; } } @@ -154,17 +157,16 @@ Box::Value(const vtkm::Vec &x) const } VTKM_EXEC_CONT -inline vtkm::Vec -Box::Gradient(const vtkm::Vec &x) const +inline vtkm::Vec Box::Gradient(const vtkm::Vec& x) const { vtkm::IdComponent minAxis = 0; FloatDefault dist = 0.0; FloatDefault minDist = vtkm::Infinity32(); - vtkm::Vec location; - vtkm::Vec normal; - vtkm::Vec inside(FloatDefault(0)); - vtkm::Vec outside(FloatDefault(0)); - vtkm::Vec center((this->MaxPoint + this->MinPoint) * FloatDefault(0.5)); + vtkm::Vec location; + vtkm::Vec normal; + vtkm::Vec inside(FloatDefault(0)); + vtkm::Vec outside(FloatDefault(0)); + vtkm::Vec center((this->MaxPoint + this->MinPoint) * FloatDefault(0.5)); // Compute the location of the point with respect to the box // Point will lie in one of 27 separate regions around or within the box @@ -206,11 +208,18 @@ Box::Gradient(const vtkm::Vec &x) const } } - vtkm::Id indx = location[0] + 3*location[1] + 9*location[2]; + vtkm::Id indx = location[0] + 3 * location[1] + 9 * location[2]; switch (indx) { // verts - gradient points away from center point - case 0: case 2: case 6: case 8: case 18: case 20: case 24: case 26: + case 0: + case 2: + case 6: + case 8: + case 18: + case 20: + case 24: + case 26: for (vtkm::IdComponent d = 0; d < 3; d++) { normal[d] = x[d] - center[d]; @@ -219,9 +228,18 @@ Box::Gradient(const vtkm::Vec &x) const break; // edges - gradient points out from axis of cube - case 1: case 3: case 5: case 7: - case 9: case 11: case 15: case 17: - case 19: case 21: case 23: case 25: + case 1: + case 3: + case 5: + case 7: + case 9: + case 11: + case 15: + case 17: + case 19: + case 21: + case 23: + case 25: for (vtkm::IdComponent d = 0; d < 3; d++) { if (outside[d] != 0.0) @@ -237,7 +255,12 @@ Box::Gradient(const vtkm::Vec &x) const break; // faces - gradient points perpendicular to face - case 4: case 10: case 12: case 14: case 16: case 22: + case 4: + case 10: + case 12: + case 14: + case 16: + case 22: for (vtkm::IdComponent d = 0; d < 3; d++) { normal[d] = outside[d]; @@ -256,32 +279,36 @@ Box::Gradient(const vtkm::Vec &x) const return normal; } - //============================================================================ inline Cylinder::Cylinder() - : Center(FloatDefault(0)), - Axis(vtkm::make_Vec(FloatDefault(1), FloatDefault(0), FloatDefault(0))), - Radius(FloatDefault(0.2)) -{ } + : Center(FloatDefault(0)) + , Axis(vtkm::make_Vec(FloatDefault(1), FloatDefault(0), FloatDefault(0))) + , Radius(FloatDefault(0.2)) +{ +} -inline Cylinder::Cylinder(const vtkm::Vec &axis, - FloatDefault radius) - : Center(FloatDefault(0)), Axis(vtkm::Normal(axis)), Radius(radius) -{ } +inline Cylinder::Cylinder(const vtkm::Vec& axis, FloatDefault radius) + : Center(FloatDefault(0)) + , Axis(vtkm::Normal(axis)) + , Radius(radius) +{ +} -inline Cylinder::Cylinder(const vtkm::Vec ¢er, - const vtkm::Vec &axis, - FloatDefault radius) - : Center(center), Axis(vtkm::Normal(axis)), Radius(radius) -{ } +inline Cylinder::Cylinder(const vtkm::Vec& center, + const vtkm::Vec& axis, FloatDefault radius) + : Center(center) + , Axis(vtkm::Normal(axis)) + , Radius(radius) +{ +} -inline void Cylinder::SetCenter(const vtkm::Vec ¢er) +inline void Cylinder::SetCenter(const vtkm::Vec& center) { this->Center = center; this->Modified(); } -inline void Cylinder::SetAxis(const vtkm::Vec &axis) +inline void Cylinder::SetAxis(const vtkm::Vec& axis) { this->Axis = vtkm::Normal(axis); this->Modified(); @@ -309,7 +336,7 @@ inline FloatDefault Cylinder::GetRadius() const } VTKM_EXEC_CONT -inline FloatDefault Cylinder::Value(const vtkm::Vec &x) const +inline FloatDefault Cylinder::Value(const vtkm::Vec& x) const { vtkm::Vec x2c = x - this->Center; FloatDefault proj = vtkm::dot(this->Axis, x2c); @@ -317,32 +344,27 @@ inline FloatDefault Cylinder::Value(const vtkm::Vec &x) const } VTKM_EXEC_CONT -inline FloatDefault -Cylinder::Value(FloatDefault x, FloatDefault y, FloatDefault z) const +inline FloatDefault Cylinder::Value(FloatDefault x, FloatDefault y, FloatDefault z) const { - return this->Value(vtkm::Vec(x, y, z)); + return this->Value(vtkm::Vec(x, y, z)); } VTKM_EXEC_CONT -inline vtkm::Vec -Cylinder::Gradient(const vtkm::Vec &x) const +inline vtkm::Vec Cylinder::Gradient(const vtkm::Vec& x) const { vtkm::Vec x2c = x - this->Center; - FloatDefault t = this->Axis[0] * x2c[0] + - this->Axis[1] * x2c[1] + - this->Axis[2] * x2c[2]; + FloatDefault t = this->Axis[0] * x2c[0] + this->Axis[1] * x2c[1] + this->Axis[2] * x2c[2]; vtkm::Vec closestPoint = this->Center + (this->Axis * t); return (x - closestPoint) * FloatDefault(2); } VTKM_EXEC_CONT -inline vtkm::Vec -Cylinder::Gradient(FloatDefault x, FloatDefault y, FloatDefault z) const +inline vtkm::Vec Cylinder::Gradient(FloatDefault x, FloatDefault y, + FloatDefault z) const { return this->Gradient(vtkm::Vec(x, y, z)); } - //============================================================================ inline Frustum::Frustum() { @@ -387,8 +409,8 @@ inline const vtkm::Vec* Frustum::GetNormals() const return this->Normals; } -inline void Frustum::SetPlane(int idx, vtkm::Vec &point, - vtkm::Vec &normal) +inline void Frustum::SetPlane(int idx, vtkm::Vec& point, + vtkm::Vec& normal) { if (idx < 0 || idx >= 6) { @@ -404,14 +426,18 @@ inline void Frustum::SetPlane(int idx, vtkm::Vec &point, inline void Frustum::CreateFromPoints(const vtkm::Vec points[8]) { - int planes[6][3] = {{3, 2, 0}, {4, 5, 7}, {0, 1, 4}, - {1, 2, 5}, {2, 3, 6}, {3, 0, 7}}; + // XXX(clang-format-3.9): 3.8 is silly. 3.9 makes it look like this. + // clang-format off + int planes[6][3] = { + { 3, 2, 0 }, { 4, 5, 7 }, { 0, 1, 4 }, { 1, 2, 5 }, { 2, 3, 6 }, { 3, 0, 7 } + }; + // clang-format on for (int i = 0; i < 6; ++i) { - auto &v0 = points[planes[i][0]]; - auto &v1 = points[planes[i][1]]; - auto &v2 = points[planes[i][2]]; + auto& v0 = points[planes[i][0]]; + auto& v1 = points[planes[i][1]]; + auto& v2 = points[planes[i][2]]; this->Points[i] = v0; this->Normals[i] = vtkm::Normal(vtkm::Cross(v2 - v0, v1 - v0)); @@ -420,14 +446,13 @@ inline void Frustum::CreateFromPoints(const vtkm::Vec points[8] } VTKM_EXEC_CONT -inline FloatDefault -Frustum::Value(FloatDefault x, FloatDefault y, FloatDefault z) const +inline FloatDefault Frustum::Value(FloatDefault x, FloatDefault y, FloatDefault z) const { FloatDefault maxVal = -std::numeric_limits::max(); for (int i = 0; i < 6; ++i) { - auto &p = this->Points[i]; - auto &n = this->Normals[i]; + auto& p = this->Points[i]; + auto& n = this->Normals[i]; FloatDefault val = ((x - p[0]) * n[0]) + ((y - p[1]) * n[1]) + ((z - p[2]) * n[2]); maxVal = vtkm::Max(maxVal, val); } @@ -435,21 +460,21 @@ Frustum::Value(FloatDefault x, FloatDefault y, FloatDefault z) const } VTKM_EXEC_CONT -inline FloatDefault Frustum::Value(const vtkm::Vec &x) const +inline FloatDefault Frustum::Value(const vtkm::Vec& x) const { return this->Value(x[0], x[1], x[2]); } VTKM_EXEC_CONT -inline vtkm::Vec -Frustum::Gradient(FloatDefault x, FloatDefault y, FloatDefault z) const +inline vtkm::Vec Frustum::Gradient(FloatDefault x, FloatDefault y, + FloatDefault z) const { FloatDefault maxVal = -std::numeric_limits::max(); int maxValIdx = 0; for (int i = 0; i < 6; ++i) { - auto &p = this->Points[i]; - auto &n = this->Normals[i]; + auto& p = this->Points[i]; + auto& n = this->Normals[i]; FloatDefault val = ((x - p[0]) * n[0]) + ((y - p[1]) * n[1]) + ((z - p[2]) * n[2]); if (val > maxVal) { @@ -461,36 +486,38 @@ Frustum::Gradient(FloatDefault x, FloatDefault y, FloatDefault z) const } VTKM_EXEC_CONT -inline vtkm::Vec -Frustum::Gradient(const vtkm::Vec &x) const +inline vtkm::Vec Frustum::Gradient(const vtkm::Vec& x) const { return this->Gradient(x[0], x[1], x[2]); } - //============================================================================ inline Plane::Plane() - : Origin(FloatDefault(0)), - Normal(FloatDefault(0), FloatDefault(0), FloatDefault(1)) -{ } + : Origin(FloatDefault(0)) + , Normal(FloatDefault(0), FloatDefault(0), FloatDefault(1)) +{ +} -inline Plane::Plane(const vtkm::Vec &normal) - : Origin(FloatDefault(0)), - Normal(normal) -{ } +inline Plane::Plane(const vtkm::Vec& normal) + : Origin(FloatDefault(0)) + , Normal(normal) +{ +} -inline Plane::Plane(const vtkm::Vec &origin, - const vtkm::Vec &normal) - : Origin(origin), Normal(normal) -{ } +inline Plane::Plane(const vtkm::Vec& origin, + const vtkm::Vec& normal) + : Origin(origin) + , Normal(normal) +{ +} -inline void Plane::SetOrigin(const vtkm::Vec &origin) +inline void Plane::SetOrigin(const vtkm::Vec& origin) { this->Origin = origin; this->Modified(); } -inline void Plane::SetNormal(const vtkm::Vec &normal) +inline void Plane::SetNormal(const vtkm::Vec& normal) { this->Normal = normal; this->Modified(); @@ -507,47 +534,48 @@ inline const vtkm::Vec& Plane::GetNormal() const } VTKM_EXEC_CONT -inline FloatDefault -Plane::Value(FloatDefault x, FloatDefault y, FloatDefault z) const +inline FloatDefault Plane::Value(FloatDefault x, FloatDefault y, FloatDefault z) const { - return ((x - this->Origin[0]) * this->Normal[0]) + - ((y - this->Origin[1]) * this->Normal[1]) + - ((z - this->Origin[2]) * this->Normal[2]); + return ((x - this->Origin[0]) * this->Normal[0]) + ((y - this->Origin[1]) * this->Normal[1]) + + ((z - this->Origin[2]) * this->Normal[2]); } VTKM_EXEC_CONT -inline FloatDefault Plane::Value(const vtkm::Vec &x) const +inline FloatDefault Plane::Value(const vtkm::Vec& x) const { return this->Value(x[0], x[1], x[2]); } VTKM_EXEC_CONT -inline vtkm::Vec -Plane::Gradient(FloatDefault, FloatDefault, FloatDefault) const +inline vtkm::Vec Plane::Gradient(FloatDefault, FloatDefault, FloatDefault) const { return this->Normal; } VTKM_EXEC_CONT -inline vtkm::Vec -Plane::Gradient(const vtkm::Vec&) const +inline vtkm::Vec Plane::Gradient(const vtkm::Vec&) const { return this->Normal; } - //============================================================================ inline Sphere::Sphere() - : Radius(FloatDefault(0.2)), Center(FloatDefault(0)) -{ } + : Radius(FloatDefault(0.2)) + , Center(FloatDefault(0)) +{ +} inline Sphere::Sphere(FloatDefault radius) - : Radius(radius), Center(FloatDefault(0)) -{ } + : Radius(radius) + , Center(FloatDefault(0)) +{ +} inline Sphere::Sphere(vtkm::Vec center, FloatDefault radius) - : Radius(radius), Center(center) -{ } + : Radius(radius) + , Center(center) +{ +} inline void Sphere::SetRadius(FloatDefault radius) { @@ -555,7 +583,7 @@ inline void Sphere::SetRadius(FloatDefault radius) this->Modified(); } -inline void Sphere::SetCenter(const vtkm::Vec ¢er) +inline void Sphere::SetCenter(const vtkm::Vec& center) { this->Center = center; this->Modified(); @@ -572,35 +600,31 @@ inline const vtkm::Vec& Sphere::GetCenter() const } VTKM_EXEC_CONT -inline FloatDefault -Sphere::Value(FloatDefault x, FloatDefault y, FloatDefault z) const +inline FloatDefault Sphere::Value(FloatDefault x, FloatDefault y, FloatDefault z) const { return ((x - this->Center[0]) * (x - this->Center[0]) + (y - this->Center[1]) * (y - this->Center[1]) + (z - this->Center[2]) * (z - this->Center[2])) - - (this->Radius * this->Radius); + (this->Radius * this->Radius); } VTKM_EXEC_CONT -inline FloatDefault Sphere::Value(const vtkm::Vec &x) const +inline FloatDefault Sphere::Value(const vtkm::Vec& x) const { return this->Value(x[0], x[1], x[2]); } VTKM_EXEC_CONT -inline vtkm::Vec -Sphere::Gradient(FloatDefault x, FloatDefault y, FloatDefault z) - const +inline vtkm::Vec Sphere::Gradient(FloatDefault x, FloatDefault y, + FloatDefault z) const { return this->Gradient(vtkm::Vec(x, y, z)); } VTKM_EXEC_CONT -inline vtkm::Vec -Sphere::Gradient(const vtkm::Vec &x) const +inline vtkm::Vec Sphere::Gradient(const vtkm::Vec& x) const { return FloatDefault(2) * (x - this->Center); } - } } // vtkm::cont diff --git a/vtkm/cont/RuntimeDeviceInformation.h b/vtkm/cont/RuntimeDeviceInformation.h index 268194da4..747da7206 100644 --- a/vtkm/cont/RuntimeDeviceInformation.h +++ b/vtkm/cont/RuntimeDeviceInformation.h @@ -22,8 +22,10 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// A class that can be used to determine if a given device adapter /// is supported on the current machine at runtime. This is very important @@ -31,26 +33,25 @@ namespace cont { /// or a Accelerator Card. /// /// -template +template class RuntimeDeviceInformation { public: VTKM_CONT - RuntimeDeviceInformation() : RuntimeImplementation() { } + RuntimeDeviceInformation() + : RuntimeImplementation() + { + } /// Returns true if the given device adapter is supported on the current /// machine. /// VTKM_CONT - bool Exists() const - { - return this->RuntimeImplementation.Exists(); - } + bool Exists() const { return this->RuntimeImplementation.Exists(); } private: vtkm::cont::DeviceAdapterRuntimeDetector RuntimeImplementation; }; - } } // namespace vtkm::cont diff --git a/vtkm/cont/RuntimeDeviceTracker.cxx b/vtkm/cont/RuntimeDeviceTracker.cxx index 0409470fb..d7305b328 100644 --- a/vtkm/cont/RuntimeDeviceTracker.cxx +++ b/vtkm/cont/RuntimeDeviceTracker.cxx @@ -33,16 +33,18 @@ #define VTKM_MAX_DEVICE_ADAPTER_ID 8 -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace detail { +namespace detail +{ struct RuntimeDeviceTrackerInternals { bool RuntimeValid[VTKM_MAX_DEVICE_ADAPTER_ID]; }; - } VTKM_CONT @@ -54,12 +56,12 @@ RuntimeDeviceTracker::RuntimeDeviceTracker() VTKM_CONT RuntimeDeviceTracker::~RuntimeDeviceTracker() -{ } +{ +} VTKM_CONT -void RuntimeDeviceTracker::CheckDevice( - vtkm::cont::DeviceAdapterId deviceId, - const vtkm::cont::DeviceAdapterNameType &deviceName) const +void RuntimeDeviceTracker::CheckDevice(vtkm::cont::DeviceAdapterId deviceId, + const vtkm::cont::DeviceAdapterNameType& deviceName) const { if ((deviceId < 0) || (deviceId >= VTKM_MAX_DEVICE_ADAPTER_ID)) { @@ -70,44 +72,41 @@ void RuntimeDeviceTracker::CheckDevice( } VTKM_CONT -bool RuntimeDeviceTracker::CanRunOnImpl( - vtkm::cont::DeviceAdapterId deviceId, - const vtkm::cont::DeviceAdapterNameType &deviceName) const +bool RuntimeDeviceTracker::CanRunOnImpl(vtkm::cont::DeviceAdapterId deviceId, + const vtkm::cont::DeviceAdapterNameType& deviceName) const { this->CheckDevice(deviceId, deviceName); return this->Internals->RuntimeValid[deviceId]; } VTKM_CONT -void RuntimeDeviceTracker::SetDeviceState( - vtkm::cont::DeviceAdapterId deviceId, - const vtkm::cont::DeviceAdapterNameType &deviceName, - bool state) +void RuntimeDeviceTracker::SetDeviceState(vtkm::cont::DeviceAdapterId deviceId, + const vtkm::cont::DeviceAdapterNameType& deviceName, + bool state) { this->CheckDevice(deviceId, deviceName); this->Internals->RuntimeValid[deviceId] = state; } -namespace { +namespace +{ struct VTKM_NEVER_EXPORT RuntimeDeviceTrackerResetFunctor { vtkm::cont::RuntimeDeviceTracker Tracker; VTKM_CONT - RuntimeDeviceTrackerResetFunctor( - const vtkm::cont::RuntimeDeviceTracker &tracker) + RuntimeDeviceTrackerResetFunctor(const vtkm::cont::RuntimeDeviceTracker& tracker) : Tracker(tracker) - { } + { + } - template - VTKM_CONT - void operator()(Device) + template + VTKM_CONT void operator()(Device) { this->Tracker.ResetDevice(Device()); } }; - } VTKM_CONT @@ -120,8 +119,7 @@ void RuntimeDeviceTracker::Reset() } VTKM_CONT -vtkm::cont::RuntimeDeviceTracker -RuntimeDeviceTracker::DeepCopy() const +vtkm::cont::RuntimeDeviceTracker RuntimeDeviceTracker::DeepCopy() const { vtkm::cont::RuntimeDeviceTracker dest; dest.DeepCopy(*this); @@ -129,18 +127,16 @@ RuntimeDeviceTracker::DeepCopy() const } VTKM_CONT -void RuntimeDeviceTracker::DeepCopy(const vtkm::cont::RuntimeDeviceTracker &src) +void RuntimeDeviceTracker::DeepCopy(const vtkm::cont::RuntimeDeviceTracker& src) { - std::copy_n(src.Internals->RuntimeValid, - VTKM_MAX_DEVICE_ADAPTER_ID, + std::copy_n(src.Internals->RuntimeValid, VTKM_MAX_DEVICE_ADAPTER_ID, this->Internals->RuntimeValid); } VTKM_CONT -void RuntimeDeviceTracker::ForceDeviceImpl( - vtkm::cont::DeviceAdapterId deviceId, - const vtkm::cont::DeviceAdapterNameType &deviceName, - bool runtimeExists) +void RuntimeDeviceTracker::ForceDeviceImpl(vtkm::cont::DeviceAdapterId deviceId, + const vtkm::cont::DeviceAdapterNameType& deviceName, + bool runtimeExists) { if (!runtimeExists) { @@ -162,6 +158,5 @@ vtkm::cont::RuntimeDeviceTracker GetGlobalRuntimeDeviceTracker() static vtkm::cont::RuntimeDeviceTracker globalTracker; return globalTracker; } - } } // namespace vtkm::cont diff --git a/vtkm/cont/RuntimeDeviceTracker.h b/vtkm/cont/RuntimeDeviceTracker.h index 43c917fa0..b28db6e8a 100644 --- a/vtkm/cont/RuntimeDeviceTracker.h +++ b/vtkm/cont/RuntimeDeviceTracker.h @@ -24,13 +24,15 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace detail { +namespace detail +{ struct RuntimeDeviceTrackerInternals; - } /// A class that can be used to determine if a given device adapter @@ -54,9 +56,8 @@ public: /// Returns true if the given device adapter is supported on the current /// machine. /// - template - VTKM_CONT - bool CanRunOn(DeviceAdapterTag) const + template + VTKM_CONT bool CanRunOn(DeviceAdapterTag) const { using Traits = vtkm::cont::DeviceAdapterTraits; return this->CanRunOnImpl(Traits::GetId(), Traits::GetName()); @@ -66,10 +67,8 @@ public: /// device as being unusable for all future invocations of the instance of /// the filter. /// - template - VTKM_CONT - void ReportAllocationFailure(DeviceAdapterTag, - const vtkm::cont::ErrorBadAllocation&) + template + VTKM_CONT void ReportAllocationFailure(DeviceAdapterTag, const vtkm::cont::ErrorBadAllocation&) { using Traits = vtkm::cont::DeviceAdapterTraits; this->SetDeviceState(Traits::GetId(), Traits::GetName(), false); @@ -78,15 +77,12 @@ public: /// Reset the tracker for the given device. This will discard any updates /// caused by reported failures /// - template - VTKM_CONT - void ResetDevice(DeviceAdapterTag) + template + VTKM_CONT void ResetDevice(DeviceAdapterTag) { using Traits = vtkm::cont::DeviceAdapterTraits; vtkm::cont::RuntimeDeviceInformation runtimeDevice; - this->SetDeviceState(Traits::GetId(), - Traits::GetName(), - runtimeDevice.Exists()); + this->SetDeviceState(Traits::GetId(), Traits::GetName(), runtimeDevice.Exists()); } /// Reset the tracker to its default state for default devices. @@ -138,7 +134,7 @@ public: /// VTKM_CONT_EXPORT VTKM_CONT - void DeepCopy(const vtkm::cont::RuntimeDeviceTracker &src); + void DeepCopy(const vtkm::cont::RuntimeDeviceTracker& src); /// \brief Disable the given device /// @@ -147,9 +143,8 @@ public: /// devices on and off. Use this method to disable (turn off) a given device. /// Use \c ResetDevice to turn the device back on (if it is supported). /// - template - VTKM_CONT - void DisableDevice(DeviceAdapterTag) + template + VTKM_CONT void DisableDevice(DeviceAdapterTag) { using Traits = vtkm::cont::DeviceAdapterTraits; this->SetDeviceState(Traits::GetId(), Traits::GetName(), false); @@ -167,42 +162,36 @@ public: /// This method will throw a \c ErrorBadValue if the given device does not /// exist on the system. /// - template - VTKM_CONT - void ForceDevice(DeviceAdapterTag) + template + VTKM_CONT void ForceDevice(DeviceAdapterTag) { using Traits = vtkm::cont::DeviceAdapterTraits; vtkm::cont::RuntimeDeviceInformation runtimeDevice; - this->ForceDeviceImpl(Traits::GetId(), - Traits::GetName(), - runtimeDevice.Exists()); + this->ForceDeviceImpl(Traits::GetId(), Traits::GetName(), runtimeDevice.Exists()); } - private: std::shared_ptr Internals; VTKM_CONT_EXPORT VTKM_CONT void CheckDevice(vtkm::cont::DeviceAdapterId deviceId, - const vtkm::cont::DeviceAdapterNameType &deviceName) const; + const vtkm::cont::DeviceAdapterNameType& deviceName) const; VTKM_CONT_EXPORT VTKM_CONT bool CanRunOnImpl(vtkm::cont::DeviceAdapterId deviceId, - const vtkm::cont::DeviceAdapterNameType &deviceName) const; + const vtkm::cont::DeviceAdapterNameType& deviceName) const; VTKM_CONT_EXPORT VTKM_CONT void SetDeviceState(vtkm::cont::DeviceAdapterId deviceId, - const vtkm::cont::DeviceAdapterNameType &deviceName, - bool state); + const vtkm::cont::DeviceAdapterNameType& deviceName, bool state); VTKM_CONT_EXPORT VTKM_CONT void ForceDeviceImpl(vtkm::cont::DeviceAdapterId deviceId, - const vtkm::cont::DeviceAdapterNameType &deviceName, - bool runtimeExists); + const vtkm::cont::DeviceAdapterNameType& deviceName, bool runtimeExists); }; /// \brief Get the global \c RuntimeDeviceTracker. @@ -216,8 +205,7 @@ private: VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::RuntimeDeviceTracker GetGlobalRuntimeDeviceTracker(); - } -} // namespace vtkm::cont +} // namespace vtkm::cont #endif //vtk_m_filter_RuntimeDeviceTracker_h diff --git a/vtkm/cont/Storage.h b/vtkm/cont/Storage.h index 4f2fe9498..fd82aeb6b 100644 --- a/vtkm/cont/Storage.h +++ b/vtkm/cont/Storage.h @@ -20,9 +20,9 @@ #ifndef vtk_m_cont_Storage_h #define vtk_m_cont_Storage_h -#define VTKM_STORAGE_ERROR -2 -#define VTKM_STORAGE_UNDEFINED -1 -#define VTKM_STORAGE_BASIC 1 +#define VTKM_STORAGE_ERROR -2 +#define VTKM_STORAGE_UNDEFINED -1 +#define VTKM_STORAGE_BASIC 1 #ifndef VTKM_STORAGE #define VTKM_STORAGE VTKM_STORAGE_BASIC @@ -33,8 +33,10 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ #ifdef VTKM_DOXYGEN_ONLY /// \brief A tag specifying client memory allocation. @@ -60,21 +62,28 @@ namespace cont { /// provide a partial template specialization of vtkm::cont::internal::Storage /// for your new tag. /// -struct VTKM_ALWAYS_EXPORT StorageTag___ { }; +struct VTKM_ALWAYS_EXPORT StorageTag___ +{ +}; #endif // VTKM_DOXYGEN_ONLY -namespace internal { +namespace internal +{ -struct UndefinedStorage { }; +struct UndefinedStorage +{ +}; -namespace detail { +namespace detail +{ // This class should never be used. It is used as a placeholder for undefined // Storage objects. If you get a compiler error involving this object, then it // probably comes from trying to use an ArrayHandle with bad template // arguments. -template -struct UndefinedArrayPortal { +template +struct UndefinedArrayPortal +{ VTKM_STATIC_ASSERT(sizeof(T) == static_cast(-1)); }; @@ -83,19 +92,18 @@ struct UndefinedArrayPortal { /// This templated class must be partially specialized for each StorageTag /// created, which will define the implementation for that tag. /// -template +template class Storage #ifndef VTKM_DOXYGEN_ONLY - : public vtkm::cont::internal::UndefinedStorage + : public vtkm::cont::internal::UndefinedStorage { public: typedef vtkm::cont::internal::detail::UndefinedArrayPortal PortalType; typedef vtkm::cont::internal::detail::UndefinedArrayPortal PortalConstType; }; -#else //VTKM_DOXYGEN_ONLY +#else //VTKM_DOXYGEN_ONLY { public: - /// The type of each item in the array. /// typedef T ValueType; @@ -161,7 +169,6 @@ public: #endif // VTKM_DOXYGEN_ONLY } // namespace internal - } } // namespace vtkm::cont diff --git a/vtkm/cont/StorageBasic.cxx b/vtkm/cont/StorageBasic.cxx index 10ca4328a..ce744f99b 100644 --- a/vtkm/cont/StorageBasic.cxx +++ b/vtkm/cont/StorageBasic.cxx @@ -44,24 +44,27 @@ #include #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ void* alloc_aligned(size_t size, size_t align) { #if defined(VTKM_MEMALIGN_POSIX) - void *mem = nullptr; + void* mem = nullptr; if (posix_memalign(&mem, align, size) != 0) { mem = nullptr; } #elif defined(VTKM_MEMALIGN_WIN) - void *mem = _aligned_malloc(size, align); + void* mem = _aligned_malloc(size, align); #elif defined(VTKM_MEMALIGN_SSE) - void *mem = _mm_malloc(size, align); + void* mem = _mm_malloc(size, align); #else - void *mem = malloc(size); + void* mem = malloc(size); #endif if (mem == nullptr) { @@ -70,7 +73,7 @@ void* alloc_aligned(size_t size, size_t align) return mem; } -void free_aligned(void *mem) +void free_aligned(void* mem) { #if defined(VTKM_MEMALIGN_POSIX) free(mem); @@ -95,23 +98,21 @@ template class VTKM_CONT_EXPORT Storage; template class VTKM_CONT_EXPORT Storage; template class VTKM_CONT_EXPORT Storage; -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; - -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; - -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -template class VTKM_CONT_EXPORT Storage< vtkm::Vec, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; +template class VTKM_CONT_EXPORT Storage, StorageTagBasic>; } } } // namespace vtkm::cont::internal diff --git a/vtkm/cont/StorageBasic.h b/vtkm/cont/StorageBasic.h index d358a84c1..bafadef76 100644 --- a/vtkm/cont/StorageBasic.h +++ b/vtkm/cont/StorageBasic.h @@ -33,25 +33,31 @@ #define VTKM_CACHE_LINE_SIZE 64 #endif -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// A tag for the basic implementation of a Storage object. -struct VTKM_ALWAYS_EXPORT StorageTagBasic { }; +struct VTKM_ALWAYS_EXPORT StorageTagBasic +{ +}; -namespace internal { +namespace internal +{ VTKM_CONT_EXPORT void* alloc_aligned(size_t size, size_t align); VTKM_CONT_EXPORT -void free_aligned(void *mem); +void free_aligned(void* mem); /// A simple aligned allocator type that will align allocations to `Alignment` bytes /// TODO: Once C++11 std::allocator_traits is better used by STL and we want to drop /// support for pre-C++11 we can drop a lot of the typedefs and functions here. -template -struct AlignedAllocator { +template +struct AlignedAllocator +{ typedef T value_type; typedef T& reference; typedef const T& const_reference; @@ -62,45 +68,39 @@ struct AlignedAllocator { typedef std::ptrdiff_t difference_type; typedef std::size_t size_type; - template - struct rebind { + template + struct rebind + { typedef AlignedAllocator other; }; - AlignedAllocator(){} + AlignedAllocator() {} - template - AlignedAllocator(const AlignedAllocator&){} + template + AlignedAllocator(const AlignedAllocator&) + { + } - pointer allocate(size_t n){ + pointer allocate(size_t n) + { return static_cast(alloc_aligned(n * sizeof(T), Alignment)); } - void deallocate(pointer p, size_t){ - free_aligned(static_cast(p)); - } - pointer address(reference r){ - return &r; - } - const_pointer address(const_reference r){ - return &r; - } - size_type max_size() const { - return (std::numeric_limits::max)() / sizeof(T); - } - void construct(pointer p, const T &t){ - new(p) T(t); - } - void destroy(pointer p){ - p->~T(); - } + void deallocate(pointer p, size_t) { free_aligned(static_cast(p)); } + pointer address(reference r) { return &r; } + const_pointer address(const_reference r) { return &r; } + size_type max_size() const { return (std::numeric_limits::max)() / sizeof(T); } + void construct(pointer p, const T& t) { new (p) T(t); } + void destroy(pointer p) { p->~T(); } }; -template -bool operator==(const AlignedAllocator&, const AlignedAllocator&){ +template +bool operator==(const AlignedAllocator&, const AlignedAllocator&) +{ return AlignA == AlignB; } -template -bool operator!=(const AlignedAllocator&, const AlignedAllocator&){ +template +bool operator!=(const AlignedAllocator&, const AlignedAllocator&) +{ return AlignA != AlignB; } @@ -130,18 +130,17 @@ public: typedef AlignedAllocator AllocatorType; public: - VTKM_CONT - Storage(const ValueType *array = nullptr, vtkm::Id numberOfValues = 0); + Storage(const ValueType* array = nullptr, vtkm::Id numberOfValues = 0); VTKM_CONT ~Storage(); VTKM_CONT - Storage(const Storage &src); + Storage(const Storage& src); VTKM_CONT - Storage &operator=(const Storage &src); + Storage& operator=(const Storage& src); VTKM_CONT void ReleaseResources(); @@ -150,19 +149,13 @@ public: void Allocate(vtkm::Id numberOfValues); VTKM_CONT - vtkm::Id GetNumberOfValues() const - { - return this->NumberOfValues; - } + vtkm::Id GetNumberOfValues() const { return this->NumberOfValues; } VTKM_CONT void Shrink(vtkm::Id numberOfValues); VTKM_CONT - PortalType GetPortal() - { - return PortalType(this->Array, this->Array + this->NumberOfValues); - } + PortalType GetPortal() { return PortalType(this->Array, this->Array + this->NumberOfValues); } VTKM_CONT PortalConstType GetPortalConst() const @@ -177,15 +170,9 @@ public: /// Storage will eventually deallocate the array). /// VTKM_CONT - ValueType *GetArray() - { - return this->Array; - } + ValueType* GetArray() { return this->Array; } VTKM_CONT - const ValueType *GetArray() const - { - return this->Array; - } + const ValueType* GetArray() const { return this->Array; } /// \brief Take the reference away from this object. /// @@ -197,10 +184,10 @@ public: /// destroying the memory. /// VTKM_CONT - ValueType *StealArray(); + ValueType* StealArray(); private: - ValueType *Array; + ValueType* Array; vtkm::Id NumberOfValues; vtkm::Id AllocatedSize; bool DeallocateOnRelease; @@ -212,9 +199,12 @@ private: } // namespace vtkm::cont #ifndef vtkm_cont_StorageBasic_cxx -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ extern template class VTKM_CONT_TEMPLATE_EXPORT Storage; extern template class VTKM_CONT_TEMPLATE_EXPORT Storage; @@ -228,21 +218,27 @@ extern template class VTKM_CONT_TEMPLATE_EXPORT Storage; extern template class VTKM_CONT_TEMPLATE_EXPORT Storage; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT Storage, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT Storage, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT + Storage, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT + Storage, StorageTagBasic>; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT Storage, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT Storage, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT + Storage, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT + Storage, StorageTagBasic>; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; -extern template class VTKM_CONT_TEMPLATE_EXPORT Storage< vtkm::Vec, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT Storage, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT Storage, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT Storage, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT + Storage, StorageTagBasic>; +extern template class VTKM_CONT_TEMPLATE_EXPORT + Storage, StorageTagBasic>; } } } diff --git a/vtkm/cont/StorageBasic.hxx b/vtkm/cont/StorageBasic.hxx index 53583bb33..1a00498bc 100644 --- a/vtkm/cont/StorageBasic.hxx +++ b/vtkm/cont/StorageBasic.hxx @@ -18,51 +18,54 @@ // this software. //============================================================================ -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ -template -Storage::Storage(const T *array, vtkm::Id numberOfValues) - : Array(const_cast(array)), - NumberOfValues(numberOfValues), - AllocatedSize(numberOfValues), - DeallocateOnRelease(false), - UserProvidedMemory( array == nullptr ? false : true) +template +Storage::Storage(const T* array, vtkm::Id numberOfValues) + : Array(const_cast(array)) + , NumberOfValues(numberOfValues) + , AllocatedSize(numberOfValues) + , DeallocateOnRelease(false) + , UserProvidedMemory(array == nullptr ? false : true) { } -template +template Storage::~Storage() { this->ReleaseResources(); } -template -Storage::Storage(const Storage &src) - : Array(src.Array), - NumberOfValues(src.NumberOfValues), - AllocatedSize(src.AllocatedSize), - DeallocateOnRelease(false), - UserProvidedMemory(src.UserProvidedMemory) +template +Storage::Storage(const Storage& src) + : Array(src.Array) + , NumberOfValues(src.NumberOfValues) + , AllocatedSize(src.AllocatedSize) + , DeallocateOnRelease(false) + , UserProvidedMemory(src.UserProvidedMemory) { if (src.DeallocateOnRelease) { throw vtkm::cont::ErrorBadValue( - "Attempted to copy a storage array that needs deallocation. " - "This is disallowed to prevent complications with deallocation."); + "Attempted to copy a storage array that needs deallocation. " + "This is disallowed to prevent complications with deallocation."); } } -template -Storage& -Storage::operator=(const Storage &src) +template +Storage& Storage::operator=( + const Storage& src) { if (src.DeallocateOnRelease) { throw vtkm::cont::ErrorBadValue( - "Attempted to copy a storage array that needs deallocation. " - "This is disallowed to prevent complications with deallocation."); + "Attempted to copy a storage array that needs deallocation. " + "This is disallowed to prevent complications with deallocation."); } this->ReleaseResources(); @@ -75,7 +78,7 @@ Storage::operator=(const Storage +template void Storage::ReleaseResources() { if (this->NumberOfValues > 0) @@ -84,8 +87,7 @@ void Storage::ReleaseResources() if (this->DeallocateOnRelease) { AllocatorType allocator; - allocator.deallocate(this->Array, - static_cast(this->AllocatedSize) ); + allocator.deallocate(this->Array, static_cast(this->AllocatedSize)); } this->Array = nullptr; this->NumberOfValues = 0; @@ -97,22 +99,20 @@ void Storage::ReleaseResources() } } -template +template void Storage::Allocate(vtkm::Id numberOfValues) { // If we are allocating less data, just shrink the array. // (If allocation empty, drop down so we can deallocate memory.) - if ((numberOfValues <= this->AllocatedSize) && - (numberOfValues > 0)) + if ((numberOfValues <= this->AllocatedSize) && (numberOfValues > 0)) { this->NumberOfValues = numberOfValues; return; } - if(this->UserProvidedMemory) + if (this->UserProvidedMemory) { - throw vtkm::cont::ErrorBadValue( - "User allocated arrays cannot be reallocated."); + throw vtkm::cont::ErrorBadValue("User allocated arrays cannot be reallocated."); } this->ReleaseResources(); @@ -122,7 +122,7 @@ void Storage::Allocate(vtkm::Id numberOfValues) { AllocatorType allocator; this->Array = allocator.allocate(static_cast(numberOfValues)); - this->AllocatedSize = numberOfValues; + this->AllocatedSize = numberOfValues; this->NumberOfValues = numberOfValues; } else @@ -137,30 +137,28 @@ void Storage::Allocate(vtkm::Id numberOfValues) this->Array = nullptr; this->NumberOfValues = 0; this->AllocatedSize = 0; - throw vtkm::cont::ErrorBadAllocation( - "Could not allocate basic control array."); + throw vtkm::cont::ErrorBadAllocation("Could not allocate basic control array."); } this->DeallocateOnRelease = true; this->UserProvidedMemory = false; } -template +template void Storage::Shrink(vtkm::Id numberOfValues) { if (numberOfValues > this->GetNumberOfValues()) { - throw vtkm::cont::ErrorBadValue( - "Shrink method cannot be used to grow array."); + throw vtkm::cont::ErrorBadValue("Shrink method cannot be used to grow array."); } this->NumberOfValues = numberOfValues; } -template +template T* Storage::StealArray() { - T *saveArray = this->Array; + T* saveArray = this->Array; this->Array = nullptr; this->NumberOfValues = 0; this->AllocatedSize = 0; diff --git a/vtkm/cont/StorageImplicit.h b/vtkm/cont/StorageImplicit.h index 5b98630da..8b092b5a8 100644 --- a/vtkm/cont/StorageImplicit.h +++ b/vtkm/cont/StorageImplicit.h @@ -28,8 +28,10 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// \brief An implementation for read-only implicit arrays. /// @@ -41,18 +43,17 @@ namespace cont { /// desired values. An ArrayHandle created with this tag will raise an error on /// any operation that tries to modify it. /// -template +template struct VTKM_ALWAYS_EXPORT StorageTagImplicit { typedef ArrayPortalType PortalType; }; -namespace internal { +namespace internal +{ -template -class Storage< - typename ArrayPortalType::ValueType, - StorageTagImplicit > +template +class Storage> { public: typedef typename ArrayPortalType::ValueType ValueType; @@ -62,30 +63,23 @@ public: // should only be able to use the const version. struct PortalType { - typedef void *ValueType; - typedef void *IteratorType; + typedef void* ValueType; + typedef void* IteratorType; }; VTKM_CONT - Storage(const PortalConstType &portal = PortalConstType()) - : Portal(portal) { } + Storage(const PortalConstType& portal = PortalConstType()) + : Portal(portal) + { + } // All these methods do nothing but raise errors. VTKM_CONT - PortalType GetPortal() - { - throw vtkm::cont::ErrorBadValue("Implicit arrays are read-only."); - } + PortalType GetPortal() { throw vtkm::cont::ErrorBadValue("Implicit arrays are read-only."); } VTKM_CONT - PortalConstType GetPortalConst() const - { - return this->Portal; - } + PortalConstType GetPortalConst() const { return this->Portal; } VTKM_CONT - vtkm::Id GetNumberOfValues() const - { - return this->Portal.GetNumberOfValues(); - } + vtkm::Id GetNumberOfValues() const { return this->Portal.GetNumberOfValues(); } VTKM_CONT void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) { @@ -97,20 +91,18 @@ public: throw vtkm::cont::ErrorBadValue("Implicit arrays are read-only."); } VTKM_CONT - void ReleaseResources() - { - } + void ReleaseResources() {} private: PortalConstType Portal; }; -template +template class ArrayTransfer, DeviceAdapterTag> { private: typedef StorageTagImplicit StorageTag; - typedef vtkm::cont::internal::Storage StorageType; + typedef vtkm::cont::internal::Storage StorageType; public: typedef T ValueType; @@ -121,13 +113,13 @@ public: typedef PortalConstControl PortalConstExecution; VTKM_CONT - ArrayTransfer(StorageType *storage) : Storage(storage) { } + ArrayTransfer(StorageType* storage) + : Storage(storage) + { + } VTKM_CONT - vtkm::Id GetNumberOfValues() const - { - return this->Storage->GetNumberOfValues(); - } + vtkm::Id GetNumberOfValues() const { return this->Storage->GetNumberOfValues(); } VTKM_CONT PortalConstExecution PrepareForInput(bool vtkmNotUsed(updateData)) @@ -138,21 +130,18 @@ public: VTKM_CONT PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData)) { - throw vtkm::cont::ErrorBadValue( - "Implicit arrays cannot be used for output or in place."); + throw vtkm::cont::ErrorBadValue("Implicit arrays cannot be used for output or in place."); } VTKM_CONT PortalExecution PrepareForOutput(vtkm::Id vtkmNotUsed(numberOfValues)) { - throw vtkm::cont::ErrorBadValue( - "Implicit arrays cannot be used for output."); + throw vtkm::cont::ErrorBadValue("Implicit arrays cannot be used for output."); } VTKM_CONT - void RetrieveOutputData(StorageType *vtkmNotUsed(controlArray)) const + void RetrieveOutputData(StorageType* vtkmNotUsed(controlArray)) const { - throw vtkm::cont::ErrorBadValue( - "Implicit arrays cannot be used for output."); + throw vtkm::cont::ErrorBadValue("Implicit arrays cannot be used for output."); } template @@ -162,8 +151,7 @@ public: PortalType portal = this->Storage->GetPortalConst(); std::copy(vtkm::cont::ArrayPortalToIteratorBegin(portal), - vtkm::cont::ArrayPortalToIteratorEnd(portal), - dest); + vtkm::cont::ArrayPortalToIteratorEnd(portal), dest); } VTKM_CONT @@ -173,14 +161,13 @@ public: } VTKM_CONT - void ReleaseResources() { } + void ReleaseResources() {} private: - StorageType *Storage; + StorageType* Storage; }; } // namespace internal - } } // namespace vtkm::cont diff --git a/vtkm/cont/StorageListTag.h b/vtkm/cont/StorageListTag.h index c1d752e8a..1595f6be3 100644 --- a/vtkm/cont/StorageListTag.h +++ b/vtkm/cont/StorageListTag.h @@ -29,12 +29,14 @@ #include #include -namespace vtkm { -namespace cont { - -struct VTKM_ALWAYS_EXPORT StorageListTagBasic - : vtkm::ListTagBase { }; +namespace vtkm +{ +namespace cont +{ +struct VTKM_ALWAYS_EXPORT StorageListTagBasic : vtkm::ListTagBase +{ +}; } } // namespace vtkm::cont diff --git a/vtkm/cont/Timer.h b/vtkm/cont/Timer.h index bfa1ebaac..c964dd897 100644 --- a/vtkm/cont/Timer.h +++ b/vtkm/cont/Timer.h @@ -22,8 +22,10 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// A class that can be used to time operations in VTK-m that might be occuring /// in parallel. You should make sure that the device adapter for the timer @@ -33,7 +35,7 @@ namespace cont { /// The there is no guaranteed resolution of the time but should generally be /// good to about a millisecond. /// -template +template class Timer { public: @@ -41,17 +43,17 @@ public: /// current time is marked so that GetElapsedTime returns the number of /// seconds elapsed since the construction. VTKM_CONT - Timer() : TimerImplementation() { } + Timer() + : TimerImplementation() + { + } /// Resets the timer. All further calls to GetElapsedTime will report the /// number of seconds elapsed since the call to this. This method /// synchronizes all asynchronous operations. /// VTKM_CONT - void Reset() - { - this->TimerImplementation.Reset(); - } + void Reset() { this->TimerImplementation.Reset(); } /// Returns the elapsed time in seconds between the construction of this /// class or the last call to Reset and the time this function is called. The @@ -60,20 +62,15 @@ public: /// asynchronous operations. /// VTKM_CONT - vtkm::Float64 GetElapsedTime() - { - return this->TimerImplementation.GetElapsedTime(); - } + vtkm::Float64 GetElapsedTime() { return this->TimerImplementation.GetElapsedTime(); } private: /// Some timers are ill-defined when copied, so disallow that for all timers. - VTKM_CONT Timer(const Timer &) = delete; - VTKM_CONT void operator=(const Timer &) = delete; + VTKM_CONT Timer(const Timer&) = delete; + VTKM_CONT void operator=(const Timer&) = delete; - vtkm::cont::DeviceAdapterTimerImplementation - TimerImplementation; + vtkm::cont::DeviceAdapterTimerImplementation TimerImplementation; }; - } } // namespace vtkm::cont diff --git a/vtkm/cont/TryExecute.h b/vtkm/cont/TryExecute.h index 9ca0562c1..ee1c50129 100644 --- a/vtkm/cont/TryExecute.h +++ b/vtkm/cont/TryExecute.h @@ -27,31 +27,31 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -namespace detail { +namespace detail +{ -template +template struct TryExecuteRunIfValid; -template +template struct TryExecuteRunIfValid { VTKM_CONT - static bool Run(Functor &, const vtkm::cont::RuntimeDeviceTracker &) { - return false; - } + static bool Run(Functor&, const vtkm::cont::RuntimeDeviceTracker&) { return false; } }; -template +template struct TryExecuteRunIfValid { VTKM_IS_DEVICE_ADAPTER_TAG(Device); VTKM_CONT - static bool Run(Functor &functor, - vtkm::cont::RuntimeDeviceTracker tracker) + static bool Run(Functor& functor, vtkm::cont::RuntimeDeviceTracker tracker) { if (tracker.CanRunOn(Device())) { @@ -59,31 +59,31 @@ struct TryExecuteRunIfValid { return functor(Device()); } - catch(vtkm::cont::ErrorBadAllocation &e) + catch (vtkm::cont::ErrorBadAllocation& e) { std::cerr << "caught ErrorBadAllocation " << e.GetMessage() << std::endl; //currently we only consider OOM errors worth disabling a device for //than we fallback to another device tracker.ReportAllocationFailure(Device(), e); } - catch(vtkm::cont::ErrorBadType &e) + catch (vtkm::cont::ErrorBadType& e) { //should bad type errors should stop the execution, instead of //deferring to another device adapter? std::cerr << "caught ErrorBadType : " << e.GetMessage() << std::endl; } - catch(vtkm::cont::ErrorBadValue &e) + catch (vtkm::cont::ErrorBadValue& e) { //should bad value errors should stop the filter, instead of deferring //to another device adapter? std::cerr << "caught ErrorBadValue : " << e.GetMessage() << std::endl; } - catch(vtkm::cont::Error &e) + catch (vtkm::cont::Error& e) { //general errors should be caught and let us try the next device adapter. std::cerr << "exception is: " << e.GetMessage() << std::endl; } - catch (std::exception &e) + catch (std::exception& e) { std::cerr << "caught standard exception: " << e.what() << std::endl; } @@ -98,40 +98,41 @@ struct TryExecuteRunIfValid } }; -template +template struct TryExecuteImpl { // Warning, these are a references. Make sure referenced objects do not go // out of scope. - FunctorType &Functor; + FunctorType& Functor; vtkm::cont::RuntimeDeviceTracker Tracker; bool Success; VTKM_CONT - TryExecuteImpl(FunctorType &functor, - vtkm::cont::RuntimeDeviceTracker tracker = - vtkm::cont::GetGlobalRuntimeDeviceTracker()) - : Functor(functor), Tracker(tracker), Success(false) { } + TryExecuteImpl(FunctorType& functor, vtkm::cont::RuntimeDeviceTracker tracker = + vtkm::cont::GetGlobalRuntimeDeviceTracker()) + : Functor(functor) + , Tracker(tracker) + , Success(false) + { + } - template - VTKM_CONT - bool operator()(Device) + template + VTKM_CONT bool operator()(Device) { if (!this->Success) { typedef vtkm::cont::DeviceAdapterTraits DeviceTraits; - this->Success = - detail::TryExecuteRunIfValid - ::Run(this->Functor, this->Tracker); + this->Success = detail::TryExecuteRunIfValid::Run( + this->Functor, this->Tracker); } return this->Success; } private: - void operator=(const TryExecuteImpl &) = delete; + void operator=(const TryExecuteImpl&) = delete; }; } // namespace detail @@ -157,63 +158,43 @@ private: /// If no device list is specified, then \c VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG /// is used. /// -template -VTKM_CONT -bool TryExecute(const Functor &functor, - vtkm::cont::RuntimeDeviceTracker tracker, - DeviceList) +template +VTKM_CONT bool TryExecute(const Functor& functor, vtkm::cont::RuntimeDeviceTracker tracker, + DeviceList) { detail::TryExecuteImpl internals(functor, tracker); vtkm::ListForEach(internals, DeviceList()); return internals.Success; } -template -VTKM_CONT -bool TryExecute(Functor &functor, - vtkm::cont::RuntimeDeviceTracker tracker, - DeviceList) +template +VTKM_CONT bool TryExecute(Functor& functor, vtkm::cont::RuntimeDeviceTracker tracker, DeviceList) { detail::TryExecuteImpl internals(functor, tracker); vtkm::ListForEach(internals, DeviceList()); return internals.Success; } -template -VTKM_CONT -bool TryExecute(const Functor &functor, DeviceList) +template +VTKM_CONT bool TryExecute(const Functor& functor, DeviceList) { - return vtkm::cont::TryExecute(functor, - vtkm::cont::GetGlobalRuntimeDeviceTracker(), - DeviceList()); + return vtkm::cont::TryExecute(functor, vtkm::cont::GetGlobalRuntimeDeviceTracker(), DeviceList()); } -template -VTKM_CONT -bool TryExecute(Functor &functor, DeviceList) +template +VTKM_CONT bool TryExecute(Functor& functor, DeviceList) { - return vtkm::cont::TryExecute(functor, - vtkm::cont::GetGlobalRuntimeDeviceTracker(), - DeviceList()); + return vtkm::cont::TryExecute(functor, vtkm::cont::GetGlobalRuntimeDeviceTracker(), DeviceList()); } -template -VTKM_CONT -bool TryExecute(const Functor &functor, - vtkm::cont::RuntimeDeviceTracker tracker = - vtkm::cont::GetGlobalRuntimeDeviceTracker()) +template +VTKM_CONT bool TryExecute(const Functor& functor, vtkm::cont::RuntimeDeviceTracker tracker = + vtkm::cont::GetGlobalRuntimeDeviceTracker()) { - return vtkm::cont::TryExecute(functor, - tracker, - VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG()); + return vtkm::cont::TryExecute(functor, tracker, VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG()); } -template -VTKM_CONT -bool TryExecute(Functor &functor, - vtkm::cont::RuntimeDeviceTracker tracker = - vtkm::cont::GetGlobalRuntimeDeviceTracker()) +template +VTKM_CONT bool TryExecute(Functor& functor, vtkm::cont::RuntimeDeviceTracker tracker = + vtkm::cont::GetGlobalRuntimeDeviceTracker()) { - return vtkm::cont::TryExecute(functor, - tracker, - VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG()); + return vtkm::cont::TryExecute(functor, tracker, VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG()); } - } } // namespace vtkm::cont diff --git a/vtkm/cont/VirtualObjectCache.h b/vtkm/cont/VirtualObjectCache.h index 7cf6e784e..f995ad365 100644 --- a/vtkm/cont/VirtualObjectCache.h +++ b/vtkm/cont/VirtualObjectCache.h @@ -20,20 +20,21 @@ #ifndef vtk_m_cont_VirtualObjectCache_h #define vtk_m_cont_VirtualObjectCache_h +#include #include #include #include -#include #include #include #include - #define VTKM_MAX_DEVICE_ADAPTER_ID 8 -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// \brief Implements VTK-m's execution side Virtual Methods /// functionality. @@ -64,33 +65,30 @@ namespace cont { /// /// \sa vtkm::exec::ImplicitFunction, vtkm::cont::ImplicitFunction /// -template +template class VirtualObjectCache { public: VirtualObjectCache() - : Target(nullptr), - CurrentDevice(VTKM_DEVICE_ADAPTER_UNDEFINED), - DeviceState(nullptr), - RefreshFlag(false) + : Target(nullptr) + , CurrentDevice(VTKM_DEVICE_ADAPTER_UNDEFINED) + , DeviceState(nullptr) + , RefreshFlag(false) { } - ~VirtualObjectCache() - { - this->Reset(); - } + ~VirtualObjectCache() { this->Reset(); } - VirtualObjectCache(const VirtualObjectCache &other) - : Target(other.Target), - Transfers(other.Transfers), - CurrentDevice(VTKM_DEVICE_ADAPTER_UNDEFINED), - DeviceState(nullptr), - RefreshFlag(false) + VirtualObjectCache(const VirtualObjectCache& other) + : Target(other.Target) + , Transfers(other.Transfers) + , CurrentDevice(VTKM_DEVICE_ADAPTER_UNDEFINED) + , DeviceState(nullptr) + , RefreshFlag(false) { } - VirtualObjectCache& operator=(const VirtualObjectCache &other) + VirtualObjectCache& operator=(const VirtualObjectCache& other) { if (this != &other) { @@ -104,19 +102,19 @@ public: return *this; } - VirtualObjectCache(VirtualObjectCache &&other) - : Target(other.Target), - Transfers(other.Transfers), - CurrentDevice(other.CurrentDevice), - DeviceState(other.DeviceState), - RefreshFlag(other.RefreshFlag), - Object(other.Object) + VirtualObjectCache(VirtualObjectCache&& other) + : Target(other.Target) + , Transfers(other.Transfers) + , CurrentDevice(other.CurrentDevice) + , DeviceState(other.DeviceState) + , RefreshFlag(other.RefreshFlag) + , Object(other.Object) { other.CurrentDevice = VTKM_DEVICE_ADAPTER_UNDEFINED; other.DeviceState = nullptr; } - VirtualObjectCache& operator=(VirtualObjectCache &&other) + VirtualObjectCache& operator=(VirtualObjectCache&& other) { if (this != &other) { @@ -155,38 +153,25 @@ public: } /// Get if in a valid state (a target is bound) - bool GetValid() const - { - return this->Target != nullptr; - } + bool GetValid() const { return this->Target != nullptr; } // Set/Get if the cached virtual object should be refreshed to the current // state of the target - void SetRefreshFlag(bool value) - { - this->RefreshFlag = value; - } - bool GetRefreshFlag() const - { - return this->RefreshFlag; - } + void SetRefreshFlag(bool value) { this->RefreshFlag = value; } + bool GetRefreshFlag() const { return this->RefreshFlag; } /// Bind to \c target. The lifetime of target is expected to be managed /// externally, and should be valid for as long as it is bound. /// Also accepts a list-tag of device adapters where the virtual /// object may be used (default = \c VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG). /// - template - void Bind(const TargetClass *target, - DeviceAdapterList devices = DeviceAdapterList()) + template + void Bind(const TargetClass* target, DeviceAdapterList devices = DeviceAdapterList()) { this->Reset(); this->Target = target; - vtkm::ListForEach( - CreateTransferInterface(this->Transfers.data()), - devices); + vtkm::ListForEach(CreateTransferInterface(this->Transfers.data()), devices); } /// Get a \c VirtualObject for \c DeviceAdapter. @@ -196,7 +181,7 @@ public: /// 2. VirtualObjectCache is destroyed /// 3. Reset or ReleaseResources is called /// - template + template VirtualObject GetVirtualObject(DeviceAdapter) { using DeviceInfo = vtkm::cont::DeviceAdapterTraits; @@ -209,8 +194,7 @@ public: vtkm::cont::DeviceAdapterId deviceId = DeviceInfo::GetId(); if (deviceId < 0 || deviceId >= VTKM_MAX_DEVICE_ADAPTER_ID) { - std::string msg = - "Device '" + DeviceInfo::GetName() + "' has invalid ID of " + + std::string msg = "Device '" + DeviceInfo::GetName() + "' has invalid ID of " + std::to_string(deviceId) + "(VTKM_MAX_DEVICE_ADAPTER_ID = " + std::to_string(VTKM_MAX_DEVICE_ADAPTER_ID) + ")"; throw vtkm::cont::ErrorBadType(msg); @@ -221,11 +205,10 @@ public: this->ReleaseResources(); std::size_t idx = static_cast(deviceId); - TransferInterface &transfer = this->Transfers[idx]; + TransferInterface& transfer = this->Transfers[idx]; if (!TransferInterfaceValid(transfer)) { - std::string msg = DeviceInfo::GetName() + - " was not in the list specified in Bind"; + std::string msg = DeviceInfo::GetName() + " was not in the list specified in Bind"; throw vtkm::cont::ErrorBadType(msg); } this->CurrentDevice = deviceId; @@ -243,56 +226,51 @@ public: private: struct TransferInterface { - using CreateSig = void*(VirtualObject &, const void *); - using UpdateSig = void(void *, const void *); - using CleanupSig = void(void *); + using CreateSig = void*(VirtualObject&, const void*); + using UpdateSig = void(void*, const void*); + using CleanupSig = void(void*); - CreateSig *Create = nullptr; - UpdateSig *Update = nullptr; - CleanupSig *Cleanup = nullptr; + CreateSig* Create = nullptr; + UpdateSig* Update = nullptr; + CleanupSig* Cleanup = nullptr; }; - static bool TransferInterfaceValid(const TransferInterface &t) - { - return t.Create != nullptr; - } + static bool TransferInterfaceValid(const TransferInterface& t) { return t.Create != nullptr; } TransferInterface& GetCurrentTransfer() { return this->Transfers[static_cast(this->CurrentDevice)]; } - template + template class CreateTransferInterface { private: - template - using EnableIfValid = - std::enable_if::Valid>; + template + using EnableIfValid = std::enable_if::Valid>; - template - using EnableIfInvalid = - std::enable_if::Valid>; + template + using EnableIfInvalid = std::enable_if::Valid>; public: - CreateTransferInterface(TransferInterface *transfers) + CreateTransferInterface(TransferInterface* transfers) : Transfers(transfers) - { } + { + } // Use SFINAE to create entries for valid device adapters only - template + template typename EnableIfValid::type operator()(DeviceAdapter) const { using DeviceInfo = vtkm::cont::DeviceAdapterTraits; - if (DeviceInfo::GetId() >= 0 && - DeviceInfo::GetId() < VTKM_MAX_DEVICE_ADAPTER_ID) + if (DeviceInfo::GetId() >= 0 && DeviceInfo::GetId() < VTKM_MAX_DEVICE_ADAPTER_ID) { using TransferImpl = internal::VirtualObjectTransfer; std::size_t id = static_cast(DeviceInfo::GetId()); - TransferInterface &transfer = this->Transfers[id]; + TransferInterface& transfer = this->Transfers[id]; transfer.Create = &TransferImpl::Create; transfer.Update = &TransferImpl::Update; @@ -300,31 +278,30 @@ private: } else { - std::string msg = - "Device '" + DeviceInfo::GetName() + "' has invalid ID of " + + std::string msg = "Device '" + DeviceInfo::GetName() + "' has invalid ID of " + std::to_string(DeviceInfo::GetId()) + "(VTKM_MAX_DEVICE_ADAPTER_ID = " + std::to_string(VTKM_MAX_DEVICE_ADAPTER_ID) + ")"; throw vtkm::cont::ErrorBadType(msg); } } - template + template typename EnableIfInvalid::type operator()(DeviceAdapter) const - { } + { + } private: - TransferInterface *Transfers; + TransferInterface* Transfers; }; - const void *Target; + const void* Target; std::array Transfers; vtkm::cont::DeviceAdapterId CurrentDevice; - void *DeviceState; + void* DeviceState; bool RefreshFlag; VirtualObject Object; }; - } } // vtkm::cont diff --git a/vtkm/cont/arg/ControlSignatureTagBase.h b/vtkm/cont/arg/ControlSignatureTagBase.h index bf87dedb7..f2acc62e9 100644 --- a/vtkm/cont/arg/ControlSignatureTagBase.h +++ b/vtkm/cont/arg/ControlSignatureTagBase.h @@ -25,9 +25,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief The base class for all tags used in a \c ControlSignature. /// @@ -40,16 +43,18 @@ namespace arg { /// must define the following three typedefs: \c TypeCheckTag, \c TransportTag /// and \c FetchTag. /// -struct ControlSignatureTagBase { }; +struct ControlSignatureTagBase +{ +}; -namespace internal { +namespace internal +{ -template +template struct ControlSignatureTagCheck { static VTKM_CONSTEXPR bool Valid = - std::is_base_of< - vtkm::cont::arg::ControlSignatureTagBase, ControlSignatureTag>::value; + std::is_base_of::value; }; } // namespace internal @@ -59,11 +64,9 @@ struct ControlSignatureTagCheck /// that a template argument is actually an \c ControlSignature tag. (You can /// get weird errors elsewhere in the code when a mistake is made.) /// -#define VTKM_IS_CONTROL_SIGNATURE_TAG(tag) \ - VTKM_STATIC_ASSERT_MSG( \ - ::vtkm::cont::arg::internal::ControlSignatureTagCheck::Valid, \ - "Provided a type that is not a valid ControlSignature tag.") - +#define VTKM_IS_CONTROL_SIGNATURE_TAG(tag) \ + VTKM_STATIC_ASSERT_MSG(::vtkm::cont::arg::internal::ControlSignatureTagCheck::Valid, \ + "Provided a type that is not a valid ControlSignature tag.") } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/Transport.h b/vtkm/cont/arg/Transport.h index 0c6572019..0be9c5c25 100644 --- a/vtkm/cont/arg/Transport.h +++ b/vtkm/cont/arg/Transport.h @@ -20,9 +20,12 @@ #ifndef vtk_m_cont_arg_Transport_h #define vtk_m_cont_arg_Transport_h -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief Class for transporting from the control to the execution environment. /// @@ -41,9 +44,7 @@ namespace arg { /// an invalid \c TransportTag or it is an invalid combination of data type or /// device adapter. /// -template +template struct Transport #ifdef VTKM_DOXYGEN_ONLY { @@ -54,8 +55,8 @@ struct Transport /// For example, for an \c ArrayHandle, the \c ExecObjectType is the portal /// used in the execution environment. /// - typedef typename ContObjectType:: - template ExecutionTypes::PortalConst ExecObjectType; + typedef + typename ContObjectType::template ExecutionTypes::PortalConst ExecObjectType; /// \brief Send data to the execution environment. /// @@ -68,16 +69,13 @@ struct Transport /// example, to allocate data for an output array. The transport might ignore /// either or both of the second two arguments. /// - template - VTKM_CONT - ExecObjectType operator()(const ContObjectType contData, - const InputDomainType &inputDomain - vtkm::Id outputSize) const; + template + VTKM_CONT ExecObjectType operator()(const ContObjectType contData, + const InputDomainType& inputDomain vtkm::Id outputSize) const; }; -#else // VTKM_DOXYGEN_ONLY - ; +#else // VTKM_DOXYGEN_ONLY + ; #endif // VTKM_DOXYGEN_ONLY - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TransportTagArrayIn.h b/vtkm/cont/arg/TransportTagArrayIn.h index f4b5378ba..ac4f8a253 100644 --- a/vtkm/cont/arg/TransportTagArrayIn.h +++ b/vtkm/cont/arg/TransportTagArrayIn.h @@ -26,42 +26,42 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for input arrays. /// /// \c TransportTagArrayIn is a tag used with the \c Transport class to /// transport \c ArrayHandle objects for input data. /// -struct TransportTagArrayIn { }; +struct TransportTagArrayIn +{ +}; -template +template struct Transport { VTKM_IS_ARRAY_HANDLE(ContObjectType); - typedef typename ContObjectType::template ExecutionTypes::PortalConst - ExecObjectType; + typedef typename ContObjectType::template ExecutionTypes::PortalConst ExecObjectType; - template - VTKM_CONT - ExecObjectType operator()(const ContObjectType &object, - const InputDomainType &vtkmNotUsed(inputDomain), - vtkm::Id inputRange, - vtkm::Id vtkmNotUsed(outputRange)) const + template + VTKM_CONT ExecObjectType operator()(const ContObjectType& object, + const InputDomainType& vtkmNotUsed(inputDomain), + vtkm::Id inputRange, vtkm::Id vtkmNotUsed(outputRange)) const { if (object.GetNumberOfValues() != inputRange) { - throw vtkm::cont::ErrorBadValue( - "Input array to worklet invocation the wrong size."); + throw vtkm::cont::ErrorBadValue("Input array to worklet invocation the wrong size."); } return object.PrepareForInput(Device()); } }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TransportTagArrayInOut.h b/vtkm/cont/arg/TransportTagArrayInOut.h index b251d8b06..3d802fca4 100644 --- a/vtkm/cont/arg/TransportTagArrayInOut.h +++ b/vtkm/cont/arg/TransportTagArrayInOut.h @@ -26,9 +26,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for in-place arrays. /// @@ -36,35 +39,32 @@ namespace arg { /// transport \c ArrayHandle objects for data that is both input and output /// (that is, in place modification of array data). /// -struct TransportTagArrayInOut { }; +struct TransportTagArrayInOut +{ +}; -template +template struct Transport { // If you get a compile error here, it means you tried to use an object that // is not an array handle as an argument that is expected to be one. VTKM_IS_ARRAY_HANDLE(ContObjectType); - typedef typename ContObjectType::template ExecutionTypes::Portal - ExecObjectType; + typedef typename ContObjectType::template ExecutionTypes::Portal ExecObjectType; - template - VTKM_CONT - ExecObjectType operator()(ContObjectType object, - const InputDomainType &vtkmNotUsed(inputDomain), - vtkm::Id vtkmNotUsed(inputRange), - vtkm::Id outputRange) const + template + VTKM_CONT ExecObjectType operator()(ContObjectType object, + const InputDomainType& vtkmNotUsed(inputDomain), + vtkm::Id vtkmNotUsed(inputRange), vtkm::Id outputRange) const { if (object.GetNumberOfValues() != outputRange) { - throw vtkm::cont::ErrorBadValue( - "Input/output array to worklet invocation the wrong size."); + throw vtkm::cont::ErrorBadValue("Input/output array to worklet invocation the wrong size."); } return object.PrepareForInPlace(Device()); } }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TransportTagArrayOut.h b/vtkm/cont/arg/TransportTagArrayOut.h index d5b780830..77248736b 100644 --- a/vtkm/cont/arg/TransportTagArrayOut.h +++ b/vtkm/cont/arg/TransportTagArrayOut.h @@ -26,38 +26,39 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for output arrays. /// /// \c TransportTagArrayOut is a tag used with the \c Transport class to /// transport \c ArrayHandle objects for output data. /// -struct TransportTagArrayOut { }; +struct TransportTagArrayOut +{ +}; -template +template struct Transport { // If you get a compile error here, it means you tried to use an object that // is not an array handle as an argument that is expected to be one. VTKM_IS_ARRAY_HANDLE(ContObjectType); - typedef typename ContObjectType::template ExecutionTypes::Portal - ExecObjectType; + typedef typename ContObjectType::template ExecutionTypes::Portal ExecObjectType; - template - VTKM_CONT - ExecObjectType operator()(ContObjectType object, - const InputDomainType &vtkmNotUsed(inputDomain), - vtkm::Id vtkmNotUsed(inputRange), - vtkm::Id outputRange) const + template + VTKM_CONT ExecObjectType operator()(ContObjectType object, + const InputDomainType& vtkmNotUsed(inputDomain), + vtkm::Id vtkmNotUsed(inputRange), vtkm::Id outputRange) const { return object.PrepareForOutput(outputRange, Device()); } }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TransportTagAtomicArray.h b/vtkm/cont/arg/TransportTagAtomicArray.h index ccde6a63b..958f9ab42 100644 --- a/vtkm/cont/arg/TransportTagAtomicArray.h +++ b/vtkm/cont/arg/TransportTagAtomicArray.h @@ -29,9 +29,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for in-place arrays with atomic operations. /// @@ -41,23 +44,19 @@ namespace arg { /// in a vtkm::exec::AtomicArray class that provides atomic operations (like /// add and compare/swap). /// -struct TransportTagAtomicArray { }; +struct TransportTagAtomicArray +{ +}; -template -struct Transport< - vtkm::cont::arg::TransportTagAtomicArray, - vtkm::cont::ArrayHandle, - Device> +template +struct Transport, Device> { typedef vtkm::exec::AtomicArray ExecObjectType; - template - VTKM_CONT - ExecObjectType operator()( - vtkm::cont::ArrayHandle array, - const InputDomainType &, - vtkm::Id, - vtkm::Id) const + template + VTKM_CONT ExecObjectType operator()(vtkm::cont::ArrayHandle array, + const InputDomainType&, vtkm::Id, vtkm::Id) const { // Note: we ignore the size of the domain because the randomly accessed // array might not have the same size depending on how the user is using @@ -66,7 +65,6 @@ struct Transport< return ExecObjectType(array); } }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TransportTagCellSetIn.h b/vtkm/cont/arg/TransportTagCellSetIn.h index 80528c27d..4e6189c70 100644 --- a/vtkm/cont/arg/TransportTagCellSetIn.h +++ b/vtkm/cont/arg/TransportTagCellSetIn.h @@ -26,44 +26,40 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for input arrays. /// /// \c TransportTagCellSetIn is a tag used with the \c Transport class to /// transport topology objects for input data. /// -template -struct TransportTagCellSetIn { }; +template +struct TransportTagCellSetIn +{ +}; -template -struct Transport, ContObjectType, Device> +template +struct Transport, ContObjectType, + Device> { VTKM_IS_CELL_SET(ContObjectType); - typedef typename ContObjectType - ::template ExecutionTypes< - Device,FromTopology,ToTopology> - ::ExecObjectType ExecObjectType; + typedef + typename ContObjectType::template ExecutionTypes::ExecObjectType ExecObjectType; - template - VTKM_CONT - ExecObjectType operator()(const ContObjectType &object, - const InputDomainType &, - vtkm::Id, - vtkm::Id) const + template + VTKM_CONT ExecObjectType operator()(const ContObjectType& object, const InputDomainType&, + vtkm::Id, vtkm::Id) const { - return object.PrepareForInput(Device(), - FromTopology(), - ToTopology()); + return object.PrepareForInput(Device(), FromTopology(), ToTopology()); } }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TransportTagExecObject.h b/vtkm/cont/arg/TransportTagExecObject.h index fee639d76..c94577704 100644 --- a/vtkm/cont/arg/TransportTagExecObject.h +++ b/vtkm/cont/arg/TransportTagExecObject.h @@ -26,19 +26,24 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for execution objects. /// /// \c TransportTagExecObject is a tag used with the \c Transport class to /// transport objects that work directly in the execution environment. /// -struct TransportTagExecObject { }; +struct TransportTagExecObject +{ +}; -template -struct Transport +template +struct Transport { // If you get a compile error here, it means you tried to use an object that // is not an execution object as an argument that is expected to be one. All @@ -50,17 +55,13 @@ struct Transport typedef ContObjectType ExecObjectType; - template - VTKM_CONT - ExecObjectType operator()(const ContObjectType &object, - const InputDomainType &, - vtkm::Id, - vtkm::Id) const + template + VTKM_CONT ExecObjectType operator()(const ContObjectType& object, const InputDomainType&, + vtkm::Id, vtkm::Id) const { return object; } }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TransportTagKeyedValuesIn.h b/vtkm/cont/arg/TransportTagKeyedValuesIn.h index 0fbb252be..baee6a604 100644 --- a/vtkm/cont/arg/TransportTagKeyedValuesIn.h +++ b/vtkm/cont/arg/TransportTagKeyedValuesIn.h @@ -22,9 +22,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for input values in a reduce by key. /// @@ -32,12 +35,13 @@ namespace arg { /// transport \c ArrayHandle objects for input values. The values are /// rearranged and grouped based on the keys they are associated with. /// -struct TransportTagKeyedValuesIn { }; +struct TransportTagKeyedValuesIn +{ +}; // Specialization of Transport class for TransportTagKeyedValuesIn is // implemented in vtkm/worklet/Keys.h. That class is not accessible from here // due to VTK-m package dependencies. - } } } diff --git a/vtkm/cont/arg/TransportTagKeyedValuesInOut.h b/vtkm/cont/arg/TransportTagKeyedValuesInOut.h index 6b81b27e7..552b70c8e 100644 --- a/vtkm/cont/arg/TransportTagKeyedValuesInOut.h +++ b/vtkm/cont/arg/TransportTagKeyedValuesInOut.h @@ -22,9 +22,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for input values in a reduce by key. /// @@ -32,12 +35,13 @@ namespace arg { /// to transport \c ArrayHandle objects for input/output values. The values are /// rearranged and grouped based on the keys they are associated with. /// -struct TransportTagKeyedValuesInOut { }; +struct TransportTagKeyedValuesInOut +{ +}; // Specialization of Transport class for TransportTagKeyedValuesInOut is // implemented in vtkm/worklet/Keys.h. That class is not accessible from here // due to VTK-m package dependencies. - } } } diff --git a/vtkm/cont/arg/TransportTagKeyedValuesOut.h b/vtkm/cont/arg/TransportTagKeyedValuesOut.h index 51c061b29..bb523611c 100644 --- a/vtkm/cont/arg/TransportTagKeyedValuesOut.h +++ b/vtkm/cont/arg/TransportTagKeyedValuesOut.h @@ -22,9 +22,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for input values in a reduce by key. /// @@ -32,12 +35,13 @@ namespace arg { /// to transport \c ArrayHandle objects for output values. The values are /// rearranged and grouped based on the keys they are associated with. /// -struct TransportTagKeyedValuesOut { }; +struct TransportTagKeyedValuesOut +{ +}; // Specialization of Transport class for TransportTagKeyedValuesOut is // implemented in vtkm/worklet/Keys.h. That class is not accessible from here // due to VTK-m package dependencies. - } } } diff --git a/vtkm/cont/arg/TransportTagKeysIn.h b/vtkm/cont/arg/TransportTagKeysIn.h index 55cea3f7f..972ea9e0b 100644 --- a/vtkm/cont/arg/TransportTagKeysIn.h +++ b/vtkm/cont/arg/TransportTagKeysIn.h @@ -22,9 +22,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for keys in a reduce by key. /// @@ -32,12 +35,13 @@ namespace arg { /// transport vtkm::worklet::Keys objects for the input domain of a /// reduce by keys worklet. /// -struct TransportTagKeysIn { }; +struct TransportTagKeysIn +{ +}; // Specialization of Transport class for TransportTagKeysIn is implemented in // vtkm/worklet/Keys.h. That class is not accessible from here due to VTK-m // package dependencies. - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TransportTagTopologyFieldIn.h b/vtkm/cont/arg/TransportTagTopologyFieldIn.h index 72ce35e0c..c6cb3b0a7 100644 --- a/vtkm/cont/arg/TransportTagTopologyFieldIn.h +++ b/vtkm/cont/arg/TransportTagTopologyFieldIn.h @@ -28,9 +28,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for input arrays in topology maps. /// @@ -39,34 +42,37 @@ namespace arg { /// on a topology element tag and expects a cell set input domain to check the /// size of the input array. /// -template -struct TransportTagTopologyFieldIn { }; +template +struct TransportTagTopologyFieldIn +{ +}; -namespace detail { +namespace detail +{ VTKM_CONT -inline static vtkm::Id TopologyDomainSize(const vtkm::cont::CellSet &cellSet, +inline static vtkm::Id TopologyDomainSize(const vtkm::cont::CellSet& cellSet, vtkm::TopologyElementTagPoint) { return cellSet.GetNumberOfPoints(); } VTKM_CONT -inline static vtkm::Id TopologyDomainSize(const vtkm::cont::CellSet &cellSet, +inline static vtkm::Id TopologyDomainSize(const vtkm::cont::CellSet& cellSet, vtkm::TopologyElementTagCell) { return cellSet.GetNumberOfCells(); } VTKM_CONT -inline static vtkm::Id TopologyDomainSize(const vtkm::cont::CellSet &cellSet, +inline static vtkm::Id TopologyDomainSize(const vtkm::cont::CellSet& cellSet, vtkm::TopologyElementTagFace) { return cellSet.GetNumberOfFaces(); } VTKM_CONT -inline static vtkm::Id TopologyDomainSize(const vtkm::cont::CellSet &cellSet, +inline static vtkm::Id TopologyDomainSize(const vtkm::cont::CellSet& cellSet, vtkm::TopologyElementTagEdge) { return cellSet.GetNumberOfEdges(); @@ -74,34 +80,26 @@ inline static vtkm::Id TopologyDomainSize(const vtkm::cont::CellSet &cellSet, } // namespace detail -template -struct Transport< - vtkm::cont::arg::TransportTagTopologyFieldIn, - ContObjectType, - Device> +template +struct Transport, ContObjectType, + Device> { VTKM_IS_ARRAY_HANDLE(ContObjectType); - typedef typename ContObjectType::template ExecutionTypes::PortalConst - ExecObjectType; + typedef typename ContObjectType::template ExecutionTypes::PortalConst ExecObjectType; VTKM_CONT - ExecObjectType operator()(const ContObjectType &object, - const vtkm::cont::CellSet &inputDomain, - vtkm::Id, - vtkm::Id) const + ExecObjectType operator()(const ContObjectType& object, const vtkm::cont::CellSet& inputDomain, + vtkm::Id, vtkm::Id) const { - if (object.GetNumberOfValues() != - detail::TopologyDomainSize(inputDomain, TopologyElementTag())) + if (object.GetNumberOfValues() != detail::TopologyDomainSize(inputDomain, TopologyElementTag())) { - throw vtkm::cont::ErrorBadValue( - "Input array to worklet invocation the wrong size."); + throw vtkm::cont::ErrorBadValue("Input array to worklet invocation the wrong size."); } return object.PrepareForInput(Device()); } }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TransportTagWholeArrayIn.h b/vtkm/cont/arg/TransportTagWholeArrayIn.h index e9268065c..d0d08a872 100644 --- a/vtkm/cont/arg/TransportTagWholeArrayIn.h +++ b/vtkm/cont/arg/TransportTagWholeArrayIn.h @@ -28,9 +28,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for in-place arrays with random access. /// @@ -40,11 +43,12 @@ namespace arg { /// The worklet will have random access to the array through a portal /// interface. /// -struct TransportTagWholeArrayIn { }; +struct TransportTagWholeArrayIn +{ +}; -template -struct Transport< - vtkm::cont::arg::TransportTagWholeArrayIn, ContObjectType, Device> +template +struct Transport { // If you get a compile error here, it means you tried to use an object that // is not an array handle as an argument that is expected to be one. @@ -53,15 +57,11 @@ struct Transport< typedef typename ContObjectType::ValueType ValueType; typedef typename ContObjectType::StorageTag StorageTag; - typedef vtkm::exec::ExecutionWholeArrayConst - ExecObjectType; + typedef vtkm::exec::ExecutionWholeArrayConst ExecObjectType; - template - VTKM_CONT - ExecObjectType operator()(ContObjectType array, - const InputDomainType &, - vtkm::Id, - vtkm::Id) const + template + VTKM_CONT ExecObjectType operator()(ContObjectType array, const InputDomainType&, vtkm::Id, + vtkm::Id) const { // Note: we ignore the size of the domain because the randomly accessed // array might not have the same size depending on how the user is using @@ -70,7 +70,6 @@ struct Transport< return ExecObjectType(array); } }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TransportTagWholeArrayInOut.h b/vtkm/cont/arg/TransportTagWholeArrayInOut.h index 8f4a40524..663966c76 100644 --- a/vtkm/cont/arg/TransportTagWholeArrayInOut.h +++ b/vtkm/cont/arg/TransportTagWholeArrayInOut.h @@ -28,9 +28,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for in-place arrays with random access. /// @@ -42,11 +45,12 @@ namespace arg { /// interface, but care should be taken to not write a value in one instance /// that will be read by or overridden by another entry. /// -struct TransportTagWholeArrayInOut { }; +struct TransportTagWholeArrayInOut +{ +}; -template -struct Transport< - vtkm::cont::arg::TransportTagWholeArrayInOut, ContObjectType, Device> +template +struct Transport { // If you get a compile error here, it means you tried to use an object that // is not an array handle as an argument that is expected to be one. @@ -55,15 +59,11 @@ struct Transport< typedef typename ContObjectType::ValueType ValueType; typedef typename ContObjectType::StorageTag StorageTag; - typedef vtkm::exec::ExecutionWholeArray - ExecObjectType; + typedef vtkm::exec::ExecutionWholeArray ExecObjectType; - template - VTKM_CONT - ExecObjectType operator()(ContObjectType array, - const InputDomainType &, - vtkm::Id, - vtkm::Id) const + template + VTKM_CONT ExecObjectType operator()(ContObjectType array, const InputDomainType&, vtkm::Id, + vtkm::Id) const { // Note: we ignore the size of the domain because the randomly accessed // array might not have the same size depending on how the user is using @@ -72,7 +72,6 @@ struct Transport< return ExecObjectType(array); } }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TransportTagWholeArrayOut.h b/vtkm/cont/arg/TransportTagWholeArrayOut.h index aa969fb8f..21e75863d 100644 --- a/vtkm/cont/arg/TransportTagWholeArrayOut.h +++ b/vtkm/cont/arg/TransportTagWholeArrayOut.h @@ -28,9 +28,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief \c Transport tag for in-place arrays with random access. /// @@ -42,11 +45,12 @@ namespace arg { /// interface, but care should be taken to not write a value in one instance /// that will be overridden by another entry. /// -struct TransportTagWholeArrayOut { }; +struct TransportTagWholeArrayOut +{ +}; -template -struct Transport< - vtkm::cont::arg::TransportTagWholeArrayOut, ContObjectType, Device> +template +struct Transport { // If you get a compile error here, it means you tried to use an object that // is not an array handle as an argument that is expected to be one. @@ -55,15 +59,11 @@ struct Transport< typedef typename ContObjectType::ValueType ValueType; typedef typename ContObjectType::StorageTag StorageTag; - typedef vtkm::exec::ExecutionWholeArray - ExecObjectType; + typedef vtkm::exec::ExecutionWholeArray ExecObjectType; - template - VTKM_CONT - ExecObjectType operator()(ContObjectType array, - const InputDomainType &, - vtkm::Id, - vtkm::Id) const + template + VTKM_CONT ExecObjectType operator()(ContObjectType array, const InputDomainType&, vtkm::Id, + vtkm::Id) const { // Note: we ignore the size of the domain because the randomly accessed // array might not have the same size depending on how the user is using @@ -72,7 +72,6 @@ struct Transport< return ExecObjectType(array, array.GetNumberOfValues()); } }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TypeCheck.h b/vtkm/cont/arg/TypeCheck.h index 056be4a39..5e96a0f51 100644 --- a/vtkm/cont/arg/TypeCheck.h +++ b/vtkm/cont/arg/TypeCheck.h @@ -20,9 +20,12 @@ #ifndef vtk_m_cont_arg_TypeCheck_h #define vtk_m_cont_arg_TypeCheck_h -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// \brief Class for checking that a type matches the semantics for an argument. /// @@ -37,7 +40,7 @@ namespace arg { /// a new type check tag is defined, along with it should be partial /// specializations that find valid types. /// -template +template struct TypeCheck { /// The static constant boolean \c value is set to \c true if the type is @@ -45,7 +48,6 @@ struct TypeCheck /// static const bool value = false; }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TypeCheckTagArray.h b/vtkm/cont/arg/TypeCheckTagArray.h index a8bd013b1..40cd8be72 100644 --- a/vtkm/cont/arg/TypeCheckTagArray.h +++ b/vtkm/cont/arg/TypeCheckTagArray.h @@ -26,32 +26,35 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// The Array type check passes for any object that behaves like an \c /// ArrayHandle class and can be passed to the ArrayIn and ArrayOut transports. /// -template +template struct TypeCheckTagArray { VTKM_IS_LIST_TAG(TypeList); }; -namespace detail { +namespace detail +{ -template +template struct TypeCheckArrayValueType; -template +template struct TypeCheckArrayValueType { - static const bool value = - vtkm::ListContains::value; + static const bool value = vtkm::ListContains::value; }; -template +template struct TypeCheckArrayValueType { static const bool value = false; @@ -59,16 +62,12 @@ struct TypeCheckArrayValueType } // namespace detail -template +template struct TypeCheck, ArrayType> { - static const bool value = - detail::TypeCheckArrayValueType< - TypeList, - ArrayType, - vtkm::cont::internal::ArrayHandleCheck::type::value>::value; + static const bool value = detail::TypeCheckArrayValueType< + TypeList, ArrayType, vtkm::cont::internal::ArrayHandleCheck::type::value>::value; }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TypeCheckTagAtomicArray.h b/vtkm/cont/arg/TypeCheckTagAtomicArray.h index ffae77fd6..874264e40 100644 --- a/vtkm/cont/arg/TypeCheckTagAtomicArray.h +++ b/vtkm/cont/arg/TypeCheckTagAtomicArray.h @@ -29,35 +29,36 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// The atomic array type check passes for an \c ArrayHandle of a structure /// that is valid for atomic access. There are many restrictions on the /// type of data that can be used for an atomic array. /// -template +template struct TypeCheckTagAtomicArray { VTKM_IS_LIST_TAG(TypeList); }; -template +template struct TypeCheck, ArrayType> { static const bool value = false; }; -template +template struct TypeCheck, - vtkm::cont::ArrayHandle > + vtkm::cont::ArrayHandle> { - static const bool value = - ( vtkm::ListContains::value && - vtkm::ListContains::value ); + static const bool value = (vtkm::ListContains::value && + vtkm::ListContains::value); }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TypeCheckTagCellSet.h b/vtkm/cont/arg/TypeCheckTagCellSet.h index bb98e1380..16b6819a1 100644 --- a/vtkm/cont/arg/TypeCheckTagCellSet.h +++ b/vtkm/cont/arg/TypeCheckTagCellSet.h @@ -24,9 +24,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// Check for a CellSet-like object. /// @@ -34,13 +37,11 @@ struct TypeCheckTagCellSet { }; -template +template struct TypeCheck { - static const bool value = - vtkm::cont::internal::CellSetCheck::type::value; + static const bool value = vtkm::cont::internal::CellSetCheck::type::value; }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TypeCheckTagExecObject.h b/vtkm/cont/arg/TypeCheckTagExecObject.h index 1d82e7849..a05f8145c 100644 --- a/vtkm/cont/arg/TypeCheckTagExecObject.h +++ b/vtkm/cont/arg/TypeCheckTagExecObject.h @@ -28,23 +28,26 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// The ExecObject type check passes for any object that inherits from \c /// ExecutionObjectBase. This is supposed to signify that the object can be /// used in the execution environment although there is no way to verify that. /// -struct TypeCheckTagExecObject { }; - -template -struct TypeCheck +struct TypeCheckTagExecObject { - static VTKM_CONSTEXPR bool value = - std::is_base_of::value; }; +template +struct TypeCheck +{ + static VTKM_CONSTEXPR bool value = std::is_base_of::value; +}; } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/TypeCheckTagKeys.h b/vtkm/cont/arg/TypeCheckTagKeys.h index f9c774f22..ec11fde56 100644 --- a/vtkm/cont/arg/TypeCheckTagKeys.h +++ b/vtkm/cont/arg/TypeCheckTagKeys.h @@ -22,9 +22,12 @@ #include -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ /// Check for a Keys object. /// @@ -35,12 +38,11 @@ struct TypeCheckTagKeys // A more specific specialization that actually checks for Keys types is // implemented in vtkm/worklet/Keys.h. That class is not accessible from here // due to VTK-m package dependencies. -template +template struct TypeCheck { static const bool value = false; }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/cont/arg/testing/UnitTestControlSignatureTag.cxx b/vtkm/cont/arg/testing/UnitTestControlSignatureTag.cxx index c35764aa6..32a80b4a8 100644 --- a/vtkm/cont/arg/testing/UnitTestControlSignatureTag.cxx +++ b/vtkm/cont/arg/testing/UnitTestControlSignatureTag.cxx @@ -22,37 +22,32 @@ #include -namespace { +namespace +{ void TestControlSignatures() { - VTKM_IS_CONTROL_SIGNATURE_TAG( - vtkm::worklet::WorkletMapField::FieldIn); + VTKM_IS_CONTROL_SIGNATURE_TAG(vtkm::worklet::WorkletMapField::FieldIn); + + VTKM_TEST_ASSERT(vtkm::cont::arg::internal::ControlSignatureTagCheck< + vtkm::worklet::WorkletMapField::FieldIn>::Valid, + "Bad check for FieldIn"); + + VTKM_TEST_ASSERT(vtkm::cont::arg::internal::ControlSignatureTagCheck< + vtkm::worklet::WorkletMapField::FieldOut>::Valid, + "Bad check for FieldOut"); VTKM_TEST_ASSERT( - vtkm::cont::arg::internal::ControlSignatureTagCheck< - vtkm::worklet::WorkletMapField::FieldIn >::Valid, - "Bad check for FieldIn"); + !vtkm::cont::arg::internal::ControlSignatureTagCheck::Valid, + "Bad check for WorkIndex"); - VTKM_TEST_ASSERT( - vtkm::cont::arg::internal::ControlSignatureTagCheck< - vtkm::worklet::WorkletMapField::FieldOut >::Valid, - "Bad check for FieldOut"); - - VTKM_TEST_ASSERT( - !vtkm::cont::arg::internal::ControlSignatureTagCheck< - vtkm::exec::arg::WorkIndex >::Valid, - "Bad check for WorkIndex"); - - VTKM_TEST_ASSERT( - !vtkm::cont::arg::internal::ControlSignatureTagCheck::Valid, - "Bad check for vtkm::Id"); + VTKM_TEST_ASSERT(!vtkm::cont::arg::internal::ControlSignatureTagCheck::Valid, + "Bad check for vtkm::Id"); } } // anonymous namespace -int UnitTestControlSignatureTag(int, char *[]) +int UnitTestControlSignatureTag(int, char* []) { return vtkm::cont::testing::Testing::Run(TestControlSignatures); } - diff --git a/vtkm/cont/arg/testing/UnitTestTransportArrayIn.cxx b/vtkm/cont/arg/testing/UnitTestTransportArrayIn.cxx index 6630d4731..b3ca8ec01 100644 --- a/vtkm/cont/arg/testing/UnitTestTransportArrayIn.cxx +++ b/vtkm/cont/arg/testing/UnitTestTransportArrayIn.cxx @@ -27,11 +27,12 @@ #include -namespace { +namespace +{ static const vtkm::Id ARRAY_SIZE = 10; -template +template struct TestKernel : public vtkm::exec::FunctorBase { PortalType Portal; @@ -47,10 +48,10 @@ struct TestKernel : public vtkm::exec::FunctorBase } }; -template +template struct TryArrayInType { - template + template void operator()(T) const { T array[ARRAY_SIZE]; @@ -62,12 +63,10 @@ struct TryArrayInType typedef vtkm::cont::ArrayHandle ArrayHandleType; ArrayHandleType handle = vtkm::cont::make_ArrayHandle(array, ARRAY_SIZE); - typedef typename ArrayHandleType:: - template ExecutionTypes::PortalConst PortalType; + typedef typename ArrayHandleType::template ExecutionTypes::PortalConst PortalType; - vtkm::cont::arg::Transport< - vtkm::cont::arg::TransportTagArrayIn, ArrayHandleType, Device> - transport; + vtkm::cont::arg::Transport + transport; TestKernel kernel; kernel.Portal = transport(handle, handle, ARRAY_SIZE, ARRAY_SIZE); @@ -76,7 +75,7 @@ struct TryArrayInType } }; -template +template void TryArrayInTransport(Device) { vtkm::testing::Testing::TryTypes(TryArrayInType()); @@ -90,7 +89,7 @@ void TestArrayInTransport() } // Anonymous namespace -int UnitTestTransportArrayIn(int, char *[]) +int UnitTestTransportArrayIn(int, char* []) { return vtkm::cont::testing::Testing::Run(TestArrayInTransport); } diff --git a/vtkm/cont/arg/testing/UnitTestTransportArrayInOut.cxx b/vtkm/cont/arg/testing/UnitTestTransportArrayInOut.cxx index 8d42c9c47..6283cc7f9 100644 --- a/vtkm/cont/arg/testing/UnitTestTransportArrayInOut.cxx +++ b/vtkm/cont/arg/testing/UnitTestTransportArrayInOut.cxx @@ -27,11 +27,12 @@ #include -namespace { +namespace +{ static const vtkm::Id ARRAY_SIZE = 10; -template +template struct TestKernel : public vtkm::exec::FunctorBase { PortalType Portal; @@ -45,10 +46,10 @@ struct TestKernel : public vtkm::exec::FunctorBase } }; -template +template struct TryArrayInOutType { - template + template void operator()(T) const { T array[ARRAY_SIZE]; @@ -60,20 +61,17 @@ struct TryArrayInOutType typedef vtkm::cont::ArrayHandle ArrayHandleType; ArrayHandleType handle = vtkm::cont::make_ArrayHandle(array, ARRAY_SIZE); - typedef typename ArrayHandleType:: - template ExecutionTypes::Portal PortalType; + typedef typename ArrayHandleType::template ExecutionTypes::Portal PortalType; - vtkm::cont::arg::Transport< - vtkm::cont::arg::TransportTagArrayInOut, ArrayHandleType, Device> - transport; + vtkm::cont::arg::Transport + transport; TestKernel kernel; kernel.Portal = transport(handle, handle, ARRAY_SIZE, ARRAY_SIZE); vtkm::cont::DeviceAdapterAlgorithm::Schedule(kernel, ARRAY_SIZE); - typename ArrayHandleType::PortalConstControl portal = - handle.GetPortalConstControl(); + typename ArrayHandleType::PortalConstControl portal = handle.GetPortalConstControl(); VTKM_TEST_ASSERT(portal.GetNumberOfValues() == ARRAY_SIZE, "Portal has wrong number of values."); for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) @@ -86,11 +84,10 @@ struct TryArrayInOutType } }; -template +template void TryArrayInOutTransport(Device) { - vtkm::testing::Testing::TryTypes(TryArrayInOutType(), - vtkm::TypeListTagCommon()); + vtkm::testing::Testing::TryTypes(TryArrayInOutType(), vtkm::TypeListTagCommon()); } void TestArrayInOutTransport() @@ -100,7 +97,7 @@ void TestArrayInOutTransport() } // anonymous namespace -int UnitTestTransportArrayInOut(int, char *[]) +int UnitTestTransportArrayInOut(int, char* []) { return vtkm::cont::testing::Testing::Run(TestArrayInOutTransport); } diff --git a/vtkm/cont/arg/testing/UnitTestTransportArrayOut.cxx b/vtkm/cont/arg/testing/UnitTestTransportArrayOut.cxx index d9708df96..1997c5e43 100644 --- a/vtkm/cont/arg/testing/UnitTestTransportArrayOut.cxx +++ b/vtkm/cont/arg/testing/UnitTestTransportArrayOut.cxx @@ -28,11 +28,12 @@ #include -namespace { +namespace +{ static const vtkm::Id ARRAY_SIZE = 10; -template +template struct TestKernel : public vtkm::exec::FunctorBase { PortalType Portal; @@ -45,27 +46,23 @@ struct TestKernel : public vtkm::exec::FunctorBase } }; -template +template struct TryArrayOutType { - template + template void operator()(T) const { typedef vtkm::cont::ArrayHandle ArrayHandleType; ArrayHandleType handle; - typedef typename ArrayHandleType:: - template ExecutionTypes::Portal PortalType; + typedef typename ArrayHandleType::template ExecutionTypes::Portal PortalType; - vtkm::cont::arg::Transport< - vtkm::cont::arg::TransportTagArrayOut, ArrayHandleType, Device> - transport; + vtkm::cont::arg::Transport + transport; TestKernel kernel; - kernel.Portal = transport(handle, - vtkm::cont::ArrayHandleIndex(ARRAY_SIZE), - ARRAY_SIZE, - ARRAY_SIZE); + kernel.Portal = + transport(handle, vtkm::cont::ArrayHandleIndex(ARRAY_SIZE), ARRAY_SIZE, ARRAY_SIZE); VTKM_TEST_ASSERT(handle.GetNumberOfValues() == ARRAY_SIZE, "ArrayOut transport did not allocate array correctly."); @@ -76,7 +73,7 @@ struct TryArrayOutType } }; -template +template void TryArrayOutTransport(Device) { vtkm::testing::Testing::TryTypes(TryArrayOutType()); @@ -90,7 +87,7 @@ void TestArrayOutTransport() } // Anonymous namespace -int UnitTestTransportArrayOut(int, char *[]) +int UnitTestTransportArrayOut(int, char* []) { return vtkm::cont::testing::Testing::Run(TestArrayOutTransport); } diff --git a/vtkm/cont/arg/testing/UnitTestTransportCellSetIn.cxx b/vtkm/cont/arg/testing/UnitTestTransportCellSetIn.cxx index 806e7c524..551c68d40 100644 --- a/vtkm/cont/arg/testing/UnitTestTransportCellSetIn.cxx +++ b/vtkm/cont/arg/testing/UnitTestTransportCellSetIn.cxx @@ -29,10 +29,10 @@ #include #include +namespace +{ -namespace { - -template +template struct TestKernel : public vtkm::exec::FunctorBase { CellSetInType CellSet; @@ -40,48 +40,44 @@ struct TestKernel : public vtkm::exec::FunctorBase VTKM_EXEC void operator()(vtkm::Id) const { - if (this->CellSet.GetNumberOfElements() != 2) + if (this->CellSet.GetNumberOfElements() != 2) { this->RaiseError("Got bad number of shapes in exec cellset object."); } - if (this->CellSet.GetIndices(0).GetNumberOfComponents() != 3 || - this->CellSet.GetIndices(1).GetNumberOfComponents() != 4 ) + if (this->CellSet.GetIndices(0).GetNumberOfComponents() != 3 || + this->CellSet.GetIndices(1).GetNumberOfComponents() != 4) { this->RaiseError("Got bad number of Indices in exec cellset object."); } - if (this->CellSet.GetCellShape(0).Id != 5 || - this->CellSet.GetCellShape(1).Id != 9 ) + if (this->CellSet.GetCellShape(0).Id != 5 || this->CellSet.GetCellShape(1).Id != 9) { this->RaiseError("Got bad cell shape in exec cellset object."); } } }; -template +template void TransportWholeCellSetIn(Device) { //build a fake cell set const int nVerts = 5; vtkm::cont::CellSetExplicit<> contObject("cells"); contObject.PrepareToAddCells(2, 7); - contObject.AddCell(vtkm::CELL_SHAPE_TRIANGLE, 3, vtkm::make_Vec(0,1,2)); - contObject.AddCell(vtkm::CELL_SHAPE_QUAD, 4, vtkm::make_Vec(2,1,3,4)); + contObject.AddCell(vtkm::CELL_SHAPE_TRIANGLE, 3, vtkm::make_Vec(0, 1, 2)); + contObject.AddCell(vtkm::CELL_SHAPE_QUAD, 4, vtkm::make_Vec(2, 1, 3, 4)); contObject.CompleteAddingCells(nVerts); typedef vtkm::TopologyElementTagPoint FromType; typedef vtkm::TopologyElementTagCell ToType; - typedef typename vtkm::cont::CellSetExplicit<> - ::template ExecutionTypes< Device, FromType, ToType > - ::ExecObjectType ExecObjectType; + typedef typename vtkm::cont::CellSetExplicit<>::template ExecutionTypes< + Device, FromType, ToType>::ExecObjectType ExecObjectType; - vtkm::cont::arg::Transport< - vtkm::cont::arg::TransportTagCellSetIn, - vtkm::cont::CellSetExplicit<>, - Device> - transport; + vtkm::cont::arg::Transport, + vtkm::cont::CellSetExplicit<>, Device> + transport; TestKernel kernel; kernel.CellSet = transport(contObject, nullptr, 1, 1); @@ -97,7 +93,7 @@ void UnitTestCellSetIn() } // Anonymous namespace -int UnitTestTransportCellSetIn(int, char *[]) +int UnitTestTransportCellSetIn(int, char* []) { return vtkm::cont::testing::Testing::Run(UnitTestCellSetIn); } diff --git a/vtkm/cont/arg/testing/UnitTestTransportExecObject.cxx b/vtkm/cont/arg/testing/UnitTestTransportExecObject.cxx index 2724e37bb..1e0dd33a2 100644 --- a/vtkm/cont/arg/testing/UnitTestTransportExecObject.cxx +++ b/vtkm/cont/arg/testing/UnitTestTransportExecObject.cxx @@ -29,7 +29,8 @@ #define EXPECTED_NUMBER 42 -namespace { +namespace +{ struct TestExecutionObject : public vtkm::exec::ExecutionObjectBase { @@ -50,15 +51,14 @@ struct TestKernel : public vtkm::exec::FunctorBase } }; -template +template void TryExecObjectTransport(Device) { TestExecutionObject contObject; contObject.Number = EXPECTED_NUMBER; - vtkm::cont::arg::Transport< - vtkm::cont::arg::TransportTagExecObject, TestExecutionObject, Device> - transport; + vtkm::cont::arg::Transport + transport; TestKernel kernel; kernel.Object = transport(contObject, nullptr, 1, 1); @@ -74,7 +74,7 @@ void TestExecObjectTransport() } // Anonymous namespace -int UnitTestTransportExecObject(int, char *[]) +int UnitTestTransportExecObject(int, char* []) { return vtkm::cont::testing::Testing::Run(TestExecObjectTransport); } diff --git a/vtkm/cont/arg/testing/UnitTestTransportWholeArray.cxx b/vtkm/cont/arg/testing/UnitTestTransportWholeArray.cxx index 21432564d..b0cfb77f8 100644 --- a/vtkm/cont/arg/testing/UnitTestTransportWholeArray.cxx +++ b/vtkm/cont/arg/testing/UnitTestTransportWholeArray.cxx @@ -31,13 +31,14 @@ #include -namespace { +namespace +{ static const vtkm::Id ARRAY_SIZE = 10; #define OFFSET 10 -template +template struct TestOutKernel : public vtkm::exec::FunctorBase { PortalType Portal; @@ -54,7 +55,7 @@ struct TestOutKernel : public vtkm::exec::FunctorBase } }; -template +template struct TestInKernel : public vtkm::exec::FunctorBase { PortalType Portal; @@ -74,7 +75,7 @@ struct TestInKernel : public vtkm::exec::FunctorBase } }; -template +template struct TestInOutKernel : public vtkm::exec::FunctorBase { PortalType Portal; @@ -91,12 +92,14 @@ struct TestInOutKernel : public vtkm::exec::FunctorBase } }; -template +template struct TestAtomicKernel : public vtkm::exec::FunctorBase { VTKM_CONT - TestAtomicKernel(const AtomicType &atomicArray) - : AtomicArray(atomicArray) { } + TestAtomicKernel(const AtomicType& atomicArray) + : AtomicArray(atomicArray) + { + } AtomicType AtomicArray; @@ -108,23 +111,23 @@ struct TestAtomicKernel : public vtkm::exec::FunctorBase } }; -template +template struct TryWholeArrayType { - template + template void operator()(T) const { typedef vtkm::cont::ArrayHandle ArrayHandleType; - typedef vtkm::cont::arg::Transport< - vtkm::cont::arg::TransportTagWholeArrayIn, ArrayHandleType, Device> - InTransportType; - typedef vtkm::cont::arg::Transport< - vtkm::cont::arg::TransportTagWholeArrayInOut, ArrayHandleType, Device> - InOutTransportType; - typedef vtkm::cont::arg::Transport< - vtkm::cont::arg::TransportTagWholeArrayOut, ArrayHandleType, Device> - OutTransportType; + typedef vtkm::cont::arg::Transport + InTransportType; + typedef vtkm::cont::arg::Transport + InOutTransportType; + typedef vtkm::cont::arg::Transport + OutTransportType; ArrayHandleType array; array.Allocate(ARRAY_SIZE); @@ -149,8 +152,7 @@ struct TryWholeArrayType vtkm::cont::DeviceAdapterAlgorithm::Schedule(inOutKernel, ARRAY_SIZE); - VTKM_TEST_ASSERT(array.GetNumberOfValues() == ARRAY_SIZE, - "Array size wrong?"); + VTKM_TEST_ASSERT(array.GetNumberOfValues() == ARRAY_SIZE, "Array size wrong?"); for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { T expectedValue = TestValue(index, T()) + T(OFFSET); @@ -161,40 +163,38 @@ struct TryWholeArrayType } }; -template +template struct TryAtomicArrayType { - template + template void operator()(T) const { - typedef vtkm::cont::ArrayHandle - ArrayHandleType; + typedef vtkm::cont::ArrayHandle ArrayHandleType; - typedef vtkm::cont::arg::Transport< - vtkm::cont::arg::TransportTagAtomicArray, ArrayHandleType, Device> - TransportType; + typedef vtkm::cont::arg::Transport + TransportType; ArrayHandleType array; array.Allocate(1); array.GetPortalControl().Set(0, 0); std::cout << "Check Transport AtomicArray" << std::endl; - TestAtomicKernel - kernel(TransportType()(array, nullptr, -1, -1)); + TestAtomicKernel kernel( + TransportType()(array, nullptr, -1, -1)); vtkm::cont::DeviceAdapterAlgorithm::Schedule(kernel, ARRAY_SIZE); T result = array.GetPortalConstControl().Get(0); - VTKM_TEST_ASSERT(result == ((ARRAY_SIZE-1)*ARRAY_SIZE)/2, + VTKM_TEST_ASSERT(result == ((ARRAY_SIZE - 1) * ARRAY_SIZE) / 2, "Got wrong summation in atomic array."); } }; -template +template void TryArrayOutTransport(Device) { - vtkm::testing::Testing::TryTypes(TryWholeArrayType(), - vtkm::TypeListTagCommon()); + vtkm::testing::Testing::TryTypes(TryWholeArrayType(), vtkm::TypeListTagCommon()); vtkm::testing::Testing::TryTypes(TryAtomicArrayType(), vtkm::exec::AtomicArrayTypeListTag()); } @@ -207,7 +207,7 @@ void TestWholeArrayTransport() } // Anonymous namespace -int UnitTestTransportWholeArray(int, char *[]) +int UnitTestTransportWholeArray(int, char* []) { return vtkm::cont::testing::Testing::Run(TestWholeArrayTransport); } diff --git a/vtkm/cont/arg/testing/UnitTestTypeCheckArray.cxx b/vtkm/cont/arg/testing/UnitTestTypeCheckArray.cxx index 7b40ebad8..daddcbe22 100644 --- a/vtkm/cont/arg/testing/UnitTestTypeCheckArray.cxx +++ b/vtkm/cont/arg/testing/UnitTestTypeCheckArray.cxx @@ -27,38 +27,37 @@ #include -namespace { +namespace +{ struct TryArraysOfType { - template + template void operator()(T) const { using vtkm::cont::arg::TypeCheck; - typedef vtkm::cont::arg::TypeCheckTagArray - TypeCheckTagArray; + typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTagArray; typedef vtkm::cont::ArrayHandle StandardArray; - VTKM_TEST_ASSERT((TypeCheck::value), + VTKM_TEST_ASSERT((TypeCheck::value), "Standard array type check failed."); typedef vtkm::cont::ArrayHandleCounting CountingArray; - VTKM_TEST_ASSERT((TypeCheck::value), + VTKM_TEST_ASSERT((TypeCheck::value), "Counting array type check failed."); - typedef typename vtkm::cont::ArrayHandleCompositeVectorType< - StandardArray,CountingArray>::type CompositeArray; - VTKM_TEST_ASSERT((TypeCheck::value), + typedef typename vtkm::cont::ArrayHandleCompositeVectorType::type + CompositeArray; + VTKM_TEST_ASSERT((TypeCheck::value), "Composite array type check failed."); // Just some type that is not a valid array. typedef typename StandardArray::PortalControl NotAnArray; - VTKM_TEST_ASSERT(!(TypeCheck::value), + VTKM_TEST_ASSERT(!(TypeCheck::value), "Not an array type check failed."); // Another type that is not a valid array. - VTKM_TEST_ASSERT(!(TypeCheck::value), - "Not an array type check failed."); + VTKM_TEST_ASSERT(!(TypeCheck::value), "Not an array type check failed."); } }; @@ -77,57 +76,49 @@ void TestCheckAtomicArray() "Check for 32-bit int failed."); VTKM_TEST_ASSERT((TypeCheck::value), "Check for 64-bit int failed."); - VTKM_TEST_ASSERT(!(TypeCheck::value), - "Check for float failed."); + VTKM_TEST_ASSERT(!(TypeCheck::value), "Check for float failed."); typedef TypeCheckTagAtomicArray ExpandedTypeCheck; VTKM_TEST_ASSERT((TypeCheck::value), "Check for 32-bit int failed."); VTKM_TEST_ASSERT((TypeCheck::value), "Check for 64-bit int failed."); - VTKM_TEST_ASSERT(!(TypeCheck::value), - "Check for float failed."); + VTKM_TEST_ASSERT(!(TypeCheck::value), "Check for float failed."); - typedef TypeCheckTagAtomicArray > RestrictedTypeCheck; + typedef TypeCheckTagAtomicArray> RestrictedTypeCheck; VTKM_TEST_ASSERT((TypeCheck::value), "Check for 32-bit int failed."); VTKM_TEST_ASSERT(!(TypeCheck::value), "Check for 64-bit int failed."); - VTKM_TEST_ASSERT(!(TypeCheck::value), - "Check for float failed."); + VTKM_TEST_ASSERT(!(TypeCheck::value), "Check for float failed."); } void TestCheckArray() { vtkm::testing::Testing::TryTypes(TryArraysOfType()); - std::cout << "Trying some arrays with types that do not match the list." - << std::endl; + std::cout << "Trying some arrays with types that do not match the list." << std::endl; using vtkm::cont::arg::TypeCheck; using vtkm::cont::arg::TypeCheckTagArray; typedef vtkm::cont::ArrayHandle ScalarArray; - VTKM_TEST_ASSERT( - (TypeCheck,ScalarArray>::value), - "Scalar for scalar check failed."); - VTKM_TEST_ASSERT( - !(TypeCheck,ScalarArray>::value), - "Scalar for vector check failed."); + VTKM_TEST_ASSERT((TypeCheck, ScalarArray>::value), + "Scalar for scalar check failed."); + VTKM_TEST_ASSERT(!(TypeCheck, ScalarArray>::value), + "Scalar for vector check failed."); - typedef vtkm::cont::ArrayHandle > VecArray; - VTKM_TEST_ASSERT( - (TypeCheck,VecArray>::value), - "Vector for vector check failed."); - VTKM_TEST_ASSERT( - !(TypeCheck,VecArray>::value), - "Vector for scalar check failed."); + typedef vtkm::cont::ArrayHandle> VecArray; + VTKM_TEST_ASSERT((TypeCheck, VecArray>::value), + "Vector for vector check failed."); + VTKM_TEST_ASSERT(!(TypeCheck, VecArray>::value), + "Vector for scalar check failed."); TestCheckAtomicArray(); } } // anonymous namespace -int UnitTestTypeCheckArray(int, char *[]) +int UnitTestTypeCheckArray(int, char* []) { return vtkm::cont::testing::Testing::Run(TestCheckArray); } diff --git a/vtkm/cont/arg/testing/UnitTestTypeCheckCellSet.cxx b/vtkm/cont/arg/testing/UnitTestTypeCheckCellSet.cxx index d42637275..0971344aa 100644 --- a/vtkm/cont/arg/testing/UnitTestTypeCheckCellSet.cxx +++ b/vtkm/cont/arg/testing/UnitTestTypeCheckCellSet.cxx @@ -26,9 +26,12 @@ #include -namespace { +namespace +{ -struct TestNotCellSet { }; +struct TestNotCellSet +{ +}; void TestCheckCellSet() { @@ -37,34 +40,26 @@ void TestCheckCellSet() using vtkm::cont::arg::TypeCheck; using vtkm::cont::arg::TypeCheckTagCellSet; - VTKM_TEST_ASSERT( - (TypeCheck >::value), - "Type check failed."); + VTKM_TEST_ASSERT((TypeCheck>::value), + "Type check failed."); - VTKM_TEST_ASSERT( - (TypeCheck >::value), - "Type check failed."); + VTKM_TEST_ASSERT((TypeCheck>::value), + "Type check failed."); - VTKM_TEST_ASSERT( - (TypeCheck >::value), - "Type check failed."); + VTKM_TEST_ASSERT((TypeCheck>::value), + "Type check failed."); - VTKM_TEST_ASSERT( - !(TypeCheck::value), - "Type check failed."); + VTKM_TEST_ASSERT(!(TypeCheck::value), "Type check failed."); - VTKM_TEST_ASSERT( - !(TypeCheck::value), - "Type check failed."); + VTKM_TEST_ASSERT(!(TypeCheck::value), "Type check failed."); - VTKM_TEST_ASSERT( - !(TypeCheck >::value), - "Type check failed."); + VTKM_TEST_ASSERT(!(TypeCheck>::value), + "Type check failed."); } } // anonymous namespace -int UnitTestTypeCheckCellSet(int, char *[]) +int UnitTestTypeCheckCellSet(int, char* []) { return vtkm::cont::testing::Testing::Run(TestCheckCellSet); } diff --git a/vtkm/cont/arg/testing/UnitTestTypeCheckExecObject.cxx b/vtkm/cont/arg/testing/UnitTestTypeCheckExecObject.cxx index 44737fa5a..05a2a042f 100644 --- a/vtkm/cont/arg/testing/UnitTestTypeCheckExecObject.cxx +++ b/vtkm/cont/arg/testing/UnitTestTypeCheckExecObject.cxx @@ -24,10 +24,15 @@ #include -namespace { +namespace +{ -struct TestExecutionObject : vtkm::exec::ExecutionObjectBase { }; -struct TestNotExecutionObject { }; +struct TestExecutionObject : vtkm::exec::ExecutionObjectBase +{ +}; +struct TestNotExecutionObject +{ +}; void TestCheckExecObject() { @@ -36,26 +41,21 @@ void TestCheckExecObject() using vtkm::cont::arg::TypeCheck; using vtkm::cont::arg::TypeCheckTagExecObject; - VTKM_TEST_ASSERT( - (TypeCheck::value), - "Type check failed."); + VTKM_TEST_ASSERT((TypeCheck::value), + "Type check failed."); - VTKM_TEST_ASSERT( - !(TypeCheck::value), - "Type check failed."); + VTKM_TEST_ASSERT(!(TypeCheck::value), + "Type check failed."); - VTKM_TEST_ASSERT( - !(TypeCheck::value), - "Type check failed."); + VTKM_TEST_ASSERT(!(TypeCheck::value), "Type check failed."); - VTKM_TEST_ASSERT( - !(TypeCheck >::value), - "Type check failed."); + VTKM_TEST_ASSERT(!(TypeCheck>::value), + "Type check failed."); } } // anonymous namespace -int UnitTestTypeCheckExecObject(int, char *[]) +int UnitTestTypeCheckExecObject(int, char* []) { return vtkm::cont::testing::Testing::Run(TestCheckExecObject); } diff --git a/vtkm/cont/arg/testing/UnitTestTypeCheckKeys.cxx b/vtkm/cont/arg/testing/UnitTestTypeCheckKeys.cxx index 16373b472..a20d35717 100644 --- a/vtkm/cont/arg/testing/UnitTestTypeCheckKeys.cxx +++ b/vtkm/cont/arg/testing/UnitTestTypeCheckKeys.cxx @@ -26,9 +26,12 @@ #include -namespace { +namespace +{ -struct TestNotKeys { }; +struct TestNotKeys +{ +}; void TestCheckKeys() { @@ -37,30 +40,22 @@ void TestCheckKeys() using vtkm::cont::arg::TypeCheck; using vtkm::cont::arg::TypeCheckTagKeys; - VTKM_TEST_ASSERT( - (TypeCheck >::value), - "Type check failed."); - VTKM_TEST_ASSERT( - (TypeCheck >::value), - "Type check failed."); - VTKM_TEST_ASSERT( - (TypeCheck >::value), - "Type check failed."); + VTKM_TEST_ASSERT((TypeCheck>::value), + "Type check failed."); + VTKM_TEST_ASSERT((TypeCheck>::value), + "Type check failed."); + VTKM_TEST_ASSERT((TypeCheck>::value), + "Type check failed."); - VTKM_TEST_ASSERT( - !(TypeCheck::value), - "Type check failed."); - VTKM_TEST_ASSERT( - !(TypeCheck::value), - "Type check failed."); - VTKM_TEST_ASSERT( - !(TypeCheck >::value), - "Type check failed."); + VTKM_TEST_ASSERT(!(TypeCheck::value), "Type check failed."); + VTKM_TEST_ASSERT(!(TypeCheck::value), "Type check failed."); + VTKM_TEST_ASSERT(!(TypeCheck>::value), + "Type check failed."); } } // anonymous namespace -int UnitTestTypeCheckKeys(int, char*[]) +int UnitTestTypeCheckKeys(int, char* []) { return vtkm::cont::testing::Testing::Run(TestCheckKeys); } diff --git a/vtkm/cont/cuda/ArrayHandleCuda.h b/vtkm/cont/cuda/ArrayHandleCuda.h index 35d8f7fe4..48269e411 100644 --- a/vtkm/cont/cuda/ArrayHandleCuda.h +++ b/vtkm/cont/cuda/ArrayHandleCuda.h @@ -35,24 +35,33 @@ VTKM_THIRDPARTY_PRE_INCLUDE #include VTKM_THIRDPARTY_POST_INCLUDE -namespace vtkm { -namespace cont { -namespace cuda { +namespace vtkm +{ +namespace cont +{ +namespace cuda +{ -struct VTKM_ALWAYS_EXPORT StorageTagCuda { }; +struct VTKM_ALWAYS_EXPORT StorageTagCuda +{ +}; } // namespace cuda } // namespace cont } // namespace vtkm -namespace vtkm { -namespace cont { -namespace cuda { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace cuda +{ +namespace internal +{ /// \brief An array portal for cuda arrays. /// -template +template class ArrayPortalCuda { public: @@ -61,44 +70,42 @@ public: VTKM_CONT ArrayPortalCuda() - : Data(), NumberOfValues(0) - { } + : Data() + , NumberOfValues(0) + { + } VTKM_CONT ArrayPortalCuda(ValueType* d, vtkm::Id numberOfValues) - : Data(d), NumberOfValues(numberOfValues) - { } + : Data(d) + , NumberOfValues(numberOfValues) + { + } VTKM_CONT ArrayPortalCuda(const DevicePointer& ptr, vtkm::Id numberOfValues) - : Data(ptr), NumberOfValues(numberOfValues) - { } + : Data(ptr) + , NumberOfValues(numberOfValues) + { + } VTKM_CONT - vtkm::Id GetNumberOfValues() const - { - return NumberOfValues; - } + vtkm::Id GetNumberOfValues() const { return NumberOfValues; } VTKM_CONT ValueType Get(vtkm::Id index) const { - throw vtkm::cont::ErrorBadType( - "ArrayHandleCuda only provides access to the device pointer."); + throw vtkm::cont::ErrorBadType("ArrayHandleCuda only provides access to the device pointer."); } VTKM_CONT void Set(vtkm::Id vtkmNotUsed(index), T vtkmNotUsed(value)) const { - throw vtkm::cont::ErrorBadType( - "ArrayHandleCuda only provides access to the device pointer."); + throw vtkm::cont::ErrorBadType("ArrayHandleCuda only provides access to the device pointer."); } VTKM_CONT - DevicePointer GetDevicePointer() const - { - return Data; - } + DevicePointer GetDevicePointer() const { return Data; } private: DevicePointer Data; vtkm::Id NumberOfValues; @@ -109,12 +116,15 @@ private: } // namespace cont } // namespace vtkm -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ -template -class Storage< T, vtkm::cont::cuda::StorageTagCuda > +template +class Storage { public: typedef T ValueType; @@ -123,33 +133,31 @@ public: typedef vtkm::cont::cuda::internal::ArrayPortalCuda PortalConstType; VTKM_CONT - Storage(): - Data(), NumberOfValues(0), IsOwner(true) + Storage() + : Data() + , NumberOfValues(0) + , IsOwner(true) { } VTKM_CONT - Storage(ValueType* d, vtkm::Id numberOfValues): - Data(d), NumberOfValues(numberOfValues), IsOwner(false) + Storage(ValueType* d, vtkm::Id numberOfValues) + : Data(d) + , NumberOfValues(numberOfValues) + , IsOwner(false) { } VTKM_CONT - PortalType GetPortal() - { - return PortalType(this->Data,this->NumberOfValues); - } + PortalType GetPortal() { return PortalType(this->Data, this->NumberOfValues); } VTKM_CONT PortalConstType GetPortalConst() const { - return PortalConstType(this->Data,this->NumberOfValues); + return PortalConstType(this->Data, this->NumberOfValues); } VTKM_CONT - vtkm::Id GetNumberOfValues() const - { - return this->NumberOfValues; - } + vtkm::Id GetNumberOfValues() const { return this->NumberOfValues; } VTKM_CONT void Allocate(vtkm::Id size) @@ -182,26 +190,19 @@ public: "ArrayHandleCuda does not own its internal device memory."); if (this->NumberOfValues) - { + { thrust::system::cuda::free(this->Data); this->NumberOfValues = 0; - } + } } VTKM_CONT - DevicePointer GetDevicePointer() const - { - return this->Data; - } + DevicePointer GetDevicePointer() const { return this->Data; } VTKM_CONT - bool OwnsResources() const - { - return this->IsOwner; - } + bool OwnsResources() const { return this->IsOwner; } private: - DevicePointer Data; vtkm::Id NumberOfValues; bool IsOwner; @@ -212,16 +213,20 @@ private: } // namespace vtkm #ifdef VTKM_CUDA -namespace vtkm { -namespace cont { -namespace cuda { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace cuda +{ +namespace internal +{ -template +template class ArrayManagerExecutionThrustDevice; -template -class ArrayManagerExecutionThrustDevice +template +class ArrayManagerExecutionThrustDevice { public: typedef T ValueType; @@ -230,34 +235,30 @@ public: typedef vtkm::cont::internal::Storage StorageType; - typedef vtkm::exec::cuda::internal::ArrayPortalFromThrust< T > PortalType; - typedef vtkm::exec::cuda::internal::ConstArrayPortalFromThrust< const T > PortalConstType; + typedef vtkm::exec::cuda::internal::ArrayPortalFromThrust PortalType; + typedef vtkm::exec::cuda::internal::ConstArrayPortalFromThrust PortalConstType; VTKM_CONT - ArrayManagerExecutionThrustDevice(StorageType *storage) + ArrayManagerExecutionThrustDevice(StorageType* storage) : Storage(storage) - { } + { + } VTKM_CONT - ~ArrayManagerExecutionThrustDevice() - { } + ~ArrayManagerExecutionThrustDevice() {} /// Returns the size of the array. /// VTKM_CONT - vtkm::Id GetNumberOfValues() const - { - return this->Storage->GetNumberOfValues(); - } + vtkm::Id GetNumberOfValues() const { return this->Storage->GetNumberOfValues(); } /// Since memory is already on the device, there is nothing to prepare /// VTKM_CONT PortalConstType PrepareForInput(bool) { - return PortalConstType(this->Storage->GetDevicePointer(), - this->Storage->GetDevicePointer() + - static_cast(Storage->GetNumberOfValues())); + return PortalConstType(this->Storage->GetDevicePointer(), this->Storage->GetDevicePointer() + + static_cast(Storage->GetNumberOfValues())); } /// Since memory is already on the device, there is nothing to prepare @@ -265,9 +266,8 @@ public: VTKM_CONT PortalType PrepareForInPlace(bool) { - return PortalType(this->Storage->GetDevicePointer(), - this->Storage->GetDevicePointer() + - static_cast(Storage->GetNumberOfValues())); + return PortalType(this->Storage->GetDevicePointer(), this->Storage->GetDevicePointer() + + static_cast(Storage->GetNumberOfValues())); } /// Allocates the array to the given size. @@ -279,16 +279,14 @@ public: this->Storage->ReleaseResources(); this->Storage->Allocate(numberOfValues); - return PortalType(this->Storage->GetDevicePointer(), - this->Storage->GetDevicePointer() + - static_cast(Storage->GetNumberOfValues())); + return PortalType(this->Storage->GetDevicePointer(), this->Storage->GetDevicePointer() + + static_cast(Storage->GetNumberOfValues())); } /// Since output data stays on the device, there is nothing to retrieve /// VTKM_CONT - void RetrieveOutputData(StorageType*) const - { } + void RetrieveOutputData(StorageType*) const {} /// Resizes the device vector. /// @@ -305,12 +303,10 @@ public: } private: - ArrayManagerExecutionThrustDevice( - ArrayManagerExecutionThrustDevice &) = delete; - void operator=( - ArrayManagerExecutionThrustDevice &) = delete; + ArrayManagerExecutionThrustDevice(ArrayManagerExecutionThrustDevice&) = delete; + void operator=(ArrayManagerExecutionThrustDevice&) = delete; - StorageType *Storage; + StorageType* Storage; }; } //namespace internal @@ -319,71 +315,62 @@ private: } //namespace vtkm #endif -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// ArrayHandleCuda is a specialization of ArrayHandle, which stores an /// Array that has already been allocated inside CUDA template -class ArrayHandleCuda - : public vtkm::cont::ArrayHandle < - T, - vtkm::cont::cuda::StorageTagCuda - > +class ArrayHandleCuda : public vtkm::cont::ArrayHandle { public: - VTKM_ARRAY_HANDLE_SUBCLASS( - ArrayHandleCuda, - (ArrayHandleCuda), - (vtkm::cont::ArrayHandle< - T, - vtkm::cont::cuda::StorageTagCuda - >)); + VTKM_ARRAY_HANDLE_SUBCLASS(ArrayHandleCuda, (ArrayHandleCuda), + (vtkm::cont::ArrayHandle)); VTKM_CONT - ArrayHandleCuda(T *start,vtkm::Id length) - :Superclass( vtkm::cont::internal::Storage(start, length)) + ArrayHandleCuda(T* start, vtkm::Id length) + : Superclass(vtkm::cont::internal::Storage(start, length)) { } - }; /// A convenience function for creating an ArrayHandle from a Cuda pointer. /// -template -VTKM_CONT vtkm::cont::ArrayHandle -make_ArrayHandleCuda(T *array,vtkm::Id length) +template +VTKM_CONT vtkm::cont::ArrayHandle make_ArrayHandleCuda( + T* array, vtkm::Id length) { typedef vtkm::cont::cuda::StorageTagCuda StorageTag; - typedef vtkm::cont::ArrayHandle ArrayHandleType; + typedef vtkm::cont::ArrayHandle ArrayHandleType; return ArrayHandleType(array, length); } -template -VTKM_CONT -void -printSummary_ArrayHandle(const vtkm::cont::ArrayHandle &array, - std::ostream &out) +template +VTKM_CONT void printSummary_ArrayHandle( + const vtkm::cont::ArrayHandle& array, std::ostream& out) { - vtkm::Id sz = array.GetNumberOfValues(); - out<<"sz= "< class ArrayHandle : public vtkm::cont::ArrayHandleCuda { public: VTKM_CONT - ArrayHandle(T *start,vtkm::Id length) + ArrayHandle(T* start, vtkm::Id length) : vtkm::cont::ArrayHandleCuda(start, length) { } diff --git a/vtkm/cont/cuda/ChooseCudaDevice.h b/vtkm/cont/cuda/ChooseCudaDevice.h index ef49e0441..086a61c68 100644 --- a/vtkm/cont/cuda/ChooseCudaDevice.h +++ b/vtkm/cont/cuda/ChooseCudaDevice.h @@ -28,11 +28,15 @@ #include #include -namespace vtkm{ -namespace cont { -namespace cuda{ +namespace vtkm +{ +namespace cont +{ +namespace cuda +{ -namespace { +namespace +{ struct compute_info { compute_info(cudaDeviceProp prop, int index) @@ -41,12 +45,11 @@ struct compute_info this->Major = prop.major; this->MemorySize = prop.totalGlobalMem; - this->Performance = prop.multiProcessorCount * - prop.maxThreadsPerMultiProcessor * - (prop.clockRate / 100000.0); + this->Performance = + prop.multiProcessorCount * prop.maxThreadsPerMultiProcessor * (prop.clockRate / 100000.0); //9999 is equal to emulation make sure it is a super bad device - if(this->Major >= 9999) + if (this->Major >= 9999) { this->Major = -1; this->Performance = -1; @@ -58,8 +61,7 @@ struct compute_info { //if we are both SM3 or greater check performance //if we both the same SM level check performance - if( (this->Major >= 3 && other.Major >= 3) || - (this->Major == other.Major) ) + if ((this->Major >= 3 && other.Major >= 3) || (this->Major == other.Major)) { return betterPerfomance(other); } @@ -69,9 +71,9 @@ struct compute_info bool betterPerfomance(const compute_info other) const { - if ( this->Performance == other.Performance) + if (this->Performance == other.Performance) { - if( this->MemorySize == other.MemorySize ) + if (this->MemorySize == other.MemorySize) { //prefer first device over second device //this will be subjective I bet @@ -90,7 +92,6 @@ private: size_t MemorySize; double Performance; }; - } ///Returns the fastest cuda device id that the current system has @@ -98,48 +99,44 @@ private: static int FindFastestDeviceId() { //get the number of devices and store information - int numberOfDevices=0; + int numberOfDevices = 0; VTKM_CUDA_CALL(cudaGetDeviceCount(&numberOfDevices)); std::vector devices; - for(int i=0; i < numberOfDevices; ++i) + for (int i = 0; i < numberOfDevices; ++i) { cudaDeviceProp properties; VTKM_CUDA_CALL(cudaGetDeviceProperties(&properties, i)); - if(properties.computeMode != cudaComputeModeProhibited) + if (properties.computeMode != cudaComputeModeProhibited) { //only add devices that have compute mode allowed - devices.push_back( compute_info(properties,i) ); + devices.push_back(compute_info(properties, i)); } } //sort from fastest to slowest - std::sort(devices.begin(),devices.end()); + std::sort(devices.begin(), devices.end()); - int device=0; - if(devices.size()> 0) - { + int device = 0; + if (devices.size() > 0) + { device = devices.front().GetIndex(); - } + } return device; } - //choose a cuda compute device. This can't be used if you are setting //up open gl interop static void SetCudaDevice(int id) { cudaError_t cError = cudaSetDevice(id); - if(cError != cudaSuccess) - { - std::string cuda_error_msg( - "Unable to bind to the given cuda device. Error: "); + if (cError != cudaSuccess) + { + std::string cuda_error_msg("Unable to bind to the given cuda device. Error: "); cuda_error_msg.append(cudaGetErrorString(cError)); throw vtkm::cont::ErrorExecution(cuda_error_msg); - } + } } - - } } } //namespace diff --git a/vtkm/cont/cuda/ErrorCuda.h b/vtkm/cont/cuda/ErrorCuda.h index 92d186055..14df4e348 100644 --- a/vtkm/cont/cuda/ErrorCuda.h +++ b/vtkm/cont/cuda/ErrorCuda.h @@ -30,42 +30,39 @@ /// A macro that can be used to check to see if there are any unchecked /// CUDA errors. Will throw an ErrorCuda if there are. /// -#define VTKM_CUDA_CHECK_ASYNCHRONOUS_ERROR() \ - VTKM_SWALLOW_SEMICOLON_PRE_BLOCK \ - { \ - const cudaError_t vtkm_cuda_check_async_error = cudaGetLastError(); \ - if (vtkm_cuda_check_async_error != cudaSuccess) \ - { \ - throw ::vtkm::cont::cuda::ErrorCuda( \ - vtkm_cuda_check_async_error, \ - __FILE__, \ - __LINE__, \ - "Unchecked asynchronous error"); \ - } \ - } \ +#define VTKM_CUDA_CHECK_ASYNCHRONOUS_ERROR() \ + VTKM_SWALLOW_SEMICOLON_PRE_BLOCK \ + { \ + const cudaError_t vtkm_cuda_check_async_error = cudaGetLastError(); \ + if (vtkm_cuda_check_async_error != cudaSuccess) \ + { \ + throw ::vtkm::cont::cuda::ErrorCuda(vtkm_cuda_check_async_error, __FILE__, __LINE__, \ + "Unchecked asynchronous error"); \ + } \ + } \ VTKM_SWALLOW_SEMICOLON_POST_BLOCK /// A macro that can be wrapped around a CUDA command and will throw an /// ErrorCuda exception if the CUDA command fails. /// -#define VTKM_CUDA_CALL(command) \ - VTKM_CUDA_CHECK_ASYNCHRONOUS_ERROR(); \ - VTKM_SWALLOW_SEMICOLON_PRE_BLOCK \ - { \ - const cudaError_t vtkm_cuda_call_error = command; \ - if (vtkm_cuda_call_error != cudaSuccess) \ - { \ - throw ::vtkm::cont::cuda::ErrorCuda(vtkm_cuda_call_error, \ - __FILE__, \ - __LINE__, \ - #command); \ - } \ - } \ +#define VTKM_CUDA_CALL(command) \ + VTKM_CUDA_CHECK_ASYNCHRONOUS_ERROR(); \ + VTKM_SWALLOW_SEMICOLON_PRE_BLOCK \ + { \ + const cudaError_t vtkm_cuda_call_error = command; \ + if (vtkm_cuda_call_error != cudaSuccess) \ + { \ + throw ::vtkm::cont::cuda::ErrorCuda(vtkm_cuda_call_error, __FILE__, __LINE__, #command); \ + } \ + } \ VTKM_SWALLOW_SEMICOLON_POST_BLOCK -namespace vtkm { -namespace cont { -namespace cuda { +namespace vtkm +{ +namespace cont +{ +namespace cuda +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START @@ -82,10 +79,8 @@ public: this->SetMessage(message.str()); } - ErrorCuda(cudaError_t error, - const std::string &file, - vtkm::Id line, - const std::string &description) + ErrorCuda(cudaError_t error, const std::string& file, vtkm::Id line, + const std::string& description) { std::stringstream message; message << "CUDA Error: " << cudaGetErrorString(error) << std::endl @@ -95,7 +90,6 @@ public: }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } } // namespace vtkm::cont:cuda diff --git a/vtkm/cont/cuda/internal/ArrayManagerExecutionCuda.cu b/vtkm/cont/cuda/internal/ArrayManagerExecutionCuda.cu index 367e52d90..0103daa1f 100644 --- a/vtkm/cont/cuda/internal/ArrayManagerExecutionCuda.cu +++ b/vtkm/cont/cuda/internal/ArrayManagerExecutionCuda.cu @@ -22,10 +22,11 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ VTKM_INSTANTIATE_ARRAYHANDLES_FOR_DEVICE_ADAPTER(DeviceAdapterTagCuda) - } } // end vtkm::cont diff --git a/vtkm/cont/cuda/internal/ArrayManagerExecutionCuda.h b/vtkm/cont/cuda/internal/ArrayManagerExecutionCuda.h index 6cfd58c7e..3ffcc5727 100644 --- a/vtkm/cont/cuda/internal/ArrayManagerExecutionCuda.h +++ b/vtkm/cont/cuda/internal/ArrayManagerExecutionCuda.h @@ -29,27 +29,29 @@ // These must be placed in the vtkm::cont::internal namespace so that // the template can be found. -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ template -class ArrayManagerExecution - - : public vtkm::cont::cuda::internal::ArrayManagerExecutionThrustDevice - +class ArrayManagerExecution + : public vtkm::cont::cuda::internal::ArrayManagerExecutionThrustDevice { public: - typedef vtkm::cont::cuda::internal::ArrayManagerExecutionThrustDevice - Superclass; + typedef vtkm::cont::cuda::internal::ArrayManagerExecutionThrustDevice Superclass; typedef typename Superclass::ValueType ValueType; typedef typename Superclass::PortalType PortalType; typedef typename Superclass::PortalConstType PortalConstType; typedef typename Superclass::StorageType StorageType; VTKM_CONT - ArrayManagerExecution(StorageType *storage) - : Superclass(storage) { } + ArrayManagerExecution(StorageType* storage) + : Superclass(storage) + { + } VTKM_CONT PortalConstType PrepareForInput(bool updateData) @@ -60,7 +62,7 @@ public: // with nvcc 7.5. return this->Superclass::template _PrepareForInput(updateData); } - catch (vtkm::cont::ErrorBadAllocation &error) + catch (vtkm::cont::ErrorBadAllocation& error) { // Thrust does not seem to be clearing the CUDA error, so do it here. cudaError_t cudaError = cudaPeekAtLastError(); @@ -81,7 +83,7 @@ public: // with nvcc 7.5. return this->Superclass::template _PrepareForInPlace(updateData); } - catch (vtkm::cont::ErrorBadAllocation &error) + catch (vtkm::cont::ErrorBadAllocation& error) { // Thrust does not seem to be clearing the CUDA error, so do it here. cudaError_t cudaError = cudaPeekAtLastError(); @@ -102,7 +104,7 @@ public: // with nvcc 7.5. return this->Superclass::template _PrepareForOutput(numberOfValues); } - catch (vtkm::cont::ErrorBadAllocation &error) + catch (vtkm::cont::ErrorBadAllocation& error) { // Thrust does not seem to be clearing the CUDA error, so do it here. cudaError_t cudaError = cudaPeekAtLastError(); @@ -120,7 +122,6 @@ public: #ifndef vtk_m_cont_cuda_internal_ArrayManagerExecutionCuda_cu VTKM_EXPORT_ARRAYHANDLES_FOR_DEVICE_ADAPTER(DeviceAdapterTagCuda) #endif // !vtk_m_cont_cuda_internal_ArrayManagerExecutionCuda_cu - } } // namespace vtkm::cont diff --git a/vtkm/cont/cuda/internal/ArrayManagerExecutionThrustDevice.h b/vtkm/cont/cuda/internal/ArrayManagerExecutionThrustDevice.h index 34985d32e..08bca0059 100644 --- a/vtkm/cont/cuda/internal/ArrayManagerExecutionThrustDevice.h +++ b/vtkm/cont/cuda/internal/ArrayManagerExecutionThrustDevice.h @@ -40,17 +40,21 @@ VTKM_THIRDPARTY_POST_INCLUDE #include -namespace vtkm { -namespace cont { -namespace cuda { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace cuda +{ +namespace internal +{ /// \c ArrayManagerExecutionThrustDevice provides an implementation for a \c /// ArrayManagerExecution class for a thrust device adapter that is designed /// for the cuda backend which has separate memory spaces for host and device. /// This implementation contains a thrust::system::cuda::pointer to contain the /// data. -template +template class ArrayManagerExecutionThrustDevice { public: @@ -60,28 +64,26 @@ public: typedef vtkm::cont::internal::Storage StorageType; - typedef vtkm::exec::cuda::internal::ArrayPortalFromThrust< T > PortalType; - typedef vtkm::exec::cuda::internal::ConstArrayPortalFromThrust< T > PortalConstType; + typedef vtkm::exec::cuda::internal::ArrayPortalFromThrust PortalType; + typedef vtkm::exec::cuda::internal::ConstArrayPortalFromThrust PortalConstType; VTKM_CONT - ArrayManagerExecutionThrustDevice(StorageType *storage) - : Storage(storage), - Begin(static_cast(nullptr)), - End(static_cast(nullptr)), - Capacity(static_cast(nullptr)) + ArrayManagerExecutionThrustDevice(StorageType* storage) + : Storage(storage) + , Begin(static_cast(nullptr)) + , End(static_cast(nullptr)) + , Capacity(static_cast(nullptr)) { } VTKM_CONT - ~ArrayManagerExecutionThrustDevice() - { - this->ReleaseResources(); - } + ~ArrayManagerExecutionThrustDevice() { this->ReleaseResources(); } /// Returns the size of the array. /// VTKM_CONT - vtkm::Id GetNumberOfValues() const { + vtkm::Id GetNumberOfValues() const + { return static_cast(this->End.get() - this->Begin.get()); } @@ -104,11 +106,10 @@ public: } /// Workaround for nvcc 7.5 compiler warning bug. - template - VTKM_CONT - PortalConstType _PrepareForInput(bool updateData) + template + VTKM_CONT PortalConstType _PrepareForInput(bool updateData) { - return this->PrepareForInput(updateData); + return this->PrepareForInput(updateData); } /// Allocates the appropriate size of the array and copies the given data @@ -130,9 +131,8 @@ public: } /// Workaround for nvcc 7.5 compiler warning bug. - template - VTKM_CONT - PortalType _PrepareForInPlace(bool updateData) + template + VTKM_CONT PortalType _PrepareForInPlace(bool updateData) { return this->PrepareForInPlace(updateData); } @@ -144,20 +144,18 @@ public: { // Can we reuse the existing buffer? vtkm::Id curCapacity = this->Begin.get() != nullptr - ? static_cast(this->Capacity.get() - this->Begin.get()) - : 0; + ? static_cast(this->Capacity.get() - this->Begin.get()) + : 0; // Just mark a new end if we don't need to increase the allocation: if (curCapacity >= numberOfValues) { - this->End = PointerType(this->Begin.get() + - static_cast(numberOfValues)); + this->End = PointerType(this->Begin.get() + static_cast(numberOfValues)); return PortalType(this->Begin, this->End); } - const std::size_t maxNumVals = (std::numeric_limits::max() / - sizeof(ValueType)); + const std::size_t maxNumVals = (std::numeric_limits::max() / sizeof(ValueType)); if (static_cast(numberOfValues) > maxNumVals) { @@ -173,38 +171,34 @@ public: // Attempt to allocate: try - { - ValueType *tmp; + { + ValueType* tmp; #ifdef VTKM_USE_UNIFIED_MEMORY VTKM_CUDA_CALL(cudaMallocManaged(&tmp, bufferSize)); - VTKM_CUDA_CALL(cudaMemAdvise(tmp, bufferSize, - cudaMemAdviseSetPreferredLocation, 0)); + VTKM_CUDA_CALL(cudaMemAdvise(tmp, bufferSize, cudaMemAdviseSetPreferredLocation, 0)); VTKM_CUDA_CALL(cudaMemPrefetchAsync(tmp, bufferSize, 0, 0)); VTKM_CUDA_CALL(cudaStreamSynchronize(0)); #else VTKM_CUDA_CALL(cudaMalloc(&tmp, bufferSize)); #endif this->Begin = PointerType(tmp); - } - catch (const std::exception &error) - { + } + catch (const std::exception& error) + { std::ostringstream err; - err << "Failed to allocate " << bufferSize << " bytes on device: " - << error.what(); + err << "Failed to allocate " << bufferSize << " bytes on device: " << error.what(); throw vtkm::cont::ErrorBadAllocation(err.str()); - } + } - this->Capacity = PointerType(this->Begin.get() + - static_cast(numberOfValues)); + this->Capacity = PointerType(this->Begin.get() + static_cast(numberOfValues)); this->End = this->Capacity; return PortalType(this->Begin, this->End); } /// Workaround for nvcc 7.5 compiler warning bug. - template - VTKM_CONT - PortalType _PrepareForOutput(vtkm::Id numberOfValues) + template + VTKM_CONT PortalType _PrepareForOutput(vtkm::Id numberOfValues) { return this->PrepareForOutput(numberOfValues); } @@ -213,17 +207,17 @@ public: /// device vector into it. /// VTKM_CONT - void RetrieveOutputData(StorageType *storage) const + void RetrieveOutputData(StorageType* storage) const { storage->Allocate(this->GetNumberOfValues()); try - { + { #ifdef VTKM_USE_UNIFIED_MEMORY cudaDeviceSynchronize(); #endif ::thrust::copy(this->Begin, this->End, - vtkm::cont::ArrayPortalToIteratorBegin(storage->GetPortal())); - } + vtkm::cont::ArrayPortalToIteratorBegin(storage->GetPortal())); + } catch (...) { vtkm::cont::cuda::internal::throwAsVTKmException(); @@ -249,8 +243,7 @@ public: VTKM_ASSERT(this->Begin.get() != nullptr && this->Begin.get() + numberOfValues <= this->End.get()); - this->End = PointerType(this->Begin.get() + - static_cast(numberOfValues)); + this->End = PointerType(this->Begin.get() + static_cast(numberOfValues)); } /// Frees all memory. @@ -267,18 +260,15 @@ public: } private: - ArrayManagerExecutionThrustDevice( - ArrayManagerExecutionThrustDevice &) = delete; - void operator=( - ArrayManagerExecutionThrustDevice &) = delete; + ArrayManagerExecutionThrustDevice(ArrayManagerExecutionThrustDevice&) = delete; + void operator=(ArrayManagerExecutionThrustDevice&) = delete; - StorageType *Storage; + StorageType* Storage; PointerType Begin; PointerType End; PointerType Capacity; - VTKM_CONT void CopyToExecution() { @@ -295,8 +285,6 @@ private: } } }; - - } } } diff --git a/vtkm/cont/cuda/internal/DeviceAdapterAlgorithmCuda.h b/vtkm/cont/cuda/internal/DeviceAdapterAlgorithmCuda.h index 57a865a49..682dc0331 100644 --- a/vtkm/cont/cuda/internal/DeviceAdapterAlgorithmCuda.h +++ b/vtkm/cont/cuda/internal/DeviceAdapterAlgorithmCuda.h @@ -33,43 +33,42 @@ #include -namespace vtkm { -namespace cont { -namespace cuda { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace cuda +{ +namespace internal +{ -static -__global__ -void DetermineIfValidCudaDevice() +static __global__ void DetermineIfValidCudaDevice() { //used only to see if we can launch kernels. It is possible to have a //CUDA capable device, but still fail to have CUDA support. } - } } } } -namespace vtkm { -namespace cont { - -template<> -struct DeviceAdapterAlgorithm - : public vtkm::cont::cuda::internal::DeviceAdapterAlgorithmThrust< - vtkm::cont::DeviceAdapterTagCuda> +namespace vtkm +{ +namespace cont { - VTKM_CONT static void Synchronize() - { - VTKM_CUDA_CALL(cudaDeviceSynchronize()); - } +template <> +struct DeviceAdapterAlgorithm + : public vtkm::cont::cuda::internal::DeviceAdapterAlgorithmThrust< + vtkm::cont::DeviceAdapterTagCuda> +{ + VTKM_CONT static void Synchronize() { VTKM_CUDA_CALL(cudaDeviceSynchronize()); } }; /// CUDA contains its own high resolution timer. /// -template<> +template <> class DeviceAdapterTimerImplementation { public: @@ -96,16 +95,17 @@ public: VTKM_CUDA_CALL(cudaEventRecord(this->EndEvent, 0)); VTKM_CUDA_CALL(cudaEventSynchronize(this->EndEvent)); float elapsedTimeMilliseconds; - VTKM_CUDA_CALL(cudaEventElapsedTime(&elapsedTimeMilliseconds, - this->StartEvent, - this->EndEvent)); - return static_cast(0.001f*elapsedTimeMilliseconds); + VTKM_CUDA_CALL( + cudaEventElapsedTime(&elapsedTimeMilliseconds, this->StartEvent, this->EndEvent)); + return static_cast(0.001f * elapsedTimeMilliseconds); } private: // Copying CUDA events is problematic. - DeviceAdapterTimerImplementation(const DeviceAdapterTimerImplementation &) = delete; - void operator=(const DeviceAdapterTimerImplementation &) = delete; + DeviceAdapterTimerImplementation( + const DeviceAdapterTimerImplementation&) = delete; + void operator=(const DeviceAdapterTimerImplementation&) = + delete; cudaEvent_t StartEvent; cudaEvent_t EndEvent; @@ -120,20 +120,20 @@ private: /// capable device, and said device is from the 'fermi' (SM_20) generation /// or newer. /// -template<> +template <> class DeviceAdapterRuntimeDetector { public: - VTKM_CONT DeviceAdapterRuntimeDetector(): - NumberOfDevices(0), - HighestArchSupported(0) + VTKM_CONT DeviceAdapterRuntimeDetector() + : NumberOfDevices(0) + , HighestArchSupported(0) { static bool deviceQueryInit = false; static int numDevices = 0; static int archVersion = 0; - if(!deviceQueryInit) - { + if (!deviceQueryInit) + { deviceQueryInit = true; //first query for the number of devices @@ -156,13 +156,13 @@ public: // 3. cudaErrorNoKernelImageForDevice we built for a compute version // greater than the device we are running on // Most likely others that I don't even know about - vtkm::cont::cuda::internal::DetermineIfValidCudaDevice <<<1,1>>> (); - if(cudaSuccess != cudaGetLastError()) - { + vtkm::cont::cuda::internal::DetermineIfValidCudaDevice<<<1, 1>>>(); + if (cudaSuccess != cudaGetLastError()) + { numDevices = 0; archVersion = 0; - } } + } this->NumberOfDevices = numDevices; this->HighestArchSupported = archVersion; @@ -187,63 +187,60 @@ private: /// CUDA contains its own atomic operations /// -template -class DeviceAdapterAtomicArrayImplementation +template +class DeviceAdapterAtomicArrayImplementation { public: VTKM_CONT DeviceAdapterAtomicArrayImplementation( - vtkm::cont::ArrayHandle handle): - Portal( handle.PrepareForInPlace( vtkm::cont::DeviceAdapterTagCuda()) ) + vtkm::cont::ArrayHandle handle) + : Portal(handle.PrepareForInPlace(vtkm::cont::DeviceAdapterTagCuda())) { } - inline __device__ - T Add(vtkm::Id index, const T& value) const + inline __device__ T Add(vtkm::Id index, const T& value) const { - T *lockedValue = ::thrust::raw_pointer_cast(this->Portal.GetIteratorBegin() + index); + T* lockedValue = ::thrust::raw_pointer_cast(this->Portal.GetIteratorBegin() + index); return vtkmAtomicAdd(lockedValue, value); } - inline __device__ - T CompareAndSwap(vtkm::Id index, const vtkm::Int64 &newValue, const vtkm::Int64 &oldValue) const + inline __device__ T CompareAndSwap(vtkm::Id index, const vtkm::Int64& newValue, + const vtkm::Int64& oldValue) const { - T *lockedValue = ::thrust::raw_pointer_cast(this->Portal.GetIteratorBegin() + index); + T* lockedValue = ::thrust::raw_pointer_cast(this->Portal.GetIteratorBegin() + index); return vtkmCompareAndSwap(lockedValue, newValue, oldValue); } private: - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal PortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + vtkm::cont::DeviceAdapterTagCuda>::Portal PortalType; PortalType Portal; - inline __device__ - vtkm::Int64 vtkmAtomicAdd(vtkm::Int64 *address, const vtkm::Int64 &value) const + inline __device__ vtkm::Int64 vtkmAtomicAdd(vtkm::Int64* address, const vtkm::Int64& value) const { - return atomicAdd((unsigned long long *)address,(unsigned long long) value); + return atomicAdd((unsigned long long*)address, (unsigned long long)value); } - inline __device__ - vtkm::Int32 vtkmAtomicAdd(vtkm::Int32 *address, const vtkm::Int32 &value) const + inline __device__ vtkm::Int32 vtkmAtomicAdd(vtkm::Int32* address, const vtkm::Int32& value) const { - return atomicAdd(address,value); + return atomicAdd(address, value); } - inline __device__ - vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32 *address, const vtkm::Int32 &newValue, const vtkm::Int32 &oldValue) const + inline __device__ vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32* address, + const vtkm::Int32& newValue, + const vtkm::Int32& oldValue) const { - return atomicCAS(address,oldValue,newValue); + return atomicCAS(address, oldValue, newValue); } - inline __device__ - vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64 *address, const vtkm::Int64 &newValue, const vtkm::Int64 &oldValue) const + inline __device__ vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64* address, + const vtkm::Int64& newValue, + const vtkm::Int64& oldValue) const { - return atomicCAS((unsigned long long int*) address, - (unsigned long long int ) oldValue, - (unsigned long long int ) newValue); - } + return atomicCAS((unsigned long long int*)address, (unsigned long long int)oldValue, + (unsigned long long int)newValue); + } }; - } } // namespace vtkm::cont diff --git a/vtkm/cont/cuda/internal/DeviceAdapterAlgorithmThrust.h b/vtkm/cont/cuda/internal/DeviceAdapterAlgorithmThrust.h index fa3241831..bbd691083 100644 --- a/vtkm/cont/cuda/internal/DeviceAdapterAlgorithmThrust.h +++ b/vtkm/cont/cuda/internal/DeviceAdapterAlgorithmThrust.h @@ -38,8 +38,6 @@ #include #include - - //#include #include @@ -60,27 +58,28 @@ VTKM_THIRDPARTY_PRE_INCLUDE #include VTKM_THIRDPARTY_POST_INCLUDE -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -template +template class DeviceAdapterAlgorithm; - -namespace cuda { -namespace internal { - -static -__global__ -void DetermineProperXGridSize(vtkm::UInt32 desired_size, - vtkm::UInt32* actual_size) +namespace cuda { -//used only to see if we can launch kernels with a x grid size that -//matches the max of the graphics card, or are we having to fall back -//to SM_2 grid sizes - if(blockIdx.x != 0) +namespace internal +{ + +static __global__ void DetermineProperXGridSize(vtkm::UInt32 desired_size, + vtkm::UInt32* actual_size) +{ + //used only to see if we can launch kernels with a x grid size that + //matches the max of the graphics card, or are we having to fall back + //to SM_2 grid sizes + if (blockIdx.x != 0) { - return; + return; } #if __CUDA_ARCH__ <= 200 const vtkm::UInt32 maxXGridSizeForSM2 = 65535; @@ -90,100 +89,90 @@ void DetermineProperXGridSize(vtkm::UInt32 desired_size, #endif } -template -__global__ -void Schedule1DIndexKernel(FunctorType functor, - vtkm::Id numberOfKernelsInvoked, - vtkm::Id length) +template +__global__ void Schedule1DIndexKernel(FunctorType functor, vtkm::Id numberOfKernelsInvoked, + vtkm::Id length) { //Note a cuda launch can only handle at most 2B iterations of a kernel //because it holds all of the indexes inside UInt32, so for use to //handle datasets larger than 2B, we need to execute multiple kernels - const vtkm::Id index = numberOfKernelsInvoked + - static_cast(blockDim.x * blockIdx.x + threadIdx.x); - if(index < length) - { + const vtkm::Id index = + numberOfKernelsInvoked + static_cast(blockDim.x * blockIdx.x + threadIdx.x); + if (index < length) + { functor(index); - } + } } -template -__global__ -void Schedule3DIndexKernel(FunctorType functor, dim3 size) +template +__global__ void Schedule3DIndexKernel(FunctorType functor, dim3 size) { - const vtkm::Id3 index( - blockIdx.x*blockDim.x + threadIdx.x, - blockIdx.y*blockDim.y + threadIdx.y, - blockIdx.z*blockDim.z + threadIdx.z - ); + const vtkm::Id3 index(blockIdx.x * blockDim.x + threadIdx.x, + blockIdx.y * blockDim.y + threadIdx.y, + blockIdx.z * blockDim.z + threadIdx.z); if (index[0] >= size.x || index[1] >= size.y || index[2] >= size.z) - { + { return; - } - functor( index ); + } + functor(index); } -template -__global__ -void SumExclusiveScan(T a, T b, T result, - BinaryOperationType binary_op) +template +__global__ void SumExclusiveScan(T a, T b, T result, BinaryOperationType binary_op) { - result = binary_op(a,b); + result = binary_op(a, b); } -inline -void compute_block_size(dim3 rangeMax, dim3 blockSize3d, dim3& gridSize3d) +inline void compute_block_size(dim3 rangeMax, dim3 blockSize3d, dim3& gridSize3d) { - gridSize3d.x = (rangeMax.x % blockSize3d.x != 0) ? (rangeMax.x / blockSize3d.x + 1) : (rangeMax.x / blockSize3d.x); - gridSize3d.y = (rangeMax.y % blockSize3d.y != 0) ? (rangeMax.y / blockSize3d.y + 1) : (rangeMax.y / blockSize3d.y); - gridSize3d.z = (rangeMax.z % blockSize3d.z != 0) ? (rangeMax.z / blockSize3d.z + 1) : (rangeMax.z / blockSize3d.z); + gridSize3d.x = (rangeMax.x % blockSize3d.x != 0) ? (rangeMax.x / blockSize3d.x + 1) + : (rangeMax.x / blockSize3d.x); + gridSize3d.y = (rangeMax.y % blockSize3d.y != 0) ? (rangeMax.y / blockSize3d.y + 1) + : (rangeMax.y / blockSize3d.y); + gridSize3d.z = (rangeMax.z % blockSize3d.z != 0) ? (rangeMax.z / blockSize3d.z + 1) + : (rangeMax.z / blockSize3d.z); } #ifdef ANALYZE_VTKM_SCHEDULER class PerfRecord { public: + PerfRecord(float elapsedT, dim3 block) + : elapsedTime(elapsedT) + , blockSize(block) + { + } - PerfRecord(float elapsedT, dim3 block ): - elapsedTime(elapsedT), - blockSize(block) - { - - } - - bool operator<(const PerfRecord& other) const - { return elapsedTime < other.elapsedTime; } + bool operator<(const PerfRecord& other) const { return elapsedTime < other.elapsedTime; } float elapsedTime; dim3 blockSize; }; -template +template static void compare_3d_schedule_patterns(Functor functor, const vtkm::Id3& rangeMax) { - const dim3 ranges(static_cast(rangeMax[0]), - static_cast(rangeMax[1]), - static_cast(rangeMax[2]) ); - std::vector< PerfRecord > results; - vtkm::UInt32 indexTable[16] = {1, 2, 4, 8, 12, 16, 20, 24, 28, 30, 32, 64, 128, 256, 512, 1024}; + const dim3 ranges(static_cast(rangeMax[0]), static_cast(rangeMax[1]), + static_cast(rangeMax[2])); + std::vector results; + vtkm::UInt32 indexTable[16] = { 1, 2, 4, 8, 12, 16, 20, 24, 28, 30, 32, 64, 128, 256, 512, 1024 }; - for(vtkm::UInt32 i=0; i < 16; i++) + for (vtkm::UInt32 i = 0; i < 16; i++) + { + for (vtkm::UInt32 j = 0; j < 16; j++) { - for(vtkm::UInt32 j=0; j < 16; j++) + for (vtkm::UInt32 k = 0; k < 16; k++) { - for(vtkm::UInt32 k=0; k < 16; k++) - { cudaEvent_t start, stop; VTKM_CUDA_CALL(cudaEventCreate(&start)); VTKM_CUDA_CALL(cudaEventCreate(&stop)); - dim3 blockSize3d(indexTable[i],indexTable[j],indexTable[k]); + dim3 blockSize3d(indexTable[i], indexTable[j], indexTable[k]); dim3 gridSize3d; - if( (blockSize3d.x * blockSize3d.y * blockSize3d.z) >= 1024 || - (blockSize3d.x * blockSize3d.y * blockSize3d.z) <= 4 || - blockSize3d.z >= 64) - { + if ((blockSize3d.x * blockSize3d.y * blockSize3d.z) >= 1024 || + (blockSize3d.x * blockSize3d.y * blockSize3d.z) <= 4 || blockSize3d.z >= 64) + { //cuda can't handle more than 1024 threads per block //so don't try if we compute higher than that @@ -191,11 +180,11 @@ static void compare_3d_schedule_patterns(Functor functor, const vtkm::Id3& range //cuda can't handle more than 64 threads in the z direction continue; - } + } compute_block_size(ranges, blockSize3d, gridSize3d); VTKM_CUDA_CALL(cudaEventRecord(start, 0)); - Schedule3DIndexKernel <<>> (functor, ranges); + Schedule3DIndexKernel<<>>(functor, ranges); VTKM_CUDA_CALL(cudaEventRecord(stop, 0)); VTKM_CUDA_CALL(cudaEventSynchronize(stop)); @@ -206,268 +195,220 @@ static void compare_3d_schedule_patterns(Functor functor, const vtkm::Id3& range VTKM_CUDA_CALL(cudaEventDestroy(stop)); PerfRecord record(elapsedTimeMilliseconds, blockSize3d); - results.push_back( record ); + results.push_back(record); } } } std::sort(results.begin(), results.end()); const vtkm::Int64 size = static_cast(results.size()); - for(vtkm::Int64 i=1; i <= size; i++) - { - vtkm::UInt64 index = static_cast(size-i); + for (vtkm::Int64 i = 1; i <= size; i++) + { + vtkm::UInt64 index = static_cast(size - i); vtkm::UInt32 x = results[index].blockSize.x; vtkm::UInt32 y = results[index].blockSize.y; vtkm::UInt32 z = results[index].blockSize.z; float t = results[index].elapsedTime; std::cout << "BlockSize of: " << x << "," << y << "," << z << " required: " << t << std::endl; - } + } std::cout << "flat array performance " << std::endl; { - cudaEvent_t start, stop; - VTKM_CUDA_CALL(cudaEventCreate(&start)); - VTKM_CUDA_CALL(cudaEventCreate(&stop)); + cudaEvent_t start, stop; + VTKM_CUDA_CALL(cudaEventCreate(&start)); + VTKM_CUDA_CALL(cudaEventCreate(&stop)); - VTKM_CUDA_CALL(cudaEventRecord(start, 0)); - typedef - vtkm::cont::cuda::internal::DeviceAdapterAlgorithmThrust< - vtkm::cont::DeviceAdapterTagCuda > Algorithm; - Algorithm::Schedule(functor, numInstances); - VTKM_CUDA_CALL(cudaEventRecord(stop, 0)); + VTKM_CUDA_CALL(cudaEventRecord(start, 0)); + typedef vtkm::cont::cuda::internal::DeviceAdapterAlgorithmThrust< + vtkm::cont::DeviceAdapterTagCuda> + Algorithm; + Algorithm::Schedule(functor, numInstances); + VTKM_CUDA_CALL(cudaEventRecord(stop, 0)); - VTKM_CUDA_CALL(cudaEventSynchronize(stop)); - float elapsedTimeMilliseconds; - VTKM_CUDA_CALL(cudaEventElapsedTime(&elapsedTimeMilliseconds, start, stop)); + VTKM_CUDA_CALL(cudaEventSynchronize(stop)); + float elapsedTimeMilliseconds; + VTKM_CUDA_CALL(cudaEventElapsedTime(&elapsedTimeMilliseconds, start, stop)); - VTKM_CUDA_CALL(cudaEventDestroy(start)); - VTKM_CUDA_CALL(cudaEventDestroy(stop)); + VTKM_CUDA_CALL(cudaEventDestroy(start)); + VTKM_CUDA_CALL(cudaEventDestroy(stop)); - std::cout << "Flat index required: " << elapsedTimeMilliseconds << std::endl; + std::cout << "Flat index required: " << elapsedTimeMilliseconds << std::endl; } std::cout << "fixed 3d block size performance " << std::endl; { - cudaEvent_t start, stop; - VTKM_CUDA_CALL(cudaEventCreate(&start)); - VTKM_CUDA_CALL(cudaEventCreate(&stop)); + cudaEvent_t start, stop; + VTKM_CUDA_CALL(cudaEventCreate(&start)); + VTKM_CUDA_CALL(cudaEventCreate(&stop)); - dim3 blockSize3d(64,2,1); - dim3 gridSize3d; + dim3 blockSize3d(64, 2, 1); + dim3 gridSize3d; - compute_block_size(ranges, blockSize3d, gridSize3d); - VTKM_CUDA_CALL(cudaEventRecord(start, 0)); - Schedule3DIndexKernel <<>> (functor, ranges); - VTKM_CUDA_CALL(cudaEventRecord(stop, 0)); + compute_block_size(ranges, blockSize3d, gridSize3d); + VTKM_CUDA_CALL(cudaEventRecord(start, 0)); + Schedule3DIndexKernel<<>>(functor, ranges); + VTKM_CUDA_CALL(cudaEventRecord(stop, 0)); - VTKM_CUDA_CALL(cudaEventSynchronize(stop)); - float elapsedTimeMilliseconds; - VTKM_CUDA_CALL(cudaEventElapsedTime(&elapsedTimeMilliseconds, start, stop)); + VTKM_CUDA_CALL(cudaEventSynchronize(stop)); + float elapsedTimeMilliseconds; + VTKM_CUDA_CALL(cudaEventElapsedTime(&elapsedTimeMilliseconds, start, stop)); - VTKM_CUDA_CALL(cudaEventDestroy(start)); - VTKM_CUDA_CALL(cudaEventDestroy(stop)); + VTKM_CUDA_CALL(cudaEventDestroy(start)); + VTKM_CUDA_CALL(cudaEventDestroy(stop)); - std::cout << "BlockSize of: " << blockSize3d.x << "," << blockSize3d.y << "," << blockSize3d.z << " required: " << elapsedTimeMilliseconds << std::endl; - std::cout << "GridSize of: " << gridSize3d.x << "," << gridSize3d.y << "," << gridSize3d.z << " required: " << elapsedTimeMilliseconds << std::endl; + std::cout << "BlockSize of: " << blockSize3d.x << "," << blockSize3d.y << "," << blockSize3d.z + << " required: " << elapsedTimeMilliseconds << std::endl; + std::cout << "GridSize of: " << gridSize3d.x << "," << gridSize3d.y << "," << gridSize3d.z + << " required: " << elapsedTimeMilliseconds << std::endl; } } #endif - /// This class can be subclassed to implement the DeviceAdapterAlgorithm for a /// device that uses thrust as its implementation. The subclass should pass in /// the correct device adapter tag as the template parameter. /// -template -struct DeviceAdapterAlgorithmThrust : vtkm::cont::internal::DeviceAdapterAlgorithmGeneral< - vtkm::cont::DeviceAdapterAlgorithm, - vtkm::cont::DeviceAdapterTagCuda> +template +struct DeviceAdapterAlgorithmThrust + : vtkm::cont::internal::DeviceAdapterAlgorithmGeneral< + vtkm::cont::DeviceAdapterAlgorithm, + vtkm::cont::DeviceAdapterTagCuda> { - // Because of some funny code conversions in nvcc, kernels for devices have to - // be public. - #ifndef VTKM_CUDA +// Because of some funny code conversions in nvcc, kernels for devices have to +// be public. +#ifndef VTKM_CUDA private: - #endif - template - VTKM_CONT static void CopyPortal(const InputPortal &input, - const OutputPortal &output) +#endif + template + VTKM_CONT static void CopyPortal(const InputPortal& input, const OutputPortal& output) { try { - ::thrust::copy(thrust::cuda::par, - IteratorBegin(input), - IteratorEnd(input), + ::thrust::copy(thrust::cuda::par, IteratorBegin(input), IteratorEnd(input), IteratorBegin(output)); } - catch(...) + catch (...) { throwAsVTKmException(); } } - template - VTKM_CONT static - vtkm::Id CopyIfPortal(ValueIterator valuesBegin, - ValueIterator valuesEnd, - StencilPortal stencil, - OutputPortal output, - UnaryPredicate unary_predicate) + template + VTKM_CONT static vtkm::Id CopyIfPortal(ValueIterator valuesBegin, ValueIterator valuesEnd, + StencilPortal stencil, OutputPortal output, + UnaryPredicate unary_predicate) { - typedef typename detail::IteratorTraits::IteratorType - IteratorType; + typedef typename detail::IteratorTraits::IteratorType IteratorType; IteratorType outputBegin = IteratorBegin(output); typedef typename StencilPortal::ValueType ValueType; - vtkm::exec::cuda::internal::WrappedUnaryPredicate up(unary_predicate); + vtkm::exec::cuda::internal::WrappedUnaryPredicate up( + unary_predicate); try { - IteratorType newLast = ::thrust::copy_if(thrust::cuda::par, - valuesBegin, - valuesEnd, - IteratorBegin(stencil), - outputBegin, - up); - return static_cast( ::thrust::distance(outputBegin, newLast) ); + IteratorType newLast = ::thrust::copy_if(thrust::cuda::par, valuesBegin, valuesEnd, + IteratorBegin(stencil), outputBegin, up); + return static_cast(::thrust::distance(outputBegin, newLast)); } - catch(...) + catch (...) { throwAsVTKmException(); return vtkm::Id(0); } - - } - template - VTKM_CONT static - vtkm::Id CopyIfPortal(ValuePortal values, - StencilPortal stencil, - OutputPortal output, - UnaryPredicate unary_predicate) + template + VTKM_CONT static vtkm::Id CopyIfPortal(ValuePortal values, StencilPortal stencil, + OutputPortal output, UnaryPredicate unary_predicate) { - return CopyIfPortal(IteratorBegin(values), - IteratorEnd(values), - stencil, - output, + return CopyIfPortal(IteratorBegin(values), IteratorEnd(values), stencil, output, unary_predicate); } - template - VTKM_CONT static void CopySubRangePortal(const InputPortal &input, - vtkm::Id inputOffset, - vtkm::Id size, - const OutputPortal &output, - vtkm::Id outputOffset) + template + VTKM_CONT static void CopySubRangePortal(const InputPortal& input, vtkm::Id inputOffset, + vtkm::Id size, const OutputPortal& output, + vtkm::Id outputOffset) { try { - ::thrust::copy_n(thrust::cuda::par, - IteratorBegin(input)+inputOffset, - static_cast(size), - IteratorBegin(output)+outputOffset); + ::thrust::copy_n(thrust::cuda::par, IteratorBegin(input) + inputOffset, + static_cast(size), IteratorBegin(output) + outputOffset); } - catch(...) + catch (...) { throwAsVTKmException(); } } - template - VTKM_CONT static void LowerBoundsPortal(const InputPortal &input, - const ValuesPortal &values, - const OutputPortal &output) + template + VTKM_CONT static void LowerBoundsPortal(const InputPortal& input, const ValuesPortal& values, + const OutputPortal& output) { typedef typename ValuesPortal::ValueType ValueType; - LowerBoundsPortal(input, values, output, ::thrust::less() ); + LowerBoundsPortal(input, values, output, ::thrust::less()); } - template - VTKM_CONT static - void LowerBoundsPortal(const InputPortal &input, - const OutputPortal &values_output) + template + VTKM_CONT static void LowerBoundsPortal(const InputPortal& input, + const OutputPortal& values_output) { typedef typename InputPortal::ValueType ValueType; - LowerBoundsPortal(input, values_output, values_output, - ::thrust::less() ); + LowerBoundsPortal(input, values_output, values_output, ::thrust::less()); } - template - VTKM_CONT static void LowerBoundsPortal(const InputPortal &input, - const ValuesPortal &values, - const OutputPortal &output, - BinaryCompare binary_compare) + template + VTKM_CONT static void LowerBoundsPortal(const InputPortal& input, const ValuesPortal& values, + const OutputPortal& output, BinaryCompare binary_compare) { typedef typename InputPortal::ValueType ValueType; - vtkm::exec::cuda::internal::WrappedBinaryPredicate bop(binary_compare); + vtkm::exec::cuda::internal::WrappedBinaryPredicate bop( + binary_compare); try { - ::thrust::lower_bound(thrust::cuda::par, - IteratorBegin(input), - IteratorEnd(input), - IteratorBegin(values), - IteratorEnd(values), - IteratorBegin(output), - bop); + ::thrust::lower_bound(thrust::cuda::par, IteratorBegin(input), IteratorEnd(input), + IteratorBegin(values), IteratorEnd(values), IteratorBegin(output), bop); } - catch(...) + catch (...) { throwAsVTKmException(); } } - template - VTKM_CONT static - T ReducePortal(const InputPortal &input, T initialValue) + template + VTKM_CONT static T ReducePortal(const InputPortal& input, T initialValue) { - return ReducePortal(input, - initialValue, - ::thrust::plus()); + return ReducePortal(input, initialValue, ::thrust::plus()); } - template - VTKM_CONT static - T ReducePortal(const InputPortal &input, - T initialValue, - BinaryFunctor binary_functor) + template + VTKM_CONT static T ReducePortal(const InputPortal& input, T initialValue, + BinaryFunctor binary_functor) { - using fast_path = std::is_same< typename InputPortal::ValueType, T>; + using fast_path = std::is_same; return ReducePortalImpl(input, initialValue, binary_functor, fast_path()); } - template - VTKM_CONT static - T ReducePortalImpl(const InputPortal &input, T initialValue, - BinaryFunctor binary_functor, std::true_type) + template + VTKM_CONT static T ReducePortalImpl(const InputPortal& input, T initialValue, + BinaryFunctor binary_functor, std::true_type) { //The portal type and the initial value are the same so we can use //the thrust reduction algorithm - vtkm::exec::cuda::internal::WrappedBinaryOperator bop(binary_functor); + vtkm::exec::cuda::internal::WrappedBinaryOperator bop(binary_functor); try { - return ::thrust::reduce(thrust::cuda::par, - IteratorBegin(input), - IteratorEnd(input), - initialValue, - bop); + return ::thrust::reduce(thrust::cuda::par, IteratorBegin(input), IteratorEnd(input), + initialValue, bop); } - catch(...) + catch (...) { throwAsVTKmException(); } @@ -475,34 +416,25 @@ private: return initialValue; } - template - VTKM_CONT static - T ReducePortalImpl(const InputPortal &input, T initialValue, - BinaryFunctor binary_functor, - std::false_type) + template + VTKM_CONT static T ReducePortalImpl(const InputPortal& input, T initialValue, + BinaryFunctor binary_functor, std::false_type) { //The portal type and the initial value ARENT the same type so we have //to a slower approach, where we wrap the input portal inside a cast //portal - using CastFunctor = vtkm::cont::internal::Cast; + using CastFunctor = vtkm::cont::internal::Cast; - vtkm::exec::internal::ArrayPortalTransform< T, InputPortal, CastFunctor> - castPortal(input); + vtkm::exec::internal::ArrayPortalTransform castPortal(input); - - - vtkm::exec::cuda::internal::WrappedBinaryOperator bop(binary_functor); + vtkm::exec::cuda::internal::WrappedBinaryOperator bop(binary_functor); try { - return ::thrust::reduce(thrust::cuda::par, - IteratorBegin(castPortal), - IteratorEnd(castPortal), - initialValue, - bop); + return ::thrust::reduce(thrust::cuda::par, IteratorBegin(castPortal), IteratorEnd(castPortal), + initialValue, bop); } - catch(...) + catch (...) { throwAsVTKmException(); } @@ -510,73 +442,54 @@ private: return initialValue; } - template - VTKM_CONT static - vtkm::Id ReduceByKeyPortal(const KeysPortal &keys, - const ValuesPortal& values, - const KeysOutputPortal &keys_output, - const ValueOutputPortal &values_output, - BinaryFunctor binary_functor) + template + VTKM_CONT static vtkm::Id ReduceByKeyPortal(const KeysPortal& keys, const ValuesPortal& values, + const KeysOutputPortal& keys_output, + const ValueOutputPortal& values_output, + BinaryFunctor binary_functor) { - typedef typename detail::IteratorTraits::IteratorType - KeysIteratorType; - typedef typename detail::IteratorTraits::IteratorType - ValuesIteratorType; + typedef typename detail::IteratorTraits::IteratorType KeysIteratorType; + typedef typename detail::IteratorTraits::IteratorType ValuesIteratorType; KeysIteratorType keys_out_begin = IteratorBegin(keys_output); ValuesIteratorType values_out_begin = IteratorBegin(values_output); - ::thrust::pair< KeysIteratorType, ValuesIteratorType > result_iterators; + ::thrust::pair result_iterators; ::thrust::equal_to binaryPredicate; typedef typename ValuesPortal::ValueType ValueType; - vtkm::exec::cuda::internal::WrappedBinaryOperator bop(binary_functor); - + vtkm::exec::cuda::internal::WrappedBinaryOperator bop(binary_functor); try { - result_iterators = ::thrust::reduce_by_key(vtkm_cuda_policy(), - IteratorBegin(keys), - IteratorEnd(keys), - IteratorBegin(values), - keys_out_begin, - values_out_begin, - binaryPredicate, - bop); + result_iterators = ::thrust::reduce_by_key( + vtkm_cuda_policy(), IteratorBegin(keys), IteratorEnd(keys), IteratorBegin(values), + keys_out_begin, values_out_begin, binaryPredicate, bop); } - catch(...) + catch (...) { throwAsVTKmException(); } - return static_cast( ::thrust::distance(keys_out_begin, - result_iterators.first) ); + return static_cast(::thrust::distance(keys_out_begin, result_iterators.first)); } - template - VTKM_CONT static - typename InputPortal::ValueType ScanExclusivePortal(const InputPortal &input, - const OutputPortal &output) + template + VTKM_CONT static typename InputPortal::ValueType ScanExclusivePortal(const InputPortal& input, + const OutputPortal& output) { typedef typename OutputPortal::ValueType ValueType; - return ScanExclusivePortal(input, - output, - (::thrust::plus()), + return ScanExclusivePortal(input, output, (::thrust::plus()), vtkm::TypeTraits::ZeroInitialization()); - } - template - VTKM_CONT static - typename InputPortal::ValueType ScanExclusivePortal(const InputPortal &input, - const OutputPortal &output, - BinaryFunctor binaryOp, - typename InputPortal::ValueType initialValue) + template + VTKM_CONT static typename InputPortal::ValueType ScanExclusivePortal( + const InputPortal& input, const OutputPortal& output, BinaryFunctor binaryOp, + typename InputPortal::ValueType initialValue) { // Use iterator to get value so that thrust device_ptr has chance to handle // data on device. @@ -584,390 +497,304 @@ private: //we have size three so that we can store the origin end value, the //new end value, and the sum of those two - ::thrust::system::cuda::vector< ValueType > sum(3); + ::thrust::system::cuda::vector sum(3); try { //store the current value of the last position array in a separate cuda //memory location since the exclusive_scan will overwrite that value //once run - ::thrust::copy_n(thrust::cuda::par, - IteratorEnd(input) - 1, 1, sum.begin()); + ::thrust::copy_n(thrust::cuda::par, IteratorEnd(input) - 1, 1, sum.begin()); - vtkm::exec::cuda::internal::WrappedBinaryOperator bop(binaryOp); + vtkm::exec::cuda::internal::WrappedBinaryOperator bop(binaryOp); - typedef typename detail::IteratorTraits::IteratorType - IteratorType; - IteratorType end = ::thrust::exclusive_scan(thrust::cuda::par, - IteratorBegin(input), - IteratorEnd(input), - IteratorBegin(output), - initialValue, - bop); + typedef typename detail::IteratorTraits::IteratorType IteratorType; + IteratorType end = + ::thrust::exclusive_scan(thrust::cuda::par, IteratorBegin(input), IteratorEnd(input), + IteratorBegin(output), initialValue, bop); //Store the new value for the end of the array. This is done because //with items such as the transpose array it is unsafe to pass the //portal to the SumExclusiveScan - ::thrust::copy_n(thrust::cuda::par, - (end-1), 1, sum.begin()+1); - + ::thrust::copy_n(thrust::cuda::par, (end - 1), 1, sum.begin() + 1); //execute the binaryOp one last time on the device. - SumExclusiveScan <<<1,1>>> (sum[0], sum[1], sum[2], bop); + SumExclusiveScan<<<1, 1>>>(sum[0], sum[1], sum[2], bop); } - catch(...) + catch (...) { throwAsVTKmException(); } return sum[2]; } - template - VTKM_CONT static - typename InputPortal::ValueType ScanInclusivePortal(const InputPortal &input, - const OutputPortal &output) + template + VTKM_CONT static typename InputPortal::ValueType ScanInclusivePortal(const InputPortal& input, + const OutputPortal& output) { typedef typename OutputPortal::ValueType ValueType; - return ScanInclusivePortal(input, output, ::thrust::plus() ); + return ScanInclusivePortal(input, output, ::thrust::plus()); } - template - VTKM_CONT static - typename InputPortal::ValueType ScanInclusivePortal(const InputPortal &input, - const OutputPortal &output, - BinaryFunctor binary_functor) + template + VTKM_CONT static typename InputPortal::ValueType ScanInclusivePortal(const InputPortal& input, + const OutputPortal& output, + BinaryFunctor binary_functor) { typedef typename OutputPortal::ValueType ValueType; - vtkm::exec::cuda::internal::WrappedBinaryOperator bop(binary_functor); + vtkm::exec::cuda::internal::WrappedBinaryOperator bop(binary_functor); - typedef typename detail::IteratorTraits::IteratorType - IteratorType; + typedef typename detail::IteratorTraits::IteratorType IteratorType; try { - IteratorType end = ::thrust::inclusive_scan(thrust::cuda::par, - IteratorBegin(input), - IteratorEnd(input), - IteratorBegin(output), - bop); - return *(end-1); + IteratorType end = ::thrust::inclusive_scan(thrust::cuda::par, IteratorBegin(input), + IteratorEnd(input), IteratorBegin(output), bop); + return *(end - 1); } - catch(...) + catch (...) { throwAsVTKmException(); return typename InputPortal::ValueType(); } //return the value at the last index in the array, as that is the sum - } - template - VTKM_CONT static - typename ValuesPortal::ValueType ScanInclusiveByKeyPortal(const KeysPortal &keys, - const ValuesPortal &values, - const OutputPortal &output) + template + VTKM_CONT static typename ValuesPortal::ValueType ScanInclusiveByKeyPortal( + const KeysPortal& keys, const ValuesPortal& values, const OutputPortal& output) { using KeyType = typename KeysPortal::ValueType; typedef typename OutputPortal::ValueType ValueType; - return ScanInclusiveByKeyPortal(keys, values, output, - ::thrust::equal_to(), + return ScanInclusiveByKeyPortal(keys, values, output, ::thrust::equal_to(), ::thrust::plus()); } - template - VTKM_CONT static - typename ValuesPortal::ValueType ScanInclusiveByKeyPortal(const KeysPortal &keys, - const ValuesPortal &values, - const OutputPortal &output, - BinaryPredicate binary_predicate, - AssociativeOperator binary_operator) + template + VTKM_CONT static typename ValuesPortal::ValueType ScanInclusiveByKeyPortal( + const KeysPortal& keys, const ValuesPortal& values, const OutputPortal& output, + BinaryPredicate binary_predicate, AssociativeOperator binary_operator) { typedef typename KeysPortal::ValueType KeyType; - vtkm::exec::cuda::internal::WrappedBinaryOperator bpred(binary_predicate); + vtkm::exec::cuda::internal::WrappedBinaryOperator bpred( + binary_predicate); typedef typename OutputPortal::ValueType ValueType; - vtkm::exec::cuda::internal::WrappedBinaryOperator bop(binary_operator); + vtkm::exec::cuda::internal::WrappedBinaryOperator bop( + binary_operator); - - typedef typename detail::IteratorTraits::IteratorType - IteratorType; + typedef typename detail::IteratorTraits::IteratorType IteratorType; try { - IteratorType end = ::thrust::inclusive_scan_by_key(thrust::cuda::par, - IteratorBegin(keys), - IteratorEnd(keys), - IteratorBegin(values), - IteratorBegin(output), - bpred, - bop); - return *(end-1); + IteratorType end = + ::thrust::inclusive_scan_by_key(thrust::cuda::par, IteratorBegin(keys), IteratorEnd(keys), + IteratorBegin(values), IteratorBegin(output), bpred, bop); + return *(end - 1); } - catch(...) + catch (...) { throwAsVTKmException(); return typename ValuesPortal::ValueType(); } //return the value at the last index in the array, as that is the sum - } - template - VTKM_CONT static - void ScanExclusiveByKeyPortal(const KeysPortal &keys, - const ValuesPortal &values, - const OutputPortal &output) + template + VTKM_CONT static void ScanExclusiveByKeyPortal(const KeysPortal& keys, const ValuesPortal& values, + const OutputPortal& output) { using KeyType = typename KeysPortal::ValueType; typedef typename OutputPortal::ValueType ValueType; ScanExclusiveByKeyPortal(keys, values, output, vtkm::TypeTraits::ZeroInitialization(), - ::thrust::equal_to(), - ::thrust::plus()); + ::thrust::equal_to(), ::thrust::plus()); } - template - VTKM_CONT static - void ScanExclusiveByKeyPortal(const KeysPortal &keys, - const ValuesPortal &values, - const OutputPortal &output, - T initValue, - BinaryPredicate binary_predicate, - AssociativeOperator binary_operator) + template + VTKM_CONT static void ScanExclusiveByKeyPortal(const KeysPortal& keys, const ValuesPortal& values, + const OutputPortal& output, T initValue, + BinaryPredicate binary_predicate, + AssociativeOperator binary_operator) { typedef typename KeysPortal::ValueType KeyType; - vtkm::exec::cuda::internal::WrappedBinaryOperator bpred(binary_predicate); + vtkm::exec::cuda::internal::WrappedBinaryOperator bpred( + binary_predicate); typedef typename OutputPortal::ValueType ValueType; - vtkm::exec::cuda::internal::WrappedBinaryOperator bop(binary_operator); + vtkm::exec::cuda::internal::WrappedBinaryOperator bop( + binary_operator); - - typedef typename detail::IteratorTraits::IteratorType - IteratorType; + typedef typename detail::IteratorTraits::IteratorType IteratorType; try { - IteratorType end = ::thrust::exclusive_scan_by_key(thrust::cuda::par, - IteratorBegin(keys), - IteratorEnd(keys), - IteratorBegin(values), - IteratorBegin(output), - initValue, - bpred, - bop); + IteratorType end = ::thrust::exclusive_scan_by_key( + thrust::cuda::par, IteratorBegin(keys), IteratorEnd(keys), IteratorBegin(values), + IteratorBegin(output), initValue, bpred, bop); return; } - catch(...) + catch (...) { throwAsVTKmException(); return; } //return the value at the last index in the array, as that is the sum - } - template - VTKM_CONT static void SortPortal(const ValuesPortal &values) + template + VTKM_CONT static void SortPortal(const ValuesPortal& values) { typedef typename ValuesPortal::ValueType ValueType; SortPortal(values, ::thrust::less()); } - template - VTKM_CONT static void SortPortal(const ValuesPortal &values, - BinaryCompare binary_compare) + template + VTKM_CONT static void SortPortal(const ValuesPortal& values, BinaryCompare binary_compare) { typedef typename ValuesPortal::ValueType ValueType; - vtkm::exec::cuda::internal::WrappedBinaryPredicate bop(binary_compare); + vtkm::exec::cuda::internal::WrappedBinaryPredicate bop( + binary_compare); try { - ::thrust::sort(vtkm_cuda_policy(), - IteratorBegin(values), - IteratorEnd(values), - bop); + ::thrust::sort(vtkm_cuda_policy(), IteratorBegin(values), IteratorEnd(values), bop); } - catch(...) + catch (...) { throwAsVTKmException(); } } - - template - VTKM_CONT static void SortByKeyPortal(const KeysPortal &keys, - const ValuesPortal &values) + template + VTKM_CONT static void SortByKeyPortal(const KeysPortal& keys, const ValuesPortal& values) { typedef typename KeysPortal::ValueType ValueType; - SortByKeyPortal(keys,values,::thrust::less()); + SortByKeyPortal(keys, values, ::thrust::less()); } - template - VTKM_CONT static void SortByKeyPortal(const KeysPortal &keys, - const ValuesPortal &values, - BinaryCompare binary_compare) + template + VTKM_CONT static void SortByKeyPortal(const KeysPortal& keys, const ValuesPortal& values, + BinaryCompare binary_compare) { typedef typename KeysPortal::ValueType ValueType; - vtkm::exec::cuda::internal::WrappedBinaryPredicate bop(binary_compare); + vtkm::exec::cuda::internal::WrappedBinaryPredicate bop( + binary_compare); try { - ::thrust::sort_by_key(vtkm_cuda_policy(), - IteratorBegin(keys), - IteratorEnd(keys), - IteratorBegin(values), - bop); + ::thrust::sort_by_key(vtkm_cuda_policy(), IteratorBegin(keys), IteratorEnd(keys), + IteratorBegin(values), bop); } - catch(...) + catch (...) { throwAsVTKmException(); } } - template - VTKM_CONT static - vtkm::Id UniquePortal(const ValuesPortal values) + template + VTKM_CONT static vtkm::Id UniquePortal(const ValuesPortal values) { - typedef typename detail::IteratorTraits::IteratorType - IteratorType; + typedef typename detail::IteratorTraits::IteratorType IteratorType; try { IteratorType begin = IteratorBegin(values); - IteratorType newLast = ::thrust::unique(thrust::cuda::par, - begin, - IteratorEnd(values)); - return static_cast( ::thrust::distance(begin, newLast) ); + IteratorType newLast = ::thrust::unique(thrust::cuda::par, begin, IteratorEnd(values)); + return static_cast(::thrust::distance(begin, newLast)); } - catch(...) + catch (...) { throwAsVTKmException(); return vtkm::Id(0); } } - template - VTKM_CONT static - vtkm::Id UniquePortal(const ValuesPortal values, BinaryCompare binary_compare) + template + VTKM_CONT static vtkm::Id UniquePortal(const ValuesPortal values, BinaryCompare binary_compare) { - typedef typename detail::IteratorTraits::IteratorType - IteratorType; + typedef typename detail::IteratorTraits::IteratorType IteratorType; typedef typename ValuesPortal::ValueType ValueType; - vtkm::exec::cuda::internal::WrappedBinaryPredicate bop(binary_compare); + vtkm::exec::cuda::internal::WrappedBinaryPredicate bop( + binary_compare); try { IteratorType begin = IteratorBegin(values); - IteratorType newLast = ::thrust::unique(thrust::cuda::par, - begin, - IteratorEnd(values), - bop); - return static_cast( ::thrust::distance(begin, newLast) ); + IteratorType newLast = ::thrust::unique(thrust::cuda::par, begin, IteratorEnd(values), bop); + return static_cast(::thrust::distance(begin, newLast)); } - catch(...) + catch (...) { throwAsVTKmException(); return vtkm::Id(0); } } - template - VTKM_CONT static - void UpperBoundsPortal(const InputPortal &input, - const ValuesPortal &values, - const OutputPortal &output) + template + VTKM_CONT static void UpperBoundsPortal(const InputPortal& input, const ValuesPortal& values, + const OutputPortal& output) { try { - ::thrust::upper_bound(thrust::cuda::par, - IteratorBegin(input), - IteratorEnd(input), - IteratorBegin(values), - IteratorEnd(values), - IteratorBegin(output)); + ::thrust::upper_bound(thrust::cuda::par, IteratorBegin(input), IteratorEnd(input), + IteratorBegin(values), IteratorEnd(values), IteratorBegin(output)); } - catch(...) + catch (...) { throwAsVTKmException(); } } - template - VTKM_CONT static void UpperBoundsPortal(const InputPortal &input, - const ValuesPortal &values, - const OutputPortal &output, - BinaryCompare binary_compare) + template + VTKM_CONT static void UpperBoundsPortal(const InputPortal& input, const ValuesPortal& values, + const OutputPortal& output, BinaryCompare binary_compare) { typedef typename OutputPortal::ValueType ValueType; - vtkm::exec::cuda::internal::WrappedBinaryPredicate bop(binary_compare); + vtkm::exec::cuda::internal::WrappedBinaryPredicate bop( + binary_compare); try { - ::thrust::upper_bound(thrust::cuda::par, - IteratorBegin(input), - IteratorEnd(input), - IteratorBegin(values), - IteratorEnd(values), - IteratorBegin(output), - bop); + ::thrust::upper_bound(thrust::cuda::par, IteratorBegin(input), IteratorEnd(input), + IteratorBegin(values), IteratorEnd(values), IteratorBegin(output), bop); } - catch(...) + catch (...) { throwAsVTKmException(); } } - template - VTKM_CONT static - void UpperBoundsPortal(const InputPortal &input, - const OutputPortal &values_output) + template + VTKM_CONT static void UpperBoundsPortal(const InputPortal& input, + const OutputPortal& values_output) { try { - ::thrust::upper_bound(thrust::cuda::par, - IteratorBegin(input), - IteratorEnd(input), - IteratorBegin(values_output), - IteratorEnd(values_output), + ::thrust::upper_bound(thrust::cuda::par, IteratorBegin(input), IteratorEnd(input), + IteratorBegin(values_output), IteratorEnd(values_output), IteratorBegin(values_output)); } - catch(...) + catch (...) { throwAsVTKmException(); } } -//----------------------------------------------------------------------------- + //----------------------------------------------------------------------------- public: - template - VTKM_CONT static void Copy( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle &output) + template + VTKM_CONT static void Copy(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output) { const vtkm::Id inSize = input.GetNumberOfValues(); CopyPortal(input.PrepareForInput(DeviceAdapterTag()), output.PrepareForOutput(inSize, DeviceAdapterTag())); } - template - VTKM_CONT static void CopyIf( - const vtkm::cont::ArrayHandle& input, - const vtkm::cont::ArrayHandle& stencil, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static void CopyIf(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& stencil, + vtkm::cont::ArrayHandle& output) { vtkm::Id size = stencil.GetNumberOfValues(); vtkm::Id newSize = CopyIfPortal(input.PrepareForInput(DeviceAdapterTag()), @@ -977,54 +804,43 @@ public: output.Shrink(newSize); } - template - VTKM_CONT static void CopyIf( - const vtkm::cont::ArrayHandle& input, - const vtkm::cont::ArrayHandle& stencil, - vtkm::cont::ArrayHandle& output, - UnaryPredicate unary_predicate) + template + VTKM_CONT static void CopyIf(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& stencil, + vtkm::cont::ArrayHandle& output, + UnaryPredicate unary_predicate) { vtkm::Id size = stencil.GetNumberOfValues(); - vtkm::Id newSize = CopyIfPortal(input.PrepareForInput(DeviceAdapterTag()), - stencil.PrepareForInput(DeviceAdapterTag()), - output.PrepareForOutput(size, DeviceAdapterTag()), - unary_predicate); + vtkm::Id newSize = CopyIfPortal( + input.PrepareForInput(DeviceAdapterTag()), stencil.PrepareForInput(DeviceAdapterTag()), + output.PrepareForOutput(size, DeviceAdapterTag()), unary_predicate); output.Shrink(newSize); } - template - VTKM_CONT static bool CopySubRange( - const vtkm::cont::ArrayHandle &input, - vtkm::Id inputStartIndex, - vtkm::Id numberOfElementsToCopy, - vtkm::cont::ArrayHandle &output, - vtkm::Id outputIndex = 0) + template + VTKM_CONT static bool CopySubRange(const vtkm::cont::ArrayHandle& input, + vtkm::Id inputStartIndex, vtkm::Id numberOfElementsToCopy, + vtkm::cont::ArrayHandle& output, + vtkm::Id outputIndex = 0) { const vtkm::Id inSize = input.GetNumberOfValues(); - if(inputStartIndex < 0 || - numberOfElementsToCopy < 0 || - outputIndex < 0 || - inputStartIndex >= inSize) - { //invalid parameters + if (inputStartIndex < 0 || numberOfElementsToCopy < 0 || outputIndex < 0 || + inputStartIndex >= inSize) + { //invalid parameters return false; } //determine if the numberOfElementsToCopy needs to be reduced - if(inSize < (inputStartIndex + numberOfElementsToCopy)) - { //adjust the size + if (inSize < (inputStartIndex + numberOfElementsToCopy)) + { //adjust the size numberOfElementsToCopy = (inSize - inputStartIndex); - } + } const vtkm::Id outSize = output.GetNumberOfValues(); const vtkm::Id copyOutEnd = outputIndex + numberOfElementsToCopy; - if(outSize < copyOutEnd) + if (outSize < copyOutEnd) { //output is not large enough - if(outSize == 0) + if (outSize == 0) { //since output has nothing, just need to allocate to correct length output.Allocate(copyOutEnd); } @@ -1037,19 +853,16 @@ public: output = temp; } } - CopySubRangePortal(input.PrepareForInput(DeviceAdapterTag()), - inputStartIndex, - numberOfElementsToCopy, - output.PrepareForInPlace(DeviceAdapterTag()), + CopySubRangePortal(input.PrepareForInput(DeviceAdapterTag()), inputStartIndex, + numberOfElementsToCopy, output.PrepareForInPlace(DeviceAdapterTag()), outputIndex); return true; } - template - VTKM_CONT static void LowerBounds( - const vtkm::cont::ArrayHandle& input, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static void LowerBounds(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output) { vtkm::Id numberOfValues = values.GetNumberOfValues(); LowerBoundsPortal(input.PrepareForInput(DeviceAdapterTag()), @@ -1057,97 +870,83 @@ public: output.PrepareForOutput(numberOfValues, DeviceAdapterTag())); } - template - VTKM_CONT static void LowerBounds( - const vtkm::cont::ArrayHandle& input, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output, - BinaryCompare binary_compare) + template + VTKM_CONT static void LowerBounds(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output, + BinaryCompare binary_compare) { vtkm::Id numberOfValues = values.GetNumberOfValues(); LowerBoundsPortal(input.PrepareForInput(DeviceAdapterTag()), values.PrepareForInput(DeviceAdapterTag()), - output.PrepareForOutput(numberOfValues, DeviceAdapterTag()), - binary_compare); + output.PrepareForOutput(numberOfValues, DeviceAdapterTag()), binary_compare); } - template - VTKM_CONT static void LowerBounds( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle &values_output) + template + VTKM_CONT static void LowerBounds(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& values_output) { LowerBoundsPortal(input.PrepareForInput(DeviceAdapterTag()), values_output.PrepareForInPlace(DeviceAdapterTag())); } - template - VTKM_CONT static U Reduce( - const vtkm::cont::ArrayHandle &input, - U initialValue) + template + VTKM_CONT static U Reduce(const vtkm::cont::ArrayHandle& input, U initialValue) { const vtkm::Id numberOfValues = input.GetNumberOfValues(); if (numberOfValues <= 0) - { + { return initialValue; - } - return ReducePortal(input.PrepareForInput( DeviceAdapterTag() ), - initialValue); + } + return ReducePortal(input.PrepareForInput(DeviceAdapterTag()), initialValue); } - template - VTKM_CONT static U Reduce( - const vtkm::cont::ArrayHandle &input, - U initialValue, - BinaryFunctor binary_functor) + template + VTKM_CONT static U Reduce(const vtkm::cont::ArrayHandle& input, U initialValue, + BinaryFunctor binary_functor) { const vtkm::Id numberOfValues = input.GetNumberOfValues(); if (numberOfValues <= 0) - { + { return initialValue; - } - return ReducePortal(input.PrepareForInput( DeviceAdapterTag() ), - initialValue, - binary_functor); + } + return ReducePortal(input.PrepareForInput(DeviceAdapterTag()), initialValue, binary_functor); } - template - VTKM_CONT static void ReduceByKey( - const vtkm::cont::ArrayHandle &keys, - const vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle &keys_output, - vtkm::cont::ArrayHandle &values_output, - BinaryFunctor binary_functor) + template + VTKM_CONT static void ReduceByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& keys_output, + vtkm::cont::ArrayHandle& values_output, + BinaryFunctor binary_functor) { //there is a concern that by default we will allocate too much //space for the keys/values output. 1 option is to const vtkm::Id numberOfValues = keys.GetNumberOfValues(); if (numberOfValues <= 0) - { + { return; - } - vtkm::Id reduced_size = - ReduceByKeyPortal(keys.PrepareForInput( DeviceAdapterTag() ), - values.PrepareForInput( DeviceAdapterTag() ), - keys_output.PrepareForOutput( numberOfValues, DeviceAdapterTag() ), - values_output.PrepareForOutput( numberOfValues, DeviceAdapterTag() ), - binary_functor); + } + vtkm::Id reduced_size = ReduceByKeyPortal( + keys.PrepareForInput(DeviceAdapterTag()), values.PrepareForInput(DeviceAdapterTag()), + keys_output.PrepareForOutput(numberOfValues, DeviceAdapterTag()), + values_output.PrepareForOutput(numberOfValues, DeviceAdapterTag()), binary_functor); - keys_output.Shrink( reduced_size ); - values_output.Shrink( reduced_size ); + keys_output.Shrink(reduced_size); + values_output.Shrink(reduced_size); } - template - VTKM_CONT static T ScanExclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static T ScanExclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output) { const vtkm::Id numberOfValues = input.GetNumberOfValues(); if (numberOfValues <= 0) - { + { output.PrepareForOutput(0, DeviceAdapterTag()); return vtkm::TypeTraits::ZeroInitialization(); - } + } //We need call PrepareForInput on the input argument before invoking a //function. The order of execution of parameters of a function is undefined @@ -1158,43 +957,38 @@ public: output.PrepareForOutput(numberOfValues, DeviceAdapterTag())); } - template - VTKM_CONT static T ScanExclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output, - BinaryFunctor binary_functor, - const T& initialValue) + template + VTKM_CONT static T ScanExclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output, + BinaryFunctor binary_functor, const T& initialValue) { const vtkm::Id numberOfValues = input.GetNumberOfValues(); if (numberOfValues <= 0) - { + { output.PrepareForOutput(0, DeviceAdapterTag()); return vtkm::TypeTraits::ZeroInitialization(); - } + } //We need call PrepareForInput on the input argument before invoking a //function. The order of execution of parameters of a function is undefined //so we need to make sure input is called before output, or else in-place //use case breaks. input.PrepareForInput(DeviceAdapterTag()); - return ScanExclusivePortal( - input.PrepareForInput(DeviceAdapterTag()), - output.PrepareForOutput(numberOfValues, DeviceAdapterTag()), - binary_functor, - initialValue); + return ScanExclusivePortal(input.PrepareForInput(DeviceAdapterTag()), + output.PrepareForOutput(numberOfValues, DeviceAdapterTag()), + binary_functor, initialValue); } - template - VTKM_CONT static T ScanInclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static T ScanInclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output) { const vtkm::Id numberOfValues = input.GetNumberOfValues(); if (numberOfValues <= 0) - { + { output.PrepareForOutput(0, DeviceAdapterTag()); return vtkm::TypeTraits::ZeroInitialization(); - } + } //We need call PrepareForInput on the input argument before invoking a //function. The order of execution of parameters of a function is undefined @@ -1205,18 +999,17 @@ public: output.PrepareForOutput(numberOfValues, DeviceAdapterTag())); } - template - VTKM_CONT static T ScanInclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output, - BinaryFunctor binary_functor) + template + VTKM_CONT static T ScanInclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output, + BinaryFunctor binary_functor) { const vtkm::Id numberOfValues = input.GetNumberOfValues(); if (numberOfValues <= 0) - { + { output.PrepareForOutput(0, DeviceAdapterTag()); return vtkm::TypeTraits::ZeroInitialization(); - } + } //We need call PrepareForInput on the input argument before invoking a //function. The order of execution of parameters of a function is undefined @@ -1228,11 +1021,10 @@ public: binary_functor); } - template - VTKM_CONT static T ScanInclusiveByKey( - const vtkm::cont::ArrayHandle& keys, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static T ScanInclusiveByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output) { const vtkm::Id numberOfValues = keys.GetNumberOfValues(); if (numberOfValues <= 0) @@ -1252,13 +1044,12 @@ public: output.PrepareForOutput(numberOfValues, DeviceAdapterTag())); } - template - VTKM_CONT static T ScanInclusiveByKey( - const vtkm::cont::ArrayHandle& keys, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output, - BinaryFunctor binary_functor) + template + VTKM_CONT static T ScanInclusiveByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output, + BinaryFunctor binary_functor) { const vtkm::Id numberOfValues = keys.GetNumberOfValues(); if (numberOfValues <= 0) @@ -1276,15 +1067,13 @@ public: return ScanInclusiveByKeyPortal(keys.PrepareForInput(DeviceAdapterTag()), values.PrepareForInput(DeviceAdapterTag()), output.PrepareForOutput(numberOfValues, DeviceAdapterTag()), - ::thrust::equal_to(), - binary_functor); + ::thrust::equal_to(), binary_functor); } - template - VTKM_CONT static void ScanExclusiveByKey( - const vtkm::cont::ArrayHandle& keys, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static void ScanExclusiveByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output) { const vtkm::Id numberOfValues = keys.GetNumberOfValues(); if (numberOfValues <= 0) @@ -1302,18 +1091,15 @@ public: ScanExnclusiveByKeyPortal(keys.PrepareForInput(DeviceAdapterTag()), values.PrepareForInput(DeviceAdapterTag()), output.PrepareForOutput(numberOfValues, DeviceAdapterTag()), - vtkm::TypeTraits::ZeroInitialization(), - vtkm::Add()); + vtkm::TypeTraits::ZeroInitialization(), vtkm::Add()); } - template - VTKM_CONT static void ScanExclusiveByKey( - const vtkm::cont::ArrayHandle& keys, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output, - const U& initialValue, - BinaryFunctor binary_functor) + template + VTKM_CONT static void ScanExclusiveByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output, + const U& initialValue, BinaryFunctor binary_functor) { const vtkm::Id numberOfValues = keys.GetNumberOfValues(); if (numberOfValues <= 0) @@ -1331,9 +1117,7 @@ public: ScanExclusiveByKeyPortal(keys.PrepareForInput(DeviceAdapterTag()), values.PrepareForInput(DeviceAdapterTag()), output.PrepareForOutput(numberOfValues, DeviceAdapterTag()), - initialValue, - ::thrust::equal_to(), - binary_functor); + initialValue, ::thrust::equal_to(), binary_functor); } // Because of some funny code conversions in nvcc, kernels for devices have to // be public. @@ -1343,38 +1127,36 @@ private: // we use cuda pinned memory to reduce the amount of synchronization // and mem copies between the host and device. VTKM_CONT - static char* GetPinnedErrorArray(vtkm::Id &arraySize, char** hostPointer) - { + static char* GetPinnedErrorArray(vtkm::Id& arraySize, char** hostPointer) + { const vtkm::Id ERROR_ARRAY_SIZE = 1024; static bool errorArrayInit = false; static char* hostPtr = nullptr; static char* devicePtr = nullptr; - if( !errorArrayInit ) - { - VTKM_CUDA_CALL(cudaMallocHost( (void**)&hostPtr, - ERROR_ARRAY_SIZE, - cudaHostAllocMapped )); + if (!errorArrayInit) + { + VTKM_CUDA_CALL(cudaMallocHost((void**)&hostPtr, ERROR_ARRAY_SIZE, cudaHostAllocMapped)); VTKM_CUDA_CALL(cudaHostGetDevicePointer(&devicePtr, hostPtr, 0)); errorArrayInit = true; - } + } //set the size of the array arraySize = ERROR_ARRAY_SIZE; //specify the host pointer to the memory *hostPointer = hostPtr; - (void) hostPointer; + (void)hostPointer; return devicePtr; - } + } // we query cuda for the max blocks per grid for 1D scheduling // and cache the values in static variables VTKM_CONT - static vtkm::Vec GetMaxGridOfThreadBlocks() - { + static vtkm::Vec GetMaxGridOfThreadBlocks() + { static bool gridQueryInit = false; - static vtkm::Vec< vtkm::UInt32, 3> maxGridSize; - if( !gridQueryInit ) - { + static vtkm::Vec maxGridSize; + if (!gridQueryInit) + { gridQueryInit = true; int currDevice; VTKM_CUDA_CALL(cudaGetDevice(&currDevice)); //get deviceid from cuda @@ -1393,23 +1175,19 @@ private: //invoke one to see what the actual limit is for our device. So that is //what we are going to do next, and than we will store that result - vtkm::UInt32 *dev_actual_size; - VTKM_CUDA_CALL( - cudaMalloc( (void**)&dev_actual_size, sizeof(vtkm::UInt32) ) - ); - DetermineProperXGridSize <<<1,1>>> (maxGridSize[0], dev_actual_size); + vtkm::UInt32* dev_actual_size; + VTKM_CUDA_CALL(cudaMalloc((void**)&dev_actual_size, sizeof(vtkm::UInt32))); + DetermineProperXGridSize<<<1, 1>>>(maxGridSize[0], dev_actual_size); VTKM_CUDA_CALL(cudaDeviceSynchronize()); - VTKM_CUDA_CALL(cudaMemcpy( &maxGridSize[0], - dev_actual_size, - sizeof(vtkm::UInt32), - cudaMemcpyDeviceToHost )); + VTKM_CUDA_CALL( + cudaMemcpy(&maxGridSize[0], dev_actual_size, sizeof(vtkm::UInt32), cudaMemcpyDeviceToHost)); VTKM_CUDA_CALL(cudaFree(dev_actual_size)); - } - return maxGridSize; } + return maxGridSize; + } public: - template + template VTKM_CONT static void Schedule(Functor functor, vtkm::Id numInstances) { VTKM_ASSERT(numInstances >= 0); @@ -1428,38 +1206,35 @@ public: //clear the first character which means that we don't contain an error hostErrorPtr[0] = '\0'; - vtkm::exec::internal::ErrorMessageBuffer errorMessage( deviceErrorPtr, - errorArraySize); + vtkm::exec::internal::ErrorMessageBuffer errorMessage(deviceErrorPtr, errorArraySize); functor.SetErrorMessageBuffer(errorMessage); const vtkm::Id blockSizeAsId = 128; const vtkm::UInt32 blockSize = 128; const vtkm::UInt32 maxblocksPerLaunch = GetMaxGridOfThreadBlocks()[0]; - const vtkm::UInt32 totalBlocks = static_cast( - (numInstances + blockSizeAsId - 1) / blockSizeAsId); + const vtkm::UInt32 totalBlocks = + static_cast((numInstances + blockSizeAsId - 1) / blockSizeAsId); //Note a cuda launch can only handle at most 2B iterations of a kernel //because it holds all of the indexes inside UInt32, so for use to //handle datasets larger than 2B, we need to execute multiple kernels - if(totalBlocks < maxblocksPerLaunch) - { - Schedule1DIndexKernel <<>> (functor, - vtkm::Id(0), - numInstances); - } + if (totalBlocks < maxblocksPerLaunch) + { + Schedule1DIndexKernel<<>>(functor, vtkm::Id(0), + numInstances); + } else + { + const vtkm::Id numberOfKernelsToRun = + blockSizeAsId * static_cast(maxblocksPerLaunch); + for (vtkm::Id numberOfKernelsInvoked = 0; numberOfKernelsInvoked < numInstances; + numberOfKernelsInvoked += numberOfKernelsToRun) { - const vtkm::Id numberOfKernelsToRun = blockSizeAsId * static_cast(maxblocksPerLaunch); - for(vtkm::Id numberOfKernelsInvoked = 0; - numberOfKernelsInvoked < numInstances; - numberOfKernelsInvoked += numberOfKernelsToRun) - { - Schedule1DIndexKernel <<>> (functor, - numberOfKernelsInvoked, - numInstances); - } + Schedule1DIndexKernel<<>>( + functor, numberOfKernelsInvoked, numInstances); } + } //sync so that we can check the results of the call. //In the future I want move this before the schedule call, and throwing @@ -1469,17 +1244,16 @@ public: //check what the value is if (hostErrorPtr[0] != '\0') - { + { throw vtkm::cont::ErrorExecution(hostErrorPtr); - } + } } - template - VTKM_CONT - static void Schedule(Functor functor, const vtkm::Id3& rangeMax) + template + VTKM_CONT static void Schedule(Functor functor, const vtkm::Id3& rangeMax) { - VTKM_ASSERT((rangeMax[0]>=0) && (rangeMax[1]>=0) && (rangeMax[2]>=0)); - if ((rangeMax[0]<1) || (rangeMax[1]<1) || (rangeMax[2]<1)) + VTKM_ASSERT((rangeMax[0] >= 0) && (rangeMax[1] >= 0) && (rangeMax[2] >= 0)); + if ((rangeMax[0] < 1) || (rangeMax[1] < 1) || (rangeMax[2] < 1)) { // No instances means nothing to run. Just return. return; @@ -1494,38 +1268,35 @@ public: //clear the first character which means that we don't contain an error hostErrorPtr[0] = '\0'; - vtkm::exec::internal::ErrorMessageBuffer errorMessage( deviceErrorPtr, - errorArraySize); + vtkm::exec::internal::ErrorMessageBuffer errorMessage(deviceErrorPtr, errorArraySize); functor.SetErrorMessageBuffer(errorMessage); #ifdef ANALYZE_VTKM_SCHEDULER //requires the errormessage buffer be set - compare_3d_schedule_patterns(functor,rangeMax); + compare_3d_schedule_patterns(functor, rangeMax); #endif const dim3 ranges(static_cast(rangeMax[0]), static_cast(rangeMax[1]), - static_cast(rangeMax[2]) ); - + static_cast(rangeMax[2])); //currently we presume that 3d scheduling access patterns prefer accessing //memory in the X direction. Also should be good for thin in the Z axis //algorithms. - dim3 blockSize3d(64,2,1); + dim3 blockSize3d(64, 2, 1); //handle the simple use case of 'bad' datasets which are thin in X //but larger in the other directions, allowing us decent performance with //that use case. - if(rangeMax[0] <= 128 && - (rangeMax[0] < rangeMax[1] || rangeMax[0] < rangeMax[2]) ) - { - blockSize3d = dim3(16,4,4); - } + if (rangeMax[0] <= 128 && (rangeMax[0] < rangeMax[1] || rangeMax[0] < rangeMax[2])) + { + blockSize3d = dim3(16, 4, 4); + } dim3 gridSize3d; compute_block_size(ranges, blockSize3d, gridSize3d); - Schedule3DIndexKernel <<>> (functor, ranges); + Schedule3DIndexKernel<<>>(functor, ranges); //sync so that we can check the results of the call. //In the future I want move this before the schedule call, and throwing @@ -1535,73 +1306,62 @@ public: //check what the value is if (hostErrorPtr[0] != '\0') - { + { throw vtkm::cont::ErrorExecution(hostErrorPtr); - } + } } - template - VTKM_CONT static void Sort( - vtkm::cont::ArrayHandle& values) + template + VTKM_CONT static void Sort(vtkm::cont::ArrayHandle& values) { SortPortal(values.PrepareForInPlace(DeviceAdapterTag())); } - template - VTKM_CONT static void Sort( - vtkm::cont::ArrayHandle& values, - BinaryCompare binary_compare) + template + VTKM_CONT static void Sort(vtkm::cont::ArrayHandle& values, + BinaryCompare binary_compare) { - SortPortal(values.PrepareForInPlace(DeviceAdapterTag()),binary_compare); + SortPortal(values.PrepareForInPlace(DeviceAdapterTag()), binary_compare); } - template - VTKM_CONT static void SortByKey( - vtkm::cont::ArrayHandle& keys, - vtkm::cont::ArrayHandle& values) + template + VTKM_CONT static void SortByKey(vtkm::cont::ArrayHandle& keys, + vtkm::cont::ArrayHandle& values) { SortByKeyPortal(keys.PrepareForInPlace(DeviceAdapterTag()), values.PrepareForInPlace(DeviceAdapterTag())); } - template - VTKM_CONT static void SortByKey( - vtkm::cont::ArrayHandle& keys, - vtkm::cont::ArrayHandle& values, - BinaryCompare binary_compare) + template + VTKM_CONT static void SortByKey(vtkm::cont::ArrayHandle& keys, + vtkm::cont::ArrayHandle& values, + BinaryCompare binary_compare) { SortByKeyPortal(keys.PrepareForInPlace(DeviceAdapterTag()), - values.PrepareForInPlace(DeviceAdapterTag()), - binary_compare); + values.PrepareForInPlace(DeviceAdapterTag()), binary_compare); } - template - VTKM_CONT static void Unique( - vtkm::cont::ArrayHandle &values) + template + VTKM_CONT static void Unique(vtkm::cont::ArrayHandle& values) { vtkm::Id newSize = UniquePortal(values.PrepareForInPlace(DeviceAdapterTag())); values.Shrink(newSize); } - template - VTKM_CONT static void Unique( - vtkm::cont::ArrayHandle &values, - BinaryCompare binary_compare) + template + VTKM_CONT static void Unique(vtkm::cont::ArrayHandle& values, + BinaryCompare binary_compare) { - vtkm::Id newSize = UniquePortal(values.PrepareForInPlace(DeviceAdapterTag()),binary_compare); + vtkm::Id newSize = UniquePortal(values.PrepareForInPlace(DeviceAdapterTag()), binary_compare); values.Shrink(newSize); } - template - VTKM_CONT static void UpperBounds( - const vtkm::cont::ArrayHandle& input, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static void UpperBounds(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output) { vtkm::Id numberOfValues = values.GetNumberOfValues(); UpperBoundsPortal(input.PrepareForInput(DeviceAdapterTag()), @@ -1609,30 +1369,26 @@ public: output.PrepareForOutput(numberOfValues, DeviceAdapterTag())); } - template - VTKM_CONT static void UpperBounds( - const vtkm::cont::ArrayHandle& input, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output, - BinaryCompare binary_compare) + template + VTKM_CONT static void UpperBounds(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output, + BinaryCompare binary_compare) { vtkm::Id numberOfValues = values.GetNumberOfValues(); UpperBoundsPortal(input.PrepareForInput(DeviceAdapterTag()), values.PrepareForInput(DeviceAdapterTag()), - output.PrepareForOutput(numberOfValues, DeviceAdapterTag()), - binary_compare); + output.PrepareForOutput(numberOfValues, DeviceAdapterTag()), binary_compare); } - template - VTKM_CONT static void UpperBounds( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle &values_output) + template + VTKM_CONT static void UpperBounds(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& values_output) { UpperBoundsPortal(input.PrepareForInput(DeviceAdapterTag()), values_output.PrepareForInPlace(DeviceAdapterTag())); } }; - } } } diff --git a/vtkm/cont/cuda/internal/MakeThrustIterator.h b/vtkm/cont/cuda/internal/MakeThrustIterator.h index 58b50998d..0ffe46e85 100644 --- a/vtkm/cont/cuda/internal/MakeThrustIterator.h +++ b/vtkm/cont/cuda/internal/MakeThrustIterator.h @@ -36,88 +36,92 @@ VTKM_THIRDPARTY_PRE_INCLUDE #include VTKM_THIRDPARTY_POST_INCLUDE -namespace vtkm { -namespace cont { -namespace cuda { -namespace internal { -namespace detail { +namespace vtkm +{ +namespace cont +{ +namespace cuda +{ +namespace internal +{ +namespace detail +{ // Tags to specify what type of thrust iterator to use. -struct ThrustIteratorFromArrayPortalTag { }; -struct ThrustIteratorDevicePtrTag { }; +struct ThrustIteratorFromArrayPortalTag +{ +}; +struct ThrustIteratorDevicePtrTag +{ +}; // Traits to help classify what thrust iterators will be used. -template -struct ThrustIteratorTag { +template +struct ThrustIteratorTag +{ typedef ThrustIteratorFromArrayPortalTag Type; }; -template -struct ThrustIteratorTag< thrust::system::cuda::pointer > { +template +struct ThrustIteratorTag> +{ typedef ThrustIteratorDevicePtrTag Type; }; -template -struct ThrustIteratorTag< thrust::system::cuda::pointer > { +template +struct ThrustIteratorTag> +{ typedef ThrustIteratorDevicePtrTag Type; }; -template struct IteratorChooser; -template -struct IteratorChooser { +template +struct IteratorChooser; +template +struct IteratorChooser +{ typedef vtkm::exec::cuda::internal::IteratorFromArrayPortal Type; }; -template -struct IteratorChooser { +template +struct IteratorChooser +{ typedef vtkm::cont::ArrayPortalToIterators PortalToIteratorType; typedef typename PortalToIteratorType::IteratorType Type; - }; -template +template struct IteratorTraits { typedef vtkm::cont::ArrayPortalToIterators PortalToIteratorType; - typedef typename detail::ThrustIteratorTag< - typename PortalToIteratorType::IteratorType>::Type Tag; - typedef typename IteratorChooser< - PortalType, - Tag - >::Type IteratorType; + typedef typename detail::ThrustIteratorTag::Type Tag; + typedef typename IteratorChooser::Type IteratorType; }; -template -VTKM_CONT -typename IteratorTraits::IteratorType -MakeIteratorBegin(PortalType portal, detail::ThrustIteratorFromArrayPortalTag) +template +VTKM_CONT typename IteratorTraits::IteratorType MakeIteratorBegin( + PortalType portal, detail::ThrustIteratorFromArrayPortalTag) { return vtkm::exec::cuda::internal::IteratorFromArrayPortal(portal); } -template -VTKM_CONT -typename IteratorTraits::IteratorType -MakeIteratorBegin(PortalType portal, detail::ThrustIteratorDevicePtrTag) +template +VTKM_CONT typename IteratorTraits::IteratorType MakeIteratorBegin( + PortalType portal, detail::ThrustIteratorDevicePtrTag) { vtkm::cont::ArrayPortalToIterators iterators(portal); return iterators.GetBegin(); } -template -VTKM_CONT -typename IteratorTraits::IteratorType -MakeIteratorEnd(PortalType portal, detail::ThrustIteratorFromArrayPortalTag) +template +VTKM_CONT typename IteratorTraits::IteratorType MakeIteratorEnd( + PortalType portal, detail::ThrustIteratorFromArrayPortalTag) { - vtkm::exec::cuda::internal::IteratorFromArrayPortal - iterator(portal); - ::thrust::advance(iterator, - static_cast(portal.GetNumberOfValues())); + vtkm::exec::cuda::internal::IteratorFromArrayPortal iterator(portal); + ::thrust::advance(iterator, static_cast(portal.GetNumberOfValues())); return iterator; } -template -VTKM_CONT -typename IteratorTraits::IteratorType -MakeIteratorEnd(PortalType portal, detail::ThrustIteratorDevicePtrTag) +template +VTKM_CONT typename IteratorTraits::IteratorType MakeIteratorEnd( + PortalType portal, detail::ThrustIteratorDevicePtrTag) { vtkm::cont::ArrayPortalToIterators iterators(portal); return iterators.GetEnd(); @@ -125,31 +129,23 @@ MakeIteratorEnd(PortalType portal, detail::ThrustIteratorDevicePtrTag) } // namespace detail - - -template -VTKM_CONT -typename detail::IteratorTraits::IteratorType -IteratorBegin(PortalType portal) +template +VTKM_CONT typename detail::IteratorTraits::IteratorType IteratorBegin(PortalType portal) { typedef typename detail::IteratorTraits::Tag IteratorTag; return detail::MakeIteratorBegin(portal, IteratorTag()); } -template -VTKM_CONT -typename detail::IteratorTraits::IteratorType -IteratorEnd(PortalType portal) +template +VTKM_CONT typename detail::IteratorTraits::IteratorType IteratorEnd(PortalType portal) { typedef typename detail::IteratorTraits::Tag IteratorTag; return detail::MakeIteratorEnd(portal, IteratorTag()); } - } } } - } //namespace vtkm::cont::cuda::internal #endif diff --git a/vtkm/cont/cuda/internal/ThrustExceptionHandler.h b/vtkm/cont/cuda/internal/ThrustExceptionHandler.h index b1ff67a24..ec0f210a7 100644 --- a/vtkm/cont/cuda/internal/ThrustExceptionHandler.h +++ b/vtkm/cont/cuda/internal/ThrustExceptionHandler.h @@ -28,9 +28,12 @@ VTKM_THIRDPARTY_PRE_INCLUDE #include VTKM_THIRDPARTY_POST_INCLUDE -namespace vtkm { -namespace cont { -namespace cuda { +namespace vtkm +{ +namespace cont +{ +namespace cuda +{ namespace internal { @@ -41,16 +44,15 @@ static inline void throwAsVTKmException() //re-throw the last exception throw; } - catch(std::bad_alloc &error) + catch (std::bad_alloc& error) { throw vtkm::cont::ErrorBadAllocation(error.what()); } - catch(thrust::system_error &error) + catch (thrust::system_error& error) { throw vtkm::cont::ErrorExecution(error.what()); } } - } } } diff --git a/vtkm/cont/cuda/internal/VirtualObjectTransferCuda.h b/vtkm/cont/cuda/internal/VirtualObjectTransferCuda.h index f9e3012eb..660df28c5 100644 --- a/vtkm/cont/cuda/internal/VirtualObjectTransferCuda.h +++ b/vtkm/cont/cuda/internal/VirtualObjectTransferCuda.h @@ -24,33 +24,34 @@ #include #include +namespace vtkm +{ +namespace cont +{ +namespace internal +{ -namespace vtkm { -namespace cont { -namespace internal { +namespace detail +{ -namespace detail { - -template -__global__ -void CreateKernel(VirtualObject *object, const TargetClass *target) +template +__global__ void CreateKernel(VirtualObject* object, const TargetClass* target) { object->Bind(target); } } // detail -template -struct VirtualObjectTransfer +template +struct VirtualObjectTransfer { - static void* Create(VirtualObject &object, const void *target) + static void* Create(VirtualObject& object, const void* target) { - TargetClass *cutarget; + TargetClass* cutarget; VTKM_CUDA_CALL(cudaMalloc(&cutarget, sizeof(TargetClass))); VTKM_CUDA_CALL(cudaMemcpy(cutarget, target, sizeof(TargetClass), cudaMemcpyHostToDevice)); - VirtualObject *cuobject; + VirtualObject* cuobject; VTKM_CUDA_CALL(cudaMalloc(&cuobject, sizeof(VirtualObject))); detail::CreateKernel<<<1, 1>>>(cuobject, cutarget); VTKM_CUDA_CHECK_ASYNCHRONOUS_ERROR(); @@ -60,17 +61,13 @@ struct VirtualObjectTransfer -namespace vtkm { -namespace cont { -namespace cuda { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace cuda +{ +namespace internal +{ struct Testing { @@ -36,26 +40,25 @@ public: { cudaError_t cudaError = cudaPeekAtLastError(); if (cudaError != cudaSuccess) - { + { std::cout << "***** Unchecked Cuda error." << std::endl << cudaGetErrorString(cudaError) << std::endl; return 1; - } + } else - { + { std::cout << "No Cuda error detected." << std::endl; - } + } return result; } - template + template static VTKM_CONT int Run(Func function) { int result = vtkm::cont::testing::Testing::Run(function); return CheckCudaBeforeExit(result); } }; - } } } diff --git a/vtkm/cont/cuda/testing/UnitTestCudaArrayHandle.cu b/vtkm/cont/cuda/testing/UnitTestCudaArrayHandle.cu index 5b9fba2e3..c0e639381 100644 --- a/vtkm/cont/cuda/testing/UnitTestCudaArrayHandle.cu +++ b/vtkm/cont/cuda/testing/UnitTestCudaArrayHandle.cu @@ -31,29 +31,24 @@ #include - //simple test to verify the array handle cuda compiles void TestCudaHandle() { //Verify that we can construct a cuda array handle using the class inside //the vtkm::cont::cuda namespace - vtkm::cont::cuda::ArrayHandle handleFoo(nullptr,0); - vtkm::cont::Field foo("foo", vtkm::cont::Field::ASSOC_CELL_SET , "cellset", handleFoo); + vtkm::cont::cuda::ArrayHandle handleFoo(nullptr, 0); + vtkm::cont::Field foo("foo", vtkm::cont::Field::ASSOC_CELL_SET, "cellset", handleFoo); //Verify that we can construct a cuda array handle using the class inside //the vtkm::cont namespace - vtkm::cont::ArrayHandleCuda< vtkm::Vec< vtkm::Float32, 3> > handleBar(nullptr,0); + vtkm::cont::ArrayHandleCuda> handleBar(nullptr, 0); vtkm::cont::Field bar("bar", vtkm::cont::Field::ASSOC_CELL_SET, "cellset", handleBar); } - -int UnitTestCudaArrayHandle(int, char *[]) +int UnitTestCudaArrayHandle(int, char* []) { TestCudaHandle(); - int result = vtkm::cont::testing::TestingArrayHandles - ::Run(); + int result = vtkm::cont::testing::TestingArrayHandles::Run(); return vtkm::cont::cuda::internal::Testing::CheckCudaBeforeExit(result); - - } diff --git a/vtkm/cont/cuda/testing/UnitTestCudaArrayHandleFancy.cu b/vtkm/cont/cuda/testing/UnitTestCudaArrayHandleFancy.cu index b7d8fe5b9..a1c54a1bf 100644 --- a/vtkm/cont/cuda/testing/UnitTestCudaArrayHandleFancy.cu +++ b/vtkm/cont/cuda/testing/UnitTestCudaArrayHandleFancy.cu @@ -28,10 +28,9 @@ #include #include -int UnitTestCudaArrayHandleFancy(int, char *[]) +int UnitTestCudaArrayHandleFancy(int, char* []) { - int result = vtkm::cont::testing::TestingFancyArrayHandles - ::Run(); + int result = + vtkm::cont::testing::TestingFancyArrayHandles::Run(); return vtkm::cont::cuda::internal::Testing::CheckCudaBeforeExit(result); } - diff --git a/vtkm/cont/cuda/testing/UnitTestCudaComputeRange.cu b/vtkm/cont/cuda/testing/UnitTestCudaComputeRange.cu index 33bb31444..18052b0c2 100644 --- a/vtkm/cont/cuda/testing/UnitTestCudaComputeRange.cu +++ b/vtkm/cont/cuda/testing/UnitTestCudaComputeRange.cu @@ -22,9 +22,8 @@ #include #include -int UnitTestCudaComputeRange(int, char *[]) +int UnitTestCudaComputeRange(int, char* []) { - int result = vtkm::cont::testing::TestingComputeRange - ::Run(); + int result = vtkm::cont::testing::TestingComputeRange::Run(); return vtkm::cont::cuda::internal::Testing::CheckCudaBeforeExit(result); } diff --git a/vtkm/cont/cuda/testing/UnitTestCudaDataSetExplicit.cu b/vtkm/cont/cuda/testing/UnitTestCudaDataSetExplicit.cu index dea23339f..fb6a0d38e 100644 --- a/vtkm/cont/cuda/testing/UnitTestCudaDataSetExplicit.cu +++ b/vtkm/cont/cuda/testing/UnitTestCudaDataSetExplicit.cu @@ -26,9 +26,8 @@ #include #include -int UnitTestCudaDataSetExplicit(int, char *[]) +int UnitTestCudaDataSetExplicit(int, char* []) { - int result = vtkm::cont::testing::TestingDataSetExplicit - ::Run(); + int result = vtkm::cont::testing::TestingDataSetExplicit::Run(); return vtkm::cont::cuda::internal::Testing::CheckCudaBeforeExit(result); } diff --git a/vtkm/cont/cuda/testing/UnitTestCudaDataSetSingleType.cu b/vtkm/cont/cuda/testing/UnitTestCudaDataSetSingleType.cu index 4fd2b39ef..255aebaba 100644 --- a/vtkm/cont/cuda/testing/UnitTestCudaDataSetSingleType.cu +++ b/vtkm/cont/cuda/testing/UnitTestCudaDataSetSingleType.cu @@ -28,9 +28,9 @@ #include #include -int UnitTestCudaDataSetSingleType(int, char *[]) +int UnitTestCudaDataSetSingleType(int, char* []) { - int result = vtkm::cont::testing::TestingDataSetSingleType - ::Run(); + int result = + vtkm::cont::testing::TestingDataSetSingleType::Run(); return vtkm::cont::cuda::internal::Testing::CheckCudaBeforeExit(result); } diff --git a/vtkm/cont/cuda/testing/UnitTestCudaDeviceAdapter.cu b/vtkm/cont/cuda/testing/UnitTestCudaDeviceAdapter.cu index 670d5c3a2..425a99278 100644 --- a/vtkm/cont/cuda/testing/UnitTestCudaDeviceAdapter.cu +++ b/vtkm/cont/cuda/testing/UnitTestCudaDeviceAdapter.cu @@ -28,9 +28,8 @@ #include #include -int UnitTestCudaDeviceAdapter(int, char *[]) +int UnitTestCudaDeviceAdapter(int, char* []) { - int result = vtkm::cont::testing::TestingDeviceAdapter - ::Run(); + int result = vtkm::cont::testing::TestingDeviceAdapter::Run(); return vtkm::cont::cuda::internal::Testing::CheckCudaBeforeExit(result); } diff --git a/vtkm/cont/cuda/testing/UnitTestCudaImplicitFunction.cu b/vtkm/cont/cuda/testing/UnitTestCudaImplicitFunction.cu index 7f5112184..41c0e6282 100644 --- a/vtkm/cont/cuda/testing/UnitTestCudaImplicitFunction.cu +++ b/vtkm/cont/cuda/testing/UnitTestCudaImplicitFunction.cu @@ -20,7 +20,8 @@ #include -namespace { +namespace +{ void TestImplicitFunctions() { @@ -30,8 +31,7 @@ void TestImplicitFunctions() } // anonymous namespace - -int UnitTestCudaImplicitFunction(int, char *[]) +int UnitTestCudaImplicitFunction(int, char* []) { return vtkm::cont::testing::Testing::Run(TestImplicitFunctions); } diff --git a/vtkm/cont/cuda/testing/UnitTestCudaMath.cu b/vtkm/cont/cuda/testing/UnitTestCudaMath.cu index d3677c57a..927ab695f 100644 --- a/vtkm/cont/cuda/testing/UnitTestCudaMath.cu +++ b/vtkm/cont/cuda/testing/UnitTestCudaMath.cu @@ -29,8 +29,8 @@ #include -int UnitTestCudaMath(int, char *[]) +int UnitTestCudaMath(int, char* []) { return vtkm::cont::testing::Testing::Run( - UnitTestMathNamespace::RunMathTests); + UnitTestMathNamespace::RunMathTests); } diff --git a/vtkm/cont/cuda/testing/UnitTestCudaVirtualObjectCache.cu b/vtkm/cont/cuda/testing/UnitTestCudaVirtualObjectCache.cu index 0b32ee39c..277b5ecdc 100644 --- a/vtkm/cont/cuda/testing/UnitTestCudaVirtualObjectCache.cu +++ b/vtkm/cont/cuda/testing/UnitTestCudaVirtualObjectCache.cu @@ -19,21 +19,20 @@ //============================================================================ #include -namespace { +namespace +{ void TestVirtualObjectCache() { using DeviceAdapterList = - vtkm::ListTagBase; + vtkm::ListTagBase; vtkm::cont::testing::TestingVirtualObjectCache::Run(); } } // anonymous namespace - -int UnitTestCudaVirtualObjectCache(int, char *[]) +int UnitTestCudaVirtualObjectCache(int, char* []) { return vtkm::cont::testing::Testing::Run(TestVirtualObjectCache); } diff --git a/vtkm/cont/internal/ArrayExportMacros.h b/vtkm/cont/internal/ArrayExportMacros.h index 1f5c2f547..8d419c016 100644 --- a/vtkm/cont/internal/ArrayExportMacros.h +++ b/vtkm/cont/internal/ArrayExportMacros.h @@ -23,166 +23,170 @@ /// Declare extern template instantiations for all ArrayHandle transfer /// infrastructure from a header file. -#define VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(Type, Device) \ -namespace internal { \ -extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayManagerExecution; \ -extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayManagerExecution, vtkm::cont::StorageTagBasic, Device>; \ -extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayManagerExecution, vtkm::cont::StorageTagBasic, Device>; \ -extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayManagerExecution, vtkm::cont::StorageTagBasic, Device>; \ -extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayTransfer; \ -extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayTransfer, vtkm::cont::StorageTagBasic, Device>; \ -extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayTransfer, vtkm::cont::StorageTagBasic, Device>; \ -extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayTransfer, vtkm::cont::StorageTagBasic, Device>; \ -extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandleExecutionManager; \ -extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandleExecutionManager, vtkm::cont::StorageTagBasic, Device>; \ -extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandleExecutionManager, vtkm::cont::StorageTagBasic, Device>; \ -extern template class VTKM_CONT_TEMPLATE_EXPORT ArrayHandleExecutionManager, vtkm::cont::StorageTagBasic, Device>; \ -} \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -ArrayHandle::ExecutionTypes::PortalConst \ -ArrayHandle::PrepareForInput(Device) const; \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::PortalConst \ -ArrayHandle, StorageTagBasic>::PrepareForInput(Device) const; \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::PortalConst \ -ArrayHandle, StorageTagBasic>::PrepareForInput(Device) const; \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::PortalConst \ -ArrayHandle, StorageTagBasic>::PrepareForInput(Device) const; \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -ArrayHandle::ExecutionTypes::Portal \ -ArrayHandle::PrepareForOutput(vtkm::Id,Device); \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ -ArrayHandle, StorageTagBasic>::PrepareForOutput(vtkm::Id,Device); \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ -ArrayHandle, StorageTagBasic>::PrepareForOutput(vtkm::Id,Device); \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ -ArrayHandle, StorageTagBasic>::PrepareForOutput(vtkm::Id,Device); \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -ArrayHandle::ExecutionTypes::Portal \ -ArrayHandle::PrepareForInPlace(Device); \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ -ArrayHandle, StorageTagBasic>::PrepareForInPlace(Device); \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ -ArrayHandle, StorageTagBasic>::PrepareForInPlace(Device); \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ -ArrayHandle, StorageTagBasic>::PrepareForInPlace(Device); \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -void ArrayHandle::PrepareForDevice(Device) const; \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -void ArrayHandle, StorageTagBasic>::PrepareForDevice(Device) const; \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -void ArrayHandle, StorageTagBasic>::PrepareForDevice(Device) const; \ -extern template VTKM_CONT_TEMPLATE_EXPORT \ -void ArrayHandle, StorageTagBasic>::PrepareForDevice(Device) const; +#define VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(Type, Device) \ + namespace internal \ + { \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayManagerExecution; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayManagerExecution, vtkm::cont::StorageTagBasic, Device>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayManagerExecution, vtkm::cont::StorageTagBasic, Device>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayManagerExecution, vtkm::cont::StorageTagBasic, Device>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayTransfer; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayTransfer, vtkm::cont::StorageTagBasic, Device>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayTransfer, vtkm::cont::StorageTagBasic, Device>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayTransfer, vtkm::cont::StorageTagBasic, Device>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandleExecutionManager; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandleExecutionManager, vtkm::cont::StorageTagBasic, Device>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandleExecutionManager, vtkm::cont::StorageTagBasic, Device>; \ + extern template class VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandleExecutionManager, vtkm::cont::StorageTagBasic, Device>; \ + } \ + extern template VTKM_CONT_TEMPLATE_EXPORT ArrayHandle::ExecutionTypes< \ + Device>::PortalConst ArrayHandle::PrepareForInput(Device) const; \ + extern template VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandle, StorageTagBasic>::ExecutionTypes::PortalConst \ + ArrayHandle, StorageTagBasic>::PrepareForInput(Device) const; \ + extern template VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandle, StorageTagBasic>::ExecutionTypes::PortalConst \ + ArrayHandle, StorageTagBasic>::PrepareForInput(Device) const; \ + extern template VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandle, StorageTagBasic>::ExecutionTypes::PortalConst \ + ArrayHandle, StorageTagBasic>::PrepareForInput(Device) const; \ + extern template VTKM_CONT_TEMPLATE_EXPORT ArrayHandle::ExecutionTypes< \ + Device>::Portal ArrayHandle::PrepareForOutput(vtkm::Id, Device); \ + extern template VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ + ArrayHandle, StorageTagBasic>::PrepareForOutput(vtkm::Id, Device); \ + extern template VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ + ArrayHandle, StorageTagBasic>::PrepareForOutput(vtkm::Id, Device); \ + extern template VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ + ArrayHandle, StorageTagBasic>::PrepareForOutput(vtkm::Id, Device); \ + extern template VTKM_CONT_TEMPLATE_EXPORT ArrayHandle::ExecutionTypes< \ + Device>::Portal ArrayHandle::PrepareForInPlace(Device); \ + extern template VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ + ArrayHandle, StorageTagBasic>::PrepareForInPlace(Device); \ + extern template VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ + ArrayHandle, StorageTagBasic>::PrepareForInPlace(Device); \ + extern template VTKM_CONT_TEMPLATE_EXPORT \ + ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ + ArrayHandle, StorageTagBasic>::PrepareForInPlace(Device); \ + extern template VTKM_CONT_TEMPLATE_EXPORT void \ + ArrayHandle::PrepareForDevice(Device) const; \ + extern template VTKM_CONT_TEMPLATE_EXPORT void \ + ArrayHandle, StorageTagBasic>::PrepareForDevice(Device) const; \ + extern template VTKM_CONT_TEMPLATE_EXPORT void \ + ArrayHandle, StorageTagBasic>::PrepareForDevice(Device) const; \ + extern template VTKM_CONT_TEMPLATE_EXPORT void \ + ArrayHandle, StorageTagBasic>::PrepareForDevice(Device) const; /// call VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER for all vtkm types. -#define VTKM_EXPORT_ARRAYHANDLES_FOR_DEVICE_ADAPTER(Device) \ - VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(char, Device) \ - VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int8, Device) \ - VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt8, Device) \ - VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int16, Device) \ - VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt16, Device) \ - VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int32, Device) \ - VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt32, Device) \ - VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int64, Device) \ - VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt64, Device) \ - VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Float32, Device) \ +#define VTKM_EXPORT_ARRAYHANDLES_FOR_DEVICE_ADAPTER(Device) \ + VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(char, Device) \ + VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int8, Device) \ + VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt8, Device) \ + VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int16, Device) \ + VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt16, Device) \ + VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int32, Device) \ + VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt32, Device) \ + VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int64, Device) \ + VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt64, Device) \ + VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Float32, Device) \ VTKM_EXPORT_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Float64, Device) /// Instantiate templates for all ArrayHandle transfer infrastructure from an /// implementation file. -#define VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(Type, Device) \ -namespace internal { \ -template class VTKM_CONT_EXPORT \ - ArrayManagerExecution; \ -template class VTKM_CONT_EXPORT \ - ArrayManagerExecution, vtkm::cont::StorageTagBasic, Device>; \ -template class VTKM_CONT_EXPORT \ - ArrayManagerExecution, vtkm::cont::StorageTagBasic, Device>; \ -template class VTKM_CONT_EXPORT \ - ArrayManagerExecution, vtkm::cont::StorageTagBasic, Device>; \ -template class VTKM_CONT_EXPORT \ - ArrayTransfer; \ -template class VTKM_CONT_EXPORT \ - ArrayTransfer, vtkm::cont::StorageTagBasic, Device>; \ -template class VTKM_CONT_EXPORT \ - ArrayTransfer, vtkm::cont::StorageTagBasic, Device>; \ -template class VTKM_CONT_EXPORT \ - ArrayTransfer, vtkm::cont::StorageTagBasic, Device>; \ -template class VTKM_CONT_EXPORT \ - ArrayHandleExecutionManager; \ -template class VTKM_CONT_EXPORT \ - ArrayHandleExecutionManager, vtkm::cont::StorageTagBasic, Device>; \ -template class VTKM_CONT_EXPORT \ - ArrayHandleExecutionManager, vtkm::cont::StorageTagBasic, Device>; \ -template class VTKM_CONT_EXPORT \ - ArrayHandleExecutionManager, vtkm::cont::StorageTagBasic, Device>; \ -} \ -template VTKM_CONT_EXPORT \ -ArrayHandle::ExecutionTypes::PortalConst \ -ArrayHandle::PrepareForInput(Device) const; \ -template VTKM_CONT_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::PortalConst \ -ArrayHandle, StorageTagBasic>::PrepareForInput(Device) const; \ -template VTKM_CONT_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::PortalConst \ -ArrayHandle, StorageTagBasic>::PrepareForInput(Device) const; \ -template VTKM_CONT_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::PortalConst \ -ArrayHandle, StorageTagBasic>::PrepareForInput(Device) const; \ -template VTKM_CONT_EXPORT \ -ArrayHandle::ExecutionTypes::Portal \ -ArrayHandle::PrepareForOutput(vtkm::Id,Device); \ -template VTKM_CONT_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ -ArrayHandle, StorageTagBasic>::PrepareForOutput(vtkm::Id,Device); \ -template VTKM_CONT_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ -ArrayHandle, StorageTagBasic>::PrepareForOutput(vtkm::Id,Device); \ -template VTKM_CONT_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ -ArrayHandle, StorageTagBasic>::PrepareForOutput(vtkm::Id,Device); \ -template VTKM_CONT_EXPORT \ -ArrayHandle::ExecutionTypes::Portal \ -ArrayHandle::PrepareForInPlace(Device); \ -template VTKM_CONT_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ -ArrayHandle, StorageTagBasic>::PrepareForInPlace(Device); \ -template VTKM_CONT_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ -ArrayHandle, StorageTagBasic>::PrepareForInPlace(Device); \ -template VTKM_CONT_EXPORT \ -ArrayHandle, StorageTagBasic>::ExecutionTypes::Portal \ -ArrayHandle, StorageTagBasic>::PrepareForInPlace(Device); \ -template VTKM_CONT_EXPORT \ -void ArrayHandle::PrepareForDevice(Device) const; \ -template VTKM_CONT_EXPORT \ -void ArrayHandle, StorageTagBasic>::PrepareForDevice(Device) const; \ -template VTKM_CONT_EXPORT \ -void ArrayHandle, StorageTagBasic>::PrepareForDevice(Device) const; \ -template VTKM_CONT_EXPORT \ -void ArrayHandle, StorageTagBasic>::PrepareForDevice(Device) const; +#define VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(Type, Device) \ + namespace internal \ + { \ + template class VTKM_CONT_EXPORT \ + ArrayManagerExecution; \ + template class VTKM_CONT_EXPORT \ + ArrayManagerExecution, vtkm::cont::StorageTagBasic, Device>; \ + template class VTKM_CONT_EXPORT \ + ArrayManagerExecution, vtkm::cont::StorageTagBasic, Device>; \ + template class VTKM_CONT_EXPORT \ + ArrayManagerExecution, vtkm::cont::StorageTagBasic, Device>; \ + template class VTKM_CONT_EXPORT ArrayTransfer; \ + template class VTKM_CONT_EXPORT \ + ArrayTransfer, vtkm::cont::StorageTagBasic, Device>; \ + template class VTKM_CONT_EXPORT \ + ArrayTransfer, vtkm::cont::StorageTagBasic, Device>; \ + template class VTKM_CONT_EXPORT \ + ArrayTransfer, vtkm::cont::StorageTagBasic, Device>; \ + template class VTKM_CONT_EXPORT \ + ArrayHandleExecutionManager; \ + template class VTKM_CONT_EXPORT \ + ArrayHandleExecutionManager, vtkm::cont::StorageTagBasic, Device>; \ + template class VTKM_CONT_EXPORT \ + ArrayHandleExecutionManager, vtkm::cont::StorageTagBasic, Device>; \ + template class VTKM_CONT_EXPORT \ + ArrayHandleExecutionManager, vtkm::cont::StorageTagBasic, Device>; \ + } \ + template VTKM_CONT_EXPORT ArrayHandle::ExecutionTypes< \ + Device>::PortalConst ArrayHandle::PrepareForInput(Device) const; \ + template VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>::ExecutionTypes< \ + Device>::PortalConst ArrayHandle, StorageTagBasic>::PrepareForInput(Device) \ + const; \ + template VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>::ExecutionTypes< \ + Device>::PortalConst ArrayHandle, StorageTagBasic>::PrepareForInput(Device) \ + const; \ + template VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>::ExecutionTypes< \ + Device>::PortalConst ArrayHandle, StorageTagBasic>::PrepareForInput(Device) \ + const; \ + template VTKM_CONT_EXPORT ArrayHandle::ExecutionTypes::Portal \ + ArrayHandle::PrepareForOutput(vtkm::Id, Device); \ + template VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>::ExecutionTypes< \ + Device>::Portal ArrayHandle, StorageTagBasic>::PrepareForOutput(vtkm::Id, \ + Device); \ + template VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>::ExecutionTypes< \ + Device>::Portal ArrayHandle, StorageTagBasic>::PrepareForOutput(vtkm::Id, \ + Device); \ + template VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>::ExecutionTypes< \ + Device>::Portal ArrayHandle, StorageTagBasic>::PrepareForOutput(vtkm::Id, \ + Device); \ + template VTKM_CONT_EXPORT ArrayHandle::ExecutionTypes::Portal \ + ArrayHandle::PrepareForInPlace(Device); \ + template VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>::ExecutionTypes< \ + Device>::Portal ArrayHandle, StorageTagBasic>::PrepareForInPlace(Device); \ + template VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>::ExecutionTypes< \ + Device>::Portal ArrayHandle, StorageTagBasic>::PrepareForInPlace(Device); \ + template VTKM_CONT_EXPORT ArrayHandle, StorageTagBasic>::ExecutionTypes< \ + Device>::Portal ArrayHandle, StorageTagBasic>::PrepareForInPlace(Device); \ + template VTKM_CONT_EXPORT void ArrayHandle::PrepareForDevice(Device) \ + const; \ + template VTKM_CONT_EXPORT void \ + ArrayHandle, StorageTagBasic>::PrepareForDevice(Device) const; \ + template VTKM_CONT_EXPORT void \ + ArrayHandle, StorageTagBasic>::PrepareForDevice(Device) const; \ + template VTKM_CONT_EXPORT void \ + ArrayHandle, StorageTagBasic>::PrepareForDevice(Device) const; /// call VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER for all vtkm types. -#define VTKM_INSTANTIATE_ARRAYHANDLES_FOR_DEVICE_ADAPTER(Device) \ - VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(char, Device) \ - VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int8, Device) \ - VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt8, Device) \ - VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int16, Device) \ - VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt16, Device) \ - VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int32, Device) \ - VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt32, Device) \ - VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int64, Device) \ - VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt64, Device) \ - VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Float32, Device) \ +#define VTKM_INSTANTIATE_ARRAYHANDLES_FOR_DEVICE_ADAPTER(Device) \ + VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(char, Device) \ + VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int8, Device) \ + VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt8, Device) \ + VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int16, Device) \ + VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt16, Device) \ + VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int32, Device) \ + VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt32, Device) \ + VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Int64, Device) \ + VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::UInt64, Device) \ + VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Float32, Device) \ VTKM_INSTANTIATE_ARRAYHANDLE_FOR_DEVICE_ADAPTER(vtkm::Float64, Device) #include diff --git a/vtkm/cont/internal/ArrayHandleExecutionManager.h b/vtkm/cont/internal/ArrayHandleExecutionManager.h index 22e2be4ed..baadbc76a 100644 --- a/vtkm/cont/internal/ArrayHandleExecutionManager.h +++ b/vtkm/cont/internal/ArrayHandleExecutionManager.h @@ -25,26 +25,29 @@ #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ /// The common base for ArrayHandleExecutionManager. This is the interface /// used when the type of the device is not known at run time. /// -template +template class ArrayHandleExecutionManagerBase { private: - typedef vtkm::cont::internal::Storage StorageType; + typedef vtkm::cont::internal::Storage StorageType; public: template struct ExecutionTypes { private: - typedef vtkm::cont::internal::ArrayTransfer - ArrayTransferType; + typedef vtkm::cont::internal::ArrayTransfer ArrayTransferType; + public: typedef typename ArrayTransferType::PortalExecution Portal; typedef typename ArrayTransferType::PortalConstExecution PortalConst; @@ -60,15 +63,13 @@ public: typedef typename StorageType::PortalConstType PortalConstControl; VTKM_CONT - virtual ~ArrayHandleExecutionManagerBase() { } + virtual ~ArrayHandleExecutionManagerBase() {} /// Returns the number of values stored in the array. Results are undefined /// if data has not been loaded or allocated. /// VTKM_CONT - vtkm::Id GetNumberOfValues() const { - return this->GetNumberOfValuesImpl(); - } + vtkm::Id GetNumberOfValues() const { return this->GetNumberOfValuesImpl(); } /// Prepares the data for use as input in the execution environment. If the /// flag \c updateData is true, then data is transferred to the execution @@ -76,10 +77,10 @@ public: /// /// Returns a constant array portal valid in the execution environment. /// - template - VTKM_CONT - typename ExecutionTypes::PortalConst - PrepareForInput(bool updateData, DeviceAdapter) { + template + VTKM_CONT typename ExecutionTypes::PortalConst PrepareForInput(bool updateData, + DeviceAdapter) + { this->VerifyDeviceAdapter(DeviceAdapter()); typename ExecutionTypes::PortalConst portal; @@ -93,10 +94,10 @@ public: /// /// Returns a read-write array portal valid in the execution environment. /// - template - VTKM_CONT - typename ExecutionTypes::Portal - PrepareForInPlace(bool updateData, DeviceAdapter) { + template + VTKM_CONT typename ExecutionTypes::Portal PrepareForInPlace(bool updateData, + DeviceAdapter) + { this->VerifyDeviceAdapter(DeviceAdapter()); typename ExecutionTypes::Portal portal; @@ -111,10 +112,10 @@ public: /// /// Returns a writable array portal valid in the execution environment. /// - template - VTKM_CONT - typename ExecutionTypes::Portal - PrepareForOutput(vtkm::Id numberOfValues, DeviceAdapter) { + template + VTKM_CONT typename ExecutionTypes::Portal PrepareForOutput(vtkm::Id numberOfValues, + DeviceAdapter) + { this->VerifyDeviceAdapter(DeviceAdapter()); typename ExecutionTypes::Portal portal; @@ -130,9 +131,7 @@ public: /// called. /// VTKM_CONT - void RetrieveOutputData(StorageType *storage) const { - this->RetrieveOutputDataImpl(storage); - } + void RetrieveOutputData(StorageType* storage) const { this->RetrieveOutputDataImpl(storage); } /// \brief Reduces the size of the array without changing its values. /// @@ -144,51 +143,40 @@ public: /// to shorten the array, not lengthen. /// VTKM_CONT - void Shrink(vtkm::Id numberOfValues) { - this->ShrinkImpl(numberOfValues); - } + void Shrink(vtkm::Id numberOfValues) { this->ShrinkImpl(numberOfValues); } /// Frees any resources (i.e. memory) allocated for the exeuction /// environment, if any. /// VTKM_CONT - void ReleaseResources() { - this->ReleaseResourcesImpl(); - } + void ReleaseResources() { this->ReleaseResourcesImpl(); } - template - VTKM_CONT - bool IsDeviceAdapter(DeviceAdapter) const + template + VTKM_CONT bool IsDeviceAdapter(DeviceAdapter) const { - return this->IsDeviceAdapterImpl( - vtkm::cont::DeviceAdapterTraits::GetId()); + return this->IsDeviceAdapterImpl(vtkm::cont::DeviceAdapterTraits::GetId()); } protected: virtual vtkm::Id GetNumberOfValuesImpl() const = 0; - virtual void PrepareForInputImpl(bool updateData, - void *portalExecutionVoid) = 0; + virtual void PrepareForInputImpl(bool updateData, void* portalExecutionVoid) = 0; - virtual void PrepareForInPlaceImpl(bool updateData, - void *portalExecutionVoid) = 0; + virtual void PrepareForInPlaceImpl(bool updateData, void* portalExecutionVoid) = 0; - virtual void PrepareForOutputImpl(vtkm::Id numberOfValues, - void *portalExecution) = 0; + virtual void PrepareForOutputImpl(vtkm::Id numberOfValues, void* portalExecution) = 0; - virtual void RetrieveOutputDataImpl(StorageType *storage) const = 0; + virtual void RetrieveOutputDataImpl(StorageType* storage) const = 0; virtual void ShrinkImpl(Id numberOfValues) = 0; virtual void ReleaseResourcesImpl() = 0; - virtual bool IsDeviceAdapterImpl( - const vtkm::cont::DeviceAdapterId &id) const = 0; + virtual bool IsDeviceAdapterImpl(const vtkm::cont::DeviceAdapterId& id) const = 0; private: - template - VTKM_CONT - void VerifyDeviceAdapter(DeviceAdapter device) const + template + VTKM_CONT void VerifyDeviceAdapter(DeviceAdapter device) const { if (!this->IsDeviceAdapter(device)) { @@ -204,16 +192,12 @@ private: /// in the execution environment. This virtual method polymorphism allows the /// ArrayHandle to change its device at run time. /// -template -class ArrayHandleExecutionManager - : public ArrayHandleExecutionManagerBase +template +class ArrayHandleExecutionManager : public ArrayHandleExecutionManagerBase { typedef ArrayHandleExecutionManagerBase Superclass; - typedef vtkm::cont::internal::ArrayTransfer - ArrayTransferType; - typedef vtkm::cont::internal::Storage StorageType; + typedef vtkm::cont::internal::ArrayTransfer ArrayTransferType; + typedef vtkm::cont::internal::Storage StorageType; public: typedef typename ArrayTransferType::PortalControl PortalControl; @@ -223,10 +207,12 @@ public: typedef typename ArrayTransferType::PortalConstExecution PortalConstExecution; VTKM_CONT - ArrayHandleExecutionManager(StorageType *storage) - : Transfer(storage) { } + ArrayHandleExecutionManager(StorageType* storage) + : Transfer(storage) + { + } - template + template VTKM_CONT void CopyInto(IteratorTypeControl dest) const { this->Transfer.CopyInto(dest); @@ -234,52 +220,43 @@ public: protected: VTKM_CONT - vtkm::Id GetNumberOfValuesImpl() const - { - return this->Transfer.GetNumberOfValues(); - } + vtkm::Id GetNumberOfValuesImpl() const { return this->Transfer.GetNumberOfValues(); } VTKM_CONT - void PrepareForInputImpl(bool updateData, void *portalExecutionVoid) + void PrepareForInputImpl(bool updateData, void* portalExecutionVoid) { PortalConstExecution portal = this->Transfer.PrepareForInput(updateData); - *reinterpret_cast(portalExecutionVoid) = portal; + *reinterpret_cast(portalExecutionVoid) = portal; } VTKM_CONT - void PrepareForInPlaceImpl(bool updateData, void *portalExecutionVoid) + void PrepareForInPlaceImpl(bool updateData, void* portalExecutionVoid) { PortalExecution portal = this->Transfer.PrepareForInPlace(updateData); - *reinterpret_cast(portalExecutionVoid) = portal; + *reinterpret_cast(portalExecutionVoid) = portal; } VTKM_CONT - void PrepareForOutputImpl(vtkm::Id numberOfValues, void *portalExecutionVoid) + void PrepareForOutputImpl(vtkm::Id numberOfValues, void* portalExecutionVoid) { PortalExecution portal = this->Transfer.PrepareForOutput(numberOfValues); - *reinterpret_cast(portalExecutionVoid) = portal; + *reinterpret_cast(portalExecutionVoid) = portal; } VTKM_CONT - void RetrieveOutputDataImpl(StorageType *storage) const + void RetrieveOutputDataImpl(StorageType* storage) const { this->Transfer.RetrieveOutputData(storage); } VTKM_CONT - void ShrinkImpl(Id numberOfValues) - { - this->Transfer.Shrink(numberOfValues); - } + void ShrinkImpl(Id numberOfValues) { this->Transfer.Shrink(numberOfValues); } VTKM_CONT - void ReleaseResourcesImpl() - { - this->Transfer.ReleaseResources(); - } + void ReleaseResourcesImpl() { this->Transfer.ReleaseResources(); } VTKM_CONT - bool IsDeviceAdapterImpl(const DeviceAdapterId &id) const + bool IsDeviceAdapterImpl(const DeviceAdapterId& id) const { return id == vtkm::cont::DeviceAdapterTraits::GetId(); } @@ -287,7 +264,6 @@ protected: private: ArrayTransferType Transfer; }; - } } } // namespace vtkm::cont::internal diff --git a/vtkm/cont/internal/ArrayManagerExecution.h b/vtkm/cont/internal/ArrayManagerExecution.h index ac2715e20..7608e8658 100644 --- a/vtkm/cont/internal/ArrayManagerExecution.h +++ b/vtkm/cont/internal/ArrayManagerExecution.h @@ -22,9 +22,12 @@ #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ /// \brief Class that manages data in the execution environment. /// @@ -45,12 +48,12 @@ namespace internal { /// trivial subclass of /// vtkm::cont::internal::ArrayManagerExecutionShareWithControl. /// -template +template class ArrayManagerExecution #ifdef VTKM_DOXYGEN_ONLY { private: - typedef vtkm::cont::internal::Storage StorageType; + typedef vtkm::cont::internal::Storage StorageType; public: /// The type of value held in the array (vtkm::FloatDefault, vtkm::Vec, etc.) @@ -67,8 +70,7 @@ public: /// Const version of PortalType. You must be able to cast PortalType to /// PortalConstType. /// - typedef vtkm::exec::internal::ArrayPortalFromIterators - PortalConstType; + typedef vtkm::exec::internal::ArrayPortalFromIterators PortalConstType; /// All ArrayManagerExecution classes must have a constructor that takes a /// storage reference. The reference may be saved (and will remain valid @@ -77,7 +79,7 @@ public: /// reference can also, of course, be ignored. /// VTKM_CONT - ArrayManagerExecution(vtkm::cont::internal::Storage &storage); + ArrayManagerExecution(vtkm::cont::internal::Storage& storage); /// Returns the number of values stored in the array. Results are undefined /// if data has not been loaded or allocated. @@ -121,8 +123,7 @@ public: /// called. /// VTKM_CONT - void RetrieveOutputData( - vtkm::cont::internal::Storage* storage) const; + void RetrieveOutputData(vtkm::cont::internal::Storage* storage) const; /// Similar to RetrieveOutputData except that instead of writing to the /// controlArray itself, it writes to the given control environment @@ -151,10 +152,9 @@ public: VTKM_CONT void ReleaseResources(); }; -#else // VTKM_DOXGEN_ONLY -; +#else // VTKM_DOXGEN_ONLY + ; #endif // VTKM_DOXYGEN_ONLY - } } } // namespace vtkm::cont::internal diff --git a/vtkm/cont/internal/ArrayManagerExecutionShareWithControl.h b/vtkm/cont/internal/ArrayManagerExecutionShareWithControl.h index 9bd098bd1..54d26ed1b 100644 --- a/vtkm/cont/internal/ArrayManagerExecutionShareWithControl.h +++ b/vtkm/cont/internal/ArrayManagerExecutionShareWithControl.h @@ -27,16 +27,19 @@ #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ /// \c ArrayManagerExecutionShareWithControl provides an implementation for a /// \c ArrayManagerExecution class for a device adapter when the execution /// and control environments share memory. This class basically defers all its /// calls to a \c Storage class and uses the array allocated there. /// -template +template class ArrayManagerExecutionShareWithControl { public: @@ -46,16 +49,15 @@ public: typedef typename StorageType::PortalConstType PortalConstType; VTKM_CONT - ArrayManagerExecutionShareWithControl(StorageType *storage) - : Storage(storage) { } + ArrayManagerExecutionShareWithControl(StorageType* storage) + : Storage(storage) + { + } /// Returns the size of the storage. /// VTKM_CONT - vtkm::Id GetNumberOfValues() const - { - return this->Storage->GetNumberOfValues(); - } + vtkm::Id GetNumberOfValues() const { return this->Storage->GetNumberOfValues(); } /// Returns the constant portal from the storage. /// @@ -68,10 +70,7 @@ public: /// Returns the read-write portal from the storage. /// VTKM_CONT - PortalType PrepareForInPlace(bool vtkmNotUsed(uploadData)) - { - return this->Storage->GetPortal(); - } + PortalType PrepareForInPlace(bool vtkmNotUsed(uploadData)) { return this->Storage->GetPortal(); } /// Allocates data in the storage and return the portal to that. /// @@ -87,7 +86,7 @@ public: /// controlArray (under correct operation). /// VTKM_CONT - void RetrieveOutputData(StorageType *storage) const + void RetrieveOutputData(StorageType* storage) const { (void)storage; VTKM_ASSERT(storage == this->Storage); @@ -100,35 +99,28 @@ public: VTKM_CONT void CopyInto(IteratorTypeControl dest) const { typedef typename StorageType::PortalConstType::IteratorType IteratorType; - IteratorType beginIterator = - this->Storage->GetPortalConst().GetIteratorBegin(); + IteratorType beginIterator = this->Storage->GetPortalConst().GetIteratorBegin(); - std::copy(beginIterator, - beginIterator + this->Storage->GetNumberOfValues(), dest); + std::copy(beginIterator, beginIterator + this->Storage->GetNumberOfValues(), dest); } /// Shrinks the storage. /// VTKM_CONT - void Shrink(vtkm::Id numberOfValues) - { - this->Storage->Shrink(numberOfValues); - } + void Shrink(vtkm::Id numberOfValues) { this->Storage->Shrink(numberOfValues); } /// A no-op. /// VTKM_CONT - void ReleaseResources() { } + void ReleaseResources() {} private: - ArrayManagerExecutionShareWithControl( - ArrayManagerExecutionShareWithControl &) = delete; - void operator=( - ArrayManagerExecutionShareWithControl &) = delete; + ArrayManagerExecutionShareWithControl(ArrayManagerExecutionShareWithControl&) = + delete; + void operator=(ArrayManagerExecutionShareWithControl&) = delete; - StorageType *Storage; + StorageType* Storage; }; - } } } // namespace vtkm::cont::internal diff --git a/vtkm/cont/internal/ArrayPortalFromIterators.h b/vtkm/cont/internal/ArrayPortalFromIterators.h old mode 100755 new mode 100644 index 40f5a2bf3..88be6d32f --- a/vtkm/cont/internal/ArrayPortalFromIterators.h +++ b/vtkm/cont/internal/ArrayPortalFromIterators.h @@ -31,20 +31,23 @@ #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ -template +template class ArrayPortalFromIterators; /// This templated implementation of an ArrayPortal allows you to adapt a pair /// of begin/end iterators to an ArrayPortal interface. /// -template -class ArrayPortalFromIterators::type >::value >::type > +template +class ArrayPortalFromIterators< + IteratorT, typename std::enable_if< + !std::is_const::type>::value>::type> { public: typedef typename std::iterator_traits::value_type ValueType; @@ -52,7 +55,7 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_CONT - ArrayPortalFromIterators() { } + ArrayPortalFromIterators() {} VTKM_SUPPRESS_EXEC_WARNINGS VTKM_CONT @@ -77,38 +80,28 @@ public: /// type that can be copied to this iterator type. This allows us to do any /// type casting that the iterators do (like the non-const to const cast). /// - template - VTKM_CONT - ArrayPortalFromIterators(const ArrayPortalFromIterators &src) - : BeginIterator(src.GetIteratorBegin()), NumberOfValues(src.GetNumberOfValues()) - { } - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const + template + VTKM_CONT ArrayPortalFromIterators(const ArrayPortalFromIterators& src) + : BeginIterator(src.GetIteratorBegin()) + , NumberOfValues(src.GetNumberOfValues()) { - return this->NumberOfValues; } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ValueType Get(vtkm::Id index) const - { - return *this->IteratorAt(index); - } + vtkm::Id GetNumberOfValues() const { return this->NumberOfValues; } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - void Set(vtkm::Id index, const ValueType& value) const - { - *(this->BeginIterator + index) = value; - } + ValueType Get(vtkm::Id index) const { return *this->IteratorAt(index); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - IteratorT GetIteratorBegin() const { - return this->BeginIterator; - } + void Set(vtkm::Id index, const ValueType& value) const { *(this->BeginIterator + index) = value; } + + VTKM_SUPPRESS_EXEC_WARNINGS + VTKM_EXEC_CONT + IteratorT GetIteratorBegin() const { return this->BeginIterator; } private: IteratorT BeginIterator; @@ -125,10 +118,10 @@ private: } }; -template -class ArrayPortalFromIterators::type >::value >::type > +template +class ArrayPortalFromIterators< + IteratorT, typename std::enable_if< + std::is_const::type>::value>::type> { public: typedef typename std::iterator_traits::value_type ValueType; @@ -136,7 +129,7 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_CONT - ArrayPortalFromIterators() { } + ArrayPortalFromIterators() {} VTKM_SUPPRESS_EXEC_WARNINGS VTKM_CONT @@ -161,40 +154,33 @@ public: /// type that can be copied to this iterator type. This allows us to do any /// type casting that the iterators do (like the non-const to const cast). /// - template - VTKM_CONT - ArrayPortalFromIterators(const ArrayPortalFromIterators &src) - : BeginIterator(src.GetIteratorBegin()), NumberOfValues(src.GetNumberOfValues()) - { } - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const + template + VTKM_CONT ArrayPortalFromIterators(const ArrayPortalFromIterators& src) + : BeginIterator(src.GetIteratorBegin()) + , NumberOfValues(src.GetNumberOfValues()) { - return this->NumberOfValues; } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ValueType Get(vtkm::Id index) const - { - return *this->IteratorAt(index); - } + vtkm::Id GetNumberOfValues() const { return this->NumberOfValues; } + + VTKM_SUPPRESS_EXEC_WARNINGS + VTKM_EXEC_CONT + ValueType Get(vtkm::Id index) const { return *this->IteratorAt(index); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT void Set(vtkm::Id vtkmNotUsed(index), const ValueType& vtkmNotUsed(value)) const { -#if ! (defined(VTKM_MSVC) && defined(VTKM_CUDA)) +#if !(defined(VTKM_MSVC) && defined(VTKM_CUDA)) VTKM_ASSERT(false && "Attempted to write to constant array."); #endif } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - IteratorT GetIteratorBegin() const { - return this->BeginIterator; - } + IteratorT GetIteratorBegin() const { return this->BeginIterator; } private: IteratorT BeginIterator; @@ -210,34 +196,35 @@ private: return this->BeginIterator + index; } }; - } } } // namespace vtkm::cont::internal -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// Partial specialization of \c ArrayPortalToIterators for \c /// ArrayPortalFromIterators. Returns the original array rather than /// the portal wrapped in an \c IteratorFromArrayPortal. /// -template -class ArrayPortalToIterators< - vtkm::cont::internal::ArrayPortalFromIterators<_IteratorType> > +template +class ArrayPortalToIterators> { - typedef vtkm::cont::internal::ArrayPortalFromIterators<_IteratorType> - PortalType; + typedef vtkm::cont::internal::ArrayPortalFromIterators<_IteratorType> PortalType; + public: #if !defined(VTKM_MSVC) || (defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL == 0) typedef _IteratorType IteratorType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalToIterators(const PortalType &portal) - : Iterator(portal.GetIteratorBegin()), - NumberOfValues(portal.GetNumberOfValues()) - { } + ArrayPortalToIterators(const PortalType& portal) + : Iterator(portal.GetIteratorBegin()) + , NumberOfValues(portal.GetNumberOfValues()) + { + } #else // VTKM_MSVC // The MSVC compiler issues warnings when using raw pointer math when in @@ -247,11 +234,11 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalToIterators(const PortalType &portal) - : Iterator(portal.GetIteratorBegin(), - static_cast(portal.GetNumberOfValues())), - NumberOfValues(portal.GetNumberOfValues()) - { } + ArrayPortalToIterators(const PortalType& portal) + : Iterator(portal.GetIteratorBegin(), static_cast(portal.GetNumberOfValues())) + , NumberOfValues(portal.GetNumberOfValues()) + { + } #endif // VTKM_MSVC @@ -261,10 +248,10 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - IteratorType GetEnd() const { + IteratorType GetEnd() const + { IteratorType iterator = this->Iterator; - typedef typename std::iterator_traits::difference_type - difference_type; + typedef typename std::iterator_traits::difference_type difference_type; #if !defined(VTKM_MSVC) || (defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL == 0) std::advance(iterator, static_cast(this->NumberOfValues)); @@ -272,7 +259,7 @@ public: //Visual Studio checked iterators throw exceptions when you try to advance //nullptr iterators even if the advancement length is zero. So instead //don't do the advancement at all - if(this->NumberOfValues > 0) + if (this->NumberOfValues > 0) { std::advance(iterator, static_cast(this->NumberOfValues)); } @@ -285,7 +272,6 @@ private: IteratorType Iterator; vtkm::Id NumberOfValues; }; - } } // namespace vtkm::cont diff --git a/vtkm/cont/internal/ArrayPortalShrink.h b/vtkm/cont/internal/ArrayPortalShrink.h index ae389cab5..253a5a468 100644 --- a/vtkm/cont/internal/ArrayPortalShrink.h +++ b/vtkm/cont/internal/ArrayPortalShrink.h @@ -27,14 +27,17 @@ #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ /// This ArrayPortal adapter is a utility that allows you to shrink the /// (reported) array size without actually modifying the underlying allocation. /// -template +template class ArrayPortalShrink { public: @@ -42,16 +45,20 @@ public: typedef typename DelegatePortalType::ValueType ValueType; - VTKM_CONT ArrayPortalShrink() : NumberOfValues(0) { } + VTKM_CONT ArrayPortalShrink() + : NumberOfValues(0) + { + } - VTKM_CONT ArrayPortalShrink(const DelegatePortalType &delegatePortal) - : DelegatePortal(delegatePortal), - NumberOfValues(delegatePortal.GetNumberOfValues()) - { } + VTKM_CONT ArrayPortalShrink(const DelegatePortalType& delegatePortal) + : DelegatePortal(delegatePortal) + , NumberOfValues(delegatePortal.GetNumberOfValues()) + { + } - VTKM_CONT ArrayPortalShrink(const DelegatePortalType &delegatePortal, - vtkm::Id numberOfValues) - : DelegatePortal(delegatePortal), NumberOfValues(numberOfValues) + VTKM_CONT ArrayPortalShrink(const DelegatePortalType& delegatePortal, vtkm::Id numberOfValues) + : DelegatePortal(delegatePortal) + , NumberOfValues(numberOfValues) { VTKM_ASSERT(numberOfValues <= delegatePortal.GetNumberOfValues()); } @@ -60,12 +67,12 @@ public: /// that can be copied to this type. This allows us to do any type casting /// the delegates can do (like the non-const to const cast). /// - template - VTKM_CONT - ArrayPortalShrink(const ArrayPortalShrink &src) - : DelegatePortal(src.GetDelegatePortal()), - NumberOfValues(src.GetNumberOfValues()) - { } + template + VTKM_CONT ArrayPortalShrink(const ArrayPortalShrink& src) + : DelegatePortal(src.GetDelegatePortal()) + , NumberOfValues(src.GetNumberOfValues()) + { + } VTKM_CONT vtkm::Id GetNumberOfValues() const { return this->NumberOfValues; } @@ -106,42 +113,40 @@ private: DelegatePortalType DelegatePortal; vtkm::Id NumberOfValues; }; - } } } // namespace vtkm::cont::internal -namespace vtkm { -namespace cont { - -template -class ArrayPortalToIterators< - vtkm::cont::internal::ArrayPortalShrink > +namespace vtkm { - typedef vtkm::cont::internal::ArrayPortalShrink - PortalType; - typedef vtkm::cont::ArrayPortalToIterators - DelegateArrayPortalToIterators; +namespace cont +{ + +template +class ArrayPortalToIterators> +{ + typedef vtkm::cont::internal::ArrayPortalShrink PortalType; + typedef vtkm::cont::ArrayPortalToIterators DelegateArrayPortalToIterators; public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalToIterators(const PortalType &portal) - : DelegateIterators(portal.GetDelegatePortal()), - NumberOfValues(portal.GetNumberOfValues()) - { } + ArrayPortalToIterators(const PortalType& portal) + : DelegateIterators(portal.GetDelegatePortal()) + , NumberOfValues(portal.GetNumberOfValues()) + { + } typedef typename DelegateArrayPortalToIterators::IteratorType IteratorType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - IteratorType GetBegin() const { - return this->DelegateIterators.GetBegin(); - } + IteratorType GetBegin() const { return this->DelegateIterators.GetBegin(); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - IteratorType GetEnd() const { + IteratorType GetEnd() const + { IteratorType iterator = this->GetBegin(); std::advance(iterator, this->NumberOfValues); return iterator; @@ -151,7 +156,6 @@ private: DelegateArrayPortalToIterators DelegateIterators; vtkm::Id NumberOfValues; }; - } } // namespace vtkm::cont diff --git a/vtkm/cont/internal/ArrayTransfer.h b/vtkm/cont/internal/ArrayTransfer.h index 8354c97c5..7337a75fd 100644 --- a/vtkm/cont/internal/ArrayTransfer.h +++ b/vtkm/cont/internal/ArrayTransfer.h @@ -23,9 +23,12 @@ #include #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ /// \brief Class that manages the transfer of data between control and execution. /// @@ -43,13 +46,13 @@ namespace internal { /// but some storage types, like implicit storage, will be specialized to /// transfer through a different path. /// -template +template class ArrayTransfer { private: - typedef vtkm::cont::internal::Storage StorageType; - typedef vtkm::cont::internal::ArrayManagerExecution< - T,StorageTag,DeviceAdapterTag> ArrayManagerType; + typedef vtkm::cont::internal::Storage StorageType; + typedef vtkm::cont::internal::ArrayManagerExecution + ArrayManagerType; public: /// The type of value held in the array (vtkm::FloatDefault, vtkm::Vec, etc.) @@ -67,16 +70,16 @@ public: typedef typename ArrayManagerType::PortalConstType PortalConstExecution; VTKM_CONT - ArrayTransfer(StorageType *storage) : ArrayManager(storage) { } + ArrayTransfer(StorageType* storage) + : ArrayManager(storage) + { + } /// Returns the number of values stored in the array. Results are undefined /// if data has not been loaded or allocated. /// VTKM_CONT - vtkm::Id GetNumberOfValues() const - { - return this->ArrayManager.GetNumberOfValues(); - } + vtkm::Id GetNumberOfValues() const { return this->ArrayManager.GetNumberOfValues(); } /// Prepares the data for use as input in the execution environment. If the /// flag \c updateData is true, then data is transferred to the execution @@ -124,7 +127,7 @@ public: /// called. /// VTKM_CONT - void RetrieveOutputData(StorageType *storage) const + void RetrieveOutputData(StorageType* storage) const { this->ArrayManager.RetrieveOutputData(storage); } @@ -151,24 +154,17 @@ public: /// to shorten the array, not lengthen. /// VTKM_CONT - void Shrink(vtkm::Id numberOfValues) - { - this->ArrayManager.Shrink(numberOfValues); - } + void Shrink(vtkm::Id numberOfValues) { this->ArrayManager.Shrink(numberOfValues); } /// Frees any resources (i.e. memory) allocated for the exeuction /// environment, if any. /// VTKM_CONT - void ReleaseResources() - { - this->ArrayManager.ReleaseResources(); - } + void ReleaseResources() { this->ArrayManager.ReleaseResources(); } private: ArrayManagerType ArrayManager; }; - } } } // namespace vtkm::cont::internal diff --git a/vtkm/cont/internal/ConnectivityExplicitInternals.h b/vtkm/cont/internal/ConnectivityExplicitInternals.h index 6666884d4..2a2d56f9b 100644 --- a/vtkm/cont/internal/ConnectivityExplicitInternals.h +++ b/vtkm/cont/internal/ConnectivityExplicitInternals.h @@ -25,36 +25,30 @@ #include #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ -template -void buildIndexOffsets(const NumIndicesArrayType& numIndices, - IndexOffsetArrayType& offsets, - DeviceAdapterTag, - std::true_type) +template +void buildIndexOffsets(const NumIndicesArrayType& numIndices, IndexOffsetArrayType& offsets, + DeviceAdapterTag, std::true_type) { //We first need to make sure that NumIndices and IndexOffsetArrayType //have the same type so we can call scane exclusive - typedef vtkm::cont::ArrayHandleCast< vtkm::Id, - NumIndicesArrayType > CastedNumIndicesType; + typedef vtkm::cont::ArrayHandleCast CastedNumIndicesType; // Although technically we are making changes to this object, the changes // are logically consistent with the previous state, so we consider it // valid under const. typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; - Algorithm::ScanExclusive( CastedNumIndicesType(numIndices), offsets); + Algorithm::ScanExclusive(CastedNumIndicesType(numIndices), offsets); } -template -void buildIndexOffsets(const NumIndicesArrayType&, - IndexOffsetArrayType&, - DeviceAdapterTag, +template +void buildIndexOffsets(const NumIndicesArrayType&, IndexOffsetArrayType&, DeviceAdapterTag, std::false_type) { //this is a no-op as the storage for the offsets is an implicit handle @@ -64,23 +58,19 @@ void buildIndexOffsets(const NumIndicesArrayType&, //cause a compile time failure. } -template -void buildIndexOffsets(const ArrayHandleIndices& numIndices, - ArrayHandleOffsets offsets, +template +void buildIndexOffsets(const ArrayHandleIndices& numIndices, ArrayHandleOffsets offsets, DeviceAdapterTag tag) { - typedef vtkm::cont::internal::IsWriteableArrayHandle IsWriteable; + typedef vtkm::cont::internal::IsWriteableArrayHandle + IsWriteable; buildIndexOffsets(numIndices, offsets, tag, typename IsWriteable::type()); } - -template +template struct ConnectivityExplicitInternals { typedef vtkm::cont::ArrayHandle ShapeArrayType; @@ -98,34 +88,36 @@ struct ConnectivityExplicitInternals VTKM_CONT ConnectivityExplicitInternals() - : ElementsValid(false), IndexOffsetsValid(false) { } + : ElementsValid(false) + , IndexOffsetsValid(false) + { + } VTKM_CONT - vtkm::Id GetNumberOfElements() const { + vtkm::Id GetNumberOfElements() const + { VTKM_ASSERT(this->ElementsValid); return this->Shapes.GetNumberOfValues(); } VTKM_CONT - void ReleaseResourcesExecution() { + void ReleaseResourcesExecution() + { this->Shapes.ReleaseResourcesExecution(); this->NumIndices.ReleaseResourcesExecution(); this->Connectivity.ReleaseResourcesExecution(); this->IndexOffsets.ReleaseResourcesExecution(); } - template - VTKM_CONT - void BuildIndexOffsets(Device) const + template + VTKM_CONT void BuildIndexOffsets(Device) const { VTKM_ASSERT(this->ElementsValid); - if(!this->IndexOffsetsValid) + if (!this->IndexOffsetsValid) { - buildIndexOffsets(this->NumIndices, - this->IndexOffsets, - Device()); + buildIndexOffsets(this->NumIndices, this->IndexOffsets, Device()); this->IndexOffsetsValid = true; } } @@ -136,12 +128,12 @@ struct ConnectivityExplicitInternals if (!this->IndexOffsetsValid) { throw vtkm::cont::ErrorBadType( - "Cannot build indices using the error device. Must be created previously."); + "Cannot build indices using the error device. Must be created previously."); } } VTKM_CONT - void PrintSummary(std::ostream &out) const + void PrintSummary(std::ostream& out) const { if (this->ElementsValid) { @@ -167,7 +159,6 @@ struct ConnectivityExplicitInternals } } }; - } } } // namespace vtkm::cont::internal diff --git a/vtkm/cont/internal/DeviceAdapterAlgorithmGeneral.h b/vtkm/cont/internal/DeviceAdapterAlgorithmGeneral.h index ba6f13369..66d17f63d 100644 --- a/vtkm/cont/internal/DeviceAdapterAlgorithmGeneral.h +++ b/vtkm/cont/internal/DeviceAdapterAlgorithmGeneral.h @@ -34,9 +34,12 @@ #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ /// \brief /// @@ -86,7 +89,7 @@ namespace internal { /// made a separate template parameter to avoid a recursive dependence between /// DeviceAdapterAlgorithmGeneral.h and DeviceAdapterAlgorithm.h /// -template +template struct DeviceAdapterAlgorithmGeneral { //-------------------------------------------------------------------------- @@ -95,41 +98,36 @@ struct DeviceAdapterAlgorithmGeneral // array. Might want to expose this and/or allow actual device adapter // implementations to provide one. private: - template - VTKM_CONT - static T GetExecutionValue(const vtkm::cont::ArrayHandle &input, - vtkm::Id index) + template + VTKM_CONT static T GetExecutionValue(const vtkm::cont::ArrayHandle& input, vtkm::Id index) { - typedef vtkm::cont::ArrayHandle InputArrayType; - typedef vtkm::cont::ArrayHandle - OutputArrayType; + typedef vtkm::cont::ArrayHandle InputArrayType; + typedef vtkm::cont::ArrayHandle OutputArrayType; OutputArrayType output; - CopyKernel< - typename InputArrayType::template ExecutionTypes::PortalConst, - typename OutputArrayType::template ExecutionTypes::Portal> - kernel(input.PrepareForInput(DeviceAdapterTag()), - output.PrepareForOutput(1, DeviceAdapterTag()), - index); + CopyKernel::PortalConst, + typename OutputArrayType::template ExecutionTypes::Portal> + kernel(input.PrepareForInput(DeviceAdapterTag()), + output.PrepareForOutput(1, DeviceAdapterTag()), index); DerivedAlgorithm::Schedule(kernel, 1); return output.GetPortalConstControl().Get(0); } - public: //-------------------------------------------------------------------------- // Copy - template - VTKM_CONT static void Copy(const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle &output) + template + VTKM_CONT static void Copy(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output) { - typedef CopyKernel< - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, - typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal> - CopyKernelType; + typedef CopyKernel< + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal> + CopyKernelType; const vtkm::Id inSize = input.GetNumberOfValues(); CopyKernelType kernel(input.PrepareForInput(DeviceAdapterTag()), @@ -139,70 +137,52 @@ public: //-------------------------------------------------------------------------- // CopyIf - template - VTKM_CONT static void CopyIf( - const vtkm::cont::ArrayHandle& input, - const vtkm::cont::ArrayHandle& stencil, - vtkm::cont::ArrayHandle& output, - UnaryPredicate unary_predicate) + template + VTKM_CONT static void CopyIf(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& stencil, + vtkm::cont::ArrayHandle& output, + UnaryPredicate unary_predicate) { VTKM_ASSERT(input.GetNumberOfValues() == stencil.GetNumberOfValues()); vtkm::Id arrayLength = stencil.GetNumberOfValues(); - typedef vtkm::cont::ArrayHandle< - vtkm::Id, vtkm::cont::StorageTagBasic> IndexArrayType; + typedef vtkm::cont::ArrayHandle IndexArrayType; IndexArrayType indices; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst - StencilPortalType; - StencilPortalType stencilPortal = - stencil.PrepareForInput(DeviceAdapterTag()); + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst StencilPortalType; + StencilPortalType stencilPortal = stencil.PrepareForInput(DeviceAdapterTag()); - typedef typename IndexArrayType - ::template ExecutionTypes::Portal IndexPortalType; - IndexPortalType indexPortal = - indices.PrepareForOutput(arrayLength, DeviceAdapterTag()); + typedef + typename IndexArrayType::template ExecutionTypes::Portal IndexPortalType; + IndexPortalType indexPortal = indices.PrepareForOutput(arrayLength, DeviceAdapterTag()); - StencilToIndexFlagKernel< StencilPortalType, - IndexPortalType, - UnaryPredicate> indexKernel(stencilPortal, - indexPortal, - unary_predicate); + StencilToIndexFlagKernel indexKernel( + stencilPortal, indexPortal, unary_predicate); DerivedAlgorithm::Schedule(indexKernel, arrayLength); vtkm::Id outArrayLength = DerivedAlgorithm::ScanExclusive(indices, indices); - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst - InputPortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst InputPortalType; InputPortalType inputPortal = input.PrepareForInput(DeviceAdapterTag()); - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal OutputPortalType; - OutputPortalType outputPortal = - output.PrepareForOutput(outArrayLength, DeviceAdapterTag()); + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal + OutputPortalType; + OutputPortalType outputPortal = output.PrepareForOutput(outArrayLength, DeviceAdapterTag()); - CopyIfKernel< - InputPortalType, - StencilPortalType, - IndexPortalType, - OutputPortalType, - UnaryPredicate> copyKernel(inputPortal, - stencilPortal, - indexPortal, - outputPortal, - unary_predicate); + CopyIfKernel + copyKernel(inputPortal, stencilPortal, indexPortal, outputPortal, unary_predicate); DerivedAlgorithm::Schedule(copyKernel, arrayLength); } - template - VTKM_CONT static void CopyIf( - const vtkm::cont::ArrayHandle& input, - const vtkm::cont::ArrayHandle& stencil, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static void CopyIf(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& stencil, + vtkm::cont::ArrayHandle& output) { ::vtkm::NotZeroInitialized unary_predicate; DerivedAlgorithm::CopyIf(input, stencil, output, unary_predicate); @@ -210,38 +190,36 @@ public: //-------------------------------------------------------------------------- // CopySubRange - template - VTKM_CONT static bool CopySubRange(const vtkm::cont::ArrayHandle &input, - vtkm::Id inputStartIndex, - vtkm::Id numberOfElementsToCopy, - vtkm::cont::ArrayHandle &output, - vtkm::Id outputIndex=0) + template + VTKM_CONT static bool CopySubRange(const vtkm::cont::ArrayHandle& input, + vtkm::Id inputStartIndex, vtkm::Id numberOfElementsToCopy, + vtkm::cont::ArrayHandle& output, + vtkm::Id outputIndex = 0) { - typedef CopyKernel< - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, - typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal> - CopyKernel; + typedef CopyKernel< + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal> + CopyKernel; const vtkm::Id inSize = input.GetNumberOfValues(); - if(inputStartIndex < 0 || - numberOfElementsToCopy < 0 || - outputIndex < 0 || - inputStartIndex >= inSize) - { //invalid parameters + if (inputStartIndex < 0 || numberOfElementsToCopy < 0 || outputIndex < 0 || + inputStartIndex >= inSize) + { //invalid parameters return false; } //determine if the numberOfElementsToCopy needs to be reduced - if(inSize < (inputStartIndex + numberOfElementsToCopy)) - { //adjust the size + if (inSize < (inputStartIndex + numberOfElementsToCopy)) + { //adjust the size numberOfElementsToCopy = (inSize - inputStartIndex); - } + } const vtkm::Id outSize = output.GetNumberOfValues(); const vtkm::Id copyOutEnd = outputIndex + numberOfElementsToCopy; - if(outSize < copyOutEnd) + if (outSize < copyOutEnd) { //output is not large enough - if(outSize == 0) + if (outSize == 0) { //since output has nothing, just need to allocate to correct length output.Allocate(copyOutEnd); } @@ -256,81 +234,73 @@ public: } CopyKernel kernel(input.PrepareForInput(DeviceAdapterTag()), - output.PrepareForInPlace(DeviceAdapterTag()), - inputStartIndex, - outputIndex); + output.PrepareForInPlace(DeviceAdapterTag()), inputStartIndex, outputIndex); DerivedAlgorithm::Schedule(kernel, numberOfElementsToCopy); return true; } //-------------------------------------------------------------------------- // Lower Bounds - template - VTKM_CONT static void LowerBounds( - const vtkm::cont::ArrayHandle &input, - const vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle &output) + template + VTKM_CONT static void LowerBounds(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output) { vtkm::Id arraySize = values.GetNumberOfValues(); - LowerBoundsKernel< - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, - typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal> - kernel(input.PrepareForInput(DeviceAdapterTag()), - values.PrepareForInput(DeviceAdapterTag()), - output.PrepareForOutput(arraySize, DeviceAdapterTag())); + LowerBoundsKernel::template ExecutionTypes< + DeviceAdapterTag>::PortalConst, + typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst, + typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::Portal> + kernel(input.PrepareForInput(DeviceAdapterTag()), values.PrepareForInput(DeviceAdapterTag()), + output.PrepareForOutput(arraySize, DeviceAdapterTag())); DerivedAlgorithm::Schedule(kernel, arraySize); } - template - VTKM_CONT static void LowerBounds( - const vtkm::cont::ArrayHandle &input, - const vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle &output, - BinaryCompare binary_compare) + template + VTKM_CONT static void LowerBounds(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output, + BinaryCompare binary_compare) { vtkm::Id arraySize = values.GetNumberOfValues(); LowerBoundsComparisonKernel< - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, - typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal, - BinaryCompare> - kernel(input.PrepareForInput(DeviceAdapterTag()), - values.PrepareForInput(DeviceAdapterTag()), - output.PrepareForOutput(arraySize, DeviceAdapterTag()), - binary_compare); + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, + typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst, + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal, + BinaryCompare> + kernel(input.PrepareForInput(DeviceAdapterTag()), values.PrepareForInput(DeviceAdapterTag()), + output.PrepareForOutput(arraySize, DeviceAdapterTag()), binary_compare); DerivedAlgorithm::Schedule(kernel, arraySize); } - template - VTKM_CONT static void LowerBounds( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle &values_output) + template + VTKM_CONT static void LowerBounds(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& values_output) { - DeviceAdapterAlgorithmGeneral< - DerivedAlgorithm,DeviceAdapterTag>::LowerBounds(input, - values_output, - values_output); + DeviceAdapterAlgorithmGeneral::LowerBounds( + input, values_output, values_output); } //-------------------------------------------------------------------------- // Reduce - template - VTKM_CONT static U Reduce( - const vtkm::cont::ArrayHandle &input, U initialValue) + template + VTKM_CONT static U Reduce(const vtkm::cont::ArrayHandle& input, U initialValue) { - return DerivedAlgorithm::Reduce(input, initialValue,vtkm::Add()); + return DerivedAlgorithm::Reduce(input, initialValue, vtkm::Add()); } - template - VTKM_CONT static U Reduce( - const vtkm::cont::ArrayHandle &input, - U initialValue, - BinaryFunctor binary_functor) + template + VTKM_CONT static U Reduce(const vtkm::cont::ArrayHandle& input, U initialValue, + BinaryFunctor binary_functor) { //Crazy Idea: //We create a implicit array handle that wraps the input @@ -341,70 +311,56 @@ public: // //Now that we have an implicit array that is 1/16 the length of full array //we can use scan inclusive to compute the final sum - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes - ::PortalConst InputPortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst InputPortalType; - typedef ReduceKernel< - InputPortalType, - U, - BinaryFunctor - > ReduceKernelType; + typedef ReduceKernel ReduceKernelType; - typedef vtkm::cont::ArrayHandleImplicit< - U, - ReduceKernelType > ReduceHandleType; - typedef vtkm::cont::ArrayHandle< - U, - vtkm::cont::StorageTagBasic> TempArrayType; + typedef vtkm::cont::ArrayHandleImplicit ReduceHandleType; + typedef vtkm::cont::ArrayHandle TempArrayType; - ReduceKernelType kernel(input.PrepareForInput( DeviceAdapterTag() ), - initialValue, + ReduceKernelType kernel(input.PrepareForInput(DeviceAdapterTag()), initialValue, binary_functor); vtkm::Id length = (input.GetNumberOfValues() / 16); length += (input.GetNumberOfValues() % 16 == 0) ? 0 : 1; - ReduceHandleType reduced = vtkm::cont::make_ArrayHandleImplicit(kernel, - length); + ReduceHandleType reduced = vtkm::cont::make_ArrayHandleImplicit(kernel, length); TempArrayType inclusiveScanStorage; - const U scanResult = DerivedAlgorithm::ScanInclusive(reduced, - inclusiveScanStorage, - binary_functor); + const U scanResult = + DerivedAlgorithm::ScanInclusive(reduced, inclusiveScanStorage, binary_functor); return scanResult; } //-------------------------------------------------------------------------- // Streaming Reduce - template - VTKM_CONT static U StreamingReduce( - const vtkm::Id numBlocks, - const vtkm::cont::ArrayHandle& input, - U initialValue) + template + VTKM_CONT static U StreamingReduce(const vtkm::Id numBlocks, + const vtkm::cont::ArrayHandle& input, U initialValue) { return DerivedAlgorithm::StreamingReduce(numBlocks, input, initialValue, vtkm::Add()); } - template - VTKM_CONT static U StreamingReduce( - const vtkm::Id numBlocks, - const vtkm::cont::ArrayHandle& input, - U initialValue, - BinaryFunctor binary_functor) + template + VTKM_CONT static U StreamingReduce(const vtkm::Id numBlocks, + const vtkm::cont::ArrayHandle& input, U initialValue, + BinaryFunctor binary_functor) { vtkm::Id fullSize = input.GetNumberOfValues(); vtkm::Id blockSize = fullSize / numBlocks; - if (fullSize % numBlocks != 0) blockSize += 1; + if (fullSize % numBlocks != 0) + blockSize += 1; U lastResult; - for (vtkm::Id block=0; block > streamIn = - vtkm::cont::ArrayHandleStreaming >( - input, block, blockSize, numberOfInstances); + vtkm::cont::ArrayHandleStreaming> streamIn = + vtkm::cont::ArrayHandleStreaming>(input, block, blockSize, + numberOfInstances); if (block == 0) lastResult = DerivedAlgorithm::Reduce(streamIn, initialValue, binary_functor); @@ -416,42 +372,42 @@ public: //-------------------------------------------------------------------------- // Reduce By Key - template - VTKM_CONT static void ReduceByKey( - const vtkm::cont::ArrayHandle &keys, - const vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle &keys_output, - vtkm::cont::ArrayHandle &values_output, - BinaryFunctor binary_functor) + template + VTKM_CONT static void ReduceByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& keys_output, + vtkm::cont::ArrayHandle& values_output, + BinaryFunctor binary_functor) { VTKM_ASSERT(keys.GetNumberOfValues() == values.GetNumberOfValues()); const vtkm::Id numberOfKeys = keys.GetNumberOfValues(); - if(numberOfKeys <= 1) - { //we only have a single key/value so that is our output + if (numberOfKeys <= 1) + { //we only have a single key/value so that is our output DerivedAlgorithm::Copy(keys, keys_output); DerivedAlgorithm::Copy(values, values_output); return; - } + } //we need to determine based on the keys what is the keystate for //each key. The states are start, middle, end of a series and the special //state start and end of a series - vtkm::cont::ArrayHandle< ReduceKeySeriesStates > keystate; + vtkm::cont::ArrayHandle keystate; { - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes - ::PortalConst InputPortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst InputPortalType; - typedef typename vtkm::cont::ArrayHandle< ReduceKeySeriesStates >::template ExecutionTypes - ::Portal KeyStatePortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::Portal KeyStatePortalType; - InputPortalType inputPortal = keys.PrepareForInput(DeviceAdapterTag()); - KeyStatePortalType keyStatePortal = keystate.PrepareForOutput(numberOfKeys, - DeviceAdapterTag()); - ReduceStencilGeneration kernel(inputPortal, keyStatePortal); - DerivedAlgorithm::Schedule(kernel, numberOfKeys); + InputPortalType inputPortal = keys.PrepareForInput(DeviceAdapterTag()); + KeyStatePortalType keyStatePortal = + keystate.PrepareForOutput(numberOfKeys, DeviceAdapterTag()); + ReduceStencilGeneration kernel(inputPortal, + keyStatePortal); + DerivedAlgorithm::Schedule(kernel, numberOfKeys); } //next step is we need to reduce the values for each key. This is done @@ -461,60 +417,50 @@ public: // the value summed currently, the second being 0 or 1, with 1 being used // when this is a value of a key we need to write ( END or START_AND_END) { - typedef vtkm::cont::ArrayHandle ValueInHandleType; - typedef vtkm::cont::ArrayHandle ValueOutHandleType; - typedef vtkm::cont::ArrayHandle< ReduceKeySeriesStates> StencilHandleType; - typedef vtkm::cont::ArrayHandleZip ZipInHandleType; - typedef vtkm::cont::ArrayHandleZip ZipOutHandleType; + typedef vtkm::cont::ArrayHandle ValueInHandleType; + typedef vtkm::cont::ArrayHandle ValueOutHandleType; + typedef vtkm::cont::ArrayHandle StencilHandleType; + typedef vtkm::cont::ArrayHandleZip ZipInHandleType; + typedef vtkm::cont::ArrayHandleZip ZipOutHandleType; - StencilHandleType stencil; - ValueOutHandleType reducedValues; + StencilHandleType stencil; + ValueOutHandleType reducedValues; - ZipInHandleType scanInput( values, keystate); - ZipOutHandleType scanOutput( reducedValues, stencil); + ZipInHandleType scanInput(values, keystate); + ZipOutHandleType scanOutput(reducedValues, stencil); - DerivedAlgorithm::ScanInclusive(scanInput, - scanOutput, - ReduceByKeyAdd(binary_functor) ); + DerivedAlgorithm::ScanInclusive(scanInput, scanOutput, + ReduceByKeyAdd(binary_functor)); - //at this point we are done with keystate, so free the memory - keystate.ReleaseResources(); + //at this point we are done with keystate, so free the memory + keystate.ReleaseResources(); - // all we need know is an efficient way of doing the write back to the - // reduced global memory. this is done by using CopyIf with the - // stencil and values we just created with the inclusive scan - DerivedAlgorithm::CopyIf( reducedValues, - stencil, - values_output, - ReduceByKeyUnaryStencilOp()); + // all we need know is an efficient way of doing the write back to the + // reduced global memory. this is done by using CopyIf with the + // stencil and values we just created with the inclusive scan + DerivedAlgorithm::CopyIf(reducedValues, stencil, values_output, ReduceByKeyUnaryStencilOp()); } //release all temporary memory - //find all the unique keys - DerivedAlgorithm::Copy(keys,keys_output); + DerivedAlgorithm::Copy(keys, keys_output); DerivedAlgorithm::Unique(keys_output); } //-------------------------------------------------------------------------- // Scan Exclusive - template - VTKM_CONT static T ScanExclusive( - const vtkm::cont::ArrayHandle& input, - vtkm::cont::ArrayHandle& output, - BinaryFunctor binaryFunctor, - const T& initialValue) + template + VTKM_CONT static T ScanExclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output, + BinaryFunctor binaryFunctor, const T& initialValue) { - typedef vtkm::cont::ArrayHandle - TempArrayType; - typedef vtkm::cont::ArrayHandle OutputArrayType; + typedef vtkm::cont::ArrayHandle TempArrayType; + typedef vtkm::cont::ArrayHandle OutputArrayType; - typedef typename TempArrayType::template ExecutionTypes - ::PortalConst SrcPortalType; - typedef typename OutputArrayType::template ExecutionTypes - ::Portal DestPortalType; + typedef + typename TempArrayType::template ExecutionTypes::PortalConst SrcPortalType; + typedef + typename OutputArrayType::template ExecutionTypes::Portal DestPortalType; vtkm::Id numValues = input.GetNumberOfValues(); if (numValues <= 0) @@ -525,21 +471,18 @@ public: TempArrayType inclusiveScan; T result = DerivedAlgorithm::ScanInclusive(input, inclusiveScan, binaryFunctor); - InclusiveToExclusiveKernel - inclusiveToExclusive(inclusiveScan.PrepareForInput(DeviceAdapterTag()), - output.PrepareForOutput(numValues, DeviceAdapterTag()), - binaryFunctor, - initialValue); + InclusiveToExclusiveKernel inclusiveToExclusive( + inclusiveScan.PrepareForInput(DeviceAdapterTag()), + output.PrepareForOutput(numValues, DeviceAdapterTag()), binaryFunctor, initialValue); DerivedAlgorithm::Schedule(inclusiveToExclusive, numValues); return binaryFunctor(initialValue, result); } - template - VTKM_CONT static T ScanExclusive( - const vtkm::cont::ArrayHandle& input, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static T ScanExclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output) { return DerivedAlgorithm::ScanExclusive(input, output, vtkm::Sum(), vtkm::TypeTraits::ZeroInitialization()); @@ -547,14 +490,11 @@ public: //-------------------------------------------------------------------------- // Scan Exclusive By Key - template - VTKM_CONT static void ScanExclusiveByKey( - const vtkm::cont::ArrayHandle& keys, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output, - const U& initialValue, - BinaryFunctor binaryFunctor) + template + VTKM_CONT static void ScanExclusiveByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output, + const U& initialValue, BinaryFunctor binaryFunctor) { VTKM_ASSERT(keys.GetNumberOfValues() == values.GetNumberOfValues()); @@ -576,107 +516,104 @@ public: //we need to determine based on the keys what is the keystate for //each key. The states are start, middle, end of a series and the special //state start and end of a series - vtkm::cont::ArrayHandle< ReduceKeySeriesStates > keystate; + vtkm::cont::ArrayHandle keystate; { - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes - ::PortalConst InputPortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst InputPortalType; - typedef typename vtkm::cont::ArrayHandle< ReduceKeySeriesStates >::template ExecutionTypes - ::Portal KeyStatePortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::Portal KeyStatePortalType; InputPortalType inputPortal = keys.PrepareForInput(DeviceAdapterTag()); - KeyStatePortalType keyStatePortal = keystate.PrepareForOutput(numberOfKeys, - DeviceAdapterTag()); - ReduceStencilGeneration kernel(inputPortal, keyStatePortal); + KeyStatePortalType keyStatePortal = + keystate.PrepareForOutput(numberOfKeys, DeviceAdapterTag()); + ReduceStencilGeneration kernel(inputPortal, + keyStatePortal); DerivedAlgorithm::Schedule(kernel, numberOfKeys); } // 2. Shift input and initialize elements at head flags position to initValue - typedef typename vtkm::cont::ArrayHandle TempArrayType; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal TempPortalType; + typedef typename vtkm::cont::ArrayHandle TempArrayType; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::Portal TempPortalType; TempArrayType temp; { - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes - ::PortalConst InputPortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst InputPortalType; - typedef typename vtkm::cont::ArrayHandle< ReduceKeySeriesStates >::template ExecutionTypes - ::PortalConst KeyStatePortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst KeyStatePortalType; InputPortalType inputPortal = values.PrepareForInput(DeviceAdapterTag()); KeyStatePortalType keyStatePortal = keystate.PrepareForInput(DeviceAdapterTag()); - TempPortalType tempPortal = temp.PrepareForOutput(numberOfKeys, - DeviceAdapterTag()); + TempPortalType tempPortal = temp.PrepareForOutput(numberOfKeys, DeviceAdapterTag()); - ShiftCopyAndInit - kernel(inputPortal, keyStatePortal, tempPortal, initialValue); + ShiftCopyAndInit kernel( + inputPortal, keyStatePortal, tempPortal, initialValue); DerivedAlgorithm::Schedule(kernel, numberOfKeys); } // 3. Perform a ScanInclusiveByKey DerivedAlgorithm::ScanInclusiveByKey(keys, temp, output, binaryFunctor); } - template - VTKM_CONT static void ScanExclusiveByKey( - const vtkm::cont::ArrayHandle& keys, - const vtkm::cont::ArrayHandle& values, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static void ScanExclusiveByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output) { DerivedAlgorithm::ScanExclusiveByKey(keys, values, output, - vtkm::TypeTraits::ZeroInitialization(), - vtkm::Sum()); + vtkm::TypeTraits::ZeroInitialization(), vtkm::Sum()); } //-------------------------------------------------------------------------- // Streaming exclusive scan - template - VTKM_CONT static T StreamingScanExclusive( - const vtkm::Id numBlocks, - const vtkm::cont::ArrayHandle& input, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static T StreamingScanExclusive(const vtkm::Id numBlocks, + const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output) { - return DerivedAlgorithm::StreamingScanExclusive(numBlocks, - input, - output, - vtkm::Sum(), + return DerivedAlgorithm::StreamingScanExclusive(numBlocks, input, output, vtkm::Sum(), vtkm::TypeTraits::ZeroInitialization()); } - template - VTKM_CONT static T StreamingScanExclusive( - const vtkm::Id numBlocks, - const vtkm::cont::ArrayHandle& input, - vtkm::cont::ArrayHandle& output, - BinaryFunctor binary_functor, - const T& initialValue) + template + VTKM_CONT static T StreamingScanExclusive(const vtkm::Id numBlocks, + const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output, + BinaryFunctor binary_functor, const T& initialValue) { vtkm::Id fullSize = input.GetNumberOfValues(); vtkm::Id blockSize = fullSize / numBlocks; - if (fullSize % numBlocks != 0) blockSize += 1; + if (fullSize % numBlocks != 0) + blockSize += 1; T lastResult; - for (vtkm::Id block=0; block > streamIn = - vtkm::cont::ArrayHandleStreaming >( - input, block, blockSize, numberOfInstances); + vtkm::cont::ArrayHandleStreaming> streamIn = + vtkm::cont::ArrayHandleStreaming>(input, block, blockSize, + numberOfInstances); - vtkm::cont::ArrayHandleStreaming > streamOut = - vtkm::cont::ArrayHandleStreaming >( - output, block, blockSize, numberOfInstances); + vtkm::cont::ArrayHandleStreaming> streamOut = + vtkm::cont::ArrayHandleStreaming>(output, block, blockSize, + numberOfInstances); if (block == 0) { streamOut.AllocateFullArray(fullSize); - lastResult = DerivedAlgorithm::ScanExclusive(streamIn, streamOut, binary_functor, initialValue); + lastResult = + DerivedAlgorithm::ScanExclusive(streamIn, streamOut, binary_functor, initialValue); } else { - lastResult = DerivedAlgorithm::ScanExclusive(streamIn, streamOut, binary_functor, lastResult); + lastResult = + DerivedAlgorithm::ScanExclusive(streamIn, streamOut, binary_functor, lastResult); } streamOut.SyncControlArray(); @@ -686,27 +623,23 @@ public: //-------------------------------------------------------------------------- // Scan Inclusive - template - VTKM_CONT static T ScanInclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static T ScanInclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output) { - return DerivedAlgorithm::ScanInclusive(input, - output, - vtkm::Add()); + return DerivedAlgorithm::ScanInclusive(input, output, vtkm::Add()); } - template - VTKM_CONT static T ScanInclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output, - BinaryFunctor binary_functor) + template + VTKM_CONT static T ScanInclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output, + BinaryFunctor binary_functor) { - typedef typename - vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal PortalType; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal + PortalType; - typedef ScanKernel ScanKernelType; + typedef ScanKernel ScanKernelType; DerivedAlgorithm::Copy(input, output); @@ -719,46 +652,40 @@ public: PortalType portal = output.PrepareForInPlace(DeviceAdapterTag()); vtkm::Id stride; - for (stride = 2; stride-1 < numValues; stride *= 2) + for (stride = 2; stride - 1 < numValues; stride *= 2) { - ScanKernelType kernel(portal, binary_functor, stride, stride/2 - 1); - DerivedAlgorithm::Schedule(kernel, numValues/stride); + ScanKernelType kernel(portal, binary_functor, stride, stride / 2 - 1); + DerivedAlgorithm::Schedule(kernel, numValues / stride); } // Do reverse operation on odd indices. Start at stride we were just at. for (stride /= 2; stride > 1; stride /= 2) { ScanKernelType kernel(portal, binary_functor, stride, stride - 1); - DerivedAlgorithm::Schedule(kernel, numValues/stride); + DerivedAlgorithm::Schedule(kernel, numValues / stride); } - return GetExecutionValue(output, numValues-1); + return GetExecutionValue(output, numValues - 1); } - template - VTKM_CONT static void ScanInclusiveByKey( - const vtkm::cont::ArrayHandle &keys, - const vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle &values_output) + template + VTKM_CONT static void ScanInclusiveByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& values_output) { - return DerivedAlgorithm::ScanInclusiveByKey(keys, - values, - values_output, - vtkm::Add()); + return DerivedAlgorithm::ScanInclusiveByKey(keys, values, values_output, vtkm::Add()); } - template - VTKM_CONT static void ScanInclusiveByKey( - const vtkm::cont::ArrayHandle &keys, - const vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle &values_output, - BinaryFunctor binary_functor) + template + VTKM_CONT static void ScanInclusiveByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& values_output, + BinaryFunctor binary_functor) { VTKM_ASSERT(keys.GetNumberOfValues() == values.GetNumberOfValues()); const vtkm::Id numberOfKeys = keys.GetNumberOfValues(); - if(numberOfKeys <= 1) + if (numberOfKeys <= 1) { //we only have a single key/value so that is our output DerivedAlgorithm::Copy(values, values_output); return; @@ -767,19 +694,20 @@ public: //we need to determine based on the keys what is the keystate for //each key. The states are start, middle, end of a series and the special //state start and end of a series - vtkm::cont::ArrayHandle< ReduceKeySeriesStates > keystate; + vtkm::cont::ArrayHandle keystate; { - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes - ::PortalConst InputPortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst InputPortalType; - typedef typename vtkm::cont::ArrayHandle< ReduceKeySeriesStates >::template ExecutionTypes - ::Portal KeyStatePortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::Portal KeyStatePortalType; InputPortalType inputPortal = keys.PrepareForInput(DeviceAdapterTag()); - KeyStatePortalType keyStatePortal = keystate.PrepareForOutput(numberOfKeys, - DeviceAdapterTag()); - ReduceStencilGeneration kernel(inputPortal, keyStatePortal); + KeyStatePortalType keyStatePortal = + keystate.PrepareForOutput(numberOfKeys, DeviceAdapterTag()); + ReduceStencilGeneration kernel(inputPortal, + keyStatePortal); DerivedAlgorithm::Schedule(kernel, numberOfKeys); } @@ -793,10 +721,8 @@ public: typedef vtkm::cont::ArrayHandle ValueInHandleType; typedef vtkm::cont::ArrayHandle ValueOutHandleType; typedef vtkm::cont::ArrayHandle StencilHandleType; - typedef vtkm::cont::ArrayHandleZip ZipInHandleType; - typedef vtkm::cont::ArrayHandleZip ZipOutHandleType; + typedef vtkm::cont::ArrayHandleZip ZipInHandleType; + typedef vtkm::cont::ArrayHandleZip ZipOutHandleType; StencilHandleType stencil; ValueOutHandleType reducedValues; @@ -804,10 +730,8 @@ public: ZipInHandleType scanInput(values, keystate); ZipOutHandleType scanOutput(reducedValues, stencil); - DerivedAlgorithm::ScanInclusive(scanInput, - scanOutput, - ReduceByKeyAdd( - binary_functor)); + DerivedAlgorithm::ScanInclusive(scanInput, scanOutput, + ReduceByKeyAdd(binary_functor)); //at this point we are done with keystate, so free the memory keystate.ReleaseResources(); DerivedAlgorithm::Copy(reducedValues, values_output); @@ -816,44 +740,44 @@ public: //-------------------------------------------------------------------------- // Sort - template - VTKM_CONT static void Sort( - vtkm::cont::ArrayHandle &values, - BinaryCompare binary_compare) + template + VTKM_CONT static void Sort(vtkm::cont::ArrayHandle& values, + BinaryCompare binary_compare) { - typedef typename vtkm::cont::ArrayHandle ArrayType; - typedef typename ArrayType::template ExecutionTypes - ::Portal PortalType; + typedef typename vtkm::cont::ArrayHandle ArrayType; + typedef typename ArrayType::template ExecutionTypes::Portal PortalType; vtkm::Id numValues = values.GetNumberOfValues(); - if (numValues < 2) { return; } + if (numValues < 2) + { + return; + } PortalType portal = values.PrepareForInPlace(DeviceAdapterTag()); vtkm::Id numThreads = 1; - while (numThreads < numValues) { numThreads *= 2; } + while (numThreads < numValues) + { + numThreads *= 2; + } numThreads /= 2; - typedef BitonicSortMergeKernel MergeKernel; - typedef BitonicSortCrossoverKernel CrossoverKernel; + typedef BitonicSortMergeKernel MergeKernel; + typedef BitonicSortCrossoverKernel CrossoverKernel; - for (vtkm::Id crossoverSize = 1; - crossoverSize < numValues; - crossoverSize *= 2) + for (vtkm::Id crossoverSize = 1; crossoverSize < numValues; crossoverSize *= 2) { - DerivedAlgorithm::Schedule(CrossoverKernel(portal,binary_compare,crossoverSize), + DerivedAlgorithm::Schedule(CrossoverKernel(portal, binary_compare, crossoverSize), numThreads); - for (vtkm::Id mergeSize = crossoverSize/2; mergeSize > 0; mergeSize /= 2) + for (vtkm::Id mergeSize = crossoverSize / 2; mergeSize > 0; mergeSize /= 2) { - DerivedAlgorithm::Schedule(MergeKernel(portal,binary_compare,mergeSize), - numThreads); + DerivedAlgorithm::Schedule(MergeKernel(portal, binary_compare, mergeSize), numThreads); } } } - template - VTKM_CONT static void Sort( - vtkm::cont::ArrayHandle &values) + template + VTKM_CONT static void Sort(vtkm::cont::ArrayHandle& values) { DerivedAlgorithm::Sort(values, DefaultCompareFunctor()); } @@ -861,76 +785,68 @@ public: //-------------------------------------------------------------------------- // Sort by Key public: - - template - VTKM_CONT static void SortByKey( - vtkm::cont::ArrayHandle &keys, - vtkm::cont::ArrayHandle &values) + template + VTKM_CONT static void SortByKey(vtkm::cont::ArrayHandle& keys, + vtkm::cont::ArrayHandle& values) { //combine the keys and values into a ZipArrayHandle //we than need to specify a custom compare function wrapper //that only checks for key side of the pair, using a custom compare functor. - typedef vtkm::cont::ArrayHandle KeyType; - typedef vtkm::cont::ArrayHandle ValueType; - typedef vtkm::cont::ArrayHandleZip ZipHandleType; + typedef vtkm::cont::ArrayHandle KeyType; + typedef vtkm::cont::ArrayHandle ValueType; + typedef vtkm::cont::ArrayHandleZip ZipHandleType; - ZipHandleType zipHandle = - vtkm::cont::make_ArrayHandleZip(keys,values); - DerivedAlgorithm::Sort(zipHandle,internal::KeyCompare()); + ZipHandleType zipHandle = vtkm::cont::make_ArrayHandleZip(keys, values); + DerivedAlgorithm::Sort(zipHandle, internal::KeyCompare()); } - template - VTKM_CONT static void SortByKey( - vtkm::cont::ArrayHandle &keys, - vtkm::cont::ArrayHandle &values, - BinaryCompare binary_compare) + template + VTKM_CONT static void SortByKey(vtkm::cont::ArrayHandle& keys, + vtkm::cont::ArrayHandle& values, + BinaryCompare binary_compare) { //combine the keys and values into a ZipArrayHandle //we than need to specify a custom compare function wrapper //that only checks for key side of the pair, using the custom compare //functor that the user passed in - typedef vtkm::cont::ArrayHandle KeyType; - typedef vtkm::cont::ArrayHandle ValueType; - typedef vtkm::cont::ArrayHandleZip ZipHandleType; + typedef vtkm::cont::ArrayHandle KeyType; + typedef vtkm::cont::ArrayHandle ValueType; + typedef vtkm::cont::ArrayHandleZip ZipHandleType; - ZipHandleType zipHandle = - vtkm::cont::make_ArrayHandleZip(keys,values); - DerivedAlgorithm::Sort(zipHandle,internal::KeyCompare(binary_compare)); + ZipHandleType zipHandle = vtkm::cont::make_ArrayHandleZip(keys, values); + DerivedAlgorithm::Sort(zipHandle, internal::KeyCompare(binary_compare)); } //-------------------------------------------------------------------------- // Unique - template - VTKM_CONT static void Unique( - vtkm::cont::ArrayHandle &values) + template + VTKM_CONT static void Unique(vtkm::cont::ArrayHandle& values) { Unique(values, std::equal_to()); } - template - VTKM_CONT static void Unique( - vtkm::cont::ArrayHandle &values, - BinaryCompare binary_compare) + template + VTKM_CONT static void Unique(vtkm::cont::ArrayHandle& values, + BinaryCompare binary_compare) { - vtkm::cont::ArrayHandle - stencilArray; + vtkm::cont::ArrayHandle stencilArray; vtkm::Id inputSize = values.GetNumberOfValues(); - typedef internal::WrappedBinaryOperator WrappedBOpType; + typedef internal::WrappedBinaryOperator WrappedBOpType; WrappedBOpType wrappedCompare(binary_compare); ClassifyUniqueComparisonKernel< - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, - typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal, - WrappedBOpType> - classifyKernel(values.PrepareForInput(DeviceAdapterTag()), - stencilArray.PrepareForOutput(inputSize, DeviceAdapterTag()), - wrappedCompare); + typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst, + typename vtkm::cont::ArrayHandle< + vtkm::Id, vtkm::cont::StorageTagBasic>::template ExecutionTypes::Portal, + WrappedBOpType> + classifyKernel(values.PrepareForInput(DeviceAdapterTag()), + stencilArray.PrepareForOutput(inputSize, DeviceAdapterTag()), wrappedCompare); DerivedAlgorithm::Schedule(classifyKernel, inputSize); - vtkm::cont::ArrayHandle - outputArray; + vtkm::cont::ArrayHandle outputArray; DerivedAlgorithm::CopyIf(values, stencilArray, outputArray); @@ -940,65 +856,63 @@ public: //-------------------------------------------------------------------------- // Upper bounds - template - VTKM_CONT static void UpperBounds( - const vtkm::cont::ArrayHandle &input, - const vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle &output) + template + VTKM_CONT static void UpperBounds(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output) { vtkm::Id arraySize = values.GetNumberOfValues(); - UpperBoundsKernel< - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, - typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal> - kernel(input.PrepareForInput(DeviceAdapterTag()), - values.PrepareForInput(DeviceAdapterTag()), - output.PrepareForOutput(arraySize, DeviceAdapterTag())); + UpperBoundsKernel::template ExecutionTypes< + DeviceAdapterTag>::PortalConst, + typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst, + typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::Portal> + kernel(input.PrepareForInput(DeviceAdapterTag()), values.PrepareForInput(DeviceAdapterTag()), + output.PrepareForOutput(arraySize, DeviceAdapterTag())); DerivedAlgorithm::Schedule(kernel, arraySize); } - template - VTKM_CONT static void UpperBounds( - const vtkm::cont::ArrayHandle &input, - const vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle &output, - BinaryCompare binary_compare) + template + VTKM_CONT static void UpperBounds(const vtkm::cont::ArrayHandle& input, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& output, + BinaryCompare binary_compare) { vtkm::Id arraySize = values.GetNumberOfValues(); UpperBoundsKernelComparisonKernel< - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, - typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal, - BinaryCompare> - kernel(input.PrepareForInput(DeviceAdapterTag()), - values.PrepareForInput(DeviceAdapterTag()), - output.PrepareForOutput(arraySize, DeviceAdapterTag()), - binary_compare); + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst, + typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapterTag>::PortalConst, + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal, + BinaryCompare> + kernel(input.PrepareForInput(DeviceAdapterTag()), values.PrepareForInput(DeviceAdapterTag()), + output.PrepareForOutput(arraySize, DeviceAdapterTag()), binary_compare); DerivedAlgorithm::Schedule(kernel, arraySize); } - template - VTKM_CONT static void UpperBounds( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle &values_output) + template + VTKM_CONT static void UpperBounds(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& values_output) { - DeviceAdapterAlgorithmGeneral::UpperBounds(input, values_output, values_output); + DeviceAdapterAlgorithmGeneral::UpperBounds( + input, values_output, values_output); } - }; - - } } } // namespace vtkm::cont::internal -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// \brief Class providing a device-specific atomic interface. /// /// The class provide the actual implementation used by vtkm::exec::AtomicArray. @@ -1007,14 +921,14 @@ namespace cont { /// /// Serial requires no form of atomicity /// -template +template class DeviceAdapterAtomicArrayImplementation { public: VTKM_CONT DeviceAdapterAtomicArrayImplementation( - vtkm::cont::ArrayHandle handle): - Iterators( IteratorsType( handle.PrepareForInPlace(DeviceTag()) ) ) + vtkm::cont::ArrayHandle handle) + : Iterators(IteratorsType(handle.PrepareForInPlace(DeviceTag()))) { } @@ -1025,11 +939,11 @@ public: #if defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL > 0 typedef typename vtkm::cont::ArrayPortalToIterators::IteratorType IteratorType; typename IteratorType::pointer temp = - &(*(Iterators.GetBegin() + static_cast(index))); + &(*(Iterators.GetBegin() + static_cast(index))); lockedValue = temp; return vtkmAtomicAdd(lockedValue, value); #else - lockedValue = (Iterators.GetBegin()+index); + lockedValue = (Iterators.GetBegin() + index); return vtkmAtomicAdd(lockedValue, value); #endif } @@ -1041,75 +955,80 @@ public: #if defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL > 0 typedef typename vtkm::cont::ArrayPortalToIterators::IteratorType IteratorType; typename IteratorType::pointer temp = - &(*(Iterators.GetBegin()+static_cast(index))); + &(*(Iterators.GetBegin() + static_cast(index))); lockedValue = temp; return vtkmCompareAndSwap(lockedValue, newValue, oldValue); #else - lockedValue = (Iterators.GetBegin()+index); + lockedValue = (Iterators.GetBegin() + index); return vtkmCompareAndSwap(lockedValue, newValue, oldValue); #endif } private: - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal PortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceTag>::Portal PortalType; typedef vtkm::cont::ArrayPortalToIterators IteratorsType; IteratorsType Iterators; #if defined(VTKM_MSVC) //MSVC atomics VTKM_EXEC - vtkm::Int32 vtkmAtomicAdd(vtkm::Int32 *address, const vtkm::Int32 &value) const + vtkm::Int32 vtkmAtomicAdd(vtkm::Int32* address, const vtkm::Int32& value) const { - return InterlockedExchangeAdd(reinterpret_cast(address),value); + return InterlockedExchangeAdd(reinterpret_cast(address), value); } VTKM_EXEC - vtkm::Int64 vtkmAtomicAdd(vtkm::Int64 *address, const vtkm::Int64 &value) const + vtkm::Int64 vtkmAtomicAdd(vtkm::Int64* address, const vtkm::Int64& value) const { - return InterlockedExchangeAdd64(reinterpret_cast(address),value); + return InterlockedExchangeAdd64(reinterpret_cast(address), value); } VTKM_EXEC - vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32 *address, const vtkm::Int32 &newValue, const vtkm::Int32 &oldValue) const + vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32* address, const vtkm::Int32& newValue, + const vtkm::Int32& oldValue) const { - return InterlockedCompareExchange(reinterpret_cast(address),newValue,oldValue); + return InterlockedCompareExchange(reinterpret_cast(address), newValue, + oldValue); } VTKM_EXEC - vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64 *address,const vtkm::Int64 &newValue, const vtkm::Int64 &oldValue) const + vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64* address, const vtkm::Int64& newValue, + const vtkm::Int64& oldValue) const { - return InterlockedCompareExchange64(reinterpret_cast(address),newValue, oldValue); + return InterlockedCompareExchange64(reinterpret_cast(address), newValue, + oldValue); } #else //gcc built-in atomics VTKM_EXEC - vtkm::Int32 vtkmAtomicAdd(vtkm::Int32 *address, const vtkm::Int32 &value) const + vtkm::Int32 vtkmAtomicAdd(vtkm::Int32* address, const vtkm::Int32& value) const { - return __sync_fetch_and_add(address,value); + return __sync_fetch_and_add(address, value); } VTKM_EXEC - vtkm::Int64 vtkmAtomicAdd(vtkm::Int64 *address, const vtkm::Int64 &value) const + vtkm::Int64 vtkmAtomicAdd(vtkm::Int64* address, const vtkm::Int64& value) const { - return __sync_fetch_and_add(address,value); + return __sync_fetch_and_add(address, value); } VTKM_EXEC - vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32 *address, const vtkm::Int32 &newValue, const vtkm::Int32 &oldValue) const + vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32* address, const vtkm::Int32& newValue, + const vtkm::Int32& oldValue) const { - return __sync_val_compare_and_swap(address,oldValue, newValue); + return __sync_val_compare_and_swap(address, oldValue, newValue); } VTKM_EXEC - vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64 *address,const vtkm::Int64 &newValue, const vtkm::Int64 &oldValue) const + vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64* address, const vtkm::Int64& newValue, + const vtkm::Int64& oldValue) const { - return __sync_val_compare_and_swap(address,oldValue,newValue); + return __sync_val_compare_and_swap(address, oldValue, newValue); } #endif }; - } } // namespace vtkm::cont diff --git a/vtkm/cont/internal/DeviceAdapterTag.h b/vtkm/cont/internal/DeviceAdapterTag.h index 1bd2a2717..1a4dd009e 100644 --- a/vtkm/cont/internal/DeviceAdapterTag.h +++ b/vtkm/cont/internal/DeviceAdapterTag.h @@ -27,88 +27,90 @@ #include -#define VTKM_DEVICE_ADAPTER_ERROR -2 +#define VTKM_DEVICE_ADAPTER_ERROR -2 #define VTKM_DEVICE_ADAPTER_UNDEFINED -1 -#define VTKM_DEVICE_ADAPTER_SERIAL 1 -#define VTKM_DEVICE_ADAPTER_CUDA 2 -#define VTKM_DEVICE_ADAPTER_TBB 3 +#define VTKM_DEVICE_ADAPTER_SERIAL 1 +#define VTKM_DEVICE_ADAPTER_CUDA 2 +#define VTKM_DEVICE_ADAPTER_TBB 3 -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ typedef vtkm::Int8 DeviceAdapterId; typedef std::string DeviceAdapterNameType; -template +template struct DeviceAdapterTraits; -template +template struct DeviceAdapterTagCheck { static const bool Valid = false; }; - } } /// Creates a tag named vtkm::cont::DeviceAdapterTagName and associated MPL /// structures to use this tag. Always use this macro (in the base namespace) /// when creating a device adapter. -#define VTKM_VALID_DEVICE_ADAPTER(Name, Id) \ - namespace vtkm { \ - namespace cont { \ - struct VTKM_ALWAYS_EXPORT DeviceAdapterTag##Name { }; \ - template<> \ - struct DeviceAdapterTraits { \ - static DeviceAdapterId GetId() { \ - return DeviceAdapterId(Id); \ - } \ - static DeviceAdapterNameType GetName() { \ - return DeviceAdapterNameType(#Name); \ - } \ - static const bool Valid = true;\ - }; \ - template<> \ - struct DeviceAdapterTagCheck { \ - static const bool Valid = true; \ - }; \ - } \ +#define VTKM_VALID_DEVICE_ADAPTER(Name, Id) \ + namespace vtkm \ + { \ + namespace cont \ + { \ + struct VTKM_ALWAYS_EXPORT DeviceAdapterTag##Name \ + { \ + }; \ + template <> \ + struct DeviceAdapterTraits \ + { \ + static DeviceAdapterId GetId() { return DeviceAdapterId(Id); } \ + static DeviceAdapterNameType GetName() { return DeviceAdapterNameType(#Name); } \ + static const bool Valid = true; \ + }; \ + template <> \ + struct DeviceAdapterTagCheck \ + { \ + static const bool Valid = true; \ + }; \ + } \ } /// Marks the tag named vtkm::cont::DeviceAdapterTagName and associated /// structures as invalid to use. Always use this macro (in the base namespace) /// when creating a device adapter. -#define VTKM_INVALID_DEVICE_ADAPTER(Name, Id) \ - namespace vtkm { \ - namespace cont { \ - struct DeviceAdapterTag##Name { }; \ - template<> \ - struct DeviceAdapterTraits { \ - static DeviceAdapterId GetId() { \ - return DeviceAdapterId(Id); \ - } \ - static DeviceAdapterNameType GetName() { \ - return DeviceAdapterNameType(#Name); \ - } \ - static const bool Valid = false;\ - }; \ - template<> \ - struct DeviceAdapterTagCheck { \ - static const bool Valid = false; \ - }; \ - } \ +#define VTKM_INVALID_DEVICE_ADAPTER(Name, Id) \ + namespace vtkm \ + { \ + namespace cont \ + { \ + struct DeviceAdapterTag##Name \ + { \ + }; \ + template <> \ + struct DeviceAdapterTraits \ + { \ + static DeviceAdapterId GetId() { return DeviceAdapterId(Id); } \ + static DeviceAdapterNameType GetName() { return DeviceAdapterNameType(#Name); } \ + static const bool Valid = false; \ + }; \ + template <> \ + struct DeviceAdapterTagCheck \ + { \ + static const bool Valid = false; \ + }; \ + } \ } - - /// Checks that the argument is a proper device adapter tag. This is a handy /// concept check for functions and classes to make sure that a template /// argument is actually a device adapter tag. (You can get weird errors /// elsewhere in the code when a mistake is made.) /// -#define VTKM_IS_DEVICE_ADAPTER_TAG(tag) \ - VTKM_STATIC_ASSERT_MSG( \ - ::vtkm::cont::DeviceAdapterTagCheck::Valid, \ - "Provided type is not a valid VTK-m device adapter tag.") +#define VTKM_IS_DEVICE_ADAPTER_TAG(tag) \ + VTKM_STATIC_ASSERT_MSG(::vtkm::cont::DeviceAdapterTagCheck::Valid, \ + "Provided type is not a valid VTK-m device adapter tag.") #endif //vtk_m_cont_internal_DeviceAdapterTag_h diff --git a/vtkm/cont/internal/DynamicTransform.h b/vtkm/cont/internal/DynamicTransform.h index f1b338c77..a2724b132 100644 --- a/vtkm/cont/internal/DynamicTransform.h +++ b/vtkm/cont/internal/DynamicTransform.h @@ -22,20 +22,27 @@ #include "vtkm/internal/IndexTag.h" -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -template class ArrayHandle; -template class CellSetStructured; -template class CellSetSingleType; -template class CellSetExplicit; -template class CellSetPermutation; +template +class ArrayHandle; +template +class CellSetStructured; +template +class CellSetSingleType; +template +class CellSetExplicit; +template +class CellSetPermutation; /// A Generic interface to CastAndCall. The default implementation simply calls /// DynamicObject's CastAndCall, but specializations of this function exist for /// other classes (e.g. Field, CoordinateSystem, ArrayHandle). -template -void CastAndCall(const DynamicObject& dynamicObject, const Functor &f) +template +void CastAndCall(const DynamicObject& dynamicObject, const Functor& f) { dynamicObject.CastAndCall(f); } @@ -43,8 +50,8 @@ void CastAndCall(const DynamicObject& dynamicObject, const Functor &f) /// A specialization of CastAndCall for basic ArrayHandle types, /// Since the type is already known no deduction is needed. /// This specialization is used to simplify numerous worklet algorithms -template -void CastAndCall(const vtkm::cont::ArrayHandle& handle, const Functor &f) +template +void CastAndCall(const vtkm::cont::ArrayHandle& handle, const Functor& f) { f(handle); } @@ -52,8 +59,8 @@ void CastAndCall(const vtkm::cont::ArrayHandle& handle, const Functor &f) /// A specialization of CastAndCall for basic CellSetStructured types, /// Since the type is already known no deduction is needed. /// This specialization is used to simplify numerous worklet algorithms -template -void CastAndCall(const vtkm::cont::CellSetStructured& cellset, const Functor &f) +template +void CastAndCall(const vtkm::cont::CellSetStructured& cellset, const Functor& f) { f(cellset); } @@ -61,8 +68,9 @@ void CastAndCall(const vtkm::cont::CellSetStructured& cellset, const Functo /// A specialization of CastAndCall for basic CellSetSingleType types, /// Since the type is already known no deduction is needed. /// This specialization is used to simplify numerous worklet algorithms -template -void CastAndCall(const vtkm::cont::CellSetSingleType& cellset, const Functor &f) +template +void CastAndCall(const vtkm::cont::CellSetSingleType& cellset, + const Functor& f) { f(cellset); } @@ -70,8 +78,8 @@ void CastAndCall(const vtkm::cont::CellSetSingleType& ce /// A specialization of CastAndCall for basic CellSetExplicit types, /// Since the type is already known no deduction is needed. /// This specialization is used to simplify numerous worklet algorithms -template -void CastAndCall(const vtkm::cont::CellSetExplicit& cellset, const Functor &f) +template +void CastAndCall(const vtkm::cont::CellSetExplicit& cellset, const Functor& f) { f(cellset); } @@ -79,25 +87,30 @@ void CastAndCall(const vtkm::cont::CellSetExplicit& cellset, const Func /// A specialization of CastAndCall for basic CellSetPermutation types, /// Since the type is already known no deduction is needed. /// This specialization is used to simplify numerous worklet algorithms -template -void CastAndCall(const vtkm::cont::CellSetPermutation& cellset, const Functor &f) +template +void CastAndCall(const vtkm::cont::CellSetPermutation& cellset, + const Functor& f) { f(cellset); } - -namespace internal { +namespace internal +{ /// Tag used to identify an object that is a dynamic object that contains a /// CastAndCall method that iterates over all possible dynamic choices to run /// templated code. /// -struct DynamicTransformTagCastAndCall { }; +struct DynamicTransformTagCastAndCall +{ +}; /// Tag used to identify an object that is a static object that, when used with /// a \c DynamicTransform should just pass itself as a concrete object. /// -struct DynamicTransformTagStatic { }; +struct DynamicTransformTagStatic +{ +}; /// A traits class that identifies whether an object used in a \c /// DynamicTransform should use a \c CastAndCall functionality or treated as a @@ -107,8 +120,9 @@ struct DynamicTransformTagStatic { }; /// to identify the object as dynamic. VTK-m classes like \c DynamicArray are /// already specialized. /// -template -struct DynamicTransformTraits { +template +struct DynamicTransformTraits +{ /// A type set to either \c DynamicTransformTagStatic or \c /// DynamicTransformTagCastAndCall. The default implementation is set to \c /// DynamicTransformTagStatic. Dynamic objects that implement \c CastAndCall @@ -124,40 +138,30 @@ struct DynamicTransformTraits { /// struct DynamicTransform { - template - VTKM_CONT - void operator()(const InputType &input, - const ContinueFunctor &continueFunc, - vtkm::internal::IndexTag) const + template + VTKM_CONT void operator()(const InputType& input, const ContinueFunctor& continueFunc, + vtkm::internal::IndexTag) const { this->DoTransform( - input, - continueFunc, - typename vtkm::cont::internal::DynamicTransformTraits::DynamicTag()); + input, continueFunc, + typename vtkm::cont::internal::DynamicTransformTraits::DynamicTag()); } private: - template - VTKM_CONT - void DoTransform(const InputType &input, - const ContinueFunctor &continueFunc, - vtkm::cont::internal::DynamicTransformTagStatic) const + template + VTKM_CONT void DoTransform(const InputType& input, const ContinueFunctor& continueFunc, + vtkm::cont::internal::DynamicTransformTagStatic) const { continueFunc(input); } - template - VTKM_CONT - void DoTransform(const InputType &dynamicInput, - const ContinueFunctor &continueFunc, - vtkm::cont::internal::DynamicTransformTagCastAndCall) const + template + VTKM_CONT void DoTransform(const InputType& dynamicInput, const ContinueFunctor& continueFunc, + vtkm::cont::internal::DynamicTransformTagCastAndCall) const { CastAndCall(dynamicInput, continueFunc); } }; - } } } // namespace vtkm::cont::internal diff --git a/vtkm/cont/internal/FunctorsGeneral.h b/vtkm/cont/internal/FunctorsGeneral.h index 34c70861c..377dd902e 100644 --- a/vtkm/cont/internal/FunctorsGeneral.h +++ b/vtkm/cont/internal/FunctorsGeneral.h @@ -29,95 +29,97 @@ #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ // Binary function object wrapper which can detect and handle calling the // wrapped operator with complex value types such as // IteratorFromArrayPortalValue which happen when passed an input array that // is implicit. -template +template struct WrappedBinaryOperator { Function m_f; - VTKM_CONT - WrappedBinaryOperator(const Function &f) + VTKM_CONT + WrappedBinaryOperator(const Function& f) : m_f(f) - {} + { + } - template - VTKM_CONT ResultType operator()(const Argument1 &x, const Argument2 &y) const + template + VTKM_CONT ResultType operator()(const Argument1& x, const Argument2& y) const { return m_f(x, y); } - template - VTKM_CONT ResultType operator()( - const vtkm::internal::ArrayPortalValueReference &x, - const vtkm::internal::ArrayPortalValueReference &y) const + template + VTKM_CONT ResultType + operator()(const vtkm::internal::ArrayPortalValueReference& x, + const vtkm::internal::ArrayPortalValueReference& y) const { - using ValueTypeX = - typename vtkm::internal::ArrayPortalValueReference::ValueType; - using ValueTypeY = - typename vtkm::internal::ArrayPortalValueReference::ValueType; - return m_f( (ValueTypeX)x, (ValueTypeY)y ); + using ValueTypeX = typename vtkm::internal::ArrayPortalValueReference::ValueType; + using ValueTypeY = typename vtkm::internal::ArrayPortalValueReference::ValueType; + return m_f((ValueTypeX)x, (ValueTypeY)y); } - template - VTKM_CONT ResultType operator()( - const Argument1 &x, - const vtkm::internal::ArrayPortalValueReference &y) const + template + VTKM_CONT ResultType operator()( + const Argument1& x, const vtkm::internal::ArrayPortalValueReference& y) const { - using ValueTypeY = - typename vtkm::internal::ArrayPortalValueReference::ValueType; - return m_f( x, (ValueTypeY)y ); + using ValueTypeY = typename vtkm::internal::ArrayPortalValueReference::ValueType; + return m_f(x, (ValueTypeY)y); } - template - VTKM_CONT ResultType operator()( - const vtkm::internal::ArrayPortalValueReference &x, - const Argument2 &y) const + template + VTKM_CONT ResultType operator()(const vtkm::internal::ArrayPortalValueReference& x, + const Argument2& y) const { - using ValueTypeX = - typename vtkm::internal::ArrayPortalValueReference::ValueType; - return m_f( (ValueTypeX)x, y ); + using ValueTypeX = typename vtkm::internal::ArrayPortalValueReference::ValueType; + return m_f((ValueTypeX)x, y); } - }; //needs to be in a location that TBB DeviceAdapterAlgorithm can reach struct DefaultCompareFunctor { - template - VTKM_EXEC - bool operator()(const T& first, const T& second) const + template + VTKM_EXEC bool operator()(const T& first, const T& second) const { return first < second; } }; //needs to be in a location that TBB DeviceAdapterAlgorithm can reach -template +template struct KeyCompare { - KeyCompare(): CompareFunctor() {} - explicit KeyCompare(BinaryCompare c): CompareFunctor(c) {} + KeyCompare() + : CompareFunctor() + { + } + explicit KeyCompare(BinaryCompare c) + : CompareFunctor(c) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - bool operator()(const vtkm::Pair& a, const vtkm::Pair& b) const + bool operator()(const vtkm::Pair& a, const vtkm::Pair& b) const { - return CompareFunctor(a.first,b.first); + return CompareFunctor(a.first, b.first); } + private: BinaryCompare CompareFunctor; }; - -template +template struct ReduceKernel : vtkm::exec::FunctorBase { PortalConstType Portal; @@ -127,22 +129,21 @@ struct ReduceKernel : vtkm::exec::FunctorBase VTKM_CONT ReduceKernel() - : Portal(), - InitialValue(), - BinaryOperator(), - PortalLength(0) + : Portal() + , InitialValue() + , BinaryOperator() + , PortalLength(0) { } VTKM_CONT - ReduceKernel(const PortalConstType &portal, - T initialValue, - BinaryFunctor binary_functor) - : Portal(portal), - InitialValue(initialValue), - BinaryOperator(binary_functor), - PortalLength( portal.GetNumberOfValues() ) - { } + ReduceKernel(const PortalConstType& portal, T initialValue, BinaryFunctor binary_functor) + : Portal(portal) + , InitialValue(initialValue) + , BinaryOperator(binary_functor) + , PortalLength(portal.GetNumberOfValues()) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -151,62 +152,59 @@ struct ReduceKernel : vtkm::exec::FunctorBase const vtkm::Id reduceWidth = 16; const vtkm::Id offset = index * reduceWidth; - if( offset + reduceWidth >= this->PortalLength ) - { + if (offset + reduceWidth >= this->PortalLength) + { //This will only occur for a single index value, so this is the case //that needs to handle the initialValue - T partialSum = BinaryOperator(this->InitialValue, - this->Portal.Get( offset ) - ); + T partialSum = BinaryOperator(this->InitialValue, this->Portal.Get(offset)); vtkm::Id currentIndex = offset + 1; - while( currentIndex < this->PortalLength) - { + while (currentIndex < this->PortalLength) + { partialSum = BinaryOperator(partialSum, this->Portal.Get(currentIndex)); ++currentIndex; - } - return partialSum; } + return partialSum; + } else - { + { //optimize the usecase where all values are valid and we don't //need to check that we might go out of bounds - T partialSum = BinaryOperator(this->Portal.Get( offset ), - this->Portal.Get( offset+1 ) - ); - for(int i=2; i < reduceWidth; ++i) - { - partialSum = BinaryOperator(partialSum, - this->Portal.Get( offset + i ) - ); - } - return partialSum; + T partialSum = BinaryOperator(this->Portal.Get(offset), this->Portal.Get(offset + 1)); + for (int i = 2; i < reduceWidth; ++i) + { + partialSum = BinaryOperator(partialSum, this->Portal.Get(offset + i)); } + return partialSum; + } } }; - struct ReduceKeySeriesStates { - bool fStart; // START of a segment - bool fEnd; // END of a segment + bool fStart; // START of a segment + bool fEnd; // END of a segment VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ReduceKeySeriesStates(bool start=false, bool end=false) : fStart(start), fEnd(end) {} + ReduceKeySeriesStates(bool start = false, bool end = false) + : fStart(start) + , fEnd(end) + { + } }; -template +template struct ReduceStencilGeneration : vtkm::exec::FunctorBase { InputPortalType Input; KeyStatePortalType KeyState; VTKM_CONT - ReduceStencilGeneration(const InputPortalType &input, - const KeyStatePortalType &kstate) - : Input(input), - KeyState(kstate) - { } + ReduceStencilGeneration(const InputPortalType& input, const KeyStatePortalType& kstate) + : Input(input) + , KeyState(kstate) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -228,8 +226,8 @@ struct ReduceStencilGeneration : vtkm::exec::FunctorBase //we don't have to worry about an array of length 1, as //the calling code handles that use case - if(centerIndex == 0) - { + if (centerIndex == 0) + { //this means we are at the start of the array //means we are automatically START //just need to check if we are END @@ -237,18 +235,18 @@ struct ReduceStencilGeneration : vtkm::exec::FunctorBase const ValueType rightValue = this->Input.Get(rightIndex); const KeyStateType state = ReduceKeySeriesStates(true, rightValue != centerValue); this->KeyState.Set(centerIndex, state); - } - else if(rightIndex == this->Input.GetNumberOfValues()) - { + } + else if (rightIndex == this->Input.GetNumberOfValues()) + { //this means we are at the end, so we are at least END //just need to check if we are START const ValueType centerValue = this->Input.Get(centerIndex); const ValueType leftValue = this->Input.Get(leftIndex); const KeyStateType state = ReduceKeySeriesStates(leftValue != centerValue, true); this->KeyState.Set(centerIndex, state); - } + } else - { + { const ValueType centerValue = this->Input.Get(centerIndex); const bool leftMatches(this->Input.Get(leftIndex) == centerValue); const bool rightMatches(this->Input.Get(rightIndex) == centerValue); @@ -256,51 +254,50 @@ struct ReduceStencilGeneration : vtkm::exec::FunctorBase //assume it is the middle, and check for the other use-case KeyStateType state = ReduceKeySeriesStates(!leftMatches, !rightMatches); this->KeyState.Set(centerIndex, state); - } + } } }; -template +template struct ReduceByKeyAdd { BinaryFunctor BinaryOperator; - ReduceByKeyAdd(BinaryFunctor binary_functor): - BinaryOperator( binary_functor ) - { } - - template - vtkm::Pair operator()(const vtkm::Pair& a, - const vtkm::Pair& b) const + ReduceByKeyAdd(BinaryFunctor binary_functor) + : BinaryOperator(binary_functor) { - typedef vtkm::Pair ReturnType; - //need too handle how we are going to add two numbers together - //based on the keyStates that they have + } - // Make it work for parallel inclusive scan. Will end up with all start bits = 1 - // the following logic should change if you use a different parallel scan algorithm. - if (!b.second.fStart) { + template + vtkm::Pair operator()( + const vtkm::Pair& a, + const vtkm::Pair& b) const + { + typedef vtkm::Pair ReturnType; + //need too handle how we are going to add two numbers together + //based on the keyStates that they have + + // Make it work for parallel inclusive scan. Will end up with all start bits = 1 + // the following logic should change if you use a different parallel scan algorithm. + if (!b.second.fStart) + { // if b is not START, then it's safe to sum a & b. // Propagate a's start flag to b // so that later when b's START bit is set, it means there must exists a START between a and b - return ReturnType(this->BinaryOperator(a.first , b.first), + return ReturnType(this->BinaryOperator(a.first, b.first), ReduceKeySeriesStates(a.second.fStart, b.second.fEnd)); - } - return b; + } + return b; } }; struct ReduceByKeyUnaryStencilOp { - bool operator()(ReduceKeySeriesStates keySeriesState) const - { - return keySeriesState.fEnd; - } - + bool operator()(ReduceKeySeriesStates keySeriesState) const { return keySeriesState.fEnd; } }; -template +template struct ShiftCopyAndInit : vtkm::exec::FunctorBase { InputPortalType Input; @@ -308,25 +305,29 @@ struct ShiftCopyAndInit : vtkm::exec::FunctorBase OutputPortalType Output; T initValue; - ShiftCopyAndInit(const InputPortalType& _input, - const KeyStatePortalType &kstate, - OutputPortalType& _output, - T _init) : Input(_input), - KeyState(kstate), - Output(_output), - initValue(_init) {} + ShiftCopyAndInit(const InputPortalType& _input, const KeyStatePortalType& kstate, + OutputPortalType& _output, T _init) + : Input(_input) + , KeyState(kstate) + , Output(_output) + , initValue(_init) + { + } void operator()(vtkm::Id index) const { - if (this->KeyState.Get(index).fStart) { + if (this->KeyState.Get(index).fStart) + { Output.Set(index, initValue); - } else { - Output.Set(index, Input.Get(index-1)); + } + else + { + Output.Set(index, Input.Get(index - 1)); } } }; -template +template struct CopyKernel { InputPortalType InputPortal; @@ -335,33 +336,29 @@ struct CopyKernel vtkm::Id OutputOffset; VTKM_CONT - CopyKernel(InputPortalType inputPortal, - OutputPortalType outputPortal, - vtkm::Id inputOffset = 0, + CopyKernel(InputPortalType inputPortal, OutputPortalType outputPortal, vtkm::Id inputOffset = 0, vtkm::Id outputOffset = 0) - : InputPortal(inputPortal), - OutputPortal(outputPortal), - InputOffset(inputOffset), - OutputOffset(outputOffset) - { } + : InputPortal(inputPortal) + , OutputPortal(outputPortal) + , InputOffset(inputOffset) + , OutputOffset(outputOffset) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT void operator()(vtkm::Id index) const { typedef typename OutputPortalType::ValueType ValueType; - this->OutputPortal.Set( - index + this->OutputOffset, - static_cast( - this->InputPortal.Get(index + this->InputOffset)) ); + this->OutputPortal.Set(index + this->OutputOffset, static_cast(this->InputPortal.Get( + index + this->InputOffset))); } VTKM_CONT - void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer &) - { } + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} }; -template +template struct LowerBoundsKernel { InputPortalType InputPortal; @@ -369,12 +366,13 @@ struct LowerBoundsKernel OutputPortalType OutputPortal; VTKM_CONT - LowerBoundsKernel(InputPortalType inputPortal, - ValuesPortalType valuesPortal, + LowerBoundsKernel(InputPortalType inputPortal, ValuesPortalType valuesPortal, OutputPortalType outputPortal) - : InputPortal(inputPortal), - ValuesPortal(valuesPortal), - OutputPortal(outputPortal) { } + : InputPortal(inputPortal) + , ValuesPortal(valuesPortal) + , OutputPortal(outputPortal) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -387,27 +385,22 @@ struct LowerBoundsKernel // necessarily true, but it is true for the current uses of this general // function and I don't want to compete with STL if I don't have to. - typedef vtkm::cont::ArrayPortalToIterators - InputIteratorsType; + typedef vtkm::cont::ArrayPortalToIterators InputIteratorsType; InputIteratorsType inputIterators(this->InputPortal); - typename InputIteratorsType::IteratorType resultPos = - std::lower_bound(inputIterators.GetBegin(), - inputIterators.GetEnd(), - this->ValuesPortal.Get(index)); + typename InputIteratorsType::IteratorType resultPos = std::lower_bound( + inputIterators.GetBegin(), inputIterators.GetEnd(), this->ValuesPortal.Get(index)); vtkm::Id resultIndex = - static_cast( - std::distance(inputIterators.GetBegin(), resultPos)); + static_cast(std::distance(inputIterators.GetBegin(), resultPos)); this->OutputPortal.Set(index, resultIndex); } VTKM_CONT - void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer &) - { } + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} }; -template +template struct LowerBoundsComparisonKernel { InputPortalType InputPortal; @@ -416,14 +409,14 @@ struct LowerBoundsComparisonKernel BinaryCompare CompareFunctor; VTKM_CONT - LowerBoundsComparisonKernel(InputPortalType inputPortal, - ValuesPortalType valuesPortal, - OutputPortalType outputPortal, - BinaryCompare binary_compare) - : InputPortal(inputPortal), - ValuesPortal(valuesPortal), - OutputPortal(outputPortal), - CompareFunctor(binary_compare) { } + LowerBoundsComparisonKernel(InputPortalType inputPortal, ValuesPortalType valuesPortal, + OutputPortalType outputPortal, BinaryCompare binary_compare) + : InputPortal(inputPortal) + , ValuesPortal(valuesPortal) + , OutputPortal(outputPortal) + , CompareFunctor(binary_compare) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -436,28 +429,22 @@ struct LowerBoundsComparisonKernel // necessarily true, but it is true for the current uses of this general // function and I don't want to compete with STL if I don't have to. - typedef vtkm::cont::ArrayPortalToIterators - InputIteratorsType; + typedef vtkm::cont::ArrayPortalToIterators InputIteratorsType; InputIteratorsType inputIterators(this->InputPortal); typename InputIteratorsType::IteratorType resultPos = - std::lower_bound(inputIterators.GetBegin(), - inputIterators.GetEnd(), - this->ValuesPortal.Get(index), - this->CompareFunctor); + std::lower_bound(inputIterators.GetBegin(), inputIterators.GetEnd(), + this->ValuesPortal.Get(index), this->CompareFunctor); vtkm::Id resultIndex = - static_cast( - std::distance(inputIterators.GetBegin(), resultPos)); + static_cast(std::distance(inputIterators.GetBegin(), resultPos)); this->OutputPortal.Set(index, resultIndex); } VTKM_CONT - void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer &) - { } + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} }; - -template +template struct SetConstantKernel { typedef typename PortalType::ValueType ValueType; @@ -465,22 +452,21 @@ struct SetConstantKernel ValueType Value; VTKM_CONT - SetConstantKernel(const PortalType &portal, ValueType value) - : Portal(portal), Value(value) { } + SetConstantKernel(const PortalType& portal, ValueType value) + : Portal(portal) + , Value(value) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - void operator()(vtkm::Id index) const - { - this->Portal.Set(index, this->Value); - } + void operator()(vtkm::Id index) const { this->Portal.Set(index, this->Value); } VTKM_CONT - void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer &) - { } + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} }; -template +template struct BitonicSortMergeKernel : vtkm::exec::FunctorBase { PortalType Portal; @@ -488,10 +474,12 @@ struct BitonicSortMergeKernel : vtkm::exec::FunctorBase vtkm::Id GroupSize; VTKM_CONT - BitonicSortMergeKernel(const PortalType &portal, - const BinaryCompare &compare, - vtkm::Id groupSize) - : Portal(portal), Compare(compare), GroupSize(groupSize) { } + BitonicSortMergeKernel(const PortalType& portal, const BinaryCompare& compare, vtkm::Id groupSize) + : Portal(portal) + , Compare(compare) + , GroupSize(groupSize) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -499,9 +487,9 @@ struct BitonicSortMergeKernel : vtkm::exec::FunctorBase { typedef typename PortalType::ValueType ValueType; - vtkm::Id groupIndex = index%this->GroupSize; - vtkm::Id blockSize = 2*this->GroupSize; - vtkm::Id blockIndex = index/this->GroupSize; + vtkm::Id groupIndex = index % this->GroupSize; + vtkm::Id blockSize = 2 * this->GroupSize; + vtkm::Id blockIndex = index / this->GroupSize; vtkm::Id lowIndex = blockIndex * blockSize + groupIndex; vtkm::Id highIndex = lowIndex + this->GroupSize; @@ -519,7 +507,7 @@ struct BitonicSortMergeKernel : vtkm::exec::FunctorBase } }; -template +template struct BitonicSortCrossoverKernel : vtkm::exec::FunctorBase { PortalType Portal; @@ -527,10 +515,13 @@ struct BitonicSortCrossoverKernel : vtkm::exec::FunctorBase vtkm::Id GroupSize; VTKM_CONT - BitonicSortCrossoverKernel(const PortalType &portal, - const BinaryCompare &compare, + BitonicSortCrossoverKernel(const PortalType& portal, const BinaryCompare& compare, vtkm::Id groupSize) - : Portal(portal), Compare(compare), GroupSize(groupSize) { } + : Portal(portal) + , Compare(compare) + , GroupSize(groupSize) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -538,12 +529,12 @@ struct BitonicSortCrossoverKernel : vtkm::exec::FunctorBase { typedef typename PortalType::ValueType ValueType; - vtkm::Id groupIndex = index%this->GroupSize; - vtkm::Id blockSize = 2*this->GroupSize; - vtkm::Id blockIndex = index/this->GroupSize; + vtkm::Id groupIndex = index % this->GroupSize; + vtkm::Id blockSize = 2 * this->GroupSize; + vtkm::Id blockIndex = index / this->GroupSize; - vtkm::Id lowIndex = blockIndex*blockSize + groupIndex; - vtkm::Id highIndex = blockIndex*blockSize + (blockSize - groupIndex - 1); + vtkm::Id lowIndex = blockIndex * blockSize + groupIndex; + vtkm::Id highIndex = blockIndex * blockSize + (blockSize - groupIndex - 1); if (highIndex < this->Portal.GetNumberOfValues()) { @@ -558,9 +549,7 @@ struct BitonicSortCrossoverKernel : vtkm::exec::FunctorBase } }; -template +template struct StencilToIndexFlagKernel { typedef typename StencilPortalType::ValueType StencilValueType; @@ -569,12 +558,13 @@ struct StencilToIndexFlagKernel UnaryPredicate Predicate; VTKM_CONT - StencilToIndexFlagKernel(StencilPortalType stencilPortal, - OutputPortalType outputPortal, + StencilToIndexFlagKernel(StencilPortalType stencilPortal, OutputPortalType outputPortal, UnaryPredicate unary_predicate) - : StencilPortal(stencilPortal), - OutputPortal(outputPortal), - Predicate(unary_predicate) { } + : StencilPortal(stencilPortal) + , OutputPortal(outputPortal) + , Predicate(unary_predicate) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -585,15 +575,11 @@ struct StencilToIndexFlagKernel } VTKM_CONT - void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer &) - { } + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} }; -template +template struct CopyIfKernel { InputPortalType InputPortal; @@ -603,16 +589,16 @@ struct CopyIfKernel PredicateOperator Predicate; VTKM_CONT - CopyIfKernel(InputPortalType inputPortal, - StencilPortalType stencilPortal, - IndexPortalType indexPortal, - OutputPortalType outputPortal, + CopyIfKernel(InputPortalType inputPortal, StencilPortalType stencilPortal, + IndexPortalType indexPortal, OutputPortalType outputPortal, PredicateOperator unary_predicate) - : InputPortal(inputPortal), - StencilPortal(stencilPortal), - IndexPortal(indexPortal), - OutputPortal(outputPortal), - Predicate(unary_predicate) { } + : InputPortal(inputPortal) + , StencilPortal(stencilPortal) + , IndexPortal(indexPortal) + , OutputPortal(outputPortal) + , Predicate(unary_predicate) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -621,31 +607,32 @@ struct CopyIfKernel typedef typename StencilPortalType::ValueType StencilValueType; StencilValueType stencilValue = this->StencilPortal.Get(index); if (Predicate(stencilValue)) - { + { vtkm::Id outputIndex = this->IndexPortal.Get(index); typedef typename OutputPortalType::ValueType OutputValueType; OutputValueType value = this->InputPortal.Get(index); this->OutputPortal.Set(outputIndex, value); - } + } } VTKM_CONT - void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer &) - { } + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} }; -template +template struct ClassifyUniqueKernel { InputPortalType InputPortal; StencilPortalType StencilPortal; VTKM_CONT - ClassifyUniqueKernel(InputPortalType inputPortal, - StencilPortalType stencilPortal) - : InputPortal(inputPortal), StencilPortal(stencilPortal) { } + ClassifyUniqueKernel(InputPortalType inputPortal, StencilPortalType stencilPortal) + : InputPortal(inputPortal) + , StencilPortal(stencilPortal) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -659,18 +646,16 @@ struct ClassifyUniqueKernel } else { - ValueType flag = ValueType(this->InputPortal.Get(index-1) - != this->InputPortal.Get(index)); + ValueType flag = ValueType(this->InputPortal.Get(index - 1) != this->InputPortal.Get(index)); this->StencilPortal.Set(index, flag); } } VTKM_CONT - void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer &) - { } + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} }; -template +template struct ClassifyUniqueComparisonKernel { InputPortalType InputPortal; @@ -678,12 +663,13 @@ struct ClassifyUniqueComparisonKernel BinaryCompare CompareFunctor; VTKM_CONT - ClassifyUniqueComparisonKernel(InputPortalType inputPortal, - StencilPortalType stencilPortal, - BinaryCompare binary_compare): - InputPortal(inputPortal), - StencilPortal(stencilPortal), - CompareFunctor(binary_compare) { } + ClassifyUniqueComparisonKernel(InputPortalType inputPortal, StencilPortalType stencilPortal, + BinaryCompare binary_compare) + : InputPortal(inputPortal) + , StencilPortal(stencilPortal) + , CompareFunctor(binary_compare) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -698,19 +684,18 @@ struct ClassifyUniqueComparisonKernel else { //comparison predicate returns true when they match - const bool same = !(this->CompareFunctor(this->InputPortal.Get(index-1), - this->InputPortal.Get(index))); + const bool same = + !(this->CompareFunctor(this->InputPortal.Get(index - 1), this->InputPortal.Get(index))); ValueType flag = ValueType(same); this->StencilPortal.Set(index, flag); } } VTKM_CONT - void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer &) - { } + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} }; -template +template struct UpperBoundsKernel { InputPortalType InputPortal; @@ -718,12 +703,13 @@ struct UpperBoundsKernel OutputPortalType OutputPortal; VTKM_CONT - UpperBoundsKernel(InputPortalType inputPortal, - ValuesPortalType valuesPortal, + UpperBoundsKernel(InputPortalType inputPortal, ValuesPortalType valuesPortal, OutputPortalType outputPortal) - : InputPortal(inputPortal), - ValuesPortal(valuesPortal), - OutputPortal(outputPortal) { } + : InputPortal(inputPortal) + , ValuesPortal(valuesPortal) + , OutputPortal(outputPortal) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -736,27 +722,22 @@ struct UpperBoundsKernel // necessarily true, but it is true for the current uses of this general // function and I don't want to compete with STL if I don't have to. - typedef vtkm::cont::ArrayPortalToIterators - InputIteratorsType; + typedef vtkm::cont::ArrayPortalToIterators InputIteratorsType; InputIteratorsType inputIterators(this->InputPortal); - typename InputIteratorsType::IteratorType resultPos = - std::upper_bound(inputIterators.GetBegin(), - inputIterators.GetEnd(), - this->ValuesPortal.Get(index)); + typename InputIteratorsType::IteratorType resultPos = std::upper_bound( + inputIterators.GetBegin(), inputIterators.GetEnd(), this->ValuesPortal.Get(index)); vtkm::Id resultIndex = - static_cast( - std::distance(inputIterators.GetBegin(), resultPos)); + static_cast(std::distance(inputIterators.GetBegin(), resultPos)); this->OutputPortal.Set(index, resultIndex); } VTKM_CONT - void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer &) - { } + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} }; - -template +template struct UpperBoundsKernelComparisonKernel { InputPortalType InputPortal; @@ -765,14 +746,14 @@ struct UpperBoundsKernelComparisonKernel BinaryCompare CompareFunctor; VTKM_CONT - UpperBoundsKernelComparisonKernel(InputPortalType inputPortal, - ValuesPortalType valuesPortal, - OutputPortalType outputPortal, - BinaryCompare binary_compare) - : InputPortal(inputPortal), - ValuesPortal(valuesPortal), - OutputPortal(outputPortal), - CompareFunctor(binary_compare) { } + UpperBoundsKernelComparisonKernel(InputPortalType inputPortal, ValuesPortalType valuesPortal, + OutputPortalType outputPortal, BinaryCompare binary_compare) + : InputPortal(inputPortal) + , ValuesPortal(valuesPortal) + , OutputPortal(outputPortal) + , CompareFunctor(binary_compare) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -785,24 +766,19 @@ struct UpperBoundsKernelComparisonKernel // necessarily true, but it is true for the current uses of this general // function and I don't want to compete with STL if I don't have to. - typedef vtkm::cont::ArrayPortalToIterators - InputIteratorsType; + typedef vtkm::cont::ArrayPortalToIterators InputIteratorsType; InputIteratorsType inputIterators(this->InputPortal); typename InputIteratorsType::IteratorType resultPos = - std::upper_bound(inputIterators.GetBegin(), - inputIterators.GetEnd(), - this->ValuesPortal.Get(index), - this->CompareFunctor); + std::upper_bound(inputIterators.GetBegin(), inputIterators.GetEnd(), + this->ValuesPortal.Get(index), this->CompareFunctor); vtkm::Id resultIndex = - static_cast( - std::distance(inputIterators.GetBegin(), resultPos)); + static_cast(std::distance(inputIterators.GetBegin(), resultPos)); this->OutputPortal.Set(index, resultIndex); } VTKM_CONT - void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer &) - { } + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} }; template @@ -816,27 +792,27 @@ struct InclusiveToExclusiveKernel : vtkm::exec::FunctorBase ValueType InitialValue; VTKM_CONT - InclusiveToExclusiveKernel(const InPortalType &inPortal, - const OutPortalType &outPortal, - BinaryFunctor &binaryOperator, - ValueType initialValue) - : InPortal(inPortal), - OutPortal(outPortal), - BinaryOperator(binaryOperator), - InitialValue(initialValue) - { } + InclusiveToExclusiveKernel(const InPortalType& inPortal, const OutPortalType& outPortal, + BinaryFunctor& binaryOperator, ValueType initialValue) + : InPortal(inPortal) + , OutPortal(outPortal) + , BinaryOperator(binaryOperator) + , InitialValue(initialValue) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC void operator()(vtkm::Id index) const { - ValueType result = (index == 0) ? this->InitialValue : - this->BinaryOperator(this->InitialValue, this->InPortal.Get(index - 1)); + ValueType result = (index == 0) + ? this->InitialValue + : this->BinaryOperator(this->InitialValue, this->InPortal.Get(index - 1)); this->OutPortal.Set(index, result); } }; -template +template struct ScanKernel : vtkm::exec::FunctorBase { PortalType Portal; @@ -846,14 +822,15 @@ struct ScanKernel : vtkm::exec::FunctorBase vtkm::Id Distance; VTKM_CONT - ScanKernel(const PortalType &portal, BinaryFunctor binary_functor, - vtkm::Id stride, vtkm::Id offset) - : Portal(portal), - BinaryOperator(binary_functor), - Stride(stride), - Offset(offset), - Distance(stride/2) - { } + ScanKernel(const PortalType& portal, BinaryFunctor binary_functor, vtkm::Id stride, + vtkm::Id offset) + : Portal(portal) + , BinaryOperator(binary_functor) + , Stride(stride) + , Offset(offset) + , Distance(stride / 2) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -861,18 +838,17 @@ struct ScanKernel : vtkm::exec::FunctorBase { typedef typename PortalType::ValueType ValueType; - vtkm::Id leftIndex = this->Offset + index*this->Stride; + vtkm::Id leftIndex = this->Offset + index * this->Stride; vtkm::Id rightIndex = leftIndex + this->Distance; if (rightIndex < this->Portal.GetNumberOfValues()) { ValueType leftValue = this->Portal.Get(leftIndex); ValueType rightValue = this->Portal.Get(rightIndex); - this->Portal.Set(rightIndex, BinaryOperator(leftValue,rightValue) ); + this->Portal.Set(rightIndex, BinaryOperator(leftValue, rightValue)); } } }; - } } } // namespace vtkm::cont::internal diff --git a/vtkm/cont/internal/IteratorFromArrayPortal.h b/vtkm/cont/internal/IteratorFromArrayPortal.h index 6911e11e2..512c2d3df 100644 --- a/vtkm/cont/internal/IteratorFromArrayPortal.h +++ b/vtkm/cont/internal/IteratorFromArrayPortal.h @@ -24,16 +24,18 @@ #include #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ -template +template class IteratorFromArrayPortal { public: - using value_type = - typename std::remove_const::type; + using value_type = typename std::remove_const::type; using reference = vtkm::internal::ArrayPortalValueReference; using pointer = typename std::add_pointer::type; @@ -44,29 +46,26 @@ public: using iter = IteratorFromArrayPortal; IteratorFromArrayPortal() - : Portal(), Index(0) { } + : Portal() + , Index(0) + { + } - explicit IteratorFromArrayPortal(const ArrayPortalType &portal, - vtkm::Id index = 0) - : Portal(portal), Index(index) + explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0) + : Portal(portal) + , Index(index) { VTKM_ASSERT(index >= 0); VTKM_ASSERT(index <= portal.GetNumberOfValues()); } - reference operator*() const - { - return reference(this->Portal,this->Index); - } + reference operator*() const { return reference(this->Portal, this->Index); } - reference operator->() const - { - return reference(this->Portal, this->Index); - } + reference operator->() const { return reference(this->Portal, this->Index); } reference operator[](difference_type idx) const { - return reference(this->Portal, this->Index + static_cast(idx) ); + return reference(this->Portal, this->Index + static_cast(idx)); } iter& operator++() @@ -76,10 +75,7 @@ public: return *this; } - iter operator++(int) - { - return iter(this->Portal, this->Index++); - } + iter operator++(int) { return iter(this->Portal, this->Index++); } iter& operator--() { @@ -88,10 +84,7 @@ public: return *this; } - iter operator--(int) - { - return iter(this->Portal, this->Index--); - } + iter operator--(int) { return iter(this->Portal, this->Index--); } iter& operator+=(difference_type n) { @@ -116,99 +109,84 @@ public: vtkm::Id Index; }; -template -IteratorFromArrayPortal make_IteratorBegin( - const ArrayPortalType &portal) +template +IteratorFromArrayPortal make_IteratorBegin(const ArrayPortalType& portal) { return IteratorFromArrayPortal(portal, 0); } -template -IteratorFromArrayPortal make_IteratorEnd( - const ArrayPortalType &portal) +template +IteratorFromArrayPortal make_IteratorEnd(const ArrayPortalType& portal) { - return IteratorFromArrayPortal(portal, - portal.GetNumberOfValues()); + return IteratorFromArrayPortal(portal, portal.GetNumberOfValues()); } - template -bool -operator==(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, - vtkm::cont::internal::IteratorFromArrayPortal const& rhs) +bool operator==(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, + vtkm::cont::internal::IteratorFromArrayPortal const& rhs) { return lhs.Index == rhs.Index; } template -bool -operator!=(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, - vtkm::cont::internal::IteratorFromArrayPortal const& rhs) +bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, + vtkm::cont::internal::IteratorFromArrayPortal const& rhs) { return lhs.Index != rhs.Index; } template -bool -operator<(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, - vtkm::cont::internal::IteratorFromArrayPortal const& rhs) +bool operator<(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, + vtkm::cont::internal::IteratorFromArrayPortal const& rhs) { return lhs.Index < rhs.Index; } template -bool -operator<=(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, - vtkm::cont::internal::IteratorFromArrayPortal const& rhs) +bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, + vtkm::cont::internal::IteratorFromArrayPortal const& rhs) { return lhs.Index <= rhs.Index; } template -bool -operator>(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, - vtkm::cont::internal::IteratorFromArrayPortal const& rhs) +bool operator>(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, + vtkm::cont::internal::IteratorFromArrayPortal const& rhs) { return lhs.Index > rhs.Index; } template -bool -operator>=(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, - vtkm::cont::internal::IteratorFromArrayPortal const& rhs) +bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, + vtkm::cont::internal::IteratorFromArrayPortal const& rhs) { return lhs.Index >= rhs.Index; } template -std::ptrdiff_t -operator-(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, - vtkm::cont::internal::IteratorFromArrayPortal const& rhs) +std::ptrdiff_t operator-(vtkm::cont::internal::IteratorFromArrayPortal const& lhs, + vtkm::cont::internal::IteratorFromArrayPortal const& rhs) { return lhs.Index - rhs.Index; } template -vtkm::cont::internal::IteratorFromArrayPortal -operator+(vtkm::cont::internal::IteratorFromArrayPortal const& iter, - std::ptrdiff_t n) +vtkm::cont::internal::IteratorFromArrayPortal operator+( + vtkm::cont::internal::IteratorFromArrayPortal const& iter, std::ptrdiff_t n) { - return vtkm::cont::internal::IteratorFromArrayPortal( - iter.Portal, iter.Index + static_cast(n)); + return vtkm::cont::internal::IteratorFromArrayPortal(iter.Portal, iter.Index + + static_cast(n)); } template -vtkm::cont::internal::IteratorFromArrayPortal -operator+(std::ptrdiff_t n, - vtkm::cont::internal::IteratorFromArrayPortal const& iter) +vtkm::cont::internal::IteratorFromArrayPortal operator+( + std::ptrdiff_t n, vtkm::cont::internal::IteratorFromArrayPortal const& iter) { - return vtkm::cont::internal::IteratorFromArrayPortal( - iter.Portal, iter.Index + static_cast(n)); + return vtkm::cont::internal::IteratorFromArrayPortal(iter.Portal, iter.Index + + static_cast(n)); } - } } } // namespace vtkm::cont::internal - #endif //vtk_m_cont_internal_IteratorFromArrayPortal_h diff --git a/vtkm/cont/internal/SimplePolymorphicContainer.cxx b/vtkm/cont/internal/SimplePolymorphicContainer.cxx index 37faf6fc8..ce7d84c29 100644 --- a/vtkm/cont/internal/SimplePolymorphicContainer.cxx +++ b/vtkm/cont/internal/SimplePolymorphicContainer.cxx @@ -20,20 +20,20 @@ #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ SimplePolymorphicContainerBase::SimplePolymorphicContainerBase() { - } SimplePolymorphicContainerBase::~SimplePolymorphicContainerBase() { - } - } } } // namespace vtkm::cont::internal diff --git a/vtkm/cont/internal/SimplePolymorphicContainer.h b/vtkm/cont/internal/SimplePolymorphicContainer.h index cb401a560..b1e59e004 100644 --- a/vtkm/cont/internal/SimplePolymorphicContainer.h +++ b/vtkm/cont/internal/SimplePolymorphicContainer.h @@ -25,22 +25,25 @@ #include #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ /// \brief Base class for SimplePolymorphicContainer /// -struct VTKM_CONT_EXPORT SimplePolymorphicContainerBase { +struct VTKM_CONT_EXPORT SimplePolymorphicContainerBase +{ SimplePolymorphicContainerBase(); // This must exist so that subclasses are destroyed correctly. virtual ~SimplePolymorphicContainerBase(); - virtual std::shared_ptr - NewInstance() const = 0; + virtual std::shared_ptr NewInstance() const = 0; - virtual const void *GetVoidPointer() const = 0; + virtual const void* GetVoidPointer() const = 0; }; /// \brief Simple object container that can use C++ run-time type information. @@ -52,29 +55,30 @@ struct VTKM_CONT_EXPORT SimplePolymorphicContainerBase { /// around a void* except that C++ will capture run-time type information that /// allows for safer dynamic downcasts. /// -template +template struct VTKM_ALWAYS_EXPORT SimplePolymorphicContainer : public SimplePolymorphicContainerBase { T Item; VTKM_CONT - SimplePolymorphicContainer() : Item() { } + SimplePolymorphicContainer() + : Item() + { + } VTKM_CONT - SimplePolymorphicContainer(const T &src) : Item(src) { } + SimplePolymorphicContainer(const T& src) + : Item(src) + { + } virtual std::shared_ptr NewInstance() const { - return std::shared_ptr( - new SimplePolymorphicContainer()); + return std::shared_ptr(new SimplePolymorphicContainer()); } - virtual const void *GetVoidPointer() const - { - return &this->Item; - } + virtual const void* GetVoidPointer() const { return &this->Item; } }; - } } } // namespace vtkm::cont::internal diff --git a/vtkm/cont/internal/StorageError.h b/vtkm/cont/internal/StorageError.h index b623ba3e6..38c05803a 100644 --- a/vtkm/cont/internal/StorageError.h +++ b/vtkm/cont/internal/StorageError.h @@ -22,9 +22,12 @@ #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ /// This is an invalid Storage. The point of this class is to include the /// header file to make this invalid class the default Storage. From that @@ -35,7 +38,6 @@ struct VTKM_ALWAYS_EXPORT StorageTagError { // Not implemented. }; - } } } // namespace vtkm::cont::internal diff --git a/vtkm/cont/internal/VirtualObjectTransfer.h b/vtkm/cont/internal/VirtualObjectTransfer.h index b554289d8..3d9f307ba 100644 --- a/vtkm/cont/internal/VirtualObjectTransfer.h +++ b/vtkm/cont/internal/VirtualObjectTransfer.h @@ -20,10 +20,12 @@ #ifndef vtk_m_cont_internal_VirtualObjectTransfer_h #define vtk_m_cont_internal_VirtualObjectTransfer_h - -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ template struct VirtualObjectTransfer @@ -33,19 +35,18 @@ struct VirtualObjectTransfer /// device, binds it to the VirtualObject, and returns a void* to an internal /// state structure. /// - static void* Create(VirtualObject &object, const void *hostTarget); + static void* Create(VirtualObject& object, const void* hostTarget); /// Performs cleanup of the device state used to track the VirtualObject on /// the device. /// - static void Cleanup(void *deviceState); + static void Cleanup(void* deviceState); /// Update the device state with the state of target - static void Update(void *deviceState, const void *target); + static void Update(void* deviceState, const void* target); } #endif ; - } } } // vtkm::cont::internal diff --git a/vtkm/cont/internal/VirtualObjectTransferShareWithControl.h b/vtkm/cont/internal/VirtualObjectTransferShareWithControl.h index 153040b60..7bbd723b8 100644 --- a/vtkm/cont/internal/VirtualObjectTransferShareWithControl.h +++ b/vtkm/cont/internal/VirtualObjectTransferShareWithControl.h @@ -20,30 +20,27 @@ #ifndef vtk_m_cont_internal_VirtualObjectTransferShareWithControl_h #define vtk_m_cont_internal_VirtualObjectTransferShareWithControl_h +namespace vtkm +{ +namespace cont +{ +namespace internal +{ -namespace vtkm { -namespace cont { -namespace internal { - -template +template struct VirtualObjectTransferShareWithControl { - static void* Create(VirtualObject &object, const void *target) + static void* Create(VirtualObject& object, const void* target) { static int dummyState = 0; object.Bind(static_cast(target)); return &dummyState; } - static void Update(void*, const void*) - { - } + static void Update(void*, const void*) {} - static void Cleanup(void*) - { - } + static void Cleanup(void*) {} }; - } } } // vtkm::cont::internal diff --git a/vtkm/cont/internal/testing/UnitTestArrayManagerExecutionShareWithControl.cxx b/vtkm/cont/internal/testing/UnitTestArrayManagerExecutionShareWithControl.cxx index fed040ce1..3a45e9a1a 100644 --- a/vtkm/cont/internal/testing/UnitTestArrayManagerExecutionShareWithControl.cxx +++ b/vtkm/cont/internal/testing/UnitTestArrayManagerExecutionShareWithControl.cxx @@ -28,43 +28,46 @@ #include #include -namespace { +namespace +{ const vtkm::Id ARRAY_SIZE = 10; template struct TemplatedTests { - typedef vtkm::cont::internal::ArrayManagerExecutionShareWithControl< - T, vtkm::cont::StorageTagBasic> - ArrayManagerType; + typedef vtkm::cont::internal::ArrayManagerExecutionShareWithControl + ArrayManagerType; typedef typename ArrayManagerType::ValueType ValueType; - typedef vtkm::cont::internal::Storage - StorageType; + typedef vtkm::cont::internal::Storage StorageType; - void SetStorage(StorageType &array, const ValueType& value) + void SetStorage(StorageType& array, const ValueType& value) { - vtkm::cont::ArrayPortalToIterators - iterators(array.GetPortal()); + vtkm::cont::ArrayPortalToIterators iterators( + array.GetPortal()); std::fill(iterators.GetBegin(), iterators.GetEnd(), value); } template - bool CheckPortal(const PortalType &portal, const ValueType &value) + bool CheckPortal(const PortalType& portal, const ValueType& value) { for (vtkm::Id index = 0; index < portal.GetNumberOfValues(); index++) { - if (!test_equal(portal.Get(index), value)) { return false; } + if (!test_equal(portal.Get(index), value)) + { + return false; + } } return true; } - bool CheckStorage(StorageType &array, const ValueType& value) + bool CheckStorage(StorageType& array, const ValueType& value) { return CheckPortal(array.GetPortalConst(), value); } - bool CheckManager(ArrayManagerType &manager, const ValueType &value) + bool CheckManager(ArrayManagerType& manager, const ValueType& value) { return CheckPortal(manager.PrepareForInput(false), value); } @@ -82,13 +85,11 @@ struct TemplatedTests // Although the ArrayManagerExecutionShareWithControl class wraps the // control array portal in a different array portal, it should still // give the same iterator (to avoid any unnecessary indirection). - VTKM_TEST_ASSERT( - vtkm::cont::ArrayPortalToIteratorBegin(storage.GetPortalConst()) == - vtkm::cont::ArrayPortalToIteratorBegin(executionArray.PrepareForInput(true)), - "Execution array manager not holding control array iterators."); + VTKM_TEST_ASSERT(vtkm::cont::ArrayPortalToIteratorBegin(storage.GetPortalConst()) == + vtkm::cont::ArrayPortalToIteratorBegin(executionArray.PrepareForInput(true)), + "Execution array manager not holding control array iterators."); - VTKM_TEST_ASSERT(CheckManager(executionArray, INPUT_VALUE), - "Did not get correct array back."); + VTKM_TEST_ASSERT(CheckManager(executionArray, INPUT_VALUE), "Did not get correct array back."); } void InPlaceData() @@ -105,16 +106,15 @@ struct TemplatedTests // control array portal in a different array portal, it should still // give the same iterator (to avoid any unnecessary indirection). VTKM_TEST_ASSERT( - vtkm::cont::ArrayPortalToIteratorBegin(storage.GetPortal()) == - vtkm::cont::ArrayPortalToIteratorBegin(executionArray.PrepareForInPlace(true)), - "Execution array manager not holding control array iterators."); + vtkm::cont::ArrayPortalToIteratorBegin(storage.GetPortal()) == + vtkm::cont::ArrayPortalToIteratorBegin(executionArray.PrepareForInPlace(true)), + "Execution array manager not holding control array iterators."); VTKM_TEST_ASSERT( - vtkm::cont::ArrayPortalToIteratorBegin(storage.GetPortalConst()) == - vtkm::cont::ArrayPortalToIteratorBegin(executionArray.PrepareForInput(false)), - "Execution array manager not holding control array iterators."); + vtkm::cont::ArrayPortalToIteratorBegin(storage.GetPortalConst()) == + vtkm::cont::ArrayPortalToIteratorBegin(executionArray.PrepareForInput(false)), + "Execution array manager not holding control array iterators."); - VTKM_TEST_ASSERT(CheckManager(executionArray, INPUT_VALUE), - "Did not get correct array back."); + VTKM_TEST_ASSERT(CheckManager(executionArray, INPUT_VALUE), "Did not get correct array back."); } void OutputData() @@ -125,12 +125,11 @@ struct TemplatedTests ArrayManagerType executionArray(&storage); - vtkm::cont::ArrayPortalToIterators - iterators(executionArray.PrepareForOutput(ARRAY_SIZE)); + vtkm::cont::ArrayPortalToIterators iterators( + executionArray.PrepareForOutput(ARRAY_SIZE)); std::fill(iterators.GetBegin(), iterators.GetEnd(), OUTPUT_VALUE); - VTKM_TEST_ASSERT(CheckManager(executionArray, OUTPUT_VALUE), - "Did not get correct array back."); + VTKM_TEST_ASSERT(CheckManager(executionArray, OUTPUT_VALUE), "Did not get correct array back."); executionArray.RetrieveOutputData(&storage); @@ -144,7 +143,6 @@ struct TemplatedTests InputData(); InPlaceData(); OutputData(); - } }; @@ -165,7 +163,7 @@ void TestArrayManagerShare() } // Anonymous namespace -int UnitTestArrayManagerExecutionShareWithControl(int, char *[]) +int UnitTestArrayManagerExecutionShareWithControl(int, char* []) { return vtkm::cont::testing::Testing::Run(TestArrayManagerShare); } diff --git a/vtkm/cont/internal/testing/UnitTestArrayPortalFromIterators.cxx b/vtkm/cont/internal/testing/UnitTestArrayPortalFromIterators.cxx index d6c3700d1..f4954f7ea 100644 --- a/vtkm/cont/internal/testing/UnitTestArrayPortalFromIterators.cxx +++ b/vtkm/cont/internal/testing/UnitTestArrayPortalFromIterators.cxx @@ -23,9 +23,10 @@ #include #include -namespace { +namespace +{ -template +template struct TemplatedTests { static const vtkm::Id ARRAY_SIZE = 10; @@ -35,10 +36,10 @@ struct TemplatedTests ValueType ExpectedValue(vtkm::Id index, ComponentType value) { - return ValueType(static_cast(index+static_cast(value))); + return ValueType(static_cast(index + static_cast(value))); } - template + template void FillIterator(IteratorType begin, IteratorType end, ComponentType value) { vtkm::Id index = 0; @@ -49,22 +50,23 @@ struct TemplatedTests } } - template - bool CheckIterator(IteratorType begin, - IteratorType end, - ComponentType value) + template + bool CheckIterator(IteratorType begin, IteratorType end, ComponentType value) { vtkm::Id index = 0; for (IteratorType iter = begin; iter != end; iter++) { - if (*iter != ExpectedValue(index, value)) { return false; } + if (*iter != ExpectedValue(index, value)) + { + return false; + } index++; } return true; } - template - bool CheckPortal(const PortalType &portal, ComponentType value) + template + bool CheckPortal(const PortalType& portal, ComponentType value) { vtkm::cont::ArrayPortalToIterators iterators(portal); return CheckIterator(iterators.GetBegin(), iterators.GetEnd(), value); @@ -75,56 +77,50 @@ struct TemplatedTests ValueType array[ARRAY_SIZE]; static const ComponentType ORIGINAL_VALUE = 109; - FillIterator(array, array+ARRAY_SIZE, ORIGINAL_VALUE); + FillIterator(array, array + ARRAY_SIZE, ORIGINAL_VALUE); - ::vtkm::cont::internal::ArrayPortalFromIterators - portal(array, array+ARRAY_SIZE); - ::vtkm::cont::internal::ArrayPortalFromIterators - const_portal(array, array+ARRAY_SIZE); + ::vtkm::cont::internal::ArrayPortalFromIterators portal(array, array + ARRAY_SIZE); + ::vtkm::cont::internal::ArrayPortalFromIterators const_portal(array, array + + ARRAY_SIZE); - std::cout << " Check that ArrayPortalToIterators is not doing indirection." - << std::endl; - // If you get a compile error here about mismatched types, it might be - // that ArrayPortalToIterators is not properly overloaded to return the - // original iterator. + std::cout << " Check that ArrayPortalToIterators is not doing indirection." << std::endl; +// If you get a compile error here about mismatched types, it might be +// that ArrayPortalToIterators is not properly overloaded to return the +// original iterator. #if !defined(VTKM_MSVC) || (defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL == 0) VTKM_TEST_ASSERT(vtkm::cont::ArrayPortalToIteratorBegin(portal) == array, "Begin iterator wrong."); - VTKM_TEST_ASSERT(vtkm::cont::ArrayPortalToIteratorEnd(portal) == - array+ARRAY_SIZE, + VTKM_TEST_ASSERT(vtkm::cont::ArrayPortalToIteratorEnd(portal) == array + ARRAY_SIZE, "End iterator wrong."); - VTKM_TEST_ASSERT(vtkm::cont::ArrayPortalToIteratorBegin(const_portal) == - array, + VTKM_TEST_ASSERT(vtkm::cont::ArrayPortalToIteratorBegin(const_portal) == array, "Begin const iterator wrong."); - VTKM_TEST_ASSERT(vtkm::cont::ArrayPortalToIteratorEnd(const_portal) == - array+ARRAY_SIZE, + VTKM_TEST_ASSERT(vtkm::cont::ArrayPortalToIteratorEnd(const_portal) == array + ARRAY_SIZE, "End const iterator wrong."); -#else //VTKM_MSVC +#else //VTKM_MSVC // The MSVC compiler issues warnings when using raw pointer math when in // debug mode. To keep the compiler happy (and add some safety checks), // wrap the iterator in checked_array_iterator. VTKM_TEST_ASSERT(vtkm::cont::ArrayPortalToIteratorBegin(portal) == - stdext::checked_array_iterator(array, ARRAY_SIZE), - "Begin iterator wrong."); + stdext::checked_array_iterator(array, ARRAY_SIZE), + "Begin iterator wrong."); VTKM_TEST_ASSERT(vtkm::cont::ArrayPortalToIteratorEnd(portal) == - stdext::checked_array_iterator(array, ARRAY_SIZE) + ARRAY_SIZE, - "End iterator wrong."); + stdext::checked_array_iterator(array, ARRAY_SIZE) + ARRAY_SIZE, + "End iterator wrong."); VTKM_TEST_ASSERT(vtkm::cont::ArrayPortalToIteratorBegin(const_portal) == - stdext::checked_array_iterator(array, ARRAY_SIZE), - "Begin const iterator wrong."); + stdext::checked_array_iterator(array, ARRAY_SIZE), + "Begin const iterator wrong."); VTKM_TEST_ASSERT(vtkm::cont::ArrayPortalToIteratorEnd(const_portal) == - stdext::checked_array_iterator(array, ARRAY_SIZE) + ARRAY_SIZE, - "End const iterator wrong."); + stdext::checked_array_iterator(array, ARRAY_SIZE) + + ARRAY_SIZE, + "End const iterator wrong."); #endif // VTKM_MSVC - VTKM_TEST_ASSERT(portal.GetNumberOfValues() == ARRAY_SIZE, - "Portal array size wrong."); + VTKM_TEST_ASSERT(portal.GetNumberOfValues() == ARRAY_SIZE, "Portal array size wrong."); VTKM_TEST_ASSERT(const_portal.GetNumberOfValues() == ARRAY_SIZE, "Const portal array size wrong."); std::cout << " Check inital value." << std::endl; - VTKM_TEST_ASSERT(CheckPortal(portal, ORIGINAL_VALUE), - "Portal iterator has bad value."); + VTKM_TEST_ASSERT(CheckPortal(portal, ORIGINAL_VALUE), "Portal iterator has bad value."); VTKM_TEST_ASSERT(CheckPortal(const_portal, ORIGINAL_VALUE), "Const portal iterator has bad value."); @@ -133,27 +129,23 @@ struct TemplatedTests std::cout << " Check get/set methods." << std::endl; for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { - VTKM_TEST_ASSERT(portal.Get(index) - == ExpectedValue(index, ORIGINAL_VALUE), + VTKM_TEST_ASSERT(portal.Get(index) == ExpectedValue(index, ORIGINAL_VALUE), "Bad portal value."); - VTKM_TEST_ASSERT(const_portal.Get(index) - == ExpectedValue(index, ORIGINAL_VALUE), + VTKM_TEST_ASSERT(const_portal.Get(index) == ExpectedValue(index, ORIGINAL_VALUE), "Bad const portal value."); portal.Set(index, ExpectedValue(index, SET_VALUE)); } std::cout << " Make sure set has correct value." << std::endl; - VTKM_TEST_ASSERT(CheckPortal(portal, SET_VALUE), - "Portal iterator has bad value."); - VTKM_TEST_ASSERT(CheckIterator(array, array+ARRAY_SIZE, SET_VALUE), - "Array has bad value."); + VTKM_TEST_ASSERT(CheckPortal(portal, SET_VALUE), "Portal iterator has bad value."); + VTKM_TEST_ASSERT(CheckIterator(array, array + ARRAY_SIZE, SET_VALUE), "Array has bad value."); } }; struct TestFunctor { - template + template void operator()(T) const { TemplatedTests tests; @@ -168,7 +160,7 @@ void TestArrayPortalFromIterators() } // Anonymous namespace -int UnitTestArrayPortalFromIterators(int, char *[]) +int UnitTestArrayPortalFromIterators(int, char* []) { return vtkm::cont::testing::Testing::Run(TestArrayPortalFromIterators); } diff --git a/vtkm/cont/internal/testing/UnitTestDynamicTransform.cxx b/vtkm/cont/internal/testing/UnitTestDynamicTransform.cxx index a2d54f182..5d2e58475 100644 --- a/vtkm/cont/internal/testing/UnitTestDynamicTransform.cxx +++ b/vtkm/cont/internal/testing/UnitTestDynamicTransform.cxx @@ -28,14 +28,15 @@ #include "vtkm/cont/testing/Testing.h" -namespace vtkm { +namespace vtkm +{ // DynamicArrayHandle requires its value type to have a defined VecTraits // class. One of the tests is to use an "unusual" array of std::string // (which is pretty pointless but might tease out some assumptions). // Make an implementation here. Because I am lazy, this is only a partial // implementation. -template<> +template <> struct VecTraits { static const vtkm::IdComponent NUM_COMPONENTS = 1; @@ -44,64 +45,78 @@ struct VecTraits } // namespace vtkm -namespace { +namespace +{ static int g_FunctionCalls; -#define TRY_TRANSFORM(expr) \ - g_FunctionCalls = 0; \ - expr; \ +#define TRY_TRANSFORM(expr) \ + g_FunctionCalls = 0; \ + expr; \ VTKM_TEST_ASSERT(g_FunctionCalls == 1, "Functor not called correctly.") -struct TypeListTagString : vtkm::ListTagBase { }; +struct TypeListTagString : vtkm::ListTagBase +{ +}; -struct ScalarFunctor { - void operator()(vtkm::FloatDefault) const { +struct ScalarFunctor +{ + void operator()(vtkm::FloatDefault) const + { std::cout << " In Scalar functor." << std::endl; g_FunctionCalls++; } }; -struct ArrayHandleScalarFunctor { - template - void operator()(const vtkm::cont::ArrayHandle &) const { +struct ArrayHandleScalarFunctor +{ + template + void operator()(const vtkm::cont::ArrayHandle&) const + { VTKM_TEST_FAIL("Called wrong form of functor operator."); } - void operator()(const vtkm::cont::ArrayHandle &) const { + void operator()(const vtkm::cont::ArrayHandle&) const + { std::cout << " In ArrayHandle functor." << std::endl; g_FunctionCalls++; } }; -struct ArrayHandleStringFunctor { - void operator()(const vtkm::cont::ArrayHandle &) const { +struct ArrayHandleStringFunctor +{ + void operator()(const vtkm::cont::ArrayHandle&) const + { std::cout << " In ArrayHandle functor." << std::endl; g_FunctionCalls++; } }; -struct CellSetStructuredFunctor { - template - void operator()(const T &) const { +struct CellSetStructuredFunctor +{ + template + void operator()(const T&) const + { VTKM_TEST_FAIL("Called wrong form of functor operator."); } - void operator()(const vtkm::cont::CellSetStructured<3> &) const { + void operator()(const vtkm::cont::CellSetStructured<3>&) const + { std::cout << " In CellSetStructured<3> functor." << std::endl; g_FunctionCalls++; } }; -struct FunctionInterfaceFunctor { - template - void operator()(const vtkm::internal::FunctionInterface &) const { +struct FunctionInterfaceFunctor +{ + template + void operator()(const vtkm::internal::FunctionInterface&) const + { VTKM_TEST_FAIL("Called wrong form of functor operator."); } void operator()( - const vtkm::internal::FunctionInterface< - void(vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::CellSetStructured<3>)> &) const { + const vtkm::internal::FunctionInterface< + void(vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle, vtkm::cont::CellSetStructured<3>)>&) const + { std::cout << " In FunctionInterface<...> functor." << std::endl; g_FunctionCalls++; } @@ -128,20 +143,15 @@ void TestBasicTransform() std::cout << " Trying with unusual (string) dynamic array." << std::endl; dynamicArray = vtkm::cont::ArrayHandle(); TRY_TRANSFORM(transform(dynamicArray.ResetTypeList(TypeListTagString()), - ArrayHandleStringFunctor(), - indexTag)); + ArrayHandleStringFunctor(), indexTag)); std::cout << " Trying with structured cell set." << std::endl; vtkm::cont::CellSetStructured<3> concreteCellSet; - TRY_TRANSFORM(transform(concreteCellSet, - CellSetStructuredFunctor(), - indexTag)); + TRY_TRANSFORM(transform(concreteCellSet, CellSetStructuredFunctor(), indexTag)); std::cout << " Trying with dynamic cell set." << std::endl; vtkm::cont::DynamicCellSet dynamicCellSet = concreteCellSet; - TRY_TRANSFORM(transform(dynamicCellSet, - CellSetStructuredFunctor(), - indexTag)); + TRY_TRANSFORM(transform(dynamicCellSet, CellSetStructuredFunctor(), indexTag)); } void TestFunctionTransform() @@ -152,24 +162,17 @@ void TestFunctionTransform() vtkm::cont::ArrayHandle stringArray; vtkm::cont::CellSetStructured<3> structuredCellSet; - std::cout << " Trying basic functor call w/o transform (make sure it works)." - << std::endl; - TRY_TRANSFORM(FunctionInterfaceFunctor()( - vtkm::internal::make_FunctionInterface( - scalarArray, - scalarArray, - stringArray, - structuredCellSet))); + std::cout << " Trying basic functor call w/o transform (make sure it works)." << std::endl; + TRY_TRANSFORM(FunctionInterfaceFunctor()(vtkm::internal::make_FunctionInterface( + scalarArray, scalarArray, stringArray, structuredCellSet))); std::cout << " Trying dynamic cast" << std::endl; TRY_TRANSFORM( - vtkm::internal::make_FunctionInterface( - scalarArray, - vtkm::cont::DynamicArrayHandle(scalarArray), - vtkm::cont::DynamicArrayHandle(stringArray).ResetTypeList(TypeListTagString()), - vtkm::cont::DynamicCellSet(structuredCellSet)) - .DynamicTransformCont(vtkm::cont::internal::DynamicTransform(), - FunctionInterfaceFunctor())); + vtkm::internal::make_FunctionInterface( + scalarArray, vtkm::cont::DynamicArrayHandle(scalarArray), + vtkm::cont::DynamicArrayHandle(stringArray).ResetTypeList(TypeListTagString()), + vtkm::cont::DynamicCellSet(structuredCellSet)) + .DynamicTransformCont(vtkm::cont::internal::DynamicTransform(), FunctionInterfaceFunctor())); } void TestDynamicTransform() @@ -180,7 +183,7 @@ void TestDynamicTransform() } // anonymous namespace -int UnitTestDynamicTransform(int, char *[]) +int UnitTestDynamicTransform(int, char* []) { return vtkm::cont::testing::Testing::Run(TestDynamicTransform); } diff --git a/vtkm/cont/internal/testing/UnitTestIteratorFromArrayPortal.cxx b/vtkm/cont/internal/testing/UnitTestIteratorFromArrayPortal.cxx index 5f4312393..05c98b75b 100644 --- a/vtkm/cont/internal/testing/UnitTestIteratorFromArrayPortal.cxx +++ b/vtkm/cont/internal/testing/UnitTestIteratorFromArrayPortal.cxx @@ -25,9 +25,10 @@ #include -namespace { +namespace +{ -template +template struct TemplatedTests { static const vtkm::Id ARRAY_SIZE = 10; @@ -37,10 +38,10 @@ struct TemplatedTests ValueType ExpectedValue(vtkm::Id index, ComponentType value) { - return ValueType(static_cast(index+static_cast(value))); + return ValueType(static_cast(index + static_cast(value))); } - template + template void FillIterator(IteratorType begin, IteratorType end, ComponentType value) { vtkm::Id index = 0; @@ -51,22 +52,23 @@ struct TemplatedTests } } - template - bool CheckIterator(IteratorType begin, - IteratorType end, - ComponentType value) + template + bool CheckIterator(IteratorType begin, IteratorType end, ComponentType value) { vtkm::Id index = 0; for (IteratorType iter = begin; iter != end; iter++) { - if (ValueType(*iter) != ExpectedValue(index, value)) { return false; } + if (ValueType(*iter) != ExpectedValue(index, value)) + { + return false; + } index++; } return true; } - template - bool CheckPortal(const PortalType &portal, const ComponentType &value) + template + bool CheckPortal(const PortalType& portal, const ComponentType& value) { vtkm::cont::ArrayPortalToIterators iterators(portal); return CheckIterator(iterators.GetBegin(), iterators.GetEnd(), value); @@ -74,7 +76,7 @@ struct TemplatedTests ComponentType ORIGINAL_VALUE() { return 39; } - template + template void TestIteratorRead(ArrayPortalType portal) { typedef vtkm::cont::internal::IteratorFromArrayPortal IteratorType; @@ -87,29 +89,25 @@ struct TemplatedTests "Distance between begin and end incorrect."); std::cout << " Check forward iteration." << std::endl; - VTKM_TEST_ASSERT(CheckIterator(begin, end, ORIGINAL_VALUE()), - "Forward iteration wrong"); + VTKM_TEST_ASSERT(CheckIterator(begin, end, ORIGINAL_VALUE()), "Forward iteration wrong"); std::cout << " Check backward iteration." << std::endl; IteratorType middle = end; - for (vtkm::Id index = portal.GetNumberOfValues()-1; index >= 0; index--) + for (vtkm::Id index = portal.GetNumberOfValues() - 1; index >= 0; index--) { middle--; ValueType value = *middle; - VTKM_TEST_ASSERT(value == ExpectedValue(index, ORIGINAL_VALUE()), - "Backward iteration wrong"); + VTKM_TEST_ASSERT(value == ExpectedValue(index, ORIGINAL_VALUE()), "Backward iteration wrong"); } std::cout << " Check advance" << std::endl; - middle = begin + ARRAY_SIZE/2; - VTKM_TEST_ASSERT(std::distance(begin, middle) == ARRAY_SIZE/2, - "Bad distance to middle."); - VTKM_TEST_ASSERT( - ValueType(*middle) == ExpectedValue(ARRAY_SIZE/2, ORIGINAL_VALUE()), - "Bad value at middle."); + middle = begin + ARRAY_SIZE / 2; + VTKM_TEST_ASSERT(std::distance(begin, middle) == ARRAY_SIZE / 2, "Bad distance to middle."); + VTKM_TEST_ASSERT(ValueType(*middle) == ExpectedValue(ARRAY_SIZE / 2, ORIGINAL_VALUE()), + "Bad value at middle."); } - template + template void TestIteratorWrite(ArrayPortalType portal) { typedef vtkm::cont::internal::IteratorFromArrayPortal IteratorType; @@ -131,12 +129,11 @@ struct TemplatedTests { ValueType array[ARRAY_SIZE]; - FillIterator(array, array+ARRAY_SIZE, ORIGINAL_VALUE()); + FillIterator(array, array + ARRAY_SIZE, ORIGINAL_VALUE()); - ::vtkm::cont::internal::ArrayPortalFromIterators - portal(array, array+ARRAY_SIZE); - ::vtkm::cont::internal::ArrayPortalFromIterators - const_portal(array, array+ARRAY_SIZE); + ::vtkm::cont::internal::ArrayPortalFromIterators portal(array, array + ARRAY_SIZE); + ::vtkm::cont::internal::ArrayPortalFromIterators const_portal(array, array + + ARRAY_SIZE); std::cout << " Test read from iterator." << std::endl; TestIteratorRead(portal); @@ -151,7 +148,7 @@ struct TemplatedTests struct TestFunctor { - template + template void operator()(T) const { TemplatedTests tests; @@ -166,7 +163,7 @@ void TestArrayIteratorFromArrayPortal() } // Anonymous namespace -int UnitTestIteratorFromArrayPortal(int, char *[]) +int UnitTestIteratorFromArrayPortal(int, char* []) { return vtkm::cont::testing::Testing::Run(TestArrayIteratorFromArrayPortal); } diff --git a/vtkm/cont/serial/internal/ArrayManagerExecutionSerial.cxx b/vtkm/cont/serial/internal/ArrayManagerExecutionSerial.cxx index 08aae17dd..801b820ef 100644 --- a/vtkm/cont/serial/internal/ArrayManagerExecutionSerial.cxx +++ b/vtkm/cont/serial/internal/ArrayManagerExecutionSerial.cxx @@ -22,10 +22,11 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ VTKM_INSTANTIATE_ARRAYHANDLES_FOR_DEVICE_ADAPTER(DeviceAdapterTagSerial) - } } // end vtkm::cont diff --git a/vtkm/cont/serial/internal/ArrayManagerExecutionSerial.h b/vtkm/cont/serial/internal/ArrayManagerExecutionSerial.h index dd8ededfc..dc512b042 100644 --- a/vtkm/cont/serial/internal/ArrayManagerExecutionSerial.h +++ b/vtkm/cont/serial/internal/ArrayManagerExecutionSerial.h @@ -25,25 +25,28 @@ #include #include -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ template class ArrayManagerExecution - : public vtkm::cont::internal::ArrayManagerExecutionShareWithControl - + : public vtkm::cont::internal::ArrayManagerExecutionShareWithControl { public: - typedef vtkm::cont::internal::ArrayManagerExecutionShareWithControl - Superclass; + typedef vtkm::cont::internal::ArrayManagerExecutionShareWithControl Superclass; typedef typename Superclass::ValueType ValueType; typedef typename Superclass::PortalType PortalType; typedef typename Superclass::PortalConstType PortalConstType; VTKM_CONT - ArrayManagerExecution(typename Superclass::StorageType *storage) - : Superclass(storage) { } + ArrayManagerExecution(typename Superclass::StorageType* storage) + : Superclass(storage) + { + } }; } // namespace internal @@ -51,7 +54,6 @@ public: #ifndef vtk_m_cont_serial_internal_ArrayManagerExecutionSerial_cxx VTKM_EXPORT_ARRAYHANDLES_FOR_DEVICE_ADAPTER(DeviceAdapterTagSerial) #endif // !vtk_m_cont_serial_internal_ArrayManagerExecutionSerial_cxx - } } // namespace vtkm::cont diff --git a/vtkm/cont/serial/internal/DeviceAdapterAlgorithmSerial.h b/vtkm/cont/serial/internal/DeviceAdapterAlgorithmSerial.h index 66896cafb..95a226b59 100644 --- a/vtkm/cont/serial/internal/DeviceAdapterAlgorithmSerial.h +++ b/vtkm/cont/serial/internal/DeviceAdapterAlgorithmSerial.h @@ -1,4 +1,4 @@ - //============================================================================ +//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. @@ -35,62 +35,58 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -template<> -struct DeviceAdapterAlgorithm : - vtkm::cont::internal::DeviceAdapterAlgorithmGeneral< - DeviceAdapterAlgorithm, - vtkm::cont::DeviceAdapterTagSerial> +template <> +struct DeviceAdapterAlgorithm + : vtkm::cont::internal::DeviceAdapterAlgorithmGeneral< + DeviceAdapterAlgorithm, + vtkm::cont::DeviceAdapterTagSerial> { private: typedef vtkm::cont::DeviceAdapterTagSerial Device; public: - - template - VTKM_CONT static U Reduce( - const vtkm::cont::ArrayHandle &input, U initialValue) + template + VTKM_CONT static U Reduce(const vtkm::cont::ArrayHandle& input, U initialValue) { - return Reduce(input, initialValue,vtkm::Add()); + return Reduce(input, initialValue, vtkm::Add()); } - template - VTKM_CONT static U Reduce( - const vtkm::cont::ArrayHandle &input, - U initialValue, - BinaryFunctor binary_functor) + template + VTKM_CONT static U Reduce(const vtkm::cont::ArrayHandle& input, U initialValue, + BinaryFunctor binary_functor) { - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst PortalIn; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst + PortalIn; - internal::WrappedBinaryOperator wrappedOp( binary_functor ); + internal::WrappedBinaryOperator wrappedOp(binary_functor); PortalIn inputPortal = input.PrepareForInput(Device()); return std::accumulate(vtkm::cont::ArrayPortalToIteratorBegin(inputPortal), - vtkm::cont::ArrayPortalToIteratorEnd(inputPortal), - initialValue, + vtkm::cont::ArrayPortalToIteratorEnd(inputPortal), initialValue, wrappedOp); } - template - VTKM_CONT static void ReduceByKey( - const vtkm::cont::ArrayHandle &keys, - const vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle &keys_output, - vtkm::cont::ArrayHandle &values_output, - BinaryFunctor binary_functor) + template + VTKM_CONT static void ReduceByKey(const vtkm::cont::ArrayHandle& keys, + const vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& keys_output, + vtkm::cont::ArrayHandle& values_output, + BinaryFunctor binary_functor) { - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst PortalKIn; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst PortalVIn; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst + PortalKIn; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst + PortalVIn; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal PortalKOut; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal PortalVOut; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal PortalKOut; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal PortalVOut; PortalKIn keysPortalIn = keys.PrepareForInput(Device()); PortalVIn valuesPortalIn = values.PrepareForInput(Device()); @@ -105,25 +101,24 @@ public: T currentKey = keysPortalIn.Get(readPos); U currentValue = valuesPortalIn.Get(readPos); - for(++readPos; readPos < numberOfKeys; ++readPos) + for (++readPos; readPos < numberOfKeys; ++readPos) + { + while (readPos < numberOfKeys && currentKey == keysPortalIn.Get(readPos)) { - while(readPos < numberOfKeys && - currentKey == keysPortalIn.Get(readPos) ) - { currentValue = binary_functor(currentValue, valuesPortalIn.Get(readPos)); ++readPos; - } + } - if(readPos < numberOfKeys) - { + if (readPos < numberOfKeys) + { keysPortalOut.Set(writePos, currentKey); valuesPortalOut.Set(writePos, currentValue); ++writePos; currentKey = keysPortalIn.Get(readPos); currentValue = valuesPortalIn.Get(readPos); - } } + } //now write out the last set of values keysPortalOut.Set(writePos, currentKey); @@ -131,26 +126,28 @@ public: //now we need to shrink to the correct number of keys/values //writePos is zero-based so add 1 to get correct length - keys_output.Shrink( writePos + 1 ); - values_output.Shrink( writePos + 1 ); + keys_output.Shrink(writePos + 1); + values_output.Shrink(writePos + 1); } - template - VTKM_CONT static T ScanInclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static T ScanInclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output) { - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal PortalOut; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst PortalIn; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal PortalOut; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst + PortalIn; vtkm::Id numberOfValues = input.GetNumberOfValues(); PortalIn inputPortal = input.PrepareForInput(Device()); PortalOut outputPortal = output.PrepareForOutput(numberOfValues, Device()); - if (numberOfValues <= 0) { return vtkm::TypeTraits::ZeroInitialization(); } + if (numberOfValues <= 0) + { + return vtkm::TypeTraits::ZeroInitialization(); + } std::partial_sum(vtkm::cont::ArrayPortalToIteratorBegin(inputPortal), vtkm::cont::ArrayPortalToIteratorEnd(inputPortal), @@ -160,57 +157,57 @@ public: return outputPortal.Get(numberOfValues - 1); } - template - VTKM_CONT static T ScanInclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output, - BinaryFunctor binary_functor) + template + VTKM_CONT static T ScanInclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output, + BinaryFunctor binary_functor) { - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal PortalOut; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst PortalIn; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal PortalOut; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst + PortalIn; - internal::WrappedBinaryOperator wrappedBinaryOp( - binary_functor); + internal::WrappedBinaryOperator wrappedBinaryOp(binary_functor); vtkm::Id numberOfValues = input.GetNumberOfValues(); PortalIn inputPortal = input.PrepareForInput(Device()); PortalOut outputPortal = output.PrepareForOutput(numberOfValues, Device()); - if (numberOfValues <= 0) { return vtkm::TypeTraits::ZeroInitialization(); } + if (numberOfValues <= 0) + { + return vtkm::TypeTraits::ZeroInitialization(); + } std::partial_sum(vtkm::cont::ArrayPortalToIteratorBegin(inputPortal), vtkm::cont::ArrayPortalToIteratorEnd(inputPortal), - vtkm::cont::ArrayPortalToIteratorBegin(outputPortal), - wrappedBinaryOp); + vtkm::cont::ArrayPortalToIteratorBegin(outputPortal), wrappedBinaryOp); // Return the value at the last index in the array, which is the full sum. return outputPortal.Get(numberOfValues - 1); } - template - VTKM_CONT static T ScanExclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output, - BinaryFunctor binaryFunctor, - const T& initialValue) + template + VTKM_CONT static T ScanExclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output, + BinaryFunctor binaryFunctor, const T& initialValue) { - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal PortalOut; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst PortalIn; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal PortalOut; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst + PortalIn; - internal::WrappedBinaryOperator - wrappedBinaryOp(binaryFunctor); + internal::WrappedBinaryOperator wrappedBinaryOp(binaryFunctor); vtkm::Id numberOfValues = input.GetNumberOfValues(); PortalIn inputPortal = input.PrepareForInput(Device()); PortalOut outputPortal = output.PrepareForOutput(numberOfValues, Device()); - if (numberOfValues <= 0) { return initialValue; } + if (numberOfValues <= 0) + { + return initialValue; + } // Shift right by one, by iterating backwards. We are required to iterate //backwards so that the algorithm works correctly when the input and output @@ -220,40 +217,39 @@ public: //The ICC compiler has been found to improperly optimize the copy_backwards //into a standard copy, causing the above issue. T lastValue = inputPortal.Get(numberOfValues - 1); - for(vtkm::Id i=(numberOfValues-1); i >= 1; --i) + for (vtkm::Id i = (numberOfValues - 1); i >= 1; --i) { - outputPortal.Set(i, inputPortal.Get(i-1)); + outputPortal.Set(i, inputPortal.Get(i - 1)); } outputPortal.Set(0, initialValue); std::partial_sum(vtkm::cont::ArrayPortalToIteratorBegin(outputPortal), vtkm::cont::ArrayPortalToIteratorEnd(outputPortal), - vtkm::cont::ArrayPortalToIteratorBegin(outputPortal), - wrappedBinaryOp); + vtkm::cont::ArrayPortalToIteratorBegin(outputPortal), wrappedBinaryOp); return wrappedBinaryOp(outputPortal.Get(numberOfValues - 1), lastValue); } - template - VTKM_CONT static T ScanExclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle& output) + template + VTKM_CONT static T ScanExclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output) { - return ScanExclusive(input, output, vtkm::Sum(), - vtkm::TypeTraits::ZeroInitialization()); + return ScanExclusive(input, output, vtkm::Sum(), vtkm::TypeTraits::ZeroInitialization()); } private: // This runs in the execution environment. - template + template class ScheduleKernel { public: - ScheduleKernel(const FunctorType &functor) - : Functor(functor) { } + ScheduleKernel(const FunctorType& functor) + : Functor(functor) + { + } //needed for when calling from schedule on a range - template + template VTKM_EXEC void operator()(const T& index) const { this->Functor(index); @@ -262,18 +258,17 @@ private: private: const FunctorType Functor; - void operator=(const ScheduleKernel &) = delete; + void operator=(const ScheduleKernel&) = delete; }; public: - template + template VTKM_CONT static void Schedule(Functor functor, vtkm::Id numInstances) { const vtkm::Id MESSAGE_SIZE = 1024; char errorString[MESSAGE_SIZE]; errorString[0] = '\0'; - vtkm::exec::internal::ErrorMessageBuffer - errorMessage(errorString, MESSAGE_SIZE); + vtkm::exec::internal::ErrorMessageBuffer errorMessage(errorString, MESSAGE_SIZE); functor.SetErrorMessageBuffer(errorMessage); @@ -281,12 +276,12 @@ public: const vtkm::Id size = numInstances; -VTKM_VECTORIZATION_PRE_LOOP - for(vtkm::Id i=0; i < size; ++i) - { -VTKM_VECTORIZATION_IN_LOOP + VTKM_VECTORIZATION_PRE_LOOP + for (vtkm::Id i = 0; i < size; ++i) + { + VTKM_VECTORIZATION_IN_LOOP kernel(i); - } + } if (errorMessage.IsErrorRaised()) { @@ -294,31 +289,29 @@ VTKM_VECTORIZATION_IN_LOOP } } - template - VTKM_CONT - static void Schedule(Functor functor, vtkm::Id3 rangeMax) + template + VTKM_CONT static void Schedule(Functor functor, vtkm::Id3 rangeMax) { const vtkm::Id MESSAGE_SIZE = 1024; char errorString[MESSAGE_SIZE]; errorString[0] = '\0'; - vtkm::exec::internal::ErrorMessageBuffer - errorMessage(errorString, MESSAGE_SIZE); + vtkm::exec::internal::ErrorMessageBuffer errorMessage(errorString, MESSAGE_SIZE); functor.SetErrorMessageBuffer(errorMessage); DeviceAdapterAlgorithm::ScheduleKernel kernel(functor); - for(vtkm::Id k=0; k < rangeMax[2]; ++k) + for (vtkm::Id k = 0; k < rangeMax[2]; ++k) + { + for (vtkm::Id j = 0; j < rangeMax[1]; ++j) { - for(vtkm::Id j=0; j < rangeMax[1]; ++j) + VTKM_VECTORIZATION_PRE_LOOP + for (vtkm::Id i = 0; i < rangeMax[0]; ++i) { -VTKM_VECTORIZATION_PRE_LOOP - for(vtkm::Id i=0; i < rangeMax[0]; ++i) - { -VTKM_VECTORIZATION_IN_LOOP + VTKM_VECTORIZATION_IN_LOOP kernel(vtkm::Id3(i, j, k)); - } } } + } if (errorMessage.IsErrorRaised()) { @@ -327,84 +320,81 @@ VTKM_VECTORIZATION_IN_LOOP } private: - template - VTKM_CONT static void Scatter( - vtkm::cont::ArrayHandle &values, - vtkm::cont::ArrayHandle &index, - vtkm::cont::ArrayHandle &values_out - ) + template + VTKM_CONT static void Scatter(vtkm::cont::ArrayHandle& values, + vtkm::cont::ArrayHandle& index, + vtkm::cont::ArrayHandle& values_out) { - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst PortalVIn; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst PortalI; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal PortalVout; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + Device>::PortalConst PortalVIn; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst + PortalI; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal + PortalVout; const vtkm::Id n = values.GetNumberOfValues(); - VTKM_ASSERT(n == index.GetNumberOfValues() ); + VTKM_ASSERT(n == index.GetNumberOfValues()); PortalVIn valuesPortal = values.PrepareForInput(Device()); PortalI indexPortal = index.PrepareForInput(Device()); PortalVout valuesOutPortal = values_out.PrepareForOutput(n, Device()); - for (vtkm::Id i=0; i - VTKM_CONT static void SortByKeyDirect( - vtkm::cont::ArrayHandle &keys, - vtkm::cont::ArrayHandle &values, - BinaryCompare binary_compare) + template + VTKM_CONT static void SortByKeyDirect(vtkm::cont::ArrayHandle& keys, + vtkm::cont::ArrayHandle& values, + BinaryCompare binary_compare) { //combine the keys and values into a ZipArrayHandle //we than need to specify a custom compare function wrapper //that only checks for key side of the pair, using the custom compare //functor that the user passed in - typedef vtkm::cont::ArrayHandle KeyType; - typedef vtkm::cont::ArrayHandle ValueType; - typedef vtkm::cont::ArrayHandleZip ZipHandleType; + typedef vtkm::cont::ArrayHandle KeyType; + typedef vtkm::cont::ArrayHandle ValueType; + typedef vtkm::cont::ArrayHandleZip ZipHandleType; - ZipHandleType zipHandle = - vtkm::cont::make_ArrayHandleZip(keys,values); - Sort(zipHandle,internal::KeyCompare(binary_compare)); + ZipHandleType zipHandle = vtkm::cont::make_ArrayHandleZip(keys, values); + Sort(zipHandle, internal::KeyCompare(binary_compare)); } public: - template - VTKM_CONT static void SortByKey( - vtkm::cont::ArrayHandle &keys, - vtkm::cont::ArrayHandle &values) + template + VTKM_CONT static void SortByKey(vtkm::cont::ArrayHandle& keys, + vtkm::cont::ArrayHandle& values) { SortByKey(keys, values, std::less()); } - template - VTKM_CONT static void SortByKey( - vtkm::cont::ArrayHandle &keys, - vtkm::cont::ArrayHandle &values, - const BinaryCompare &binary_compare) + template + VTKM_CONT static void SortByKey(vtkm::cont::ArrayHandle& keys, + vtkm::cont::ArrayHandle& values, + const BinaryCompare& binary_compare) { - internal::WrappedBinaryOperator wrappedCompare( binary_compare ); + internal::WrappedBinaryOperator wrappedCompare(binary_compare); if (sizeof(U) > sizeof(vtkm::Id)) { /// More efficient sort: /// Move value indexes when sorting and reorder the value array at last - typedef vtkm::cont::ArrayHandle ValueType; + typedef vtkm::cont::ArrayHandle ValueType; typedef vtkm::cont::ArrayHandle IndexType; IndexType indexArray; ValueType valuesScattered; - Copy( ArrayHandleIndex(keys.GetNumberOfValues()), indexArray); + Copy(ArrayHandleIndex(keys.GetNumberOfValues()), indexArray); SortByKeyDirect(keys, indexArray, wrappedCompare); Scatter(values, indexArray, valuesScattered); - Copy( valuesScattered, values ); + Copy(valuesScattered, values); } else { @@ -412,24 +402,23 @@ public: } } - template - VTKM_CONT static void Sort(vtkm::cont::ArrayHandle& values) + template + VTKM_CONT static void Sort(vtkm::cont::ArrayHandle& values) { Sort(values, std::less()); } - template - VTKM_CONT static void Sort(vtkm::cont::ArrayHandle& values, - BinaryCompare binary_compare) + template + VTKM_CONT static void Sort(vtkm::cont::ArrayHandle& values, + BinaryCompare binary_compare) { - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal PortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal + PortalType; PortalType arrayPortal = values.PrepareForInPlace(Device()); vtkm::cont::ArrayPortalToIterators iterators(arrayPortal); - - internal::WrappedBinaryOperator wrappedCompare(binary_compare); + internal::WrappedBinaryOperator wrappedCompare(binary_compare); std::sort(iterators.GetBegin(), iterators.GetEnd(), wrappedCompare); } @@ -437,9 +426,7 @@ public: { // Nothing to do. This device is serial and has no asynchronous operations. } - }; - } } // namespace vtkm::cont diff --git a/vtkm/cont/serial/internal/VirtualObjectTransferSerial.h b/vtkm/cont/serial/internal/VirtualObjectTransferSerial.h index 098a7f770..b476b6cab 100644 --- a/vtkm/cont/serial/internal/VirtualObjectTransferSerial.h +++ b/vtkm/cont/serial/internal/VirtualObjectTransferSerial.h @@ -24,18 +24,18 @@ #include #include +namespace vtkm +{ +namespace cont +{ +namespace internal +{ -namespace vtkm { -namespace cont { -namespace internal { - -template -struct VirtualObjectTransfer< - VirtualObject, TargetClass, vtkm::cont::DeviceAdapterTagSerial> : - public VirtualObjectTransferShareWithControl +template +struct VirtualObjectTransfer + : public VirtualObjectTransferShareWithControl { }; - } } } // vtkm::cont::internal diff --git a/vtkm/cont/serial/testing/UnitTestSerialArrayHandle.cxx b/vtkm/cont/serial/testing/UnitTestSerialArrayHandle.cxx index eb4a4f52e..685c500fe 100644 --- a/vtkm/cont/serial/testing/UnitTestSerialArrayHandle.cxx +++ b/vtkm/cont/serial/testing/UnitTestSerialArrayHandle.cxx @@ -26,9 +26,7 @@ #include #include -int UnitTestSerialArrayHandle(int, char *[]) +int UnitTestSerialArrayHandle(int, char* []) { -return vtkm::cont::testing::TestingArrayHandles - ::Run(); + return vtkm::cont::testing::TestingArrayHandles::Run(); } - diff --git a/vtkm/cont/serial/testing/UnitTestSerialArrayHandleFancy.cxx b/vtkm/cont/serial/testing/UnitTestSerialArrayHandleFancy.cxx index a8f7993a9..4cf2fb2e2 100644 --- a/vtkm/cont/serial/testing/UnitTestSerialArrayHandleFancy.cxx +++ b/vtkm/cont/serial/testing/UnitTestSerialArrayHandleFancy.cxx @@ -29,9 +29,7 @@ #include - -int UnitTestSerialArrayHandleFancy(int, char *[]) +int UnitTestSerialArrayHandleFancy(int, char* []) { - return vtkm::cont::testing::TestingFancyArrayHandles - ::Run(); + return vtkm::cont::testing::TestingFancyArrayHandles::Run(); } diff --git a/vtkm/cont/serial/testing/UnitTestSerialComputeRange.cxx b/vtkm/cont/serial/testing/UnitTestSerialComputeRange.cxx index 9279d2f44..ee7524a3a 100644 --- a/vtkm/cont/serial/testing/UnitTestSerialComputeRange.cxx +++ b/vtkm/cont/serial/testing/UnitTestSerialComputeRange.cxx @@ -27,8 +27,7 @@ #include -int UnitTestSerialComputeRange(int, char *[]) +int UnitTestSerialComputeRange(int, char* []) { - return vtkm::cont::testing::TestingComputeRange - ::Run(); + return vtkm::cont::testing::TestingComputeRange::Run(); } diff --git a/vtkm/cont/serial/testing/UnitTestSerialDataSetExplicit.cxx b/vtkm/cont/serial/testing/UnitTestSerialDataSetExplicit.cxx index 23379aa3b..dc1504d81 100644 --- a/vtkm/cont/serial/testing/UnitTestSerialDataSetExplicit.cxx +++ b/vtkm/cont/serial/testing/UnitTestSerialDataSetExplicit.cxx @@ -26,9 +26,7 @@ #include #include -int UnitTestSerialDataSetExplicit(int, char *[]) +int UnitTestSerialDataSetExplicit(int, char* []) { - return vtkm::cont::testing::TestingDataSetExplicit - ::Run(); + return vtkm::cont::testing::TestingDataSetExplicit::Run(); } - diff --git a/vtkm/cont/serial/testing/UnitTestSerialDataSetSingleType.cxx b/vtkm/cont/serial/testing/UnitTestSerialDataSetSingleType.cxx index 89e8be859..405d6573e 100644 --- a/vtkm/cont/serial/testing/UnitTestSerialDataSetSingleType.cxx +++ b/vtkm/cont/serial/testing/UnitTestSerialDataSetSingleType.cxx @@ -26,9 +26,7 @@ #include #include -int UnitTestSerialDataSetSingleType(int, char *[]) +int UnitTestSerialDataSetSingleType(int, char* []) { - return vtkm::cont::testing::TestingDataSetSingleType - ::Run(); + return vtkm::cont::testing::TestingDataSetSingleType::Run(); } - diff --git a/vtkm/cont/serial/testing/UnitTestSerialDeviceAdapter.cxx b/vtkm/cont/serial/testing/UnitTestSerialDeviceAdapter.cxx index b62d94215..aa12f7aed 100644 --- a/vtkm/cont/serial/testing/UnitTestSerialDeviceAdapter.cxx +++ b/vtkm/cont/serial/testing/UnitTestSerialDeviceAdapter.cxx @@ -27,8 +27,7 @@ #include -int UnitTestSerialDeviceAdapter(int, char *[]) +int UnitTestSerialDeviceAdapter(int, char* []) { - return vtkm::cont::testing::TestingDeviceAdapter - ::Run(); + return vtkm::cont::testing::TestingDeviceAdapter::Run(); } diff --git a/vtkm/cont/serial/testing/UnitTestSerialImplicitFunction.cxx b/vtkm/cont/serial/testing/UnitTestSerialImplicitFunction.cxx index 367a2f414..efa56068e 100644 --- a/vtkm/cont/serial/testing/UnitTestSerialImplicitFunction.cxx +++ b/vtkm/cont/serial/testing/UnitTestSerialImplicitFunction.cxx @@ -20,7 +20,8 @@ #include -namespace { +namespace +{ void TestImplicitFunctions() { @@ -30,9 +31,7 @@ void TestImplicitFunctions() } // anonymous namespace - -int UnitTestSerialImplicitFunction(int, char *[]) +int UnitTestSerialImplicitFunction(int, char* []) { return vtkm::cont::testing::Testing::Run(TestImplicitFunctions); } - diff --git a/vtkm/cont/serial/testing/UnitTestSerialVirtualObjectCache.cxx b/vtkm/cont/serial/testing/UnitTestSerialVirtualObjectCache.cxx index 04e9b51e2..e9bd6ea9d 100644 --- a/vtkm/cont/serial/testing/UnitTestSerialVirtualObjectCache.cxx +++ b/vtkm/cont/serial/testing/UnitTestSerialVirtualObjectCache.cxx @@ -19,7 +19,8 @@ //============================================================================ #include -namespace { +namespace +{ void TestVirtualObjectCache() { @@ -30,8 +31,7 @@ void TestVirtualObjectCache() } // anonymous namespace - -int UnitTestSerialVirtualObjectCache(int, char *[]) +int UnitTestSerialVirtualObjectCache(int, char* []) { return vtkm::cont::testing::Testing::Run(TestVirtualObjectCache); } diff --git a/vtkm/cont/tbb/internal/ArrayManagerExecutionTBB.cxx b/vtkm/cont/tbb/internal/ArrayManagerExecutionTBB.cxx index dc6908522..b11652c5b 100644 --- a/vtkm/cont/tbb/internal/ArrayManagerExecutionTBB.cxx +++ b/vtkm/cont/tbb/internal/ArrayManagerExecutionTBB.cxx @@ -22,10 +22,11 @@ #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ VTKM_INSTANTIATE_ARRAYHANDLES_FOR_DEVICE_ADAPTER(DeviceAdapterTagTBB) - } } // end vtkm::cont diff --git a/vtkm/cont/tbb/internal/ArrayManagerExecutionTBB.h b/vtkm/cont/tbb/internal/ArrayManagerExecutionTBB.h index c16a4227f..54e6e0e59 100644 --- a/vtkm/cont/tbb/internal/ArrayManagerExecutionTBB.h +++ b/vtkm/cont/tbb/internal/ArrayManagerExecutionTBB.h @@ -29,27 +29,29 @@ // These must be placed in the vtkm::cont::internal namespace so that // the template can be found. -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ template -class ArrayManagerExecution - - : public vtkm::cont::internal::ArrayManagerExecutionShareWithControl - +class ArrayManagerExecution + : public vtkm::cont::internal::ArrayManagerExecutionShareWithControl { public: - typedef vtkm::cont::internal::ArrayManagerExecutionShareWithControl - Superclass; + typedef vtkm::cont::internal::ArrayManagerExecutionShareWithControl Superclass; typedef typename Superclass::ValueType ValueType; typedef typename Superclass::PortalType PortalType; typedef typename Superclass::PortalConstType PortalConstType; typedef typename Superclass::StorageType StorageType; VTKM_CONT - ArrayManagerExecution(StorageType *storage) - : Superclass(storage) { } + ArrayManagerExecution(StorageType* storage) + : Superclass(storage) + { + } VTKM_CONT PortalConstType PrepareForInput(bool updateData) @@ -74,7 +76,6 @@ public: #ifndef vtk_m_cont_tbb_internal_ArrayManagerExecutionTBB_cxx VTKM_EXPORT_ARRAYHANDLES_FOR_DEVICE_ADAPTER(DeviceAdapterTagTBB) #endif // !vtk_m_cont_tbb_internal_ArrayManagerExecutionTBB_cxx - } } // namespace vtkm::cont diff --git a/vtkm/cont/tbb/internal/DeviceAdapterAlgorithmTBB.h b/vtkm/cont/tbb/internal/DeviceAdapterAlgorithmTBB.h index 50643b2ac..5052e1ac8 100644 --- a/vtkm/cont/tbb/internal/DeviceAdapterAlgorithmTBB.h +++ b/vtkm/cont/tbb/internal/DeviceAdapterAlgorithmTBB.h @@ -32,92 +32,80 @@ #include #include -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -template<> -struct DeviceAdapterAlgorithm : - vtkm::cont::internal::DeviceAdapterAlgorithmGeneral< - DeviceAdapterAlgorithm, - vtkm::cont::DeviceAdapterTagTBB> +template <> +struct DeviceAdapterAlgorithm + : vtkm::cont::internal::DeviceAdapterAlgorithmGeneral< + DeviceAdapterAlgorithm, vtkm::cont::DeviceAdapterTagTBB> { public: - - template - VTKM_CONT static U Reduce( - const vtkm::cont::ArrayHandle &input, U initialValue) + template + VTKM_CONT static U Reduce(const vtkm::cont::ArrayHandle& input, U initialValue) { - return Reduce(input, initialValue,vtkm::Add()); + return Reduce(input, initialValue, vtkm::Add()); } - template - VTKM_CONT static U Reduce( - const vtkm::cont::ArrayHandle &input, - U initialValue, - BinaryFunctor binary_functor) + template + VTKM_CONT static U Reduce(const vtkm::cont::ArrayHandle& input, U initialValue, + BinaryFunctor binary_functor) { - return tbb::ReducePortals( - input.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), initialValue, + return tbb::ReducePortals(input.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), + initialValue, binary_functor); + } + + template + VTKM_CONT static T ScanInclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output) + { + return tbb::ScanInclusivePortals( + input.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), + output.PrepareForOutput(input.GetNumberOfValues(), vtkm::cont::DeviceAdapterTagTBB()), + vtkm::Add()); + } + + template + VTKM_CONT static T ScanInclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output, + BinaryFunctor binary_functor) + { + return tbb::ScanInclusivePortals( + input.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), + output.PrepareForOutput(input.GetNumberOfValues(), vtkm::cont::DeviceAdapterTagTBB()), binary_functor); } - template - VTKM_CONT static T ScanInclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle &output) - { - return tbb::ScanInclusivePortals( - input.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), - output.PrepareForOutput(input.GetNumberOfValues(), - vtkm::cont::DeviceAdapterTagTBB()),vtkm::Add()); - } - - template - VTKM_CONT static T ScanInclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle &output, - BinaryFunctor binary_functor) - { - return tbb::ScanInclusivePortals( - input.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), - output.PrepareForOutput(input.GetNumberOfValues(), - vtkm::cont::DeviceAdapterTagTBB()), binary_functor); - } - - template - VTKM_CONT static T ScanExclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle &output) + template + VTKM_CONT static T ScanExclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output) { return tbb::ScanExclusivePortals( - input.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), - output.PrepareForOutput(input.GetNumberOfValues(), - vtkm::cont::DeviceAdapterTagTBB()), - vtkm::Add(), vtkm::TypeTraits::ZeroInitialization()); + input.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), + output.PrepareForOutput(input.GetNumberOfValues(), vtkm::cont::DeviceAdapterTagTBB()), + vtkm::Add(), vtkm::TypeTraits::ZeroInitialization()); } - template - VTKM_CONT static T ScanExclusive( - const vtkm::cont::ArrayHandle &input, - vtkm::cont::ArrayHandle &output, - BinaryFunctor binary_functor, - const T& initialValue) + template + VTKM_CONT static T ScanExclusive(const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle& output, + BinaryFunctor binary_functor, const T& initialValue) { return tbb::ScanExclusivePortals( - input.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), - output.PrepareForOutput(input.GetNumberOfValues(), - vtkm::cont::DeviceAdapterTagTBB()), binary_functor, initialValue); + input.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), + output.PrepareForOutput(input.GetNumberOfValues(), vtkm::cont::DeviceAdapterTagTBB()), + binary_functor, initialValue); } - template - VTKM_CONT - static void Schedule(FunctorType functor, vtkm::Id numInstances) + template + VTKM_CONT static void Schedule(FunctorType functor, vtkm::Id numInstances) { const vtkm::Id MESSAGE_SIZE = 1024; char errorString[MESSAGE_SIZE]; errorString[0] = '\0'; - vtkm::exec::internal::ErrorMessageBuffer - errorMessage(errorString, MESSAGE_SIZE); + vtkm::exec::internal::ErrorMessageBuffer errorMessage(errorString, MESSAGE_SIZE); tbb::ScheduleKernel kernel(functor); kernel.SetErrorMessageBuffer(errorMessage); @@ -127,30 +115,27 @@ public: ::tbb::parallel_for(range, kernel); if (errorMessage.IsErrorRaised()) - { + { throw vtkm::cont::ErrorExecution(errorString); - } + } } - template - VTKM_CONT - static void Schedule(FunctorType functor, - vtkm::Id3 rangeMax) + template + VTKM_CONT static void Schedule(FunctorType functor, vtkm::Id3 rangeMax) { - static const vtkm::UInt32 TBB_GRAIN_SIZE_3D[3] = {1, 4, 256}; + static const vtkm::UInt32 TBB_GRAIN_SIZE_3D[3] = { 1, 4, 256 }; //we need to extract from the functor that uniform grid information const vtkm::Id MESSAGE_SIZE = 1024; char errorString[MESSAGE_SIZE]; errorString[0] = '\0'; - vtkm::exec::internal::ErrorMessageBuffer - errorMessage(errorString, MESSAGE_SIZE); + vtkm::exec::internal::ErrorMessageBuffer errorMessage(errorString, MESSAGE_SIZE); //memory is generally setup in a way that iterating the first range //in the tightest loop has the best cache coherence. - ::tbb::blocked_range3d range(0, rangeMax[2], TBB_GRAIN_SIZE_3D[0], - 0, rangeMax[1], TBB_GRAIN_SIZE_3D[1], - 0, rangeMax[0], TBB_GRAIN_SIZE_3D[2]); + ::tbb::blocked_range3d range(0, rangeMax[2], TBB_GRAIN_SIZE_3D[0], 0, rangeMax[1], + TBB_GRAIN_SIZE_3D[1], 0, rangeMax[0], + TBB_GRAIN_SIZE_3D[2]); tbb::ScheduleKernelId3 kernel(functor); kernel.SetErrorMessageBuffer(errorMessage); @@ -158,87 +143,77 @@ public: ::tbb::parallel_for(range, kernel); if (errorMessage.IsErrorRaised()) - { + { throw vtkm::cont::ErrorExecution(errorString); - } + } } - template - VTKM_CONT static void Sort( - vtkm::cont::ArrayHandle &values) + template + VTKM_CONT static void Sort(vtkm::cont::ArrayHandle& values) { //this is required to get sort to work with zip handles - std::less< T > lessOp; - Sort(values, lessOp ); + std::less lessOp; + Sort(values, lessOp); } - template - VTKM_CONT static void Sort( - vtkm::cont::ArrayHandle &values, BinaryCompare binary_compare) + template + VTKM_CONT static void Sort(vtkm::cont::ArrayHandle& values, + BinaryCompare binary_compare) { - typedef typename vtkm::cont::ArrayHandle::template - ExecutionTypes::Portal PortalType; - PortalType arrayPortal = values.PrepareForInPlace( - vtkm::cont::DeviceAdapterTagTBB()); + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + vtkm::cont::DeviceAdapterTagTBB>::Portal PortalType; + PortalType arrayPortal = values.PrepareForInPlace(vtkm::cont::DeviceAdapterTagTBB()); typedef vtkm::cont::ArrayPortalToIterators IteratorsType; IteratorsType iterators(arrayPortal); - internal::WrappedBinaryOperator wrappedCompare(binary_compare); - ::tbb::parallel_sort(iterators.GetBegin(), - iterators.GetEnd(), - wrappedCompare); + internal::WrappedBinaryOperator wrappedCompare(binary_compare); + ::tbb::parallel_sort(iterators.GetBegin(), iterators.GetEnd(), wrappedCompare); } - template - VTKM_CONT static void SortByKey( - vtkm::cont::ArrayHandle &keys, - vtkm::cont::ArrayHandle &values) + template + VTKM_CONT static void SortByKey(vtkm::cont::ArrayHandle& keys, + vtkm::cont::ArrayHandle& values) { SortByKey(keys, values, std::less()); } - template - VTKM_CONT static void SortByKey( - vtkm::cont::ArrayHandle& keys, - vtkm::cont::ArrayHandle& values, - Compare comp) + template + VTKM_CONT static void SortByKey(vtkm::cont::ArrayHandle& keys, + vtkm::cont::ArrayHandle& values, Compare comp) { - typedef vtkm::cont::ArrayHandle KeyType; + typedef vtkm::cont::ArrayHandle KeyType; if (sizeof(U) > sizeof(vtkm::Id)) { /// More efficient sort: /// Move value indexes when sorting and reorder the value array at last - typedef vtkm::cont::ArrayHandle ValueType; + typedef vtkm::cont::ArrayHandle ValueType; typedef vtkm::cont::ArrayHandle IndexType; - typedef vtkm::cont::ArrayHandleZip ZipHandleType; + typedef vtkm::cont::ArrayHandleZip ZipHandleType; IndexType indexArray; ValueType valuesScattered; const vtkm::Id size = values.GetNumberOfValues(); - Copy( ArrayHandleIndex(keys.GetNumberOfValues()), indexArray); - - ZipHandleType zipHandle = vtkm::cont::make_ArrayHandleZip(keys,indexArray); - Sort(zipHandle,vtkm::cont::internal::KeyCompare(comp)); + Copy(ArrayHandleIndex(keys.GetNumberOfValues()), indexArray); + ZipHandleType zipHandle = vtkm::cont::make_ArrayHandleZip(keys, indexArray); + Sort(zipHandle, vtkm::cont::internal::KeyCompare(comp)); tbb::ScatterPortal(values.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), - indexArray.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), - valuesScattered.PrepareForOutput(size,vtkm::cont::DeviceAdapterTagTBB())); + indexArray.PrepareForInput(vtkm::cont::DeviceAdapterTagTBB()), + valuesScattered.PrepareForOutput(size, vtkm::cont::DeviceAdapterTagTBB())); - Copy( valuesScattered, values ); + Copy(valuesScattered, values); } else { - typedef vtkm::cont::ArrayHandle ValueType; - typedef vtkm::cont::ArrayHandleZip ZipHandleType; + typedef vtkm::cont::ArrayHandle ValueType; + typedef vtkm::cont::ArrayHandleZip ZipHandleType; - ZipHandleType zipHandle = vtkm::cont::make_ArrayHandleZip(keys,values); - Sort(zipHandle,vtkm::cont::internal::KeyCompare(comp)); + ZipHandleType zipHandle = vtkm::cont::make_ArrayHandleZip(keys, values); + Sort(zipHandle, vtkm::cont::internal::KeyCompare(comp)); } } @@ -249,29 +224,23 @@ public: // calling this method, then nothing should be running in the execution // environment. } - }; /// TBB contains its own high resolution timer. /// -template<> +template <> class DeviceAdapterTimerImplementation { public: - VTKM_CONT DeviceAdapterTimerImplementation() - { - this->Reset(); - } + VTKM_CONT DeviceAdapterTimerImplementation() { this->Reset(); } VTKM_CONT void Reset() { - vtkm::cont::DeviceAdapterAlgorithm< - vtkm::cont::DeviceAdapterTagTBB>::Synchronize(); + vtkm::cont::DeviceAdapterAlgorithm::Synchronize(); this->StartTime = ::tbb::tick_count::now(); } VTKM_CONT vtkm::Float64 GetElapsedTime() { - vtkm::cont::DeviceAdapterAlgorithm< - vtkm::cont::DeviceAdapterTagTBB>::Synchronize(); + vtkm::cont::DeviceAdapterAlgorithm::Synchronize(); ::tbb::tick_count currentTime = ::tbb::tick_count::now(); ::tbb::tick_count::interval_t elapsedTime = currentTime - this->StartTime; return static_cast(elapsedTime.seconds()); @@ -280,7 +249,6 @@ public: private: ::tbb::tick_count StartTime; }; - } } // namespace vtkm::cont diff --git a/vtkm/cont/tbb/internal/FunctorsTBB.h b/vtkm/cont/tbb/internal/FunctorsTBB.h index dbcc87f72..500f17eea 100644 --- a/vtkm/cont/tbb/internal/FunctorsTBB.h +++ b/vtkm/cont/tbb/internal/FunctorsTBB.h @@ -27,10 +27,9 @@ #include #include - VTKM_THIRDPARTY_PRE_INCLUDE -#if defined(VTKM_MSVC) +#if defined(VTKM_MSVC) // TBB's header include a #pragma comment(lib,"tbb.lib") line to make all // consuming libraries link to tbb, this is bad behavior in a header @@ -69,16 +68,18 @@ VTKM_THIRDPARTY_PRE_INCLUDE VTKM_THIRDPARTY_POST_INCLUDE -namespace vtkm { -namespace cont { -namespace tbb { +namespace vtkm +{ +namespace cont +{ +namespace tbb +{ // The "grain size" of scheduling with TBB. Not a lot of thought has gone // into picking this size. static const vtkm::Id TBB_GRAIN_SIZE = 1024; - -template +template struct ReduceBody { T Sum; @@ -88,59 +89,61 @@ struct ReduceBody BinaryOperationType BinaryOperation; VTKM_CONT - ReduceBody(const InputPortalType &inputPortal, - T initialValue, + ReduceBody(const InputPortalType& inputPortal, T initialValue, BinaryOperationType binaryOperation) - : Sum(vtkm::TypeTraits::ZeroInitialization()), - InitialValue(initialValue), - FirstCall(true), - InputPortal(inputPortal), - BinaryOperation(binaryOperation) - { } + : Sum(vtkm::TypeTraits::ZeroInitialization()) + , InitialValue(initialValue) + , FirstCall(true) + , InputPortal(inputPortal) + , BinaryOperation(binaryOperation) + { + } VTKM_EXEC_CONT - ReduceBody(const ReduceBody &body, ::tbb::split) - : Sum(vtkm::TypeTraits::ZeroInitialization()), - InitialValue(body.InitialValue), - FirstCall(true), - InputPortal(body.InputPortal), - BinaryOperation(body.BinaryOperation) { } + ReduceBody(const ReduceBody& body, ::tbb::split) + : Sum(vtkm::TypeTraits::ZeroInitialization()) + , InitialValue(body.InitialValue) + , FirstCall(true) + , InputPortal(body.InputPortal) + , BinaryOperation(body.BinaryOperation) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - void operator()(const ::tbb::blocked_range &range) + void operator()(const ::tbb::blocked_range& range) { - typedef vtkm::cont::ArrayPortalToIterators - InputIteratorsType; + typedef vtkm::cont::ArrayPortalToIterators InputIteratorsType; InputIteratorsType inputIterators(this->InputPortal); //use temp, and iterators instead of member variable to reduce false sharing typename InputIteratorsType::IteratorType inIter = inputIterators.GetBegin() + static_cast(range.begin()); - T temp = this->BinaryOperation(*inIter, *(inIter+1)); - ++inIter; ++inIter; - for (vtkm::Id index = range.begin()+2; index != range.end(); ++index, ++inIter) - { + T temp = this->BinaryOperation(*inIter, *(inIter + 1)); + ++inIter; + ++inIter; + for (vtkm::Id index = range.begin() + 2; index != range.end(); ++index, ++inIter) + { temp = this->BinaryOperation(temp, *inIter); - } + } //determine if we also have to add the initial value to temp - if(range.begin() == 0) + if (range.begin() == 0) { - temp = this->BinaryOperation(temp,this->InitialValue); + temp = this->BinaryOperation(temp, this->InitialValue); } //Now we can save temp back to sum, taking into account if //this task has been called before, and the sum value needs //to also be reduced. - if(this->FirstCall) + if (this->FirstCall) { this->Sum = temp; } else { - this->Sum = this->BinaryOperation(this->Sum,temp); + this->Sum = this->BinaryOperation(this->Sum, temp); } this->FirstCall = false; @@ -148,7 +151,7 @@ struct ReduceBody VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - void join(const ReduceBody &left) + void join(const ReduceBody& left) { // std::cout << "join" << std::endl; this->Sum = this->BinaryOperation(left.Sum, this->Sum); @@ -156,25 +159,20 @@ struct ReduceBody }; VTKM_SUPPRESS_EXEC_WARNINGS -template -VTKM_CONT static -T ReducePortals(InputPortalType inputPortal, - T initialValue, - BinaryOperationType binaryOperation) +template +VTKM_CONT static T ReducePortals(InputPortalType inputPortal, T initialValue, + BinaryOperationType binaryOperation) { - typedef internal::WrappedBinaryOperator - WrappedBinaryOp; + typedef internal::WrappedBinaryOperator WrappedBinaryOp; WrappedBinaryOp wrappedBinaryOp(binaryOperation); - ReduceBodybody(inputPortal, - initialValue, - wrappedBinaryOp); + ReduceBody body(inputPortal, initialValue, wrappedBinaryOp); vtkm::Id arrayLength = inputPortal.GetNumberOfValues(); if (arrayLength > 1) { ::tbb::blocked_range range(0, arrayLength, TBB_GRAIN_SIZE); - ::tbb::parallel_reduce( range, body ); + ::tbb::parallel_reduce(range, body); return body.Sum; } else if (arrayLength == 1) @@ -189,12 +187,10 @@ T ReducePortals(InputPortalType inputPortal, } } -template +template struct ScanInclusiveBody { - using ValueType = typename std::remove_reference< - typename OutputPortalType::ValueType>::type; + using ValueType = typename std::remove_reference::type; ValueType Sum; bool FirstCall; InputPortalType InputPortal; @@ -202,54 +198,51 @@ struct ScanInclusiveBody BinaryOperationType BinaryOperation; VTKM_CONT - ScanInclusiveBody(const InputPortalType &inputPortal, - const OutputPortalType &outputPortal, + ScanInclusiveBody(const InputPortalType& inputPortal, const OutputPortalType& outputPortal, BinaryOperationType binaryOperation) - : Sum( vtkm::TypeTraits::ZeroInitialization() ), - FirstCall(true), - InputPortal(inputPortal), - OutputPortal(outputPortal), - BinaryOperation(binaryOperation) - { } + : Sum(vtkm::TypeTraits::ZeroInitialization()) + , FirstCall(true) + , InputPortal(inputPortal) + , OutputPortal(outputPortal) + , BinaryOperation(binaryOperation) + { + } VTKM_EXEC_CONT - ScanInclusiveBody(const ScanInclusiveBody &body, ::tbb::split) - : Sum( vtkm::TypeTraits::ZeroInitialization() ), - FirstCall(true), - InputPortal(body.InputPortal), - OutputPortal(body.OutputPortal), - BinaryOperation(body.BinaryOperation) { } + ScanInclusiveBody(const ScanInclusiveBody& body, ::tbb::split) + : Sum(vtkm::TypeTraits::ZeroInitialization()) + , FirstCall(true) + , InputPortal(body.InputPortal) + , OutputPortal(body.OutputPortal) + , BinaryOperation(body.BinaryOperation) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - void operator()(const ::tbb::blocked_range &range, ::tbb::pre_scan_tag) + void operator()(const ::tbb::blocked_range& range, ::tbb::pre_scan_tag) { - typedef vtkm::cont::ArrayPortalToIterators - InputIteratorsType; + typedef vtkm::cont::ArrayPortalToIterators InputIteratorsType; InputIteratorsType inputIterators(this->InputPortal); //use temp, and iterators instead of member variable to reduce false sharing typename InputIteratorsType::IteratorType inIter = inputIterators.GetBegin() + static_cast(range.begin()); - ValueType temp = this->FirstCall ? *inIter++ : - this->BinaryOperation(this->Sum, *inIter++); + ValueType temp = this->FirstCall ? *inIter++ : this->BinaryOperation(this->Sum, *inIter++); this->FirstCall = false; - for (vtkm::Id index = range.begin() + 1; index != range.end(); - ++index, ++inIter) - { + for (vtkm::Id index = range.begin() + 1; index != range.end(); ++index, ++inIter) + { temp = this->BinaryOperation(temp, *inIter); - } + } this->Sum = temp; } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - void operator()(const ::tbb::blocked_range &range, ::tbb::final_scan_tag) + void operator()(const ::tbb::blocked_range& range, ::tbb::final_scan_tag) { - typedef vtkm::cont::ArrayPortalToIterators - InputIteratorsType; - typedef vtkm::cont::ArrayPortalToIterators - OutputIteratorsType; + typedef vtkm::cont::ArrayPortalToIterators InputIteratorsType; + typedef vtkm::cont::ArrayPortalToIterators OutputIteratorsType; InputIteratorsType inputIterators(this->InputPortal); OutputIteratorsType outputIterators(this->OutputPortal); @@ -259,40 +252,32 @@ struct ScanInclusiveBody inputIterators.GetBegin() + static_cast(range.begin()); typename OutputIteratorsType::IteratorType outIter = outputIterators.GetBegin() + static_cast(range.begin()); - ValueType temp = this->FirstCall ? *inIter++ : - this->BinaryOperation(this->Sum, *inIter++); + ValueType temp = this->FirstCall ? *inIter++ : this->BinaryOperation(this->Sum, *inIter++); this->FirstCall = false; *outIter++ = temp; - for (vtkm::Id index = range.begin() + 1; index != range.end(); - ++index, ++inIter, ++outIter) - { + for (vtkm::Id index = range.begin() + 1; index != range.end(); ++index, ++inIter, ++outIter) + { *outIter = temp = this->BinaryOperation(temp, *inIter); - } + } this->Sum = temp; } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - void reverse_join(const ScanInclusiveBody &left) + void reverse_join(const ScanInclusiveBody& left) { this->Sum = this->BinaryOperation(left.Sum, this->Sum); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - void assign(const ScanInclusiveBody &src) - { - this->Sum = src.Sum; - } + void assign(const ScanInclusiveBody& src) { this->Sum = src.Sum; } }; - -template +template struct ScanExclusiveBody { - using ValueType = typename std::remove_reference< - typename OutputPortalType::ValueType>::type; + using ValueType = typename std::remove_reference::type; ValueType Sum; bool FirstCall; @@ -301,32 +286,31 @@ struct ScanExclusiveBody BinaryOperationType BinaryOperation; VTKM_CONT - ScanExclusiveBody(const InputPortalType &inputPortal, - const OutputPortalType &outputPortal, - BinaryOperationType binaryOperation, - const ValueType& initialValue) - : Sum(initialValue), - FirstCall(true), - InputPortal(inputPortal), - OutputPortal(outputPortal), - BinaryOperation(binaryOperation) - { } + ScanExclusiveBody(const InputPortalType& inputPortal, const OutputPortalType& outputPortal, + BinaryOperationType binaryOperation, const ValueType& initialValue) + : Sum(initialValue) + , FirstCall(true) + , InputPortal(inputPortal) + , OutputPortal(outputPortal) + , BinaryOperation(binaryOperation) + { + } VTKM_EXEC_CONT - ScanExclusiveBody(const ScanExclusiveBody &body, ::tbb::split) - : Sum(body.Sum), - FirstCall(true), - InputPortal(body.InputPortal), - OutputPortal(body.OutputPortal), - BinaryOperation(body.BinaryOperation) - { } + ScanExclusiveBody(const ScanExclusiveBody& body, ::tbb::split) + : Sum(body.Sum) + , FirstCall(true) + , InputPortal(body.InputPortal) + , OutputPortal(body.OutputPortal) + , BinaryOperation(body.BinaryOperation) + { + } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - void operator()(const ::tbb::blocked_range &range, ::tbb::pre_scan_tag) + void operator()(const ::tbb::blocked_range& range, ::tbb::pre_scan_tag) { - typedef vtkm::cont::ArrayPortalToIterators - InputIteratorsType; + typedef vtkm::cont::ArrayPortalToIterators InputIteratorsType; InputIteratorsType inputIterators(this->InputPortal); //move the iterator to the first item @@ -335,24 +319,24 @@ struct ScanExclusiveBody ValueType temp = *iter; ++iter; - if(! (this->FirstCall && range.begin() > 0) ) - { temp = this->BinaryOperation(this->Sum, temp); } - for (vtkm::Id index = range.begin()+1; index != range.end(); ++index, ++iter) - { + if (!(this->FirstCall && range.begin() > 0)) + { + temp = this->BinaryOperation(this->Sum, temp); + } + for (vtkm::Id index = range.begin() + 1; index != range.end(); ++index, ++iter) + { temp = this->BinaryOperation(temp, *iter); - } + } this->Sum = temp; this->FirstCall = false; } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - void operator()(const ::tbb::blocked_range &range, ::tbb::final_scan_tag) + void operator()(const ::tbb::blocked_range& range, ::tbb::final_scan_tag) { - typedef vtkm::cont::ArrayPortalToIterators - InputIteratorsType; - typedef vtkm::cont::ArrayPortalToIterators - OutputIteratorsType; + typedef vtkm::cont::ArrayPortalToIterators InputIteratorsType; + typedef vtkm::cont::ArrayPortalToIterators OutputIteratorsType; InputIteratorsType inputIterators(this->InputPortal); OutputIteratorsType outputIterators(this->OutputPortal); @@ -364,28 +348,27 @@ struct ScanExclusiveBody outputIterators.GetBegin() + static_cast(range.begin()); ValueType temp = this->Sum; - for (vtkm::Id index = range.begin(); index != range.end(); - ++index, ++inIter, ++outIter) - { + for (vtkm::Id index = range.begin(); index != range.end(); ++index, ++inIter, ++outIter) + { //copy into a local reference since Input and Output portal //could point to the same memory location ValueType v = *inIter; *outIter = temp; temp = this->BinaryOperation(temp, v); - } + } this->Sum = temp; this->FirstCall = false; } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - void reverse_join(const ScanExclusiveBody &left) + void reverse_join(const ScanExclusiveBody& left) { //The contract we have with TBB is that they will only join //two objects that have been scanned, or two objects which //haven't been scanned VTKM_ASSERT(left.FirstCall == this->FirstCall); - if(!left.FirstCall && !this->FirstCall) + if (!left.FirstCall && !this->FirstCall) { this->Sum = this->BinaryOperation(left.Sum, this->Sum); } @@ -393,84 +376,71 @@ struct ScanExclusiveBody VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - void assign(const ScanExclusiveBody &src) - { - this->Sum = src.Sum; - } + void assign(const ScanExclusiveBody& src) { this->Sum = src.Sum; } }; VTKM_SUPPRESS_EXEC_WARNINGS -template -VTKM_CONT static -typename std::remove_reference::type -ScanInclusivePortals(InputPortalType inputPortal, - OutputPortalType outputPortal, +template +VTKM_CONT static typename std::remove_reference::type +ScanInclusivePortals(InputPortalType inputPortal, OutputPortalType outputPortal, BinaryOperationType binaryOperation) { - using ValueType = typename std::remove_reference< - typename OutputPortalType::ValueType>::type; + using ValueType = typename std::remove_reference::type; - typedef internal::WrappedBinaryOperator - WrappedBinaryOp; + typedef internal::WrappedBinaryOperator WrappedBinaryOp; WrappedBinaryOp wrappedBinaryOp(binaryOperation); - ScanInclusiveBody - body(inputPortal, outputPortal, wrappedBinaryOp); + ScanInclusiveBody body( + inputPortal, outputPortal, wrappedBinaryOp); vtkm::Id arrayLength = inputPortal.GetNumberOfValues(); ::tbb::blocked_range range(0, arrayLength, TBB_GRAIN_SIZE); - ::tbb::parallel_scan( range, body ); + ::tbb::parallel_scan(range, body); return body.Sum; } VTKM_SUPPRESS_EXEC_WARNINGS -template -VTKM_CONT static -typename std::remove_reference::type -ScanExclusivePortals(InputPortalType inputPortal, - OutputPortalType outputPortal, - BinaryOperationType binaryOperation, - typename std::remove_reference< - typename OutputPortalType::ValueType>::type initialValue) +template +VTKM_CONT static typename std::remove_reference::type +ScanExclusivePortals( + InputPortalType inputPortal, OutputPortalType outputPortal, BinaryOperationType binaryOperation, + typename std::remove_reference::type initialValue) { - using ValueType = typename std::remove_reference< - typename OutputPortalType::ValueType>::type; + using ValueType = typename std::remove_reference::type; - typedef internal::WrappedBinaryOperator - WrappedBinaryOp; + typedef internal::WrappedBinaryOperator WrappedBinaryOp; WrappedBinaryOp wrappedBinaryOp(binaryOperation); - ScanExclusiveBody - body(inputPortal, outputPortal, wrappedBinaryOp, initialValue); + ScanExclusiveBody body( + inputPortal, outputPortal, wrappedBinaryOp, initialValue); vtkm::Id arrayLength = inputPortal.GetNumberOfValues(); ::tbb::blocked_range range(0, arrayLength, TBB_GRAIN_SIZE); - ::tbb::parallel_scan( range, body ); + ::tbb::parallel_scan(range, body); // Seems a little weird to me that we would return the last value in the // array rather than the sum, but that is how the function is specified. return body.Sum; } -template +template class ScheduleKernel { public: - VTKM_CONT ScheduleKernel(const FunctorType &functor) + VTKM_CONT ScheduleKernel(const FunctorType& functor) : Functor(functor) - { } + { + } - VTKM_CONT void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &errorMessage) + VTKM_CONT void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer& errorMessage) { this->ErrorMessage = errorMessage; this->Functor.SetErrorMessageBuffer(errorMessage); } VTKM_CONT - void operator()(const ::tbb::blocked_range &range) const { + void operator()(const ::tbb::blocked_range& range) const + { // The TBB device adapter causes array classes to be shared between // control and execution environment. This means that it is possible for // an exception to be thrown even though this is typically not allowed. @@ -478,104 +448,102 @@ public: // simultaneous threads running. Get around the problem by catching the // error and setting the message buffer as expected. try - { + { const vtkm::Id start = range.begin(); const vtkm::Id end = range.end(); -VTKM_VECTORIZATION_PRE_LOOP + VTKM_VECTORIZATION_PRE_LOOP for (vtkm::Id index = start; index != end; index++) - { -VTKM_VECTORIZATION_IN_LOOP + { + VTKM_VECTORIZATION_IN_LOOP this->Functor(index); - } } - catch (vtkm::cont::Error &error) - { + } + catch (vtkm::cont::Error& error) + { this->ErrorMessage.RaiseError(error.GetMessage().c_str()); - } + } catch (...) - { - this->ErrorMessage.RaiseError( - "Unexpected error in execution environment."); - } + { + this->ErrorMessage.RaiseError("Unexpected error in execution environment."); + } } + private: FunctorType Functor; vtkm::exec::internal::ErrorMessageBuffer ErrorMessage; }; - -template +template class ScheduleKernelId3 { public: - VTKM_CONT ScheduleKernelId3(const FunctorType &functor) + VTKM_CONT ScheduleKernelId3(const FunctorType& functor) : Functor(functor) - { } + { + } - VTKM_CONT void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &errorMessage) + VTKM_CONT void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer& errorMessage) { this->ErrorMessage = errorMessage; this->Functor.SetErrorMessageBuffer(errorMessage); } VTKM_CONT - void operator()(const ::tbb::blocked_range3d &range) const { + void operator()(const ::tbb::blocked_range3d& range) const + { try - { + { const vtkm::Id kstart = range.pages().begin(); const vtkm::Id kend = range.pages().end(); - const vtkm::Id jstart =range.rows().begin(); + const vtkm::Id jstart = range.rows().begin(); const vtkm::Id jend = range.rows().end(); - const vtkm::Id istart =range.cols().begin(); + const vtkm::Id istart = range.cols().begin(); const vtkm::Id iend = range.cols().end(); vtkm::Id3 index; - for( vtkm::Id k=kstart; k!=kend; ++k) + for (vtkm::Id k = kstart; k != kend; ++k) + { + index[2] = k; + for (vtkm::Id j = jstart; j != jend; ++j) { - index[2]=k; - for( vtkm::Id j=jstart; j!=jend; ++j) + index[1] = j; + for (vtkm::Id i = istart; i != iend; ++i) { - index[1]=j; - for( vtkm::Id i=istart; i != iend; ++i) - { - index[0]=i; + index[0] = i; this->Functor(index); - } } } } - catch (vtkm::cont::Error &error) - { + } + catch (vtkm::cont::Error& error) + { this->ErrorMessage.RaiseError(error.GetMessage().c_str()); - } + } catch (...) - { - this->ErrorMessage.RaiseError( - "Unexpected error in execution environment."); - } + { + this->ErrorMessage.RaiseError("Unexpected error in execution environment."); + } } + private: FunctorType Functor; vtkm::exec::internal::ErrorMessageBuffer ErrorMessage; }; -template +template class ScatterKernel { public: - VTKM_CONT ScatterKernel(InputPortalType inputPortal, - IndexPortalType indexPortal, - OutputPortalType outputPortal) - : ValuesPortal(inputPortal), - IndexPortal(indexPortal), - OutputPortal(outputPortal) - { } + VTKM_CONT ScatterKernel(InputPortalType inputPortal, IndexPortalType indexPortal, + OutputPortalType outputPortal) + : ValuesPortal(inputPortal) + , IndexPortal(indexPortal) + , OutputPortal(outputPortal) + { + } VTKM_CONT - void operator()(const ::tbb::blocked_range &range) const + void operator()(const ::tbb::blocked_range& range) const { // The TBB device adapter causes array classes to be shared between // control and execution environment. This means that it is possible for @@ -584,24 +552,24 @@ public: // simultaneous threads running. Get around the problem by catching the // error and setting the message buffer as expected. try - { -VTKM_VECTORIZATION_PRE_LOOP + { + VTKM_VECTORIZATION_PRE_LOOP for (vtkm::Id i = range.begin(); i < range.end(); i++) - { -VTKM_VECTORIZATION_IN_LOOP - OutputPortal.Set( i, ValuesPortal.Get(IndexPortal.Get(i)) ); - } - } - catch (vtkm::cont::Error &error) { + VTKM_VECTORIZATION_IN_LOOP + OutputPortal.Set(i, ValuesPortal.Get(IndexPortal.Get(i))); + } + } + catch (vtkm::cont::Error& error) + { this->ErrorMessage.RaiseError(error.GetMessage().c_str()); - } + } catch (...) - { - this->ErrorMessage.RaiseError( - "Unexpected error in execution environment."); - } + { + this->ErrorMessage.RaiseError("Unexpected error in execution environment."); + } } + private: InputPortalType ValuesPortal; IndexPortalType IndexPortal; @@ -610,26 +578,19 @@ private: }; VTKM_SUPPRESS_EXEC_WARNINGS -template -VTKM_CONT static void ScatterPortal(InputPortalType inputPortal, - IndexPortalType indexPortal, - OutputPortalType outputPortal) +template +VTKM_CONT static void ScatterPortal(InputPortalType inputPortal, IndexPortalType indexPortal, + OutputPortalType outputPortal) { const vtkm::Id size = inputPortal.GetNumberOfValues(); - VTKM_ASSERT(size == indexPortal.GetNumberOfValues() ); + VTKM_ASSERT(size == indexPortal.GetNumberOfValues()); - ScatterKernel scatter(inputPortal, - indexPortal, - outputPortal); + ScatterKernel scatter( + inputPortal, indexPortal, outputPortal); ::tbb::blocked_range range(0, size, TBB_GRAIN_SIZE); ::tbb::parallel_for(range, scatter); } - } } } diff --git a/vtkm/cont/tbb/internal/VirtualObjectTransferTBB.h b/vtkm/cont/tbb/internal/VirtualObjectTransferTBB.h index 600bc3e07..9039a85b7 100644 --- a/vtkm/cont/tbb/internal/VirtualObjectTransferTBB.h +++ b/vtkm/cont/tbb/internal/VirtualObjectTransferTBB.h @@ -24,18 +24,18 @@ #include #include +namespace vtkm +{ +namespace cont +{ +namespace internal +{ -namespace vtkm { -namespace cont { -namespace internal { - -template -struct VirtualObjectTransfer< - VirtualObject, TargetClass, vtkm::cont::DeviceAdapterTagTBB> : - public VirtualObjectTransferShareWithControl +template +struct VirtualObjectTransfer + : public VirtualObjectTransferShareWithControl { }; - } } } // vtkm::cont::internal diff --git a/vtkm/cont/tbb/internal/parallel_sort.h b/vtkm/cont/tbb/internal/parallel_sort.h index 61bdd2a8f..276924671 100644 --- a/vtkm/cont/tbb/internal/parallel_sort.h +++ b/vtkm/cont/tbb/internal/parallel_sort.h @@ -36,149 +36,176 @@ #include #include -namespace tbb { +namespace tbb +{ //! @cond INTERNAL -namespace internal { +namespace internal +{ //! Range used in quicksort to split elements into subranges based on a value. /** The split operation selects a splitter and places all elements less than or equal to the value in the first range and the remaining elements in the second range. @ingroup algorithms */ -template -class quick_sort_range: private no_assign { +template +class quick_sort_range : private no_assign +{ - inline size_t median_of_three(const RandomAccessIterator &array, size_t l, size_t m, size_t r) const { - return comp(array[l], array[m]) ? ( comp(array[m], array[r]) ? m : ( comp( array[l], array[r]) ? r : l ) ) - : ( comp(array[r], array[m]) ? m : ( comp( array[r], array[l] ) ? r : l ) ); - } + inline size_t median_of_three(const RandomAccessIterator& array, size_t l, size_t m, + size_t r) const + { + return comp(array[l], array[m]) + ? (comp(array[m], array[r]) ? m : (comp(array[l], array[r]) ? r : l)) + : (comp(array[r], array[m]) ? m : (comp(array[r], array[l]) ? r : l)); + } - inline size_t pseudo_median_of_nine( const RandomAccessIterator &array, const quick_sort_range &range ) const { - size_t offset = range.size/8u; - return median_of_three(array, - median_of_three(array, 0, offset, offset*2), - median_of_three(array, offset*3, offset*4, offset*5), - median_of_three(array, offset*6, offset*7, range.size - 1) ); - - } + inline size_t pseudo_median_of_nine(const RandomAccessIterator& array, + const quick_sort_range& range) const + { + size_t offset = range.size / 8u; + return median_of_three(array, median_of_three(array, 0, offset, offset * 2), + median_of_three(array, offset * 3, offset * 4, offset * 5), + median_of_three(array, offset * 6, offset * 7, range.size - 1)); + } public: + static const size_t grainsize = 500; + const Compare& comp; + RandomAccessIterator begin; + size_t size; - static const size_t grainsize = 500; - const Compare ∁ - RandomAccessIterator begin; - size_t size; + quick_sort_range(RandomAccessIterator begin_, size_t size_, const Compare& comp_) + : comp(comp_) + , begin(begin_) + , size(size_) + { + } - quick_sort_range( RandomAccessIterator begin_, size_t size_, const Compare &comp_ ) : - comp(comp_), begin(begin_), size(size_) {} + bool empty() const { return size == 0; } + bool is_divisible() const { return size >= grainsize; } - bool empty() const {return size==0;} - bool is_divisible() const {return size>=grainsize;} + quick_sort_range(quick_sort_range& range, split) + : comp(range.comp) + { + using std::swap; + RandomAccessIterator array = range.begin; + RandomAccessIterator key0 = range.begin; + size_t m = pseudo_median_of_nine(array, range); + if (m) + swap(array[0], array[m]); - quick_sort_range( quick_sort_range& range, split ) : comp(range.comp) { - using std::swap; - RandomAccessIterator array = range.begin; - RandomAccessIterator key0 = range.begin; - size_t m = pseudo_median_of_nine(array, range); - if (m) swap ( array[0], array[m] ); - - size_t i=0; - size_t j=range.size; - // Partition interval [i+1,j-1] with key *key0. - for(;;) { - __TBB_ASSERT( i -class quick_sort_pretest_body : internal::no_assign { - const Compare ∁ +template +class quick_sort_pretest_body : internal::no_assign +{ + const Compare& comp; public: - quick_sort_pretest_body(const Compare &_comp) : comp(_comp) {} + quick_sort_pretest_body(const Compare& _comp) + : comp(_comp) + { + } - void operator()( const blocked_range& range ) const { - task &my_task = task::self(); - RandomAccessIterator my_end = range.end(); + void operator()(const blocked_range& range) const + { + task& my_task = task::self(); + RandomAccessIterator my_end = range.end(); - int i = 0; - for (RandomAccessIterator k = range.begin(); k != my_end; ++k, ++i) { - if ( i%64 == 0 && my_task.is_cancelled() ) break; + int i = 0; + for (RandomAccessIterator k = range.begin(); k != my_end; ++k, ++i) + { + if (i % 64 == 0 && my_task.is_cancelled()) + break; - // The k-1 is never out-of-range because the first chunk starts at begin+serial_cutoff+1 - if ( comp( *(k), *(k-1) ) ) { - my_task.cancel_group_execution(); - break; - } - } + // The k-1 is never out-of-range because the first chunk starts at begin+serial_cutoff+1 + if (comp(*(k), *(k - 1))) + { + my_task.cancel_group_execution(); + break; + } } - + } }; #endif /* __TBB_TASK_GROUP_CONTEXT */ //! Body class used to sort elements in a range that is smaller than the grainsize. /** @ingroup algorithms */ -template -struct quick_sort_body { - void operator()( const quick_sort_range& range ) const { - //SerialQuickSort( range.begin, range.size, range.comp ); - std::sort( range.begin, range.begin + range.size, range.comp ); - } +template +struct quick_sort_body +{ + void operator()(const quick_sort_range& range) const + { + //SerialQuickSort( range.begin, range.size, range.comp ); + std::sort(range.begin, range.begin + range.size, range.comp); + } }; //! Wrapper method to initiate the sort by calling parallel_for. /** @ingroup algorithms */ -template -void parallel_quick_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp ) { +template +void parallel_quick_sort(RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp) +{ #if __TBB_TASK_GROUP_CONTEXT - task_group_context my_context; - const int serial_cutoff = 9; + task_group_context my_context; + const int serial_cutoff = 9; - __TBB_ASSERT( begin + serial_cutoff < end, "min_parallel_size is smaller than serial cutoff?" ); - RandomAccessIterator k; - for (k = begin; k != begin + serial_cutoff; ++k ) { - if ( comp( *(k+1), *k ) ) { - goto do_parallel_quick_sort; - } + __TBB_ASSERT(begin + serial_cutoff < end, "min_parallel_size is smaller than serial cutoff?"); + RandomAccessIterator k; + for (k = begin; k != begin + serial_cutoff; ++k) + { + if (comp(*(k + 1), *k)) + { + goto do_parallel_quick_sort; } + } - parallel_for( blocked_range(k+1, end), - quick_sort_pretest_body(comp), - auto_partitioner(), - my_context); + parallel_for(blocked_range(k + 1, end), + quick_sort_pretest_body(comp), auto_partitioner(), + my_context); - if (my_context.is_group_execution_cancelled()) -do_parallel_quick_sort: + if (my_context.is_group_execution_cancelled()) + do_parallel_quick_sort: #endif /* __TBB_TASK_GROUP_CONTEXT */ - parallel_for( quick_sort_range(begin, end-begin, comp ), - quick_sort_body(), - auto_partitioner() ); + parallel_for(quick_sort_range(begin, end - begin, comp), + quick_sort_body(), auto_partitioner()); } } // namespace internal @@ -199,35 +226,41 @@ do_parallel_quick_sort: /** The compare function object is used for all comparisons between elements during sorting. The compare object must define a bool operator() function. @ingroup algorithms **/ -template -void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp) { - const int min_parallel_size = 500; - if( end > begin ) { - if (end - begin < min_parallel_size) { - std::sort(begin, end, comp); - } else { - internal::parallel_quick_sort(begin, end, comp); - } +template +void parallel_sort(RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp) +{ + const int min_parallel_size = 500; + if (end > begin) + { + if (end - begin < min_parallel_size) + { + std::sort(begin, end, comp); } + else + { + internal::parallel_quick_sort(begin, end, comp); + } + } } //! Sorts the data in [begin,end) with a default comparator \c std::less /** @ingroup algorithms **/ -template -inline void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end ) { - parallel_sort( begin, end, std::less< typename std::iterator_traits::value_type >() ); +template +inline void parallel_sort(RandomAccessIterator begin, RandomAccessIterator end) +{ + parallel_sort(begin, end, + std::less::value_type>()); } //! Sorts the data in the range \c [begin,end) with a default comparator \c std::less /** @ingroup algorithms **/ -template -inline void parallel_sort( T * begin, T * end ) { - parallel_sort( begin, end, std::less< T >() ); +template +inline void parallel_sort(T* begin, T* end) +{ + parallel_sort(begin, end, std::less()); } //@} - } // namespace tbb #endif - diff --git a/vtkm/cont/tbb/testing/UnitTestTBBArrayHandle.cxx b/vtkm/cont/tbb/testing/UnitTestTBBArrayHandle.cxx index 3bc3df143..6bac5e60d 100644 --- a/vtkm/cont/tbb/testing/UnitTestTBBArrayHandle.cxx +++ b/vtkm/cont/tbb/testing/UnitTestTBBArrayHandle.cxx @@ -23,8 +23,7 @@ #include #include -int UnitTestTBBArrayHandle(int, char *[]) +int UnitTestTBBArrayHandle(int, char* []) { - return vtkm::cont::testing::TestingArrayHandles - ::Run(); + return vtkm::cont::testing::TestingArrayHandles::Run(); } diff --git a/vtkm/cont/tbb/testing/UnitTestTBBArrayHandleFancy.cxx b/vtkm/cont/tbb/testing/UnitTestTBBArrayHandleFancy.cxx index 5f6917741..f3fd74a80 100644 --- a/vtkm/cont/tbb/testing/UnitTestTBBArrayHandleFancy.cxx +++ b/vtkm/cont/tbb/testing/UnitTestTBBArrayHandleFancy.cxx @@ -23,8 +23,7 @@ #include #include -int UnitTestTBBArrayHandleFancy(int, char *[]) +int UnitTestTBBArrayHandleFancy(int, char* []) { - return vtkm::cont::testing::TestingFancyArrayHandles - ::Run(); + return vtkm::cont::testing::TestingFancyArrayHandles::Run(); } diff --git a/vtkm/cont/tbb/testing/UnitTestTBBComputeRange.cxx b/vtkm/cont/tbb/testing/UnitTestTBBComputeRange.cxx index 781fc1bdc..2147af7e9 100644 --- a/vtkm/cont/tbb/testing/UnitTestTBBComputeRange.cxx +++ b/vtkm/cont/tbb/testing/UnitTestTBBComputeRange.cxx @@ -22,8 +22,7 @@ #include -int UnitTestTBBComputeRange(int, char *[]) +int UnitTestTBBComputeRange(int, char* []) { - return vtkm::cont::testing::TestingComputeRange - ::Run(); + return vtkm::cont::testing::TestingComputeRange::Run(); } diff --git a/vtkm/cont/tbb/testing/UnitTestTBBDataSetExplicit.cxx b/vtkm/cont/tbb/testing/UnitTestTBBDataSetExplicit.cxx index fc7278242..2afa1bd2d 100644 --- a/vtkm/cont/tbb/testing/UnitTestTBBDataSetExplicit.cxx +++ b/vtkm/cont/tbb/testing/UnitTestTBBDataSetExplicit.cxx @@ -22,8 +22,7 @@ #include -int UnitTestTBBDataSetExplicit(int, char *[]) +int UnitTestTBBDataSetExplicit(int, char* []) { - return vtkm::cont::testing::TestingDataSetExplicit - ::Run(); + return vtkm::cont::testing::TestingDataSetExplicit::Run(); } diff --git a/vtkm/cont/tbb/testing/UnitTestTBBDataSetSingleType.cxx b/vtkm/cont/tbb/testing/UnitTestTBBDataSetSingleType.cxx index 36ae50959..7309650d6 100644 --- a/vtkm/cont/tbb/testing/UnitTestTBBDataSetSingleType.cxx +++ b/vtkm/cont/tbb/testing/UnitTestTBBDataSetSingleType.cxx @@ -22,8 +22,7 @@ #include -int UnitTestTBBDataSetSingleType(int, char *[]) +int UnitTestTBBDataSetSingleType(int, char* []) { - return vtkm::cont::testing::TestingDataSetSingleType - ::Run(); + return vtkm::cont::testing::TestingDataSetSingleType::Run(); } diff --git a/vtkm/cont/tbb/testing/UnitTestTBBDeviceAdapter.cxx b/vtkm/cont/tbb/testing/UnitTestTBBDeviceAdapter.cxx index d172d089d..3e96d81ab 100644 --- a/vtkm/cont/tbb/testing/UnitTestTBBDeviceAdapter.cxx +++ b/vtkm/cont/tbb/testing/UnitTestTBBDeviceAdapter.cxx @@ -24,8 +24,7 @@ #include -int UnitTestTBBDeviceAdapter(int, char *[]) +int UnitTestTBBDeviceAdapter(int, char* []) { - return vtkm::cont::testing::TestingDeviceAdapter - ::Run(); + return vtkm::cont::testing::TestingDeviceAdapter::Run(); } diff --git a/vtkm/cont/tbb/testing/UnitTestTBBImplicitFunction.cxx b/vtkm/cont/tbb/testing/UnitTestTBBImplicitFunction.cxx index b6bd19b72..30f27bd41 100644 --- a/vtkm/cont/tbb/testing/UnitTestTBBImplicitFunction.cxx +++ b/vtkm/cont/tbb/testing/UnitTestTBBImplicitFunction.cxx @@ -20,7 +20,8 @@ #include -namespace { +namespace +{ void TestImplicitFunctions() { @@ -30,8 +31,7 @@ void TestImplicitFunctions() } // anonymous namespace - -int UnitTestTBBImplicitFunction(int, char *[]) +int UnitTestTBBImplicitFunction(int, char* []) { return vtkm::cont::testing::Testing::Run(TestImplicitFunctions); } diff --git a/vtkm/cont/tbb/testing/UnitTestTBBVirtualObjectCache.cxx b/vtkm/cont/tbb/testing/UnitTestTBBVirtualObjectCache.cxx index b76c1d2b4..4ce804928 100644 --- a/vtkm/cont/tbb/testing/UnitTestTBBVirtualObjectCache.cxx +++ b/vtkm/cont/tbb/testing/UnitTestTBBVirtualObjectCache.cxx @@ -19,21 +19,20 @@ //============================================================================ #include -namespace { +namespace +{ void TestVirtualObjectCache() { using DeviceAdapterList = - vtkm::ListTagBase; + vtkm::ListTagBase; vtkm::cont::testing::TestingVirtualObjectCache::Run(); } } // anonymous namespace - -int UnitTestTBBVirtualObjectCache(int, char *[]) +int UnitTestTBBVirtualObjectCache(int, char* []) { return vtkm::cont::testing::Testing::Run(TestVirtualObjectCache); } diff --git a/vtkm/cont/testing/ExplicitTestData.h b/vtkm/cont/testing/ExplicitTestData.h index 5df6a66c2..23123c448 100644 --- a/vtkm/cont/testing/ExplicitTestData.h +++ b/vtkm/cont/testing/ExplicitTestData.h @@ -23,856 +23,420 @@ #include #include -namespace vtkm { -namespace cont { -namespace testing { +namespace vtkm +{ +namespace cont +{ +namespace testing +{ // VTK dataset created from noise.silo in VisIt. // Resample(5,5,5), IsoVolume(hardglobal [3.8,max]) -namespace ExplicitData0 { +namespace ExplicitData0 +{ static const std::size_t numPoints = 48; -vtkm::Float32 coords[numPoints*3] = { - -5.000f, 0.000f, -10.000f, - 5.000f, 0.000f, -5.000f, 0.000f, 5.000f, -5.000f, - 5.000f, 5.000f, -5.000f, 10.000f, 5.000f, -5.000f, - 5.000f, 5.000f, 0.000f, 5.000f, 0.000f, 0.000f, - 5.000f, 5.000f, 5.000f, -5.000f, -1.227f, -10.000f, - -6.101f, 0.000f, -10.000f, -5.000f, 0.000f, -7.102f, - -1.656f, 0.000f, -10.000f, 5.000f, -3.541f, -5.000f, - 5.000f, 0.000f, -6.985f, 1.451f, 0.000f, -5.000f, - 7.666f, 0.000f, -5.000f, -5.000f, 1.987f, -10.000f, - 0.000f, 5.000f, -6.763f, -1.197f, 5.000f, -5.000f, - 0.000f, 1.663f, -5.000f, 5.000f, 5.000f, -6.749f, - 10.000f, 5.000f, -5.900f, 10.000f, 3.188f, -5.000f, - 0.000f, 6.828f, -5.000f, 5.000f, 7.036f, -5.000f, - 10.000f, 5.958f, -5.000f, 2.119f, 0.000f, 0.000f, - 5.000f, -4.680f, 0.000f, 9.847f, 0.000f, 0.000f, - 0.000f, 5.000f, -0.505f, 0.373f, 5.000f, 0.000f, - 10.000f, 5.000f, -3.573f, 7.394f, 5.000f, 0.000f, - 5.000f, 7.425f, 0.000f, 5.000f, 0.000f, 4.298f, - 4.414f, 5.000f, 5.000f, 5.000f, 3.063f, 5.000f, - 7.478f, 5.000f, 5.000f, 5.000f, 5.283f, 5.000f, - 5.000f, 5.000f, 5.321f, 2.290f, 2.333f, -6.099f, - 7.533f, 2.638f, -5.927f, 0.789f, 2.333f, -2.101f, - 8.981f, 2.638f, -2.715f, 2.075f, 6.258f, -2.101f, - 7.479f, 6.084f, -2.715f, 3.381f, 2.613f, 2.860f, - 6.944f, 2.613f, 2.860f, +vtkm::Float32 coords[numPoints * 3] = { + -5.000f, 0.000f, -10.000f, 5.000f, 0.000f, -5.000f, 0.000f, 5.000f, -5.000f, 5.000f, + 5.000f, -5.000f, 10.000f, 5.000f, -5.000f, 5.000f, 5.000f, 0.000f, 5.000f, 0.000f, + 0.000f, 5.000f, 5.000f, 5.000f, -5.000f, -1.227f, -10.000f, -6.101f, 0.000f, -10.000f, + -5.000f, 0.000f, -7.102f, -1.656f, 0.000f, -10.000f, 5.000f, -3.541f, -5.000f, 5.000f, + 0.000f, -6.985f, 1.451f, 0.000f, -5.000f, 7.666f, 0.000f, -5.000f, -5.000f, 1.987f, + -10.000f, 0.000f, 5.000f, -6.763f, -1.197f, 5.000f, -5.000f, 0.000f, 1.663f, -5.000f, + 5.000f, 5.000f, -6.749f, 10.000f, 5.000f, -5.900f, 10.000f, 3.188f, -5.000f, 0.000f, + 6.828f, -5.000f, 5.000f, 7.036f, -5.000f, 10.000f, 5.958f, -5.000f, 2.119f, 0.000f, + 0.000f, 5.000f, -4.680f, 0.000f, 9.847f, 0.000f, 0.000f, 0.000f, 5.000f, -0.505f, + 0.373f, 5.000f, 0.000f, 10.000f, 5.000f, -3.573f, 7.394f, 5.000f, 0.000f, 5.000f, + 7.425f, 0.000f, 5.000f, 0.000f, 4.298f, 4.414f, 5.000f, 5.000f, 5.000f, 3.063f, + 5.000f, 7.478f, 5.000f, 5.000f, 5.000f, 5.283f, 5.000f, 5.000f, 5.000f, 5.321f, + 2.290f, 2.333f, -6.099f, 7.533f, 2.638f, -5.927f, 0.789f, 2.333f, -2.101f, 8.981f, + 2.638f, -2.715f, 2.075f, 6.258f, -2.101f, 7.479f, 6.084f, -2.715f, 3.381f, 2.613f, + 2.860f, 6.944f, 2.613f, 2.860f, }; static const std::size_t numCells = 74; static const std::size_t numConn = 336; vtkm::Id conn[numConn] = { - 8, 9, 10, 0, - 10, 11, 8, 0, - 12, 13, 14, 1, - 12, 15, 13, 1, - 16, 10, 9, 0, - 11, 10, 16, 0, - 17, 18, 19, 2, - 2, 19, 17, 40, - 14, 1, 13, 40, - 2, 3, 1, 40, - 1, 15, 13, 41, - 22, 4, 21, 41, - 1, 3, 4, 41, - 17, 23, 18, 2, - 19, 18, 29, 2, - 5, 42, 2, 3, - 2, 1, 3, 42, - 2, 29, 19, 42, - 5, 4, 43, 3, - 4, 3, 1, 43, - 4, 22, 31, 43, - 23, 29, 18, 2, - 2, 23, 29, 44, - 30, 33, 5, 44, - 2, 5, 3, 44, - 4, 31, 25, 45, - 32, 5, 33, 45, - 4, 3, 5, 45, - 27, 26, 34, 6, - 34, 28, 27, 6, - 6, 26, 34, 46, - 36, 35, 7, 46, - 6, 7, 5, 46, - 6, 34, 28, 47, - 36, 7, 37, 47, - 6, 5, 7, 47, - 36, 35, 39, 7, - 39, 37, 36, 7, - 38, 39, 35, 7, - 38, 37, 39, 7, - 3, 2, 17, 20, 40, - 1, 3, 20, 13, 40, - 19, 2, 1, 14, 40, - 3, 1, 13, 20, 41, - 4, 3, 20, 21, 41, - 15, 1, 4, 22, 41, - 1, 6, 5, 3, 42, - 6, 26, 30, 5, 42, - 14, 26, 6, 1, 42, - 2, 19, 14, 1, 42, - 30, 29, 2, 5, 42, - 1, 3, 5, 6, 43, - 6, 5, 32, 28, 43, - 15, 1, 6, 28, 43, - 4, 1, 15, 22, 43, - 32, 5, 4, 31, 43, - 3, 24, 23, 2, 44, - 5, 33, 24, 3, 44, - 29, 30, 5, 2, 44, - 3, 4, 25, 24, 45, - 5, 3, 24, 33, 45, - 31, 4, 5, 32, 45, - 5, 30, 26, 6, 46, - 7, 35, 30, 5, 46, - 34, 36, 7, 6, 46, - 5, 6, 28, 32, 47, - 7, 5, 32, 37, 47, - 34, 6, 7, 36, 47, - 3, 20, 24, 2, 17, 23, - 4, 21, 25, 3, 20, 24, - 6, 26, 27, 1, 14, 12, - 6, 27, 28, 1, 12, 15, - 5, 30, 33, 7, 35, 38, - 7, 37, 38, 5, 32, 33, + 8, 9, 10, 0, 10, 11, 8, 0, 12, 13, 14, 1, 12, 15, 13, 1, 16, 10, 9, 0, 11, 10, 16, 0, + 17, 18, 19, 2, 2, 19, 17, 40, 14, 1, 13, 40, 2, 3, 1, 40, 1, 15, 13, 41, 22, 4, 21, 41, + 1, 3, 4, 41, 17, 23, 18, 2, 19, 18, 29, 2, 5, 42, 2, 3, 2, 1, 3, 42, 2, 29, 19, 42, + 5, 4, 43, 3, 4, 3, 1, 43, 4, 22, 31, 43, 23, 29, 18, 2, 2, 23, 29, 44, 30, 33, 5, 44, + 2, 5, 3, 44, 4, 31, 25, 45, 32, 5, 33, 45, 4, 3, 5, 45, 27, 26, 34, 6, 34, 28, 27, 6, + 6, 26, 34, 46, 36, 35, 7, 46, 6, 7, 5, 46, 6, 34, 28, 47, 36, 7, 37, 47, 6, 5, 7, 47, + 36, 35, 39, 7, 39, 37, 36, 7, 38, 39, 35, 7, 38, 37, 39, 7, 3, 2, 17, 20, 40, 1, 3, 20, + 13, 40, 19, 2, 1, 14, 40, 3, 1, 13, 20, 41, 4, 3, 20, 21, 41, 15, 1, 4, 22, 41, 1, 6, + 5, 3, 42, 6, 26, 30, 5, 42, 14, 26, 6, 1, 42, 2, 19, 14, 1, 42, 30, 29, 2, 5, 42, 1, + 3, 5, 6, 43, 6, 5, 32, 28, 43, 15, 1, 6, 28, 43, 4, 1, 15, 22, 43, 32, 5, 4, 31, 43, + 3, 24, 23, 2, 44, 5, 33, 24, 3, 44, 29, 30, 5, 2, 44, 3, 4, 25, 24, 45, 5, 3, 24, 33, + 45, 31, 4, 5, 32, 45, 5, 30, 26, 6, 46, 7, 35, 30, 5, 46, 34, 36, 7, 6, 46, 5, 6, 28, + 32, 47, 7, 5, 32, 37, 47, 34, 6, 7, 36, 47, 3, 20, 24, 2, 17, 23, 4, 21, 25, 3, 20, 24, + 6, 26, 27, 1, 14, 12, 6, 27, 28, 1, 12, 15, 5, 30, 33, 7, 35, 38, 7, 37, 38, 5, 32, 33, }; vtkm::IdComponent numIndices[numCells] = { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, - 6, 6, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, }; vtkm::UInt8 shapes[numCells] = { - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, }; vtkm::Float32 pointData[numPoints] = { - 4.078f, 4.368f, 4.266f, 4.356f, 4.083f, 4.450f, 4.373f, 3.859f, - 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, - 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, - 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, - 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, - 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, + 4.078f, 4.368f, 4.266f, 4.356f, 4.083f, 4.450f, 4.373f, 3.859f, 3.800f, 3.800f, 3.800f, 3.800f, + 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, + 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, + 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, 3.800f, }; } //ExplicitData0 // VTK dataset created from noise.silo in VisIt. // Resample(5,5,5), CylinderSlice((-10,-10,-10),(10,10,10), r=6), field=hardyglobal -namespace ExplicitData1 { +namespace ExplicitData1 +{ static const std::size_t numPoints = 107; -vtkm::Float32 coords[numPoints*3] = { - -5.000f, -10.000f, -10.000f, - -10.000f, -5.000f, -10.000f, -10.000f, -10.000f, -5.000f, - -5.000f, -5.000f, -10.000f, -10.000f, -5.000f, -5.000f, - -5.000f, -10.000f, -5.000f, 0.000f, -5.000f, -5.000f, - -5.000f, -5.000f, -5.000f, -5.000f, 0.000f, -5.000f, - 0.000f, 0.000f, -5.000f, -5.000f, -5.000f, 0.000f, - 5.000f, 0.000f, 0.000f, 0.000f, 0.000f, 0.000f, - 0.000f, -5.000f, 0.000f, -5.000f, 0.000f, 0.000f, - 0.000f, 5.000f, 0.000f, 5.000f, 5.000f, 0.000f, - 0.000f, 0.000f, 5.000f, 10.000f, 5.000f, 5.000f, - 5.000f, 5.000f, 5.000f, 5.000f, 0.000f, 5.000f, - 0.000f, 5.000f, 5.000f, 5.000f, 10.000f, 5.000f, - 5.000f, 5.000f, 10.000f, 5.000f, 10.000f, 10.000f, - 10.000f, 10.000f, 5.000f, 10.000f, 5.000f, 10.000f, - -10.000f, -10.000f, -10.000f, -10.000f, -10.000f, -10.000f, - -10.000f, -10.000f, -10.000f, -3.540f, -10.000f, -5.000f, - -4.570f, -10.000f, -10.000f, 0.000f, -7.260f, -5.000f, - 0.000f, -5.000f, -7.260f, -3.540f, -5.000f, -10.000f, - 1.368f, -5.000f, -5.000f, -5.000f, -3.540f, -10.000f, - -10.000f, -4.570f, -10.000f, -5.000f, 0.000f, -7.260f, - -7.260f, 0.000f, -5.000f, -10.000f, -3.540f, -5.000f, - 0.000f, 0.000f, -6.600f, 2.538f, 0.000f, -5.000f, - -5.000f, 1.368f, -5.000f, 0.000f, 2.538f, -5.000f, - -5.000f, -10.000f, -3.540f, -10.000f, -10.000f, -4.570f, - -5.000f, -7.260f, 0.000f, -7.260f, -5.000f, 0.000f, - -10.000f, -5.000f, -3.540f, 0.000f, -6.600f, 0.000f, - 2.538f, -5.000f, 0.000f, -6.600f, 0.000f, 0.000f, - 5.000f, -2.900f, 0.000f, 5.000f, 0.000f, -2.900f, - 6.933f, 0.000f, 0.000f, -5.000f, 2.538f, 0.000f, - 0.000f, 5.000f, -2.900f, -2.900f, 5.000f, 0.000f, - 5.000f, 5.000f, -1.933f, 7.900f, 5.000f, 0.000f, - 0.000f, 6.933f, 0.000f, 5.000f, 7.900f, 0.000f, - -5.000f, -5.000f, 1.368f, 0.000f, -5.000f, 2.538f, - -5.000f, 0.000f, 2.538f, 0.000f, -2.900f, 5.000f, - -2.900f, 0.000f, 5.000f, 5.000f, -1.933f, 5.000f, - 7.900f, 0.000f, 5.000f, -1.933f, 5.000f, 5.000f, - 10.000f, 2.100f, 5.000f, 10.000f, 5.000f, 2.100f, - 0.000f, 7.900f, 5.000f, 5.000f, 10.000f, 2.100f, - 2.100f, 10.000f, 5.000f, 10.000f, 10.000f, 3.067f, - 0.000f, 0.000f, 6.933f, 5.000f, 0.000f, 7.900f, - 0.000f, 5.000f, 7.900f, 5.000f, 2.100f, 10.000f, - 2.100f, 5.000f, 10.000f, 10.000f, 3.067f, 10.000f, - 3.067f, 10.000f, 10.000f, 10.000f, 10.000f, 10.000f, - 10.000f, 10.000f, 10.000f, 10.000f, 10.000f, 10.000f, - -7.143f, -7.143f, -7.143f, -2.330f, -7.452f, -7.452f, - -7.452f, -2.330f, -7.452f, -2.708f, -2.708f, -8.224f, - -7.452f, -7.452f, -2.330f, -2.708f, -8.224f, -2.708f, - -8.224f, -2.708f, -2.708f, 3.289f, -2.580f, -2.580f, - -2.580f, 3.289f, -2.580f, 2.508f, 2.508f, -3.547f, - -2.580f, -2.580f, 3.289f, 2.508f, -3.547f, 2.508f, - -3.547f, 2.508f, 2.508f, 8.547f, 2.420f, 2.420f, - 2.420f, 8.547f, 2.420f, 7.580f, 7.580f, 1.453f, - 2.420f, 2.420f, 8.547f, 7.580f, 1.453f, 7.580f, - 1.453f, 7.580f, 7.580f, 7.143f, 7.143f, 7.143f, +vtkm::Float32 coords[numPoints * 3] = { + -5.000f, -10.000f, -10.000f, -10.000f, -5.000f, -10.000f, -10.000f, -10.000f, -5.000f, + -5.000f, -5.000f, -10.000f, -10.000f, -5.000f, -5.000f, -5.000f, -10.000f, -5.000f, + 0.000f, -5.000f, -5.000f, -5.000f, -5.000f, -5.000f, -5.000f, 0.000f, -5.000f, + 0.000f, 0.000f, -5.000f, -5.000f, -5.000f, 0.000f, 5.000f, 0.000f, 0.000f, + 0.000f, 0.000f, 0.000f, 0.000f, -5.000f, 0.000f, -5.000f, 0.000f, 0.000f, + 0.000f, 5.000f, 0.000f, 5.000f, 5.000f, 0.000f, 0.000f, 0.000f, 5.000f, + 10.000f, 5.000f, 5.000f, 5.000f, 5.000f, 5.000f, 5.000f, 0.000f, 5.000f, + 0.000f, 5.000f, 5.000f, 5.000f, 10.000f, 5.000f, 5.000f, 5.000f, 10.000f, + 5.000f, 10.000f, 10.000f, 10.000f, 10.000f, 5.000f, 10.000f, 5.000f, 10.000f, + -10.000f, -10.000f, -10.000f, -10.000f, -10.000f, -10.000f, -10.000f, -10.000f, -10.000f, + -3.540f, -10.000f, -5.000f, -4.570f, -10.000f, -10.000f, 0.000f, -7.260f, -5.000f, + 0.000f, -5.000f, -7.260f, -3.540f, -5.000f, -10.000f, 1.368f, -5.000f, -5.000f, + -5.000f, -3.540f, -10.000f, -10.000f, -4.570f, -10.000f, -5.000f, 0.000f, -7.260f, + -7.260f, 0.000f, -5.000f, -10.000f, -3.540f, -5.000f, 0.000f, 0.000f, -6.600f, + 2.538f, 0.000f, -5.000f, -5.000f, 1.368f, -5.000f, 0.000f, 2.538f, -5.000f, + -5.000f, -10.000f, -3.540f, -10.000f, -10.000f, -4.570f, -5.000f, -7.260f, 0.000f, + -7.260f, -5.000f, 0.000f, -10.000f, -5.000f, -3.540f, 0.000f, -6.600f, 0.000f, + 2.538f, -5.000f, 0.000f, -6.600f, 0.000f, 0.000f, 5.000f, -2.900f, 0.000f, + 5.000f, 0.000f, -2.900f, 6.933f, 0.000f, 0.000f, -5.000f, 2.538f, 0.000f, + 0.000f, 5.000f, -2.900f, -2.900f, 5.000f, 0.000f, 5.000f, 5.000f, -1.933f, + 7.900f, 5.000f, 0.000f, 0.000f, 6.933f, 0.000f, 5.000f, 7.900f, 0.000f, + -5.000f, -5.000f, 1.368f, 0.000f, -5.000f, 2.538f, -5.000f, 0.000f, 2.538f, + 0.000f, -2.900f, 5.000f, -2.900f, 0.000f, 5.000f, 5.000f, -1.933f, 5.000f, + 7.900f, 0.000f, 5.000f, -1.933f, 5.000f, 5.000f, 10.000f, 2.100f, 5.000f, + 10.000f, 5.000f, 2.100f, 0.000f, 7.900f, 5.000f, 5.000f, 10.000f, 2.100f, + 2.100f, 10.000f, 5.000f, 10.000f, 10.000f, 3.067f, 0.000f, 0.000f, 6.933f, + 5.000f, 0.000f, 7.900f, 0.000f, 5.000f, 7.900f, 5.000f, 2.100f, 10.000f, + 2.100f, 5.000f, 10.000f, 10.000f, 3.067f, 10.000f, 3.067f, 10.000f, 10.000f, + 10.000f, 10.000f, 10.000f, 10.000f, 10.000f, 10.000f, 10.000f, 10.000f, 10.000f, + -7.143f, -7.143f, -7.143f, -2.330f, -7.452f, -7.452f, -7.452f, -2.330f, -7.452f, + -2.708f, -2.708f, -8.224f, -7.452f, -7.452f, -2.330f, -2.708f, -8.224f, -2.708f, + -8.224f, -2.708f, -2.708f, 3.289f, -2.580f, -2.580f, -2.580f, 3.289f, -2.580f, + 2.508f, 2.508f, -3.547f, -2.580f, -2.580f, 3.289f, 2.508f, -3.547f, 2.508f, + -3.547f, 2.508f, 2.508f, 8.547f, 2.420f, 2.420f, 2.420f, 8.547f, 2.420f, + 7.580f, 7.580f, 1.453f, 2.420f, 2.420f, 8.547f, 7.580f, 1.453f, 7.580f, + 1.453f, 7.580f, 7.580f, 7.143f, 7.143f, 7.143f, }; static const std::size_t numCells = 186; static const std::size_t numConn = 876; vtkm::Id conn[numConn] = { - 0, 1, 2, 87, - 0, 3, 1, 87, - 1, 4, 2, 87, - 2, 5, 0, 87, - 3, 88, 6, 7, - 6, 5, 7, 88, - 6, 33, 32, 88, - 32, 35, 33, 6, - 4, 89, 8, 7, - 8, 3, 7, 89, - 8, 39, 38, 89, - 6, 90, 3, 7, - 3, 8, 7, 90, - 3, 34, 36, 90, - 38, 43, 39, 8, - 44, 41, 42, 9, - 4, 10, 91, 7, - 10, 7, 5, 91, - 10, 47, 48, 91, - 6, 5, 92, 7, - 5, 7, 10, 92, - 5, 45, 30, 92, - 10, 4, 93, 7, - 4, 7, 8, 93, - 4, 40, 49, 93, - 9, 94, 11, 12, - 11, 13, 12, 94, - 11, 54, 53, 94, - 53, 55, 54, 11, - 14, 95, 15, 12, - 15, 9, 12, 95, - 15, 58, 57, 95, - 11, 96, 9, 12, - 9, 15, 12, 96, - 9, 42, 44, 96, - 57, 61, 58, 15, - 62, 59, 60, 16, - 47, 48, 63, 10, - 64, 51, 50, 13, - 14, 17, 97, 12, - 17, 12, 13, 97, - 17, 66, 67, 97, - 11, 13, 98, 12, - 13, 12, 17, 98, - 13, 64, 51, 98, - 56, 65, 52, 14, - 17, 14, 99, 12, - 14, 12, 15, 99, - 14, 56, 65, 99, - 16, 100, 18, 19, - 18, 20, 19, 100, - 18, 72, 71, 100, - 21, 101, 22, 19, - 22, 16, 19, 101, - 22, 75, 74, 101, - 18, 102, 16, 19, - 16, 22, 19, 102, - 16, 60, 62, 102, - 66, 67, 77, 17, - 78, 69, 68, 20, - 21, 23, 103, 19, - 23, 19, 20, 103, - 23, 80, 81, 103, - 18, 20, 104, 19, - 20, 19, 23, 104, - 20, 78, 69, 104, - 73, 79, 70, 21, - 23, 21, 105, 19, - 21, 19, 22, 105, - 21, 73, 79, 105, - 24, 25, 26, 106, - 24, 26, 23, 106, - 26, 25, 18, 106, - 25, 24, 22, 106, - 7, 4, 1, 3, 87, - 5, 7, 3, 0, 87, - 2, 4, 7, 5, 87, - 5, 0, 3, 7, 88, - 0, 31, 34, 3, 88, - 30, 31, 0, 5, 88, - 6, 32, 30, 5, 88, - 34, 33, 6, 3, 88, - 3, 1, 4, 7, 89, - 1, 37, 40, 4, 89, - 36, 37, 1, 3, 89, - 8, 38, 36, 3, 89, - 40, 39, 8, 4, 89, - 8, 9, 6, 7, 90, - 9, 41, 33, 6, 90, - 38, 41, 9, 8, 90, - 3, 36, 38, 8, 90, - 33, 34, 3, 6, 90, - 5, 7, 4, 2, 91, - 2, 4, 49, 46, 91, - 45, 5, 2, 46, 91, - 10, 5, 45, 47, 91, - 49, 4, 10, 48, 91, - 10, 7, 6, 13, 92, - 13, 6, 32, 50, 92, - 47, 10, 13, 50, 92, - 5, 10, 47, 45, 92, - 32, 6, 5, 30, 92, - 8, 7, 10, 14, 93, - 14, 10, 48, 52, 93, - 39, 8, 14, 52, 93, - 4, 8, 39, 40, 93, - 48, 10, 4, 49, 93, - 13, 6, 9, 12, 94, - 6, 35, 42, 9, 94, - 51, 35, 6, 13, 94, - 11, 53, 51, 13, 94, - 42, 54, 11, 9, 94, - 9, 8, 14, 12, 95, - 8, 43, 56, 14, 95, - 44, 43, 8, 9, 95, - 15, 57, 44, 9, 95, - 56, 58, 15, 14, 95, - 15, 16, 11, 12, 96, - 16, 59, 54, 11, 96, - 57, 59, 16, 15, 96, - 9, 44, 57, 15, 96, - 54, 42, 9, 11, 96, - 13, 12, 14, 10, 97, - 10, 14, 65, 63, 97, - 64, 13, 10, 63, 97, - 17, 13, 64, 66, 97, - 65, 14, 17, 67, 97, - 17, 12, 11, 20, 98, - 20, 11, 53, 68, 98, - 66, 17, 20, 68, 98, - 13, 17, 66, 64, 98, - 53, 11, 13, 51, 98, - 15, 12, 17, 21, 99, - 21, 17, 67, 70, 99, - 58, 15, 21, 70, 99, - 14, 15, 58, 56, 99, - 67, 17, 14, 65, 99, - 20, 11, 16, 19, 100, - 11, 55, 60, 16, 100, - 69, 55, 11, 20, 100, - 18, 71, 69, 20, 100, - 60, 72, 18, 16, 100, - 16, 15, 21, 19, 101, - 15, 61, 73, 21, 101, - 62, 61, 15, 16, 101, - 22, 74, 62, 16, 101, - 73, 75, 22, 21, 101, - 22, 25, 18, 19, 102, - 25, 76, 72, 18, 102, - 74, 76, 25, 22, 102, - 16, 62, 74, 22, 102, - 72, 60, 16, 18, 102, - 20, 19, 21, 17, 103, - 17, 21, 79, 77, 103, - 78, 20, 17, 77, 103, - 23, 20, 78, 80, 103, - 79, 21, 23, 81, 103, - 23, 19, 18, 26, 104, - 26, 18, 71, 82, 104, - 80, 23, 26, 82, 104, - 20, 23, 80, 78, 104, - 71, 18, 20, 69, 104, - 22, 19, 23, 24, 105, - 24, 23, 81, 83, 105, - 75, 22, 24, 83, 105, - 21, 22, 75, 73, 105, - 81, 23, 21, 79, 105, - 19, 23, 26, 18, 106, - 22, 24, 23, 19, 106, - 25, 22, 19, 18, 106, - 0, 1, 2, 27, 28, 29, - 6, 33, 35, 9, 41, 42, - 9, 41, 44, 8, 38, 43, - 13, 50, 51, 6, 32, 35, - 8, 39, 43, 14, 52, 56, - 11, 54, 55, 16, 59, 60, - 16, 59, 62, 15, 57, 61, - 10, 47, 63, 13, 50, 64, - 14, 52, 65, 10, 48, 63, - 20, 68, 69, 11, 53, 55, - 15, 58, 61, 21, 70, 73, - 17, 66, 77, 20, 68, 78, - 21, 70, 79, 17, 67, 77, - 84, 85, 86, 24, 26, 25, - 7, 6, 9, 8, 10, 13, 12, 14, - 12, 11, 16, 15, 17, 20, 19, 21, + 0, 1, 2, 87, 0, 3, 1, 87, 1, 4, 2, 87, 2, 5, 0, 87, 3, 88, 6, 7, + 6, 5, 7, 88, 6, 33, 32, 88, 32, 35, 33, 6, 4, 89, 8, 7, 8, 3, 7, 89, + 8, 39, 38, 89, 6, 90, 3, 7, 3, 8, 7, 90, 3, 34, 36, 90, 38, 43, 39, 8, + 44, 41, 42, 9, 4, 10, 91, 7, 10, 7, 5, 91, 10, 47, 48, 91, 6, 5, 92, 7, + 5, 7, 10, 92, 5, 45, 30, 92, 10, 4, 93, 7, 4, 7, 8, 93, 4, 40, 49, 93, + 9, 94, 11, 12, 11, 13, 12, 94, 11, 54, 53, 94, 53, 55, 54, 11, 14, 95, 15, 12, + 15, 9, 12, 95, 15, 58, 57, 95, 11, 96, 9, 12, 9, 15, 12, 96, 9, 42, 44, 96, + 57, 61, 58, 15, 62, 59, 60, 16, 47, 48, 63, 10, 64, 51, 50, 13, 14, 17, 97, 12, + 17, 12, 13, 97, 17, 66, 67, 97, 11, 13, 98, 12, 13, 12, 17, 98, 13, 64, 51, 98, + 56, 65, 52, 14, 17, 14, 99, 12, 14, 12, 15, 99, 14, 56, 65, 99, 16, 100, 18, 19, + 18, 20, 19, 100, 18, 72, 71, 100, 21, 101, 22, 19, 22, 16, 19, 101, 22, 75, 74, 101, + 18, 102, 16, 19, 16, 22, 19, 102, 16, 60, 62, 102, 66, 67, 77, 17, 78, 69, 68, 20, + 21, 23, 103, 19, 23, 19, 20, 103, 23, 80, 81, 103, 18, 20, 104, 19, 20, 19, 23, 104, + 20, 78, 69, 104, 73, 79, 70, 21, 23, 21, 105, 19, 21, 19, 22, 105, 21, 73, 79, 105, + 24, 25, 26, 106, 24, 26, 23, 106, 26, 25, 18, 106, 25, 24, 22, 106, 7, 4, 1, 3, + 87, 5, 7, 3, 0, 87, 2, 4, 7, 5, 87, 5, 0, 3, 7, 88, 0, 31, 34, 3, + 88, 30, 31, 0, 5, 88, 6, 32, 30, 5, 88, 34, 33, 6, 3, 88, 3, 1, 4, 7, + 89, 1, 37, 40, 4, 89, 36, 37, 1, 3, 89, 8, 38, 36, 3, 89, 40, 39, 8, 4, + 89, 8, 9, 6, 7, 90, 9, 41, 33, 6, 90, 38, 41, 9, 8, 90, 3, 36, 38, 8, + 90, 33, 34, 3, 6, 90, 5, 7, 4, 2, 91, 2, 4, 49, 46, 91, 45, 5, 2, 46, + 91, 10, 5, 45, 47, 91, 49, 4, 10, 48, 91, 10, 7, 6, 13, 92, 13, 6, 32, 50, + 92, 47, 10, 13, 50, 92, 5, 10, 47, 45, 92, 32, 6, 5, 30, 92, 8, 7, 10, 14, + 93, 14, 10, 48, 52, 93, 39, 8, 14, 52, 93, 4, 8, 39, 40, 93, 48, 10, 4, 49, + 93, 13, 6, 9, 12, 94, 6, 35, 42, 9, 94, 51, 35, 6, 13, 94, 11, 53, 51, 13, + 94, 42, 54, 11, 9, 94, 9, 8, 14, 12, 95, 8, 43, 56, 14, 95, 44, 43, 8, 9, + 95, 15, 57, 44, 9, 95, 56, 58, 15, 14, 95, 15, 16, 11, 12, 96, 16, 59, 54, 11, + 96, 57, 59, 16, 15, 96, 9, 44, 57, 15, 96, 54, 42, 9, 11, 96, 13, 12, 14, 10, + 97, 10, 14, 65, 63, 97, 64, 13, 10, 63, 97, 17, 13, 64, 66, 97, 65, 14, 17, 67, + 97, 17, 12, 11, 20, 98, 20, 11, 53, 68, 98, 66, 17, 20, 68, 98, 13, 17, 66, 64, + 98, 53, 11, 13, 51, 98, 15, 12, 17, 21, 99, 21, 17, 67, 70, 99, 58, 15, 21, 70, + 99, 14, 15, 58, 56, 99, 67, 17, 14, 65, 99, 20, 11, 16, 19, 100, 11, 55, 60, 16, + 100, 69, 55, 11, 20, 100, 18, 71, 69, 20, 100, 60, 72, 18, 16, 100, 16, 15, 21, 19, + 101, 15, 61, 73, 21, 101, 62, 61, 15, 16, 101, 22, 74, 62, 16, 101, 73, 75, 22, 21, + 101, 22, 25, 18, 19, 102, 25, 76, 72, 18, 102, 74, 76, 25, 22, 102, 16, 62, 74, 22, + 102, 72, 60, 16, 18, 102, 20, 19, 21, 17, 103, 17, 21, 79, 77, 103, 78, 20, 17, 77, + 103, 23, 20, 78, 80, 103, 79, 21, 23, 81, 103, 23, 19, 18, 26, 104, 26, 18, 71, 82, + 104, 80, 23, 26, 82, 104, 20, 23, 80, 78, 104, 71, 18, 20, 69, 104, 22, 19, 23, 24, + 105, 24, 23, 81, 83, 105, 75, 22, 24, 83, 105, 21, 22, 75, 73, 105, 81, 23, 21, 79, + 105, 19, 23, 26, 18, 106, 22, 24, 23, 19, 106, 25, 22, 19, 18, 106, 0, 1, 2, 27, + 28, 29, 6, 33, 35, 9, 41, 42, 9, 41, 44, 8, 38, 43, 13, 50, 51, 6, 32, 35, + 8, 39, 43, 14, 52, 56, 11, 54, 55, 16, 59, 60, 16, 59, 62, 15, 57, 61, 10, 47, + 63, 13, 50, 64, 14, 52, 65, 10, 48, 63, 20, 68, 69, 11, 53, 55, 15, 58, 61, 21, + 70, 73, 17, 66, 77, 20, 68, 78, 21, 70, 79, 17, 67, 77, 84, 85, 86, 24, 26, 25, + 7, 6, 9, 8, 10, 13, 12, 14, 12, 11, 16, 15, 17, 20, 19, 21, }; vtkm::IdComponent numIndices[numCells] = { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,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, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, }; vtkm::UInt8 shapes[numCells] = { - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, }; vtkm::Float32 pointData[numPoints] = { - 2.235f, 2.609f, 2.448f, 2.944f, 3.198f, 2.609f, 3.015f, 3.392f, - 3.598f, 3.568f, 2.812f, 4.373f, 3.379f, 3.462f, 3.018f, 3.748f, - 4.450f, 3.485f, 3.740f, 3.859f, 3.706f, 3.354f, 2.815f, 2.937f, - 2.460f, 2.368f, 2.759f, 2.085f, 2.085f, 2.085f, 2.507f, 2.234f, - 2.672f, 2.907f, 2.895f, 3.165f, 3.275f, 2.626f, 3.815f, 3.392f, - 3.182f, 3.598f, 3.974f, 3.248f, 3.922f, 2.620f, 2.496f, 2.737f, - 3.065f, 3.249f, 3.093f, 3.614f, 3.026f, 4.018f, 4.370f, 4.144f, - 2.801f, 4.048f, 3.076f, 4.414f, 3.662f, 3.530f, 3.673f, 2.889f, - 3.578f, 2.995f, 3.604f, 3.188f, 3.608f, 3.432f, 3.326f, 3.446f, - 3.364f, 3.133f, 2.986f, 2.906f, 2.391f, 3.423f, 3.470f, 3.237f, - 3.147f, 3.062f, 2.796f, 2.553f, 2.206f, 2.206f, 2.206f, 2.776f, - 2.643f, 3.258f, 3.298f, 2.834f, 2.726f, 3.183f, 3.828f, 3.419f, - 4.146f, 3.251f, 3.684f, 3.077f, 3.610f, 3.245f, 3.215f, 3.268f, - 3.258f, 2.978f, 2.991f, + 2.235f, 2.609f, 2.448f, 2.944f, 3.198f, 2.609f, 3.015f, 3.392f, 3.598f, 3.568f, 2.812f, 4.373f, + 3.379f, 3.462f, 3.018f, 3.748f, 4.450f, 3.485f, 3.740f, 3.859f, 3.706f, 3.354f, 2.815f, 2.937f, + 2.460f, 2.368f, 2.759f, 2.085f, 2.085f, 2.085f, 2.507f, 2.234f, 2.672f, 2.907f, 2.895f, 3.165f, + 3.275f, 2.626f, 3.815f, 3.392f, 3.182f, 3.598f, 3.974f, 3.248f, 3.922f, 2.620f, 2.496f, 2.737f, + 3.065f, 3.249f, 3.093f, 3.614f, 3.026f, 4.018f, 4.370f, 4.144f, 2.801f, 4.048f, 3.076f, 4.414f, + 3.662f, 3.530f, 3.673f, 2.889f, 3.578f, 2.995f, 3.604f, 3.188f, 3.608f, 3.432f, 3.326f, 3.446f, + 3.364f, 3.133f, 2.986f, 2.906f, 2.391f, 3.423f, 3.470f, 3.237f, 3.147f, 3.062f, 2.796f, 2.553f, + 2.206f, 2.206f, 2.206f, 2.776f, 2.643f, 3.258f, 3.298f, 2.834f, 2.726f, 3.183f, 3.828f, 3.419f, + 4.146f, 3.251f, 3.684f, 3.077f, 3.610f, 3.245f, 3.215f, 3.268f, 3.258f, 2.978f, 2.991f, }; } //ExplicitData1 // VTK dataset created from noise.silo in VisIt. // Resample(6,6,6), CylinderClip((0,0,0) r=8), field=hardyglobal -namespace ExplicitData2 { +namespace ExplicitData2 +{ static const std::size_t numPoints = 104; -vtkm::Float32 coords[numPoints*3] = { - -2.000f, -2.000f, -6.000f, - 2.000f, -2.000f, -6.000f, -2.000f, 2.000f, -6.000f, - 2.000f, 2.000f, -6.000f, -2.000f, -6.000f, -2.000f, - 2.000f, -6.000f, -2.000f, -6.000f, -2.000f, -2.000f, - -2.000f, -2.000f, -2.000f, 6.000f, -2.000f, -2.000f, - 2.000f, -2.000f, -2.000f, -6.000f, 2.000f, -2.000f, - -2.000f, 6.000f, -2.000f, -2.000f, 2.000f, -2.000f, - 2.000f, 6.000f, -2.000f, 2.000f, 2.000f, -2.000f, - 6.000f, 2.000f, -2.000f, -2.000f, -6.000f, 2.000f, - 2.000f, -6.000f, 2.000f, -6.000f, -2.000f, 2.000f, - -2.000f, -2.000f, 6.000f, -2.000f, -2.000f, 2.000f, - 2.000f, -2.000f, 6.000f, 2.000f, -2.000f, 2.000f, - 6.000f, -2.000f, 2.000f, -6.000f, 2.000f, 2.000f, - -2.000f, 6.000f, 2.000f, -2.000f, 2.000f, 2.000f, - -2.000f, 2.000f, 6.000f, 2.000f, 6.000f, 2.000f, - 2.000f, 2.000f, 2.000f, 6.000f, 2.000f, 2.000f, - 2.000f, 2.000f, 6.000f, -2.000f, -4.500f, -6.000f, - -2.000f, -2.000f, -7.250f, -4.500f, -2.000f, -6.000f, - 2.000f, -2.000f, -7.250f, 2.000f, -4.500f, -6.000f, - 4.500f, -2.000f, -6.000f, -4.500f, 2.000f, -6.000f, - -2.000f, 2.000f, -7.250f, 2.000f, 2.000f, -7.250f, - 4.500f, 2.000f, -6.000f, -2.000f, 4.500f, -6.000f, - 2.000f, 4.500f, -6.000f, -2.000f, -7.250f, -2.000f, - -2.000f, -6.000f, -4.500f, -4.500f, -6.000f, -2.000f, - 2.000f, -6.000f, -4.500f, 2.000f, -7.250f, -2.000f, - 4.500f, -6.000f, -2.000f, -6.000f, -4.500f, -2.000f, - -6.000f, -2.000f, -4.500f, -7.250f, -2.000f, -2.000f, - 6.000f, -4.500f, -2.000f, 6.000f, -2.000f, -4.500f, - 7.250f, -2.000f, -2.000f, -7.250f, 2.000f, -2.000f, - -6.000f, 2.000f, -4.500f, 6.000f, 2.000f, -4.500f, - 7.250f, 2.000f, -2.000f, -6.000f, 4.500f, -2.000f, - -2.000f, 6.000f, -4.500f, -4.500f, 6.000f, -2.000f, - 2.000f, 6.000f, -4.500f, 6.000f, 4.500f, -2.000f, - 4.500f, 6.000f, -2.000f, -2.000f, 7.250f, -2.000f, - 2.000f, 7.250f, -2.000f, -4.500f, -6.000f, 2.000f, - -2.000f, -7.250f, 2.000f, 2.000f, -7.250f, 2.000f, - 4.500f, -6.000f, 2.000f, -7.250f, -2.000f, 2.000f, - -6.000f, -4.500f, 2.000f, 6.000f, -4.500f, 2.000f, - 7.250f, -2.000f, 2.000f, -7.250f, 2.000f, 2.000f, - 7.250f, 2.000f, 2.000f, -6.000f, 4.500f, 2.000f, - -4.500f, 6.000f, 2.000f, 4.500f, 6.000f, 2.000f, - 6.000f, 4.500f, 2.000f, -2.000f, 7.250f, 2.000f, - 2.000f, 7.250f, 2.000f, -2.000f, -6.000f, 4.500f, - 2.000f, -6.000f, 4.500f, -6.000f, -2.000f, 4.500f, - -2.000f, -4.500f, 6.000f, -4.500f, -2.000f, 6.000f, - 2.000f, -4.500f, 6.000f, 6.000f, -2.000f, 4.500f, - 4.500f, -2.000f, 6.000f, -6.000f, 2.000f, 4.500f, - -4.500f, 2.000f, 6.000f, 6.000f, 2.000f, 4.500f, - 4.500f, 2.000f, 6.000f, -2.000f, 4.500f, 6.000f, - -2.000f, 6.000f, 4.500f, 2.000f, 4.500f, 6.000f, - 2.000f, 6.000f, 4.500f, -2.000f, -2.000f, 7.250f, - 2.000f, -2.000f, 7.250f, -2.000f, 2.000f, 7.250f, - 2.000f, 2.000f, 7.250f, +vtkm::Float32 coords[numPoints * 3] = { + -2.000f, -2.000f, -6.000f, 2.000f, -2.000f, -6.000f, -2.000f, 2.000f, -6.000f, 2.000f, 2.000f, + -6.000f, -2.000f, -6.000f, -2.000f, 2.000f, -6.000f, -2.000f, -6.000f, -2.000f, -2.000f, -2.000f, + -2.000f, -2.000f, 6.000f, -2.000f, -2.000f, 2.000f, -2.000f, -2.000f, -6.000f, 2.000f, -2.000f, + -2.000f, 6.000f, -2.000f, -2.000f, 2.000f, -2.000f, 2.000f, 6.000f, -2.000f, 2.000f, 2.000f, + -2.000f, 6.000f, 2.000f, -2.000f, -2.000f, -6.000f, 2.000f, 2.000f, -6.000f, 2.000f, -6.000f, + -2.000f, 2.000f, -2.000f, -2.000f, 6.000f, -2.000f, -2.000f, 2.000f, 2.000f, -2.000f, 6.000f, + 2.000f, -2.000f, 2.000f, 6.000f, -2.000f, 2.000f, -6.000f, 2.000f, 2.000f, -2.000f, 6.000f, + 2.000f, -2.000f, 2.000f, 2.000f, -2.000f, 2.000f, 6.000f, 2.000f, 6.000f, 2.000f, 2.000f, + 2.000f, 2.000f, 6.000f, 2.000f, 2.000f, 2.000f, 2.000f, 6.000f, -2.000f, -4.500f, -6.000f, + -2.000f, -2.000f, -7.250f, -4.500f, -2.000f, -6.000f, 2.000f, -2.000f, -7.250f, 2.000f, -4.500f, + -6.000f, 4.500f, -2.000f, -6.000f, -4.500f, 2.000f, -6.000f, -2.000f, 2.000f, -7.250f, 2.000f, + 2.000f, -7.250f, 4.500f, 2.000f, -6.000f, -2.000f, 4.500f, -6.000f, 2.000f, 4.500f, -6.000f, + -2.000f, -7.250f, -2.000f, -2.000f, -6.000f, -4.500f, -4.500f, -6.000f, -2.000f, 2.000f, -6.000f, + -4.500f, 2.000f, -7.250f, -2.000f, 4.500f, -6.000f, -2.000f, -6.000f, -4.500f, -2.000f, -6.000f, + -2.000f, -4.500f, -7.250f, -2.000f, -2.000f, 6.000f, -4.500f, -2.000f, 6.000f, -2.000f, -4.500f, + 7.250f, -2.000f, -2.000f, -7.250f, 2.000f, -2.000f, -6.000f, 2.000f, -4.500f, 6.000f, 2.000f, + -4.500f, 7.250f, 2.000f, -2.000f, -6.000f, 4.500f, -2.000f, -2.000f, 6.000f, -4.500f, -4.500f, + 6.000f, -2.000f, 2.000f, 6.000f, -4.500f, 6.000f, 4.500f, -2.000f, 4.500f, 6.000f, -2.000f, + -2.000f, 7.250f, -2.000f, 2.000f, 7.250f, -2.000f, -4.500f, -6.000f, 2.000f, -2.000f, -7.250f, + 2.000f, 2.000f, -7.250f, 2.000f, 4.500f, -6.000f, 2.000f, -7.250f, -2.000f, 2.000f, -6.000f, + -4.500f, 2.000f, 6.000f, -4.500f, 2.000f, 7.250f, -2.000f, 2.000f, -7.250f, 2.000f, 2.000f, + 7.250f, 2.000f, 2.000f, -6.000f, 4.500f, 2.000f, -4.500f, 6.000f, 2.000f, 4.500f, 6.000f, + 2.000f, 6.000f, 4.500f, 2.000f, -2.000f, 7.250f, 2.000f, 2.000f, 7.250f, 2.000f, -2.000f, + -6.000f, 4.500f, 2.000f, -6.000f, 4.500f, -6.000f, -2.000f, 4.500f, -2.000f, -4.500f, 6.000f, + -4.500f, -2.000f, 6.000f, 2.000f, -4.500f, 6.000f, 6.000f, -2.000f, 4.500f, 4.500f, -2.000f, + 6.000f, -6.000f, 2.000f, 4.500f, -4.500f, 2.000f, 6.000f, 6.000f, 2.000f, 4.500f, 4.500f, + 2.000f, 6.000f, -2.000f, 4.500f, 6.000f, -2.000f, 6.000f, 4.500f, 2.000f, 4.500f, 6.000f, + 2.000f, 6.000f, 4.500f, -2.000f, -2.000f, 7.250f, 2.000f, -2.000f, 7.250f, -2.000f, 2.000f, + 7.250f, 2.000f, 2.000f, 7.250f, }; static const std::size_t numCells = 125; static const std::size_t numConn = 704; vtkm::Id conn[numConn] = { - 32, 33, 34, 0, - 36, 37, 35, 1, - 39, 42, 38, 2, - 43, 40, 41, 3, - 44, 45, 46, 4, - 48, 49, 47, 5, - 50, 51, 52, 6, - 4, 6, 7, 0, - 8, 9, 1, 5, - 53, 55, 54, 8, - 57, 60, 56, 10, - 11, 12, 10, 2, - 13, 14, 3, 15, - 64, 58, 59, 15, - 61, 66, 62, 11, - 67, 63, 65, 13, - 69, 68, 84, 16, - 85, 71, 70, 17, - 73, 72, 86, 18, - 19, 18, 20, 16, - 21, 17, 22, 23, - 90, 75, 74, 23, - 78, 92, 76, 24, - 25, 24, 26, 27, - 28, 29, 30, 31, - 81, 77, 94, 30, - 82, 97, 79, 25, - 83, 80, 99, 28, - 87, 88, 100, 19, -101, 91, 89, 21, - 96, 102, 93, 27, - 98, 95, 103, 31, - 34, 0, 6, 51, 50, - 32, 45, 4, 0, 46, - 6, 4, 46, 50, 0, - 50, 46, 32, 34, 0, - 47, 36, 1, 5, 37, - 49, 5, 8, 53, 54, - 1, 37, 54, 8, 5, - 37, 47, 49, 54, 5, - 38, 57, 10, 2, 60, - 42, 2, 11, 61, 62, - 10, 60, 62, 11, 2, - 60, 38, 42, 62, 2, - 58, 41, 3, 15, 43, - 64, 15, 13, 65, 63, - 3, 43, 63, 13, 15, - 43, 58, 64, 63, 15, - 68, 16, 18, 73, 86, - 84, 87, 19, 16, 88, - 18, 19, 88, 86, 16, - 86, 88, 84, 68, 16, - 74, 23, 17, 71, 85, - 90, 91, 21, 23, 89, - 17, 21, 89, 85, 23, - 85, 89, 90, 74, 23, - 93, 27, 24, 92, 78, - 96, 97, 25, 27, 79, - 24, 25, 79, 78, 27, - 78, 79, 96, 93, 27, - 95, 94, 30, 31, 81, - 98, 31, 28, 99, 80, - 30, 81, 80, 28, 31, - 81, 95, 98, 80, 31, - 0, 33, 32, 1, 35, 36, - 0, 34, 33, 2, 38, 39, - 1, 35, 37, 3, 40, 41, - 3, 40, 43, 2, 39, 42, - 4, 45, 44, 5, 47, 48, - 1, 9, 5, 0, 7, 4, - 6, 52, 51, 10, 56, 57, - 10, 12, 2, 6, 7, 0, - 3, 14, 15, 1, 9, 8, - 8, 54, 55, 15, 58, 59, - 2, 12, 11, 3, 14, 13, - 13, 63, 67, 11, 61, 66, - 16, 68, 69, 4, 46, 44, - 17, 70, 71, 5, 48, 49, - 18, 72, 73, 6, 52, 50, - 6, 7, 4, 18, 20, 16, - 5, 9, 8, 17, 22, 23, - 23, 74, 75, 8, 53, 55, - 10, 56, 60, 24, 76, 78, - 24, 26, 25, 10, 12, 11, - 15, 14, 13, 30, 29, 28, - 30, 77, 81, 15, 59, 64, - 11, 62, 66, 25, 79, 82, - 28, 80, 83, 13, 65, 67, - 16, 69, 84, 17, 70, 85, - 17, 22, 21, 16, 20, 19, - 24, 76, 92, 18, 72, 86, - 18, 20, 19, 24, 26, 27, - 30, 29, 31, 23, 22, 21, - 23, 75, 90, 30, 77, 94, - 31, 29, 28, 27, 26, 25, - 25, 97, 82, 28, 99, 83, - 19, 87, 100, 21, 89, 101, - 27, 93, 102, 19, 88, 100, - 21, 91, 101, 31, 95, 103, - 27, 102, 96, 31, 103, 98, - 33, 35, 40, 39, 0, 1, 3, 2, - 36, 1, 0, 32, 47, 5, 4, 45, - 57, 10, 6, 51, 38, 2, 0, 34, - 0, 1, 3, 2, 7, 9, 14, 12, - 41, 3, 1, 37, 58, 15, 8, 54, - 63, 13, 11, 61, 43, 3, 2, 42, - 4, 5, 17, 16, 44, 48, 70, 69, - 68, 16, 4, 46, 73, 18, 6, 50, - 4, 5, 9, 7, 16, 17, 22, 20, - 74, 23, 8, 53, 71, 17, 5, 49, - 6, 18, 24, 10, 52, 72, 76, 56, - 6, 7, 12, 10, 18, 20, 26, 24, - 7, 9, 14, 12, 20, 22, 29, 26, - 9, 8, 15, 14, 22, 23, 30, 29, - 55, 75, 77, 59, 8, 23, 30, 15, - 78, 24, 10, 60, 79, 25, 11, 62, - 12, 14, 13, 11, 26, 29, 28, 25, - 80, 28, 13, 65, 81, 30, 15, 64, - 66, 67, 83, 82, 11, 13, 28, 25, - 85, 17, 16, 84, 89, 21, 19, 87, - 93, 27, 19, 88, 92, 24, 18, 86, - 20, 22, 29, 26, 19, 21, 31, 27, - 94, 30, 23, 90, 95, 31, 21, 91, - 98, 31, 27, 96, 99, 28, 25, 97, - 19, 21, 31, 27, 100, 101, 103, 102, + 32, 33, 34, 0, 36, 37, 35, 1, 39, 42, 38, 2, 43, 40, 41, 3, 44, 45, 46, 4, 48, + 49, 47, 5, 50, 51, 52, 6, 4, 6, 7, 0, 8, 9, 1, 5, 53, 55, 54, 8, 57, 60, + 56, 10, 11, 12, 10, 2, 13, 14, 3, 15, 64, 58, 59, 15, 61, 66, 62, 11, 67, 63, 65, + 13, 69, 68, 84, 16, 85, 71, 70, 17, 73, 72, 86, 18, 19, 18, 20, 16, 21, 17, 22, 23, + 90, 75, 74, 23, 78, 92, 76, 24, 25, 24, 26, 27, 28, 29, 30, 31, 81, 77, 94, 30, 82, + 97, 79, 25, 83, 80, 99, 28, 87, 88, 100, 19, 101, 91, 89, 21, 96, 102, 93, 27, 98, 95, + 103, 31, 34, 0, 6, 51, 50, 32, 45, 4, 0, 46, 6, 4, 46, 50, 0, 50, 46, 32, 34, + 0, 47, 36, 1, 5, 37, 49, 5, 8, 53, 54, 1, 37, 54, 8, 5, 37, 47, 49, 54, 5, + 38, 57, 10, 2, 60, 42, 2, 11, 61, 62, 10, 60, 62, 11, 2, 60, 38, 42, 62, 2, 58, + 41, 3, 15, 43, 64, 15, 13, 65, 63, 3, 43, 63, 13, 15, 43, 58, 64, 63, 15, 68, 16, + 18, 73, 86, 84, 87, 19, 16, 88, 18, 19, 88, 86, 16, 86, 88, 84, 68, 16, 74, 23, 17, + 71, 85, 90, 91, 21, 23, 89, 17, 21, 89, 85, 23, 85, 89, 90, 74, 23, 93, 27, 24, 92, + 78, 96, 97, 25, 27, 79, 24, 25, 79, 78, 27, 78, 79, 96, 93, 27, 95, 94, 30, 31, 81, + 98, 31, 28, 99, 80, 30, 81, 80, 28, 31, 81, 95, 98, 80, 31, 0, 33, 32, 1, 35, 36, + 0, 34, 33, 2, 38, 39, 1, 35, 37, 3, 40, 41, 3, 40, 43, 2, 39, 42, 4, 45, 44, + 5, 47, 48, 1, 9, 5, 0, 7, 4, 6, 52, 51, 10, 56, 57, 10, 12, 2, 6, 7, 0, + 3, 14, 15, 1, 9, 8, 8, 54, 55, 15, 58, 59, 2, 12, 11, 3, 14, 13, 13, 63, 67, + 11, 61, 66, 16, 68, 69, 4, 46, 44, 17, 70, 71, 5, 48, 49, 18, 72, 73, 6, 52, 50, + 6, 7, 4, 18, 20, 16, 5, 9, 8, 17, 22, 23, 23, 74, 75, 8, 53, 55, 10, 56, 60, + 24, 76, 78, 24, 26, 25, 10, 12, 11, 15, 14, 13, 30, 29, 28, 30, 77, 81, 15, 59, 64, + 11, 62, 66, 25, 79, 82, 28, 80, 83, 13, 65, 67, 16, 69, 84, 17, 70, 85, 17, 22, 21, + 16, 20, 19, 24, 76, 92, 18, 72, 86, 18, 20, 19, 24, 26, 27, 30, 29, 31, 23, 22, 21, + 23, 75, 90, 30, 77, 94, 31, 29, 28, 27, 26, 25, 25, 97, 82, 28, 99, 83, 19, 87, 100, + 21, 89, 101, 27, 93, 102, 19, 88, 100, 21, 91, 101, 31, 95, 103, 27, 102, 96, 31, 103, 98, + 33, 35, 40, 39, 0, 1, 3, 2, 36, 1, 0, 32, 47, 5, 4, 45, 57, 10, 6, 51, 38, + 2, 0, 34, 0, 1, 3, 2, 7, 9, 14, 12, 41, 3, 1, 37, 58, 15, 8, 54, 63, 13, + 11, 61, 43, 3, 2, 42, 4, 5, 17, 16, 44, 48, 70, 69, 68, 16, 4, 46, 73, 18, 6, + 50, 4, 5, 9, 7, 16, 17, 22, 20, 74, 23, 8, 53, 71, 17, 5, 49, 6, 18, 24, 10, + 52, 72, 76, 56, 6, 7, 12, 10, 18, 20, 26, 24, 7, 9, 14, 12, 20, 22, 29, 26, 9, + 8, 15, 14, 22, 23, 30, 29, 55, 75, 77, 59, 8, 23, 30, 15, 78, 24, 10, 60, 79, 25, + 11, 62, 12, 14, 13, 11, 26, 29, 28, 25, 80, 28, 13, 65, 81, 30, 15, 64, 66, 67, 83, + 82, 11, 13, 28, 25, 85, 17, 16, 84, 89, 21, 19, 87, 93, 27, 19, 88, 92, 24, 18, 86, + 20, 22, 29, 26, 19, 21, 31, 27, 94, 30, 23, 90, 95, 31, 21, 91, 98, 31, 27, 96, 99, + 28, 25, 97, 19, 21, 31, 27, 100, 101, 103, 102, }; vtkm::IdComponent numIndices[numCells] = { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, }; vtkm::UInt8 shapes[numCells] = { - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, - vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, + vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_TETRA, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_PYRAMID, + vtkm::CELL_SHAPE_PYRAMID, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_WEDGE, + vtkm::CELL_SHAPE_WEDGE, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, + vtkm::CELL_SHAPE_HEXAHEDRON, vtkm::CELL_SHAPE_HEXAHEDRON, }; vtkm::Float32 pointData[numPoints] = { - 3.558f, 3.219f, 3.738f, 5.246f, 3.204f, 3.535f, 3.536f, 2.668f, - 5.001f, 3.375f, 3.336f, 3.141f, 3.824f, 4.556f, 4.097f, 4.969f, - 3.164f, 3.306f, 2.031f, 3.613f, 3.084f, 3.958f, 3.583f, 3.748f, - 3.036f, 3.112f, 3.331f, 3.297f, 3.821f, 3.758f, 4.511f, 3.389f, - 4.000f, 3.518f, 3.905f, 3.150f, 2.684f, 3.079f, 3.081f, 3.707f, - 4.622f, 4.555f, 3.523f, 4.312f, 2.990f, 3.867f, 3.187f, 2.803f, - 3.362f, 3.730f, 3.311f, 3.897f, 3.448f, 4.280f, 3.747f, 4.339f, - 3.685f, 2.930f, 4.451f, 4.661f, 2.849f, 3.299f, 2.776f, 4.053f, - 4.511f, 4.356f, 3.117f, 4.159f, 3.348f, 2.650f, 3.015f, 3.547f, - 2.188f, 2.923f, 3.713f, 3.605f, 2.992f, 4.290f, 2.941f, 2.970f, - 3.878f, 4.137f, 3.047f, 3.633f, 3.226f, 4.029f, 2.443f, 3.395f, - 3.037f, 4.274f, 4.132f, 4.211f, 3.076f, 3.174f, 3.925f, 3.504f, - 3.308f, 3.239f, 3.468f, 3.630f, 3.648f, 3.817f, 3.276f, 3.312f, + 3.558f, 3.219f, 3.738f, 5.246f, 3.204f, 3.535f, 3.536f, 2.668f, 5.001f, 3.375f, 3.336f, 3.141f, + 3.824f, 4.556f, 4.097f, 4.969f, 3.164f, 3.306f, 2.031f, 3.613f, 3.084f, 3.958f, 3.583f, 3.748f, + 3.036f, 3.112f, 3.331f, 3.297f, 3.821f, 3.758f, 4.511f, 3.389f, 4.000f, 3.518f, 3.905f, 3.150f, + 2.684f, 3.079f, 3.081f, 3.707f, 4.622f, 4.555f, 3.523f, 4.312f, 2.990f, 3.867f, 3.187f, 2.803f, + 3.362f, 3.730f, 3.311f, 3.897f, 3.448f, 4.280f, 3.747f, 4.339f, 3.685f, 2.930f, 4.451f, 4.661f, + 2.849f, 3.299f, 2.776f, 4.053f, 4.511f, 4.356f, 3.117f, 4.159f, 3.348f, 2.650f, 3.015f, 3.547f, + 2.188f, 2.923f, 3.713f, 3.605f, 2.992f, 4.290f, 2.941f, 2.970f, 3.878f, 4.137f, 3.047f, 3.633f, + 3.226f, 4.029f, 2.443f, 3.395f, 3.037f, 4.274f, 4.132f, 4.211f, 3.076f, 3.174f, 3.925f, 3.504f, + 3.308f, 3.239f, 3.468f, 3.630f, 3.648f, 3.817f, 3.276f, 3.312f, }; } //ExplicitData2 - } //testing } //cont } //vtkm diff --git a/vtkm/cont/testing/MakeTestDataSet.h b/vtkm/cont/testing/MakeTestDataSet.h index 56433cd8a..0a0c4e9a3 100644 --- a/vtkm/cont/testing/MakeTestDataSet.h +++ b/vtkm/cont/testing/MakeTestDataSet.h @@ -28,80 +28,81 @@ #include #include -namespace vtkm { -namespace cont { -namespace testing { +namespace vtkm +{ +namespace cont +{ +namespace testing +{ class MakeTestDataSet { public: - // 1D uniform datasets. - vtkm::cont::DataSet Make1DUniformDataSet0(); - // 1D explicit datasets. - vtkm::cont::DataSet Make1DExplicitDataSet0(); - - // 2D uniform datasets. - vtkm::cont::DataSet Make2DUniformDataSet0(); - vtkm::cont::DataSet Make2DUniformDataSet1(); + // 1D uniform datasets. + vtkm::cont::DataSet Make1DUniformDataSet0(); + // 1D explicit datasets. + vtkm::cont::DataSet Make1DExplicitDataSet0(); - // 3D uniform datasets. - vtkm::cont::DataSet Make3DUniformDataSet0(); - vtkm::cont::DataSet Make3DUniformDataSet1(); - vtkm::cont::DataSet Make3DRegularDataSet0(); - vtkm::cont::DataSet Make3DRegularDataSet1(); + // 2D uniform datasets. + vtkm::cont::DataSet Make2DUniformDataSet0(); + vtkm::cont::DataSet Make2DUniformDataSet1(); - //2D rectilinear - vtkm::cont::DataSet Make2DRectilinearDataSet0(); + // 3D uniform datasets. + vtkm::cont::DataSet Make3DUniformDataSet0(); + vtkm::cont::DataSet Make3DUniformDataSet1(); + vtkm::cont::DataSet Make3DRegularDataSet0(); + vtkm::cont::DataSet Make3DRegularDataSet1(); - //3D rectilinear - vtkm::cont::DataSet Make3DRectilinearDataSet0(); + //2D rectilinear + vtkm::cont::DataSet Make2DRectilinearDataSet0(); - // 2D explicit datasets. - vtkm::cont::DataSet Make2DExplicitDataSet0(); + //3D rectilinear + vtkm::cont::DataSet Make3DRectilinearDataSet0(); - // 3D explicit datasets. - vtkm::cont::DataSet Make3DExplicitDataSet0(); - vtkm::cont::DataSet Make3DExplicitDataSet1(); - vtkm::cont::DataSet Make3DExplicitDataSet2(); - vtkm::cont::DataSet Make3DExplicitDataSet3(); - vtkm::cont::DataSet Make3DExplicitDataSet4(); - vtkm::cont::DataSet Make3DExplicitDataSet5(); - vtkm::cont::DataSet Make3DExplicitDataSetCowNose(); + // 2D explicit datasets. + vtkm::cont::DataSet Make2DExplicitDataSet0(); + + // 3D explicit datasets. + vtkm::cont::DataSet Make3DExplicitDataSet0(); + vtkm::cont::DataSet Make3DExplicitDataSet1(); + vtkm::cont::DataSet Make3DExplicitDataSet2(); + vtkm::cont::DataSet Make3DExplicitDataSet3(); + vtkm::cont::DataSet Make3DExplicitDataSet4(); + vtkm::cont::DataSet Make3DExplicitDataSet5(); + vtkm::cont::DataSet Make3DExplicitDataSetCowNose(); }; //Make a simple 1D dataset. -inline vtkm::cont::DataSet -MakeTestDataSet::Make1DUniformDataSet0() +inline vtkm::cont::DataSet MakeTestDataSet::Make1DUniformDataSet0() { vtkm::cont::DataSetBuilderUniform dsb; const vtkm::Id nVerts = 6; vtkm::cont::DataSet dataSet = dsb.Create(nVerts); vtkm::cont::DataSetFieldAdd dsf; - vtkm::Float32 var[nVerts] = {-1.0f, .5f, -.2f, 1.7f, -.1f, .8f}; + vtkm::Float32 var[nVerts] = { -1.0f, .5f, -.2f, 1.7f, -.1f, .8f }; dsf.AddPointField(dataSet, "pointvar", var, nVerts); - + return dataSet; } -inline vtkm::cont::DataSet -MakeTestDataSet::Make1DExplicitDataSet0() +inline vtkm::cont::DataSet MakeTestDataSet::Make1DExplicitDataSet0() { const int nVerts = 5; - typedef vtkm::Vec CoordType; + typedef vtkm::Vec CoordType; std::vector coords(nVerts); - coords[0] = CoordType(0.0f,0.f,0.f); - coords[1] = CoordType(1.0f,0.f,0.f); - coords[2] = CoordType(1.1f,0.f,0.f); - coords[3] = CoordType(1.2f,0.f,0.f); - coords[4] = CoordType(4.0f,0.f,0.f); + coords[0] = CoordType(0.0f, 0.f, 0.f); + coords[1] = CoordType(1.0f, 0.f, 0.f); + coords[2] = CoordType(1.1f, 0.f, 0.f); + coords[3] = CoordType(1.2f, 0.f, 0.f); + coords[4] = CoordType(4.0f, 0.f, 0.f); // Each line connects two consecutive vertices std::vector conn; - for (int i = 0; i < nVerts-1; i++) + for (int i = 0; i < nVerts - 1; i++) { conn.push_back(i); - conn.push_back(i+1); + conn.push_back(i + 1); } vtkm::cont::DataSet dataSet; @@ -109,55 +110,47 @@ MakeTestDataSet::Make1DExplicitDataSet0() dataSet = dsb.Create(coords, vtkm::CellShapeTagLine(), 2, conn, "coordinates", "cells"); - vtkm::cont::DataSetFieldAdd dsf; - vtkm::Float32 var[nVerts] = {-1.0f, .5f, -.2f, 1.7f, .8f}; + vtkm::cont::DataSetFieldAdd dsf; + vtkm::Float32 var[nVerts] = { -1.0f, .5f, -.2f, 1.7f, .8f }; dsf.AddPointField(dataSet, "pointvar", var, nVerts); return dataSet; } //Make a simple 2D, 2 cell uniform dataset. -inline vtkm::cont::DataSet -MakeTestDataSet::Make2DUniformDataSet0() +inline vtkm::cont::DataSet MakeTestDataSet::Make2DUniformDataSet0() { - vtkm::cont::DataSetBuilderUniform dsb; - vtkm::Id2 dimensions(3,2); - vtkm::cont::DataSet dataSet = dsb.Create(dimensions); + vtkm::cont::DataSetBuilderUniform dsb; + vtkm::Id2 dimensions(3, 2); + vtkm::cont::DataSet dataSet = dsb.Create(dimensions); - vtkm::cont::DataSetFieldAdd dsf; - const vtkm::Id nVerts = 6; - vtkm::Float32 var[nVerts] = {10.1f, 20.1f, 30.1f, 40.1f, 50.1f, 60.1f}; + vtkm::cont::DataSetFieldAdd dsf; + const vtkm::Id nVerts = 6; + vtkm::Float32 var[nVerts] = { 10.1f, 20.1f, 30.1f, 40.1f, 50.1f, 60.1f }; - dsf.AddPointField(dataSet, "pointvar", var, nVerts); + dsf.AddPointField(dataSet, "pointvar", var, nVerts); - vtkm::Float32 cellvar[2] = {100.1f, 200.1f}; - dsf.AddCellField(dataSet, "cellvar", cellvar, 2, "cells"); + vtkm::Float32 cellvar[2] = { 100.1f, 200.1f }; + dsf.AddCellField(dataSet, "cellvar", cellvar, 2, "cells"); - return dataSet; + return dataSet; } //Make a simple 2D, 16 cell uniform dataset. -inline vtkm::cont::DataSet -MakeTestDataSet::Make2DUniformDataSet1() +inline vtkm::cont::DataSet MakeTestDataSet::Make2DUniformDataSet1() { vtkm::cont::DataSetBuilderUniform dsb; - vtkm::Id2 dimensions(5,5); + vtkm::Id2 dimensions(5, 5); vtkm::cont::DataSet dataSet = dsb.Create(dimensions); vtkm::cont::DataSetFieldAdd dsf; const vtkm::Id nVerts = 25; const vtkm::Id nCells = 16; - vtkm::Float32 pointvar[nVerts] = { - 100.0f, 78.0f, 49.0f, 17.0f, 1.0f, - 94.0f, 71.0f, 47.0f, 33.0f, 6.0f, - 52.0f, 44.0f, 50.0f, 45.0f, 48.0f, - 8.0f, 12.0f, 46.0f, 91.0f, 43.0f, - 0.0f, 5.0f, 51.0f, 76.0f, 83.0f}; - vtkm::Float32 cellvar[nCells] = { - 0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f, - 8.0f, 9.0f, 10.0f, 11.0f, - 12.0f, 13.0f, 14.0f, 15.0f}; + vtkm::Float32 pointvar[nVerts] = { 100.0f, 78.0f, 49.0f, 17.0f, 1.0f, 94.0f, 71.0f, 47.0f, 33.0f, + 6.0f, 52.0f, 44.0f, 50.0f, 45.0f, 48.0f, 8.0f, 12.0f, 46.0f, + 91.0f, 43.0f, 0.0f, 5.0f, 51.0f, 76.0f, 83.0f }; + vtkm::Float32 cellvar[nCells] = { 0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, + 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f }; dsf.AddPointField(dataSet, "pointvar", pointvar, nVerts); dsf.AddCellField(dataSet, "cellvar", cellvar, nCells, "cells"); @@ -166,90 +159,64 @@ MakeTestDataSet::Make2DUniformDataSet1() } //Make a simple 3D, 4 cell uniform dataset. -inline vtkm::cont::DataSet -MakeTestDataSet::Make3DUniformDataSet0() +inline vtkm::cont::DataSet MakeTestDataSet::Make3DUniformDataSet0() { - vtkm::cont::DataSetBuilderUniform dsb; - vtkm::Id3 dimensions(3,2,3); - vtkm::cont::DataSet dataSet = dsb.Create(dimensions); + vtkm::cont::DataSetBuilderUniform dsb; + vtkm::Id3 dimensions(3, 2, 3); + vtkm::cont::DataSet dataSet = dsb.Create(dimensions); - vtkm::cont::DataSetFieldAdd dsf; - const int nVerts = 18; - vtkm::Float32 vars[nVerts] = {10.1f, 20.1f, 30.1f, 40.1f, 50.2f, - 60.2f, 70.2f, 80.2f, 90.3f, 100.3f, - 110.3f, 120.3f, 130.4f, 140.4f, - 150.4f, 160.4f, 170.5f, 180.5f}; + vtkm::cont::DataSetFieldAdd dsf; + const int nVerts = 18; + vtkm::Float32 vars[nVerts] = { 10.1f, 20.1f, 30.1f, 40.1f, 50.2f, 60.2f, + 70.2f, 80.2f, 90.3f, 100.3f, 110.3f, 120.3f, + 130.4f, 140.4f, 150.4f, 160.4f, 170.5f, 180.5f }; - //Set point and cell scalar - dsf.AddPointField(dataSet, "pointvar", vars, nVerts); + //Set point and cell scalar + dsf.AddPointField(dataSet, "pointvar", vars, nVerts); - vtkm::Float32 cellvar[4] = {100.1f, 100.2f, 100.3f, 100.4f}; - dsf.AddCellField(dataSet, "cellvar", cellvar, 4, "cells"); + vtkm::Float32 cellvar[4] = { 100.1f, 100.2f, 100.3f, 100.4f }; + dsf.AddCellField(dataSet, "cellvar", cellvar, 4, "cells"); - return dataSet; + return dataSet; } //Make a simple 3D, 64 cell uniform dataset. -inline vtkm::cont::DataSet -MakeTestDataSet::Make3DUniformDataSet1() +inline vtkm::cont::DataSet MakeTestDataSet::Make3DUniformDataSet1() { vtkm::cont::DataSetBuilderUniform dsb; - vtkm::Id3 dimensions(5,5,5); + vtkm::Id3 dimensions(5, 5, 5); vtkm::cont::DataSet dataSet = dsb.Create(dimensions); vtkm::cont::DataSetFieldAdd dsf; const vtkm::Id nVerts = 125; const vtkm::Id nCells = 64; vtkm::Float32 pointvar[nVerts] = { - 0.0f, 0.0f, 0.0f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0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 97.0f, 87.0f, 82.0f, 0.0f, 0.0f, 92.0f, 77.0f, + 92.0f, 0.0f, 0.0f, 82.0f, 87.0f, 97.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; - vtkm::Float32 cellvar[nCells] = { - 0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f, - 8.0f, 9.0f, 10.0f, 11.0f, - 12.0f, 13.0f, 14.0f, 15.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f + }; + vtkm::Float32 cellvar[nCells] = { 0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, + 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, - 16.0f, 17.0f, 18.0f, 19.0f, - 20.0f, 21.0f, 22.0f, 23.0f, - 24.0f, 25.0f, 26.0f, 27.0f, - 28.0f, 29.0f, 30.0f, 31.0f, + 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, + 24.0f, 25.0f, 26.0f, 27.0f, 28.0f, 29.0f, 30.0f, 31.0f, - 32.0f, 33.0f, 34.0f, 35.0f, - 36.0f, 37.0f, 38.0f, 39.0f, - 40.0f, 41.0f, 42.0f, 43.0f, - 44.0f, 45.0f, 46.0f, 47.0f, + 32.0f, 33.0f, 34.0f, 35.0f, 36.0f, 37.0f, 38.0f, 39.0f, + 40.0f, 41.0f, 42.0f, 43.0f, 44.0f, 45.0f, 46.0f, 47.0f, - 48.0f, 49.0f, 50.0f, 51.0f, - 52.0f, 53.0f, 54.0f, 55.0f, - 56.0f, 57.0f, 58.0f, 59.0f, - 60.0f, 61.0f, 62.0f, 63.0f}; + 48.0f, 49.0f, 50.0f, 51.0f, 52.0f, 53.0f, 54.0f, 55.0f, + 56.0f, 57.0f, 58.0f, 59.0f, 60.0f, 61.0f, 62.0f, 63.0f }; dsf.AddPointField(dataSet, "pointvar", pointvar, nVerts); dsf.AddCellField(dataSet, "cellvar", cellvar, nCells, "cells"); @@ -257,131 +224,121 @@ MakeTestDataSet::Make3DUniformDataSet1() return dataSet; } -inline vtkm::cont::DataSet -MakeTestDataSet::Make2DRectilinearDataSet0() +inline vtkm::cont::DataSet MakeTestDataSet::Make2DRectilinearDataSet0() { - vtkm::cont::DataSetBuilderRectilinear dsb; - std::vector X(3), Y(2); + vtkm::cont::DataSetBuilderRectilinear dsb; + std::vector X(3), Y(2); - X[0] = 0.0f; - X[1] = 1.0f; - X[2] = 2.0f; - Y[0] = 0.0f; - Y[1] = 1.0f; + X[0] = 0.0f; + X[1] = 1.0f; + X[2] = 2.0f; + Y[0] = 0.0f; + Y[1] = 1.0f; - vtkm::cont::DataSet dataSet = dsb.Create(X, Y); + vtkm::cont::DataSet dataSet = dsb.Create(X, Y); - vtkm::cont::DataSetFieldAdd dsf; - const vtkm::Id nVerts = 6; - vtkm::Float32 var[nVerts]; - for (int i = 0; i < nVerts; i++) - var[i] = (vtkm::Float32)i; - dsf.AddPointField(dataSet, "pointvar", var, nVerts); + vtkm::cont::DataSetFieldAdd dsf; + const vtkm::Id nVerts = 6; + vtkm::Float32 var[nVerts]; + for (int i = 0; i < nVerts; i++) + var[i] = (vtkm::Float32)i; + dsf.AddPointField(dataSet, "pointvar", var, nVerts); - const vtkm::Id nCells = 2; - vtkm::Float32 cellvar[nCells]; - for (int i = 0; i < nCells; i++) - cellvar[i] = (vtkm::Float32)i; - dsf.AddCellField(dataSet, "cellvar", cellvar, nCells, "cells"); + const vtkm::Id nCells = 2; + vtkm::Float32 cellvar[nCells]; + for (int i = 0; i < nCells; i++) + cellvar[i] = (vtkm::Float32)i; + dsf.AddCellField(dataSet, "cellvar", cellvar, nCells, "cells"); - return dataSet; + return dataSet; } -inline vtkm::cont::DataSet -MakeTestDataSet::Make3DRegularDataSet0() +inline vtkm::cont::DataSet MakeTestDataSet::Make3DRegularDataSet0() { - vtkm::cont::DataSet dataSet; + vtkm::cont::DataSet dataSet; - const int nVerts = 18; - vtkm::cont::ArrayHandleUniformPointCoordinates - coordinates(vtkm::Id3(3, 2, 3)); - vtkm::Float32 vars[nVerts] = {10.1f, 20.1f, 30.1f, 40.1f, 50.2f, 60.2f, 70.2f, 80.2f, 90.3f, - 100.3f, 110.3f, 120.3f, 130.4f, 140.4f, 150.4f, 160.4f, 170.5f, - 180.5f}; + const int nVerts = 18; + vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vtkm::Id3(3, 2, 3)); + vtkm::Float32 vars[nVerts] = { 10.1f, 20.1f, 30.1f, 40.1f, 50.2f, 60.2f, + 70.2f, 80.2f, 90.3f, 100.3f, 110.3f, 120.3f, + 130.4f, 140.4f, 150.4f, 160.4f, 170.5f, 180.5f }; - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); - //Set point scalar - dataSet.AddField(Field("pointvar", vtkm::cont::Field::ASSOC_POINTS, vars, nVerts)); + //Set point scalar + dataSet.AddField(Field("pointvar", vtkm::cont::Field::ASSOC_POINTS, vars, nVerts)); - //Set cell scalar - vtkm::Float32 cellvar[4] = {100.1f, 100.2f, 100.3f, 100.4f}; - dataSet.AddField(Field("cellvar", vtkm::cont::Field::ASSOC_CELL_SET, "cells", cellvar, 4)); + //Set cell scalar + vtkm::Float32 cellvar[4] = { 100.1f, 100.2f, 100.3f, 100.4f }; + dataSet.AddField(Field("cellvar", vtkm::cont::Field::ASSOC_CELL_SET, "cells", cellvar, 4)); - static const vtkm::IdComponent dim = 3; - vtkm::cont::CellSetStructured cellSet("cells"); - cellSet.SetPointDimensions( vtkm::make_Vec(3,2,3) ); - dataSet.AddCellSet(cellSet); + static const vtkm::IdComponent dim = 3; + vtkm::cont::CellSetStructured cellSet("cells"); + cellSet.SetPointDimensions(vtkm::make_Vec(3, 2, 3)); + dataSet.AddCellSet(cellSet); - return dataSet; + return dataSet; } - -inline vtkm::cont::DataSet -MakeTestDataSet::Make3DRegularDataSet1() +inline vtkm::cont::DataSet MakeTestDataSet::Make3DRegularDataSet1() { - vtkm::cont::DataSet dataSet; + vtkm::cont::DataSet dataSet; - const int nVerts = 8; - vtkm::cont::ArrayHandleUniformPointCoordinates - coordinates(vtkm::Id3(2, 2, 2)); - vtkm::Float32 vars[nVerts] = {10.1f, 20.1f, 30.1f, 40.1f, 50.2f, 60.2f, 70.2f, 80.2f}; + const int nVerts = 8; + vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vtkm::Id3(2, 2, 2)); + vtkm::Float32 vars[nVerts] = { 10.1f, 20.1f, 30.1f, 40.1f, 50.2f, 60.2f, 70.2f, 80.2f }; - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); - //Set point scalar - dataSet.AddField(Field("pointvar", vtkm::cont::Field::ASSOC_POINTS, vars, nVerts)); + //Set point scalar + dataSet.AddField(Field("pointvar", vtkm::cont::Field::ASSOC_POINTS, vars, nVerts)); - //Set cell scalar - vtkm::Float32 cellvar[1] = {100.1f}; - dataSet.AddField(Field("cellvar", vtkm::cont::Field::ASSOC_CELL_SET, "cells", cellvar, 1)); + //Set cell scalar + vtkm::Float32 cellvar[1] = { 100.1f }; + dataSet.AddField(Field("cellvar", vtkm::cont::Field::ASSOC_CELL_SET, "cells", cellvar, 1)); - static const vtkm::IdComponent dim = 3; - vtkm::cont::CellSetStructured cellSet("cells"); - cellSet.SetPointDimensions( vtkm::make_Vec(2,2,2) ); - dataSet.AddCellSet(cellSet); + static const vtkm::IdComponent dim = 3; + vtkm::cont::CellSetStructured cellSet("cells"); + cellSet.SetPointDimensions(vtkm::make_Vec(2, 2, 2)); + dataSet.AddCellSet(cellSet); - return dataSet; + return dataSet; } -inline vtkm::cont::DataSet -MakeTestDataSet::Make3DRectilinearDataSet0() +inline vtkm::cont::DataSet MakeTestDataSet::Make3DRectilinearDataSet0() { - vtkm::cont::DataSetBuilderRectilinear dsb; - std::vector X(3), Y(2), Z(3); + vtkm::cont::DataSetBuilderRectilinear dsb; + std::vector X(3), Y(2), Z(3); - X[0] = 0.0f; - X[1] = 1.0f; - X[2] = 2.0f; - Y[0] = 0.0f; - Y[1] = 1.0f; - Z[0] = 0.0f; - Z[1] = 1.0f; - Z[2] = 2.0f; + X[0] = 0.0f; + X[1] = 1.0f; + X[2] = 2.0f; + Y[0] = 0.0f; + Y[1] = 1.0f; + Z[0] = 0.0f; + Z[1] = 1.0f; + Z[2] = 2.0f; - vtkm::cont::DataSet dataSet = dsb.Create(X, Y, Z); + vtkm::cont::DataSet dataSet = dsb.Create(X, Y, Z); - vtkm::cont::DataSetFieldAdd dsf; - const vtkm::Id nVerts = 18; - vtkm::Float32 var[nVerts]; - for (int i = 0; i < nVerts; i++) - var[i] = (vtkm::Float32)i; - dsf.AddPointField(dataSet, "pointvar", var, nVerts); + vtkm::cont::DataSetFieldAdd dsf; + const vtkm::Id nVerts = 18; + vtkm::Float32 var[nVerts]; + for (int i = 0; i < nVerts; i++) + var[i] = (vtkm::Float32)i; + dsf.AddPointField(dataSet, "pointvar", var, nVerts); - const vtkm::Id nCells = 4; - vtkm::Float32 cellvar[nCells]; - for (int i = 0; i < nCells; i++) - cellvar[i] = (vtkm::Float32)i; - dsf.AddCellField(dataSet, "cellvar", cellvar, nCells, "cells"); + const vtkm::Id nCells = 4; + vtkm::Float32 cellvar[nCells]; + for (int i = 0; i < nCells; i++) + cellvar[i] = (vtkm::Float32)i; + dsf.AddCellField(dataSet, "cellvar", cellvar, nCells, "cells"); - return dataSet; + return dataSet; } // Make a 2D explicit dataset -inline vtkm::cont::DataSet -MakeTestDataSet::Make2DExplicitDataSet0() +inline vtkm::cont::DataSet MakeTestDataSet::Make2DExplicitDataSet0() { vtkm::cont::DataSet dataSet; vtkm::cont::DataSetBuilderExplicit dsb; @@ -390,19 +347,19 @@ MakeTestDataSet::Make2DExplicitDataSet0() // Coordinates const int nVerts = 16; const int nCells = 7; - typedef vtkm::Vec CoordType; + typedef vtkm::Vec CoordType; std::vector coords(nVerts); - coords[0] = CoordType(0, 0, 0); - coords[1] = CoordType(1, 0, 0); - coords[2] = CoordType(2, 0, 0); - coords[3] = CoordType(3, 0, 0); - coords[4] = CoordType(0, 1, 0); - coords[5] = CoordType(1, 1, 0); - coords[6] = CoordType(2, 1, 0); - coords[7] = CoordType(3, 1, 0); - coords[8] = CoordType(0, 2, 0); - coords[9] = CoordType(1, 2, 0); + coords[0] = CoordType(0, 0, 0); + coords[1] = CoordType(1, 0, 0); + coords[2] = CoordType(2, 0, 0); + coords[3] = CoordType(3, 0, 0); + coords[4] = CoordType(0, 1, 0); + coords[5] = CoordType(1, 1, 0); + coords[6] = CoordType(2, 1, 0); + coords[7] = CoordType(3, 1, 0); + coords[8] = CoordType(0, 2, 0); + coords[9] = CoordType(1, 2, 0); coords[10] = CoordType(2, 2, 0); coords[11] = CoordType(3, 2, 0); coords[12] = CoordType(0, 3, 0); @@ -466,14 +423,9 @@ MakeTestDataSet::Make2DExplicitDataSet0() dataSet = dsb.Create(coords, shapes, numindices, conn, "coordinates", "cells"); // Field data - vtkm::Float32 pointvar[nVerts] = { - 100.0f, 78.0f, 49.0f, 17.0f, - 94.0f, 71.0f, 47.0f, 33.0f, - 52.0f, 44.0f, 50.0f, 45.0f, - 8.0f, 12.0f, 46.0f, 91.0f}; - vtkm::Float32 cellvar[nCells] = { - 0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f}; + vtkm::Float32 pointvar[nVerts] = { 100.0f, 78.0f, 49.0f, 17.0f, 94.0f, 71.0f, 47.0f, 33.0f, + 52.0f, 44.0f, 50.0f, 45.0f, 8.0f, 12.0f, 46.0f, 91.0f }; + vtkm::Float32 cellvar[nCells] = { 0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f }; dsf.AddPointField(dataSet, "pointvar", pointvar, nVerts); dsf.AddCellField(dataSet, "cellvar", cellvar, nCells, "cells"); @@ -481,14 +433,13 @@ MakeTestDataSet::Make2DExplicitDataSet0() return dataSet; } -inline vtkm::cont::DataSet -MakeTestDataSet::Make3DExplicitDataSet0() +inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet0() { vtkm::cont::DataSet dataSet; vtkm::cont::DataSetBuilderExplicit dsb; const int nVerts = 5; - typedef vtkm::Vec CoordType; + typedef vtkm::Vec CoordType; std::vector coords(nVerts); coords[0] = CoordType(0, 0, 0); coords[1] = CoordType(1, 0, 0); @@ -519,8 +470,8 @@ MakeTestDataSet::Make3DExplicitDataSet0() //Create the dataset. dataSet = dsb.Create(coords, shapes, numindices, conn, "coordinates", "cells"); - vtkm::Float32 vars[nVerts] = {10.1f, 20.1f, 30.2f, 40.2f, 50.3f}; - vtkm::Float32 cellvar[2] = {100.1f, 100.2f}; + vtkm::Float32 vars[nVerts] = { 10.1f, 20.1f, 30.2f, 40.2f, 50.3f }; + vtkm::Float32 cellvar[2] = { 100.1f, 100.2f }; vtkm::cont::DataSetFieldAdd dsf; dsf.AddPointField(dataSet, "pointvar", vars, nVerts); @@ -529,7 +480,7 @@ MakeTestDataSet::Make3DExplicitDataSet0() return dataSet; } - /* +/* inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet1() { @@ -563,15 +514,13 @@ MakeTestDataSet::Make3DExplicitDataSet1() } */ - -inline vtkm::cont::DataSet -MakeTestDataSet::Make3DExplicitDataSet1() +inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet1() { vtkm::cont::DataSet dataSet; vtkm::cont::DataSetBuilderExplicit dsb; const int nVerts = 5; - typedef vtkm::Vec CoordType; + typedef vtkm::Vec CoordType; std::vector coords(nVerts); coords[0] = CoordType(0, 0, 0); @@ -579,21 +528,15 @@ MakeTestDataSet::Make3DExplicitDataSet1() coords[2] = CoordType(1, 1, 0); coords[3] = CoordType(2, 1, 0); coords[4] = CoordType(2, 2, 0); - CoordType coordinates[nVerts] = { - CoordType(0, 0, 0), - CoordType(1, 0, 0), - CoordType(1, 1, 0), - CoordType(2, 1, 0), - CoordType(2, 2, 0) - }; - vtkm::Float32 vars[nVerts] = {10.1f, 20.1f, 30.2f, 40.2f, 50.3f}; + CoordType coordinates[nVerts] = { CoordType(0, 0, 0), CoordType(1, 0, 0), CoordType(1, 1, 0), + CoordType(2, 1, 0), CoordType(2, 2, 0) }; + vtkm::Float32 vars[nVerts] = { 10.1f, 20.1f, 30.2f, 40.2f, 50.3f }; - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates, nVerts)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates, nVerts)); vtkm::cont::CellSetExplicit<> cellSet("cells"); cellSet.PrepareToAddCells(2, 7); - cellSet.AddCell(vtkm::CELL_SHAPE_TRIANGLE, 3, make_Vec(0,1,2)); - cellSet.AddCell(vtkm::CELL_SHAPE_QUAD, 4, make_Vec(2,1,3,4)); + cellSet.AddCell(vtkm::CELL_SHAPE_TRIANGLE, 3, make_Vec(0, 1, 2)); + cellSet.AddCell(vtkm::CELL_SHAPE_QUAD, 4, make_Vec(2, 1, 3, 4)); cellSet.CompleteAddingCells(nVerts); dataSet.AddCellSet(cellSet); @@ -601,19 +544,18 @@ MakeTestDataSet::Make3DExplicitDataSet1() dataSet.AddField(Field("pointvar", vtkm::cont::Field::ASSOC_POINTS, vars, nVerts)); //Set cell scalar - vtkm::Float32 cellvar[2] = {100.1f, 100.2f}; + vtkm::Float32 cellvar[2] = { 100.1f, 100.2f }; dataSet.AddField(Field("cellvar", vtkm::cont::Field::ASSOC_CELL_SET, "cells", cellvar, 2)); return dataSet; } -inline vtkm::cont::DataSet -MakeTestDataSet::Make3DExplicitDataSet2() +inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet2() { vtkm::cont::DataSet dataSet; const int nVerts = 8; - typedef vtkm::Vec CoordType; + typedef vtkm::Vec CoordType; CoordType coordinates[nVerts] = { CoordType(0, 0, 0), // 0 CoordType(1, 0, 0), // 1 @@ -624,16 +566,15 @@ MakeTestDataSet::Make3DExplicitDataSet2() CoordType(1, 1, 1), // 6 CoordType(0, 1, 1) // 7 }; - vtkm::Float32 vars[nVerts] = {10.1f, 20.1f, 30.2f, 40.2f, 50.3f, 60.2f, 70.2f, 80.3f}; + vtkm::Float32 vars[nVerts] = { 10.1f, 20.1f, 30.2f, 40.2f, 50.3f, 60.2f, 70.2f, 80.3f }; - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates, nVerts)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates, nVerts)); //Set point scalar dataSet.AddField(Field("pointvar", vtkm::cont::Field::ASSOC_POINTS, vars, nVerts)); //Set cell scalar - vtkm::Float32 cellvar[2] = {100.1f}; + vtkm::Float32 cellvar[2] = { 100.1f }; dataSet.AddField(Field("cellvar", vtkm::cont::Field::ASSOC_CELL_SET, "cells", cellvar, 1)); vtkm::cont::CellSetExplicit<> cellSet("cells"); @@ -657,13 +598,12 @@ MakeTestDataSet::Make3DExplicitDataSet2() return dataSet; } -inline vtkm::cont::DataSet -MakeTestDataSet::Make3DExplicitDataSet4() +inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet4() { vtkm::cont::DataSet dataSet; const int nVerts = 12; - typedef vtkm::Vec CoordType; + typedef vtkm::Vec CoordType; CoordType coordinates[nVerts] = { CoordType(0, 0, 0), //0 CoordType(1, 0, 0), //1 @@ -678,16 +618,16 @@ MakeTestDataSet::Make3DExplicitDataSet4() CoordType(2, 1, 1), //10 CoordType(2, 1, 0) //11 }; - vtkm::Float32 vars[nVerts] = {10.1f, 20.1f, 30.2f, 40.2f, 50.3f, 60.2f, 70.2f, 80.3f, 90.f, 10.f, 11.f, 12.f}; + vtkm::Float32 vars[nVerts] = { 10.1f, 20.1f, 30.2f, 40.2f, 50.3f, 60.2f, + 70.2f, 80.3f, 90.f, 10.f, 11.f, 12.f }; - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates, nVerts)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates, nVerts)); //Set point scalar dataSet.AddField(Field("pointvar", vtkm::cont::Field::ASSOC_POINTS, vars, nVerts)); //Set cell scalar - vtkm::Float32 cellvar[2] = {100.1f, 110.f}; + vtkm::Float32 cellvar[2] = { 100.1f, 110.f }; dataSet.AddField(Field("cellvar", vtkm::cont::Field::ASSOC_CELL_SET, "cells", cellvar, 2)); vtkm::cont::CellSetExplicit<> cellSet("cells"); @@ -720,29 +660,23 @@ MakeTestDataSet::Make3DExplicitDataSet4() return dataSet; } -inline vtkm::cont::DataSet -MakeTestDataSet::Make3DExplicitDataSet3() +inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet3() { vtkm::cont::DataSet dataSet; const int nVerts = 4; - typedef vtkm::Vec CoordType; - CoordType coordinates[nVerts] = { - CoordType(0, 0, 0), - CoordType(1, 0, 0), - CoordType(1, 0, 1), - CoordType(0, 1, 0) - }; - vtkm::Float32 vars[nVerts] = {10.1f, 10.1f, 10.2f, 30.2f}; + typedef vtkm::Vec CoordType; + CoordType coordinates[nVerts] = { CoordType(0, 0, 0), CoordType(1, 0, 0), CoordType(1, 0, 1), + CoordType(0, 1, 0) }; + vtkm::Float32 vars[nVerts] = { 10.1f, 10.1f, 10.2f, 30.2f }; - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates, nVerts)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates, nVerts)); //Set point scalar dataSet.AddField(Field("pointvar", vtkm::cont::Field::ASSOC_POINTS, vars, nVerts)); //Set cell scalar - vtkm::Float32 cellvar[2] = {100.1f}; + vtkm::Float32 cellvar[2] = { 100.1f }; dataSet.AddField(Field("cellvar", vtkm::cont::Field::ASSOC_CELL_SET, "cells", cellvar, 1)); vtkm::cont::CellSetExplicit<> cellSet("cells"); @@ -762,45 +696,37 @@ MakeTestDataSet::Make3DExplicitDataSet3() return dataSet; } -inline vtkm::cont::DataSet -MakeTestDataSet::Make3DExplicitDataSet5() +inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet5() { vtkm::cont::DataSet dataSet; const int nVerts = 11; - typedef vtkm::Vec CoordType; + typedef vtkm::Vec CoordType; CoordType coordinates[nVerts] = { - CoordType(0, 0, 0), //0 - CoordType(1, 0, 0), //1 - CoordType(1, 0, 1), //2 - CoordType(0, 0, 1), //3 - CoordType(0, 1, 0), //4 - CoordType(1, 1, 0), //5 - CoordType(1, 1, 1), //6 - CoordType(0, 1, 1), //7 + CoordType(0, 0, 0), //0 + CoordType(1, 0, 0), //1 + CoordType(1, 0, 1), //2 + CoordType(0, 0, 1), //3 + CoordType(0, 1, 0), //4 + CoordType(1, 1, 0), //5 + CoordType(1, 1, 1), //6 + CoordType(0, 1, 1), //7 CoordType(2, 0.5, 0.5), //8 - CoordType(0, 2, 0), //9 - CoordType(1, 2, 0) //10 + CoordType(0, 2, 0), //9 + CoordType(1, 2, 0) //10 }; - vtkm::Float32 vars[nVerts] = {10.1f, 20.1f, 30.2f, 40.2f, 50.3f, 60.2f, 70.2f, 80.3f, 90.f, 10.f, 11.f}; + vtkm::Float32 vars[nVerts] = { 10.1f, 20.1f, 30.2f, 40.2f, 50.3f, 60.2f, + 70.2f, 80.3f, 90.f, 10.f, 11.f }; - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates, nVerts)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates, nVerts)); //Set point scalar - dataSet.AddField(Field("pointvar", - vtkm::cont::Field::ASSOC_POINTS, - vars, - nVerts)); + dataSet.AddField(Field("pointvar", vtkm::cont::Field::ASSOC_POINTS, vars, nVerts)); //Set cell scalar const int nCells = 4; - vtkm::Float32 cellvar[nCells] = {100.1f, 110.f, 120.2f, 130.5f}; - dataSet.AddField(Field("cellvar", - vtkm::cont::Field::ASSOC_CELL_SET, - "cells", - cellvar, - nCells)); + vtkm::Float32 cellvar[nCells] = { 100.1f, 110.f, 120.2f, 130.5f }; + dataSet.AddField(Field("cellvar", vtkm::cont::Field::ASSOC_CELL_SET, "cells", cellvar, nCells)); vtkm::cont::CellSetExplicit<> cellSet("cells"); vtkm::Vec ids; @@ -846,73 +772,45 @@ MakeTestDataSet::Make3DExplicitDataSet5() return dataSet; } -inline vtkm::cont::DataSet -MakeTestDataSet::Make3DExplicitDataSetCowNose() +inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSetCowNose() { // prepare data array const int nVerts = 17; - typedef vtkm::Vec CoordType; + typedef vtkm::Vec CoordType; CoordType coordinates[nVerts] = { - CoordType(0.0480879,0.151874,0.107334), - CoordType(0.0293568,0.245532,0.125337), - CoordType(0.0224398,0.246495,0.1351), - CoordType(0.0180085,0.20436,0.145316), - CoordType(0.0307091,0.152142,0.0539249), - CoordType(0.0270341,0.242992,0.107567), - CoordType(0.000684071,0.00272505,0.175648), - CoordType(0.00946217,0.077227,0.187097), - CoordType(-0.000168991,0.0692243,0.200755), - CoordType(-0.000129414,0.00247137,0.176561), - CoordType(0.0174172,0.137124,0.124553), - CoordType(0.00325994,0.0797155,0.184912), - CoordType(0.00191765,0.00589327,0.16608), - CoordType(0.0174716,0.0501928,0.0930275), - CoordType(0.0242103,0.250062,0.126256), - CoordType(0.0108188,0.152774,0.167914), - CoordType(5.41687e-05,0.00137834,0.175119) + CoordType(0.0480879, 0.151874, 0.107334), CoordType(0.0293568, 0.245532, 0.125337), + CoordType(0.0224398, 0.246495, 0.1351), CoordType(0.0180085, 0.20436, 0.145316), + CoordType(0.0307091, 0.152142, 0.0539249), CoordType(0.0270341, 0.242992, 0.107567), + CoordType(0.000684071, 0.00272505, 0.175648), CoordType(0.00946217, 0.077227, 0.187097), + CoordType(-0.000168991, 0.0692243, 0.200755), CoordType(-0.000129414, 0.00247137, 0.176561), + CoordType(0.0174172, 0.137124, 0.124553), CoordType(0.00325994, 0.0797155, 0.184912), + CoordType(0.00191765, 0.00589327, 0.16608), CoordType(0.0174716, 0.0501928, 0.0930275), + CoordType(0.0242103, 0.250062, 0.126256), CoordType(0.0108188, 0.152774, 0.167914), + CoordType(5.41687e-05, 0.00137834, 0.175119) }; const int connectivitySize = 57; - vtkm::Id pointId[connectivitySize] = { - 0, 1, 3, - 2, 3, 1, - 4, 5, 0, - 1, 0, 5, - 7, 8, 6, - 9, 6, 8, - 0, 10, 7, - 11, 7, 10, - 0, 6, 13, - 12, 13, 6, - 1, 5, 14, - 1, 14, 2, - 0, 3, 15, - 0, 13, 4, - 6, 16, 12, - 6, 9, 16, - 7, 11, 8, - 0, 15, 10, - 7, 6, 0 - }; + vtkm::Id pointId[connectivitySize] = { 0, 1, 3, 2, 3, 1, 4, 5, 0, 1, 0, 5, 7, 8, 6, + 9, 6, 8, 0, 10, 7, 11, 7, 10, 0, 6, 13, 12, 13, 6, + 1, 5, 14, 1, 14, 2, 0, 3, 15, 0, 13, 4, 6, 16, 12, + 6, 9, 16, 7, 11, 8, 0, 15, 10, 7, 6, 0 }; // create DataSet vtkm::cont::DataSet dataSet; - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates, nVerts)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates, nVerts)); vtkm::cont::ArrayHandle connectivity; connectivity.Allocate(connectivitySize); - for(vtkm::Id i=0; i < connectivitySize; ++i) + for (vtkm::Id i = 0; i < connectivitySize; ++i) { connectivity.GetPortalControl().Set(i, pointId[i]); } - vtkm::cont::CellSetSingleType< > cellSet("cells"); + vtkm::cont::CellSetSingleType<> cellSet("cells"); cellSet.Fill(nVerts, vtkm::CELL_SHAPE_TRIANGLE, 3, connectivity); dataSet.AddCellSet(cellSet); return dataSet; } - } } } // namespace vtkm::cont::testing diff --git a/vtkm/cont/testing/Testing.h b/vtkm/cont/testing/Testing.h index 2051b4dbc..dfd202e1d 100644 --- a/vtkm/cont/testing/Testing.h +++ b/vtkm/cont/testing/Testing.h @@ -24,37 +24,38 @@ #include -namespace vtkm { -namespace cont { -namespace testing { +namespace vtkm +{ +namespace cont +{ +namespace testing +{ struct Testing { public: - template + template static VTKM_CONT int Run(Func function) { try { function(); } - catch (vtkm::testing::Testing::TestFailure &error) + catch (vtkm::testing::Testing::TestFailure& error) { - std::cout << "***** Test failed @ " - << error.GetFile() << ":" << error.GetLine() << std::endl + std::cout << "***** Test failed @ " << error.GetFile() << ":" << error.GetLine() << std::endl << error.GetMessage() << std::endl; return 1; } - catch (vtkm::cont::Error &error) + catch (vtkm::cont::Error& error) { std::cout << "***** Uncaught VTKm exception thrown." << std::endl << error.GetMessage() << std::endl; return 1; } - catch (std::exception &error) + catch (std::exception& error) { - std::cout << "***** STL exception throw." << std::endl - << error.what() << std::endl; + std::cout << "***** STL exception throw." << std::endl << error.what() << std::endl; } catch (...) { @@ -64,7 +65,6 @@ public: return 0; } }; - } } } // namespace vtkm::cont::testing diff --git a/vtkm/cont/testing/TestingArrayHandles.h b/vtkm/cont/testing/TestingArrayHandles.h index 5d75a1452..62f0bb0d6 100644 --- a/vtkm/cont/testing/TestingArrayHandles.h +++ b/vtkm/cont/testing/TestingArrayHandles.h @@ -32,45 +32,46 @@ #include #include -namespace vtkm { -namespace cont { -namespace testing { +namespace vtkm +{ +namespace cont +{ +namespace testing +{ namespace array_handle_testing { - template - void CheckValues(IteratorType begin, IteratorType end, T) - { +template +void CheckValues(IteratorType begin, IteratorType end, T) +{ - vtkm::Id index = 0; - for (IteratorType iter = begin; iter != end; iter++) + vtkm::Id index = 0; + for (IteratorType iter = begin; iter != end; iter++) + { + T expectedValue = TestValue(index, T()); + if (!test_equal(*iter, expectedValue)) { - T expectedValue = TestValue(index, T()); - if (!test_equal(*iter, expectedValue)) - { - std::stringstream message; - message << "Got unexpected value in array." << std::endl - << "Expected: " << expectedValue - << ", Found: " << *iter << std::endl; - VTKM_TEST_FAIL(message.str().c_str()); - } - - index++; + std::stringstream message; + message << "Got unexpected value in array." << std::endl + << "Expected: " << expectedValue << ", Found: " << *iter << std::endl; + VTKM_TEST_FAIL(message.str().c_str()); } - } - template - void CheckArray(const vtkm::cont::ArrayHandle &handle) - { - CheckPortal(handle.GetPortalConstControl()); + index++; } +} +template +void CheckArray(const vtkm::cont::ArrayHandle& handle) +{ + CheckPortal(handle.GetPortalConstControl()); +} } /// This class has a single static member, Run, that tests that all Fancy Array /// Handles work with the given DeviceAdapter /// -template +template struct TestingArrayHandles { @@ -79,33 +80,36 @@ struct TestingArrayHandles typedef void ControlSignature(FieldIn<>, FieldOut<>); typedef _2 ExecutionSignature(_1); - template - VTKM_EXEC - ValueType operator()(const ValueType &inValue) const - { return inValue; } - + template + VTKM_EXEC ValueType operator()(const ValueType& inValue) const + { + return inValue; + } }; - template + template struct AssignTestValue : public vtkm::exec::FunctorBase { ExecutionPortalType Portal; VTKM_CONT - AssignTestValue(ExecutionPortalType p): Portal(p) {} + AssignTestValue(ExecutionPortalType p) + : Portal(p) + { + } VTKM_EXEC - void operator()(vtkm::Id index) const - { - this->Portal.Set(index, TestValue(index, T()) ); - } + void operator()(vtkm::Id index) const { this->Portal.Set(index, TestValue(index, T())); } }; - template + template struct InplaceFunctor : public vtkm::exec::FunctorBase { ExecutionPortalType Portal; VTKM_CONT - InplaceFunctor(const ExecutionPortalType &p): Portal(p) {} + InplaceFunctor(const ExecutionPortalType& p) + : Portal(p) + { + } VTKM_EXEC void operator()(vtkm::Id index) const @@ -119,11 +123,10 @@ private: typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; - typedef vtkm::worklet::DispatcherMapField DispatcherPassThrough; + typedef vtkm::worklet::DispatcherMapField DispatcherPassThrough; struct VerifyEmptyArrays { - template + template VTKM_CONT void operator()(T) const { std::cout << "Try operations on empty arrays." << std::endl; @@ -133,9 +136,8 @@ private: VTKM_TEST_ASSERT(arrayHandle.GetNumberOfValues() == 0, "Uninitialized array does not report zero values."); arrayHandle = vtkm::cont::ArrayHandle(); - VTKM_TEST_ASSERT( - arrayHandle.GetPortalConstControl().GetNumberOfValues() == 0, - "Uninitialized array does not give portal with zero values."); + VTKM_TEST_ASSERT(arrayHandle.GetPortalConstControl().GetNumberOfValues() == 0, + "Uninitialized array does not give portal with zero values."); arrayHandle = vtkm::cont::ArrayHandle(); arrayHandle.Shrink(0); arrayHandle = vtkm::cont::ArrayHandle(); @@ -153,17 +155,16 @@ private: struct VerifyUserAllocatedHandle { - template + template VTKM_CONT void operator()(T) const { std::vector buffer(ARRAY_SIZE); - for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) + for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { buffer[static_cast(index)] = TestValue(index, T()); } - vtkm::cont::ArrayHandle arrayHandle = - vtkm::cont::make_ArrayHandle(buffer); + vtkm::cont::ArrayHandle arrayHandle = vtkm::cont::make_ArrayHandle(buffer); VTKM_TEST_ASSERT(arrayHandle.GetNumberOfValues() == ARRAY_SIZE, "ArrayHandle has wrong number of entries."); @@ -173,11 +174,9 @@ private: std::cout << "Check out execution array behavior." << std::endl; { //as input - typename vtkm::cont::ArrayHandle::template - ExecutionTypes::PortalConst - executionPortal; - executionPortal = - arrayHandle.PrepareForInput(DeviceAdapterTag()); + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst + executionPortal; + executionPortal = arrayHandle.PrepareForInput(DeviceAdapterTag()); //use a worklet to verify the input transfer worked properly vtkm::cont::ArrayHandle result; @@ -187,11 +186,9 @@ private: std::cout << "Check out inplace." << std::endl; { //as inplace - typename vtkm::cont::ArrayHandle::template - ExecutionTypes::Portal - executionPortal; - executionPortal = - arrayHandle.PrepareForInPlace(DeviceAdapterTag()); + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal + executionPortal; + executionPortal = arrayHandle.PrepareForInPlace(DeviceAdapterTag()); //use a worklet to verify the inplace transfer worked properly vtkm::cont::ArrayHandle result; @@ -202,12 +199,9 @@ private: std::cout << "Check out output." << std::endl; { //as output with same length as user provided. This should work //as no new memory needs to be allocated - typename vtkm::cont::ArrayHandle::template - ExecutionTypes::Portal - executionPortal; - executionPortal = - arrayHandle.PrepareForOutput(ARRAY_SIZE, - DeviceAdapterTag()); + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal + executionPortal; + executionPortal = arrayHandle.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag()); //we can't verify output contents as those aren't fetched, we //can just make sure the allocation didn't throw an exception @@ -221,7 +215,7 @@ private: //Copy data from handle into iterator T array[ARRAY_SIZE]; arrayHandle.CopyInto(array, DeviceAdapterTag()); - array_handle_testing::CheckValues(array, array+ARRAY_SIZE, T()); + array_handle_testing::CheckValues(array, array + ARRAY_SIZE, T()); } std::cout << "Check CopyInto from execution array" << std::endl; @@ -232,7 +226,7 @@ private: //Copy data from handle into iterator T array[ARRAY_SIZE]; result.CopyInto(array, DeviceAdapterTag()); - array_handle_testing::CheckValues(array, array+ARRAY_SIZE, T()); + array_handle_testing::CheckValues(array, array + ARRAY_SIZE, T()); } if (!std::is_same::value) @@ -246,7 +240,7 @@ private: //if you request it from a different device adapter T array[ARRAY_SIZE]; result.CopyInto(array, vtkm::cont::DeviceAdapterTagSerial()); - array_handle_testing::CheckValues(array, array+ARRAY_SIZE, T()); + array_handle_testing::CheckValues(array, array + ARRAY_SIZE, T()); } { //as output with a length larger than the memory provided by the user @@ -256,23 +250,22 @@ private: { //you should not be able to allocate a size larger than the //user provided and get the results - arrayHandle.PrepareForOutput(ARRAY_SIZE*2,DeviceAdapterTag()); + arrayHandle.PrepareForOutput(ARRAY_SIZE * 2, DeviceAdapterTag()); arrayHandle.GetPortalControl(); } - catch (vtkm::cont::Error &) + catch (vtkm::cont::Error&) { gotException = true; } - VTKM_TEST_ASSERT(gotException, - "PrepareForOutput should fail when asked to "\ - "re-allocate user provided memory."); + VTKM_TEST_ASSERT(gotException, "PrepareForOutput should fail when asked to " + "re-allocate user provided memory."); } } }; struct VerifyVTKMAllocatedHandle { - template + template VTKM_CONT void operator()(T) const { vtkm::cont::ArrayHandle arrayHandle; @@ -280,20 +273,19 @@ private: VTKM_TEST_ASSERT(arrayHandle.GetNumberOfValues() == 0, "ArrayHandle has wrong number of entries."); { - typedef typename vtkm::cont::ArrayHandle::template - ExecutionTypes::Portal - ExecutionPortalType; - ExecutionPortalType executionPortal = - arrayHandle.PrepareForOutput(ARRAY_SIZE*2, - DeviceAdapterTag()); + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal + ExecutionPortalType; + ExecutionPortalType executionPortal = + arrayHandle.PrepareForOutput(ARRAY_SIZE * 2, DeviceAdapterTag()); //we drop down to manually scheduling so that we don't need //need to bring in array handle counting AssignTestValue functor(executionPortal); - Algorithm::Schedule(functor, ARRAY_SIZE*2); + Algorithm::Schedule(functor, ARRAY_SIZE * 2); } - VTKM_TEST_ASSERT(arrayHandle.GetNumberOfValues() == ARRAY_SIZE*2, + VTKM_TEST_ASSERT(arrayHandle.GetNumberOfValues() == ARRAY_SIZE * 2, "Array not allocated correctly."); array_handle_testing::CheckArray(arrayHandle); @@ -304,57 +296,50 @@ private: array_handle_testing::CheckArray(arrayHandle); std::cout << "Try reallocating array." << std::endl; - arrayHandle.Allocate(ARRAY_SIZE*2); - VTKM_TEST_ASSERT(arrayHandle.GetNumberOfValues() == ARRAY_SIZE*2, + arrayHandle.Allocate(ARRAY_SIZE * 2); + VTKM_TEST_ASSERT(arrayHandle.GetNumberOfValues() == ARRAY_SIZE * 2, "Array size did not allocate correctly."); // No point in checking values. This method can invalidate them. std::cout << "Try in place operation." << std::endl; { - typedef typename vtkm::cont::ArrayHandle::template - ExecutionTypes::Portal + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal ExecutionPortalType; - ExecutionPortalType executionPortal = - arrayHandle.PrepareForInPlace(DeviceAdapterTag()); + ExecutionPortalType executionPortal = arrayHandle.PrepareForInPlace(DeviceAdapterTag()); //in place can't be done through the dispatcher //instead we have to drop down to manually scheduling InplaceFunctor functor(executionPortal); - Algorithm::Schedule(functor,ARRAY_SIZE*2); + Algorithm::Schedule(functor, ARRAY_SIZE * 2); } typename vtkm::cont::ArrayHandle::PortalConstControl controlPortal = - arrayHandle.GetPortalConstControl(); + arrayHandle.GetPortalConstControl(); for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { - VTKM_TEST_ASSERT(test_equal(controlPortal.Get(index), - TestValue(index, T()) + T(1)), + VTKM_TEST_ASSERT(test_equal(controlPortal.Get(index), TestValue(index, T()) + T(1)), "Did not get result from in place operation."); } - VTKM_TEST_ASSERT(arrayHandle == arrayHandle, - "Array handle does not equal itself."); + VTKM_TEST_ASSERT(arrayHandle == arrayHandle, "Array handle does not equal itself."); VTKM_TEST_ASSERT(arrayHandle != vtkm::cont::ArrayHandle(), "Array handle equals different array."); } }; struct TryArrayHandleType - { + { void operator()() const - { + { vtkm::testing::Testing::TryTypes(VerifyEmptyArrays()); vtkm::testing::Testing::TryTypes(VerifyUserAllocatedHandle()); vtkm::testing::Testing::TryTypes(VerifyVTKMAllocatedHandle()); - } - }; + } + }; public: - static VTKM_CONT int Run() - { - return vtkm::cont::testing::Testing::Run(TryArrayHandleType()); - } + static VTKM_CONT int Run() { return vtkm::cont::testing::Testing::Run(TryArrayHandleType()); } }; - } } } // namespace vtkm::cont::testing diff --git a/vtkm/cont/testing/TestingComputeRange.h b/vtkm/cont/testing/TestingComputeRange.h index 7273868d1..98e32eceb 100644 --- a/vtkm/cont/testing/TestingComputeRange.h +++ b/vtkm/cont/testing/TestingComputeRange.h @@ -32,21 +32,21 @@ #include #include -namespace vtkm { -namespace cont { -namespace testing { +namespace vtkm +{ +namespace cont +{ +namespace testing +{ -struct CustomTypeList : vtkm::ListTagBase, - vtkm::Vec, - vtkm::Vec, - vtkm::Vec, - vtkm::Vec, - vtkm::Vec, - vtkm::Vec, - vtkm::Vec > -{}; +struct CustomTypeList + : vtkm::ListTagBase, vtkm::Vec, vtkm::Vec, + vtkm::Vec, vtkm::Vec, vtkm::Vec, + vtkm::Vec, vtkm::Vec> +{ +}; -template +template class TestingComputeRange { private: @@ -56,16 +56,14 @@ private: 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", vtkm::cont::Field::ASSOC_POINTS, data, - nvals); + vtkm::cont::Field field("TestField", vtkm::cont::Field::ASSOC_POINTS, data, nvals); vtkm::Range result; field.GetRange(&result); std::cout << result << std::endl; - VTKM_TEST_ASSERT( - (test_equal(result.Min, -5.0) && test_equal(result.Max, 5.0)), - "Unexpected scalar field range."); + VTKM_TEST_ASSERT((test_equal(result.Min, -5.0) && test_equal(result.Max, 5.0)), + "Unexpected scalar field range."); } template @@ -82,29 +80,23 @@ private: fieldData[j][i] = data[j]; } } - vtkm::cont::Field field("TestField", vtkm::cont::Field::ASSOC_POINTS, fieldData, - nvals); + vtkm::cont::Field field("TestField", vtkm::cont::Field::ASSOC_POINTS, fieldData, nvals); vtkm::Range result[NumberOfComponents]; - field.GetRange(result, - CustomTypeList(), - VTKM_DEFAULT_STORAGE_LIST_TAG()); + field.GetRange(result, CustomTypeList(), VTKM_DEFAULT_STORAGE_LIST_TAG()); for (vtkm::IdComponent i = 0; i < NumberOfComponents; ++i) { - VTKM_TEST_ASSERT( - (test_equal(result[i].Min, -5.0) && test_equal(result[i].Max, 5.0)), - "Unexpected vector field range."); + VTKM_TEST_ASSERT((test_equal(result[i].Min, -5.0) && test_equal(result[i].Max, 5.0)), + "Unexpected vector field range."); } } static void TestUniformCoordinateField() { - vtkm::cont::CoordinateSystem field( - "TestField", - vtkm::Id3(10, 20, 5), - vtkm::Vec(0.0f,-5.0f,4.0f), - vtkm::Vec(1.0f,0.5f,2.0f)); + vtkm::cont::CoordinateSystem field("TestField", vtkm::Id3(10, 20, 5), + vtkm::Vec(0.0f, -5.0f, 4.0f), + vtkm::Vec(1.0f, 0.5f, 2.0f)); vtkm::Bounds result = field.GetBounds(); @@ -159,7 +151,6 @@ public: return vtkm::cont::testing::Testing::Run(TestAll()); } }; - } } } // namespace vtkm::cont::testing diff --git a/vtkm/cont/testing/TestingDataSetExplicit.h b/vtkm/cont/testing/TestingDataSetExplicit.h index 1cec4d52b..6f9376956 100644 --- a/vtkm/cont/testing/TestingDataSetExplicit.h +++ b/vtkm/cont/testing/TestingDataSetExplicit.h @@ -28,19 +28,22 @@ #include -namespace vtkm { -namespace cont { -namespace testing { +namespace vtkm +{ +namespace cont +{ +namespace testing +{ /// This class has a single static member, Run, that tests DataSetExplicit /// with the given DeviceAdapter /// -template +template class TestingDataSetExplicit { private: - template - static bool TestArrayHandle(const vtkm::cont::ArrayHandle &ah, const T *expected, + template + static bool TestArrayHandle(const vtkm::cont::ArrayHandle& ah, const T* expected, vtkm::Id size) { if (size != ah.GetNumberOfValues()) @@ -64,16 +67,14 @@ private: vtkm::cont::testing::MakeTestDataSet tds; vtkm::cont::DataSet ds = tds.Make3DExplicitDataSet0(); - VTKM_TEST_ASSERT(ds.GetNumberOfCellSets() == 1, - "Incorrect number of cell sets"); + VTKM_TEST_ASSERT(ds.GetNumberOfCellSets() == 1, "Incorrect number of cell sets"); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, "Incorrect number of fields"); // test various field-getting methods and associations - const vtkm::cont::Field &f1 = ds.GetField("pointvar"); + const vtkm::cont::Field& f1 = ds.GetField("pointvar"); VTKM_TEST_ASSERT(f1.GetAssociation() == vtkm::cont::Field::ASSOC_POINTS, - "Association of 'pointvar' was not ASSOC_POINTS"); + "Association of 'pointvar' was not ASSOC_POINTS"); try { //const vtkm::cont::Field &f2 = @@ -90,45 +91,39 @@ private: ds.GetField("cellvar", vtkm::cont::Field::ASSOC_POINTS); VTKM_TEST_FAIL("Failed to get expected error for association mismatch."); } - catch (vtkm::cont::ErrorBadValue &error) + catch (vtkm::cont::ErrorBadValue& error) { - std::cout << "Caught expected error for association mismatch: " - << std::endl << " " << error.GetMessage() << std::endl; + std::cout << "Caught expected error for association mismatch: " << std::endl + << " " << error.GetMessage() << std::endl; } VTKM_TEST_ASSERT(ds.GetNumberOfCoordinateSystems() == 1, - "Incorrect number of coordinate systems"); + "Incorrect number of coordinate systems"); // test cell-to-point connectivity vtkm::cont::CellSetExplicit<> cellset; ds.GetCellSet(0).CopyTo(cellset); - cellset.BuildConnectivity(DeviceAdapterTag(), - vtkm::TopologyElementTagCell(), + cellset.BuildConnectivity(DeviceAdapterTag(), vtkm::TopologyElementTagCell(), vtkm::TopologyElementTagPoint()); vtkm::Id connectivitySize = 7; vtkm::Id numPoints = 5; - vtkm::UInt8 correctShapes[] = {1, 1, 1, 1, 1}; - vtkm::IdComponent correctNumIndices[] = {1, 2, 2, 1, 1}; - vtkm::Id correctConnectivity[] = {0, 0, 1, 0, 1, 1, 1}; + vtkm::UInt8 correctShapes[] = { 1, 1, 1, 1, 1 }; + vtkm::IdComponent correctNumIndices[] = { 1, 2, 2, 1, 1 }; + vtkm::Id correctConnectivity[] = { 0, 0, 1, 0, 1, 1, 1 }; - vtkm::cont::ArrayHandleConstant shapes = cellset.GetShapesArray( - vtkm::TopologyElementTagCell(),vtkm::TopologyElementTagPoint()); - vtkm::cont::ArrayHandle numIndices = cellset.GetNumIndicesArray( - vtkm::TopologyElementTagCell(),vtkm::TopologyElementTagPoint()); - vtkm::cont::ArrayHandle conn = cellset.GetConnectivityArray( - vtkm::TopologyElementTagCell(),vtkm::TopologyElementTagPoint()); + vtkm::cont::ArrayHandleConstant shapes = + cellset.GetShapesArray(vtkm::TopologyElementTagCell(), vtkm::TopologyElementTagPoint()); + vtkm::cont::ArrayHandle numIndices = + cellset.GetNumIndicesArray(vtkm::TopologyElementTagCell(), vtkm::TopologyElementTagPoint()); + vtkm::cont::ArrayHandle conn = + cellset.GetConnectivityArray(vtkm::TopologyElementTagCell(), vtkm::TopologyElementTagPoint()); - VTKM_TEST_ASSERT(TestArrayHandle(shapes, - correctShapes, - numPoints), - "Got incorrect shapes"); - VTKM_TEST_ASSERT(TestArrayHandle(numIndices, - correctNumIndices, - numPoints), - "Got incorrect shapes"); + VTKM_TEST_ASSERT(TestArrayHandle(shapes, correctShapes, numPoints), "Got incorrect shapes"); + VTKM_TEST_ASSERT(TestArrayHandle(numIndices, correctNumIndices, numPoints), + "Got incorrect shapes"); // Some device adapters have unstable sorts, which may cause the order of // the indices for each point to be different but still correct. Iterate @@ -140,56 +135,40 @@ private: { vtkm::IdComponent numIncidentCells = correctNumIndices[pointIndex]; std::set correctIncidentCells; - for (vtkm::IdComponent cellIndex = 0; - cellIndex < numIncidentCells; - cellIndex++) + for (vtkm::IdComponent cellIndex = 0; cellIndex < numIncidentCells; cellIndex++) { - correctIncidentCells.insert( - correctConnectivity[connectivityIndex+cellIndex]); + correctIncidentCells.insert(correctConnectivity[connectivityIndex + cellIndex]); } - for (vtkm::IdComponent cellIndex = 0; - cellIndex < numIncidentCells; - cellIndex++) + for (vtkm::IdComponent cellIndex = 0; cellIndex < numIncidentCells; cellIndex++) { - vtkm::Id expectedCell = - conn.GetPortalConstControl().Get(connectivityIndex+cellIndex); - std::set::iterator foundCell = - correctIncidentCells.find(expectedCell); - VTKM_TEST_ASSERT( - foundCell != correctIncidentCells.end(), - "An incident cell in the connectivity list is wrong or repeated."); + vtkm::Id expectedCell = conn.GetPortalConstControl().Get(connectivityIndex + cellIndex); + std::set::iterator foundCell = correctIncidentCells.find(expectedCell); + VTKM_TEST_ASSERT(foundCell != correctIncidentCells.end(), + "An incident cell in the connectivity list is wrong or repeated."); correctIncidentCells.erase(foundCell); } connectivityIndex += numIncidentCells; } //verify that GetIndices works properly - vtkm::Id expectedPointIds[4] = {2,1,3,4}; - vtkm::Vec retrievedPointIds; + vtkm::Id expectedPointIds[4] = { 2, 1, 3, 4 }; + vtkm::Vec retrievedPointIds; cellset.GetIndices(1, retrievedPointIds); for (vtkm::IdComponent i = 0; i < 4; i++) { - VTKM_TEST_ASSERT( - retrievedPointIds[i] == expectedPointIds[i], - "Incorrect point ID for quad cell"); + VTKM_TEST_ASSERT(retrievedPointIds[i] == expectedPointIds[i], + "Incorrect point ID for quad cell"); } } struct TestAll { - VTKM_CONT void operator()() const - { - TestingDataSetExplicit::TestDataSet_Explicit(); - } + VTKM_CONT void operator()() const { TestingDataSetExplicit::TestDataSet_Explicit(); } }; public: - static VTKM_CONT int Run() - { - return vtkm::cont::testing::Testing::Run(TestAll()); - } + static VTKM_CONT int Run() { return vtkm::cont::testing::Testing::Run(TestAll()); } }; - } } } // namespace vtkm::cont::testing diff --git a/vtkm/cont/testing/TestingDataSetSingleType.h b/vtkm/cont/testing/TestingDataSetSingleType.h index 4f7e40872..0d59f818b 100644 --- a/vtkm/cont/testing/TestingDataSetSingleType.h +++ b/vtkm/cont/testing/TestingDataSetSingleType.h @@ -31,19 +31,22 @@ #include #include -namespace vtkm { -namespace cont { -namespace testing { +namespace vtkm +{ +namespace cont +{ +namespace testing +{ /// This class has a single static member, Run, that tests DataSetSingleType /// with the given DeviceAdapter /// -template +template class TestingDataSetSingleType { private: - template - static bool TestArrayHandle(const vtkm::cont::ArrayHandle &ah, const T *expected, + template + static bool TestArrayHandle(const vtkm::cont::ArrayHandle& ah, const T* expected, vtkm::Id size) { if (size != ah.GetNumberOfValues()) @@ -64,13 +67,13 @@ private: static inline vtkm::cont::DataSet make_SingleTypeDataSet() { - typedef vtkm::Vec CoordType; - std::vector< CoordType > coordinates; - coordinates.push_back( CoordType(0, 0, 0) ); - coordinates.push_back( CoordType(1, 0, 0) ); - coordinates.push_back( CoordType(1, 1, 0) ); - coordinates.push_back( CoordType(2, 1, 0) ); - coordinates.push_back( CoordType(2, 2, 0) ); + typedef vtkm::Vec CoordType; + std::vector coordinates; + coordinates.push_back(CoordType(0, 0, 0)); + coordinates.push_back(CoordType(1, 0, 0)); + coordinates.push_back(CoordType(1, 1, 0)); + coordinates.push_back(CoordType(2, 1, 0)); + coordinates.push_back(CoordType(2, 2, 0)); std::vector conn; // First Cell @@ -90,10 +93,9 @@ private: vtkm::cont::DataSetBuilderExplicit builder; ds = builder.Create(coordinates, vtkm::CellShapeTagTriangle(), 3, conn); - //Set point scalar const int nVerts = 5; - vtkm::Float32 vars[nVerts] = {10.1f, 20.1f, 30.2f, 40.2f, 50.3f}; + vtkm::Float32 vars[nVerts] = { 10.1f, 20.1f, 30.2f, 40.2f, 50.3f }; vtkm::cont::DataSetFieldAdd fieldAdder; fieldAdder.AddPointField(ds, "pointvar", vars, nVerts); @@ -109,70 +111,58 @@ private: vtkm::cont::CellSetSingleType<> cellset; dataSet.GetCellSet(0).CopyTo(cellset); - //verify that we can compute the cell to point connectivity - cellset.BuildConnectivity(DeviceAdapterTag(), - vtkm::TopologyElementTagCell(), + cellset.BuildConnectivity(DeviceAdapterTag(), vtkm::TopologyElementTagCell(), vtkm::TopologyElementTagPoint()); dataSet.PrintSummary(std::cout); //verify that the point to cell connectivity types are correct - vtkm::cont::ArrayHandleConstant shapesPointToCell = cellset.GetShapesArray( - vtkm::TopologyElementTagPoint(),vtkm::TopologyElementTagCell()); - vtkm::cont::ArrayHandleConstant numIndicesPointToCell = cellset.GetNumIndicesArray( - vtkm::TopologyElementTagPoint(),vtkm::TopologyElementTagCell()); - vtkm::cont::ArrayHandle connPointToCell = cellset.GetConnectivityArray( - vtkm::TopologyElementTagPoint(),vtkm::TopologyElementTagCell()); + vtkm::cont::ArrayHandleConstant shapesPointToCell = + cellset.GetShapesArray(vtkm::TopologyElementTagPoint(), vtkm::TopologyElementTagCell()); + vtkm::cont::ArrayHandleConstant numIndicesPointToCell = + cellset.GetNumIndicesArray(vtkm::TopologyElementTagPoint(), vtkm::TopologyElementTagCell()); + vtkm::cont::ArrayHandle connPointToCell = + cellset.GetConnectivityArray(vtkm::TopologyElementTagPoint(), vtkm::TopologyElementTagCell()); - VTKM_TEST_ASSERT( shapesPointToCell.GetNumberOfValues() == 3, "Wrong number of shapes"); - VTKM_TEST_ASSERT( numIndicesPointToCell.GetNumberOfValues() == 3, "Wrong number of indices"); - VTKM_TEST_ASSERT( connPointToCell.GetNumberOfValues() == 9, "Wrong connectivity length"); + VTKM_TEST_ASSERT(shapesPointToCell.GetNumberOfValues() == 3, "Wrong number of shapes"); + VTKM_TEST_ASSERT(numIndicesPointToCell.GetNumberOfValues() == 3, "Wrong number of indices"); + VTKM_TEST_ASSERT(connPointToCell.GetNumberOfValues() == 9, "Wrong connectivity length"); //verify that the cell to point connectivity types are correct //note the handle storage types differ compared to point to cell - vtkm::cont::ArrayHandleConstant shapesCellToPoint = cellset.GetShapesArray( - vtkm::TopologyElementTagCell(),vtkm::TopologyElementTagPoint()); - vtkm::cont::ArrayHandle numIndicesCellToPoint = cellset.GetNumIndicesArray( - vtkm::TopologyElementTagCell(),vtkm::TopologyElementTagPoint()); - vtkm::cont::ArrayHandle connCellToPoint = cellset.GetConnectivityArray( - vtkm::TopologyElementTagCell(),vtkm::TopologyElementTagPoint()); + vtkm::cont::ArrayHandleConstant shapesCellToPoint = + cellset.GetShapesArray(vtkm::TopologyElementTagCell(), vtkm::TopologyElementTagPoint()); + vtkm::cont::ArrayHandle numIndicesCellToPoint = + cellset.GetNumIndicesArray(vtkm::TopologyElementTagCell(), vtkm::TopologyElementTagPoint()); + vtkm::cont::ArrayHandle connCellToPoint = + cellset.GetConnectivityArray(vtkm::TopologyElementTagCell(), vtkm::TopologyElementTagPoint()); - VTKM_TEST_ASSERT( shapesCellToPoint.GetNumberOfValues() == 5, "Wrong number of shapes"); - VTKM_TEST_ASSERT( numIndicesCellToPoint.GetNumberOfValues() == 5, "Wrong number of indices"); - VTKM_TEST_ASSERT( connCellToPoint.GetNumberOfValues() == 9, "Wrong connectivity length"); + VTKM_TEST_ASSERT(shapesCellToPoint.GetNumberOfValues() == 5, "Wrong number of shapes"); + VTKM_TEST_ASSERT(numIndicesCellToPoint.GetNumberOfValues() == 5, "Wrong number of indices"); + VTKM_TEST_ASSERT(connCellToPoint.GetNumberOfValues() == 9, "Wrong connectivity length"); //run a basic for-each topology algorithm on this vtkm::cont::ArrayHandle result; - vtkm::worklet::DispatcherMapTopology< - vtkm::worklet::CellAverage,DeviceAdapterTag> dispatcher; - dispatcher.Invoke(cellset, - dataSet.GetField("pointvar"), - result); + vtkm::worklet::DispatcherMapTopology dispatcher; + dispatcher.Invoke(cellset, dataSet.GetField("pointvar"), result); vtkm::Float32 expected[3] = { 20.1333f, 30.1667f, 40.2333f }; for (int i = 0; i < 3; ++i) { - VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), - expected[i]), "Wrong result for CellAverage worklet on explicit single type cellset data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellAverage worklet on explicit single type cellset data"); } } struct TestAll { - VTKM_CONT void operator()() const - { - TestingDataSetSingleType::TestDataSet_SingleType(); - } + VTKM_CONT void operator()() const { TestingDataSetSingleType::TestDataSet_SingleType(); } }; public: - static VTKM_CONT int Run() - { - return vtkm::cont::testing::Testing::Run(TestAll()); - } + static VTKM_CONT int Run() { return vtkm::cont::testing::Testing::Run(TestAll()); } }; - } } } // namespace vtkm::cont::testing diff --git a/vtkm/cont/testing/TestingDeviceAdapter.h b/vtkm/cont/testing/TestingDeviceAdapter.h index 56bf441e3..e6812c3e5 100644 --- a/vtkm/cont/testing/TestingDeviceAdapter.h +++ b/vtkm/cont/testing/TestingDeviceAdapter.h @@ -51,9 +51,12 @@ #include -namespace vtkm { -namespace cont { -namespace testing { +namespace vtkm +{ +namespace cont +{ +namespace testing +{ #define ERROR_MESSAGE "Got an error." #define ARRAY_SIZE 100000 @@ -63,31 +66,26 @@ namespace testing { /// This class has a single static member, Run, that tests the templated /// DeviceAdapter for conformance. /// -template +template struct TestingDeviceAdapter { private: typedef vtkm::cont::StorageTagBasic StorageTag; - typedef vtkm::cont::ArrayHandle - IdArrayHandle; + typedef vtkm::cont::ArrayHandle IdArrayHandle; - typedef vtkm::cont::ArrayHandle - ScalarArrayHandle; + typedef vtkm::cont::ArrayHandle ScalarArrayHandle; - typedef vtkm::cont::internal::ArrayManagerExecution< - vtkm::Id, StorageTag, DeviceAdapterTag> - IdArrayManagerExecution; + typedef vtkm::cont::internal::ArrayManagerExecution + IdArrayManagerExecution; typedef vtkm::cont::internal::Storage IdStorage; - typedef typename IdArrayHandle::template ExecutionTypes - ::Portal IdPortalType; - typedef typename IdArrayHandle::template ExecutionTypes - ::PortalConst IdPortalConstType; + typedef typename IdArrayHandle::template ExecutionTypes::Portal IdPortalType; + typedef typename IdArrayHandle::template ExecutionTypes::PortalConst + IdPortalConstType; - typedef vtkm::cont::DeviceAdapterAlgorithm - Algorithm; + typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; public: // Cuda kernels have to be public (in Cuda 4.0). @@ -95,19 +93,18 @@ public: struct CopyArrayKernel { VTKM_CONT - CopyArrayKernel(const IdPortalConstType &input, - const IdPortalType &output) - : InputArray(input), OutputArray(output) { } + CopyArrayKernel(const IdPortalConstType& input, const IdPortalType& output) + : InputArray(input) + , OutputArray(output) + { + } - VTKM_EXEC void operator()( - vtkm::Id index, - const vtkm::exec::internal::ErrorMessageBuffer &) const + VTKM_EXEC void operator()(vtkm::Id index, const vtkm::exec::internal::ErrorMessageBuffer&) const { this->OutputArray.Set(index, this->InputArray.Get(index)); } - VTKM_CONT void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &) { } + VTKM_CONT void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} IdPortalConstType InputArray; IdPortalType OutputArray; @@ -116,27 +113,29 @@ public: struct ClearArrayKernel { VTKM_CONT - ClearArrayKernel(const IdPortalType &array) : Array(array), Dims() { } + ClearArrayKernel(const IdPortalType& array) + : Array(array) + , Dims() + { + } VTKM_CONT - ClearArrayKernel(const IdPortalType &array, - const vtkm::Id3& dims) : Array(array), Dims(dims) { } - - VTKM_EXEC void operator()(vtkm::Id index) const + ClearArrayKernel(const IdPortalType& array, const vtkm::Id3& dims) + : Array(array) + , Dims(dims) { - this->Array.Set(index, OFFSET); } + VTKM_EXEC void operator()(vtkm::Id index) const { this->Array.Set(index, OFFSET); } + VTKM_EXEC void operator()(vtkm::Id3 index) const { //convert from id3 to id - vtkm::Id flatIndex = - index[0]+ this->Dims[0]*(index[1]+ this->Dims[1]*index[2]); + vtkm::Id flatIndex = index[0] + this->Dims[0] * (index[1] + this->Dims[1] * index[2]); this->operator()(flatIndex); } - VTKM_CONT void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &) { } + VTKM_CONT void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} IdPortalType Array; vtkm::Id3 Dims; @@ -148,7 +147,7 @@ public: // typedef void ControlSignature(Field(Out)); // typedef void ExecutionSignature(_1); - template + template VTKM_EXEC void operator()(T& value) const { value = OFFSET; @@ -158,12 +157,18 @@ public: struct AddArrayKernel { VTKM_CONT - AddArrayKernel(const IdPortalType &array) : Array(array), Dims() { } + AddArrayKernel(const IdPortalType& array) + : Array(array) + , Dims() + { + } VTKM_CONT - AddArrayKernel(const IdPortalType &array, - const vtkm::Id3& dims) : Array(array), Dims(dims) { } - + AddArrayKernel(const IdPortalType& array, const vtkm::Id3& dims) + : Array(array) + , Dims(dims) + { + } VTKM_EXEC void operator()(vtkm::Id index) const { @@ -173,13 +178,11 @@ public: VTKM_EXEC void operator()(vtkm::Id3 index) const { //convert from id3 to id - vtkm::Id flatIndex = - index[0]+ this->Dims[0]*(index[1]+ this->Dims[1]*index[2]); + vtkm::Id flatIndex = index[0] + this->Dims[0] * (index[1] + this->Dims[1] * index[2]); this->operator()(flatIndex); } - VTKM_CONT void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &) { } + VTKM_CONT void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} IdPortalType Array; vtkm::Id3 Dims; @@ -189,14 +192,14 @@ public: { VTKM_EXEC void operator()(vtkm::Id index) const { - if (index == ARRAY_SIZE/2) + if (index == ARRAY_SIZE / 2) { this->ErrorMessage.RaiseError(ERROR_MESSAGE); } } VTKM_CONT void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &errorMessage) + const vtkm::exec::internal::ErrorMessageBuffer& errorMessage) { this->ErrorMessage = errorMessage; } @@ -212,7 +215,7 @@ public: } VTKM_CONT void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &errorMessage) + const vtkm::exec::internal::ErrorMessageBuffer& errorMessage) { this->ErrorMessage = errorMessage; } @@ -223,15 +226,14 @@ public: struct OffsetPlusIndexKernel { VTKM_CONT - OffsetPlusIndexKernel(const IdPortalType &array) : Array(array) { } - - VTKM_EXEC void operator()(vtkm::Id index) const + OffsetPlusIndexKernel(const IdPortalType& array) + : Array(array) { - this->Array.Set(index, OFFSET + index); } - VTKM_CONT void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &) { } + VTKM_EXEC void operator()(vtkm::Id index) const { this->Array.Set(index, OFFSET + index); } + + VTKM_CONT void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} IdPortalType Array; }; @@ -239,22 +241,21 @@ public: struct MarkOddNumbersKernel { VTKM_CONT - MarkOddNumbersKernel(const IdPortalType &array) : Array(array) { } - - VTKM_EXEC void operator()(vtkm::Id index) const + MarkOddNumbersKernel(const IdPortalType& array) + : Array(array) { - this->Array.Set(index, index%2); } - VTKM_CONT void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &) { } + VTKM_EXEC void operator()(vtkm::Id index) const { this->Array.Set(index, index % 2); } + + VTKM_CONT void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} IdPortalType Array; }; struct FuseAll { - template + template VTKM_EXEC bool operator()(const T&, const T&) const { //binary predicates for unique return true if they are the same @@ -262,54 +263,53 @@ public: } }; - template + template struct AtomicKernel { VTKM_CONT - AtomicKernel(const vtkm::exec::AtomicArray &array) - : AArray(array) - { } + AtomicKernel(const vtkm::exec::AtomicArray& array) + : AArray(array) + { + } VTKM_EXEC void operator()(vtkm::Id index) const { - T value = (T) index; + T value = (T)index; this->AArray.Add(0, value); } - VTKM_CONT void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &) { } + VTKM_CONT void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} - vtkm::exec::AtomicArray AArray; + vtkm::exec::AtomicArray AArray; }; - template + template struct AtomicCASKernel { VTKM_CONT - AtomicCASKernel(const vtkm::exec::AtomicArray &array) - : AArray(array) - { } + AtomicCASKernel(const vtkm::exec::AtomicArray& array) + : AArray(array) + { + } VTKM_EXEC void operator()(vtkm::Id index) const { - T value = (T) index; + T value = (T)index; //Get the old value from the array with a no-op - T oldValue = this->AArray.Add(0,T(0)); + T oldValue = this->AArray.Add(0, T(0)); //This creates an atomic add using the CAS operatoin T assumed = T(0); do { assumed = oldValue; - oldValue = this->AArray.CompareAndSwap(0, (assumed + value) , assumed); + oldValue = this->AArray.CompareAndSwap(0, (assumed + value), assumed); } while (assumed != oldValue); - } - VTKM_CONT void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &) { } + VTKM_CONT void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} - vtkm::exec::AtomicArray AArray; + vtkm::exec::AtomicArray AArray; }; class VirtualObjectTransferKernel @@ -317,49 +317,39 @@ public: public: struct Interface { - using FooSig = vtkm::Id (const void*); + using FooSig = vtkm::Id(const void*); - template - VTKM_EXEC - void Bind(const T *target) + template + VTKM_EXEC void Bind(const T* target) { this->Target = target; - this->FooPtr = [](const void* t){ return static_cast(t)->Foo(); }; + this->FooPtr = [](const void* t) { return static_cast(t)->Foo(); }; } VTKM_EXEC - vtkm::Id Foo() const - { - return this->FooPtr(this->Target); - } + vtkm::Id Foo() const { return this->FooPtr(this->Target); } - const void *Target; - FooSig *FooPtr; + const void* Target; + FooSig* FooPtr; }; struct Concrete { - vtkm::Id Foo() const - { - return this->Value; - } + vtkm::Id Foo() const { return this->Value; } vtkm::Id Value = 0; }; - VirtualObjectTransferKernel(const Interface &vo, IdArrayHandle &result) - : Virtual(vo), Result(result.PrepareForInPlace(DeviceAdapterTag())) - { } - - VTKM_EXEC - void operator()(vtkm::Id) const + VirtualObjectTransferKernel(const Interface& vo, IdArrayHandle& result) + : Virtual(vo) + , Result(result.PrepareForInPlace(DeviceAdapterTag())) { - this->Result.Set(0, this->Virtual.Foo()); } - VTKM_CONT void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer&) - { } + VTKM_EXEC + void operator()(vtkm::Id) const { this->Result.Set(0, this->Virtual.Foo()); } + + VTKM_CONT void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer&) {} private: Interface Virtual; @@ -367,15 +357,13 @@ public: }; private: - static VTKM_CONT void TestDeviceAdapterTag() { std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing device adapter tag" << std::endl; typedef vtkm::cont::DeviceAdapterTraits Traits; - typedef vtkm::cont::DeviceAdapterTraits< - vtkm::cont::DeviceAdapterTagError> ErrorTraits; + typedef vtkm::cont::DeviceAdapterTraits ErrorTraits; VTKM_TEST_ASSERT(Traits::GetId() == Traits::GetId(), "Device adapter Id does not equal itself."); @@ -397,18 +385,17 @@ private: std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayManagerExecution" << std::endl; - typedef vtkm::cont::internal::ArrayManagerExecution< - vtkm::Id,StorageTagBasic,DeviceAdapterTag> - ArrayManagerExecution; + typedef vtkm::cont::internal::ArrayManagerExecution + ArrayManagerExecution; - typedef vtkm::cont::internal::Storage StorageType; + typedef vtkm::cont::internal::Storage StorageType; // Create original input array. StorageType storage; - storage.Allocate(ARRAY_SIZE*2); + storage.Allocate(ARRAY_SIZE * 2); StorageType::PortalType portal = storage.GetPortal(); - VTKM_TEST_ASSERT(portal.GetNumberOfValues() == ARRAY_SIZE*2, + VTKM_TEST_ASSERT(portal.GetNumberOfValues() == ARRAY_SIZE * 2, "Storage portal has unexpected size."); for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) @@ -421,8 +408,7 @@ private: // Do an operation just so we know the values are placed in the execution // environment and they change. We are only calling on half the array // because we are about to shrink. - Algorithm::Schedule(AddArrayKernel(manager.PrepareForInPlace(true)), - ARRAY_SIZE); + Algorithm::Schedule(AddArrayKernel(manager.PrepareForInPlace(true)), ARRAY_SIZE); // Change size. manager.Shrink(ARRAY_SIZE); @@ -441,33 +427,30 @@ private: // Check array. StorageType::PortalConstType checkPortal = storage.GetPortalConst(); - VTKM_TEST_ASSERT(checkPortal.GetNumberOfValues() == ARRAY_SIZE, - "Storage portal wrong size."); + VTKM_TEST_ASSERT(checkPortal.GetNumberOfValues() == ARRAY_SIZE, "Storage portal wrong size."); for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { - VTKM_TEST_ASSERT( - checkPortal.Get(index) == TestValue(index, vtkm::Id()) + index, - "Did not get correct values from array."); + VTKM_TEST_ASSERT(checkPortal.Get(index) == TestValue(index, vtkm::Id()) + index, + "Did not get correct values from array."); } } static VTKM_CONT void TestOutOfMemory() { - // Only test out of memory with 64 bit ids. If there are 32 bit ids on - // a 64 bit OS (common), it is simply too hard to get a reliable allocation - // that is too much memory. +// Only test out of memory with 64 bit ids. If there are 32 bit ids on +// a 64 bit OS (common), it is simply too hard to get a reliable allocation +// that is too much memory. #ifdef VTKM_USE_64BIT_IDS std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing Out of Memory" << std::endl; try { std::cout << "Do array allocation that should fail." << std::endl; - vtkm::cont::internal::Storage< - vtkm::Vec, StorageTagBasic> supportArray; - vtkm::cont::internal::ArrayManagerExecution< - vtkm::Vec, StorageTagBasic, DeviceAdapterTag> - bigManager(&supportArray); + vtkm::cont::internal::Storage, StorageTagBasic> supportArray; + vtkm::cont::internal::ArrayManagerExecution, StorageTagBasic, + DeviceAdapterTag> + bigManager(&supportArray); const vtkm::Id bigSize = 0x7FFFFFFFFFFFFFFFLL; bigManager.PrepareForOutput(bigSize); @@ -477,7 +460,7 @@ private: "or the width of vtkm::Id is not large enough to express all " "array sizes."); } - catch (vtkm::cont::ErrorBadAllocation &error) + catch (vtkm::cont::ErrorBadAllocation& error) { std::cout << "Got the expected error: " << error.GetMessage() << std::endl; } @@ -508,10 +491,8 @@ private: std::cout << "Elapsed time: " << elapsedTime << std::endl; - VTKM_TEST_ASSERT(elapsedTime > 0.999, - "Timer did not capture full second wait."); - VTKM_TEST_ASSERT(elapsedTime < 2.0, - "Timer counted too far or system really busy."); + VTKM_TEST_ASSERT(elapsedTime > 0.999, "Timer did not capture full second wait."); + VTKM_TEST_ASSERT(elapsedTime < 2.0, "Timer counted too far or system really busy."); } VTKM_CONT @@ -531,8 +512,8 @@ private: { using VirtualObject = typename VirtualObjectTransferKernel::Interface; using TargetType = typename VirtualObjectTransferKernel::Concrete; - using Transfer = vtkm::cont::internal::VirtualObjectTransfer< - VirtualObject, TargetType, DeviceAdapterTag>; + using Transfer = + vtkm::cont::internal::VirtualObjectTransfer; IdArrayHandle result; result.Allocate(1); @@ -544,19 +525,16 @@ private: VirtualObject vo; void* state = Transfer::Create(vo, &target); - std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing VirtualObjectTransfer" << std::endl; Algorithm::Schedule(VirtualObjectTransferKernel(vo, result), 1); - VTKM_TEST_ASSERT(result.GetPortalConstControl().Get(0) == 5, - "Did not get expected result"); + VTKM_TEST_ASSERT(result.GetPortalConstControl().Get(0) == 5, "Did not get expected result"); target.Value = 10; Transfer::Update(state, &target); Algorithm::Schedule(VirtualObjectTransferKernel(vo, result), 1); - VTKM_TEST_ASSERT(result.GetPortalConstControl().Get(0) == 10, - "Did not get expected result"); + VTKM_TEST_ASSERT(result.GetPortalConstControl().Get(0) == 10, "Did not get expected result"); Transfer::Cleanup(state); } @@ -597,12 +575,10 @@ private: IdArrayManagerExecution manager(&storage); std::cout << "Running clear." << std::endl; - Algorithm::Schedule(ClearArrayKernel(manager.PrepareForOutput(ARRAY_SIZE)), - ARRAY_SIZE); + Algorithm::Schedule(ClearArrayKernel(manager.PrepareForOutput(ARRAY_SIZE)), ARRAY_SIZE); std::cout << "Running add." << std::endl; - Algorithm::Schedule(AddArrayKernel(manager.PrepareForInPlace(false)), - ARRAY_SIZE); + Algorithm::Schedule(AddArrayKernel(manager.PrepareForInPlace(false)), ARRAY_SIZE); std::cout << "Checking results." << std::endl; manager.RetrieveOutputData(&storage); @@ -610,8 +586,7 @@ private: for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { vtkm::Id value = storage.GetPortalConst().Get(index); - VTKM_TEST_ASSERT(value == index + OFFSET, - "Got bad value for scheduled kernels."); + VTKM_TEST_ASSERT(value == index + OFFSET, "Got bad value for scheduled kernels."); } } //release memory @@ -628,21 +603,18 @@ private: //size is selected to be larger than the CUDA backend can launch in a //single invocation when compiled for SM_2 support const vtkm::Id size = 8400000; - Algorithm::Schedule(ClearArrayKernel(manager.PrepareForOutput(size)), - size); + Algorithm::Schedule(ClearArrayKernel(manager.PrepareForOutput(size)), size); std::cout << "Running add." << std::endl; - Algorithm::Schedule(AddArrayKernel(manager.PrepareForInPlace(false)), - size); + Algorithm::Schedule(AddArrayKernel(manager.PrepareForInPlace(false)), size); std::cout << "Checking results." << std::endl; manager.RetrieveOutputData(&storage); - for (vtkm::Id index = 0; index < size; index+=100) + for (vtkm::Id index = 0; index < size; index += 100) { vtkm::Id value = storage.GetPortalConst().Get(index); - VTKM_TEST_ASSERT(value == index + OFFSET, - "Got bad value for scheduled kernels."); + VTKM_TEST_ASSERT(value == index + OFFSET, "Got bad value for scheduled kernels."); } } //release memory @@ -658,13 +630,11 @@ private: std::cout << "Running clear." << std::endl; Algorithm::Schedule( - ClearArrayKernel(manager.PrepareForOutput( - DIM_SIZE * DIM_SIZE * DIM_SIZE), maxRange), - maxRange); + ClearArrayKernel(manager.PrepareForOutput(DIM_SIZE * DIM_SIZE * DIM_SIZE), maxRange), + maxRange); std::cout << "Running add." << std::endl; - Algorithm::Schedule(AddArrayKernel(manager.PrepareForInPlace(false), maxRange), - maxRange); + Algorithm::Schedule(AddArrayKernel(manager.PrepareForInPlace(false), maxRange), maxRange); std::cout << "Checking results." << std::endl; manager.RetrieveOutputData(&storage); @@ -673,8 +643,7 @@ private: for (vtkm::Id index = 0; index < maxId; index++) { vtkm::Id value = storage.GetPortalConst().Get(index); - VTKM_TEST_ASSERT(value == index + OFFSET, - "Got bad value for scheduled vtkm::Id3 kernels."); + VTKM_TEST_ASSERT(value == index + OFFSET, "Got bad value for scheduled vtkm::Id3 kernels."); } } //release memory } @@ -691,31 +660,25 @@ private: std::cout << " Standard call" << std::endl; //construct the index array Algorithm::Schedule( - OffsetPlusIndexKernel(array.PrepareForOutput(ARRAY_SIZE, - DeviceAdapterTag())), - ARRAY_SIZE); + OffsetPlusIndexKernel(array.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); Algorithm::Schedule( - MarkOddNumbersKernel(stencil.PrepareForOutput(ARRAY_SIZE, - DeviceAdapterTag())), - ARRAY_SIZE); + MarkOddNumbersKernel(stencil.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), ARRAY_SIZE); - Algorithm::CopyIf(array,stencil,result); - VTKM_TEST_ASSERT(result.GetNumberOfValues() == array.GetNumberOfValues()/2, + Algorithm::CopyIf(array, stencil, result); + VTKM_TEST_ASSERT(result.GetNumberOfValues() == array.GetNumberOfValues() / 2, "result of CopyIf has an incorrect size"); for (vtkm::Id index = 0; index < result.GetNumberOfValues(); index++) { const vtkm::Id value = result.GetPortalConstControl().Get(index); - VTKM_TEST_ASSERT(value == (OFFSET + (index*2)+1), - "Incorrect value in CopyIf result."); + VTKM_TEST_ASSERT(value == (OFFSET + (index * 2) + 1), "Incorrect value in CopyIf result."); } std::cout << " CopyIf on zero size arrays." << std::endl; array.Shrink(0); stencil.Shrink(0); Algorithm::CopyIf(array, stencil, result); - VTKM_TEST_ASSERT(result.GetNumberOfValues() == 0, - "result of CopyIf has an incorrect size"); + VTKM_TEST_ASSERT(result.GetNumberOfValues() == 0, "result of CopyIf has an incorrect size"); } static VTKM_CONT void TestOrderedUniqueValues() @@ -723,16 +686,16 @@ private: std::cout << "-------------------------------------------------" << std::endl; std::cout << "Testing Sort, Unique, LowerBounds and UpperBounds" << std::endl; std::vector testData(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i) + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) { - testData[i]= static_cast(OFFSET+(i % 50)); + testData[i] = static_cast(OFFSET + (i % 50)); } IdArrayHandle input = vtkm::cont::make_ArrayHandle(&(*testData.begin()), ARRAY_SIZE); //make a deep copy of input and place it into temp IdArrayHandle temp; - Algorithm::Copy(input,temp); + Algorithm::Copy(input, temp); Algorithm::Sort(temp); Algorithm::Unique(temp); @@ -741,18 +704,17 @@ private: IdArrayHandle handle1; //verify lower and upper bounds work - Algorithm::LowerBounds(temp,input,handle); - Algorithm::UpperBounds(temp,input,handle1); + Algorithm::LowerBounds(temp, input, handle); + Algorithm::UpperBounds(temp, input, handle1); // Check to make sure that temp was resized correctly during Unique. // (This was a discovered bug at one point.) - temp.GetPortalConstControl(); // Forces copy back to control. + temp.GetPortalConstControl(); // Forces copy back to control. temp.ReleaseResourcesExecution(); // Make sure not counting on execution. - VTKM_TEST_ASSERT( - temp.GetNumberOfValues() == 50, - "Unique did not resize array (or size did not copy to control)."); + VTKM_TEST_ASSERT(temp.GetNumberOfValues() == 50, + "Unique did not resize array (or size did not copy to control)."); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) { vtkm::Id value = handle.GetPortalConstControl().Get(i); vtkm::Id value1 = handle1.GetPortalConstControl().Get(i); @@ -765,38 +727,35 @@ private: //now test it works when the id are not incrementing const vtkm::Id RANDOMDATA_SIZE = 6; vtkm::Id randomData[RANDOMDATA_SIZE]; - randomData[0]=500; // 2 (lower), 3 (upper) - randomData[1]=955; // 3 (lower), 4 (upper) - randomData[2]=955; // 3 (lower), 4 (upper) - randomData[3]=120; // 0 (lower), 1 (upper) - randomData[4]=320; // 1 (lower), 2 (upper) - randomData[5]=955; // 3 (lower), 4 (upper) + randomData[0] = 500; // 2 (lower), 3 (upper) + randomData[1] = 955; // 3 (lower), 4 (upper) + randomData[2] = 955; // 3 (lower), 4 (upper) + randomData[3] = 120; // 0 (lower), 1 (upper) + randomData[4] = 320; // 1 (lower), 2 (upper) + randomData[5] = 955; // 3 (lower), 4 (upper) //change the control structure under the handle input = vtkm::cont::make_ArrayHandle(randomData, RANDOMDATA_SIZE); - Algorithm::Copy(input,handle); + Algorithm::Copy(input, handle); VTKM_TEST_ASSERT(handle.GetNumberOfValues() == RANDOMDATA_SIZE, "Handle incorrect size after setting new control data"); - Algorithm::Copy(input,handle1); + Algorithm::Copy(input, handle1); VTKM_TEST_ASSERT(handle.GetNumberOfValues() == RANDOMDATA_SIZE, "Handle incorrect size after setting new control data"); - Algorithm::Copy(handle,temp); - VTKM_TEST_ASSERT(temp.GetNumberOfValues() == RANDOMDATA_SIZE, - "Copy failed"); + Algorithm::Copy(handle, temp); + VTKM_TEST_ASSERT(temp.GetNumberOfValues() == RANDOMDATA_SIZE, "Copy failed"); Algorithm::Sort(temp); Algorithm::Unique(temp); - Algorithm::LowerBounds(temp,handle); - Algorithm::UpperBounds(temp,handle1); + Algorithm::LowerBounds(temp, handle); + Algorithm::UpperBounds(temp, handle1); VTKM_TEST_ASSERT(handle.GetNumberOfValues() == RANDOMDATA_SIZE, "LowerBounds returned incorrect size"); - std::copy( - vtkm::cont::ArrayPortalToIteratorBegin(handle.GetPortalConstControl()), - vtkm::cont::ArrayPortalToIteratorEnd(handle.GetPortalConstControl()), - randomData); + std::copy(vtkm::cont::ArrayPortalToIteratorBegin(handle.GetPortalConstControl()), + vtkm::cont::ArrayPortalToIteratorEnd(handle.GetPortalConstControl()), randomData); VTKM_TEST_ASSERT(randomData[0] == 2, "Got bad value - LowerBounds"); VTKM_TEST_ASSERT(randomData[1] == 3, "Got bad value - LowerBounds"); VTKM_TEST_ASSERT(randomData[2] == 3, "Got bad value - LowerBounds"); @@ -807,10 +766,8 @@ private: VTKM_TEST_ASSERT(handle1.GetNumberOfValues() == RANDOMDATA_SIZE, "UppererBounds returned incorrect size"); - std::copy( - vtkm::cont::ArrayPortalToIteratorBegin(handle1.GetPortalConstControl()), - vtkm::cont::ArrayPortalToIteratorEnd(handle1.GetPortalConstControl()), - randomData); + std::copy(vtkm::cont::ArrayPortalToIteratorBegin(handle1.GetPortalConstControl()), + vtkm::cont::ArrayPortalToIteratorEnd(handle1.GetPortalConstControl()), randomData); VTKM_TEST_ASSERT(randomData[0] == 3, "Got bad value - UpperBound"); VTKM_TEST_ASSERT(randomData[1] == 4, "Got bad value - UpperBound"); VTKM_TEST_ASSERT(randomData[2] == 4, "Got bad value - UpperBound"); @@ -824,9 +781,9 @@ private: std::cout << "-------------------------------------------------" << std::endl; std::cout << "Sort" << std::endl; std::vector testData(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i) + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) { - testData[i]= static_cast(OFFSET+((ARRAY_SIZE-i) % 50)); + testData[i] = static_cast(OFFSET + ((ARRAY_SIZE - i) % 50)); } IdArrayHandle unsorted = vtkm::cont::make_ArrayHandle(testData); @@ -836,10 +793,10 @@ private: //Validate the standard inplace sort is correct Algorithm::Sort(sorted); - for (vtkm::Id i = 0; i < ARRAY_SIZE-1; ++i) + for (vtkm::Id i = 0; i < ARRAY_SIZE - 1; ++i) { vtkm::Id sorted1 = sorted.GetPortalConstControl().Get(i); - vtkm::Id sorted2 = sorted.GetPortalConstControl().Get(i+1); + vtkm::Id sorted2 = sorted.GetPortalConstControl().Get(i + 1); VTKM_TEST_ASSERT(sorted1 <= sorted2, "Values not properly sorted."); } @@ -853,9 +810,9 @@ private: std::cout << "-------------------------------------------------" << std::endl; std::cout << "Sort with comparison object" << std::endl; std::vector testData(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i) + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) { - testData[i]= static_cast(OFFSET+((ARRAY_SIZE-i) % 50)); + testData[i] = static_cast(OFFSET + ((ARRAY_SIZE - i) % 50)); } //sort the users memory in-place @@ -866,25 +823,23 @@ private: //we would also sort the 'sorted' handle IdArrayHandle comp_sorted; Algorithm::Copy(sorted, comp_sorted); - Algorithm::Sort(comp_sorted,vtkm::SortGreater()); + Algorithm::Sort(comp_sorted, vtkm::SortGreater()); //Validate that sorted and comp_sorted are sorted in the opposite directions - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) { vtkm::Id sorted1 = sorted.GetPortalConstControl().Get(i); vtkm::Id sorted2 = comp_sorted.GetPortalConstControl().Get(ARRAY_SIZE - (i + 1)); - VTKM_TEST_ASSERT(sorted1 == sorted2, - "Got bad sort values when using SortGreater"); + VTKM_TEST_ASSERT(sorted1 == sorted2, "Got bad sort values when using SortGreater"); } //validate that sorted and comp_sorted are now equal - Algorithm::Sort(comp_sorted,vtkm::SortLess()); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) + Algorithm::Sort(comp_sorted, vtkm::SortLess()); + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) { vtkm::Id sorted1 = sorted.GetPortalConstControl().Get(i); vtkm::Id sorted2 = comp_sorted.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(sorted1 == sorted2, - "Got bad sort values when using SortLess"); + VTKM_TEST_ASSERT(sorted1 == sorted2, "Got bad sort values when using SortLess"); } } @@ -894,9 +849,9 @@ private: std::cout << "Sort of a ArrayHandleZip" << std::endl; std::vector testData(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i) + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) { - testData[i]= static_cast(OFFSET+((ARRAY_SIZE-i) % 50)); + testData[i] = static_cast(OFFSET + ((ARRAY_SIZE - i) % 50)); } IdArrayHandle unsorted = vtkm::cont::make_ArrayHandle(testData); @@ -904,7 +859,7 @@ private: Algorithm::Copy(unsorted, sorted); //verify that we can use ArrayHandleZip inplace - vtkm::cont::ArrayHandleZip< IdArrayHandle, IdArrayHandle> zipped(unsorted, sorted); + vtkm::cont::ArrayHandleZip zipped(unsorted, sorted); //verify we can use sort with zip handle Algorithm::Sort(zipped, vtkm::SortGreater()); @@ -912,8 +867,8 @@ private: for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) { - vtkm::Pair kv_sorted = zipped.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(( OFFSET + ( i / (ARRAY_SIZE/50)) ) == kv_sorted.first, + vtkm::Pair kv_sorted = zipped.GetPortalConstControl().Get(i); + VTKM_TEST_ASSERT((OFFSET + (i / (ARRAY_SIZE / 50))) == kv_sorted.first, "ArrayZipHandle improperly sorted"); } @@ -922,15 +877,15 @@ private: //verify that we can use ArrayHandlePermutation inplace vtkm::cont::ArrayHandleIndex index(ARRAY_SIZE); - vtkm::cont::ArrayHandlePermutation< vtkm::cont::ArrayHandleIndex, - IdArrayHandle> perm(index, sorted); + vtkm::cont::ArrayHandlePermutation perm(index, + sorted); //verify we can use a custom operator sort with permutation handle Algorithm::Sort(perm, vtkm::SortGreater()); for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) { vtkm::Id sorted_value = perm.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(( OFFSET + ( (ARRAY_SIZE-(i+1)) / (ARRAY_SIZE/50)) ) == sorted_value, + VTKM_TEST_ASSERT((OFFSET + ((ARRAY_SIZE - (i + 1)) / (ARRAY_SIZE / 50))) == sorted_value, "ArrayZipPermutation improperly sorted"); } @@ -939,7 +894,7 @@ private: for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) { vtkm::Id sorted_value = perm.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(( OFFSET + ( i / (ARRAY_SIZE/50)) ) == sorted_value, + VTKM_TEST_ASSERT((OFFSET + (i / (ARRAY_SIZE / 50))) == sorted_value, "ArrayZipPermutation improperly sorted"); } } @@ -949,67 +904,61 @@ private: std::cout << "-------------------------------------------------" << std::endl; std::cout << "Sort by keys" << std::endl; - typedef vtkm::Vec Vec3; - typedef vtkm::cont::ArrayHandle,StorageTag> - Vec3ArrayHandle; - + typedef vtkm::Vec Vec3; + typedef vtkm::cont::ArrayHandle, StorageTag> Vec3ArrayHandle; std::vector testKeys(ARRAY_SIZE); std::vector testValues(testKeys.size()); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) - { + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) + { std::size_t index = static_cast(i); testKeys[index] = ARRAY_SIZE - i; testValues[index] = TestValue(i, Vec3()); - } + } IdArrayHandle keys = vtkm::cont::make_ArrayHandle(testKeys); Vec3ArrayHandle values = vtkm::cont::make_ArrayHandle(testValues); - Algorithm::SortByKey(keys,values); + Algorithm::SortByKey(keys, values); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) - { + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) + { //keys should be sorted from 1 to ARRAY_SIZE //values should be sorted from (ARRAY_SIZE-1) to 0 Vec3 sorted_value = values.GetPortalConstControl().Get(i); vtkm::Id sorted_key = keys.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT( (sorted_key == (i+1)) , "Got bad SortByKeys key"); - VTKM_TEST_ASSERT( test_equal(sorted_value, TestValue(ARRAY_SIZE-1-i, Vec3())), - "Got bad SortByKeys value"); - } + VTKM_TEST_ASSERT((sorted_key == (i + 1)), "Got bad SortByKeys key"); + VTKM_TEST_ASSERT(test_equal(sorted_value, TestValue(ARRAY_SIZE - 1 - i, Vec3())), + "Got bad SortByKeys value"); + } // this will return everything back to what it was before sorting - Algorithm::SortByKey(keys,values,vtkm::SortGreater()); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) - { + Algorithm::SortByKey(keys, values, vtkm::SortGreater()); + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) + { //keys should be sorted from ARRAY_SIZE to 1 //values should be sorted from 0 to (ARRAY_SIZE-1) Vec3 sorted_value = values.GetPortalConstControl().Get(i); vtkm::Id sorted_key = keys.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT( (sorted_key == (ARRAY_SIZE-i)), - "Got bad SortByKeys key"); - VTKM_TEST_ASSERT( test_equal(sorted_value, TestValue(i, Vec3())), - "Got bad SortByKeys value"); - } + VTKM_TEST_ASSERT((sorted_key == (ARRAY_SIZE - i)), "Got bad SortByKeys key"); + VTKM_TEST_ASSERT(test_equal(sorted_value, TestValue(i, Vec3())), "Got bad SortByKeys value"); + } //this is here to verify we can sort by vtkm::Vec - Algorithm::SortByKey(values,keys); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) - { + Algorithm::SortByKey(values, keys); + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) + { //keys should be sorted from ARRAY_SIZE to 1 //values should be sorted from 0 to (ARRAY_SIZE-1) Vec3 sorted_value = values.GetPortalConstControl().Get(i); vtkm::Id sorted_key = keys.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT( (sorted_key == (ARRAY_SIZE-i)), - "Got bad SortByKeys key"); - VTKM_TEST_ASSERT( test_equal(sorted_value, TestValue(i, Vec3())), - "Got bad SortByKeys value"); - } + VTKM_TEST_ASSERT((sorted_key == (ARRAY_SIZE - i)), "Got bad SortByKeys key"); + VTKM_TEST_ASSERT(test_equal(sorted_value, TestValue(i, Vec3())), "Got bad SortByKeys value"); + } } static VTKM_CONT void TestLowerBoundsWithComparisonObject() @@ -1017,73 +966,70 @@ private: std::cout << "-------------------------------------------------" << std::endl; std::cout << "Testing LowerBounds with comparison object" << std::endl; std::vector testData(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i) + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) { - testData[i]= static_cast(OFFSET+(i % 50)); + testData[i] = static_cast(OFFSET + (i % 50)); } IdArrayHandle input = vtkm::cont::make_ArrayHandle(testData); //make a deep copy of input and place it into temp IdArrayHandle temp; - Algorithm::Copy(input,temp); + Algorithm::Copy(input, temp); Algorithm::Sort(temp); Algorithm::Unique(temp); IdArrayHandle handle; //verify lower bounds work - Algorithm::LowerBounds(temp,input,handle,vtkm::SortLess()); + Algorithm::LowerBounds(temp, input, handle, vtkm::SortLess()); // Check to make sure that temp was resized correctly during Unique. // (This was a discovered bug at one point.) - temp.GetPortalConstControl(); // Forces copy back to control. + temp.GetPortalConstControl(); // Forces copy back to control. temp.ReleaseResourcesExecution(); // Make sure not counting on execution. - VTKM_TEST_ASSERT( - temp.GetNumberOfValues() == 50, - "Unique did not resize array (or size did not copy to control)."); + VTKM_TEST_ASSERT(temp.GetNumberOfValues() == 50, + "Unique did not resize array (or size did not copy to control)."); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) { vtkm::Id value = handle.GetPortalConstControl().Get(i); VTKM_TEST_ASSERT(value == i % 50, "Got bad LowerBounds value with SortLess"); } } - static VTKM_CONT void TestUpperBoundsWithComparisonObject() { std::cout << "-------------------------------------------------" << std::endl; std::cout << "Testing UpperBounds with comparison object" << std::endl; std::vector testData(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i) + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) { - testData[i]= static_cast(OFFSET+(i % 50)); + testData[i] = static_cast(OFFSET + (i % 50)); } IdArrayHandle input = vtkm::cont::make_ArrayHandle(testData); //make a deep copy of input and place it into temp IdArrayHandle temp; - Algorithm::Copy(input,temp); + Algorithm::Copy(input, temp); Algorithm::Sort(temp); Algorithm::Unique(temp); IdArrayHandle handle; //verify upper bounds work - Algorithm::UpperBounds(temp,input,handle,vtkm::SortLess()); + Algorithm::UpperBounds(temp, input, handle, vtkm::SortLess()); // Check to make sure that temp was resized correctly during Unique. // (This was a discovered bug at one point.) - temp.GetPortalConstControl(); // Forces copy back to control. + temp.GetPortalConstControl(); // Forces copy back to control. temp.ReleaseResourcesExecution(); // Make sure not counting on execution. - VTKM_TEST_ASSERT( - temp.GetNumberOfValues() == 50, - "Unique did not resize array (or size did not copy to control)."); + VTKM_TEST_ASSERT(temp.GetNumberOfValues() == 50, + "Unique did not resize array (or size did not copy to control)."); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) { vtkm::Id value = handle.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(value == (i % 50)+1, "Got bad UpperBounds value with SortLess"); + VTKM_TEST_ASSERT(value == (i % 50) + 1, "Got bad UpperBounds value with SortLess"); } } @@ -1092,9 +1038,9 @@ private: std::cout << "-------------------------------------------------" << std::endl; std::cout << "Testing Unique with comparison object" << std::endl; std::vector testData(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i) + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) { - testData[i]= static_cast(OFFSET+(i % 50)); + testData[i] = static_cast(OFFSET + (i % 50)); } IdArrayHandle input = vtkm::cont::make_ArrayHandle(testData); Algorithm::Sort(input); @@ -1102,11 +1048,10 @@ private: // Check to make sure that input was resized correctly during Unique. // (This was a discovered bug at one point.) - input.GetPortalConstControl(); // Forces copy back to control. + input.GetPortalConstControl(); // Forces copy back to control. input.ReleaseResourcesExecution(); // Make sure not counting on execution. - VTKM_TEST_ASSERT( - input.GetNumberOfValues() == 1, - "Unique did not resize array (or size did not copy to control)."); + VTKM_TEST_ASSERT(input.GetNumberOfValues() == 1, + "Unique did not resize array (or size did not copy to control)."); vtkm::Id value = input.GetPortalConstControl().Get(0); VTKM_TEST_ASSERT(value == OFFSET, "Got bad unique value"); @@ -1119,17 +1064,14 @@ private: //construct the index array IdArrayHandle array; - Algorithm::Schedule( - ClearArrayKernel(array.PrepareForOutput(ARRAY_SIZE, - DeviceAdapterTag())), - ARRAY_SIZE); + Algorithm::Schedule(ClearArrayKernel(array.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); //the output of reduce and scan inclusive should be the same std::cout << " Reduce with initial value of 0." << std::endl; vtkm::Id reduce_sum = Algorithm::Reduce(array, vtkm::Id(0)); std::cout << " Reduce with initial value." << std::endl; - vtkm::Id reduce_sum_with_intial_value = Algorithm::Reduce(array, - vtkm::Id(ARRAY_SIZE)); + vtkm::Id reduce_sum_with_intial_value = Algorithm::Reduce(array, vtkm::Id(ARRAY_SIZE)); std::cout << " Inclusive scan to check" << std::endl; vtkm::Id inclusive_sum = Algorithm::ScanInclusive(array, array); std::cout << " Reduce with 1 value." << std::endl; @@ -1139,14 +1081,11 @@ private: array.Shrink(0); vtkm::Id reduce_sum_no_values = Algorithm::Reduce(array, vtkm::Id(0)); - VTKM_TEST_ASSERT(reduce_sum == OFFSET * ARRAY_SIZE, - "Got bad sum from Reduce"); + VTKM_TEST_ASSERT(reduce_sum == OFFSET * ARRAY_SIZE, "Got bad sum from Reduce"); VTKM_TEST_ASSERT(reduce_sum_with_intial_value == reduce_sum + ARRAY_SIZE, "Got bad sum from Reduce with initial value"); - VTKM_TEST_ASSERT(reduce_sum_one_value == OFFSET, - "Got bad single sum from Reduce"); - VTKM_TEST_ASSERT(reduce_sum_no_values == 0, - "Got bad empty sum from Reduce"); + VTKM_TEST_ASSERT(reduce_sum_one_value == OFFSET, "Got bad single sum from Reduce"); + VTKM_TEST_ASSERT(reduce_sum_no_values == 0, "Got bad empty sum from Reduce"); VTKM_TEST_ASSERT(reduce_sum == inclusive_sum, "Got different sums from Reduce and ScanInclusive"); @@ -1160,24 +1099,21 @@ private: //construct the index array. Assign an abnormally large value //to the middle of the array, that should be what we see as our sum. std::vector testData(ARRAY_SIZE); - const vtkm::Id maxValue = ARRAY_SIZE*2; - for(std::size_t i=0; i < ARRAY_SIZE; ++i) + const vtkm::Id maxValue = ARRAY_SIZE * 2; + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) { vtkm::Id index = static_cast(i); - testData[i]= index; + testData[i] = index; } - testData[ARRAY_SIZE/2] = maxValue; + testData[ARRAY_SIZE / 2] = maxValue; IdArrayHandle input = vtkm::cont::make_ArrayHandle(testData); - vtkm::Vec range = Algorithm::Reduce(input, - vtkm::Vec(0,0), - vtkm::MinAndMax()); + vtkm::Vec range = + Algorithm::Reduce(input, vtkm::Vec(0, 0), vtkm::MinAndMax()); - VTKM_TEST_ASSERT(maxValue == range[1], - "Got bad value from Reduce with comparison object"); + VTKM_TEST_ASSERT(maxValue == range[1], "Got bad value from Reduce with comparison object"); - VTKM_TEST_ASSERT(0 == range[0], - "Got bad value from Reduce with comparison object"); + VTKM_TEST_ASSERT(0 == range[0], "Got bad value from Reduce with comparison object"); } static VTKM_CONT void TestReduceWithFancyArrays() @@ -1185,59 +1121,53 @@ private: std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing Reduce with ArrayHandleZip" << std::endl; { - IdArrayHandle keys, values; - Algorithm::Schedule( - ClearArrayKernel(keys.PrepareForOutput(ARRAY_SIZE, - DeviceAdapterTag())), - ARRAY_SIZE); + IdArrayHandle keys, values; + Algorithm::Schedule(ClearArrayKernel(keys.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); - Algorithm::Schedule( - ClearArrayKernel(values.PrepareForOutput(ARRAY_SIZE, - DeviceAdapterTag())), - ARRAY_SIZE); + Algorithm::Schedule(ClearArrayKernel(values.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); - vtkm::cont::ArrayHandleZip< IdArrayHandle, - IdArrayHandle > zipped(keys,values); + vtkm::cont::ArrayHandleZip zipped(keys, values); - //the output of reduce and scan inclusive should be the same - typedef vtkm::Pair ResultType; - ResultType reduce_sum_with_intial_value = - Algorithm::Reduce(zipped, ResultType(ARRAY_SIZE,ARRAY_SIZE)); + //the output of reduce and scan inclusive should be the same + typedef vtkm::Pair ResultType; + ResultType reduce_sum_with_intial_value = + Algorithm::Reduce(zipped, ResultType(ARRAY_SIZE, ARRAY_SIZE)); - ResultType expectedResult(OFFSET * ARRAY_SIZE + ARRAY_SIZE, - OFFSET * ARRAY_SIZE + ARRAY_SIZE); - VTKM_TEST_ASSERT( ( reduce_sum_with_intial_value == expectedResult), - "Got bad sum from Reduce with initial value"); + ResultType expectedResult(OFFSET * ARRAY_SIZE + ARRAY_SIZE, OFFSET * ARRAY_SIZE + ARRAY_SIZE); + VTKM_TEST_ASSERT((reduce_sum_with_intial_value == expectedResult), + "Got bad sum from Reduce with initial value"); } std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing Reduce with ArrayHandlePermutation" << std::endl; { - //lastly test with heterogeneous zip values ( vec3, and constant array handle), - //and a custom reduce binary functor - const vtkm::Id indexLength = 30; - const vtkm::Id valuesLength = 10; - typedef vtkm::Float32 ValueType; + //lastly test with heterogeneous zip values ( vec3, and constant array handle), + //and a custom reduce binary functor + const vtkm::Id indexLength = 30; + const vtkm::Id valuesLength = 10; + typedef vtkm::Float32 ValueType; - vtkm::Id indexs[indexLength] = {0,0,0,1,1,1,2,2,2,3,3,3,4,4,4, - 5,5,5,1,4,9,7,7,7,8,8,8,0,1,2}; - ValueType values[valuesLength] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, - 6.0f, 7.0f, 8.0f, 9.0f, -2.0f}; - const ValueType expectedSum = 125; + vtkm::Id indexs[indexLength] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, + 5, 5, 5, 1, 4, 9, 7, 7, 7, 8, 8, 8, 0, 1, 2 }; + ValueType values[valuesLength] = { + 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, -2.0f + }; + const ValueType expectedSum = 125; - IdArrayHandle indexHandle = vtkm::cont::make_ArrayHandle(indexs, indexLength); - vtkm::cont::ArrayHandle valueHandle = vtkm::cont::make_ArrayHandle(values, valuesLength); + IdArrayHandle indexHandle = vtkm::cont::make_ArrayHandle(indexs, indexLength); + vtkm::cont::ArrayHandle valueHandle = + vtkm::cont::make_ArrayHandle(values, valuesLength); - vtkm::cont::ArrayHandlePermutation< IdArrayHandle, vtkm::cont::ArrayHandle > perm; - perm = vtkm::cont::make_ArrayHandlePermutation(indexHandle, valueHandle); + vtkm::cont::ArrayHandlePermutation> perm; + perm = vtkm::cont::make_ArrayHandlePermutation(indexHandle, valueHandle); - const ValueType sum = Algorithm::Reduce(perm, ValueType(0.0f)); + const ValueType sum = Algorithm::Reduce(perm, ValueType(0.0f)); - std::cout << "sum: " << sum << std::endl; - VTKM_TEST_ASSERT( ( sum == expectedSum), - "Got bad sum from Reduce with permutation handle"); + std::cout << "sum: " << sum << std::endl; + VTKM_TEST_ASSERT((sum == expectedSum), "Got bad sum from Reduce with permutation handle"); } - } static VTKM_CONT void TestReduceByKey() @@ -1247,116 +1177,96 @@ private: //first test with very basic integer key / values { - const vtkm::Id inputLength = 12; - const vtkm::Id expectedLength = 6; - vtkm::Id inputKeys[inputLength] = {0, 0, 0,\ - 1, 1,\ - 4,\ - 0,\ - 2, 2, 2, 2,\ - -1}; // input keys - vtkm::Id inputValues[inputLength] = {13, -2, -1,\ - 1, 1,\ - 0,\ - 3,\ - 1, 2, 3, 4, \ - -42}; // input keys - vtkm::Id expectedKeys[expectedLength] = { 0, 1, 4, 0, 2, -1 }; - vtkm::Id expectedValues[expectedLength] = {10, 2, 0, 3, 10, -42}; + const vtkm::Id inputLength = 12; + const vtkm::Id expectedLength = 6; + vtkm::Id inputKeys[inputLength] = { 0, 0, 0, 1, 1, 4, 0, 2, 2, 2, 2, -1 }; // input keys + vtkm::Id inputValues[inputLength] = { 13, -2, -1, 1, 1, 0, 3, 1, 2, 3, 4, -42 }; // input keys + vtkm::Id expectedKeys[expectedLength] = { 0, 1, 4, 0, 2, -1 }; + vtkm::Id expectedValues[expectedLength] = { 10, 2, 0, 3, 10, -42 }; - IdArrayHandle keys = vtkm::cont::make_ArrayHandle(inputKeys, inputLength); - IdArrayHandle values = vtkm::cont::make_ArrayHandle(inputValues, inputLength); + IdArrayHandle keys = vtkm::cont::make_ArrayHandle(inputKeys, inputLength); + IdArrayHandle values = vtkm::cont::make_ArrayHandle(inputValues, inputLength); - IdArrayHandle keysOut, valuesOut; - Algorithm::ReduceByKey( keys, - values, - keysOut, - valuesOut, - vtkm::Add() ); + IdArrayHandle keysOut, valuesOut; + Algorithm::ReduceByKey(keys, values, keysOut, valuesOut, vtkm::Add()); - VTKM_TEST_ASSERT(keysOut.GetNumberOfValues() == expectedLength, - "Got wrong number of output keys"); + VTKM_TEST_ASSERT(keysOut.GetNumberOfValues() == expectedLength, + "Got wrong number of output keys"); - VTKM_TEST_ASSERT(valuesOut.GetNumberOfValues() == expectedLength, - "Got wrong number of output values"); + VTKM_TEST_ASSERT(valuesOut.GetNumberOfValues() == expectedLength, + "Got wrong number of output values"); - for(vtkm::Id i=0; i < expectedLength; ++i) + for (vtkm::Id i = 0; i < expectedLength; ++i) { - const vtkm::Id k = keysOut.GetPortalConstControl().Get(i); - const vtkm::Id v = valuesOut.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT( expectedKeys[i] == k, "Incorrect reduced key"); - VTKM_TEST_ASSERT( expectedValues[i] == v, "Incorrect reduced value"); + const vtkm::Id k = keysOut.GetPortalConstControl().Get(i); + const vtkm::Id v = valuesOut.GetPortalConstControl().Get(i); + VTKM_TEST_ASSERT(expectedKeys[i] == k, "Incorrect reduced key"); + VTKM_TEST_ASSERT(expectedValues[i] == v, "Incorrect reduced value"); } } //next test with a single key across the entire set, using vec3 as the //value, using a custom reduce binary functor { - const vtkm::Id inputLength = 3; - const vtkm::Id expectedLength = 1; - vtkm::Id inputKeys[inputLength] = {0, 0, 0}; // input keys - vtkm::Vec inputValues[inputLength]; - inputValues[0] = vtkm::make_Vec(13.1, 13.3, 13.5); - inputValues[1] = vtkm::make_Vec(-2.1, -2.3, -2.5); - inputValues[2] = vtkm::make_Vec(-1.0, -1.0, 1.0); // input keys - vtkm::Id expectedKeys[expectedLength] = { 0}; + const vtkm::Id inputLength = 3; + const vtkm::Id expectedLength = 1; + vtkm::Id inputKeys[inputLength] = { 0, 0, 0 }; // input keys + vtkm::Vec inputValues[inputLength]; + inputValues[0] = vtkm::make_Vec(13.1, 13.3, 13.5); + inputValues[1] = vtkm::make_Vec(-2.1, -2.3, -2.5); + inputValues[2] = vtkm::make_Vec(-1.0, -1.0, 1.0); // input keys + vtkm::Id expectedKeys[expectedLength] = { 0 }; - vtkm::Vec expectedValues[expectedLength]; - expectedValues[0] = vtkm::make_Vec(27.51, 30.59, -33.75); + vtkm::Vec expectedValues[expectedLength]; + expectedValues[0] = vtkm::make_Vec(27.51, 30.59, -33.75); - IdArrayHandle keys = vtkm::cont::make_ArrayHandle(inputKeys, inputLength); - vtkm::cont::ArrayHandle, StorageTag> values = vtkm::cont::make_ArrayHandle(inputValues, inputLength); + IdArrayHandle keys = vtkm::cont::make_ArrayHandle(inputKeys, inputLength); + vtkm::cont::ArrayHandle, StorageTag> values = + vtkm::cont::make_ArrayHandle(inputValues, inputLength); - IdArrayHandle keysOut; - vtkm::cont::ArrayHandle, StorageTag> valuesOut; - Algorithm::ReduceByKey( keys, - values, - keysOut, - valuesOut, - vtkm::Multiply() ); + IdArrayHandle keysOut; + vtkm::cont::ArrayHandle, StorageTag> valuesOut; + Algorithm::ReduceByKey(keys, values, keysOut, valuesOut, vtkm::Multiply()); - VTKM_TEST_ASSERT(keysOut.GetNumberOfValues() == expectedLength, - "Got wrong number of output keys"); + VTKM_TEST_ASSERT(keysOut.GetNumberOfValues() == expectedLength, + "Got wrong number of output keys"); - VTKM_TEST_ASSERT(valuesOut.GetNumberOfValues() == expectedLength, - "Got wrong number of output values"); + VTKM_TEST_ASSERT(valuesOut.GetNumberOfValues() == expectedLength, + "Got wrong number of output values"); - for(vtkm::Id i=0; i < expectedLength; ++i) + for (vtkm::Id i = 0; i < expectedLength; ++i) { - const vtkm::Id k = keysOut.GetPortalConstControl().Get(i); - const vtkm::Vec v = valuesOut.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT( expectedKeys[i] == k, "Incorrect reduced key"); - VTKM_TEST_ASSERT( expectedValues[i] == v, "Incorrect reduced vale"); - } + const vtkm::Id k = keysOut.GetPortalConstControl().Get(i); + const vtkm::Vec v = valuesOut.GetPortalConstControl().Get(i); + VTKM_TEST_ASSERT(expectedKeys[i] == k, "Incorrect reduced key"); + VTKM_TEST_ASSERT(expectedValues[i] == v, "Incorrect reduced vale"); } } + } - static VTKM_CONT void TestReduceByKeyWithFancyArrays() - { + static VTKM_CONT void TestReduceByKeyWithFancyArrays() + { std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing Reduce By Key with Fancy Arrays" << std::endl; - //lastly test with heterogeneous zip values ( vec3, and constant array handle), //and a custom reduce binary functor const vtkm::Id inputLength = 30; const vtkm::Id expectedLength = 10; typedef vtkm::Float32 ValueType; - vtkm::Id inputKeys[inputLength] = {0,0,0,1,1,1,2,2,2,3,3,3,4,4,4, - 5,5,5,6,6,6,7,7,7,8,8,8,9,9,9}; // input keys - ValueType inputValues1[inputLength] = {13.1f, -2.1f, -1.0f, - 13.1f, -2.1f, -1.0f, - 13.1f, -2.1f, -1.0f, - 13.1f, -2.1f, -1.0f, - 13.1f, -2.1f, -1.0f, - 13.1f, -2.1f, -1.0f, - 13.1f, -2.1f, -1.0f, - 13.1f, -2.1f, -1.0f, - 13.1f, -2.1f, -1.0f, - 13.1f, -2.1f, -1.0f}; // input values array1 - vtkm::Id expectedKeys[expectedLength] = {0,1,2,3,4,5,6,7,8,9}; - ValueType expectedValues1[expectedLength] = {10.f,10.f,10.f,10.f,10.f,10.f,10.f,10.f,10.f,10.f}; // output values 1 - ValueType expectedValues2[expectedLength] = {3.f,3.f,3.f,3.f,3.f,3.f,3.f,3.f,3.f,3.f}; // output values 2 + vtkm::Id inputKeys[inputLength] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, + 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9 }; // input keys + ValueType inputValues1[inputLength] = { + 13.1f, -2.1f, -1.0f, 13.1f, -2.1f, -1.0f, 13.1f, -2.1f, -1.0f, 13.1f, + -2.1f, -1.0f, 13.1f, -2.1f, -1.0f, 13.1f, -2.1f, -1.0f, 13.1f, -2.1f, + -1.0f, 13.1f, -2.1f, -1.0f, 13.1f, -2.1f, -1.0f, 13.1f, -2.1f, -1.0f + }; // input values array1 + vtkm::Id expectedKeys[expectedLength] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + ValueType expectedValues1[expectedLength] = { 10.f, 10.f, 10.f, 10.f, 10.f, + 10.f, 10.f, 10.f, 10.f, 10.f }; // output values 1 + ValueType expectedValues2[expectedLength] = { + 3.f, 3.f, 3.f, 3.f, 3.f, 3.f, 3.f, 3.f, 3.f, 3.f + }; // output values 2 IdArrayHandle keys = vtkm::cont::make_ArrayHandle(inputKeys, inputLength); typedef vtkm::cont::ArrayHandle ValueArrayType; @@ -1372,26 +1282,24 @@ private: ValueArrayType valuesOut2; vtkm::cont::ArrayHandleZip valuesOutZip(valuesOut1, valuesOut2); - Algorithm::ReduceByKey( keys, - valuesZip, - keysOut, - valuesOutZip, - vtkm::Add() ); + Algorithm::ReduceByKey(keys, valuesZip, keysOut, valuesOutZip, vtkm::Add()); VTKM_TEST_ASSERT(keysOut.GetNumberOfValues() == expectedLength, - "Got wrong number of output keys"); + "Got wrong number of output keys"); VTKM_TEST_ASSERT(valuesOutZip.GetNumberOfValues() == expectedLength, - "Got wrong number of output values"); + "Got wrong number of output values"); - for(vtkm::Id i=0; i < expectedLength; ++i) + for (vtkm::Id i = 0; i < expectedLength; ++i) { const vtkm::Id k = keysOut.GetPortalConstControl().Get(i); const vtkm::Pair v = valuesOutZip.GetPortalConstControl().Get(i); - std::cout << "key=" << k << "," << "expectedValues1[i] = " << expectedValues1[i] << "," << "computed value1 = " << v.first << std::endl; - VTKM_TEST_ASSERT( expectedKeys[i] == k, "Incorrect reduced key"); - VTKM_TEST_ASSERT( expectedValues1[i] == v.first, "Incorrect reduced value1"); - VTKM_TEST_ASSERT( expectedValues2[i] == v.second, "Incorrect reduced value2"); + std::cout << "key=" << k << "," + << "expectedValues1[i] = " << expectedValues1[i] << "," + << "computed value1 = " << v.first << std::endl; + VTKM_TEST_ASSERT(expectedKeys[i] == k, "Incorrect reduced key"); + VTKM_TEST_ASSERT(expectedValues1[i] == v.first, "Incorrect reduced value1"); + VTKM_TEST_ASSERT(expectedValues2[i] == v.second, "Incorrect reduced value2"); } } @@ -1401,8 +1309,8 @@ private: std::cout << "Testing Scan Inclusive By Key with 1 elements" << std::endl; const vtkm::Id inputLength = 1; - vtkm::Id inputKeys[inputLength] = {0}; - vtkm::Id inputValues[inputLength] = {5}; + vtkm::Id inputKeys[inputLength] = { 0 }; + vtkm::Id inputValues[inputLength] = { 5 }; const vtkm::Id expectedLength = 1; @@ -1417,7 +1325,6 @@ private: "Got wrong number of output values"); const vtkm::Id v = valuesOut.GetPortalConstControl().Get(0); VTKM_TEST_ASSERT(5 == v, "Incorrect scanned value"); - } static VTKM_CONT void TestScanInclusiveByKeyTwo() @@ -1426,11 +1333,11 @@ private: std::cout << "Testing Scan Exclusive By Key with 2 elements" << std::endl; const vtkm::Id inputLength = 2; - vtkm::Id inputKeys[inputLength] = {0, 1}; - vtkm::Id inputValues[inputLength] = {1, 1}; + vtkm::Id inputKeys[inputLength] = { 0, 1 }; + vtkm::Id inputValues[inputLength] = { 1, 1 }; const vtkm::Id expectedLength = 2; - vtkm::Id expectedValues[expectedLength] = {1, 1}; + vtkm::Id expectedValues[expectedLength] = { 1, 1 }; IdArrayHandle keys = vtkm::cont::make_ArrayHandle(inputKeys, inputLength); IdArrayHandle values = vtkm::cont::make_ArrayHandle(inputValues, inputLength); @@ -1441,7 +1348,8 @@ private: VTKM_TEST_ASSERT(valuesOut.GetNumberOfValues() == expectedLength, "Got wrong number of output values"); - for (vtkm::Id i = 0; i < expectedLength; i++) { + for (vtkm::Id i = 0; i < expectedLength; i++) + { const vtkm::Id v = valuesOut.GetPortalConstControl().Get(i); VTKM_TEST_ASSERT(expectedValues[static_cast(i)] == v, "Incorrect scanned value"); } @@ -1449,13 +1357,13 @@ private: static VTKM_CONT void TestScanInclusiveByKeyLarge() { std::cout << "-------------------------------------------" << std::endl; - std::cout << "Testing Scan Inclusive By Key with " - << ARRAY_SIZE << " elements" << std::endl; + std::cout << "Testing Scan Inclusive By Key with " << ARRAY_SIZE << " elements" << std::endl; const vtkm::Id inputLength = ARRAY_SIZE; std::vector inputKeys(inputLength); - for (vtkm::Id i = 0; i < ARRAY_SIZE; i++) { + for (vtkm::Id i = 0; i < ARRAY_SIZE; i++) + { if (i % 100 < 98) inputKeys[static_cast(i)] = static_cast(i / 100); else @@ -1465,7 +1373,8 @@ private: const vtkm::Id expectedLength = ARRAY_SIZE; std::vector expectedValues(expectedLength); - for (std::size_t i = 0; i < ARRAY_SIZE; i++) { + for (std::size_t i = 0; i < ARRAY_SIZE; i++) + { if (i % 100 < 98) expectedValues[i] = static_cast(1 + i % 100); else @@ -1481,7 +1390,8 @@ private: VTKM_TEST_ASSERT(valuesOut.GetNumberOfValues() == expectedLength, "Got wrong number of output values"); - for (auto i = 0; i < expectedLength; i++) { + for (auto i = 0; i < expectedLength; i++) + { const vtkm::Id v = valuesOut.GetPortalConstControl().Get(i); VTKM_TEST_ASSERT(expectedValues[static_cast(i)] == v, "Incorrect scanned value"); } @@ -1492,11 +1402,11 @@ private: std::cout << "Testing Scan Inclusive By Key" << std::endl; const vtkm::Id inputLength = 10; - vtkm::Id inputKeys[inputLength] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; - vtkm::Id inputValues[inputLength] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + vtkm::Id inputKeys[inputLength] = { 0, 0, 0, 1, 1, 2, 3, 3, 3, 3 }; + vtkm::Id inputValues[inputLength] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; const vtkm::Id expectedLength = 10; - vtkm::Id expectedValues[expectedLength] = {1, 2, 3, 1, 2, 1, 1, 2, 3, 4}; + vtkm::Id expectedValues[expectedLength] = { 1, 2, 3, 1, 2, 1, 1, 2, 3, 4 }; IdArrayHandle keys = vtkm::cont::make_ArrayHandle(inputKeys, inputLength); IdArrayHandle values = vtkm::cont::make_ArrayHandle(inputValues, inputLength); @@ -1506,11 +1416,11 @@ private: Algorithm::ScanInclusiveByKey(keys, values, valuesOut); VTKM_TEST_ASSERT(valuesOut.GetNumberOfValues() == expectedLength, "Got wrong number of output values"); - for (auto i = 0; i < expectedLength; i++) { + for (auto i = 0; i < expectedLength; i++) + { const vtkm::Id v = valuesOut.GetPortalConstControl().Get(i); VTKM_TEST_ASSERT(expectedValues[static_cast(i)] == v, "Incorrect scanned value"); } - } static VTKM_CONT void TestScanExclusiveByKeyOne() @@ -1519,8 +1429,8 @@ private: std::cout << "Testing Scan Exclusive By Key with 1 elements" << std::endl; const vtkm::Id inputLength = 1; - vtkm::Id inputKeys[inputLength] = {0}; - vtkm::Id inputValues[inputLength] = {0}; + vtkm::Id inputKeys[inputLength] = { 0 }; + vtkm::Id inputValues[inputLength] = { 0 }; vtkm::Id init = 5; const vtkm::Id expectedLength = 1; @@ -1536,7 +1446,6 @@ private: "Got wrong number of output values"); const vtkm::Id v = valuesOut.GetPortalConstControl().Get(0); VTKM_TEST_ASSERT(init == v, "Incorrect scanned value"); - } static VTKM_CONT void TestScanExclusiveByKeyTwo() @@ -1545,12 +1454,12 @@ private: std::cout << "Testing Scan Exclusive By Key with 2 elements" << std::endl; const vtkm::Id inputLength = 2; - vtkm::Id inputKeys[inputLength] = {0, 1}; - vtkm::Id inputValues[inputLength] = {1, 1}; + vtkm::Id inputKeys[inputLength] = { 0, 1 }; + vtkm::Id inputValues[inputLength] = { 1, 1 }; vtkm::Id init = 5; const vtkm::Id expectedLength = 2; - vtkm::Id expectedValues[expectedLength] = {5, 5}; + vtkm::Id expectedValues[expectedLength] = { 5, 5 }; IdArrayHandle keys = vtkm::cont::make_ArrayHandle(inputKeys, inputLength); IdArrayHandle values = vtkm::cont::make_ArrayHandle(inputValues, inputLength); @@ -1561,7 +1470,8 @@ private: VTKM_TEST_ASSERT(valuesOut.GetNumberOfValues() == expectedLength, "Got wrong number of output values"); - for (auto i = 0; i < expectedLength; i++) { + for (auto i = 0; i < expectedLength; i++) + { const vtkm::Id v = valuesOut.GetPortalConstControl().Get(i); VTKM_TEST_ASSERT(expectedValues[i] == v, "Incorrect scanned value"); } @@ -1570,12 +1480,12 @@ private: static VTKM_CONT void TestScanExclusiveByKeyLarge() { std::cout << "-------------------------------------------" << std::endl; - std::cout << "Testing Scan Exclusive By Key with " - << ARRAY_SIZE << " elements" << std::endl; + std::cout << "Testing Scan Exclusive By Key with " << ARRAY_SIZE << " elements" << std::endl; const vtkm::Id inputLength = ARRAY_SIZE; std::vector inputKeys(inputLength); - for (std::size_t i = 0; i < ARRAY_SIZE; i++) { + for (std::size_t i = 0; i < ARRAY_SIZE; i++) + { if (i % 100 < 98) inputKeys[i] = static_cast(i / 100); else @@ -1586,7 +1496,8 @@ private: const vtkm::Id expectedLength = ARRAY_SIZE; std::vector expectedValues(expectedLength); - for (vtkm::Id i = 0; i < ARRAY_SIZE; i++) { + for (vtkm::Id i = 0; i < ARRAY_SIZE; i++) + { if (i % 100 < 98) expectedValues[static_cast(i)] = static_cast(init + i % 100); else @@ -1602,7 +1513,8 @@ private: VTKM_TEST_ASSERT(valuesOut.GetNumberOfValues() == expectedLength, "Got wrong number of output values"); - for (vtkm::Id i = 0; i < expectedLength; i++) { + for (vtkm::Id i = 0; i < expectedLength; i++) + { const vtkm::Id v = valuesOut.GetPortalConstControl().Get(i); VTKM_TEST_ASSERT(expectedValues[static_cast(i)] == v, "Incorrect scanned value"); } @@ -1614,12 +1526,12 @@ private: std::cout << "Testing Scan Exclusive By Key" << std::endl; const vtkm::Id inputLength = 10; - vtkm::Id inputKeys[inputLength] = {0, 0, 0, 1, 1, 2, 3, 3, 3, 3}; - vtkm::Id inputValues[inputLength] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + vtkm::Id inputKeys[inputLength] = { 0, 0, 0, 1, 1, 2, 3, 3, 3, 3 }; + vtkm::Id inputValues[inputLength] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; vtkm::Id init = 5; const vtkm::Id expectedLength = 10; - vtkm::Id expectedValues[expectedLength] = {5, 6, 7, 5, 6, 5, 5, 6, 7, 8}; + vtkm::Id expectedValues[expectedLength] = { 5, 6, 7, 5, 6, 5, 5, 6, 7, 8 }; IdArrayHandle keys = vtkm::cont::make_ArrayHandle(inputKeys, inputLength); IdArrayHandle values = vtkm::cont::make_ArrayHandle(inputValues, inputLength); @@ -1630,7 +1542,8 @@ private: VTKM_TEST_ASSERT(valuesOut.GetNumberOfValues() == expectedLength, "Got wrong number of output values"); - for (vtkm::Id i= 0; i < expectedLength; i++) { + for (vtkm::Id i = 0; i < expectedLength; i++) + { const vtkm::Id v = valuesOut.GetPortalConstControl().Get(i); VTKM_TEST_ASSERT(expectedValues[static_cast(i)] == v, "Incorrect scanned value"); } @@ -1642,97 +1555,89 @@ private: std::cout << "Testing Inclusive Scan" << std::endl; { - std::cout << " size " << ARRAY_SIZE << std::endl; - //construct the index array - IdArrayHandle array; - Algorithm::Schedule( - ClearArrayKernel(array.PrepareForOutput(ARRAY_SIZE, - DeviceAdapterTag())), - ARRAY_SIZE); + std::cout << " size " << ARRAY_SIZE << std::endl; + //construct the index array + IdArrayHandle array; + Algorithm::Schedule(ClearArrayKernel(array.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); - //we know have an array whose sum is equal to OFFSET * ARRAY_SIZE, - //let's validate that - vtkm::Id sum = Algorithm::ScanInclusive(array, array); - VTKM_TEST_ASSERT(sum == OFFSET * ARRAY_SIZE, - "Got bad sum from Inclusive Scan"); + //we know have an array whose sum is equal to OFFSET * ARRAY_SIZE, + //let's validate that + vtkm::Id sum = Algorithm::ScanInclusive(array, array); + VTKM_TEST_ASSERT(sum == OFFSET * ARRAY_SIZE, "Got bad sum from Inclusive Scan"); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) - { - const vtkm::Id value = array.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(value == (i+1) * OFFSET, - "Incorrect partial sum"); - } + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) + { + const vtkm::Id value = array.GetPortalConstControl().Get(i); + VTKM_TEST_ASSERT(value == (i + 1) * OFFSET, "Incorrect partial sum"); + } - std::cout << " size 1" << std::endl; - array.Shrink(1); - sum = Algorithm::ScanInclusive(array, array); - VTKM_TEST_ASSERT(sum == OFFSET, "Incorrect partial sum"); - const vtkm::Id value = array.GetPortalConstControl().Get(0); - VTKM_TEST_ASSERT(value == OFFSET, "Incorrect partial sum"); + std::cout << " size 1" << std::endl; + array.Shrink(1); + sum = Algorithm::ScanInclusive(array, array); + VTKM_TEST_ASSERT(sum == OFFSET, "Incorrect partial sum"); + const vtkm::Id value = array.GetPortalConstControl().Get(0); + VTKM_TEST_ASSERT(value == OFFSET, "Incorrect partial sum"); - std::cout << " size 0" << std::endl; - array.Shrink(0); - sum = Algorithm::ScanInclusive(array, array); - VTKM_TEST_ASSERT(sum == 0, "Incorrect partial sum"); + std::cout << " size 0" << std::endl; + array.Shrink(0); + sum = Algorithm::ScanInclusive(array, array); + VTKM_TEST_ASSERT(sum == 0, "Incorrect partial sum"); } std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing Inclusive Scan with multiplication operator" << std::endl; { - std::vector inputValues(ARRAY_SIZE); - for (std::size_t i = 0; i < ARRAY_SIZE; ++i) - { - inputValues[i] = 1.01; - } + std::vector inputValues(ARRAY_SIZE); + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) + { + inputValues[i] = 1.01; + } - std::size_t mid = ARRAY_SIZE/2; - inputValues[mid] = 0.0; + std::size_t mid = ARRAY_SIZE / 2; + inputValues[mid] = 0.0; - vtkm::cont::ArrayHandle array = - vtkm::cont::make_ArrayHandle(&inputValues[0], ARRAY_SIZE); + vtkm::cont::ArrayHandle array = + vtkm::cont::make_ArrayHandle(&inputValues[0], ARRAY_SIZE); - vtkm::Float64 product = Algorithm::ScanInclusive(array, array, - vtkm::Multiply()); + vtkm::Float64 product = Algorithm::ScanInclusive(array, array, vtkm::Multiply()); - VTKM_TEST_ASSERT(product == 0.0f, "ScanInclusive product result not 0.0"); - for (std::size_t i = 0; i < mid; ++i) - { - vtkm::Id index = static_cast(i); - vtkm::Float64 expected = pow(1.01, static_cast(i + 1)); - vtkm::Float64 got = array.GetPortalConstControl().Get(index); - VTKM_TEST_ASSERT(test_equal(got, expected), - "Incorrect results for ScanInclusive"); - } - for (std::size_t i = mid; i < ARRAY_SIZE; ++i) - { - vtkm::Id index = static_cast(i); - VTKM_TEST_ASSERT(array.GetPortalConstControl().Get(index) == 0.0f, - "Incorrect results for ScanInclusive"); - } + VTKM_TEST_ASSERT(product == 0.0f, "ScanInclusive product result not 0.0"); + for (std::size_t i = 0; i < mid; ++i) + { + vtkm::Id index = static_cast(i); + vtkm::Float64 expected = pow(1.01, static_cast(i + 1)); + vtkm::Float64 got = array.GetPortalConstControl().Get(index); + VTKM_TEST_ASSERT(test_equal(got, expected), "Incorrect results for ScanInclusive"); + } + for (std::size_t i = mid; i < ARRAY_SIZE; ++i) + { + vtkm::Id index = static_cast(i); + VTKM_TEST_ASSERT(array.GetPortalConstControl().Get(index) == 0.0f, + "Incorrect results for ScanInclusive"); + } } std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing Inclusive Scan with a vtkm::Vec" << std::endl; { - typedef vtkm::Vec Vec3; - typedef vtkm::cont::ArrayHandle,StorageTag> - Vec3ArrayHandle; + typedef vtkm::Vec Vec3; + typedef vtkm::cont::ArrayHandle, StorageTag> Vec3ArrayHandle; - std::vector testValues(ARRAY_SIZE); + std::vector testValues(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i) - { - testValues[i] = TestValue(1, Vec3()); + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) + { + testValues[i] = TestValue(1, Vec3()); + } + Vec3ArrayHandle values = vtkm::cont::make_ArrayHandle(testValues); + + Vec3 sum = Algorithm::ScanInclusive(values, values); + std::cout << "Sum that was returned " << sum << std::endl; + VTKM_TEST_ASSERT(test_equal(sum, TestValue(1, Vec3()) * ARRAY_SIZE), + "Got bad sum from Inclusive Scan"); } - Vec3ArrayHandle values = vtkm::cont::make_ArrayHandle(testValues); - - Vec3 sum = Algorithm::ScanInclusive(values, values); - std::cout << "Sum that was returned " << sum << std::endl; - VTKM_TEST_ASSERT( test_equal(sum, TestValue(1, Vec3()) * ARRAY_SIZE ), - "Got bad sum from Inclusive Scan"); - } - } static VTKM_CONT void TestScanInclusiveWithComparisonObject() @@ -1742,25 +1647,19 @@ private: //construct the index array IdArrayHandle array; - Algorithm::Schedule( - ClearArrayKernel(array.PrepareForOutput(ARRAY_SIZE, - DeviceAdapterTag())), - ARRAY_SIZE); + Algorithm::Schedule(ClearArrayKernel(array.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); - Algorithm::Schedule( - AddArrayKernel(array.PrepareForOutput(ARRAY_SIZE, - DeviceAdapterTag())), - ARRAY_SIZE); + Algorithm::Schedule(AddArrayKernel(array.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); //we know have an array whose sum is equal to OFFSET * ARRAY_SIZE, //let's validate that IdArrayHandle result; - vtkm::Id sum = Algorithm::ScanInclusive(array, - result, - vtkm::Maximum()); - VTKM_TEST_ASSERT(sum == OFFSET + (ARRAY_SIZE-1), + vtkm::Id sum = Algorithm::ScanInclusive(array, result, vtkm::Maximum()); + VTKM_TEST_ASSERT(sum == OFFSET + (ARRAY_SIZE - 1), "Got bad sum from Inclusive Scan with comparison object"); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) { const vtkm::Id input_value = array.GetPortalConstControl().Get(i); const vtkm::Id result_value = result.GetPortalConstControl().Get(i); @@ -1768,19 +1667,16 @@ private: } //now try it inline - sum = Algorithm::ScanInclusive(array, - array, - vtkm::Maximum()); - VTKM_TEST_ASSERT(sum == OFFSET + (ARRAY_SIZE-1), + sum = Algorithm::ScanInclusive(array, array, vtkm::Maximum()); + VTKM_TEST_ASSERT(sum == OFFSET + (ARRAY_SIZE - 1), "Got bad sum from Inclusive Scan with comparison object"); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) { const vtkm::Id input_value = array.GetPortalConstControl().Get(i); const vtkm::Id result_value = result.GetPortalConstControl().Get(i); VTKM_TEST_ASSERT(input_value == result_value, "Incorrect partial sum"); } - } static VTKM_CONT void TestScanExclusive() @@ -1789,40 +1685,36 @@ private: std::cout << "Testing Exclusive Scan" << std::endl; { - std::cout << " size " << ARRAY_SIZE << std::endl; - //construct the index array - IdArrayHandle array; - Algorithm::Schedule( - ClearArrayKernel(array.PrepareForOutput(ARRAY_SIZE, - DeviceAdapterTag())), - ARRAY_SIZE); + std::cout << " size " << ARRAY_SIZE << std::endl; + //construct the index array + IdArrayHandle array; + Algorithm::Schedule(ClearArrayKernel(array.PrepareForOutput(ARRAY_SIZE, DeviceAdapterTag())), + ARRAY_SIZE); - // we know have an array whose sum = (OFFSET * ARRAY_SIZE), - // let's validate that - vtkm::Id sum = Algorithm::ScanExclusive(array, array); - std::cout << " Sum that was returned " << sum << std::endl; - VTKM_TEST_ASSERT(sum == (OFFSET * ARRAY_SIZE), - "Got bad sum from Exclusive Scan"); + // we know have an array whose sum = (OFFSET * ARRAY_SIZE), + // let's validate that + vtkm::Id sum = Algorithm::ScanExclusive(array, array); + std::cout << " Sum that was returned " << sum << std::endl; + VTKM_TEST_ASSERT(sum == (OFFSET * ARRAY_SIZE), "Got bad sum from Exclusive Scan"); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) - { - const vtkm::Id value = array.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(value == i * OFFSET, - "Incorrect partial sum"); - } + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) + { + const vtkm::Id value = array.GetPortalConstControl().Get(i); + VTKM_TEST_ASSERT(value == i * OFFSET, "Incorrect partial sum"); + } - std::cout << " size 1" << std::endl; - array.Shrink(1); - array.GetPortalControl().Set(0, OFFSET); - sum = Algorithm::ScanExclusive(array, array); - VTKM_TEST_ASSERT(sum == OFFSET, "Incorrect partial sum"); - const vtkm::Id value = array.GetPortalConstControl().Get(0); - VTKM_TEST_ASSERT(value == 0, "Incorrect partial sum"); + std::cout << " size 1" << std::endl; + array.Shrink(1); + array.GetPortalControl().Set(0, OFFSET); + sum = Algorithm::ScanExclusive(array, array); + VTKM_TEST_ASSERT(sum == OFFSET, "Incorrect partial sum"); + const vtkm::Id value = array.GetPortalConstControl().Get(0); + VTKM_TEST_ASSERT(value == 0, "Incorrect partial sum"); - std::cout << " size 0" << std::endl; - array.Shrink(0); - sum = Algorithm::ScanExclusive(array, array); - VTKM_TEST_ASSERT(sum == 0, "Incorrect partial sum"); + std::cout << " size 0" << std::endl; + array.Shrink(0); + sum = Algorithm::ScanExclusive(array, array); + VTKM_TEST_ASSERT(sum == 0, "Incorrect partial sum"); } // Enable when Exclusive Scan with custom operator is implemented for all @@ -1830,61 +1722,58 @@ private: std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing Exclusive Scan with multiplication operator" << std::endl; { - std::vector inputValues(ARRAY_SIZE); - for (std::size_t i = 0; i < ARRAY_SIZE; ++i) - { - inputValues[i] = 1.01; - } + std::vector inputValues(ARRAY_SIZE); + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) + { + inputValues[i] = 1.01; + } - std::size_t mid = ARRAY_SIZE/2; - inputValues[mid] = 0.0; + std::size_t mid = ARRAY_SIZE / 2; + inputValues[mid] = 0.0; - vtkm::cont::ArrayHandle array = vtkm::cont::make_ArrayHandle(inputValues); + vtkm::cont::ArrayHandle array = vtkm::cont::make_ArrayHandle(inputValues); - vtkm::Float64 initialValue = 2.00; - vtkm::Float64 product = Algorithm::ScanExclusive(array, array, - vtkm::Multiply(), initialValue); + vtkm::Float64 initialValue = 2.00; + vtkm::Float64 product = + Algorithm::ScanExclusive(array, array, vtkm::Multiply(), initialValue); - VTKM_TEST_ASSERT(product == 0.0f, "ScanExclusive product result not 0.0"); - VTKM_TEST_ASSERT(array.GetPortalConstControl().Get(0) == initialValue, - "ScanExclusive result's first value != initialValue"); - for (std::size_t i = 1; i <= mid; ++i) - { - vtkm::Id index = static_cast(i); - vtkm::Float64 expected = pow(1.01, static_cast(i)) * - initialValue; - vtkm::Float64 got = array.GetPortalConstControl().Get(index); - VTKM_TEST_ASSERT(test_equal(got, expected), - "Incorrect results for ScanExclusive"); - } - for (std::size_t i = mid + 1; i < ARRAY_SIZE; ++i) - { - vtkm::Id index = static_cast(i); - VTKM_TEST_ASSERT(array.GetPortalConstControl().Get(index) == 0.0f, - "Incorrect results for ScanExclusive"); - } + VTKM_TEST_ASSERT(product == 0.0f, "ScanExclusive product result not 0.0"); + VTKM_TEST_ASSERT(array.GetPortalConstControl().Get(0) == initialValue, + "ScanExclusive result's first value != initialValue"); + for (std::size_t i = 1; i <= mid; ++i) + { + vtkm::Id index = static_cast(i); + vtkm::Float64 expected = pow(1.01, static_cast(i)) * initialValue; + vtkm::Float64 got = array.GetPortalConstControl().Get(index); + VTKM_TEST_ASSERT(test_equal(got, expected), "Incorrect results for ScanExclusive"); + } + for (std::size_t i = mid + 1; i < ARRAY_SIZE; ++i) + { + vtkm::Id index = static_cast(i); + VTKM_TEST_ASSERT(array.GetPortalConstControl().Get(index) == 0.0f, + "Incorrect results for ScanExclusive"); + } } std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing Exclusive Scan with a vtkm::Vec" << std::endl; { - typedef vtkm::Vec Vec3; - typedef vtkm::cont::ArrayHandle,StorageTag> - Vec3ArrayHandle; + typedef vtkm::Vec Vec3; + typedef vtkm::cont::ArrayHandle, StorageTag> Vec3ArrayHandle; - std::vector testValues(ARRAY_SIZE); + std::vector testValues(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i) - { - testValues[i] = TestValue(1, Vec3()); - } - Vec3ArrayHandle values = vtkm::cont::make_ArrayHandle(testValues); + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) + { + testValues[i] = TestValue(1, Vec3()); + } + Vec3ArrayHandle values = vtkm::cont::make_ArrayHandle(testValues); - Vec3 sum = Algorithm::ScanExclusive(values, values); - std::cout << "Sum that was returned " << sum << std::endl; - VTKM_TEST_ASSERT( test_equal(sum, (TestValue(1, Vec3()) * ARRAY_SIZE) ), - "Got bad sum from Exclusive Scan"); + Vec3 sum = Algorithm::ScanExclusive(values, values); + std::cout << "Sum that was returned " << sum << std::endl; + VTKM_TEST_ASSERT(test_equal(sum, (TestValue(1, Vec3()) * ARRAY_SIZE)), + "Got bad sum from Exclusive Scan"); } } @@ -1899,13 +1788,12 @@ private: { Algorithm::Schedule(OneErrorKernel(), ARRAY_SIZE); } - catch (vtkm::cont::ErrorExecution &error) + catch (vtkm::cont::ErrorExecution& error) { std::cout << "Got expected error: " << error.GetMessage() << std::endl; message = error.GetMessage(); } - VTKM_TEST_ASSERT(message == ERROR_MESSAGE, - "Did not get expected error message."); + VTKM_TEST_ASSERT(message == ERROR_MESSAGE, "Did not get expected error message."); std::cout << "Generating lots of errors." << std::endl; message = ""; @@ -1913,32 +1801,37 @@ private: { Algorithm::Schedule(AllErrorKernel(), ARRAY_SIZE); } - catch (vtkm::cont::ErrorExecution &error) + catch (vtkm::cont::ErrorExecution& error) { std::cout << "Got expected error: " << error.GetMessage() << std::endl; message = error.GetMessage(); } - VTKM_TEST_ASSERT(message == ERROR_MESSAGE, - "Did not get expected error message."); + VTKM_TEST_ASSERT(message == ERROR_MESSAGE, "Did not get expected error message."); } - template - struct TestCopy {}; + template + struct TestCopy + { + }; template - struct TestCopy { - static T get(vtkm::Id i) { return static_cast(i); } + struct TestCopy + { + static T get(vtkm::Id i) { return static_cast(i); } }; template - struct TestCopy > { - static vtkm::Vec get(vtkm::Id i) { - vtkm::Vec temp; - for (int j=0; j( OFFSET+(i % 50) ); - } - return temp; + struct TestCopy> + { + static vtkm::Vec get(vtkm::Id i) + { + vtkm::Vec temp; + for (int j = 0; j < N; ++j) + { + temp[j] = static_cast(OFFSET + (i % 50)); } + return temp; + } }; template @@ -1949,177 +1842,173 @@ private: std::vector testData(COPY_ARRAY_SIZE); vtkm::Id index = 0; - for(std::size_t i=0; i < COPY_ARRAY_SIZE; ++i, ++index) + for (std::size_t i = 0; i < COPY_ARRAY_SIZE; ++i, ++index) { - testData[i]= TestCopy::get(index); + testData[i] = TestCopy::get(index); } - vtkm::cont::ArrayHandle input = vtkm::cont::make_ArrayHandle(&testData[0], - COPY_ARRAY_SIZE); + vtkm::cont::ArrayHandle input = vtkm::cont::make_ArrayHandle(&testData[0], COPY_ARRAY_SIZE); //make a deep copy of input and place it into temp { - vtkm::cont::ArrayHandle temp; - temp.Allocate( COPY_ARRAY_SIZE * 2 ); - Algorithm::Copy(input,temp); - VTKM_TEST_ASSERT(temp.GetNumberOfValues() == COPY_ARRAY_SIZE, - "Copy Needs to Resize Array"); + vtkm::cont::ArrayHandle temp; + temp.Allocate(COPY_ARRAY_SIZE * 2); + Algorithm::Copy(input, temp); + VTKM_TEST_ASSERT(temp.GetNumberOfValues() == COPY_ARRAY_SIZE, "Copy Needs to Resize Array"); - typename std::vector::const_iterator c = testData.begin(); - for(vtkm::Id i=0; i < COPY_ARRAY_SIZE; i+=50,c+=50) - { - T value = temp.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(value == *c, "Got bad value (Copy)"); - } + typename std::vector::const_iterator c = testData.begin(); + for (vtkm::Id i = 0; i < COPY_ARRAY_SIZE; i += 50, c += 50) + { + T value = temp.GetPortalConstControl().Get(i); + VTKM_TEST_ASSERT(value == *c, "Got bad value (Copy)"); + } } //Verify copy of empty array works { - vtkm::cont::ArrayHandle tempIn; - vtkm::cont::ArrayHandle tempOut; + vtkm::cont::ArrayHandle tempIn; + vtkm::cont::ArrayHandle tempOut; - tempOut.Allocate(COPY_ARRAY_SIZE); - Algorithm::Copy(tempIn, tempOut); - VTKM_TEST_ASSERT(tempIn.GetNumberOfValues() == tempOut.GetNumberOfValues(), - "Copy sized wrong"); + tempOut.Allocate(COPY_ARRAY_SIZE); + Algorithm::Copy(tempIn, tempOut); + VTKM_TEST_ASSERT(tempIn.GetNumberOfValues() == tempOut.GetNumberOfValues(), + "Copy sized wrong"); - // Actually allocate input array to 0 in case that makes a difference. - tempIn.Allocate(0); - tempOut.Allocate(COPY_ARRAY_SIZE); - Algorithm::Copy(tempIn, tempOut); - VTKM_TEST_ASSERT(tempIn.GetNumberOfValues() == tempOut.GetNumberOfValues(), - "Copy sized wrong"); + // Actually allocate input array to 0 in case that makes a difference. + tempIn.Allocate(0); + tempOut.Allocate(COPY_ARRAY_SIZE); + Algorithm::Copy(tempIn, tempOut); + VTKM_TEST_ASSERT(tempIn.GetNumberOfValues() == tempOut.GetNumberOfValues(), + "Copy sized wrong"); } //CopySubRange tests: //1. Verify invalid input start position fails { - vtkm::cont::ArrayHandle output; - bool result = Algorithm::CopySubRange(input, COPY_ARRAY_SIZE*4, 1, output); - VTKM_TEST_ASSERT(result == false, "CopySubRange when given bad input offset"); + vtkm::cont::ArrayHandle output; + bool result = Algorithm::CopySubRange(input, COPY_ARRAY_SIZE * 4, 1, output); + VTKM_TEST_ASSERT(result == false, "CopySubRange when given bad input offset"); } //2. Verify unallocated output gets allocated { - vtkm::cont::ArrayHandle output; - bool result = Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output); - VTKM_TEST_ASSERT(result == true, "CopySubRange should succeed"); - VTKM_TEST_ASSERT(output.GetNumberOfValues() == COPY_ARRAY_SIZE, - "CopySubRange needs to allocate output"); + vtkm::cont::ArrayHandle output; + bool result = Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output); + VTKM_TEST_ASSERT(result == true, "CopySubRange should succeed"); + VTKM_TEST_ASSERT(output.GetNumberOfValues() == COPY_ARRAY_SIZE, + "CopySubRange needs to allocate output"); } //3. Verify under allocated output gets resized properly { - vtkm::cont::ArrayHandle output; - output.Allocate(2); - bool result = Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output); - VTKM_TEST_ASSERT(result == true, "CopySubRange should succeed"); - VTKM_TEST_ASSERT(output.GetNumberOfValues() == COPY_ARRAY_SIZE, - "CopySubRange needs to re-allocate output"); + vtkm::cont::ArrayHandle output; + output.Allocate(2); + bool result = Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output); + VTKM_TEST_ASSERT(result == true, "CopySubRange should succeed"); + VTKM_TEST_ASSERT(output.GetNumberOfValues() == COPY_ARRAY_SIZE, + "CopySubRange needs to re-allocate output"); } //4. Verify invalid input length gets shortened { - vtkm::cont::ArrayHandle output; - bool result = Algorithm::CopySubRange(input, 100, COPY_ARRAY_SIZE, output); - VTKM_TEST_ASSERT(result == true, "CopySubRange needs to shorten input range"); - VTKM_TEST_ASSERT(output.GetNumberOfValues() == (COPY_ARRAY_SIZE-100), - "CopySubRange needs to shorten input range"); + vtkm::cont::ArrayHandle output; + bool result = Algorithm::CopySubRange(input, 100, COPY_ARRAY_SIZE, output); + VTKM_TEST_ASSERT(result == true, "CopySubRange needs to shorten input range"); + VTKM_TEST_ASSERT(output.GetNumberOfValues() == (COPY_ARRAY_SIZE - 100), + "CopySubRange needs to shorten input range"); - typename std::vector::const_iterator c = testData.begin() + 100; - for(vtkm::Id i=0; i < (COPY_ARRAY_SIZE-100); i+=100,c+=100) - { - T value = output.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(value == *c, "Got bad value (CopySubRange 2)"); - - } + typename std::vector::const_iterator c = testData.begin() + 100; + for (vtkm::Id i = 0; i < (COPY_ARRAY_SIZE - 100); i += 100, c += 100) + { + T value = output.GetPortalConstControl().Get(i); + VTKM_TEST_ASSERT(value == *c, "Got bad value (CopySubRange 2)"); + } } //5. Verify sub range copy works when copying into a larger output { - vtkm::cont::ArrayHandle output; - output.Allocate( COPY_ARRAY_SIZE * 2 ); - Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output); - Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output, COPY_ARRAY_SIZE); - VTKM_TEST_ASSERT(output.GetNumberOfValues() == (COPY_ARRAY_SIZE*2), - "CopySubRange needs to not resize array"); + vtkm::cont::ArrayHandle output; + output.Allocate(COPY_ARRAY_SIZE * 2); + Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output); + Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output, COPY_ARRAY_SIZE); + VTKM_TEST_ASSERT(output.GetNumberOfValues() == (COPY_ARRAY_SIZE * 2), + "CopySubRange needs to not resize array"); - typename std::vector::const_iterator c = testData.begin(); - for(vtkm::Id i=0; i < COPY_ARRAY_SIZE; i+=50,c+=50) - { - T value = output.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(value == *c, "Got bad value (CopySubRange 5)"); - value = output.GetPortalConstControl().Get(COPY_ARRAY_SIZE + i); - VTKM_TEST_ASSERT(value == *c, "Got bad value (CopySubRange 5)"); - } + typename std::vector::const_iterator c = testData.begin(); + for (vtkm::Id i = 0; i < COPY_ARRAY_SIZE; i += 50, c += 50) + { + T value = output.GetPortalConstControl().Get(i); + VTKM_TEST_ASSERT(value == *c, "Got bad value (CopySubRange 5)"); + value = output.GetPortalConstControl().Get(COPY_ARRAY_SIZE + i); + VTKM_TEST_ASSERT(value == *c, "Got bad value (CopySubRange 5)"); + } } //6. Verify that whey sub range needs to reallocate the output it // properly copies the original data instead of clearing it { - vtkm::cont::ArrayHandle output; - output.Allocate( COPY_ARRAY_SIZE ); - Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output); - Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output, COPY_ARRAY_SIZE); - VTKM_TEST_ASSERT(output.GetNumberOfValues() == (COPY_ARRAY_SIZE*2), - "CopySubRange needs too resize Array"); - typename std::vector::const_iterator c = testData.begin(); - for(vtkm::Id i=0; i < COPY_ARRAY_SIZE; i+=50,c+=50) - { - T value = output.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(value == *c, "Got bad value (CopySubRange 6)"); - value = output.GetPortalConstControl().Get(COPY_ARRAY_SIZE + i); - VTKM_TEST_ASSERT(value == *c, "Got bad value (CopySubRange 6)"); - } + vtkm::cont::ArrayHandle output; + output.Allocate(COPY_ARRAY_SIZE); + Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output); + Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output, COPY_ARRAY_SIZE); + VTKM_TEST_ASSERT(output.GetNumberOfValues() == (COPY_ARRAY_SIZE * 2), + "CopySubRange needs too resize Array"); + typename std::vector::const_iterator c = testData.begin(); + for (vtkm::Id i = 0; i < COPY_ARRAY_SIZE; i += 50, c += 50) + { + T value = output.GetPortalConstControl().Get(i); + VTKM_TEST_ASSERT(value == *c, "Got bad value (CopySubRange 6)"); + value = output.GetPortalConstControl().Get(COPY_ARRAY_SIZE + i); + VTKM_TEST_ASSERT(value == *c, "Got bad value (CopySubRange 6)"); + } } { - vtkm::cont::ArrayHandle output; + vtkm::cont::ArrayHandle output; - //7. Verify negative input index returns false - bool result = Algorithm::CopySubRange(input, -1, COPY_ARRAY_SIZE, output); - VTKM_TEST_ASSERT(result == false, "CopySubRange negative index should fail"); + //7. Verify negative input index returns false + bool result = Algorithm::CopySubRange(input, -1, COPY_ARRAY_SIZE, output); + VTKM_TEST_ASSERT(result == false, "CopySubRange negative index should fail"); - //8. Verify negative input numberOfElementsToCopy returns false - result = Algorithm::CopySubRange(input, 0, -COPY_ARRAY_SIZE, output); - VTKM_TEST_ASSERT(result == false, "CopySubRange negative number elements should fail"); + //8. Verify negative input numberOfElementsToCopy returns false + result = Algorithm::CopySubRange(input, 0, -COPY_ARRAY_SIZE, output); + VTKM_TEST_ASSERT(result == false, "CopySubRange negative number elements should fail"); - //9. Verify negative output index return false - result = Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output, -2); - VTKM_TEST_ASSERT(result == false, "CopySubRange negative output index should fail"); + //9. Verify negative output index return false + result = Algorithm::CopySubRange(input, 0, COPY_ARRAY_SIZE, output, -2); + VTKM_TEST_ASSERT(result == false, "CopySubRange negative output index should fail"); } #undef COPY_ARRAY_SIZE - } static VTKM_CONT void TestCopyArraysMany() { - std::cout << "-------------------------------------------------" << std::endl; - std::cout << "Testing Copy to same array type" << std::endl; - TestCopyArrays< vtkm::Vec >(); - TestCopyArrays< vtkm::Vec >(); - // - TestCopyArrays< vtkm::Vec >(); - TestCopyArrays< vtkm::Vec >(); - TestCopyArrays< vtkm::Vec >(); - TestCopyArrays< vtkm::Vec >(); - // - TestCopyArrays< vtkm::Float32 >(); - TestCopyArrays< vtkm::Float64 >(); - // - TestCopyArrays< vtkm::Int8 >(); - TestCopyArrays< vtkm::Int16 >(); - TestCopyArrays< vtkm::Int32 >(); - TestCopyArrays< vtkm::Int64 >(); - // - TestCopyArrays< vtkm::UInt8 >(); - TestCopyArrays< vtkm::UInt16 >(); - TestCopyArrays< vtkm::UInt32 >(); - TestCopyArrays< vtkm::UInt64 >(); - // - TestCopyArrays(); + std::cout << "-------------------------------------------------" << std::endl; + std::cout << "Testing Copy to same array type" << std::endl; + TestCopyArrays>(); + TestCopyArrays>(); + // + TestCopyArrays>(); + TestCopyArrays>(); + TestCopyArrays>(); + TestCopyArrays>(); + // + TestCopyArrays(); + TestCopyArrays(); + // + TestCopyArrays(); + TestCopyArrays(); + TestCopyArrays(); + TestCopyArrays(); + // + TestCopyArrays(); + TestCopyArrays(); + TestCopyArrays(); + TestCopyArrays(); + // + TestCopyArrays(); } static VTKM_CONT void TestCopyArraysInDiffTypes() @@ -2127,25 +2016,23 @@ private: std::cout << "-------------------------------------------------" << std::endl; std::cout << "Testing Copy to a different array type" << std::endl; std::vector testData(ARRAY_SIZE); - for(std::size_t i=0; i < ARRAY_SIZE; ++i) + for (std::size_t i = 0; i < ARRAY_SIZE; ++i) { - testData[i]= static_cast(OFFSET+(i % 50)); + testData[i] = static_cast(OFFSET + (i % 50)); } IdArrayHandle input = vtkm::cont::make_ArrayHandle(testData); //make a deep copy of input and place it into temp vtkm::cont::ArrayHandle temp; - Algorithm::Copy(input,temp); + Algorithm::Copy(input, temp); std::vector::const_iterator c = testData.begin(); - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i, ++c) + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i, ++c) { vtkm::Float64 value = temp.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(value == static_cast(*c), - "Got bad value (Copy)"); + VTKM_TEST_ASSERT(value == static_cast(*c), "Got bad value (Copy)"); } - } static VTKM_CONT void TestAtomicArray() @@ -2154,63 +2041,66 @@ private: vtkm::Int32 SHORT_ARRAY_SIZE = 10000; vtkm::Int32 atomicCount = 0; - for(vtkm::Int32 i = 0; i < SHORT_ARRAY_SIZE; i++) atomicCount += i; + for (vtkm::Int32 i = 0; i < SHORT_ARRAY_SIZE; i++) + atomicCount += i; std::cout << "-------------------------------------------" << std::endl; // To test the atomics, SHORT_ARRAY_SIZE number of threads will all increment // a single atomic value. std::cout << "Testing Atomic Add with vtkm::Int32" << std::endl; { - std::vector singleElement; - singleElement.push_back(0); - vtkm::cont::ArrayHandle atomicElement = vtkm::cont::make_ArrayHandle(singleElement); + std::vector singleElement; + singleElement.push_back(0); + vtkm::cont::ArrayHandle atomicElement = + vtkm::cont::make_ArrayHandle(singleElement); - vtkm::exec::AtomicArray atomic(atomicElement); - Algorithm::Schedule(AtomicKernel(atomic), SHORT_ARRAY_SIZE); - vtkm::Int32 expected = vtkm::Int32(atomicCount); - vtkm::Int32 actual= atomicElement.GetPortalControl().Get(0); - VTKM_TEST_ASSERT(expected == actual, "Did not get expected value: Atomic add Int32"); + vtkm::exec::AtomicArray atomic(atomicElement); + Algorithm::Schedule(AtomicKernel(atomic), SHORT_ARRAY_SIZE); + vtkm::Int32 expected = vtkm::Int32(atomicCount); + vtkm::Int32 actual = atomicElement.GetPortalControl().Get(0); + VTKM_TEST_ASSERT(expected == actual, "Did not get expected value: Atomic add Int32"); } std::cout << "Testing Atomic Add with vtkm::Int64" << std::endl; { - std::vector singleElement; - singleElement.push_back(0); - vtkm::cont::ArrayHandle atomicElement = vtkm::cont::make_ArrayHandle(singleElement); + std::vector singleElement; + singleElement.push_back(0); + vtkm::cont::ArrayHandle atomicElement = + vtkm::cont::make_ArrayHandle(singleElement); - vtkm::exec::AtomicArray atomic(atomicElement); - Algorithm::Schedule(AtomicKernel(atomic), SHORT_ARRAY_SIZE); - vtkm::Int64 expected = vtkm::Int64(atomicCount); - vtkm::Int64 actual= atomicElement.GetPortalControl().Get(0); - VTKM_TEST_ASSERT(expected == actual, "Did not get expected value: Atomic add Int64"); + vtkm::exec::AtomicArray atomic(atomicElement); + Algorithm::Schedule(AtomicKernel(atomic), SHORT_ARRAY_SIZE); + vtkm::Int64 expected = vtkm::Int64(atomicCount); + vtkm::Int64 actual = atomicElement.GetPortalControl().Get(0); + VTKM_TEST_ASSERT(expected == actual, "Did not get expected value: Atomic add Int64"); } std::cout << "Testing Atomic CAS with vtkm::Int32" << std::endl; { - std::vector singleElement; - singleElement.push_back(0); - vtkm::cont::ArrayHandle atomicElement = vtkm::cont::make_ArrayHandle(singleElement); + std::vector singleElement; + singleElement.push_back(0); + vtkm::cont::ArrayHandle atomicElement = + vtkm::cont::make_ArrayHandle(singleElement); - vtkm::exec::AtomicArray atomic(atomicElement); - Algorithm::Schedule(AtomicCASKernel(atomic), SHORT_ARRAY_SIZE); - vtkm::Int32 expected = vtkm::Int32(atomicCount); - vtkm::Int32 actual= atomicElement.GetPortalControl().Get(0); - VTKM_TEST_ASSERT(expected == actual, "Did not get expected value: Atomic CAS Int32"); + vtkm::exec::AtomicArray atomic(atomicElement); + Algorithm::Schedule(AtomicCASKernel(atomic), SHORT_ARRAY_SIZE); + vtkm::Int32 expected = vtkm::Int32(atomicCount); + vtkm::Int32 actual = atomicElement.GetPortalControl().Get(0); + VTKM_TEST_ASSERT(expected == actual, "Did not get expected value: Atomic CAS Int32"); } std::cout << "Testing Atomic CAS with vtkm::Int64" << std::endl; { - std::vector singleElement; - singleElement.push_back(0); - vtkm::cont::ArrayHandle atomicElement = vtkm::cont::make_ArrayHandle(singleElement); + std::vector singleElement; + singleElement.push_back(0); + vtkm::cont::ArrayHandle atomicElement = + vtkm::cont::make_ArrayHandle(singleElement); - vtkm::exec::AtomicArray atomic(atomicElement); - Algorithm::Schedule(AtomicCASKernel(atomic), SHORT_ARRAY_SIZE); - vtkm::Int64 expected = vtkm::Int64(atomicCount); - vtkm::Int64 actual= atomicElement.GetPortalControl().Get(0); - VTKM_TEST_ASSERT(expected == actual, "Did not get expected value: Atomic CAS Int64"); + vtkm::exec::AtomicArray atomic(atomicElement); + Algorithm::Schedule(AtomicCASKernel(atomic), SHORT_ARRAY_SIZE); + vtkm::Int64 expected = vtkm::Int64(atomicCount); + vtkm::Int64 actual = atomicElement.GetPortalControl().Get(0); + VTKM_TEST_ASSERT(expected == actual, "Did not get expected value: Atomic CAS Int64"); } - - } struct TestAll @@ -2271,22 +2161,17 @@ private: }; public: - /// Run a suite of tests to check to see if a DeviceAdapter properly supports /// all members and classes required for driving vtkm algorithms. Returns an /// error code that can be returned from the main function of a test. /// - static VTKM_CONT int Run() - { - return vtkm::cont::testing::Testing::Run(TestAll()); - } + static VTKM_CONT int Run() { return vtkm::cont::testing::Testing::Run(TestAll()); } }; #undef ERROR_MESSAGE #undef ARRAY_SIZE #undef OFFSET #undef DIM - } } } // namespace vtkm::cont::testing diff --git a/vtkm/cont/testing/TestingFancyArrayHandles.h b/vtkm/cont/testing/TestingFancyArrayHandles.h index 0b4cabe55..5145daec7 100644 --- a/vtkm/cont/testing/TestingFancyArrayHandles.h +++ b/vtkm/cont/testing/TestingFancyArrayHandles.h @@ -48,37 +48,41 @@ namespace fancy_array_detail { -template +template struct IndexSquared { VTKM_EXEC_CONT ValueType operator()(vtkm::Id index) const { typedef typename vtkm::VecTraits::ComponentType ComponentType; - return ValueType( static_cast(index*index) ); + return ValueType(static_cast(index * index)); } }; -template +template struct ValueSquared { - template - VTKM_EXEC_CONT - ValueType operator()(U u) const - { return vtkm::dot(u, u); } + template + VTKM_EXEC_CONT ValueType operator()(U u) const + { + return vtkm::dot(u, u); + } }; struct ValueScale { - ValueScale() : Factor() - { } + ValueScale() + : Factor() + { + } - ValueScale(vtkm::Float64 factor) : Factor(factor) - { } + ValueScale(vtkm::Float64 factor) + : Factor(factor) + { + } - template - VTKM_EXEC_CONT - ValueType operator()(const ValueType &v) const + template + VTKM_EXEC_CONT ValueType operator()(const ValueType& v) const { typedef vtkm::VecTraits Traits; typedef typename Traits::ComponentType ComponentType; @@ -96,17 +100,19 @@ struct ValueScale private: vtkm::Float64 Factor; }; - } -namespace vtkm { -namespace cont { -namespace testing { +namespace vtkm +{ +namespace cont +{ +namespace testing +{ /// This class has a single static member, Run, that tests that all Fancy Array /// Handles work with the given DeviceAdapter /// -template +template struct TestingFancyArrayHandles { @@ -119,11 +125,11 @@ public: typedef void ControlSignature(FieldIn<>, FieldOut<>); typedef _2 ExecutionSignature(_1); - template - VTKM_EXEC - ValueType operator()(const ValueType &inValue) const - { return inValue; } - + template + VTKM_EXEC ValueType operator()(const ValueType& inValue) const + { + return inValue; + } }; struct InplaceFunctorPair : public vtkm::worklet::WorkletMapField @@ -131,76 +137,68 @@ public: typedef void ControlSignature(FieldInOut<>); typedef void ExecutionSignature(_1); - template - VTKM_EXEC - void operator()(vtkm::Pair &value) const + template + VTKM_EXEC void operator()(vtkm::Pair& value) const { value.second = value.first; } }; - #ifndef VTKM_CUDA private: #endif struct TestCompositeAsInput { - template< typename ValueType > + template VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const { //hard-coded to make a vtkm::Vec composite vector //for each ValueType. typedef typename vtkm::cont::ArrayHandleCompositeVectorType< - vtkm::cont::ArrayHandle< ValueType >, - vtkm::cont::ArrayHandle< ValueType >, - vtkm::cont::ArrayHandle< ValueType > >::type CompositeHandleType; + vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle>::type CompositeHandleType; const ValueType value = TestValue(13, ValueType()); - std::vector< ValueType > compositeData( ARRAY_SIZE, value ); - vtkm::cont::ArrayHandle< ValueType > compositeInput = - vtkm::cont::make_ArrayHandle(compositeData); + std::vector compositeData(ARRAY_SIZE, value); + vtkm::cont::ArrayHandle compositeInput = + vtkm::cont::make_ArrayHandle(compositeData); - CompositeHandleType composite = - vtkm::cont::make_ArrayHandleCompositeVector(compositeInput, 0, - compositeInput, 1, - compositeInput, 2); + CompositeHandleType composite = vtkm::cont::make_ArrayHandleCompositeVector( + compositeInput, 0, compositeInput, 1, compositeInput, 2); vtkm::cont::printSummary_ArrayHandle(composite, std::cout); std::cout << std::endl; - vtkm::cont::ArrayHandle< vtkm::Vec > result; + vtkm::cont::ArrayHandle> result; vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(composite, result); //verify that the control portal works - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) - { - const vtkm::Vec result_v = - result.GetPortalConstControl().Get(i); + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) + { + const vtkm::Vec result_v = result.GetPortalConstControl().Get(i); VTKM_TEST_ASSERT(test_equal(result_v, vtkm::Vec(value)), - "CompositeVector Handle Failed"); + "CompositeVector Handle Failed"); - const vtkm::Vec result_c = - composite.GetPortalConstControl().Get(i); + const vtkm::Vec result_c = composite.GetPortalConstControl().Get(i); VTKM_TEST_ASSERT(test_equal(result_c, vtkm::Vec(value)), - "CompositeVector Handle Failed"); - } + "CompositeVector Handle Failed"); + } } }; - struct TestConstantAsInput { - template< typename ValueType > + template VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const { const ValueType value = TestValue(43, ValueType()); vtkm::cont::ArrayHandleConstant constant = - vtkm::cont::make_ArrayHandleConstant(value, ARRAY_SIZE); + vtkm::cont::make_ArrayHandleConstant(value, ARRAY_SIZE); vtkm::cont::ArrayHandle result; vtkm::worklet::DispatcherMapField dispatcher; @@ -210,21 +208,19 @@ private: std::cout << std::endl; //verify that the control portal works - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) - { + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) + { const ValueType result_v = result.GetPortalConstControl().Get(i); const ValueType control_value = constant.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(test_equal(result_v, value), - "Counting Handle Failed"); - VTKM_TEST_ASSERT(test_equal(result_v, control_value), - "Counting Handle Control Failed"); - } + VTKM_TEST_ASSERT(test_equal(result_v, value), "Counting Handle Failed"); + VTKM_TEST_ASSERT(test_equal(result_v, control_value), "Counting Handle Control Failed"); + } } }; struct TestCountingAsInput { - template< typename ValueType > + template VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const { typedef typename vtkm::VecTraits::ComponentType ComponentType; @@ -236,68 +232,64 @@ private: ComponentType component_value(0); const ValueType start = ValueType(component_value); - vtkm::cont::ArrayHandleCounting< ValueType > counting = - vtkm::cont::make_ArrayHandleCounting(start, ValueType(1), length); - vtkm::cont::ArrayHandle< ValueType > result; + vtkm::cont::ArrayHandleCounting counting = + vtkm::cont::make_ArrayHandleCounting(start, ValueType(1), length); + vtkm::cont::ArrayHandle result; - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(counting, result); vtkm::cont::printSummary_ArrayHandle(counting, std::cout); std::cout << std::endl; //verify that the control portal works - for(vtkm::Id i=0; i < length; ++i) - { + for (vtkm::Id i = 0; i < length; ++i) + { const ValueType result_v = result.GetPortalConstControl().Get(i); const ValueType correct_value = ValueType(component_value); const ValueType control_value = counting.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(test_equal(result_v, correct_value), - "Counting Handle Failed"); - VTKM_TEST_ASSERT(test_equal(result_v, control_value), - "Counting Handle Control Failed"); + VTKM_TEST_ASSERT(test_equal(result_v, correct_value), "Counting Handle Failed"); + VTKM_TEST_ASSERT(test_equal(result_v, control_value), "Counting Handle Control Failed"); component_value = ComponentType(component_value + ComponentType(1)); - } + } } }; struct TestImplicitAsInput { - template< typename ValueType> + template VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const { const vtkm::Id length = ARRAY_SIZE; typedef ::fancy_array_detail::IndexSquared FunctorType; FunctorType functor; - vtkm::cont::ArrayHandleImplicit< ValueType, FunctorType > implicit = - vtkm::cont::make_ArrayHandleImplicit(functor, length); + vtkm::cont::ArrayHandleImplicit implicit = + vtkm::cont::make_ArrayHandleImplicit(functor, length); vtkm::cont::printSummary_ArrayHandle(implicit, std::cout); std::cout << std::endl; - vtkm::cont::ArrayHandle< ValueType > result; + vtkm::cont::ArrayHandle result; - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(implicit, result); //verify that the control portal works - for(vtkm::Id i=0; i < length; ++i) - { + for (vtkm::Id i = 0; i < length; ++i) + { const ValueType result_v = result.GetPortalConstControl().Get(i); - const ValueType correct_value = functor( i ); + const ValueType correct_value = functor(i); const ValueType control_value = implicit.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(test_equal(result_v, correct_value), - "Implicit Handle Failed"); - VTKM_TEST_ASSERT(test_equal(result_v, control_value) - , "Implicit Handle Failed"); - } + VTKM_TEST_ASSERT(test_equal(result_v, correct_value), "Implicit Handle Failed"); + VTKM_TEST_ASSERT(test_equal(result_v, control_value), "Implicit Handle Failed"); + } } }; struct TestConcatenateAsInput { - template< typename ValueType> + template VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const { const vtkm::Id length = ARRAY_SIZE; @@ -305,52 +297,48 @@ private: typedef ::fancy_array_detail::IndexSquared FunctorType; typedef typename vtkm::VecTraits::ComponentType ComponentType; - typedef vtkm::cont::ArrayHandleImplicit< ValueType, - FunctorType > ValueHandleType; - typedef vtkm::cont::ArrayHandle< ValueType > BasicArrayType; - typedef vtkm::cont::ArrayHandleConcatenate< ValueHandleType, BasicArrayType > - ConcatenateType; + typedef vtkm::cont::ArrayHandleImplicit ValueHandleType; + typedef vtkm::cont::ArrayHandle BasicArrayType; + typedef vtkm::cont::ArrayHandleConcatenate ConcatenateType; FunctorType functor; - for( vtkm::Id start_pos = 0; start_pos < length; start_pos+=length/4) + for (vtkm::Id start_pos = 0; start_pos < length; start_pos += length / 4) { vtkm::Id implicitLen = length - start_pos; - vtkm::Id basicLen = start_pos; + vtkm::Id basicLen = start_pos; // make an implicit array ValueHandleType implicit = - vtkm::cont::make_ArrayHandleImplicit(functor, - implicitLen); + vtkm::cont::make_ArrayHandleImplicit(functor, implicitLen); // make a basic array - std::vector< ValueType > basicVec; - for( vtkm::Id i = 0; i < basicLen; i++ ) + std::vector basicVec; + for (vtkm::Id i = 0; i < basicLen; i++) { - basicVec.push_back( ValueType( static_cast(i))); - basicVec.push_back( ValueType( ComponentType(i) )); + basicVec.push_back(ValueType(static_cast(i))); + basicVec.push_back(ValueType(ComponentType(i))); } - BasicArrayType basic = vtkm::cont::make_ArrayHandle( basicVec ); + BasicArrayType basic = vtkm::cont::make_ArrayHandle(basicVec); // concatenate two arrays together - ConcatenateType concatenate = vtkm::cont::make_ArrayHandleConcatenate - ( implicit, basic ); + ConcatenateType concatenate = vtkm::cont::make_ArrayHandleConcatenate(implicit, basic); vtkm::cont::printSummary_ArrayHandle(concatenate, std::cout); std::cout << std::endl; - vtkm::cont::ArrayHandle< ValueType > result; + vtkm::cont::ArrayHandle result; - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(concatenate, result); //verify that the control portal works - for(vtkm::Id i=0; i < length; ++i) + for (vtkm::Id i = 0; i < length; ++i) { - const ValueType result_v = result.GetPortalConstControl().Get( i ); + const ValueType result_v = result.GetPortalConstControl().Get(i); ValueType correct_value; - if( i < implicitLen ) - correct_value = implicit.GetPortalConstControl().Get( i ); + if (i < implicitLen) + correct_value = implicit.GetPortalConstControl().Get(i); else - correct_value = basic.GetPortalConstControl().Get( i - implicitLen ); - const ValueType control_value = concatenate.GetPortalConstControl().Get( i ); + correct_value = basic.GetPortalConstControl().Get(i - implicitLen); + const ValueType control_value = concatenate.GetPortalConstControl().Get(i); VTKM_TEST_ASSERT(test_equal(result_v, correct_value), "ArrayHandleConcatenate as Input Failed"); VTKM_TEST_ASSERT(test_equal(result_v, control_value), @@ -360,70 +348,60 @@ private: } }; - struct TestPermutationAsInput { - template< typename ValueType> + template VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const { const vtkm::Id length = ARRAY_SIZE; typedef ::fancy_array_detail::IndexSquared FunctorType; - typedef vtkm::cont::ArrayHandleCounting< vtkm::Id > KeyHandleType; - typedef vtkm::cont::ArrayHandleImplicit< ValueType, - FunctorType > ValueHandleType; - typedef vtkm::cont::ArrayHandlePermutation< KeyHandleType, - ValueHandleType - > PermutationHandleType; + typedef vtkm::cont::ArrayHandleCounting KeyHandleType; + typedef vtkm::cont::ArrayHandleImplicit ValueHandleType; + typedef vtkm::cont::ArrayHandlePermutation + PermutationHandleType; FunctorType functor; - for( vtkm::Id start_pos = 0; start_pos < length; start_pos+=length/4) - { + for (vtkm::Id start_pos = 0; start_pos < length; start_pos += length / 4) + { const vtkm::Id counting_length = length - start_pos; KeyHandleType counting = - vtkm::cont::make_ArrayHandleCounting(start_pos, - 1, - counting_length); + vtkm::cont::make_ArrayHandleCounting(start_pos, 1, counting_length); - ValueHandleType implicit = - vtkm::cont::make_ArrayHandleImplicit(functor, - length); + ValueHandleType implicit = vtkm::cont::make_ArrayHandleImplicit(functor, length); PermutationHandleType permutation = - vtkm::cont::make_ArrayHandlePermutation(counting, - implicit); + vtkm::cont::make_ArrayHandlePermutation(counting, implicit); vtkm::cont::printSummary_ArrayHandle(permutation, std::cout); std::cout << std::endl; - vtkm::cont::ArrayHandle< ValueType > result; + vtkm::cont::ArrayHandle result; - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(permutation, result); //verify that the control portal works - for(vtkm::Id i=0; i + template VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const { typedef fancy_array_detail::ValueScale FunctorType; @@ -432,11 +410,8 @@ private: FunctorType functor(2.0); vtkm::cont::ArrayHandle input; - vtkm::cont::ArrayHandleTransform< - ValueType, - vtkm::cont::ArrayHandle, - FunctorType> transformed = - vtkm::cont::make_ArrayHandleTransform(input, functor); + vtkm::cont::ArrayHandleTransform, FunctorType> + transformed = vtkm::cont::make_ArrayHandleTransform(input, functor); input.Allocate(length); SetPortal(input.GetPortalControl()); @@ -444,28 +419,26 @@ private: vtkm::cont::printSummary_ArrayHandle(transformed, std::cout); std::cout << std::endl; - vtkm::cont::ArrayHandle< ValueType > result; + vtkm::cont::ArrayHandle result; - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(transformed, result); //verify that the control portal works - for(vtkm::Id i=0; i < length; ++i) + for (vtkm::Id i = 0; i < length; ++i) { const ValueType result_v = result.GetPortalConstControl().Get(i); const ValueType correct_value = functor(TestValue(i, ValueType())); const ValueType control_value = transformed.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(test_equal(result_v, correct_value), - "Transform Handle Failed"); - VTKM_TEST_ASSERT(test_equal(result_v, control_value), - "Transform Handle Control Failed"); + VTKM_TEST_ASSERT(test_equal(result_v, correct_value), "Transform Handle Failed"); + VTKM_TEST_ASSERT(test_equal(result_v, control_value), "Transform Handle Control Failed"); } } }; struct TestCountingTransformAsInput { - template< typename ValueType> + template VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const { typedef typename vtkm::VecTraits::ComponentType ComponentType; @@ -480,58 +453,48 @@ private: ComponentType component_value(0); const ValueType start = ValueType(component_value); - vtkm::cont::ArrayHandleCounting< ValueType > counting(start, - ValueType(1), - length); + vtkm::cont::ArrayHandleCounting counting(start, ValueType(1), length); - vtkm::cont::ArrayHandleTransform< - OutputValueType, - vtkm::cont::ArrayHandleCounting, - FunctorType> - countingTransformed = - vtkm::cont::make_ArrayHandleTransform(counting, - functor); + vtkm::cont::ArrayHandleTransform, + FunctorType> + countingTransformed = + vtkm::cont::make_ArrayHandleTransform(counting, functor); vtkm::cont::printSummary_ArrayHandle(countingTransformed, std::cout); std::cout << std::endl; - vtkm::cont::ArrayHandle< OutputValueType > result; + vtkm::cont::ArrayHandle result; - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(countingTransformed, result); //verify that the control portal works - for(vtkm::Id i=0; i < length; ++i) - { + for (vtkm::Id i = 0; i < length; ++i) + { const OutputValueType result_v = result.GetPortalConstControl().Get(i); - const OutputValueType correct_value = - functor(ValueType(component_value)); - const OutputValueType control_value = - countingTransformed.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT(test_equal(result_v, correct_value), - "Transform Counting Handle Failed"); + const OutputValueType correct_value = functor(ValueType(component_value)); + const OutputValueType control_value = countingTransformed.GetPortalConstControl().Get(i); + VTKM_TEST_ASSERT(test_equal(result_v, correct_value), "Transform Counting Handle Failed"); VTKM_TEST_ASSERT(test_equal(result_v, control_value), "Transform Counting Handle Control Failed"); component_value = ComponentType(component_value + ComponentType(1)); - } + } } }; struct TestCastAsInput { - template - VTKM_CONT - void operator()(CastToType vtkmNotUsed(type)) const + template + VTKM_CONT void operator()(CastToType vtkmNotUsed(type)) const { typedef vtkm::cont::ArrayHandleIndex InputArrayType; InputArrayType input(ARRAY_SIZE); - vtkm::cont::ArrayHandleCast castArray = - vtkm::cont::make_ArrayHandleCast(input, CastToType()); + vtkm::cont::ArrayHandleCast castArray = + vtkm::cont::make_ArrayHandleCast(input, CastToType()); vtkm::cont::ArrayHandle result; - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(castArray, result); vtkm::cont::printSummary_ArrayHandle(castArray, std::cout); @@ -541,35 +504,32 @@ private: vtkm::Id length = ARRAY_SIZE; for (vtkm::Id i = 0; i < length; ++i) { - VTKM_TEST_ASSERT( - result.GetPortalConstControl().Get(i) == - static_cast(input.GetPortalConstControl().Get(i)), - "Casting ArrayHandle Failed"); + VTKM_TEST_ASSERT(result.GetPortalConstControl().Get(i) == + static_cast(input.GetPortalConstControl().Get(i)), + "Casting ArrayHandle Failed"); } } }; - template + template struct TestGroupVecAsInput { - template - VTKM_CONT - void operator()(ComponentType) const + template + VTKM_CONT void operator()(ComponentType) const { typedef vtkm::Vec ValueType; - ComponentType testValues[ARRAY_SIZE*NUM_COMPONENTS]; + ComponentType testValues[ARRAY_SIZE * NUM_COMPONENTS]; - for(vtkm::Id index = 0; index < ARRAY_SIZE*NUM_COMPONENTS; ++index) - { + for (vtkm::Id index = 0; index < ARRAY_SIZE * NUM_COMPONENTS; ++index) + { testValues[index] = TestValue(index, ComponentType()); - } + } vtkm::cont::ArrayHandle baseArray = - vtkm::cont::make_ArrayHandle(testValues, ARRAY_SIZE*NUM_COMPONENTS); + vtkm::cont::make_ArrayHandle(testValues, ARRAY_SIZE * NUM_COMPONENTS); - vtkm::cont::ArrayHandleGroupVec< - vtkm::cont::ArrayHandle, NUM_COMPONENTS> groupArray( - baseArray); + vtkm::cont::ArrayHandleGroupVec, NUM_COMPONENTS> + groupArray(baseArray); VTKM_TEST_ASSERT(groupArray.GetNumberOfValues() == ARRAY_SIZE, "Group array reporting wrong array size."); @@ -578,23 +538,20 @@ private: vtkm::cont::ArrayHandle resultArray; - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(groupArray, resultArray); - VTKM_TEST_ASSERT(resultArray.GetNumberOfValues() == ARRAY_SIZE, - "Got bad result array size."); + VTKM_TEST_ASSERT(resultArray.GetNumberOfValues() == ARRAY_SIZE, "Got bad result array size."); //verify that the control portal works vtkm::Id totalIndex = 0; - for(vtkm::Id index = 0; index < ARRAY_SIZE; ++index) + for (vtkm::Id index = 0; index < ARRAY_SIZE; ++index) { const ValueType result = resultArray.GetPortalConstControl().Get(index); - for (vtkm::IdComponent componentIndex = 0; - componentIndex < NUM_COMPONENTS; + for (vtkm::IdComponent componentIndex = 0; componentIndex < NUM_COMPONENTS; componentIndex++) { - const ComponentType expectedValue = - TestValue(totalIndex, ComponentType()); + const ComponentType expectedValue = TestValue(totalIndex, ComponentType()); VTKM_TEST_ASSERT(test_equal(result[componentIndex], expectedValue), "Result array got wrong value."); totalIndex++; @@ -603,12 +560,11 @@ private: } }; - template + template struct TestGroupVecAsOutput { - template - VTKM_CONT - void operator()(ComponentType) const + template + VTKM_CONT void operator()(ComponentType) const { typedef vtkm::Vec ValueType; @@ -618,11 +574,10 @@ private: vtkm::cont::ArrayHandle resultArray; - vtkm::cont::ArrayHandleGroupVec< - vtkm::cont::ArrayHandle, NUM_COMPONENTS> groupArray( - resultArray); + vtkm::cont::ArrayHandleGroupVec, NUM_COMPONENTS> + groupArray(resultArray); - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(baseArray, groupArray); vtkm::cont::printSummary_ArrayHandle(groupArray, std::cout); @@ -633,21 +588,18 @@ private: VTKM_TEST_ASSERT(groupArray.GetNumberOfValues() == ARRAY_SIZE, "Group array reporting wrong array size."); - VTKM_TEST_ASSERT( - resultArray.GetNumberOfValues() == ARRAY_SIZE*NUM_COMPONENTS, - "Got bad result array size."); + VTKM_TEST_ASSERT(resultArray.GetNumberOfValues() == ARRAY_SIZE * NUM_COMPONENTS, + "Got bad result array size."); //verify that the control portal works vtkm::Id totalIndex = 0; - for(vtkm::Id index = 0; index < ARRAY_SIZE; ++index) + for (vtkm::Id index = 0; index < ARRAY_SIZE; ++index) { const ValueType expectedValue = TestValue(index, ValueType()); - for (vtkm::IdComponent componentIndex = 0; - componentIndex < NUM_COMPONENTS; + for (vtkm::IdComponent componentIndex = 0; componentIndex < NUM_COMPONENTS; componentIndex++) { - const ComponentType result = - resultArray.GetPortalConstControl().Get(totalIndex); + const ComponentType result = resultArray.GetPortalConstControl().Get(totalIndex); VTKM_TEST_ASSERT(test_equal(result, expectedValue[componentIndex]), "Result array got wrong value."); totalIndex++; @@ -664,22 +616,18 @@ private: typedef void ControlSignature(FieldIn<>); typedef void ExecutionSignature(_1, WorkIndex); - template - VTKM_EXEC - void operator()(const InputType &input, vtkm::Id workIndex) const + template + VTKM_EXEC void operator()(const InputType& input, vtkm::Id workIndex) const { using ComponentType = typename InputType::ComponentType; - vtkm::IdComponent expectedSize = - static_cast(workIndex + 1); + vtkm::IdComponent expectedSize = static_cast(workIndex + 1); if (expectedSize != input.GetNumberOfComponents()) { this->RaiseError("Got unexpected number of components."); } - vtkm::Id valueIndex = workIndex*(workIndex+1)/2; - for (vtkm::IdComponent componentIndex = 0; - componentIndex < expectedSize; - componentIndex++) + vtkm::Id valueIndex = workIndex * (workIndex + 1) / 2; + for (vtkm::IdComponent componentIndex = 0; componentIndex < expectedSize; componentIndex++) { ComponentType expectedValue = TestValue(valueIndex, ComponentType()); if (expectedValue != input[componentIndex]) @@ -693,32 +641,25 @@ private: struct TestGroupVecVariableAsInput { - template - VTKM_CONT - void operator()(ComponentType) const + template + VTKM_CONT void operator()(ComponentType) const { vtkm::Id sourceArraySize; - vtkm::cont::ArrayHandleCounting - numComponentsArray(1, 1, ARRAY_SIZE); + vtkm::cont::ArrayHandleCounting numComponentsArray(1, 1, ARRAY_SIZE); vtkm::cont::ArrayHandle offsetsArray = - vtkm::cont::ConvertNumComponentsToOffsets(numComponentsArray, - sourceArraySize); + vtkm::cont::ConvertNumComponentsToOffsets(numComponentsArray, sourceArraySize); vtkm::cont::ArrayHandle sourceArray; sourceArray.Allocate(sourceArraySize); SetPortal(sourceArray.GetPortalControl()); vtkm::cont::printSummary_ArrayHandle( - vtkm::cont::make_ArrayHandleGroupVecVariable(sourceArray, - offsetsArray), - std::cout); + vtkm::cont::make_ArrayHandleGroupVecVariable(sourceArray, offsetsArray), std::cout); std::cout << std::endl; - vtkm::worklet::DispatcherMapField dispatcher; - dispatcher.Invoke( - vtkm::cont::make_ArrayHandleGroupVecVariable( - sourceArray, offsetsArray)); + vtkm::worklet::DispatcherMapField dispatcher; + dispatcher.Invoke(vtkm::cont::make_ArrayHandleGroupVecVariable(sourceArray, offsetsArray)); } }; @@ -730,22 +671,18 @@ private: typedef void ControlSignature(FieldIn<>, FieldOut<>); typedef void ExecutionSignature(_2, WorkIndex); - template - VTKM_EXEC - void operator()(OutputType &output, vtkm::Id workIndex) const + template + VTKM_EXEC void operator()(OutputType& output, vtkm::Id workIndex) const { using ComponentType = typename OutputType::ComponentType; - vtkm::IdComponent expectedSize = - static_cast(workIndex + 1); + vtkm::IdComponent expectedSize = static_cast(workIndex + 1); if (expectedSize != output.GetNumberOfComponents()) { this->RaiseError("Got unexpected number of components."); } - vtkm::Id valueIndex = workIndex*(workIndex+1)/2; - for (vtkm::IdComponent componentIndex = 0; - componentIndex < expectedSize; - componentIndex++) + vtkm::Id valueIndex = workIndex * (workIndex + 1) / 2; + for (vtkm::IdComponent componentIndex = 0; componentIndex < expectedSize; componentIndex++) { output[componentIndex] = TestValue(valueIndex, ComponentType()); valueIndex++; @@ -755,31 +692,24 @@ private: struct TestGroupVecVariableAsOutput { - template - VTKM_CONT - void operator()(ComponentType) const + template + VTKM_CONT void operator()(ComponentType) const { vtkm::Id sourceArraySize; - vtkm::cont::ArrayHandleCounting - numComponentsArray(1, 1, ARRAY_SIZE); + vtkm::cont::ArrayHandleCounting numComponentsArray(1, 1, ARRAY_SIZE); vtkm::cont::ArrayHandle offsetsArray = - vtkm::cont::ConvertNumComponentsToOffsets(numComponentsArray, - sourceArraySize); + vtkm::cont::ConvertNumComponentsToOffsets(numComponentsArray, sourceArraySize); vtkm::cont::ArrayHandle sourceArray; sourceArray.Allocate(sourceArraySize); - vtkm::worklet::DispatcherMapField dispatcher; - dispatcher.Invoke( - vtkm::cont::ArrayHandleIndex(ARRAY_SIZE), - vtkm::cont::make_ArrayHandleGroupVecVariable( - sourceArray, offsetsArray)); + vtkm::worklet::DispatcherMapField dispatcher; + dispatcher.Invoke(vtkm::cont::ArrayHandleIndex(ARRAY_SIZE), + vtkm::cont::make_ArrayHandleGroupVecVariable(sourceArray, offsetsArray)); vtkm::cont::printSummary_ArrayHandle( - vtkm::cont::make_ArrayHandleGroupVecVariable(sourceArray, - offsetsArray), - std::cout); + vtkm::cont::make_ArrayHandleGroupVecVariable(sourceArray, offsetsArray), std::cout); std::cout << std::endl; vtkm::cont::printSummary_ArrayHandle(sourceArray, std::cout); std::cout << std::endl; @@ -790,57 +720,51 @@ private: struct TestZipAsInput { - template< typename KeyType, typename ValueType > - VTKM_CONT - void operator()(vtkm::Pair vtkmNotUsed(pair)) const + template + VTKM_CONT void operator()(vtkm::Pair vtkmNotUsed(pair)) const { - typedef vtkm::Pair< KeyType, ValueType > PairType; + typedef vtkm::Pair PairType; typedef typename vtkm::VecTraits::ComponentType KeyComponentType; typedef typename vtkm::VecTraits::ComponentType ValueComponentType; - KeyType testKeys[ARRAY_SIZE]; ValueType testValues[ARRAY_SIZE]; - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) - { + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) + { testKeys[i] = KeyType(static_cast(ARRAY_SIZE - i)); testValues[i] = ValueType(static_cast(i)); - } - vtkm::cont::ArrayHandle< KeyType > keys = - vtkm::cont::make_ArrayHandle(testKeys, ARRAY_SIZE); - vtkm::cont::ArrayHandle< ValueType > values = - vtkm::cont::make_ArrayHandle(testValues, ARRAY_SIZE); + } + vtkm::cont::ArrayHandle keys = vtkm::cont::make_ArrayHandle(testKeys, ARRAY_SIZE); + vtkm::cont::ArrayHandle values = + vtkm::cont::make_ArrayHandle(testValues, ARRAY_SIZE); - vtkm::cont::ArrayHandleZip< - vtkm::cont::ArrayHandle< KeyType >, - vtkm::cont::ArrayHandle< ValueType > > zip = - vtkm::cont::make_ArrayHandleZip(keys, values); + vtkm::cont::ArrayHandleZip, + vtkm::cont::ArrayHandle> + zip = vtkm::cont::make_ArrayHandleZip(keys, values); vtkm::cont::printSummary_ArrayHandle(zip, std::cout); std::cout << std::endl; - vtkm::cont::ArrayHandle< PairType > result; + vtkm::cont::ArrayHandle result; - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(zip, result); //verify that the control portal works - for(int i=0; i < ARRAY_SIZE; ++i) - { + for (int i = 0; i < ARRAY_SIZE; ++i) + { const PairType result_v = result.GetPortalConstControl().Get(i); - const PairType correct_value( - KeyType(static_cast(ARRAY_SIZE - i)), - ValueType(static_cast(i))); - VTKM_TEST_ASSERT(test_equal(result_v, correct_value), - "ArrayHandleZip Failed as input"); - } + const PairType correct_value(KeyType(static_cast(ARRAY_SIZE - i)), + ValueType(static_cast(i))); + VTKM_TEST_ASSERT(test_equal(result_v, correct_value), "ArrayHandleZip Failed as input"); + } } }; struct TestDiscardAsOutput { - template< typename ValueType> + template VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const { using DiscardHandleType = vtkm::cont::ArrayHandleDiscard; @@ -853,15 +777,15 @@ private: vtkm::cont::ArrayHandle input; input.Allocate(length); Portal inputPortal = input.GetPortalControl(); - for(vtkm::Id i=0; i < length; ++i) - { - inputPortal.Set(i,ValueType(ComponentType(i))); - } + for (vtkm::Id i = 0; i < length; ++i) + { + inputPortal.Set(i, ValueType(ComponentType(i))); + } DiscardHandleType discard; discard.Allocate(length); - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(input, discard); // No output to verify since none is stored in memory. Just checking that @@ -871,107 +795,98 @@ private: struct TestPermutationAsOutput { - template< typename ValueType> + template VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const { const vtkm::Id length = ARRAY_SIZE; - typedef vtkm::cont::ArrayHandleCounting< vtkm::Id > KeyHandleType; - typedef vtkm::cont::ArrayHandle< ValueType > ValueHandleType; - typedef vtkm::cont::ArrayHandlePermutation< KeyHandleType, - ValueHandleType - > PermutationHandleType; + typedef vtkm::cont::ArrayHandleCounting KeyHandleType; + typedef vtkm::cont::ArrayHandle ValueHandleType; + typedef vtkm::cont::ArrayHandlePermutation + PermutationHandleType; typedef typename vtkm::VecTraits::ComponentType ComponentType; vtkm::cont::ArrayHandle input; typedef typename vtkm::cont::ArrayHandle::PortalControl Portal; input.Allocate(length); Portal inputPortal = input.GetPortalControl(); - for(vtkm::Id i=0; i < length; ++i) - { - inputPortal.Set(i,ValueType(ComponentType(i))); - } + for (vtkm::Id i = 0; i < length; ++i) + { + inputPortal.Set(i, ValueType(ComponentType(i))); + } ValueHandleType values; - values.Allocate(length*2); + values.Allocate(length * 2); - KeyHandleType counting = - vtkm::cont::make_ArrayHandleCounting(length, 1, length); + KeyHandleType counting = vtkm::cont::make_ArrayHandleCounting(length, 1, length); - PermutationHandleType permutation = - vtkm::cont::make_ArrayHandlePermutation(counting, values); - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + PermutationHandleType permutation = vtkm::cont::make_ArrayHandlePermutation(counting, values); + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(input, permutation); vtkm::cont::printSummary_ArrayHandle(permutation, std::cout); std::cout << std::endl; //verify that the control portal works - for(vtkm::Id i=0; i - VTKM_CONT - void operator()(vtkm::Pair vtkmNotUsed(pair)) const + template + VTKM_CONT void operator()(vtkm::Pair vtkmNotUsed(pair)) const { - typedef vtkm::Pair< KeyType, ValueType > PairType; + typedef vtkm::Pair PairType; typedef typename vtkm::VecTraits::ComponentType KeyComponentType; typedef typename vtkm::VecTraits::ComponentType ValueComponentType; PairType testKeysAndValues[ARRAY_SIZE]; - for(vtkm::Id i=0; i < ARRAY_SIZE; ++i) - { - testKeysAndValues[i] = - PairType(KeyType(static_cast(ARRAY_SIZE - i)), - ValueType(static_cast(i)) ); - } - vtkm::cont::ArrayHandle< PairType > input = - vtkm::cont::make_ArrayHandle(testKeysAndValues, ARRAY_SIZE); + for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i) + { + testKeysAndValues[i] = PairType(KeyType(static_cast(ARRAY_SIZE - i)), + ValueType(static_cast(i))); + } + vtkm::cont::ArrayHandle input = + vtkm::cont::make_ArrayHandle(testKeysAndValues, ARRAY_SIZE); - vtkm::cont::ArrayHandle< KeyType > result_keys; - vtkm::cont::ArrayHandle< ValueType > result_values; - vtkm::cont::ArrayHandleZip< - vtkm::cont::ArrayHandle< KeyType >, - vtkm::cont::ArrayHandle< ValueType > > result_zip = - vtkm::cont::make_ArrayHandleZip(result_keys, result_values); + vtkm::cont::ArrayHandle result_keys; + vtkm::cont::ArrayHandle result_values; + vtkm::cont::ArrayHandleZip, + vtkm::cont::ArrayHandle> + result_zip = vtkm::cont::make_ArrayHandleZip(result_keys, result_values); - vtkm::worklet::DispatcherMapField< PassThrough, DeviceAdapterTag > dispatcher; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(input, result_zip); vtkm::cont::printSummary_ArrayHandle(result_zip, std::cout); std::cout << std::endl; //now the two arrays we have zipped should have data inside them - for(int i=0; i < ARRAY_SIZE; ++i) - { + for (int i = 0; i < ARRAY_SIZE; ++i) + { const KeyType result_key = result_keys.GetPortalConstControl().Get(i); const ValueType result_value = result_values.GetPortalConstControl().Get(i); VTKM_TEST_ASSERT( - test_equal(result_key, KeyType(static_cast(ARRAY_SIZE - i))), - "ArrayHandleZip Failed as input for key"); - VTKM_TEST_ASSERT( - test_equal(result_value, ValueType(static_cast(i))), - "ArrayHandleZip Failed as input for value"); - } + test_equal(result_key, KeyType(static_cast(ARRAY_SIZE - i))), + "ArrayHandleZip Failed as input for key"); + VTKM_TEST_ASSERT(test_equal(result_value, ValueType(static_cast(i))), + "ArrayHandleZip Failed as input for value"); + } } }; struct TestZipAsInPlace { - template - VTKM_CONT - void operator()(ValueType) const + template + VTKM_CONT void operator()(ValueType) const { vtkm::cont::ArrayHandle inputValues; inputValues.Allocate(ARRAY_SIZE); @@ -980,8 +895,8 @@ private: vtkm::cont::ArrayHandle outputValues; outputValues.Allocate(ARRAY_SIZE); - vtkm::worklet::DispatcherMapField dispatcher; - dispatcher.Invoke(vtkm::cont::make_ArrayHandleZip(inputValues,outputValues)); + vtkm::worklet::DispatcherMapField dispatcher; + dispatcher.Invoke(vtkm::cont::make_ArrayHandleZip(inputValues, outputValues)); vtkm::cont::printSummary_ArrayHandle(outputValues, std::cout); std::cout << std::endl; @@ -990,31 +905,25 @@ private: } }; - struct ScalarTypesToTest - : vtkm::ListTagBase - { }; + struct ScalarTypesToTest : vtkm::ListTagBase + { + }; struct ZipTypesToTest - : vtkm::ListTagBase< vtkm::Pair< vtkm::UInt8, vtkm::Id >, - vtkm::Pair< vtkm::Float64, vtkm::Vec< vtkm::UInt8, 4> >, - vtkm::Pair< vtkm::Vec, vtkm::Vec > - > - { }; + : vtkm::ListTagBase, + vtkm::Pair>, + vtkm::Pair, vtkm::Vec>> + { + }; - struct HandleTypesToTest - : vtkm::ListTagBase< vtkm::Id, - vtkm::Vec, - vtkm::FloatDefault, - vtkm::Vec - > - { }; - - struct CastTypesToTest - : vtkm::ListTagBase< vtkm::Int32, - vtkm::UInt32 - > - { }; + struct HandleTypesToTest : vtkm::ListTagBase, + vtkm::FloatDefault, vtkm::Vec> + { + }; + struct CastTypesToTest : vtkm::ListTagBase + { + }; struct TestAll { @@ -1025,136 +934,115 @@ private: std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleCompositeVector as Input" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestCompositeAsInput(), - ScalarTypesToTest()); + TestingFancyArrayHandles::TestCompositeAsInput(), ScalarTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleConstant as Input" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestConstantAsInput(), - HandleTypesToTest()); + TestingFancyArrayHandles::TestConstantAsInput(), HandleTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleCounting as Input" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestCountingAsInput(), - HandleTypesToTest()); + TestingFancyArrayHandles::TestCountingAsInput(), HandleTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleImplicit as Input" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestImplicitAsInput(), - HandleTypesToTest()); + TestingFancyArrayHandles::TestImplicitAsInput(), HandleTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandlePermutation as Input" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestPermutationAsInput(), - HandleTypesToTest()); + TestingFancyArrayHandles::TestPermutationAsInput(), HandleTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleTransform as Input" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestTransformAsInput(), - HandleTypesToTest()); + TestingFancyArrayHandles::TestTransformAsInput(), HandleTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleTransform with Counting as Input" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestCountingTransformAsInput(), - HandleTypesToTest()); + TestingFancyArrayHandles::TestCountingTransformAsInput(), + HandleTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleCast as Input" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestCastAsInput(), - CastTypesToTest()); + TestingFancyArrayHandles::TestCastAsInput(), CastTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleGroupVec<3> as Input" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestGroupVecAsInput<3>(), - HandleTypesToTest()); + TestingFancyArrayHandles::TestGroupVecAsInput<3>(), HandleTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleGroupVec<4> as Input" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestGroupVecAsInput<4>(), - HandleTypesToTest()); + TestingFancyArrayHandles::TestGroupVecAsInput<4>(), HandleTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleGroupVec<2> as Output" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestGroupVecAsOutput<2>(), - ScalarTypesToTest()); + TestingFancyArrayHandles::TestGroupVecAsOutput<2>(), ScalarTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleGroupVec<3> as Output" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestGroupVecAsOutput<3>(), - ScalarTypesToTest()); + TestingFancyArrayHandles::TestGroupVecAsOutput<3>(), ScalarTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleGroupVecVariable as Input" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestGroupVecVariableAsInput(), - ScalarTypesToTest()); + TestingFancyArrayHandles::TestGroupVecVariableAsInput(), + ScalarTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleGroupVecVariable as Output" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestGroupVecVariableAsOutput(), - ScalarTypesToTest()); + TestingFancyArrayHandles::TestGroupVecVariableAsOutput(), + ScalarTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleZip as Input" << std::endl; - vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestZipAsInput(), - ZipTypesToTest()); + vtkm::testing::Testing::TryTypes(TestingFancyArrayHandles::TestZipAsInput(), + ZipTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandlePermutation as Output" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestPermutationAsOutput(), - HandleTypesToTest()); + TestingFancyArrayHandles::TestPermutationAsOutput(), HandleTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleDiscard as Output" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestDiscardAsOutput(), - HandleTypesToTest()); + TestingFancyArrayHandles::TestDiscardAsOutput(), HandleTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleZip as Output" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestZipAsOutput(), - ZipTypesToTest()); + TestingFancyArrayHandles::TestZipAsOutput(), ZipTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleZip as In Place" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestZipAsInPlace(), - HandleTypesToTest()); + TestingFancyArrayHandles::TestZipAsInPlace(), HandleTypesToTest()); std::cout << "-------------------------------------------" << std::endl; std::cout << "Testing ArrayHandleConcatenate as Input" << std::endl; vtkm::testing::Testing::TryTypes( - TestingFancyArrayHandles::TestConcatenateAsInput(), - HandleTypesToTest()); + TestingFancyArrayHandles::TestConcatenateAsInput(), HandleTypesToTest()); } }; - public: +public: /// Run a suite of tests to check to see if a DeviceAdapter properly supports /// all the fancy array handles that vtkm supports. Returns an /// error code that can be returned from the main function of a test. /// - static VTKM_CONT int Run() - { - return vtkm::cont::testing::Testing::Run(TestAll()); - } + static VTKM_CONT int Run() { return vtkm::cont::testing::Testing::Run(TestAll()); } }; - } } } // namespace vtkm::cont::testing diff --git a/vtkm/cont/testing/TestingImplicitFunction.h b/vtkm/cont/testing/TestingImplicitFunction.h index c7e504199..edaa08b13 100644 --- a/vtkm/cont/testing/TestingImplicitFunction.h +++ b/vtkm/cont/testing/TestingImplicitFunction.h @@ -34,12 +34,15 @@ #include +namespace vtkm +{ +namespace cont +{ +namespace testing +{ -namespace vtkm { -namespace cont { -namespace testing { - -namespace implicit_function_detail { +namespace implicit_function_detail +{ class EvaluateImplicitFunction : public vtkm::worklet::WorkletMapField { @@ -47,13 +50,13 @@ public: typedef void ControlSignature(FieldIn, FieldOut); typedef void ExecutionSignature(_1, _2); - EvaluateImplicitFunction(const vtkm::exec::ImplicitFunction &function) + EvaluateImplicitFunction(const vtkm::exec::ImplicitFunction& function) : Function(function) - { } + { + } - template - VTKM_EXEC - void operator()(const VecType &point, ScalarType &val) const + template + VTKM_EXEC void operator()(const VecType& point, ScalarType& val) const { val = this->Function.Value(point); } @@ -64,20 +67,19 @@ private: template void EvaluateOnCoordinates(vtkm::cont::CoordinateSystem points, - const vtkm::cont::ImplicitFunction &function, - vtkm::cont::ArrayHandle &values, + const vtkm::cont::ImplicitFunction& function, + vtkm::cont::ArrayHandle& values, DeviceAdapter device) { - typedef vtkm::worklet::DispatcherMapField - EvalDispatcher; + typedef vtkm::worklet::DispatcherMapField EvalDispatcher; EvaluateImplicitFunction eval(function.PrepareForExecution(device)); EvalDispatcher(eval).Invoke(points, values); } template -bool TestArrayEqual(const vtkm::cont::ArrayHandle &result, - const std::array &expected) +bool TestArrayEqual(const vtkm::cont::ArrayHandle& result, + const std::array& expected) { bool success = false; auto portal = result.GetPortalConstControl(); @@ -125,7 +127,7 @@ public: { } - template + template void Run(DeviceAdapter device) { this->TestBox(device); @@ -140,16 +142,15 @@ private: void TestBox(DeviceAdapter device) { std::cout << "Testing vtkm::cont::Box on " - << vtkm::cont::DeviceAdapterTraits::GetName() - << "\n"; + << vtkm::cont::DeviceAdapterTraits::GetName() << "\n"; - vtkm::cont::Box box({0.0f, -0.5f, -0.5f}, {1.5f, 1.5f, 0.5f}); + vtkm::cont::Box box({ 0.0f, -0.5f, -0.5f }, { 1.5f, 1.5f, 0.5f }); vtkm::cont::ArrayHandle values; - implicit_function_detail::EvaluateOnCoordinates( - this->Input.GetCoordinateSystem(0), box, values, device); + implicit_function_detail::EvaluateOnCoordinates(this->Input.GetCoordinateSystem(0), box, values, + device); - std::array expected = - { {0.0f, -0.5f, 0.5f, 0.5f, 0.0f, -0.5f, 0.5f, 0.5f} }; + std::array expected = { { 0.0f, -0.5f, 0.5f, 0.5f, 0.0f, -0.5f, 0.5f, + 0.5f } }; VTKM_TEST_ASSERT(implicit_function_detail::TestArrayEqual(values, expected), "Result does not match expected values"); } @@ -158,20 +159,19 @@ private: void TestCylinder(DeviceAdapter device) { std::cout << "Testing vtkm::cont::Cylinder on " - << vtkm::cont::DeviceAdapterTraits::GetName() - << "\n"; + << vtkm::cont::DeviceAdapterTraits::GetName() << "\n"; vtkm::cont::Cylinder cylinder; - cylinder.SetCenter({0.0f, 0.0f, 1.0f}); - cylinder.SetAxis({0.0f, 1.0f, 0.0f}); + cylinder.SetCenter({ 0.0f, 0.0f, 1.0f }); + cylinder.SetAxis({ 0.0f, 1.0f, 0.0f }); cylinder.SetRadius(1.0f); vtkm::cont::ArrayHandle values; - implicit_function_detail::EvaluateOnCoordinates( - this->Input.GetCoordinateSystem(0), cylinder, values, device); + implicit_function_detail::EvaluateOnCoordinates(this->Input.GetCoordinateSystem(0), cylinder, + values, device); - std::array expected = - { {0.0f, 1.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f, -1.0f} }; + std::array expected = { { 0.0f, 1.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f, + -1.0f } }; VTKM_TEST_ASSERT(implicit_function_detail::TestArrayEqual(values, expected), "Result does not match expected values"); } @@ -180,28 +180,27 @@ private: void TestFrustum(DeviceAdapter device) { std::cout << "Testing vtkm::cont::Frustum on " - << vtkm::cont::DeviceAdapterTraits::GetName() - << "\n"; + << vtkm::cont::DeviceAdapterTraits::GetName() << "\n"; vtkm::Vec points[8] = { - {0.0f, 0.0f, 0.0f}, // 0 - {1.0f, 0.0f, 0.0f}, // 1 - {1.0f, 0.0f, 1.0f}, // 2 - {0.0f, 0.0f, 1.0f}, // 3 - {0.5f, 1.5f, 0.5f}, // 4 - {1.5f, 1.5f, 0.5f}, // 5 - {1.5f, 1.5f, 1.5f}, // 6 - {0.5f, 1.5f, 1.5f} // 7 + { 0.0f, 0.0f, 0.0f }, // 0 + { 1.0f, 0.0f, 0.0f }, // 1 + { 1.0f, 0.0f, 1.0f }, // 2 + { 0.0f, 0.0f, 1.0f }, // 3 + { 0.5f, 1.5f, 0.5f }, // 4 + { 1.5f, 1.5f, 0.5f }, // 5 + { 1.5f, 1.5f, 1.5f }, // 6 + { 0.5f, 1.5f, 1.5f } // 7 }; vtkm::cont::Frustum frustum; frustum.CreateFromPoints(points); vtkm::cont::ArrayHandle values; - implicit_function_detail::EvaluateOnCoordinates( - this->Input.GetCoordinateSystem(0), frustum, values, device); + implicit_function_detail::EvaluateOnCoordinates(this->Input.GetCoordinateSystem(0), frustum, + values, device); - std::array expected = - { {0.0f, 0.0f, 0.0f, 0.0f, 0.316228f, 0.316228f, -0.316228f, 0.316228f} }; + std::array expected = { { 0.0f, 0.0f, 0.0f, 0.0f, 0.316228f, 0.316228f, + -0.316228f, 0.316228f } }; VTKM_TEST_ASSERT(implicit_function_detail::TestArrayEqual(values, expected), "Result does not match expected values"); } @@ -210,24 +209,23 @@ private: void TestPlane(DeviceAdapter device) { std::cout << "Testing vtkm::cont::Plane on " - << vtkm::cont::DeviceAdapterTraits::GetName() - << "\n"; + << vtkm::cont::DeviceAdapterTraits::GetName() << "\n"; - vtkm::cont::Plane plane({0.5f, 0.5f, 0.5f}, {1.0f, 0.0f, 1.0f}); + vtkm::cont::Plane plane({ 0.5f, 0.5f, 0.5f }, { 1.0f, 0.0f, 1.0f }); vtkm::cont::ArrayHandle values; - implicit_function_detail::EvaluateOnCoordinates( - this->Input.GetCoordinateSystem(0), plane, values, device); - std::array expected1 = - { {-1.0f, 0.0f, 1.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f} }; + implicit_function_detail::EvaluateOnCoordinates(this->Input.GetCoordinateSystem(0), plane, + values, device); + std::array expected1 = { { -1.0f, 0.0f, 1.0f, 0.0f, -1.0f, 0.0f, 1.0f, + 0.0f } }; VTKM_TEST_ASSERT(implicit_function_detail::TestArrayEqual(values, expected1), "Result does not match expected values"); - plane.SetNormal({-1.0f, 0.0f, -1.0f}); - implicit_function_detail::EvaluateOnCoordinates( - this->Input.GetCoordinateSystem(0), plane, values, device); - std::array expected2 = - { {1.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f, -1.0f, 0.0f} }; + plane.SetNormal({ -1.0f, 0.0f, -1.0f }); + implicit_function_detail::EvaluateOnCoordinates(this->Input.GetCoordinateSystem(0), plane, + values, device); + std::array expected2 = { { 1.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f, -1.0f, + 0.0f } }; VTKM_TEST_ASSERT(implicit_function_detail::TestArrayEqual(values, expected2), "Result does not match expected values"); } @@ -236,23 +234,21 @@ private: void TestSphere(DeviceAdapter device) { std::cout << "Testing vtkm::cont::Sphere on " - << vtkm::cont::DeviceAdapterTraits::GetName() - << "\n"; + << vtkm::cont::DeviceAdapterTraits::GetName() << "\n"; - vtkm::cont::Sphere sphere({0.0f, 0.0f, 0.0f}, 1.0f); + vtkm::cont::Sphere sphere({ 0.0f, 0.0f, 0.0f }, 1.0f); vtkm::cont::ArrayHandle values; - implicit_function_detail::EvaluateOnCoordinates( - this->Input.GetCoordinateSystem(0), sphere, values, device); + implicit_function_detail::EvaluateOnCoordinates(this->Input.GetCoordinateSystem(0), sphere, + values, device); - std::array expected = - { {-1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 2.0f, 1.0f} }; + std::array expected = { { -1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 2.0f, + 1.0f } }; VTKM_TEST_ASSERT(implicit_function_detail::TestArrayEqual(values, expected), "Result does not match expected values"); } vtkm::cont::DataSet Input; }; - } } } // vtmk::cont::testing diff --git a/vtkm/cont/testing/TestingVirtualObjectCache.h b/vtkm/cont/testing/TestingVirtualObjectCache.h index bf91588ab..3a5118a6f 100644 --- a/vtkm/cont/testing/TestingVirtualObjectCache.h +++ b/vtkm/cont/testing/TestingVirtualObjectCache.h @@ -27,12 +27,14 @@ #include #include - #define ARRAY_LEN 8 -namespace vtkm { -namespace cont { -namespace testing { +namespace vtkm +{ +namespace cont +{ +namespace testing +{ namespace virtual_object_detail { @@ -40,14 +42,13 @@ namespace virtual_object_detail class Transformer { public: - template - VTKM_EXEC void Bind(const T *target) + template + VTKM_EXEC void Bind(const T* target) { this->Concrete = target; - this->Caller = - [](const void *concrete, vtkm::FloatDefault val) { - return static_cast(concrete)->operator()(val); - }; + this->Caller = [](const void* concrete, vtkm::FloatDefault val) { + return static_cast(concrete)->operator()(val); + }; } VTKM_EXEC @@ -57,60 +58,51 @@ public: } private: - using Signature = vtkm::FloatDefault (const void*, vtkm::FloatDefault); + using Signature = vtkm::FloatDefault(const void*, vtkm::FloatDefault); - const void *Concrete; - Signature *Caller; + const void* Concrete; + Signature* Caller; }; struct Square { VTKM_EXEC - vtkm::FloatDefault operator()(vtkm::FloatDefault val) const - { - return val * val; - } + vtkm::FloatDefault operator()(vtkm::FloatDefault val) const { return val * val; } }; struct Multiply { VTKM_EXEC - vtkm::FloatDefault operator()(vtkm::FloatDefault val) const - { - return val * this->Multiplicand; - } + vtkm::FloatDefault operator()(vtkm::FloatDefault val) const { return val * this->Multiplicand; } vtkm::FloatDefault Multiplicand; }; } // virtual_object_detail -template +template class TestingVirtualObjectCache { private: using FloatArrayHandle = vtkm::cont::ArrayHandle; - using ArrayTransform = - vtkm::cont::ArrayHandleTransform; - using TransformerCache = - vtkm::cont::VirtualObjectCache; - + using ArrayTransform = vtkm::cont::ArrayHandleTransform; + using TransformerCache = vtkm::cont::VirtualObjectCache; class TestStage1 { public: - TestStage1(const FloatArrayHandle &input, TransformerCache &manager) - : Input(&input), Manager(&manager) - { } + TestStage1(const FloatArrayHandle& input, TransformerCache& manager) + : Input(&input) + , Manager(&manager) + { + } - template + template void operator()(DeviceAdapter device) const { using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; - std::cout << "\tDeviceAdapter: " - << vtkm::cont::DeviceAdapterTraits::GetName() + std::cout << "\tDeviceAdapter: " << vtkm::cont::DeviceAdapterTraits::GetName() << std::endl; for (int n = 0; n < 2; ++n) @@ -121,8 +113,7 @@ private: auto portal = output.GetPortalConstControl(); for (vtkm::Id i = 0; i < ARRAY_LEN; ++i) { - VTKM_TEST_ASSERT(portal.Get(i) == FloatDefault(i*i), - "\tIncorrect result"); + VTKM_TEST_ASSERT(portal.Get(i) == FloatDefault(i * i), "\tIncorrect result"); } std::cout << "\tSuccess." << std::endl; @@ -135,24 +126,26 @@ private: } private: - const FloatArrayHandle *Input; - TransformerCache *Manager; + const FloatArrayHandle* Input; + TransformerCache* Manager; }; class TestStage2 { public: - TestStage2(const FloatArrayHandle &input, virtual_object_detail::Multiply &mul, - TransformerCache &manager) - : Input(&input), Mul(&mul), Manager(&manager) - { } + TestStage2(const FloatArrayHandle& input, virtual_object_detail::Multiply& mul, + TransformerCache& manager) + : Input(&input) + , Mul(&mul) + , Manager(&manager) + { + } - template + template void operator()(DeviceAdapter device) const { using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; - std::cout << "\tDeviceAdapter: " - << vtkm::cont::DeviceAdapterTraits::GetName() + std::cout << "\tDeviceAdapter: " << vtkm::cont::DeviceAdapterTraits::GetName() << std::endl; this->Mul->Multiplicand = 2; @@ -180,9 +173,9 @@ private: } private: - const FloatArrayHandle *Input; - virtual_object_detail::Multiply *Mul; - TransformerCache *Manager; + const FloatArrayHandle* Input; + virtual_object_detail::Multiply* Mul; + TransformerCache* Manager; }; public: @@ -212,7 +205,6 @@ public: vtkm::ListForEach(TestStage2(input, mul, manager), DeviceAdapterList()); } }; - } } } // vtkm::cont::testing diff --git a/vtkm/cont/testing/UnitTestArrayHandleCartesianProduct.cxx b/vtkm/cont/testing/UnitTestArrayHandleCartesianProduct.cxx index f2204e140..848d051b3 100644 --- a/vtkm/cont/testing/UnitTestArrayHandleCartesianProduct.cxx +++ b/vtkm/cont/testing/UnitTestArrayHandleCartesianProduct.cxx @@ -29,59 +29,56 @@ #include -namespace ArrayHandleCartesianProductNamespace { +namespace ArrayHandleCartesianProductNamespace +{ typedef vtkm::cont::DeviceAdapterAlgorithm DFA; template -void ArrayHandleCPBasic(vtkm::cont::ArrayHandle x, - vtkm::cont::ArrayHandle y, +void ArrayHandleCPBasic(vtkm::cont::ArrayHandle x, vtkm::cont::ArrayHandle y, vtkm::cont::ArrayHandle z) { - vtkm::cont::ArrayHandleCartesianProduct< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > cpArray; + vtkm::cont::ArrayHandleCartesianProduct, vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle> + cpArray; - vtkm::Id nx = x.GetNumberOfValues(); - vtkm::Id ny = y.GetNumberOfValues(); - vtkm::Id nz = z.GetNumberOfValues(); - vtkm::Id n = nx*ny*nz; + vtkm::Id nx = x.GetNumberOfValues(); + vtkm::Id ny = y.GetNumberOfValues(); + vtkm::Id nz = z.GetNumberOfValues(); + vtkm::Id n = nx * ny * nz; - cpArray = vtkm::cont::make_ArrayHandleCartesianProduct(x,y,z); + cpArray = vtkm::cont::make_ArrayHandleCartesianProduct(x, y, z); - //Make sure we have the right number of values. - VTKM_TEST_ASSERT(cpArray.GetNumberOfValues() == (nx*ny*nz), - "Cartesian array constructor has wrong number of values"); + //Make sure we have the right number of values. + VTKM_TEST_ASSERT(cpArray.GetNumberOfValues() == (nx * ny * nz), + "Cartesian array constructor has wrong number of values"); - //Make sure the values are correct. - vtkm::Vec val; - for (vtkm::Id i = 0; i < n; i++) - { - vtkm::Id idx0 = (i % (nx*ny)) % nx; - vtkm::Id idx1 = (i % (nx*ny)) / nx; - vtkm::Id idx2 = i / (nx*ny); + //Make sure the values are correct. + vtkm::Vec val; + for (vtkm::Id i = 0; i < n; i++) + { + vtkm::Id idx0 = (i % (nx * ny)) % nx; + vtkm::Id idx1 = (i % (nx * ny)) / nx; + vtkm::Id idx2 = i / (nx * ny); - val = vtkm::Vec(x.GetPortalConstControl().Get(idx0), - y.GetPortalConstControl().Get(idx1), - z.GetPortalConstControl().Get(idx2)); - VTKM_TEST_ASSERT(test_equal(cpArray.GetPortalConstControl().Get(i), val), - "Wrong value in array"); - } + val = vtkm::Vec(x.GetPortalConstControl().Get(idx0), y.GetPortalConstControl().Get(idx1), + z.GetPortalConstControl().Get(idx2)); + VTKM_TEST_ASSERT(test_equal(cpArray.GetPortalConstControl().Get(i), val), + "Wrong value in array"); + } } template -void createArr(std::vector &arr, std::size_t n) +void createArr(std::vector& arr, std::size_t n) { - arr.resize(n); - for (std::size_t i = 0; i < n; i++) - arr[i] = static_cast(i); + arr.resize(n); + for (std::size_t i = 0; i < n; i++) + arr[i] = static_cast(i); } template -void -RunTest() +void RunTest() { std::size_t nX = 11, nY = 13, nZ = 11; @@ -91,31 +88,29 @@ RunTest() { for (std::size_t k = 1; k < nZ; k += 5) { - std::vector X,Y,Z; + std::vector X, Y, Z; createArr(X, nX); createArr(Y, nY); createArr(Z, nZ); - ArrayHandleCPBasic(vtkm::cont::make_ArrayHandle(X), - vtkm::cont::make_ArrayHandle(Y), + ArrayHandleCPBasic(vtkm::cont::make_ArrayHandle(X), vtkm::cont::make_ArrayHandle(Y), vtkm::cont::make_ArrayHandle(Z)); } } } } -void -TestArrayHandleCartesianProduct() +void TestArrayHandleCartesianProduct() { - RunTest(); - RunTest(); - RunTest(); + RunTest(); + RunTest(); + RunTest(); } } // namespace ArrayHandleCartesianProductNamespace -int UnitTestArrayHandleCartesianProduct(int, char *[]) +int UnitTestArrayHandleCartesianProduct(int, char* []) { - using namespace ArrayHandleCartesianProductNamespace; - return vtkm::cont::testing::Testing::Run(TestArrayHandleCartesianProduct); + using namespace ArrayHandleCartesianProductNamespace; + return vtkm::cont::testing::Testing::Run(TestArrayHandleCartesianProduct); } diff --git a/vtkm/cont/testing/UnitTestArrayHandleCompositeVector.cxx b/vtkm/cont/testing/UnitTestArrayHandleCompositeVector.cxx index eeb2b4c00..cbd298e6a 100644 --- a/vtkm/cont/testing/UnitTestArrayHandleCompositeVector.cxx +++ b/vtkm/cont/testing/UnitTestArrayHandleCompositeVector.cxx @@ -36,24 +36,21 @@ #include -namespace { +namespace +{ const vtkm::Id ARRAY_SIZE = 10; typedef vtkm::cont::StorageTagBasic StorageTag; -vtkm::FloatDefault TestValue3Ids(vtkm::Id index, - vtkm::IdComponent inComponentIndex, - int inArrayId) +vtkm::FloatDefault TestValue3Ids(vtkm::Id index, vtkm::IdComponent inComponentIndex, int inArrayId) { - return (vtkm::FloatDefault(index) + - 0.1f*vtkm::FloatDefault(inComponentIndex) + - 0.01f*vtkm::FloatDefault(inArrayId)); + return (vtkm::FloatDefault(index) + 0.1f * vtkm::FloatDefault(inComponentIndex) + + 0.01f * vtkm::FloatDefault(inArrayId)); } -template -vtkm::cont::ArrayHandle -MakeInputArray(int arrayId) +template +vtkm::cont::ArrayHandle MakeInputArray(int arrayId) { typedef vtkm::VecTraits VTraits; @@ -61,153 +58,124 @@ MakeInputArray(int arrayId) ValueType buffer[ARRAY_SIZE]; for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { - for (vtkm::IdComponent componentIndex = 0; - componentIndex < VTraits::NUM_COMPONENTS; + for (vtkm::IdComponent componentIndex = 0; componentIndex < VTraits::NUM_COMPONENTS; componentIndex++) { - VTraits::SetComponent(buffer[index], - componentIndex, + VTraits::SetComponent(buffer[index], componentIndex, TestValue3Ids(index, componentIndex, arrayId)); } } // Make an array handle that points to this buffer. typedef vtkm::cont::ArrayHandle ArrayHandleType; - ArrayHandleType bufferHandle = - vtkm::cont::make_ArrayHandle(buffer, ARRAY_SIZE); + ArrayHandleType bufferHandle = vtkm::cont::make_ArrayHandle(buffer, ARRAY_SIZE); // When this function returns, the array is going to go out of scope, which // will invalidate the array handle we just created. So copy to a new buffer // that will stick around after we return. ArrayHandleType copyHandle; - vtkm::cont::DeviceAdapterAlgorithm::Copy( - bufferHandle, copyHandle); + vtkm::cont::DeviceAdapterAlgorithm::Copy(bufferHandle, + copyHandle); return copyHandle; } -template -void CheckArray(const vtkm::cont::ArrayHandle &outArray, - const vtkm::IdComponent *inComponents, - const int *inArrayIds) +template +void CheckArray(const vtkm::cont::ArrayHandle& outArray, + const vtkm::IdComponent* inComponents, const int* inArrayIds) { // ArrayHandleCompositeVector currently does not implement the ability to // get to values on the control side, so copy to an array that is accessible. typedef vtkm::cont::ArrayHandle ArrayHandleType; ArrayHandleType arrayCopy; - vtkm::cont::DeviceAdapterAlgorithm::Copy( - outArray, arrayCopy); + vtkm::cont::DeviceAdapterAlgorithm::Copy(outArray, arrayCopy); - typename ArrayHandleType::PortalConstControl portal = - arrayCopy.GetPortalConstControl(); + typename ArrayHandleType::PortalConstControl portal = arrayCopy.GetPortalConstControl(); typedef vtkm::VecTraits VTraits; for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { ValueType retreivedValue = portal.Get(index); - for (vtkm::IdComponent componentIndex = 0; - componentIndex < VTraits::NUM_COMPONENTS; + for (vtkm::IdComponent componentIndex = 0; componentIndex < VTraits::NUM_COMPONENTS; componentIndex++) { - vtkm::FloatDefault retrievedComponent = - VTraits::GetComponent(retreivedValue, componentIndex); - vtkm::FloatDefault expectedComponent = TestValue3Ids(index, - inComponents[componentIndex], - inArrayIds[componentIndex]); - VTKM_TEST_ASSERT(retrievedComponent == expectedComponent, - "Got bad value."); + vtkm::FloatDefault retrievedComponent = VTraits::GetComponent(retreivedValue, componentIndex); + vtkm::FloatDefault expectedComponent = + TestValue3Ids(index, inComponents[componentIndex], inArrayIds[componentIndex]); + VTKM_TEST_ASSERT(retrievedComponent == expectedComponent, "Got bad value."); } } } -template +template void TryScalarArray() { - std::cout << "Creating a scalar array from one of " - << inComponents << " components." << std::endl; + std::cout << "Creating a scalar array from one of " << inComponents << " components." + << std::endl; - typedef vtkm::Vec InValueType; + typedef vtkm::Vec InValueType; typedef vtkm::cont::ArrayHandle InArrayType; int inArrayId = 0; InArrayType inArray = MakeInputArray(inArrayId); - typedef typename vtkm::cont::ArrayHandleCompositeVectorType::type - OutArrayType; - for (vtkm::IdComponent inComponentIndex = 0; - inComponentIndex < inComponents; - inComponentIndex++) + typedef typename vtkm::cont::ArrayHandleCompositeVectorType::type OutArrayType; + for (vtkm::IdComponent inComponentIndex = 0; inComponentIndex < inComponents; inComponentIndex++) { - OutArrayType outArray = - vtkm::cont::make_ArrayHandleCompositeVector(inArray, inComponentIndex); + OutArrayType outArray = vtkm::cont::make_ArrayHandleCompositeVector(inArray, inComponentIndex); CheckArray(outArray, &inComponentIndex, &inArrayId); } } -template -void TryVector4(vtkm::cont::ArrayHandle array1, - vtkm::cont::ArrayHandle array2, - vtkm::cont::ArrayHandle array3, - vtkm::cont::ArrayHandle array4) +template +void TryVector4(vtkm::cont::ArrayHandle array1, + vtkm::cont::ArrayHandle array2, + vtkm::cont::ArrayHandle array3, + vtkm::cont::ArrayHandle array4) { - int arrayIds[4] = {0, 1, 2, 3}; + int arrayIds[4] = { 0, 1, 2, 3 }; vtkm::IdComponent inComponents[4]; - for (inComponents[0] = 0; - inComponents[0] < vtkm::VecTraits::NUM_COMPONENTS; + for (inComponents[0] = 0; inComponents[0] < vtkm::VecTraits::NUM_COMPONENTS; inComponents[0]++) { - for (inComponents[1] = 0; - inComponents[1] < vtkm::VecTraits::NUM_COMPONENTS; + for (inComponents[1] = 0; inComponents[1] < vtkm::VecTraits::NUM_COMPONENTS; inComponents[1]++) { - for (inComponents[2] = 0; - inComponents[2] < vtkm::VecTraits::NUM_COMPONENTS; + for (inComponents[2] = 0; inComponents[2] < vtkm::VecTraits::NUM_COMPONENTS; inComponents[2]++) { - for (inComponents[3] = 0; - inComponents[3] < vtkm::VecTraits::NUM_COMPONENTS; + for (inComponents[3] = 0; inComponents[3] < vtkm::VecTraits::NUM_COMPONENTS; inComponents[3]++) { - CheckArray( - vtkm::cont::make_ArrayHandleCompositeVector( - array1, inComponents[0], - array2, inComponents[1], - array3, inComponents[2], - array4, inComponents[3]), - inComponents, - arrayIds); + CheckArray(vtkm::cont::make_ArrayHandleCompositeVector( + array1, inComponents[0], array2, inComponents[1], array3, inComponents[2], + array4, inComponents[3]), + inComponents, arrayIds); } } } } } -template -void TryVector3(vtkm::cont::ArrayHandle array1, - vtkm::cont::ArrayHandle array2, - vtkm::cont::ArrayHandle array3) +template +void TryVector3(vtkm::cont::ArrayHandle array1, + vtkm::cont::ArrayHandle array2, + vtkm::cont::ArrayHandle array3) { - int arrayIds[3] = {0, 1, 2}; + int arrayIds[3] = { 0, 1, 2 }; vtkm::IdComponent inComponents[3]; - for (inComponents[0] = 0; - inComponents[0] < vtkm::VecTraits::NUM_COMPONENTS; + for (inComponents[0] = 0; inComponents[0] < vtkm::VecTraits::NUM_COMPONENTS; inComponents[0]++) { - for (inComponents[1] = 0; - inComponents[1] < vtkm::VecTraits::NUM_COMPONENTS; + for (inComponents[1] = 0; inComponents[1] < vtkm::VecTraits::NUM_COMPONENTS; inComponents[1]++) { - for (inComponents[2] = 0; - inComponents[2] < vtkm::VecTraits::NUM_COMPONENTS; + for (inComponents[2] = 0; inComponents[2] < vtkm::VecTraits::NUM_COMPONENTS; inComponents[2]++) { - CheckArray( - vtkm::cont::make_ArrayHandleCompositeVector( - array1, inComponents[0], - array2, inComponents[1], - array3, inComponents[2]), - inComponents, - arrayIds); + CheckArray(vtkm::cont::make_ArrayHandleCompositeVector( + array1, inComponents[0], array2, inComponents[1], array3, inComponents[2]), + inComponents, arrayIds); } } } @@ -215,64 +183,51 @@ void TryVector3(vtkm::cont::ArrayHandle array1, std::cout << " Fourth component from Scalar." << std::endl; TryVector4(array1, array2, array3, MakeInputArray(3)); std::cout << " Fourth component from Vector4." << std::endl; - TryVector4(array1, - array2, - array3, - MakeInputArray >(3)); + TryVector4(array1, array2, array3, MakeInputArray>(3)); } -template -void TryVector2(vtkm::cont::ArrayHandle array1, - vtkm::cont::ArrayHandle array2) +template +void TryVector2(vtkm::cont::ArrayHandle array1, + vtkm::cont::ArrayHandle array2) { - int arrayIds[2] = {0, 1}; + int arrayIds[2] = { 0, 1 }; vtkm::IdComponent inComponents[2]; - for (inComponents[0] = 0; - inComponents[0] < vtkm::VecTraits::NUM_COMPONENTS; + for (inComponents[0] = 0; inComponents[0] < vtkm::VecTraits::NUM_COMPONENTS; inComponents[0]++) { - for (inComponents[1] = 0; - inComponents[1] < vtkm::VecTraits::NUM_COMPONENTS; + for (inComponents[1] = 0; inComponents[1] < vtkm::VecTraits::NUM_COMPONENTS; inComponents[1]++) { - CheckArray( - vtkm::cont::make_ArrayHandleCompositeVector( - array1, inComponents[0], - array2, inComponents[1]), - inComponents, - arrayIds); + CheckArray(vtkm::cont::make_ArrayHandleCompositeVector(array1, inComponents[0], array2, + inComponents[1]), + inComponents, arrayIds); } } std::cout << " Third component from Scalar." << std::endl; TryVector3(array1, array2, MakeInputArray(2)); std::cout << " Third component from Vector2." << std::endl; - TryVector3(array1, - array2, - MakeInputArray >(2)); + TryVector3(array1, array2, MakeInputArray>(2)); } -template -void TryVector1(vtkm::cont::ArrayHandle array1) +template +void TryVector1(vtkm::cont::ArrayHandle array1) { - int arrayIds[1] = {0}; + int arrayIds[1] = { 0 }; vtkm::IdComponent inComponents[1]; - for (inComponents[0] = 0; - inComponents[0] < vtkm::VecTraits::NUM_COMPONENTS; + for (inComponents[0] = 0; inComponents[0] < vtkm::VecTraits::NUM_COMPONENTS; inComponents[0]++) { - CheckArray( - vtkm::cont::make_ArrayHandleCompositeVector(array1, inComponents[0]), - inComponents, - arrayIds); + CheckArray(vtkm::cont::make_ArrayHandleCompositeVector(array1, inComponents[0]), inComponents, + arrayIds); } std::cout << " Second component from Scalar." << std::endl; TryVector2(array1, MakeInputArray(1)); std::cout << " Second component from Vector4." << std::endl; - TryVector2(array1, MakeInputArray >(1)); + TryVector2(array1, MakeInputArray>(1)); } void TryVector() @@ -282,7 +237,7 @@ void TryVector() std::cout << " First component from Scalar." << std::endl; TryVector1(MakeInputArray(0)); std::cout << " First component from Vector3." << std::endl; - TryVector1(MakeInputArray >(0)); + TryVector1(MakeInputArray>(0)); } void TrySpecialArrays() @@ -295,50 +250,46 @@ void TrySpecialArrays() typedef vtkm::cont::ArrayHandleConstant ArrayType2; ArrayType2 array2(295, ARRAY_SIZE); - typedef vtkm::cont::ArrayHandleCompositeVectorType::type - CompositeArrayType; + typedef vtkm::cont::ArrayHandleCompositeVectorType::type + CompositeArrayType; CompositeArrayType compositeArray = - vtkm::cont::make_ArrayHandleCompositeVector(array1, 0, array2, 0); + vtkm::cont::make_ArrayHandleCompositeVector(array1, 0, array2, 0); vtkm::cont::printSummary_ArrayHandle(compositeArray, std::cout); std::cout << std::endl; - VTKM_TEST_ASSERT(compositeArray.GetNumberOfValues() == ARRAY_SIZE, - "Wrong array size."); + VTKM_TEST_ASSERT(compositeArray.GetNumberOfValues() == ARRAY_SIZE, "Wrong array size."); - CompositeArrayType::PortalConstControl compositePortal = - compositeArray.GetPortalConstControl(); + CompositeArrayType::PortalConstControl compositePortal = compositeArray.GetPortalConstControl(); for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { - VTKM_TEST_ASSERT( - test_equal(compositePortal.Get(index), vtkm::Id2(index,295)), - "Bad value."); + VTKM_TEST_ASSERT(test_equal(compositePortal.Get(index), vtkm::Id2(index, 295)), "Bad value."); } } -void TestBadArrayLengths() { - std::cout << "Checking behavior when size of input arrays do not agree." - << std::endl; +void TestBadArrayLengths() +{ + std::cout << "Checking behavior when size of input arrays do not agree." << std::endl; typedef vtkm::cont::ArrayHandle InArrayType; InArrayType longInArray = MakeInputArray(0); InArrayType shortInArray = MakeInputArray(1); - shortInArray.Shrink(ARRAY_SIZE/2); + shortInArray.Shrink(ARRAY_SIZE / 2); try { - vtkm::cont::make_ArrayHandleCompositeVector(longInArray,0, shortInArray,0); + vtkm::cont::make_ArrayHandleCompositeVector(longInArray, 0, shortInArray, 0); VTKM_TEST_FAIL("Did not get exception like expected."); } - catch (vtkm::cont::ErrorBadValue &error) + catch (vtkm::cont::ErrorBadValue& error) { - std::cout << "Got expected error: " << std::endl - << error.GetMessage() << std::endl; + std::cout << "Got expected error: " << std::endl << error.GetMessage() << std::endl; } } -void TestCompositeVector() { +void TestCompositeVector() +{ TryScalarArray<2>(); TryScalarArray<3>(); TryScalarArray<4>(); @@ -352,7 +303,7 @@ void TestCompositeVector() { } // anonymous namespace -int UnitTestArrayHandleCompositeVector(int, char *[]) +int UnitTestArrayHandleCompositeVector(int, char* []) { return vtkm::cont::testing::Testing::Run(TestCompositeVector); } diff --git a/vtkm/cont/testing/UnitTestArrayHandleConcatenate.cxx b/vtkm/cont/testing/UnitTestArrayHandleConcatenate.cxx index b149ce4f9..3fe976d94 100644 --- a/vtkm/cont/testing/UnitTestArrayHandleConcatenate.cxx +++ b/vtkm/cont/testing/UnitTestArrayHandleConcatenate.cxx @@ -23,60 +23,59 @@ #include -namespace UnitTestArrayHandleConcatenateNamespace { +namespace UnitTestArrayHandleConcatenateNamespace +{ const vtkm::Id ARRAY_SIZE = 5; void TestArrayHandleConcatenate() { - vtkm::cont::ArrayHandleIndex array1( ARRAY_SIZE ); - vtkm::cont::ArrayHandleIndex array2( 2*ARRAY_SIZE ); + vtkm::cont::ArrayHandleIndex array1(ARRAY_SIZE); + vtkm::cont::ArrayHandleIndex array2(2 * ARRAY_SIZE); - vtkm::cont::ArrayHandleConcatenate< vtkm::cont::ArrayHandleIndex, - vtkm::cont::ArrayHandleIndex > - array3( array1, array2 ); + vtkm::cont::ArrayHandleConcatenate + array3(array1, array2); - vtkm::cont::ArrayHandleIndex array4( ARRAY_SIZE ); - vtkm::cont::ArrayHandleConcatenate< - vtkm::cont::ArrayHandleConcatenate< vtkm::cont::ArrayHandleIndex, // 1st - vtkm::cont::ArrayHandleIndex >, // ArrayHandle - vtkm::cont::ArrayHandleIndex > // 2nd ArrayHandle - array5; + vtkm::cont::ArrayHandleIndex array4(ARRAY_SIZE); + vtkm::cont::ArrayHandleConcatenate< + vtkm::cont::ArrayHandleConcatenate, // ArrayHandle + vtkm::cont::ArrayHandleIndex> // 2nd ArrayHandle + array5; { - array5 = vtkm::cont::make_ArrayHandleConcatenate( array3, array4 ); + array5 = vtkm::cont::make_ArrayHandleConcatenate(array3, array4); } for (vtkm::Id index = 0; index < array5.GetNumberOfValues(); index++) { - std::cout << array5.GetPortalConstControl().Get( index ) << std::endl; + std::cout << array5.GetPortalConstControl().Get(index) << std::endl; } } void TestConcatenateEmptyArray() { - std::vector< vtkm::Float64 > vec; - for( vtkm::Id i = 0; i < ARRAY_SIZE; i++ ) - vec.push_back( vtkm::Float64(i) * 1.5 ); - - typedef vtkm::Float64 CoeffValueType; - typedef vtkm::cont::ArrayHandle CoeffArrayTypeTmp; - typedef vtkm::cont::ArrayHandleConcatenate< CoeffArrayTypeTmp, CoeffArrayTypeTmp> - ArrayConcat; - typedef vtkm::cont::ArrayHandleConcatenate< ArrayConcat, CoeffArrayTypeTmp > ArrayConcat2; + std::vector vec; + for (vtkm::Id i = 0; i < ARRAY_SIZE; i++) + vec.push_back(vtkm::Float64(i) * 1.5); - CoeffArrayTypeTmp arr1 = vtkm::cont::make_ArrayHandle( vec ); + typedef vtkm::Float64 CoeffValueType; + typedef vtkm::cont::ArrayHandle CoeffArrayTypeTmp; + typedef vtkm::cont::ArrayHandleConcatenate ArrayConcat; + typedef vtkm::cont::ArrayHandleConcatenate ArrayConcat2; + + CoeffArrayTypeTmp arr1 = vtkm::cont::make_ArrayHandle(vec); CoeffArrayTypeTmp arr2, arr3; - - ArrayConcat arrConc( arr2, arr1 ); - ArrayConcat2 arrConc2( arrConc, arr3 ); - for( vtkm::Id i = 0; i < arrConc2.GetNumberOfValues(); i++ ) - std::cout << arrConc2.GetPortalConstControl().Get(i) << std::endl; + ArrayConcat arrConc(arr2, arr1); + ArrayConcat2 arrConc2(arrConc, arr3); + + for (vtkm::Id i = 0; i < arrConc2.GetNumberOfValues(); i++) + std::cout << arrConc2.GetPortalConstControl().Get(i) << std::endl; } } // namespace UnitTestArrayHandleIndexNamespace -int UnitTestArrayHandleConcatenate(int, char *[]) +int UnitTestArrayHandleConcatenate(int, char* []) { using namespace UnitTestArrayHandleConcatenateNamespace; //TestConcatenateEmptyArray(); diff --git a/vtkm/cont/testing/UnitTestArrayHandleCounting.cxx b/vtkm/cont/testing/UnitTestArrayHandleCounting.cxx index 322a9af6a..494edd98c 100644 --- a/vtkm/cont/testing/UnitTestArrayHandleCounting.cxx +++ b/vtkm/cont/testing/UnitTestArrayHandleCounting.cxx @@ -26,7 +26,8 @@ #include -namespace UnitTestArrayHandleCountingNamespace { +namespace UnitTestArrayHandleCountingNamespace +{ const vtkm::Id ARRAY_SIZE = 10; @@ -48,12 +49,9 @@ public: operator vtkm::Id() const { return vtkm::Id(this->Value.size()); } - StringInt operator+(const StringInt &rhs) const - { - return StringInt(this->Value + rhs.Value); - } + StringInt operator+(const StringInt& rhs) const { return StringInt(this->Value + rhs.Value); } - StringInt operator*(const StringInt &rhs) const + StringInt operator*(const StringInt& rhs) const { StringInt result; for (vtkm::Id i = 0; i < rhs; i++) @@ -63,19 +61,19 @@ public: return result; } - bool operator==(const StringInt &other) const - { - return this->Value.size() == other.Value.size(); - } + bool operator==(const StringInt& other) const { return this->Value.size() == other.Value.size(); } - StringInt &operator++() + StringInt& operator++() { this->Value.append("."); return *this; } private: - StringInt(const std::string &v) : Value(v) { } + StringInt(const std::string& v) + : Value(v) + { + } std::string Value; }; @@ -84,27 +82,28 @@ private: VTKM_BASIC_TYPE_VECTOR(UnitTestArrayHandleCountingNamespace::StringInt) -namespace UnitTestArrayHandleCountingNamespace { +namespace UnitTestArrayHandleCountingNamespace +{ -template< typename ValueType> +template struct TemplatedTests { typedef vtkm::cont::ArrayHandleCounting ArrayHandleType; - typedef vtkm::cont::ArrayHandle::Tag> - ArrayHandleType2; + typedef vtkm::cont::ArrayHandle< + ValueType, typename vtkm::cont::internal::ArrayHandleCountingTraits::Tag> + ArrayHandleType2; typedef typename ArrayHandleType::PortalConstControl PortalType; - void operator()(const ValueType &startingValue, const ValueType &step) + void operator()(const ValueType& startingValue, const ValueType& step) { ArrayHandleType arrayConst(startingValue, step, ARRAY_SIZE); - ArrayHandleType arrayMake = vtkm::cont::make_ArrayHandleCounting(startingValue, step, ARRAY_SIZE); + ArrayHandleType arrayMake = + vtkm::cont::make_ArrayHandleCounting(startingValue, step, ARRAY_SIZE); - ArrayHandleType2 arrayHandle = - ArrayHandleType2(PortalType(startingValue, step, ARRAY_SIZE)); + ArrayHandleType2 arrayHandle = ArrayHandleType2(PortalType(startingValue, step, ARRAY_SIZE)); VTKM_TEST_ASSERT(arrayConst.GetNumberOfValues() == ARRAY_SIZE, "Counting array using constructor has wrong size."); @@ -142,10 +141,9 @@ void TestArrayHandleCounting() TemplatedTests()(StringInt(10), StringInt(2)); } - } // namespace UnitTestArrayHandleCountingNamespace -int UnitTestArrayHandleCounting(int, char *[]) +int UnitTestArrayHandleCounting(int, char* []) { using namespace UnitTestArrayHandleCountingNamespace; return vtkm::cont::testing::Testing::Run(TestArrayHandleCounting); diff --git a/vtkm/cont/testing/UnitTestArrayHandleDiscard.cxx b/vtkm/cont/testing/UnitTestArrayHandleDiscard.cxx index f6a790e2e..7668fe6b0 100644 --- a/vtkm/cont/testing/UnitTestArrayHandleDiscard.cxx +++ b/vtkm/cont/testing/UnitTestArrayHandleDiscard.cxx @@ -85,8 +85,7 @@ struct Test for (vtkm::Id i = 0; i < NUM_KEYS; ++i) { - VTKM_TEST_ASSERT(outputs.Get(i) == refData[i], - "Unexpected output value after ReduceByKey."); + VTKM_TEST_ASSERT(outputs.Get(i) == refData[i], "Unexpected output value after ReduceByKey."); } } @@ -136,7 +135,7 @@ void TestArrayHandleDiscard() } // end namespace UnitTestArrayHandleDiscardDetail -int UnitTestArrayHandleDiscard(int, char *[]) +int UnitTestArrayHandleDiscard(int, char* []) { using namespace UnitTestArrayHandleDiscardDetail; return vtkm::cont::testing::Testing::Run(TestArrayHandleDiscard); diff --git a/vtkm/cont/testing/UnitTestArrayHandleImplicit.cxx b/vtkm/cont/testing/UnitTestArrayHandleImplicit.cxx index 3332baf7b..9f97a983f 100644 --- a/vtkm/cont/testing/UnitTestArrayHandleImplicit.cxx +++ b/vtkm/cont/testing/UnitTestArrayHandleImplicit.cxx @@ -28,57 +28,53 @@ #include -namespace { +namespace +{ const vtkm::Id ARRAY_SIZE = 10; -template +template struct IndexSquared { VTKM_EXEC_CONT ValueType operator()(vtkm::Id i) const { typedef typename vtkm::VecTraits::ComponentType ComponentType; - return ValueType(static_cast(i*i)); + return ValueType(static_cast(i * i)); } }; - struct ImplicitTests { - template + template void operator()(const ValueType) const { typedef IndexSquared FunctorType; FunctorType functor; - typedef vtkm::cont::ArrayHandleImplicit - ImplicitHandle; + typedef vtkm::cont::ArrayHandleImplicit ImplicitHandle; - ImplicitHandle implict = - vtkm::cont::make_ArrayHandleImplicit(functor,ARRAY_SIZE); + ImplicitHandle implict = vtkm::cont::make_ArrayHandleImplicit(functor, ARRAY_SIZE); //verify that the control portal works - for(int i=0; i < ARRAY_SIZE; ++i) - { + for (int i = 0; i < ARRAY_SIZE; ++i) + { const ValueType v = implict.GetPortalConstControl().Get(i); const ValueType correct_value = functor(i); - VTKM_TEST_ASSERT(v == correct_value, "Implicit Handle Failed"); - } + VTKM_TEST_ASSERT(v == correct_value, "Implicit Handle Failed"); + } //verify that the execution portal works typedef vtkm::cont::DeviceAdapterTagSerial Device; - typedef typename ImplicitHandle::template ExecutionTypes - ::PortalConst CEPortal; + typedef typename ImplicitHandle::template ExecutionTypes::PortalConst CEPortal; CEPortal execPortal = implict.PrepareForInput(Device()); - for(int i=0; i < ARRAY_SIZE; ++i) - { + for (int i = 0; i < ARRAY_SIZE; ++i) + { const ValueType v = execPortal.Get(i); const ValueType correct_value = functor(i); VTKM_TEST_ASSERT(v == correct_value, "Implicit Handle Failed"); - } + } } - }; void TestArrayHandleImplicit() @@ -86,11 +82,9 @@ void TestArrayHandleImplicit() vtkm::testing::Testing::TryTypes(ImplicitTests(), vtkm::TypeListTagCommon()); } - - } // annonymous namespace -int UnitTestArrayHandleImplicit(int, char *[]) +int UnitTestArrayHandleImplicit(int, char* []) { return vtkm::cont::testing::Testing::Run(TestArrayHandleImplicit); } diff --git a/vtkm/cont/testing/UnitTestArrayHandleIndex.cxx b/vtkm/cont/testing/UnitTestArrayHandleIndex.cxx index 796c81c44..b49e69efc 100644 --- a/vtkm/cont/testing/UnitTestArrayHandleIndex.cxx +++ b/vtkm/cont/testing/UnitTestArrayHandleIndex.cxx @@ -22,7 +22,8 @@ #include -namespace UnitTestArrayHandleIndexNamespace { +namespace UnitTestArrayHandleIndexNamespace +{ const vtkm::Id ARRAY_SIZE = 10; @@ -40,7 +41,7 @@ void TestArrayHandleIndex() } // namespace UnitTestArrayHandleIndexNamespace -int UnitTestArrayHandleIndex(int, char *[]) +int UnitTestArrayHandleIndex(int, char* []) { using namespace UnitTestArrayHandleIndexNamespace; return vtkm::cont::testing::Testing::Run(TestArrayHandleIndex); diff --git a/vtkm/cont/testing/UnitTestArrayHandlePermutation.cxx b/vtkm/cont/testing/UnitTestArrayHandlePermutation.cxx index 093790dfc..920d76ce1 100644 --- a/vtkm/cont/testing/UnitTestArrayHandlePermutation.cxx +++ b/vtkm/cont/testing/UnitTestArrayHandlePermutation.cxx @@ -33,60 +33,60 @@ #include -namespace { +namespace +{ const vtkm::Id ARRAY_SIZE = 10; -struct DoubleIndexFunctor { +struct DoubleIndexFunctor +{ VTKM_EXEC_CONT - vtkm::Id operator()(vtkm::Id index) const { - return 2*index; - } + vtkm::Id operator()(vtkm::Id index) const { return 2 * index; } }; -typedef vtkm::cont::ArrayHandleImplicit - DoubleIndexArrayType; +typedef vtkm::cont::ArrayHandleImplicit DoubleIndexArrayType; -template +template struct CheckPermutationFunctor : vtkm::exec::FunctorBase { PermutedPortalType PermutedPortal; VTKM_EXEC - void operator()(vtkm::Id index) const { + void operator()(vtkm::Id index) const + { typedef typename PermutedPortalType::ValueType T; T value = this->PermutedPortal.Get(index); - vtkm::Id permutedIndex = 2*index; + vtkm::Id permutedIndex = 2 * index; T expectedValue = TestValue(permutedIndex, T()); - if (!test_equal(value, expectedValue)) { + if (!test_equal(value, expectedValue)) + { this->RaiseError("Encountered bad transformed value."); } } }; -template -VTKM_CONT -CheckPermutationFunctor< - typename PermutedArrayHandleType::template ExecutionTypes::PortalConst> -make_CheckPermutationFunctor(const PermutedArrayHandleType &permutedArray, - Device) +template +VTKM_CONT CheckPermutationFunctor< + typename PermutedArrayHandleType::template ExecutionTypes::PortalConst> +make_CheckPermutationFunctor(const PermutedArrayHandleType& permutedArray, Device) { - typedef typename PermutedArrayHandleType::template ExecutionTypes::PortalConst PermutedPortalType; + typedef typename PermutedArrayHandleType::template ExecutionTypes::PortalConst + PermutedPortalType; CheckPermutationFunctor functor; functor.PermutedPortal = permutedArray.PrepareForInput(Device()); return functor; } -template +template struct InPlacePermutationFunctor : vtkm::exec::FunctorBase { PermutedPortalType PermutedPortal; VTKM_EXEC - void operator()(vtkm::Id index) const { + void operator()(vtkm::Id index) const + { typedef typename PermutedPortalType::ValueType T; T value = this->PermutedPortal.Get(index); @@ -96,120 +96,107 @@ struct InPlacePermutationFunctor : vtkm::exec::FunctorBase } }; -template -VTKM_CONT -InPlacePermutationFunctor< - typename PermutedArrayHandleType::template ExecutionTypes::Portal> -make_InPlacePermutationFunctor(PermutedArrayHandleType &permutedArray, - Device) +template +VTKM_CONT InPlacePermutationFunctor< + typename PermutedArrayHandleType::template ExecutionTypes::Portal> +make_InPlacePermutationFunctor(PermutedArrayHandleType& permutedArray, Device) { - typedef typename PermutedArrayHandleType::template ExecutionTypes::Portal PermutedPortalType; + typedef + typename PermutedArrayHandleType::template ExecutionTypes::Portal PermutedPortalType; InPlacePermutationFunctor functor; functor.PermutedPortal = permutedArray.PrepareForInPlace(Device()); return functor; } -template -VTKM_CONT -void CheckInPlaceResult(PortalType portal) +template +VTKM_CONT void CheckInPlaceResult(PortalType portal) { typedef typename PortalType::ValueType T; - for (vtkm::Id permutedIndex = 0; - permutedIndex < 2*ARRAY_SIZE; - permutedIndex++) + for (vtkm::Id permutedIndex = 0; permutedIndex < 2 * ARRAY_SIZE; permutedIndex++) { - if (permutedIndex%2 == 0) + if (permutedIndex % 2 == 0) { // This index was part of the permuted array; has a value changed T expectedValue = TestValue(permutedIndex, T()) + T(1000); - T retrievedValue = portal.Get(permutedIndex ); - VTKM_TEST_ASSERT(test_equal(expectedValue, retrievedValue), - "Permuted set unexpected value."); + T retrievedValue = portal.Get(permutedIndex); + VTKM_TEST_ASSERT(test_equal(expectedValue, retrievedValue), "Permuted set unexpected value."); } else { // This index was not part of the permuted array; has original value T expectedValue = TestValue(permutedIndex, T()); - T retrievedValue = portal.Get(permutedIndex ); + T retrievedValue = portal.Get(permutedIndex); VTKM_TEST_ASSERT(test_equal(expectedValue, retrievedValue), "Permuted array modified value it should not have."); } } } -template +template struct OutputPermutationFunctor : vtkm::exec::FunctorBase { PermutedPortalType PermutedPortal; VTKM_EXEC - void operator()(vtkm::Id index) const { + void operator()(vtkm::Id index) const + { typedef typename PermutedPortalType::ValueType T; this->PermutedPortal.Set(index, TestValue(static_cast(index), T())); } }; -template -VTKM_CONT -OutputPermutationFunctor< - typename PermutedArrayHandleType::template ExecutionTypes::Portal> -make_OutputPermutationFunctor(PermutedArrayHandleType &permutedArray, - Device) +template +VTKM_CONT OutputPermutationFunctor< + typename PermutedArrayHandleType::template ExecutionTypes::Portal> +make_OutputPermutationFunctor(PermutedArrayHandleType& permutedArray, Device) { - typedef typename PermutedArrayHandleType::template ExecutionTypes::Portal PermutedPortalType; + typedef + typename PermutedArrayHandleType::template ExecutionTypes::Portal PermutedPortalType; OutputPermutationFunctor functor; functor.PermutedPortal = permutedArray.PrepareForOutput(ARRAY_SIZE, Device()); return functor; } -template -VTKM_CONT -void CheckOutputResult(PortalType portal) +template +VTKM_CONT void CheckOutputResult(PortalType portal) { typedef typename PortalType::ValueType T; - for (vtkm::IdComponent permutedIndex = 0; - permutedIndex < 2*ARRAY_SIZE; - permutedIndex++) + for (vtkm::IdComponent permutedIndex = 0; permutedIndex < 2 * ARRAY_SIZE; permutedIndex++) { - if (permutedIndex%2 == 0) + if (permutedIndex % 2 == 0) { // This index was part of the permuted array; has a value changed - vtkm::Id originalIndex = permutedIndex/2; + vtkm::Id originalIndex = permutedIndex / 2; T expectedValue = TestValue(originalIndex, T()); - T retrievedValue = portal.Get(permutedIndex ); - VTKM_TEST_ASSERT(test_equal(expectedValue, retrievedValue), - "Permuted set unexpected value."); + T retrievedValue = portal.Get(permutedIndex); + VTKM_TEST_ASSERT(test_equal(expectedValue, retrievedValue), "Permuted set unexpected value."); } else { // This index was not part of the permuted array; has original value T expectedValue = TestValue(permutedIndex, T()); - T retrievedValue = portal.Get(permutedIndex ); + T retrievedValue = portal.Get(permutedIndex); VTKM_TEST_ASSERT(test_equal(expectedValue, retrievedValue), "Permuted array modified value it should not have."); } } } -template +template struct PermutationTests { - typedef vtkm::cont::ArrayHandleImplicit - IndexArrayType; - typedef vtkm::cont::ArrayHandle - ValueArrayType; - typedef vtkm::cont::ArrayHandlePermutation - PermutationArrayType; + typedef vtkm::cont::ArrayHandleImplicit IndexArrayType; + typedef vtkm::cont::ArrayHandle ValueArrayType; + typedef vtkm::cont::ArrayHandlePermutation PermutationArrayType; typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG Device; typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; - ValueArrayType MakeValueArray() const { + ValueArrayType MakeValueArray() const + { // Allocate a buffer and set initial values - std::vector buffer(2*ARRAY_SIZE); - for (vtkm::IdComponent index = 0; index < 2*ARRAY_SIZE; index++) + std::vector buffer(2 * ARRAY_SIZE); + for (vtkm::IdComponent index = 0; index < 2 * ARRAY_SIZE; index++) { vtkm::UInt32 i = static_cast(index); buffer[i] = TestValue(index, ValueType()); @@ -237,40 +224,31 @@ struct PermutationTests VTKM_TEST_ASSERT(permutationArray.GetNumberOfValues() == ARRAY_SIZE, "Permutation array wrong size."); - VTKM_TEST_ASSERT( - permutationArray.GetPortalControl().GetNumberOfValues() == ARRAY_SIZE, - "Permutation portal wrong size."); - VTKM_TEST_ASSERT( - permutationArray.GetPortalConstControl().GetNumberOfValues() - == ARRAY_SIZE, - "Permutation portal wrong size."); + VTKM_TEST_ASSERT(permutationArray.GetPortalControl().GetNumberOfValues() == ARRAY_SIZE, + "Permutation portal wrong size."); + VTKM_TEST_ASSERT(permutationArray.GetPortalConstControl().GetNumberOfValues() == ARRAY_SIZE, + "Permutation portal wrong size."); std::cout << "Test initial values in execution environment" << std::endl; - Algorithm::Schedule(make_CheckPermutationFunctor(permutationArray, Device()), - ARRAY_SIZE); + Algorithm::Schedule(make_CheckPermutationFunctor(permutationArray, Device()), ARRAY_SIZE); std::cout << "Try in place operation" << std::endl; - Algorithm::Schedule( - make_InPlacePermutationFunctor(permutationArray, Device()), - ARRAY_SIZE); + Algorithm::Schedule(make_InPlacePermutationFunctor(permutationArray, Device()), ARRAY_SIZE); CheckInPlaceResult(valueArray.GetPortalControl()); CheckInPlaceResult(valueArray.GetPortalConstControl()); std::cout << "Try output operation" << std::endl; - Algorithm::Schedule( - make_OutputPermutationFunctor(permutationArray, Device()), - ARRAY_SIZE); + Algorithm::Schedule(make_OutputPermutationFunctor(permutationArray, Device()), ARRAY_SIZE); CheckOutputResult(valueArray.GetPortalConstControl()); CheckOutputResult(valueArray.GetPortalControl()); } - }; - struct TryInputType { - template - void operator()(InputType) const { + template + void operator()(InputType) const + { PermutationTests()(); } }; @@ -280,11 +258,9 @@ void TestArrayHandlePermutation() vtkm::testing::Testing::TryTypes(TryInputType(), vtkm::TypeListTagCommon()); } - - } // annonymous namespace -int UnitTestArrayHandlePermutation(int, char *[]) +int UnitTestArrayHandlePermutation(int, char* []) { return vtkm::cont::testing::Testing::Run(TestArrayHandlePermutation); } diff --git a/vtkm/cont/testing/UnitTestArrayHandleReverse.cxx b/vtkm/cont/testing/UnitTestArrayHandleReverse.cxx index 956eaa3a9..3e510671b 100644 --- a/vtkm/cont/testing/UnitTestArrayHandleReverse.cxx +++ b/vtkm/cont/testing/UnitTestArrayHandleReverse.cxx @@ -23,15 +23,18 @@ #include #include -namespace UnitTestArrayHandleIndexNamespace { +namespace UnitTestArrayHandleIndexNamespace +{ const vtkm::Id ARRAY_SIZE = 10; -void TestArrayHandleReverse() { +void TestArrayHandleReverse() +{ vtkm::cont::ArrayHandleIndex array(ARRAY_SIZE); VTKM_TEST_ASSERT(array.GetNumberOfValues() == ARRAY_SIZE, "Bad size."); - for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { + for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) + { VTKM_TEST_ASSERT(array.GetPortalConstControl().Get(index) == index, "Index array has unexpected value."); } @@ -39,17 +42,17 @@ void TestArrayHandleReverse() { vtkm::cont::ArrayHandleReverse reverse = vtkm::cont::make_ArrayHandleReverse(array); - for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { - VTKM_TEST_ASSERT(reverse.GetPortalConstControl().Get(index) == array.GetPortalConstControl().Get(9 - index), + for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) + { + VTKM_TEST_ASSERT(reverse.GetPortalConstControl().Get(index) == + array.GetPortalConstControl().Get(9 - index), "ArrayHandleReverse does not reverse array"); } - } -};// namespace UnitTestArrayHandleIndexNamespace +}; // namespace UnitTestArrayHandleIndexNamespace -int UnitTestArrayHandleReverse(int, char *[]) { +int UnitTestArrayHandleReverse(int, char* []) +{ using namespace UnitTestArrayHandleIndexNamespace; return vtkm::cont::testing::Testing::Run(TestArrayHandleReverse); } - - diff --git a/vtkm/cont/testing/UnitTestArrayHandleTransform.cxx b/vtkm/cont/testing/UnitTestArrayHandleTransform.cxx index 26c11dcb6..039ac8626 100644 --- a/vtkm/cont/testing/UnitTestArrayHandleTransform.cxx +++ b/vtkm/cont/testing/UnitTestArrayHandleTransform.cxx @@ -32,78 +32,73 @@ #include -namespace { +namespace +{ const vtkm::Id ARRAY_SIZE = 10; -template +template struct MySquare { - template - VTKM_EXEC - ValueType operator()(U u) const - { return vtkm::dot(u, u); } + template + VTKM_EXEC ValueType operator()(U u) const + { + return vtkm::dot(u, u); + } }; -template +template struct CheckTransformFunctor : vtkm::exec::FunctorBase { OriginalPortalType OriginalPortal; TransformedPortalType TransformedPortal; VTKM_EXEC - void operator()(vtkm::Id index) const { + void operator()(vtkm::Id index) const + { typedef typename TransformedPortalType::ValueType T; - typename OriginalPortalType::ValueType original = - this->OriginalPortal.Get(index); + typename OriginalPortalType::ValueType original = this->OriginalPortal.Get(index); T transformed = this->TransformedPortal.Get(index); - if (!test_equal(transformed, MySquare()(original))) { + if (!test_equal(transformed, MySquare()(original))) + { this->RaiseError("Encountered bad transformed value."); } } }; -template -VTKM_CONT -CheckTransformFunctor< - typename OriginalArrayHandleType::template ExecutionTypes::PortalConst, - typename TransformedArrayHandleType::template ExecutionTypes::PortalConst> -make_CheckTransformFunctor(const OriginalArrayHandleType &originalArray, - const TransformedArrayHandleType &transformedArray, - Device) +template +VTKM_CONT CheckTransformFunctor< + typename OriginalArrayHandleType::template ExecutionTypes::PortalConst, + typename TransformedArrayHandleType::template ExecutionTypes::PortalConst> +make_CheckTransformFunctor(const OriginalArrayHandleType& originalArray, + const TransformedArrayHandleType& transformedArray, Device) { - typedef typename OriginalArrayHandleType::template ExecutionTypes::PortalConst OriginalPortalType; - typedef typename TransformedArrayHandleType::template ExecutionTypes::PortalConst TransformedPortalType; + typedef typename OriginalArrayHandleType::template ExecutionTypes::PortalConst + OriginalPortalType; + typedef typename TransformedArrayHandleType::template ExecutionTypes::PortalConst + TransformedPortalType; CheckTransformFunctor functor; functor.OriginalPortal = originalArray.PrepareForInput(Device()); functor.TransformedPortal = transformedArray.PrepareForInput(Device()); return functor; } -template -VTKM_CONT -void CheckControlPortals(const OriginalArrayHandleType &originalArray, - const TransformedArrayHandleType &transformedArray) +template +VTKM_CONT void CheckControlPortals(const OriginalArrayHandleType& originalArray, + const TransformedArrayHandleType& transformedArray) { std::cout << " Verify that the control portal works" << std::endl; - typedef typename OriginalArrayHandleType::PortalConstControl - OriginalPortalType; - typedef typename TransformedArrayHandleType::PortalConstControl - TransformedPortalType; + typedef typename OriginalArrayHandleType::PortalConstControl OriginalPortalType; + typedef typename TransformedArrayHandleType::PortalConstControl TransformedPortalType; - VTKM_TEST_ASSERT( - originalArray.GetNumberOfValues()==transformedArray.GetNumberOfValues(), - "Number of values in transformed array incorrect."); + VTKM_TEST_ASSERT(originalArray.GetNumberOfValues() == transformedArray.GetNumberOfValues(), + "Number of values in transformed array incorrect."); OriginalPortalType originalPortal = originalArray.GetPortalConstControl(); - TransformedPortalType transformedPortal = - transformedArray.GetPortalConstControl(); + TransformedPortalType transformedPortal = transformedArray.GetPortalConstControl(); - VTKM_TEST_ASSERT(originalPortal.GetNumberOfValues() - == transformedPortal.GetNumberOfValues(), + VTKM_TEST_ASSERT(originalPortal.GetNumberOfValues() == transformedPortal.GetNumberOfValues(), "Number of values in transformed portal incorrect."); for (vtkm::Id index = 0; index < originalArray.GetNumberOfValues(); index++) @@ -111,25 +106,23 @@ void CheckControlPortals(const OriginalArrayHandleType &originalArray, typedef typename TransformedPortalType::ValueType T; typename OriginalPortalType::ValueType original = originalPortal.Get(index); T transformed = transformedPortal.Get(index); - VTKM_TEST_ASSERT(test_equal(transformed, MySquare()(original)), - "Bad transform value."); + VTKM_TEST_ASSERT(test_equal(transformed, MySquare()(original)), "Bad transform value."); } } -template +template struct TransformTests { - typedef typename vtkm::VecTraits::ComponentType - OutputValueType; + typedef typename vtkm::VecTraits::ComponentType OutputValueType; typedef MySquare FunctorType; - typedef vtkm::cont::ArrayHandleTransform, - FunctorType> TransformHandle; + typedef vtkm::cont::ArrayHandleTransform, + FunctorType> + TransformHandle; - typedef vtkm::cont::ArrayHandleTransform, - FunctorType> CountingTransformHandle; + typedef vtkm::cont::ArrayHandleTransform< + OutputValueType, vtkm::cont::ArrayHandleCounting, FunctorType> + CountingTransformHandle; typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG Device; typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; @@ -138,68 +131,55 @@ struct TransformTests { FunctorType functor; - std::cout << "Test a transform handle with a counting handle as the values" - << std::endl; - vtkm::cont::ArrayHandleCounting counting = - vtkm::cont::make_ArrayHandleCounting(InputValueType(OutputValueType(0)), - InputValueType(1), - ARRAY_SIZE); + std::cout << "Test a transform handle with a counting handle as the values" << std::endl; + vtkm::cont::ArrayHandleCounting counting = vtkm::cont::make_ArrayHandleCounting( + InputValueType(OutputValueType(0)), InputValueType(1), ARRAY_SIZE); CountingTransformHandle countingTransformed = vtkm::cont::make_ArrayHandleTransform(counting, functor); CheckControlPortals(counting, countingTransformed); std::cout << " Verify that the execution portal works" << std::endl; - Algorithm::Schedule( - make_CheckTransformFunctor(counting, countingTransformed, Device()), - ARRAY_SIZE); + Algorithm::Schedule(make_CheckTransformFunctor(counting, countingTransformed, Device()), + ARRAY_SIZE); - std::cout << "Test a transform handle with a normal handle as the values" - << std::endl; + std::cout << "Test a transform handle with a normal handle as the values" << std::endl; //we are going to connect the two handles up, and than fill //the values and make the transform sees the new values in the handle vtkm::cont::ArrayHandle input; - TransformHandle thandle(input,functor); + TransformHandle thandle(input, functor); - typedef typename vtkm::cont::ArrayHandle::PortalControl - Portal; + typedef typename vtkm::cont::ArrayHandle::PortalControl Portal; input.Allocate(ARRAY_SIZE); Portal portal = input.GetPortalControl(); - for(vtkm::Id index=0; index < ARRAY_SIZE; ++index) + for (vtkm::Id index = 0; index < ARRAY_SIZE; ++index) { - portal.Set(index, TestValue(index, InputValueType()) ); + portal.Set(index, TestValue(index, InputValueType())); } CheckControlPortals(input, thandle); std::cout << " Verify that the execution portal works" << std::endl; - Algorithm::Schedule( - make_CheckTransformFunctor(input, thandle, Device()), - ARRAY_SIZE); + Algorithm::Schedule(make_CheckTransformFunctor(input, thandle, Device()), ARRAY_SIZE); - std::cout << "Modify array handle values to ensure transform gets updated" - << std::endl; - for(vtkm::Id index=0; index < ARRAY_SIZE; ++index) + std::cout << "Modify array handle values to ensure transform gets updated" << std::endl; + for (vtkm::Id index = 0; index < ARRAY_SIZE; ++index) { - portal.Set(index, TestValue(index*index, InputValueType())); + portal.Set(index, TestValue(index * index, InputValueType())); } CheckControlPortals(input, thandle); std::cout << " Verify that the execution portal works" << std::endl; - Algorithm::Schedule( - make_CheckTransformFunctor(input, thandle, Device()), - ARRAY_SIZE); - + Algorithm::Schedule(make_CheckTransformFunctor(input, thandle, Device()), ARRAY_SIZE); } - }; - struct TryInputType { - template - void operator()(InputType) const { + template + void operator()(InputType) const + { TransformTests()(); } }; @@ -209,11 +189,9 @@ void TestArrayHandleTransform() vtkm::testing::Testing::TryTypes(TryInputType()); } - - } // annonymous namespace -int UnitTestArrayHandleTransform(int, char *[]) +int UnitTestArrayHandleTransform(int, char* []) { return vtkm::cont::testing::Testing::Run(TestArrayHandleTransform); } diff --git a/vtkm/cont/testing/UnitTestArrayHandleUniformPointCoordinates.cxx b/vtkm/cont/testing/UnitTestArrayHandleUniformPointCoordinates.cxx index 75f79a0d5..a3e069197 100644 --- a/vtkm/cont/testing/UnitTestArrayHandleUniformPointCoordinates.cxx +++ b/vtkm/cont/testing/UnitTestArrayHandleUniformPointCoordinates.cxx @@ -22,11 +22,12 @@ #include -namespace { +namespace +{ typedef vtkm::Vec Vector3; -const vtkm::Id3 DIMENSIONS(16, 18, 5); +const vtkm::Id3 DIMENSIONS(16, 18, 5); const vtkm::Id NUM_POINTS = 1440; const Vector3 ORIGIN(-20, 5, -10); @@ -36,18 +37,14 @@ void TestArrayHandleUniformPointCoordinates() { std::cout << "Creating ArrayHandleUniformPointCoordinates" << std::endl; - vtkm::cont::ArrayHandleUniformPointCoordinates arrayHandle( - DIMENSIONS, ORIGIN, SPACING); + vtkm::cont::ArrayHandleUniformPointCoordinates arrayHandle(DIMENSIONS, ORIGIN, SPACING); VTKM_TEST_ASSERT(arrayHandle.GetNumberOfValues() == NUM_POINTS, "Array computed wrong number of points."); std::cout << "Getting array portal." << std::endl; - vtkm::internal::ArrayPortalUniformPointCoordinates portal = - arrayHandle.GetPortalConstControl(); - VTKM_TEST_ASSERT(portal.GetNumberOfValues() == NUM_POINTS, - "Portal has wrong number of points."); - VTKM_TEST_ASSERT(portal.GetRange3() == DIMENSIONS, - "Portal range is wrong."); + vtkm::internal::ArrayPortalUniformPointCoordinates portal = arrayHandle.GetPortalConstControl(); + VTKM_TEST_ASSERT(portal.GetNumberOfValues() == NUM_POINTS, "Portal has wrong number of points."); + VTKM_TEST_ASSERT(portal.GetRange3() == DIMENSIONS, "Portal range is wrong."); std::cout << "Checking computed values of portal." << std::endl; Vector3 expectedValue; @@ -79,8 +76,7 @@ void TestArrayHandleUniformPointCoordinates() } // anonymous namespace -int UnitTestArrayHandleUniformPointCoordinates(int, char *[]) +int UnitTestArrayHandleUniformPointCoordinates(int, char* []) { - return vtkm::cont::testing::Testing::Run( - TestArrayHandleUniformPointCoordinates); + return vtkm::cont::testing::Testing::Run(TestArrayHandleUniformPointCoordinates); } diff --git a/vtkm/cont/testing/UnitTestArrayPortalToIterators.cxx b/vtkm/cont/testing/UnitTestArrayPortalToIterators.cxx index 4192cfecd..d7c36c60e 100644 --- a/vtkm/cont/testing/UnitTestArrayPortalToIterators.cxx +++ b/vtkm/cont/testing/UnitTestArrayPortalToIterators.cxx @@ -24,9 +24,10 @@ #include -namespace { +namespace +{ -template +template struct TemplatedTests { static const vtkm::Id ARRAY_SIZE = 10; @@ -36,7 +37,7 @@ struct TemplatedTests static ValueType ExpectedValue(vtkm::Id index, ComponentType value) { - return ValueType(static_cast(index+static_cast(value))); + return ValueType(static_cast(index + static_cast(value))); } class ReadOnlyArrayPortal @@ -45,7 +46,10 @@ struct TemplatedTests typedef T ValueType; VTKM_CONT - ReadOnlyArrayPortal(ComponentType value) : Value(value) { } + ReadOnlyArrayPortal(ComponentType value) + : Value(value) + { + } VTKM_CONT vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; } @@ -63,13 +67,17 @@ struct TemplatedTests typedef T ValueType; VTKM_CONT - WriteOnlyArrayPortal(ComponentType value) : Value(value) { } + WriteOnlyArrayPortal(ComponentType value) + : Value(value) + { + } VTKM_CONT vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; } VTKM_CONT - void Set(vtkm::Id index, const ValueType &value) const { + void Set(vtkm::Id index, const ValueType& value) const + { VTKM_TEST_ASSERT(value == ExpectedValue(index, this->Value), "Set unexpected value in array portal."); } @@ -78,7 +86,7 @@ struct TemplatedTests ComponentType Value; }; - template + template void FillIterator(IteratorType begin, IteratorType end, ComponentType value) { std::cout << " Check distance" << std::endl; @@ -94,10 +102,8 @@ struct TemplatedTests } } - template - bool CheckIterator(IteratorType begin, - IteratorType end, - ComponentType value) + template + bool CheckIterator(IteratorType begin, IteratorType end, ComponentType value) { std::cout << " Check distance" << std::endl; VTKM_TEST_ASSERT(std::distance(begin, end) == ARRAY_SIZE, @@ -122,16 +128,13 @@ struct TemplatedTests static const ComponentType READ_VALUE = 23; ArrayPortalType portal(READ_VALUE); - std::cout << " Testing read-only iterators with ArrayPortalToIterators." - << std::endl; + std::cout << " Testing read-only iterators with ArrayPortalToIterators." << std::endl; GetIteratorsType iterators(portal); CheckIterator(iterators.GetBegin(), iterators.GetEnd(), READ_VALUE); - std::cout << " Testing read-only iterators with convenience functions." - << std::endl; + std::cout << " Testing read-only iterators with convenience functions." << std::endl; CheckIterator(vtkm::cont::ArrayPortalToIteratorBegin(portal), - vtkm::cont::ArrayPortalToIteratorEnd(portal), - READ_VALUE); + vtkm::cont::ArrayPortalToIteratorEnd(portal), READ_VALUE); } void TestIteratorWrite() @@ -139,19 +142,16 @@ struct TemplatedTests typedef WriteOnlyArrayPortal ArrayPortalType; typedef vtkm::cont::ArrayPortalToIterators GetIteratorsType; - static const ComponentType WRITE_VALUE = 63; + static const ComponentType WRITE_VALUE = 63; ArrayPortalType portal(WRITE_VALUE); - std::cout << " Testing write-only iterators with ArrayPortalToIterators." - << std::endl; + std::cout << " Testing write-only iterators with ArrayPortalToIterators." << std::endl; GetIteratorsType iterators(portal); FillIterator(iterators.GetBegin(), iterators.GetEnd(), WRITE_VALUE); - std::cout << " Testing write-only iterators with convenience functions." - << std::endl; + std::cout << " Testing write-only iterators with convenience functions." << std::endl; FillIterator(vtkm::cont::ArrayPortalToIteratorBegin(portal), - vtkm::cont::ArrayPortalToIteratorEnd(portal), - WRITE_VALUE); + vtkm::cont::ArrayPortalToIteratorEnd(portal), WRITE_VALUE); } void operator()() @@ -163,7 +163,7 @@ struct TemplatedTests struct TestFunctor { - template + template void operator()(T) const { TemplatedTests tests; @@ -178,7 +178,7 @@ void TestArrayPortalToIterators() } // Anonymous namespace -int UnitTestArrayPortalToIterators(int, char *[]) +int UnitTestArrayPortalToIterators(int, char* []) { return vtkm::cont::testing::Testing::Run(TestArrayPortalToIterators); } diff --git a/vtkm/cont/testing/UnitTestContTesting.cxx b/vtkm/cont/testing/UnitTestContTesting.cxx index 5330ebdcc..75a853fbe 100644 --- a/vtkm/cont/testing/UnitTestContTesting.cxx +++ b/vtkm/cont/testing/UnitTestContTesting.cxx @@ -25,7 +25,8 @@ #include -namespace { +namespace +{ void TestFail() { @@ -45,7 +46,7 @@ void GoodAssert() } // anonymous namespace -int UnitTestContTesting(int, char *[]) +int UnitTestContTesting(int, char* []) { std::cout << "-------\nThis call should fail." << std::endl; if (vtkm::cont::testing::Testing::Run(TestFail) == 0) diff --git a/vtkm/cont/testing/UnitTestDataSetBuilderExplicit.cxx b/vtkm/cont/testing/UnitTestDataSetBuilderExplicit.cxx index 75d94cc93..2ad0c910f 100644 --- a/vtkm/cont/testing/UnitTestDataSetBuilderExplicit.cxx +++ b/vtkm/cont/testing/UnitTestDataSetBuilderExplicit.cxx @@ -28,39 +28,34 @@ #include -namespace DataSetBuilderExplicitNamespace { +namespace DataSetBuilderExplicitNamespace +{ typedef vtkm::cont::DeviceAdapterAlgorithm DFA; template -vtkm::Bounds ComputeBounds(std::size_t numPoints, const T *coords) +vtkm::Bounds ComputeBounds(std::size_t numPoints, const T* coords) { vtkm::Bounds bounds; for (std::size_t i = 0; i < numPoints; i++) { - bounds.Include(vtkm::Vec(coords[i*3+0],coords[i*3+1],coords[i*3+2])); + bounds.Include(vtkm::Vec(coords[i * 3 + 0], coords[i * 3 + 1], coords[i * 3 + 2])); } return bounds; } -void ValidateDataSet(const vtkm::cont::DataSet &ds, - vtkm::Id numPoints, - vtkm::Id numCells, - const vtkm::Bounds &bounds) +void ValidateDataSet(const vtkm::cont::DataSet& ds, vtkm::Id numPoints, vtkm::Id numCells, + const vtkm::Bounds& bounds) { //Verify basics.. - VTKM_TEST_ASSERT(ds.GetNumberOfCellSets() == 1, - "Wrong number of cell sets."); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, - "Wrong number of fields."); - VTKM_TEST_ASSERT(ds.GetNumberOfCoordinateSystems() == 1, - "Wrong number of coordinate systems."); + VTKM_TEST_ASSERT(ds.GetNumberOfCellSets() == 1, "Wrong number of cell sets."); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, "Wrong number of fields."); + VTKM_TEST_ASSERT(ds.GetNumberOfCoordinateSystems() == 1, "Wrong number of coordinate systems."); VTKM_TEST_ASSERT(ds.GetCoordinateSystem().GetData().GetNumberOfValues() == numPoints, "Wrong number of coordinates."); - VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == numCells, - "Wrong number of cells."); + VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == numCells, "Wrong number of cells."); // test various field-getting methods and associations try @@ -71,7 +66,7 @@ void ValidateDataSet(const vtkm::cont::DataSet &ds, { VTKM_TEST_FAIL("Failed to get field 'cellvar' with ASSOC_CELL_SET."); } - + try { ds.GetField("pointvar", vtkm::cont::Field::ASSOC_POINTS); @@ -83,13 +78,11 @@ void ValidateDataSet(const vtkm::cont::DataSet &ds, //Make sure bounds are correct. vtkm::Bounds computedBounds = ds.GetCoordinateSystem().GetBounds(); - VTKM_TEST_ASSERT(test_equal(bounds, computedBounds), - "Bounds of coordinates do not match"); + VTKM_TEST_ASSERT(test_equal(bounds, computedBounds), "Bounds of coordinates do not match"); } template -std::vector -createVec(std::size_t n, const T *data) +std::vector createVec(std::size_t n, const T* data) { std::vector vec(n); for (std::size_t i = 0; i < n; i++) @@ -100,8 +93,7 @@ createVec(std::size_t n, const T *data) } template -vtkm::cont::ArrayHandle -createAH(std::size_t n, const T *data) +vtkm::cont::ArrayHandle createAH(std::size_t n, const T* data) { vtkm::cont::ArrayHandle arr; DFA::Copy(vtkm::cont::make_ArrayHandle(data, static_cast(n)), arr); @@ -109,13 +101,10 @@ createAH(std::size_t n, const T *data) } template -vtkm::cont::DataSet -CreateDataSetArr(bool useSeparatedCoords, - std::size_t numPoints, const T *coords, - std::size_t numCells, std::size_t numConn, - const vtkm::Id *conn, - const vtkm::IdComponent *indices, - const vtkm::UInt8 *shape) +vtkm::cont::DataSet CreateDataSetArr(bool useSeparatedCoords, std::size_t numPoints, + const T* coords, std::size_t numCells, std::size_t numConn, + const vtkm::Id* conn, const vtkm::IdComponent* indices, + const vtkm::UInt8* shape) { vtkm::cont::DataSet dataSet; vtkm::cont::DataSetFieldAdd dsf; @@ -123,27 +112,25 @@ CreateDataSetArr(bool useSeparatedCoords, if (useSeparatedCoords) { std::vector xvals(numPoints), yvals(numPoints), zvals(numPoints); - std::vector varP(numPoints), varC(numCells); + std::vector varP(numPoints), varC(numCells); for (std::size_t i = 0; i < numPoints; i++) { - xvals[i] = coords[i*3 + 0]; - yvals[i] = coords[i*3 + 1]; - zvals[i] = coords[i*3 + 2]; - varP[i] = static_cast(i*1.1f); + xvals[i] = coords[i * 3 + 0]; + yvals[i] = coords[i * 3 + 1]; + zvals[i] = coords[i * 3 + 2]; + varP[i] = static_cast(i * 1.1f); } for (std::size_t i = 0; i < numCells; i++) { - varC[i] = static_cast(i*1.1f); + varC[i] = static_cast(i * 1.1f); } - vtkm::cont::ArrayHandle X,Y,Z,P,C; + vtkm::cont::ArrayHandle X, Y, Z, P, C; DFA::Copy(vtkm::cont::make_ArrayHandle(xvals), X); DFA::Copy(vtkm::cont::make_ArrayHandle(yvals), Y); DFA::Copy(vtkm::cont::make_ArrayHandle(zvals), Z); DFA::Copy(vtkm::cont::make_ArrayHandle(varP), P); DFA::Copy(vtkm::cont::make_ArrayHandle(varC), C); - dataSet = dsb.Create(X,Y,Z, - createAH(numCells, shape), - createAH(numCells, indices), + dataSet = dsb.Create(X, Y, Z, createAH(numCells, shape), createAH(numCells, indices), createAH(numConn, conn)); dsf.AddPointField(dataSet, "pointvar", P); dsf.AddCellField(dataSet, "cellvar", C); @@ -151,24 +138,22 @@ CreateDataSetArr(bool useSeparatedCoords, } else { - std::vector > tmp(numPoints); - std::vector > varP(numPoints), varC(numCells); + std::vector> tmp(numPoints); + std::vector> varP(numPoints), varC(numCells); for (std::size_t i = 0; i < numPoints; i++) { - tmp[i][0] = coords[i*3 + 0]; - tmp[i][1] = coords[i*3 + 1]; - tmp[i][2] = coords[i*3 + 2]; - varP[i][0] = static_cast(i*1.1f); + tmp[i][0] = coords[i * 3 + 0]; + tmp[i][1] = coords[i * 3 + 1]; + tmp[i][2] = coords[i * 3 + 2]; + varP[i][0] = static_cast(i * 1.1f); } for (std::size_t i = 0; i < numCells; i++) { - varC[i][0] = static_cast(i*1.1f); + varC[i][0] = static_cast(i * 1.1f); } - vtkm::cont::ArrayHandle > pts; + vtkm::cont::ArrayHandle> pts; DFA::Copy(vtkm::cont::make_ArrayHandle(tmp), pts); - dataSet = dsb.Create(pts, - createAH(numCells, shape), - createAH(numCells, indices), + dataSet = dsb.Create(pts, createAH(numCells, shape), createAH(numCells, indices), createAH(numConn, conn)); dsf.AddPointField(dataSet, "pointvar", varP); dsf.AddCellField(dataSet, "cellvar", varC); @@ -177,13 +162,10 @@ CreateDataSetArr(bool useSeparatedCoords, } template -vtkm::cont::DataSet -CreateDataSetVec(bool useSeparatedCoords, - std::size_t numPoints, const T *coords, - std::size_t numCells, std::size_t numConn, - const vtkm::Id *conn, - const vtkm::IdComponent *indices, - const vtkm::UInt8 *shape) +vtkm::cont::DataSet CreateDataSetVec(bool useSeparatedCoords, std::size_t numPoints, + const T* coords, std::size_t numCells, std::size_t numConn, + const vtkm::Id* conn, const vtkm::IdComponent* indices, + const vtkm::UInt8* shape) { vtkm::cont::DataSet dataSet; vtkm::cont::DataSetFieldAdd dsf; @@ -194,18 +176,16 @@ CreateDataSetVec(bool useSeparatedCoords, std::vector X(numPoints), Y(numPoints), Z(numPoints), varP(numPoints), varC(numCells); for (std::size_t i = 0; i < numPoints; i++) { - X[i] = coords[i*3 + 0]; - Y[i] = coords[i*3 + 1]; - Z[i] = coords[i*3 + 2]; - varP[i] = static_cast(i*1.1f); + X[i] = coords[i * 3 + 0]; + Y[i] = coords[i * 3 + 1]; + Z[i] = coords[i * 3 + 2]; + varP[i] = static_cast(i * 1.1f); } for (std::size_t i = 0; i < numCells; i++) { - varC[i] = static_cast(i*1.1f); + varC[i] = static_cast(i * 1.1f); } - dataSet = dsb.Create(X,Y,Z, - createVec(numCells, shape), - createVec(numCells, indices), + dataSet = dsb.Create(X, Y, Z, createVec(numCells, shape), createVec(numCells, indices), createVec(numConn, conn)); dsf.AddPointField(dataSet, "pointvar", varP); dsf.AddCellField(dataSet, "cellvar", varC); @@ -213,22 +193,20 @@ CreateDataSetVec(bool useSeparatedCoords, } else { - std::vector > pts(numPoints); - std::vector > varP(numPoints), varC(numCells); + std::vector> pts(numPoints); + std::vector> varP(numPoints), varC(numCells); for (std::size_t i = 0; i < numPoints; i++) { - pts[i][0] = coords[i*3 + 0]; - pts[i][1] = coords[i*3 + 1]; - pts[i][2] = coords[i*3 + 2]; - varP[i][0] = static_cast(i*1.1f); + pts[i][0] = coords[i * 3 + 0]; + pts[i][1] = coords[i * 3 + 1]; + pts[i][2] = coords[i * 3 + 2]; + varP[i][0] = static_cast(i * 1.1f); } for (std::size_t i = 0; i < numCells; i++) { - varC[i][0] = static_cast(i*1.1f); + varC[i][0] = static_cast(i * 1.1f); } - dataSet = dsb.Create(pts, - createVec(numCells, shape), - createVec(numCells, indices), + dataSet = dsb.Create(pts, createVec(numCells, shape), createVec(numCells, indices), createVec(numConn, conn)); dsf.AddPointField(dataSet, "pointvar", varP); dsf.AddCellField(dataSet, "cellvar", varC); @@ -236,23 +214,20 @@ CreateDataSetVec(bool useSeparatedCoords, } } -#define TEST_DATA(num) \ - vtkm::cont::testing::ExplicitData##num::numPoints, \ - vtkm::cont::testing::ExplicitData##num::coords, \ - vtkm::cont::testing::ExplicitData##num::numCells, \ - vtkm::cont::testing::ExplicitData##num::numConn, \ - vtkm::cont::testing::ExplicitData##num::conn, \ - vtkm::cont::testing::ExplicitData##num::numIndices, \ +#define TEST_DATA(num) \ + vtkm::cont::testing::ExplicitData##num::numPoints, \ + vtkm::cont::testing::ExplicitData##num::coords, \ + vtkm::cont::testing::ExplicitData##num::numCells, \ + vtkm::cont::testing::ExplicitData##num::numConn, vtkm::cont::testing::ExplicitData##num::conn, \ + vtkm::cont::testing::ExplicitData##num::numIndices, \ vtkm::cont::testing::ExplicitData##num::shapes -#define TEST_NUMS(num) \ - vtkm::cont::testing::ExplicitData##num::numPoints, \ +#define TEST_NUMS(num) \ + vtkm::cont::testing::ExplicitData##num::numPoints, \ vtkm::cont::testing::ExplicitData##num::numCells -#define TEST_BOUNDS(num) \ - vtkm::cont::testing::ExplicitData##num::numPoints, \ - vtkm::cont::testing::ExplicitData##num::coords +#define TEST_BOUNDS(num) \ + vtkm::cont::testing::ExplicitData##num::numPoints, vtkm::cont::testing::ExplicitData##num::coords -void -TestDataSetBuilderExplicit() +void TestDataSetBuilderExplicit() { vtkm::cont::DataSetBuilderExplicit dsb; vtkm::cont::DataSet ds; @@ -263,30 +238,30 @@ TestDataSetBuilderExplicit() { //Test ExplicitData0 bounds = ComputeBounds(TEST_BOUNDS(0)); - ds = CreateDataSetArr(i==0,TEST_DATA(0)); + ds = CreateDataSetArr(i == 0, TEST_DATA(0)); ValidateDataSet(ds, TEST_NUMS(0), bounds); - ds = CreateDataSetVec(i==0, TEST_DATA(0)); + ds = CreateDataSetVec(i == 0, TEST_DATA(0)); ValidateDataSet(ds, TEST_NUMS(0), bounds); //Test ExplicitData1 bounds = ComputeBounds(TEST_BOUNDS(1)); - ds = CreateDataSetArr(i==0,TEST_DATA(1)); + ds = CreateDataSetArr(i == 0, TEST_DATA(1)); ValidateDataSet(ds, TEST_NUMS(1), bounds); - ds = CreateDataSetVec(i==0, TEST_DATA(1)); + ds = CreateDataSetVec(i == 0, TEST_DATA(1)); ValidateDataSet(ds, TEST_NUMS(1), bounds); //Test ExplicitData2 bounds = ComputeBounds(TEST_BOUNDS(2)); - ds = CreateDataSetArr(i==0,TEST_DATA(2)); + ds = CreateDataSetArr(i == 0, TEST_DATA(2)); ValidateDataSet(ds, TEST_NUMS(2), bounds); - ds = CreateDataSetVec(i==0, TEST_DATA(2)); + ds = CreateDataSetVec(i == 0, TEST_DATA(2)); ValidateDataSet(ds, TEST_NUMS(2), bounds); } } } // namespace DataSetBuilderExplicitNamespace -int UnitTestDataSetBuilderExplicit(int, char *[]) +int UnitTestDataSetBuilderExplicit(int, char* []) { using namespace DataSetBuilderExplicitNamespace; return vtkm::cont::testing::Testing::Run(TestDataSetBuilderExplicit); diff --git a/vtkm/cont/testing/UnitTestDataSetBuilderRectilinear.cxx b/vtkm/cont/testing/UnitTestDataSetBuilderRectilinear.cxx index 0c43d8d1a..b88c62575 100644 --- a/vtkm/cont/testing/UnitTestDataSetBuilderRectilinear.cxx +++ b/vtkm/cont/testing/UnitTestDataSetBuilderRectilinear.cxx @@ -30,26 +30,21 @@ #include #include -namespace DataSetBuilderRectilinearNamespace { +namespace DataSetBuilderRectilinearNamespace +{ std::mt19937 g_RandomGenerator; -void ValidateDataSet(const vtkm::cont::DataSet &ds, - int dim, - vtkm::Id numPoints, vtkm::Id numCells, - const vtkm::Bounds &bounds) +void ValidateDataSet(const vtkm::cont::DataSet& ds, int dim, vtkm::Id numPoints, vtkm::Id numCells, + const vtkm::Bounds& bounds) { //Verify basics.. - VTKM_TEST_ASSERT(ds.GetNumberOfCellSets() == 1, - "Wrong number of cell sets."); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, - "Wrong number of fields."); - VTKM_TEST_ASSERT(ds.GetNumberOfCoordinateSystems() == 1, - "Wrong number of coordinate systems."); + VTKM_TEST_ASSERT(ds.GetNumberOfCellSets() == 1, "Wrong number of cell sets."); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, "Wrong number of fields."); + VTKM_TEST_ASSERT(ds.GetNumberOfCoordinateSystems() == 1, "Wrong number of coordinate systems."); VTKM_TEST_ASSERT(ds.GetCoordinateSystem().GetData().GetNumberOfValues() == numPoints, "Wrong number of coordinates."); - VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == numCells, - "Wrong number of cells."); + VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == numCells, "Wrong number of cells."); // test various field-getting methods and associations try @@ -72,8 +67,7 @@ void ValidateDataSet(const vtkm::cont::DataSet &ds, //Make sure the bounds are correct. vtkm::Bounds res = ds.GetCoordinateSystem().GetBounds(); - VTKM_TEST_ASSERT(test_equal(bounds, res), - "Bounds of coordinates do not match"); + VTKM_TEST_ASSERT(test_equal(bounds, res), "Bounds of coordinates do not match"); if (dim == 2) { vtkm::cont::CellSetStructured<2> cellSet; @@ -91,9 +85,7 @@ void ValidateDataSet(const vtkm::cont::DataSet &ds, } template -void FillArray(std::vector &arr, - vtkm::Id size, - vtkm::IdComponent fillMethod) +void FillArray(std::vector& arr, vtkm::Id size, vtkm::IdComponent fillMethod) { arr.resize(static_cast(size)); for (size_t i = 0; i < static_cast(size); i++) @@ -102,20 +94,29 @@ void FillArray(std::vector &arr, switch (fillMethod) { - case 0: break; - case 1: xi /= static_cast(size-1); break; - case 2: xi *= 2; break; - case 3: xi *= 0.1f; break; - case 4: xi *= xi; break; - default: VTKM_TEST_FAIL("Bad internal test state: invalid fill method."); + case 0: + break; + case 1: + xi /= static_cast(size - 1); + break; + case 2: + xi *= 2; + break; + case 3: + xi *= 0.1f; + break; + case 4: + xi *= xi; + break; + default: + VTKM_TEST_FAIL("Bad internal test state: invalid fill method."); } arr[i] = xi; } } template -void -RectilinearTests() +void RectilinearTests() { const vtkm::Id NUM_TRIALS = 10; const vtkm::Id MAX_DIM_SIZE = 20; @@ -125,25 +126,22 @@ RectilinearTests() vtkm::cont::DataSet dataSet; vtkm::cont::DataSetFieldAdd dsf; - std::uniform_int_distribution randomDim(2,MAX_DIM_SIZE); - std::uniform_int_distribution randomFill(0,NUM_FILL_METHODS-1); + std::uniform_int_distribution randomDim(2, MAX_DIM_SIZE); + std::uniform_int_distribution randomFill(0, NUM_FILL_METHODS - 1); for (vtkm::Id trial = 0; trial < NUM_TRIALS; trial++) { std::cout << "Trial " << trial << std::endl; - vtkm::Id3 dimensions(randomDim(g_RandomGenerator), - randomDim(g_RandomGenerator), + vtkm::Id3 dimensions(randomDim(g_RandomGenerator), randomDim(g_RandomGenerator), randomDim(g_RandomGenerator)); std::cout << "Dimensions: " << dimensions << std::endl; vtkm::IdComponent fillMethodX = randomFill(g_RandomGenerator); vtkm::IdComponent fillMethodY = randomFill(g_RandomGenerator); vtkm::IdComponent fillMethodZ = randomFill(g_RandomGenerator); - std::cout << "Fill methods: [" - << fillMethodX << "," - << fillMethodY << "," - << fillMethodZ << "]" << std::endl; + std::cout << "Fill methods: [" << fillMethodX << "," << fillMethodY << "," << fillMethodZ << "]" + << std::endl; std::vector xCoordinates; std::vector yCoordinates; @@ -153,20 +151,20 @@ RectilinearTests() FillArray(zCoordinates, dimensions[2], fillMethodZ); vtkm::Id numPoints, numCells; - vtkm::Bounds bounds(0,0, 0,0, 0,0); + vtkm::Bounds bounds(0, 0, 0, 0, 0, 0); std::cout << "1D cases" << std::endl; numPoints = dimensions[0]; - numCells = dimensions[0]-1; + numCells = dimensions[0] - 1; std::vector varP1D(static_cast(numPoints)); for (unsigned long i = 0; i < static_cast(numPoints); i++) { - varP1D[i] = static_cast(i*1.1f); + varP1D[i] = static_cast(i * 1.1f); } std::vector varC1D(static_cast(numCells)); for (unsigned long i = 0; i < static_cast(numCells); i++) { - varC1D[i] = static_cast(i*1.1f); + varC1D[i] = static_cast(i * 1.1f); } bounds.X = vtkm::Range(xCoordinates.front(), xCoordinates.back()); std::cout << " Create with std::vector" << std::endl; @@ -176,17 +174,17 @@ RectilinearTests() ValidateDataSet(dataSet, 1, numPoints, numCells, bounds); std::cout << "2D cases" << std::endl; - numPoints = dimensions[0]*dimensions[1]; - numCells = (dimensions[0]-1)*(dimensions[1]-1); + numPoints = dimensions[0] * dimensions[1]; + numCells = (dimensions[0] - 1) * (dimensions[1] - 1); std::vector varP2D(static_cast(numPoints)); for (unsigned long i = 0; i < static_cast(numPoints); i++) { - varP2D[i] = static_cast(i*1.1f); + varP2D[i] = static_cast(i * 1.1f); } std::vector varC2D(static_cast(numCells)); for (unsigned long i = 0; i < static_cast(numCells); i++) { - varC2D[i] = static_cast(i*1.1f); + varC2D[i] = static_cast(i * 1.1f); } bounds.Y = vtkm::Range(yCoordinates.front(), yCoordinates.back()); std::cout << " Create with std::vector" << std::endl; @@ -196,9 +194,7 @@ RectilinearTests() ValidateDataSet(dataSet, 2, numPoints, numCells, bounds); std::cout << " Create with C array" << std::endl; - dataSet = dataSetBuilder.Create(dimensions[0], - dimensions[1], - &xCoordinates.front(), + dataSet = dataSetBuilder.Create(dimensions[0], dimensions[1], &xCoordinates.front(), &yCoordinates.front()); dsf.AddPointField(dataSet, "pointvar", &varP2D.front(), numPoints); dsf.AddCellField(dataSet, "cellvar", &varC2D.front(), numCells); @@ -213,16 +209,17 @@ RectilinearTests() std::cout << "3D cases" << std::endl; numPoints *= dimensions[2]; - numCells *= dimensions[2]-1; + numCells *= dimensions[2] - 1; std::vector varP3D(static_cast(numPoints)); for (unsigned long i = 0; i < static_cast(numPoints); i++) { - varP3D[i] = static_cast(i*1.1f);; + varP3D[i] = static_cast(i * 1.1f); + ; } std::vector varC3D(static_cast(numCells)); for (unsigned long i = 0; i < static_cast(numCells); i++) { - varC3D[i] = static_cast(i*1.1f); + varC3D[i] = static_cast(i * 1.1f); } bounds.Z = vtkm::Range(zCoordinates.front(), zCoordinates.back()); @@ -233,12 +230,9 @@ RectilinearTests() ValidateDataSet(dataSet, 3, numPoints, numCells, bounds); std::cout << " Create with C array" << std::endl; - dataSet = dataSetBuilder.Create(dimensions[0], - dimensions[1], - dimensions[2], - &xCoordinates.front(), - &yCoordinates.front(), - &zCoordinates.front()); + dataSet = + dataSetBuilder.Create(dimensions[0], dimensions[1], dimensions[2], &xCoordinates.front(), + &yCoordinates.front(), &zCoordinates.front()); dsf.AddPointField(dataSet, "pointvar", vtkm::cont::make_ArrayHandle(varP3D)); dsf.AddCellField(dataSet, "cellvar", vtkm::cont::make_ArrayHandle(varC3D)); ValidateDataSet(dataSet, 3, numPoints, numCells, bounds); @@ -253,8 +247,7 @@ RectilinearTests() } } -void -TestDataSetBuilderRectilinear() +void TestDataSetBuilderRectilinear() { vtkm::UInt32 seed = static_cast(std::time(nullptr)); std::cout << "Seed: " << seed << std::endl; @@ -268,8 +261,8 @@ TestDataSetBuilderRectilinear() } // namespace DataSetBuilderRectilinearNamespace -int UnitTestDataSetBuilderRectilinear(int, char *[]) +int UnitTestDataSetBuilderRectilinear(int, char* []) { - using namespace DataSetBuilderRectilinearNamespace; - return vtkm::cont::testing::Testing::Run(TestDataSetBuilderRectilinear); + using namespace DataSetBuilderRectilinearNamespace; + return vtkm::cont::testing::Testing::Run(TestDataSetBuilderRectilinear); } diff --git a/vtkm/cont/testing/UnitTestDataSetBuilderUniform.cxx b/vtkm/cont/testing/UnitTestDataSetBuilderUniform.cxx index 384362b5d..51725ed03 100644 --- a/vtkm/cont/testing/UnitTestDataSetBuilderUniform.cxx +++ b/vtkm/cont/testing/UnitTestDataSetBuilderUniform.cxx @@ -30,26 +30,21 @@ #include #include -namespace DataSetBuilderUniformNamespace { +namespace DataSetBuilderUniformNamespace +{ std::mt19937 g_RandomGenerator; -void ValidateDataSet(const vtkm::cont::DataSet &ds, - int dim, - vtkm::Id numPoints, vtkm::Id numCells, +void ValidateDataSet(const vtkm::cont::DataSet& ds, int dim, vtkm::Id numPoints, vtkm::Id numCells, vtkm::Bounds bounds) { //Verify basics.. - VTKM_TEST_ASSERT(ds.GetNumberOfCellSets() == 1, - "Wrong number of cell sets."); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, - "Wrong number of fields."); - VTKM_TEST_ASSERT(ds.GetNumberOfCoordinateSystems() == 1, - "Wrong number of coordinate systems."); + VTKM_TEST_ASSERT(ds.GetNumberOfCellSets() == 1, "Wrong number of cell sets."); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, "Wrong number of fields."); + VTKM_TEST_ASSERT(ds.GetNumberOfCoordinateSystems() == 1, "Wrong number of coordinate systems."); VTKM_TEST_ASSERT(ds.GetCoordinateSystem().GetData().GetNumberOfValues() == numPoints, "Wrong number of coordinates."); - VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == numCells, - "Wrong number of cells."); + VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == numCells, "Wrong number of cells."); // test various field-getting methods and associations try @@ -72,8 +67,7 @@ void ValidateDataSet(const vtkm::cont::DataSet &ds, //Make sure bounds are correct. vtkm::Bounds res = ds.GetCoordinateSystem().GetBounds(); - VTKM_TEST_ASSERT(test_equal(bounds, res), - "Bounds of coordinates do not match"); + VTKM_TEST_ASSERT(test_equal(bounds, res), "Bounds of coordinates do not match"); if (dim == 1) { vtkm::cont::CellSetStructured<1> cellSet; @@ -98,9 +92,7 @@ void ValidateDataSet(const vtkm::cont::DataSet &ds, } template -vtkm::Range FillMethod(vtkm::IdComponent method, - vtkm::Id dimensionSize, - T &origin, T &spacing) +vtkm::Range FillMethod(vtkm::IdComponent method, vtkm::Id dimensionSize, T& origin, T& spacing) { switch (method) { @@ -110,14 +102,14 @@ vtkm::Range FillMethod(vtkm::IdComponent method, break; case 1: origin = 0; - spacing = static_cast(1.0/static_cast(dimensionSize)); + spacing = static_cast(1.0 / static_cast(dimensionSize)); break; case 2: origin = 0; spacing = 2; break; case 3: - origin = static_cast(-(dimensionSize-1)); + origin = static_cast(-(dimensionSize - 1)); spacing = 1; break; case 4: @@ -130,12 +122,11 @@ vtkm::Range FillMethod(vtkm::IdComponent method, break; } - return vtkm::Range(origin, origin + static_cast(dimensionSize-1)*spacing); + return vtkm::Range(origin, origin + static_cast(dimensionSize - 1) * spacing); } template -void -UniformTests() +void UniformTests() { const vtkm::Id NUM_TRIALS = 10; const vtkm::Id MAX_DIM_SIZE = 20; @@ -146,53 +137,41 @@ UniformTests() vtkm::cont::DataSetFieldAdd dsf; std::uniform_int_distribution randomDim(2, MAX_DIM_SIZE); - std::uniform_int_distribution randomFill(0, NUM_FILL_METHODS-1); + std::uniform_int_distribution randomFill(0, NUM_FILL_METHODS - 1); for (vtkm::Id trial = 0; trial < NUM_TRIALS; trial++) { std::cout << "Trial " << trial << std::endl; - vtkm::Id3 dimensions(randomDim(g_RandomGenerator), - randomDim(g_RandomGenerator), + vtkm::Id3 dimensions(randomDim(g_RandomGenerator), randomDim(g_RandomGenerator), randomDim(g_RandomGenerator)); std::cout << "Dimensions: " << dimensions << std::endl; vtkm::IdComponent fillMethodX = randomFill(g_RandomGenerator); vtkm::IdComponent fillMethodY = randomFill(g_RandomGenerator); vtkm::IdComponent fillMethodZ = randomFill(g_RandomGenerator); - std::cout << "Fill methods: [" - << fillMethodX << "," - << fillMethodY << "," - << fillMethodZ << "]" << std::endl; + std::cout << "Fill methods: [" << fillMethodX << "," << fillMethodY << "," << fillMethodZ << "]" + << std::endl; - vtkm::Vec origin; - vtkm::Vec spacing; + vtkm::Vec origin; + vtkm::Vec spacing; vtkm::Bounds bounds; - bounds.X = FillMethod(fillMethodX, - dimensions[0], - origin[0], - spacing[0]); - bounds.Y = FillMethod(fillMethodY, - dimensions[1], - origin[1], - spacing[1]); - bounds.Z = FillMethod(fillMethodZ, - dimensions[2], - origin[2], - spacing[2]); + bounds.X = FillMethod(fillMethodX, dimensions[0], origin[0], spacing[0]); + bounds.Y = FillMethod(fillMethodY, dimensions[1], origin[1], spacing[1]); + bounds.Z = FillMethod(fillMethodZ, dimensions[2], origin[2], spacing[2]); std::cout << "3D case" << std::endl; - vtkm::Id numPoints = dimensions[0]*dimensions[1]*dimensions[2]; - vtkm::Id numCells = (dimensions[0]-1)*(dimensions[1]-1)*(dimensions[2]-1); + vtkm::Id numPoints = dimensions[0] * dimensions[1] * dimensions[2]; + vtkm::Id numCells = (dimensions[0] - 1) * (dimensions[1] - 1) * (dimensions[2] - 1); std::vector varP3D(static_cast(numPoints)); for (unsigned long i = 0; i < static_cast(numPoints); i++) { - varP3D[i] = static_cast(i*1.1f); + varP3D[i] = static_cast(i * 1.1f); } std::vector varC3D(static_cast(numCells)); for (unsigned long i = 0; i < static_cast(numCells); i++) { - varC3D[i] = static_cast(i*1.1f); + varC3D[i] = static_cast(i * 1.1f); } dataSet = dataSetBuilder.Create(dimensions, origin, spacing); dsf.AddPointField(dataSet, "pointvar", varP3D); @@ -200,40 +179,40 @@ UniformTests() ValidateDataSet(dataSet, 3, numPoints, numCells, bounds); std::cout << "2D case" << std::endl; - numPoints = dimensions[0]*dimensions[1]; - numCells = (dimensions[0]-1)*(dimensions[1]-1); + numPoints = dimensions[0] * dimensions[1]; + numCells = (dimensions[0] - 1) * (dimensions[1] - 1); bounds.Z = vtkm::Range(0, 0); std::vector varP2D(static_cast(numPoints)); for (unsigned long i = 0; i < static_cast(numPoints); i++) { - varP2D[i] = static_cast(i*1.1f); + varP2D[i] = static_cast(i * 1.1f); } std::vector varC2D(static_cast(numCells)); for (unsigned long i = 0; i < static_cast(numCells); i++) { - varC2D[i] = static_cast(i*1.1f); + varC2D[i] = static_cast(i * 1.1f); } dataSet = dataSetBuilder.Create(vtkm::Id2(dimensions[0], dimensions[1]), - vtkm::Vec(origin[0], origin[1]), - vtkm::Vec(spacing[0], spacing[1])); + vtkm::Vec(origin[0], origin[1]), + vtkm::Vec(spacing[0], spacing[1])); dsf.AddPointField(dataSet, "pointvar", varP2D); dsf.AddCellField(dataSet, "cellvar", varC2D); ValidateDataSet(dataSet, 2, numPoints, numCells, bounds); - std::cout << "1D case" < varP1D(static_cast(numPoints)); for (unsigned long i = 0; i < static_cast(numPoints); i++) { - varP1D[i] = static_cast(i*1.1f); + varP1D[i] = static_cast(i * 1.1f); } std::vector varC1D(static_cast(numCells)); for (unsigned long i = 0; i < static_cast(numCells); i++) { - varC1D[i] = static_cast(i*1.1f); + varC1D[i] = static_cast(i * 1.1f); } dataSet = dataSetBuilder.Create(dimensions[0], origin[0], spacing[0]); dsf.AddPointField(dataSet, "pointvar", varP1D); @@ -242,8 +221,7 @@ UniformTests() } } -void -TestDataSetBuilderUniform() +void TestDataSetBuilderUniform() { vtkm::UInt32 seed = static_cast(time(nullptr)); std::cout << "Seed: " << seed << std::endl; @@ -257,8 +235,8 @@ TestDataSetBuilderUniform() } // namespace DataSetBuilderUniformNamespace -int UnitTestDataSetBuilderUniform(int, char *[]) +int UnitTestDataSetBuilderUniform(int, char* []) { - using namespace DataSetBuilderUniformNamespace; - return vtkm::cont::testing::Testing::Run(TestDataSetBuilderUniform); + using namespace DataSetBuilderUniformNamespace; + return vtkm::cont::testing::Testing::Run(TestDataSetBuilderUniform); } diff --git a/vtkm/cont/testing/UnitTestDataSetPermutation.cxx b/vtkm/cont/testing/UnitTestDataSetPermutation.cxx index 1ac8191bc..1b57c5f6c 100644 --- a/vtkm/cont/testing/UnitTestDataSetPermutation.cxx +++ b/vtkm/cont/testing/UnitTestDataSetPermutation.cxx @@ -30,10 +30,11 @@ #include #include -namespace { +namespace +{ -template -bool TestArrayHandle(const vtkm::cont::ArrayHandle &ah, const T *expected, +template +bool TestArrayHandle(const vtkm::cont::ArrayHandle& ah, const T* expected, vtkm::Id size) { if (size != ah.GetNumberOfValues()) @@ -54,13 +55,13 @@ bool TestArrayHandle(const vtkm::cont::ArrayHandle &ah, const T *exp inline vtkm::cont::DataSet make_SingleTypeDataSet() { - typedef vtkm::Vec CoordType; - std::vector< CoordType > coordinates; - coordinates.push_back( CoordType(0, 0, 0) ); - coordinates.push_back( CoordType(1, 0, 0) ); - coordinates.push_back( CoordType(1, 1, 0) ); - coordinates.push_back( CoordType(2, 1, 0) ); - coordinates.push_back( CoordType(2, 2, 0) ); + typedef vtkm::Vec CoordType; + std::vector coordinates; + coordinates.push_back(CoordType(0, 0, 0)); + coordinates.push_back(CoordType(1, 0, 0)); + coordinates.push_back(CoordType(1, 1, 0)); + coordinates.push_back(CoordType(2, 1, 0)); + coordinates.push_back(CoordType(2, 2, 0)); std::vector conn; // First Cell @@ -82,7 +83,7 @@ inline vtkm::cont::DataSet make_SingleTypeDataSet() //Set point scalar const int nVerts = 5; - vtkm::Float32 vars[nVerts] = {10.1f, 20.1f, 30.2f, 40.2f, 50.3f}; + vtkm::Float32 vars[nVerts] = { 10.1f, 20.1f, 30.2f, 40.2f, 50.3f }; vtkm::cont::DataSetFieldAdd::AddPointField(ds, "pointvar", vars, nVerts); @@ -99,17 +100,16 @@ void TestDataSet_Explicit() validIds.push_back(1); validIds.push_back(1); validIds.push_back(1); - vtkm::cont::ArrayHandle validCellIds = - vtkm::cont::make_ArrayHandle(validIds); + vtkm::cont::ArrayHandle validCellIds = vtkm::cont::make_ArrayHandle(validIds); //get the cellset single type from the dataset vtkm::cont::CellSetSingleType<> cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); //verify that we can create a subset of a singlset - typedef vtkm::cont::CellSetPermutation< vtkm::cont::CellSetSingleType<> > SubsetType; + typedef vtkm::cont::CellSetPermutation> SubsetType; SubsetType subset; - subset.Fill(validCellIds,cellSet); + subset.Fill(validCellIds, cellSet); subset.PrintSummary(std::cout); @@ -118,23 +118,21 @@ void TestDataSet_Explicit() vtkm::TopologyElementTagCell>::ExecObjectType ExecObjectType; ExecObjectType execConnectivity; - execConnectivity = subset.PrepareForInput(vtkm::cont::DeviceAdapterTagSerial(), - vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell()); + execConnectivity = + subset.PrepareForInput(vtkm::cont::DeviceAdapterTagSerial(), vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell()); //run a basic for-each topology algorithm on this vtkm::cont::ArrayHandle result; vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke(subset, - dataSet.GetField("pointvar"), - result); + dispatcher.Invoke(subset, dataSet.GetField("pointvar"), result); //iterate same cell 4 times vtkm::Float32 expected[4] = { 30.1667f, 30.1667f, 30.1667f, 30.1667f }; for (int i = 0; i < 4; ++i) { - VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), - expected[i]), "Wrong result for CellAverage worklet on explicit subset data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellAverage worklet on explicit subset data"); } } @@ -149,16 +147,14 @@ void TestDataSet_Structured2D() validIds.push_back(1); validIds.push_back(1); validIds.push_back(1); - vtkm::cont::ArrayHandle validCellIds = - vtkm::cont::make_ArrayHandle(validIds); - + vtkm::cont::ArrayHandle validCellIds = vtkm::cont::make_ArrayHandle(validIds); vtkm::cont::CellSetStructured<2> cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); //verify that we can create a subset of a 2d UniformDataSet - vtkm::cont::CellSetPermutation< vtkm::cont::CellSetStructured<2> > subset; - subset.Fill(validCellIds,cellSet); + vtkm::cont::CellSetPermutation> subset; + subset.Fill(validCellIds, cellSet); subset.PrintSummary(std::cout); @@ -166,22 +162,19 @@ void TestDataSet_Structured2D() typedef vtkm::cont::DeviceAdapterTagSerial DeviceAdapterTag; //verify that PrepareForInput exists - subset.PrepareForInput(DeviceAdapterTag(), - vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell()); + subset.PrepareForInput(DeviceAdapterTag(), vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell()); //run a basic for-each topology algorithm on this vtkm::cont::ArrayHandle result; vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke(subset, - dataSet.GetField("pointvar"), - result); + dispatcher.Invoke(subset, dataSet.GetField("pointvar"), result); vtkm::Float32 expected[4] = { 40.1f, 40.1f, 40.1f, 40.1f }; for (int i = 0; i < 4; ++i) { - VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), - expected[i]), "Wrong result for CellAverage worklet on 2d structured subset data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellAverage worklet on 2d structured subset data"); } } @@ -196,39 +189,32 @@ void TestDataSet_Structured3D() validIds.push_back(1); validIds.push_back(1); validIds.push_back(1); - vtkm::cont::ArrayHandle validCellIds = - vtkm::cont::make_ArrayHandle(validIds); + vtkm::cont::ArrayHandle validCellIds = vtkm::cont::make_ArrayHandle(validIds); vtkm::cont::CellSetStructured<3> cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); //verify that we can create a subset of a 2d UniformDataSet - vtkm::cont::CellSetPermutation< vtkm::cont::CellSetStructured<3> > subset; - subset.Fill(validCellIds,cellSet); + vtkm::cont::CellSetPermutation> subset; + subset.Fill(validCellIds, cellSet); subset.PrintSummary(std::cout); - //verify that PrepareForInput exists - subset.PrepareForInput( - vtkm::cont::DeviceAdapterTagSerial(), - vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell()); + subset.PrepareForInput(vtkm::cont::DeviceAdapterTagSerial(), vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell()); //run a basic for-each topology algorithm on this vtkm::cont::ArrayHandle result; vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke(subset, - dataSet.GetField("pointvar"), - result); + dispatcher.Invoke(subset, dataSet.GetField("pointvar"), result); -vtkm::Float32 expected[4] = { 70.2125f, 70.2125f, 70.2125f, 70.2125f }; + vtkm::Float32 expected[4] = { 70.2125f, 70.2125f, 70.2125f, 70.2125f }; for (int i = 0; i < 4; ++i) { - VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), - expected[i]), "Wrong result for CellAverage worklet on 2d structured subset data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellAverage worklet on 2d structured subset data"); } - } void TestDataSet_Permutation() @@ -240,11 +226,9 @@ void TestDataSet_Permutation() TestDataSet_Structured2D(); TestDataSet_Structured3D(); } - } - -int UnitTestDataSetPermutation(int, char *[]) +int UnitTestDataSetPermutation(int, char* []) { return vtkm::cont::testing::Testing::Run(TestDataSet_Permutation); } diff --git a/vtkm/cont/testing/UnitTestDataSetRectilinear.cxx b/vtkm/cont/testing/UnitTestDataSetRectilinear.cxx index e7058e291..b8ae8d2c2 100644 --- a/vtkm/cont/testing/UnitTestDataSetRectilinear.cxx +++ b/vtkm/cont/testing/UnitTestDataSetRectilinear.cxx @@ -42,10 +42,9 @@ void TestDataSet_Rectilinear() ThreeDimRectilinearTest(); } -static void -TwoDimRectilinearTest() +static void TwoDimRectilinearTest() { - std::cout<<"2D Rectilinear data set"< cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); - VTKM_TEST_ASSERT(dataSet.GetNumberOfCellSets() == 1, - "Incorrect number of cell sets"); - VTKM_TEST_ASSERT(dataSet.GetNumberOfFields() == 2, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(dataSet.GetNumberOfCellSets() == 1, "Incorrect number of cell sets"); + VTKM_TEST_ASSERT(dataSet.GetNumberOfFields() == 2, "Incorrect number of fields"); VTKM_TEST_ASSERT(dataSet.GetNumberOfCoordinateSystems() == 1, "Incorrect number of coordinate systems"); - VTKM_TEST_ASSERT(cellSet.GetNumberOfPoints() == 6, - "Incorrect number of points"); - VTKM_TEST_ASSERT(cellSet.GetNumberOfCells() == 2, - "Incorrect number of cells"); + VTKM_TEST_ASSERT(cellSet.GetNumberOfPoints() == 6, "Incorrect number of points"); + VTKM_TEST_ASSERT(cellSet.GetNumberOfCells() == 2, "Incorrect number of cells"); // test various field-getting methods and associations try { - dataSet.GetField("cellvar", vtkm::cont::Field::ASSOC_CELL_SET); + dataSet.GetField("cellvar", vtkm::cont::Field::ASSOC_CELL_SET); } catch (...) { - VTKM_TEST_FAIL("Failed to get field 'cellvar' with ASSOC_CELL_SET."); + VTKM_TEST_FAIL("Failed to get field 'cellvar' with ASSOC_CELL_SET."); } try @@ -80,7 +75,7 @@ TwoDimRectilinearTest() } catch (...) { - VTKM_TEST_FAIL("Failed to get field 'pointvar' with ASSOC_POINT_SET."); + VTKM_TEST_FAIL("Failed to get field 'pointvar' with ASSOC_POINT_SET."); } vtkm::Id numCells = cellSet.GetNumberOfCells(); @@ -89,71 +84,51 @@ TwoDimRectilinearTest() VTKM_TEST_ASSERT(cellSet.GetNumberOfPointsInCell(cellIndex) == 4, "Incorrect number of cell indices"); vtkm::IdComponent shape = cellSet.GetCellShape(); - VTKM_TEST_ASSERT(shape == vtkm::CELL_SHAPE_QUAD, - "Incorrect element type."); + VTKM_TEST_ASSERT(shape == vtkm::CELL_SHAPE_QUAD, "Incorrect element type."); } - vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell, - 2> pointToCell = - cellSet.PrepareForInput( - vtkm::cont::DeviceAdapterTagSerial(), - vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell()); - vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint, - 2> cellToPoint = - cellSet.PrepareForInput( - vtkm::cont::DeviceAdapterTagSerial(), - vtkm::TopologyElementTagCell(), - vtkm::TopologyElementTagPoint()); + vtkm::exec::ConnectivityStructured + pointToCell = + cellSet.PrepareForInput(vtkm::cont::DeviceAdapterTagSerial(), vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell()); + vtkm::exec::ConnectivityStructured + cellToPoint = + cellSet.PrepareForInput(vtkm::cont::DeviceAdapterTagSerial(), vtkm::TopologyElementTagCell(), + vtkm::TopologyElementTagPoint()); - - vtkm::Id cells[2][4] = {{0,1,4,3}, {1,2,5,4}}; + vtkm::Id cells[2][4] = { { 0, 1, 4, 3 }, { 1, 2, 5, 4 } }; for (vtkm::Id cellIndex = 0; cellIndex < 2; cellIndex++) { - vtkm::Vec pointIds = - pointToCell.GetIndices(pointToCell.FlatToLogicalToIndex(cellIndex)); - for (vtkm::IdComponent localPointIndex = 0; - localPointIndex < 4; - localPointIndex++) + vtkm::Vec pointIds = + pointToCell.GetIndices(pointToCell.FlatToLogicalToIndex(cellIndex)); + for (vtkm::IdComponent localPointIndex = 0; localPointIndex < 4; localPointIndex++) { - VTKM_TEST_ASSERT( - pointIds[localPointIndex] == cells[cellIndex][localPointIndex], - "Incorrect point ID for cell"); + VTKM_TEST_ASSERT(pointIds[localPointIndex] == cells[cellIndex][localPointIndex], + "Incorrect point ID for cell"); } } - vtkm::Id expectedCellIds[6][4] = {{0,-1,-1,-1}, - {0,1,-1,-1}, - {1,-1,-1,-1}, - {0,-1,-1,-1}, - {0,1,-1,-1}, - {1,-1,-1,-1}}; + vtkm::Id expectedCellIds[6][4] = { { 0, -1, -1, -1 }, { 0, 1, -1, -1 }, { 1, -1, -1, -1 }, + { 0, -1, -1, -1 }, { 0, 1, -1, -1 }, { 1, -1, -1, -1 } }; for (vtkm::Id pointIndex = 0; pointIndex < 6; pointIndex++) { - vtkm::VecVariable retrievedCellIds = + vtkm::VecVariable retrievedCellIds = cellToPoint.GetIndices(cellToPoint.FlatToLogicalToIndex(pointIndex)); VTKM_TEST_ASSERT(retrievedCellIds.GetNumberOfComponents() <= 4, "Got wrong number of cell ids."); - for (vtkm::IdComponent cellIndex = 0; - cellIndex < retrievedCellIds.GetNumberOfComponents(); + for (vtkm::IdComponent cellIndex = 0; cellIndex < retrievedCellIds.GetNumberOfComponents(); cellIndex++) { - VTKM_TEST_ASSERT( - retrievedCellIds[cellIndex] == expectedCellIds[pointIndex][cellIndex], - "Incorrect cell ID for point"); + VTKM_TEST_ASSERT(retrievedCellIds[cellIndex] == expectedCellIds[pointIndex][cellIndex], + "Incorrect cell ID for point"); } } } -static void -ThreeDimRectilinearTest() +static void ThreeDimRectilinearTest() { - std::cout<<"3D Rectilinear data set"< cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); - VTKM_TEST_ASSERT(dataSet.GetNumberOfCellSets() == 1, - "Incorrect number of cell sets"); + VTKM_TEST_ASSERT(dataSet.GetNumberOfCellSets() == 1, "Incorrect number of cell sets"); - VTKM_TEST_ASSERT(dataSet.GetNumberOfFields() == 2, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(dataSet.GetNumberOfFields() == 2, "Incorrect number of fields"); VTKM_TEST_ASSERT(dataSet.GetNumberOfCoordinateSystems() == 1, "Incorrect number of coordinate systems"); - VTKM_TEST_ASSERT(cellSet.GetNumberOfPoints() == 18, - "Incorrect number of points"); + VTKM_TEST_ASSERT(cellSet.GetNumberOfPoints() == 18, "Incorrect number of points"); - VTKM_TEST_ASSERT(cellSet.GetNumberOfCells() == 4, - "Incorrect number of cells"); + VTKM_TEST_ASSERT(cellSet.GetNumberOfCells() == 4, "Incorrect number of cells"); try { - dataSet.GetField("cellvar", vtkm::cont::Field::ASSOC_CELL_SET); + dataSet.GetField("cellvar", vtkm::cont::Field::ASSOC_CELL_SET); } catch (...) { - VTKM_TEST_FAIL("Failed to get field 'cellvar' with ASSOC_CELL_SET."); + VTKM_TEST_FAIL("Failed to get field 'cellvar' with ASSOC_CELL_SET."); } try @@ -191,7 +162,7 @@ ThreeDimRectilinearTest() } catch (...) { - VTKM_TEST_FAIL("Failed to get field 'pointvar' with ASSOC_POINT_SET."); + VTKM_TEST_FAIL("Failed to get field 'pointvar' with ASSOC_POINT_SET."); } vtkm::Id numCells = cellSet.GetNumberOfCells(); @@ -200,55 +171,39 @@ ThreeDimRectilinearTest() VTKM_TEST_ASSERT(cellSet.GetNumberOfPointsInCell(cellIndex) == 8, "Incorrect number of cell indices"); vtkm::IdComponent shape = cellSet.GetCellShape(); - VTKM_TEST_ASSERT(shape == vtkm::CELL_SHAPE_HEXAHEDRON, - "Incorrect element type."); + VTKM_TEST_ASSERT(shape == vtkm::CELL_SHAPE_HEXAHEDRON, "Incorrect element type."); } //Test regular connectivity. - vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell, - 3> pointToCell = - cellSet.PrepareForInput( - vtkm::cont::DeviceAdapterTagSerial(), - vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell()); - vtkm::Id expectedPointIds[8] = {0,1,4,3,6,7,10,9}; - vtkm::Vec retrievedPointIds = - pointToCell.GetIndices(vtkm::Id3(0)); - for (vtkm::IdComponent localPointIndex = 0; - localPointIndex < 8; - localPointIndex++) + vtkm::exec::ConnectivityStructured + pointToCell = + cellSet.PrepareForInput(vtkm::cont::DeviceAdapterTagSerial(), vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell()); + vtkm::Id expectedPointIds[8] = { 0, 1, 4, 3, 6, 7, 10, 9 }; + vtkm::Vec retrievedPointIds = pointToCell.GetIndices(vtkm::Id3(0)); + for (vtkm::IdComponent localPointIndex = 0; localPointIndex < 8; localPointIndex++) { - VTKM_TEST_ASSERT( - retrievedPointIds[localPointIndex] == expectedPointIds[localPointIndex], - "Incorrect point ID for cell"); + VTKM_TEST_ASSERT(retrievedPointIds[localPointIndex] == expectedPointIds[localPointIndex], + "Incorrect point ID for cell"); } - vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint, - 3> cellToPoint = - cellSet.PrepareForInput( - vtkm::cont::DeviceAdapterTagSerial(), - vtkm::TopologyElementTagCell(), - vtkm::TopologyElementTagPoint()); - vtkm::Id retrievedCellIds[6] = {0,-1,-1,-1,-1,-1}; - vtkm::VecVariable expectedCellIds = - cellToPoint.GetIndices(vtkm::Id3(0)); + vtkm::exec::ConnectivityStructured + cellToPoint = + cellSet.PrepareForInput(vtkm::cont::DeviceAdapterTagSerial(), vtkm::TopologyElementTagCell(), + vtkm::TopologyElementTagPoint()); + vtkm::Id retrievedCellIds[6] = { 0, -1, -1, -1, -1, -1 }; + vtkm::VecVariable expectedCellIds = cellToPoint.GetIndices(vtkm::Id3(0)); VTKM_TEST_ASSERT(expectedCellIds.GetNumberOfComponents() <= 6, "Got unexpected number of cell ids"); for (vtkm::IdComponent localPointIndex = 0; - localPointIndex < expectedCellIds.GetNumberOfComponents(); - localPointIndex++) + localPointIndex < expectedCellIds.GetNumberOfComponents(); localPointIndex++) { - VTKM_TEST_ASSERT( - expectedCellIds[localPointIndex] == retrievedCellIds[localPointIndex], - "Incorrect cell ID for point"); + VTKM_TEST_ASSERT(expectedCellIds[localPointIndex] == retrievedCellIds[localPointIndex], + "Incorrect cell ID for point"); } } -int UnitTestDataSetRectilinear(int, char *[]) +int UnitTestDataSetRectilinear(int, char* []) { return vtkm::cont::testing::Testing::Run(TestDataSet_Rectilinear); } diff --git a/vtkm/cont/testing/UnitTestDataSetUniform.cxx b/vtkm/cont/testing/UnitTestDataSetUniform.cxx index 852d75bc9..368ccdb9d 100644 --- a/vtkm/cont/testing/UnitTestDataSetUniform.cxx +++ b/vtkm/cont/testing/UnitTestDataSetUniform.cxx @@ -41,10 +41,9 @@ void TestDataSet_Uniform() ThreeDimUniformTest(); } -static void -TwoDimUniformTest() +static void TwoDimUniformTest() { - std::cout<<"2D Uniform data set"< cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); - VTKM_TEST_ASSERT(dataSet.GetNumberOfCellSets() == 1, - "Incorrect number of cell sets"); - VTKM_TEST_ASSERT(dataSet.GetNumberOfFields() == 2, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(dataSet.GetNumberOfCellSets() == 1, "Incorrect number of cell sets"); + VTKM_TEST_ASSERT(dataSet.GetNumberOfFields() == 2, "Incorrect number of fields"); VTKM_TEST_ASSERT(dataSet.GetNumberOfCoordinateSystems() == 1, "Incorrect number of coordinate systems"); - VTKM_TEST_ASSERT(cellSet.GetNumberOfPoints() == 6, - "Incorrect number of points"); - VTKM_TEST_ASSERT(cellSet.GetNumberOfCells() == 2, - "Incorrect number of cells"); - VTKM_TEST_ASSERT(cellSet.GetPointDimensions() == vtkm::Id2(3,2), - "Incorrect point dimensions"); - VTKM_TEST_ASSERT(cellSet.GetCellDimensions() == vtkm::Id2(2,1), - "Incorrect cell dimensions"); + VTKM_TEST_ASSERT(cellSet.GetNumberOfPoints() == 6, "Incorrect number of points"); + VTKM_TEST_ASSERT(cellSet.GetNumberOfCells() == 2, "Incorrect number of cells"); + VTKM_TEST_ASSERT(cellSet.GetPointDimensions() == vtkm::Id2(3, 2), "Incorrect point dimensions"); + VTKM_TEST_ASSERT(cellSet.GetCellDimensions() == vtkm::Id2(2, 1), "Incorrect cell dimensions"); // test various field-getting methods and associations try { - dataSet.GetField("cellvar", vtkm::cont::Field::ASSOC_CELL_SET); + dataSet.GetField("cellvar", vtkm::cont::Field::ASSOC_CELL_SET); } catch (...) { - VTKM_TEST_FAIL("Failed to get field 'cellvar' with ASSOC_CELL_SET."); + VTKM_TEST_FAIL("Failed to get field 'cellvar' with ASSOC_CELL_SET."); } try @@ -85,7 +78,7 @@ TwoDimUniformTest() } catch (...) { - VTKM_TEST_FAIL("Failed to get field 'pointvar' with ASSOC_POINT_SET."); + VTKM_TEST_FAIL("Failed to get field 'pointvar' with ASSOC_POINT_SET."); } vtkm::Id numCells = cellSet.GetNumberOfCells(); @@ -94,71 +87,51 @@ TwoDimUniformTest() VTKM_TEST_ASSERT(cellSet.GetNumberOfPointsInCell(cellIndex) == 4, "Incorrect number of cell indices"); vtkm::IdComponent shape = cellSet.GetCellShape(); - VTKM_TEST_ASSERT(shape == vtkm::CELL_SHAPE_QUAD, - "Incorrect element type."); + VTKM_TEST_ASSERT(shape == vtkm::CELL_SHAPE_QUAD, "Incorrect element type."); } - vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell, - 2> pointToCell = - cellSet.PrepareForInput( - vtkm::cont::DeviceAdapterTagSerial(), - vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell()); - vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint, - 2> cellToPoint = - cellSet.PrepareForInput( - vtkm::cont::DeviceAdapterTagSerial(), - vtkm::TopologyElementTagCell(), - vtkm::TopologyElementTagPoint()); + vtkm::exec::ConnectivityStructured + pointToCell = + cellSet.PrepareForInput(vtkm::cont::DeviceAdapterTagSerial(), vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell()); + vtkm::exec::ConnectivityStructured + cellToPoint = + cellSet.PrepareForInput(vtkm::cont::DeviceAdapterTagSerial(), vtkm::TopologyElementTagCell(), + vtkm::TopologyElementTagPoint()); - - vtkm::Id cells[2][4] = {{0,1,4,3}, {1,2,5,4}}; + vtkm::Id cells[2][4] = { { 0, 1, 4, 3 }, { 1, 2, 5, 4 } }; for (vtkm::Id cellIndex = 0; cellIndex < 2; cellIndex++) { - vtkm::Vec pointIds = - pointToCell.GetIndices(pointToCell.FlatToLogicalToIndex(cellIndex)); - for (vtkm::IdComponent localPointIndex = 0; - localPointIndex < 4; - localPointIndex++) + vtkm::Vec pointIds = + pointToCell.GetIndices(pointToCell.FlatToLogicalToIndex(cellIndex)); + for (vtkm::IdComponent localPointIndex = 0; localPointIndex < 4; localPointIndex++) { - VTKM_TEST_ASSERT( - pointIds[localPointIndex] == cells[cellIndex][localPointIndex], - "Incorrect point ID for cell"); + VTKM_TEST_ASSERT(pointIds[localPointIndex] == cells[cellIndex][localPointIndex], + "Incorrect point ID for cell"); } } - vtkm::Id expectedCellIds[6][4] = {{0,-1,-1,-1}, - {0,1,-1,-1}, - {1,-1,-1,-1}, - {0,-1,-1,-1}, - {0,1,-1,-1}, - {1,-1,-1,-1}}; + vtkm::Id expectedCellIds[6][4] = { { 0, -1, -1, -1 }, { 0, 1, -1, -1 }, { 1, -1, -1, -1 }, + { 0, -1, -1, -1 }, { 0, 1, -1, -1 }, { 1, -1, -1, -1 } }; for (vtkm::Id pointIndex = 0; pointIndex < 6; pointIndex++) { - vtkm::VecVariable retrievedCellIds = + vtkm::VecVariable retrievedCellIds = cellToPoint.GetIndices(cellToPoint.FlatToLogicalToIndex(pointIndex)); VTKM_TEST_ASSERT(retrievedCellIds.GetNumberOfComponents() <= 4, "Got wrong number of cell ids."); - for (vtkm::IdComponent cellIndex = 0; - cellIndex < retrievedCellIds.GetNumberOfComponents(); + for (vtkm::IdComponent cellIndex = 0; cellIndex < retrievedCellIds.GetNumberOfComponents(); cellIndex++) { - VTKM_TEST_ASSERT( - retrievedCellIds[cellIndex] == expectedCellIds[pointIndex][cellIndex], - "Incorrect cell ID for point"); + VTKM_TEST_ASSERT(retrievedCellIds[cellIndex] == expectedCellIds[pointIndex][cellIndex], + "Incorrect cell ID for point"); } } } -static void -ThreeDimUniformTest() +static void ThreeDimUniformTest() { - std::cout<<"3D Uniform data set"< cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); - VTKM_TEST_ASSERT(dataSet.GetNumberOfCellSets() == 1, - "Incorrect number of cell sets"); + VTKM_TEST_ASSERT(dataSet.GetNumberOfCellSets() == 1, "Incorrect number of cell sets"); - VTKM_TEST_ASSERT(dataSet.GetNumberOfFields() == 2, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(dataSet.GetNumberOfFields() == 2, "Incorrect number of fields"); VTKM_TEST_ASSERT(dataSet.GetNumberOfCoordinateSystems() == 1, "Incorrect number of coordinate systems"); - VTKM_TEST_ASSERT(cellSet.GetNumberOfPoints() == 18, - "Incorrect number of points"); + VTKM_TEST_ASSERT(cellSet.GetNumberOfPoints() == 18, "Incorrect number of points"); - VTKM_TEST_ASSERT(cellSet.GetNumberOfCells() == 4, - "Incorrect number of cells"); + VTKM_TEST_ASSERT(cellSet.GetNumberOfCells() == 4, "Incorrect number of cells"); - VTKM_TEST_ASSERT(cellSet.GetPointDimensions() == vtkm::Id3(3,2,3), + VTKM_TEST_ASSERT(cellSet.GetPointDimensions() == vtkm::Id3(3, 2, 3), "Incorrect point dimensions"); - VTKM_TEST_ASSERT(cellSet.GetCellDimensions() == vtkm::Id3(2,1,2), - "Incorrect cell dimensions"); + VTKM_TEST_ASSERT(cellSet.GetCellDimensions() == vtkm::Id3(2, 1, 2), "Incorrect cell dimensions"); try { - dataSet.GetField("cellvar", vtkm::cont::Field::ASSOC_CELL_SET); + dataSet.GetField("cellvar", vtkm::cont::Field::ASSOC_CELL_SET); } catch (...) { - VTKM_TEST_FAIL("Failed to get field 'cellvar' with ASSOC_CELL_SET."); + VTKM_TEST_FAIL("Failed to get field 'cellvar' with ASSOC_CELL_SET."); } try @@ -204,7 +172,7 @@ ThreeDimUniformTest() } catch (...) { - VTKM_TEST_FAIL("Failed to get field 'pointvar' with ASSOC_POINT_SET."); + VTKM_TEST_FAIL("Failed to get field 'pointvar' with ASSOC_POINT_SET."); } vtkm::Id numCells = cellSet.GetNumberOfCells(); @@ -213,55 +181,39 @@ ThreeDimUniformTest() VTKM_TEST_ASSERT(cellSet.GetNumberOfPointsInCell(cellIndex) == 8, "Incorrect number of cell indices"); vtkm::IdComponent shape = cellSet.GetCellShape(); - VTKM_TEST_ASSERT(shape == vtkm::CELL_SHAPE_HEXAHEDRON, - "Incorrect element type."); + VTKM_TEST_ASSERT(shape == vtkm::CELL_SHAPE_HEXAHEDRON, "Incorrect element type."); } //Test uniform connectivity. - vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell, - 3> pointToCell = - cellSet.PrepareForInput( - vtkm::cont::DeviceAdapterTagSerial(), - vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell()); - vtkm::Id expectedPointIds[8] = {0,1,4,3,6,7,10,9}; - vtkm::Vec retrievedPointIds = - pointToCell.GetIndices(vtkm::Id3(0)); - for (vtkm::IdComponent localPointIndex = 0; - localPointIndex < 8; - localPointIndex++) + vtkm::exec::ConnectivityStructured + pointToCell = + cellSet.PrepareForInput(vtkm::cont::DeviceAdapterTagSerial(), vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell()); + vtkm::Id expectedPointIds[8] = { 0, 1, 4, 3, 6, 7, 10, 9 }; + vtkm::Vec retrievedPointIds = pointToCell.GetIndices(vtkm::Id3(0)); + for (vtkm::IdComponent localPointIndex = 0; localPointIndex < 8; localPointIndex++) { - VTKM_TEST_ASSERT( - retrievedPointIds[localPointIndex] == expectedPointIds[localPointIndex], - "Incorrect point ID for cell"); + VTKM_TEST_ASSERT(retrievedPointIds[localPointIndex] == expectedPointIds[localPointIndex], + "Incorrect point ID for cell"); } - vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint, - 3> cellToPoint = - cellSet.PrepareForInput( - vtkm::cont::DeviceAdapterTagSerial(), - vtkm::TopologyElementTagCell(), - vtkm::TopologyElementTagPoint()); - vtkm::Id retrievedCellIds[6] = {0,-1,-1,-1,-1,-1}; - vtkm::VecVariable expectedCellIds = - cellToPoint.GetIndices(vtkm::Id3(0)); + vtkm::exec::ConnectivityStructured + cellToPoint = + cellSet.PrepareForInput(vtkm::cont::DeviceAdapterTagSerial(), vtkm::TopologyElementTagCell(), + vtkm::TopologyElementTagPoint()); + vtkm::Id retrievedCellIds[6] = { 0, -1, -1, -1, -1, -1 }; + vtkm::VecVariable expectedCellIds = cellToPoint.GetIndices(vtkm::Id3(0)); VTKM_TEST_ASSERT(expectedCellIds.GetNumberOfComponents() <= 6, "Got unexpected number of cell ids"); for (vtkm::IdComponent localPointIndex = 0; - localPointIndex < expectedCellIds.GetNumberOfComponents(); - localPointIndex++) + localPointIndex < expectedCellIds.GetNumberOfComponents(); localPointIndex++) { - VTKM_TEST_ASSERT( - expectedCellIds[localPointIndex] == retrievedCellIds[localPointIndex], - "Incorrect cell ID for point"); + VTKM_TEST_ASSERT(expectedCellIds[localPointIndex] == retrievedCellIds[localPointIndex], + "Incorrect cell ID for point"); } } -int UnitTestDataSetUniform(int, char *[]) +int UnitTestDataSetUniform(int, char* []) { return vtkm::cont::testing::Testing::Run(TestDataSet_Uniform); } diff --git a/vtkm/cont/testing/UnitTestDeviceAdapterAlgorithmDependency.cxx b/vtkm/cont/testing/UnitTestDeviceAdapterAlgorithmDependency.cxx index 68536c0f4..fc68bc011 100644 --- a/vtkm/cont/testing/UnitTestDeviceAdapterAlgorithmDependency.cxx +++ b/vtkm/cont/testing/UnitTestDeviceAdapterAlgorithmDependency.cxx @@ -34,12 +34,15 @@ //This file must be included after ArrayHandle.h #include -namespace { +namespace +{ struct ExampleWorklet { template - void operator()(T vtkmNotUsed(v)) const { } + void operator()(T vtkmNotUsed(v)) const + { + } }; void CheckPostDefinedDeviceAdapter() @@ -51,7 +54,7 @@ void CheckPostDefinedDeviceAdapter() } // anonymous namespace -int UnitTestDeviceAdapterAlgorithmDependency(int, char *[]) +int UnitTestDeviceAdapterAlgorithmDependency(int, char* []) { return vtkm::cont::testing::Testing::Run(CheckPostDefinedDeviceAdapter); } diff --git a/vtkm/cont/testing/UnitTestDeviceAdapterAlgorithmGeneral.cxx b/vtkm/cont/testing/UnitTestDeviceAdapterAlgorithmGeneral.cxx index f60fe1034..56f2988fa 100644 --- a/vtkm/cont/testing/UnitTestDeviceAdapterAlgorithmGeneral.cxx +++ b/vtkm/cont/testing/UnitTestDeviceAdapterAlgorithmGeneral.cxx @@ -35,79 +35,72 @@ VTKM_VALID_DEVICE_ADAPTER(TestAlgorithmGeneral, -3); -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ -template<> -struct DeviceAdapterAlgorithm< - vtkm::cont::DeviceAdapterTagTestAlgorithmGeneral> : - vtkm::cont::internal::DeviceAdapterAlgorithmGeneral< - DeviceAdapterAlgorithm< - vtkm::cont::DeviceAdapterTagTestAlgorithmGeneral>, - vtkm::cont::DeviceAdapterTagTestAlgorithmGeneral> +template <> +struct DeviceAdapterAlgorithm + : vtkm::cont::internal::DeviceAdapterAlgorithmGeneral< + DeviceAdapterAlgorithm, + vtkm::cont::DeviceAdapterTagTestAlgorithmGeneral> { private: - typedef vtkm::cont::DeviceAdapterAlgorithm< - vtkm::cont::DeviceAdapterTagSerial> Algorithm; + typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; - typedef vtkm::cont::DeviceAdapterTagTestAlgorithmGeneral - DeviceAdapterTagTestAlgorithmGeneral; + typedef vtkm::cont::DeviceAdapterTagTestAlgorithmGeneral DeviceAdapterTagTestAlgorithmGeneral; public: - - template - VTKM_CONT static void Schedule(Functor functor, - vtkm::Id numInstances) + template + VTKM_CONT static void Schedule(Functor functor, vtkm::Id numInstances) { Algorithm::Schedule(functor, numInstances); } - template - VTKM_CONT static void Schedule(Functor functor, - vtkm::Id3 rangeMax) + template + VTKM_CONT static void Schedule(Functor functor, vtkm::Id3 rangeMax) { Algorithm::Schedule(functor, rangeMax); } - VTKM_CONT static void Synchronize() - { - Algorithm::Synchronize(); - } + VTKM_CONT static void Synchronize() { Algorithm::Synchronize(); } }; -namespace internal { +namespace internal +{ template -class ArrayManagerExecution - - : public vtkm::cont::internal::ArrayManagerExecution - +class ArrayManagerExecution + : public vtkm::cont::internal::ArrayManagerExecution { public: - typedef vtkm::cont::internal::ArrayManagerExecution - - Superclass; + typedef vtkm::cont::internal::ArrayManagerExecution + Superclass; typedef typename Superclass::ValueType ValueType; typedef typename Superclass::PortalType PortalType; typedef typename Superclass::PortalConstType PortalConstType; - ArrayManagerExecution(vtkm::cont::internal::Storage *storage) - : Superclass(storage) { } + ArrayManagerExecution(vtkm::cont::internal::Storage* storage) + : Superclass(storage) + { + } }; -template -struct VirtualObjectTransfer< - VirtualObject, TargetClass, vtkm::cont::DeviceAdapterTagTestAlgorithmGeneral> : - public VirtualObjectTransferShareWithControl +template +struct VirtualObjectTransfer + : public VirtualObjectTransferShareWithControl { }; - } } } // namespace vtkm::cont::internal -int UnitTestDeviceAdapterAlgorithmGeneral(int, char *[]) +int UnitTestDeviceAdapterAlgorithmGeneral(int, char* []) { - return vtkm::cont::testing::TestingDeviceAdapter - ::Run(); + return vtkm::cont::testing::TestingDeviceAdapter< + vtkm::cont::DeviceAdapterTagTestAlgorithmGeneral>::Run(); } diff --git a/vtkm/cont/testing/UnitTestDynamicArrayHandle.cxx b/vtkm/cont/testing/UnitTestDynamicArrayHandle.cxx index 5618ec4aa..743a474fd 100644 --- a/vtkm/cont/testing/UnitTestDynamicArrayHandle.cxx +++ b/vtkm/cont/testing/UnitTestDynamicArrayHandle.cxx @@ -18,7 +18,6 @@ // this software. //============================================================================ - #include #include @@ -43,14 +42,15 @@ #include #include -namespace vtkm { +namespace vtkm +{ // DynamicArrayHandle requires its value type to have a defined VecTraits // class. One of the tests is to use an "unusual" array of std::string // (which is pretty pointless but might tease out some assumptions). // Make an implementation here. Because I am lazy, this is only a partial // implementation. -template<> +template <> struct VecTraits { static const vtkm::IdComponent NUM_COMPONENTS = 1; @@ -59,13 +59,16 @@ struct VecTraits } // namespace vtkm -namespace { +namespace +{ const vtkm::Id ARRAY_SIZE = 10; -struct TypeListTagString : vtkm::ListTagBase { }; +struct TypeListTagString : vtkm::ListTagBase +{ +}; -template +template struct UnusualPortal { typedef T ValueType; @@ -74,60 +77,56 @@ struct UnusualPortal vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; } VTKM_EXEC_CONT - ValueType Get(vtkm::Id index) const { - return TestValue(index, ValueType()); - } + ValueType Get(vtkm::Id index) const { return TestValue(index, ValueType()); } }; -template +template class ArrayHandleWithUnusualStorage - : public vtkm::cont::ArrayHandle > > + : public vtkm::cont::ArrayHandle>> { - typedef vtkm::cont::ArrayHandle > > - Superclass; + typedef vtkm::cont::ArrayHandle>> Superclass; + public: VTKM_CONT ArrayHandleWithUnusualStorage() - : Superclass(typename Superclass::PortalConstControl()) { } + : Superclass(typename Superclass::PortalConstControl()) + { + } }; -struct StorageListTagUnusual : - vtkm::ListTagBase< - ArrayHandleWithUnusualStorage::StorageTag, - ArrayHandleWithUnusualStorage::StorageTag> -{ }; +struct StorageListTagUnusual + : vtkm::ListTagBase::StorageTag, + ArrayHandleWithUnusualStorage::StorageTag> +{ +}; -template +template struct TestValueFunctor { - T operator()(vtkm::Id index) const - { - return TestValue(index, T()); - } + T operator()(vtkm::Id index) const { return TestValue(index, T()); } }; bool CheckCalled; struct CheckFunctor { - template - void operator()(vtkm::cont::ArrayHandle array) const { + template + void operator()(vtkm::cont::ArrayHandle array) const + { CheckCalled = true; std::cout << " Checking for type: " << typeid(T).name() << std::endl; - VTKM_TEST_ASSERT(array.GetNumberOfValues() == ARRAY_SIZE, - "Unexpected array size."); + VTKM_TEST_ASSERT(array.GetNumberOfValues() == ARRAY_SIZE, "Unexpected array size."); - typename vtkm::cont::ArrayHandle::PortalConstControl portal = - array.GetPortalConstControl(); + typename vtkm::cont::ArrayHandle::PortalConstControl portal = + array.GetPortalConstControl(); CheckPortal(portal); } }; -template -void BasicDynamicArrayChecks( - const vtkm::cont::DynamicArrayHandleBase &array, - vtkm::IdComponent numComponents) +template +void BasicDynamicArrayChecks(const vtkm::cont::DynamicArrayHandleBase& array, + vtkm::IdComponent numComponents) { VTKM_TEST_ASSERT(array.GetNumberOfValues() == ARRAY_SIZE, "Dynamic array reports unexpected size."); @@ -135,31 +134,29 @@ void BasicDynamicArrayChecks( "Dynamic array reports unexpected number of components."); } -void CheckDynamicArray(vtkm::cont::DynamicArrayHandle array, - vtkm::IdComponent numComponents) +void CheckDynamicArray(vtkm::cont::DynamicArrayHandle array, vtkm::IdComponent numComponents) { BasicDynamicArrayChecks(array, numComponents); array.CastAndCall(CheckFunctor()); - VTKM_TEST_ASSERT(CheckCalled, - "The functor was never called (and apparently a bad value exception not thrown)."); + VTKM_TEST_ASSERT( + CheckCalled, "The functor was never called (and apparently a bad value exception not thrown)."); } -template -void CheckDynamicArray( - vtkm::cont::DynamicArrayHandleBase array, - vtkm::IdComponent numComponents) +template +void CheckDynamicArray(vtkm::cont::DynamicArrayHandleBase array, + vtkm::IdComponent numComponents) { BasicDynamicArrayChecks(array, numComponents); - CastAndCall(array,CheckFunctor()); + CastAndCall(array, CheckFunctor()); - VTKM_TEST_ASSERT(CheckCalled, - "The functor was never called (and apparently a bad value exception not thrown)."); + VTKM_TEST_ASSERT( + CheckCalled, "The functor was never called (and apparently a bad value exception not thrown)."); } -template +template vtkm::cont::DynamicArrayHandle CreateDynamicArray(T) { // Declared static to prevent going out of scope. @@ -169,33 +166,30 @@ vtkm::cont::DynamicArrayHandle CreateDynamicArray(T) buffer[index] = TestValue(index, T()); } - return vtkm::cont::DynamicArrayHandle( - vtkm::cont::make_ArrayHandle(buffer, ARRAY_SIZE)); + return vtkm::cont::DynamicArrayHandle(vtkm::cont::make_ArrayHandle(buffer, ARRAY_SIZE)); } -template -void CheckCastToArrayHandle(const ArrayHandleType &array) +template +void CheckCastToArrayHandle(const ArrayHandleType& array) { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); vtkm::cont::DynamicArrayHandle dynamicArray = array; - VTKM_TEST_ASSERT( - !dynamicArray.IsType >(), - "Dynamic array reporting is wrong type."); + VTKM_TEST_ASSERT(!dynamicArray.IsType>(), + "Dynamic array reporting is wrong type."); ArrayHandleType castArray1; dynamicArray.CopyTo(castArray1); - VTKM_TEST_ASSERT(dynamicArray.IsSameType(castArray1), - "Did not query handle correctly."); + VTKM_TEST_ASSERT(dynamicArray.IsSameType(castArray1), "Did not query handle correctly."); VTKM_TEST_ASSERT(array == castArray1, "Did not get back same array."); ArrayHandleType castArray2 = - dynamicArray.CastToTypeStorage(); + dynamicArray.CastToTypeStorage(); VTKM_TEST_ASSERT(array == castArray2, "Did not get back same array."); } -template +template void TryNewInstance(T, DynamicArrayType originalArray) { // This check should already have been performed by caller, but just in case. @@ -204,8 +198,7 @@ void TryNewInstance(T, DynamicArrayType originalArray) std::cout << "Create new instance of array." << std::endl; DynamicArrayType newArray = originalArray.NewInstance(); - std::cout << "Get a static instance of the new array (which checks the type)." - << std::endl; + std::cout << "Get a static instance of the new array (which checks the type)." << std::endl; vtkm::cont::ArrayHandle staticArray; newArray.CopyTo(staticArray); @@ -214,7 +207,7 @@ void TryNewInstance(T, DynamicArrayType originalArray) staticArray.Allocate(ARRAY_SIZE); for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { - staticArray.GetPortalControl().Set(index, TestValue(index+100, T())); + staticArray.GetPortalControl().Set(index, TestValue(index + 100, T())); } CheckDynamicArray(originalArray, vtkm::VecTraits::NUM_COMPONENTS); @@ -227,7 +220,7 @@ void TryNewInstance(T, DynamicArrayType originalArray) CheckDynamicArray(newArray, vtkm::VecTraits::NUM_COMPONENTS); } -template +template void TryDefaultType(T) { CheckCalled = false; @@ -241,8 +234,9 @@ void TryDefaultType(T) struct TryBasicVTKmType { - template - void operator()(T) const { + template + void operator()(T) const + { CheckCalled = false; vtkm::cont::DynamicArrayHandle array = CreateDynamicArray(T()); @@ -271,15 +265,14 @@ void TryUnusualType() CheckCalled = false; CheckDynamicArray(array.ResetTypeList(TypeListTagString()), 1); - VTKM_TEST_ASSERT(CheckCalled, - "The functor was never called (and apparently a bad value exception not thrown)."); - std::cout << " Found type when type list was reset." << std:: endl; + VTKM_TEST_ASSERT( + CheckCalled, "The functor was never called (and apparently a bad value exception not thrown)."); + std::cout << " Found type when type list was reset." << std::endl; } void TryUnusualStorage() { - vtkm::cont::DynamicArrayHandle array = - ArrayHandleWithUnusualStorage(); + vtkm::cont::DynamicArrayHandle array = ArrayHandleWithUnusualStorage(); try { @@ -293,24 +286,21 @@ void TryUnusualStorage() CheckCalled = false; CheckDynamicArray(array.ResetStorageList(StorageListTagUnusual()), 1); - std::cout << " Found instance when storage list was reset." << std:: endl; + std::cout << " Found instance when storage list was reset." << std::endl; } void TryUnusualTypeAndStorage() { - vtkm::cont::DynamicArrayHandle array = - ArrayHandleWithUnusualStorage(); + vtkm::cont::DynamicArrayHandle array = ArrayHandleWithUnusualStorage(); try { CheckDynamicArray(array, 1); - VTKM_TEST_FAIL( - "CastAndCall failed to error for unrecognized type/storage."); + VTKM_TEST_FAIL("CastAndCall failed to error for unrecognized type/storage."); } catch (vtkm::cont::ErrorBadValue&) { - std::cout << " Caught exception for unrecognized type/storage." - << std::endl; + std::cout << " Caught exception for unrecognized type/storage." << std::endl; } try @@ -336,8 +326,7 @@ void TryUnusualTypeAndStorage() try { //resetting the string and tag should result in a valid array handle - CheckDynamicArray(array.ResetTypeAndStorageLists(TypeListTagString(), - StorageListTagUnusual()), + CheckDynamicArray(array.ResetTypeAndStorageLists(TypeListTagString(), StorageListTagUnusual()), 1); } catch (vtkm::cont::ErrorBadValue&) @@ -345,27 +334,20 @@ void TryUnusualTypeAndStorage() VTKM_TEST_FAIL("ResetTypeAndStorageLists should have handled the custom type/storage."); } + CheckCalled = false; + CheckDynamicArray( + array.ResetTypeList(TypeListTagString()).ResetStorageList(StorageListTagUnusual()), 1); + std::cout << " Found instance when type and storage lists were reset." << std::endl; CheckCalled = false; - CheckDynamicArray(array - .ResetTypeList(TypeListTagString()) - .ResetStorageList(StorageListTagUnusual()), - 1); - std::cout << " Found instance when type and storage lists were reset." << std:: endl; + CheckDynamicArray( + array.ResetStorageList(StorageListTagUnusual()).ResetTypeList(TypeListTagString()), 1); + std::cout << " Found instance when storage and type lists were reset." << std::endl; CheckCalled = false; - CheckDynamicArray(array - .ResetStorageList(StorageListTagUnusual()) - .ResetTypeList(TypeListTagString()), + CheckDynamicArray(array.ResetTypeAndStorageLists(TypeListTagString(), StorageListTagUnusual()), 1); - std::cout << " Found instance when storage and type lists were reset." << std:: endl; - - CheckCalled = false; - CheckDynamicArray(array - .ResetTypeAndStorageLists(TypeListTagString(), - StorageListTagUnusual()), - 1); - std::cout << " Found instance when storage and type lists were reset." << std:: endl; + std::cout << " Found instance when storage and type lists were reset." << std::endl; } void TryCastToArrayHandle() @@ -376,51 +358,42 @@ void TryCastToArrayHandle() { buffer[index] = TestValue(index, vtkm::Id()); } - vtkm::cont::ArrayHandle array = - vtkm::cont::make_ArrayHandle(buffer, ARRAY_SIZE); + vtkm::cont::ArrayHandle array = vtkm::cont::make_ArrayHandle(buffer, ARRAY_SIZE); CheckCastToArrayHandle(array); std::cout << " Cast array handle." << std::endl; - CheckCastToArrayHandle( - vtkm::cont::make_ArrayHandleCast(array, vtkm::FloatDefault())); + CheckCastToArrayHandle(vtkm::cont::make_ArrayHandleCast(array, vtkm::FloatDefault())); std::cout << " Composite vector array handle." << std::endl; - CheckCastToArrayHandle( - vtkm::cont::make_ArrayHandleCompositeVector(array, 0, array, 0)); + CheckCastToArrayHandle(vtkm::cont::make_ArrayHandleCompositeVector(array, 0, array, 0)); std::cout << " Constant array handle." << std::endl; CheckCastToArrayHandle(vtkm::cont::make_ArrayHandleConstant(5, ARRAY_SIZE)); std::cout << " Counting array handle." << std::endl; - vtkm::cont::ArrayHandleCounting countingArray( - ARRAY_SIZE-1, -1, ARRAY_SIZE); + vtkm::cont::ArrayHandleCounting countingArray(ARRAY_SIZE - 1, -1, ARRAY_SIZE); CheckCastToArrayHandle(countingArray); std::cout << " Group vec array handle" << std::endl; - vtkm::cont::ArrayHandleGroupVec, 2> - groupVecArray(array); + vtkm::cont::ArrayHandleGroupVec, 2> groupVecArray(array); CheckCastToArrayHandle(groupVecArray); std::cout << " Implicit array handle." << std::endl; - CheckCastToArrayHandle( - vtkm::cont::make_ArrayHandleImplicit( - TestValueFunctor(), ARRAY_SIZE)); + CheckCastToArrayHandle(vtkm::cont::make_ArrayHandleImplicit( + TestValueFunctor(), ARRAY_SIZE)); std::cout << " Index array handle." << std::endl; CheckCastToArrayHandle(vtkm::cont::ArrayHandleIndex(ARRAY_SIZE)); std::cout << " Permutation array handle." << std::endl; - CheckCastToArrayHandle( - vtkm::cont::make_ArrayHandlePermutation(countingArray, array)); + CheckCastToArrayHandle(vtkm::cont::make_ArrayHandlePermutation(countingArray, array)); std::cout << " Transform array handle." << std::endl; - CheckCastToArrayHandle( - vtkm::cont::make_ArrayHandleTransform( - countingArray,TestValueFunctor())); + CheckCastToArrayHandle(vtkm::cont::make_ArrayHandleTransform( + countingArray, TestValueFunctor())); std::cout << " Uniform point coordinates array handle." << std::endl; - CheckCastToArrayHandle(vtkm::cont::ArrayHandleUniformPointCoordinates( - vtkm::Id3(ARRAY_SIZE))); + CheckCastToArrayHandle(vtkm::cont::ArrayHandleUniformPointCoordinates(vtkm::Id3(ARRAY_SIZE))); std::cout << " Zip array handle." << std::endl; CheckCastToArrayHandle(vtkm::cont::make_ArrayHandleZip(countingArray, array)); @@ -438,9 +411,9 @@ void TestDynamicArrayHandle() std::cout << "*** vtkm::Float64 *****************" << std::endl; TryDefaultType(vtkm::Float64()); std::cout << "*** vtkm::Vec **********" << std::endl; - TryDefaultType(vtkm::Vec()); + TryDefaultType(vtkm::Vec()); std::cout << "*** vtkm::Vec **********" << std::endl; - TryDefaultType(vtkm::Vec()); + TryDefaultType(vtkm::Vec()); std::cout << "Try exemplar VTK-m types." << std::endl; vtkm::testing::Testing::TryTypes(TryBasicVTKmType()); @@ -460,7 +433,7 @@ void TestDynamicArrayHandle() } // anonymous namespace -int UnitTestDynamicArrayHandle(int, char *[]) +int UnitTestDynamicArrayHandle(int, char* []) { return vtkm::cont::testing::Testing::Run(TestDynamicArrayHandle); } diff --git a/vtkm/cont/testing/UnitTestDynamicCellSet.cxx b/vtkm/cont/testing/UnitTestDynamicCellSet.cxx index fe8918b64..db4491db7 100644 --- a/vtkm/cont/testing/UnitTestDynamicCellSet.cxx +++ b/vtkm/cont/testing/UnitTestDynamicCellSet.cxx @@ -24,40 +24,37 @@ #include -namespace { +namespace +{ struct NonDefaultCellSetList - : vtkm::ListTagBase< - vtkm::cont::CellSetStructured<1>, - vtkm::cont::CellSetExplicit::StorageTag > > -{ }; + : vtkm::ListTagBase< + vtkm::cont::CellSetStructured<1>, + vtkm::cont::CellSetExplicit::StorageTag>> +{ +}; bool CheckCalled; -template +template struct CheckFunctor { - void operator()(const ExpectedCellType &) const - { - CheckCalled = true; - } + void operator()(const ExpectedCellType&) const { CheckCalled = true; } - template - void operator()(const UnexpectedType &) const + template + void operator()(const UnexpectedType&) const { VTKM_TEST_FAIL("CastAndCall functor called with wrong type."); } }; -template -void CheckDynamicCellSet( - const CellSetType &cellSet, - vtkm::cont::DynamicCellSetBase dynamicCellSet) +template +void CheckDynamicCellSet(const CellSetType& cellSet, + vtkm::cont::DynamicCellSetBase dynamicCellSet) { VTKM_TEST_ASSERT(dynamicCellSet.template IsType(), "DynamicCellSet reports wrong type."); - VTKM_TEST_ASSERT(dynamicCellSet.IsSameType(cellSet), - "DynamicCellSet reports wrong type."); + VTKM_TEST_ASSERT(dynamicCellSet.IsSameType(cellSet), "DynamicCellSet reports wrong type."); VTKM_TEST_ASSERT(!dynamicCellSet.template IsType(), "DynamicCellSet reports wrong type."); @@ -66,45 +63,38 @@ void CheckDynamicCellSet( CheckCalled = false; dynamicCellSet.CastAndCall(CheckFunctor()); - VTKM_TEST_ASSERT(CheckCalled, - "The functor was never called (and apparently a bad value exception not thrown)."); + VTKM_TEST_ASSERT( + CheckCalled, "The functor was never called (and apparently a bad value exception not thrown)."); CheckCalled = false; CastAndCall(dynamicCellSet, CheckFunctor()); - VTKM_TEST_ASSERT(CheckCalled, - "The functor was never called (and apparently a bad value exception not thrown)."); + VTKM_TEST_ASSERT( + CheckCalled, "The functor was never called (and apparently a bad value exception not thrown)."); } -template -void TryNewInstance( - CellSetType, vtkm::cont::DynamicCellSetBase &originalCellSet) +template +void TryNewInstance(CellSetType, vtkm::cont::DynamicCellSetBase& originalCellSet) { - vtkm::cont::DynamicCellSetBase newCellSet = - originalCellSet.NewInstance(); + vtkm::cont::DynamicCellSetBase newCellSet = originalCellSet.NewInstance(); - VTKM_TEST_ASSERT(newCellSet.template IsType(), - "New cell set wrong type."); + VTKM_TEST_ASSERT(newCellSet.template IsType(), "New cell set wrong type."); - VTKM_TEST_ASSERT(&originalCellSet.CastToBase() - != &newCellSet.CastToBase(), + VTKM_TEST_ASSERT(&originalCellSet.CastToBase() != &newCellSet.CastToBase(), "NewInstance did not make a copy."); } -template -void TryCellSet(CellSetType cellSet, - vtkm::cont::DynamicCellSetBase &dynamicCellSet) +template +void TryCellSet(CellSetType cellSet, vtkm::cont::DynamicCellSetBase& dynamicCellSet) { CheckDynamicCellSet(cellSet, dynamicCellSet); - CheckDynamicCellSet( - cellSet, - dynamicCellSet.ResetCellSetList(vtkm::ListTagBase())); + CheckDynamicCellSet(cellSet, dynamicCellSet.ResetCellSetList(vtkm::ListTagBase())); TryNewInstance(cellSet, dynamicCellSet); } -template +template void TryDefaultCellSet(CellSetType cellSet) { vtkm::cont::DynamicCellSet dynamicCellSet(cellSet); @@ -112,7 +102,7 @@ void TryDefaultCellSet(CellSetType cellSet) TryCellSet(cellSet, dynamicCellSet); } -template +template void TryNonDefaultCellSet(CellSetType cellSet) { vtkm::cont::DynamicCellSetBase dynamicCellSet(cellSet); @@ -134,13 +124,13 @@ void TestDynamicCellSet() std::cout << "*** 1D Structured Grid ******************" << std::endl; TryNonDefaultCellSet(vtkm::cont::CellSetStructured<1>()); std::cout << "*** Explicit Grid Constant Shape ********" << std::endl; - TryNonDefaultCellSet(vtkm::cont::CellSetExplicit< - vtkm::cont::ArrayHandleConstant::StorageTag>()); + TryNonDefaultCellSet( + vtkm::cont::CellSetExplicit::StorageTag>()); } } // anonymous namespace -int UnitTestDynamicCellSet(int, char *[]) +int UnitTestDynamicCellSet(int, char* []) { return vtkm::cont::testing::Testing::Run(TestDynamicCellSet); } diff --git a/vtkm/cont/testing/UnitTestRuntimeDeviceInformation.cxx b/vtkm/cont/testing/UnitTestRuntimeDeviceInformation.cxx index c0c399f7e..bcc6ccf1c 100644 --- a/vtkm/cont/testing/UnitTestRuntimeDeviceInformation.cxx +++ b/vtkm/cont/testing/UnitTestRuntimeDeviceInformation.cxx @@ -27,40 +27,42 @@ #include -namespace { +namespace +{ -template struct DoesExist; +template +struct DoesExist; -template +template void detect_if_exists(DeviceAdapterTag tag) { typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; DoesExist::Exist(tag); } -template<> +template <> struct DoesExist { - template + template static void Exist(DeviceAdapterTag) { //runtime information for this device should return false vtkm::cont::RuntimeDeviceInformation runtime; VTKM_TEST_ASSERT(runtime.Exists() == false, - "A backend with zero compile time support, can't have runtime support"); + "A backend with zero compile time support, can't have runtime support"); } }; -template<> +template <> struct DoesExist { - template + template static void Exist(DeviceAdapterTag) { //runtime information for this device should return true vtkm::cont::RuntimeDeviceInformation runtime; VTKM_TEST_ASSERT(runtime.Exists() == true, - "A backend with compile time support, should have runtime support"); + "A backend with compile time support, should have runtime support"); } }; @@ -75,12 +77,11 @@ void Detection() detect_if_exists(CudaTag()); detect_if_exists(TBBTag()); detect_if_exists(SerialTag()); - } } // anonymous namespace -int UnitTestRuntimeDeviceInformation(int, char *[]) +int UnitTestRuntimeDeviceInformation(int, char* []) { return vtkm::cont::testing::Testing::Run(Detection); } diff --git a/vtkm/cont/testing/UnitTestStorageBasic.cxx b/vtkm/cont/testing/UnitTestStorageBasic.cxx index bb7b8b7ec..3ac3ef150 100644 --- a/vtkm/cont/testing/UnitTestStorageBasic.cxx +++ b/vtkm/cont/testing/UnitTestStorageBasic.cxx @@ -36,19 +36,19 @@ #include #include -namespace { +namespace +{ const vtkm::Id ARRAY_SIZE = 10; template struct TemplatedTests { - typedef vtkm::cont::internal::Storage - StorageType; + typedef vtkm::cont::internal::Storage StorageType; typedef typename StorageType::ValueType ValueType; typedef typename StorageType::PortalType PortalType; - void SetStorage(StorageType &array, const ValueType& value) + void SetStorage(StorageType& array, const ValueType& value) { PortalType portal = array.GetPortal(); for (vtkm::Id index = 0; index < portal.GetNumberOfValues(); index++) @@ -57,22 +57,23 @@ struct TemplatedTests } } - bool CheckStorage(StorageType &array, const ValueType& value) + bool CheckStorage(StorageType& array, const ValueType& value) { PortalType portal = array.GetPortal(); for (vtkm::Id index = 0; index < portal.GetNumberOfValues(); index++) { - if (!test_equal(portal.Get(index), value)) { return false; } + if (!test_equal(portal.Get(index), value)) + { + return false; + } } return true; } - typename vtkm::VecTraits::ComponentType STOLEN_ARRAY_VALUE() - { - return 29; - } + typename vtkm::VecTraits::ComponentType STOLEN_ARRAY_VALUE() { return 29; } - void TestAlignedAllocatorSTL(){ + void TestAlignedAllocatorSTL() + { typedef typename StorageType::AllocatorType Allocator; std::vector vec(ARRAY_SIZE, ValueType()); StorageType store(&vec[0], ARRAY_SIZE); @@ -80,10 +81,12 @@ struct TemplatedTests // This test checks that we can compile and use the allocator with all // STL containers - void CompileSTLAllocator(){ + void CompileSTLAllocator() + { typedef typename StorageType::AllocatorType Allocator; - typedef typename StorageType::AllocatorType:: - template rebind >::other PairAllocator; + typedef + typename StorageType::AllocatorType::template rebind>::other + PairAllocator; std::vector v; v.push_back(ValueType()); @@ -105,22 +108,22 @@ struct TemplatedTests std::multimap, PairAllocator> mm; mm.insert(std::pair(ValueType(), ValueType())); - std::stack > stack; + std::stack> stack; stack.push(ValueType()); - std::queue > queue; + std::queue> queue; queue.push(ValueType()); - std::priority_queue > pqueue; + std::priority_queue> pqueue; pqueue.push(ValueType()); } /// Returned value should later be passed to StealArray2. It is best to /// put as much between the two test parts to maximize the chance of a /// deallocated array being overridden (and thus detected). - ValueType *StealArray1() + ValueType* StealArray1() { - ValueType *stolenArray; + ValueType* stolenArray; ValueType stolenArrayValue = ValueType(STOLEN_ARRAY_VALUE()); @@ -132,12 +135,11 @@ struct TemplatedTests "Array not properly allocated."); // This call steals the array and prevents deallocation. stolenArray = stealMyArray.StealArray(); - VTKM_TEST_ASSERT(stealMyArray.GetNumberOfValues() == 0, - "StealArray did not let go of array."); + VTKM_TEST_ASSERT(stealMyArray.GetNumberOfValues() == 0, "StealArray did not let go of array."); return stolenArray; } - void StealArray2(ValueType *stolenArray) + void StealArray2(ValueType* stolenArray) { ValueType stolenArrayValue = ValueType(STOLEN_ARRAY_VALUE()); @@ -153,8 +155,7 @@ struct TemplatedTests void BasicAllocation() { StorageType arrayStorage; - VTKM_TEST_ASSERT(arrayStorage.GetNumberOfValues() == 0, - "New array storage not zero sized."); + VTKM_TEST_ASSERT(arrayStorage.GetNumberOfValues() == 0, "New array storage not zero sized."); arrayStorage.Allocate(ARRAY_SIZE); VTKM_TEST_ASSERT(arrayStorage.GetNumberOfValues() == ARRAY_SIZE, @@ -174,21 +175,22 @@ struct TemplatedTests "Array Shrnk failed to resize."); arrayStorage.ReleaseResources(); - VTKM_TEST_ASSERT(arrayStorage.GetNumberOfValues() == 0, - "Array not released correctly."); + VTKM_TEST_ASSERT(arrayStorage.GetNumberOfValues() == 0, "Array not released correctly."); try { arrayStorage.Shrink(ARRAY_SIZE); - VTKM_TEST_ASSERT(true==false, + VTKM_TEST_ASSERT(true == false, "Array shrink do a larger size was possible. This can't be allowed."); } - catch(vtkm::cont::ErrorBadValue&) {} + catch (vtkm::cont::ErrorBadValue&) + { + } } void operator()() { - ValueType *stolenArray = StealArray1(); + ValueType* stolenArray = StealArray1(); BasicAllocation(); @@ -206,7 +208,6 @@ struct TestFunctor { TemplatedTests tests; tests(); - } }; @@ -217,7 +218,7 @@ void TestStorageBasic() } // Anonymous namespace -int UnitTestStorageBasic(int, char *[]) +int UnitTestStorageBasic(int, char* []) { return vtkm::cont::testing::Testing::Run(TestStorageBasic); } diff --git a/vtkm/cont/testing/UnitTestStorageImplicit.cxx b/vtkm/cont/testing/UnitTestStorageImplicit.cxx index 711f7383f..2fbb26446 100644 --- a/vtkm/cont/testing/UnitTestStorageImplicit.cxx +++ b/vtkm/cont/testing/UnitTestStorageImplicit.cxx @@ -30,7 +30,8 @@ #include -namespace { +namespace +{ template struct TestImplicitStorage @@ -38,33 +39,26 @@ struct TestImplicitStorage typedef T ValueType; ValueType Temp; - VTKM_EXEC_CONT - TestImplicitStorage(): Temp(1) { } - - VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const + TestImplicitStorage() + : Temp(1) { - return 1; } VTKM_EXEC_CONT - ValueType Get(vtkm::Id vtkmNotUsed(index)) const - { - return Temp; - } + vtkm::Id GetNumberOfValues() const { return 1; } + VTKM_EXEC_CONT + ValueType Get(vtkm::Id vtkmNotUsed(index)) const { return Temp; } }; const vtkm::Id ARRAY_SIZE = 1; - template struct TemplatedTests { - typedef vtkm::cont::StorageTagImplicit< TestImplicitStorage > - StorageTagType; - typedef vtkm::cont::internal::Storage< T, StorageTagType > StorageType; + typedef vtkm::cont::StorageTagImplicit> StorageTagType; + typedef vtkm::cont::internal::Storage StorageType; typedef typename StorageType::ValueType ValueType; typedef typename StorageType::PortalType PortalType; @@ -82,30 +76,31 @@ struct TemplatedTests try { arrayStorage.Allocate(ARRAY_SIZE); - VTKM_TEST_ASSERT(false == true, - "Implicit Storage Allocate method didn't throw error."); + VTKM_TEST_ASSERT(false == true, "Implicit Storage Allocate method didn't throw error."); + } + catch (vtkm::cont::ErrorBadValue&) + { } - catch(vtkm::cont::ErrorBadValue&) {} try { arrayStorage.Shrink(ARRAY_SIZE); - VTKM_TEST_ASSERT(true==false, + VTKM_TEST_ASSERT(true == false, "Array shrink do a larger size was possible. This can't be allowed."); } - catch(vtkm::cont::ErrorBadValue&) {} + catch (vtkm::cont::ErrorBadValue&) + { + } //verify that calling ReleaseResources doesn't throw an exception arrayStorage.ReleaseResources(); - } void BasicAccess() { TestImplicitStorage portal; - vtkm::cont::ArrayHandle implictHandle(portal); - VTKM_TEST_ASSERT(implictHandle.GetNumberOfValues() == 1, - "handle should have size 1"); + vtkm::cont::ArrayHandle implictHandle(portal); + VTKM_TEST_ASSERT(implictHandle.GetNumberOfValues() == 1, "handle should have size 1"); VTKM_TEST_ASSERT(implictHandle.GetPortalConstControl().Get(0) == T(1), "portals first values should be 1"); ; @@ -125,7 +120,6 @@ struct TestFunctor { TemplatedTests tests; tests(); - } }; @@ -136,7 +130,7 @@ void TestStorageBasic() } // Anonymous namespace -int UnitTestStorageImplicit(int, char *[]) +int UnitTestStorageImplicit(int, char* []) { return vtkm::cont::testing::Testing::Run(TestStorageBasic); } diff --git a/vtkm/cont/testing/UnitTestStorageListTag.cxx b/vtkm/cont/testing/UnitTestStorageListTag.cxx index 29cbfbf96..64ab7ee06 100644 --- a/vtkm/cont/testing/UnitTestStorageListTag.cxx +++ b/vtkm/cont/testing/UnitTestStorageListTag.cxx @@ -24,42 +24,44 @@ #include -namespace { +namespace +{ -enum TypeId { +enum TypeId +{ BASIC }; -TypeId GetTypeId(vtkm::cont::StorageTagBasic) { return BASIC; } +TypeId GetTypeId(vtkm::cont::StorageTagBasic) +{ + return BASIC; +} struct TestFunctor { std::vector FoundTypes; - template - VTKM_CONT - void operator()(T) { + template + VTKM_CONT void operator()(T) + { this->FoundTypes.push_back(GetTypeId(T())); } }; -template -void CheckSame(const vtkm::Vec &expected, - const std::vector &found) +template +void CheckSame(const vtkm::Vec& expected, const std::vector& found) { - VTKM_TEST_ASSERT(static_cast(found.size()) == N, - "Got wrong number of items."); + VTKM_TEST_ASSERT(static_cast(found.size()) == N, "Got wrong number of items."); for (vtkm::IdComponent index = 0; index < N; index++) { vtkm::UInt32 i = static_cast(index); - VTKM_TEST_ASSERT(expected[index] == found[i], - "Got wrong type."); + VTKM_TEST_ASSERT(expected[index] == found[i], "Got wrong type."); } } -template -void TryList(const vtkm::Vec &expected, ListTag) +template +void TryList(const vtkm::Vec& expected, ListTag) { TestFunctor functor; vtkm::ListForEach(functor, ListTag()); @@ -69,12 +71,12 @@ void TryList(const vtkm::Vec &expected, ListTag) void TestLists() { std::cout << "StorageListTagBasic" << std::endl; - TryList(vtkm::Vec(BASIC), vtkm::cont::StorageListTagBasic()); + TryList(vtkm::Vec(BASIC), vtkm::cont::StorageListTagBasic()); } } // anonymous namespace -int UnitTestStorageListTag(int, char *[]) +int UnitTestStorageListTag(int, char* []) { return vtkm::cont::testing::Testing::Run(TestLists); } diff --git a/vtkm/cont/testing/UnitTestTimer.cxx b/vtkm/cont/testing/UnitTestTimer.cxx index c0baaad21..daa41d94f 100644 --- a/vtkm/cont/testing/UnitTestTimer.cxx +++ b/vtkm/cont/testing/UnitTestTimer.cxx @@ -23,7 +23,8 @@ #include #include -namespace { +namespace +{ void Time() { @@ -39,15 +40,13 @@ void Time() std::cout << "Elapsed time: " << elapsedTime << std::endl; - VTKM_TEST_ASSERT(elapsedTime > 0.999, - "Timer did not capture full second wait."); - VTKM_TEST_ASSERT(elapsedTime < 2.0, - "Timer counted too far or system really busy."); + VTKM_TEST_ASSERT(elapsedTime > 0.999, "Timer did not capture full second wait."); + VTKM_TEST_ASSERT(elapsedTime < 2.0, "Timer counted too far or system really busy."); } } // anonymous namespace -int UnitTestTimer(int, char *[]) +int UnitTestTimer(int, char* []) { return vtkm::cont::testing::Testing::Run(Time); } diff --git a/vtkm/cont/testing/UnitTestTryExecute.cxx b/vtkm/cont/testing/UnitTestTryExecute.cxx index 5f5730933..32a7e4c88 100644 --- a/vtkm/cont/testing/UnitTestTryExecute.cxx +++ b/vtkm/cont/testing/UnitTestTryExecute.cxx @@ -28,7 +28,8 @@ #include -namespace { +namespace +{ static const vtkm::Id ARRAY_SIZE = 10; @@ -41,12 +42,14 @@ struct TryExecuteTestFunctor VTKM_CONT TryExecuteTestFunctor(vtkm::cont::ArrayHandle inArray, vtkm::cont::ArrayHandle outArray) - : NumCalls(0), InArray(inArray), OutArray(outArray) - { } + : NumCalls(0) + , InArray(inArray) + , OutArray(outArray) + { + } - template - VTKM_CONT - bool operator()(Device) + template + VTKM_CONT bool operator()(Device) { typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; Algorithm::Copy(this->InArray, this->OutArray); @@ -55,7 +58,7 @@ struct TryExecuteTestFunctor } }; -template +template void TryExecuteWithList(DeviceList, bool expectSuccess) { vtkm::cont::ArrayHandle inArray; @@ -90,7 +93,7 @@ static void Run() TryExecuteWithList(SingleValidList(), true); std::cout << "Try a list with two valid devices." << std::endl; - typedef vtkm::ListTagBase DoubleValidList; + typedef vtkm::ListTagBase DoubleValidList; TryExecuteWithList(DoubleValidList(), true); std::cout << "Try a list with only invalid device." << std::endl; @@ -98,13 +101,13 @@ static void Run() TryExecuteWithList(SingleInvalidList(), false); std::cout << "Try a list with an invalid and valid device." << std::endl; - typedef vtkm::ListTagBase InvalidAndValidList; + typedef vtkm::ListTagBase InvalidAndValidList; TryExecuteWithList(InvalidAndValidList(), true); } } // anonymous namespace -int UnitTestTryExecute(int, char*[]) +int UnitTestTryExecute(int, char* []) { return vtkm::cont::testing::Testing::Run(Run); } diff --git a/vtkm/exec/AtomicArray.h b/vtkm/exec/AtomicArray.h index 54015e34d..638177bd0 100644 --- a/vtkm/exec/AtomicArray.h +++ b/vtkm/exec/AtomicArray.h @@ -25,12 +25,16 @@ #include #include -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ /// \brief A type list containing types that can be used with an AtomicArray. /// -struct AtomicArrayTypeListTag : vtkm::ListTagBase { }; +struct AtomicArrayTypeListTag : vtkm::ListTagBase +{ +}; /// A class that can be used to atomically operate on an array of values safely /// across multiple instances of the same worklet. This is useful when you have @@ -46,7 +50,7 @@ struct AtomicArrayTypeListTag : vtkm::ListTagBase { }; /// Supported Types: 32 / 64 bit signed integers /// /// -template +template class AtomicArray : public vtkm::exec::ExecutionObjectBase { public: @@ -55,19 +59,19 @@ public: VTKM_CONT AtomicArray() : AtomicImplementation(vtkm::cont::make_ArrayHandle((T*)nullptr, 0)) - { } + { + } - template - VTKM_CONT - AtomicArray(vtkm::cont::ArrayHandle handle): - AtomicImplementation( handle ) + template + VTKM_CONT AtomicArray(vtkm::cont::ArrayHandle handle) + : AtomicImplementation(handle) { } VTKM_EXEC T Add(vtkm::Id index, const T& value) const { - return this->AtomicImplementation.Add(index,value); + return this->AtomicImplementation.Add(index, value); } // @@ -78,14 +82,12 @@ public: VTKM_EXEC T CompareAndSwap(vtkm::Id index, const T& newValue, const T& oldValue) const { - return this->AtomicImplementation.CompareAndSwap(index,newValue, oldValue); + return this->AtomicImplementation.CompareAndSwap(index, newValue, oldValue); } private: - vtkm::cont::DeviceAdapterAtomicArrayImplementation - AtomicImplementation; + vtkm::cont::DeviceAdapterAtomicArrayImplementation AtomicImplementation; }; - } } // namespace vtkm::exec diff --git a/vtkm/exec/CellDerivative.h b/vtkm/exec/CellDerivative.h index 13a758c32..20f800fa5 100644 --- a/vtkm/exec/CellDerivative.h +++ b/vtkm/exec/CellDerivative.h @@ -32,55 +32,52 @@ #include #include -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ // The derivative for a 2D polygon in 3D space is underdetermined since there // is no information in the direction perpendicular to the polygon. To compute // derivatives for general polygons, we build a 2D space for the polygon's // plane and solve the derivative there. -namespace { -#define VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(pointIndex,weight0,weight1,weight2)\ - parametricDerivative[0] += field[pointIndex] * weight0; \ - parametricDerivative[1] += field[pointIndex] * weight1; \ +namespace +{ +#define VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(pointIndex, weight0, weight1, weight2) \ + parametricDerivative[0] += field[pointIndex] * weight0; \ + parametricDerivative[1] += field[pointIndex] * weight1; \ parametricDerivative[2] += field[pointIndex] * weight2 // Find the derivative of a field in parametric space. That is, find the // vector [ds/du, ds/dv, ds/dw]. -template -VTKM_EXEC -vtkm::Vec -ParametricDerivative(const FieldVecType &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagHexahedron) +template +VTKM_EXEC vtkm::Vec ParametricDerivative( + const FieldVecType& field, const vtkm::Vec& pcoords, + vtkm::CellShapeTagHexahedron) { typedef typename FieldVecType::ComponentType FieldType; - typedef vtkm::Vec GradientType; + typedef vtkm::Vec GradientType; GradientType pc(pcoords); GradientType rc = GradientType(FieldType(1)) - pc; GradientType parametricDerivative(FieldType(0)); - VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(0, -rc[1]*rc[2], -rc[0]*rc[2], -rc[0]*rc[1]); - VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(1, rc[1]*rc[2], -pc[0]*rc[2], -pc[0]*rc[1]); - VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(2, pc[1]*rc[2], pc[0]*rc[2], -pc[0]*pc[1]); - VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(3, -pc[1]*rc[2], rc[0]*rc[2], -rc[0]*pc[1]); - VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(4, -rc[1]*pc[2], -rc[0]*pc[2], rc[0]*rc[1]); - VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(5, rc[1]*pc[2], -pc[0]*pc[2], pc[0]*rc[1]); - VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(6, pc[1]*pc[2], pc[0]*pc[2], pc[0]*pc[1]); - VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(7, -pc[1]*pc[2], rc[0]*pc[2], rc[0]*pc[1]); + VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(0, -rc[1] * rc[2], -rc[0] * rc[2], -rc[0] * rc[1]); + VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(1, rc[1] * rc[2], -pc[0] * rc[2], -pc[0] * rc[1]); + VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(2, pc[1] * rc[2], pc[0] * rc[2], -pc[0] * pc[1]); + VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(3, -pc[1] * rc[2], rc[0] * rc[2], -rc[0] * pc[1]); + VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(4, -rc[1] * pc[2], -rc[0] * pc[2], rc[0] * rc[1]); + VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(5, rc[1] * pc[2], -pc[0] * pc[2], pc[0] * rc[1]); + VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(6, pc[1] * pc[2], pc[0] * pc[2], pc[0] * pc[1]); + VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D(7, -pc[1] * pc[2], rc[0] * pc[2], rc[0] * pc[1]); return parametricDerivative; } -template -VTKM_EXEC -vtkm::Vec -ParametricDerivative(const FieldVecType &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagWedge) +template +VTKM_EXEC vtkm::Vec ParametricDerivative( + const FieldVecType& field, const vtkm::Vec& pcoords, + vtkm::CellShapeTagWedge) { #if 0 // This is not working. Just leverage the hexahedron code that is working. @@ -95,19 +92,15 @@ ParametricDerivative(const FieldVecType &field, return parametricDerivative; #else - return ParametricDerivative(vtkm::exec::internal::PermuteWedgeToHex(field), - pcoords, + return ParametricDerivative(vtkm::exec::internal::PermuteWedgeToHex(field), pcoords, vtkm::CellShapeTagHexahedron()); #endif } -template -VTKM_EXEC -vtkm::Vec -ParametricDerivative(const FieldVecType &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagPyramid) +template +VTKM_EXEC vtkm::Vec ParametricDerivative( + const FieldVecType& field, const vtkm::Vec& pcoords, + vtkm::CellShapeTagPyramid) { #if 0 // This is not working. Just leverage the hexahedron code that is working. @@ -122,38 +115,33 @@ ParametricDerivative(const FieldVecType &field, return parametricDerivative; #else - return ParametricDerivative(vtkm::exec::internal::PermutePyramidToHex(field), - pcoords, + return ParametricDerivative(vtkm::exec::internal::PermutePyramidToHex(field), pcoords, vtkm::CellShapeTagHexahedron()); #endif } #undef VTKM_ACCUM_PARAMETRIC_DERIVATIVE_3D -#define VTKM_ACCUM_PARAMETRIC_DERIVATIVE_2D(pointIndex, weight0, weight1) \ - parametricDerivative[0] += field[pointIndex] * weight0; \ +#define VTKM_ACCUM_PARAMETRIC_DERIVATIVE_2D(pointIndex, weight0, weight1) \ + parametricDerivative[0] += field[pointIndex] * weight0; \ parametricDerivative[1] += field[pointIndex] * weight1 -template -VTKM_EXEC -vtkm::Vec -ParametricDerivative(const FieldVecType &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagQuad) +template +VTKM_EXEC vtkm::Vec ParametricDerivative( + const FieldVecType& field, const vtkm::Vec& pcoords, + vtkm::CellShapeTagQuad) { typedef typename FieldVecType::ComponentType FieldType; - typedef vtkm::Vec GradientType; + typedef vtkm::Vec GradientType; - GradientType pc(static_cast(pcoords[0]), - static_cast(pcoords[1])); + GradientType pc(static_cast(pcoords[0]), static_cast(pcoords[1])); GradientType rc = GradientType(FieldType(1)) - pc; GradientType parametricDerivative(FieldType(0)); VTKM_ACCUM_PARAMETRIC_DERIVATIVE_2D(0, -rc[1], -rc[0]); - VTKM_ACCUM_PARAMETRIC_DERIVATIVE_2D(1, rc[1], -pc[0]); - VTKM_ACCUM_PARAMETRIC_DERIVATIVE_2D(2, pc[1], pc[0]); - VTKM_ACCUM_PARAMETRIC_DERIVATIVE_2D(3, -pc[1], rc[0]); + VTKM_ACCUM_PARAMETRIC_DERIVATIVE_2D(1, rc[1], -pc[0]); + VTKM_ACCUM_PARAMETRIC_DERIVATIVE_2D(2, pc[1], pc[0]); + VTKM_ACCUM_PARAMETRIC_DERIVATIVE_2D(3, -pc[1], rc[0]); return parametricDerivative; } @@ -208,31 +196,25 @@ ParametricDerivative(const FieldVecType &field, } // namespace unnamed -namespace detail { +namespace detail +{ -template -VTKM_EXEC -vtkm::Vec -CellDerivativeFor3DCell(const FieldVecType &field, - const WorldCoordType &wCoords, - const vtkm::Vec &pcoords, - CellShapeTag) +template +VTKM_EXEC vtkm::Vec CellDerivativeFor3DCell( + const FieldVecType& field, const WorldCoordType& wCoords, + const vtkm::Vec& pcoords, CellShapeTag) { typedef typename FieldVecType::ComponentType FieldType; - typedef vtkm::Vec GradientType; + typedef vtkm::Vec GradientType; // For reasons that should become apparent in a moment, we actually want // the transpose of the Jacobian. - vtkm::Matrix jacobianTranspose; - vtkm::exec::JacobianFor3DCell( - wCoords, pcoords, jacobianTranspose, CellShapeTag()); + vtkm::Matrix jacobianTranspose; + vtkm::exec::JacobianFor3DCell(wCoords, pcoords, jacobianTranspose, CellShapeTag()); jacobianTranspose = vtkm::MatrixTranspose(jacobianTranspose); - GradientType parametricDerivative = - ParametricDerivative(field,pcoords,CellShapeTag()); + GradientType parametricDerivative = ParametricDerivative(field, pcoords, CellShapeTag()); // If we write out the matrices below, it should become clear that the // Jacobian transpose times the field derivative in world space equals @@ -249,78 +231,51 @@ CellDerivativeFor3DCell(const FieldVecType &field, // Now we just need to solve this linear system to find the derivative in // world space. - bool valid; // Ignored. - return vtkm::SolveLinearSystem(jacobianTranspose, - parametricDerivative, - valid); + bool valid; // Ignored. + return vtkm::SolveLinearSystem(jacobianTranspose, parametricDerivative, valid); } -template -VTKM_EXEC -vtkm::Vec -CellDerivativeFor2DCellFinish( - const vtkm::Vec &field, - const vtkm::Matrix &LUFactorization, - const vtkm::Vec &LUPermutation, - const vtkm::Vec &pcoords, - const vtkm::exec::internal::Space2D &space, - CellShapeTag, - vtkm::TypeTraitsScalarTag) +template +VTKM_EXEC vtkm::Vec CellDerivativeFor2DCellFinish( + const vtkm::Vec& field, const vtkm::Matrix& LUFactorization, + const vtkm::Vec& LUPermutation, + const vtkm::Vec& pcoords, + const vtkm::exec::internal::Space2D& space, CellShapeTag, vtkm::TypeTraitsScalarTag) { // Finish solving linear equation. See CellDerivativeFor2DCell implementation // for more detail. - vtkm::Vec parametricDerivative = - ParametricDerivative(field,pcoords,CellShapeTag()); + vtkm::Vec parametricDerivative = + ParametricDerivative(field, pcoords, CellShapeTag()); - vtkm::Vec gradient2D = - vtkm::detail::MatrixLUPSolve( - LUFactorization, LUPermutation, parametricDerivative); + vtkm::Vec gradient2D = + vtkm::detail::MatrixLUPSolve(LUFactorization, LUPermutation, parametricDerivative); return space.ConvertVecFromSpace(gradient2D); } -template -VTKM_EXEC -vtkm::Vec -CellDerivativeFor2DCellFinish( - const vtkm::Vec &field, - const vtkm::Matrix &LUFactorization, - const vtkm::Vec &LUPermutation, - const vtkm::Vec &pcoords, - const vtkm::exec::internal::Space2D &space, - CellShapeTag, - vtkm::TypeTraitsVectorTag) +template +VTKM_EXEC vtkm::Vec CellDerivativeFor2DCellFinish( + const vtkm::Vec& field, const vtkm::Matrix& LUFactorization, + const vtkm::Vec& LUPermutation, + const vtkm::Vec& pcoords, + const vtkm::exec::internal::Space2D& space, CellShapeTag, vtkm::TypeTraitsVectorTag) { using FieldTraits = vtkm::VecTraits; using FieldComponentType = typename FieldTraits::ComponentType; - vtkm::Vec gradient; + vtkm::Vec gradient; for (vtkm::IdComponent fieldComponent = 0; - fieldComponent < FieldTraits::GetNumberOfComponents(field[0]); - fieldComponent++) + fieldComponent < FieldTraits::GetNumberOfComponents(field[0]); fieldComponent++) { - vtkm::Vec subField( - FieldTraits::GetComponent(field[0],fieldComponent), - FieldTraits::GetComponent(field[1],fieldComponent), - FieldTraits::GetComponent(field[2],fieldComponent), - FieldTraits::GetComponent(field[3],fieldComponent)); + vtkm::Vec subField(FieldTraits::GetComponent(field[0], fieldComponent), + FieldTraits::GetComponent(field[1], fieldComponent), + FieldTraits::GetComponent(field[2], fieldComponent), + FieldTraits::GetComponent(field[3], fieldComponent)); - vtkm::Vec subGradient = - CellDerivativeFor2DCellFinish( - subField, - LUFactorization, - LUPermutation, - pcoords, - space, - CellShapeTag(), - typename vtkm::TypeTraits::DimensionalityTag()); + vtkm::Vec subGradient = CellDerivativeFor2DCellFinish( + subField, LUFactorization, LUPermutation, pcoords, space, CellShapeTag(), + typename vtkm::TypeTraits::DimensionalityTag()); FieldTraits::SetComponent(gradient[0], fieldComponent, subGradient[0]); FieldTraits::SetComponent(gradient[1], fieldComponent, subGradient[1]); @@ -330,54 +285,35 @@ CellDerivativeFor2DCellFinish( return gradient; } -template -VTKM_EXEC -vtkm::Vec -CellDerivativeFor2DCellFinish( - const vtkm::Vec &field, - const vtkm::Matrix &LUFactorization, - const vtkm::Vec &LUPermutation, - const vtkm::Vec &pcoords, - const vtkm::exec::internal::Space2D &space, - CellShapeTag, - vtkm::TypeTraitsMatrixTag) +template +VTKM_EXEC vtkm::Vec CellDerivativeFor2DCellFinish( + const vtkm::Vec& field, const vtkm::Matrix& LUFactorization, + const vtkm::Vec& LUPermutation, + const vtkm::Vec& pcoords, + const vtkm::exec::internal::Space2D& space, CellShapeTag, vtkm::TypeTraitsMatrixTag) { - return CellDerivativeFor2DCellFinish(field, - LUFactorization, - LUPermutation, - pcoords, - space, - CellShapeTag(), - vtkm::TypeTraitsVectorTag()); + return CellDerivativeFor2DCellFinish(field, LUFactorization, LUPermutation, pcoords, space, + CellShapeTag(), vtkm::TypeTraitsVectorTag()); } -template -VTKM_EXEC -vtkm::Vec -CellDerivativeFor2DCell(const FieldVecType &field, - const WorldCoordType &wCoords, - const vtkm::Vec &pcoords, - CellShapeTag) +template +VTKM_EXEC vtkm::Vec CellDerivativeFor2DCell( + const FieldVecType& field, const WorldCoordType& wCoords, + const vtkm::Vec& pcoords, CellShapeTag) { using FieldType = typename FieldVecType::ComponentType; using BaseFieldType = typename BaseComponent::Type; // We have an underdetermined system in 3D, so create a 2D space in the // plane that the polygon sits. - vtkm::exec::internal::Space2D space( - wCoords[0], wCoords[1], wCoords[wCoords.GetNumberOfComponents()-1]); + vtkm::exec::internal::Space2D space(wCoords[0], wCoords[1], + wCoords[wCoords.GetNumberOfComponents() - 1]); // For reasons that should become apparent in a moment, we actually want // the transpose of the Jacobian. - vtkm::Matrix jacobianTranspose; - vtkm::exec::JacobianFor2DCell( - wCoords, pcoords, space, jacobianTranspose, CellShapeTag()); + vtkm::Matrix jacobianTranspose; + vtkm::exec::JacobianFor2DCell(wCoords, pcoords, space, jacobianTranspose, CellShapeTag()); jacobianTranspose = vtkm::MatrixTranspose(jacobianTranspose); // Find the derivative of the field in parametric coordinate space. That is, @@ -400,7 +336,7 @@ CellDerivativeFor2DCell(const FieldVecType &field, // Now we just need to solve this linear system to find the derivative in // world space. - bool valid; // Ignored. + bool valid; // Ignored. // If you look at the implementation of vtkm::SolveLinearSystem, you will see // that it is done in two parts. First, it does an LU factorization and then // uses that result to complete the solve. The factorization part talkes the @@ -408,20 +344,14 @@ CellDerivativeFor2DCell(const FieldVecType &field, // field, the factorization can be reused for each component of the vector // field. Thus, we are going to call the internals of SolveLinearSystem // ourselves to do the factorization and then apply it to all components. - vtkm::Vec permutation; + vtkm::Vec permutation; BaseFieldType inversionParity; // Unused - vtkm::detail::MatrixLUPFactor( - jacobianTranspose, permutation, inversionParity, valid); + vtkm::detail::MatrixLUPFactor(jacobianTranspose, permutation, inversionParity, valid); // MatrixLUPFactor does in place factorization. jacobianTranspose is now the // LU factorization. - return CellDerivativeFor2DCellFinish( - field, - jacobianTranspose, - permutation, - pcoords, - space, - CellShapeTag(), - typename vtkm::TypeTraits::DimensionalityTag()); + return CellDerivativeFor2DCellFinish(field, jacobianTranspose, permutation, pcoords, space, + CellShapeTag(), + typename vtkm::TypeTraits::DimensionalityTag()); } } // namespace detail @@ -434,120 +364,88 @@ CellDerivativeFor2DCell(const FieldVecType &field, /// coordinate (i.e. the gradient) at that point. The derivative is not always /// constant in some "linear" cells. /// -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &pointFieldValues, - const WorldCoordType &worldCoordinateValues, - const vtkm::Vec ¶metricCoords, - vtkm::CellShapeTagGeneric shape, - const vtkm::exec::FunctorBase &worklet) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& pointFieldValues, const WorldCoordType& worldCoordinateValues, + const vtkm::Vec& parametricCoords, vtkm::CellShapeTagGeneric shape, + const vtkm::exec::FunctorBase& worklet) { - vtkm::Vec result; + vtkm::Vec result; switch (shape.Id) { - vtkmGenericCellShapeMacro( - result = CellDerivative(pointFieldValues, - worldCoordinateValues, - parametricCoords, - CellShapeTag(), - worklet)); + vtkmGenericCellShapeMacro(result = CellDerivative(pointFieldValues, worldCoordinateValues, + parametricCoords, CellShapeTag(), worklet)); default: worklet.RaiseError("Unknown cell shape sent to derivative."); - return vtkm::Vec(); + return vtkm::Vec(); } return result; } //----------------------------------------------------------------------------- -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &, - const WorldCoordType &, - const vtkm::Vec &, - vtkm::CellShapeTagEmpty, - const vtkm::exec::FunctorBase &worklet) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType&, const WorldCoordType&, const vtkm::Vec&, + vtkm::CellShapeTagEmpty, const vtkm::exec::FunctorBase& worklet) { worklet.RaiseError("Attempted to take derivative in empty cell."); - return vtkm::Vec(); + return vtkm::Vec(); } //----------------------------------------------------------------------------- -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &field, - const WorldCoordType &wCoords, - const vtkm::Vec &, - vtkm::CellShapeTagVertex, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& field, const WorldCoordType& wCoords, + const vtkm::Vec&, vtkm::CellShapeTagVertex, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { (void)field; (void)wCoords; VTKM_ASSERT(field.GetNumberOfComponents() == 1); VTKM_ASSERT(wCoords.GetNumberOfComponents() == 1); - typedef vtkm::Vec GradientType; + typedef vtkm::Vec GradientType; return vtkm::TypeTraits::ZeroInitialization(); } //----------------------------------------------------------------------------- -namespace detail { - -template -VTKM_EXEC -vtkm::Vec -CellDerivativeLineImpl( - const FieldType &deltaField, - const WorldCoordType &vec, // direction of line - const typename WorldCoordType::ComponentType &vecMagSqr, - vtkm::TypeTraitsScalarTag) +namespace detail { - using GradientType = vtkm::Vec; + +template +VTKM_EXEC vtkm::Vec CellDerivativeLineImpl( + const FieldType& deltaField, + const WorldCoordType& vec, // direction of line + const typename WorldCoordType::ComponentType& vecMagSqr, vtkm::TypeTraitsScalarTag) +{ + using GradientType = vtkm::Vec; // The derivative of a line is in the direction of the line. Its length is // equal to the difference of the scalar field divided by the length of the // line segment. Thus, the derivative is characterized by // (deltaField*vec)/mag(vec)^2. - return (deltaField/static_cast(vecMagSqr))*GradientType(vec); + return (deltaField / static_cast(vecMagSqr)) * GradientType(vec); } -template -VTKM_EXEC -vtkm::Vec -CellDerivativeLineImpl( - const FieldType &deltaField, - const WorldCoordType &vec, // direction of line - const typename WorldCoordType::ComponentType &vecMagSqr, - VectorTypeTraitsTag) +template +VTKM_EXEC vtkm::Vec CellDerivativeLineImpl( + const FieldType& deltaField, + const WorldCoordType& vec, // direction of line + const typename WorldCoordType::ComponentType& vecMagSqr, VectorTypeTraitsTag) { using FieldTraits = vtkm::VecTraits; using FieldComponentType = typename FieldTraits::ComponentType; - using GradientType = vtkm::Vec; + using GradientType = vtkm::Vec; GradientType gradient; - for (vtkm::IdComponent fieldComponent= 0; - fieldComponent < FieldTraits::GetNumberOfComponents(deltaField); - fieldComponent++) + for (vtkm::IdComponent fieldComponent = 0; + fieldComponent < FieldTraits::GetNumberOfComponents(deltaField); fieldComponent++) { - using SubGradientType = vtkm::Vec; + using SubGradientType = vtkm::Vec; SubGradientType subGradient = - CellDerivativeLineImpl( - FieldTraits::GetComponent(deltaField, fieldComponent), - vec, - vecMagSqr, - typename vtkm::TypeTraits::DimensionalityTag()); + CellDerivativeLineImpl(FieldTraits::GetComponent(deltaField, fieldComponent), vec, vecMagSqr, + typename vtkm::TypeTraits::DimensionalityTag()); FieldTraits::SetComponent(gradient[0], fieldComponent, subGradient[0]); FieldTraits::SetComponent(gradient[1], fieldComponent, subGradient[1]); FieldTraits::SetComponent(gradient[2], fieldComponent, subGradient[2]); @@ -558,16 +456,11 @@ CellDerivativeLineImpl( } // namespace detail -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &field, - const WorldCoordType &wCoords, - const vtkm::Vec &vtkmNotUsed(pcoords), - vtkm::CellShapeTagLine, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& field, const WorldCoordType& wCoords, + const vtkm::Vec& vtkmNotUsed(pcoords), vtkm::CellShapeTagLine, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(field.GetNumberOfComponents() == 2); VTKM_ASSERT(wCoords.GetNumberOfComponents() == 2); @@ -576,81 +469,61 @@ CellDerivative(const FieldVecType &field, using BaseComponentType = typename BaseComponent::Type; FieldType deltaField(field[1] - field[0]); - vtkm::Vec vec(wCoords[1] - wCoords[0]); + vtkm::Vec vec(wCoords[1] - wCoords[0]); - return detail::CellDerivativeLineImpl( - deltaField, - vec, - vtkm::MagnitudeSquared(vec), - typename vtkm::TypeTraits::DimensionalityTag()); + return detail::CellDerivativeLineImpl(deltaField, vec, vtkm::MagnitudeSquared(vec), + typename vtkm::TypeTraits::DimensionalityTag()); } -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &field, - const vtkm::VecRectilinearPointCoordinates<1> &wCoords, - const vtkm::Vec &vtkmNotUsed(pcoords), - vtkm::CellShapeTagLine, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& field, const vtkm::VecRectilinearPointCoordinates<1>& wCoords, + const vtkm::Vec& vtkmNotUsed(pcoords), vtkm::CellShapeTagLine, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(field.GetNumberOfComponents() == 2); typedef typename FieldVecType::ComponentType T; - return vtkm::Vec( - (field[1]-field[0])/wCoords.GetSpacing()[0], T(0), T(0)); + return vtkm::Vec((field[1] - field[0]) / wCoords.GetSpacing()[0], T(0), T(0)); } //----------------------------------------------------------------------------- -namespace detail { +namespace detail +{ -template -VTKM_EXEC -vtkm::Vec -TriangleDerivativeFinish(const vtkm::Vec &field, - const vtkm::Matrix &LUFactorization, - const vtkm::Vec &LUPermutation, - vtkm::TypeTraitsScalarTag) +template +VTKM_EXEC vtkm::Vec TriangleDerivativeFinish( + const vtkm::Vec& field, const vtkm::Matrix& LUFactorization, + const vtkm::Vec& LUPermutation, vtkm::TypeTraitsScalarTag) { // Finish solving linear equation. See TriangleDerivative implementation // for more detail. - vtkm::Vec b(field[1]-field[0], field[2]-field[0], 0); + vtkm::Vec b(field[1] - field[0], field[2] - field[0], 0); return vtkm::detail::MatrixLUPSolve(LUFactorization, LUPermutation, b); } -template -VTKM_EXEC -vtkm::Vec -TriangleDerivativeFinish(const vtkm::Vec &field, - const vtkm::Matrix &LUFactorization, - const vtkm::Vec &LUPermutation, - vtkm::TypeTraitsVectorTag) +template +VTKM_EXEC vtkm::Vec TriangleDerivativeFinish( + const vtkm::Vec& field, const vtkm::Matrix& LUFactorization, + const vtkm::Vec& LUPermutation, vtkm::TypeTraitsVectorTag) { using FieldTraits = vtkm::VecTraits; using FieldComponentType = typename FieldTraits::ComponentType; - vtkm::Vec gradient; + vtkm::Vec gradient; for (vtkm::IdComponent fieldComponent = 0; - fieldComponent < FieldTraits::GetNumberOfComponents(field[0]); - fieldComponent++) + fieldComponent < FieldTraits::GetNumberOfComponents(field[0]); fieldComponent++) { - vtkm::Vec subField( - FieldTraits::GetComponent(field[0],fieldComponent), - FieldTraits::GetComponent(field[1],fieldComponent), - FieldTraits::GetComponent(field[2],fieldComponent)); + vtkm::Vec subField(FieldTraits::GetComponent(field[0], fieldComponent), + FieldTraits::GetComponent(field[1], fieldComponent), + FieldTraits::GetComponent(field[2], fieldComponent)); - vtkm::Vec subGradient = - TriangleDerivativeFinish( - subField, - LUFactorization, - LUPermutation, - typename vtkm::TypeTraits::DimensionalityTag()); + vtkm::Vec subGradient = + TriangleDerivativeFinish(subField, LUFactorization, LUPermutation, + typename vtkm::TypeTraits::DimensionalityTag()); FieldTraits::SetComponent(gradient[0], fieldComponent, subGradient[0]); FieldTraits::SetComponent(gradient[1], fieldComponent, subGradient[1]); @@ -660,25 +533,18 @@ TriangleDerivativeFinish(const vtkm::Vec &field, return gradient; } -template -VTKM_EXEC -vtkm::Vec -TriangleDerivativeFinish(const vtkm::Vec &field, - const vtkm::Matrix &LUFactorization, - const vtkm::Vec &LUPermutation, - vtkm::TypeTraitsMatrixTag) +template +VTKM_EXEC vtkm::Vec TriangleDerivativeFinish( + const vtkm::Vec& field, const vtkm::Matrix& LUFactorization, + const vtkm::Vec& LUPermutation, vtkm::TypeTraitsMatrixTag) { - return TriangleDerivativeFinish( - field, LUFactorization, LUPermutation, vtkm::TypeTraitsVectorTag()); + return TriangleDerivativeFinish(field, LUFactorization, LUPermutation, + vtkm::TypeTraitsVectorTag()); } -template -VTKM_EXEC -vtkm::Vec -TriangleDerivative(const vtkm::Vec &field, - const vtkm::Vec &wCoords) +template +VTKM_EXEC vtkm::Vec TriangleDerivative(const vtkm::Vec& field, + const vtkm::Vec& wCoords) { using BaseComponentType = typename BaseComponent::Type; @@ -706,11 +572,11 @@ TriangleDerivative(const vtkm::Vec &field, // are the differences in points and normal, b has the scalar differences, // and x is really the gradient g. - vtkm::Vec v0 = wCoords[1] - wCoords[0]; - vtkm::Vec v1 = wCoords[2] - wCoords[0]; - vtkm::Vec n = vtkm::Cross(v0, v1); + vtkm::Vec v0 = wCoords[1] - wCoords[0]; + vtkm::Vec v1 = wCoords[2] - wCoords[0]; + vtkm::Vec n = vtkm::Cross(v0, v1); - vtkm::Matrix A; + vtkm::Matrix A; vtkm::MatrixSetRow(A, 0, v0); vtkm::MatrixSetRow(A, 1, v1); vtkm::MatrixSetRow(A, 2, n); @@ -728,67 +594,60 @@ TriangleDerivative(const vtkm::Vec &field, // field, the factorization can be reused for each component of the vector // field. Thus, we are going to call the internals of SolveLinearSystem // ourselves to do the factorization and then apply it to all components. - vtkm::Vec permutation; + vtkm::Vec permutation; BaseComponentType inversionParity; // Unused vtkm::detail::MatrixLUPFactor(A, permutation, inversionParity, valid); // MatrixLUPFactor does in place factorization. A is now the LU factorization. - return TriangleDerivativeFinish( - field, - A, - permutation, - typename vtkm::TypeTraits::DimensionalityTag()); + return TriangleDerivativeFinish(field, A, permutation, + typename vtkm::TypeTraits::DimensionalityTag()); } } // namespace detail //----------------------------------------------------------------------------- -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &inputField, - const WorldCoordType &wCoords, - const vtkm::Vec &vtkmNotUsed(pcoords), - vtkm::CellShapeTagTriangle, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& inputField, const WorldCoordType& wCoords, + const vtkm::Vec& vtkmNotUsed(pcoords), vtkm::CellShapeTagTriangle, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(inputField.GetNumberOfComponents() == 3); VTKM_ASSERT(wCoords.GetNumberOfComponents() == 3); using ValueType = typename FieldVecType::ComponentType; using WCoordType = typename WorldCoordType::ComponentType; - vtkm::Vec field; inputField.CopyInto(field); - vtkm::Vec wpoints; wCoords.CopyInto(wpoints); + vtkm::Vec field; + inputField.CopyInto(field); + vtkm::Vec wpoints; + wCoords.CopyInto(wpoints); return detail::TriangleDerivative(field, wpoints); } //----------------------------------------------------------------------------- template -VTKM_EXEC void -PolygonComputeIndices(const vtkm::Vec& pcoords, - vtkm::IdComponent numPoints, vtkm::IdComponent& firstPointIndex, - vtkm::IdComponent& secondPointIndex) +VTKM_EXEC void PolygonComputeIndices(const vtkm::Vec& pcoords, + vtkm::IdComponent numPoints, + vtkm::IdComponent& firstPointIndex, + vtkm::IdComponent& secondPointIndex) { ParametricCoordType angle; - if ((vtkm::Abs(pcoords[0]-0.5f) < 4*vtkm::Epsilon()) && - (vtkm::Abs(pcoords[1]-0.5f) < 4*vtkm::Epsilon())) + if ((vtkm::Abs(pcoords[0] - 0.5f) < 4 * vtkm::Epsilon()) && + (vtkm::Abs(pcoords[1] - 0.5f) < 4 * vtkm::Epsilon())) { angle = 0; } else { - angle = vtkm::ATan2(pcoords[1]-0.5f, pcoords[0]-0.5f); + angle = vtkm::ATan2(pcoords[1] - 0.5f, pcoords[0] - 0.5f); if (angle < 0) { - angle += static_cast(2*vtkm::Pi()); + angle += static_cast(2 * vtkm::Pi()); } } const ParametricCoordType deltaAngle = - static_cast(2*vtkm::Pi()/numPoints); - firstPointIndex = - static_cast(vtkm::Floor(angle/deltaAngle)); + static_cast(2 * vtkm::Pi() / numPoints); + firstPointIndex = static_cast(vtkm::Floor(angle / deltaAngle)); secondPointIndex = firstPointIndex + 1; if (secondPointIndex == numPoints) { @@ -797,15 +656,10 @@ PolygonComputeIndices(const vtkm::Vec& pcoords, } //----------------------------------------------------------------------------- -template -VTKM_EXEC -vtkm::Vec -PolygonDerivative(const FieldVecType &field, - const WorldCoordType &wCoords, - vtkm::IdComponent numPoints, - vtkm::IdComponent firstPointIndex, - vtkm::IdComponent secondPointIndex) +template +VTKM_EXEC vtkm::Vec PolygonDerivative( + const FieldVecType& field, const WorldCoordType& wCoords, vtkm::IdComponent numPoints, + vtkm::IdComponent firstPointIndex, vtkm::IdComponent secondPointIndex) { // If we are here, then there are 5 or more points on this polygon. @@ -828,17 +682,15 @@ PolygonDerivative(const FieldVecType &field, fieldCenter = fieldCenter + field[pointIndex]; wcoordCenter = wcoordCenter + wCoords[pointIndex]; } - fieldCenter = fieldCenter*FieldType(1.0f/static_cast(numPoints)); - wcoordCenter = wcoordCenter*WCoordType(1.0f/static_cast(numPoints)); + fieldCenter = fieldCenter * FieldType(1.0f / static_cast(numPoints)); + wcoordCenter = wcoordCenter * WCoordType(1.0f / static_cast(numPoints)); // Set up parameters for triangle that pcoords is in - vtkm::Vec triangleField( fieldCenter, - field[firstPointIndex], + vtkm::Vec triangleField(fieldCenter, field[firstPointIndex], field[secondPointIndex]); - vtkm::Vec triangleWCoords( wcoordCenter, - wCoords[firstPointIndex], - wCoords[secondPointIndex] ); + vtkm::Vec triangleWCoords(wcoordCenter, wCoords[firstPointIndex], + wCoords[secondPointIndex]); // Now use the triangle derivative. pcoords is actually invalid for the // triangle, but that does not matter as the derivative for a triangle does @@ -847,16 +699,11 @@ PolygonDerivative(const FieldVecType &field, } //----------------------------------------------------------------------------- -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &field, - const WorldCoordType &wCoords, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagPolygon, - const vtkm::exec::FunctorBase &worklet) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& field, const WorldCoordType& wCoords, + const vtkm::Vec& pcoords, vtkm::CellShapeTagPolygon, + const vtkm::exec::FunctorBase& worklet) { VTKM_ASSERT(field.GetNumberOfComponents() == wCoords.GetNumberOfComponents()); @@ -865,135 +712,100 @@ CellDerivative(const FieldVecType &field, switch (field.GetNumberOfComponents()) { - case 1: return CellDerivative(field, - wCoords, - pcoords, - vtkm::CellShapeTagVertex(), - worklet); - case 2: return CellDerivative(field, - wCoords, - pcoords, - vtkm::CellShapeTagLine(), - worklet); - case 3: return CellDerivative(field, - wCoords, - pcoords, - vtkm::CellShapeTagTriangle(), - worklet); - case 4: return CellDerivative(field, - wCoords, - pcoords, - vtkm::CellShapeTagQuad(), - worklet); + case 1: + return CellDerivative(field, wCoords, pcoords, vtkm::CellShapeTagVertex(), worklet); + case 2: + return CellDerivative(field, wCoords, pcoords, vtkm::CellShapeTagLine(), worklet); + case 3: + return CellDerivative(field, wCoords, pcoords, vtkm::CellShapeTagTriangle(), worklet); + case 4: + return CellDerivative(field, wCoords, pcoords, vtkm::CellShapeTagQuad(), worklet); } vtkm::IdComponent firstPointIndex, secondPointIndex; - PolygonComputeIndices(pcoords,numPoints,firstPointIndex,secondPointIndex); + PolygonComputeIndices(pcoords, numPoints, firstPointIndex, secondPointIndex); return PolygonDerivative(field, wCoords, numPoints, firstPointIndex, secondPointIndex); } //----------------------------------------------------------------------------- -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &inputField, - const WorldCoordType &wCoords, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagQuad, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& inputField, const WorldCoordType& wCoords, + const vtkm::Vec& pcoords, vtkm::CellShapeTagQuad, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(inputField.GetNumberOfComponents() == 4); VTKM_ASSERT(wCoords.GetNumberOfComponents() == 4); using ValueType = typename FieldVecType::ComponentType; using WCoordType = typename WorldCoordType::ComponentType; - vtkm::Vec field; inputField.CopyInto(field); - vtkm::Vec wpoints; wCoords.CopyInto(wpoints); + vtkm::Vec field; + inputField.CopyInto(field); + vtkm::Vec wpoints; + wCoords.CopyInto(wpoints); - return detail::CellDerivativeFor2DCell( - field, wpoints, pcoords, vtkm::CellShapeTagQuad()); + return detail::CellDerivativeFor2DCell(field, wpoints, pcoords, vtkm::CellShapeTagQuad()); } -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &field, - const vtkm::VecRectilinearPointCoordinates<2> &wCoords, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagQuad, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& field, const vtkm::VecRectilinearPointCoordinates<2>& wCoords, + const vtkm::Vec& pcoords, vtkm::CellShapeTagQuad, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(field.GetNumberOfComponents() == 4); typedef typename FieldVecType::ComponentType T; - typedef vtkm::Vec VecT; + typedef vtkm::Vec VecT; - VecT pc(static_cast(pcoords[0]), - static_cast(pcoords[1])); + VecT pc(static_cast(pcoords[0]), static_cast(pcoords[1])); VecT rc = VecT(T(1)) - pc; - VecT sum = field[0]*VecT(-rc[1], -rc[0]); - sum = sum + field[1]*VecT( rc[1], -pc[0]); - sum = sum + field[2]*VecT( pc[1], pc[0]); - sum = sum + field[3]*VecT(-pc[1], rc[0]); + VecT sum = field[0] * VecT(-rc[1], -rc[0]); + sum = sum + field[1] * VecT(rc[1], -pc[0]); + sum = sum + field[2] * VecT(pc[1], pc[0]); + sum = sum + field[3] * VecT(-pc[1], rc[0]); - return vtkm::Vec(sum[0]/wCoords.GetSpacing()[0], - sum[1]/wCoords.GetSpacing()[1], - T(0)); + return vtkm::Vec(sum[0] / wCoords.GetSpacing()[0], sum[1] / wCoords.GetSpacing()[1], T(0)); } //----------------------------------------------------------------------------- -namespace detail { +namespace detail +{ -template -VTKM_EXEC -vtkm::Vec -TetraDerivativeFinish(const vtkm::Vec &field, - const vtkm::Matrix &LUFactorization, - const vtkm::Vec &LUPermutation, - vtkm::TypeTraitsScalarTag) +template +VTKM_EXEC vtkm::Vec TetraDerivativeFinish( + const vtkm::Vec& field, const vtkm::Matrix& LUFactorization, + const vtkm::Vec& LUPermutation, vtkm::TypeTraitsScalarTag) { // Finish solving linear equation. See TriangleDerivative implementation // for more detail. - vtkm::Vec b(field[1]-field[0], field[2]-field[0], field[3]-field[0]); + vtkm::Vec b(field[1] - field[0], field[2] - field[0], field[3] - field[0]); return vtkm::detail::MatrixLUPSolve(LUFactorization, LUPermutation, b); } -template -VTKM_EXEC -vtkm::Vec -TetraDerivativeFinish(const vtkm::Vec &field, - const vtkm::Matrix &LUFactorization, - const vtkm::Vec &LUPermutation, - vtkm::TypeTraitsVectorTag) +template +VTKM_EXEC vtkm::Vec TetraDerivativeFinish( + const vtkm::Vec& field, const vtkm::Matrix& LUFactorization, + const vtkm::Vec& LUPermutation, vtkm::TypeTraitsVectorTag) { using FieldTraits = vtkm::VecTraits; using FieldComponentType = typename FieldTraits::ComponentType; - vtkm::Vec gradient; + vtkm::Vec gradient; for (vtkm::IdComponent fieldComponent = 0; - fieldComponent < FieldTraits::GetNumberOfComponents(field[0]); - fieldComponent++) + fieldComponent < FieldTraits::GetNumberOfComponents(field[0]); fieldComponent++) { - vtkm::Vec subField( - FieldTraits::GetComponent(field[0],fieldComponent), - FieldTraits::GetComponent(field[1],fieldComponent), - FieldTraits::GetComponent(field[2],fieldComponent), - FieldTraits::GetComponent(field[3],fieldComponent)); + vtkm::Vec subField(FieldTraits::GetComponent(field[0], fieldComponent), + FieldTraits::GetComponent(field[1], fieldComponent), + FieldTraits::GetComponent(field[2], fieldComponent), + FieldTraits::GetComponent(field[3], fieldComponent)); - vtkm::Vec subGradient = - TetraDerivativeFinish( - subField, - LUFactorization, - LUPermutation, - typename vtkm::TypeTraits::DimensionalityTag()); + vtkm::Vec subGradient = + TetraDerivativeFinish(subField, LUFactorization, LUPermutation, + typename vtkm::TypeTraits::DimensionalityTag()); FieldTraits::SetComponent(gradient[0], fieldComponent, subGradient[0]); FieldTraits::SetComponent(gradient[1], fieldComponent, subGradient[1]); @@ -1003,25 +815,17 @@ TetraDerivativeFinish(const vtkm::Vec &field, return gradient; } -template -VTKM_EXEC -vtkm::Vec -TetraDerivativeFinish(const vtkm::Vec &field, - const vtkm::Matrix &LUFactorization, - const vtkm::Vec &LUPermutation, - vtkm::TypeTraitsMatrixTag) +template +VTKM_EXEC vtkm::Vec TetraDerivativeFinish( + const vtkm::Vec& field, const vtkm::Matrix& LUFactorization, + const vtkm::Vec& LUPermutation, vtkm::TypeTraitsMatrixTag) { - return TetraDerivativeFinish( - field, LUFactorization, LUPermutation, vtkm::TypeTraitsVectorTag()); + return TetraDerivativeFinish(field, LUFactorization, LUPermutation, vtkm::TypeTraitsVectorTag()); } -template -VTKM_EXEC -vtkm::Vec -TetraDerivative(const vtkm::Vec &field, - const vtkm::Vec &wCoords) +template +VTKM_EXEC vtkm::Vec TetraDerivative(const vtkm::Vec& field, + const vtkm::Vec& wCoords) { using BaseComponentType = typename BaseComponent::Type; @@ -1048,11 +852,11 @@ TetraDerivative(const vtkm::Vec &field, // are the differences in points and normal, b has the scalar differences, // and x is really the gradient g. - vtkm::Vec v0 = wCoords[1] - wCoords[0]; - vtkm::Vec v1 = wCoords[2] - wCoords[0]; - vtkm::Vec v2 = wCoords[3] - wCoords[0]; + vtkm::Vec v0 = wCoords[1] - wCoords[0]; + vtkm::Vec v1 = wCoords[2] - wCoords[0]; + vtkm::Vec v2 = wCoords[3] - wCoords[0]; - vtkm::Matrix A; + vtkm::Matrix A; vtkm::MatrixSetRow(A, 0, v0); vtkm::MatrixSetRow(A, 1, v1); vtkm::MatrixSetRow(A, 2, v2); @@ -1070,148 +874,120 @@ TetraDerivative(const vtkm::Vec &field, // field, the factorization can be reused for each component of the vector // field. Thus, we are going to call the internals of SolveLinearSystem // ourselves to do the factorization and then apply it to all components. - vtkm::Vec permutation; + vtkm::Vec permutation; BaseComponentType inversionParity; // Unused vtkm::detail::MatrixLUPFactor(A, permutation, inversionParity, valid); // MatrixLUPFactor does in place factorization. A is now the LU factorization. - return TetraDerivativeFinish( - field, - A, - permutation, - typename vtkm::TypeTraits::DimensionalityTag()); + return TetraDerivativeFinish(field, A, permutation, + typename vtkm::TypeTraits::DimensionalityTag()); } } // namespace detail //----------------------------------------------------------------------------- -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &inputField, - const WorldCoordType &wCoords, - const vtkm::Vec &vtkmNotUsed(pcoords), - vtkm::CellShapeTagTetra, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& inputField, const WorldCoordType& wCoords, + const vtkm::Vec& vtkmNotUsed(pcoords), vtkm::CellShapeTagTetra, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(inputField.GetNumberOfComponents() == 4); VTKM_ASSERT(wCoords.GetNumberOfComponents() == 4); using ValueType = typename FieldVecType::ComponentType; using WCoordType = typename WorldCoordType::ComponentType; - vtkm::Vec field; inputField.CopyInto(field); - vtkm::Vec wpoints; wCoords.CopyInto(wpoints); + vtkm::Vec field; + inputField.CopyInto(field); + vtkm::Vec wpoints; + wCoords.CopyInto(wpoints); return detail::TetraDerivative(field, wpoints); } //----------------------------------------------------------------------------- -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &inputField, - const WorldCoordType &wCoords, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagHexahedron, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& inputField, const WorldCoordType& wCoords, + const vtkm::Vec& pcoords, vtkm::CellShapeTagHexahedron, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(inputField.GetNumberOfComponents() == 8); VTKM_ASSERT(wCoords.GetNumberOfComponents() == 8); using ValueType = typename FieldVecType::ComponentType; using WCoordType = typename WorldCoordType::ComponentType; - vtkm::Vec field; inputField.CopyInto(field); - vtkm::Vec wpoints; wCoords.CopyInto(wpoints); + vtkm::Vec field; + inputField.CopyInto(field); + vtkm::Vec wpoints; + wCoords.CopyInto(wpoints); - return detail::CellDerivativeFor3DCell( - field, wpoints, pcoords, vtkm::CellShapeTagHexahedron()); + return detail::CellDerivativeFor3DCell(field, wpoints, pcoords, vtkm::CellShapeTagHexahedron()); } -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &field, - const vtkm::VecRectilinearPointCoordinates<3> &wCoords, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagHexahedron, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& field, const vtkm::VecRectilinearPointCoordinates<3>& wCoords, + const vtkm::Vec& pcoords, vtkm::CellShapeTagHexahedron, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(field.GetNumberOfComponents() == 8); typedef typename FieldVecType::ComponentType T; - typedef vtkm::Vec VecT; + typedef vtkm::Vec VecT; - VecT pc(static_cast(pcoords[0]), - static_cast(pcoords[1]), - static_cast(pcoords[2])); + VecT pc(static_cast(pcoords[0]), static_cast(pcoords[1]), static_cast(pcoords[2])); VecT rc = VecT(T(1)) - pc; - VecT sum = field[0]*VecT(-rc[1]*rc[2], -rc[0]*rc[2], -rc[0]*rc[1]); - sum = sum + field[1]*VecT( rc[1]*rc[2], -pc[0]*rc[2], -pc[0]*rc[1]); - sum = sum + field[2]*VecT( pc[1]*rc[2], pc[0]*rc[2], -pc[0]*pc[1]); - sum = sum + field[3]*VecT(-pc[1]*rc[2], rc[0]*rc[2], -rc[0]*pc[1]); - sum = sum + field[4]*VecT(-rc[1]*pc[2], -rc[0]*pc[2], rc[0]*rc[1]); - sum = sum + field[5]*VecT( rc[1]*pc[2], -pc[0]*pc[2], pc[0]*rc[1]); - sum = sum + field[6]*VecT( pc[1]*pc[2], pc[0]*pc[2], pc[0]*pc[1]); - sum = sum + field[7]*VecT(-pc[1]*pc[2], rc[0]*pc[2], rc[0]*pc[1]); + VecT sum = field[0] * VecT(-rc[1] * rc[2], -rc[0] * rc[2], -rc[0] * rc[1]); + sum = sum + field[1] * VecT(rc[1] * rc[2], -pc[0] * rc[2], -pc[0] * rc[1]); + sum = sum + field[2] * VecT(pc[1] * rc[2], pc[0] * rc[2], -pc[0] * pc[1]); + sum = sum + field[3] * VecT(-pc[1] * rc[2], rc[0] * rc[2], -rc[0] * pc[1]); + sum = sum + field[4] * VecT(-rc[1] * pc[2], -rc[0] * pc[2], rc[0] * rc[1]); + sum = sum + field[5] * VecT(rc[1] * pc[2], -pc[0] * pc[2], pc[0] * rc[1]); + sum = sum + field[6] * VecT(pc[1] * pc[2], pc[0] * pc[2], pc[0] * pc[1]); + sum = sum + field[7] * VecT(-pc[1] * pc[2], rc[0] * pc[2], rc[0] * pc[1]); - return sum/wCoords.GetSpacing(); + return sum / wCoords.GetSpacing(); } - //----------------------------------------------------------------------------- -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &inputField, - const WorldCoordType &wCoords, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagWedge, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& inputField, const WorldCoordType& wCoords, + const vtkm::Vec& pcoords, vtkm::CellShapeTagWedge, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(inputField.GetNumberOfComponents() == 6); VTKM_ASSERT(wCoords.GetNumberOfComponents() == 6); using ValueType = typename FieldVecType::ComponentType; using WCoordType = typename WorldCoordType::ComponentType; - vtkm::Vec field; inputField.CopyInto(field); - vtkm::Vec wpoints; wCoords.CopyInto(wpoints); + vtkm::Vec field; + inputField.CopyInto(field); + vtkm::Vec wpoints; + wCoords.CopyInto(wpoints); - return detail::CellDerivativeFor3DCell( - field, wpoints, pcoords, vtkm::CellShapeTagWedge()); + return detail::CellDerivativeFor3DCell(field, wpoints, pcoords, vtkm::CellShapeTagWedge()); } - //----------------------------------------------------------------------------- -template -VTKM_EXEC -vtkm::Vec -CellDerivative(const FieldVecType &inputField, - const WorldCoordType &wCoords, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagPyramid, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC vtkm::Vec CellDerivative( + const FieldVecType& inputField, const WorldCoordType& wCoords, + const vtkm::Vec& pcoords, vtkm::CellShapeTagPyramid, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(inputField.GetNumberOfComponents() == 5); VTKM_ASSERT(wCoords.GetNumberOfComponents() == 5); using ValueType = typename FieldVecType::ComponentType; using WCoordType = typename WorldCoordType::ComponentType; - vtkm::Vec field; inputField.CopyInto(field); - vtkm::Vec wpoints; wCoords.CopyInto(wpoints); + vtkm::Vec field; + inputField.CopyInto(field); + vtkm::Vec wpoints; + wCoords.CopyInto(wpoints); - return detail::CellDerivativeFor3DCell( - field, wpoints, pcoords, vtkm::CellShapeTagPyramid()); + return detail::CellDerivativeFor3DCell(field, wpoints, pcoords, vtkm::CellShapeTagPyramid()); } - - } } // namespace vtkm::exec diff --git a/vtkm/exec/CellEdge.h b/vtkm/exec/CellEdge.h index 621ef105a..be5337a36 100644 --- a/vtkm/exec/CellEdge.h +++ b/vtkm/exec/CellEdge.h @@ -27,131 +27,261 @@ #include #include -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ -namespace detail { +namespace detail +{ static const vtkm::IdComponent MAX_NUM_EDGES = 12; VTKM_EXEC_CONSTANT static const vtkm::IdComponent NumEdges[vtkm::NUMBER_OF_CELL_SHAPES] = { - 0, // 0: CELL_SHAPE_EMPTY - 0, // 1: CELL_SHAPE_VERTEX - 0, // 2: Unused - 0, // 3: CELL_SHAPE_LINE - 0, // 4: Unused - 3, // 5: CELL_SHAPE_TRIANGLE - 0, // 6: Unused + 0, // 0: CELL_SHAPE_EMPTY + 0, // 1: CELL_SHAPE_VERTEX + 0, // 2: Unused + 0, // 3: CELL_SHAPE_LINE + 0, // 4: Unused + 3, // 5: CELL_SHAPE_TRIANGLE + 0, // 6: Unused -1, // 7: CELL_SHAPE_POLYGON ---special case--- - 0, // 8: Unused - 4, // 9: CELL_SHAPE_QUAD - 6, // 10: CELL_SHAPE_TETRA - 0, // 11: Unused + 0, // 8: Unused + 4, // 9: CELL_SHAPE_QUAD + 6, // 10: CELL_SHAPE_TETRA + 0, // 11: Unused 12, // 12: CELL_SHAPE_HEXAHEDRON - 9, // 13: CELL_SHAPE_WEDGE - 8 // 14: CELL_SHAPE_PYRAMID + 9, // 13: CELL_SHAPE_WEDGE + 8 // 14: CELL_SHAPE_PYRAMID }; VTKM_EXEC_CONSTANT -static const vtkm::IdComponent -PointsInEdge[vtkm::NUMBER_OF_CELL_SHAPES][MAX_NUM_EDGES][2] = { +static const vtkm::IdComponent PointsInEdge[vtkm::NUMBER_OF_CELL_SHAPES][MAX_NUM_EDGES][2] = { // 0: CELL_SHAPE_EMPTY - { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 1: CELL_SHAPE_VERTEX - { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 2: Unused - { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 3: CELL_SHAPE_LINE - { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 4: Unused - { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 5: CELL_SHAPE_TRIANGLE - { { 0, 1 }, { 1, 2 }, { 2, 0 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { 0, 1 }, + { 1, 2 }, + { 2, 0 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 6: Unused - { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 7: CELL_SHAPE_POLYGON --- special case --- - { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 8: Unused - { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 9: CELL_SHAPE_QUAD - { { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 0 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { 0, 1 }, + { 1, 2 }, + { 2, 3 }, + { 3, 0 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 10: CELL_SHAPE_TETRA - { { 0, 1 }, { 1, 2 }, { 2, 0 }, { 0, 3 }, { 1, 3 }, { 2, 3 }, - { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { 0, 1 }, + { 1, 2 }, + { 2, 0 }, + { 0, 3 }, + { 1, 3 }, + { 2, 3 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 11: Unused - { { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 12: CELL_SHAPE_HEXAHEDRON - { { 0, 1 }, { 1, 2 }, { 3, 2 }, { 0, 3 }, { 4, 5 }, { 5, 6 }, - { 7, 6 }, { 4, 7 }, { 0, 4 }, { 1, 5 }, { 3, 7 }, { 2, 6 } - }, + { { 0, 1 }, + { 1, 2 }, + { 3, 2 }, + { 0, 3 }, + { 4, 5 }, + { 5, 6 }, + { 7, 6 }, + { 4, 7 }, + { 0, 4 }, + { 1, 5 }, + { 3, 7 }, + { 2, 6 } }, // 13: CELL_SHAPE_WEDGE - { { 0, 1 }, { 1, 2 }, { 2, 0 }, { 3, 4 }, { 4, 5 }, { 5, 3 }, - { 0, 3 }, { 1, 4 }, { 2, 5 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { 0, 1 }, + { 1, 2 }, + { 2, 0 }, + { 3, 4 }, + { 4, 5 }, + { 5, 3 }, + { 0, 3 }, + { 1, 4 }, + { 2, 5 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, // 14: CELL_SHAPE_PYRAMID - { { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 0 }, { 0, 4 }, { 1, 4 }, - { 2, 4 }, { 3, 4 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } - }, + { { 0, 1 }, + { 1, 2 }, + { 2, 3 }, + { 3, 0 }, + { 0, 4 }, + { 1, 4 }, + { 2, 4 }, + { 3, 4 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 }, + { -1, -1 } }, }; } // namespace detail -template -static inline VTKM_EXEC -vtkm::IdComponent -CellEdgeNumberOfEdges(vtkm::IdComponent numPoints, - CellShapeTag, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC vtkm::IdComponent CellEdgeNumberOfEdges(vtkm::IdComponent numPoints, + CellShapeTag, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSERT(numPoints == vtkm::CellTraits::NUM_POINTS); return detail::NumEdges[CellShapeTag::Id]; } -static inline VTKM_EXEC -vtkm::IdComponent -CellEdgeNumberOfEdges(vtkm::IdComponent numPoints, - vtkm::CellShapeTagPolygon, - const vtkm::exec::FunctorBase &) +static inline VTKM_EXEC vtkm::IdComponent CellEdgeNumberOfEdges(vtkm::IdComponent numPoints, + vtkm::CellShapeTagPolygon, + const vtkm::exec::FunctorBase&) { VTKM_ASSUME(numPoints > 0); return numPoints; } -static inline VTKM_EXEC -vtkm::IdComponent -CellEdgeNumberOfEdges(vtkm::IdComponent numPoints, - vtkm::CellShapeTagGeneric shape, - const vtkm::exec::FunctorBase &worklet) +static inline VTKM_EXEC vtkm::IdComponent CellEdgeNumberOfEdges( + vtkm::IdComponent numPoints, vtkm::CellShapeTagGeneric shape, + const vtkm::exec::FunctorBase& worklet) { if (shape.Id == vtkm::CELL_SHAPE_POLYGON) { - return CellEdgeNumberOfEdges( - numPoints, vtkm::CellShapeTagPolygon(), worklet); + return CellEdgeNumberOfEdges(numPoints, vtkm::CellShapeTagPolygon(), worklet); } else { @@ -159,75 +289,64 @@ CellEdgeNumberOfEdges(vtkm::IdComponent numPoints, } } -template -static inline VTKM_EXEC -vtkm::Vec -CellEdgeLocalIndices(vtkm::IdComponent numPoints, - vtkm::IdComponent edgeIndex, - CellShapeTag shape, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC vtkm::Vec CellEdgeLocalIndices( + vtkm::IdComponent numPoints, vtkm::IdComponent edgeIndex, CellShapeTag shape, + const vtkm::exec::FunctorBase& worklet) { VTKM_ASSUME(edgeIndex >= 0); VTKM_ASSUME(edgeIndex < detail::MAX_NUM_EDGES); if (edgeIndex >= vtkm::exec::CellEdgeNumberOfEdges(numPoints, shape, worklet)) { worklet.RaiseError("Invalid edge number."); - return vtkm::Vec(0); + return vtkm::Vec(0); } return vtkm::make_Vec(detail::PointsInEdge[CellShapeTag::Id][edgeIndex][0], detail::PointsInEdge[CellShapeTag::Id][edgeIndex][1]); } -static inline VTKM_EXEC -vtkm::Vec -CellEdgeLocalIndices(vtkm::IdComponent numPoints, - vtkm::IdComponent edgeIndex, - vtkm::CellShapeTagPolygon, - const vtkm::exec::FunctorBase &) +static inline VTKM_EXEC vtkm::Vec CellEdgeLocalIndices( + vtkm::IdComponent numPoints, vtkm::IdComponent edgeIndex, vtkm::CellShapeTagPolygon, + const vtkm::exec::FunctorBase&) { VTKM_ASSUME(numPoints >= 3); VTKM_ASSUME(edgeIndex >= 0); VTKM_ASSUME(edgeIndex < numPoints); - if (edgeIndex < numPoints-1) + if (edgeIndex < numPoints - 1) { - return vtkm::Vec(edgeIndex, edgeIndex+1); + return vtkm::Vec(edgeIndex, edgeIndex + 1); } else { - return vtkm::Vec(edgeIndex, 0); + return vtkm::Vec(edgeIndex, 0); } } -static inline VTKM_EXEC -vtkm::Vec -CellEdgeLocalIndices(vtkm::IdComponent numPoints, - vtkm::IdComponent edgeIndex, - vtkm::CellShapeTagGeneric shape, - const vtkm::exec::FunctorBase &worklet) +static inline VTKM_EXEC vtkm::Vec CellEdgeLocalIndices( + vtkm::IdComponent numPoints, vtkm::IdComponent edgeIndex, vtkm::CellShapeTagGeneric shape, + const vtkm::exec::FunctorBase& worklet) { VTKM_ASSUME(edgeIndex >= 0); VTKM_ASSUME(edgeIndex < detail::MAX_NUM_EDGES); if (shape.Id == vtkm::CELL_SHAPE_POLYGON) { - return CellEdgeLocalIndices( - numPoints, edgeIndex, vtkm::CellShapeTagPolygon(), worklet); + return CellEdgeLocalIndices(numPoints, edgeIndex, vtkm::CellShapeTagPolygon(), worklet); } else { if (edgeIndex >= detail::NumEdges[shape.Id]) { worklet.RaiseError("Invalid edge number."); - return vtkm::Vec(0); + return vtkm::Vec(0); } return vtkm::make_Vec(detail::PointsInEdge[shape.Id][edgeIndex][0], detail::PointsInEdge[shape.Id][edgeIndex][1]); } } - } } // namespace vtkm::exec diff --git a/vtkm/exec/CellFace.h b/vtkm/exec/CellFace.h index bb5a7b759..0686b2d68 100644 --- a/vtkm/exec/CellFace.h +++ b/vtkm/exec/CellFace.h @@ -26,10 +26,13 @@ #include #include -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ -namespace detail { +namespace detail +{ static const vtkm::IdComponent MAX_FACE_SIZE = 4; static const vtkm::IdComponent MAX_NUM_FACES = 6; @@ -54,152 +57,146 @@ static const vtkm::IdComponent NumFaces[vtkm::NUMBER_OF_CELL_SHAPES] = { }; VTKM_EXEC_CONSTANT -static const vtkm::IdComponent -NumPointsInFace[vtkm::NUMBER_OF_CELL_SHAPES][MAX_NUM_FACES] = { - { -1, -1, -1, -1, -1, -1}, // 0: CELL_SHAPE_EMPTY - { -1, -1, -1, -1, -1, -1}, // 1: CELL_SHAPE_VERTEX - { -1, -1, -1, -1, -1, -1}, // 2: Unused - { -1, -1, -1, -1, -1, -1}, // 3: CELL_SHAPE_LINE - { -1, -1, -1, -1, -1, -1}, // 4: Unused - { -1, -1, -1, -1, -1, -1}, // 5: CELL_SHAPE_TRIANGLE - { -1, -1, -1, -1, -1, -1}, // 6: Unused - { -1, -1, -1, -1, -1, -1}, // 7: CELL_SHAPE_POLYGON - { -1, -1, -1, -1, -1, -1}, // 8: Unused - { -1, -1, -1, -1, -1, -1}, // 9: CELL_SHAPE_QUAD - { 3, 3, 3, 3, -1, -1}, // 10: CELL_SHAPE_TETRA - { -1, -1, -1, -1, -1, -1}, // 11: Unused - { 4, 4, 4, 4, 4, 4}, // 12: CELL_SHAPE_HEXAHEDRON - { 3, 3, 4, 4, 4, -1}, // 13: CELL_SHAPE_WEDGE - { 4, 3, 3, 3, 3, -1} // 14: CELL_SHAPE_PYRAMID +static const vtkm::IdComponent NumPointsInFace[vtkm::NUMBER_OF_CELL_SHAPES][MAX_NUM_FACES] = { + { -1, -1, -1, -1, -1, -1 }, // 0: CELL_SHAPE_EMPTY + { -1, -1, -1, -1, -1, -1 }, // 1: CELL_SHAPE_VERTEX + { -1, -1, -1, -1, -1, -1 }, // 2: Unused + { -1, -1, -1, -1, -1, -1 }, // 3: CELL_SHAPE_LINE + { -1, -1, -1, -1, -1, -1 }, // 4: Unused + { -1, -1, -1, -1, -1, -1 }, // 5: CELL_SHAPE_TRIANGLE + { -1, -1, -1, -1, -1, -1 }, // 6: Unused + { -1, -1, -1, -1, -1, -1 }, // 7: CELL_SHAPE_POLYGON + { -1, -1, -1, -1, -1, -1 }, // 8: Unused + { -1, -1, -1, -1, -1, -1 }, // 9: CELL_SHAPE_QUAD + { 3, 3, 3, 3, -1, -1 }, // 10: CELL_SHAPE_TETRA + { -1, -1, -1, -1, -1, -1 }, // 11: Unused + { 4, 4, 4, 4, 4, 4 }, // 12: CELL_SHAPE_HEXAHEDRON + { 3, 3, 4, 4, 4, -1 }, // 13: CELL_SHAPE_WEDGE + { 4, 3, 3, 3, 3, -1 } // 14: CELL_SHAPE_PYRAMID }; VTKM_EXEC_CONSTANT -static const vtkm::IdComponent -PointsInFace[vtkm::NUMBER_OF_CELL_SHAPES][MAX_NUM_FACES][MAX_FACE_SIZE] = { - // 0: CELL_SHAPE_EMPTY - { { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } }, - // 1: CELL_SHAPE_VERTEX - { { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } }, - // 2: Unused - { { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } }, - // 3: CELL_SHAPE_LINE - { { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } }, - // 4: Unused - { { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } }, - // 5: CELL_SHAPE_TRIANGLE - { { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } }, - // 6: Unused - { { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } }, - // 7: CELL_SHAPE_POLYGON - { { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } }, - // 8: Unused - { { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } }, - // 9: CELL_SHAPE_QUAD - { { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } }, - // 10: CELL_SHAPE_TETRA - { { 0, 1, 3, -1 }, - { 1, 2, 3, -1 }, - { 2, 0, 3, -1 }, - { 0, 2, 1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } }, - // 11: Unused - { { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } }, - // 12: CELL_SHAPE_HEXAHEDRON - { { 0, 4, 7, 3 }, - { 1, 2, 6, 5 }, - { 0, 1, 5, 4 }, - { 3, 7, 6, 2 }, - { 0, 3, 2, 1 }, - { 4, 5, 6, 7 } }, - // 13: CELL_SHAPE_WEDGE - { { 0, 1, 2, -1 }, - { 3, 5, 4, -1 }, - { 0, 3, 4, 1 }, - { 1, 4, 5, 2 }, - { 2, 5, 3, 0 }, - { -1, -1, -1, -1 } }, - // 14: CELL_SHAPE_PYRAMID - { { 0, 3, 2, 1 }, - { 0, 1, 4, -1 }, - { 1, 2, 4, -1 }, - { 2, 3, 4, -1 }, - { 3, 0, 4, -1 }, - { -1, -1, -1, -1 } } -}; +static const vtkm::IdComponent PointsInFace[vtkm::NUMBER_OF_CELL_SHAPES][MAX_NUM_FACES] + [MAX_FACE_SIZE] = { + // 0: CELL_SHAPE_EMPTY + { { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 } }, + // 1: CELL_SHAPE_VERTEX + { { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 } }, + // 2: Unused + { { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 } }, + // 3: CELL_SHAPE_LINE + { { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 } }, + // 4: Unused + { { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 } }, + // 5: CELL_SHAPE_TRIANGLE + { { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 } }, + // 6: Unused + { { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 } }, + // 7: CELL_SHAPE_POLYGON + { { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 } }, + // 8: Unused + { { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 } }, + // 9: CELL_SHAPE_QUAD + { { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 } }, + // 10: CELL_SHAPE_TETRA + { { 0, 1, 3, -1 }, + { 1, 2, 3, -1 }, + { 2, 0, 3, -1 }, + { 0, 2, 1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 } }, + // 11: Unused + { { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 }, + { -1, -1, -1, -1 } }, + // 12: CELL_SHAPE_HEXAHEDRON + { { 0, 4, 7, 3 }, + { 1, 2, 6, 5 }, + { 0, 1, 5, 4 }, + { 3, 7, 6, 2 }, + { 0, 3, 2, 1 }, + { 4, 5, 6, 7 } }, + // 13: CELL_SHAPE_WEDGE + { { 0, 1, 2, -1 }, + { 3, 5, 4, -1 }, + { 0, 3, 4, 1 }, + { 1, 4, 5, 2 }, + { 2, 5, 3, 0 }, + { -1, -1, -1, -1 } }, + // 14: CELL_SHAPE_PYRAMID + { { 0, 3, 2, 1 }, + { 0, 1, 4, -1 }, + { 1, 2, 4, -1 }, + { 2, 3, 4, -1 }, + { 3, 0, 4, -1 }, + { -1, -1, -1, -1 } } + }; } // namespace detail -template -static inline VTKM_EXEC -vtkm::IdComponent -CellFaceNumberOfFaces(CellShapeTag shape, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC vtkm::IdComponent CellFaceNumberOfFaces(CellShapeTag shape, + const vtkm::exec::FunctorBase&) { return detail::NumFaces[shape.Id]; } -template -static inline VTKM_EXEC -vtkm::IdComponent -CellFaceNumberOfPoints(vtkm::IdComponent faceIndex, - CellShapeTag shape, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC vtkm::IdComponent CellFaceNumberOfPoints( + vtkm::IdComponent faceIndex, CellShapeTag shape, const vtkm::exec::FunctorBase& worklet) { VTKM_ASSUME(faceIndex >= 0); VTKM_ASSUME(faceIndex < detail::MAX_NUM_FACES); @@ -212,32 +209,28 @@ CellFaceNumberOfPoints(vtkm::IdComponent faceIndex, return detail::NumPointsInFace[shape.Id][faceIndex]; } -template -static inline VTKM_EXEC -vtkm::UInt8 -CellFaceShape(vtkm::IdComponent faceIndex, - CellShapeTag shape, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC vtkm::UInt8 CellFaceShape(vtkm::IdComponent faceIndex, CellShapeTag shape, + const vtkm::exec::FunctorBase& worklet) { VTKM_ASSUME(faceIndex >= 0); VTKM_ASSUME(faceIndex < detail::MAX_NUM_FACES); switch (CellFaceNumberOfPoints(faceIndex, shape, worklet)) { - case 3: return vtkm::CELL_SHAPE_TRIANGLE; - case 4: return vtkm::CELL_SHAPE_QUAD; - default: return vtkm::CELL_SHAPE_POLYGON; + case 3: + return vtkm::CELL_SHAPE_TRIANGLE; + case 4: + return vtkm::CELL_SHAPE_QUAD; + default: + return vtkm::CELL_SHAPE_POLYGON; } } -template -static inline VTKM_EXEC -vtkm::VecCConst -CellFaceLocalIndices(vtkm::IdComponent faceIndex, - CellShapeTag shape, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC vtkm::VecCConst CellFaceLocalIndices( + vtkm::IdComponent faceIndex, CellShapeTag shape, const vtkm::exec::FunctorBase& worklet) { - vtkm::IdComponent numPointsInFace = - vtkm::exec::CellFaceNumberOfPoints(faceIndex, shape, worklet); + vtkm::IdComponent numPointsInFace = vtkm::exec::CellFaceNumberOfPoints(faceIndex, shape, worklet); if (numPointsInFace < 1) { // An invalid face. We should already have gotten an error from @@ -245,10 +238,8 @@ CellFaceLocalIndices(vtkm::IdComponent faceIndex, return vtkm::VecCConst(); } - return vtkm::make_VecC(detail::PointsInFace[shape.Id][faceIndex], - numPointsInFace); + return vtkm::make_VecC(detail::PointsInFace[shape.Id][faceIndex], numPointsInFace); } - } } // namespace vtkm::exec diff --git a/vtkm/exec/CellInterpolate.h b/vtkm/exec/CellInterpolate.h index d2e032da3..4850a9288 100644 --- a/vtkm/exec/CellInterpolate.h +++ b/vtkm/exec/CellInterpolate.h @@ -27,20 +27,20 @@ #include #include -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ -namespace internal { +namespace internal +{ // This is really the WorldCoorindatesToParametericCoordinates function, but // moved to this header file because it is required to interpolate in a // polygon, which is divided into triangles. -template -VTKM_EXEC -typename WorldCoordVector::ComponentType -ReverseInterpolateTriangle( - const WorldCoordVector &pointWCoords, - const typename WorldCoordVector::ComponentType &wcoords) +template +VTKM_EXEC typename WorldCoordVector::ComponentType ReverseInterpolateTriangle( + const WorldCoordVector& pointWCoords, const typename WorldCoordVector::ComponentType& wcoords) { VTKM_ASSERT(pointWCoords.GetNumberOfComponents() == 3); @@ -107,24 +107,22 @@ ReverseInterpolateTriangle( typedef typename Vector3::ComponentType T; Vector3 pcoords(T(0)); - Vector3 triangleNormal = - vtkm::TriangleNormal(pointWCoords[0], pointWCoords[1], pointWCoords[2]); + Vector3 triangleNormal = vtkm::TriangleNormal(pointWCoords[0], pointWCoords[1], pointWCoords[2]); for (vtkm::IdComponent dimension = 0; dimension < 2; dimension++) - { + { Vector3 p0 = pointWCoords[0]; - Vector3 p1 = pointWCoords[dimension+1]; - Vector3 p2 = pointWCoords[2-dimension]; - Vector3 planeNormal = vtkm::Cross(triangleNormal, p2-p0); + Vector3 p1 = pointWCoords[dimension + 1]; + Vector3 p2 = pointWCoords[2 - dimension]; + Vector3 planeNormal = vtkm::Cross(triangleNormal, p2 - p0); - T d = vtkm::dot(wcoords - p0, planeNormal)/vtkm::dot(p1 - p0, planeNormal); + T d = vtkm::dot(wcoords - p0, planeNormal) / vtkm::dot(p1 - p0, planeNormal); pcoords[dimension] = d; - } + } return pcoords; } - } /// \brief Interpolate a point field in a cell. @@ -132,131 +130,98 @@ ReverseInterpolateTriangle( /// Given the point field values for each node and the parametric coordinates /// of a point within the cell, interpolates the field to that point. /// -template -VTKM_EXEC -typename FieldVecType::ComponentType -CellInterpolate(const FieldVecType &pointFieldValues, - const vtkm::Vec ¶metricCoords, - vtkm::CellShapeTagGeneric shape, - const vtkm::exec::FunctorBase &worklet) +template +VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( + const FieldVecType& pointFieldValues, const vtkm::Vec& parametricCoords, + vtkm::CellShapeTagGeneric shape, const vtkm::exec::FunctorBase& worklet) { typename FieldVecType::ComponentType result; switch (shape.Id) { vtkmGenericCellShapeMacro( - result = CellInterpolate(pointFieldValues, - parametricCoords, - CellShapeTag(), - worklet)); - default: - worklet.RaiseError("Unknown cell shape sent to interpolate."); - return typename FieldVecType::ComponentType(); + result = CellInterpolate(pointFieldValues, parametricCoords, CellShapeTag(), worklet)); + default: + worklet.RaiseError("Unknown cell shape sent to interpolate."); + return typename FieldVecType::ComponentType(); } return result; } //----------------------------------------------------------------------------- -template -VTKM_EXEC -typename FieldVecType::ComponentType -CellInterpolate(const FieldVecType &, - const vtkm::Vec &, - vtkm::CellShapeTagEmpty, - const vtkm::exec::FunctorBase &worklet) +template +VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( + const FieldVecType&, const vtkm::Vec&, vtkm::CellShapeTagEmpty, + const vtkm::exec::FunctorBase& worklet) { worklet.RaiseError("Attempted to interpolate an empty cell."); return typename FieldVecType::ComponentType(); } //----------------------------------------------------------------------------- -template -VTKM_EXEC -typename FieldVecType::ComponentType -CellInterpolate(const FieldVecType &pointFieldValues, - const vtkm::Vec, - vtkm::CellShapeTagVertex, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( + const FieldVecType& pointFieldValues, const vtkm::Vec, + vtkm::CellShapeTagVertex, const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(pointFieldValues.GetNumberOfComponents() == 1); return pointFieldValues[0]; } //----------------------------------------------------------------------------- -template -VTKM_EXEC -typename FieldVecType::ComponentType -CellInterpolate(const FieldVecType &pointFieldValues, - const vtkm::Vec ¶metricCoords, - vtkm::CellShapeTagLine, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( + const FieldVecType& pointFieldValues, const vtkm::Vec& parametricCoords, + vtkm::CellShapeTagLine, const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(pointFieldValues.GetNumberOfComponents() == 2); - return vtkm::Lerp(pointFieldValues[0], - pointFieldValues[1], - parametricCoords[0]); + return vtkm::Lerp(pointFieldValues[0], pointFieldValues[1], parametricCoords[0]); } -template -VTKM_EXEC -vtkm::Vec -CellInterpolate(const vtkm::VecRectilinearPointCoordinates<1> &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagLine, - const vtkm::exec::FunctorBase &) +template +VTKM_EXEC vtkm::Vec CellInterpolate( + const vtkm::VecRectilinearPointCoordinates<1>& field, + const vtkm::Vec& pcoords, vtkm::CellShapeTagLine, + const vtkm::exec::FunctorBase&) { - typedef vtkm::Vec T; + typedef vtkm::Vec T; - const T &origin = field.GetOrigin(); - const T &spacing = field.GetSpacing(); + const T& origin = field.GetOrigin(); + const T& spacing = field.GetSpacing(); - return T(origin[0] + static_cast(pcoords[0])*spacing[0], - origin[1], + return T(origin[0] + static_cast(pcoords[0]) * spacing[0], origin[1], origin[2]); } //----------------------------------------------------------------------------- -template -VTKM_EXEC -typename FieldVecType::ComponentType -CellInterpolate(const FieldVecType &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagTriangle, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( + const FieldVecType& field, const vtkm::Vec& pcoords, + vtkm::CellShapeTagTriangle, const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(field.GetNumberOfComponents() == 3); typedef typename FieldVecType::ComponentType T; - return static_cast( (field[0] * (1 - pcoords[0] - pcoords[1])) - + (field[1] * pcoords[0]) - + (field[2] * pcoords[1])); + return static_cast((field[0] * (1 - pcoords[0] - pcoords[1])) + (field[1] * pcoords[0]) + + (field[2] * pcoords[1])); } //----------------------------------------------------------------------------- -template -VTKM_EXEC -typename FieldVecType::ComponentType -CellInterpolate(const FieldVecType &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagPolygon, - const vtkm::exec::FunctorBase &worklet) +template +VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( + const FieldVecType& field, const vtkm::Vec& pcoords, + vtkm::CellShapeTagPolygon, const vtkm::exec::FunctorBase& worklet) { const vtkm::IdComponent numPoints = field.GetNumberOfComponents(); VTKM_ASSERT(numPoints > 0); switch (numPoints) { case 1: - return CellInterpolate(field,pcoords,vtkm::CellShapeTagVertex(),worklet); + return CellInterpolate(field, pcoords, vtkm::CellShapeTagVertex(), worklet); case 2: - return CellInterpolate(field,pcoords,vtkm::CellShapeTagLine(),worklet); + return CellInterpolate(field, pcoords, vtkm::CellShapeTagLine(), worklet); case 3: - return CellInterpolate(field,pcoords,vtkm::CellShapeTagTriangle(),worklet); + return CellInterpolate(field, pcoords, vtkm::CellShapeTagTriangle(), worklet); case 4: - return CellInterpolate(field,pcoords,vtkm::CellShapeTagQuad(),worklet); + return CellInterpolate(field, pcoords, vtkm::CellShapeTagQuad(), worklet); } // If we are here, then there are 5 or more points on this polygon. @@ -277,23 +242,23 @@ CellInterpolate(const FieldVecType &field, { fieldCenter = fieldCenter + field[pointIndex]; } - fieldCenter = fieldCenter*FieldType(1.0f/static_cast(numPoints)); + fieldCenter = fieldCenter * FieldType(1.0f / static_cast(numPoints)); - if ((vtkm::Abs(pcoords[0]-0.5f) < 4*vtkm::Epsilon()) && - (vtkm::Abs(pcoords[1]-0.5f) < 4*vtkm::Epsilon())) + if ((vtkm::Abs(pcoords[0] - 0.5f) < 4 * vtkm::Epsilon()) && + (vtkm::Abs(pcoords[1] - 0.5f) < 4 * vtkm::Epsilon())) { return fieldCenter; } - ParametricCoordType angle = vtkm::ATan2(pcoords[1]-0.5f, pcoords[0]-0.5f); + ParametricCoordType angle = vtkm::ATan2(pcoords[1] - 0.5f, pcoords[0] - 0.5f); if (angle < 0) { - angle += static_cast(2*vtkm::Pi()); + angle += static_cast(2 * vtkm::Pi()); } const ParametricCoordType deltaAngle = - static_cast(2*vtkm::Pi()/numPoints); + static_cast(2 * vtkm::Pi() / numPoints); vtkm::IdComponent firstPointIndex = - static_cast(vtkm::Floor(angle/deltaAngle)); + static_cast(vtkm::Floor(angle / deltaAngle)); vtkm::IdComponent secondPointIndex = firstPointIndex + 1; if (secondPointIndex == numPoints) { @@ -301,44 +266,42 @@ CellInterpolate(const FieldVecType &field, } // Transform pcoords for polygon into pcoords for triangle. - vtkm::Vec,3> polygonCoords; + vtkm::Vec, 3> polygonCoords; polygonCoords[0][0] = 0.5f; polygonCoords[0][1] = 0.5f; polygonCoords[0][2] = 0; - polygonCoords[1][0] = 0.5f*(vtkm::Cos(deltaAngle*static_cast(firstPointIndex))+1); - polygonCoords[1][1] = 0.5f*(vtkm::Sin(deltaAngle*static_cast(firstPointIndex))+1); + polygonCoords[1][0] = + 0.5f * (vtkm::Cos(deltaAngle * static_cast(firstPointIndex)) + 1); + polygonCoords[1][1] = + 0.5f * (vtkm::Sin(deltaAngle * static_cast(firstPointIndex)) + 1); polygonCoords[1][2] = 0.0f; - polygonCoords[2][0] = 0.5f*(vtkm::Cos(deltaAngle*static_cast(secondPointIndex))+1); - polygonCoords[2][1] = 0.5f*(vtkm::Sin(deltaAngle*static_cast(secondPointIndex))+1); + polygonCoords[2][0] = + 0.5f * (vtkm::Cos(deltaAngle * static_cast(secondPointIndex)) + 1); + polygonCoords[2][1] = + 0.5f * (vtkm::Sin(deltaAngle * static_cast(secondPointIndex)) + 1); polygonCoords[2][2] = 0.0f; - vtkm::Vec trianglePCoords = - vtkm::exec::internal::ReverseInterpolateTriangle(polygonCoords, pcoords); + vtkm::Vec trianglePCoords = + vtkm::exec::internal::ReverseInterpolateTriangle(polygonCoords, pcoords); // Set up parameters for triangle that pcoords is in - vtkm::Vec triangleField; + vtkm::Vec triangleField; triangleField[0] = fieldCenter; triangleField[1] = field[firstPointIndex]; triangleField[2] = field[secondPointIndex]; // Now use the triangle interpolate - return vtkm::exec::CellInterpolate(triangleField, - trianglePCoords, - vtkm::CellShapeTagTriangle(), + return vtkm::exec::CellInterpolate(triangleField, trianglePCoords, vtkm::CellShapeTagTriangle(), worklet); } //----------------------------------------------------------------------------- -template -VTKM_EXEC -typename FieldVecType::ComponentType -CellInterpolate(const FieldVecType &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagQuad, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( + const FieldVecType& field, const vtkm::Vec& pcoords, + vtkm::CellShapeTagQuad, const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(field.GetNumberOfComponents() == 4); @@ -350,51 +313,39 @@ CellInterpolate(const FieldVecType &field, return vtkm::Lerp(bottomInterp, topInterp, pcoords[1]); } -template -VTKM_EXEC -vtkm::Vec -CellInterpolate(const vtkm::VecRectilinearPointCoordinates<2> &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagQuad, - const vtkm::exec::FunctorBase &) +template +VTKM_EXEC vtkm::Vec CellInterpolate( + const vtkm::VecRectilinearPointCoordinates<2>& field, + const vtkm::Vec& pcoords, vtkm::CellShapeTagQuad, + const vtkm::exec::FunctorBase&) { - typedef vtkm::Vec T; + typedef vtkm::Vec T; - const T &origin = field.GetOrigin(); - const T &spacing = field.GetSpacing(); + const T& origin = field.GetOrigin(); + const T& spacing = field.GetSpacing(); - return T(origin[0] + static_cast(pcoords[0])*spacing[0], - origin[1] + static_cast(pcoords[1])*spacing[1], - origin[2]); + return T(origin[0] + static_cast(pcoords[0]) * spacing[0], + origin[1] + static_cast(pcoords[1]) * spacing[1], origin[2]); } //----------------------------------------------------------------------------- -template -VTKM_EXEC -typename FieldVecType::ComponentType -CellInterpolate(const FieldVecType &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagTetra, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( + const FieldVecType& field, const vtkm::Vec& pcoords, + vtkm::CellShapeTagTetra, const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(field.GetNumberOfComponents() == 4); typedef typename FieldVecType::ComponentType T; - return static_cast( (field[0] * (1-pcoords[0]-pcoords[1]-pcoords[2])) - + (field[1] * pcoords[0]) - + (field[2] * pcoords[1]) - + (field[3] * pcoords[2])); + return static_cast((field[0] * (1 - pcoords[0] - pcoords[1] - pcoords[2])) + + (field[1] * pcoords[0]) + (field[2] * pcoords[1]) + + (field[3] * pcoords[2])); } //----------------------------------------------------------------------------- -template -VTKM_EXEC -typename FieldVecType::ComponentType -CellInterpolate(const FieldVecType &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagHexahedron, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( + const FieldVecType& field, const vtkm::Vec& pcoords, + vtkm::CellShapeTagHexahedron, const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(field.GetNumberOfComponents() == 8); @@ -411,56 +362,43 @@ CellInterpolate(const FieldVecType &field, return vtkm::Lerp(bottomInterp, topInterp, pcoords[2]); } -template -VTKM_EXEC -vtkm::Vec -CellInterpolate(const vtkm::VecRectilinearPointCoordinates<3> &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagHexahedron, - const vtkm::exec::FunctorBase &) +template +VTKM_EXEC vtkm::Vec CellInterpolate( + const vtkm::VecRectilinearPointCoordinates<3>& field, + const vtkm::Vec& pcoords, vtkm::CellShapeTagHexahedron, + const vtkm::exec::FunctorBase&) { - vtkm::Vec pcoordsCast( - static_cast(pcoords[0]), - static_cast(pcoords[1]), - static_cast(pcoords[2])); + vtkm::Vec pcoordsCast(static_cast(pcoords[0]), + static_cast(pcoords[1]), + static_cast(pcoords[2])); - return field.GetOrigin() + pcoordsCast*field.GetSpacing(); + return field.GetOrigin() + pcoordsCast * field.GetSpacing(); } //----------------------------------------------------------------------------- -template -VTKM_EXEC -typename FieldVecType::ComponentType -CellInterpolate(const FieldVecType &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagWedge, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( + const FieldVecType& field, const vtkm::Vec& pcoords, + vtkm::CellShapeTagWedge, const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(field.GetNumberOfComponents() == 6); typedef typename FieldVecType::ComponentType T; - T bottomInterp = static_cast( (field[0] * (1 - pcoords[0] - pcoords[1])) - + (field[1] * pcoords[1]) - + (field[2] * pcoords[0])); + T bottomInterp = static_cast((field[0] * (1 - pcoords[0] - pcoords[1])) + + (field[1] * pcoords[1]) + (field[2] * pcoords[0])); - T topInterp = static_cast( (field[3] * (1 - pcoords[0] - pcoords[1])) - + (field[4] * pcoords[1]) - + (field[5] * pcoords[0])); + T topInterp = static_cast((field[3] * (1 - pcoords[0] - pcoords[1])) + + (field[4] * pcoords[1]) + (field[5] * pcoords[0])); return vtkm::Lerp(bottomInterp, topInterp, pcoords[2]); } //----------------------------------------------------------------------------- -template -VTKM_EXEC -typename FieldVecType::ComponentType -CellInterpolate(const FieldVecType &field, - const vtkm::Vec &pcoords, - vtkm::CellShapeTagPyramid, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( + const FieldVecType& field, const vtkm::Vec& pcoords, + vtkm::CellShapeTagPyramid, const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(field.GetNumberOfComponents() == 5); @@ -473,7 +411,6 @@ CellInterpolate(const FieldVecType &field, return vtkm::Lerp(baseInterp, field[4], pcoords[2]); } - } } // namespace vtkm::exec diff --git a/vtkm/exec/ConnectivityExplicit.h b/vtkm/exec/ConnectivityExplicit.h index 52aa409b4..8717f07fe 100644 --- a/vtkm/exec/ConnectivityExplicit.h +++ b/vtkm/exec/ConnectivityExplicit.h @@ -25,14 +25,13 @@ #include -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ -template +template class ConnectivityExplicit { public: @@ -43,29 +42,21 @@ public: ConnectivityExplicit(const ShapePortalType& shapePortal, const NumIndicesPortalType& numIndicesPortal, const ConnectivityPortalType& connPortal, - const IndexOffsetPortalType& indexOffsetPortal - ) - : Shapes(shapePortal), - NumIndices(numIndicesPortal), - Connectivity(connPortal), - IndexOffset(indexOffsetPortal) + const IndexOffsetPortalType& indexOffsetPortal) + : Shapes(shapePortal) + , NumIndices(numIndicesPortal) + , Connectivity(connPortal) + , IndexOffset(indexOffsetPortal) { - } VTKM_EXEC - SchedulingRangeType GetNumberOfElements() const - { - return this->Shapes.GetNumberOfValues(); - } + SchedulingRangeType GetNumberOfElements() const { return this->Shapes.GetNumberOfValues(); } typedef vtkm::CellShapeTagGeneric CellShapeTag; VTKM_EXEC - CellShapeTag GetCellShape(vtkm::Id index) const - { - return CellShapeTag(this->Shapes.Get(index)); - } + CellShapeTag GetCellShape(vtkm::Id index) const { return CellShapeTag(this->Shapes.Get(index)); } using IndicesType = vtkm::VecFromPortal; diff --git a/vtkm/exec/ConnectivityPermuted.h b/vtkm/exec/ConnectivityPermuted.h index 851e7857b..8be1c46a5 100644 --- a/vtkm/exec/ConnectivityPermuted.h +++ b/vtkm/exec/ConnectivityPermuted.h @@ -18,7 +18,6 @@ // this software. //============================================================================ - #ifndef vtk_m_exec_ConnectivityPermuted_h #define vtk_m_exec_ConnectivityPermuted_h @@ -26,11 +25,12 @@ #include #include -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ -template +template class ConnectivityPermuted { public: @@ -38,49 +38,46 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ConnectivityPermuted(): - Portal(), - Connectivity() - { - - } - - VTKM_EXEC_CONT - ConnectivityPermuted(const PermutationPortal& portal, - const OriginalConnectivity &src): - Portal(portal), - Connectivity(src) + ConnectivityPermuted() + : Portal() + , Connectivity() { } VTKM_EXEC_CONT - ConnectivityPermuted(const ConnectivityPermuted &src): - Portal(src.Portal), - Connectivity(src.Connectivity) + ConnectivityPermuted(const PermutationPortal& portal, const OriginalConnectivity& src) + : Portal(portal) + , Connectivity(src) + { + } + + VTKM_EXEC_CONT + ConnectivityPermuted(const ConnectivityPermuted& src) + : Portal(src.Portal) + , Connectivity(src.Connectivity) { } typedef typename OriginalConnectivity::CellShapeTag CellShapeTag; VTKM_EXEC - CellShapeTag GetCellShape(vtkm::Id index) const { + CellShapeTag GetCellShape(vtkm::Id index) const + { vtkm::Id pIndex = this->Portal.Get(index); - return this->Connectivity.GetCellShape( pIndex ); + return this->Connectivity.GetCellShape(pIndex); } typedef typename OriginalConnectivity::IndicesType IndicesType; - template - VTKM_EXEC - IndicesType GetIndices(const IndexType &index) const + template + VTKM_EXEC IndicesType GetIndices(const IndexType& index) const { - return this->Connectivity.GetIndices( this->Portal.Get(index) ); + return this->Connectivity.GetIndices(this->Portal.Get(index)); } PermutationPortal Portal; OriginalConnectivity Connectivity; }; - } } // namespace vtkm::exec diff --git a/vtkm/exec/ConnectivityStructured.h b/vtkm/exec/ConnectivityStructured.h index 8ecc3050d..80b787dab 100644 --- a/vtkm/exec/ConnectivityStructured.h +++ b/vtkm/exec/ConnectivityStructured.h @@ -18,7 +18,6 @@ // this software. //============================================================================ - #ifndef vtk_m_exec_ConnectivityStructured_h #define vtk_m_exec_ConnectivityStructured_h @@ -26,41 +25,40 @@ #include #include -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ -template +template class ConnectivityStructured { VTKM_IS_TOPOLOGY_ELEMENT_TAG(FromTopology); VTKM_IS_TOPOLOGY_ELEMENT_TAG(ToTopology); - typedef vtkm::internal::ConnectivityStructuredInternals - InternalsType; + typedef vtkm::internal::ConnectivityStructuredInternals InternalsType; + + typedef vtkm::internal::ConnectivityStructuredIndexHelper + Helper; - typedef vtkm::internal::ConnectivityStructuredIndexHelper< - FromTopology,ToTopology,Dimension> Helper; public: typedef typename InternalsType::SchedulingRangeType SchedulingRangeType; VTKM_EXEC_CONT - ConnectivityStructured(): - Internals() - { - - } - - VTKM_EXEC_CONT - ConnectivityStructured(const InternalsType &src): - Internals(src) + ConnectivityStructured() + : Internals() { } VTKM_EXEC_CONT - ConnectivityStructured(const ConnectivityStructured &src): - Internals(src.Internals) + ConnectivityStructured(const InternalsType& src) + : Internals(src) + { + } + + VTKM_EXEC_CONT + ConnectivityStructured(const ConnectivityStructured& src) + : Internals(src.Internals) { } @@ -68,49 +66,42 @@ public: // is not a cell? typedef typename InternalsType::CellShapeTag CellShapeTag; VTKM_EXEC - CellShapeTag GetCellShape(vtkm::Id) const { - return CellShapeTag(); - } + CellShapeTag GetCellShape(vtkm::Id) const { return CellShapeTag(); } typedef typename Helper::IndicesType IndicesType; - template - VTKM_EXEC - IndicesType GetIndices(const IndexType &index) const + template + VTKM_EXEC IndicesType GetIndices(const IndexType& index) const { return Helper::GetIndices(this->Internals, index); } VTKM_EXEC_CONT - SchedulingRangeType - FlatToLogicalFromIndex(vtkm::Id flatFromIndex) const + SchedulingRangeType FlatToLogicalFromIndex(vtkm::Id flatFromIndex) const { return Helper::FlatToLogicalFromIndex(this->Internals, flatFromIndex); } VTKM_EXEC_CONT - vtkm::Id LogicalToFlatFromIndex( - const SchedulingRangeType &logicalFromIndex) const + vtkm::Id LogicalToFlatFromIndex(const SchedulingRangeType& logicalFromIndex) const { return Helper::LogicalToFlatFromIndex(this->Internals, logicalFromIndex); } VTKM_EXEC_CONT - SchedulingRangeType - FlatToLogicalToIndex(vtkm::Id flatToIndex) const + SchedulingRangeType FlatToLogicalToIndex(vtkm::Id flatToIndex) const { return Helper::FlatToLogicalToIndex(this->Internals, flatToIndex); } VTKM_EXEC_CONT - vtkm::Id LogicalToFlatToIndex( - const SchedulingRangeType &logicalToIndex) const + vtkm::Id LogicalToFlatToIndex(const SchedulingRangeType& logicalToIndex) const { return Helper::LogicalToFlatToIndex(this->Internals, logicalToIndex); } VTKM_EXEC_CONT - vtkm::Vec GetPointDimensions() const + vtkm::Vec GetPointDimensions() const { return this->Internals.GetPointDimensions(); } @@ -118,7 +109,6 @@ public: private: InternalsType Internals; }; - } } // namespace vtkm::exec diff --git a/vtkm/exec/ExecutionObjectBase.h b/vtkm/exec/ExecutionObjectBase.h index b6f1d561f..0601be0e5 100644 --- a/vtkm/exec/ExecutionObjectBase.h +++ b/vtkm/exec/ExecutionObjectBase.h @@ -20,8 +20,10 @@ #ifndef vtk_m_exec_ExecutionObjectBase_h #define vtk_m_exec_ExecutionObjectBase_h -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ /// Base \c ExecutionObjectBase for execution objects to inherit from so that /// you can use an arbitrary object as a parameter in an execution environment @@ -30,9 +32,7 @@ namespace exec { /// class ExecutionObjectBase { - }; - } } // namespace vtkm::exec diff --git a/vtkm/exec/ExecutionWholeArray.h b/vtkm/exec/ExecutionWholeArray.h index 713c26e3b..0733c1b6e 100644 --- a/vtkm/exec/ExecutionWholeArray.h +++ b/vtkm/exec/ExecutionWholeArray.h @@ -24,41 +24,40 @@ #include #include -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ /// \c ExecutionWholeArray is an execution object that allows an array handle /// content to be a parameter in an execution environment /// function. This can be used to allow worklets to have a shared search /// structure /// -template +template class ExecutionWholeArray : public vtkm::exec::ExecutionObjectBase { public: using ValueType = T; - using HandleType = vtkm::cont::ArrayHandle; + using HandleType = vtkm::cont::ArrayHandle; using PortalType = typename HandleType::template ExecutionTypes::Portal; VTKM_CONT - ExecutionWholeArray( ): - Portal( ) + ExecutionWholeArray() + : Portal() { } VTKM_CONT - ExecutionWholeArray( HandleType& handle ): - Portal( handle.PrepareForInPlace( DeviceAdapterTag()) ) + ExecutionWholeArray(HandleType& handle) + : Portal(handle.PrepareForInPlace(DeviceAdapterTag())) { } VTKM_CONT - ExecutionWholeArray( HandleType& handle, - vtkm::Id length ): - Portal( handle.PrepareForOutput( length, DeviceAdapterTag()) ) + ExecutionWholeArray(HandleType& handle, vtkm::Id length) + : Portal(handle.PrepareForOutput(length, DeviceAdapterTag())) { } @@ -86,26 +85,24 @@ private: /// function. This can be used to allow worklets to have a shared search /// structure /// -template +template class ExecutionWholeArrayConst : public vtkm::exec::ExecutionObjectBase { public: using ValueType = T; - using HandleType = vtkm::cont::ArrayHandle; + using HandleType = vtkm::cont::ArrayHandle; using PortalType = typename HandleType::template ExecutionTypes::PortalConst; VTKM_CONT - ExecutionWholeArrayConst( ): - Portal( ) + ExecutionWholeArrayConst() + : Portal() { } VTKM_CONT - ExecutionWholeArrayConst( const HandleType& handle): - Portal( handle.PrepareForInput( DeviceAdapterTag() ) ) + ExecutionWholeArrayConst(const HandleType& handle) + : Portal(handle.PrepareForInput(DeviceAdapterTag())) { } @@ -124,7 +121,6 @@ public: private: PortalType Portal; }; - } } // namespace vtkm::exec diff --git a/vtkm/exec/FunctorBase.h b/vtkm/exec/FunctorBase.h index 61c6150ff..6962b495a 100644 --- a/vtkm/exec/FunctorBase.h +++ b/vtkm/exec/FunctorBase.h @@ -26,10 +26,10 @@ #include - -namespace vtkm { -namespace exec { - +namespace vtkm +{ +namespace exec +{ /// Base class for all user worklets invoked in the execution environment from a /// call to vtkm::cont::DeviceAdapterAlgorithm::Schedule. @@ -41,28 +41,27 @@ class FunctorBase { public: VTKM_EXEC_CONT - FunctorBase(): ErrorMessage() { } + FunctorBase() + : ErrorMessage() + { + } VTKM_EXEC - void RaiseError(const char *message) const - { - this->ErrorMessage.RaiseError(message); - } + void RaiseError(const char* message) const { this->ErrorMessage.RaiseError(message); } /// Set the error message buffer so that running algorithms can report /// errors. This is supposed to be set by the dispatcher. This method may be /// replaced as the execution semantics change. /// VTKM_CONT - void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &buffer) + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer& buffer) { this->ErrorMessage = buffer; } + private: vtkm::exec::internal::ErrorMessageBuffer ErrorMessage; }; - } } // namespace vtkm::exec diff --git a/vtkm/exec/ImplicitFunction.h b/vtkm/exec/ImplicitFunction.h index 58693f6dd..df2d314ea 100644 --- a/vtkm/exec/ImplicitFunction.h +++ b/vtkm/exec/ImplicitFunction.h @@ -22,16 +22,20 @@ #include - -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ class VTKM_ALWAYS_EXPORT ImplicitFunction { public: ImplicitFunction() - : Function(nullptr), ValueCaller(nullptr), GradientCaller(nullptr) - { } + : Function(nullptr) + , ValueCaller(nullptr) + , GradientCaller(nullptr) + { + } VTKM_EXEC FloatDefault Value(FloatDefault x, FloatDefault y, FloatDefault z) const @@ -40,48 +44,43 @@ public: } VTKM_EXEC - FloatDefault Value(const vtkm::Vec &x) const + FloatDefault Value(const vtkm::Vec& x) const { return this->ValueCaller(this->Function, x[0], x[1], x[2]); } VTKM_EXEC - vtkm::Vec Gradient(FloatDefault x, FloatDefault y, - FloatDefault z) const + vtkm::Vec Gradient(FloatDefault x, FloatDefault y, FloatDefault z) const { return this->GradientCaller(this->Function, x, y, z); } VTKM_EXEC - vtkm::Vec Gradient(const vtkm::Vec &x) const + vtkm::Vec Gradient(const vtkm::Vec& x) const { return this->GradientCaller(this->Function, x[0], x[1], x[2]); } - template - VTKM_EXEC - void Bind(const T *function) + template + VTKM_EXEC void Bind(const T* function) { this->Function = function; - this->ValueCaller = - [](const void *t, FloatDefault x, FloatDefault y, FloatDefault z) { - return static_cast(t)->Value(x, y, z); - }; - this->GradientCaller = - [](const void *t, FloatDefault x, FloatDefault y, FloatDefault z) { - return static_cast(t)->Gradient(x, y, z); - }; + this->ValueCaller = [](const void* t, FloatDefault x, FloatDefault y, FloatDefault z) { + return static_cast(t)->Value(x, y, z); + }; + this->GradientCaller = [](const void* t, FloatDefault x, FloatDefault y, FloatDefault z) { + return static_cast(t)->Gradient(x, y, z); + }; } private: - using ValueCallerSig = - FloatDefault(const void*, FloatDefault, FloatDefault, FloatDefault); - using GradientCallerSig = - vtkm::Vec(const void*, FloatDefault, FloatDefault, FloatDefault); + using ValueCallerSig = FloatDefault(const void*, FloatDefault, FloatDefault, FloatDefault); + using GradientCallerSig = vtkm::Vec(const void*, FloatDefault, FloatDefault, + FloatDefault); - const void *Function; - ValueCallerSig *ValueCaller; - GradientCallerSig *GradientCaller; + const void* Function; + ValueCallerSig* ValueCaller; + GradientCallerSig* GradientCaller; }; /// \brief A function object that evaluates the contained implicit function @@ -90,9 +89,10 @@ class VTKM_ALWAYS_EXPORT ImplicitFunctionValue public: ImplicitFunctionValue() = default; - explicit ImplicitFunctionValue(const vtkm::exec::ImplicitFunction &func) + explicit ImplicitFunctionValue(const vtkm::exec::ImplicitFunction& func) : Function(func) - { } + { + } VTKM_EXEC FloatDefault operator()(const vtkm::Vec x) const @@ -117,9 +117,10 @@ class VTKM_ALWAYS_EXPORT ImplicitFunctionGradient public: ImplicitFunctionGradient() = default; - explicit ImplicitFunctionGradient(const vtkm::exec::ImplicitFunction &func) + explicit ImplicitFunctionGradient(const vtkm::exec::ImplicitFunction& func) : Function(func) - { } + { + } VTKM_EXEC vtkm::Vec operator()(const vtkm::Vec x) const @@ -136,7 +137,6 @@ public: private: vtkm::exec::ImplicitFunction Function; }; - } } // vtkm::exec diff --git a/vtkm/exec/Jacobian.h b/vtkm/exec/Jacobian.h index 70da6fa60..4486d3022 100644 --- a/vtkm/exec/Jacobian.h +++ b/vtkm/exec/Jacobian.h @@ -26,22 +26,25 @@ #include #include -namespace vtkm { -namespace exec { -namespace internal { +namespace vtkm +{ +namespace exec +{ +namespace internal +{ -template +template struct Space2D { - typedef vtkm::Vec Vec3; - typedef vtkm::Vec Vec2; + typedef vtkm::Vec Vec3; + typedef vtkm::Vec Vec2; Vec3 Origin; Vec3 Basis0; Vec3 Basis1; VTKM_EXEC - Space2D(const Vec3 &origin, const Vec3 &pointFirst, const Vec3 &pointLast) + Space2D(const Vec3& origin, const Vec3& pointFirst, const Vec3& pointLast) { this->Origin = origin; @@ -52,26 +55,26 @@ struct Space2D } VTKM_EXEC - Vec2 ConvertCoordToSpace(const Vec3 coord) const { + Vec2 ConvertCoordToSpace(const Vec3 coord) const + { Vec3 vec = coord - this->Origin; return Vec2(vtkm::dot(vec, this->Basis0), vtkm::dot(vec, this->Basis1)); } - template - VTKM_EXEC - vtkm::Vec ConvertVecFromSpace(const vtkm::Vec vec) const { - return vec[0]*this->Basis0 + vec[1]*this->Basis1; + template + VTKM_EXEC vtkm::Vec ConvertVecFromSpace(const vtkm::Vec vec) const + { + return vec[0] * this->Basis0 + vec[1] * this->Basis1; } }; // Given a series of point values for a wedge, return a new series of point // for a hexahedron that has the same interpolation within the wedge. -template -VTKM_EXEC -vtkm::Vec -PermuteWedgeToHex(const FieldVecType &field) +template +VTKM_EXEC vtkm::Vec PermuteWedgeToHex( + const FieldVecType& field) { - vtkm::Vec hexField; + vtkm::Vec hexField; hexField[0] = field[0]; hexField[1] = field[2]; @@ -87,78 +90,76 @@ PermuteWedgeToHex(const FieldVecType &field) // Given a series of point values for a pyramid, return a new series of point // for a hexahedron that has the same interpolation within the pyramid. -template -VTKM_EXEC -vtkm::Vec -PermutePyramidToHex(const FieldVecType &field) +template +VTKM_EXEC vtkm::Vec PermutePyramidToHex( + const FieldVecType& field) { typedef typename FieldVecType::ComponentType T; - vtkm::Vec hexField; + vtkm::Vec hexField; - T baseCenter = T(0.25f)*(field[0]+field[1]+field[2]+field[3]); + T baseCenter = T(0.25f) * (field[0] + field[1] + field[2] + field[3]); hexField[0] = field[0]; hexField[1] = field[1]; hexField[2] = field[2]; hexField[3] = field[3]; - hexField[4] = field[4]+(field[0]-baseCenter); - hexField[5] = field[4]+(field[1]-baseCenter); - hexField[6] = field[4]+(field[2]-baseCenter); - hexField[7] = field[4]+(field[3]-baseCenter); + hexField[4] = field[4] + (field[0] - baseCenter); + hexField[5] = field[4] + (field[1] - baseCenter); + hexField[6] = field[4] + (field[2] - baseCenter); + hexField[7] = field[4] + (field[3] - baseCenter); return hexField; } } //namespace internal -#define VTKM_DERIVATIVE_WEIGHTS_HEXAHEDRON(pc, rc, call) \ - call(0, -rc[1]*rc[2], -rc[0]*rc[2], -rc[0]*rc[1]); \ - call(1, rc[1]*rc[2], -pc[0]*rc[2], -pc[0]*rc[1]); \ - call(2, pc[1]*rc[2], pc[0]*rc[2], -pc[0]*pc[1]); \ - call(3, -pc[1]*rc[2], rc[0]*rc[2], -rc[0]*pc[1]); \ - call(4, -rc[1]*pc[2], -rc[0]*pc[2], rc[0]*rc[1]); \ - call(5, rc[1]*pc[2], -pc[0]*pc[2], pc[0]*rc[1]); \ - call(6, pc[1]*pc[2], pc[0]*pc[2], pc[0]*pc[1]); \ - call(7, -pc[1]*pc[2], rc[0]*pc[2], rc[0]*pc[1]) +#define VTKM_DERIVATIVE_WEIGHTS_HEXAHEDRON(pc, rc, call) \ + call(0, -rc[1] * rc[2], -rc[0] * rc[2], -rc[0] * rc[1]); \ + call(1, rc[1] * rc[2], -pc[0] * rc[2], -pc[0] * rc[1]); \ + call(2, pc[1] * rc[2], pc[0] * rc[2], -pc[0] * pc[1]); \ + call(3, -pc[1] * rc[2], rc[0] * rc[2], -rc[0] * pc[1]); \ + call(4, -rc[1] * pc[2], -rc[0] * pc[2], rc[0] * rc[1]); \ + call(5, rc[1] * pc[2], -pc[0] * pc[2], pc[0] * rc[1]); \ + call(6, pc[1] * pc[2], pc[0] * pc[2], pc[0] * pc[1]); \ + call(7, -pc[1] * pc[2], rc[0] * pc[2], rc[0] * pc[1]) -#define VTKM_DERIVATIVE_WEIGHTS_VOXEL(pc, rc, call) \ - call(0, -rc[1]*rc[2], -rc[0]*rc[2], -rc[0]*rc[1]); \ - call(1, rc[1]*rc[2], -pc[0]*rc[2], -pc[0]*rc[1]); \ - call(2, -pc[1]*rc[2], rc[0]*rc[2], -rc[0]*pc[1]); \ - call(3, pc[1]*rc[2], pc[0]*rc[2], -pc[0]*pc[1]); \ - call(4, -rc[1]*pc[2], -rc[0]*pc[2], rc[0]*rc[1]); \ - call(5, rc[1]*pc[2], -pc[0]*pc[2], pc[0]*rc[1]); \ - call(6, -pc[1]*pc[2], rc[0]*pc[2], rc[0]*pc[1]); \ - call(7, pc[1]*pc[2], pc[0]*pc[2], pc[0]*pc[1]) +#define VTKM_DERIVATIVE_WEIGHTS_VOXEL(pc, rc, call) \ + call(0, -rc[1] * rc[2], -rc[0] * rc[2], -rc[0] * rc[1]); \ + call(1, rc[1] * rc[2], -pc[0] * rc[2], -pc[0] * rc[1]); \ + call(2, -pc[1] * rc[2], rc[0] * rc[2], -rc[0] * pc[1]); \ + call(3, pc[1] * rc[2], pc[0] * rc[2], -pc[0] * pc[1]); \ + call(4, -rc[1] * pc[2], -rc[0] * pc[2], rc[0] * rc[1]); \ + call(5, rc[1] * pc[2], -pc[0] * pc[2], pc[0] * rc[1]); \ + call(6, -pc[1] * pc[2], rc[0] * pc[2], rc[0] * pc[1]); \ + call(7, pc[1] * pc[2], pc[0] * pc[2], pc[0] * pc[1]) -#define VTKM_DERIVATIVE_WEIGHTS_WEDGE(pc, rc, call) \ - call(0, -rc[2], -rc[2], -1.0f+pc[0]+pc[1]); \ - call(1, 0.0f, rc[2], -pc[1]); \ - call(2, rc[2], 0.0f, -pc[0]); \ - call(3, -pc[2], -pc[2], 1.0f-pc[0]-pc[1]); \ - call(4, 0.0f, pc[2], pc[1]); \ - call(5, pc[2], 0.0f, pc[0]) +#define VTKM_DERIVATIVE_WEIGHTS_WEDGE(pc, rc, call) \ + call(0, -rc[2], -rc[2], -1.0f + pc[0] + pc[1]); \ + call(1, 0.0f, rc[2], -pc[1]); \ + call(2, rc[2], 0.0f, -pc[0]); \ + call(3, -pc[2], -pc[2], 1.0f - pc[0] - pc[1]); \ + call(4, 0.0f, pc[2], pc[1]); \ + call(5, pc[2], 0.0f, pc[0]) -#define VTKM_DERIVATIVE_WEIGHTS_PYRAMID(pc, rc, call) \ - call(0, -rc[1]*rc[2], -rc[0]*rc[2], -rc[0]*rc[1]); \ - call(1, rc[1]*rc[2], -pc[0]*rc[2], -pc[0]*rc[1]); \ - call(2, pc[1]*rc[2], pc[0]*rc[2], -pc[0]*pc[1]); \ - call(3, -pc[1]*rc[2], rc[0]*rc[2], -rc[0]*pc[1]); \ - call(3, 0.0f, 0.0f, 1.0f) +#define VTKM_DERIVATIVE_WEIGHTS_PYRAMID(pc, rc, call) \ + call(0, -rc[1] * rc[2], -rc[0] * rc[2], -rc[0] * rc[1]); \ + call(1, rc[1] * rc[2], -pc[0] * rc[2], -pc[0] * rc[1]); \ + call(2, pc[1] * rc[2], pc[0] * rc[2], -pc[0] * pc[1]); \ + call(3, -pc[1] * rc[2], rc[0] * rc[2], -rc[0] * pc[1]); \ + call(3, 0.0f, 0.0f, 1.0f) +#define VTKM_DERIVATIVE_WEIGHTS_QUAD(pc, rc, call) \ + call(0, -rc[1], -rc[0]); \ + call(1, rc[1], -pc[0]); \ + call(2, pc[1], pc[0]); \ + call(3, -pc[1], rc[0]) -#define VTKM_DERIVATIVE_WEIGHTS_QUAD(pc, rc, call) \ - call(0, -rc[1], -rc[0]); \ - call(1, rc[1], -pc[0]); \ - call(2, pc[1], pc[0]); \ - call(3, -pc[1], rc[0]) - -#define VTKM_DERIVATIVE_WEIGHTS_PIXEL(pc, rc, call) \ - call(0, -rc[1], -rc[0]); \ - call(1, rc[1], -pc[0]); \ - call(2, -pc[1], rc[0]); \ - call(3, pc[1], pc[0]) +#define VTKM_DERIVATIVE_WEIGHTS_PIXEL(pc, rc, call) \ + call(0, -rc[1], -rc[0]); \ + call(1, rc[1], -pc[0]); \ + call(2, -pc[1], rc[0]); \ + call(3, pc[1], pc[0]) //----------------------------------------------------------------------------- // This returns the Jacobian of a hexahedron's (or other 3D cell's) coordinates @@ -174,41 +175,35 @@ PermutePyramidToHex(const FieldVecType &field) // | | // -#define VTKM_ACCUM_JACOBIAN_3D(pointIndex, weight0, weight1, weight2) \ - jacobian(0,0) += static_cast(wCoords[pointIndex][0] * (weight0)); \ - jacobian(1,0) += static_cast(wCoords[pointIndex][1] * (weight0)); \ - jacobian(2,0) += static_cast(wCoords[pointIndex][2] * (weight0)); \ - jacobian(0,1) += static_cast(wCoords[pointIndex][0] * (weight1)); \ - jacobian(1,1) += static_cast(wCoords[pointIndex][1] * (weight1)); \ - jacobian(2,1) += static_cast(wCoords[pointIndex][2] * (weight1)); \ - jacobian(0,2) += static_cast(wCoords[pointIndex][0] * (weight2)); \ - jacobian(1,2) += static_cast(wCoords[pointIndex][1] * (weight2)); \ - jacobian(2,2) += static_cast(wCoords[pointIndex][2] * (weight2)) +#define VTKM_ACCUM_JACOBIAN_3D(pointIndex, weight0, weight1, weight2) \ + jacobian(0, 0) += static_cast(wCoords[pointIndex][0] * (weight0)); \ + jacobian(1, 0) += static_cast(wCoords[pointIndex][1] * (weight0)); \ + jacobian(2, 0) += static_cast(wCoords[pointIndex][2] * (weight0)); \ + jacobian(0, 1) += static_cast(wCoords[pointIndex][0] * (weight1)); \ + jacobian(1, 1) += static_cast(wCoords[pointIndex][1] * (weight1)); \ + jacobian(2, 1) += static_cast(wCoords[pointIndex][2] * (weight1)); \ + jacobian(0, 2) += static_cast(wCoords[pointIndex][0] * (weight2)); \ + jacobian(1, 2) += static_cast(wCoords[pointIndex][1] * (weight2)); \ + jacobian(2, 2) += static_cast(wCoords[pointIndex][2] * (weight2)) -template -VTKM_EXEC -void JacobianFor3DCell(const WorldCoordType &wCoords, - const vtkm::Vec &pcoords, - vtkm::Matrix &jacobian, - vtkm::CellShapeTagHexahedron) +template +VTKM_EXEC void JacobianFor3DCell(const WorldCoordType& wCoords, + const vtkm::Vec& pcoords, + vtkm::Matrix& jacobian, + vtkm::CellShapeTagHexahedron) { - vtkm::Vec pc(pcoords); - vtkm::Vec rc = vtkm::Vec(JacobianType(1)) - pc; + vtkm::Vec pc(pcoords); + vtkm::Vec rc = vtkm::Vec(JacobianType(1)) - pc; - jacobian = vtkm::Matrix(JacobianType(0)); + jacobian = vtkm::Matrix(JacobianType(0)); VTKM_DERIVATIVE_WEIGHTS_HEXAHEDRON(pc, rc, VTKM_ACCUM_JACOBIAN_3D); } -template -VTKM_EXEC -void JacobianFor3DCell(const WorldCoordType &wCoords, - const vtkm::Vec &pcoords, - vtkm::Matrix &jacobian, - vtkm::CellShapeTagWedge) +template +VTKM_EXEC void JacobianFor3DCell(const WorldCoordType& wCoords, + const vtkm::Vec& pcoords, + vtkm::Matrix& jacobian, + vtkm::CellShapeTagWedge) { #if 0 // This is not working. Just leverage the hexahedron code that is working. @@ -218,21 +213,16 @@ void JacobianFor3DCell(const WorldCoordType &wCoords, jacobian = vtkm::Matrix(0); VTKM_DERIVATIVE_WEIGHTS_WEDGE(pc, rc, VTKM_ACCUM_JACOBIAN_3D); #else - JacobianFor3DCell(internal::PermuteWedgeToHex(wCoords), - pcoords, - jacobian, + JacobianFor3DCell(internal::PermuteWedgeToHex(wCoords), pcoords, jacobian, vtkm::CellShapeTagHexahedron()); #endif } -template -VTKM_EXEC -void JacobianFor3DCell(const WorldCoordType &wCoords, - const vtkm::Vec &pcoords, - vtkm::Matrix &jacobian, - vtkm::CellShapeTagPyramid) +template +VTKM_EXEC void JacobianFor3DCell(const WorldCoordType& wCoords, + const vtkm::Vec& pcoords, + vtkm::Matrix& jacobian, + vtkm::CellShapeTagPyramid) { #if 0 // This is not working. Just leverage the hexahedron code that is working. @@ -242,9 +232,7 @@ void JacobianFor3DCell(const WorldCoordType &wCoords, jacobian = vtkm::Matrix(0); VTKM_DERIVATIVE_WEIGHTS_PYRAMID(pc, rc, VTKM_ACCUM_JACOBIAN_3D); #else - JacobianFor3DCell(internal::PermutePyramidToHex(wCoords), - pcoords, - jacobian, + JacobianFor3DCell(internal::PermutePyramidToHex(wCoords), pcoords, jacobian, vtkm::CellShapeTagHexahedron()); #endif } @@ -254,30 +242,26 @@ void JacobianFor3DCell(const WorldCoordType &wCoords, // on the math. The major difference is that the equations are performed in // a 2D space built with make_SpaceForQuadrilateral. -#define VTKM_ACCUM_JACOBIAN_2D(pointIndex, weight0, weight1) \ - wcoords2d = space.ConvertCoordToSpace(wCoords[pointIndex]); \ - jacobian(0,0) += wcoords2d[0] * (weight0); \ - jacobian(1,0) += wcoords2d[1] * (weight0); \ - jacobian(0,1) += wcoords2d[0] * (weight1); \ - jacobian(1,1) += wcoords2d[1] * (weight1) +#define VTKM_ACCUM_JACOBIAN_2D(pointIndex, weight0, weight1) \ + wcoords2d = space.ConvertCoordToSpace(wCoords[pointIndex]); \ + jacobian(0, 0) += wcoords2d[0] * (weight0); \ + jacobian(1, 0) += wcoords2d[1] * (weight0); \ + jacobian(0, 1) += wcoords2d[0] * (weight1); \ + jacobian(1, 1) += wcoords2d[1] * (weight1) -template -VTKM_EXEC -void JacobianFor2DCell(const WorldCoordType &wCoords, - const vtkm::Vec &pcoords, - const vtkm::exec::internal::Space2D &space, - vtkm::Matrix &jacobian, - vtkm::CellShapeTagQuad) +template +VTKM_EXEC void JacobianFor2DCell(const WorldCoordType& wCoords, + const vtkm::Vec& pcoords, + const vtkm::exec::internal::Space2D& space, + vtkm::Matrix& jacobian, vtkm::CellShapeTagQuad) { - vtkm::Vec pc(static_cast(pcoords[0]), - static_cast(pcoords[1])); - vtkm::Vec rc = vtkm::Vec(JacobianType(1)) - pc; + vtkm::Vec pc(static_cast(pcoords[0]), + static_cast(pcoords[1])); + vtkm::Vec rc = vtkm::Vec(JacobianType(1)) - pc; - vtkm::Vec wcoords2d; - jacobian = vtkm::Matrix(JacobianType(0)); + vtkm::Vec wcoords2d; + jacobian = vtkm::Matrix(JacobianType(0)); VTKM_DERIVATIVE_WEIGHTS_QUAD(pc, rc, VTKM_ACCUM_JACOBIAN_2D); } @@ -336,8 +320,6 @@ void JacobianFor2DCell(const WorldCoordType &wCoords, #undef VTKM_DERIVATIVE_WEIGHTS_PYRAMID #undef VTKM_DERIVATIVE_WEIGHTS_QUAD #undef VTKM_DERIVATIVE_WEIGHTS_PIXEL - - } } // namespace vtkm::exec #endif //vtk_m_exec_Jacobian_h diff --git a/vtkm/exec/ParametricCoordinates.h b/vtkm/exec/ParametricCoordinates.h index 810227eb0..2356ad93d 100644 --- a/vtkm/exec/ParametricCoordinates.h +++ b/vtkm/exec/ParametricCoordinates.h @@ -30,87 +30,81 @@ #include #include -namespace vtkm { -namespace exec { +namespace vtkm +{ +namespace exec +{ //----------------------------------------------------------------------------- -template -static inline VTKM_EXEC -void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - vtkm::Vec &pcoords, - vtkm::CellShapeTagEmpty, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, + vtkm::Vec& pcoords, + vtkm::CellShapeTagEmpty, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSERT(numPoints == 0); pcoords[0] = 0; pcoords[1] = 0; pcoords[2] = 0; } -template -static inline VTKM_EXEC -void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - vtkm::Vec &pcoords, - vtkm::CellShapeTagVertex, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, + vtkm::Vec& pcoords, + vtkm::CellShapeTagVertex, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSERT(numPoints == 1); pcoords[0] = 0; pcoords[1] = 0; pcoords[2] = 0; } -template -static inline VTKM_EXEC -void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - vtkm::Vec &pcoords, - vtkm::CellShapeTagLine, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, + vtkm::Vec& pcoords, + vtkm::CellShapeTagLine, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSERT(numPoints == 2); pcoords[0] = 0.5; pcoords[1] = 0; pcoords[2] = 0; } -template -static inline VTKM_EXEC -void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - vtkm::Vec &pcoords, - vtkm::CellShapeTagTriangle, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, + vtkm::Vec& pcoords, + vtkm::CellShapeTagTriangle, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSERT(numPoints == 3); - pcoords[0] = static_cast(1.0/3.0); - pcoords[1] = static_cast(1.0/3.0); + pcoords[0] = static_cast(1.0 / 3.0); + pcoords[1] = static_cast(1.0 / 3.0); pcoords[2] = 0; } -template -static inline VTKM_EXEC -void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - vtkm::Vec &pcoords, - vtkm::CellShapeTagPolygon, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, + vtkm::Vec& pcoords, + vtkm::CellShapeTagPolygon, + const vtkm::exec::FunctorBase& worklet) { VTKM_ASSERT(numPoints > 0); switch (numPoints) { case 1: - ParametricCoordinatesCenter( - numPoints, pcoords, vtkm::CellShapeTagVertex(), worklet); + ParametricCoordinatesCenter(numPoints, pcoords, vtkm::CellShapeTagVertex(), worklet); break; case 2: - ParametricCoordinatesCenter( - numPoints, pcoords, vtkm::CellShapeTagLine(), worklet); + ParametricCoordinatesCenter(numPoints, pcoords, vtkm::CellShapeTagLine(), worklet); break; case 3: - ParametricCoordinatesCenter( - numPoints, pcoords, vtkm::CellShapeTagTriangle(), worklet); + ParametricCoordinatesCenter(numPoints, pcoords, vtkm::CellShapeTagTriangle(), worklet); break; default: pcoords[0] = 0.5; @@ -120,70 +114,65 @@ void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, } } -template -static inline VTKM_EXEC -void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - vtkm::Vec &pcoords, - vtkm::CellShapeTagQuad, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, + vtkm::Vec& pcoords, + vtkm::CellShapeTagQuad, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSERT(numPoints == 4); pcoords[0] = 0.5; pcoords[1] = 0.5; pcoords[2] = 0; } -template -static inline VTKM_EXEC -void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - vtkm::Vec &pcoords, - vtkm::CellShapeTagTetra, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, + vtkm::Vec& pcoords, + vtkm::CellShapeTagTetra, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSERT(numPoints == 4); pcoords[0] = 0.25; pcoords[1] = 0.25; pcoords[2] = 0.25; } -template -static inline VTKM_EXEC -void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - vtkm::Vec &pcoords, - vtkm::CellShapeTagHexahedron, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, + vtkm::Vec& pcoords, + vtkm::CellShapeTagHexahedron, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSERT(numPoints == 8); pcoords[0] = 0.5; pcoords[1] = 0.5; pcoords[2] = 0.5; } -template -static inline VTKM_EXEC -void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - vtkm::Vec &pcoords, - vtkm::CellShapeTagWedge, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, + vtkm::Vec& pcoords, + vtkm::CellShapeTagWedge, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSERT(numPoints == 6); - pcoords[0] = static_cast(1.0/3.0); - pcoords[1] = static_cast(1.0/3.0); + pcoords[0] = static_cast(1.0 / 3.0); + pcoords[1] = static_cast(1.0 / 3.0); pcoords[2] = 0.5; } -template -static inline VTKM_EXEC -void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - vtkm::Vec &pcoords, - vtkm::CellShapeTagPyramid, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, + vtkm::Vec& pcoords, + vtkm::CellShapeTagPyramid, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSERT(numPoints == 5); pcoords[0] = 0.5; pcoords[1] = 0.5; @@ -194,19 +183,16 @@ void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, /// Returns the parametric center of the given cell shape with the given number /// of points. /// -template -static inline VTKM_EXEC -void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - vtkm::Vec &pcoords, - vtkm::CellShapeTagGeneric shape, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, + vtkm::Vec& pcoords, + vtkm::CellShapeTagGeneric shape, + const vtkm::exec::FunctorBase& worklet) { switch (shape.Id) { - vtkmGenericCellShapeMacro(ParametricCoordinatesCenter(numPoints, - pcoords, - CellShapeTag(), - worklet)); + vtkmGenericCellShapeMacro( + ParametricCoordinatesCenter(numPoints, pcoords, CellShapeTag(), worklet)); default: worklet.RaiseError("Bad shape given to ParametricCoordinatesCenter."); pcoords[0] = pcoords[1] = pcoords[2] = 0; @@ -217,38 +203,32 @@ void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, /// Returns the parametric center of the given cell shape with the given number /// of points. /// -template -static inline VTKM_EXEC -vtkm::Vec -ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - CellShapeTag shape, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC vtkm::Vec ParametricCoordinatesCenter( + vtkm::IdComponent numPoints, CellShapeTag shape, const vtkm::exec::FunctorBase& worklet) { - vtkm::Vec pcoords; + vtkm::Vec pcoords; ParametricCoordinatesCenter(numPoints, pcoords, shape, worklet); return pcoords; } //----------------------------------------------------------------------------- -template -static inline VTKM_EXEC -void ParametricCoordinatesPoint(vtkm::IdComponent, - vtkm::IdComponent, - vtkm::Vec &pcoords, - vtkm::CellShapeTagEmpty, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC void ParametricCoordinatesPoint(vtkm::IdComponent, vtkm::IdComponent, + vtkm::Vec& pcoords, + vtkm::CellShapeTagEmpty, + const vtkm::exec::FunctorBase& worklet) { worklet.RaiseError("Empty cell has no points."); pcoords[0] = pcoords[1] = pcoords[2] = 0; } -template -static inline VTKM_EXEC -void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - vtkm::Vec &pcoords, - vtkm::CellShapeTagVertex, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, + vtkm::IdComponent pointIndex, + vtkm::Vec& pcoords, + vtkm::CellShapeTagVertex, + const vtkm::exec::FunctorBase&) { (void)numPoints; // Silence compiler warnings. (void)pointIndex; // Silence compiler warnings. @@ -259,15 +239,14 @@ void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, pcoords[2] = 0; } -template -static inline VTKM_EXEC -void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - vtkm::Vec &pcoords, - vtkm::CellShapeTagLine, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, + vtkm::IdComponent pointIndex, + vtkm::Vec& pcoords, + vtkm::CellShapeTagLine, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSUME(numPoints == 2); VTKM_ASSUME((pointIndex >= 0) && (pointIndex < 2)); @@ -276,190 +255,282 @@ void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, pcoords[2] = 0; } -template -static inline VTKM_EXEC -void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - vtkm::Vec &pcoords, - vtkm::CellShapeTagTriangle, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, + vtkm::IdComponent pointIndex, + vtkm::Vec& pcoords, + vtkm::CellShapeTagTriangle, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSUME(numPoints == 3); VTKM_ASSUME((pointIndex >= 0) && (pointIndex < 3)); switch (pointIndex) { - case 0: pcoords[0] = 0; pcoords[1] = 0; break; - case 1: pcoords[0] = 1; pcoords[1] = 0; break; - case 2: pcoords[0] = 0; pcoords[1] = 1; break; + case 0: + pcoords[0] = 0; + pcoords[1] = 0; + break; + case 1: + pcoords[0] = 1; + pcoords[1] = 0; + break; + case 2: + pcoords[0] = 0; + pcoords[1] = 1; + break; } pcoords[2] = 0; } -template -static inline VTKM_EXEC -void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - vtkm::Vec &pcoords, - vtkm::CellShapeTagPolygon, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, + vtkm::IdComponent pointIndex, + vtkm::Vec& pcoords, + vtkm::CellShapeTagPolygon, + const vtkm::exec::FunctorBase& worklet) { - VTKM_ASSUME( (numPoints > 0) ); - VTKM_ASSUME( (pointIndex >= 0) && (pointIndex < numPoints) ); + VTKM_ASSUME((numPoints > 0)); + VTKM_ASSUME((pointIndex >= 0) && (pointIndex < numPoints)); switch (numPoints) { case 1: - ParametricCoordinatesPoint(numPoints, - pointIndex, - pcoords, - vtkm::CellShapeTagVertex(), + ParametricCoordinatesPoint(numPoints, pointIndex, pcoords, vtkm::CellShapeTagVertex(), worklet); return; case 2: - ParametricCoordinatesPoint(numPoints, - pointIndex, - pcoords, - vtkm::CellShapeTagLine(), - worklet); + ParametricCoordinatesPoint(numPoints, pointIndex, pcoords, vtkm::CellShapeTagLine(), worklet); return; case 3: - ParametricCoordinatesPoint(numPoints, - pointIndex, - pcoords, - vtkm::CellShapeTagTriangle(), + ParametricCoordinatesPoint(numPoints, pointIndex, pcoords, vtkm::CellShapeTagTriangle(), worklet); return; case 4: - ParametricCoordinatesPoint(numPoints, - pointIndex, - pcoords, - vtkm::CellShapeTagQuad(), - worklet); + ParametricCoordinatesPoint(numPoints, pointIndex, pcoords, vtkm::CellShapeTagQuad(), worklet); return; } // If we are here, then numPoints >= 5. const ParametricCoordType angle = - static_cast(pointIndex*2*vtkm::Pi()/numPoints); + static_cast(pointIndex * 2 * vtkm::Pi() / numPoints); - pcoords[0] = 0.5f*(vtkm::Cos(angle)+1); - pcoords[1] = 0.5f*(vtkm::Sin(angle)+1); + pcoords[0] = 0.5f * (vtkm::Cos(angle) + 1); + pcoords[1] = 0.5f * (vtkm::Sin(angle) + 1); pcoords[2] = 0; } -template -static inline VTKM_EXEC -void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - vtkm::Vec &pcoords, - vtkm::CellShapeTagQuad, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, + vtkm::IdComponent pointIndex, + vtkm::Vec& pcoords, + vtkm::CellShapeTagQuad, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSUME(numPoints == 4); VTKM_ASSUME((pointIndex >= 0) && (pointIndex < 4)); switch (pointIndex) { - case 0: pcoords[0] = 0; pcoords[1] = 0; break; - case 1: pcoords[0] = 1; pcoords[1] = 0; break; - case 2: pcoords[0] = 1; pcoords[1] = 1; break; - case 3: pcoords[0] = 0; pcoords[1] = 1; break; + case 0: + pcoords[0] = 0; + pcoords[1] = 0; + break; + case 1: + pcoords[0] = 1; + pcoords[1] = 0; + break; + case 2: + pcoords[0] = 1; + pcoords[1] = 1; + break; + case 3: + pcoords[0] = 0; + pcoords[1] = 1; + break; } pcoords[2] = 0; } -template -static inline VTKM_EXEC -void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - vtkm::Vec &pcoords, - vtkm::CellShapeTagTetra, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, + vtkm::IdComponent pointIndex, + vtkm::Vec& pcoords, + vtkm::CellShapeTagTetra, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSUME(numPoints == 4); VTKM_ASSUME((pointIndex >= 0) && (pointIndex < 4)); switch (pointIndex) { - case 0: pcoords[0] = 0; pcoords[1] = 0; pcoords[2] = 0; break; - case 1: pcoords[0] = 1; pcoords[1] = 0; pcoords[2] = 0; break; - case 2: pcoords[0] = 0; pcoords[1] = 1; pcoords[2] = 0; break; - case 3: pcoords[0] = 0; pcoords[1] = 0; pcoords[2] = 1; break; + case 0: + pcoords[0] = 0; + pcoords[1] = 0; + pcoords[2] = 0; + break; + case 1: + pcoords[0] = 1; + pcoords[1] = 0; + pcoords[2] = 0; + break; + case 2: + pcoords[0] = 0; + pcoords[1] = 1; + pcoords[2] = 0; + break; + case 3: + pcoords[0] = 0; + pcoords[1] = 0; + pcoords[2] = 1; + break; } } -template -static inline VTKM_EXEC -void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - vtkm::Vec &pcoords, - vtkm::CellShapeTagHexahedron, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, + vtkm::IdComponent pointIndex, + vtkm::Vec& pcoords, + vtkm::CellShapeTagHexahedron, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSUME(numPoints == 8); VTKM_ASSUME((pointIndex >= 0) && (pointIndex < 8)); switch (pointIndex) { - case 0: pcoords[0] = 0; pcoords[1] = 0; pcoords[2] = 0; break; - case 1: pcoords[0] = 1; pcoords[1] = 0; pcoords[2] = 0; break; - case 2: pcoords[0] = 1; pcoords[1] = 1; pcoords[2] = 0; break; - case 3: pcoords[0] = 0; pcoords[1] = 1; pcoords[2] = 0; break; - case 4: pcoords[0] = 0; pcoords[1] = 0; pcoords[2] = 1; break; - case 5: pcoords[0] = 1; pcoords[1] = 0; pcoords[2] = 1; break; - case 6: pcoords[0] = 1; pcoords[1] = 1; pcoords[2] = 1; break; - case 7: pcoords[0] = 0; pcoords[1] = 1; pcoords[2] = 1; break; + case 0: + pcoords[0] = 0; + pcoords[1] = 0; + pcoords[2] = 0; + break; + case 1: + pcoords[0] = 1; + pcoords[1] = 0; + pcoords[2] = 0; + break; + case 2: + pcoords[0] = 1; + pcoords[1] = 1; + pcoords[2] = 0; + break; + case 3: + pcoords[0] = 0; + pcoords[1] = 1; + pcoords[2] = 0; + break; + case 4: + pcoords[0] = 0; + pcoords[1] = 0; + pcoords[2] = 1; + break; + case 5: + pcoords[0] = 1; + pcoords[1] = 0; + pcoords[2] = 1; + break; + case 6: + pcoords[0] = 1; + pcoords[1] = 1; + pcoords[2] = 1; + break; + case 7: + pcoords[0] = 0; + pcoords[1] = 1; + pcoords[2] = 1; + break; } } -template -static inline VTKM_EXEC -void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - vtkm::Vec &pcoords, - vtkm::CellShapeTagWedge, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, + vtkm::IdComponent pointIndex, + vtkm::Vec& pcoords, + vtkm::CellShapeTagWedge, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSUME(numPoints == 6); VTKM_ASSUME((pointIndex >= 0) && (pointIndex < 6)); switch (pointIndex) { - case 0: pcoords[0] = 0; pcoords[1] = 0; pcoords[2] = 0; break; - case 1: pcoords[0] = 0; pcoords[1] = 1; pcoords[2] = 0; break; - case 2: pcoords[0] = 1; pcoords[1] = 0; pcoords[2] = 0; break; - case 3: pcoords[0] = 0; pcoords[1] = 0; pcoords[2] = 1; break; - case 4: pcoords[0] = 0; pcoords[1] = 1; pcoords[2] = 1; break; - case 5: pcoords[0] = 1; pcoords[1] = 0; pcoords[2] = 1; break; + case 0: + pcoords[0] = 0; + pcoords[1] = 0; + pcoords[2] = 0; + break; + case 1: + pcoords[0] = 0; + pcoords[1] = 1; + pcoords[2] = 0; + break; + case 2: + pcoords[0] = 1; + pcoords[1] = 0; + pcoords[2] = 0; + break; + case 3: + pcoords[0] = 0; + pcoords[1] = 0; + pcoords[2] = 1; + break; + case 4: + pcoords[0] = 0; + pcoords[1] = 1; + pcoords[2] = 1; + break; + case 5: + pcoords[0] = 1; + pcoords[1] = 0; + pcoords[2] = 1; + break; } } -template -static inline VTKM_EXEC -void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - vtkm::Vec &pcoords, - vtkm::CellShapeTagPyramid, - const vtkm::exec::FunctorBase &) +template +static inline VTKM_EXEC void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, + vtkm::IdComponent pointIndex, + vtkm::Vec& pcoords, + vtkm::CellShapeTagPyramid, + const vtkm::exec::FunctorBase&) { - (void)numPoints; // Silence compiler warnings. + (void)numPoints; // Silence compiler warnings. VTKM_ASSUME(numPoints == 5); VTKM_ASSUME((pointIndex >= 0) && (pointIndex < 5)); switch (pointIndex) { - case 0: pcoords[0] = 0; pcoords[1] = 0; pcoords[2] = 0; break; - case 1: pcoords[0] = 1; pcoords[1] = 0; pcoords[2] = 0; break; - case 2: pcoords[0] = 1; pcoords[1] = 1; pcoords[2] = 0; break; - case 3: pcoords[0] = 0; pcoords[1] = 1; pcoords[2] = 0; break; - case 4: pcoords[0] = 0.5; pcoords[1] = 0.5; pcoords[2] = 1; break; + case 0: + pcoords[0] = 0; + pcoords[1] = 0; + pcoords[2] = 0; + break; + case 1: + pcoords[0] = 1; + pcoords[1] = 0; + pcoords[2] = 0; + break; + case 2: + pcoords[0] = 1; + pcoords[1] = 1; + pcoords[2] = 0; + break; + case 3: + pcoords[0] = 0; + pcoords[1] = 1; + pcoords[2] = 0; + break; + case 4: + pcoords[0] = 0.5; + pcoords[1] = 0.5; + pcoords[2] = 1; + break; } } @@ -467,21 +538,17 @@ void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, /// Returns the parametric coordinate of a cell point of the given shape with /// the given number of points. /// -template -static inline VTKM_EXEC -void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - vtkm::Vec &pcoords, - vtkm::CellShapeTagGeneric shape, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, + vtkm::IdComponent pointIndex, + vtkm::Vec& pcoords, + vtkm::CellShapeTagGeneric shape, + const vtkm::exec::FunctorBase& worklet) { switch (shape.Id) { - vtkmGenericCellShapeMacro(ParametricCoordinatesPoint(numPoints, - pointIndex, - pcoords, - CellShapeTag(), - worklet)); + vtkmGenericCellShapeMacro( + ParametricCoordinatesPoint(numPoints, pointIndex, pcoords, CellShapeTag(), worklet)); default: worklet.RaiseError("Bad shape given to ParametricCoordinatesPoint."); pcoords[0] = pcoords[1] = pcoords[2] = 0; @@ -492,189 +559,170 @@ void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, /// Returns the parametric coordinate of a cell point of the given shape with /// the given number of points. /// -template -static inline VTKM_EXEC -vtkm::Vec -ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - CellShapeTag shape, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC vtkm::Vec ParametricCoordinatesPoint( + vtkm::IdComponent numPoints, vtkm::IdComponent pointIndex, CellShapeTag shape, + const vtkm::exec::FunctorBase& worklet) { - vtkm::Vec pcoords; + vtkm::Vec pcoords; ParametricCoordinatesPoint(numPoints, pointIndex, pcoords, shape, worklet); return pcoords; } //----------------------------------------------------------------------------- -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -ParametricCoordinatesToWorldCoordinates( - const WorldCoordVector &pointWCoords, - const vtkm::Vec &pcoords, - CellShapeTag shape, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +ParametricCoordinatesToWorldCoordinates(const WorldCoordVector& pointWCoords, + const vtkm::Vec& pcoords, CellShapeTag shape, + const vtkm::exec::FunctorBase& worklet) { return vtkm::exec::CellInterpolate(pointWCoords, pcoords, shape, worklet); } //----------------------------------------------------------------------------- -namespace detail { +namespace detail +{ -template +template class JacobianFunctorQuad { typedef typename WorldCoordVector::ComponentType::ComponentType T; - typedef vtkm::Vec Vector2; - typedef vtkm::Matrix Matrix2x2; + typedef vtkm::Vec Vector2; + typedef vtkm::Matrix Matrix2x2; typedef vtkm::exec::internal::Space2D SpaceType; - const WorldCoordVector *PointWCoords; - const SpaceType *Space; + const WorldCoordVector* PointWCoords; + const SpaceType* Space; public: VTKM_EXEC - JacobianFunctorQuad( - const WorldCoordVector *pointWCoords, - const SpaceType *space) - : PointWCoords(pointWCoords), Space(space) - { } + JacobianFunctorQuad(const WorldCoordVector* pointWCoords, const SpaceType* space) + : PointWCoords(pointWCoords) + , Space(space) + { + } VTKM_EXEC - Matrix2x2 operator()(const Vector2 &pcoords) const + Matrix2x2 operator()(const Vector2& pcoords) const { Matrix2x2 jacobian; - vtkm::exec::JacobianFor2DCell( - *this->PointWCoords, - vtkm::Vec(pcoords[0],pcoords[1],0), - *this->Space, - jacobian, - CellShapeTag()); + vtkm::exec::JacobianFor2DCell(*this->PointWCoords, vtkm::Vec(pcoords[0], pcoords[1], 0), + *this->Space, jacobian, CellShapeTag()); return jacobian; } }; -template +template class CoordinatesFunctorQuad { typedef typename WorldCoordVector::ComponentType::ComponentType T; - typedef vtkm::Vec Vector2; - typedef vtkm::Vec Vector3; + typedef vtkm::Vec Vector2; + typedef vtkm::Vec Vector3; typedef vtkm::exec::internal::Space2D SpaceType; - const WorldCoordVector *PointWCoords; - const SpaceType *Space; - const vtkm::exec::FunctorBase *Worklet; + const WorldCoordVector* PointWCoords; + const SpaceType* Space; + const vtkm::exec::FunctorBase* Worklet; public: VTKM_EXEC - CoordinatesFunctorQuad( - const WorldCoordVector *pointWCoords, - const SpaceType *space, - const vtkm::exec::FunctorBase *worklet) - : PointWCoords(pointWCoords), Space(space), Worklet(worklet) - { } + CoordinatesFunctorQuad(const WorldCoordVector* pointWCoords, const SpaceType* space, + const vtkm::exec::FunctorBase* worklet) + : PointWCoords(pointWCoords) + , Space(space) + , Worklet(worklet) + { + } VTKM_EXEC - Vector2 operator()(Vector2 pcoords) const { + Vector2 operator()(Vector2 pcoords) const + { Vector3 pcoords3D(pcoords[0], pcoords[1], 0); - Vector3 wcoords = - vtkm::exec::ParametricCoordinatesToWorldCoordinates( - *this->PointWCoords, pcoords3D, CellShapeTag(), *this->Worklet); + Vector3 wcoords = vtkm::exec::ParametricCoordinatesToWorldCoordinates( + *this->PointWCoords, pcoords3D, CellShapeTag(), *this->Worklet); return this->Space->ConvertCoordToSpace(wcoords); } }; -template +template class JacobianFunctor3DCell { typedef typename WorldCoordVector::ComponentType::ComponentType T; - typedef vtkm::Vec Vector3; - typedef vtkm::Matrix Matrix3x3; + typedef vtkm::Vec Vector3; + typedef vtkm::Matrix Matrix3x3; - const WorldCoordVector *PointWCoords; + const WorldCoordVector* PointWCoords; public: VTKM_EXEC - JacobianFunctor3DCell( - const WorldCoordVector *pointWCoords) + JacobianFunctor3DCell(const WorldCoordVector* pointWCoords) : PointWCoords(pointWCoords) - { } + { + } VTKM_EXEC - Matrix3x3 operator()(const Vector3 &pcoords) const + Matrix3x3 operator()(const Vector3& pcoords) const { Matrix3x3 jacobian; - vtkm::exec::JacobianFor3DCell(*this->PointWCoords, - pcoords, - jacobian, - CellShapeTag()); + vtkm::exec::JacobianFor3DCell(*this->PointWCoords, pcoords, jacobian, CellShapeTag()); return jacobian; } }; -template +template class CoordinatesFunctor3DCell { typedef typename WorldCoordVector::ComponentType::ComponentType T; - typedef vtkm::Vec Vector3; + typedef vtkm::Vec Vector3; - const WorldCoordVector *PointWCoords; - const vtkm::exec::FunctorBase *Worklet; + const WorldCoordVector* PointWCoords; + const vtkm::exec::FunctorBase* Worklet; public: VTKM_EXEC - CoordinatesFunctor3DCell(const WorldCoordVector *pointWCoords, - const vtkm::exec::FunctorBase *worklet) - : PointWCoords(pointWCoords), Worklet(worklet) - { } + CoordinatesFunctor3DCell(const WorldCoordVector* pointWCoords, + const vtkm::exec::FunctorBase* worklet) + : PointWCoords(pointWCoords) + , Worklet(worklet) + { + } VTKM_EXEC - Vector3 operator()(Vector3 pcoords) const { - return - vtkm::exec::ParametricCoordinatesToWorldCoordinates( - *this->PointWCoords, pcoords, CellShapeTag(), *this->Worklet); + Vector3 operator()(Vector3 pcoords) const + { + return vtkm::exec::ParametricCoordinatesToWorldCoordinates(*this->PointWCoords, pcoords, + CellShapeTag(), *this->Worklet); } }; -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -WorldCoordinatesToParametricCoordinates3D( - const WorldCoordVector &pointWCoords, - const typename WorldCoordVector::ComponentType &wcoords, - CellShapeTag, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +WorldCoordinatesToParametricCoordinates3D(const WorldCoordVector& pointWCoords, + const typename WorldCoordVector::ComponentType& wcoords, + CellShapeTag, const vtkm::exec::FunctorBase& worklet) { return vtkm::NewtonsMethod( - JacobianFunctor3DCell(&pointWCoords), - CoordinatesFunctor3DCell(&pointWCoords, &worklet), - wcoords, - typename WorldCoordVector::ComponentType(0.5f,0.5f,0.5f)); + JacobianFunctor3DCell(&pointWCoords), + CoordinatesFunctor3DCell(&pointWCoords, &worklet), wcoords, + typename WorldCoordVector::ComponentType(0.5f, 0.5f, 0.5f)); } - } // namespace detail //----------------------------------------------------------------------------- -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -WorldCoordinatesToParametricCoordinates( - const WorldCoordVector &pointWCoords, - const typename WorldCoordVector::ComponentType &wcoords, - vtkm::CellShapeTagGeneric shape, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, + const typename WorldCoordVector::ComponentType& wcoords, + vtkm::CellShapeTagGeneric shape, + const vtkm::exec::FunctorBase& worklet) { typename WorldCoordVector::ComponentType result; switch (shape.Id) { - vtkmGenericCellShapeMacro( - result = WorldCoordinatesToParametricCoordinates(pointWCoords, - wcoords, - CellShapeTag(), - worklet)); + vtkmGenericCellShapeMacro(result = WorldCoordinatesToParametricCoordinates( + pointWCoords, wcoords, CellShapeTag(), worklet)); default: worklet.RaiseError("Unknown cell shape sent to world 2 parametric."); return typename WorldCoordVector::ComponentType(); @@ -683,41 +731,35 @@ WorldCoordinatesToParametricCoordinates( return result; } -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -WorldCoordinatesToParametricCoordinates( - const WorldCoordVector &, - const typename WorldCoordVector::ComponentType &, - vtkm::CellShapeTagEmpty, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +WorldCoordinatesToParametricCoordinates(const WorldCoordVector&, + const typename WorldCoordVector::ComponentType&, + vtkm::CellShapeTagEmpty, + const vtkm::exec::FunctorBase& worklet) { worklet.RaiseError("Attempted to find point coordinates in empty cell."); return typename WorldCoordVector::ComponentType(); } -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -WorldCoordinatesToParametricCoordinates( - const WorldCoordVector &pointWCoords, - const typename WorldCoordVector::ComponentType &, - vtkm::CellShapeTagVertex, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, + const typename WorldCoordVector::ComponentType&, + vtkm::CellShapeTagVertex, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { (void)pointWCoords; // Silence compiler warnings. VTKM_ASSERT(pointWCoords.GetNumberOfComponents() == 1); return typename WorldCoordVector::ComponentType(0, 0, 0); } -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -WorldCoordinatesToParametricCoordinates( - const WorldCoordVector &pointWCoords, - const typename WorldCoordVector::ComponentType &wcoords, - vtkm::CellShapeTagLine, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, + const typename WorldCoordVector::ComponentType& wcoords, + vtkm::CellShapeTagLine, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(pointWCoords.GetNumberOfComponents() == 2); @@ -737,58 +779,49 @@ WorldCoordinatesToParametricCoordinates( T numerator = vtkm::dot(vec, wcoords - pointWCoords[0]); T denominator = vtkm::MagnitudeSquared(vec); - return Vector3(numerator/denominator, 0, 0); + return Vector3(numerator / denominator, 0, 0); } -static inline VTKM_EXEC -vtkm::Vec -WorldCoordinatesToParametricCoordinates( - const vtkm::VecRectilinearPointCoordinates<1> &pointWCoords, - const vtkm::Vec &wcoords, - vtkm::CellShapeTagLine, - const FunctorBase &) +static inline VTKM_EXEC vtkm::Vec WorldCoordinatesToParametricCoordinates( + const vtkm::VecRectilinearPointCoordinates<1>& pointWCoords, + const vtkm::Vec& wcoords, vtkm::CellShapeTagLine, const FunctorBase&) { - return (wcoords - pointWCoords.GetOrigin())/pointWCoords.GetSpacing(); + return (wcoords - pointWCoords.GetOrigin()) / pointWCoords.GetSpacing(); } -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -WorldCoordinatesToParametricCoordinates( - const WorldCoordVector &pointWCoords, - const typename WorldCoordVector::ComponentType &wcoords, - vtkm::CellShapeTagTriangle, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, + const typename WorldCoordVector::ComponentType& wcoords, + vtkm::CellShapeTagTriangle, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { - return vtkm::exec::internal::ReverseInterpolateTriangle( - pointWCoords, wcoords); + return vtkm::exec::internal::ReverseInterpolateTriangle(pointWCoords, wcoords); } -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -WorldCoordinatesToParametricCoordinates( - const WorldCoordVector &pointWCoords, - const typename WorldCoordVector::ComponentType &wcoords, - vtkm::CellShapeTagPolygon, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, + const typename WorldCoordVector::ComponentType& wcoords, + vtkm::CellShapeTagPolygon, + const vtkm::exec::FunctorBase& worklet) { const vtkm::IdComponent numPoints = pointWCoords.GetNumberOfComponents(); VTKM_ASSERT(numPoints > 0); switch (numPoints) { case 1: - return WorldCoordinatesToParametricCoordinates( - pointWCoords, wcoords, vtkm::CellShapeTagVertex(), worklet); + return WorldCoordinatesToParametricCoordinates(pointWCoords, wcoords, + vtkm::CellShapeTagVertex(), worklet); case 2: - return WorldCoordinatesToParametricCoordinates( - pointWCoords, wcoords, vtkm::CellShapeTagLine(), worklet); + return WorldCoordinatesToParametricCoordinates(pointWCoords, wcoords, + vtkm::CellShapeTagLine(), worklet); case 3: - return WorldCoordinatesToParametricCoordinates( - pointWCoords, wcoords, vtkm::CellShapeTagTriangle(), worklet); + return WorldCoordinatesToParametricCoordinates(pointWCoords, wcoords, + vtkm::CellShapeTagTriangle(), worklet); case 4: - return WorldCoordinatesToParametricCoordinates( - pointWCoords, wcoords, vtkm::CellShapeTagQuad(), worklet); + return WorldCoordinatesToParametricCoordinates(pointWCoords, wcoords, + vtkm::CellShapeTagQuad(), worklet); } // If we are here, then there are 5 or more points on this polygon. @@ -809,7 +842,7 @@ WorldCoordinatesToParametricCoordinates( { wcoordCenter = wcoordCenter + pointWCoords[pointIndex]; } - wcoordCenter = wcoordCenter*WCoordType(1.0f/static_cast(numPoints)); + wcoordCenter = wcoordCenter * WCoordType(1.0f / static_cast(numPoints)); // Find the normal vector to the polygon. If the polygon is planar, convex, // and in general position, any three points will give a normal in the same @@ -819,8 +852,8 @@ WorldCoordinatesToParametricCoordinates( // length of the normal in this case. WCoordType polygonNormal; { - WCoordType vec1 = pointWCoords[numPoints/3] - pointWCoords[0]; - WCoordType vec2 = pointWCoords[2*numPoints/3] - pointWCoords[1]; + WCoordType vec1 = pointWCoords[numPoints / 3] - pointWCoords[0]; + WCoordType vec2 = pointWCoords[2 * numPoints / 3] - pointWCoords[1]; polygonNormal = vtkm::Cross(vec1, vec2); } @@ -831,23 +864,22 @@ WorldCoordinatesToParametricCoordinates( vtkm::IdComponent firstPointIndex; vtkm::IdComponent secondPointIndex; bool foundTriangle = false; - for (firstPointIndex = 0; firstPointIndex < numPoints-1; firstPointIndex++) + for (firstPointIndex = 0; firstPointIndex < numPoints - 1; firstPointIndex++) { WCoordType vecInPlane = pointWCoords[firstPointIndex] - wcoordCenter; WCoordType planeNormal = vtkm::Cross(polygonNormal, vecInPlane); - typename WCoordType::ComponentType planeOffset = - vtkm::dot(planeNormal,wcoordCenter); - if (vtkm::dot(planeNormal,wcoords) < planeOffset) + typename WCoordType::ComponentType planeOffset = vtkm::dot(planeNormal, wcoordCenter); + if (vtkm::dot(planeNormal, wcoords) < planeOffset) { // wcoords on wrong side of plane, thus outside of triangle continue; } - secondPointIndex = firstPointIndex+1; + secondPointIndex = firstPointIndex + 1; vecInPlane = pointWCoords[secondPointIndex] - wcoordCenter; planeNormal = vtkm::Cross(polygonNormal, vecInPlane); - planeOffset = vtkm::dot(planeNormal,wcoordCenter); - if (vtkm::dot(planeNormal,wcoords) > planeOffset) + planeOffset = vtkm::dot(planeNormal, wcoordCenter); + if (vtkm::dot(planeNormal, wcoords) > planeOffset) { // wcoords on wrong side of plane, thus outside of triangle continue; @@ -861,94 +893,73 @@ WorldCoordinatesToParametricCoordinates( // wcoord was outside of all triangles we checked. It must be inside the // one triangle we did not check (the one between the first and last // polygon points). - firstPointIndex = numPoints-1; + firstPointIndex = numPoints - 1; secondPointIndex = 0; } // Build a structure containing the points of the triangle wcoords is in and // use the triangle version of this function to find the parametric // coordinates. - vtkm::Vec triangleWCoords; + vtkm::Vec triangleWCoords; triangleWCoords[0] = wcoordCenter; triangleWCoords[1] = pointWCoords[firstPointIndex]; triangleWCoords[2] = pointWCoords[secondPointIndex]; - WCoordType trianglePCoords = - WorldCoordinatesToParametricCoordinates(triangleWCoords, - wcoords, - vtkm::CellShapeTagTriangle(), - worklet); + WCoordType trianglePCoords = WorldCoordinatesToParametricCoordinates( + triangleWCoords, wcoords, vtkm::CellShapeTagTriangle(), worklet); // trianglePCoords is in the triangle's parameter space rather than the // polygon's parameter space. We can find the polygon's parameter space by // repurposing the ParametricCoordinatesToWorldCoordinates by using the // polygon parametric coordinates as a proxy for world coordinates. triangleWCoords[0] = WCoordType(0.5f, 0.5f, 0); - ParametricCoordinatesPoint(numPoints, - firstPointIndex, - triangleWCoords[1], - vtkm::CellShapeTagPolygon(), - worklet); - ParametricCoordinatesPoint(numPoints, - secondPointIndex, - triangleWCoords[2], - vtkm::CellShapeTagPolygon(), - worklet); - return ParametricCoordinatesToWorldCoordinates(triangleWCoords, - trianglePCoords, - vtkm::CellShapeTagTriangle(), - worklet); + ParametricCoordinatesPoint(numPoints, firstPointIndex, triangleWCoords[1], + vtkm::CellShapeTagPolygon(), worklet); + ParametricCoordinatesPoint(numPoints, secondPointIndex, triangleWCoords[2], + vtkm::CellShapeTagPolygon(), worklet); + return ParametricCoordinatesToWorldCoordinates(triangleWCoords, trianglePCoords, + vtkm::CellShapeTagTriangle(), worklet); } -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -WorldCoordinatesToParametricCoordinates( - const WorldCoordVector &pointWCoords, - const typename WorldCoordVector::ComponentType &wcoords, - vtkm::CellShapeTagQuad, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, + const typename WorldCoordVector::ComponentType& wcoords, + vtkm::CellShapeTagQuad, + const vtkm::exec::FunctorBase& worklet) { VTKM_ASSERT(pointWCoords.GetNumberOfComponents() == 4); typedef typename WorldCoordVector::ComponentType::ComponentType T; - typedef vtkm::Vec Vector2; - typedef vtkm::Vec Vector3; + typedef vtkm::Vec Vector2; + typedef vtkm::Vec Vector3; // We have an underdetermined system in 3D, so create a 2D space in the // plane that the polygon sits. - vtkm::exec::internal::Space2D space( - pointWCoords[0], pointWCoords[1], pointWCoords[3]); + vtkm::exec::internal::Space2D space(pointWCoords[0], pointWCoords[1], pointWCoords[3]); - Vector2 pcoords = - vtkm::NewtonsMethod( - detail::JacobianFunctorQuad(&pointWCoords, &space), - detail::CoordinatesFunctorQuad(&pointWCoords, &space, &worklet), - space.ConvertCoordToSpace(wcoords), - Vector2(0.5f, 0.5f)); + Vector2 pcoords = vtkm::NewtonsMethod( + detail::JacobianFunctorQuad(&pointWCoords, &space), + detail::CoordinatesFunctorQuad(&pointWCoords, &space, + &worklet), + space.ConvertCoordToSpace(wcoords), Vector2(0.5f, 0.5f)); return Vector3(pcoords[0], pcoords[1], 0); } -static inline VTKM_EXEC -vtkm::Vec -WorldCoordinatesToParametricCoordinates( - const vtkm::VecRectilinearPointCoordinates<2> &pointWCoords, - const vtkm::Vec &wcoords, - vtkm::CellShapeTagQuad, - const FunctorBase &) +static inline VTKM_EXEC vtkm::Vec WorldCoordinatesToParametricCoordinates( + const vtkm::VecRectilinearPointCoordinates<2>& pointWCoords, + const vtkm::Vec& wcoords, vtkm::CellShapeTagQuad, const FunctorBase&) { - return (wcoords - pointWCoords.GetOrigin())/pointWCoords.GetSpacing(); + return (wcoords - pointWCoords.GetOrigin()) / pointWCoords.GetSpacing(); } -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -WorldCoordinatesToParametricCoordinates( - const WorldCoordVector &pointWCoords, - const typename WorldCoordVector::ComponentType &wcoords, - vtkm::CellShapeTagTetra, - const vtkm::exec::FunctorBase &vtkmNotUsed(worklet)) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, + const typename WorldCoordVector::ComponentType& wcoords, + vtkm::CellShapeTagTetra, + const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) { VTKM_ASSERT(pointWCoords.GetNumberOfComponents() == 4); @@ -985,76 +996,62 @@ WorldCoordinatesToParametricCoordinates( const Vector3 coordVec = wcoords - pointWCoords[0]; Vector3 planeNormal = vtkm::Cross(vec1, vec2); - pcoords[0] = vtkm::dot(coordVec, planeNormal)/vtkm::dot(vec0, planeNormal); + pcoords[0] = vtkm::dot(coordVec, planeNormal) / vtkm::dot(vec0, planeNormal); planeNormal = vtkm::Cross(vec0, vec2); - pcoords[1] = vtkm::dot(coordVec, planeNormal)/vtkm::dot(vec1, planeNormal); + pcoords[1] = vtkm::dot(coordVec, planeNormal) / vtkm::dot(vec1, planeNormal); planeNormal = vtkm::Cross(vec0, vec1); - pcoords[2] = vtkm::dot(coordVec, planeNormal)/vtkm::dot(vec2, planeNormal); + pcoords[2] = vtkm::dot(coordVec, planeNormal) / vtkm::dot(vec2, planeNormal); return pcoords; } - -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -WorldCoordinatesToParametricCoordinates( - const WorldCoordVector &pointWCoords, - const typename WorldCoordVector::ComponentType &wcoords, - vtkm::CellShapeTagHexahedron, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, + const typename WorldCoordVector::ComponentType& wcoords, + vtkm::CellShapeTagHexahedron, + const vtkm::exec::FunctorBase& worklet) { VTKM_ASSERT(pointWCoords.GetNumberOfComponents() == 8); - return detail::WorldCoordinatesToParametricCoordinates3D( - pointWCoords, wcoords, vtkm::CellShapeTagHexahedron(), worklet); + return detail::WorldCoordinatesToParametricCoordinates3D(pointWCoords, wcoords, + vtkm::CellShapeTagHexahedron(), worklet); } -static inline VTKM_EXEC -vtkm::Vec -WorldCoordinatesToParametricCoordinates( - const vtkm::VecRectilinearPointCoordinates<3> &pointWCoords, - const vtkm::Vec &wcoords, - vtkm::CellShapeTagHexahedron, - const FunctorBase &) +static inline VTKM_EXEC vtkm::Vec WorldCoordinatesToParametricCoordinates( + const vtkm::VecRectilinearPointCoordinates<3>& pointWCoords, + const vtkm::Vec& wcoords, vtkm::CellShapeTagHexahedron, const FunctorBase&) { - return (wcoords - pointWCoords.GetOrigin())/pointWCoords.GetSpacing(); + return (wcoords - pointWCoords.GetOrigin()) / pointWCoords.GetSpacing(); } -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -WorldCoordinatesToParametricCoordinates( - const WorldCoordVector &pointWCoords, - const typename WorldCoordVector::ComponentType &wcoords, - vtkm::CellShapeTagWedge, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, + const typename WorldCoordVector::ComponentType& wcoords, + vtkm::CellShapeTagWedge, + const vtkm::exec::FunctorBase& worklet) { VTKM_ASSERT(pointWCoords.GetNumberOfComponents() == 6); - return detail::WorldCoordinatesToParametricCoordinates3D( - pointWCoords, wcoords, vtkm::CellShapeTagWedge(), worklet); + return detail::WorldCoordinatesToParametricCoordinates3D(pointWCoords, wcoords, + vtkm::CellShapeTagWedge(), worklet); } - -template -static inline VTKM_EXEC -typename WorldCoordVector::ComponentType -WorldCoordinatesToParametricCoordinates( - const WorldCoordVector &pointWCoords, - const typename WorldCoordVector::ComponentType &wcoords, - vtkm::CellShapeTagPyramid, - const vtkm::exec::FunctorBase &worklet) +template +static inline VTKM_EXEC typename WorldCoordVector::ComponentType +WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, + const typename WorldCoordVector::ComponentType& wcoords, + vtkm::CellShapeTagPyramid, + const vtkm::exec::FunctorBase& worklet) { VTKM_ASSERT(pointWCoords.GetNumberOfComponents() == 5); - return detail::WorldCoordinatesToParametricCoordinates3D( - pointWCoords, wcoords, vtkm::CellShapeTagPyramid(), worklet); + return detail::WorldCoordinatesToParametricCoordinates3D(pointWCoords, wcoords, + vtkm::CellShapeTagPyramid(), worklet); } - - } } // namespace vtkm::exec diff --git a/vtkm/exec/TaskBase.h b/vtkm/exec/TaskBase.h index 22f637602..0e3161efc 100644 --- a/vtkm/exec/TaskBase.h +++ b/vtkm/exec/TaskBase.h @@ -24,9 +24,10 @@ #include -namespace vtkm { -namespace exec { - +namespace vtkm +{ +namespace exec +{ /// Base class for all classes that are used to marshal data from the invocation /// parameters to the user worklets when invoked in the execution environment. @@ -35,7 +36,6 @@ namespace exec { class TaskBase { }; - } } // namespace vtkm::exec diff --git a/vtkm/exec/arg/AspectTagDefault.h b/vtkm/exec/arg/AspectTagDefault.h index 7b63c5b10..efa2e9b06 100644 --- a/vtkm/exec/arg/AspectTagDefault.h +++ b/vtkm/exec/arg/AspectTagDefault.h @@ -20,14 +20,18 @@ #ifndef vtk_m_exec_arg_AspectTagDefault_h #define vtk_m_exec_arg_AspectTagDefault_h -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Aspect tag to use for default load/store of data. /// -struct AspectTagDefault { }; - +struct AspectTagDefault +{ +}; } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/BasicArg.h b/vtkm/exec/arg/BasicArg.h index 96d84b9af..4017bd2d5 100644 --- a/vtkm/exec/arg/BasicArg.h +++ b/vtkm/exec/arg/BasicArg.h @@ -25,9 +25,12 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief The underlying tag for basic \c ExecutionSignature arguments. /// @@ -35,13 +38,12 @@ namespace arg { /// subclasses of \c BasicArg. They all make available the components of /// this class. /// -template +template struct BasicArg : vtkm::exec::arg::ExecutionSignatureTagBase { static const vtkm::IdComponent INDEX = ControlSignatureIndex; typedef vtkm::exec::arg::AspectTagDefault AspectTag; }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/CellShape.h b/vtkm/exec/arg/CellShape.h index 222bd9b7e..05cee32e2 100644 --- a/vtkm/exec/arg/CellShape.h +++ b/vtkm/exec/arg/CellShape.h @@ -24,16 +24,21 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Aspect tag to use for getting the cell shape. /// /// The \c AspectTagCellShape aspect tag causes the \c Fetch class to /// obtain the type of element (e.g. cell cell) from the topology object. /// -struct AspectTagCellShape { }; +struct AspectTagCellShape +{ +}; /// \brief The \c ExecutionSignature tag to use to get the cell shape. /// @@ -43,35 +48,27 @@ struct CellShape : vtkm::exec::arg::ExecutionSignatureTagBase typedef vtkm::exec::arg::AspectTagCellShape AspectTag; }; -template -struct Fetch, - ExecObjectType> +template +struct Fetch, ExecObjectType> { - typedef vtkm::exec::arg::ThreadIndicesTopologyMap - ThreadIndicesType; + typedef vtkm::exec::arg::ThreadIndicesTopologyMap ThreadIndicesType; typedef typename ThreadIndicesType::CellShapeTag ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Load(const ThreadIndicesType &indices, const ExecObjectType &) const + ValueType Load(const ThreadIndicesType& indices, const ExecObjectType&) const { return indices.GetCellShape(); } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/ExecutionSignatureTagBase.h b/vtkm/exec/arg/ExecutionSignatureTagBase.h index 0a0f04d60..bcf99c334 100644 --- a/vtkm/exec/arg/ExecutionSignatureTagBase.h +++ b/vtkm/exec/arg/ExecutionSignatureTagBase.h @@ -25,9 +25,12 @@ #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief The base class for all tags used in an \c ExecutionSignature. /// @@ -41,17 +44,18 @@ namespace arg { /// that points to a parameter in the \c ControlSignature and a \c typedef /// named \c AspectTag that defines the aspect of the fetch. /// -struct ExecutionSignatureTagBase { }; +struct ExecutionSignatureTagBase +{ +}; -namespace internal { +namespace internal +{ -template +template struct ExecutionSignatureTagCheck { static const bool Valid = - std::is_base_of< - vtkm::exec::arg::ExecutionSignatureTagBase, ExecutionSignatureTag>:: - value; + std::is_base_of::value; }; } // namespace internal @@ -61,11 +65,9 @@ struct ExecutionSignatureTagCheck /// that a template argument is actually an \c ExecutionSignature tag. (You can /// get weird errors elsewhere in the code when a mistake is made.) /// -#define VTKM_IS_EXECUTION_SIGNATURE_TAG(tag) \ - VTKM_STATIC_ASSERT_MSG( \ - ::vtkm::exec::arg::internal::ExecutionSignatureTagCheck::Valid, \ - "Provided a type that is not a valid ExecutionSignature tag.") - +#define VTKM_IS_EXECUTION_SIGNATURE_TAG(tag) \ + VTKM_STATIC_ASSERT_MSG(::vtkm::exec::arg::internal::ExecutionSignatureTagCheck::Valid, \ + "Provided a type that is not a valid ExecutionSignature tag.") } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/Fetch.h b/vtkm/exec/arg/Fetch.h index 288998512..765495b96 100644 --- a/vtkm/exec/arg/Fetch.h +++ b/vtkm/exec/arg/Fetch.h @@ -22,9 +22,12 @@ #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Class for loading and storing values in thread instance. /// @@ -52,10 +55,8 @@ namespace arg { /// ExecutionSignature with a particular aspect is pointing to the wrong /// argument or an invalid argument in the ControlSignature. /// -template +template struct Fetch #ifdef VTKM_DOXYGEN_ONLY { @@ -76,8 +77,7 @@ struct Fetch /// write-only fetch), this method can be a no-op and return any value. /// VTKM_EXEC - ValueType Load(const ThreadIndicesType &indices, - const ExecObjectType &execObject) const; + ValueType Load(const ThreadIndicesType& indices, const ExecObjectType& execObject) const; /// \brief Store data from a work instance. /// @@ -89,14 +89,12 @@ struct Fetch /// fetch), this method can be a no-op. /// VTKM_EXEC - void Store(const ThreadIndicesType &indices, - const ExecObjectType &execObject, - const ValueType &value) const; + void Store(const ThreadIndicesType& indices, const ExecObjectType& execObject, + const ValueType& value) const; }; -#else // VTKM_DOXYGEN_ONLY - ; +#else // VTKM_DOXYGEN_ONLY + ; #endif // VTKM_DOXYGEN_ONLY - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/FetchTagArrayDirectIn.h b/vtkm/exec/arg/FetchTagArrayDirectIn.h index d8140d492..e41f78adc 100644 --- a/vtkm/exec/arg/FetchTagArrayDirectIn.h +++ b/vtkm/exec/arg/FetchTagArrayDirectIn.h @@ -23,9 +23,12 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief \c Fetch tag for getting array values with direct indexing. /// @@ -33,35 +36,29 @@ namespace arg { /// values from an array portal. The fetch uses direct indexing, so the thread /// index given to \c Load is used as the index into the array. /// -struct FetchTagArrayDirectIn { }; +struct FetchTagArrayDirectIn +{ +}; - -template -struct Fetch< - vtkm::exec::arg::FetchTagArrayDirectIn, - vtkm::exec::arg::AspectTagDefault, - ThreadIndicesType, - ExecObjectType> +template +struct Fetch { typedef typename ExecObjectType::ValueType ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Load(const ThreadIndicesType &indices, - const ExecObjectType &arrayPortal) const + ValueType Load(const ThreadIndicesType& indices, const ExecObjectType& arrayPortal) const { return arrayPortal.Get(indices.GetInputIndex()); } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op for this fetch. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/FetchTagArrayDirectInOut.h b/vtkm/exec/arg/FetchTagArrayDirectInOut.h index 4d51b9826..404cedd68 100644 --- a/vtkm/exec/arg/FetchTagArrayDirectInOut.h +++ b/vtkm/exec/arg/FetchTagArrayDirectInOut.h @@ -23,9 +23,12 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief \c Fetch tag for in-place modifying array values with direct indexing. /// @@ -43,36 +46,31 @@ namespace arg { /// have to worry about writes stomping on each other (which they would /// inevitably do if index as input). /// -struct FetchTagArrayDirectInOut { }; +struct FetchTagArrayDirectInOut +{ +}; - -template -struct Fetch< - vtkm::exec::arg::FetchTagArrayDirectInOut, - vtkm::exec::arg::AspectTagDefault, - ThreadIndicesType, - ExecObjectType> +template +struct Fetch { typedef typename ExecObjectType::ValueType ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Load(const ThreadIndicesType &indices, - const ExecObjectType &arrayPortal) const + ValueType Load(const ThreadIndicesType& indices, const ExecObjectType& arrayPortal) const { return arrayPortal.Get(indices.GetOutputIndex()); } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - void Store(const ThreadIndicesType &indices, - const ExecObjectType &arrayPortal, - const ValueType &value) const + void Store(const ThreadIndicesType& indices, const ExecObjectType& arrayPortal, + const ValueType& value) const { arrayPortal.Set(indices.GetOutputIndex(), value); } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/FetchTagArrayDirectOut.h b/vtkm/exec/arg/FetchTagArrayDirectOut.h index 15eda7cab..d4553c6db 100644 --- a/vtkm/exec/arg/FetchTagArrayDirectOut.h +++ b/vtkm/exec/arg/FetchTagArrayDirectOut.h @@ -23,9 +23,12 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief \c Fetch tag for setting array values with direct indexing. /// @@ -33,21 +36,19 @@ namespace arg { /// values in an array portal. The fetch uses direct indexing, so the thread /// index given to \c Store is used as the index into the array. /// -struct FetchTagArrayDirectOut { }; +struct FetchTagArrayDirectOut +{ +}; - -template -struct Fetch< - vtkm::exec::arg::FetchTagArrayDirectOut, - vtkm::exec::arg::AspectTagDefault, - ThreadIndicesType, - ExecObjectType> +template +struct Fetch { typedef typename ExecObjectType::ValueType ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Load(const ThreadIndicesType &, const ExecObjectType &) const + ValueType Load(const ThreadIndicesType&, const ExecObjectType&) const { // Load is a no-op for this fetch. return ValueType(); @@ -55,14 +56,12 @@ struct Fetch< VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - void Store(const ThreadIndicesType &indices, - const ExecObjectType &arrayPortal, - const ValueType &value) const + void Store(const ThreadIndicesType& indices, const ExecObjectType& arrayPortal, + const ValueType& value) const { arrayPortal.Set(indices.GetOutputIndex(), value); } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h b/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h index afaa27f44..374532eb3 100644 --- a/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h +++ b/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h @@ -33,9 +33,12 @@ #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief \c Fetch tag for getting array values determined by topology connections. /// @@ -43,9 +46,12 @@ namespace arg { /// retreive values from an array portal. The fetch uses indexing based on /// the topology structure used for the input domain. /// -struct FetchTagArrayTopologyMapIn { }; +struct FetchTagArrayTopologyMapIn +{ +}; -namespace detail { +namespace detail +{ // This internal class defines how a TopologyMapIn fetch loads from field data // based on the connectivity class and the object holding the field data. The @@ -55,11 +61,10 @@ namespace detail { // and the field is regular point coordinates, it is much faster to compute the // field directly. -template +template struct FetchArrayTopologyMapInImplementation { - typedef vtkm::exec::arg::ThreadIndicesTopologyMap - ThreadIndicesType; + typedef vtkm::exec::arg::ThreadIndicesTopologyMap ThreadIndicesType; // ThreadIndicesTopologyMap has special "from" indices that are stored in a // Vec-like object. @@ -68,12 +73,11 @@ struct FetchArrayTopologyMapInImplementation // The FieldExecObjectType is expected to behave like an ArrayPortal. typedef FieldExecObjectType PortalType; - using ValueType = vtkm::VecFromPortalPermute; + using ValueType = vtkm::VecFromPortalPermute; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - static ValueType Load(const ThreadIndicesType &indices, - const FieldExecObjectType &field) + static ValueType Load(const ThreadIndicesType& indices, const FieldExecObjectType& field) { // It is important that we give the VecFromPortalPermute (ValueType) a // pointer that will stay around during the time the Vec is valid. Thus, we @@ -83,113 +87,91 @@ struct FetchArrayTopologyMapInImplementation } }; -static inline VTKM_EXEC -vtkm::VecRectilinearPointCoordinates<1> -make_VecRectilinearPointCoordinates( - const vtkm::Vec &origin, - const vtkm::Vec &spacing, - const vtkm::Vec &logicalId) +static inline VTKM_EXEC vtkm::VecRectilinearPointCoordinates<1> make_VecRectilinearPointCoordinates( + const vtkm::Vec& origin, const vtkm::Vec& spacing, + const vtkm::Vec& logicalId) { - vtkm::Vec offsetOrigin( - origin[0] + spacing[0]*static_cast(logicalId[0]), - origin[1], - origin[2]); + vtkm::Vec offsetOrigin( + origin[0] + spacing[0] * static_cast(logicalId[0]), origin[1], origin[2]); return vtkm::VecRectilinearPointCoordinates<1>(offsetOrigin, spacing); } -static inline VTKM_EXEC -vtkm::VecRectilinearPointCoordinates<1> -make_VecRectilinearPointCoordinates( - const vtkm::Vec &origin, - const vtkm::Vec &spacing, - vtkm::Id logicalId) +static inline VTKM_EXEC vtkm::VecRectilinearPointCoordinates<1> make_VecRectilinearPointCoordinates( + const vtkm::Vec& origin, const vtkm::Vec& spacing, + vtkm::Id logicalId) { - return make_VecRectilinearPointCoordinates( - origin, spacing, vtkm::Vec(logicalId)); + return make_VecRectilinearPointCoordinates(origin, spacing, vtkm::Vec(logicalId)); } -static inline VTKM_EXEC -vtkm::VecRectilinearPointCoordinates<2> -make_VecRectilinearPointCoordinates( - const vtkm::Vec &origin, - const vtkm::Vec &spacing, - const vtkm::Vec &logicalId) +static inline VTKM_EXEC vtkm::VecRectilinearPointCoordinates<2> make_VecRectilinearPointCoordinates( + const vtkm::Vec& origin, const vtkm::Vec& spacing, + const vtkm::Vec& logicalId) { - vtkm::Vec offsetOrigin( - origin[0] + spacing[0]*static_cast(logicalId[0]), - origin[1] + spacing[1]*static_cast(logicalId[1]), - origin[2]); + vtkm::Vec offsetOrigin( + origin[0] + spacing[0] * static_cast(logicalId[0]), + origin[1] + spacing[1] * static_cast(logicalId[1]), origin[2]); return vtkm::VecRectilinearPointCoordinates<2>(offsetOrigin, spacing); } -static inline VTKM_EXEC -vtkm::VecRectilinearPointCoordinates<3> -make_VecRectilinearPointCoordinates( - const vtkm::Vec &origin, - const vtkm::Vec &spacing, - const vtkm::Vec &logicalId) +static inline VTKM_EXEC vtkm::VecRectilinearPointCoordinates<3> make_VecRectilinearPointCoordinates( + const vtkm::Vec& origin, const vtkm::Vec& spacing, + const vtkm::Vec& logicalId) { - vtkm::Vec offsetOrigin( - origin[0] + spacing[0]*static_cast(logicalId[0]), - origin[1] + spacing[1]*static_cast(logicalId[1]), - origin[2] + spacing[2]*static_cast(logicalId[2])); + vtkm::Vec offsetOrigin( + origin[0] + spacing[0] * static_cast(logicalId[0]), + origin[1] + spacing[1] * static_cast(logicalId[1]), + origin[2] + spacing[2] * static_cast(logicalId[2])); return vtkm::VecRectilinearPointCoordinates<3>(offsetOrigin, spacing); } -template +template struct FetchArrayTopologyMapInImplementation< - vtkm::exec::ConnectivityStructured, - vtkm::internal::ArrayPortalUniformPointCoordinates> + vtkm::exec::ConnectivityStructured, + vtkm::internal::ArrayPortalUniformPointCoordinates> { typedef vtkm::exec::ConnectivityStructured ConnectivityType; - typedef vtkm::exec::arg::ThreadIndicesTopologyMap - ThreadIndicesType; + vtkm::TopologyElementTagCell, NumDimensions> + ConnectivityType; + typedef vtkm::exec::arg::ThreadIndicesTopologyMap ThreadIndicesType; typedef vtkm::VecRectilinearPointCoordinates ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - static ValueType Load( - const ThreadIndicesType &indices, - const vtkm::internal::ArrayPortalUniformPointCoordinates &field) + static ValueType Load(const ThreadIndicesType& indices, + const vtkm::internal::ArrayPortalUniformPointCoordinates& field) { // This works because the logical cell index is the same as the logical // point index of the first point on the cell. return vtkm::exec::arg::detail::make_VecRectilinearPointCoordinates( - field.GetOrigin(), - field.GetSpacing(), - indices.GetIndexLogical()); + field.GetOrigin(), field.GetSpacing(), indices.GetIndexLogical()); } }; -template +template struct FetchArrayTopologyMapInImplementation< - vtkm::exec::ConnectivityPermuted >, - vtkm::internal::ArrayPortalUniformPointCoordinates> + vtkm::exec::ConnectivityPermuted< + PermutationPortal, + vtkm::exec::ConnectivityStructured>, + vtkm::internal::ArrayPortalUniformPointCoordinates> { - typedef vtkm::exec::ConnectivityPermuted > ConnectivityType; - typedef vtkm::exec::arg::ThreadIndicesTopologyMap - ThreadIndicesType; + typedef vtkm::exec::ConnectivityPermuted< + PermutationPortal, + vtkm::exec::ConnectivityStructured> + ConnectivityType; + typedef vtkm::exec::arg::ThreadIndicesTopologyMap ThreadIndicesType; typedef vtkm::VecRectilinearPointCoordinates ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - static ValueType Load( - const ThreadIndicesType &indices, - const vtkm::internal::ArrayPortalUniformPointCoordinates &field) + static ValueType Load(const ThreadIndicesType& indices, + const vtkm::internal::ArrayPortalUniformPointCoordinates& field) { // This works because the logical cell index is the same as the logical // point index of the first point on the cell. @@ -197,46 +179,36 @@ struct FetchArrayTopologyMapInImplementation< // we have a flat index but we need 3d rectilinear coordiantes, so we // need to take an flat index and convert to logical index return vtkm::exec::arg::detail::make_VecRectilinearPointCoordinates( - field.GetOrigin(), - field.GetSpacing(), - indices.GetIndexLogical()); + field.GetOrigin(), field.GetSpacing(), indices.GetIndexLogical()); } }; } // namespace detail -template -struct Fetch< - vtkm::exec::arg::FetchTagArrayTopologyMapIn, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesTopologyMap, - ExecObjectType> +template +struct Fetch, ExecObjectType> { - typedef vtkm::exec::arg::ThreadIndicesTopologyMap - ThreadIndicesType; + typedef vtkm::exec::arg::ThreadIndicesTopologyMap ThreadIndicesType; - typedef detail::FetchArrayTopologyMapInImplementation< - ConnectivityType,ExecObjectType> Implementation; + typedef detail::FetchArrayTopologyMapInImplementation + Implementation; typedef typename Implementation::ValueType ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Load(const ThreadIndicesType &indices, - const ExecObjectType &field) const + ValueType Load(const ThreadIndicesType& indices, const ExecObjectType& field) const { return Implementation::Load(indices, field); } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op for this fetch. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/FetchTagCellSetIn.h b/vtkm/exec/arg/FetchTagCellSetIn.h index e768c0ca5..3e814a431 100644 --- a/vtkm/exec/arg/FetchTagCellSetIn.h +++ b/vtkm/exec/arg/FetchTagCellSetIn.h @@ -24,9 +24,12 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief \c Fetch tag for getting topology information. /// @@ -34,38 +37,31 @@ namespace arg { /// values from a topology object. This default parameter returns /// the basis topology type, i.e. cell type in a \c WorkletCellMap. /// -struct FetchTagCellSetIn { }; - - -template -struct Fetch< - vtkm::exec::arg::FetchTagCellSetIn, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesTopologyMap, - ExecObjectType> +struct FetchTagCellSetIn { - typedef vtkm::exec::arg::ThreadIndicesTopologyMap - ThreadIndicesType; +}; + +template +struct Fetch, ExecObjectType> +{ + typedef vtkm::exec::arg::ThreadIndicesTopologyMap ThreadIndicesType; typedef typename ThreadIndicesType::CellShapeTag ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Load(const ThreadIndicesType &indices, const ExecObjectType &) const + ValueType Load(const ThreadIndicesType& indices, const ExecObjectType&) const { return indices.GetCellShape(); } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op for this fetch. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/FetchTagExecObject.h b/vtkm/exec/arg/FetchTagExecObject.h index c3e35759b..c2cf9012a 100644 --- a/vtkm/exec/arg/FetchTagExecObject.h +++ b/vtkm/exec/arg/FetchTagExecObject.h @@ -27,9 +27,12 @@ #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief \c Fetch tag for execution objects. /// @@ -38,42 +41,38 @@ namespace arg { /// FetchTagExecObject is almost always used in conjunction with \c /// TransportTagExecObject and vice versa. /// -struct FetchTagExecObject { }; +struct FetchTagExecObject +{ +}; - -template -struct Fetch< - vtkm::exec::arg::FetchTagExecObject, - vtkm::exec::arg::AspectTagDefault, - ThreadIndicesType, - ExecObjectType> +template +struct Fetch { // If you get a compile error here, it means you tried to use an object that // is not an execution object as an argument that is expected to be one. All // execution objects are expected to inherit from // vtkm::exec::ExecutionObjectBase. - static_assert(std::is_base_of::value, - "All execution objects are expected to inherit from vtkm::exec::ExecutionObjectBase"); + static_assert( + std::is_base_of::value, + "All execution objects are expected to inherit from vtkm::exec::ExecutionObjectBase"); typedef ExecObjectType ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Load(const ThreadIndicesType &vtkmNotUsed(indices), - const ExecObjectType &execObject) const + ValueType Load(const ThreadIndicesType& vtkmNotUsed(indices), + const ExecObjectType& execObject) const { return execObject; } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op for this fetch. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/FetchTagKeysIn.h b/vtkm/exec/arg/FetchTagKeysIn.h index 362b4e360..f6e57fc4b 100644 --- a/vtkm/exec/arg/FetchTagKeysIn.h +++ b/vtkm/exec/arg/FetchTagKeysIn.h @@ -26,51 +26,47 @@ #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief \c Fetch tag for getting key values in a reduce by key. /// /// \c FetchTagKeysIn is a tag used with the \c Fetch class to retrieve keys /// from the input domain of a reduce by keys worklet. /// -struct FetchTagKeysIn { }; +struct FetchTagKeysIn +{ +}; -template +template struct Fetch< - vtkm::exec::arg::FetchTagKeysIn, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesReduceByKey, - vtkm::exec::internal::ReduceByKeyLookup< - KeyPortalType,IdPortalType,IdComponentPortalType> > + vtkm::exec::arg::FetchTagKeysIn, vtkm::exec::arg::AspectTagDefault, + vtkm::exec::arg::ThreadIndicesReduceByKey, + vtkm::exec::internal::ReduceByKeyLookup> { using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesReduceByKey; using ExecObjectType = - vtkm::exec::internal::ReduceByKeyLookup< - KeyPortalType,IdPortalType,IdComponentPortalType>; + vtkm::exec::internal::ReduceByKeyLookup; using ValueType = typename ExecObjectType::KeyType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Load(const ThreadIndicesType &indices, - const ExecObjectType &keys) const + ValueType Load(const ThreadIndicesType& indices, const ExecObjectType& keys) const { return keys.UniqueKeys.Get(indices.GetInputIndex()); } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op for this fetch. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/FetchTagWholeCellSetIn.h b/vtkm/exec/arg/FetchTagWholeCellSetIn.h index 4e4459801..592b6081d 100644 --- a/vtkm/exec/arg/FetchTagWholeCellSetIn.h +++ b/vtkm/exec/arg/FetchTagWholeCellSetIn.h @@ -27,42 +27,40 @@ #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief \c Fetch tag for whole cell sets. /// /// -struct FetchTagWholeCellSetIn { }; +struct FetchTagWholeCellSetIn +{ +}; - -template -struct Fetch< - vtkm::exec::arg::FetchTagWholeCellSetIn, - vtkm::exec::arg::AspectTagDefault, - ThreadIndicesType, - ExecObjectType> +template +struct Fetch { typedef ExecObjectType ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Load(const ThreadIndicesType &vtkmNotUsed(indices), - const ExecObjectType &execObject) const + ValueType Load(const ThreadIndicesType& vtkmNotUsed(indices), + const ExecObjectType& execObject) const { return execObject; } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op for this fetch. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/FromCount.h b/vtkm/exec/arg/FromCount.h index 07d1d98ed..1b0dd2c2c 100644 --- a/vtkm/exec/arg/FromCount.h +++ b/vtkm/exec/arg/FromCount.h @@ -24,16 +24,21 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Aspect tag to use for getting the from count. /// /// The \c AspectTagFromCount aspect tag causes the \c Fetch class to obtain /// the number of indices that map to the current topology element. /// -struct AspectTagFromCount { }; +struct AspectTagFromCount +{ +}; /// \brief The \c ExecutionSignature tag to get the number of from elements. /// @@ -49,35 +54,27 @@ struct FromCount : vtkm::exec::arg::ExecutionSignatureTagBase typedef vtkm::exec::arg::AspectTagFromCount AspectTag; }; -template -struct Fetch, - ExecObjectType> +template +struct Fetch, ExecObjectType> { - typedef vtkm::exec::arg::ThreadIndicesTopologyMap - ThreadIndicesType; + typedef vtkm::exec::arg::ThreadIndicesTopologyMap ThreadIndicesType; typedef vtkm::IdComponent ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Load(const ThreadIndicesType &indices, const ExecObjectType &) const + ValueType Load(const ThreadIndicesType& indices, const ExecObjectType&) const { return indices.GetIndicesFrom().GetNumberOfComponents(); } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/FromIndices.h b/vtkm/exec/arg/FromIndices.h index 73e723fb2..ffcbaa786 100644 --- a/vtkm/exec/arg/FromIndices.h +++ b/vtkm/exec/arg/FromIndices.h @@ -24,16 +24,21 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Aspect tag to use for getting the from indices. /// /// The \c AspectTagFromIndices aspect tag causes the \c Fetch class to obtain /// the indices that map to the current topology element. /// -struct AspectTagFromIndices { }; +struct AspectTagFromIndices +{ +}; /// \brief The \c ExecutionSignature tag to get the indices of from elements. /// @@ -49,35 +54,27 @@ struct FromIndices : vtkm::exec::arg::ExecutionSignatureTagBase typedef vtkm::exec::arg::AspectTagFromIndices AspectTag; }; -template -struct Fetch, - ExecObjectType> +template +struct Fetch, ExecObjectType> { - typedef vtkm::exec::arg::ThreadIndicesTopologyMap - ThreadIndicesType; + typedef vtkm::exec::arg::ThreadIndicesTopologyMap ThreadIndicesType; typedef typename ThreadIndicesType::IndicesFromType ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ValueType Load(const ThreadIndicesType &indices, const ExecObjectType &) const + ValueType Load(const ThreadIndicesType& indices, const ExecObjectType&) const { return indices.GetIndicesFrom(); } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/InputIndex.h b/vtkm/exec/arg/InputIndex.h index 732e5f74b..bf451dcde 100644 --- a/vtkm/exec/arg/InputIndex.h +++ b/vtkm/exec/arg/InputIndex.h @@ -23,9 +23,12 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Aspect tag to use for getting the work index. /// @@ -33,7 +36,9 @@ namespace arg { /// whatever data is in the associated execution object and return the index /// of the input element. /// -struct AspectTagInputIndex { }; +struct AspectTagInputIndex +{ +}; /// \brief The \c ExecutionSignature tag to use to get the input index /// @@ -55,29 +60,23 @@ struct InputIndex : vtkm::exec::arg::ExecutionSignatureTagBase typedef vtkm::exec::arg::AspectTagInputIndex AspectTag; }; -template -struct Fetch +template +struct Fetch { typedef vtkm::Id ValueType; VTKM_EXEC - vtkm::Id Load(const ThreadIndicesType &indices, const ExecObjectType &) const + vtkm::Id Load(const ThreadIndicesType& indices, const ExecObjectType&) const { return indices.GetInputIndex(); } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/OutputIndex.h b/vtkm/exec/arg/OutputIndex.h index 9f34904e4..0c9d9599f 100644 --- a/vtkm/exec/arg/OutputIndex.h +++ b/vtkm/exec/arg/OutputIndex.h @@ -23,9 +23,12 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Aspect tag to use for getting the work index. /// @@ -33,7 +36,9 @@ namespace arg { /// whatever data is in the associated execution object and return the index /// of the output element. /// -struct AspectTagOutputIndex { }; +struct AspectTagOutputIndex +{ +}; /// \brief The \c ExecutionSignature tag to use to get the output index /// @@ -55,29 +60,23 @@ struct OutputIndex : vtkm::exec::arg::ExecutionSignatureTagBase typedef vtkm::exec::arg::AspectTagOutputIndex AspectTag; }; -template -struct Fetch +template +struct Fetch { typedef vtkm::Id ValueType; VTKM_EXEC - vtkm::Id Load(const ThreadIndicesType &indices, const ExecObjectType &) const + vtkm::Id Load(const ThreadIndicesType& indices, const ExecObjectType&) const { return indices.GetOutputIndex(); } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/ThreadIndices.h b/vtkm/exec/arg/ThreadIndices.h index 60a16b22d..4efe91eb4 100644 --- a/vtkm/exec/arg/ThreadIndices.h +++ b/vtkm/exec/arg/ThreadIndices.h @@ -23,9 +23,12 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Aspect tag to use for getting the thread indices. /// @@ -33,7 +36,9 @@ namespace arg { /// ignore whatever data is in the associated execution object and return the /// thread indices. /// -struct AspectTagThreadIndices { }; +struct AspectTagThreadIndices +{ +}; /// \brief The \c ExecutionSignature tag to use to get the thread indices /// @@ -54,30 +59,23 @@ struct ThreadIndices : vtkm::exec::arg::ExecutionSignatureTagBase typedef vtkm::exec::arg::AspectTagThreadIndices AspectTag; }; -template -struct Fetch +template +struct Fetch { - typedef const ThreadIndicesType &ValueType; + typedef const ThreadIndicesType& ValueType; VTKM_EXEC - const ThreadIndicesType & - Load(const ThreadIndicesType &indices, const ExecObjectType &) const + const ThreadIndicesType& Load(const ThreadIndicesType& indices, const ExecObjectType&) const { return indices; } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ThreadIndicesType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ThreadIndicesType&) const { // Store is a no-op. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/ThreadIndicesBasic.h b/vtkm/exec/arg/ThreadIndicesBasic.h index 47ec20edd..9e7834501 100644 --- a/vtkm/exec/arg/ThreadIndicesBasic.h +++ b/vtkm/exec/arg/ThreadIndicesBasic.h @@ -22,9 +22,12 @@ #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Basic container for thread indices in a worklet invocation /// @@ -43,12 +46,12 @@ class ThreadIndicesBasic { public: VTKM_EXEC - ThreadIndicesBasic(vtkm::Id threadIndex, vtkm::Id inIndex, - vtkm::IdComponent visitIndex, vtkm::Id globalThreadIndexOffset=0) - : InputIndex(inIndex), - OutputIndex(threadIndex), - VisitIndex(visitIndex), - GlobalThreadIndexOffset(globalThreadIndexOffset) + ThreadIndicesBasic(vtkm::Id threadIndex, vtkm::Id inIndex, vtkm::IdComponent visitIndex, + vtkm::Id globalThreadIndexOffset = 0) + : InputIndex(inIndex) + , OutputIndex(threadIndex) + , VisitIndex(visitIndex) + , GlobalThreadIndexOffset(globalThreadIndexOffset) { } @@ -70,10 +73,7 @@ public: /// first component with the remaining components set to 0. /// VTKM_EXEC - vtkm::Id3 GetInputIndex3D() const - { - return vtkm::Id3(this->GetInputIndex(), 0, 0); - } + vtkm::Id3 GetInputIndex3D() const { return vtkm::Id3(this->GetInputIndex(), 0, 0); } /// \brief The index into the output domain. /// @@ -104,7 +104,6 @@ private: vtkm::IdComponent VisitIndex; vtkm::Id GlobalThreadIndexOffset; }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/ThreadIndicesReduceByKey.h b/vtkm/exec/arg/ThreadIndicesReduceByKey.h index 3ed24f016..9cdf94f73 100644 --- a/vtkm/exec/arg/ThreadIndicesReduceByKey.h +++ b/vtkm/exec/arg/ThreadIndicesReduceByKey.h @@ -24,9 +24,12 @@ #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Container for thread indices in a reduce by key invocation. /// @@ -40,36 +43,27 @@ class ThreadIndicesReduceByKey : public vtkm::exec::arg::ThreadIndicesBasic using Superclass = vtkm::exec::arg::ThreadIndicesBasic; public: - template - VTKM_EXEC - ThreadIndicesReduceByKey( - vtkm::Id threadIndex, - vtkm::Id inIndex, - vtkm::IdComponent visitIndex, - const vtkm::exec::internal::ReduceByKeyLookup &keyLookup, - vtkm::Id globalThreadIndexOffset=0) - : Superclass(threadIndex, inIndex, visitIndex, globalThreadIndexOffset), - ValueOffset(keyLookup.Offsets.Get(inIndex)), - NumberOfValues(keyLookup.Counts.Get(inIndex)) - { } - - VTKM_EXEC - vtkm::Id GetValueOffset() const + template + VTKM_EXEC ThreadIndicesReduceByKey( + vtkm::Id threadIndex, vtkm::Id inIndex, vtkm::IdComponent visitIndex, + const vtkm::exec::internal::ReduceByKeyLookup& keyLookup, + vtkm::Id globalThreadIndexOffset = 0) + : Superclass(threadIndex, inIndex, visitIndex, globalThreadIndexOffset) + , ValueOffset(keyLookup.Offsets.Get(inIndex)) + , NumberOfValues(keyLookup.Counts.Get(inIndex)) { - return this->ValueOffset; } VTKM_EXEC - vtkm::IdComponent GetNumberOfValues() const - { - return this->NumberOfValues; - } + vtkm::Id GetValueOffset() const { return this->ValueOffset; } + + VTKM_EXEC + vtkm::IdComponent GetNumberOfValues() const { return this->NumberOfValues; } private: vtkm::Id ValueOffset; vtkm::IdComponent NumberOfValues; }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/ThreadIndicesTopologyMap.h b/vtkm/exec/arg/ThreadIndicesTopologyMap.h index 8fc9c588b..6ef9e7708 100644 --- a/vtkm/exec/arg/ThreadIndicesTopologyMap.h +++ b/vtkm/exec/arg/ThreadIndicesTopologyMap.h @@ -22,27 +22,31 @@ #include -#include #include +#include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ -namespace detail { +namespace detail +{ /// Most cell shape tags have a default constructor, but the generic cell shape /// tag does not to prevent accidently losing the Id, which, unlike the other /// cell shapes, can vary. /// -template +template struct CellShapeInitializer { VTKM_EXEC_CONT static CellShapeTag GetDefault() { return CellShapeTag(); } }; -template<> +template <> struct CellShapeInitializer { VTKM_EXEC_CONT @@ -64,7 +68,7 @@ struct CellShapeInitializer /// This class is templated on the type that stores the connectivity (such /// as \c ConnectivityExplicit or \c ConnectivityStructured). /// -template +template class ThreadIndicesTopologyMap : public vtkm::exec::arg::ThreadIndicesBasic { typedef vtkm::exec::arg::ThreadIndicesBasic Superclass; @@ -74,16 +78,14 @@ public: using CellShapeTag = typename ConnectivityType::CellShapeTag; VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC - ThreadIndicesTopologyMap(vtkm::Id threadIndex, - const OutToInArrayType& outToIn, - const VisitArrayType& visit, - const ConnectivityType& connectivity, - vtkm::Id globalThreadIndexOffset=0) + template + VTKM_EXEC ThreadIndicesTopologyMap(vtkm::Id threadIndex, const OutToInArrayType& outToIn, + const VisitArrayType& visit, + const ConnectivityType& connectivity, + vtkm::Id globalThreadIndexOffset = 0) : Superclass(threadIndex, outToIn.Get(threadIndex), visit.Get(threadIndex), - globalThreadIndexOffset), - CellShape(detail::CellShapeInitializer::GetDefault()) + globalThreadIndexOffset) + , CellShape(detail::CellShapeInitializer::GetDefault()) { // The connectivity is stored in the invocation parameter at the given // input domain index. If this class is being used correctly, the type @@ -96,13 +98,11 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ThreadIndicesTopologyMap(vtkm::Id threadIndex, - vtkm::Id inIndex, - vtkm::IdComponent visitIndex, + ThreadIndicesTopologyMap(vtkm::Id threadIndex, vtkm::Id inIndex, vtkm::IdComponent visitIndex, const ConnectivityType& connectivity, - vtkm::Id globalThreadIndexOffset=0) - : Superclass(threadIndex, inIndex, visitIndex, globalThreadIndexOffset), - CellShape(detail::CellShapeInitializer::GetDefault()) + vtkm::Id globalThreadIndexOffset = 0) + : Superclass(threadIndex, inIndex, visitIndex, globalThreadIndexOffset) + , CellShape(detail::CellShapeInitializer::GetDefault()) { // The connectivity is stored in the invocation parameter at the given // input domain index. If this class is being used correctly, the type @@ -121,7 +121,7 @@ public: /// containing the indices to the "from" elements. /// VTKM_EXEC - const IndicesFromType &GetIndicesFrom() const { return this->IndicesFrom; } + const IndicesFromType& GetIndicesFrom() const { return this->IndicesFrom; } /// \brief The input indices of the "from" elements in pointer form. /// @@ -133,10 +133,7 @@ public: /// not go out of scope, at which time the returned pointer becomes invalid. /// VTKM_EXEC - const IndicesFromType *GetIndicesFromPointer() const - { - return &this->IndicesFrom; - } + const IndicesFromType* GetIndicesFromPointer() const { return &this->IndicesFrom; } /// \brief The shape of the input cell. /// @@ -153,38 +150,36 @@ private: CellShapeTag CellShape; }; -namespace detail { +namespace detail +{ // Helper function to increase an index to 3D. -static inline VTKM_EXEC -vtkm::Id3 InflateTo3D(vtkm::Id3 index) { return index; } - -static inline VTKM_EXEC -vtkm::Id3 InflateTo3D(vtkm::Id2 index) -{ - return vtkm::Id3(index[0], index[1], 0); -} - -static inline VTKM_EXEC -vtkm::Id3 InflateTo3D(vtkm::Vec index) -{ - return vtkm::Id3(index[0], 0, 0); -} - -static inline VTKM_EXEC -vtkm::Id3 InflateTo3D(vtkm::Id index) -{ - return vtkm::Id3(index, 0, 0); -} - -static inline VTKM_EXEC -vtkm::Id3 Deflate(const vtkm::Id3& index, vtkm::Id3) +static inline VTKM_EXEC vtkm::Id3 InflateTo3D(vtkm::Id3 index) { return index; } -static inline VTKM_EXEC -vtkm::Id2 Deflate(const vtkm::Id3& index, vtkm::Id2) +static inline VTKM_EXEC vtkm::Id3 InflateTo3D(vtkm::Id2 index) +{ + return vtkm::Id3(index[0], index[1], 0); +} + +static inline VTKM_EXEC vtkm::Id3 InflateTo3D(vtkm::Vec index) +{ + return vtkm::Id3(index[0], 0, 0); +} + +static inline VTKM_EXEC vtkm::Id3 InflateTo3D(vtkm::Id index) +{ + return vtkm::Id3(index, 0, 0); +} + +static inline VTKM_EXEC vtkm::Id3 Deflate(const vtkm::Id3& index, vtkm::Id3) +{ + return index; +} + +static inline VTKM_EXEC vtkm::Id2 Deflate(const vtkm::Id3& index, vtkm::Id2) { return vtkm::Id2(index[0], index[1]); } @@ -192,26 +187,22 @@ vtkm::Id2 Deflate(const vtkm::Id3& index, vtkm::Id2) } // namespace detail // Specialization for structured connectivity types. -template +template class ThreadIndicesTopologyMap< - vtkm::exec::ConnectivityStructured > + vtkm::exec::ConnectivityStructured> { - using ConnectivityType = vtkm::exec::ConnectivityStructured; + using ConnectivityType = vtkm::exec::ConnectivityStructured; public: using IndicesFromType = typename ConnectivityType::IndicesType; using CellShapeTag = typename ConnectivityType::CellShapeTag; using LogicalIndexType = typename ConnectivityType::SchedulingRangeType; - template - VTKM_EXEC - ThreadIndicesTopologyMap(vtkm::Id threadIndex, - const OutToInArrayType& outToIn, - const VisitArrayType& visit, - const ConnectivityType& connectivity, - vtkm::Id globalThreadIndexOffset=0) + template + VTKM_EXEC ThreadIndicesTopologyMap(vtkm::Id threadIndex, const OutToInArrayType& outToIn, + const VisitArrayType& visit, + const ConnectivityType& connectivity, + vtkm::Id globalThreadIndexOffset = 0) { this->InputIndex = outToIn.Get(threadIndex); @@ -223,19 +214,16 @@ public: this->GlobalThreadIndexOffset = globalThreadIndexOffset; } - template - VTKM_EXEC - ThreadIndicesTopologyMap(const vtkm::Id3& threadIndex, - const OutToInArrayType&, - const VisitArrayType& visit, - const ConnectivityType& connectivity, - const vtkm::Id globalThreadIndexOffset=0) + template + VTKM_EXEC ThreadIndicesTopologyMap(const vtkm::Id3& threadIndex, const OutToInArrayType&, + const VisitArrayType& visit, + const ConnectivityType& connectivity, + const vtkm::Id globalThreadIndexOffset = 0) { // We currently only support multidimensional indices on one-to-one input- // to-output mappings. (We don't have a use case otherwise.) // that is why the OutToInArrayType is ignored - const LogicalIndexType logicalIndex = - detail::Deflate(threadIndex, LogicalIndexType()); + const LogicalIndexType logicalIndex = detail::Deflate(threadIndex, LogicalIndexType()); const vtkm::Id index = connectivity.LogicalToFlatToIndex(logicalIndex); this->InputIndex = index; @@ -249,11 +237,9 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ThreadIndicesTopologyMap(vtkm::Id threadIndex, - vtkm::Id vtkmNotUsed(inIndex), - vtkm::IdComponent visitIndex, - const ConnectivityType& connectivity, - vtkm::Id globalThreadIndexOffset=0) + ThreadIndicesTopologyMap(vtkm::Id threadIndex, vtkm::Id vtkmNotUsed(inIndex), + vtkm::IdComponent visitIndex, const ConnectivityType& connectivity, + vtkm::Id globalThreadIndexOffset = 0) { this->InputIndex = threadIndex; this->OutputIndex = threadIndex; @@ -270,10 +256,7 @@ public: /// dimensions of the data. /// VTKM_EXEC - LogicalIndexType GetIndexLogical() const - { - return this->LogicalIndex; - } + LogicalIndexType GetIndexLogical() const { return this->LogicalIndex; } /// \brief The index into the input domain. /// @@ -282,10 +265,7 @@ public: /// fetches. /// VTKM_EXEC - vtkm::Id GetInputIndex() const - { - return this->InputIndex; - } + vtkm::Id GetInputIndex() const { return this->InputIndex; } /// \brief The 3D index into the input domain. /// @@ -293,10 +273,7 @@ public: /// for the input. /// VTKM_EXEC - vtkm::Id3 GetInputIndex3D() const - { - return detail::InflateTo3D(this->GetIndexLogical()); - } + vtkm::Id3 GetInputIndex3D() const { return detail::InflateTo3D(this->GetIndexLogical()); } /// \brief The index into the output domain. /// @@ -305,10 +282,7 @@ public: /// Fetch::Store. /// VTKM_EXEC - vtkm::Id GetOutputIndex() const - { - return this->OutputIndex; - } + vtkm::Id GetOutputIndex() const { return this->OutputIndex; } /// \brief The visit index. /// @@ -316,16 +290,10 @@ public: /// distinguished using the visit index. /// VTKM_EXEC - vtkm::IdComponent GetVisitIndex() const - { - return this->VisitIndex; - } + vtkm::IdComponent GetVisitIndex() const { return this->VisitIndex; } VTKM_EXEC - vtkm::Id GetGlobalIndex() const - { - return (this->GlobalThreadIndexOffset + this->OutputIndex); - } + vtkm::Id GetGlobalIndex() const { return (this->GlobalThreadIndexOffset + this->OutputIndex); } /// \brief The input indices of the "from" elements. /// @@ -335,7 +303,7 @@ public: /// containing the indices to the "from" elements. /// VTKM_EXEC - const IndicesFromType &GetIndicesFrom() const { return this->IndicesFrom; } + const IndicesFromType& GetIndicesFrom() const { return this->IndicesFrom; } /// \brief The input indices of the "from" elements in pointer form. /// @@ -347,10 +315,7 @@ public: /// not go out of scope, at which time the returned pointer becomes invalid. /// VTKM_EXEC - const IndicesFromType *GetIndicesFromPointer() const - { - return &this->IndicesFrom; - } + const IndicesFromType* GetIndicesFromPointer() const { return &this->IndicesFrom; } /// \brief The shape of the input cell. /// @@ -373,44 +338,31 @@ private: }; // Specialization for permuted structured connectivity types. -template -class ThreadIndicesTopologyMap< - vtkm::exec::ConnectivityPermuted > - > +template +class ThreadIndicesTopologyMap>> { - using PermutedConnectivityType = - vtkm::exec::ConnectivityPermuted - >; - using ConnectivityType = vtkm::exec::ConnectivityStructured; + using PermutedConnectivityType = vtkm::exec::ConnectivityPermuted< + PermutationPortal, vtkm::exec::ConnectivityStructured>; + using ConnectivityType = vtkm::exec::ConnectivityStructured; public: using IndicesFromType = typename ConnectivityType::IndicesType; using CellShapeTag = typename ConnectivityType::CellShapeTag; using LogicalIndexType = typename ConnectivityType::SchedulingRangeType; - template - VTKM_EXEC - ThreadIndicesTopologyMap(vtkm::Id threadIndex, - const OutToInArrayType& outToIn, - const VisitArrayType& visit, - const PermutedConnectivityType& permutation, - vtkm::Id globalThreadIndexOffset=0) + template + VTKM_EXEC ThreadIndicesTopologyMap(vtkm::Id threadIndex, const OutToInArrayType& outToIn, + const VisitArrayType& visit, + const PermutedConnectivityType& permutation, + vtkm::Id globalThreadIndexOffset = 0) { - this->InputIndex = outToIn.Get( threadIndex ); + this->InputIndex = outToIn.Get(threadIndex); this->OutputIndex = threadIndex; this->VisitIndex = visit.Get(threadIndex); - const vtkm::Id permutedIndex = permutation.Portal.Get( this->InputIndex ); + const vtkm::Id permutedIndex = permutation.Portal.Get(this->InputIndex); this->LogicalIndex = permutation.Connectivity.FlatToLogicalToIndex(permutedIndex); this->IndicesFrom = permutation.Connectivity.GetIndices(this->LogicalIndex); this->CellShape = permutation.Connectivity.GetCellShape(permutedIndex); @@ -419,17 +371,16 @@ public: VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - ThreadIndicesTopologyMap(vtkm::Id threadIndex, - vtkm::Id vtkmNotUsed(inIndex), + ThreadIndicesTopologyMap(vtkm::Id threadIndex, vtkm::Id vtkmNotUsed(inIndex), vtkm::IdComponent visitIndex, const PermutedConnectivityType& permutation, - vtkm::Id globalThreadIndexOffset=0) + vtkm::Id globalThreadIndexOffset = 0) { this->InputIndex = threadIndex; this->OutputIndex = threadIndex; this->VisitIndex = visitIndex; - const vtkm::Id permutedIndex = permutation.Portal.Get( this->InputIndex ); + const vtkm::Id permutedIndex = permutation.Portal.Get(this->InputIndex); this->LogicalIndex = permutation.Connectivity.FlatToLogicalToIndex(permutedIndex); this->IndicesFrom = permutation.Connectivity.GetIndices(this->LogicalIndex); this->CellShape = permutation.Connectivity.GetCellShape(permutedIndex); @@ -442,10 +393,7 @@ public: /// dimensions of the data. /// VTKM_EXEC - LogicalIndexType GetIndexLogical() const - { - return this->LogicalIndex; - } + LogicalIndexType GetIndexLogical() const { return this->LogicalIndex; } /// \brief The index into the input domain. /// @@ -454,10 +402,7 @@ public: /// fetches. /// VTKM_EXEC - vtkm::Id GetInputIndex() const - { - return this->InputIndex; - } + vtkm::Id GetInputIndex() const { return this->InputIndex; } /// \brief The 3D index into the input domain. /// @@ -465,10 +410,7 @@ public: /// for the input. /// VTKM_EXEC - vtkm::Id3 GetInputIndex3D() const - { - return detail::InflateTo3D(this->GetIndexLogical()); - } + vtkm::Id3 GetInputIndex3D() const { return detail::InflateTo3D(this->GetIndexLogical()); } /// \brief The index into the output domain. /// @@ -477,10 +419,7 @@ public: /// Fetch::Store. /// VTKM_EXEC - vtkm::Id GetOutputIndex() const - { - return this->OutputIndex; - } + vtkm::Id GetOutputIndex() const { return this->OutputIndex; } /// \brief The visit index. /// @@ -488,16 +427,10 @@ public: /// distinguished using the visit index. /// VTKM_EXEC - vtkm::IdComponent GetVisitIndex() const - { - return this->VisitIndex; - } + vtkm::IdComponent GetVisitIndex() const { return this->VisitIndex; } VTKM_EXEC - vtkm::Id GetGlobalIndex() const - { - return (this->GlobalThreadIndexOffset + this->OutputIndex); - } + vtkm::Id GetGlobalIndex() const { return (this->GlobalThreadIndexOffset + this->OutputIndex); } /// \brief The input indices of the "from" elements. /// @@ -507,7 +440,7 @@ public: /// containing the indices to the "from" elements. /// VTKM_EXEC - const IndicesFromType &GetIndicesFrom() const { return this->IndicesFrom; } + const IndicesFromType& GetIndicesFrom() const { return this->IndicesFrom; } /// \brief The input indices of the "from" elements in pointer form. /// @@ -519,10 +452,7 @@ public: /// not go out of scope, at which time the returned pointer becomes invalid. /// VTKM_EXEC - const IndicesFromType *GetIndicesFromPointer() const - { - return &this->IndicesFrom; - } + const IndicesFromType* GetIndicesFromPointer() const { return &this->IndicesFrom; } /// \brief The shape of the input cell. /// @@ -543,7 +473,6 @@ private: CellShapeTag CellShape; vtkm::Id GlobalThreadIndexOffset; }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/ValueCount.h b/vtkm/exec/arg/ValueCount.h index 5b5dbfff1..488c3f5c9 100644 --- a/vtkm/exec/arg/ValueCount.h +++ b/vtkm/exec/arg/ValueCount.h @@ -24,16 +24,21 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Aspect tag to use for getting the value count. /// /// The \c AspectTagValueCount aspect tag causes the \c Fetch class to obtain /// the number of values that map to the key. /// -struct AspectTagValueCount { }; +struct AspectTagValueCount +{ +}; /// \brief The \c ExecutionSignature tag to get the number of values. /// @@ -48,12 +53,9 @@ struct ValueCount : vtkm::exec::arg::ExecutionSignatureTagBase typedef vtkm::exec::arg::AspectTagValueCount AspectTag; }; -template -struct Fetch +template +struct Fetch { using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesReduceByKey; @@ -61,20 +63,17 @@ struct Fetch #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Aspect tag to use for getting the work index. /// @@ -33,7 +36,9 @@ namespace arg { /// whatever data is in the associated execution object and return the visit /// index. /// -struct AspectTagVisitIndex { }; +struct AspectTagVisitIndex +{ +}; /// \brief The \c ExecutionSignature tag to use to get the visit index /// @@ -56,30 +61,23 @@ struct VisitIndex : vtkm::exec::arg::ExecutionSignatureTagBase typedef vtkm::exec::arg::AspectTagVisitIndex AspectTag; }; -template -struct Fetch +template +struct Fetch { typedef vtkm::IdComponent ValueType; VTKM_EXEC - vtkm::IdComponent Load(const ThreadIndicesType &indices, - const ExecObjectType &) const + vtkm::IdComponent Load(const ThreadIndicesType& indices, const ExecObjectType&) const { return indices.GetVisitIndex(); } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/WorkIndex.h b/vtkm/exec/arg/WorkIndex.h index 1a17b6c01..ddb8e4869 100644 --- a/vtkm/exec/arg/WorkIndex.h +++ b/vtkm/exec/arg/WorkIndex.h @@ -23,16 +23,21 @@ #include #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Aspect tag to use for getting the work index. /// /// The \c AspectTagWorkIndex aspect tag causes the \c Fetch class to ignore /// whatever data is in the associated execution object and return the index. /// -struct AspectTagWorkIndex { }; +struct AspectTagWorkIndex +{ +}; /// \brief The \c ExecutionSignature tag to use to get the work index /// @@ -52,29 +57,23 @@ struct WorkIndex : vtkm::exec::arg::ExecutionSignatureTagBase typedef vtkm::exec::arg::AspectTagWorkIndex AspectTag; }; -template -struct Fetch +template +struct Fetch { typedef vtkm::Id ValueType; VTKM_EXEC - vtkm::Id Load(const ThreadIndicesType &indices, const ExecObjectType &) const + vtkm::Id Load(const ThreadIndicesType& indices, const ExecObjectType&) const { - return indices.GetGlobalIndex(); + return indices.GetGlobalIndex(); } VTKM_EXEC - void Store(const ThreadIndicesType &, - const ExecObjectType &, - const ValueType &) const + void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const { // Store is a no-op. } }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/testing/ThreadIndicesTesting.h b/vtkm/exec/arg/testing/ThreadIndicesTesting.h index 2e63213c3..9cc7f8237 100644 --- a/vtkm/exec/arg/testing/ThreadIndicesTesting.h +++ b/vtkm/exec/arg/testing/ThreadIndicesTesting.h @@ -22,9 +22,12 @@ #include -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ /// \brief Simplified version of ThreadIndices for unit testing purposes /// @@ -33,23 +36,25 @@ class ThreadIndicesTesting public: VTKM_EXEC_CONT ThreadIndicesTesting(vtkm::Id index) - : InputIndex(index), OutputIndex(index), VisitIndex(0) { } + : InputIndex(index) + , OutputIndex(index) + , VisitIndex(0) + { + } VTKM_EXEC_CONT - ThreadIndicesTesting(vtkm::Id inputIndex, - vtkm::Id outputIndex, - vtkm::IdComponent visitIndex) - : InputIndex(inputIndex), OutputIndex(outputIndex), VisitIndex(visitIndex) - { } + ThreadIndicesTesting(vtkm::Id inputIndex, vtkm::Id outputIndex, vtkm::IdComponent visitIndex) + : InputIndex(inputIndex) + , OutputIndex(outputIndex) + , VisitIndex(visitIndex) + { + } VTKM_EXEC_CONT vtkm::Id GetInputIndex() const { return this->InputIndex; } VTKM_EXEC_CONT - vtkm::Id3 GetInputIndex3D() const - { - return vtkm::Id3(this->GetInputIndex(), 0, 0); - } + vtkm::Id3 GetInputIndex3D() const { return vtkm::Id3(this->GetInputIndex(), 0, 0); } VTKM_EXEC_CONT vtkm::Id GetOutputIndex() const { return this->OutputIndex; } @@ -65,7 +70,6 @@ private: vtkm::Id OutputIndex; vtkm::IdComponent VisitIndex; }; - } } } // namespace vtkm::exec::arg diff --git a/vtkm/exec/arg/testing/UnitTestExecutionSignatureTag.cxx b/vtkm/exec/arg/testing/UnitTestExecutionSignatureTag.cxx index 14a7fd26f..dbcf1bcb3 100644 --- a/vtkm/exec/arg/testing/UnitTestExecutionSignatureTag.cxx +++ b/vtkm/exec/arg/testing/UnitTestExecutionSignatureTag.cxx @@ -23,30 +23,28 @@ #include -namespace { +namespace +{ void TestExecutionSignatures() { VTKM_IS_EXECUTION_SIGNATURE_TAG(vtkm::exec::arg::BasicArg<1>); VTKM_TEST_ASSERT( - vtkm::exec::arg::internal::ExecutionSignatureTagCheck< - vtkm::exec::arg::BasicArg<2> >::Valid, - "Bad check for BasicArg"); + vtkm::exec::arg::internal::ExecutionSignatureTagCheck>::Valid, + "Bad check for BasicArg"); VTKM_TEST_ASSERT( - vtkm::exec::arg::internal::ExecutionSignatureTagCheck< - vtkm::exec::arg::WorkIndex >::Valid, - "Bad check for WorkIndex"); + vtkm::exec::arg::internal::ExecutionSignatureTagCheck::Valid, + "Bad check for WorkIndex"); - VTKM_TEST_ASSERT( - !vtkm::exec::arg::internal::ExecutionSignatureTagCheck::Valid, - "Bad check for vtkm::Id"); + VTKM_TEST_ASSERT(!vtkm::exec::arg::internal::ExecutionSignatureTagCheck::Valid, + "Bad check for vtkm::Id"); } } // anonymous namespace -int UnitTestExecutionSignatureTag(int, char *[]) +int UnitTestExecutionSignatureTag(int, char* []) { return vtkm::testing::Testing::Run(TestExecutionSignatures); } diff --git a/vtkm/exec/arg/testing/UnitTestFetchArrayDirectIn.cxx b/vtkm/exec/arg/testing/UnitTestFetchArrayDirectIn.cxx index e57d93401..9b4fd2c2b 100644 --- a/vtkm/exec/arg/testing/UnitTestFetchArrayDirectIn.cxx +++ b/vtkm/exec/arg/testing/UnitTestFetchArrayDirectIn.cxx @@ -24,11 +24,12 @@ #include -namespace { +namespace +{ static const vtkm::Id ARRAY_SIZE = 10; -template +template struct TestPortal { typedef T ValueType; @@ -37,25 +38,25 @@ struct TestPortal vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; } VTKM_EXEC_CONT - ValueType Get(vtkm::Id index) const { + ValueType Get(vtkm::Id index) const + { VTKM_TEST_ASSERT(index >= 0, "Bad portal index."); VTKM_TEST_ASSERT(index < this->GetNumberOfValues(), "Bad portal index."); return TestValue(index, ValueType()); } }; -template +template struct FetchArrayDirectInTests { void operator()() { TestPortal execObject; - typedef vtkm::exec::arg::Fetch< - vtkm::exec::arg::FetchTagArrayDirectIn, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesTesting, - TestPortal > FetchType; + typedef vtkm::exec::arg::Fetch> + FetchType; FetchType fetch; @@ -64,21 +65,19 @@ struct FetchArrayDirectInTests vtkm::exec::arg::ThreadIndicesTesting indices(index); T value = fetch.Load(indices, execObject); - VTKM_TEST_ASSERT(test_equal(value, TestValue(index, T())), - "Got invalid value from Load."); + VTKM_TEST_ASSERT(test_equal(value, TestValue(index, T())), "Got invalid value from Load."); - value = T(T(2)*value); + value = T(T(2) * value); // This should be a no-op, but we should be able to call it. fetch.Store(indices, execObject, value); } } - }; struct TryType { - template + template void operator()(T) const { FetchArrayDirectInTests()(); @@ -92,7 +91,7 @@ void TestExecObjectFetch() } // anonymous namespace -int UnitTestFetchArrayDirectIn(int, char *[]) +int UnitTestFetchArrayDirectIn(int, char* []) { return vtkm::testing::Testing::Run(TestExecObjectFetch); } diff --git a/vtkm/exec/arg/testing/UnitTestFetchArrayDirectInOut.cxx b/vtkm/exec/arg/testing/UnitTestFetchArrayDirectInOut.cxx index 296a89080..1f8780411 100644 --- a/vtkm/exec/arg/testing/UnitTestFetchArrayDirectInOut.cxx +++ b/vtkm/exec/arg/testing/UnitTestFetchArrayDirectInOut.cxx @@ -24,13 +24,14 @@ #include -namespace { +namespace +{ static const vtkm::Id ARRAY_SIZE = 10; static vtkm::Id g_NumSets; -template +template struct TestPortal { typedef T ValueType; @@ -39,24 +40,25 @@ struct TestPortal vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; } VTKM_EXEC_CONT - ValueType Get(vtkm::Id index) const { + ValueType Get(vtkm::Id index) const + { VTKM_TEST_ASSERT(index >= 0, "Bad portal index."); VTKM_TEST_ASSERT(index < this->GetNumberOfValues(), "Bad portal index."); return TestValue(index, ValueType()); } VTKM_EXEC_CONT - void Set(vtkm::Id index, const ValueType &value) const { + void Set(vtkm::Id index, const ValueType& value) const + { VTKM_TEST_ASSERT(index >= 0, "Bad portal index."); VTKM_TEST_ASSERT(index < this->GetNumberOfValues(), "Bad portal index."); - VTKM_TEST_ASSERT( - test_equal(value, ValueType(2)*TestValue(index, ValueType())), - "Tried to set invalid value."); + VTKM_TEST_ASSERT(test_equal(value, ValueType(2) * TestValue(index, ValueType())), + "Tried to set invalid value."); g_NumSets++; } }; -template +template struct FetchArrayDirectInTests { @@ -64,11 +66,10 @@ struct FetchArrayDirectInTests { TestPortal execObject; - typedef vtkm::exec::arg::Fetch< - vtkm::exec::arg::FetchTagArrayDirectInOut, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesTesting, - TestPortal > FetchType; + typedef vtkm::exec::arg::Fetch> + FetchType; FetchType fetch; @@ -79,10 +80,9 @@ struct FetchArrayDirectInTests vtkm::exec::arg::ThreadIndicesTesting indices(index); T value = fetch.Load(indices, execObject); - VTKM_TEST_ASSERT(test_equal(value, TestValue(index, T())), - "Got invalid value from Load."); + VTKM_TEST_ASSERT(test_equal(value, TestValue(index, T())), "Got invalid value from Load."); - value = T(T(2)*value); + value = T(T(2) * value); fetch.Store(indices, execObject, value); } @@ -91,12 +91,11 @@ struct FetchArrayDirectInTests "Array portal's set not called correct number of times." "Store method must be wrong."); } - }; struct TryType { - template + template void operator()(T) const { FetchArrayDirectInTests()(); @@ -110,7 +109,7 @@ void TestExecObjectFetch() } // anonymous namespace -int UnitTestFetchArrayDirectInOut(int, char *[]) +int UnitTestFetchArrayDirectInOut(int, char* []) { return vtkm::testing::Testing::Run(TestExecObjectFetch); } diff --git a/vtkm/exec/arg/testing/UnitTestFetchArrayDirectOut.cxx b/vtkm/exec/arg/testing/UnitTestFetchArrayDirectOut.cxx index 30ae6f91b..c3dacccde 100644 --- a/vtkm/exec/arg/testing/UnitTestFetchArrayDirectOut.cxx +++ b/vtkm/exec/arg/testing/UnitTestFetchArrayDirectOut.cxx @@ -24,13 +24,14 @@ #include -namespace { +namespace +{ static const vtkm::Id ARRAY_SIZE = 10; static vtkm::Id g_NumSets; -template +template struct TestPortal { typedef T ValueType; @@ -39,7 +40,8 @@ struct TestPortal vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; } VTKM_EXEC_CONT - void Set(vtkm::Id index, const ValueType &value) const { + void Set(vtkm::Id index, const ValueType& value) const + { VTKM_TEST_ASSERT(index >= 0, "Bad portal index."); VTKM_TEST_ASSERT(index < this->GetNumberOfValues(), "Bad portal index."); VTKM_TEST_ASSERT(test_equal(value, TestValue(index, ValueType())), @@ -48,7 +50,7 @@ struct TestPortal } }; -template +template struct FetchArrayDirectOutTests { @@ -56,11 +58,10 @@ struct FetchArrayDirectOutTests { TestPortal execObject; - typedef vtkm::exec::arg::Fetch< - vtkm::exec::arg::FetchTagArrayDirectOut, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesTesting, - TestPortal > FetchType; + typedef vtkm::exec::arg::Fetch> + FetchType; FetchType fetch; @@ -83,12 +84,11 @@ struct FetchArrayDirectOutTests "Array portal's set not called correct number of times." "Store method must be wrong."); } - }; struct TryType { - template + template void operator()(T) const { FetchArrayDirectOutTests()(); @@ -102,7 +102,7 @@ void TestExecObjectFetch() } // anonymous namespace -int UnitTestFetchArrayDirectOut(int, char *[]) +int UnitTestFetchArrayDirectOut(int, char* []) { return vtkm::testing::Testing::Run(TestExecObjectFetch); } diff --git a/vtkm/exec/arg/testing/UnitTestFetchArrayTopologyMapIn.cxx b/vtkm/exec/arg/testing/UnitTestFetchArrayTopologyMapIn.cxx index 7d2486b4d..4f8b97891 100644 --- a/vtkm/exec/arg/testing/UnitTestFetchArrayTopologyMapIn.cxx +++ b/vtkm/exec/arg/testing/UnitTestFetchArrayTopologyMapIn.cxx @@ -27,11 +27,12 @@ #include -namespace { +namespace +{ static const vtkm::Id ARRAY_SIZE = 10; -template +template struct TestPortal { typedef T ValueType; @@ -40,7 +41,8 @@ struct TestPortal vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; } VTKM_EXEC_CONT - ValueType Get(vtkm::Id index) const { + ValueType Get(vtkm::Id index) const + { VTKM_TEST_ASSERT(index >= 0, "Bad portal index."); VTKM_TEST_ASSERT(index < this->GetNumberOfValues(), "Bad portal index."); return TestValue(index, ValueType()); @@ -63,225 +65,168 @@ struct TestZeroPortal ValueType Get(vtkm::Id) const { return 0; } }; -template +template struct FetchArrayTopologyMapInTests { - template - void TryInvocation(const Invocation &invocation) const + template + void TryInvocation(const Invocation& invocation) const { typedef typename Invocation::InputDomainType ConnectivityType; - typedef vtkm::exec::arg::ThreadIndicesTopologyMap - ThreadIndicesType; + typedef vtkm::exec::arg::ThreadIndicesTopologyMap ThreadIndicesType; - typedef vtkm::exec::arg::Fetch< - vtkm::exec::arg::FetchTagArrayTopologyMapIn, - vtkm::exec::arg::AspectTagDefault, - ThreadIndicesType, - TestPortal > FetchType; + typedef vtkm::exec::arg::Fetch> + FetchType; FetchType fetch; - ThreadIndicesType indices(0, - invocation.OutputToInputMap, - invocation.VisitArray, - invocation.GetInputDomain() - ); + ThreadIndicesType indices(0, invocation.OutputToInputMap, invocation.VisitArray, + invocation.GetInputDomain()); - typename FetchType::ValueType value = fetch.Load( - indices, invocation.Parameters.template GetParameter()); + typename FetchType::ValueType value = + fetch.Load(indices, invocation.Parameters.template GetParameter()); VTKM_TEST_ASSERT(value.GetNumberOfComponents() == 8, "Topology fetch got wrong number of components."); - VTKM_TEST_ASSERT(test_equal(value[0], TestValue(0, T())), - "Got invalid value from Load."); - VTKM_TEST_ASSERT(test_equal(value[1], TestValue(1, T())), - "Got invalid value from Load."); - VTKM_TEST_ASSERT(test_equal(value[2], TestValue(3, T())), - "Got invalid value from Load."); - VTKM_TEST_ASSERT(test_equal(value[3], TestValue(2, T())), - "Got invalid value from Load."); - VTKM_TEST_ASSERT(test_equal(value[4], TestValue(4, T())), - "Got invalid value from Load."); - VTKM_TEST_ASSERT(test_equal(value[5], TestValue(5, T())), - "Got invalid value from Load."); - VTKM_TEST_ASSERT(test_equal(value[6], TestValue(7, T())), - "Got invalid value from Load."); - VTKM_TEST_ASSERT(test_equal(value[7], TestValue(6, T())), - "Got invalid value from Load."); + VTKM_TEST_ASSERT(test_equal(value[0], TestValue(0, T())), "Got invalid value from Load."); + VTKM_TEST_ASSERT(test_equal(value[1], TestValue(1, T())), "Got invalid value from Load."); + VTKM_TEST_ASSERT(test_equal(value[2], TestValue(3, T())), "Got invalid value from Load."); + VTKM_TEST_ASSERT(test_equal(value[3], TestValue(2, T())), "Got invalid value from Load."); + VTKM_TEST_ASSERT(test_equal(value[4], TestValue(4, T())), "Got invalid value from Load."); + VTKM_TEST_ASSERT(test_equal(value[5], TestValue(5, T())), "Got invalid value from Load."); + VTKM_TEST_ASSERT(test_equal(value[6], TestValue(7, T())), "Got invalid value from Load."); + VTKM_TEST_ASSERT(test_equal(value[7], TestValue(6, T())), "Got invalid value from Load."); } void operator()() const { - std::cout << "Trying ArrayTopologyMapIn fetch on parameter " << ParamIndex - << " with type " << vtkm::testing::TypeName::Name() - << std::endl; + std::cout << "Trying ArrayTopologyMapIn fetch on parameter " << ParamIndex << " with type " + << vtkm::testing::TypeName::Name() << std::endl; - typedef vtkm::internal::FunctionInterface< - void(vtkm::internal::NullType, - vtkm::internal::NullType, - vtkm::internal::NullType, - vtkm::internal::NullType, - vtkm::internal::NullType)> - BaseFunctionInterface; + typedef vtkm::internal::FunctionInterface + BaseFunctionInterface; vtkm::internal::ConnectivityStructuredInternals<3> connectivityInternals; - connectivityInternals.SetPointDimensions(vtkm::Id3(2,2,2)); - vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagPoint,vtkm::TopologyElementTagCell,3> - connectivity(connectivityInternals); + connectivityInternals.SetPointDimensions(vtkm::Id3(2, 2, 2)); + vtkm::exec::ConnectivityStructured + connectivity(connectivityInternals); this->TryInvocation(vtkm::internal::make_Invocation( - BaseFunctionInterface() - .Replace(connectivity) - .template Replace(TestPortal()), - BaseFunctionInterface(), - BaseFunctionInterface(), - TestIndexPortal(), - TestZeroPortal())); + BaseFunctionInterface() + .Replace(connectivity) + .template Replace(TestPortal()), + BaseFunctionInterface(), BaseFunctionInterface(), TestIndexPortal(), TestZeroPortal())); } - }; struct TryType { - template + template void operator()(T) const { - FetchArrayTopologyMapInTests<3,1,T>()(); - FetchArrayTopologyMapInTests<1,2,T>()(); - FetchArrayTopologyMapInTests<2,3,T>()(); - FetchArrayTopologyMapInTests<1,4,T>()(); - FetchArrayTopologyMapInTests<1,5,T>()(); + FetchArrayTopologyMapInTests<3, 1, T>()(); + FetchArrayTopologyMapInTests<1, 2, T>()(); + FetchArrayTopologyMapInTests<2, 3, T>()(); + FetchArrayTopologyMapInTests<1, 4, T>()(); + FetchArrayTopologyMapInTests<1, 5, T>()(); } }; -template -void TryStructuredPointCoordinatesInvocation(const Invocation &invocation) +template +void TryStructuredPointCoordinatesInvocation(const Invocation& invocation) { typedef typename Invocation::InputDomainType ConnectivityType; - typedef vtkm::exec::arg::ThreadIndicesTopologyMap - ThreadIndicesType; + typedef vtkm::exec::arg::ThreadIndicesTopologyMap ThreadIndicesType; - vtkm::exec::arg::Fetch< - vtkm::exec::arg::FetchTagArrayTopologyMapIn, - vtkm::exec::arg::AspectTagDefault, - ThreadIndicesType, - vtkm::internal::ArrayPortalUniformPointCoordinates> fetch; + vtkm::exec::arg::Fetch + fetch; - vtkm::Vec origin = - TestValue(0, vtkm::Vec()); - vtkm::Vec spacing = - TestValue(1, vtkm::Vec()); + vtkm::Vec origin = TestValue(0, vtkm::Vec()); + vtkm::Vec spacing = TestValue(1, vtkm::Vec()); - vtkm::VecRectilinearPointCoordinates value = fetch.Load( - ThreadIndicesType(0, - invocation.OutputToInputMap, - invocation.VisitArray, - invocation.GetInputDomain()), - invocation.Parameters.template GetParameter()); + vtkm::VecRectilinearPointCoordinates value = + fetch.Load(ThreadIndicesType(0, invocation.OutputToInputMap, invocation.VisitArray, + invocation.GetInputDomain()), + invocation.Parameters.template GetParameter()); VTKM_TEST_ASSERT(test_equal(value.GetOrigin(), origin), "Bad origin."); VTKM_TEST_ASSERT(test_equal(value.GetSpacing(), spacing), "Bad spacing."); origin[0] += spacing[0]; - value = fetch.Load( - ThreadIndicesType(1, - invocation.OutputToInputMap, - invocation.VisitArray, - invocation.GetInputDomain()), - invocation.Parameters.template GetParameter()); + value = fetch.Load(ThreadIndicesType(1, invocation.OutputToInputMap, invocation.VisitArray, + invocation.GetInputDomain()), + invocation.Parameters.template GetParameter()); VTKM_TEST_ASSERT(test_equal(value.GetOrigin(), origin), "Bad origin."); VTKM_TEST_ASSERT(test_equal(value.GetSpacing(), spacing), "Bad spacing."); } -template +template void TryStructuredPointCoordinates( - const vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagPoint,vtkm::TopologyElementTagCell,NumDimensions> &connectivity, - const vtkm::internal::ArrayPortalUniformPointCoordinates &coordinates) + const vtkm::exec::ConnectivityStructured< + vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, NumDimensions>& connectivity, + const vtkm::internal::ArrayPortalUniformPointCoordinates& coordinates) { - typedef vtkm::internal::FunctionInterface< - void(vtkm::internal::NullType, - vtkm::internal::NullType, - vtkm::internal::NullType, - vtkm::internal::NullType, - vtkm::internal::NullType)> - BaseFunctionInterface; + typedef vtkm::internal::FunctionInterface + BaseFunctionInterface; // Try with topology in argument 1 and point coordinates in argument 2 - TryStructuredPointCoordinatesInvocation( - vtkm::internal::make_Invocation<1>( - BaseFunctionInterface() - .Replace<1>(connectivity) - .template Replace<2>(coordinates), - BaseFunctionInterface(), - BaseFunctionInterface(), - TestIndexPortal(), - TestZeroPortal()) - ); + TryStructuredPointCoordinatesInvocation(vtkm::internal::make_Invocation<1>( + BaseFunctionInterface().Replace<1>(connectivity).template Replace<2>(coordinates), + BaseFunctionInterface(), BaseFunctionInterface(), TestIndexPortal(), TestZeroPortal())); // Try again with topology in argument 3 and point coordinates in argument 1 - TryStructuredPointCoordinatesInvocation( - vtkm::internal::make_Invocation<3>( - BaseFunctionInterface() - .Replace<3>(connectivity) - .template Replace<1>(coordinates), - BaseFunctionInterface(), - BaseFunctionInterface(), - TestIndexPortal(), - TestZeroPortal()) - ); + TryStructuredPointCoordinatesInvocation(vtkm::internal::make_Invocation<3>( + BaseFunctionInterface().Replace<3>(connectivity).template Replace<1>(coordinates), + BaseFunctionInterface(), BaseFunctionInterface(), TestIndexPortal(), TestZeroPortal())); } void TryStructuredPointCoordinates() { - std::cout << "*** Fetching special case of uniform point coordinates. *****" - << std::endl; + std::cout << "*** Fetching special case of uniform point coordinates. *****" << std::endl; vtkm::internal::ArrayPortalUniformPointCoordinates coordinates( - vtkm::Id3(3,2,2), - TestValue(0, vtkm::Vec()), - TestValue(1, vtkm::Vec())); + vtkm::Id3(3, 2, 2), TestValue(0, vtkm::Vec()), + TestValue(1, vtkm::Vec())); std::cout << "3D" << std::endl; vtkm::internal::ConnectivityStructuredInternals<3> connectivityInternals3d; - connectivityInternals3d.SetPointDimensions(vtkm::Id3(3,2,2)); - vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, 3> - connectivity3d(connectivityInternals3d); + connectivityInternals3d.SetPointDimensions(vtkm::Id3(3, 2, 2)); + vtkm::exec::ConnectivityStructured + connectivity3d(connectivityInternals3d); TryStructuredPointCoordinates(connectivity3d, coordinates); std::cout << "2D" << std::endl; vtkm::internal::ConnectivityStructuredInternals<2> connectivityInternals2d; - connectivityInternals2d.SetPointDimensions(vtkm::Id2(3,2)); - vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, 2> - connectivity2d(connectivityInternals2d); + connectivityInternals2d.SetPointDimensions(vtkm::Id2(3, 2)); + vtkm::exec::ConnectivityStructured + connectivity2d(connectivityInternals2d); TryStructuredPointCoordinates(connectivity2d, coordinates); std::cout << "1D" << std::endl; vtkm::internal::ConnectivityStructuredInternals<1> connectivityInternals1d; connectivityInternals1d.SetPointDimensions(3); - vtkm::exec::ConnectivityStructured< - vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, 1> - connectivity1d(connectivityInternals1d); + vtkm::exec::ConnectivityStructured + connectivity1d(connectivityInternals1d); TryStructuredPointCoordinates(connectivity1d, coordinates); } void TestArrayTopologyMapIn() { - vtkm::testing::Testing::TryTypes(TryType(), - vtkm::TypeListTagCommon()); + vtkm::testing::Testing::TryTypes(TryType(), vtkm::TypeListTagCommon()); TryStructuredPointCoordinates(); } } // anonymous namespace -int UnitTestFetchArrayTopologyMapIn(int, char *[]) +int UnitTestFetchArrayTopologyMapIn(int, char* []) { return vtkm::testing::Testing::Run(TestArrayTopologyMapIn); } diff --git a/vtkm/exec/arg/testing/UnitTestFetchExecObject.cxx b/vtkm/exec/arg/testing/UnitTestFetchExecObject.cxx index 42a1df5fb..95ca5d568 100644 --- a/vtkm/exec/arg/testing/UnitTestFetchExecObject.cxx +++ b/vtkm/exec/arg/testing/UnitTestFetchExecObject.cxx @@ -28,12 +28,19 @@ #define EXPECTED_NUMBER 67 -namespace { +namespace +{ struct TestExecutionObject : public vtkm::exec::ExecutionObjectBase { - TestExecutionObject() : Number( static_cast(0xDEADDEAD) ) { } - TestExecutionObject(vtkm::Int32 number) : Number(number) { } + TestExecutionObject() + : Number(static_cast(0xDEADDEAD)) + { + } + TestExecutionObject(vtkm::Int32 number) + : Number(number) + { + } vtkm::Int32 Number; }; @@ -41,19 +48,17 @@ void TryInvocation() { TestExecutionObject execObjectStore(EXPECTED_NUMBER); - typedef vtkm::exec::arg::Fetch< - vtkm::exec::arg::FetchTagExecObject, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesTesting, - TestExecutionObject> FetchType; + typedef vtkm::exec::arg::Fetch + FetchType; FetchType fetch; vtkm::exec::arg::ThreadIndicesTesting indices(0); TestExecutionObject execObject = fetch.Load(indices, execObjectStore); - VTKM_TEST_ASSERT(execObject.Number == EXPECTED_NUMBER, - "Did not load object correctly."); + VTKM_TEST_ASSERT(execObject.Number == EXPECTED_NUMBER, "Did not load object correctly."); execObject.Number = -1; @@ -72,7 +77,7 @@ void TestExecObjectFetch() } // anonymous namespace -int UnitTestFetchExecObject(int, char *[]) +int UnitTestFetchExecObject(int, char* []) { return vtkm::testing::Testing::Run(TestExecObjectFetch); } diff --git a/vtkm/exec/arg/testing/UnitTestFetchWorkIndex.cxx b/vtkm/exec/arg/testing/UnitTestFetchWorkIndex.cxx index d93ed0b6e..3db72537c 100644 --- a/vtkm/exec/arg/testing/UnitTestFetchWorkIndex.cxx +++ b/vtkm/exec/arg/testing/UnitTestFetchWorkIndex.cxx @@ -26,17 +26,18 @@ #include -namespace { +namespace +{ void TestWorkIndexFetch() { std::cout << "Trying WorkIndex fetch." << std::endl; typedef vtkm::exec::arg::Fetch< - vtkm::exec::arg::FetchTagArrayDirectIn, // Not used but probably common. - vtkm::exec::arg::AspectTagWorkIndex, - vtkm::exec::arg::ThreadIndicesTesting, - vtkm::internal::NullType> FetchType; + vtkm::exec::arg::FetchTagArrayDirectIn, // Not used but probably common. + vtkm::exec::arg::AspectTagWorkIndex, vtkm::exec::arg::ThreadIndicesTesting, + vtkm::internal::NullType> + FetchType; FetchType fetch; @@ -45,8 +46,7 @@ void TestWorkIndexFetch() vtkm::exec::arg::ThreadIndicesTesting indices(index); vtkm::Id value = fetch.Load(indices, vtkm::internal::NullType()); - VTKM_TEST_ASSERT(value == index, - "Fetch did not give correct work index."); + VTKM_TEST_ASSERT(value == index, "Fetch did not give correct work index."); value++; @@ -57,7 +57,7 @@ void TestWorkIndexFetch() } // anonymous namespace -int UnitTestFetchWorkIndex(int, char *[]) +int UnitTestFetchWorkIndex(int, char* []) { return vtkm::testing::Testing::Run(TestWorkIndexFetch); } diff --git a/vtkm/exec/cuda/internal/ArrayPortalFromThrust.h b/vtkm/exec/cuda/internal/ArrayPortalFromThrust.h index bf5ceac9c..731f20457 100644 --- a/vtkm/exec/cuda/internal/ArrayPortalFromThrust.h +++ b/vtkm/exec/cuda/internal/ArrayPortalFromThrust.h @@ -30,251 +30,257 @@ VTKM_THIRDPARTY_PRE_INCLUDE #include VTKM_THIRDPARTY_POST_INCLUDE -namespace vtkm { -namespace exec { -namespace cuda { -namespace internal { +namespace vtkm +{ +namespace exec +{ +namespace cuda +{ +namespace internal +{ -template struct UseScalarTextureLoad : public std::false_type {}; -template struct UseVecTextureLoads : public std::false_type {}; -template struct UseMultipleScalarTextureLoads : public std::false_type {}; +// The clang-format rules want to put the curly braces on separate lines. Since +// these declarations are a type-level truth table, minimize the amount of +// space it takes up. +// clang-format off +template struct UseScalarTextureLoad : public std::false_type {}; +template struct UseVecTextureLoads : public std::false_type {}; +template struct UseMultipleScalarTextureLoads : public std::false_type {}; //currently CUDA doesn't support texture loading of signed char's so that is why //you don't see vtkm::Int8 in any of the lists. -template<> struct UseScalarTextureLoad< const vtkm::UInt8 > : std::true_type {}; -template<> struct UseScalarTextureLoad< const vtkm::Int16 > : std::true_type {}; -template<> struct UseScalarTextureLoad< const vtkm::UInt16 > : std::true_type {}; -template<> struct UseScalarTextureLoad< const vtkm::Int32 > : std::true_type {}; -template<> struct UseScalarTextureLoad< const vtkm::UInt32 > : std::true_type {}; -template<> struct UseScalarTextureLoad< const vtkm::Float32 > : std::true_type {}; -template<> struct UseScalarTextureLoad< const vtkm::Float64 > : std::true_type {}; +template <> struct UseScalarTextureLoad : std::true_type {}; +template <> struct UseScalarTextureLoad : std::true_type {}; +template <> struct UseScalarTextureLoad : std::true_type {}; +template <> struct UseScalarTextureLoad : std::true_type {}; +template <> struct UseScalarTextureLoad : std::true_type {}; +template <> struct UseScalarTextureLoad : std::true_type {}; +template <> struct UseScalarTextureLoad : std::true_type {}; //CUDA needs vec types converted to CUDA types ( float2, uint2), so we have a special //case for these vec texture loads. -template<> struct UseVecTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseVecTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseVecTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseVecTextureLoads< const vtkm::Vec > : std::true_type {}; - -template<> struct UseVecTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseVecTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseVecTextureLoads< const vtkm::Vec > : std::true_type {}; +template <> struct UseVecTextureLoads> : std::true_type {}; +template <> struct UseVecTextureLoads> : std::true_type {}; +template <> struct UseVecTextureLoads> : std::true_type {}; +template <> struct UseVecTextureLoads> : std::true_type {}; +template <> struct UseVecTextureLoads> : std::true_type {}; +template <> struct UseVecTextureLoads> : std::true_type {}; +template <> struct UseVecTextureLoads> : std::true_type {}; //CUDA doesn't support loading 3 wide values through a texture unit by default, //so instead we fetch through texture three times and store the result //currently CUDA doesn't support texture loading of signed char's so that is why //you don't see vtkm::Int8 in any of the lists. -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; - -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; -template<> struct UseMultipleScalarTextureLoads< const vtkm::Vec > : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +template <> struct UseMultipleScalarTextureLoads> : std::true_type {}; +// clang-format on //this T type is not one that is valid to be loaded through texture memory -template +template struct load_through_texture { static const vtkm::IdComponent WillUseTexture = 0; - __device__ - static T get(const thrust::system::cuda::pointer& data) + __device__ static T get(const thrust::system::cuda::pointer& data) { - return *(data.get()); + return *(data.get()); } }; //only load through a texture if we have sm 35 support // this T type is valid to be loaded through a single texture memory fetch -template -struct load_through_texture::value >::type > +template +struct load_through_texture::value>::type> { static const vtkm::IdComponent WillUseTexture = 1; - __device__ - static T get(const thrust::system::cuda::pointer& data) + __device__ static T get(const thrust::system::cuda::pointer& data) { - #if __CUDA_ARCH__ >= 350 +#if __CUDA_ARCH__ >= 350 // printf("__CUDA_ARCH__ UseScalarTextureLoad"); return __ldg(data.get()); - #else +#else return *(data.get()); - #endif +#endif } }; // this T type is valid to be loaded through a single vec texture memory fetch -template -struct load_through_texture::value >::type > +template +struct load_through_texture::value>::type> { static const vtkm::IdComponent WillUseTexture = 1; - __device__ - static T get(const thrust::system::cuda::pointer& data) + __device__ static T get(const thrust::system::cuda::pointer& data) { - #if __CUDA_ARCH__ >= 350 +#if __CUDA_ARCH__ >= 350 // printf("__CUDA_ARCH__ UseVecTextureLoads"); return getAs(data); - #else +#else return *(data.get()); - #endif +#endif } - __device__ - static vtkm::Vec getAs(const thrust::system::cuda::pointer >& data) + __device__ static vtkm::Vec getAs( + const thrust::system::cuda::pointer>& data) { - const int2 temp = __ldg((const int2*)data.get()); - return vtkm::Vec(temp.x, temp.y); + const int2 temp = __ldg((const int2*)data.get()); + return vtkm::Vec(temp.x, temp.y); } - __device__ - static vtkm::Vec getAs(const thrust::system::cuda::pointer >& data) + __device__ static vtkm::Vec getAs( + const thrust::system::cuda::pointer>& data) { - const uint2 temp = __ldg((const uint2*)data.get()); - return vtkm::Vec(temp.x, temp.y); + const uint2 temp = __ldg((const uint2*)data.get()); + return vtkm::Vec(temp.x, temp.y); } - __device__ - static vtkm::Vec getAs(const thrust::system::cuda::pointer >& data) + __device__ static vtkm::Vec getAs( + const thrust::system::cuda::pointer>& data) { - const int4 temp = __ldg((const int4*)data.get()); - return vtkm::Vec(temp.x, temp.y, temp.z, temp.w); + const int4 temp = __ldg((const int4*)data.get()); + return vtkm::Vec(temp.x, temp.y, temp.z, temp.w); } - __device__ - static vtkm::Vec getAs(const thrust::system::cuda::pointer >& data) + __device__ static vtkm::Vec getAs( + const thrust::system::cuda::pointer>& data) { - const uint4 temp = __ldg((const uint4*)data.get()); - return vtkm::Vec(temp.x, temp.y, temp.z, temp.w); + const uint4 temp = __ldg((const uint4*)data.get()); + return vtkm::Vec(temp.x, temp.y, temp.z, temp.w); } - __device__ - static vtkm::Vec getAs(const thrust::system::cuda::pointer >& data) + __device__ static vtkm::Vec getAs( + const thrust::system::cuda::pointer>& data) { - const float2 temp = __ldg((const float2*)data.get()); - return vtkm::Vec(temp.x, temp.y); + const float2 temp = __ldg((const float2*)data.get()); + return vtkm::Vec(temp.x, temp.y); } - __device__ - static vtkm::Vec getAs(const thrust::system::cuda::pointer >& data) + __device__ static vtkm::Vec getAs( + const thrust::system::cuda::pointer>& data) { - const float4 temp = __ldg((const float4*)data.get()); - return vtkm::Vec(temp.x, temp.y, temp.z, temp.w); + const float4 temp = __ldg((const float4*)data.get()); + return vtkm::Vec(temp.x, temp.y, temp.z, temp.w); } - __device__ - static vtkm::Vec getAs(const thrust::system::cuda::pointer >& data) + __device__ static vtkm::Vec getAs( + const thrust::system::cuda::pointer>& data) { - const double2 temp = __ldg((const double2*)data.get()); - return vtkm::Vec(temp.x, temp.y); + const double2 temp = __ldg((const double2*)data.get()); + return vtkm::Vec(temp.x, temp.y); } }; - //this T type is valid to be loaded through multiple texture memory fetches -template -struct load_through_texture::value >::type > +template +struct load_through_texture< + T, typename std::enable_if::value>::type> { static const vtkm::IdComponent WillUseTexture = 1; typedef typename std::remove_const::type NonConstT; - __device__ - static T get(const thrust::system::cuda::pointer& data) + __device__ static T get(const thrust::system::cuda::pointer& data) { - #if __CUDA_ARCH__ >= 350 - // printf("__CUDA_ARCH__ UseMultipleScalarTextureLoads"); +#if __CUDA_ARCH__ >= 350 + // printf("__CUDA_ARCH__ UseMultipleScalarTextureLoads"); return getAs(data); - #else +#else return *(data.get()); - #endif +#endif } - __device__ - static T getAs(const thrust::system::cuda::pointer& data) + __device__ static T getAs(const thrust::system::cuda::pointer& data) { - //we need to fetch each component individually - const vtkm::IdComponent NUM_COMPONENTS= T::NUM_COMPONENTS; - typedef typename T::ComponentType ComponentType; - const ComponentType* recasted_data = (const ComponentType*)(data.get()); - NonConstT result; - #pragma unroll - for(vtkm::IdComponent i=0; i < NUM_COMPONENTS; ++i) - { - result[i] = __ldg(recasted_data+i); - } - return result; + //we need to fetch each component individually + const vtkm::IdComponent NUM_COMPONENTS = T::NUM_COMPONENTS; + typedef typename T::ComponentType ComponentType; + const ComponentType* recasted_data = (const ComponentType*)(data.get()); + NonConstT result; +#pragma unroll + for (vtkm::IdComponent i = 0; i < NUM_COMPONENTS; ++i) + { + result[i] = __ldg(recasted_data + i); + } + return result; } }; -class ArrayPortalFromThrustBase {}; +class ArrayPortalFromThrustBase +{ +}; /// This templated implementation of an ArrayPortal allows you to adapt a pair /// of begin/end iterators to an ArrayPortal interface. /// -template +template class ArrayPortalFromThrust : public ArrayPortalFromThrustBase { public: typedef T ValueType; - typedef thrust::system::cuda::pointer< T > IteratorType; + typedef thrust::system::cuda::pointer IteratorType; - VTKM_EXEC_CONT ArrayPortalFromThrust() { } + VTKM_EXEC_CONT ArrayPortalFromThrust() {} VTKM_CONT - ArrayPortalFromThrust(thrust::system::cuda::pointer< T > begin, - thrust::system::cuda::pointer< T > end) - : BeginIterator( begin ), - EndIterator( end ) - { } + ArrayPortalFromThrust(thrust::system::cuda::pointer begin, + thrust::system::cuda::pointer end) + : BeginIterator(begin) + , EndIterator(end) + { + } /// Copy constructor for any other ArrayPortalFromThrust with an iterator /// type that can be copied to this iterator type. This allows us to do any /// type casting that the iterators do (like the non-const to const cast). /// - template - VTKM_EXEC_CONT - ArrayPortalFromThrust(const ArrayPortalFromThrust &src) - : BeginIterator(src.GetIteratorBegin()), - EndIterator(src.GetIteratorEnd()) - { } - - VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const { - // Not using std::distance because on CUDA it cannot be used on a device. - return static_cast( (this->EndIterator - this->BeginIterator) ); + template + VTKM_EXEC_CONT ArrayPortalFromThrust(const ArrayPortalFromThrust& src) + : BeginIterator(src.GetIteratorBegin()) + , EndIterator(src.GetIteratorEnd()) + { } VTKM_EXEC_CONT - ValueType Get(vtkm::Id index) const { - typedef typename ::thrust::iterator_traits::difference_type - SizeType; + vtkm::Id GetNumberOfValues() const + { + // Not using std::distance because on CUDA it cannot be used on a device. + return static_cast((this->EndIterator - this->BeginIterator)); + } + + VTKM_EXEC_CONT + ValueType Get(vtkm::Id index) const + { + typedef typename ::thrust::iterator_traits::difference_type SizeType; return *(this->BeginIterator + static_cast(index)); } VTKM_EXEC_CONT - void Set(vtkm::Id index, ValueType value) const { - typedef typename ::thrust::iterator_traits::difference_type - SizeType; + void Set(vtkm::Id index, ValueType value) const + { + typedef typename ::thrust::iterator_traits::difference_type SizeType; *(this->BeginIterator + static_cast(index)) = value; } @@ -289,21 +295,20 @@ private: IteratorType EndIterator; }; -template +template class ConstArrayPortalFromThrust : public ArrayPortalFromThrustBase { public: - typedef T ValueType; - typedef thrust::system::cuda::pointer< const T > IteratorType; + typedef thrust::system::cuda::pointer IteratorType; - VTKM_EXEC_CONT ConstArrayPortalFromThrust() { } + VTKM_EXEC_CONT ConstArrayPortalFromThrust() {} VTKM_CONT - ConstArrayPortalFromThrust(const thrust::system::cuda::pointer< const T > begin, - const thrust::system::cuda::pointer< const T > end) - : BeginIterator( begin ), - EndIterator( end ) + ConstArrayPortalFromThrust(const thrust::system::cuda::pointer begin, + const thrust::system::cuda::pointer end) + : BeginIterator(begin) + , EndIterator(end) { // printf("ConstArrayPortalFromThrust() %s \n", __PRETTY_FUNCTION__ ); } @@ -314,40 +319,39 @@ public: /// // template VTKM_EXEC_CONT - ConstArrayPortalFromThrust(const ArrayPortalFromThrust &src) - : BeginIterator(src.GetIteratorBegin()), - EndIterator(src.GetIteratorEnd()) + ConstArrayPortalFromThrust(const ArrayPortalFromThrust& src) + : BeginIterator(src.GetIteratorBegin()) + , EndIterator(src.GetIteratorEnd()) { } VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const { + vtkm::Id GetNumberOfValues() const + { // Not using std::distance because on CUDA it cannot be used on a device. - return static_cast( (this->EndIterator - this->BeginIterator) ); + return static_cast((this->EndIterator - this->BeginIterator)); } - //The __CUDA_ARCH__ define makes sure that the device only signature - //only shows up for the device compilation. This allows the nvcc compiler - //to have separate host and device code paths for the same method. This - //solves the problem of trying to call a device only method from a - //device/host method +//The __CUDA_ARCH__ define makes sure that the device only signature +//only shows up for the device compilation. This allows the nvcc compiler +//to have separate host and device code paths for the same method. This +//solves the problem of trying to call a device only method from a +//device/host method #if __CUDA_ARCH__ - __device__ - ValueType Get(vtkm::Id index) const { - return vtkm::exec::cuda::internal::load_through_texture::get( this->BeginIterator + index ); + __device__ ValueType Get(vtkm::Id index) const + { + return vtkm::exec::cuda::internal::load_through_texture::get(this->BeginIterator + + index); } - __device__ - void Set(vtkm::Id vtkmNotUsed(index), ValueType vtkmNotUsed(value)) const { - } + __device__ void Set(vtkm::Id vtkmNotUsed(index), ValueType vtkmNotUsed(value)) const {} #else - ValueType Get(vtkm::Id vtkmNotUsed(index) ) const { - return ValueType(); - } + ValueType Get(vtkm::Id vtkmNotUsed(index)) const { return ValueType(); } - void Set(vtkm::Id vtkmNotUsed(index), ValueType vtkmNotUsed(value)) const { -#if ! (defined(VTKM_MSVC) && defined(VTKM_CUDA)) + void Set(vtkm::Id vtkmNotUsed(index), ValueType vtkmNotUsed(value)) const + { +#if !(defined(VTKM_MSVC) && defined(VTKM_CUDA)) VTKM_ASSERT(true && "Cannot set to const array."); #endif } @@ -363,35 +367,34 @@ private: IteratorType BeginIterator; IteratorType EndIterator; }; - } } } } // namespace vtkm::exec::cuda::internal - -namespace vtkm { -namespace cont { +namespace vtkm +{ +namespace cont +{ /// Partial specialization of \c ArrayPortalToIterators for \c /// ArrayPortalFromThrust. Returns the original array rather than /// the portal wrapped in an \c IteratorFromArrayPortal. /// -template -class ArrayPortalToIterators< - vtkm::exec::cuda::internal::ArrayPortalFromThrust > +template +class ArrayPortalToIterators> { - typedef vtkm::exec::cuda::internal::ArrayPortalFromThrust - PortalType; -public: + typedef vtkm::exec::cuda::internal::ArrayPortalFromThrust PortalType; +public: typedef typename PortalType::IteratorType IteratorType; VTKM_CONT - ArrayPortalToIterators(const PortalType &portal) - : BIterator(portal.GetIteratorBegin()), - EIterator(portal.GetIteratorEnd()) - { } + ArrayPortalToIterators(const PortalType& portal) + : BIterator(portal.GetIteratorBegin()) + , EIterator(portal.GetIteratorEnd()) + { + } VTKM_CONT IteratorType GetBegin() const { return this->BIterator; } @@ -409,21 +412,20 @@ private: /// ConstArrayPortalFromThrust. Returns the original array rather than /// the portal wrapped in an \c IteratorFromArrayPortal. /// -template -class ArrayPortalToIterators< - vtkm::exec::cuda::internal::ConstArrayPortalFromThrust > +template +class ArrayPortalToIterators> { - typedef vtkm::exec::cuda::internal::ConstArrayPortalFromThrust - PortalType; -public: + typedef vtkm::exec::cuda::internal::ConstArrayPortalFromThrust PortalType; +public: typedef typename PortalType::IteratorType IteratorType; VTKM_CONT - ArrayPortalToIterators(const PortalType &portal) - : BIterator(portal.GetIteratorBegin()), - EIterator(portal.GetIteratorEnd()) - { } + ArrayPortalToIterators(const PortalType& portal) + : BIterator(portal.GetIteratorBegin()) + , EIterator(portal.GetIteratorEnd()) + { + } VTKM_CONT IteratorType GetBegin() const { return this->BIterator; } @@ -436,9 +438,7 @@ private: IteratorType EIterator; vtkm::Id NumberOfValues; }; - } } // namespace vtkm::cont - #endif //vtk_m_exec_cuda_internal_ArrayPortalFromThrust_h diff --git a/vtkm/exec/cuda/internal/ExecutionPolicy.h b/vtkm/exec/cuda/internal/ExecutionPolicy.h index 324ada129..95790f8bc 100644 --- a/vtkm/exec/cuda/internal/ExecutionPolicy.h +++ b/vtkm/exec/cuda/internal/ExecutionPolicy.h @@ -31,117 +31,97 @@ VTKM_THIRDPARTY_PRE_INCLUDE #include VTKM_THIRDPARTY_POST_INCLUDE - -struct vtkm_cuda_policy : thrust::device_execution_policy {}; - +struct vtkm_cuda_policy : thrust::device_execution_policy +{ +}; //Specialize the sort call for cuda pointers using less/greater operators. //The purpose of this is that for 32bit types (UInt32,Int32,Float32) thrust //will call a super fast radix sort only if the operator is thrust::less //or thrust::greater. -template -__host__ __device__ - void sort(const vtkm_cuda_policy &exec, - thrust::system::cuda::pointer first, - thrust::system::cuda::pointer last, - vtkm::exec::cuda::internal::WrappedBinaryPredicate comp) -{ //sort for concrete pointers and less than op - //this makes sure that we invoke the thrust radix sort and not merge sort - return thrust::sort(thrust::cuda::par, first, last, thrust::less()); -} - -template -__host__ __device__ - void sort_by_key(const vtkm_cuda_policy &exec, - thrust::system::cuda::pointer first, - thrust::system::cuda::pointer last, - RandomAccessIterator values_first, - vtkm::exec::cuda::internal::WrappedBinaryPredicate comp) -{ //sort for concrete pointers and less than op - //this makes sure that we invoke the thrust radix sort and not merge sort - return thrust::sort_by_key(thrust::cuda::par, first, last, values_first, thrust::less()); -} - -template -__host__ __device__ - void sort(const vtkm_cuda_policy &exec, - thrust::system::cuda::pointer first, - thrust::system::cuda::pointer last, - vtkm::exec::cuda::internal::WrappedBinaryPredicate > comp) +template +__host__ __device__ void sort( + const vtkm_cuda_policy& exec, thrust::system::cuda::pointer first, + thrust::system::cuda::pointer last, + vtkm::exec::cuda::internal::WrappedBinaryPredicate comp) { //sort for concrete pointers and less than op //this makes sure that we invoke the thrust radix sort and not merge sort return thrust::sort(thrust::cuda::par, first, last, thrust::less()); } -template -__host__ __device__ - void sort_by_key(const vtkm_cuda_policy &exec, - thrust::system::cuda::pointer first, - thrust::system::cuda::pointer last, - RandomAccessIterator values_first, - vtkm::exec::cuda::internal::WrappedBinaryPredicate > comp) +template +__host__ __device__ void sort_by_key( + const vtkm_cuda_policy& exec, thrust::system::cuda::pointer first, + thrust::system::cuda::pointer last, RandomAccessIterator values_first, + vtkm::exec::cuda::internal::WrappedBinaryPredicate comp) { //sort for concrete pointers and less than op //this makes sure that we invoke the thrust radix sort and not merge sort return thrust::sort_by_key(thrust::cuda::par, first, last, values_first, thrust::less()); } -template -__host__ __device__ - void sort(const vtkm_cuda_policy &exec, - thrust::system::cuda::pointer first, - thrust::system::cuda::pointer last, - vtkm::exec::cuda::internal::WrappedBinaryPredicate comp) +template +__host__ __device__ void sort( + const vtkm_cuda_policy& exec, thrust::system::cuda::pointer first, + thrust::system::cuda::pointer last, + vtkm::exec::cuda::internal::WrappedBinaryPredicate> comp) +{ //sort for concrete pointers and less than op + //this makes sure that we invoke the thrust radix sort and not merge sort + return thrust::sort(thrust::cuda::par, first, last, thrust::less()); +} + +template +__host__ __device__ void sort_by_key( + const vtkm_cuda_policy& exec, thrust::system::cuda::pointer first, + thrust::system::cuda::pointer last, RandomAccessIterator values_first, + vtkm::exec::cuda::internal::WrappedBinaryPredicate> comp) +{ //sort for concrete pointers and less than op + //this makes sure that we invoke the thrust radix sort and not merge sort + return thrust::sort_by_key(thrust::cuda::par, first, last, values_first, thrust::less()); +} + +template +__host__ __device__ void sort( + const vtkm_cuda_policy& exec, thrust::system::cuda::pointer first, + thrust::system::cuda::pointer last, + vtkm::exec::cuda::internal::WrappedBinaryPredicate comp) { //sort for concrete pointers and greater than op //this makes sure that we invoke the thrust radix sort and not merge sort return thrust::sort(thrust::cuda::par, first, last, thrust::greater()); } -template -__host__ __device__ - void sort_by_key(const vtkm_cuda_policy &exec, - thrust::system::cuda::pointer first, - thrust::system::cuda::pointer last, - RandomAccessIterator values_first, - vtkm::exec::cuda::internal::WrappedBinaryPredicate comp) +template +__host__ __device__ void sort_by_key( + const vtkm_cuda_policy& exec, thrust::system::cuda::pointer first, + thrust::system::cuda::pointer last, RandomAccessIterator values_first, + vtkm::exec::cuda::internal::WrappedBinaryPredicate comp) { //sort for concrete pointers and greater than op //this makes sure that we invoke the thrust radix sort and not merge sort return thrust::sort_by_key(thrust::cuda::par, first, last, values_first, thrust::greater()); } -template -__host__ __device__ - void sort(const vtkm_cuda_policy &exec, - thrust::system::cuda::pointer first, - thrust::system::cuda::pointer last, - vtkm::exec::cuda::internal::WrappedBinaryPredicate > comp) +template +__host__ __device__ void sort( + const vtkm_cuda_policy& exec, thrust::system::cuda::pointer first, + thrust::system::cuda::pointer last, + vtkm::exec::cuda::internal::WrappedBinaryPredicate> comp) { //sort for concrete pointers and greater than op //this makes sure that we invoke the thrust radix sort and not merge sort return thrust::sort(thrust::cuda::par, first, last, thrust::greater()); } -template -__host__ __device__ - void sort_by_key(const vtkm_cuda_policy &exec, - thrust::system::cuda::pointer first, - thrust::system::cuda::pointer last, - RandomAccessIterator values_first, - vtkm::exec::cuda::internal::WrappedBinaryPredicate > comp) +template +__host__ __device__ void sort_by_key( + const vtkm_cuda_policy& exec, thrust::system::cuda::pointer first, + thrust::system::cuda::pointer last, RandomAccessIterator values_first, + vtkm::exec::cuda::internal::WrappedBinaryPredicate> comp) { //sort for concrete pointers and greater than op //this makes sure that we invoke the thrust radix sort and not merge sort return thrust::sort_by_key(thrust::cuda::par, first, last, values_first, thrust::greater()); } -template -__host__ __device__ - void sort(const vtkm_cuda_policy &exec, - RandomAccessIterator first, - RandomAccessIterator last, - StrictWeakOrdering comp) +template +__host__ __device__ void sort(const vtkm_cuda_policy& exec, RandomAccessIterator first, + RandomAccessIterator last, StrictWeakOrdering comp) { //At this point the pointer type is not a cuda pointers and/or //the operator is not an approved less/greater operator. @@ -150,15 +130,12 @@ __host__ __device__ return thrust::sort(thrust::cuda::par, first, last, comp); } -template -__host__ __device__ - void sort_by_key(const vtkm_cuda_policy &exec, - RandomAccessIteratorKeys first, - RandomAccessIteratorKeys last, - RandomAccessIteratorValues values_first, - StrictWeakOrdering comp) +template +__host__ __device__ void sort_by_key(const vtkm_cuda_policy& exec, RandomAccessIteratorKeys first, + RandomAccessIteratorKeys last, + RandomAccessIteratorValues values_first, + StrictWeakOrdering comp) { //At this point the pointer type is not a cuda pointers and/or //the operator is not an approved less/greater operator. @@ -167,36 +144,29 @@ __host__ __device__ return thrust::sort_by_key(thrust::cuda::par, first, last, values_first, comp); } - -template -__host__ __device__ - ::thrust::pair - reduce_by_key(const vtkm_cuda_policy &exec, - thrust::system::cuda::pointer keys_first, - thrust::system::cuda::pointer keys_last, - InputIterator2 values_first, - OutputIterator1 keys_output, - OutputIterator2 values_output, - BinaryPredicate binary_pred, - BinaryFunction binary_op) +template +__host__ __device__::thrust::pair reduce_by_key( + const vtkm_cuda_policy& exec, thrust::system::cuda::pointer keys_first, + thrust::system::cuda::pointer keys_last, InputIterator2 values_first, + OutputIterator1 keys_output, OutputIterator2 values_output, BinaryPredicate binary_pred, + BinaryFunction binary_op) { #if defined(__CUDACC_VER__) && (__CUDACC_VER__ >= 70500) && (__CUDACC_VER__ < 80000) - ::thrust::pair result = thrust::reduce_by_key(thrust::cuda::par, keys_first.get(), keys_last.get(), values_first, keys_output, values_output, binary_pred, binary_op); + ::thrust::pair result = + thrust::reduce_by_key(thrust::cuda::par, keys_first.get(), keys_last.get(), values_first, + keys_output, values_output, binary_pred, binary_op); - //only sync if we are being invoked from the host -#ifndef __CUDA_ARCH__ +//only sync if we are being invoked from the host +#ifndef __CUDA_ARCH__ VTKM_CUDA_CALL(cudaDeviceSynchronize()); #endif return result; #else - return thrust::reduce_by_key(thrust::cuda::par, keys_first, keys_last, values_first, keys_output, values_output, binary_pred, binary_op); + return thrust::reduce_by_key(thrust::cuda::par, keys_first, keys_last, values_first, keys_output, + values_output, binary_pred, binary_op); #endif } diff --git a/vtkm/exec/cuda/internal/IteratorFromArrayPortal.h b/vtkm/exec/cuda/internal/IteratorFromArrayPortal.h index 6c7049143..75d84359d 100644 --- a/vtkm/exec/cuda/internal/IteratorFromArrayPortal.h +++ b/vtkm/exec/cuda/internal/IteratorFromArrayPortal.h @@ -31,22 +31,29 @@ VTKM_THIRDPARTY_PRE_INCLUDE #include VTKM_THIRDPARTY_POST_INCLUDE -namespace vtkm { -namespace exec { -namespace cuda { -namespace internal { +namespace vtkm +{ +namespace exec +{ +namespace cuda +{ +namespace internal +{ -template +template struct PortalValue { typedef typename ArrayPortalType::ValueType ValueType; VTKM_EXEC_CONT - PortalValue(const ArrayPortalType &portal, vtkm::Id index) - : Portal(portal), Index(index) { } + PortalValue(const ArrayPortalType& portal, vtkm::Id index) + : Portal(portal) + , Index(index) + { + } VTKM_EXEC - void Swap( PortalValue &rhs ) throw() + void Swap(PortalValue& rhs) throw() { //we need use the explicit type not a proxy temp object //A proxy temp object would point to the same underlying data structure @@ -57,8 +64,7 @@ struct PortalValue } VTKM_EXEC - PortalValue &operator=( - const PortalValue &rhs) + PortalValue& operator=(const PortalValue& rhs) { this->Portal.Set(this->Index, rhs.Portal.Get(rhs.Index)); return *this; @@ -72,42 +78,38 @@ struct PortalValue } VTKM_EXEC - operator ValueType(void) const - { - return this->Portal.Get(this->Index); - } + operator ValueType(void) const { return this->Portal.Get(this->Index); } const ArrayPortalType& Portal; vtkm::Id Index; }; -template -class IteratorFromArrayPortal : public - ::thrust::iterator_facade< - IteratorFromArrayPortal, - typename ArrayPortalType::ValueType, - ::thrust::system::cuda::tag, - ::thrust::random_access_traversal_tag, - PortalValue, - std::ptrdiff_t> +template +class IteratorFromArrayPortal + : public ::thrust::iterator_facade< + IteratorFromArrayPortal, typename ArrayPortalType::ValueType, + ::thrust::system::cuda::tag, ::thrust::random_access_traversal_tag, + PortalValue, std::ptrdiff_t> { public: - VTKM_EXEC_CONT IteratorFromArrayPortal() - : Portal(), Index(0) { } + : Portal() + , Index(0) + { + } VTKM_CONT - explicit IteratorFromArrayPortal(const ArrayPortalType &portal, - vtkm::Id index = 0) - : Portal(portal), Index(index) { } + explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0) + : Portal(portal) + , Index(index) + { + } VTKM_EXEC - PortalValue - operator[](std::ptrdiff_t idx) const //NEEDS to be signed + PortalValue operator[](std::ptrdiff_t idx) const //NEEDS to be signed { - return PortalValue(this->Portal, - this->Index + static_cast(idx) ); + return PortalValue(this->Portal, this->Index + static_cast(idx)); } private: @@ -120,12 +122,11 @@ private: VTKM_EXEC PortalValue dereference() const { - return PortalValue(this->Portal, - this->Index); + return PortalValue(this->Portal, this->Index); } VTKM_EXEC - bool equal(const IteratorFromArrayPortal &other) const + bool equal(const IteratorFromArrayPortal& other) const { // Technically, we should probably check that the portals are the same, // but the portal interface does not specify an equal operator. It is @@ -135,26 +136,16 @@ private: } VTKM_EXEC_CONT - void increment() - { - this->Index++; - } + void increment() { this->Index++; } VTKM_EXEC_CONT - void decrement() - { - this->Index--; - } + void decrement() { this->Index--; } VTKM_EXEC_CONT - void advance(std::ptrdiff_t delta) - { - this->Index += static_cast(delta); - } + void advance(std::ptrdiff_t delta) { this->Index += static_cast(delta); } VTKM_EXEC_CONT - std::ptrdiff_t - distance_to(const IteratorFromArrayPortal &other) const + std::ptrdiff_t distance_to(const IteratorFromArrayPortal& other) const { // Technically, we should probably check that the portals are the same, // but the portal interface does not specify an equal operator. It is @@ -163,7 +154,6 @@ private: return static_cast(other.Index - this->Index); } }; - } } } @@ -181,13 +171,14 @@ namespace thrust namespace detail { - template< typename T > struct is_non_const_reference; - - template< typename T > - struct is_non_const_reference< vtkm::exec::cuda::internal::PortalValue > - : thrust::detail::true_type - { }; +template +struct is_non_const_reference; +template +struct is_non_const_reference> + : thrust::detail::true_type +{ +}; } } diff --git a/vtkm/exec/cuda/internal/ThrustPatches.h b/vtkm/exec/cuda/internal/ThrustPatches.h index df3fbb6f7..b0658e99b 100644 --- a/vtkm/exec/cuda/internal/ThrustPatches.h +++ b/vtkm/exec/cuda/internal/ThrustPatches.h @@ -20,18 +20,37 @@ #ifndef vtk_m_exec_cuda_internal_ThrustPatches_h #define vtk_m_exec_cuda_internal_ThrustPatches_h - //Forward declare of WrappedBinaryOperator -namespace vtkm { namespace exec { namespace cuda { namespace internal { +namespace vtkm +{ +namespace exec +{ +namespace cuda +{ +namespace internal +{ -template +template class WrappedBinaryOperator; +} +} +} +} //namespace vtkm::exec::cuda::internal -} } } } //namespace vtkm::exec::cuda::internal - - -namespace thrust { namespace system { namespace cuda { namespace detail { -namespace bulk_ { namespace detail { namespace accumulate_detail { +namespace thrust +{ +namespace system +{ +namespace cuda +{ +namespace detail +{ +namespace bulk_ +{ +namespace detail +{ +namespace accumulate_detail +{ //So for thrust 1.8.0 - 1.8.2 the inclusive_scan has a bug when accumulating //values when the binary operators states it is not commutative. //For more complex value types, we patch thrust/bulk with fix that is found @@ -39,32 +58,34 @@ namespace bulk_ { namespace detail { namespace accumulate_detail { // //This specialization needs to be included before ANY thrust includes otherwise //other device code inside thrust that calls it will not see it -template -__device__ T destructive_accumulate_n(ConcurrentGroup &g, RandomAccessIterator first, Size n, T init, - vtkm::exec::cuda::internal::WrappedBinaryOperator binary_op) +template +__device__ T +destructive_accumulate_n(ConcurrentGroup& g, RandomAccessIterator first, Size n, T init, + vtkm::exec::cuda::internal::WrappedBinaryOperator binary_op) { typedef typename ConcurrentGroup::size_type size_type; size_type tid = g.this_exec.index(); T x = init; - if(tid < n) + if (tid < n) { x = first[tid]; } g.wait(); - for(size_type offset = 1; offset < g.size(); offset += offset) + for (size_type offset = 1; offset < g.size(); offset += offset) { - if(tid >= offset && tid - offset < n) + if (tid >= offset && tid - offset < n) { x = binary_op(first[tid - offset], x); } g.wait(); - if(tid < n) + if (tid < n) { first[tid] = x; } @@ -78,8 +99,12 @@ __device__ T destructive_accumulate_n(ConcurrentGroup &g, RandomAccessIterator f return result; } - -} } } //namespace bulk_::detail::accumulate_detail -} } } } //namespace thrust::system::cuda::detail +} +} +} //namespace bulk_::detail::accumulate_detail +} +} +} +} //namespace thrust::system::cuda::detail #endif //vtk_m_exec_cuda_internal_ThrustPatches_h diff --git a/vtkm/exec/cuda/internal/WrappedOperators.h b/vtkm/exec/cuda/internal/WrappedOperators.h index 2971cf984..a4b7f27ef 100644 --- a/vtkm/exec/cuda/internal/WrappedOperators.h +++ b/vtkm/exec/cuda/internal/WrappedOperators.h @@ -31,18 +31,21 @@ VTKM_THIRDPARTY_PRE_INCLUDE #include VTKM_THIRDPARTY_POST_INCLUDE -namespace vtkm { -namespace exec { -namespace cuda { -namespace internal { - +namespace vtkm +{ +namespace exec +{ +namespace cuda +{ +namespace internal +{ // Unary function object wrapper which can detect and handle calling the // wrapped operator with complex value types such as // PortalValue which happen when passed an input array that // is implicit. -template -struct WrappedUnaryPredicate +template +struct WrappedUnaryPredicate { typedef typename std::remove_const::type T; @@ -55,36 +58,31 @@ struct WrappedUnaryPredicate VTKM_EXEC WrappedUnaryPredicate() : m_f() - {} - - VTKM_CONT - WrappedUnaryPredicate(const Function &f) - : m_f(f) - {} - - VTKM_EXEC bool operator()(const T &x) const { - return m_f(x); } - template - VTKM_EXEC bool operator()(const PortalValue &x) const + VTKM_CONT + WrappedUnaryPredicate(const Function& f) + : m_f(f) + { + } + + VTKM_EXEC bool operator()(const T& x) const { return m_f(x); } + + template + VTKM_EXEC bool operator()(const PortalValue& x) const { return m_f((T)x); } - VTKM_EXEC bool operator()(const thrust::system::cuda::pointer x) const - { - return m_f(*x); - } + VTKM_EXEC bool operator()(const thrust::system::cuda::pointer x) const { return m_f(*x); } }; - // Binary function object wrapper which can detect and handle calling the // wrapped operator with complex value types such as // PortalValue which happen when passed an input array that // is implicit. -template +template struct WrappedBinaryOperator { typedef typename std::remove_const::type T; @@ -99,67 +97,58 @@ struct WrappedBinaryOperator VTKM_EXEC WrappedBinaryOperator() : m_f() - {} - - VTKM_CONT - WrappedBinaryOperator(const Function &f) - : m_f(f) - {} - - VTKM_EXEC T operator()(const T &x, const T &y) const { - return m_f(x, y); } + VTKM_CONT + WrappedBinaryOperator(const Function& f) + : m_f(f) + { + } - template - VTKM_EXEC T operator()(const T &x, - const PortalValue &y) const + VTKM_EXEC T operator()(const T& x, const T& y) const { return m_f(x, y); } + + template + VTKM_EXEC T operator()(const T& x, const PortalValue& y) const { return m_f(x, (T)y); } - template - VTKM_EXEC T operator()(const PortalValue &x, - const T &y) const + template + VTKM_EXEC T operator()(const PortalValue& x, const T& y) const { return m_f((T)x, y); } - template - VTKM_EXEC T operator()(const PortalValue &x, - const PortalValue &y) const + template + VTKM_EXEC T operator()(const PortalValue& x, const PortalValue& y) const { return m_f((T)x, (T)y); } - VTKM_EXEC T operator()(const thrust::system::cuda::pointer x, - const T* y) const + VTKM_EXEC T operator()(const thrust::system::cuda::pointer x, const T* y) const { return m_f(*x, *y); } - VTKM_EXEC T operator()(const thrust::system::cuda::pointer x, - const T& y) const + VTKM_EXEC T operator()(const thrust::system::cuda::pointer x, const T& y) const { return m_f(*x, y); } - VTKM_EXEC T operator()(const T& x, - const thrust::system::cuda::pointer y) const + VTKM_EXEC T operator()(const T& x, const thrust::system::cuda::pointer y) const { return m_f(x, *y); } VTKM_EXEC T operator()(const thrust::system::cuda::pointer x, - const thrust::system::cuda::pointer y) const + const thrust::system::cuda::pointer y) const { return m_f(*x, *y); } - }; -template +template struct WrappedBinaryPredicate { typedef typename std::remove_const::type T; @@ -174,82 +163,77 @@ struct WrappedBinaryPredicate VTKM_EXEC WrappedBinaryPredicate() : m_f() - {} - - VTKM_CONT - WrappedBinaryPredicate(const Function &f) - : m_f(f) - {} - - VTKM_EXEC bool operator()(const T &x, const T &y) const { - return m_f(x, y); } + VTKM_CONT + WrappedBinaryPredicate(const Function& f) + : m_f(f) + { + } - template - VTKM_EXEC bool operator()(const T &x, - const PortalValue &y) const + VTKM_EXEC bool operator()(const T& x, const T& y) const { return m_f(x, y); } + + template + VTKM_EXEC bool operator()(const T& x, const PortalValue& y) const { return m_f(x, (T)y); } - template - VTKM_EXEC bool operator()(const PortalValue &x, - const T &y) const + template + VTKM_EXEC bool operator()(const PortalValue& x, const T& y) const { return m_f((T)x, y); } - template - VTKM_EXEC bool operator()(const PortalValue &x, - const PortalValue &y) const + template + VTKM_EXEC bool operator()(const PortalValue& x, const PortalValue& y) const { return m_f((T)x, (T)y); } - VTKM_EXEC bool operator()(const thrust::system::cuda::pointer x, - const T* y) const + VTKM_EXEC bool operator()(const thrust::system::cuda::pointer x, const T* y) const { return m_f(*x, *y); } - VTKM_EXEC bool operator()(const thrust::system::cuda::pointer x, - const T& y) const + VTKM_EXEC bool operator()(const thrust::system::cuda::pointer x, const T& y) const { return m_f(*x, y); } - VTKM_EXEC bool operator()(const T& x, - const thrust::system::cuda::pointer y) const + VTKM_EXEC bool operator()(const T& x, const thrust::system::cuda::pointer y) const { return m_f(x, *y); } VTKM_EXEC bool operator()(const thrust::system::cuda::pointer x, - const thrust::system::cuda::pointer y) const + const thrust::system::cuda::pointer y) const { return m_f(*x, *y); } - }; - } } } } //namespace vtkm::exec::cuda::internal -namespace thrust { namespace detail { +namespace thrust +{ +namespace detail +{ // // We tell Thrust that our WrappedBinaryOperator is commutative so that we // activate numerous fast paths inside thrust which are only available when // the binary functor is commutative and the T type is is_arithmetic // // -template< typename T, typename F> -struct is_commutative< vtkm::exec::cuda::internal::WrappedBinaryOperator > : - public thrust::detail::is_arithmetic { }; - -} } //namespace thrust::detail +template +struct is_commutative> + : public thrust::detail::is_arithmetic +{ +}; +} +} //namespace thrust::detail #endif //vtk_m_exec_cuda_internal_WrappedOperators_h diff --git a/vtkm/exec/cuda/internal/testing/UnitTestTextureMemorySupport.cu b/vtkm/exec/cuda/internal/testing/UnitTestTextureMemorySupport.cu index 0ceff6a84..97aa315ae 100644 --- a/vtkm/exec/cuda/internal/testing/UnitTestTextureMemorySupport.cu +++ b/vtkm/exec/cuda/internal/testing/UnitTestTextureMemorySupport.cu @@ -21,59 +21,58 @@ #include #include -namespace { +namespace +{ -struct customType { }; +struct customType +{ +}; void TestScalarTextureLoad() { - using namespace vtkm::exec::cuda::internal; - typedef load_through_texture< vtkm::Float32 > f; - typedef load_through_texture< vtkm::Int32 > i; - typedef load_through_texture< vtkm::UInt8 > ui; + using namespace vtkm::exec::cuda::internal; + typedef load_through_texture f; + typedef load_through_texture i; + typedef load_through_texture ui; - typedef load_through_texture< customType > ct; - - VTKM_TEST_ASSERT( f::WillUseTexture == 1, "Float32 can be loaded through texture memory" ); - VTKM_TEST_ASSERT( i::WillUseTexture == 1, "Int32 can be loaded through texture memory" ); - VTKM_TEST_ASSERT( ui::WillUseTexture == 1, "Unsigned Int8 can be loaded through texture memory" ); - VTKM_TEST_ASSERT( ct::WillUseTexture == 0, "Custom Types can't be loaded through texture memory" ); + typedef load_through_texture ct; + VTKM_TEST_ASSERT(f::WillUseTexture == 1, "Float32 can be loaded through texture memory"); + VTKM_TEST_ASSERT(i::WillUseTexture == 1, "Int32 can be loaded through texture memory"); + VTKM_TEST_ASSERT(ui::WillUseTexture == 1, "Unsigned Int8 can be loaded through texture memory"); + VTKM_TEST_ASSERT(ct::WillUseTexture == 0, "Custom Types can't be loaded through texture memory"); } void TestVecTextureLoad() { - using namespace - vtkm::exec::cuda::internal; - typedef load_through_texture< vtkm::Vec > ui32_3; - typedef load_through_texture< vtkm::Vec > f32_3; - typedef load_through_texture< vtkm::Vec > ui8_3; - typedef load_through_texture< vtkm::Vec > f64_3; + using namespace vtkm::exec::cuda::internal; + typedef load_through_texture> ui32_3; + typedef load_through_texture> f32_3; + typedef load_through_texture> ui8_3; + typedef load_through_texture> f64_3; - typedef load_through_texture< vtkm::Vec > ui32_4; - typedef load_through_texture< vtkm::Vec > f32_4; - typedef load_through_texture< vtkm::Vec > ui8_4; - typedef load_through_texture< vtkm::Vec > f64_4; + typedef load_through_texture> ui32_4; + typedef load_through_texture> f32_4; + typedef load_through_texture> ui8_4; + typedef load_through_texture> f64_4; - typedef load_through_texture< vtkm::Vec > ct_3; - typedef load_through_texture< vtkm::Vec > ct_4; + typedef load_through_texture> ct_3; + typedef load_through_texture> ct_4; + VTKM_TEST_ASSERT(ui32_3::WillUseTexture == 1, "Can be loaded through texture loads"); + VTKM_TEST_ASSERT(f32_3::WillUseTexture == 1, "Can be loaded through texture loads"); + VTKM_TEST_ASSERT(ui8_3::WillUseTexture == 1, "Can be loaded through texture loads"); + VTKM_TEST_ASSERT(f64_3::WillUseTexture == 1, "Can be loaded through texture loads"); - VTKM_TEST_ASSERT( ui32_3::WillUseTexture == 1, "Can be loaded through texture loads"); - VTKM_TEST_ASSERT( f32_3::WillUseTexture == 1, "Can be loaded through texture loads"); - VTKM_TEST_ASSERT( ui8_3::WillUseTexture == 1, "Can be loaded through texture loads"); - VTKM_TEST_ASSERT( f64_3::WillUseTexture == 1, "Can be loaded through texture loads"); + VTKM_TEST_ASSERT(ui32_4::WillUseTexture == 1, "Can be loaded through texture loads"); + VTKM_TEST_ASSERT(f32_4::WillUseTexture == 1, "Can be loaded through texture loads"); + VTKM_TEST_ASSERT(ui8_4::WillUseTexture == 1, "Can be loaded through texture loads"); + VTKM_TEST_ASSERT(f64_4::WillUseTexture == 1, "Can be loaded through texture loads"); - VTKM_TEST_ASSERT( ui32_4::WillUseTexture == 1, "Can be loaded through texture loads"); - VTKM_TEST_ASSERT( f32_4::WillUseTexture == 1, "Can be loaded through texture loads"); - VTKM_TEST_ASSERT( ui8_4::WillUseTexture == 1, "Can be loaded through texture loads"); - VTKM_TEST_ASSERT( f64_4::WillUseTexture == 1, "Can be loaded through texture loads"); - - VTKM_TEST_ASSERT( ct_4::WillUseTexture == 0, "Can't be loaded through texture loads"); - VTKM_TEST_ASSERT( ct_4::WillUseTexture == 0, "Can't be loaded through texture loads"); + VTKM_TEST_ASSERT(ct_4::WillUseTexture == 0, "Can't be loaded through texture loads"); + VTKM_TEST_ASSERT(ct_4::WillUseTexture == 0, "Can't be loaded through texture loads"); } - } // namespace void TestTextureMemorySupport() @@ -82,7 +81,7 @@ void TestTextureMemorySupport() TestVecTextureLoad(); } -int UnitTestTextureMemorySupport(int, char *[]) +int UnitTestTextureMemorySupport(int, char* []) { - return vtkm::cont::testing::Testing::Run( TestTextureMemorySupport ); + return vtkm::cont::testing::Testing::Run(TestTextureMemorySupport); } diff --git a/vtkm/exec/internal/.gitattributes b/vtkm/exec/internal/.gitattributes new file mode 100644 index 000000000..e0ba31056 --- /dev/null +++ b/vtkm/exec/internal/.gitattributes @@ -0,0 +1,2 @@ +# Generated. +WorkletInvokeFunctorDetail.h -format.clang-format diff --git a/vtkm/exec/internal/ErrorMessageBuffer.h b/vtkm/exec/internal/ErrorMessageBuffer.h index b814f8d45..cf3e8f09a 100644 --- a/vtkm/exec/internal/ErrorMessageBuffer.h +++ b/vtkm/exec/internal/ErrorMessageBuffer.h @@ -22,9 +22,12 @@ #include -namespace vtkm { -namespace exec { -namespace internal { +namespace vtkm +{ +namespace exec +{ +namespace internal +{ /// Used to hold an error in the execution environment until the parallel /// execution can complete. This is to be used in conjunction with a @@ -41,13 +44,19 @@ class ErrorMessageBuffer { public: VTKM_EXEC_CONT ErrorMessageBuffer() - : MessageBuffer(nullptr), MessageBufferSize(0) { } + : MessageBuffer(nullptr) + , MessageBufferSize(0) + { + } VTKM_EXEC_CONT - ErrorMessageBuffer(char *messageBuffer, vtkm::Id bufferSize) - : MessageBuffer(messageBuffer), MessageBufferSize(bufferSize) { } + ErrorMessageBuffer(char* messageBuffer, vtkm::Id bufferSize) + : MessageBuffer(messageBuffer) + , MessageBufferSize(bufferSize) + { + } - VTKM_EXEC void RaiseError(const char *message) const + VTKM_EXEC void RaiseError(const char* message) const { // Only raise the error if one has not been raised yet. This check is not // guaranteed to work across threads. However, chances are that if two or @@ -56,17 +65,23 @@ public: // threads simultaneously write different error messages, the worst case is // that you get a mangled message. That's not good (and it's what we are // trying to avoid), but it's not critical. - if (this->IsErrorRaised()) { return; } + if (this->IsErrorRaised()) + { + return; + } // Safely copy message into array. for (vtkm::Id index = 0; index < this->MessageBufferSize; index++) { this->MessageBuffer[index] = message[index]; - if (message[index] == '\0') { break; } + if (message[index] == '\0') + { + break; + } } // Make sure message is null terminated. - this->MessageBuffer[this->MessageBufferSize-1] = '\0'; + this->MessageBuffer[this->MessageBufferSize - 1] = '\0'; } VTKM_EXEC_CONT bool IsErrorRaised() const @@ -83,10 +98,9 @@ public: } private: - char *MessageBuffer; + char* MessageBuffer; vtkm::Id MessageBufferSize; }; - } } } // namespace vtkm::exec::internal diff --git a/vtkm/exec/internal/ReduceByKeyLookup.h b/vtkm/exec/internal/ReduceByKeyLookup.h index 7e1d06f75..cc0feed82 100644 --- a/vtkm/exec/internal/ReduceByKeyLookup.h +++ b/vtkm/exec/internal/ReduceByKeyLookup.h @@ -27,9 +27,12 @@ #include -namespace vtkm { -namespace exec { -namespace internal { +namespace vtkm +{ +namespace exec +{ +namespace internal +{ /// \brief Execution object holding lookup info for reduce by key. /// @@ -37,17 +40,14 @@ namespace internal { /// to the respective key and group of values. This execution object holds that /// state. /// -template +template struct ReduceByKeyLookup : vtkm::exec::ExecutionObjectBase { using KeyType = typename KeyPortalType::ValueType; + VTKM_STATIC_ASSERT((std::is_same::value)); VTKM_STATIC_ASSERT( - (std::is_same::value)); - VTKM_STATIC_ASSERT( - (std::is_same::value)); + (std::is_same::value)); KeyPortalType UniqueKeys; IdPortalType SortedValuesMap; @@ -55,21 +55,18 @@ struct ReduceByKeyLookup : vtkm::exec::ExecutionObjectBase IdComponentPortalType Counts; VTKM_EXEC_CONT - ReduceByKeyLookup(const KeyPortalType &uniqueKeys, - const IdPortalType &sortedValuesMap, - const IdPortalType &offsets, - const IdComponentPortalType &counts) - : UniqueKeys(uniqueKeys), - SortedValuesMap(sortedValuesMap), - Offsets(offsets), - Counts(counts) - { } + ReduceByKeyLookup(const KeyPortalType& uniqueKeys, const IdPortalType& sortedValuesMap, + const IdPortalType& offsets, const IdComponentPortalType& counts) + : UniqueKeys(uniqueKeys) + , SortedValuesMap(sortedValuesMap) + , Offsets(offsets) + , Counts(counts) + { + } VTKM_EXEC_CONT - ReduceByKeyLookup() - { } + ReduceByKeyLookup() {} }; - } } } // namespace vtkm::exec::internal diff --git a/vtkm/exec/internal/TaskSingular.h b/vtkm/exec/internal/TaskSingular.h index fd2f91eb3..3365765a2 100644 --- a/vtkm/exec/internal/TaskSingular.h +++ b/vtkm/exec/internal/TaskSingular.h @@ -29,40 +29,42 @@ //Todo: rename this header to TaskSingularDetail.h #include -namespace vtkm { -namespace exec { -namespace internal { +namespace vtkm +{ +namespace exec +{ +namespace internal +{ -template +template class TaskSingular : public vtkm::exec::TaskBase { public: VTKM_CONT - TaskSingular(const WorkletType &worklet, - const InvocationType &invocation, - const vtkm::Id &globalIndexOffset=0) - : Worklet(worklet), Invocation(invocation), GlobalIndexOffset(globalIndexOffset) { } + TaskSingular(const WorkletType& worklet, const InvocationType& invocation, + const vtkm::Id& globalIndexOffset = 0) + : Worklet(worklet) + , Invocation(invocation) + , GlobalIndexOffset(globalIndexOffset) + { + } VTKM_CONT - void SetErrorMessageBuffer( - const vtkm::exec::internal::ErrorMessageBuffer &buffer) + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer& buffer) { this->Worklet.SetErrorMessageBuffer(buffer); } VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC - void operator()(T index) const + template + VTKM_EXEC void operator()(T index) const { //Todo: rename this function to DoTaskSingular - detail::DoWorkletInvokeFunctor(this->Worklet, - this->Invocation, - this->Worklet.GetThreadIndices(index, - this->Invocation.OutputToInputMap, - this->Invocation.VisitArray, - this->Invocation.GetInputDomain(), - GlobalIndexOffset) - ); + detail::DoWorkletInvokeFunctor( + this->Worklet, this->Invocation, + this->Worklet.GetThreadIndices(index, this->Invocation.OutputToInputMap, + this->Invocation.VisitArray, this->Invocation.GetInputDomain(), + GlobalIndexOffset)); } + private: WorkletType Worklet; // This is held by by value so that when we transfer the invocation object @@ -72,8 +74,6 @@ private: const InvocationType Invocation; const vtkm::Id GlobalIndexOffset; }; - - } } } // vtkm::exec::internal diff --git a/vtkm/exec/internal/testing/UnitTestErrorMessageBuffer.cxx b/vtkm/exec/internal/testing/UnitTestErrorMessageBuffer.cxx index 25f4dd692..3e759c63d 100644 --- a/vtkm/exec/internal/testing/UnitTestErrorMessageBuffer.cxx +++ b/vtkm/exec/internal/testing/UnitTestErrorMessageBuffer.cxx @@ -23,7 +23,8 @@ #include #include -namespace { +namespace +{ void TestErrorMessageBuffer() { @@ -36,8 +37,7 @@ void TestErrorMessageBuffer() largeBuffer.RaiseError("Hello World"); VTKM_TEST_ASSERT(largeBuffer.IsErrorRaised(), "Error not reported."); - VTKM_TEST_ASSERT(strcmp(messageBuffer, "Hello World") == 0, - "Did not record error message."); + VTKM_TEST_ASSERT(strcmp(messageBuffer, "Hello World") == 0, "Did not record error message."); std::cout << "Testing truncated error message." << std::endl; messageBuffer[0] = '\0'; @@ -46,13 +46,12 @@ void TestErrorMessageBuffer() smallBuffer.RaiseError("Hello World"); VTKM_TEST_ASSERT(smallBuffer.IsErrorRaised(), "Error not reported."); - VTKM_TEST_ASSERT(strcmp(messageBuffer, "Hello Wo") == 0, - "Did not record error message."); + VTKM_TEST_ASSERT(strcmp(messageBuffer, "Hello Wo") == 0, "Did not record error message."); } } // anonymous namespace -int UnitTestErrorMessageBuffer(int, char *[]) +int UnitTestErrorMessageBuffer(int, char* []) { return (vtkm::testing::Testing::Run(TestErrorMessageBuffer)); } diff --git a/vtkm/exec/internal/testing/UnitTestTaskSingular.cxx b/vtkm/exec/internal/testing/UnitTestTaskSingular.cxx index 4767aea97..1cb7bd168 100644 --- a/vtkm/exec/internal/testing/UnitTestTaskSingular.cxx +++ b/vtkm/exec/internal/testing/UnitTestTaskSingular.cxx @@ -31,17 +31,24 @@ #include -namespace { +namespace +{ struct TestExecObject { VTKM_EXEC_CONT - TestExecObject() : Value(NULL) { } + TestExecObject() + : Value(NULL) + { + } VTKM_EXEC_CONT - TestExecObject(vtkm::Id *value) : Value(value) { } + TestExecObject(vtkm::Id* value) + : Value(value) + { + } - vtkm::Id *Value; + vtkm::Id* Value; }; struct MyOutputToInputMapPortal @@ -57,8 +64,12 @@ struct MyVisitArrayPortal vtkm::IdComponent Get(vtkm::Id) const { return 1; } }; -struct TestFetchTagInput { }; -struct TestFetchTagOutput { }; +struct TestFetchTagInput +{ +}; +struct TestFetchTagOutput +{ +}; // Missing TransportTag, but we are not testing that so we can leave it out. struct TestControlSignatureTagInput @@ -72,126 +83,99 @@ struct TestControlSignatureTagOutput } // anonymous namespace -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ -template<> -struct Fetch< - TestFetchTagInput, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesBasic, - TestExecObject> +template <> +struct Fetch { typedef vtkm::Id ValueType; VTKM_EXEC - ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic &indices, - const TestExecObject &execObject) const { - return *execObject.Value + 10*indices.GetInputIndex(); + ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic& indices, + const TestExecObject& execObject) const + { + return *execObject.Value + 10 * indices.GetInputIndex(); } VTKM_EXEC - void Store(const vtkm::exec::arg::ThreadIndicesBasic &, - const TestExecObject &, - ValueType) const { + void Store(const vtkm::exec::arg::ThreadIndicesBasic&, const TestExecObject&, ValueType) const + { // No-op } }; -template<> -struct Fetch< - TestFetchTagOutput, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesBasic, - TestExecObject> +template <> +struct Fetch { typedef vtkm::Id ValueType; VTKM_EXEC - ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic &, - const TestExecObject &) const { + ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic&, const TestExecObject&) const + { // No-op return ValueType(); } VTKM_EXEC - void Store(const vtkm::exec::arg::ThreadIndicesBasic &indices, - const TestExecObject &execObject, - ValueType value) const { - *execObject.Value = value + 20*indices.GetOutputIndex(); + void Store(const vtkm::exec::arg::ThreadIndicesBasic& indices, const TestExecObject& execObject, + ValueType value) const + { + *execObject.Value = value + 20 * indices.GetOutputIndex(); } }; - } } } // vtkm::exec::arg -namespace { +namespace +{ -typedef void TestControlSignature(TestControlSignatureTagInput, - TestControlSignatureTagOutput); -typedef vtkm::internal::FunctionInterface - TestControlInterface; +typedef void TestControlSignature(TestControlSignatureTagInput, TestControlSignatureTagOutput); +typedef vtkm::internal::FunctionInterface TestControlInterface; -typedef void TestExecutionSignature1(vtkm::exec::arg::BasicArg<1>, - vtkm::exec::arg::BasicArg<2>); -typedef vtkm::internal::FunctionInterface - TestExecutionInterface1; +typedef void TestExecutionSignature1(vtkm::exec::arg::BasicArg<1>, vtkm::exec::arg::BasicArg<2>); +typedef vtkm::internal::FunctionInterface TestExecutionInterface1; -typedef vtkm::exec::arg::BasicArg<2> TestExecutionSignature2( - vtkm::exec::arg::BasicArg<1>); -typedef vtkm::internal::FunctionInterface - TestExecutionInterface2; +typedef vtkm::exec::arg::BasicArg<2> TestExecutionSignature2(vtkm::exec::arg::BasicArg<1>); +typedef vtkm::internal::FunctionInterface TestExecutionInterface2; typedef vtkm::internal::FunctionInterface - ExecutionParameterInterface; + ExecutionParameterInterface; -typedef vtkm::internal::Invocation< - ExecutionParameterInterface, - TestControlInterface, - TestExecutionInterface1, - 1, - MyOutputToInputMapPortal, - MyVisitArrayPortal> InvocationType1; +typedef vtkm::internal::Invocation + InvocationType1; -typedef vtkm::internal::Invocation< - ExecutionParameterInterface, - TestControlInterface, - TestExecutionInterface2, - 1, - MyOutputToInputMapPortal, - MyVisitArrayPortal> InvocationType2; +typedef vtkm::internal::Invocation + InvocationType2; // Not a full worklet, but provides operators that we expect in a worklet. struct TestWorkletProxy : vtkm::exec::FunctorBase { VTKM_EXEC - void operator()(vtkm::Id input, vtkm::Id &output) const - { - output = input + 100; - } + void operator()(vtkm::Id input, vtkm::Id& output) const { output = input + 100; } VTKM_EXEC - vtkm::Id operator()(vtkm::Id input) const - { - return input + 200; - } + vtkm::Id operator()(vtkm::Id input) const { return input + 200; } - template - VTKM_EXEC - vtkm::exec::arg::ThreadIndicesBasic - GetThreadIndices(const T& threadIndex, - const OutToInArrayType& outToIn, - const VisitArrayType& visit, - const InputDomainType &, - const G& globalThreadIndexOffset) const + template + VTKM_EXEC vtkm::exec::arg::ThreadIndicesBasic GetThreadIndices( + const T& threadIndex, const OutToInArrayType& outToIn, const VisitArrayType& visit, + const InputDomainType&, const G& globalThreadIndexOffset) const { - return vtkm::exec::arg::ThreadIndicesBasic(threadIndex, - outToIn.Get(threadIndex), - visit.Get(threadIndex), - globalThreadIndexOffset ); + return vtkm::exec::arg::ThreadIndicesBasic(threadIndex, outToIn.Get(threadIndex), + visit.Get(threadIndex), globalThreadIndexOffset); } }; @@ -201,42 +185,41 @@ struct TestWorkletProxy : vtkm::exec::FunctorBase struct TestWorkletErrorProxy : vtkm::exec::FunctorBase { VTKM_EXEC - void operator()(vtkm::Id, vtkm::Id) const - { - this->RaiseError(ERROR_MESSAGE); - } + void operator()(vtkm::Id, vtkm::Id) const { this->RaiseError(ERROR_MESSAGE); } - template - VTKM_EXEC - vtkm::exec::arg::ThreadIndicesBasic - GetThreadIndices(const T& threadIndex, - const OutToInArrayType& outToIn, - const VisitArrayType& visit, - const InputDomainType &, - const G& globalThreadIndexOffset) const + template + VTKM_EXEC vtkm::exec::arg::ThreadIndicesBasic GetThreadIndices( + const T& threadIndex, const OutToInArrayType& outToIn, const VisitArrayType& visit, + const InputDomainType&, const G& globalThreadIndexOffset) const { - return vtkm::exec::arg::ThreadIndicesBasic(threadIndex, - outToIn.Get(threadIndex), - visit.Get(threadIndex), - globalThreadIndexOffset ); + return vtkm::exec::arg::ThreadIndicesBasic(threadIndex, outToIn.Get(threadIndex), + visit.Get(threadIndex), globalThreadIndexOffset); } }; // Check behavior of InvocationToFetch helper class. -VTKM_STATIC_ASSERT(( std::is_same< - vtkm::exec::internal::detail::InvocationToFetch::type, - vtkm::exec::arg::Fetch >::type::value )); +VTKM_STATIC_ASSERT( + (std::is_same< + vtkm::exec::internal::detail::InvocationToFetch::type, + vtkm::exec::arg::Fetch>::type::value)); -VTKM_STATIC_ASSERT(( std::is_same< - vtkm::exec::internal::detail::InvocationToFetch::type, - vtkm::exec::arg::Fetch >::type::value )); - -VTKM_STATIC_ASSERT(( std::is_same< - vtkm::exec::internal::detail::InvocationToFetch::type, - vtkm::exec::arg::Fetch >::type::value )); +VTKM_STATIC_ASSERT( + (std::is_same< + vtkm::exec::internal::detail::InvocationToFetch::type, + vtkm::exec::arg::Fetch>::type::value)); +VTKM_STATIC_ASSERT( + (std::is_same< + vtkm::exec::internal::detail::InvocationToFetch::type, + vtkm::exec::arg::Fetch>::type::value)); void TestNormalFunctorInvoke() { @@ -244,31 +227,29 @@ void TestNormalFunctorInvoke() vtkm::Id inputTestValue; vtkm::Id outputTestValue; - vtkm::internal::FunctionInterface execObjects = - vtkm::internal::make_FunctionInterface(TestExecObject(&inputTestValue), - TestExecObject(&outputTestValue)); + vtkm::internal::FunctionInterface execObjects = + vtkm::internal::make_FunctionInterface(TestExecObject(&inputTestValue), + TestExecObject(&outputTestValue)); std::cout << " Try void return." << std::endl; inputTestValue = 5; outputTestValue = static_cast(0xDEADDEAD); - typedef vtkm::exec::internal::TaskSingular TaskSingular1; + typedef vtkm::exec::internal::TaskSingular TaskSingular1; TaskSingular1 taskInvokeWorklet1 = - TaskSingular1(TestWorkletProxy(), InvocationType1(execObjects)); + TaskSingular1(TestWorkletProxy(), InvocationType1(execObjects)); taskInvokeWorklet1(1); VTKM_TEST_ASSERT(inputTestValue == 5, "Input value changed."); - VTKM_TEST_ASSERT(outputTestValue == inputTestValue + 100 + 30, - "Output value not set right."); + VTKM_TEST_ASSERT(outputTestValue == inputTestValue + 100 + 30, "Output value not set right."); std::cout << " Try return value." << std::endl; inputTestValue = 6; outputTestValue = static_cast(0xDEADDEAD); - typedef vtkm::exec::internal::TaskSingular TaskSingular2; + typedef vtkm::exec::internal::TaskSingular TaskSingular2; TaskSingular2 taskInvokeWorklet2 = - TaskSingular2(TestWorkletProxy(), InvocationType2(execObjects)); + TaskSingular2(TestWorkletProxy(), InvocationType2(execObjects)); taskInvokeWorklet2(2); VTKM_TEST_ASSERT(inputTestValue == 6, "Input value changed."); - VTKM_TEST_ASSERT(outputTestValue == inputTestValue + 200 + 30*2, - "Output value not set right."); + VTKM_TEST_ASSERT(outputTestValue == inputTestValue + 200 + 30 * 2, "Output value not set right."); } void TestErrorFunctorInvoke() @@ -277,13 +258,13 @@ void TestErrorFunctorInvoke() vtkm::Id inputTestValue = 5; vtkm::Id outputTestValue = static_cast(0xDEADDEAD); - vtkm::internal::FunctionInterface execObjects = - vtkm::internal::make_FunctionInterface(TestExecObject(&inputTestValue), - TestExecObject(&outputTestValue)); + vtkm::internal::FunctionInterface execObjects = + vtkm::internal::make_FunctionInterface(TestExecObject(&inputTestValue), + TestExecObject(&outputTestValue)); - typedef vtkm::exec::internal::TaskSingular TaskSingular1; + typedef vtkm::exec::internal::TaskSingular TaskSingular1; TaskSingular1 taskInvokeWorklet1 = - TaskSingular1(TestWorkletErrorProxy(), InvocationType1(execObjects)); + TaskSingular1(TestWorkletErrorProxy(), InvocationType1(execObjects)); char message[1024]; message[0] = '\0'; vtkm::exec::internal::ErrorMessageBuffer errorMessage(message, 1024); @@ -291,8 +272,7 @@ void TestErrorFunctorInvoke() taskInvokeWorklet1(1); VTKM_TEST_ASSERT(errorMessage.IsErrorRaised(), "Error not raised correctly."); - VTKM_TEST_ASSERT(message == std::string(ERROR_MESSAGE), - "Got wrong error message."); + VTKM_TEST_ASSERT(message == std::string(ERROR_MESSAGE), "Got wrong error message."); } void TestTaskSingular() @@ -303,7 +283,7 @@ void TestTaskSingular() } // anonymous namespace -int UnitTestTaskSingular(int, char *[]) +int UnitTestTaskSingular(int, char* []) { return vtkm::testing::Testing::Run(TestTaskSingular); } diff --git a/vtkm/exec/internal/testing/UnitTestWorkletInvokeFunctor.cxx b/vtkm/exec/internal/testing/UnitTestWorkletInvokeFunctor.cxx index 0bbe30e06..c7c585c55 100644 --- a/vtkm/exec/internal/testing/UnitTestWorkletInvokeFunctor.cxx +++ b/vtkm/exec/internal/testing/UnitTestWorkletInvokeFunctor.cxx @@ -31,17 +31,24 @@ #include -namespace { +namespace +{ struct TestExecObject { VTKM_EXEC_CONT - TestExecObject() : Value(nullptr) { } + TestExecObject() + : Value(nullptr) + { + } VTKM_EXEC_CONT - TestExecObject(vtkm::Id *value) : Value(value) { } + TestExecObject(vtkm::Id* value) + : Value(value) + { + } - vtkm::Id *Value; + vtkm::Id* Value; }; struct MyOutputToInputMapPortal @@ -57,8 +64,12 @@ struct MyVisitArrayPortal vtkm::IdComponent Get(vtkm::Id) const { return 1; } }; -struct TestFetchTagInput { }; -struct TestFetchTagOutput { }; +struct TestFetchTagInput +{ +}; +struct TestFetchTagOutput +{ +}; // Missing TransportTag, but we are not testing that so we can leave it out. struct TestControlSignatureTagInput @@ -72,120 +83,96 @@ struct TestControlSignatureTagOutput } // anonymous namespace -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ -template<> -struct Fetch< - TestFetchTagInput, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesBasic, - TestExecObject> +template <> +struct Fetch { typedef vtkm::Id ValueType; VTKM_EXEC - ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic &indices, - const TestExecObject &execObject) const { - return *execObject.Value + 10*indices.GetInputIndex(); + ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic& indices, + const TestExecObject& execObject) const + { + return *execObject.Value + 10 * indices.GetInputIndex(); } VTKM_EXEC - void Store(const vtkm::exec::arg::ThreadIndicesBasic &, - const TestExecObject &, - ValueType) const { + void Store(const vtkm::exec::arg::ThreadIndicesBasic&, const TestExecObject&, ValueType) const + { // No-op } }; -template<> -struct Fetch< - TestFetchTagOutput, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesBasic, - TestExecObject> +template <> +struct Fetch { typedef vtkm::Id ValueType; VTKM_EXEC - ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic &, - const TestExecObject &) const { + ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic&, const TestExecObject&) const + { // No-op return ValueType(); } VTKM_EXEC - void Store(const vtkm::exec::arg::ThreadIndicesBasic &indices, - const TestExecObject &execObject, - ValueType value) const { - *execObject.Value = value + 20*indices.GetOutputIndex(); + void Store(const vtkm::exec::arg::ThreadIndicesBasic& indices, const TestExecObject& execObject, + ValueType value) const + { + *execObject.Value = value + 20 * indices.GetOutputIndex(); } }; - } } } // vtkm::exec::arg -namespace { +namespace +{ -typedef void TestControlSignature(TestControlSignatureTagInput, - TestControlSignatureTagOutput); -typedef vtkm::internal::FunctionInterface - TestControlInterface; +typedef void TestControlSignature(TestControlSignatureTagInput, TestControlSignatureTagOutput); +typedef vtkm::internal::FunctionInterface TestControlInterface; -typedef void TestExecutionSignature1(vtkm::exec::arg::BasicArg<1>, - vtkm::exec::arg::BasicArg<2>); -typedef vtkm::internal::FunctionInterface - TestExecutionInterface1; +typedef void TestExecutionSignature1(vtkm::exec::arg::BasicArg<1>, vtkm::exec::arg::BasicArg<2>); +typedef vtkm::internal::FunctionInterface TestExecutionInterface1; -typedef vtkm::exec::arg::BasicArg<2> TestExecutionSignature2( - vtkm::exec::arg::BasicArg<1>); -typedef vtkm::internal::FunctionInterface - TestExecutionInterface2; +typedef vtkm::exec::arg::BasicArg<2> TestExecutionSignature2(vtkm::exec::arg::BasicArg<1>); +typedef vtkm::internal::FunctionInterface TestExecutionInterface2; // Not a full worklet, but provides operators that we expect in a worklet. struct TestWorkletProxy : vtkm::exec::FunctorBase { VTKM_EXEC - void operator()(vtkm::Id input, vtkm::Id &output) const - { - output = input + 100; - } + void operator()(vtkm::Id input, vtkm::Id& output) const { output = input + 100; } VTKM_EXEC - vtkm::Id operator()(vtkm::Id input) const - { - return input + 200; - } + vtkm::Id operator()(vtkm::Id input) const { return input + 200; } - template - VTKM_EXEC - vtkm::exec::arg::ThreadIndicesBasic - GetThreadIndices(const T& threadIndex, - const OutToInArrayType& outToIn, - const VisitArrayType& visit, - const InputDomainType &, - const G& globalThreadIndexOffset) const + template + VTKM_EXEC vtkm::exec::arg::ThreadIndicesBasic GetThreadIndices( + const T& threadIndex, const OutToInArrayType& outToIn, const VisitArrayType& visit, + const InputDomainType&, const G& globalThreadIndexOffset) const { - return vtkm::exec::arg::ThreadIndicesBasic(threadIndex, - outToIn.Get(threadIndex), - visit.Get(threadIndex), - globalThreadIndexOffset ); + return vtkm::exec::arg::ThreadIndicesBasic(threadIndex, outToIn.Get(threadIndex), + visit.Get(threadIndex), globalThreadIndexOffset); } }; -template -void CallDoWorkletInvokeFunctor(const Invocation &invocation, vtkm::Id index) +template +void CallDoWorkletInvokeFunctor(const Invocation& invocation, vtkm::Id index) { vtkm::exec::internal::detail::DoWorkletInvokeFunctor( - TestWorkletProxy(), - invocation, - vtkm::exec::arg::ThreadIndicesBasic(index, - invocation.OutputToInputMap.Get(index), - invocation.VisitArray.Get(index) ) - ); + TestWorkletProxy(), invocation, + vtkm::exec::arg::ThreadIndicesBasic(index, invocation.OutputToInputMap.Get(index), + invocation.VisitArray.Get(index))); } void TestDoWorkletInvoke() @@ -194,40 +181,31 @@ void TestDoWorkletInvoke() vtkm::Id inputTestValue; vtkm::Id outputTestValue; - vtkm::internal::FunctionInterface execObjects = - vtkm::internal::make_FunctionInterface(TestExecObject(&inputTestValue), - TestExecObject(&outputTestValue)); + vtkm::internal::FunctionInterface execObjects = + vtkm::internal::make_FunctionInterface(TestExecObject(&inputTestValue), + TestExecObject(&outputTestValue)); std::cout << " Try void return." << std::endl; inputTestValue = 5; outputTestValue = static_cast(0xDEADDEAD); - CallDoWorkletInvokeFunctor( - vtkm::internal::make_Invocation<1>(execObjects, - TestControlInterface(), - TestExecutionInterface1(), - MyOutputToInputMapPortal(), - MyVisitArrayPortal()), - 1); + CallDoWorkletInvokeFunctor(vtkm::internal::make_Invocation<1>( + execObjects, TestControlInterface(), TestExecutionInterface1(), + MyOutputToInputMapPortal(), MyVisitArrayPortal()), + 1); VTKM_TEST_ASSERT(inputTestValue == 5, "Input value changed."); - VTKM_TEST_ASSERT(outputTestValue == inputTestValue + 100 + 30, - "Output value not set right."); + VTKM_TEST_ASSERT(outputTestValue == inputTestValue + 100 + 30, "Output value not set right."); std::cout << " Try return value." << std::endl; inputTestValue = 6; outputTestValue = static_cast(0xDEADDEAD); - CallDoWorkletInvokeFunctor( - vtkm::internal::make_Invocation<1>(execObjects, - TestControlInterface(), - TestExecutionInterface2(), - MyOutputToInputMapPortal(), - MyVisitArrayPortal()), - 2); + CallDoWorkletInvokeFunctor(vtkm::internal::make_Invocation<1>( + execObjects, TestControlInterface(), TestExecutionInterface2(), + MyOutputToInputMapPortal(), MyVisitArrayPortal()), + 2); VTKM_TEST_ASSERT(inputTestValue == 6, "Input value changed."); - VTKM_TEST_ASSERT(outputTestValue == inputTestValue + 200 + 30*2, - "Output value not set right."); + VTKM_TEST_ASSERT(outputTestValue == inputTestValue + 200 + 30 * 2, "Output value not set right."); } - void TestWorkletInvokeFunctor() { TestDoWorkletInvoke(); @@ -235,7 +213,7 @@ void TestWorkletInvokeFunctor() } // anonymous namespace -int UnitTestWorkletInvokeFunctor(int, char *[]) +int UnitTestWorkletInvokeFunctor(int, char* []) { return vtkm::testing::Testing::Run(TestWorkletInvokeFunctor); } diff --git a/vtkm/exec/testing/UnitTestCellDerivative.cxx b/vtkm/exec/testing/UnitTestCellDerivative.cxx index 257597200..13e1a8ddf 100644 --- a/vtkm/exec/testing/UnitTestCellDerivative.cxx +++ b/vtkm/exec/testing/UnitTestCellDerivative.cxx @@ -32,47 +32,46 @@ #include #include -namespace { +namespace +{ std::mt19937 g_RandomGenerator; // Establish simple mapping between world and parametric coordinates. // Actuall world/parametric coordinates are in a different test. -template -vtkm::Vec ParametricToWorld(const vtkm::Vec &pcoord) +template +vtkm::Vec ParametricToWorld(const vtkm::Vec& pcoord) { - return T(2)*pcoord - vtkm::Vec(0.25f); + return T(2) * pcoord - vtkm::Vec(0.25f); } -template -vtkm::Vec WorldToParametric(const vtkm::Vec &wcoord) +template +vtkm::Vec WorldToParametric(const vtkm::Vec& wcoord) { - return T(0.5)*(wcoord + vtkm::Vec(0.25f)); + return T(0.5) * (wcoord + vtkm::Vec(0.25f)); } /// Simple structure describing a linear field. Has a convienience class /// for getting values. -template -struct LinearField { - vtkm::Vec Gradient; +template +struct LinearField +{ + vtkm::Vec Gradient; FieldType OriginValue; - template - FieldType GetValue(vtkm::Vec coordinates) const + template + FieldType GetValue(vtkm::Vec coordinates) const { - return ( ( coordinates[0]*this->Gradient[0] + - coordinates[1]*this->Gradient[1] + - coordinates[2]*this->Gradient[2] ) - + this->OriginValue ); + return ((coordinates[0] * this->Gradient[0] + coordinates[1] * this->Gradient[1] + + coordinates[2] * this->Gradient[2]) + + this->OriginValue); } }; static const vtkm::IdComponent MAX_POINTS = 8; -template -void GetMinMaxPoints(CellShapeTag, - vtkm::CellTraitsTagSizeFixed, - vtkm::IdComponent &minPoints, - vtkm::IdComponent &maxPoints) +template +void GetMinMaxPoints(CellShapeTag, vtkm::CellTraitsTagSizeFixed, vtkm::IdComponent& minPoints, + vtkm::IdComponent& maxPoints) { // If this line fails, then MAX_POINTS is not large enough to support all // cell shapes. @@ -80,24 +79,21 @@ void GetMinMaxPoints(CellShapeTag, minPoints = maxPoints = vtkm::CellTraits::NUM_POINTS; } -template -void GetMinMaxPoints(CellShapeTag, - vtkm::CellTraitsTagSizeVariable, - vtkm::IdComponent &minPoints, - vtkm::IdComponent &maxPoints) +template +void GetMinMaxPoints(CellShapeTag, vtkm::CellTraitsTagSizeVariable, vtkm::IdComponent& minPoints, + vtkm::IdComponent& maxPoints) { minPoints = 1; maxPoints = MAX_POINTS; } -template +template struct TestDerivativeFunctor { - template - void DoTestWithWCoords(CellShapeTag shape, - const WCoordsVecType worldCoordinates, + template + void DoTestWithWCoords(CellShapeTag shape, const WCoordsVecType worldCoordinates, LinearField field, - vtkm::Vec expectedGradient) const + vtkm::Vec expectedGradient) const { // Stuff to fake running in the execution environment. char messageBuffer[256]; @@ -111,7 +107,7 @@ struct TestDerivativeFunctor vtkm::VecVariable fieldValues; for (vtkm::IdComponent pointIndex = 0; pointIndex < numPoints; pointIndex++) { - vtkm::Vec wcoords = worldCoordinates[pointIndex]; + vtkm::Vec wcoords = worldCoordinates[pointIndex]; FieldType value = static_cast(field.GetValue(wcoords)); fieldValues.Append(value); } @@ -123,32 +119,23 @@ struct TestDerivativeFunctor for (vtkm::IdComponent trial = 0; trial < 5; trial++) { // Generate a random pcoords that we know is in the cell. - vtkm::Vec pcoords(0); + vtkm::Vec pcoords(0); vtkm::FloatDefault totalWeight = 0; - for (vtkm::IdComponent pointIndex = 0; - pointIndex < numPoints; - pointIndex++) + for (vtkm::IdComponent pointIndex = 0; pointIndex < numPoints; pointIndex++) { - vtkm::Vec pointPcoords = - vtkm::exec::ParametricCoordinatesPoint(numPoints, - pointIndex, - shape, - workletProxy); + vtkm::Vec pointPcoords = + vtkm::exec::ParametricCoordinatesPoint(numPoints, pointIndex, shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); vtkm::FloatDefault weight = randomDist(g_RandomGenerator); - pcoords = pcoords + weight*pointPcoords; + pcoords = pcoords + weight * pointPcoords; totalWeight += weight; } - pcoords = (1/totalWeight)*pcoords; + pcoords = (1 / totalWeight) * pcoords; std::cout << " Test derivative at " << pcoords << std::endl; - vtkm::Vec computedGradient = - vtkm::exec::CellDerivative(fieldValues, - worldCoordinates, - pcoords, - shape, - workletProxy); + vtkm::Vec computedGradient = + vtkm::exec::CellDerivative(fieldValues, worldCoordinates, pcoords, shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); std::cout << " Computed: " << computedGradient << std::endl; @@ -160,11 +147,9 @@ struct TestDerivativeFunctor } } - template - void DoTest(CellShapeTag shape, - vtkm::IdComponent numPoints, - LinearField field, - vtkm::Vec expectedGradient) const + template + void DoTest(CellShapeTag shape, vtkm::IdComponent numPoints, LinearField field, + vtkm::Vec expectedGradient) const { // Stuff to fake running in the execution environment. char messageBuffer[256]; @@ -173,16 +158,13 @@ struct TestDerivativeFunctor vtkm::exec::FunctorBase workletProxy; workletProxy.SetErrorMessageBuffer(errorMessage); - vtkm::VecVariable, MAX_POINTS> worldCoordinates; + vtkm::VecVariable, MAX_POINTS> worldCoordinates; for (vtkm::IdComponent pointIndex = 0; pointIndex < numPoints; pointIndex++) { - vtkm::Vec pcoords = - vtkm::exec::ParametricCoordinatesPoint(numPoints, - pointIndex, - shape, - workletProxy); + vtkm::Vec pcoords = + vtkm::exec::ParametricCoordinatesPoint(numPoints, pointIndex, shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); - vtkm::Vec wcoords = ParametricToWorld(pcoords); + vtkm::Vec wcoords = ParametricToWorld(pcoords); VTKM_TEST_ASSERT(test_equal(pcoords, WorldToParametric(wcoords)), "Test world/parametric conversion broken."); worldCoordinates.Append(wcoords); @@ -191,27 +173,24 @@ struct TestDerivativeFunctor this->DoTestWithWCoords(shape, worldCoordinates, field, expectedGradient); } - template - void DoTest(CellShapeTag shape, - vtkm::IdComponent numPoints, - vtkm::IdComponent topDim) const + template + void DoTest(CellShapeTag shape, vtkm::IdComponent numPoints, vtkm::IdComponent topDim) const { LinearField field; - vtkm::Vec expectedGradient; + vtkm::Vec expectedGradient; using FieldTraits = vtkm::VecTraits; using FieldComponentType = typename FieldTraits::ComponentType; // Correct topDim for polygons with fewer than 3 points. - if (topDim > numPoints-1) + if (topDim > numPoints - 1) { - topDim = numPoints-1; + topDim = numPoints - 1; } std::cout << "Simple field, " << numPoints << " points" << std::endl; for (vtkm::IdComponent fieldComponent = 0; - fieldComponent < FieldTraits::GetNumberOfComponents(FieldType()); - fieldComponent++) + fieldComponent < FieldTraits::GetNumberOfComponents(FieldType()); fieldComponent++) { FieldTraits::SetComponent(field.OriginValue, fieldComponent, 0.0); } @@ -223,12 +202,9 @@ struct TestDerivativeFunctor std::cout << "Uneven gradient, " << numPoints << " points" << std::endl; for (vtkm::IdComponent fieldComponent = 0; - fieldComponent < FieldTraits::GetNumberOfComponents(FieldType()); - fieldComponent++) + fieldComponent < FieldTraits::GetNumberOfComponents(FieldType()); fieldComponent++) { - FieldTraits::SetComponent(field.OriginValue, - fieldComponent, - FieldComponentType(-7.0f)); + FieldTraits::SetComponent(field.OriginValue, fieldComponent, FieldComponentType(-7.0f)); } field.Gradient = vtkm::make_Vec(FieldType(0.25f), FieldType(14.0f), FieldType(11.125f)); expectedGradient[0] = ((topDim > 0) ? field.Gradient[0] : FieldType(0)); @@ -238,12 +214,9 @@ struct TestDerivativeFunctor std::cout << "Negative gradient directions, " << numPoints << " points" << std::endl; for (vtkm::IdComponent fieldComponent = 0; - fieldComponent < FieldTraits::GetNumberOfComponents(FieldType()); - fieldComponent++) + fieldComponent < FieldTraits::GetNumberOfComponents(FieldType()); fieldComponent++) { - FieldTraits::SetComponent(field.OriginValue, - fieldComponent, - FieldComponentType(5.0f)); + FieldTraits::SetComponent(field.OriginValue, fieldComponent, FieldComponentType(5.0f)); } field.Gradient = vtkm::make_Vec(FieldType(-11.125f), FieldType(-0.25f), FieldType(14.0f)); expectedGradient[0] = ((topDim > 0) ? field.Gradient[0] : FieldType(0)); @@ -254,21 +227,12 @@ struct TestDerivativeFunctor std::cout << "Random linear field, " << numPoints << " points" << std::endl; std::uniform_real_distribution randomDist(-20.0f, 20.0f); for (vtkm::IdComponent fieldComponent = 0; - fieldComponent < FieldTraits::GetNumberOfComponents(FieldType()); - fieldComponent++) + fieldComponent < FieldTraits::GetNumberOfComponents(FieldType()); fieldComponent++) { - FieldTraits::SetComponent(field.OriginValue, - fieldComponent, - randomDist(g_RandomGenerator)); - FieldTraits::SetComponent(field.Gradient[0], - fieldComponent, - randomDist(g_RandomGenerator)); - FieldTraits::SetComponent(field.Gradient[1], - fieldComponent, - randomDist(g_RandomGenerator)); - FieldTraits::SetComponent(field.Gradient[2], - fieldComponent, - randomDist(g_RandomGenerator)); + FieldTraits::SetComponent(field.OriginValue, fieldComponent, randomDist(g_RandomGenerator)); + FieldTraits::SetComponent(field.Gradient[0], fieldComponent, randomDist(g_RandomGenerator)); + FieldTraits::SetComponent(field.Gradient[1], fieldComponent, randomDist(g_RandomGenerator)); + FieldTraits::SetComponent(field.Gradient[2], fieldComponent, randomDist(g_RandomGenerator)); } expectedGradient[0] = ((topDim > 0) ? field.Gradient[0] : FieldType(0)); expectedGradient[1] = ((topDim > 1) ? field.Gradient[1] : FieldType(0)); @@ -276,35 +240,26 @@ struct TestDerivativeFunctor this->DoTest(shape, numPoints, field, expectedGradient); } - template + template void operator()(CellShapeTag) const { vtkm::IdComponent minPoints; vtkm::IdComponent maxPoints; - GetMinMaxPoints(CellShapeTag(), - typename vtkm::CellTraits::IsSizeFixed(), - minPoints, - maxPoints); + GetMinMaxPoints(CellShapeTag(), typename vtkm::CellTraits::IsSizeFixed(), + minPoints, maxPoints); std::cout << "--- Test shape tag directly" << std::endl; - for (vtkm::IdComponent numPoints = minPoints; - numPoints <= maxPoints; - numPoints++) + for (vtkm::IdComponent numPoints = minPoints; numPoints <= maxPoints; numPoints++) { - this->DoTest(CellShapeTag(), - numPoints, + this->DoTest(CellShapeTag(), numPoints, vtkm::CellTraits::TOPOLOGICAL_DIMENSIONS); } std::cout << "--- Test generic shape tag" << std::endl; vtkm::CellShapeTagGeneric genericShape(CellShapeTag::Id); - for (vtkm::IdComponent numPoints = minPoints; - numPoints <= maxPoints; - numPoints++) + for (vtkm::IdComponent numPoints = minPoints; numPoints <= maxPoints; numPoints++) { - this->DoTest(genericShape, - numPoints, - vtkm::CellTraits::TOPOLOGICAL_DIMENSIONS); + this->DoTest(genericShape, numPoints, vtkm::CellTraits::TOPOLOGICAL_DIMENSIONS); } } @@ -325,86 +280,68 @@ void TestDerivative() std::cout << "======== Float64 ==========================" << std::endl; vtkm::testing::Testing::TryAllCellShapes(TestDerivativeFunctor()); std::cout << "======== Vec ===================" << std::endl; - vtkm::testing::Testing::TryAllCellShapes(TestDerivativeFunctor >()); + vtkm::testing::Testing::TryAllCellShapes(TestDerivativeFunctor>()); std::cout << "======== Vec ===================" << std::endl; - vtkm::testing::Testing::TryAllCellShapes(TestDerivativeFunctor >()); + vtkm::testing::Testing::TryAllCellShapes(TestDerivativeFunctor>()); std::uniform_real_distribution randomDist(-20.0, 20.0); - vtkm::Vec origin = vtkm::Vec(0.25f, 0.25f, 0.25f); - vtkm::Vec spacing = vtkm::Vec(2.0f, 2.0f, 2.0f); + vtkm::Vec origin = vtkm::Vec(0.25f, 0.25f, 0.25f); + vtkm::Vec spacing = vtkm::Vec(2.0f, 2.0f, 2.0f); LinearField scalarField; scalarField.OriginValue = randomDist(g_RandomGenerator); - scalarField.Gradient = vtkm::make_Vec(randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator)); - vtkm::Vec expectedScalarGradient = scalarField.Gradient; + scalarField.Gradient = vtkm::make_Vec( + randomDist(g_RandomGenerator), randomDist(g_RandomGenerator), randomDist(g_RandomGenerator)); + vtkm::Vec expectedScalarGradient = scalarField.Gradient; TestDerivativeFunctor testFunctorScalar; std::cout << "======== Uniform Point Coordinates 3D =====" << std::endl; - testFunctorScalar.DoTestWithWCoords( - vtkm::CellShapeTagHexahedron(), - vtkm::VecRectilinearPointCoordinates<3>(origin, spacing), - scalarField, - expectedScalarGradient); + testFunctorScalar.DoTestWithWCoords(vtkm::CellShapeTagHexahedron(), + vtkm::VecRectilinearPointCoordinates<3>(origin, spacing), + scalarField, expectedScalarGradient); std::cout << "======== Uniform Point Coordinates 2D =====" << std::endl; expectedScalarGradient[2] = 0.0; - testFunctorScalar.DoTestWithWCoords( - vtkm::CellShapeTagQuad(), - vtkm::VecRectilinearPointCoordinates<2>(origin, spacing), - scalarField, - expectedScalarGradient); + testFunctorScalar.DoTestWithWCoords(vtkm::CellShapeTagQuad(), + vtkm::VecRectilinearPointCoordinates<2>(origin, spacing), + scalarField, expectedScalarGradient); std::cout << "======== Uniform Point Coordinates 1D =====" << std::endl; expectedScalarGradient[1] = 0.0; - testFunctorScalar.DoTestWithWCoords( - vtkm::CellShapeTagLine(), - vtkm::VecRectilinearPointCoordinates<1>(origin, spacing), - scalarField, - expectedScalarGradient); + testFunctorScalar.DoTestWithWCoords(vtkm::CellShapeTagLine(), + vtkm::VecRectilinearPointCoordinates<1>(origin, spacing), + scalarField, expectedScalarGradient); - LinearField > vectorField; - vectorField.OriginValue = vtkm::make_Vec(randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator)); - vectorField.Gradient = vtkm::make_Vec( - vtkm::make_Vec(randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator)), - vtkm::make_Vec(randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator)), - vtkm::make_Vec(randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator))); - vtkm::Vec,3> expectedVectorGradient = - vectorField.Gradient; + LinearField> vectorField; + vectorField.OriginValue = vtkm::make_Vec( + randomDist(g_RandomGenerator), randomDist(g_RandomGenerator), randomDist(g_RandomGenerator)); + vectorField.Gradient = + vtkm::make_Vec(vtkm::make_Vec(randomDist(g_RandomGenerator), randomDist(g_RandomGenerator), + randomDist(g_RandomGenerator)), + vtkm::make_Vec(randomDist(g_RandomGenerator), randomDist(g_RandomGenerator), + randomDist(g_RandomGenerator)), + vtkm::make_Vec(randomDist(g_RandomGenerator), randomDist(g_RandomGenerator), + randomDist(g_RandomGenerator))); + vtkm::Vec, 3> expectedVectorGradient = vectorField.Gradient; - TestDerivativeFunctor > testFunctorVector; + TestDerivativeFunctor> testFunctorVector; std::cout << "======== Uniform Point Coordinates 3D =====" << std::endl; - testFunctorVector.DoTestWithWCoords( - vtkm::CellShapeTagHexahedron(), - vtkm::VecRectilinearPointCoordinates<3>(origin, spacing), - vectorField, - expectedVectorGradient); + testFunctorVector.DoTestWithWCoords(vtkm::CellShapeTagHexahedron(), + vtkm::VecRectilinearPointCoordinates<3>(origin, spacing), + vectorField, expectedVectorGradient); std::cout << "======== Uniform Point Coordinates 2D =====" << std::endl; - expectedVectorGradient[2] = vtkm::Vec(0.0); - testFunctorVector.DoTestWithWCoords( - vtkm::CellShapeTagQuad(), - vtkm::VecRectilinearPointCoordinates<2>(origin, spacing), - vectorField, - expectedVectorGradient); + expectedVectorGradient[2] = vtkm::Vec(0.0); + testFunctorVector.DoTestWithWCoords(vtkm::CellShapeTagQuad(), + vtkm::VecRectilinearPointCoordinates<2>(origin, spacing), + vectorField, expectedVectorGradient); std::cout << "======== Uniform Point Coordinates 1D =====" << std::endl; - expectedVectorGradient[1] = vtkm::Vec(0.0); - testFunctorVector.DoTestWithWCoords( - vtkm::CellShapeTagLine(), - vtkm::VecRectilinearPointCoordinates<1>(origin, spacing), - vectorField, - expectedVectorGradient); + expectedVectorGradient[1] = vtkm::Vec(0.0); + testFunctorVector.DoTestWithWCoords(vtkm::CellShapeTagLine(), + vtkm::VecRectilinearPointCoordinates<1>(origin, spacing), + vectorField, expectedVectorGradient); } } // anonymous namespace -int UnitTestCellDerivative(int, char *[]) +int UnitTestCellDerivative(int, char* []) { return vtkm::testing::Testing::Run(TestDerivative); } diff --git a/vtkm/exec/testing/UnitTestCellEdgeFace.cxx b/vtkm/exec/testing/UnitTestCellEdgeFace.cxx index 1e33c80b8..fb79ffee2 100644 --- a/vtkm/exec/testing/UnitTestCellEdgeFace.cxx +++ b/vtkm/exec/testing/UnitTestCellEdgeFace.cxx @@ -30,11 +30,12 @@ #include -namespace { +namespace +{ -using EdgeType = vtkm::Vec; +using EdgeType = vtkm::Vec; -void MakeEdgeCononical(EdgeType &edge) +void MakeEdgeCononical(EdgeType& edge) { if (edge[1] < edge[0]) { @@ -44,9 +45,8 @@ void MakeEdgeCononical(EdgeType &edge) struct TestCellFacesFunctor { - template - void DoTest(vtkm::IdComponent numPoints, - CellShapeTag shape, + template + void DoTest(vtkm::IdComponent numPoints, CellShapeTag shape, vtkm::CellTopologicalDimensionsTag<3>) const { // Stuff to fake running in the execution environment. @@ -56,61 +56,50 @@ struct TestCellFacesFunctor vtkm::exec::FunctorBase workletProxy; workletProxy.SetErrorMessageBuffer(errorMessage); - vtkm::IdComponent numEdges = - vtkm::exec::CellEdgeNumberOfEdges(numPoints, shape, workletProxy); + vtkm::IdComponent numEdges = vtkm::exec::CellEdgeNumberOfEdges(numPoints, shape, workletProxy); VTKM_TEST_ASSERT(numEdges > 0, "No edges?"); std::set edgeSet; for (vtkm::IdComponent edgeIndex = 0; edgeIndex < numEdges; edgeIndex++) { - EdgeType edge = vtkm::exec::CellEdgeLocalIndices( - numPoints, edgeIndex, shape, workletProxy); + EdgeType edge = vtkm::exec::CellEdgeLocalIndices(numPoints, edgeIndex, shape, workletProxy); VTKM_TEST_ASSERT(edge[0] >= 0, "Bad index in edge."); VTKM_TEST_ASSERT(edge[0] < numPoints, "Bad index in edge."); VTKM_TEST_ASSERT(edge[1] >= 0, "Bad index in edge."); VTKM_TEST_ASSERT(edge[1] < numPoints, "Bad index in edge."); VTKM_TEST_ASSERT(edge[0] != edge[1], "Degenerate edge."); MakeEdgeCononical(edge); - VTKM_TEST_ASSERT(edge[0] < edge[1], - "Internal test error: MakeEdgeCononical failed"); - VTKM_TEST_ASSERT(edgeSet.find(edge) == edgeSet.end(), - "Found duplicate edge"); + VTKM_TEST_ASSERT(edge[0] < edge[1], "Internal test error: MakeEdgeCononical failed"); + VTKM_TEST_ASSERT(edgeSet.find(edge) == edgeSet.end(), "Found duplicate edge"); edgeSet.insert(edge); } - vtkm::IdComponent numFaces = - vtkm::exec::CellFaceNumberOfFaces(shape, workletProxy); + vtkm::IdComponent numFaces = vtkm::exec::CellFaceNumberOfFaces(shape, workletProxy); VTKM_TEST_ASSERT(numFaces > 0, "No faces?"); std::set edgesFoundInFaces; for (vtkm::IdComponent faceIndex = 0; faceIndex < numFaces; faceIndex++) { vtkm::VecCConst facePoints = - vtkm::exec::CellFaceLocalIndices(faceIndex, shape, workletProxy); + vtkm::exec::CellFaceLocalIndices(faceIndex, shape, workletProxy); vtkm::IdComponent numPointsInFace = facePoints.GetNumberOfComponents(); - VTKM_TEST_ASSERT(numPointsInFace >= 3, - "Face has fewer points than a triangle."); + VTKM_TEST_ASSERT(numPointsInFace >= 3, "Face has fewer points than a triangle."); - for (vtkm::IdComponent pointIndex = 0; - pointIndex < numPointsInFace; - pointIndex++) + for (vtkm::IdComponent pointIndex = 0; pointIndex < numPointsInFace; pointIndex++) { - VTKM_TEST_ASSERT(facePoints[pointIndex] >= 0, - "Invalid point index for face."); - VTKM_TEST_ASSERT(facePoints[pointIndex] <= numPoints, - "Invalid point index for face."); + VTKM_TEST_ASSERT(facePoints[pointIndex] >= 0, "Invalid point index for face."); + VTKM_TEST_ASSERT(facePoints[pointIndex] <= numPoints, "Invalid point index for face."); EdgeType edge; - if (pointIndex < numPointsInFace-1) + if (pointIndex < numPointsInFace - 1) { - edge = EdgeType(facePoints[pointIndex], facePoints[pointIndex+1]); + edge = EdgeType(facePoints[pointIndex], facePoints[pointIndex + 1]); } else { edge = EdgeType(facePoints[0], facePoints[pointIndex]); } MakeEdgeCononical(edge); - VTKM_TEST_ASSERT(edgeSet.find(edge) != edgeSet.end(), - "Edge in face not in cell's edges"); + VTKM_TEST_ASSERT(edgeSet.find(edge) != edgeSet.end(), "Edge in face not in cell's edges"); edgesFoundInFaces.insert(edge); } } @@ -119,9 +108,8 @@ struct TestCellFacesFunctor } // Case of cells that have 2 dimensions (no faces) - template - void DoTest(vtkm::IdComponent numPoints, - CellShapeTag shape, + template + void DoTest(vtkm::IdComponent numPoints, CellShapeTag shape, vtkm::CellTopologicalDimensionsTag<2>) const { // Stuff to fake running in the execution environment. @@ -131,39 +119,32 @@ struct TestCellFacesFunctor vtkm::exec::FunctorBase workletProxy; workletProxy.SetErrorMessageBuffer(errorMessage); - vtkm::IdComponent numEdges = - vtkm::exec::CellEdgeNumberOfEdges(numPoints, shape, workletProxy); - VTKM_TEST_ASSERT(numEdges == numPoints, - "Polygons should have same number of points and edges"); + vtkm::IdComponent numEdges = vtkm::exec::CellEdgeNumberOfEdges(numPoints, shape, workletProxy); + VTKM_TEST_ASSERT(numEdges == numPoints, "Polygons should have same number of points and edges"); std::set edgeSet; for (vtkm::IdComponent edgeIndex = 0; edgeIndex < numEdges; edgeIndex++) { - EdgeType edge = vtkm::exec::CellEdgeLocalIndices( - numPoints, edgeIndex, shape, workletProxy); + EdgeType edge = vtkm::exec::CellEdgeLocalIndices(numPoints, edgeIndex, shape, workletProxy); VTKM_TEST_ASSERT(edge[0] >= 0, "Bad index in edge."); VTKM_TEST_ASSERT(edge[0] < numPoints, "Bad index in edge."); VTKM_TEST_ASSERT(edge[1] >= 0, "Bad index in edge."); VTKM_TEST_ASSERT(edge[1] < numPoints, "Bad index in edge."); VTKM_TEST_ASSERT(edge[0] != edge[1], "Degenerate edge."); MakeEdgeCononical(edge); - VTKM_TEST_ASSERT(edge[0] < edge[1], - "Internal test error: MakeEdgeCononical failed"); - VTKM_TEST_ASSERT(edgeSet.find(edge) == edgeSet.end(), - "Found duplicate edge"); + VTKM_TEST_ASSERT(edge[0] < edge[1], "Internal test error: MakeEdgeCononical failed"); + VTKM_TEST_ASSERT(edgeSet.find(edge) == edgeSet.end(), "Found duplicate edge"); edgeSet.insert(edge); } - vtkm::IdComponent numFaces = - vtkm::exec::CellFaceNumberOfFaces(shape, workletProxy); + vtkm::IdComponent numFaces = vtkm::exec::CellFaceNumberOfFaces(shape, workletProxy); VTKM_TEST_ASSERT(numFaces == 0, "Non 3D shape should have no faces"); } // Less important case of cells that have less than 2 dimensions // (no faces or edges) - template - void DoTest(vtkm::IdComponent numPoints, - CellShapeTag shape, + template + void DoTest(vtkm::IdComponent numPoints, CellShapeTag shape, vtkm::CellTopologicalDimensionsTag) const { // Stuff to fake running in the execution environment. @@ -173,48 +154,38 @@ struct TestCellFacesFunctor vtkm::exec::FunctorBase workletProxy; workletProxy.SetErrorMessageBuffer(errorMessage); - vtkm::IdComponent numEdges = - vtkm::exec::CellEdgeNumberOfEdges(numPoints, shape, workletProxy); + vtkm::IdComponent numEdges = vtkm::exec::CellEdgeNumberOfEdges(numPoints, shape, workletProxy); VTKM_TEST_ASSERT(numEdges == 0, "0D or 1D shape should have no edges"); - vtkm::IdComponent numFaces = - vtkm::exec::CellFaceNumberOfFaces(shape, workletProxy); + vtkm::IdComponent numFaces = vtkm::exec::CellFaceNumberOfFaces(shape, workletProxy); VTKM_TEST_ASSERT(numFaces == 0, "Non 3D shape should have no faces"); } - template - void TryShapeWithNumPoints(vtkm::IdComponent numPoints, - CellShapeTag) const + template + void TryShapeWithNumPoints(vtkm::IdComponent numPoints, CellShapeTag) const { std::cout << "--- Test shape tag directly" - << " (" << numPoints << " points)" - << std::endl; - this->DoTest( - numPoints, - CellShapeTag(), - typename vtkm::CellTraits::TopologicalDimensionsTag()); + << " (" << numPoints << " points)" << std::endl; + this->DoTest(numPoints, CellShapeTag(), + typename vtkm::CellTraits::TopologicalDimensionsTag()); std::cout << "--- Test generic shape tag" - << " (" << numPoints << " points)" - << std::endl; - this->DoTest( - numPoints, - vtkm::CellShapeTagGeneric(CellShapeTag::Id), - typename vtkm::CellTraits::TopologicalDimensionsTag()); + << " (" << numPoints << " points)" << std::endl; + this->DoTest(numPoints, vtkm::CellShapeTagGeneric(CellShapeTag::Id), + typename vtkm::CellTraits::TopologicalDimensionsTag()); } - template + template void operator()(CellShapeTag) const { - this->TryShapeWithNumPoints(vtkm::CellTraits::NUM_POINTS, - CellShapeTag()); + this->TryShapeWithNumPoints(vtkm::CellTraits::NUM_POINTS, CellShapeTag()); } void operator()(vtkm::CellShapeTagPolygon) const { for (vtkm::IdComponent numPoints = 3; numPoints < 7; numPoints++) { - this->TryShapeWithNumPoints(numPoints,vtkm::CellShapeTagPolygon()); + this->TryShapeWithNumPoints(numPoints, vtkm::CellShapeTagPolygon()); } } }; @@ -226,7 +197,7 @@ void TestAllShapes() } // anonymous namespace -int UnitTestCellEdgeFace(int, char *[]) +int UnitTestCellEdgeFace(int, char* []) { return vtkm::testing::Testing::Run(TestAllShapes); } diff --git a/vtkm/exec/testing/UnitTestCellInterpolate.cxx b/vtkm/exec/testing/UnitTestCellInterpolate.cxx index ecd3ff8f6..630aa3048 100644 --- a/vtkm/exec/testing/UnitTestCellInterpolate.cxx +++ b/vtkm/exec/testing/UnitTestCellInterpolate.cxx @@ -30,15 +30,14 @@ #include -namespace { +namespace +{ static const vtkm::IdComponent MAX_POINTS = 8; -template -void GetMinMaxPoints(CellShapeTag, - vtkm::CellTraitsTagSizeFixed, - vtkm::IdComponent &minPoints, - vtkm::IdComponent &maxPoints) +template +void GetMinMaxPoints(CellShapeTag, vtkm::CellTraitsTagSizeFixed, vtkm::IdComponent& minPoints, + vtkm::IdComponent& maxPoints) { // If this line fails, then MAX_POINTS is not large enough to support all // cell shapes. @@ -46,24 +45,21 @@ void GetMinMaxPoints(CellShapeTag, minPoints = maxPoints = vtkm::CellTraits::NUM_POINTS; } -template -void GetMinMaxPoints(CellShapeTag, - vtkm::CellTraitsTagSizeVariable, - vtkm::IdComponent &minPoints, - vtkm::IdComponent &maxPoints) +template +void GetMinMaxPoints(CellShapeTag, vtkm::CellTraitsTagSizeVariable, vtkm::IdComponent& minPoints, + vtkm::IdComponent& maxPoints) { minPoints = 1; maxPoints = MAX_POINTS; } -template +template struct TestInterpolateFunctor { typedef typename vtkm::VecTraits::ComponentType ComponentType; - template - void DoTestWithField(CellShapeTag shape, - const FieldVecType &fieldValues) const + template + void DoTestWithField(CellShapeTag shape, const FieldVecType& fieldValues) const { vtkm::IdComponent numPoints = fieldValues.GetNumberOfComponents(); FieldType averageValue = vtkm::TypeTraits::ZeroInitialization(); @@ -71,7 +67,7 @@ struct TestInterpolateFunctor { averageValue = averageValue + fieldValues[pointIndex]; } - averageValue = static_cast(1.0/numPoints)*averageValue; + averageValue = static_cast(1.0 / numPoints) * averageValue; // Stuff to fake running in the execution environment. char messageBuffer[256]; @@ -83,17 +79,11 @@ struct TestInterpolateFunctor std::cout << " Test interpolated value at each cell node." << std::endl; for (vtkm::IdComponent pointIndex = 0; pointIndex < numPoints; pointIndex++) { - vtkm::Vec pcoord = - vtkm::exec::ParametricCoordinatesPoint(numPoints, - pointIndex, - shape, - workletProxy); + vtkm::Vec pcoord = + vtkm::exec::ParametricCoordinatesPoint(numPoints, pointIndex, shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); FieldType interpolatedValue = - vtkm::exec::CellInterpolate(fieldValues, - pcoord, - shape, - workletProxy); + vtkm::exec::CellInterpolate(fieldValues, pcoord, shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); VTKM_TEST_ASSERT(test_equal(fieldValues[pointIndex], interpolatedValue), @@ -103,14 +93,11 @@ struct TestInterpolateFunctor if (numPoints > 0) { std::cout << " Test interpolated value at cell center." << std::endl; - vtkm::Vec pcoord = - vtkm::exec::ParametricCoordinatesCenter(numPoints,shape,workletProxy); + vtkm::Vec pcoord = + vtkm::exec::ParametricCoordinatesCenter(numPoints, shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); FieldType interpolatedValue = - vtkm::exec::CellInterpolate(fieldValues, - pcoord, - shape, - workletProxy); + vtkm::exec::CellInterpolate(fieldValues, pcoord, shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); VTKM_TEST_ASSERT(test_equal(averageValue, interpolatedValue), @@ -118,33 +105,29 @@ struct TestInterpolateFunctor } } - template + template void DoTest(CellShapeTag shape, vtkm::IdComponent numPoints) const { vtkm::VecVariable fieldValues; for (vtkm::IdComponent pointIndex = 0; pointIndex < numPoints; pointIndex++) { - FieldType value = TestValue(pointIndex+1, FieldType()); + FieldType value = TestValue(pointIndex + 1, FieldType()); fieldValues.Append(value); } this->DoTestWithField(shape, fieldValues); } - template + template void operator()(CellShapeTag) const { vtkm::IdComponent minPoints; vtkm::IdComponent maxPoints; - GetMinMaxPoints(CellShapeTag(), - typename vtkm::CellTraits::IsSizeFixed(), - minPoints, - maxPoints); + GetMinMaxPoints(CellShapeTag(), typename vtkm::CellTraits::IsSizeFixed(), + minPoints, maxPoints); std::cout << "--- Test shape tag directly" << std::endl; - for (vtkm::IdComponent numPoints = minPoints; - numPoints <= maxPoints; - numPoints++) + for (vtkm::IdComponent numPoints = minPoints; numPoints <= maxPoints; numPoints++) { std::cout << numPoints << " points" << std::endl; this->DoTest(CellShapeTag(), numPoints); @@ -152,9 +135,7 @@ struct TestInterpolateFunctor std::cout << "--- Test generic shape tag" << std::endl; vtkm::CellShapeTagGeneric genericShape(CellShapeTag::Id); - for (vtkm::IdComponent numPoints = minPoints; - numPoints <= maxPoints; - numPoints++) + for (vtkm::IdComponent numPoints = minPoints; numPoints <= maxPoints; numPoints++) { std::cout << numPoints << " points" << std::endl; this->DoTest(genericShape, numPoints); @@ -169,30 +150,27 @@ void TestInterpolate() std::cout << "======== Float64 ==========================" << std::endl; vtkm::testing::Testing::TryAllCellShapes(TestInterpolateFunctor()); std::cout << "======== Vec ===================" << std::endl; - vtkm::testing::Testing::TryAllCellShapes(TestInterpolateFunctor >()); + vtkm::testing::Testing::TryAllCellShapes(TestInterpolateFunctor>()); std::cout << "======== Vec ===================" << std::endl; - vtkm::testing::Testing::TryAllCellShapes(TestInterpolateFunctor >()); + vtkm::testing::Testing::TryAllCellShapes(TestInterpolateFunctor>()); - TestInterpolateFunctor > testFunctor; - vtkm::Vec origin = TestValue(0, vtkm::Vec()); - vtkm::Vec spacing = TestValue(1, vtkm::Vec()); + TestInterpolateFunctor> testFunctor; + vtkm::Vec origin = TestValue(0, vtkm::Vec()); + vtkm::Vec spacing = TestValue(1, vtkm::Vec()); std::cout << "======== Uniform Point Coordinates 1D =====" << std::endl; - testFunctor.DoTestWithField( - vtkm::CellShapeTagLine(), - vtkm::VecRectilinearPointCoordinates<1>(origin, spacing)); + testFunctor.DoTestWithField(vtkm::CellShapeTagLine(), + vtkm::VecRectilinearPointCoordinates<1>(origin, spacing)); std::cout << "======== Uniform Point Coordinates 2D =====" << std::endl; - testFunctor.DoTestWithField( - vtkm::CellShapeTagQuad(), - vtkm::VecRectilinearPointCoordinates<2>(origin, spacing)); + testFunctor.DoTestWithField(vtkm::CellShapeTagQuad(), + vtkm::VecRectilinearPointCoordinates<2>(origin, spacing)); std::cout << "======== Uniform Point Coordinates 3D =====" << std::endl; - testFunctor.DoTestWithField( - vtkm::CellShapeTagHexahedron(), - vtkm::VecRectilinearPointCoordinates<3>(origin, spacing)); + testFunctor.DoTestWithField(vtkm::CellShapeTagHexahedron(), + vtkm::VecRectilinearPointCoordinates<3>(origin, spacing)); } } // anonymous namespace -int UnitTestCellInterpolate(int, char *[]) +int UnitTestCellInterpolate(int, char* []) { return vtkm::testing::Testing::Run(TestInterpolate); } diff --git a/vtkm/exec/testing/UnitTestParametricCoordinates.cxx b/vtkm/exec/testing/UnitTestParametricCoordinates.cxx index 06fce4cc3..7c01ed64a 100644 --- a/vtkm/exec/testing/UnitTestParametricCoordinates.cxx +++ b/vtkm/exec/testing/UnitTestParametricCoordinates.cxx @@ -30,17 +30,16 @@ #include #include -namespace { +namespace +{ std::mt19937 g_RandomGenerator; static const vtkm::IdComponent MAX_POINTS = 8; -template -void GetMinMaxPoints(CellShapeTag, - vtkm::CellTraitsTagSizeFixed, - vtkm::IdComponent &minPoints, - vtkm::IdComponent &maxPoints) +template +void GetMinMaxPoints(CellShapeTag, vtkm::CellTraitsTagSizeFixed, vtkm::IdComponent& minPoints, + vtkm::IdComponent& maxPoints) { // If this line fails, then MAX_POINTS is not large enough to support all // cell shapes. @@ -48,25 +47,19 @@ void GetMinMaxPoints(CellShapeTag, minPoints = maxPoints = vtkm::CellTraits::NUM_POINTS; } -template -void GetMinMaxPoints(CellShapeTag, - vtkm::CellTraitsTagSizeVariable, - vtkm::IdComponent &minPoints, - vtkm::IdComponent &maxPoints) +template +void GetMinMaxPoints(CellShapeTag, vtkm::CellTraitsTagSizeVariable, vtkm::IdComponent& minPoints, + vtkm::IdComponent& maxPoints) { minPoints = 1; maxPoints = MAX_POINTS; } -template -static void CompareCoordinates(const PointWCoordsType &pointWCoords, - vtkm::Vec truePCoords, - vtkm::Vec trueWCoords, - CellShapeTag shape) +template +static void CompareCoordinates(const PointWCoordsType& pointWCoords, vtkm::Vec truePCoords, + vtkm::Vec trueWCoords, CellShapeTag shape) { - typedef vtkm::Vec Vector3; + typedef vtkm::Vec Vector3; // Stuff to fake running in the execution environment. char messageBuffer[256]; @@ -75,28 +68,21 @@ static void CompareCoordinates(const PointWCoordsType &pointWCoords, vtkm::exec::FunctorBase workletProxy; workletProxy.SetErrorMessageBuffer(errorMessage); - Vector3 computedWCoords - = vtkm::exec::ParametricCoordinatesToWorldCoordinates(pointWCoords, - truePCoords, - shape, - workletProxy); + Vector3 computedWCoords = vtkm::exec::ParametricCoordinatesToWorldCoordinates( + pointWCoords, truePCoords, shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); VTKM_TEST_ASSERT(test_equal(computedWCoords, trueWCoords, 0.01), "Computed wrong world coords from parametric coords."); - Vector3 computedPCoords - = vtkm::exec::WorldCoordinatesToParametricCoordinates(pointWCoords, - trueWCoords, - shape, - workletProxy); + Vector3 computedPCoords = vtkm::exec::WorldCoordinatesToParametricCoordinates( + pointWCoords, trueWCoords, shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); VTKM_TEST_ASSERT(test_equal(computedPCoords, truePCoords, 0.01), "Computed wrong parametric coords from world coords."); } -template -void TestPCoordsSpecial(const PointWCoordsType &pointWCoords, - CellShapeTag shape) +template +void TestPCoordsSpecial(const PointWCoordsType& pointWCoords, CellShapeTag shape) { typedef typename PointWCoordsType::ComponentType Vector3; typedef typename Vector3::ComponentType T; @@ -112,14 +98,13 @@ void TestPCoordsSpecial(const PointWCoordsType &pointWCoords, std::cout << " Test parametric coordinates at cell nodes." << std::endl; for (vtkm::IdComponent pointIndex = 0; pointIndex < numPoints; pointIndex++) - { + { Vector3 pcoords; - vtkm::exec::ParametricCoordinatesPoint( - numPoints, pointIndex, pcoords, shape, workletProxy); + vtkm::exec::ParametricCoordinatesPoint(numPoints, pointIndex, pcoords, shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); Vector3 wcoords = pointWCoords[pointIndex]; CompareCoordinates(pointWCoords, pcoords, wcoords, shape); - } + } { std::cout << " Test parametric coordinates at cell center." << std::endl; @@ -128,18 +113,16 @@ void TestPCoordsSpecial(const PointWCoordsType &pointWCoords, { wcoords = wcoords + pointWCoords[pointIndex]; } - wcoords = wcoords/Vector3(T(numPoints)); + wcoords = wcoords / Vector3(T(numPoints)); Vector3 pcoords; - vtkm::exec::ParametricCoordinatesCenter( - numPoints, pcoords, shape, workletProxy); + vtkm::exec::ParametricCoordinatesCenter(numPoints, pcoords, shape, workletProxy); CompareCoordinates(pointWCoords, pcoords, wcoords, shape); } } -template -void TestPCoordsSample(const PointWCoordsType &pointWCoords, - CellShapeTag shape) +template +void TestPCoordsSample(const PointWCoordsType& pointWCoords, CellShapeTag shape) { typedef typename PointWCoordsType::ComponentType Vector3; @@ -157,39 +140,28 @@ void TestPCoordsSample(const PointWCoordsType &pointWCoords, for (vtkm::IdComponent trial = 0; trial < 5; trial++) { // Generate a random pcoords that we know is in the cell. - vtkm::Vec pcoords(0); + vtkm::Vec pcoords(0); vtkm::FloatDefault totalWeight = 0; - for (vtkm::IdComponent pointIndex = 0; - pointIndex < numPoints; - pointIndex++) + for (vtkm::IdComponent pointIndex = 0; pointIndex < numPoints; pointIndex++) { - vtkm::Vec pointPcoords = - vtkm::exec::ParametricCoordinatesPoint(numPoints, - pointIndex, - shape, - workletProxy); + vtkm::Vec pointPcoords = + vtkm::exec::ParametricCoordinatesPoint(numPoints, pointIndex, shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); vtkm::FloatDefault weight = randomDist(g_RandomGenerator); - pcoords = pcoords + weight*pointPcoords; + pcoords = pcoords + weight * pointPcoords; totalWeight += weight; } - pcoords = (1/totalWeight)*pcoords; + pcoords = (1 / totalWeight) * pcoords; std::cout << " Test parametric coordinates at " << pcoords << std::endl; // If you convert to world coordinates and back, you should get the // same value. - Vector3 wcoords = - vtkm::exec::ParametricCoordinatesToWorldCoordinates(pointWCoords, - pcoords, - shape, - workletProxy); + Vector3 wcoords = vtkm::exec::ParametricCoordinatesToWorldCoordinates(pointWCoords, pcoords, + shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); - Vector3 computedPCoords = - vtkm::exec::WorldCoordinatesToParametricCoordinates(pointWCoords, - wcoords, - shape, - workletProxy); + Vector3 computedPCoords = vtkm::exec::WorldCoordinatesToParametricCoordinates( + pointWCoords, wcoords, shape, workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); VTKM_TEST_ASSERT(test_equal(pcoords, computedPCoords, 0.05), @@ -197,23 +169,21 @@ void TestPCoordsSample(const PointWCoordsType &pointWCoords, } } -template -static void TestPCoords(const PointWCoordsType &pointWCoords, - CellShellTag shape) +template +static void TestPCoords(const PointWCoordsType& pointWCoords, CellShellTag shape) { TestPCoordsSpecial(pointWCoords, shape); TestPCoordsSample(pointWCoords, shape); } -template +template struct TestPCoordsFunctor { - typedef vtkm::Vec Vector3; - typedef vtkm::VecVariable PointWCoordType; + typedef vtkm::Vec Vector3; + typedef vtkm::VecVariable PointWCoordType; - template - PointWCoordType MakePointWCoords(CellShapeTag, - vtkm::IdComponent numPoints) const + template + PointWCoordType MakePointWCoords(CellShapeTag, vtkm::IdComponent numPoints) const { // Stuff to fake running in the execution environment. char messageBuffer[256]; @@ -222,56 +192,44 @@ struct TestPCoordsFunctor vtkm::exec::FunctorBase workletProxy; workletProxy.SetErrorMessageBuffer(errorMessage); - std::uniform_real_distribution randomDist(-1,1); + std::uniform_real_distribution randomDist(-1, 1); - Vector3 sheerVec(randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator), - 0); + Vector3 sheerVec(randomDist(g_RandomGenerator), randomDist(g_RandomGenerator), 0); PointWCoordType pointWCoords; for (vtkm::IdComponent pointIndex = 0; pointIndex < numPoints; pointIndex++) { Vector3 pcoords; - vtkm::exec::ParametricCoordinatesPoint( - numPoints, pointIndex, pcoords, CellShapeTag(), workletProxy); + vtkm::exec::ParametricCoordinatesPoint(numPoints, pointIndex, pcoords, CellShapeTag(), + workletProxy); VTKM_TEST_ASSERT(!errorMessage.IsErrorRaised(), messageBuffer); - Vector3 wCoords = Vector3(pcoords[0], - pcoords[1], - pcoords[2] + vtkm::dot(pcoords,sheerVec)); + Vector3 wCoords = Vector3(pcoords[0], pcoords[1], pcoords[2] + vtkm::dot(pcoords, sheerVec)); pointWCoords.Append(wCoords); } return pointWCoords; } - template + template void operator()(CellShapeTag) const { vtkm::IdComponent minPoints; vtkm::IdComponent maxPoints; - GetMinMaxPoints(CellShapeTag(), - typename vtkm::CellTraits::IsSizeFixed(), - minPoints, - maxPoints); + GetMinMaxPoints(CellShapeTag(), typename vtkm::CellTraits::IsSizeFixed(), + minPoints, maxPoints); std::cout << "--- Test shape tag directly" << std::endl; - for (vtkm::IdComponent numPoints = minPoints; - numPoints <= maxPoints; - numPoints++) + for (vtkm::IdComponent numPoints = minPoints; numPoints <= maxPoints; numPoints++) { - TestPCoords(this->MakePointWCoords(CellShapeTag(), numPoints), - CellShapeTag()); + TestPCoords(this->MakePointWCoords(CellShapeTag(), numPoints), CellShapeTag()); } std::cout << "--- Test generic shape tag" << std::endl; vtkm::CellShapeTagGeneric genericShape(CellShapeTag::Id); - for (vtkm::IdComponent numPoints = minPoints; - numPoints <= maxPoints; - numPoints++) + for (vtkm::IdComponent numPoints = minPoints; numPoints <= maxPoints; numPoints++) { - TestPCoords(this->MakePointWCoords(CellShapeTag(), numPoints), - genericShape); + TestPCoords(this->MakePointWCoords(CellShapeTag(), numPoints), genericShape); } } @@ -293,25 +251,21 @@ void TestAllPCoords() vtkm::testing::Testing::TryAllCellShapes(TestPCoordsFunctor()); std::cout << "======== Rectilinear Shapes ===============" << std::endl; - std::uniform_real_distribution randomDist(0.01f,1.0f); - vtkm::Vec origin(randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator)); - vtkm::Vec spacing(randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator), - randomDist(g_RandomGenerator)); + std::uniform_real_distribution randomDist(0.01f, 1.0f); + vtkm::Vec origin( + randomDist(g_RandomGenerator), randomDist(g_RandomGenerator), randomDist(g_RandomGenerator)); + vtkm::Vec spacing( + randomDist(g_RandomGenerator), randomDist(g_RandomGenerator), randomDist(g_RandomGenerator)); TestPCoords(vtkm::VecRectilinearPointCoordinates<3>(origin, spacing), vtkm::CellShapeTagHexahedron()); - TestPCoords(vtkm::VecRectilinearPointCoordinates<2>(origin, spacing), - vtkm::CellShapeTagQuad()); - TestPCoords(vtkm::VecRectilinearPointCoordinates<1>(origin, spacing), - vtkm::CellShapeTagLine()); + TestPCoords(vtkm::VecRectilinearPointCoordinates<2>(origin, spacing), vtkm::CellShapeTagQuad()); + TestPCoords(vtkm::VecRectilinearPointCoordinates<1>(origin, spacing), vtkm::CellShapeTagLine()); } } // Anonymous namespace -int UnitTestParametricCoordinates(int, char *[]) +int UnitTestParametricCoordinates(int, char* []) { return vtkm::testing::Testing::Run(TestAllPCoords); } diff --git a/vtkm/filter/CellAverage.h b/vtkm/filter/CellAverage.h index 2fed871de..cd7421d27 100644 --- a/vtkm/filter/CellAverage.h +++ b/vtkm/filter/CellAverage.h @@ -24,8 +24,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class CellAverage : public vtkm::filter::FilterCell { @@ -33,23 +35,18 @@ public: VTKM_CONT CellAverage(); - template - VTKM_CONT - vtkm::filter::ResultField DoExecute(const vtkm::cont::DataSet &input, - const vtkm::cont::ArrayHandle& field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultField 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::CellAverage Worklet; - }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_CellAverage_h diff --git a/vtkm/filter/CellAverage.hxx b/vtkm/filter/CellAverage.hxx index 01af6f1aa..1cb3469bd 100644 --- a/vtkm/filter/CellAverage.hxx +++ b/vtkm/filter/CellAverage.hxx @@ -22,50 +22,40 @@ #include -namespace vtkm { -namespace filter { - - -//----------------------------------------------------------------------------- -inline VTKM_CONT -CellAverage::CellAverage(): - vtkm::filter::FilterCell(), - Worklet() +namespace vtkm +{ +namespace filter { +//----------------------------------------------------------------------------- +inline VTKM_CONT CellAverage::CellAverage() + : vtkm::filter::FilterCell() + , Worklet() +{ } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultField CellAverage::DoExecute( - const vtkm::cont::DataSet &input, - const vtkm::cont::ArrayHandle &inField, - const vtkm::filter::FieldMetadata &fieldMetadata, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter&) +template +inline VTKM_CONT vtkm::filter::ResultField CellAverage::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& inField, + const vtkm::filter::FieldMetadata& fieldMetadata, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter&) { - if(!fieldMetadata.IsPointField()) + if (!fieldMetadata.IsPointField()) { return vtkm::filter::ResultField(); } - vtkm::cont::DynamicCellSet cellSet = - input.GetCellSet(this->GetActiveCellSetIndex()); + vtkm::cont::DynamicCellSet cellSet = input.GetCellSet(this->GetActiveCellSetIndex()); //todo: we need to ask the policy what storage type we should be using //If the input is implicit, we should know what to fall back to vtkm::cont::ArrayHandle outArray; - vtkm::worklet::DispatcherMapTopology dispatcher(this->Worklet); + vtkm::worklet::DispatcherMapTopology dispatcher( + this->Worklet); - dispatcher.Invoke(vtkm::filter::ApplyPolicy(cellSet, policy), - inField, - outArray); + dispatcher.Invoke(vtkm::filter::ApplyPolicy(cellSet, policy), inField, outArray); std::string outputName = this->GetOutputFieldName(); if (outputName == "") @@ -74,12 +64,8 @@ vtkm::filter::ResultField CellAverage::DoExecute( outputName = fieldMetadata.GetName(); } - return vtkm::filter::ResultField(input, - outArray, - outputName, - vtkm::cont::Field::ASSOC_CELL_SET, + return vtkm::filter::ResultField(input, outArray, outputName, vtkm::cont::Field::ASSOC_CELL_SET, cellSet.GetName()); } - } } // namespace vtkm::filter diff --git a/vtkm/filter/CleanGrid.h b/vtkm/filter/CleanGrid.h index ce61bf807..d54f54e08 100644 --- a/vtkm/filter/CleanGrid.h +++ b/vtkm/filter/CleanGrid.h @@ -24,8 +24,10 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ /// \brief Clean a mesh to an unstructured grid /// @@ -53,41 +55,27 @@ public: VTKM_CONT bool GetCompactPointFields() const { return this->CompactPointFields; } VTKM_CONT - void SetCompactPointFields(bool flag) - { - this->CompactPointFields = flag; - } + void SetCompactPointFields(bool flag) { this->CompactPointFields = flag; } - template - VTKM_CONT - vtkm::filter::ResultDataSet - DoExecute(const vtkm::cont::DataSet &inData, - vtkm::filter::PolicyBase policy, - Device); + template + VTKM_CONT vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& inData, + vtkm::filter::PolicyBase policy, Device); - template - VTKM_CONT - bool DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - vtkm::filter::PolicyBase, - Device); + template + VTKM_CONT bool DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + vtkm::filter::PolicyBase, Device); - template - VTKM_CONT - vtkm::cont::ArrayHandle - CompactPointArray( - const vtkm::cont::ArrayHandle &inArray, Device) const; + template + VTKM_CONT vtkm::cont::ArrayHandle CompactPointArray( + const vtkm::cont::ArrayHandle& inArray, Device) const; private: bool CompactPointFields; vtkm::worklet::RemoveUnusedPoints PointCompactor; }; - } } // namespace vtkm::filter diff --git a/vtkm/filter/CleanGrid.hxx b/vtkm/filter/CleanGrid.hxx index e3f1c7554..360341e63 100644 --- a/vtkm/filter/CleanGrid.hxx +++ b/vtkm/filter/CleanGrid.hxx @@ -23,49 +23,50 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ -namespace detail { +namespace detail +{ -template +template struct CleanCompactPointArrayFunctor { - vtkm::cont::DataSet &OutDataSet; + vtkm::cont::DataSet& OutDataSet; std::string Name; - const vtkm::filter::CleanGrid *Self; + const vtkm::filter::CleanGrid* Self; - CleanCompactPointArrayFunctor(vtkm::cont::DataSet &outDataSet, - const std::string &name, - const vtkm::filter::CleanGrid *self) - : OutDataSet(outDataSet), Name(name), Self(self) - { } + CleanCompactPointArrayFunctor(vtkm::cont::DataSet& outDataSet, const std::string& name, + const vtkm::filter::CleanGrid* self) + : OutDataSet(outDataSet) + , Name(name) + , Self(self) + { + } - template - void operator()(const ArrayHandleType &coordSystemArray) const + template + void operator()(const ArrayHandleType& coordSystemArray) const { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); vtkm::cont::ArrayHandle outArray = - this->Self->CompactPointArray(coordSystemArray, Device()); - this->OutDataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem(this->Name, outArray)); + this->Self->CompactPointArray(coordSystemArray, Device()); + this->OutDataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem(this->Name, outArray)); } }; } // namespace detail -inline VTKM_CONT -CleanGrid::CleanGrid() +inline VTKM_CONT CleanGrid::CleanGrid() : CompactPointFields(true) -{ } +{ +} -template -inline VTKM_CONT -vtkm::filter::ResultDataSet -CleanGrid::DoExecute(const vtkm::cont::DataSet &inData, - vtkm::filter::PolicyBase policy, - Device) +template +inline VTKM_CONT vtkm::filter::ResultDataSet CleanGrid::DoExecute( + const vtkm::cont::DataSet& inData, vtkm::filter::PolicyBase policy, Device) { VTKM_IS_DEVICE_ADAPTER_TAG(Device); @@ -80,12 +81,10 @@ CleanGrid::DoExecute(const vtkm::cont::DataSet &inData, for (VecId cellSetIndex = 0; cellSetIndex < numCellSets; cellSetIndex++) { vtkm::cont::DynamicCellSet inCellSet = - inData.GetCellSet(static_cast(cellSetIndex)); + inData.GetCellSet(static_cast(cellSetIndex)); - vtkm::worklet::CellDeepCopy::Run( - vtkm::filter::ApplyPolicy(inCellSet, policy), - outputCellSets[cellSetIndex], - Device()); + vtkm::worklet::CellDeepCopy::Run(vtkm::filter::ApplyPolicy(inCellSet, policy), + outputCellSets[cellSetIndex], Device()); } // Optionally adjust the cell set indices to remove all unused points @@ -120,19 +119,15 @@ CleanGrid::DoExecute(const vtkm::cont::DataSet &inData, // but other fields are not? Why shouldn't the Execute of a filter also set // up all the fields of the output data set? for (vtkm::IdComponent coordSystemIndex = 0; - coordSystemIndex < inData.GetNumberOfCoordinateSystems(); - coordSystemIndex++) + coordSystemIndex < inData.GetNumberOfCoordinateSystems(); coordSystemIndex++) { - vtkm::cont::CoordinateSystem coordSystem = - inData.GetCoordinateSystem(coordSystemIndex); + vtkm::cont::CoordinateSystem coordSystem = inData.GetCoordinateSystem(coordSystemIndex); if (this->GetCompactPointFields()) { - vtkm::filter::ApplyPolicy(coordSystem, - policy, - vtkm::filter::FilterTraits()) - .CastAndCall(detail::CleanCompactPointArrayFunctor( - outData,coordSystem.GetName(),this)); + vtkm::filter::ApplyPolicy(coordSystem, policy, vtkm::filter::FilterTraits()) + .CastAndCall( + detail::CleanCompactPointArrayFunctor(outData, coordSystem.GetName(), this)); } else { @@ -143,22 +138,14 @@ CleanGrid::DoExecute(const vtkm::cont::DataSet &inData, return outData; } -template -inline VTKM_CONT -bool CleanGrid::DoMapField( - vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - vtkm::filter::PolicyBase, - Device) +template +inline VTKM_CONT bool CleanGrid::DoMapField( + vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, vtkm::filter::PolicyBase, Device) { if (this->GetCompactPointFields() && fieldMeta.IsPointField()) { - vtkm::cont::ArrayHandle compactedArray = - this->CompactPointArray(input, Device()); + vtkm::cont::ArrayHandle compactedArray = this->CompactPointArray(input, Device()); result.GetDataSet().AddField(fieldMeta.AsField(compactedArray)); } else @@ -169,16 +156,13 @@ bool CleanGrid::DoMapField( return true; } -template -inline VTKM_CONT -vtkm::cont::ArrayHandle -CleanGrid::CompactPointArray( - const vtkm::cont::ArrayHandle &inArray, Device) const +template +inline VTKM_CONT vtkm::cont::ArrayHandle CleanGrid::CompactPointArray( + const vtkm::cont::ArrayHandle& inArray, Device) const { VTKM_ASSERT(this->GetCompactPointFields()); return this->PointCompactor.MapPointFieldDeep(inArray, Device()); } - } } diff --git a/vtkm/filter/ClipWithField.h b/vtkm/filter/ClipWithField.h index c520f10f4..a65a73361 100644 --- a/vtkm/filter/ClipWithField.h +++ b/vtkm/filter/ClipWithField.h @@ -24,8 +24,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class ClipWithField : public vtkm::filter::FilterDataSetWithField { @@ -34,47 +36,40 @@ public: ClipWithField(); VTKM_CONT - void SetClipValue(vtkm::Float64 value){ this->ClipValue = value; } + void SetClipValue(vtkm::Float64 value) { this->ClipValue = value; } VTKM_CONT - vtkm::Float64 GetClipValue() const { return this->ClipValue; } + vtkm::Float64 GetClipValue() const { return this->ClipValue; } - template - VTKM_CONT - vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, - const vtkm::cont::ArrayHandle& field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultDataSet DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& tag); //Map a new field onto the resulting dataset after running the filter. //This call is only valid after Execute has been called. - template - VTKM_CONT - bool DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); - + template + VTKM_CONT bool DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); private: vtkm::Float64 ClipValue; vtkm::worklet::Clip Worklet; }; -template<> +template <> class FilterTraits { //currently the Clip filter only works on scalar data. public: typedef TypeListTagScalarAll InputFieldTypeList; }; - - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_ClipWithField_h diff --git a/vtkm/filter/ClipWithField.hxx b/vtkm/filter/ClipWithField.hxx index aa046273c..c6007b66a 100644 --- a/vtkm/filter/ClipWithField.hxx +++ b/vtkm/filter/ClipWithField.hxx @@ -26,33 +26,27 @@ #include -namespace vtkm { -namespace filter { - -//----------------------------------------------------------------------------- -inline VTKM_CONT -ClipWithField::ClipWithField(): - vtkm::filter::FilterDataSetWithField(), - ClipValue(0), - Worklet() +namespace vtkm +{ +namespace filter { +//----------------------------------------------------------------------------- +inline VTKM_CONT ClipWithField::ClipWithField() + : vtkm::filter::FilterDataSetWithField() + , ClipValue(0) + , Worklet() +{ } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultDataSet ClipWithField::DoExecute( - const vtkm::cont::DataSet& input, - const vtkm::cont::ArrayHandle& field, +template +inline VTKM_CONT vtkm::filter::ResultDataSet ClipWithField::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& device) + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& device) { - if(fieldMeta.IsPointField() == false) + if (fieldMeta.IsPointField() == false) { //todo: we need to mark this as a failure of input, not a failure //of the algorithm @@ -60,30 +54,22 @@ vtkm::filter::ResultDataSet ClipWithField::DoExecute( } //get the cells and coordinates of the dataset - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); const vtkm::cont::CoordinateSystem& inputCoords = - input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); - + input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); vtkm::cont::CellSetExplicit<> outputCellSet = - this->Worklet.Run( vtkm::filter::ApplyPolicy(cells, policy), - field, - this->ClipValue, - device - ); + this->Worklet.Run(vtkm::filter::ApplyPolicy(cells, policy), field, this->ClipValue, device); //create the output data vtkm::cont::DataSet output; - output.AddCellSet( outputCellSet ); + output.AddCellSet(outputCellSet); // Compute the new boundary points and add them to the output: vtkm::cont::DynamicArrayHandle outputCoordsArray = - this->Worklet.ProcessField( - vtkm::filter::ApplyPolicy(inputCoords, policy), device); - vtkm::cont::CoordinateSystem outputCoords(inputCoords.GetName(), - outputCoordsArray); + this->Worklet.ProcessField(vtkm::filter::ApplyPolicy(inputCoords, policy), device); + vtkm::cont::CoordinateSystem outputCoords(inputCoords.GetName(), outputCoordsArray); output.AddCoordinateSystem(outputCoords); vtkm::filter::ResultDataSet result(output); @@ -91,31 +77,23 @@ vtkm::filter::ResultDataSet ClipWithField::DoExecute( } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool ClipWithField::DoMapField( - vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase&, +template +inline VTKM_CONT bool ClipWithField::DoMapField( + vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, const vtkm::filter::PolicyBase&, const DeviceAdapter& device) { - if(fieldMeta.IsPointField() == false) + if (fieldMeta.IsPointField() == false) { //not a point field, we can't map it return false; } - vtkm::cont::DynamicArrayHandle output = - this->Worklet.ProcessField( input, device); + vtkm::cont::DynamicArrayHandle output = this->Worklet.ProcessField(input, device); //use the same meta data as the input so we get the same field name, etc. - result.GetDataSet().AddField( fieldMeta.AsField(output) ); + result.GetDataSet().AddField(fieldMeta.AsField(output)); return true; } - } } diff --git a/vtkm/filter/ClipWithImplicitFunction.h b/vtkm/filter/ClipWithImplicitFunction.h index d25442d2b..0fc1a998d 100644 --- a/vtkm/filter/ClipWithImplicitFunction.h +++ b/vtkm/filter/ClipWithImplicitFunction.h @@ -27,19 +27,20 @@ #include - -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class ClipWithImplicitFunction : public vtkm::filter::FilterDataSet { public: template - void SetImplicitFunction(const std::shared_ptr &func, + void SetImplicitFunction(const std::shared_ptr& func, const vtkm::filter::PolicyBase& policy); template - void SetImplicitFunction(const std::shared_ptr &func) + void SetImplicitFunction(const std::shared_ptr& func) { this->Function = func; } @@ -49,25 +50,23 @@ public: return this->Function; } - template + template vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, const DeviceAdapter& tag); //Map a new field onto the resulting dataset after running the filter. //This call is only valid after Execute has been called. - template + template bool DoMapField(vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& tag); private: std::shared_ptr Function; vtkm::worklet::Clip Worklet; }; - } } // namespace vtkm::filter diff --git a/vtkm/filter/ClipWithImplicitFunction.hxx b/vtkm/filter/ClipWithImplicitFunction.hxx index 0be1ddbcb..80ccaf6c6 100644 --- a/vtkm/filter/ClipWithImplicitFunction.hxx +++ b/vtkm/filter/ClipWithImplicitFunction.hxx @@ -24,42 +24,34 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- template -inline -void ClipWithImplicitFunction::SetImplicitFunction( - const std::shared_ptr &func, - const vtkm::filter::PolicyBase&) +inline void ClipWithImplicitFunction::SetImplicitFunction( + const std::shared_ptr& func, const vtkm::filter::PolicyBase&) { func->ResetDevices(DerivedPolicy::DeviceAdapterList); this->Function = func; } //----------------------------------------------------------------------------- -template +template inline vtkm::filter::ResultDataSet ClipWithImplicitFunction::DoExecute( - const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, const DeviceAdapter& device) { //get the cells and coordinates of the dataset - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); const vtkm::cont::CoordinateSystem& inputCoords = - input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); + input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); - - vtkm::cont::CellSetExplicit<> outputCellSet = - this->Worklet.Run( vtkm::filter::ApplyPolicy(cells, policy), - *this->Function, - inputCoords, - device - ); + vtkm::cont::CellSetExplicit<> outputCellSet = this->Worklet.Run( + vtkm::filter::ApplyPolicy(cells, policy), *this->Function, inputCoords, device); // compute output coordinates vtkm::cont::CoordinateSystem outputCoords; @@ -67,38 +59,31 @@ inline vtkm::filter::ResultDataSet ClipWithImplicitFunction::DoExecute( //create the output data vtkm::cont::DataSet output; - output.AddCellSet( outputCellSet ); - output.AddCoordinateSystem( outputCoords ); + output.AddCellSet(outputCellSet); + output.AddCoordinateSystem(outputCoords); vtkm::filter::ResultDataSet result(output); return result; } //----------------------------------------------------------------------------- -template +template inline bool ClipWithImplicitFunction::DoMapField( - vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase&, + vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, const vtkm::filter::PolicyBase&, const DeviceAdapter& device) { - if(fieldMeta.IsPointField() == false) + if (fieldMeta.IsPointField() == false) { //not a point field, we can't map it return false; } - vtkm::cont::DynamicArrayHandle output = - this->Worklet.ProcessField( input, device); + vtkm::cont::DynamicArrayHandle output = this->Worklet.ProcessField(input, device); //use the same meta data as the input so we get the same field name, etc. - result.GetDataSet().AddField( fieldMeta.AsField(output) ); + result.GetDataSet().AddField(fieldMeta.AsField(output)); return true; } - } } diff --git a/vtkm/filter/ContourTreeUniform.h b/vtkm/filter/ContourTreeUniform.h index 4256c3bae..db4c6e0f4 100644 --- a/vtkm/filter/ContourTreeUniform.h +++ b/vtkm/filter/ContourTreeUniform.h @@ -20,48 +20,48 @@ // Copyright (c) 2016, Los Alamos National Security, LLC // All rights reserved. // -// Copyright 2016. Los Alamos National Security, LLC. -// This software was produced under U.S. Government contract DE-AC52-06NA25396 -// for Los Alamos National Laboratory (LANL), which is operated by -// Los Alamos National Security, LLC for the U.S. Department of Energy. -// The U.S. Government has rights to use, reproduce, and distribute this -// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC -// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE -// USE OF THIS SOFTWARE. If software is modified to produce derivative works, -// such modified software should be clearly marked, so as not to confuse it +// Copyright 2016. Los Alamos National Security, LLC. +// This software was produced under U.S. Government contract DE-AC52-06NA25396 +// for Los Alamos National Laboratory (LANL), which is operated by +// Los Alamos National Security, LLC for the U.S. Department of Energy. +// The U.S. Government has rights to use, reproduce, and distribute this +// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC +// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE +// USE OF THIS SOFTWARE. If software is modified to produce derivative works, +// such modified software should be clearly marked, so as not to confuse it // with the version available from LANL. // -// Additionally, redistribution and use in source and binary forms, with or -// without modification, are permitted provided that the following conditions +// Additionally, redistribution and use in source and binary forms, with or +// without modification, are permitted provided that the following conditions // are met: // -// 1. Redistributions of source code must retain the above copyright notice, +// 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. -// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos -// National Laboratory, LANL, the U.S. Government, nor the names of its -// contributors may be used to endorse or promote products derived from +// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos +// National Laboratory, LANL, the U.S. Government, nor the names of its +// contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND -// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS -// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS +// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //============================================================================ -// This code is based on the algorithm presented in the paper: -// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” -// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. -// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization +// This code is based on the algorithm presented in the paper: +// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” +// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. +// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization // (LDAV), October 2016, Baltimore, Maryland. #ifndef vtk_m_filter_ContourTreeUniform_h @@ -69,8 +69,10 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class ContourTreeMesh2D : public vtkm::filter::FilterField { @@ -79,16 +81,14 @@ public: ContourTreeMesh2D(); // Output field "saddlePeak" which is pairs of vertex ids indicating saddle and peak of contour - template - VTKM_CONT - vtkm::filter::ResultField DoExecute(const vtkm::cont::DataSet &input, - const vtkm::cont::ArrayHandle &field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultField DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& tag); }; -template<> +template <> class FilterTraits { public: @@ -102,22 +102,19 @@ public: ContourTreeMesh3D(); // Output field "saddlePeak" which is pairs of vertex ids indicating saddle and peak of contour - template - VTKM_CONT - vtkm::filter::ResultField DoExecute(const vtkm::cont::DataSet &input, - const vtkm::cont::ArrayHandle &field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultField DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& tag); }; -template<> +template <> class FilterTraits { public: typedef TypeListTagScalarAll InputFieldTypeList; }; - } } // namespace vtkm::filter diff --git a/vtkm/filter/ContourTreeUniform.hxx b/vtkm/filter/ContourTreeUniform.hxx index cedec32e0..32360a20a 100644 --- a/vtkm/filter/ContourTreeUniform.hxx +++ b/vtkm/filter/ContourTreeUniform.hxx @@ -20,54 +20,56 @@ // Copyright (c) 2016, Los Alamos National Security, LLC // All rights reserved. // -// Copyright 2016. Los Alamos National Security, LLC. -// This software was produced under U.S. Government contract DE-AC52-06NA25396 -// for Los Alamos National Laboratory (LANL), which is operated by -// Los Alamos National Security, LLC for the U.S. Department of Energy. -// The U.S. Government has rights to use, reproduce, and distribute this -// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC -// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE -// USE OF THIS SOFTWARE. If software is modified to produce derivative works, -// such modified software should be clearly marked, so as not to confuse it +// Copyright 2016. Los Alamos National Security, LLC. +// This software was produced under U.S. Government contract DE-AC52-06NA25396 +// for Los Alamos National Laboratory (LANL), which is operated by +// Los Alamos National Security, LLC for the U.S. Department of Energy. +// The U.S. Government has rights to use, reproduce, and distribute this +// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC +// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE +// USE OF THIS SOFTWARE. If software is modified to produce derivative works, +// such modified software should be clearly marked, so as not to confuse it // with the version available from LANL. // -// Additionally, redistribution and use in source and binary forms, with or -// without modification, are permitted provided that the following conditions +// Additionally, redistribution and use in source and binary forms, with or +// without modification, are permitted provided that the following conditions // are met: // -// 1. Redistributions of source code must retain the above copyright notice, +// 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. -// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos -// National Laboratory, LANL, the U.S. Government, nor the names of its -// contributors may be used to endorse or promote products derived from +// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos +// National Laboratory, LANL, the U.S. Government, nor the names of its +// contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND -// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS -// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS +// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //============================================================================ -// This code is based on the algorithm presented in the paper: -// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” -// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. -// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization +// This code is based on the algorithm presented in the paper: +// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” +// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. +// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization // (LDAV), October 2016, Baltimore, Maryland. #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- ContourTreeMesh2D::ContourTreeMesh2D() @@ -76,18 +78,14 @@ ContourTreeMesh2D::ContourTreeMesh2D() } //----------------------------------------------------------------------------- -template -vtkm::filter::ResultField -ContourTreeMesh2D::DoExecute(const vtkm::cont::DataSet &input, - const vtkm::cont::ArrayHandle &field, - const vtkm::filter::FieldMetadata &fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& device) +template +vtkm::filter::ResultField ContourTreeMesh2D::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& device) { - if (fieldMeta.IsPointField() == false) { + if (fieldMeta.IsPointField() == false) + { std::cout << "ERROR: Point field expected" << std::endl; return vtkm::filter::ResultField(); } @@ -103,16 +101,13 @@ ContourTreeMesh2D::DoExecute(const vtkm::cont::DataSet &input, vtkm::Id nRows = pointDimensions[0]; vtkm::Id nCols = pointDimensions[1]; - vtkm::cont::ArrayHandle > saddlePeak; + vtkm::cont::ArrayHandle> saddlePeak; vtkm::worklet::ContourTreeMesh2D worklet; worklet.Run(field, nRows, nCols, saddlePeak, device); - return vtkm::filter::ResultField(input, - saddlePeak, - this->GetOutputFieldName(), - fieldMeta.GetAssociation(), - fieldMeta.GetCellSetName()); + return vtkm::filter::ResultField(input, saddlePeak, this->GetOutputFieldName(), + fieldMeta.GetAssociation(), fieldMeta.GetCellSetName()); } //----------------------------------------------------------------------------- ContourTreeMesh3D::ContourTreeMesh3D() @@ -121,18 +116,14 @@ ContourTreeMesh3D::ContourTreeMesh3D() } //----------------------------------------------------------------------------- -template -vtkm::filter::ResultField -ContourTreeMesh3D::DoExecute(const vtkm::cont::DataSet &input, - const vtkm::cont::ArrayHandle &field, - const vtkm::filter::FieldMetadata &fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& device) +template +vtkm::filter::ResultField ContourTreeMesh3D::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& device) { - if (fieldMeta.IsPointField() == false) { + if (fieldMeta.IsPointField() == false) + { std::cout << "ERROR: Point field expected" << std::endl; return vtkm::filter::ResultField(); } @@ -145,21 +136,17 @@ ContourTreeMesh3D::DoExecute(const vtkm::cont::DataSet &input, vtkm::filter::ApplyPolicy(cellSet, policy); vtkm::Id3 pointDimensions = cellSet.GetPointDimensions(); - vtkm::Id nRows = pointDimensions[0]; - vtkm::Id nCols = pointDimensions[1]; + vtkm::Id nRows = pointDimensions[0]; + vtkm::Id nCols = pointDimensions[1]; vtkm::Id nSlices = pointDimensions[2]; - vtkm::cont::ArrayHandle > saddlePeak; + vtkm::cont::ArrayHandle> saddlePeak; vtkm::worklet::ContourTreeMesh3D worklet; worklet.Run(field, nRows, nCols, nSlices, saddlePeak, device); - return vtkm::filter::ResultField(input, - saddlePeak, - this->GetOutputFieldName(), - fieldMeta.GetAssociation(), - fieldMeta.GetCellSetName()); + return vtkm::filter::ResultField(input, saddlePeak, this->GetOutputFieldName(), + fieldMeta.GetAssociation(), fieldMeta.GetCellSetName()); } - } } // namespace vtkm::filter diff --git a/vtkm/filter/ExternalFaces.h b/vtkm/filter/ExternalFaces.h index e187cd57e..9068f3eb9 100644 --- a/vtkm/filter/ExternalFaces.h +++ b/vtkm/filter/ExternalFaces.h @@ -25,8 +25,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class ExternalFaces : public vtkm::filter::FilterDataSet { @@ -34,46 +36,35 @@ public: VTKM_CONT ExternalFaces(); - // When CompactPoints is set, instead of copying the points and point fields // from the input, the filter will create new compact fields without the // unused elements VTKM_CONT - bool GetCompactPoints() const - { - return this->CompactPoints; - } + bool GetCompactPoints() const { return this->CompactPoints; } VTKM_CONT - void SetCompactPoints(bool value) - { - this->CompactPoints = value; - } + void SetCompactPoints(bool value) { this->CompactPoints = value; } - template - VTKM_CONT - vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultDataSet DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); //Map a new field onto the resulting dataset after running the filter //this call is only valid - template - VTKM_CONT - bool DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT bool DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); public: bool CompactPoints; vtkm::filter::CleanGrid Compactor; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_ExternalFaces_h diff --git a/vtkm/filter/ExternalFaces.hxx b/vtkm/filter/ExternalFaces.hxx index 73927f6fa..537751422 100644 --- a/vtkm/filter/ExternalFaces.hxx +++ b/vtkm/filter/ExternalFaces.hxx @@ -18,18 +18,20 @@ // this software. //============================================================================ -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- -inline VTKM_CONT -ExternalFaces::ExternalFaces(): - vtkm::filter::FilterDataSet(), - CompactPoints(false) +inline VTKM_CONT ExternalFaces::ExternalFaces() + : vtkm::filter::FilterDataSet() + , CompactPoints(false) { } -namespace { +namespace +{ template struct CellSetExplicitPolicy : public BasePolicy @@ -38,45 +40,38 @@ struct CellSetExplicitPolicy : public BasePolicy }; template -inline vtkm::filter::PolicyBase> -GetCellSetExplicitPolicy(const vtkm::filter::PolicyBase&) +inline vtkm::filter::PolicyBase> GetCellSetExplicitPolicy( + const vtkm::filter::PolicyBase&) { return vtkm::filter::PolicyBase>(); } } // anonymous namespace - //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultDataSet ExternalFaces::DoExecute(const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter&) +template +inline VTKM_CONT vtkm::filter::ResultDataSet ExternalFaces::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter&) { //1. extract the cell set - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); //2. using the policy convert the dynamic cell set, and run the // external faces worklet vtkm::cont::CellSetExplicit<> outCellSet(cells.GetName()); vtkm::worklet::ExternalFaces exfaces; - exfaces.Run(vtkm::filter::ApplyPolicyUnstructured(cells, policy), - outCellSet, DeviceAdapter()); + exfaces.Run(vtkm::filter::ApplyPolicyUnstructured(cells, policy), outCellSet, DeviceAdapter()); //3. create the output dataset vtkm::cont::DataSet output; output.AddCellSet(outCellSet); - output.AddCoordinateSystem( - input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()) ); + output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex())); if (this->CompactPoints) { this->Compactor.SetCompactPointFields(true); - return this->Compactor.DoExecute(output, GetCellSetExplicitPolicy(policy), - DeviceAdapter()); + return this->Compactor.DoExecute(output, GetCellSetExplicitPolicy(policy), DeviceAdapter()); } else { @@ -85,16 +80,11 @@ vtkm::filter::ResultDataSet ExternalFaces::DoExecute(const vtkm::cont::DataSet& } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool ExternalFaces::DoMapField(vtkm::filter::ResultDataSet &result, - const vtkm::cont::ArrayHandle &input, - const vtkm::filter::FieldMetadata &fieldMeta, - const vtkm::filter::PolicyBase &policy, - const DeviceAdapter&) +template +inline VTKM_CONT bool ExternalFaces::DoMapField( + vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter&) { if (fieldMeta.IsPointField()) { @@ -111,6 +101,5 @@ bool ExternalFaces::DoMapField(vtkm::filter::ResultDataSet &result, return false; } - } } diff --git a/vtkm/filter/ExtractGeometry.h b/vtkm/filter/ExtractGeometry.h index 29bb7f568..77ac84e6c 100644 --- a/vtkm/filter/ExtractGeometry.h +++ b/vtkm/filter/ExtractGeometry.h @@ -25,8 +25,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class ExtractGeometry : public vtkm::filter::FilterDataSet { @@ -40,7 +42,7 @@ public: const vtkm::filter::PolicyBase& policy); template - void SetImplicitFunction(const std::shared_ptr &func) + void SetImplicitFunction(const std::shared_ptr& func) { this->Function = func; } @@ -51,45 +53,43 @@ public: } VTKM_CONT - bool GetExtractInside() { return this->ExtractInside; } + bool GetExtractInside() { return this->ExtractInside; } VTKM_CONT - void SetExtractInside(bool value) { this->ExtractInside = value; } + void SetExtractInside(bool value) { this->ExtractInside = value; } VTKM_CONT - void ExtractInsideOn() { this->ExtractInside = true; } + void ExtractInsideOn() { this->ExtractInside = true; } VTKM_CONT - void ExtractInsideOff() { this->ExtractInside = false; } + void ExtractInsideOff() { this->ExtractInside = false; } VTKM_CONT - bool GetExtractBoundaryCells() { return this->ExtractBoundaryCells; } + bool GetExtractBoundaryCells() { return this->ExtractBoundaryCells; } VTKM_CONT - void SetExtractBoundaryCells(bool value) { this->ExtractBoundaryCells = value; } + void SetExtractBoundaryCells(bool value) { this->ExtractBoundaryCells = value; } VTKM_CONT - void ExtractBoundaryCellsOn() { this->ExtractBoundaryCells = true; } + void ExtractBoundaryCellsOn() { this->ExtractBoundaryCells = true; } VTKM_CONT - void ExtractBoundaryCellsOff() { this->ExtractBoundaryCells = false; } - - VTKM_CONT - bool GetExtractOnlyBoundaryCells() { return this->ExtractOnlyBoundaryCells; } - VTKM_CONT - void SetExtractOnlyBoundaryCells(bool value) { this->ExtractOnlyBoundaryCells = value; } - VTKM_CONT - void ExtractOnlyBoundaryCellsOn() { this->ExtractOnlyBoundaryCells = true; } - VTKM_CONT - void ExtractOnlyBoundaryCellsOff() { this->ExtractOnlyBoundaryCells = false; } - + void ExtractBoundaryCellsOff() { this->ExtractBoundaryCells = false; } - template + VTKM_CONT + bool GetExtractOnlyBoundaryCells() { return this->ExtractOnlyBoundaryCells; } + VTKM_CONT + void SetExtractOnlyBoundaryCells(bool value) { this->ExtractOnlyBoundaryCells = value; } + VTKM_CONT + void ExtractOnlyBoundaryCellsOn() { this->ExtractOnlyBoundaryCells = true; } + VTKM_CONT + void ExtractOnlyBoundaryCellsOff() { this->ExtractOnlyBoundaryCells = false; } + + template vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, const DeviceAdapter& tag); //Map a new field onto the resulting dataset after running the filter - template + template bool DoMapField(vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& tag); private: bool ExtractInside; @@ -100,17 +100,15 @@ private: vtkm::cont::ArrayHandle ValidCellIds; }; -template<> +template <> class FilterTraits { //currently the ExtractGeometry filter only works on scalar data. public: typedef TypeListTagScalarAll InputFieldTypeList; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_ExtractGeometry_h diff --git a/vtkm/filter/ExtractGeometry.hxx b/vtkm/filter/ExtractGeometry.hxx index 85e550eb2..2884cc52c 100644 --- a/vtkm/filter/ExtractGeometry.hxx +++ b/vtkm/filter/ExtractGeometry.hxx @@ -32,86 +32,75 @@ class AddPermutationCellSet { vtkm::cont::DataSet* Output; vtkm::cont::ArrayHandle* ValidIds; -public: - AddPermutationCellSet(vtkm::cont::DataSet& data, - vtkm::cont::ArrayHandle& validIds): - Output(&data), - ValidIds(&validIds) - { } - template - void operator()(const CellSetType& cellset ) const +public: + AddPermutationCellSet(vtkm::cont::DataSet& data, vtkm::cont::ArrayHandle& validIds) + : Output(&data) + , ValidIds(&validIds) + { + } + + template + void operator()(const CellSetType& cellset) const { typedef vtkm::cont::CellSetPermutation PermutationCellSetType; - PermutationCellSetType permCellSet(*this->ValidIds, cellset, - cellset.GetName()); + PermutationCellSetType permCellSet(*this->ValidIds, cellset, cellset.GetName()); this->Output->AddCellSet(permCellSet); } }; - } -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- template -inline -void ExtractGeometry::SetImplicitFunction( - const std::shared_ptr &func, - const vtkm::filter::PolicyBase&) +inline void ExtractGeometry::SetImplicitFunction(const std::shared_ptr& func, + const vtkm::filter::PolicyBase&) { func->ResetDevices(DerivedPolicy::DeviceAdapterList); this->Function = func; } - //----------------------------------------------------------------------------- -inline VTKM_CONT -ExtractGeometry::ExtractGeometry(): - vtkm::filter::FilterDataSet(), - ExtractInside(true), - ExtractBoundaryCells(false), - ExtractOnlyBoundaryCells(false), - ValidCellIds() +inline VTKM_CONT ExtractGeometry::ExtractGeometry() + : vtkm::filter::FilterDataSet() + , ExtractInside(true) + , ExtractBoundaryCells(false) + , ExtractOnlyBoundaryCells(false) + , ValidCellIds() { } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultDataSet ExtractGeometry::DoExecute( - const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& device) +template +inline VTKM_CONT vtkm::filter::ResultDataSet ExtractGeometry::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& device) { // extract the input cell set and coordinates - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); const vtkm::cont::CoordinateSystem& coords = - input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); + input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); // run the worklet on the cell set vtkm::cont::ArrayHandle passFlags; typedef vtkm::worklet::ExtractGeometry::ExtractCellsByVOI ExtractCellsWorklet; - ExtractCellsWorklet worklet((*this->Function).PrepareForExecution(device), - this->ExtractInside, - this->ExtractBoundaryCells, - this->ExtractOnlyBoundaryCells); + ExtractCellsWorklet worklet((*this->Function).PrepareForExecution(device), this->ExtractInside, + this->ExtractBoundaryCells, this->ExtractOnlyBoundaryCells); vtkm::worklet::DispatcherMapTopology dispatcher(worklet); dispatcher.Invoke(vtkm::filter::ApplyPolicy(cells, policy), - vtkm::filter::ApplyPolicy(coords, policy), - passFlags); + vtkm::filter::ApplyPolicy(coords, policy), passFlags); vtkm::cont::ArrayHandleCounting indices = - vtkm::cont::make_ArrayHandleCounting(vtkm::Id(0), vtkm::Id(1), passFlags.GetNumberOfValues()); - vtkm::cont::DeviceAdapterAlgorithm - ::CopyIf(indices, passFlags, this->ValidCellIds); + vtkm::cont::make_ArrayHandleCounting(vtkm::Id(0), vtkm::Id(1), passFlags.GetNumberOfValues()); + vtkm::cont::DeviceAdapterAlgorithm::CopyIf(indices, passFlags, this->ValidCellIds); // create the output dataset vtkm::cont::DataSet output; @@ -119,46 +108,38 @@ vtkm::filter::ResultDataSet ExtractGeometry::DoExecute( // generate the cellset AddPermutationCellSet addCellSet(output, this->ValidCellIds); - vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(cells, policy), - addCellSet); + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(cells, policy), addCellSet); return output; } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool ExtractGeometry::DoMapField( - vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase&, - const DeviceAdapter&) +template +inline VTKM_CONT bool ExtractGeometry::DoMapField( + vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, const vtkm::filter::PolicyBase&, + const DeviceAdapter&) { // point data is copied as is because it was not collapsed - if(fieldMeta.IsPointField()) + if (fieldMeta.IsPointField()) { result.GetDataSet().AddField(fieldMeta.AsField(input)); return true; } - if(fieldMeta.IsCellField()) + if (fieldMeta.IsCellField()) { - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > PermutationType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + PermutationType; PermutationType permutation = - vtkm::cont::make_ArrayHandlePermutation(this->ValidCellIds, input); + vtkm::cont::make_ArrayHandlePermutation(this->ValidCellIds, input); - result.GetDataSet().AddField( fieldMeta.AsField(permutation) ); + result.GetDataSet().AddField(fieldMeta.AsField(permutation)); return true; } return false; } - } } diff --git a/vtkm/filter/ExtractPoints.h b/vtkm/filter/ExtractPoints.h index 700f9bc3a..e74909661 100644 --- a/vtkm/filter/ExtractPoints.h +++ b/vtkm/filter/ExtractPoints.h @@ -26,8 +26,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class ExtractPoints : public vtkm::filter::FilterDataSet { @@ -38,7 +40,7 @@ public: // When CompactPoints is set, instead of copying the points and point fields // from the input, the filter will create new compact fields without the unused elements VTKM_CONT - bool GetCompactPoints() const { return this->CompactPoints; } + bool GetCompactPoints() const { return this->CompactPoints; } VTKM_CONT void SetCompactPoints(bool value) { this->CompactPoints = value; } @@ -48,7 +50,7 @@ public: const vtkm::filter::PolicyBase& policy); template - void SetImplicitFunction(const std::shared_ptr &func) + void SetImplicitFunction(const std::shared_ptr& func) { this->Function = func; } @@ -59,26 +61,25 @@ public: } VTKM_CONT - bool GetExtractInside() { return this->ExtractInside; } + bool GetExtractInside() { return this->ExtractInside; } VTKM_CONT - void SetExtractInside(bool value) { this->ExtractInside = value; } + void SetExtractInside(bool value) { this->ExtractInside = value; } VTKM_CONT - void ExtractInsideOn() { this->ExtractInside = true; } + void ExtractInsideOn() { this->ExtractInside = true; } VTKM_CONT - void ExtractInsideOff() { this->ExtractInside = false; } + void ExtractInsideOff() { this->ExtractInside = false; } - template + template vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, const DeviceAdapter& tag); //Map a new field onto the resulting dataset after running the filter - template + template bool DoMapField(vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& tag); private: bool ExtractInside; @@ -87,11 +88,9 @@ private: bool CompactPoints; vtkm::filter::CleanGrid Compactor; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_ExtractPoints_h diff --git a/vtkm/filter/ExtractPoints.hxx b/vtkm/filter/ExtractPoints.hxx index f65912081..6c125ad60 100644 --- a/vtkm/filter/ExtractPoints.hxx +++ b/vtkm/filter/ExtractPoints.hxx @@ -32,61 +32,53 @@ struct CellSetSingleTypePolicy : public BasePolicy }; template -inline vtkm::filter::PolicyBase> -GetCellSetSingleTypePolicy(const vtkm::filter::PolicyBase&) +inline vtkm::filter::PolicyBase> GetCellSetSingleTypePolicy( + const vtkm::filter::PolicyBase&) { return vtkm::filter::PolicyBase>(); } - } -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- template -inline -void ExtractPoints::SetImplicitFunction( - const std::shared_ptr &func, - const vtkm::filter::PolicyBase&) +inline void ExtractPoints::SetImplicitFunction(const std::shared_ptr& func, + const vtkm::filter::PolicyBase&) { func->ResetDevices(DerivedPolicy::DeviceAdapterList); this->Function = func; } //----------------------------------------------------------------------------- -inline VTKM_CONT -ExtractPoints::ExtractPoints(): - vtkm::filter::FilterDataSet(), - ExtractInside(true), - CompactPoints(false) +inline VTKM_CONT ExtractPoints::ExtractPoints() + : vtkm::filter::FilterDataSet() + , ExtractInside(true) + , CompactPoints(false) { } //----------------------------------------------------------------------------- -template -inline -vtkm::filter::ResultDataSet ExtractPoints::DoExecute( - const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& device) +template +inline vtkm::filter::ResultDataSet ExtractPoints::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& device) { // extract the input cell set and coordinates - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); const vtkm::cont::CoordinateSystem& coords = - input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); + input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); // run the worklet on the cell set vtkm::cont::CellSetSingleType<> outCellSet(cells.GetName()); vtkm::worklet::ExtractPoints worklet; - outCellSet = worklet.Run(vtkm::filter::ApplyPolicy(cells, policy), - vtkm::filter::ApplyPolicy(coords, policy), - *this->Function, - this->ExtractInside, - device); + outCellSet = + worklet.Run(vtkm::filter::ApplyPolicy(cells, policy), vtkm::filter::ApplyPolicy(coords, policy), + *this->Function, this->ExtractInside, device); // create the output dataset vtkm::cont::DataSet output; @@ -97,9 +89,7 @@ vtkm::filter::ResultDataSet ExtractPoints::DoExecute( if (this->CompactPoints) { this->Compactor.SetCompactPointFields(true); - return this->Compactor.DoExecute(output, - GetCellSetSingleTypePolicy(policy), - DeviceAdapter()); + return this->Compactor.DoExecute(output, GetCellSetSingleTypePolicy(policy), DeviceAdapter()); } else { @@ -108,20 +98,14 @@ vtkm::filter::ResultDataSet ExtractPoints::DoExecute( } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool ExtractPoints::DoMapField( - vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter&) +template +inline VTKM_CONT bool ExtractPoints::DoMapField( + vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter&) { // point data is copied as is because it was not collapsed - if(fieldMeta.IsPointField()) + if (fieldMeta.IsPointField()) { if (this->CompactPoints) { @@ -133,10 +117,9 @@ bool ExtractPoints::DoMapField( return true; } } - + // cell data does not apply return false; } - } } diff --git a/vtkm/filter/ExtractStructured.h b/vtkm/filter/ExtractStructured.h index ed856c214..77cdaccf9 100644 --- a/vtkm/filter/ExtractStructured.h +++ b/vtkm/filter/ExtractStructured.h @@ -24,8 +24,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class ExtractStructured : public vtkm::filter::FilterDataSet { @@ -38,49 +40,46 @@ public: vtkm::Bounds GetVOI() const { return this->VOI; } VTKM_CONT - void SetVOI(int i0, int i1, - int j0, int j1, - int k0, int k1) - { this->VOI = vtkm::Bounds(i0, i1, j0, j1, k0, k1); } + void SetVOI(int i0, int i1, int j0, int j1, int k0, int k1) + { + this->VOI = vtkm::Bounds(i0, i1, j0, j1, k0, k1); + } VTKM_CONT - void SetVOI(int bounds[6]) - { this->VOI = vtkm::Bounds(bounds); } + void SetVOI(int bounds[6]) { this->VOI = vtkm::Bounds(bounds); } VTKM_CONT void SetVOI(vtkm::Id3 minPoint, vtkm::Id3 maxPoint) - { this->VOI = vtkm::Bounds(minPoint, maxPoint); } + { + this->VOI = vtkm::Bounds(minPoint, maxPoint); + } VTKM_CONT - void SetVOI(const vtkm::Bounds &voi) - { this->VOI = voi; } + void SetVOI(const vtkm::Bounds& voi) { this->VOI = voi; } // Sampling rate VTKM_CONT - vtkm::Id3 GetSampleRate() const { return this->SampleRate; } + vtkm::Id3 GetSampleRate() const { return this->SampleRate; } VTKM_CONT - void SetSampleRate(int i, int j, int k) - { this->SampleRate = vtkm::Id3(i,j,k); } + void SetSampleRate(int i, int j, int k) { this->SampleRate = vtkm::Id3(i, j, k); } VTKM_CONT - void SetSampleRate(vtkm::Id3 sampleRate) { this->SampleRate = sampleRate; } + void SetSampleRate(vtkm::Id3 sampleRate) { this->SampleRate = sampleRate; } // Include the outer boundary on a subsample VTKM_CONT - bool GetIncludeBoundary() { return this->IncludeBoundary; } + bool GetIncludeBoundary() { return this->IncludeBoundary; } VTKM_CONT - void SetIncludeBoundary(bool value) { this->IncludeBoundary = value; } + void SetIncludeBoundary(bool value) { this->IncludeBoundary = value; } - template - VTKM_CONT - vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultDataSet DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); // Map new field onto the resulting dataset after running the filter - template - VTKM_CONT - bool DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT bool DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); private: vtkm::Bounds VOI; @@ -88,11 +87,9 @@ private: bool IncludeBoundary; vtkm::worklet::ExtractStructured Worklet; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_ExtractStructured_h diff --git a/vtkm/filter/ExtractStructured.hxx b/vtkm/filter/ExtractStructured.hxx index 557bab357..88803246a 100644 --- a/vtkm/filter/ExtractStructured.hxx +++ b/vtkm/filter/ExtractStructured.hxx @@ -20,73 +20,57 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- -inline VTKM_CONT -ExtractStructured::ExtractStructured(): - vtkm::filter::FilterDataSet(), - VOI(vtkm::Bounds(1,1,1,1,1,1)), - SampleRate(vtkm::Id3(1,1,1)), - IncludeBoundary(false), - Worklet() +inline VTKM_CONT ExtractStructured::ExtractStructured() + : vtkm::filter::FilterDataSet() + , VOI(vtkm::Bounds(1, 1, 1, 1, 1, 1)) + , SampleRate(vtkm::Id3(1, 1, 1)) + , IncludeBoundary(false) + , Worklet() { } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultDataSet ExtractStructured::DoExecute( - const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase&, - const DeviceAdapter&) +template +inline VTKM_CONT vtkm::filter::ResultDataSet ExtractStructured::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase&, + const DeviceAdapter&) { - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); - const vtkm::cont::CoordinateSystem& coordinates = - input.GetCoordinateSystem(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::CoordinateSystem& coordinates = + input.GetCoordinateSystem(this->GetActiveCellSetIndex()); - vtkm::cont::DataSet output = this->Worklet.Run( - cells, - coordinates, - this->VOI, - this->SampleRate, - this->IncludeBoundary, - DeviceAdapter()); + vtkm::cont::DataSet output = this->Worklet.Run(cells, coordinates, this->VOI, this->SampleRate, + this->IncludeBoundary, DeviceAdapter()); return vtkm::filter::ResultDataSet(output); } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool ExtractStructured::DoMapField( - vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase&, - const DeviceAdapter& device) +template +inline VTKM_CONT bool ExtractStructured::DoMapField( + vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, const vtkm::filter::PolicyBase&, + const DeviceAdapter& device) { // point data is copied as is because it was not collapsed - if(fieldMeta.IsPointField()) + if (fieldMeta.IsPointField()) { - vtkm::cont::ArrayHandle output = - this->Worklet.ProcessPointField(input, device); + vtkm::cont::ArrayHandle output = this->Worklet.ProcessPointField(input, device); result.GetDataSet().AddField(fieldMeta.AsField(output)); return true; } - + // cell data must be scattered to the cells created per input cell - if(fieldMeta.IsCellField()) + if (fieldMeta.IsCellField()) { - vtkm::cont::ArrayHandle output = - this->Worklet.ProcessCellField(input, device); + vtkm::cont::ArrayHandle output = this->Worklet.ProcessCellField(input, device); result.GetDataSet().AddField(fieldMeta.AsField(output)); return true; @@ -94,6 +78,5 @@ bool ExtractStructured::DoMapField( return false; } - } } diff --git a/vtkm/filter/FieldMetadata.h b/vtkm/filter/FieldMetadata.h index b5896fd6f..b81505452 100644 --- a/vtkm/filter/FieldMetadata.h +++ b/vtkm/filter/FieldMetadata.h @@ -24,96 +24,88 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class FieldMetadata { public: VTKM_CONT - FieldMetadata(): - Name(), - Association(vtkm::cont::Field::ASSOC_ANY), - CellSetName() + FieldMetadata() + : Name() + , Association(vtkm::cont::Field::ASSOC_ANY) + , CellSetName() + { + } + + VTKM_CONT + FieldMetadata(const vtkm::cont::Field& f) + : Name(f.GetName()) + , Association(f.GetAssociation()) + , CellSetName(f.GetAssocCellSet()) + { + } + + VTKM_CONT + FieldMetadata(const vtkm::cont::CoordinateSystem& sys) + : Name(sys.GetName()) + , Association(sys.GetAssociation()) + , CellSetName(sys.GetAssocCellSet()) + { + } + + VTKM_CONT + bool IsPointField() const { return this->Association == vtkm::cont::Field::ASSOC_POINTS; } + + VTKM_CONT + bool IsCellField() const { return this->Association == vtkm::cont::Field::ASSOC_CELL_SET; } + + VTKM_CONT + const std::string& GetName() const { return this->Name; } + + VTKM_CONT + vtkm::cont::Field::AssociationEnum GetAssociation() const { return this->Association; } + + VTKM_CONT + const std::string& GetCellSetName() const { return this->CellSetName; } + + template + VTKM_CONT vtkm::cont::Field AsField(const vtkm::cont::ArrayHandle& handle) const + { + //Field only handles arrayHandles with default storage tag, so use + //dynamic array handles + vtkm::cont::DynamicArrayHandle dhandle(handle); + if (this->IsCellField()) { + return vtkm::cont::Field(this->Name, this->Association, this->CellSetName, dhandle); } - - VTKM_CONT - FieldMetadata(const vtkm::cont::Field& f): - Name(f.GetName()), - Association(f.GetAssociation()), - CellSetName(f.GetAssocCellSet()) + else { + return vtkm::cont::Field(this->Name, this->Association, dhandle); } + } VTKM_CONT - FieldMetadata(const vtkm::cont::CoordinateSystem &sys): - Name(sys.GetName()), - Association(sys.GetAssociation()), - CellSetName(sys.GetAssocCellSet()) + vtkm::cont::Field AsField(const vtkm::cont::DynamicArrayHandle& dhandle) const + { + if (this->IsCellField()) { + return vtkm::cont::Field(this->Name, this->Association, this->CellSetName, dhandle); } - - VTKM_CONT - bool IsPointField() const - {return this->Association == vtkm::cont::Field::ASSOC_POINTS; } - - VTKM_CONT - bool IsCellField() const - {return this->Association == vtkm::cont::Field::ASSOC_CELL_SET; } - - VTKM_CONT - const std::string& GetName() const - {return this->Name; } - - VTKM_CONT - vtkm::cont::Field::AssociationEnum GetAssociation() const - { return this->Association; } - - VTKM_CONT - const std::string& GetCellSetName() const - {return this->CellSetName; } - - template - VTKM_CONT - vtkm::cont::Field AsField(const vtkm::cont::ArrayHandle &handle) const + else { - //Field only handles arrayHandles with default storage tag, so use - //dynamic array handles - vtkm::cont::DynamicArrayHandle dhandle(handle); - if(this->IsCellField()) - { - return vtkm::cont::Field(this->Name, this->Association, - this->CellSetName, dhandle); - } - else - { - return vtkm::cont::Field(this->Name, this->Association, dhandle); - } - } - - VTKM_CONT - vtkm::cont::Field AsField(const vtkm::cont::DynamicArrayHandle &dhandle) const - { - if(this->IsCellField()) - { - return vtkm::cont::Field(this->Name, this->Association, - this->CellSetName, dhandle); - } - else - { - return vtkm::cont::Field(this->Name, this->Association, dhandle); - } + return vtkm::cont::Field(this->Name, this->Association, dhandle); } + } private: - std::string Name; ///< name of field - vtkm::cont::Field::AssociationEnum Association; - std::string CellSetName; ///< only populate if assoc is cells + std::string Name; ///< name of field + vtkm::cont::Field::AssociationEnum Association; + std::string CellSetName; ///< only populate if assoc is cells }; - } } - #endif //vtk_m_filter_FieldMetadata_h diff --git a/vtkm/filter/FilterCell.h b/vtkm/filter/FilterCell.h index 43609a957..1aa7ef13a 100644 --- a/vtkm/filter/FilterCell.h +++ b/vtkm/filter/FilterCell.h @@ -23,11 +23,13 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ -template -class FilterCell : public vtkm::filter::FilterField< Derived > +template +class FilterCell : public vtkm::filter::FilterField { public: VTKM_CONT @@ -37,30 +39,24 @@ public: ~FilterCell(); VTKM_CONT - void SetActiveCellSet(vtkm::Id index) - { this->CellSetIndex = index; } + void SetActiveCellSet(vtkm::Id index) { this->CellSetIndex = index; } VTKM_CONT - vtkm::Id GetActiveCellSetIndex() const - { return this->CellSetIndex; } + vtkm::Id GetActiveCellSetIndex() const { return this->CellSetIndex; } VTKM_CONT - void SetActiveCoordinateSystem(vtkm::Id index) - { this->CoordinateSystemIndex = index; } + void SetActiveCoordinateSystem(vtkm::Id index) { this->CoordinateSystemIndex = index; } VTKM_CONT - vtkm::Id GetActiveCoordinateSystemIndex() const - { return this->CoordinateSystemIndex; } + vtkm::Id GetActiveCoordinateSystemIndex() const { return this->CoordinateSystemIndex; } protected: vtkm::Id CellSetIndex; vtkm::Id CoordinateSystemIndex; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_CellFilter_h diff --git a/vtkm/filter/FilterCell.hxx b/vtkm/filter/FilterCell.hxx index 7ad8dfd9f..0300dc83d 100644 --- a/vtkm/filter/FilterCell.hxx +++ b/vtkm/filter/FilterCell.hxx @@ -18,29 +18,24 @@ // this software. //============================================================================ -namespace vtkm { -namespace filter { - - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT -FilterCell::FilterCell(): - vtkm::filter::FilterField< Derived >(), - CellSetIndex(0), - CoordinateSystemIndex(0) +namespace vtkm +{ +namespace filter { +//---------------------------------------------------------------------------- +template +inline VTKM_CONT FilterCell::FilterCell() + : vtkm::filter::FilterField() + , CellSetIndex(0) + , CoordinateSystemIndex(0) +{ } //---------------------------------------------------------------------------- -template -inline VTKM_CONT -FilterCell::~FilterCell() +template +inline VTKM_CONT FilterCell::~FilterCell() { - -} - - +} } } diff --git a/vtkm/filter/FilterDataSet.h b/vtkm/filter/FilterDataSet.h index 2a26636b4..1a0b50740 100644 --- a/vtkm/filter/FilterDataSet.h +++ b/vtkm/filter/FilterDataSet.h @@ -30,11 +30,12 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ - -template +template class FilterDataSet { public: @@ -45,36 +46,32 @@ public: ~FilterDataSet(); VTKM_CONT - void SetActiveCellSet(vtkm::Id index) - { this->CellSetIndex = index; } + void SetActiveCellSet(vtkm::Id index) { this->CellSetIndex = index; } VTKM_CONT - vtkm::Id GetActiveCellSetIndex() const - { return this->CellSetIndex; } + vtkm::Id GetActiveCellSetIndex() const { return this->CellSetIndex; } VTKM_CONT - void SetActiveCoordinateSystem(vtkm::Id index) - { this->CoordinateSystemIndex = index; } + void SetActiveCoordinateSystem(vtkm::Id index) { this->CoordinateSystemIndex = index; } VTKM_CONT - vtkm::Id GetActiveCoordinateSystemIndex() const - { return this->CoordinateSystemIndex; } + vtkm::Id GetActiveCoordinateSystemIndex() const { return this->CoordinateSystemIndex; } VTKM_CONT - void SetRuntimeDeviceTracker(const vtkm::cont::RuntimeDeviceTracker &tracker) - { this->Tracker = tracker; } + void SetRuntimeDeviceTracker(const vtkm::cont::RuntimeDeviceTracker& tracker) + { + this->Tracker = tracker; + } VTKM_CONT - const vtkm::cont::RuntimeDeviceTracker &GetRuntimeDeviceTracker() const - { return this->Tracker; } + const vtkm::cont::RuntimeDeviceTracker& GetRuntimeDeviceTracker() const { return this->Tracker; } VTKM_CONT - ResultDataSet Execute(const vtkm::cont::DataSet &input); + ResultDataSet Execute(const vtkm::cont::DataSet& input); - template - VTKM_CONT - ResultDataSet Execute(const vtkm::cont::DataSet &input, - const vtkm::filter::PolicyBase& policy ); + template + VTKM_CONT ResultDataSet Execute(const vtkm::cont::DataSet& input, + const vtkm::filter::PolicyBase& policy); //From the field we can extract the association component // ASSOC_ANY -> unable to map @@ -83,31 +80,25 @@ public: // ASSOC_CELL_SET -> how do we map this? // ASSOC_LOGICAL_DIM -> unable to map? VTKM_CONT - bool MapFieldOntoOutput(ResultDataSet& result, - const vtkm::cont::Field& field); + bool MapFieldOntoOutput(ResultDataSet& result, const vtkm::cont::Field& field); - template - VTKM_CONT - bool MapFieldOntoOutput(ResultDataSet& result, - const vtkm::cont::Field& field, - const vtkm::filter::PolicyBase& policy); + template + VTKM_CONT bool MapFieldOntoOutput(ResultDataSet& result, const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase& policy); private: - template - VTKM_CONT - ResultDataSet PrepareForExecution(const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy); + template + VTKM_CONT ResultDataSet PrepareForExecution( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy); std::string OutputFieldName; vtkm::Id CellSetIndex; vtkm::Id CoordinateSystemIndex; vtkm::cont::RuntimeDeviceTracker Tracker; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_DataSetFilter_h diff --git a/vtkm/filter/FilterDataSet.hxx b/vtkm/filter/FilterDataSet.hxx index 6eb2b7a0f..4a78fa958 100644 --- a/vtkm/filter/FilterDataSet.hxx +++ b/vtkm/filter/FilterDataSet.hxx @@ -32,139 +32,120 @@ #include #include -namespace vtkm { -namespace filter { - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT -FilterDataSet::FilterDataSet(): - OutputFieldName(), - CellSetIndex(0), - CoordinateSystemIndex(0), - Tracker(vtkm::cont::GetGlobalRuntimeDeviceTracker()) +namespace vtkm +{ +namespace filter { +//---------------------------------------------------------------------------- +template +inline VTKM_CONT FilterDataSet::FilterDataSet() + : OutputFieldName() + , CellSetIndex(0) + , CoordinateSystemIndex(0) + , Tracker(vtkm::cont::GetGlobalRuntimeDeviceTracker()) +{ } //---------------------------------------------------------------------------- -template -inline VTKM_CONT -FilterDataSet::~FilterDataSet() +template +inline VTKM_CONT FilterDataSet::~FilterDataSet() { - } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -ResultDataSet FilterDataSet::Execute(const vtkm::cont::DataSet &input) +template +inline VTKM_CONT ResultDataSet FilterDataSet::Execute(const vtkm::cont::DataSet& input) { return this->Execute(input, vtkm::filter::PolicyDefault()); } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -ResultDataSet FilterDataSet::Execute(const vtkm::cont::DataSet &input, - const vtkm::filter::PolicyBase& policy ) +template +template +inline VTKM_CONT ResultDataSet FilterDataSet::Execute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy) { return this->PrepareForExecution(input, policy); } - //----------------------------------------------------------------------------- -namespace detail { -template +namespace detail +{ +template struct FilterDataSetPrepareForExecutionFunctor { vtkm::filter::ResultDataSet Result; - Derived *Self; - const vtkm::cont::DataSet &Input; - const vtkm::filter::PolicyBase &Policy; + Derived* Self; + const vtkm::cont::DataSet& Input; + const vtkm::filter::PolicyBase& Policy; VTKM_CONT - FilterDataSetPrepareForExecutionFunctor( - Derived *self, - const vtkm::cont::DataSet &input, - const vtkm::filter::PolicyBase &policy) - : Self(self), Input(input), Policy(policy) - { } + FilterDataSetPrepareForExecutionFunctor(Derived* self, const vtkm::cont::DataSet& input, + const vtkm::filter::PolicyBase& policy) + : Self(self) + , Input(input) + , Policy(policy) + { + } - template - VTKM_CONT - bool operator()(Device) + template + VTKM_CONT bool operator()(Device) { this->Result = this->Self->DoExecute(this->Input, this->Policy, Device()); return this->Result.IsValid(); } private: - void operator=(FilterDataSetPrepareForExecutionFunctor &) = delete; + void operator=(FilterDataSetPrepareForExecutionFunctor&) = delete; }; } // namespace detail -template -template -inline VTKM_CONT -ResultDataSet FilterDataSet::PrepareForExecution( - const vtkm::cont::DataSet &input, - const vtkm::filter::PolicyBase& policy ) +template +template +inline VTKM_CONT ResultDataSet FilterDataSet::PrepareForExecution( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy) { // When we move to C++11, this could probably be an anonymous class - detail::FilterDataSetPrepareForExecutionFunctor - functor(static_cast(this), input, policy); + detail::FilterDataSetPrepareForExecutionFunctor functor( + static_cast(this), input, policy); - vtkm::cont::TryExecute(functor, - this->Tracker, - typename DerivedPolicy::DeviceAdapterList()); + vtkm::cont::TryExecute(functor, this->Tracker, typename DerivedPolicy::DeviceAdapterList()); return functor.Result; } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool FilterDataSet::MapFieldOntoOutput(ResultDataSet& result, - const vtkm::cont::Field& field) +template +inline VTKM_CONT bool FilterDataSet::MapFieldOntoOutput(ResultDataSet& result, + const vtkm::cont::Field& field) { return this->MapFieldOntoOutput(result, field, vtkm::filter::PolicyDefault()); } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -bool FilterDataSet::MapFieldOntoOutput(ResultDataSet& result, - const vtkm::cont::Field& field, - const vtkm::filter::PolicyBase& policy) +template +template +inline VTKM_CONT bool FilterDataSet::MapFieldOntoOutput( + ResultDataSet& result, const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase& policy) { bool valid = false; - if(result.IsValid()) - { + if (result.IsValid()) + { vtkm::filter::FieldMetadata metaData(field); - typedef internal::ResolveFieldTypeAndMap< Derived, - DerivedPolicy > FunctorType; - FunctorType functor(static_cast(this), - result, - metaData, - policy, - this->Tracker, + typedef internal::ResolveFieldTypeAndMap FunctorType; + FunctorType functor(static_cast(this), result, metaData, policy, this->Tracker, valid); - typedef vtkm::filter::FilterTraits< Derived > Traits; - vtkm::cont::CastAndCall( vtkm::filter::ApplyPolicy(field, policy, Traits()), - functor ); - } + typedef vtkm::filter::FilterTraits Traits; + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(field, policy, Traits()), functor); + } //the bool valid will be modified by the map algorithm to hold if the //mapping occurred or not. If the mapping was good a new field has been //added to the ResultDataSet that was passed in. return valid; - -} - - +} } } diff --git a/vtkm/filter/FilterDataSetWithField.h b/vtkm/filter/FilterDataSetWithField.h index 82c2fb88b..44e5d0af0 100644 --- a/vtkm/filter/FilterDataSetWithField.h +++ b/vtkm/filter/FilterDataSetWithField.h @@ -30,10 +30,12 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ -template +template class FilterDataSetWithField { public: @@ -44,56 +46,48 @@ public: ~FilterDataSetWithField(); VTKM_CONT - void SetActiveCellSet(vtkm::Id index) - { this->CellSetIndex = index; } + void SetActiveCellSet(vtkm::Id index) { this->CellSetIndex = index; } VTKM_CONT - vtkm::Id GetActiveCellSetIndex() const - { return this->CellSetIndex; } + vtkm::Id GetActiveCellSetIndex() const { return this->CellSetIndex; } VTKM_CONT - void SetActiveCoordinateSystem(vtkm::Id index) - { this->CoordinateSystemIndex = index; } + void SetActiveCoordinateSystem(vtkm::Id index) { this->CoordinateSystemIndex = index; } VTKM_CONT - vtkm::Id GetActiveCoordinateSystemIndex() const - { return this->CoordinateSystemIndex; } + vtkm::Id GetActiveCoordinateSystemIndex() const { return this->CoordinateSystemIndex; } VTKM_CONT - void SetRuntimeDeviceTracker(const vtkm::cont::RuntimeDeviceTracker &tracker) - { this->Tracker = tracker; } + void SetRuntimeDeviceTracker(const vtkm::cont::RuntimeDeviceTracker& tracker) + { + this->Tracker = tracker; + } VTKM_CONT - const vtkm::cont::RuntimeDeviceTracker &GetRuntimeDeviceTracker() const - { return this->Tracker; } + const vtkm::cont::RuntimeDeviceTracker& GetRuntimeDeviceTracker() const { return this->Tracker; } VTKM_CONT - ResultDataSet Execute(const vtkm::cont::DataSet &input, const std::string &inFieldName); + ResultDataSet Execute(const vtkm::cont::DataSet& input, const std::string& inFieldName); VTKM_CONT - ResultDataSet Execute(const vtkm::cont::DataSet &input, const vtkm::cont::Field &field); + ResultDataSet Execute(const vtkm::cont::DataSet& input, const vtkm::cont::Field& field); VTKM_CONT - ResultDataSet Execute(const vtkm::cont::DataSet &input, const vtkm::cont::CoordinateSystem &field); + ResultDataSet Execute(const vtkm::cont::DataSet& input, + const vtkm::cont::CoordinateSystem& field); + template + VTKM_CONT ResultDataSet Execute(const vtkm::cont::DataSet& input, const std::string& inFieldName, + const vtkm::filter::PolicyBase& policy); - template - VTKM_CONT - ResultDataSet Execute(const vtkm::cont::DataSet &input, - const std::string &inFieldName, - const vtkm::filter::PolicyBase& policy ); + template + VTKM_CONT ResultDataSet Execute(const vtkm::cont::DataSet& input, const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase& policy); - template - VTKM_CONT - ResultDataSet Execute(const vtkm::cont::DataSet &input, - const vtkm::cont::Field &field, - const vtkm::filter::PolicyBase& policy ); - - template - VTKM_CONT - ResultDataSet Execute(const vtkm::cont::DataSet &input, - const vtkm::cont::CoordinateSystem &field, - const vtkm::filter::PolicyBase& policy ); + template + VTKM_CONT ResultDataSet Execute(const vtkm::cont::DataSet& input, + const vtkm::cont::CoordinateSystem& field, + const vtkm::filter::PolicyBase& policy); //From the field we can extract the association component // ASSOC_ANY -> unable to map @@ -102,39 +96,32 @@ public: // ASSOC_CELL_SET -> how do we map this? // ASSOC_LOGICAL_DIM -> unable to map? VTKM_CONT - bool MapFieldOntoOutput(ResultDataSet& result, - const vtkm::cont::Field& field); + bool MapFieldOntoOutput(ResultDataSet& result, const vtkm::cont::Field& field); - template - VTKM_CONT - bool MapFieldOntoOutput(ResultDataSet& result, - const vtkm::cont::Field& field, - const vtkm::filter::PolicyBase& policy); + template + VTKM_CONT bool MapFieldOntoOutput(ResultDataSet& result, const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase& policy); private: - template - VTKM_CONT - ResultDataSet PrepareForExecution(const vtkm::cont::DataSet& input, - const vtkm::cont::Field& field, - const vtkm::filter::PolicyBase& policy); + template + VTKM_CONT ResultDataSet + PrepareForExecution(const vtkm::cont::DataSet& input, const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase& policy); //How do we specify float/double coordinate types? - template - VTKM_CONT - ResultDataSet PrepareForExecution(const vtkm::cont::DataSet& input, - const vtkm::cont::CoordinateSystem& field, - const vtkm::filter::PolicyBase& policy); + template + VTKM_CONT ResultDataSet + PrepareForExecution(const vtkm::cont::DataSet& input, const vtkm::cont::CoordinateSystem& field, + const vtkm::filter::PolicyBase& policy); std::string OutputFieldName; vtkm::Id CellSetIndex; vtkm::Id CoordinateSystemIndex; vtkm::cont::RuntimeDeviceTracker Tracker; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_DataSetWithFieldFilter_h diff --git a/vtkm/filter/FilterDataSetWithField.hxx b/vtkm/filter/FilterDataSetWithField.hxx index 861b5c596..b7aff6216 100644 --- a/vtkm/filter/FilterDataSetWithField.hxx +++ b/vtkm/filter/FilterDataSetWithField.hxx @@ -32,93 +32,77 @@ #include #include -namespace vtkm { -namespace filter { - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT -FilterDataSetWithField::FilterDataSetWithField(): - OutputFieldName(), - CellSetIndex(0), - CoordinateSystemIndex(0), - Tracker(vtkm::cont::GetGlobalRuntimeDeviceTracker()) +namespace vtkm +{ +namespace filter { +//---------------------------------------------------------------------------- +template +inline VTKM_CONT FilterDataSetWithField::FilterDataSetWithField() + : OutputFieldName() + , CellSetIndex(0) + , CoordinateSystemIndex(0) + , Tracker(vtkm::cont::GetGlobalRuntimeDeviceTracker()) +{ } //---------------------------------------------------------------------------- -template -inline VTKM_CONT -FilterDataSetWithField::~FilterDataSetWithField() +template +inline VTKM_CONT FilterDataSetWithField::~FilterDataSetWithField() { - } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -ResultDataSet FilterDataSetWithField::Execute(const vtkm::cont::DataSet &input, - const std::string &inFieldName) +template +inline VTKM_CONT ResultDataSet FilterDataSetWithField::Execute( + const vtkm::cont::DataSet& input, const std::string& inFieldName) { - return this->Execute(input, - input.GetField(inFieldName), - vtkm::filter::PolicyDefault()); + return this->Execute(input, input.GetField(inFieldName), vtkm::filter::PolicyDefault()); } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -ResultDataSet FilterDataSetWithField::Execute(const vtkm::cont::DataSet &input, - const vtkm::cont::Field &field) +template +inline VTKM_CONT ResultDataSet FilterDataSetWithField::Execute( + const vtkm::cont::DataSet& input, const vtkm::cont::Field& field) { - return this->Execute(input, - field, - vtkm::filter::PolicyDefault()); + return this->Execute(input, field, vtkm::filter::PolicyDefault()); } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -ResultDataSet FilterDataSetWithField::Execute(const vtkm::cont::DataSet &input, - const vtkm::cont::CoordinateSystem &field) +template +inline VTKM_CONT ResultDataSet FilterDataSetWithField::Execute( + const vtkm::cont::DataSet& input, const vtkm::cont::CoordinateSystem& field) { - return this->Execute(input, - field, - vtkm::filter::PolicyDefault()); + return this->Execute(input, field, vtkm::filter::PolicyDefault()); } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -ResultDataSet FilterDataSetWithField::Execute(const vtkm::cont::DataSet &input, - const std::string &inFieldName, - const vtkm::filter::PolicyBase& policy ) +template +template +inline VTKM_CONT ResultDataSet FilterDataSetWithField::Execute( + const vtkm::cont::DataSet& input, const std::string& inFieldName, + const vtkm::filter::PolicyBase& policy) { - return this->Execute(input, - input.GetField(inFieldName), - policy); + return this->Execute(input, input.GetField(inFieldName), policy); } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -ResultDataSet FilterDataSetWithField::Execute(const vtkm::cont::DataSet &input, - const vtkm::cont::Field &field, - const vtkm::filter::PolicyBase& policy ) +template +template +inline VTKM_CONT ResultDataSet FilterDataSetWithField::Execute( + const vtkm::cont::DataSet& input, const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase& policy) { return this->PrepareForExecution(input, field, policy); } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -ResultDataSet FilterDataSetWithField::Execute(const vtkm::cont::DataSet &input, - const vtkm::cont::CoordinateSystem &field, - const vtkm::filter::PolicyBase& policy ) +template +template +inline VTKM_CONT ResultDataSet FilterDataSetWithField::Execute( + const vtkm::cont::DataSet& input, const vtkm::cont::CoordinateSystem& field, + const vtkm::filter::PolicyBase& policy) { //we need to state that the field is actually a coordinate system, so that //the filter uses the proper policy to convert the types. @@ -126,38 +110,29 @@ ResultDataSet FilterDataSetWithField::Execute(const vtkm::cont::DataSet } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -ResultDataSet FilterDataSetWithField::PrepareForExecution(const vtkm::cont::DataSet &input, - const vtkm::cont::Field &field, - const vtkm::filter::PolicyBase& policy ) +template +template +inline VTKM_CONT ResultDataSet FilterDataSetWithField::PrepareForExecution( + const vtkm::cont::DataSet& input, const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase& policy) { vtkm::filter::FieldMetadata metaData(field); ResultDataSet result; - typedef internal::ResolveFieldTypeAndExecute< Derived, DerivedPolicy, - ResultDataSet > FunctorType; - FunctorType functor(static_cast(this), - input, - metaData, - policy, - this->Tracker, - result); + typedef internal::ResolveFieldTypeAndExecute FunctorType; + FunctorType functor(static_cast(this), input, metaData, policy, this->Tracker, result); - typedef vtkm::filter::FilterTraits< Derived > Traits; - vtkm::cont::CastAndCall( vtkm::filter::ApplyPolicy(field, policy, Traits()), - functor ); + typedef vtkm::filter::FilterTraits Traits; + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(field, policy, Traits()), functor); return result; } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -ResultDataSet FilterDataSetWithField::PrepareForExecution(const vtkm::cont::DataSet &input, - const vtkm::cont::CoordinateSystem &field, - const vtkm::filter::PolicyBase& policy ) +template +template +inline VTKM_CONT ResultDataSet FilterDataSetWithField::PrepareForExecution( + const vtkm::cont::DataSet& input, const vtkm::cont::CoordinateSystem& field, + const vtkm::filter::PolicyBase& policy) { //We have a special signature just for CoordinateSystem, so that we can ask //the policy for the storage types and value types just for coordinate systems @@ -165,63 +140,45 @@ ResultDataSet FilterDataSetWithField::PrepareForExecution(const vtkm::c //determine the field type first ResultDataSet result; - typedef internal::ResolveFieldTypeAndExecute< Derived, DerivedPolicy, - ResultDataSet > FunctorType; - FunctorType functor(static_cast(this), - input, - metaData, - policy, - this->Tracker, - result); + typedef internal::ResolveFieldTypeAndExecute FunctorType; + FunctorType functor(static_cast(this), input, metaData, policy, this->Tracker, result); - typedef vtkm::filter::FilterTraits< Derived > Traits; - vtkm::cont::CastAndCall( vtkm::filter::ApplyPolicy(field, policy, Traits()), - functor ); + typedef vtkm::filter::FilterTraits Traits; + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(field, policy, Traits()), functor); return result; } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool FilterDataSetWithField::MapFieldOntoOutput(ResultDataSet& result, - const vtkm::cont::Field& field) +template +inline VTKM_CONT bool FilterDataSetWithField::MapFieldOntoOutput( + ResultDataSet& result, const vtkm::cont::Field& field) { return this->MapFieldOntoOutput(result, field, vtkm::filter::PolicyDefault()); } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -bool FilterDataSetWithField::MapFieldOntoOutput(ResultDataSet& result, - const vtkm::cont::Field& field, - const vtkm::filter::PolicyBase& policy) +template +template +inline VTKM_CONT bool FilterDataSetWithField::MapFieldOntoOutput( + ResultDataSet& result, const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase& policy) { bool valid = false; - if(result.IsValid()) - { + if (result.IsValid()) + { vtkm::filter::FieldMetadata metaData(field); - typedef internal::ResolveFieldTypeAndMap< Derived, - DerivedPolicy > FunctorType; - FunctorType functor(static_cast(this), - result, - metaData, - policy, - this->Tracker, + typedef internal::ResolveFieldTypeAndMap FunctorType; + FunctorType functor(static_cast(this), result, metaData, policy, this->Tracker, valid); - vtkm::cont::CastAndCall( vtkm::filter::ApplyPolicy(field, policy), - functor ); - } + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(field, policy), functor); + } //the bool valid will be modified by the map algorithm to hold if the //mapping occurred or not. If the mapping was good a new field has been //added to the ResultDataSet that was passed in. return valid; - -} - - +} } } diff --git a/vtkm/filter/FilterField.h b/vtkm/filter/FilterField.h index 4343e178b..1129dfbaf 100644 --- a/vtkm/filter/FilterField.h +++ b/vtkm/filter/FilterField.h @@ -29,10 +29,12 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ -template +template class FilterField { public: @@ -43,72 +45,59 @@ public: ~FilterField(); VTKM_CONT - void SetOutputFieldName( const std::string& name ) - { this->OutputFieldName = name; } + void SetOutputFieldName(const std::string& name) { this->OutputFieldName = name; } VTKM_CONT - const std::string& GetOutputFieldName() const - { return this->OutputFieldName; } + const std::string& GetOutputFieldName() const { return this->OutputFieldName; } VTKM_CONT - void SetRuntimeDeviceTracker(const vtkm::cont::RuntimeDeviceTracker &tracker) - { this->Tracker = tracker; } + void SetRuntimeDeviceTracker(const vtkm::cont::RuntimeDeviceTracker& tracker) + { + this->Tracker = tracker; + } VTKM_CONT - const vtkm::cont::RuntimeDeviceTracker &GetRuntimeDeviceTracker() const - { return this->Tracker; } + const vtkm::cont::RuntimeDeviceTracker& GetRuntimeDeviceTracker() const { return this->Tracker; } VTKM_CONT - ResultField Execute(const vtkm::cont::DataSet &input, const std::string &inFieldName); + ResultField Execute(const vtkm::cont::DataSet& input, const std::string& inFieldName); VTKM_CONT - ResultField Execute(const vtkm::cont::DataSet &input, const vtkm::cont::Field &field); + ResultField Execute(const vtkm::cont::DataSet& input, const vtkm::cont::Field& field); VTKM_CONT - ResultField Execute(const vtkm::cont::DataSet &input, const vtkm::cont::CoordinateSystem &field); + ResultField Execute(const vtkm::cont::DataSet& input, const vtkm::cont::CoordinateSystem& field); + template + VTKM_CONT ResultField Execute(const vtkm::cont::DataSet& input, const std::string& inFieldName, + const vtkm::filter::PolicyBase& policy); - template - VTKM_CONT - ResultField Execute(const vtkm::cont::DataSet &input, - const std::string &inFieldName, - const vtkm::filter::PolicyBase& policy ); - - template - VTKM_CONT - ResultField Execute(const vtkm::cont::DataSet &input, - const vtkm::cont::Field &field, - const vtkm::filter::PolicyBase& policy ); - - template - VTKM_CONT - ResultField Execute(const vtkm::cont::DataSet &input, - const vtkm::cont::CoordinateSystem &field, - const vtkm::filter::PolicyBase& policy ); + template + VTKM_CONT ResultField Execute(const vtkm::cont::DataSet& input, const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase& policy); + template + VTKM_CONT ResultField Execute(const vtkm::cont::DataSet& input, + const vtkm::cont::CoordinateSystem& field, + const vtkm::filter::PolicyBase& policy); private: + template + VTKM_CONT ResultField PrepareForExecution(const vtkm::cont::DataSet& input, + const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase& policy); - template - VTKM_CONT - ResultField PrepareForExecution(const vtkm::cont::DataSet& input, - const vtkm::cont::Field& field, - const vtkm::filter::PolicyBase& policy); - - template - VTKM_CONT - ResultField PrepareForExecution(const vtkm::cont::DataSet& input, - const vtkm::cont::CoordinateSystem& field, - const vtkm::filter::PolicyBase& policy); + template + VTKM_CONT ResultField PrepareForExecution(const vtkm::cont::DataSet& input, + const vtkm::cont::CoordinateSystem& field, + const vtkm::filter::PolicyBase& policy); std::string OutputFieldName; vtkm::cont::RuntimeDeviceTracker Tracker; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_FieldFilter_h diff --git a/vtkm/filter/FilterField.hxx b/vtkm/filter/FilterField.hxx index 919b3de85..175ff4a6a 100644 --- a/vtkm/filter/FilterField.hxx +++ b/vtkm/filter/FilterField.hxx @@ -31,91 +31,74 @@ #include #include -namespace vtkm { -namespace filter { - - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT -FilterField::FilterField(): - Tracker(vtkm::cont::GetGlobalRuntimeDeviceTracker()) +namespace vtkm +{ +namespace filter { +//---------------------------------------------------------------------------- +template +inline VTKM_CONT FilterField::FilterField() + : Tracker(vtkm::cont::GetGlobalRuntimeDeviceTracker()) +{ } //---------------------------------------------------------------------------- -template -inline VTKM_CONT -FilterField::~FilterField() +template +inline VTKM_CONT FilterField::~FilterField() { - } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -ResultField FilterField::Execute(const vtkm::cont::DataSet &input, - const std::string &inFieldName) +template +inline VTKM_CONT ResultField FilterField::Execute(const vtkm::cont::DataSet& input, + const std::string& inFieldName) { - return this->Execute(input, - input.GetField(inFieldName), - vtkm::filter::PolicyDefault()); + return this->Execute(input, input.GetField(inFieldName), vtkm::filter::PolicyDefault()); } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -ResultField FilterField::Execute(const vtkm::cont::DataSet &input, - const vtkm::cont::Field &field) +template +inline VTKM_CONT ResultField FilterField::Execute(const vtkm::cont::DataSet& input, + const vtkm::cont::Field& field) { - return this->Execute(input, - field, - vtkm::filter::PolicyDefault()); + return this->Execute(input, field, vtkm::filter::PolicyDefault()); } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -ResultField FilterField::Execute(const vtkm::cont::DataSet &input, - const vtkm::cont::CoordinateSystem &field) +template +inline VTKM_CONT ResultField FilterField::Execute( + const vtkm::cont::DataSet& input, const vtkm::cont::CoordinateSystem& field) { - return this->Execute(input, - field, - vtkm::filter::PolicyDefault()); + return this->Execute(input, field, vtkm::filter::PolicyDefault()); } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -ResultField FilterField::Execute(const vtkm::cont::DataSet &input, - const std::string &inFieldName, - const vtkm::filter::PolicyBase& policy ) +template +template +inline VTKM_CONT ResultField +FilterField::Execute(const vtkm::cont::DataSet& input, const std::string& inFieldName, + const vtkm::filter::PolicyBase& policy) { - return this->Execute(input, - input.GetField(inFieldName), - policy); + return this->Execute(input, input.GetField(inFieldName), policy); } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -ResultField FilterField::Execute(const vtkm::cont::DataSet &input, - const vtkm::cont::Field &field, - const vtkm::filter::PolicyBase& policy ) +template +template +inline VTKM_CONT ResultField +FilterField::Execute(const vtkm::cont::DataSet& input, const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase& policy) { return this->PrepareForExecution(input, field, policy); } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -ResultField FilterField::Execute(const vtkm::cont::DataSet &input, - const vtkm::cont::CoordinateSystem &field, - const vtkm::filter::PolicyBase& policy ) +template +template +inline VTKM_CONT ResultField FilterField::Execute( + const vtkm::cont::DataSet& input, const vtkm::cont::CoordinateSystem& field, + const vtkm::filter::PolicyBase& policy) { //we need to state that the field is actually a coordinate system, so that //the filter uses the proper policy to convert the types. @@ -123,38 +106,29 @@ ResultField FilterField::Execute(const vtkm::cont::DataSet &input, } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -ResultField FilterField::PrepareForExecution(const vtkm::cont::DataSet &input, - const vtkm::cont::Field &field, - const vtkm::filter::PolicyBase& policy ) +template +template +inline VTKM_CONT ResultField FilterField::PrepareForExecution( + const vtkm::cont::DataSet& input, const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase& policy) { vtkm::filter::FieldMetadata metaData(field); ResultField result; - typedef internal::ResolveFieldTypeAndExecute< Derived, DerivedPolicy, - ResultField > FunctorType; - FunctorType functor(static_cast(this), - input, - metaData, - policy, - this->Tracker, - result); + typedef internal::ResolveFieldTypeAndExecute FunctorType; + FunctorType functor(static_cast(this), input, metaData, policy, this->Tracker, result); - typedef vtkm::filter::FilterTraits< Derived > Traits; - vtkm::cont::CastAndCall( vtkm::filter::ApplyPolicy(field, policy, Traits()), - functor ); + typedef vtkm::filter::FilterTraits Traits; + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(field, policy, Traits()), functor); return result; } //----------------------------------------------------------------------------- -template -template -inline VTKM_CONT -ResultField FilterField::PrepareForExecution(const vtkm::cont::DataSet &input, - const vtkm::cont::CoordinateSystem &field, - const vtkm::filter::PolicyBase& policy ) +template +template +inline VTKM_CONT ResultField FilterField::PrepareForExecution( + const vtkm::cont::DataSet& input, const vtkm::cont::CoordinateSystem& field, + const vtkm::filter::PolicyBase& policy) { //We have a special signature just for CoordinateSystem, so that we can ask //the policy for the storage types and value types just for coordinate systems @@ -162,20 +136,12 @@ ResultField FilterField::PrepareForExecution(const vtkm::cont::DataSet vtkm::filter::FieldMetadata metaData(field); ResultField result; - typedef internal::ResolveFieldTypeAndExecute< Derived, DerivedPolicy, - ResultField > FunctorType; - FunctorType functor(static_cast(this), - input, - metaData, - policy, - this->Tracker, - result); + typedef internal::ResolveFieldTypeAndExecute FunctorType; + FunctorType functor(static_cast(this), input, metaData, policy, this->Tracker, result); - typedef vtkm::filter::FilterTraits< Derived > Traits; - vtkm::cont::CastAndCall( vtkm::filter::ApplyPolicy(field, policy, Traits()), - functor ); + typedef vtkm::filter::FilterTraits Traits; + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(field, policy, Traits()), functor); return result; } - } } diff --git a/vtkm/filter/FilterTraits.h b/vtkm/filter/FilterTraits.h index 6efc48c9e..36d9e56b3 100644 --- a/vtkm/filter/FilterTraits.h +++ b/vtkm/filter/FilterTraits.h @@ -23,9 +23,11 @@ #include -namespace vtkm { -namespace filter { -template +namespace vtkm +{ +namespace filter +{ +template class FilterTraits { public: @@ -35,7 +37,7 @@ public: typedef vtkm::ListTagUniversal InputFieldTypeList; }; -template +template struct DeduceFilterFieldTypes { using FList = typename vtkm::filter::FilterTraits::InputFieldTypeList; @@ -43,7 +45,6 @@ struct DeduceFilterFieldTypes using TypeList = vtkm::ListTagIntersect; }; - } } diff --git a/vtkm/filter/Gradient.h b/vtkm/filter/Gradient.h index 518d725c4..802db50ed 100644 --- a/vtkm/filter/Gradient.h +++ b/vtkm/filter/Gradient.h @@ -23,8 +23,10 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ /// Estimates the gradient of a point field in a data set. The created gradient array /// can be determined at either each point location or at the center of each cell. @@ -42,49 +44,41 @@ public: /// When this flag is on (default is off), the gradient filter will provide a /// point based gradients, which are significantly more costly since for each /// point we need to compute the gradient of each cell that uses it. - void SetComputePointGradient(bool enable) { ComputePointGradient=enable; } + void SetComputePointGradient(bool enable) { ComputePointGradient = enable; } bool GetComputePointGradient() const { return ComputePointGradient; } /// Add divergence field to the output data. The name of the array /// will be Divergence and will be a cell field unless \c ComputePointGradient /// is enabled. The input array must have 3 components in order to /// compute this. The default is off. - void SetComputeDivergence(bool enable) { ComputeDivergence=enable; } + void SetComputeDivergence(bool enable) { ComputeDivergence = enable; } bool GetComputeDivergence() const { return ComputeDivergence; } /// Add voriticity/curl field to the output data. The name of the array /// will be Vorticity and will be a cell field unless \c ComputePointGradient /// is enabled. The input array must have 3 components in order to /// compute this. The default is off. - void SetComputeVorticity(bool enable) { ComputeVorticity=enable; } + void SetComputeVorticity(bool enable) { ComputeVorticity = enable; } bool GetComputeVorticity() const { return ComputeVorticity; } /// Add Q-criterion field to the output data. The name of the array /// will be QCriterion and will be a cell field unless \c ComputePointGradient /// is enabled. The input array must have 3 components in order to /// compute this. The default is off. - void SetComputeQCriterion(bool enable) { ComputeQCriterion=enable; } + void SetComputeQCriterion(bool enable) { ComputeQCriterion = enable; } bool GetComputeQCriterion() const { return ComputeQCriterion; } + void SetDivergenceName(const std::string& name) { this->DivergenceName = name; } + const std::string& GetDivergenceName() const { return this->DivergenceName; } - void SetDivergenceName( const std::string& name ) - { this->DivergenceName = name; } - const std::string& GetDivergenceName() const - { return this->DivergenceName; } + void SetVorticityName(const std::string& name) { this->VorticityName = name; } + const std::string& GetVorticityName() const { return this->VorticityName; } - void SetVorticityName( const std::string& name ) - { this->VorticityName = name; } - const std::string& GetVorticityName() const - { return this->VorticityName; } + void SetQCriterionName(const std::string& name) { this->QCriterionName = name; } + const std::string& GetQCriterionName() const { return this->QCriterionName; } - void SetQCriterionName( const std::string& name ) - { this->QCriterionName = name; } - const std::string& GetQCriterionName() const - { return this->QCriterionName; } - - - template - vtkm::filter::ResultField DoExecute(const vtkm::cont::DataSet &input, + template + vtkm::filter::ResultField DoExecute(const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, const vtkm::filter::FieldMetadata& fieldMeta, const vtkm::filter::PolicyBase& policy, @@ -101,22 +95,21 @@ private: std::string QCriterionName; }; -template<> +template <> class FilterTraits { public: struct TypeListTagGradientInputs - : vtkm::ListTagBase< - vtkm::Float32, vtkm::Float64, - vtkm::Vec, vtkm::Vec > {}; + : vtkm::ListTagBase, + vtkm::Vec> + { + }; typedef TypeListTagGradientInputs InputFieldTypeList; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_Gradient_h diff --git a/vtkm/filter/Gradient.hxx b/vtkm/filter/Gradient.hxx index 1d8d2e5e2..ad3b67075 100644 --- a/vtkm/filter/Gradient.hxx +++ b/vtkm/filter/Gradient.hxx @@ -24,142 +24,127 @@ #include -namespace { +namespace +{ //----------------------------------------------------------------------------- -template +template struct PointGrad { - PointGrad(const vtkm::cont::CoordinateSystem& coords, - const vtkm::cont::ArrayHandle< T, S>& field, - vtkm::cont::ArrayHandle< vtkm::Vec >* result): - Points(&coords), - InField(&field), - Result(result) + PointGrad(const vtkm::cont::CoordinateSystem& coords, const vtkm::cont::ArrayHandle& field, + vtkm::cont::ArrayHandle>* result) + : Points(&coords) + , InField(&field) + , Result(result) { } - template - void operator()(const CellSetType& cellset ) const + template + void operator()(const CellSetType& cellset) const { vtkm::worklet::DispatcherMapTopology dispatcher; dispatcher.Invoke(cellset, //topology to iterate on a per point basis cellset, //whole cellset in - vtkm::filter::ApplyPolicy(*this->Points, this->Policy), - *this->InField, + vtkm::filter::ApplyPolicy(*this->Points, this->Policy), *this->InField, *this->Result); } vtkm::filter::PolicyBase Policy; const vtkm::cont::CoordinateSystem* const Points; - const vtkm::cont::ArrayHandle* const InField; - vtkm::cont::ArrayHandle< vtkm::Vec >* Result; + const vtkm::cont::ArrayHandle* const InField; + vtkm::cont::ArrayHandle>* Result; private: - void operator=(const PointGrad &) = delete; + void operator=(const PointGrad&) = delete; }; //----------------------------------------------------------------------------- -template -inline -void add_field( vtkm::filter::ResultField& result, - const HandleType& handle, - const std::string name) +template +inline void add_field(vtkm::filter::ResultField& result, const HandleType& handle, + const std::string name) { const vtkm::cont::Field::AssociationEnum assoc = result.GetField().GetAssociation(); - if ((assoc == vtkm::cont::Field::ASSOC_WHOLE_MESH) || - (assoc == vtkm::cont::Field::ASSOC_POINTS)) + if ((assoc == vtkm::cont::Field::ASSOC_WHOLE_MESH) || (assoc == vtkm::cont::Field::ASSOC_POINTS)) { vtkm::cont::Field field(name, assoc, handle); result.GetDataSet().AddField(field); } else { - vtkm::cont::Field field(name, - assoc, - result.GetField().GetAssocCellSet(), - handle); + vtkm::cont::Field field(name, assoc, result.GetField().GetAssocCellSet(), handle); result.GetDataSet().AddField(field); } } //----------------------------------------------------------------------------- -template -inline -void add_extra_vec_fields( const vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::Vec, 3>, S> &inField, - const vtkm::filter::Gradient* const filter, - vtkm::filter::ResultField& result, - const DeviceAdapter&) +template +inline void add_extra_vec_fields( + const vtkm::cont::ArrayHandle, 3>, S>& inField, + const vtkm::filter::Gradient* const filter, vtkm::filter::ResultField& result, + const DeviceAdapter&) { - if(filter->GetComputeDivergence()) + if (filter->GetComputeDivergence()) { - vtkm::cont::ArrayHandle< T > divergence; - vtkm::worklet::DispatcherMapField< vtkm::worklet::Divergence, DeviceAdapter > dispatcher; + vtkm::cont::ArrayHandle divergence; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(inField, divergence); add_field(result, divergence, filter->GetDivergenceName()); } - if(filter->GetComputeVorticity()) + if (filter->GetComputeVorticity()) { - vtkm::cont::ArrayHandle< vtkm::Vec > vorticity; - vtkm::worklet::DispatcherMapField< vtkm::worklet::Vorticity, DeviceAdapter > dispatcher; + vtkm::cont::ArrayHandle> vorticity; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(inField, vorticity); add_field(result, vorticity, filter->GetVorticityName()); } - if(filter->GetComputeQCriterion()) + if (filter->GetComputeQCriterion()) { - vtkm::cont::ArrayHandle< T > qc; - vtkm::worklet::DispatcherMapField< vtkm::worklet::QCriterion, DeviceAdapter > dispatcher; + vtkm::cont::ArrayHandle qc; + vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(inField, qc); add_field(result, qc, filter->GetQCriterionName()); } } -template -inline -void add_extra_vec_fields( const vtkm::cont::ArrayHandle< T, S> &, - const vtkm::filter::Gradient* const, - vtkm::filter::ResultField&, - const DeviceAdapter&) +template +inline void add_extra_vec_fields(const vtkm::cont::ArrayHandle&, + const vtkm::filter::Gradient* const, vtkm::filter::ResultField&, + const DeviceAdapter&) { //not a vector array handle so add nothing } } //namespace -namespace vtkm { -namespace filter { - -//----------------------------------------------------------------------------- -Gradient::Gradient(): - ComputePointGradient(false), - ComputeVorticity(false), - ComputeQCriterion(false), - DivergenceName("Divergence"), - VorticityName("Vorticity"), - QCriterionName("QCriterion") - { - - } - -//----------------------------------------------------------------------------- -template -inline -vtkm::filter::ResultField Gradient::DoExecute( - const vtkm::cont::DataSet &input, - const vtkm::cont::ArrayHandle &inField, - const vtkm::filter::FieldMetadata &fieldMetadata, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& adapter) +namespace vtkm { - if(!fieldMetadata.IsPointField()) +namespace filter +{ + +//----------------------------------------------------------------------------- +Gradient::Gradient() + : ComputePointGradient(false) + , ComputeVorticity(false) + , ComputeQCriterion(false) + , DivergenceName("Divergence") + , VorticityName("Vorticity") + , QCriterionName("QCriterion") +{ +} + +//----------------------------------------------------------------------------- +template +inline vtkm::filter::ResultField Gradient::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& inField, + const vtkm::filter::FieldMetadata& fieldMetadata, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& adapter) +{ + if (!fieldMetadata.IsPointField()) { //we currently only support point fields, as we need to write the //worklet to efficiently map a cell field to the points of a cell @@ -167,11 +152,9 @@ vtkm::filter::ResultField Gradient::DoExecute( return vtkm::filter::ResultField(); } - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); const vtkm::cont::CoordinateSystem& coords = - input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); - + input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); vtkm::cont::Field::AssociationEnum fieldAssociation; std::string outputName = this->GetOutputFieldName(); @@ -182,39 +165,27 @@ vtkm::filter::ResultField Gradient::DoExecute( //todo: we need to ask the policy what storage type we should be using //If the input is implicit, we should know what to fall back to - vtkm::cont::ArrayHandle< vtkm::Vec > outArray; - if(this->ComputePointGradient) + vtkm::cont::ArrayHandle> outArray; + if (this->ComputePointGradient) { - PointGrad func(coords, inField, &outArray); - vtkm::cont::CastAndCall( vtkm::filter::ApplyPolicy(cells, policy), - func); + PointGrad func(coords, inField, &outArray); + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(cells, policy), func); fieldAssociation = vtkm::cont::Field::ASSOC_POINTS; } else { - vtkm::worklet::DispatcherMapTopology< - vtkm::worklet::CellGradient, - DeviceAdapter > dispatcher; - dispatcher.Invoke( vtkm::filter::ApplyPolicy(cells, policy), - vtkm::filter::ApplyPolicy(coords, policy), - inField, - outArray); + vtkm::worklet::DispatcherMapTopology dispatcher; + dispatcher.Invoke(vtkm::filter::ApplyPolicy(cells, policy), + vtkm::filter::ApplyPolicy(coords, policy), inField, outArray); fieldAssociation = vtkm::cont::Field::ASSOC_CELL_SET; } - vtkm::filter::ResultField result(input, - outArray, - outputName, - fieldAssociation, - cells.GetName()); + vtkm::filter::ResultField result(input, outArray, outputName, fieldAssociation, cells.GetName()); //Add the vorticity and qcriterion fields if they are enabled to the result add_extra_vec_fields(outArray, this, result, adapter); return result; - - } - } } // namespace vtkm::filter diff --git a/vtkm/filter/Histogram.h b/vtkm/filter/Histogram.h index a0a1e071b..caab001c3 100644 --- a/vtkm/filter/Histogram.h +++ b/vtkm/filter/Histogram.h @@ -23,8 +23,10 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class Histogram : public vtkm::filter::FilterField { @@ -34,10 +36,10 @@ public: Histogram(); VTKM_CONT - void SetNumberOfBins(vtkm::Id count){ this->NumberOfBins = count; } + void SetNumberOfBins(vtkm::Id count) { this->NumberOfBins = count; } VTKM_CONT - vtkm::Id GetNumberOfBins() const { return this->NumberOfBins; } + vtkm::Id GetNumberOfBins() const { return this->NumberOfBins; } //Returns the bin delta of the last computed field, be it from DoExecute //or from MapField @@ -48,21 +50,19 @@ public: VTKM_CONT vtkm::Range GetDataRange() const { return this->DataRange; } - template - VTKM_CONT - vtkm::filter::ResultField DoExecute(const vtkm::cont::DataSet& input, - const vtkm::cont::ArrayHandle& field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultField 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::Id NumberOfBins; + vtkm::Id NumberOfBins; vtkm::Float64 BinDelta; vtkm::Range DataRange; }; -template<> +template <> class FilterTraits { //currently the Histogram filter only works on scalar data. //this mainly has to do with getting the ranges for each bin @@ -70,12 +70,9 @@ class FilterTraits public: typedef TypeListTagScalarAll InputFieldTypeList; }; - - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_Histogram_h diff --git a/vtkm/filter/Histogram.hxx b/vtkm/filter/Histogram.hxx index f045324fa..78fc789a2 100644 --- a/vtkm/filter/Histogram.hxx +++ b/vtkm/filter/Histogram.hxx @@ -21,47 +21,36 @@ #include #include -namespace vtkm { -namespace filter { - +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- -inline VTKM_CONT -Histogram::Histogram(): - NumberOfBins(10), - BinDelta(0), - DataRange() +inline VTKM_CONT Histogram::Histogram() + : NumberOfBins(10) + , BinDelta(0) + , DataRange() { this->SetOutputFieldName("histogram"); } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultField -Histogram::DoExecute(const vtkm::cont::DataSet &inDataSet, - const vtkm::cont::ArrayHandle &field, - const vtkm::filter::FieldMetadata &fieldMetadata, - const vtkm::filter::PolicyBase&, - const DeviceAdapter& device) +template +inline VTKM_CONT vtkm::filter::ResultField Histogram::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 binArray; T delta; - vtkm::worklet::FieldHistogram worklet; worklet.Run(field, this->NumberOfBins, this->DataRange, delta, binArray, device); - this->BinDelta = static_cast(delta); - return vtkm::filter::ResultField(inDataSet, - binArray, - this->GetOutputFieldName(), - fieldMetadata.GetAssociation(), - fieldMetadata.GetCellSetName()); + this->BinDelta = static_cast(delta); + return vtkm::filter::ResultField(inDataSet, binArray, this->GetOutputFieldName(), + fieldMetadata.GetAssociation(), fieldMetadata.GetCellSetName()); } - } } // namespace vtkm::filter diff --git a/vtkm/filter/MarchingCubes.h b/vtkm/filter/MarchingCubes.h index ebd28fc36..9b88d20f4 100644 --- a/vtkm/filter/MarchingCubes.h +++ b/vtkm/filter/MarchingCubes.h @@ -24,10 +24,10 @@ #include #include - -namespace vtkm { -namespace filter { - +namespace vtkm +{ +namespace filter +{ /* * Outstanding issues: @@ -66,37 +66,34 @@ public: void SetMergeDuplicatePoints(bool on) { this->Worklet.SetMergeDuplicatePoints(on); } VTKM_CONT - bool GetMergeDuplicatePoints() const { return this->Worklet.GetMergeDuplicatePoints(); } + bool GetMergeDuplicatePoints() const { return this->Worklet.GetMergeDuplicatePoints(); } VTKM_CONT void SetGenerateNormals(bool on) { this->GenerateNormals = on; } VTKM_CONT - bool GetGenerateNormals() const { return this->GenerateNormals; } + bool GetGenerateNormals() const { return this->GenerateNormals; } VTKM_CONT - void SetNormalArrayName(const std::string &name) { this->NormalArrayName = name; } + void SetNormalArrayName(const std::string& name) { this->NormalArrayName = name; } VTKM_CONT const std::string& GetNormalArrayName() const { return this->NormalArrayName; } - template - VTKM_CONT - vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, - const vtkm::cont::ArrayHandle& field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultDataSet DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& tag); //Map a new field onto the resulting dataset after running the filter //this call is only valid - template - VTKM_CONT - bool DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT bool DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); private: std::vector IsoValues; @@ -105,19 +102,19 @@ private: vtkm::worklet::MarchingCubes Worklet; }; -template<> +template <> class FilterTraits { public: - struct TypeListTagMCScalars : vtkm::ListTagBase { }; + struct TypeListTagMCScalars + : vtkm::ListTagBase + { + }; typedef TypeListTagMCScalars InputFieldTypeList; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_MarchingCubes_h diff --git a/vtkm/filter/MarchingCubes.hxx b/vtkm/filter/MarchingCubes.hxx index ec68048a0..c09d5241b 100644 --- a/vtkm/filter/MarchingCubes.hxx +++ b/vtkm/filter/MarchingCubes.hxx @@ -25,105 +25,94 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- -inline VTKM_CONT -MarchingCubes::MarchingCubes(): - vtkm::filter::FilterDataSetWithField(), - IsoValues(), - GenerateNormals(false), - NormalArrayName("normals"), - Worklet() +inline VTKM_CONT MarchingCubes::MarchingCubes() + : vtkm::filter::FilterDataSetWithField() + , IsoValues() + , GenerateNormals(false) + , NormalArrayName("normals") + , Worklet() { // todo: keep an instance of marching cubes worklet as a member variable } - //----------------------------------------------------------------------------- -inline -void MarchingCubes::SetNumberOfIsoValues(vtkm::Id num) +inline void MarchingCubes::SetNumberOfIsoValues(vtkm::Id num) { - if(num >= 0) + if (num >= 0) { this->IsoValues.resize(static_cast(num)); } } //----------------------------------------------------------------------------- -inline -vtkm::Id MarchingCubes::GetNumberOfIsoValues() const +inline vtkm::Id MarchingCubes::GetNumberOfIsoValues() const { return static_cast(this->IsoValues.size()); } //----------------------------------------------------------------------------- -inline -void MarchingCubes::SetIsoValue(vtkm::Id index, vtkm::Float64 v) +inline void MarchingCubes::SetIsoValue(vtkm::Id index, vtkm::Float64 v) { std::size_t i = static_cast(index); - if(i >= this->IsoValues.size()) + if (i >= this->IsoValues.size()) { - this->IsoValues.resize(i+1); + this->IsoValues.resize(i + 1); } this->IsoValues[i] = v; } //----------------------------------------------------------------------------- -inline -void MarchingCubes::SetIsoValues(const std::vector& values) +inline void MarchingCubes::SetIsoValues(const std::vector& values) { this->IsoValues = values; } //----------------------------------------------------------------------------- -inline -vtkm::Float64 MarchingCubes::GetIsoValue(vtkm::Id index) const +inline vtkm::Float64 MarchingCubes::GetIsoValue(vtkm::Id index) const { return this->IsoValues[static_cast(index)]; } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultDataSet MarchingCubes::DoExecute(const vtkm::cont::DataSet& input, - const vtkm::cont::ArrayHandle& field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& device) +template +inline VTKM_CONT vtkm::filter::ResultDataSet MarchingCubes::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& device) { - if(fieldMeta.IsPointField() == false) + if (fieldMeta.IsPointField() == false) { //todo: we need to mark this as a failure of input, not a failure //of the algorithm return vtkm::filter::ResultDataSet(); } - if(this->IsoValues.size() == 0) + if (this->IsoValues.size() == 0) { return vtkm::filter::ResultDataSet(); } //get the cells and coordinates of the dataset - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); const vtkm::cont::CoordinateSystem& coords = - input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); + input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); - typedef vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::FloatDefault,3> > Vec3HandleType; + typedef vtkm::cont::ArrayHandle> Vec3HandleType; Vec3HandleType vertices; Vec3HandleType normals; vtkm::cont::DataSet output; - vtkm::cont::CellSetSingleType< > outputCells; + vtkm::cont::CellSetSingleType<> outputCells; std::vector ivalues(this->IsoValues.size()); - for(std::size_t i = 0; i < ivalues.size(); ++i) + for (std::size_t i = 0; i < ivalues.size(); ++i) { ivalues[i] = static_cast(this->IsoValues[i]); } @@ -132,78 +121,54 @@ vtkm::filter::ResultDataSet MarchingCubes::DoExecute(const vtkm::cont::DataSet& //worklet with the design //But I think we should get this to compile before we tinker with //a more efficient api - if(this->GenerateNormals) + if (this->GenerateNormals) { - outputCells = - this->Worklet.Run( &ivalues[0], - static_cast(ivalues.size()), - vtkm::filter::ApplyPolicy(cells, policy), - vtkm::filter::ApplyPolicy(coords, policy), - field, - vertices, - normals, - device - ); + outputCells = this->Worklet.Run( + &ivalues[0], static_cast(ivalues.size()), vtkm::filter::ApplyPolicy(cells, policy), + vtkm::filter::ApplyPolicy(coords, policy), field, vertices, normals, device); } else { - outputCells = - this->Worklet.Run( &ivalues[0], - static_cast(ivalues.size()), - vtkm::filter::ApplyPolicy(cells, policy), - vtkm::filter::ApplyPolicy(coords, policy), - field, - vertices, - device - ); + outputCells = this->Worklet.Run( + &ivalues[0], static_cast(ivalues.size()), vtkm::filter::ApplyPolicy(cells, policy), + vtkm::filter::ApplyPolicy(coords, policy), field, vertices, device); } - - if(this->GenerateNormals) + if (this->GenerateNormals) { - vtkm::cont::Field normalField(this->NormalArrayName, - vtkm::cont::Field::ASSOC_POINTS, normals); - output.AddField( normalField ); + vtkm::cont::Field normalField(this->NormalArrayName, vtkm::cont::Field::ASSOC_POINTS, normals); + output.AddField(normalField); } //assign the connectivity to the cell set - output.AddCellSet( outputCells ); - + output.AddCellSet(outputCells); //add the coordinates to the output dataset vtkm::cont::CoordinateSystem outputCoords("coordinates", vertices); - output.AddCoordinateSystem( outputCoords ); + output.AddCoordinateSystem(outputCoords); return vtkm::filter::ResultDataSet(output); } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool MarchingCubes::DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase&, - const DeviceAdapter& device) +template +inline VTKM_CONT bool MarchingCubes::DoMapField( + vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, const vtkm::filter::PolicyBase&, + const DeviceAdapter& device) { - if(fieldMeta.IsPointField() == false) + if (fieldMeta.IsPointField() == false) { //not a point field, we can't map it return false; } vtkm::cont::ArrayHandle output; - this->Worklet.MapFieldOntoIsosurface( input, output, device); + this->Worklet.MapFieldOntoIsosurface(input, output, device); //use the same meta data as the input so we get the same field name, etc. - result.GetDataSet().AddField( fieldMeta.AsField(output) ); + result.GetDataSet().AddField(fieldMeta.AsField(output)); return true; - } - - } } // namespace vtkm::filter diff --git a/vtkm/filter/Mask.h b/vtkm/filter/Mask.h index 071e48801..253fe08e3 100644 --- a/vtkm/filter/Mask.h +++ b/vtkm/filter/Mask.h @@ -25,8 +25,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class Mask : public vtkm::filter::FilterDataSet { @@ -37,31 +39,28 @@ public: // When CompactPoints is set, instead of copying the points and point fields // from the input, the filter will create new compact fields without the unused elements VTKM_CONT - bool GetCompactPoints() const { return this->CompactPoints; } + bool GetCompactPoints() const { return this->CompactPoints; } VTKM_CONT void SetCompactPoints(bool value) { this->CompactPoints = value; } // Set the stride of the subsample VTKM_CONT - vtkm::Id GetStride() const { return this->Stride; } + vtkm::Id GetStride() const { return this->Stride; } VTKM_CONT - void SetStride(vtkm::Id &stride) { this->Stride = stride; } + void SetStride(vtkm::Id& stride) { this->Stride = stride; } - template - VTKM_CONT - vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultDataSet DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); //Map a new field onto the resulting dataset after running the filter - template - VTKM_CONT - bool DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); - + template + VTKM_CONT bool DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); private: vtkm::Id Stride; @@ -69,11 +68,9 @@ private: bool CompactPoints; vtkm::filter::CleanGrid Compactor; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_Mask_h diff --git a/vtkm/filter/Mask.hxx b/vtkm/filter/Mask.hxx index c5e777d18..f7049289b 100644 --- a/vtkm/filter/Mask.hxx +++ b/vtkm/filter/Mask.hxx @@ -24,48 +24,46 @@ class AddPermutationCellSet { vtkm::cont::DataSet* Output; vtkm::cont::ArrayHandle* ValidIds; -public: - AddPermutationCellSet(vtkm::cont::DataSet& data, - vtkm::cont::ArrayHandle& validIds): - Output(&data), - ValidIds(&validIds) - { } - template - void operator()(const CellSetType& cellset ) const +public: + AddPermutationCellSet(vtkm::cont::DataSet& data, vtkm::cont::ArrayHandle& validIds) + : Output(&data) + , ValidIds(&validIds) + { + } + + template + void operator()(const CellSetType& cellset) const { typedef vtkm::cont::CellSetPermutation PermutationCellSetType; - PermutationCellSetType permCellSet(*this->ValidIds, cellset, - cellset.GetName()); + PermutationCellSetType permCellSet(*this->ValidIds, cellset, cellset.GetName()); this->Output->AddCellSet(permCellSet); } }; } -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- -inline VTKM_CONT -Mask::Mask(): - vtkm::filter::FilterDataSet(), - Stride(1), - CompactPoints(false) +inline VTKM_CONT Mask::Mask() + : vtkm::filter::FilterDataSet() + , Stride(1) + , CompactPoints(false) { } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultDataSet Mask::DoExecute(const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter&) +template +inline VTKM_CONT vtkm::filter::ResultDataSet Mask::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter&) { - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; @@ -80,50 +78,44 @@ vtkm::filter::ResultDataSet Mask::DoExecute(const vtkm::cont::DataSet& input, output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex())); AddPermutationCellSet addCellSet(output, this->ValidCellIds); - vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(cells, policy), - addCellSet); + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(cells, policy), addCellSet); return output; } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool Mask::DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase&, - const DeviceAdapter&) +template +inline VTKM_CONT bool Mask::DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase&, + const DeviceAdapter&) { // point data is copied as is because it was not collapsed - if(fieldMeta.IsPointField()) + if (fieldMeta.IsPointField()) { result.GetDataSet().AddField(fieldMeta.AsField(input)); return true; } - if(fieldMeta.IsCellField()) + if (fieldMeta.IsCellField()) { //todo: We need to generate a new output policy that replaces //the original storage tag with a new storage tag where everything is //wrapped in ArrayHandlePermutation. - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > PermutationType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + PermutationType; PermutationType permutation = - vtkm::cont::make_ArrayHandlePermutation(this->ValidCellIds, input); + vtkm::cont::make_ArrayHandlePermutation(this->ValidCellIds, input); - result.GetDataSet().AddField( fieldMeta.AsField(permutation) ); + result.GetDataSet().AddField(fieldMeta.AsField(permutation)); return true; } // cell data does not apply return false; } - } } diff --git a/vtkm/filter/MaskPoints.h b/vtkm/filter/MaskPoints.h index 86149145b..7ab33919c 100644 --- a/vtkm/filter/MaskPoints.h +++ b/vtkm/filter/MaskPoints.h @@ -25,8 +25,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class MaskPoints : public vtkm::filter::FilterDataSet { @@ -37,29 +39,27 @@ public: // When CompactPoints is set, instead of copying the points and point fields // from the input, the filter will create new compact fields without the unused elements VTKM_CONT - bool GetCompactPoints() const { return this->CompactPoints; } + bool GetCompactPoints() const { return this->CompactPoints; } VTKM_CONT void SetCompactPoints(bool value) { this->CompactPoints = value; } VTKM_CONT - vtkm::Id GetStride() const { return this->Stride; } + vtkm::Id GetStride() const { return this->Stride; } VTKM_CONT void SetStride(vtkm::Id stride) { this->Stride = stride; } - template - VTKM_CONT - vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultDataSet DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); //Map a new field onto the resulting dataset after running the filter - template - VTKM_CONT - bool DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT bool DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); private: vtkm::Id Stride; @@ -69,7 +69,6 @@ private: } } // namespace vtkm::filter - #include #endif // vtk_m_filter_MaskPoints_h diff --git a/vtkm/filter/MaskPoints.hxx b/vtkm/filter/MaskPoints.hxx index cd2c849e4..004b132cf 100644 --- a/vtkm/filter/MaskPoints.hxx +++ b/vtkm/filter/MaskPoints.hxx @@ -29,60 +29,52 @@ struct CellSetSingleTypePolicy : public BasePolicy }; template -inline vtkm::filter::PolicyBase> -GetCellSetSingleTypePolicy(const vtkm::filter::PolicyBase&) +inline vtkm::filter::PolicyBase> GetCellSetSingleTypePolicy( + const vtkm::filter::PolicyBase&) { return vtkm::filter::PolicyBase>(); } } - -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- -inline VTKM_CONT -MaskPoints::MaskPoints(): - vtkm::filter::FilterDataSet(), - Stride(1), - CompactPoints(true) +inline VTKM_CONT MaskPoints::MaskPoints() + : vtkm::filter::FilterDataSet() + , Stride(1) + , CompactPoints(true) { } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultDataSet MaskPoints::DoExecute( - const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& device) +template +inline VTKM_CONT vtkm::filter::ResultDataSet MaskPoints::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& device) { // extract the input cell set - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); // run the worklet on the cell set and input field vtkm::cont::CellSetSingleType<> outCellSet; vtkm::worklet::MaskPoints worklet; - outCellSet = worklet.Run(vtkm::filter::ApplyPolicy(cells, policy), - this->Stride, - device); + outCellSet = worklet.Run(vtkm::filter::ApplyPolicy(cells, policy), this->Stride, device); // create the output dataset vtkm::cont::DataSet output; output.AddCellSet(outCellSet); - output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()) ); + output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex())); // compact the unused points in the output dataset if (this->CompactPoints) { this->Compactor.SetCompactPointFields(true); vtkm::filter::ResultDataSet result; - result = this->Compactor.DoExecute(output, - GetCellSetSingleTypePolicy(policy), - DeviceAdapter()); + result = this->Compactor.DoExecute(output, GetCellSetSingleTypePolicy(policy), DeviceAdapter()); return result; } else @@ -92,20 +84,15 @@ vtkm::filter::ResultDataSet MaskPoints::DoExecute( } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool MaskPoints::DoMapField( - vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter&) +template +inline VTKM_CONT bool MaskPoints::DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter&) { // point data is copied as is because it was not collapsed - if(fieldMeta.IsPointField()) + if (fieldMeta.IsPointField()) { if (this->CompactPoints) { @@ -117,10 +104,9 @@ bool MaskPoints::DoMapField( return true; } } - + // cell data does not apply return false; } - } } diff --git a/vtkm/filter/PointAverage.h b/vtkm/filter/PointAverage.h index 225e3bcfe..fc8433c87 100644 --- a/vtkm/filter/PointAverage.h +++ b/vtkm/filter/PointAverage.h @@ -24,8 +24,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class PointAverage : public vtkm::filter::FilterCell { @@ -33,23 +35,18 @@ public: VTKM_CONT PointAverage(); - template - VTKM_CONT - vtkm::filter::ResultField DoExecute(const vtkm::cont::DataSet &input, - const vtkm::cont::ArrayHandle& field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultField 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::PointAverage Worklet; - }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_PointAverage_h diff --git a/vtkm/filter/PointAverage.hxx b/vtkm/filter/PointAverage.hxx index 2483e5282..24db2dcc5 100644 --- a/vtkm/filter/PointAverage.hxx +++ b/vtkm/filter/PointAverage.hxx @@ -22,50 +22,40 @@ #include -namespace vtkm { -namespace filter { - - -//----------------------------------------------------------------------------- -inline VTKM_CONT -PointAverage::PointAverage(): - vtkm::filter::FilterCell(), - Worklet() +namespace vtkm +{ +namespace filter { +//----------------------------------------------------------------------------- +inline VTKM_CONT PointAverage::PointAverage() + : vtkm::filter::FilterCell() + , Worklet() +{ } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultField PointAverage::DoExecute( - const vtkm::cont::DataSet &input, - const vtkm::cont::ArrayHandle &inField, - const vtkm::filter::FieldMetadata &fieldMetadata, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter&) +template +inline VTKM_CONT vtkm::filter::ResultField PointAverage::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& inField, + const vtkm::filter::FieldMetadata& fieldMetadata, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter&) { - if(!fieldMetadata.IsCellField()) + if (!fieldMetadata.IsCellField()) { return vtkm::filter::ResultField(); } - vtkm::cont::DynamicCellSet cellSet = - input.GetCellSet(this->GetActiveCellSetIndex()); + vtkm::cont::DynamicCellSet cellSet = input.GetCellSet(this->GetActiveCellSetIndex()); //todo: we need to ask the policy what storage type we should be using //If the input is implicit, we should know what to fall back to vtkm::cont::ArrayHandle outArray; - vtkm::worklet::DispatcherMapTopology dispatcher(this->Worklet); + vtkm::worklet::DispatcherMapTopology dispatcher( + this->Worklet); - dispatcher.Invoke(vtkm::filter::ApplyPolicy(cellSet, policy), - inField, - outArray); + dispatcher.Invoke(vtkm::filter::ApplyPolicy(cellSet, policy), inField, outArray); std::string outputName = this->GetOutputFieldName(); if (outputName.empty()) @@ -74,12 +64,8 @@ vtkm::filter::ResultField PointAverage::DoExecute( outputName = fieldMetadata.GetName(); } - return vtkm::filter::ResultField(input, - outArray, - outputName, - vtkm::cont::Field::ASSOC_POINTS, + return vtkm::filter::ResultField(input, outArray, outputName, vtkm::cont::Field::ASSOC_POINTS, cellSet.GetName()); } - } } // namespace vtkm::filter diff --git a/vtkm/filter/PointElevation.h b/vtkm/filter/PointElevation.h index 42317d704..33363465e 100644 --- a/vtkm/filter/PointElevation.h +++ b/vtkm/filter/PointElevation.h @@ -24,9 +24,10 @@ #include #include - -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class PointElevation : public vtkm::filter::FilterField { @@ -43,32 +44,26 @@ public: VTKM_CONT void SetRange(vtkm::Float64 low, vtkm::Float64 high); - - template - VTKM_CONT - vtkm::filter::ResultField DoExecute(const vtkm::cont::DataSet &input, - const vtkm::cont::ArrayHandle &field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultField 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::PointElevation Worklet; - }; -template<> +template <> class FilterTraits { public: //Point Elevation can only convert Float and Double Vec3 arrays typedef vtkm::TypeListTagFieldVec3 InputFieldTypeList; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_PointElevation_h diff --git a/vtkm/filter/PointElevation.hxx b/vtkm/filter/PointElevation.hxx index d86ec9ff1..e4b841dcd 100644 --- a/vtkm/filter/PointElevation.hxx +++ b/vtkm/filter/PointElevation.hxx @@ -20,66 +20,54 @@ #include -namespace vtkm { -namespace filter { - +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- -inline VTKM_CONT -PointElevation::PointElevation(): - Worklet() +inline VTKM_CONT PointElevation::PointElevation() + : Worklet() { this->SetOutputFieldName("elevation"); } //----------------------------------------------------------------------------- -inline VTKM_CONT -void PointElevation::SetLowPoint(vtkm::Float64 x, vtkm::Float64 y, vtkm::Float64 z) +inline VTKM_CONT void PointElevation::SetLowPoint(vtkm::Float64 x, vtkm::Float64 y, vtkm::Float64 z) { - this->Worklet.SetLowPoint( vtkm::make_Vec(x,y,z) ); + this->Worklet.SetLowPoint(vtkm::make_Vec(x, y, z)); } //----------------------------------------------------------------------------- -inline VTKM_CONT -void PointElevation::SetHighPoint(vtkm::Float64 x, vtkm::Float64 y, vtkm::Float64 z) +inline VTKM_CONT void PointElevation::SetHighPoint(vtkm::Float64 x, vtkm::Float64 y, + vtkm::Float64 z) { - this->Worklet.SetHighPoint( vtkm::make_Vec(x,y,z) ); + this->Worklet.SetHighPoint(vtkm::make_Vec(x, y, z)); } //----------------------------------------------------------------------------- -inline VTKM_CONT -void PointElevation::SetRange(vtkm::Float64 low, vtkm::Float64 high) +inline VTKM_CONT void PointElevation::SetRange(vtkm::Float64 low, vtkm::Float64 high) { - this->Worklet.SetRange(low,high); + this->Worklet.SetRange(low, high); } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultField -PointElevation::DoExecute(const vtkm::cont::DataSet &inDataSet, - const vtkm::cont::ArrayHandle &field, - const vtkm::filter::FieldMetadata &fieldMetadata, - const vtkm::filter::PolicyBase&, - const DeviceAdapter&) +template +inline VTKM_CONT vtkm::filter::ResultField PointElevation::DoExecute( + const vtkm::cont::DataSet& inDataSet, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMetadata, const vtkm::filter::PolicyBase&, + const DeviceAdapter&) { vtkm::cont::ArrayHandle outArray; - vtkm::worklet::DispatcherMapField dispatcher(this->Worklet); + vtkm::worklet::DispatcherMapField dispatcher( + this->Worklet); //todo, we need to use the policy to determine the valid conversions //that the dispatcher should do dispatcher.Invoke(field, outArray); - return vtkm::filter::ResultField(inDataSet, - outArray, - this->GetOutputFieldName(), - fieldMetadata.GetAssociation(), - fieldMetadata.GetCellSetName()); + return vtkm::filter::ResultField(inDataSet, outArray, this->GetOutputFieldName(), + fieldMetadata.GetAssociation(), fieldMetadata.GetCellSetName()); } - } } // namespace vtkm::filter diff --git a/vtkm/filter/PolicyBase.h b/vtkm/filter/PolicyBase.h index e666a3768..e6596f692 100644 --- a/vtkm/filter/PolicyBase.h +++ b/vtkm/filter/PolicyBase.h @@ -32,13 +32,15 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ -template +template struct PolicyBase { - typedef VTKM_DEFAULT_TYPE_LIST_TAG FieldTypeList; + typedef VTKM_DEFAULT_TYPE_LIST_TAG FieldTypeList; typedef VTKM_DEFAULT_STORAGE_LIST_TAG FieldStorageList; typedef vtkm::cont::CellSetListTagStructured StructuredCellSetList; @@ -52,62 +54,48 @@ struct PolicyBase typedef VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG DeviceAdapterList; }; - //----------------------------------------------------------------------------- -template -VTKM_CONT -vtkm::cont::DynamicArrayHandleBase< - typename DerivedPolicy::FieldTypeList, - typename DerivedPolicy::FieldStorageList - > -ApplyPolicy(const vtkm::cont::Field& field, - const vtkm::filter::PolicyBase&) +template +VTKM_CONT vtkm::cont::DynamicArrayHandleBase +ApplyPolicy(const vtkm::cont::Field& field, const vtkm::filter::PolicyBase&) { typedef typename DerivedPolicy::FieldTypeList TypeList; typedef typename DerivedPolicy::FieldStorageList StorageList; - return field.GetData().ResetTypeAndStorageLists(TypeList(),StorageList()); + return field.GetData().ResetTypeAndStorageLists(TypeList(), StorageList()); } //----------------------------------------------------------------------------- -template -VTKM_CONT -vtkm::cont::DynamicArrayHandleBase< +template +VTKM_CONT vtkm::cont::DynamicArrayHandleBase< typename vtkm::filter::DeduceFilterFieldTypes::TypeList, - typename DerivedPolicy::FieldStorageList - > -ApplyPolicy(const vtkm::cont::Field& field, - const vtkm::filter::PolicyBase&, + typename DerivedPolicy::FieldStorageList> +ApplyPolicy(const vtkm::cont::Field& field, const vtkm::filter::PolicyBase&, const vtkm::filter::FilterTraits&) { - typedef typename vtkm::filter::DeduceFilterFieldTypes< - DerivedPolicy, FilterType>::TypeList TypeList; + typedef + typename vtkm::filter::DeduceFilterFieldTypes::TypeList TypeList; typedef typename DerivedPolicy::FieldStorageList StorageList; - return field.GetData().ResetTypeAndStorageLists(TypeList(),StorageList()); + return field.GetData().ResetTypeAndStorageLists(TypeList(), StorageList()); } //----------------------------------------------------------------------------- -template -VTKM_CONT -vtkm::cont::DynamicArrayHandleBase< - typename DerivedPolicy::CoordinateTypeList, - typename DerivedPolicy::CoordinateStorageList - > +template +VTKM_CONT vtkm::cont::DynamicArrayHandleBase ApplyPolicy(const vtkm::cont::CoordinateSystem& coordinates, const vtkm::filter::PolicyBase&) { typedef typename DerivedPolicy::CoordinateTypeList TypeList; typedef typename DerivedPolicy::CoordinateStorageList StorageList; - return coordinates.GetData().ResetTypeAndStorageLists(TypeList(),StorageList()); + return coordinates.GetData().ResetTypeAndStorageLists(TypeList(), StorageList()); } //----------------------------------------------------------------------------- -template -VTKM_CONT -vtkm::cont::DynamicArrayHandleBase< - typename DerivedPolicy::CoordinateTypeList, - typename DerivedPolicy::CoordinateStorageList - > +template +VTKM_CONT vtkm::cont::DynamicArrayHandleBase ApplyPolicy(const vtkm::cont::CoordinateSystem& coordinates, const vtkm::filter::PolicyBase&, const vtkm::filter::FilterTraits&) @@ -116,24 +104,21 @@ ApplyPolicy(const vtkm::cont::CoordinateSystem& coordinates, //filter traits to the get smallest set of valid types typedef typename DerivedPolicy::CoordinateTypeList TypeList; typedef typename DerivedPolicy::CoordinateStorageList StorageList; - return coordinates.GetData().ResetTypeAndStorageLists(TypeList(),StorageList()); + return coordinates.GetData().ResetTypeAndStorageLists(TypeList(), StorageList()); } //----------------------------------------------------------------------------- -template -VTKM_CONT -vtkm::cont::DynamicCellSetBase< typename DerivedPolicy::AllCellSetList > -ApplyPolicy(const vtkm::cont::DynamicCellSet& cellset, - const vtkm::filter::PolicyBase&) +template +VTKM_CONT vtkm::cont::DynamicCellSetBase ApplyPolicy( + const vtkm::cont::DynamicCellSet& cellset, const vtkm::filter::PolicyBase&) { typedef typename DerivedPolicy::AllCellSetList CellSetList; return cellset.ResetCellSetList(CellSetList()); } //----------------------------------------------------------------------------- -template -VTKM_CONT -vtkm::cont::DynamicCellSetBase< typename DerivedPolicy::StructuredCellSetList > +template +VTKM_CONT vtkm::cont::DynamicCellSetBase ApplyPolicyStructured(const vtkm::cont::DynamicCellSet& cellset, const vtkm::filter::PolicyBase&) { @@ -142,16 +127,14 @@ ApplyPolicyStructured(const vtkm::cont::DynamicCellSet& cellset, } //----------------------------------------------------------------------------- -template -VTKM_CONT -vtkm::cont::DynamicCellSetBase< typename DerivedPolicy::UnstructuredCellSetList > +template +VTKM_CONT vtkm::cont::DynamicCellSetBase ApplyPolicyUnstructured(const vtkm::cont::DynamicCellSet& cellset, const vtkm::filter::PolicyBase&) { typedef typename DerivedPolicy::UnstructuredCellSetList CellSetList; return cellset.ResetCellSetList(CellSetList()); } - } } diff --git a/vtkm/filter/PolicyDefault.h b/vtkm/filter/PolicyDefault.h index 014bcf076..dd3b1bc78 100644 --- a/vtkm/filter/PolicyDefault.h +++ b/vtkm/filter/PolicyDefault.h @@ -23,16 +23,16 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ -struct PolicyDefault : vtkm::filter::PolicyBase< PolicyDefault > +struct PolicyDefault : vtkm::filter::PolicyBase { // Inherit defaults from PolicyBase }; - } } - #endif //vtk_m_filter_PolicyDefault_h diff --git a/vtkm/filter/ResultBase.h b/vtkm/filter/ResultBase.h index 33180352b..0d12f0559 100644 --- a/vtkm/filter/ResultBase.h +++ b/vtkm/filter/ResultBase.h @@ -23,8 +23,10 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ /// \brief Base class for result returned from a filter. /// @@ -48,28 +50,31 @@ public: /// Returns the results of the filter in terms of a \c DataSet. /// VTKM_CONT - const vtkm::cont::DataSet &GetDataSet() const { return this->Data; } + const vtkm::cont::DataSet& GetDataSet() const { return this->Data; } /// Returns the results of the filter in terms of a writable \c DataSet. VTKM_CONT - vtkm::cont::DataSet &GetDataSet() { return this->Data; } + vtkm::cont::DataSet& GetDataSet() { return this->Data; } protected: VTKM_CONT - ResultBase(): Valid(false) { } - - VTKM_CONT - ResultBase(const vtkm::cont::DataSet &dataSet) - : Valid(true), Data(dataSet) { } - - VTKM_CONT - void SetValid(bool valid) + ResultBase() + : Valid(false) { - this->Valid = valid; } VTKM_CONT - void SetDataSet(const vtkm::cont::DataSet &dataSet) + ResultBase(const vtkm::cont::DataSet& dataSet) + : Valid(true) + , Data(dataSet) + { + } + + VTKM_CONT + void SetValid(bool valid) { this->Valid = valid; } + + VTKM_CONT + void SetDataSet(const vtkm::cont::DataSet& dataSet) { this->Data = dataSet; this->SetValid(true); @@ -79,7 +84,6 @@ private: bool Valid; vtkm::cont::DataSet Data; }; - } } // namespace vtkm::filter diff --git a/vtkm/filter/ResultDataSet.h b/vtkm/filter/ResultDataSet.h index abd660dfe..a0be89203 100644 --- a/vtkm/filter/ResultDataSet.h +++ b/vtkm/filter/ResultDataSet.h @@ -23,8 +23,10 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ /// \brief Results for filters that generate new geometry /// @@ -40,13 +42,14 @@ class ResultDataSet : public vtkm::filter::ResultBase { public: VTKM_CONT - ResultDataSet() { } + ResultDataSet() {} VTKM_CONT - ResultDataSet(const vtkm::cont::DataSet &dataSet) - : ResultBase(dataSet) { } + ResultDataSet(const vtkm::cont::DataSet& dataSet) + : ResultBase(dataSet) + { + } }; - } } // namespace vtkm::filter diff --git a/vtkm/filter/ResultField.h b/vtkm/filter/ResultField.h index a4a5c04b8..871d446ef 100644 --- a/vtkm/filter/ResultField.h +++ b/vtkm/filter/ResultField.h @@ -25,8 +25,10 @@ #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ /// \brief Results for filters that create a field /// @@ -40,20 +42,18 @@ class ResultField : public vtkm::filter::ResultBase { public: VTKM_CONT - ResultField() { } + ResultField() {} /// Use this constructor if the field has already been added to the data set. /// In this case, just tell us what the field name is (and optionally its /// association). /// VTKM_CONT - ResultField(const vtkm::cont::DataSet &dataSet, - const std::string &fieldName, - vtkm::cont::Field::AssociationEnum fieldAssociation - = vtkm::cont::Field::ASSOC_ANY) - : ResultBase(dataSet), - FieldName(fieldName), - FieldAssociation(fieldAssociation) + ResultField(const vtkm::cont::DataSet& dataSet, const std::string& fieldName, + vtkm::cont::Field::AssociationEnum fieldAssociation = vtkm::cont::Field::ASSOC_ANY) + : ResultBase(dataSet) + , FieldName(fieldName) + , FieldAssociation(fieldAssociation) { VTKM_ASSERT(fieldName != ""); VTKM_ASSERT(dataSet.HasField(fieldName, fieldAssociation)); @@ -63,9 +63,9 @@ public: /// \c DataSet will be created by adding the field to the input. /// VTKM_CONT - ResultField(const vtkm::cont::DataSet &inDataSet, - const vtkm::cont::Field &field) - : FieldName(field.GetName()), FieldAssociation(field.GetAssociation()) + ResultField(const vtkm::cont::DataSet& inDataSet, const vtkm::cont::Field& field) + : FieldName(field.GetName()) + , FieldAssociation(field.GetAssociation()) { VTKM_ASSERT(this->FieldName != ""); @@ -74,8 +74,7 @@ public: this->SetDataSet(outDataSet); // Sanity check. - VTKM_ASSERT(this->GetDataSet().HasField(this->FieldName, - this->FieldAssociation)); + VTKM_ASSERT(this->GetDataSet().HasField(this->FieldName, this->FieldAssociation)); } /// Use this constructor if you have an ArrayHandle that holds the data for @@ -85,14 +84,14 @@ public: /// that associated set must also be given. The element set name is ignored /// for \c ASSOC_WHOLE_MESH and \c ASSOC_POINTS associations. /// - template - VTKM_CONT - ResultField(const vtkm::cont::DataSet &inDataSet, - const vtkm::cont::ArrayHandle &fieldArray, - const std::string &fieldName, - vtkm::cont::Field::AssociationEnum fieldAssociation, - const std::string &elementSetName = "") - : FieldName(fieldName), FieldAssociation(fieldAssociation) + template + VTKM_CONT ResultField(const vtkm::cont::DataSet& inDataSet, + const vtkm::cont::ArrayHandle& fieldArray, + const std::string& fieldName, + vtkm::cont::Field::AssociationEnum fieldAssociation, + const std::string& elementSetName = "") + : FieldName(fieldName) + , FieldAssociation(fieldAssociation) { VTKM_ASSERT(fieldName != ""); VTKM_ASSERT(fieldAssociation != vtkm::cont::Field::ASSOC_ANY); @@ -108,18 +107,14 @@ public: } else { - vtkm::cont::Field field(fieldName, - fieldAssociation, - elementSetName, - fieldArray); + vtkm::cont::Field field(fieldName, fieldAssociation, elementSetName, fieldArray); outDataSet.AddField(field); } this->SetDataSet(outDataSet); // Sanity check. - VTKM_ASSERT(this->GetDataSet().HasField(this->FieldName, - this->FieldAssociation)); + VTKM_ASSERT(this->GetDataSet().HasField(this->FieldName, this->FieldAssociation)); } /// Use this constructor if you have a DynamicArrayHandle that holds the data @@ -130,12 +125,12 @@ public: /// for \c ASSOC_WHOLE_MESH and \c ASSOC_POINTS associations. /// VTKM_CONT - ResultField(const vtkm::cont::DataSet &inDataSet, - const vtkm::cont::DynamicArrayHandle &fieldArray, - const std::string &fieldName, + ResultField(const vtkm::cont::DataSet& inDataSet, + const vtkm::cont::DynamicArrayHandle& fieldArray, const std::string& fieldName, vtkm::cont::Field::AssociationEnum fieldAssociation, - const std::string &elementSetName = "") - : FieldName(fieldName), FieldAssociation(fieldAssociation) + const std::string& elementSetName = "") + : FieldName(fieldName) + , FieldAssociation(fieldAssociation) { VTKM_ASSERT(fieldName != ""); VTKM_ASSERT(fieldAssociation != vtkm::cont::Field::ASSOC_ANY); @@ -151,36 +146,31 @@ public: } else { - vtkm::cont::Field field(fieldName, - fieldAssociation, - elementSetName, - fieldArray); + vtkm::cont::Field field(fieldName, fieldAssociation, elementSetName, fieldArray); outDataSet.AddField(field); } this->SetDataSet(outDataSet); // Sanity check. - VTKM_ASSERT(this->GetDataSet().HasField(this->FieldName, - this->FieldAssociation)); + VTKM_ASSERT(this->GetDataSet().HasField(this->FieldName, this->FieldAssociation)); } VTKM_CONT - const vtkm::cont::Field &GetField() const + const vtkm::cont::Field& GetField() const { return this->GetDataSet().GetField(this->FieldName, this->FieldAssociation); } - template - VTKM_CONT - bool FieldAs(vtkm::cont::ArrayHandle &dest) const + template + VTKM_CONT bool FieldAs(vtkm::cont::ArrayHandle& dest) const { try { this->GetField().GetData().CopyTo(dest); return true; } - catch(vtkm::cont::Error&) + catch (vtkm::cont::Error&) { return false; } @@ -190,7 +180,6 @@ private: std::string FieldName; vtkm::cont::Field::AssociationEnum FieldAssociation; }; - } } // namespace vtkm::filter diff --git a/vtkm/filter/Tetrahedralize.h b/vtkm/filter/Tetrahedralize.h index ac4f98de1..a79284cea 100644 --- a/vtkm/filter/Tetrahedralize.h +++ b/vtkm/filter/Tetrahedralize.h @@ -24,8 +24,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class Tetrahedralize : public vtkm::filter::FilterDataSet { @@ -33,29 +35,25 @@ public: VTKM_CONT Tetrahedralize(); - template - VTKM_CONT - vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultDataSet DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); // Map new field onto the resulting dataset after running the filter - template - VTKM_CONT - bool DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT bool DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); private: vtkm::worklet::Tetrahedralize Worklet; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_Tetrahedralize_h diff --git a/vtkm/filter/Tetrahedralize.hxx b/vtkm/filter/Tetrahedralize.hxx index 961fe843b..8a26e8d30 100644 --- a/vtkm/filter/Tetrahedralize.hxx +++ b/vtkm/filter/Tetrahedralize.hxx @@ -23,90 +23,78 @@ namespace { -template -class DeduceCellSet +template +class DeduceCellSet { mutable vtkm::worklet::Tetrahedralize Worklet; - vtkm::cont::CellSetSingleType<> &OutCellSet; + vtkm::cont::CellSetSingleType<>& OutCellSet; public: - DeduceCellSet(vtkm::worklet::Tetrahedralize worklet, - vtkm::cont::CellSetSingleType<>& outCellSet) : - Worklet(worklet), - OutCellSet(outCellSet) - {} - - template - void operator()(const CellSetType& cellset ) const + DeduceCellSet(vtkm::worklet::Tetrahedralize worklet, vtkm::cont::CellSetSingleType<>& outCellSet) + : Worklet(worklet) + , OutCellSet(outCellSet) { - this->OutCellSet = Worklet.Run(cellset, DeviceAdapter()); + } + + template + void operator()(const CellSetType& cellset) const + { + this->OutCellSet = Worklet.Run(cellset, DeviceAdapter()); } }; - } -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- -inline VTKM_CONT -Tetrahedralize::Tetrahedralize(): - vtkm::filter::FilterDataSet(), - Worklet() +inline VTKM_CONT Tetrahedralize::Tetrahedralize() + : vtkm::filter::FilterDataSet() + , Worklet() { } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultDataSet Tetrahedralize::DoExecute( - const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter&) +template +inline VTKM_CONT vtkm::filter::ResultDataSet Tetrahedralize::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter&) { - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); vtkm::cont::CellSetSingleType<> outCellSet; DeduceCellSet tetrahedralize(this->Worklet, outCellSet); - vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(cells, policy), - tetrahedralize); + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(cells, policy), tetrahedralize); // create the output dataset vtkm::cont::DataSet output; output.AddCellSet(outCellSet); - output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()) ); + output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex())); return vtkm::filter::ResultDataSet(output); } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool Tetrahedralize::DoMapField( - vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase&, - const DeviceAdapter& device) +template +inline VTKM_CONT bool Tetrahedralize::DoMapField( + vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, const vtkm::filter::PolicyBase&, + const DeviceAdapter& device) { // point data is copied as is because it was not collapsed - if(fieldMeta.IsPointField()) + if (fieldMeta.IsPointField()) { result.GetDataSet().AddField(fieldMeta.AsField(input)); return true; } - + // cell data must be scattered to the cells created per input cell - if(fieldMeta.IsCellField()) + if (fieldMeta.IsCellField()) { - vtkm::cont::ArrayHandle output = - this->Worklet.ProcessField(input, device); + vtkm::cont::ArrayHandle output = this->Worklet.ProcessField(input, device); result.GetDataSet().AddField(fieldMeta.AsField(output)); return true; @@ -114,6 +102,5 @@ bool Tetrahedralize::DoMapField( return false; } - } } diff --git a/vtkm/filter/Threshold.h b/vtkm/filter/Threshold.h index 1872bd4cb..aa3144897 100644 --- a/vtkm/filter/Threshold.h +++ b/vtkm/filter/Threshold.h @@ -24,8 +24,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class Threshold : public vtkm::filter::FilterDataSetWithField { @@ -34,33 +36,29 @@ public: Threshold(); VTKM_CONT - void SetLowerThreshold(vtkm::Float64 value){ this->LowerValue = value; } + void SetLowerThreshold(vtkm::Float64 value) { this->LowerValue = value; } VTKM_CONT - void SetUpperThreshold(vtkm::Float64 value){ this->UpperValue = value; } + void SetUpperThreshold(vtkm::Float64 value) { this->UpperValue = value; } VTKM_CONT - vtkm::Float64 GetLowerThreshold() const { return this->LowerValue; } + vtkm::Float64 GetLowerThreshold() const { return this->LowerValue; } VTKM_CONT - vtkm::Float64 GetUpperThreshold() const { return this->UpperValue; } + vtkm::Float64 GetUpperThreshold() const { return this->UpperValue; } - template - VTKM_CONT - vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, - const vtkm::cont::ArrayHandle& field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultDataSet DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& tag); //Map a new field onto the resulting dataset after running the filter //this call is only valid - template - VTKM_CONT - bool DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); - + template + VTKM_CONT bool DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); private: double LowerValue; @@ -68,18 +66,15 @@ private: vtkm::cont::ArrayHandle ValidCellIds; }; -template<> +template <> class FilterTraits { //currently the threshold filter only works on scalar data. public: typedef TypeListTagScalarAll InputFieldTypeList; }; - - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_Threshold_h diff --git a/vtkm/filter/Threshold.hxx b/vtkm/filter/Threshold.hxx index 3dbd3ea29..5e91a27c6 100644 --- a/vtkm/filter/Threshold.hxx +++ b/vtkm/filter/Threshold.hxx @@ -32,18 +32,16 @@ class ThresholdRange { public: VTKM_CONT - ThresholdRange(const vtkm::Float64& lower, - const vtkm::Float64& upper) : - Lower(lower), - Upper(upper) - { } - - template - VTKM_EXEC - bool operator()(const T& value) const + ThresholdRange(const vtkm::Float64& lower, const vtkm::Float64& upper) + : Lower(lower) + , Upper(upper) { - return value >= static_cast(this->Lower) && - value <= static_cast(this->Upper); + } + + template + VTKM_EXEC bool operator()(const T& value) const + { + return value >= static_cast(this->Lower) && value <= static_cast(this->Upper); } private: @@ -55,72 +53,64 @@ class AddPermutationCellSet { vtkm::cont::DataSet* Output; vtkm::cont::ArrayHandle* ValidIds; -public: - AddPermutationCellSet(vtkm::cont::DataSet& data, - vtkm::cont::ArrayHandle& validIds): - Output(&data), - ValidIds(&validIds) - { } - template - void operator()(const CellSetType& cellset ) const +public: + AddPermutationCellSet(vtkm::cont::DataSet& data, vtkm::cont::ArrayHandle& validIds) + : Output(&data) + , ValidIds(&validIds) + { + } + + template + void operator()(const CellSetType& cellset) const { typedef vtkm::cont::CellSetPermutation PermutationCellSetType; - PermutationCellSetType permCellSet(*this->ValidIds, cellset, - cellset.GetName()); + PermutationCellSetType permCellSet(*this->ValidIds, cellset, cellset.GetName()); this->Output->AddCellSet(permCellSet); } }; - } - -namespace vtkm { -namespace filter { - -//----------------------------------------------------------------------------- -inline VTKM_CONT -Threshold::Threshold(): - vtkm::filter::FilterDataSetWithField(), - LowerValue(0), - UpperValue(0), - ValidCellIds() +namespace vtkm +{ +namespace filter { +//----------------------------------------------------------------------------- +inline VTKM_CONT Threshold::Threshold() + : vtkm::filter::FilterDataSetWithField() + , LowerValue(0) + , UpperValue(0) + , ValidCellIds() +{ } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultDataSet Threshold::DoExecute(const vtkm::cont::DataSet& input, - const vtkm::cont::ArrayHandle& field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter&) +template +inline VTKM_CONT vtkm::filter::ResultDataSet Threshold::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter&) { //get the cells and coordinates of the dataset - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); - ThresholdRange predicate( this->GetLowerThreshold(), this->GetUpperThreshold() ); + ThresholdRange predicate(this->GetLowerThreshold(), this->GetUpperThreshold()); vtkm::cont::ArrayHandle passFlags; - if(fieldMeta.IsPointField()) + if (fieldMeta.IsPointField()) { typedef vtkm::worklet::Threshold Worklets; - typedef Worklets::ThresholdByPointField< ThresholdRange > ThresholdWorklet; + typedef Worklets::ThresholdByPointField ThresholdWorklet; ThresholdWorklet worklet(predicate); vtkm::worklet::DispatcherMapTopology dispatcher(worklet); dispatcher.Invoke(vtkm::filter::ApplyPolicy(cells, policy), field, passFlags); } - else if(fieldMeta.IsCellField()) + else if (fieldMeta.IsCellField()) { typedef vtkm::worklet::Threshold Worklets; - typedef Worklets::ThresholdByCellField< ThresholdRange > ThresholdWorklet; + typedef Worklets::ThresholdByCellField ThresholdWorklet; ThresholdWorklet worklet(predicate); vtkm::worklet::DispatcherMapTopology dispatcher(worklet); dispatcher.Invoke(vtkm::filter::ApplyPolicy(cells, policy), field, passFlags); @@ -135,12 +125,11 @@ vtkm::filter::ResultDataSet Threshold::DoExecute(const vtkm::cont::DataSet& inpu typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; vtkm::cont::ArrayHandleCounting indices = - vtkm::cont::make_ArrayHandleCounting(vtkm::Id(0), vtkm::Id(1), passFlags.GetNumberOfValues()); + vtkm::cont::make_ArrayHandleCounting(vtkm::Id(0), vtkm::Id(1), passFlags.GetNumberOfValues()); Algorithm::CopyIf(indices, passFlags, this->ValidCellIds); vtkm::cont::DataSet output; - output.AddCoordinateSystem( - input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()) ); + output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex())); //now generate the output cellset. We are going to need to do a cast //and call to generate the correct form of output. @@ -148,8 +137,7 @@ vtkm::filter::ResultDataSet Threshold::DoExecute(const vtkm::cont::DataSet& inpu //can use to reduce code duplication, and make it easier to write filters //that return complex dataset types. AddPermutationCellSet addCellSet(output, this->ValidCellIds); - vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(cells, policy), - addCellSet); + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(cells, policy), addCellSet); //todo: We need to generate a new output policy that replaces //the original storage tag with a new storage tag where everything is @@ -158,42 +146,37 @@ vtkm::filter::ResultDataSet Threshold::DoExecute(const vtkm::cont::DataSet& inpu } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool Threshold::DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase&, - const DeviceAdapter&) +template +inline VTKM_CONT bool Threshold::DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase&, + const DeviceAdapter&) { - if(fieldMeta.IsPointField()) + if (fieldMeta.IsPointField()) { //we copy the input handle to the result dataset, reusing the metadata - result.GetDataSet().AddField( fieldMeta.AsField(input) ); + result.GetDataSet().AddField(fieldMeta.AsField(input)); return true; } - if(fieldMeta.IsCellField()) + if (fieldMeta.IsCellField()) { //todo: We need to generate a new output policy that replaces //the original storage tag with a new storage tag where everything is //wrapped in ArrayHandlePermutation. - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > PermutationType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + PermutationType; PermutationType permutation = - vtkm::cont::make_ArrayHandlePermutation(this->ValidCellIds, input); + vtkm::cont::make_ArrayHandlePermutation(this->ValidCellIds, input); - result.GetDataSet().AddField( fieldMeta.AsField(permutation) ); + result.GetDataSet().AddField(fieldMeta.AsField(permutation)); return true; } return false; } - } } diff --git a/vtkm/filter/ThresholdPoints.h b/vtkm/filter/ThresholdPoints.h index 4a648d268..b08386959 100644 --- a/vtkm/filter/ThresholdPoints.h +++ b/vtkm/filter/ThresholdPoints.h @@ -25,8 +25,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class ThresholdPoints : public vtkm::filter::FilterDataSetWithField { @@ -37,17 +39,17 @@ public: // When CompactPoints is set, instead of copying the points and point fields // from the input, the filter will create new compact fields without the unused elements VTKM_CONT - bool GetCompactPoints() const { return this->CompactPoints; } + bool GetCompactPoints() const { return this->CompactPoints; } VTKM_CONT void SetCompactPoints(bool value) { this->CompactPoints = value; } VTKM_CONT - vtkm::Float64 GetLowerThreshold() const { return this->LowerValue; } + vtkm::Float64 GetLowerThreshold() const { return this->LowerValue; } VTKM_CONT void SetLowerThreshold(vtkm::Float64 value) { this->LowerValue = value; } VTKM_CONT - vtkm::Float64 GetUpperThreshold() const { return this->UpperValue; } + vtkm::Float64 GetUpperThreshold() const { return this->UpperValue; } VTKM_CONT void SetUpperThreshold(vtkm::Float64 value) { this->UpperValue = value; } @@ -58,25 +60,20 @@ public: VTKM_CONT void SetThresholdBetween(const vtkm::Float64 value1, const vtkm::Float64 value2); - - template - VTKM_CONT - vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, - const vtkm::cont::ArrayHandle& field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultDataSet DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& tag); //Map a new field onto the resulting dataset after running the filter //this call is only valid - template - VTKM_CONT - bool DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); - + template + VTKM_CONT bool DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); private: double LowerValue; @@ -87,18 +84,15 @@ private: vtkm::filter::CleanGrid Compactor; }; -template<> +template <> class FilterTraits { //currently the threshold filter only works on scalar data. public: typedef TypeListTagScalarAll InputFieldTypeList; }; - - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_ThresholdPoints_h diff --git a/vtkm/filter/ThresholdPoints.hxx b/vtkm/filter/ThresholdPoints.hxx index f05964d72..6f7257be4 100644 --- a/vtkm/filter/ThresholdPoints.hxx +++ b/vtkm/filter/ThresholdPoints.hxx @@ -29,8 +29,8 @@ struct CellSetSingleTypePolicy : public BasePolicy }; template -inline vtkm::filter::PolicyBase> -GetCellSetSingleTypePolicy(const vtkm::filter::PolicyBase&) +inline vtkm::filter::PolicyBase> GetCellSetSingleTypePolicy( + const vtkm::filter::PolicyBase&) { return vtkm::filter::PolicyBase>(); } @@ -40,11 +40,13 @@ class ValuesBelow { public: VTKM_CONT - ValuesBelow(const vtkm::Float64& value) : Value(value) {} + ValuesBelow(const vtkm::Float64& value) + : Value(value) + { + } - template - VTKM_EXEC - bool operator()(const ScalarType& value) const + template + VTKM_EXEC bool operator()(const ScalarType& value) const { return value <= static_cast(this->Value); } @@ -58,11 +60,13 @@ class ValuesAbove { public: VTKM_CONT - ValuesAbove(const vtkm::Float64& value) : Value(value) {} + ValuesAbove(const vtkm::Float64& value) + : Value(value) + { + } - template - VTKM_EXEC - bool operator()(const ScalarType& value) const + template + VTKM_EXEC bool operator()(const ScalarType& value) const { return value >= static_cast(this->Value); } @@ -77,16 +81,17 @@ class ValuesBetween { public: VTKM_CONT - ValuesBetween(const vtkm::Float64& lower, - const vtkm::Float64& upper) : Lower(lower), Upper(upper) - { } + ValuesBetween(const vtkm::Float64& lower, const vtkm::Float64& upper) + : Lower(lower) + , Upper(upper) + { + } - template - VTKM_EXEC - bool operator()(const ScalarType& value) const + template + VTKM_EXEC bool operator()(const ScalarType& value) const { return value >= static_cast(this->Lower) && - value <= static_cast(this->Upper); + value <= static_cast(this->Upper); } private: @@ -95,45 +100,42 @@ private: }; } +namespace vtkm +{ +namespace filter +{ -namespace vtkm { -namespace filter { - -const int THRESHOLD_BELOW = 0; -const int THRESHOLD_ABOVE = 1; +const int THRESHOLD_BELOW = 0; +const int THRESHOLD_ABOVE = 1; const int THRESHOLD_BETWEEN = 2; //----------------------------------------------------------------------------- -inline VTKM_CONT -ThresholdPoints::ThresholdPoints(): - vtkm::filter::FilterDataSetWithField(), - LowerValue(0), - UpperValue(0), - ThresholdType(THRESHOLD_BETWEEN), - CompactPoints(false) +inline VTKM_CONT ThresholdPoints::ThresholdPoints() + : vtkm::filter::FilterDataSetWithField() + , LowerValue(0) + , UpperValue(0) + , ThresholdType(THRESHOLD_BETWEEN) + , CompactPoints(false) { } //----------------------------------------------------------------------------- -inline VTKM_CONT -void ThresholdPoints::SetThresholdBelow(const vtkm::Float64 value) +inline VTKM_CONT void ThresholdPoints::SetThresholdBelow(const vtkm::Float64 value) { this->SetLowerThreshold(value); this->SetUpperThreshold(value); this->ThresholdType = THRESHOLD_BELOW; } -inline VTKM_CONT -void ThresholdPoints::SetThresholdAbove(const vtkm::Float64 value) +inline VTKM_CONT void ThresholdPoints::SetThresholdAbove(const vtkm::Float64 value) { this->SetLowerThreshold(value); this->SetUpperThreshold(value); this->ThresholdType = THRESHOLD_ABOVE; } -inline VTKM_CONT -void ThresholdPoints::SetThresholdBetween(const vtkm::Float64 value1, - const vtkm::Float64 value2) +inline VTKM_CONT void ThresholdPoints::SetThresholdBetween(const vtkm::Float64 value1, + const vtkm::Float64 value2) { this->SetLowerThreshold(value1); this->SetUpperThreshold(value2); @@ -141,21 +143,14 @@ void ThresholdPoints::SetThresholdBetween(const vtkm::Float64 value1, } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultDataSet ThresholdPoints::DoExecute( - const vtkm::cont::DataSet& input, - const vtkm::cont::ArrayHandle& field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& device) +template +inline VTKM_CONT vtkm::filter::ResultDataSet ThresholdPoints::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter& device) { // extract the input cell set - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); // field to threshold on must be a point field if (fieldMeta.IsPointField() == false) @@ -170,46 +165,39 @@ vtkm::filter::ResultDataSet ThresholdPoints::DoExecute( switch (this->ThresholdType) { - case THRESHOLD_BELOW: - { - outCellSet = worklet.Run(vtkm::filter::ApplyPolicy(cells, policy), - field, - ValuesBelow(this->GetLowerThreshold()), - device); - break; - } - case THRESHOLD_ABOVE: - { - outCellSet = worklet.Run(vtkm::filter::ApplyPolicy(cells, policy), - field, - ValuesAbove(this->GetUpperThreshold()), - device); - break; - } - case THRESHOLD_BETWEEN: - default: + case THRESHOLD_BELOW: { - outCellSet = worklet.Run(vtkm::filter::ApplyPolicy(cells, policy), - field, - ValuesBetween(this->GetLowerThreshold(), this->GetUpperThreshold()), - device); - break; + outCellSet = worklet.Run(vtkm::filter::ApplyPolicy(cells, policy), field, + ValuesBelow(this->GetLowerThreshold()), device); + break; + } + case THRESHOLD_ABOVE: + { + outCellSet = worklet.Run(vtkm::filter::ApplyPolicy(cells, policy), field, + ValuesAbove(this->GetUpperThreshold()), device); + break; + } + case THRESHOLD_BETWEEN: + default: + { + outCellSet = + worklet.Run(vtkm::filter::ApplyPolicy(cells, policy), field, + ValuesBetween(this->GetLowerThreshold(), this->GetUpperThreshold()), device); + break; } } // create the output dataset vtkm::cont::DataSet output; output.AddCellSet(outCellSet); - output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()) ); + output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex())); // compact the unused points in the output dataset if (this->CompactPoints) { this->Compactor.SetCompactPointFields(true); vtkm::filter::ResultDataSet result; - result = this->Compactor.DoExecute(output, - GetCellSetSingleTypePolicy(policy), - DeviceAdapter()); + result = this->Compactor.DoExecute(output, GetCellSetSingleTypePolicy(policy), DeviceAdapter()); return result; } else @@ -219,20 +207,14 @@ vtkm::filter::ResultDataSet ThresholdPoints::DoExecute( } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool ThresholdPoints::DoMapField( - vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter&) +template +inline VTKM_CONT bool ThresholdPoints::DoMapField( + vtkm::filter::ResultDataSet& result, const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, const DeviceAdapter&) { // point data is copied as is because it was not collapsed - if(fieldMeta.IsPointField()) + if (fieldMeta.IsPointField()) { if (this->CompactPoints) { @@ -244,10 +226,9 @@ bool ThresholdPoints::DoMapField( return true; } } - + // cell data does not apply return false; } - } } diff --git a/vtkm/filter/Triangulate.h b/vtkm/filter/Triangulate.h index 8c31b9bcb..e60647015 100644 --- a/vtkm/filter/Triangulate.h +++ b/vtkm/filter/Triangulate.h @@ -24,8 +24,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class Triangulate : public vtkm::filter::FilterDataSet { @@ -33,29 +35,25 @@ public: VTKM_CONT Triangulate(); - template - VTKM_CONT - vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultDataSet DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); // Map new field onto the resulting dataset after running the filter - template - VTKM_CONT - bool DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT bool DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); private: vtkm::worklet::Triangulate Worklet; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_Triangulate_h diff --git a/vtkm/filter/Triangulate.hxx b/vtkm/filter/Triangulate.hxx index 31ebece36..1cfea0778 100644 --- a/vtkm/filter/Triangulate.hxx +++ b/vtkm/filter/Triangulate.hxx @@ -23,99 +23,85 @@ namespace { -template +template class DeduceCellSet { mutable vtkm::worklet::Triangulate Worklet; - vtkm::cont::CellSetSingleType<> &OutCellSet; + vtkm::cont::CellSetSingleType<>& OutCellSet; public: - DeduceCellSet(vtkm::worklet::Triangulate worklet, - vtkm::cont::CellSetSingleType<>& outCellSet) : - Worklet(worklet), - OutCellSet(outCellSet) - {} - - template - void operator()(const CellSetType& cellset ) const + DeduceCellSet(vtkm::worklet::Triangulate worklet, vtkm::cont::CellSetSingleType<>& outCellSet) + : Worklet(worklet) + , OutCellSet(outCellSet) { - this->OutCellSet = Worklet.Run(cellset, DeviceAdapter()); + } + + template + void operator()(const CellSetType& cellset) const + { + this->OutCellSet = Worklet.Run(cellset, DeviceAdapter()); } }; - } -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- -inline VTKM_CONT -Triangulate::Triangulate(): - vtkm::filter::FilterDataSet(), - Worklet() +inline VTKM_CONT Triangulate::Triangulate() + : vtkm::filter::FilterDataSet() + , Worklet() { } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultDataSet Triangulate::DoExecute( - const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter&) +template +inline VTKM_CONT vtkm::filter::ResultDataSet Triangulate::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter&) { - const vtkm::cont::DynamicCellSet& cells = - input.GetCellSet(this->GetActiveCellSetIndex()); + const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex()); vtkm::cont::CellSetSingleType<> outCellSet; DeduceCellSet triangulate(this->Worklet, outCellSet); - vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(cells, policy), - triangulate); - + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(cells, policy), triangulate); // create the output dataset vtkm::cont::DataSet output; output.AddCellSet(outCellSet); - output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()) ); + output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex())); return vtkm::filter::ResultDataSet(output); } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool Triangulate::DoMapField( - vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase&, - const DeviceAdapter& device) +template +inline VTKM_CONT bool Triangulate::DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase&, + const DeviceAdapter& device) { // point data is copied as is because it was not collapsed - if(fieldMeta.IsPointField()) + if (fieldMeta.IsPointField()) { result.GetDataSet().AddField(fieldMeta.AsField(input)); return true; } - + // cell data must be scattered to the cells created per input cell - if(fieldMeta.IsCellField()) + if (fieldMeta.IsCellField()) { - vtkm::cont::ArrayHandle output = - this->Worklet.ProcessField(input, device); + vtkm::cont::ArrayHandle output = this->Worklet.ProcessField(input, device); result.GetDataSet().AddField(fieldMeta.AsField(output)); return true; - } return false; } - } } diff --git a/vtkm/filter/VectorMagnitude.h b/vtkm/filter/VectorMagnitude.h index a89aa6b4d..678d2d398 100644 --- a/vtkm/filter/VectorMagnitude.h +++ b/vtkm/filter/VectorMagnitude.h @@ -24,8 +24,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class VectorMagnitude : public vtkm::filter::FilterField { @@ -33,30 +35,25 @@ public: VTKM_CONT VectorMagnitude(); - template - VTKM_CONT - vtkm::filter::ResultField DoExecute(const vtkm::cont::DataSet &input, - const vtkm::cont::ArrayHandle& field, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultField 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::Magnitude Worklet; - }; -template<> +template <> class FilterTraits { //currently the VectorMagnitude filter only works on vector data. public: typedef TypeListTagVecCommon InputFieldTypeList; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_VectorMagnitude_h diff --git a/vtkm/filter/VectorMagnitude.hxx b/vtkm/filter/VectorMagnitude.hxx index 58599898b..a77cabcd3 100644 --- a/vtkm/filter/VectorMagnitude.hxx +++ b/vtkm/filter/VectorMagnitude.hxx @@ -20,46 +20,36 @@ #include -namespace vtkm { -namespace filter { - +namespace vtkm +{ +namespace filter +{ //----------------------------------------------------------------------------- -inline VTKM_CONT -VectorMagnitude::VectorMagnitude(): - vtkm::filter::FilterField(), - Worklet() +inline VTKM_CONT VectorMagnitude::VectorMagnitude() + : vtkm::filter::FilterField() + , Worklet() { this->SetOutputFieldName("magnitude"); } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultField -VectorMagnitude::DoExecute(const vtkm::cont::DataSet &inDataSet, - const vtkm::cont::ArrayHandle &field, - const vtkm::filter::FieldMetadata &fieldMetadata, - const vtkm::filter::PolicyBase&, - const DeviceAdapter&) +template +inline VTKM_CONT vtkm::filter::ResultField VectorMagnitude::DoExecute( + const vtkm::cont::DataSet& inDataSet, const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMetadata, const vtkm::filter::PolicyBase&, + const DeviceAdapter&) { typedef typename detail::FloatingPointReturnType::Type ReturnType; vtkm::cont::ArrayHandle outArray; - vtkm::worklet::DispatcherMapField dispatcher(this->Worklet); + vtkm::worklet::DispatcherMapField dispatcher( + this->Worklet); dispatcher.Invoke(field, outArray); - return vtkm::filter::ResultField(inDataSet, - outArray, - this->GetOutputFieldName(), - fieldMetadata.GetAssociation(), - fieldMetadata.GetCellSetName()); + return vtkm::filter::ResultField(inDataSet, outArray, this->GetOutputFieldName(), + fieldMetadata.GetAssociation(), fieldMetadata.GetCellSetName()); } - } } // namespace vtkm::filter diff --git a/vtkm/filter/VertexClustering.h b/vtkm/filter/VertexClustering.h index 1a95cf379..cb960519f 100644 --- a/vtkm/filter/VertexClustering.h +++ b/vtkm/filter/VertexClustering.h @@ -24,8 +24,10 @@ #include #include -namespace vtkm { -namespace filter { +namespace vtkm +{ +namespace filter +{ class VertexClustering : public vtkm::filter::FilterDataSet { @@ -34,35 +36,31 @@ public: VertexClustering(); VTKM_CONT - void SetNumberOfDivisions(const vtkm::Id3& num ) { this->NumberOfDivisions = num; } + void SetNumberOfDivisions(const vtkm::Id3& num) { this->NumberOfDivisions = num; } VTKM_CONT const vtkm::Id3& GetNumberOfDivisions() const { return this->NumberOfDivisions; } - template - VTKM_CONT - vtkm::filter::ResultDataSet DoExecute(const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT vtkm::filter::ResultDataSet DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); //Map a new field onto the resulting dataset after running the filter //this call is only valid - template - VTKM_CONT - bool DoMapField(vtkm::filter::ResultDataSet& result, - const vtkm::cont::ArrayHandle& input, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag); + template + VTKM_CONT bool DoMapField(vtkm::filter::ResultDataSet& result, + const vtkm::cont::ArrayHandle& input, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); private: vtkm::Id3 NumberOfDivisions; }; - } } // namespace vtkm::filter - #include #endif // vtk_m_filter_VertexClustering_h diff --git a/vtkm/filter/VertexClustering.hxx b/vtkm/filter/VertexClustering.hxx index c9dbe1be4..d9c75c3e1 100644 --- a/vtkm/filter/VertexClustering.hxx +++ b/vtkm/filter/VertexClustering.hxx @@ -18,59 +18,49 @@ // this software. //============================================================================ -namespace vtkm { -namespace filter { - -//----------------------------------------------------------------------------- -inline VTKM_CONT -VertexClustering::VertexClustering(): - vtkm::filter::FilterDataSet(), - NumberOfDivisions(256, 256, 256) +namespace vtkm +{ +namespace filter { +//----------------------------------------------------------------------------- +inline VTKM_CONT VertexClustering::VertexClustering() + : vtkm::filter::FilterDataSet() + , NumberOfDivisions(256, 256, 256) +{ } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -vtkm::filter::ResultDataSet VertexClustering::DoExecute(const vtkm::cont::DataSet& input, - const vtkm::filter::PolicyBase& policy, - const DeviceAdapter& tag) +template +inline VTKM_CONT vtkm::filter::ResultDataSet VertexClustering::DoExecute( + const vtkm::cont::DataSet& input, const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag) { // todo this code needs to obey the policy for what storage types // the output should use vtkm::worklet::VertexClustering clustering; //need to compute bounds first - vtkm::Bounds bounds = - input.GetCoordinateSystem().GetBounds( - typename DerivedPolicy::CoordinateTypeList(), - typename DerivedPolicy::CoordinateStorageList()); + vtkm::Bounds bounds = input.GetCoordinateSystem().GetBounds( + typename DerivedPolicy::CoordinateTypeList(), typename DerivedPolicy::CoordinateStorageList()); - vtkm::cont::DataSet outDataSet = clustering.Run(vtkm::filter::ApplyPolicyUnstructured(input.GetCellSet(), policy), - vtkm::filter::ApplyPolicy(input.GetCoordinateSystem(), policy), - bounds, - this->GetNumberOfDivisions(), - tag); + vtkm::cont::DataSet outDataSet = + clustering.Run(vtkm::filter::ApplyPolicyUnstructured(input.GetCellSet(), policy), + vtkm::filter::ApplyPolicy(input.GetCoordinateSystem(), policy), bounds, + this->GetNumberOfDivisions(), tag); return vtkm::filter::ResultDataSet(outDataSet); } //----------------------------------------------------------------------------- -template -inline VTKM_CONT -bool VertexClustering::DoMapField(vtkm::filter::ResultDataSet&, - const vtkm::cont::ArrayHandle&, - const vtkm::filter::FieldMetadata&, - const vtkm::filter::PolicyBase&, - const DeviceAdapter&) +template +inline VTKM_CONT bool VertexClustering::DoMapField(vtkm::filter::ResultDataSet&, + const vtkm::cont::ArrayHandle&, + const vtkm::filter::FieldMetadata&, + const vtkm::filter::PolicyBase&, + const DeviceAdapter&) { return false; } - } } diff --git a/vtkm/filter/internal/ResolveFieldTypeAndExecute.h b/vtkm/filter/internal/ResolveFieldTypeAndExecute.h index 98f93d7c9..ff3c68416 100644 --- a/vtkm/filter/internal/ResolveFieldTypeAndExecute.h +++ b/vtkm/filter/internal/ResolveFieldTypeAndExecute.h @@ -28,85 +28,77 @@ #include #include -namespace vtkm { -namespace filter { -namespace internal { +namespace vtkm +{ +namespace filter +{ +namespace internal +{ -template +template struct ResolveFieldTypeAndExecute { typedef ResolveFieldTypeAndExecute Self; Derived* DerivedClass; - const vtkm::cont::DataSet &InputData; + const vtkm::cont::DataSet& InputData; const vtkm::filter::FieldMetadata& Metadata; const vtkm::filter::PolicyBase& Policy; vtkm::cont::RuntimeDeviceTracker Tracker; ResultType& Result; - ResolveFieldTypeAndExecute( - Derived* derivedClass, - const vtkm::cont::DataSet &inputData, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - const vtkm::cont::RuntimeDeviceTracker& tracker, - ResultType& result): - DerivedClass(derivedClass), - InputData(inputData), - Metadata(fieldMeta), - Policy(policy), - Tracker(tracker), - Result(result) + ResolveFieldTypeAndExecute(Derived* derivedClass, const vtkm::cont::DataSet& inputData, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const vtkm::cont::RuntimeDeviceTracker& tracker, ResultType& result) + : DerivedClass(derivedClass) + , InputData(inputData) + , Metadata(fieldMeta) + , Policy(policy) + , Tracker(tracker) + , Result(result) { - } private: - - template + template struct ResolveFieldTypeAndExecuteForDevice { - typedef vtkm::cont::ArrayHandle FieldArrayHandle; - ResolveFieldTypeAndExecuteForDevice(const Self& instance, - const FieldArrayHandle& field) : - Instance(instance), Field(field) {} + typedef vtkm::cont::ArrayHandle FieldArrayHandle; + ResolveFieldTypeAndExecuteForDevice(const Self& instance, const FieldArrayHandle& field) + : Instance(instance) + , Field(field) + { + } const Self& Instance; - const vtkm::cont::ArrayHandle& Field; + const vtkm::cont::ArrayHandle& Field; template bool operator()(DeviceAdapterTag tag) const { - this->Instance.Result = - this->Instance.DerivedClass->DoExecute(this->Instance.InputData, - this->Field, - this->Instance.Metadata, - this->Instance.Policy, - tag ); + this->Instance.Result = this->Instance.DerivedClass->DoExecute( + this->Instance.InputData, this->Field, this->Instance.Metadata, this->Instance.Policy, tag); return this->Instance.Result.IsValid(); } private: - void operator=(const ResolveFieldTypeAndExecuteForDevice&) = delete; + void operator=(const ResolveFieldTypeAndExecuteForDevice&) = delete; }; public: - - template - void operator()(const vtkm::cont::ArrayHandle& field) const + template + void operator()(const vtkm::cont::ArrayHandle& field) const { - ResolveFieldTypeAndExecuteForDevice doResolve(*this,field); - vtkm::cont::TryExecute(doResolve, - this->Tracker, - typename DerivedPolicy::DeviceAdapterList()); + ResolveFieldTypeAndExecuteForDevice doResolve(*this, field); + vtkm::cont::TryExecute(doResolve, this->Tracker, typename DerivedPolicy::DeviceAdapterList()); } private: - void operator=(const ResolveFieldTypeAndExecute &) = delete; + void operator=(const ResolveFieldTypeAndExecute&) = delete; }; - } } -} // namespace vtkm::filter::internal +} // namespace vtkm::filter::internal #endif //vtk_m_filter_internal_ResolveFieldTypeAndExecute_h diff --git a/vtkm/filter/internal/ResolveFieldTypeAndMap.h b/vtkm/filter/internal/ResolveFieldTypeAndMap.h index 9da73a1d6..204678492 100644 --- a/vtkm/filter/internal/ResolveFieldTypeAndMap.h +++ b/vtkm/filter/internal/ResolveFieldTypeAndMap.h @@ -29,17 +29,22 @@ #include //forward declarations needed -namespace vtkm { -namespace filter { - class ResultDataSet; +namespace vtkm +{ +namespace filter +{ +class ResultDataSet; } } -namespace vtkm { -namespace filter { -namespace internal { +namespace vtkm +{ +namespace filter +{ +namespace internal +{ -template +template struct ResolveFieldTypeAndMap { typedef ResolveFieldTypeAndMap Self; @@ -51,71 +56,63 @@ struct ResolveFieldTypeAndMap vtkm::cont::RuntimeDeviceTracker Tracker; bool& RanProperly; - - ResolveFieldTypeAndMap(Derived* derivedClass, - vtkm::filter::ResultDataSet& inResult, + ResolveFieldTypeAndMap(Derived* derivedClass, vtkm::filter::ResultDataSet& inResult, const vtkm::filter::FieldMetadata& fieldMeta, const vtkm::filter::PolicyBase& policy, - const vtkm::cont::RuntimeDeviceTracker& tracker, - bool& ran): - DerivedClass(derivedClass), - InputResult(inResult), - Metadata(fieldMeta), - Policy(policy), - Tracker(tracker), - RanProperly(ran) + const vtkm::cont::RuntimeDeviceTracker& tracker, bool& ran) + : DerivedClass(derivedClass) + , InputResult(inResult) + , Metadata(fieldMeta) + , Policy(policy) + , Tracker(tracker) + , RanProperly(ran) { - } private: - - template + template struct ResolveFieldTypeAndMapForDevice { - typedef vtkm::cont::ArrayHandle FieldArrayHandle; - ResolveFieldTypeAndMapForDevice(const Self& instance, - const FieldArrayHandle& field) : - Instance(instance), Field(field), Valid(false) {} + typedef vtkm::cont::ArrayHandle FieldArrayHandle; + ResolveFieldTypeAndMapForDevice(const Self& instance, const FieldArrayHandle& field) + : Instance(instance) + , Field(field) + , Valid(false) + { + } const Self& Instance; - const vtkm::cont::ArrayHandle& Field; + const vtkm::cont::ArrayHandle& Field; mutable bool Valid; template bool operator()(DeviceAdapterTag tag) const { - this->Valid = - this->Instance.DerivedClass->DoMapField(this->Instance.InputResult, - this->Field, - this->Instance.Metadata, - this->Instance.Policy, - tag); + this->Valid = this->Instance.DerivedClass->DoMapField(this->Instance.InputResult, this->Field, + this->Instance.Metadata, + this->Instance.Policy, tag); return this->Valid; } private: - void operator=(const ResolveFieldTypeAndMapForDevice&) = delete; + void operator=(const ResolveFieldTypeAndMapForDevice&) = delete; }; public: - template - void operator()(const vtkm::cont::ArrayHandle& field) const + template + void operator()(const vtkm::cont::ArrayHandle& field) const { - ResolveFieldTypeAndMapForDevice doResolve(*this,field); - vtkm::cont::TryExecute(doResolve, - this->Tracker, - typename DerivedPolicy::DeviceAdapterList()); + ResolveFieldTypeAndMapForDevice doResolve(*this, field); + vtkm::cont::TryExecute(doResolve, this->Tracker, typename DerivedPolicy::DeviceAdapterList()); this->RanProperly = doResolve.Valid; } private: - void operator=(const ResolveFieldTypeAndMap &) = delete; + void operator=(const ResolveFieldTypeAndMap&) = delete; }; - } } -} // namespace vtkm::filter::internal +} // namespace vtkm::filter::internal #endif //vtk_m_filter_internal_ResolveFieldTypeAndMap_h diff --git a/vtkm/filter/testing/UnitTestCellAverageFilter.cxx b/vtkm/filter/testing/UnitTestCellAverageFilter.cxx index 38063bd62..4b4cc351d 100644 --- a/vtkm/filter/testing/UnitTestCellAverageFilter.cxx +++ b/vtkm/filter/testing/UnitTestCellAverageFilter.cxx @@ -22,7 +22,8 @@ #include #include -namespace { +namespace +{ void TestCellAverageRegular3D() { @@ -35,23 +36,21 @@ void TestCellAverageRegular3D() vtkm::filter::CellAverage cellAverage; cellAverage.SetOutputFieldName("avgvals"); - result = cellAverage.Execute( dataSet, dataSet.GetField("pointvar")); + result = cellAverage.Execute(dataSet, dataSet.GetField("pointvar")); - VTKM_TEST_ASSERT(result.GetField().GetName() == "avgvals", - "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_CELL_SET, + VTKM_TEST_ASSERT(result.GetField().GetName() == "avgvals", "Field was given the wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET, "Field was given the wrong association."); vtkm::cont::ArrayHandle resultArrayHandle; bool valid = result.FieldAs(resultArrayHandle); - if(valid) + if (valid) { vtkm::Float32 expected[4] = { 60.1875f, 70.2125f, 120.3375f, 130.3625f }; for (vtkm::Id i = 0; i < 4; ++i) { - VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), - expected[i]), "Wrong result for CellAverage worklet on 3D regular data"); + VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellAverage worklet on 3D regular data"); } } @@ -60,31 +59,23 @@ void TestCellAverageRegular3D() result = cellAverage.Execute(dataSet, dataSet.GetCoordinateSystem()); - VTKM_TEST_ASSERT(result.GetField().GetName() == "avgpos", - "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_CELL_SET, + VTKM_TEST_ASSERT(result.GetField().GetName() == "avgpos", "Field was given the wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET, "Field was given the wrong association."); - vtkm::cont::ArrayHandle > resultPointArray; + vtkm::cont::ArrayHandle> resultPointArray; valid = result.FieldAs(resultPointArray); - if(valid) + if (valid) { vtkm::FloatDefault expected[4][3] = { - { 0.5f, 0.5f, 0.5f }, - { 1.5f, 0.5f, 0.5f }, - { 0.5f, 0.5f, 1.5f }, - { 1.5f, 0.5f, 1.5f } + { 0.5f, 0.5f, 0.5f }, { 1.5f, 0.5f, 0.5f }, { 0.5f, 0.5f, 1.5f }, { 1.5f, 0.5f, 1.5f } }; for (vtkm::Id i = 0; i < 4; ++i) { - vtkm::Vec expectedVec( - expected[i][0], expected[i][1], expected[i][2]); - vtkm::Vec computedVec( - resultPointArray.GetPortalConstControl().Get(i)); - VTKM_TEST_ASSERT( - test_equal(computedVec, expectedVec), - "Wrong result for CellAverage worklet on 3D regular data"); + vtkm::Vec expectedVec(expected[i][0], expected[i][1], expected[i][2]); + vtkm::Vec computedVec(resultPointArray.GetPortalConstControl().Get(i)); + VTKM_TEST_ASSERT(test_equal(computedVec, expectedVec), + "Wrong result for CellAverage worklet on 3D regular data"); } } } @@ -99,25 +90,23 @@ void TestCellAverageRegular2D() vtkm::filter::ResultField result; vtkm::filter::CellAverage cellAverage; - result = cellAverage.Execute( dataSet, dataSet.GetField("pointvar")); + result = cellAverage.Execute(dataSet, dataSet.GetField("pointvar")); // If no name is given, should have the same name as the input. - VTKM_TEST_ASSERT(result.GetField().GetName() == "pointvar", - "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_CELL_SET, + VTKM_TEST_ASSERT(result.GetField().GetName() == "pointvar", "Field was given the wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET, "Field was given the wrong association."); vtkm::cont::Field resultField = result.GetField(); vtkm::cont::ArrayHandle resultArrayHandle; resultField.GetData().CopyTo(resultArrayHandle); - if(result.IsValid()) + if (result.IsValid()) { vtkm::Float32 expected[2] = { 30.1f, 40.1f }; for (int i = 0; i < 2; ++i) { - VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), - expected[i]), "Wrong result for CellAverage worklet on 2D regular data"); + VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellAverage worklet on 2D regular data"); } } } @@ -132,39 +121,35 @@ void TestCellAverageExplicit() vtkm::filter::ResultField result; vtkm::filter::CellAverage cellAverage; - result = cellAverage.Execute( dataSet, dataSet.GetField("pointvar")); + result = cellAverage.Execute(dataSet, dataSet.GetField("pointvar")); // If no name is given, should have the same name as the input. - VTKM_TEST_ASSERT(result.GetField().GetName() == "pointvar", - "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_CELL_SET, + VTKM_TEST_ASSERT(result.GetField().GetName() == "pointvar", "Field was given the wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET, "Field was given the wrong association."); vtkm::cont::ArrayHandle resultArrayHandle; const bool valid = result.FieldAs(resultArrayHandle); - if(valid) + if (valid) { vtkm::Float32 expected[2] = { 20.1333f, 35.2f }; for (int i = 0; i < 2; ++i) { - VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), - expected[i]), "Wrong result for CellAverage worklet on 3D regular data"); + VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellAverage worklet on 3D regular data"); } } } - void TestCellAverage() { TestCellAverageRegular2D(); TestCellAverageRegular3D(); TestCellAverageExplicit(); } - } -int UnitTestCellAverageFilter(int, char *[]) +int UnitTestCellAverageFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestCellAverage); } diff --git a/vtkm/filter/testing/UnitTestCleanGrid.cxx b/vtkm/filter/testing/UnitTestCleanGrid.cxx index 0e6047fcd..2a5ab34ff 100644 --- a/vtkm/filter/testing/UnitTestCleanGrid.cxx +++ b/vtkm/filter/testing/UnitTestCleanGrid.cxx @@ -23,7 +23,8 @@ #include #include -namespace { +namespace +{ void TestUniformGrid(vtkm::filter::CleanGrid clean) { @@ -48,35 +49,27 @@ void TestUniformGrid(vtkm::filter::CleanGrid clean) outData.GetCellSet().CopyTo(outCellSet); VTKM_TEST_ASSERT(outCellSet.GetNumberOfPoints() == 6, "Wrong number of points"); VTKM_TEST_ASSERT(outCellSet.GetNumberOfCells() == 2, "Wrong number of cells"); - vtkm::Vec cellIds; + vtkm::Vec cellIds; outCellSet.GetIndices(0, cellIds); - VTKM_TEST_ASSERT((cellIds == vtkm::Vec(0, 1, 4, 3)), - "Bad cell ids"); + VTKM_TEST_ASSERT((cellIds == vtkm::Vec(0, 1, 4, 3)), "Bad cell ids"); outCellSet.GetIndices(1, cellIds); - VTKM_TEST_ASSERT((cellIds == vtkm::Vec(1, 2, 5, 4)), - "Bad cell ids"); + VTKM_TEST_ASSERT((cellIds == vtkm::Vec(1, 2, 5, 4)), "Bad cell ids"); vtkm::cont::ArrayHandle outPointField; outData.GetField("pointvar").GetData().CopyTo(outPointField); - VTKM_TEST_ASSERT(outPointField.GetNumberOfValues() == 6, - "Wrong point field size."); - VTKM_TEST_ASSERT( - test_equal(outPointField.GetPortalConstControl().Get(1), 20.1), - "Bad point field value"); - VTKM_TEST_ASSERT( - test_equal(outPointField.GetPortalConstControl().Get(4), 50.1), - "Bad point field value"); + VTKM_TEST_ASSERT(outPointField.GetNumberOfValues() == 6, "Wrong point field size."); + VTKM_TEST_ASSERT(test_equal(outPointField.GetPortalConstControl().Get(1), 20.1), + "Bad point field value"); + VTKM_TEST_ASSERT(test_equal(outPointField.GetPortalConstControl().Get(4), 50.1), + "Bad point field value"); vtkm::cont::ArrayHandle outCellField; outData.GetField("cellvar").GetData().CopyTo(outCellField); - VTKM_TEST_ASSERT(outCellField.GetNumberOfValues() == 2, - "Wrong cell field size."); - VTKM_TEST_ASSERT( - test_equal(outCellField.GetPortalConstControl().Get(0), 100.1), - "Bad cell field value"); - VTKM_TEST_ASSERT( - test_equal(outCellField.GetPortalConstControl().Get(1), 200.1), - "Bad cell field value"); + VTKM_TEST_ASSERT(outCellField.GetNumberOfValues() == 2, "Wrong cell field size."); + VTKM_TEST_ASSERT(test_equal(outCellField.GetPortalConstControl().Get(0), 100.1), + "Bad cell field value"); + VTKM_TEST_ASSERT(test_equal(outCellField.GetPortalConstControl().Get(1), 200.1), + "Bad cell field value"); } void RunTest() @@ -94,7 +87,7 @@ void RunTest() } // anonymous namespace -int UnitTestCleanGrid(int, char *[]) +int UnitTestCleanGrid(int, char* []) { return vtkm::cont::testing::Testing::Run(RunTest); } diff --git a/vtkm/filter/testing/UnitTestClipWithFieldFilter.cxx b/vtkm/filter/testing/UnitTestClipWithFieldFilter.cxx index c4077aeee..3796e98d2 100644 --- a/vtkm/filter/testing/UnitTestClipWithFieldFilter.cxx +++ b/vtkm/filter/testing/UnitTestClipWithFieldFilter.cxx @@ -24,18 +24,18 @@ #include #include -namespace { +namespace +{ typedef vtkm::Vec Coord3D; - vtkm::cont::DataSet MakeTestDatasetExplicit() { std::vector coords; - coords.push_back( Coord3D(0.0f, 0.0f, 0.0f) ); - coords.push_back( Coord3D(1.0f, 0.0f, 0.0f) ); - coords.push_back( Coord3D(1.0f, 1.0f, 0.0f) ); - coords.push_back( Coord3D(0.0f, 1.0f, 0.0f) ); + coords.push_back(Coord3D(0.0f, 0.0f, 0.0f)); + coords.push_back(Coord3D(1.0f, 0.0f, 0.0f)); + coords.push_back(Coord3D(1.0f, 1.0f, 0.0f)); + coords.push_back(Coord3D(0.0f, 1.0f, 0.0f)); std::vector connectivity; connectivity.push_back(0); @@ -70,8 +70,7 @@ void TestClipExplicit() vtkm::filter::ClipWithField clip; clip.SetClipValue(0.5); - result = clip.Execute( ds, std::string("scalars")); - + result = clip.Execute(ds, std::string("scalars")); const vtkm::cont::DataSet& outputData = result.GetDataSet(); VTKM_TEST_ASSERT(outputData.GetNumberOfCellSets() == 1, @@ -95,22 +94,19 @@ void TestClipExplicit() vtkm::Float32 expected[7] = { 1, 2, 1, 0, 0.5, 0.5, 0.5 }; for (int i = 0; i < 7; ++i) { - VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), - expected[i]), "Wrong result for Clip fliter on triangle explicit data"); + VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for Clip fliter on triangle explicit data"); } - } - void TestClip() { //todo: add more clip tests TestClipExplicit(); } - } -int UnitTestClipWithFieldFilter(int, char *[]) +int UnitTestClipWithFieldFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestClip); } diff --git a/vtkm/filter/testing/UnitTestClipWithImplicitFunctionFilter.cxx b/vtkm/filter/testing/UnitTestClipWithImplicitFunctionFilter.cxx index c2acd0a04..b2e5d3c4f 100644 --- a/vtkm/filter/testing/UnitTestClipWithImplicitFunctionFilter.cxx +++ b/vtkm/filter/testing/UnitTestClipWithImplicitFunctionFilter.cxx @@ -24,11 +24,11 @@ #include #include -namespace { +namespace +{ typedef vtkm::Vec Coord3D; - vtkm::cont::DataSet MakeTestDatasetStructured() { static const vtkm::Id xdim = 3, ydim = 3; @@ -54,8 +54,7 @@ vtkm::cont::DataSet MakeTestDatasetStructured() void TestClipStructured() { - std::cout << "Testing ClipWithImplicitFunction Filter on Structured data" - << std::endl; + std::cout << "Testing ClipWithImplicitFunction Filter on Structured data" << std::endl; vtkm::cont::DataSet ds = MakeTestDatasetStructured(); @@ -70,7 +69,6 @@ void TestClipStructured() result = clip.Execute(ds); clip.MapFieldOntoOutput(result, ds.GetField("scalars")); - const vtkm::cont::DataSet& outputData = result.GetDataSet(); VTKM_TEST_ASSERT(outputData.GetNumberOfCellSets() == 1, "Wrong number of cellsets in the output dataset"); @@ -88,13 +86,11 @@ void TestClipStructured() VTKM_TEST_ASSERT(resultArrayHandle.GetNumberOfValues() == 13, "Wrong number of points in the output dataset"); - vtkm::Float32 expected[13] = { 1, 1, 1, 1, 0, 1, 1, 1, 1, 0.25, 0.25, 0.25, - 0.25 }; + vtkm::Float32 expected[13] = { 1, 1, 1, 1, 0, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.25 }; for (int i = 0; i < 13; ++i) { - VTKM_TEST_ASSERT( - test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for ClipWithImplicitFunction fliter on sturctured quads data"); + VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for ClipWithImplicitFunction fliter on sturctured quads data"); } } @@ -106,7 +102,7 @@ void TestClip() } // anonymous namespace -int UnitTestClipWithImplicitFunctionFilter(int, char *[]) +int UnitTestClipWithImplicitFunctionFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestClip); } diff --git a/vtkm/filter/testing/UnitTestContourTreeUniformFilter.cxx b/vtkm/filter/testing/UnitTestContourTreeUniformFilter.cxx index 3e6deff74..ac21e5024 100644 --- a/vtkm/filter/testing/UnitTestContourTreeUniformFilter.cxx +++ b/vtkm/filter/testing/UnitTestContourTreeUniformFilter.cxx @@ -20,48 +20,48 @@ // Copyright (c) 2016, Los Alamos National Security, LLC // All rights reserved. // -// Copyright 2016. Los Alamos National Security, LLC. -// This software was produced under U.S. Government contract DE-AC52-06NA25396 -// for Los Alamos National Laboratory (LANL), which is operated by -// Los Alamos National Security, LLC for the U.S. Department of Energy. -// The U.S. Government has rights to use, reproduce, and distribute this -// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC -// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE -// USE OF THIS SOFTWARE. If software is modified to produce derivative works, -// such modified software should be clearly marked, so as not to confuse it +// Copyright 2016. Los Alamos National Security, LLC. +// This software was produced under U.S. Government contract DE-AC52-06NA25396 +// for Los Alamos National Laboratory (LANL), which is operated by +// Los Alamos National Security, LLC for the U.S. Department of Energy. +// The U.S. Government has rights to use, reproduce, and distribute this +// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC +// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE +// USE OF THIS SOFTWARE. If software is modified to produce derivative works, +// such modified software should be clearly marked, so as not to confuse it // with the version available from LANL. // -// Additionally, redistribution and use in source and binary forms, with or -// without modification, are permitted provided that the following conditions +// Additionally, redistribution and use in source and binary forms, with or +// without modification, are permitted provided that the following conditions // are met: // -// 1. Redistributions of source code must retain the above copyright notice, +// 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. -// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos -// National Laboratory, LANL, the U.S. Government, nor the names of its -// contributors may be used to endorse or promote products derived from +// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos +// National Laboratory, LANL, the U.S. Government, nor the names of its +// contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND -// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS -// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS +// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //============================================================================ -// This code is based on the algorithm presented in the paper: -// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” -// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. -// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization +// This code is based on the algorithm presented in the paper: +// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” +// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. +// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization // (LDAV), October 2016, Baltimore, Maryland. #include @@ -69,7 +69,8 @@ #include #include -namespace { +namespace +{ using vtkm::cont::testing::MakeTestDataSet; @@ -82,37 +83,37 @@ public: void TestContourTree_Mesh2D_DEM_Triangulation() const { std::cout << "Testing ContourTree_Mesh2D Filter" << std::endl; - + // Create the input uniform cell set with values to contour vtkm::cont::DataSet inDataSet = MakeTestDataSet().Make2DUniformDataSet1(); - + // Output data set is pairs of saddle and peak vertex IDs vtkm::filter::ResultField result; - + // Convert 2D mesh of values into contour tree, pairs of vertex ids vtkm::filter::ContourTreeMesh2D contourTreeMesh2D; result = contourTreeMesh2D.Execute(inDataSet, std::string("pointvar")); - - vtkm::cont::Field resultField = result.GetField(); - vtkm::cont::ArrayHandle > saddlePeak; + + vtkm::cont::Field resultField = result.GetField(); + vtkm::cont::ArrayHandle> saddlePeak; resultField.GetData().CopyTo(saddlePeak); - - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetNumberOfValues(), 7), + + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetNumberOfValues(), 7), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(0), vtkm::make_Pair(0, 12)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(1), vtkm::make_Pair(4, 13)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(2), vtkm::make_Pair(12, 13)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(3), vtkm::make_Pair(12, 18)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(4), vtkm::make_Pair(12, 20)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(5), vtkm::make_Pair(13, 14)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(6), vtkm::make_Pair(13, 19)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(0), - vtkm::make_Pair( 0, 12)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(1), - vtkm::make_Pair( 4, 13)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(2), - vtkm::make_Pair(12, 13)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(3), - vtkm::make_Pair(12, 18)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(4), - vtkm::make_Pair(12, 20)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(5), - vtkm::make_Pair(13, 14)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(6), - vtkm::make_Pair(13, 19)), "Wrong result for ContourTree filter"); } // @@ -121,41 +122,41 @@ public: void TestContourTree_Mesh3D_DEM_Triangulation() const { std::cout << "Testing ContourTree_Mesh3D Filter" << std::endl; - + // Create the input uniform cell set with values to contour vtkm::cont::DataSet inDataSet = MakeTestDataSet().Make3DUniformDataSet1(); - + // Output data set is pairs of saddle and peak vertex IDs vtkm::filter::ResultField result; - + // Convert 2D mesh of values into contour tree, pairs of vertex ids vtkm::filter::ContourTreeMesh3D contourTreeMesh3D; result = contourTreeMesh3D.Execute(inDataSet, std::string("pointvar")); - - vtkm::cont::Field resultField = result.GetField(); - vtkm::cont::ArrayHandle > saddlePeak; + + vtkm::cont::Field resultField = result.GetField(); + vtkm::cont::ArrayHandle> saddlePeak; resultField.GetData().CopyTo(saddlePeak); - - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetNumberOfValues(), 9), + + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetNumberOfValues(), 9), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(0), vtkm::make_Pair(0, 67)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(1), vtkm::make_Pair(31, 42)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(2), vtkm::make_Pair(42, 43)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(3), vtkm::make_Pair(42, 56)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(4), vtkm::make_Pair(56, 67)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(5), vtkm::make_Pair(56, 92)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(6), vtkm::make_Pair(62, 67)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(7), vtkm::make_Pair(81, 92)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(8), vtkm::make_Pair(92, 93)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(0), - vtkm::make_Pair( 0, 67)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(1), - vtkm::make_Pair(31, 42)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(2), - vtkm::make_Pair(42, 43)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(3), - vtkm::make_Pair(42, 56)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(4), - vtkm::make_Pair(56, 67)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(5), - vtkm::make_Pair(56, 92)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(6), - vtkm::make_Pair(62, 67)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(7), - vtkm::make_Pair(81, 92)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(8), - vtkm::make_Pair(92, 93)), "Wrong result for ContourTree filter"); } void operator()() const @@ -164,10 +165,9 @@ public: this->TestContourTree_Mesh3D_DEM_Triangulation(); } }; - } -int UnitTestContourTreeUniformFilter(int, char *[]) +int UnitTestContourTreeUniformFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestContourTreeUniform()); } diff --git a/vtkm/filter/testing/UnitTestExternalFacesFilter.cxx b/vtkm/filter/testing/UnitTestExternalFacesFilter.cxx index 22607398c..d8842e2a8 100644 --- a/vtkm/filter/testing/UnitTestExternalFacesFilter.cxx +++ b/vtkm/filter/testing/UnitTestExternalFacesFilter.cxx @@ -26,7 +26,8 @@ using vtkm::cont::testing::MakeTestDataSet; -namespace { +namespace +{ // convert a 5x5x5 uniform grid to unstructured grid vtkm::cont::DataSet MakeDataTestSet1() @@ -48,10 +49,8 @@ vtkm::cont::DataSet MakeDataTestSet2() return MakeTestDataSet().Make3DExplicitDataSet5(); } -void TestExternalFacesExplicitGrid(const vtkm::cont::DataSet &ds, - bool compactPoints, - vtkm::Id numExpectedExtFaces, - vtkm::Id numExpectedPoints = 0) +void TestExternalFacesExplicitGrid(const vtkm::cont::DataSet& ds, bool compactPoints, + vtkm::Id numExpectedExtFaces, vtkm::Id numExpectedPoints = 0) { //Run the External Faces filter vtkm::filter::ExternalFaces externalFaces; @@ -69,21 +68,18 @@ void TestExternalFacesExplicitGrid(const vtkm::cont::DataSet &ds, vtkm::cont::DataSet resultds = result.GetDataSet(); // verify cellset - vtkm::cont::CellSetExplicit<> &new_cellSet = - resultds.GetCellSet(0).Cast >(); + vtkm::cont::CellSetExplicit<>& new_cellSet = + resultds.GetCellSet(0).Cast>(); const vtkm::Id numOutputExtFaces = new_cellSet.GetNumberOfCells(); - VTKM_TEST_ASSERT(numOutputExtFaces == numExpectedExtFaces, - "Number of External Faces mismatch"); + VTKM_TEST_ASSERT(numOutputExtFaces == numExpectedExtFaces, "Number of External Faces mismatch"); // verify fields - VTKM_TEST_ASSERT(resultds.HasField("pointvar"), - "Point field not mapped succesfully"); + VTKM_TEST_ASSERT(resultds.HasField("pointvar"), "Point field not mapped succesfully"); // verify CompactPoints if (compactPoints) { - vtkm::Id numOutputPoints = - resultds.GetCoordinateSystem(0).GetData().GetNumberOfValues(); + vtkm::Id numOutputPoints = resultds.GetCoordinateSystem(0).GetData().GetNumberOfValues(); VTKM_TEST_ASSERT(numOutputPoints == numExpectedPoints, "Incorrect number of points after compacting"); } @@ -117,8 +113,7 @@ void TestExternalFacesFilter() } // anonymous namespace - -int UnitTestExternalFacesFilter(int, char *[]) +int UnitTestExternalFacesFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestExternalFacesFilter); } diff --git a/vtkm/filter/testing/UnitTestExtractGeometryFilter.cxx b/vtkm/filter/testing/UnitTestExtractGeometryFilter.cxx index 7ba85de3d..ad583c09f 100644 --- a/vtkm/filter/testing/UnitTestExtractGeometryFilter.cxx +++ b/vtkm/filter/testing/UnitTestExtractGeometryFilter.cxx @@ -25,8 +25,8 @@ using vtkm::cont::testing::MakeTestDataSet; -namespace { - +namespace +{ class TestingExtractGeometry { @@ -57,20 +57,18 @@ public: } vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 8), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 8), "Wrong result for ExtractGeometry"); - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellArrayHandleType; OutCellArrayHandleType outCellData; output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 21.f, - "Wrong cell field data"); - VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(7) == 42.f, - "Wrong cell field data"); + VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 21.f, "Wrong cell field data"); + VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(7) == 42.f, "Wrong cell field data"); } void TestUniformByBox1() const @@ -99,20 +97,18 @@ public: } vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 56), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 56), "Wrong result for ExtractGeometry"); - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellArrayHandleType; OutCellArrayHandleType outCellData; output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 0.f, - "Wrong cell field data"); - VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(55) == 63.f, - "Wrong cell field data"); + VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 0.f, "Wrong cell field data"); + VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(55) == 63.f, "Wrong cell field data"); } void TestUniformByBox2() const @@ -141,20 +137,18 @@ public: } vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 64), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 64), "Wrong result for ExtractGeometry"); - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellArrayHandleType; OutCellArrayHandleType outCellData; output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 0.f, - "Wrong cell field data"); - VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(63) == 63.f, - "Wrong cell field data"); + VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 0.f, "Wrong cell field data"); + VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(63) == 63.f, "Wrong cell field data"); } void TestUniformByBox3() const { @@ -182,20 +176,18 @@ public: } vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 56), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 56), "Wrong result for ExtractGeometry"); - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellArrayHandleType; OutCellArrayHandleType outCellData; output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 0.f, - "Wrong cell field data"); - VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(55) == 63.f, - "Wrong cell field data"); + VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 0.f, "Wrong cell field data"); + VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(55) == 63.f, "Wrong cell field data"); } void operator()() const @@ -206,10 +198,9 @@ public: this->TestUniformByBox3(); } }; - } -int UnitTestExtractGeometryFilter(int, char *[]) +int UnitTestExtractGeometryFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestingExtractGeometry()); } diff --git a/vtkm/filter/testing/UnitTestExtractPointsFilter.cxx b/vtkm/filter/testing/UnitTestExtractPointsFilter.cxx index 898d0c121..f40a2c771 100644 --- a/vtkm/filter/testing/UnitTestExtractPointsFilter.cxx +++ b/vtkm/filter/testing/UnitTestExtractPointsFilter.cxx @@ -25,8 +25,8 @@ using vtkm::cont::testing::MakeTestDataSet; -namespace { - +namespace +{ class TestingExtractPoints { @@ -57,17 +57,20 @@ public: } vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 27), "Wrong result for ExtractPoints"); + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 27), + "Wrong result for ExtractPoints"); vtkm::cont::ArrayHandle outPointData; output.GetField("pointvar").GetData().CopyTo(outPointData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractPoints filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractPoints filter"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 99.0f, "Wrong point field data"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(26) == 97.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 99.0f, + "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(26) == 97.0f, + "Wrong point field data"); } void TestUniformByBox1() const @@ -96,18 +99,20 @@ public: } vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 98), "Wrong result for ExtractPoints"); + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 98), + "Wrong result for ExtractPoints"); vtkm::cont::ArrayHandle outPointData; output.GetField("pointvar").GetData().CopyTo(outPointData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractPoints filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractPoints filter"); for (vtkm::Id i = 0; i < output.GetCellSet(0).GetNumberOfPoints(); i++) { - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(i) == 0.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(i) == 0.0f, + "Wrong point field data"); } } @@ -136,7 +141,8 @@ public: } vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 27), "Wrong result for ExtractPoints"); + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 27), + "Wrong result for ExtractPoints"); } void TestExplicitByBox0() const @@ -164,7 +170,8 @@ public: } vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 8), "Wrong result for ExtractPoints"); + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 8), + "Wrong result for ExtractPoints"); } void TestExplicitByBox1() const @@ -192,7 +199,8 @@ public: } vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 3), "Wrong result for ExtractPoints"); + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 3), + "Wrong result for ExtractPoints"); } void operator()() const @@ -204,10 +212,9 @@ public: this->TestExplicitByBox1(); } }; - } -int UnitTestExtractPointsFilter(int, char *[]) +int UnitTestExtractPointsFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestingExtractPoints()); } diff --git a/vtkm/filter/testing/UnitTestExtractStructuredFilter.cxx b/vtkm/filter/testing/UnitTestExtractStructuredFilter.cxx index 23b135ec4..92734dbf9 100644 --- a/vtkm/filter/testing/UnitTestExtractStructuredFilter.cxx +++ b/vtkm/filter/testing/UnitTestExtractStructuredFilter.cxx @@ -25,7 +25,8 @@ using vtkm::cont::testing::MakeTestDataSet; -namespace { +namespace +{ class TestingExtractStructured { @@ -36,8 +37,8 @@ public: vtkm::cont::DataSet dataset = MakeTestDataSet().Make2DUniformDataSet1(); vtkm::filter::ResultDataSet result; - vtkm::Bounds bounds(1,3, 1,3, 0,0); - vtkm::Id3 sample(1,1,1); + vtkm::Bounds bounds(1, 3, 1, 3, 0, 0); + vtkm::Id3 sample(1, 1, 1); vtkm::filter::ExtractStructured extract; extract.SetVOI(bounds); @@ -45,8 +46,8 @@ public: result = extract.Execute(dataset); - extract.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - extract.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + extract.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + extract.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); @@ -60,15 +61,17 @@ public: vtkm::cont::ArrayHandle outCellData; output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), - outCellData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfCells(), outCellData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 71.0f, "Wrong point field data"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(8) == 91.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 71.0f, + "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(8) == 91.0f, + "Wrong point field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 5.0f, "Wrong cell field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(3) == 10.0f, "Wrong cell field data"); @@ -83,13 +86,13 @@ public: vtkm::filter::ExtractStructured extract; // VOI within dataset - extract.SetVOI(1,3, 1,3, 1,3); - extract.SetSampleRate(1,1,1); + extract.SetVOI(1, 3, 1, 3, 1, 3); + extract.SetSampleRate(1, 1, 1); result = extract.Execute(dataset); - extract.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - extract.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + extract.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + extract.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); @@ -103,15 +106,17 @@ public: output.GetField("pointvar").GetData().CopyTo(outPointData); output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), - outCellData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfCells(), outCellData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 99.0f, "Wrong point field data"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(26) == 97.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 99.0f, + "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(26) == 97.0f, + "Wrong point field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 21.0f, "Wrong cell field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(7) == 42.0f, "Wrong cell field data"); @@ -126,15 +131,15 @@ public: vtkm::filter::ExtractStructured extract; // VOI surrounds dataset - vtkm::Id3 minPoint(-1,-1,-1); - vtkm::Id3 maxPoint(7,7,7); + vtkm::Id3 minPoint(-1, -1, -1); + vtkm::Id3 maxPoint(7, 7, 7); extract.SetVOI(minPoint, maxPoint); - extract.SetSampleRate(1,1,1); + extract.SetSampleRate(1, 1, 1); result = extract.Execute(dataset); - extract.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - extract.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + extract.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + extract.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); @@ -148,15 +153,17 @@ public: output.GetField("pointvar").GetData().CopyTo(outPointData); output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), - outCellData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfCells(), outCellData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(31) == 99.0f, "Wrong point field data"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(93) == 97.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(31) == 99.0f, + "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(93) == 97.0f, + "Wrong point field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 0.0f, "Wrong cell field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(63) == 63.0f, "Wrong cell field data"); @@ -171,15 +178,15 @@ public: vtkm::filter::ExtractStructured extract; // VOI surrounds dataset - vtkm::Bounds bounds(-1,2, -1,2, -1,2); - vtkm::Id3 sample(1,1,1); + vtkm::Bounds bounds(-1, 2, -1, 2, -1, 2); + vtkm::Id3 sample(1, 1, 1); extract.SetVOI(bounds); extract.SetSampleRate(sample); result = extract.Execute(dataset); - extract.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - extract.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + extract.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + extract.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); @@ -193,15 +200,16 @@ public: output.GetField("pointvar").GetData().CopyTo(outPointData); output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), - outCellData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfCells(), outCellData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 0.0f, "Wrong point field data"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(26) == 15.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(26) == 15.0f, + "Wrong point field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 0.0f, "Wrong cell field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(7) == 21.0f, "Wrong cell field data"); @@ -216,15 +224,15 @@ public: vtkm::filter::ExtractStructured extract; // Bounding box intersects dataset on far boundary - vtkm::Bounds bounds(1,7, 1,7, 1,7); - vtkm::Id3 sample(1,1,1); + vtkm::Bounds bounds(1, 7, 1, 7, 1, 7); + vtkm::Id3 sample(1, 1, 1); extract.SetVOI(bounds); extract.SetSampleRate(sample); result = extract.Execute(dataset); - extract.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - extract.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + extract.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + extract.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); @@ -238,15 +246,17 @@ public: output.GetField("pointvar").GetData().CopyTo(outPointData); output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), - outCellData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfCells(), outCellData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 99.0f, "Wrong point field data"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(63) == 0.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 99.0f, + "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(63) == 0.0f, + "Wrong point field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 21.0f, "Wrong cell field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(26) == 63.0f, "Wrong cell field data"); @@ -261,15 +271,15 @@ public: vtkm::filter::ExtractStructured extract; // Bounding box intersects dataset without corner - vtkm::Bounds bounds(2,7, 1,3, 1,3); - vtkm::Id3 sample(1,1,1); + vtkm::Bounds bounds(2, 7, 1, 3, 1, 3); + vtkm::Id3 sample(1, 1, 1); extract.SetVOI(bounds); extract.SetSampleRate(sample); result = extract.Execute(dataset); - extract.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - extract.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + extract.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + extract.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); @@ -283,15 +293,17 @@ public: output.GetField("pointvar").GetData().CopyTo(outPointData); output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), - outCellData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfCells(), outCellData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 90.0f, "Wrong point field data"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(26) == 0.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 90.0f, + "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(26) == 0.0f, + "Wrong point field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 22.0f, "Wrong cell field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(7) == 43.0f, "Wrong cell field data"); @@ -306,15 +318,15 @@ public: vtkm::filter::ExtractStructured extract; // Bounding box intersects dataset with plane - vtkm::Bounds bounds(2,7, 1,1, 1,3); - vtkm::Id3 sample(1,1,1); + vtkm::Bounds bounds(2, 7, 1, 1, 1, 3); + vtkm::Id3 sample(1, 1, 1); extract.SetVOI(bounds); extract.SetSampleRate(sample); result = extract.Execute(dataset); - extract.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - extract.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + extract.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + extract.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); @@ -328,14 +340,15 @@ public: output.GetField("pointvar").GetData().CopyTo(outPointData); output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), - outCellData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfCells(), outCellData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 90.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 90.0f, + "Wrong point field data"); VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(8) == 0.0f, "Wrong point field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 22.0f, "Wrong cell field data"); @@ -351,15 +364,15 @@ public: vtkm::filter::ExtractStructured extract; // Bounding box within data set with sampling - vtkm::Bounds bounds(0,4, 0,4, 1,3); - vtkm::Id3 sample(2,2,1); + vtkm::Bounds bounds(0, 4, 0, 4, 1, 3); + vtkm::Id3 sample(2, 2, 1); extract.SetVOI(bounds); extract.SetSampleRate(sample); result = extract.Execute(dataset); - extract.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - extract.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + extract.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + extract.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); @@ -373,15 +386,16 @@ public: output.GetField("pointvar").GetData().CopyTo(outPointData); output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), - outCellData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfCells(), outCellData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 0.0f, "Wrong point field data"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(26) == 0.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(26) == 0.0f, + "Wrong point field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 16.0f, "Wrong cell field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(3) == 26.0f, "Wrong cell field data"); @@ -396,15 +410,15 @@ public: vtkm::filter::ExtractStructured extract; // Bounding box within data set with sampling - vtkm::Bounds bounds(0,4, 0,4, 1,3); - vtkm::Id3 sample(3,3,2); + vtkm::Bounds bounds(0, 4, 0, 4, 1, 3); + vtkm::Id3 sample(3, 3, 2); extract.SetVOI(bounds); extract.SetSampleRate(sample); result = extract.Execute(dataset); - extract.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - extract.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + extract.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + extract.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); @@ -418,15 +432,16 @@ public: output.GetField("pointvar").GetData().CopyTo(outPointData); output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), - outCellData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfCells(), outCellData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 0.0f, "Wrong point field data"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(7) == 97.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(7) == 97.0f, + "Wrong point field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 16.0f, "Wrong cell field data"); } @@ -440,16 +455,16 @@ public: vtkm::filter::ExtractStructured extract; // Bounding box within data set with sampling - vtkm::Bounds bounds(0,4, 0,4, 1,3); - vtkm::Id3 sample(3,3,2); + vtkm::Bounds bounds(0, 4, 0, 4, 1, 3); + vtkm::Id3 sample(3, 3, 2); extract.SetVOI(bounds); extract.SetSampleRate(sample); extract.SetIncludeBoundary(true); result = extract.Execute(dataset); - extract.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - extract.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + extract.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + extract.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); @@ -463,16 +478,18 @@ public: output.GetField("pointvar").GetData().CopyTo(outPointData); output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), - outCellData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfCells(), outCellData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 0.0f, "Wrong point field data"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(4) == 99.0f, "Wrong point field data"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(13) == 97.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(4) == 99.0f, + "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(13) == 97.0f, + "Wrong point field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 16.0f, "Wrong cell field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(3) == 31.0f, "Wrong cell field data"); @@ -487,15 +504,15 @@ public: vtkm::filter::ExtractStructured extract; // Bounds - vtkm::Bounds bounds(0,1, 0,1, 0,0); - vtkm::Id3 sample(1,1,1); + vtkm::Bounds bounds(0, 1, 0, 1, 0, 0); + vtkm::Id3 sample(1, 1, 1); extract.SetVOI(bounds); extract.SetSampleRate(sample); result = extract.Execute(dataset); - extract.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - extract.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + extract.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + extract.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); @@ -509,12 +526,12 @@ public: output.GetField("pointvar").GetData().CopyTo(outPointData); output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), - outCellData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfCells(), outCellData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 0.0f, "Wrong point field data"); VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(3) == 4.0f, "Wrong point field data"); @@ -531,17 +548,17 @@ public: vtkm::filter::ExtractStructured extract; // Bounds and subsample - vtkm::Bounds bounds(0,1, 0,1, 0,1); - vtkm::Id3 sample(1,1,1); - + vtkm::Bounds bounds(0, 1, 0, 1, 0, 1); + vtkm::Id3 sample(1, 1, 1); + extract.SetVOI(bounds); extract.SetSampleRate(sample); result = extract.Execute(dataset); - extract.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - extract.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); - + extract.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + extract.MapFieldOntoOutput(result, dataset.GetField("cellvar")); + vtkm::cont::DataSet output = result.GetDataSet(); VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), 8), @@ -554,15 +571,16 @@ public: output.GetField("pointvar").GetData().CopyTo(outPointData); output.GetField("cellvar").GetData().CopyTo(outCellData); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), - outPointData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), - outCellData.GetNumberOfValues()), - "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfPoints(), outPointData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); + VTKM_TEST_ASSERT( + test_equal(output.GetCellSet(0).GetNumberOfCells(), outCellData.GetNumberOfValues()), + "Data/Geometry mismatch for ExtractStructured filter"); VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(0) == 0.0f, "Wrong point field data"); - VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(7) == 10.0f, "Wrong point field data"); + VTKM_TEST_ASSERT(outPointData.GetPortalConstControl().Get(7) == 10.0f, + "Wrong point field data"); VTKM_TEST_ASSERT(outCellData.GetPortalConstControl().Get(0) == 0.0f, "Wrong cell field data"); } @@ -583,10 +601,9 @@ public: this->TestRectilinear3D(); } }; - } -int UnitTestExtractStructuredFilter(int, char *[]) +int UnitTestExtractStructuredFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestingExtractStructured()); } diff --git a/vtkm/filter/testing/UnitTestFieldMetadata.cxx b/vtkm/filter/testing/UnitTestFieldMetadata.cxx index 586fb9cbf..ecf71bbf5 100644 --- a/vtkm/filter/testing/UnitTestFieldMetadata.cxx +++ b/vtkm/filter/testing/UnitTestFieldMetadata.cxx @@ -22,17 +22,18 @@ #include #include -namespace { +namespace +{ vtkm::cont::Field makeCellField() { - return vtkm::cont::Field("foo", vtkm::cont::Field::ASSOC_CELL_SET, - std::string(), vtkm::cont::ArrayHandle() ); + return vtkm::cont::Field("foo", vtkm::cont::Field::ASSOC_CELL_SET, std::string(), + vtkm::cont::ArrayHandle()); } vtkm::cont::Field makePointField() { return vtkm::cont::Field("foo", vtkm::cont::Field::ASSOC_POINTS, - vtkm::cont::ArrayHandle() ); + vtkm::cont::ArrayHandle()); } void TestFieldTypesUnknown() @@ -55,7 +56,7 @@ void TestFieldTypesPoint() VTKM_TEST_ASSERT(helperMD.IsCellField() == false, "point can't be a cell field"); //verify the field helper works properly - vtkm::Float32 vars[6] = {10.1f, 20.1f, 30.1f, 40.1f, 50.1f, 60.1f}; + vtkm::Float32 vars[6] = { 10.1f, 20.1f, 30.1f, 40.1f, 50.1f, 60.1f }; vtkm::cont::Field field("pointvar", vtkm::cont::Field::ASSOC_POINTS, vars, 6); vtkm::filter::FieldMetadata makeMDFromField(field); VTKM_TEST_ASSERT(makeMDFromField.IsPointField() == true, "point should be a point field"); @@ -70,7 +71,7 @@ void TestFieldTypesCell() VTKM_TEST_ASSERT(helperMD.IsCellField() == true, "cell should be a cell field"); //verify the field helper works properly - vtkm::Float32 vars[6] = {10.1f, 20.1f, 30.1f, 40.1f, 50.1f, 60.1f}; + vtkm::Float32 vars[6] = { 10.1f, 20.1f, 30.1f, 40.1f, 50.1f, 60.1f }; vtkm::cont::Field field("pointvar", vtkm::cont::Field::ASSOC_CELL_SET, std::string(), vars, 6); vtkm::filter::FieldMetadata makeMDFromField(field); VTKM_TEST_ASSERT(makeMDFromField.IsPointField() == false, "cell can't be a point field"); @@ -83,10 +84,9 @@ void TestFieldMetadata() TestFieldTypesPoint(); TestFieldTypesCell(); } - } -int UnitTestFieldMetadata(int, char *[]) +int UnitTestFieldMetadata(int, char* []) { return vtkm::cont::testing::Testing::Run(TestFieldMetadata); } diff --git a/vtkm/filter/testing/UnitTestGradient.cxx b/vtkm/filter/testing/UnitTestGradient.cxx index 824a5e224..370bfc2ac 100644 --- a/vtkm/filter/testing/UnitTestGradient.cxx +++ b/vtkm/filter/testing/UnitTestGradient.cxx @@ -23,9 +23,8 @@ #include #include -namespace { - - +namespace +{ void TestCellGradientUniform3D() { @@ -38,15 +37,13 @@ void TestCellGradientUniform3D() vtkm::filter::Gradient gradient; gradient.SetOutputFieldName("Gradient"); - gradient.SetComputeVorticity(true); //this wont work as we have a scalar field + gradient.SetComputeVorticity(true); //this wont work as we have a scalar field gradient.SetComputeQCriterion(true); //this wont work as we have a scalar field - result = gradient.Execute( dataSet, dataSet.GetField("pointvar")); + result = gradient.Execute(dataSet, dataSet.GetField("pointvar")); - VTKM_TEST_ASSERT(result.GetField().GetName() == "Gradient", - "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_CELL_SET, + VTKM_TEST_ASSERT(result.GetField().GetName() == "Gradient", "Field was given the wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET, "Field was given the wrong association."); //verify that the vorticity and qcriterion fields don't exist @@ -56,22 +53,21 @@ void TestCellGradientUniform3D() VTKM_TEST_ASSERT(outputDS.HasField("QCriterion") == false, "scalar gradients can't generate qcriterion"); - vtkm::cont::ArrayHandle< vtkm::Vec > resultArrayHandle; + vtkm::cont::ArrayHandle> resultArrayHandle; const bool valid = result.FieldAs(resultArrayHandle); - VTKM_TEST_ASSERT( valid, "result of gradient is not expected type"); + VTKM_TEST_ASSERT(valid, "result of gradient is not expected type"); - vtkm::Vec expected[4] = { {10.025,30.075,60.125}, - {10.025,30.075,60.125}, - {10.025,30.075,60.175}, - {10.025,30.075,60.175}, - }; + vtkm::Vec expected[4] = { + { 10.025, 30.075, 60.125 }, + { 10.025, 30.075, 60.125 }, + { 10.025, 30.075, 60.175 }, + { 10.025, 30.075, 60.175 }, + }; for (int i = 0; i < 4; ++i) { - VTKM_TEST_ASSERT( - test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for CellGradient filter on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellGradient filter on 3D uniform data"); } - } void TestCellGradientUniform3DWithVectorField() @@ -82,17 +78,14 @@ void TestCellGradientUniform3DWithVectorField() //Verify that we can compute the gradient of a 3 component vector const int nVerts = 18; - vtkm::Float64 vars[nVerts] = {10.1, 20.1, 30.1, 40.1, 50.2, - 60.2, 70.2, 80.2, 90.3, 100.3, - 110.3, 120.3, 130.4, 140.4, - 150.4, 160.4, 170.5, 180.5}; - std::vector< vtkm::Vec > vec(nVerts); - for(std::size_t i=0; i < vec.size(); ++i) + vtkm::Float64 vars[nVerts] = { 10.1, 20.1, 30.1, 40.1, 50.2, 60.2, 70.2, 80.2, 90.3, + 100.3, 110.3, 120.3, 130.4, 140.4, 150.4, 160.4, 170.5, 180.5 }; + std::vector> vec(nVerts); + for (std::size_t i = 0; i < vec.size(); ++i) { - vec[i] = vtkm::make_Vec(vars[i],vars[i],vars[i]); + vec[i] = vtkm::make_Vec(vars[i], vars[i], vars[i]); } - vtkm::cont::ArrayHandle< vtkm::Vec > input = - vtkm::cont::make_ArrayHandle(vec); + vtkm::cont::ArrayHandle> input = vtkm::cont::make_ArrayHandle(vec); vtkm::cont::DataSetFieldAdd::AddPointField(dataSet, "vec_pointvar", input); //we need to add Vec3 array to the dataset @@ -102,13 +95,12 @@ void TestCellGradientUniform3DWithVectorField() gradient.SetComputeVorticity(true); gradient.SetComputeQCriterion(true); - result = gradient.Execute( dataSet, dataSet.GetField("vec_pointvar")); + result = gradient.Execute(dataSet, dataSet.GetField("vec_pointvar")); VTKM_TEST_ASSERT(result.GetField().GetName() == "vec_gradient", "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_CELL_SET, + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET, "Field was given the wrong association."); //verify that the vorticity and qcriterion fields DO exist @@ -118,33 +110,28 @@ void TestCellGradientUniform3DWithVectorField() VTKM_TEST_ASSERT(outputDS.HasField("QCriterion") == true, "vec gradients should generate qcriterion"); - - vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::Vec, 3> > resultArrayHandle; + vtkm::cont::ArrayHandle, 3>> resultArrayHandle; const bool valid = result.FieldAs(resultArrayHandle); - VTKM_TEST_ASSERT( valid, "result of gradient is not expected type"); + VTKM_TEST_ASSERT(valid, "result of gradient is not expected type"); - vtkm::Vec< vtkm::Vec, 3> expected[4] = { - { {10.025,10.025,10.025}, {30.075,30.075,30.075}, {60.125,60.125,60.125} }, - { {10.025,10.025,10.025}, {30.075,30.075,30.075}, {60.125,60.125,60.125} }, - { {10.025,10.025,10.025}, {30.075,30.075,30.075}, {60.175,60.175,60.175} }, - { {10.025,10.025,10.025}, {30.075,30.075,30.075}, {60.175,60.175,60.175} } - }; + vtkm::Vec, 3> expected[4] = { + { { 10.025, 10.025, 10.025 }, { 30.075, 30.075, 30.075 }, { 60.125, 60.125, 60.125 } }, + { { 10.025, 10.025, 10.025 }, { 30.075, 30.075, 30.075 }, { 60.125, 60.125, 60.125 } }, + { { 10.025, 10.025, 10.025 }, { 30.075, 30.075, 30.075 }, { 60.175, 60.175, 60.175 } }, + { { 10.025, 10.025, 10.025 }, { 30.075, 30.075, 30.075 }, { 60.175, 60.175, 60.175 } } + }; for (int i = 0; i < 4; ++i) { - vtkm::Vec< vtkm::Vec, 3> e = expected[i]; - vtkm::Vec< vtkm::Vec, 3> r = resultArrayHandle.GetPortalConstControl().Get(i); + vtkm::Vec, 3> e = expected[i]; + vtkm::Vec, 3> r = resultArrayHandle.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT( - test_equal(e[0],r[0]), - "Wrong result for vec field CellGradient filter on 3D uniform data"); - VTKM_TEST_ASSERT( - test_equal(e[1],r[1]), - "Wrong result for vec field CellGradient filter on 3D uniform data"); - VTKM_TEST_ASSERT( - test_equal(e[2],r[2]), - "Wrong result for vec field CellGradient filter on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(e[0], r[0]), + "Wrong result for vec field CellGradient filter on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(e[1], r[1]), + "Wrong result for vec field CellGradient filter on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(e[2], r[2]), + "Wrong result for vec field CellGradient filter on 3D uniform data"); } - } void TestCellGradientExplicit() @@ -158,46 +145,41 @@ void TestCellGradientExplicit() vtkm::filter::Gradient gradient; gradient.SetOutputFieldName("gradient"); - result = gradient.Execute( dataSet, dataSet.GetField("pointvar")); + result = gradient.Execute(dataSet, dataSet.GetField("pointvar")); - VTKM_TEST_ASSERT(result.GetField().GetName() == "gradient", - "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_CELL_SET, + VTKM_TEST_ASSERT(result.GetField().GetName() == "gradient", "Field was given the wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET, "Field was given the wrong association."); - vtkm::cont::ArrayHandle< vtkm::Vec > resultArrayHandle; + vtkm::cont::ArrayHandle> resultArrayHandle; const bool valid = result.FieldAs(resultArrayHandle); - VTKM_TEST_ASSERT( valid, "result of gradient is not expected type"); + VTKM_TEST_ASSERT(valid, "result of gradient is not expected type"); - vtkm::Vec expected[2] = { {10.f,10.1f,0.0f}, {10.f,10.1f,-0.0f} }; + vtkm::Vec expected[2] = { { 10.f, 10.1f, 0.0f }, { 10.f, 10.1f, -0.0f } }; for (int i = 0; i < 2; ++i) { - VTKM_TEST_ASSERT( - test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for CellGradient filter on 3D explicit data"); + VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellGradient filter on 3D explicit data"); } } void TestPointGradientUniform3DWithVectorField() { - std::cout << "Testing Gradient Filter with vector point output on 3D strucutred data" << std::endl; + std::cout << "Testing Gradient Filter with vector point output on 3D strucutred data" + << std::endl; vtkm::cont::testing::MakeTestDataSet testDataSet; vtkm::cont::DataSet dataSet = testDataSet.Make3DUniformDataSet0(); //Verify that we can compute the gradient of a 3 component vector const int nVerts = 18; - vtkm::Float64 vars[nVerts] = {10.1, 20.1, 30.1, 40.1, 50.2, - 60.2, 70.2, 80.2, 90.3, 100.3, - 110.3, 120.3, 130.4, 140.4, - 150.4, 160.4, 170.5, 180.5}; - std::vector< vtkm::Vec > vec(nVerts); - for(std::size_t i=0; i < vec.size(); ++i) + vtkm::Float64 vars[nVerts] = { 10.1, 20.1, 30.1, 40.1, 50.2, 60.2, 70.2, 80.2, 90.3, + 100.3, 110.3, 120.3, 130.4, 140.4, 150.4, 160.4, 170.5, 180.5 }; + std::vector> vec(nVerts); + for (std::size_t i = 0; i < vec.size(); ++i) { - vec[i] = vtkm::make_Vec(vars[i],vars[i],vars[i]); + vec[i] = vtkm::make_Vec(vars[i], vars[i], vars[i]); } - vtkm::cont::ArrayHandle< vtkm::Vec > input = - vtkm::cont::make_ArrayHandle(vec); + vtkm::cont::ArrayHandle> input = vtkm::cont::make_ArrayHandle(vec); vtkm::cont::DataSetFieldAdd::AddPointField(dataSet, "vec_pointvar", input); //we need to add Vec3 array to the dataset @@ -206,41 +188,36 @@ void TestPointGradientUniform3DWithVectorField() gradient.SetComputePointGradient(true); gradient.SetOutputFieldName("vec_gradient"); - result = gradient.Execute( dataSet, dataSet.GetField("vec_pointvar")); + result = gradient.Execute(dataSet, dataSet.GetField("vec_pointvar")); VTKM_TEST_ASSERT(result.GetField().GetName() == "vec_gradient", "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_POINTS, + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_POINTS, "Field was given the wrong association."); - vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::Vec, 3> > resultArrayHandle; + vtkm::cont::ArrayHandle, 3>> resultArrayHandle; const bool valid = result.FieldAs(resultArrayHandle); - VTKM_TEST_ASSERT( valid, "result of gradient is not expected type"); + VTKM_TEST_ASSERT(valid, "result of gradient is not expected type"); - vtkm::Vec< vtkm::Vec, 3> expected[4] = { - { {10.0,10.0,10.0}, {30.0,30.0,30.0}, {60.1,60.1,60.1} }, - { {10.0,10.0,10.0}, {30.1,30.1,30.1}, {60.1,60.1,60.1} }, - { {10.0,10.0,10.0}, {30.1,30.1,30.1}, {60.2,60.2,60.2} }, - { {10.1,10.1,10.1}, {30.0,30.0,30.0}, {60.2,60.2,60.2} } - }; + vtkm::Vec, 3> expected[4] = { + { { 10.0, 10.0, 10.0 }, { 30.0, 30.0, 30.0 }, { 60.1, 60.1, 60.1 } }, + { { 10.0, 10.0, 10.0 }, { 30.1, 30.1, 30.1 }, { 60.1, 60.1, 60.1 } }, + { { 10.0, 10.0, 10.0 }, { 30.1, 30.1, 30.1 }, { 60.2, 60.2, 60.2 } }, + { { 10.1, 10.1, 10.1 }, { 30.0, 30.0, 30.0 }, { 60.2, 60.2, 60.2 } } + }; for (int i = 0; i < 4; ++i) { - vtkm::Vec< vtkm::Vec, 3> e = expected[i]; - vtkm::Vec< vtkm::Vec, 3> r = resultArrayHandle.GetPortalConstControl().Get(i); + vtkm::Vec, 3> e = expected[i]; + vtkm::Vec, 3> r = resultArrayHandle.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT( - test_equal(e[0],r[0]), - "Wrong result for vec field CellGradient filter on 3D uniform data"); - VTKM_TEST_ASSERT( - test_equal(e[1],r[1]), - "Wrong result for vec field CellGradient filter on 3D uniform data"); - VTKM_TEST_ASSERT( - test_equal(e[2],r[2]), - "Wrong result for vec field CellGradient filter on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(e[0], r[0]), + "Wrong result for vec field CellGradient filter on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(e[1], r[1]), + "Wrong result for vec field CellGradient filter on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(e[2], r[2]), + "Wrong result for vec field CellGradient filter on 3D uniform data"); } - } void TestPointGradientExplicit() @@ -255,24 +232,21 @@ void TestPointGradientExplicit() gradient.SetComputePointGradient(true); gradient.SetOutputFieldName("gradient"); - result = gradient.Execute( dataSet, dataSet.GetField("pointvar")); + result = gradient.Execute(dataSet, dataSet.GetField("pointvar")); - VTKM_TEST_ASSERT(result.GetField().GetName() == "gradient", - "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_POINTS, + VTKM_TEST_ASSERT(result.GetField().GetName() == "gradient", "Field was given the wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_POINTS, "Field was given the wrong association."); - vtkm::cont::ArrayHandle< vtkm::Vec > resultArrayHandle; + vtkm::cont::ArrayHandle> resultArrayHandle; const bool valid = result.FieldAs(resultArrayHandle); - VTKM_TEST_ASSERT( valid, "result of gradient is not expected type"); + VTKM_TEST_ASSERT(valid, "result of gradient is not expected type"); - vtkm::Vec expected[2] = { {10.f,10.1f,0.0f}, {10.f,10.1f,0.0f} }; + vtkm::Vec expected[2] = { { 10.f, 10.1f, 0.0f }, { 10.f, 10.1f, 0.0f } }; for (int i = 0; i < 2; ++i) { - VTKM_TEST_ASSERT( - test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for CellGradient filter on 3D explicit data"); + VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellGradient filter on 3D explicit data"); } } @@ -285,10 +259,9 @@ void TestGradient() TestPointGradientUniform3DWithVectorField(); TestPointGradientExplicit(); } - } -int UnitTestGradient(int, char *[]) +int UnitTestGradient(int, char* []) { return vtkm::cont::testing::Testing::Run(TestGradient); -} \ No newline at end of file +} diff --git a/vtkm/filter/testing/UnitTestHistogramFilter.cxx b/vtkm/filter/testing/UnitTestHistogramFilter.cxx index 68ccaec3e..297a90b56 100644 --- a/vtkm/filter/testing/UnitTestHistogramFilter.cxx +++ b/vtkm/filter/testing/UnitTestHistogramFilter.cxx @@ -28,285 +28,255 @@ // vtkm::cont::DataSet MakeTestDataSet() { - vtkm::cont::DataSet dataSet; + vtkm::cont::DataSet dataSet; - const int dimension = 2; - const int xVerts = 20; - const int yVerts = 50; - const int nVerts = xVerts * yVerts; + const int dimension = 2; + const int xVerts = 20; + const int yVerts = 50; + const int nVerts = xVerts * yVerts; - const int xCells = xVerts - 1; - const int yCells = yVerts - 1; - const int nCells = xCells * yCells; + const int xCells = xVerts - 1; + const int yCells = yVerts - 1; + const int nCells = xCells * yCells; - // Poisson distribution [0:49] mean = 10 - vtkm::Float32 poisson[nVerts] = { - 8,10,9,8,14,11,12,9,19,7,8,11,7,10,11,11,11,6,8,8, - 7,15,9,7,8,10,9,10,10,12,7,6,14,10,14,10,7,11,13,9, - 13,11,10,10,12,12,7,12,10,11,12,8,13,9,5,12,11,9,5,9, - 12,9,6,10,11,9,9,11,9,7,7,18,16,13,12,8,10,11,9,8, - 17,3,15,15,9,10,10,8,10,9,7,9,8,10,13,9,7,11,7,10, - 13,10,11,9,10,7,10,6,12,6,9,7,6,12,12,9,12,12,11,6, - 1,12,8,13,14,8,8,10,7,7,6,7,5,11,6,11,13,8,13,5, - 9,12,7,11,10,15,11,9,7,12,15,7,8,7,12,8,21,16,13,11, - 10,14,12,11,12,14,7,11,7,12,16,8,10,8,9,7,8,7,13,13, - 11,15,7,7,6,11,7,12,12,13,14,11,13,11,11,9,15,8,6,11, - 12,10,11,7,6,14,11,10,12,5,8,9,11,15,11,10,17,14,9,10, - 10,12,11,13,13,12,11,7,8,10,7,11,10,5,8,10,13,13,12,6, - 10,7,13,8,11,7,10,7,8,7,14,16,9,11,8,11,9,15,11,10, - 10,12,7,7,11,7,5,17,9,11,11,11,10,17,10,15,7,11,12,16, - 9,8,11,14,9,22,8,8,8,13,12,12,1,14,15,6,15,8,11,16, - 14,8,6,9,8,9,9,10,8,6,13,8,6,12,11,12,13,8,6,6, - 5,6,10,9,11,12,14,12,10,11,10,10,8,13,8,11,7,13,13,12, - 12,13,15,4,9,16,7,9,8,10,6,9,11,12,6,7,14,6,4,15, - 5,18,9,9,11,12,9,5,6,7,15,6,11,14,8,12,6,9,5,9, - 14,9,12,6,9,14,11,12,12,13,15,9,8,7,13,12,7,13,6,9, - 10,10,10,9,11,5,9,13,16,9,10,8,9,6,13,12,8,12,9,12, - 17,8,11,10,8,7,11,7,13,13,10,14,11,9,6,6,14,16,5,9, - 13,11,12,7,4,6,9,11,11,10,12,9,7,13,8,8,12,5,10,7, - 11,11,10,10,14,6,8,8,3,12,16,11,11,7,6,12,11,5,9,12, - 9,13,7,8,9,9,12,7,9,8,12,11,6,10,6,7,6,11,10,8, - 9,8,4,19,12,6,10,9,6,12,9,14,7,8,11,7,7,12,13,9, - 13,12,8,6,10,17,19,10,10,13,5,11,8,10,8,16,12,6,6,7, - 10,9,12,8,5,10,7,18,9,12,10,4,9,9,15,15,6,7,7,11, - 12,4,8,18,5,12,12,11,10,14,9,9,10,8,10,8,10,9,9,4, - 10,12,5,13,6,9,7,5,12,8,11,10,9,17,9,9,8,11,18,11, - 10,9,4,13,10,15,5,10,9,7,7,8,10,6,6,19,10,16,7,7, - 9,10,10,13,10,10,14,13,12,8,7,13,12,11,13,12,9,8,6,8, - 10,3,8,8,12,12,13,13,10,5,10,7,13,7,9,5,13,7,10,8, - 13,11,17,9,6,14,10,10,13,9,15,8,15,9,12,11,12,8,3,9, - 8,10,12,8,14,13,12,11,12,9,18,10,13,7,4,4,11,8,3,7, - 9,10,12,7,11,21,9,7,8,9,10,10,11,9,15,13,21,12,8,11, - 9,10,11,9,17,8,9,8,14,6,13,9,8,11,12,12,12,11,6,13, - 7,9,11,15,17,17,11,10,7,8,11,8,6,9,13,7,9,6,5,10, - 7,16,16,9,7,6,14,8,13,16,7,7,10,11,6,10,9,9,8,14, - 11,9,11,9,10,11,9,8,14,11,7,12,11,8,9,9,10,11,11,10, - 9,6,6,11,16,10,7,6,6,13,18,8,12,11,14,13,8,8,10,17, - 17,6,6,10,18,5,8,11,6,6,14,10,9,6,11,6,13,12,10,6, - 9,9,9,13,7,17,10,14,10,9,10,10,11,10,11,15,13,6,12,19, - 10,12,12,15,13,10,10,13,11,13,13,17,6,5,6,7,6,9,13,11, - 8,12,9,6,10,16,11,12,5,12,14,13,13,16,11,6,12,12,15,8, - 7,11,8,5,10,8,9,11,9,12,10,5,12,11,9,6,14,12,10,11, - 9,6,7,12,8,12,8,15,9,8,7,9,3,6,14,7,8,11,9,10, - 12,9,10,9,8,6,12,11,6,8,9,8,15,11,7,18,12,11,10,13, - 11,11,10,7,9,8,8,11,11,13,6,12,13,16,11,11,5,12,14,15, - 9,14,15,6,8,7,6,8,9,19,7,12,11,8,14,12,10,9,3,7 - }; + // Poisson distribution [0:49] mean = 10 + vtkm::Float32 poisson[nVerts] = { + 8, 10, 9, 8, 14, 11, 12, 9, 19, 7, 8, 11, 7, 10, 11, 11, 11, 6, 8, 8, 7, 15, 9, 7, + 8, 10, 9, 10, 10, 12, 7, 6, 14, 10, 14, 10, 7, 11, 13, 9, 13, 11, 10, 10, 12, 12, 7, 12, + 10, 11, 12, 8, 13, 9, 5, 12, 11, 9, 5, 9, 12, 9, 6, 10, 11, 9, 9, 11, 9, 7, 7, 18, + 16, 13, 12, 8, 10, 11, 9, 8, 17, 3, 15, 15, 9, 10, 10, 8, 10, 9, 7, 9, 8, 10, 13, 9, + 7, 11, 7, 10, 13, 10, 11, 9, 10, 7, 10, 6, 12, 6, 9, 7, 6, 12, 12, 9, 12, 12, 11, 6, + 1, 12, 8, 13, 14, 8, 8, 10, 7, 7, 6, 7, 5, 11, 6, 11, 13, 8, 13, 5, 9, 12, 7, 11, + 10, 15, 11, 9, 7, 12, 15, 7, 8, 7, 12, 8, 21, 16, 13, 11, 10, 14, 12, 11, 12, 14, 7, 11, + 7, 12, 16, 8, 10, 8, 9, 7, 8, 7, 13, 13, 11, 15, 7, 7, 6, 11, 7, 12, 12, 13, 14, 11, + 13, 11, 11, 9, 15, 8, 6, 11, 12, 10, 11, 7, 6, 14, 11, 10, 12, 5, 8, 9, 11, 15, 11, 10, + 17, 14, 9, 10, 10, 12, 11, 13, 13, 12, 11, 7, 8, 10, 7, 11, 10, 5, 8, 10, 13, 13, 12, 6, + 10, 7, 13, 8, 11, 7, 10, 7, 8, 7, 14, 16, 9, 11, 8, 11, 9, 15, 11, 10, 10, 12, 7, 7, + 11, 7, 5, 17, 9, 11, 11, 11, 10, 17, 10, 15, 7, 11, 12, 16, 9, 8, 11, 14, 9, 22, 8, 8, + 8, 13, 12, 12, 1, 14, 15, 6, 15, 8, 11, 16, 14, 8, 6, 9, 8, 9, 9, 10, 8, 6, 13, 8, + 6, 12, 11, 12, 13, 8, 6, 6, 5, 6, 10, 9, 11, 12, 14, 12, 10, 11, 10, 10, 8, 13, 8, 11, + 7, 13, 13, 12, 12, 13, 15, 4, 9, 16, 7, 9, 8, 10, 6, 9, 11, 12, 6, 7, 14, 6, 4, 15, + 5, 18, 9, 9, 11, 12, 9, 5, 6, 7, 15, 6, 11, 14, 8, 12, 6, 9, 5, 9, 14, 9, 12, 6, + 9, 14, 11, 12, 12, 13, 15, 9, 8, 7, 13, 12, 7, 13, 6, 9, 10, 10, 10, 9, 11, 5, 9, 13, + 16, 9, 10, 8, 9, 6, 13, 12, 8, 12, 9, 12, 17, 8, 11, 10, 8, 7, 11, 7, 13, 13, 10, 14, + 11, 9, 6, 6, 14, 16, 5, 9, 13, 11, 12, 7, 4, 6, 9, 11, 11, 10, 12, 9, 7, 13, 8, 8, + 12, 5, 10, 7, 11, 11, 10, 10, 14, 6, 8, 8, 3, 12, 16, 11, 11, 7, 6, 12, 11, 5, 9, 12, + 9, 13, 7, 8, 9, 9, 12, 7, 9, 8, 12, 11, 6, 10, 6, 7, 6, 11, 10, 8, 9, 8, 4, 19, + 12, 6, 10, 9, 6, 12, 9, 14, 7, 8, 11, 7, 7, 12, 13, 9, 13, 12, 8, 6, 10, 17, 19, 10, + 10, 13, 5, 11, 8, 10, 8, 16, 12, 6, 6, 7, 10, 9, 12, 8, 5, 10, 7, 18, 9, 12, 10, 4, + 9, 9, 15, 15, 6, 7, 7, 11, 12, 4, 8, 18, 5, 12, 12, 11, 10, 14, 9, 9, 10, 8, 10, 8, + 10, 9, 9, 4, 10, 12, 5, 13, 6, 9, 7, 5, 12, 8, 11, 10, 9, 17, 9, 9, 8, 11, 18, 11, + 10, 9, 4, 13, 10, 15, 5, 10, 9, 7, 7, 8, 10, 6, 6, 19, 10, 16, 7, 7, 9, 10, 10, 13, + 10, 10, 14, 13, 12, 8, 7, 13, 12, 11, 13, 12, 9, 8, 6, 8, 10, 3, 8, 8, 12, 12, 13, 13, + 10, 5, 10, 7, 13, 7, 9, 5, 13, 7, 10, 8, 13, 11, 17, 9, 6, 14, 10, 10, 13, 9, 15, 8, + 15, 9, 12, 11, 12, 8, 3, 9, 8, 10, 12, 8, 14, 13, 12, 11, 12, 9, 18, 10, 13, 7, 4, 4, + 11, 8, 3, 7, 9, 10, 12, 7, 11, 21, 9, 7, 8, 9, 10, 10, 11, 9, 15, 13, 21, 12, 8, 11, + 9, 10, 11, 9, 17, 8, 9, 8, 14, 6, 13, 9, 8, 11, 12, 12, 12, 11, 6, 13, 7, 9, 11, 15, + 17, 17, 11, 10, 7, 8, 11, 8, 6, 9, 13, 7, 9, 6, 5, 10, 7, 16, 16, 9, 7, 6, 14, 8, + 13, 16, 7, 7, 10, 11, 6, 10, 9, 9, 8, 14, 11, 9, 11, 9, 10, 11, 9, 8, 14, 11, 7, 12, + 11, 8, 9, 9, 10, 11, 11, 10, 9, 6, 6, 11, 16, 10, 7, 6, 6, 13, 18, 8, 12, 11, 14, 13, + 8, 8, 10, 17, 17, 6, 6, 10, 18, 5, 8, 11, 6, 6, 14, 10, 9, 6, 11, 6, 13, 12, 10, 6, + 9, 9, 9, 13, 7, 17, 10, 14, 10, 9, 10, 10, 11, 10, 11, 15, 13, 6, 12, 19, 10, 12, 12, 15, + 13, 10, 10, 13, 11, 13, 13, 17, 6, 5, 6, 7, 6, 9, 13, 11, 8, 12, 9, 6, 10, 16, 11, 12, + 5, 12, 14, 13, 13, 16, 11, 6, 12, 12, 15, 8, 7, 11, 8, 5, 10, 8, 9, 11, 9, 12, 10, 5, + 12, 11, 9, 6, 14, 12, 10, 11, 9, 6, 7, 12, 8, 12, 8, 15, 9, 8, 7, 9, 3, 6, 14, 7, + 8, 11, 9, 10, 12, 9, 10, 9, 8, 6, 12, 11, 6, 8, 9, 8, 15, 11, 7, 18, 12, 11, 10, 13, + 11, 11, 10, 7, 9, 8, 8, 11, 11, 13, 6, 12, 13, 16, 11, 11, 5, 12, 14, 15, 9, 14, 15, 6, + 8, 7, 6, 8, 9, 19, 7, 12, 11, 8, 14, 12, 10, 9, 3, 7 + }; - // Normal distribution [0:49] mean = 25 standard deviation = 5.0 - vtkm::Float32 normal[nVerts] = { - 24,19,28,19,25,28,25,22,27,26,35,26,30,28,24,23,21,31,20,11, - 21,22,14,25,20,24,24,21,24,29,26,21,32,29,23,28,31,25,23,30, - 18,24,22,25,33,24,22,23,21,17,20,28,30,18,20,32,25,24,32,15, - 27,24,27,19,30,27,17,24,29,23,22,19,24,19,28,24,25,24,25,30, - 24,31,30,27,25,25,25,15,29,23,29,29,21,25,35,24,28,10,31,23, - 22,22,22,33,29,27,18,27,27,24,20,20,21,29,23,31,23,23,22,23, - 30,27,28,31,16,29,25,19,33,28,25,24,15,27,37,29,15,19,14,19, - 24,23,30,29,35,22,19,26,26,14,24,30,32,23,30,29,26,27,25,23, - 17,26,32,29,20,17,21,23,22,20,36,12,26,23,15,29,24,22,26,33, - 24,23,20,26,22,17,26,26,34,22,26,17,23,18,29,27,21,29,28,29, - 24,25,28,19,18,21,23,23,27,25,24,25,24,25,21,25,21,27,23,20, - 29,15,28,30,24,27,17,23,16,21,25,17,27,28,21,13,19,27,16,30, - 31,25,30,17,17,25,26,22,21,17,24,17,25,22,27,14,27,24,27,25, - 26,31,21,23,30,30,22,19,23,22,23,25,24,25,24,28,26,30,18,25, - 30,37,27,34,28,34,25,10,25,22,35,30,24,32,24,34,19,29,26,16, - 27,17,26,23,27,25,26,21,31,21,28,15,32,24,23,23,18,15,22,25, - 16,25,31,26,25,28,24,26,23,25,33,20,27,28,24,29,32,20,24,20, - 19,32,24,6,24,21,26,18,15,30,19,26,22,30,35,23,22,30,20,22, - 18,30,28,25,16,25,27,30,18,24,30,28,20,19,20,28,21,24,15,33, - 20,18,20,36,30,26,25,18,28,27,31,31,15,26,16,22,27,14,17,27, - 27,22,32,30,22,34,22,25,20,22,26,29,28,33,18,23,20,20,27,24, - 28,21,25,27,25,19,19,25,19,32,29,27,23,21,28,33,23,23,28,26, - 31,19,21,29,21,27,23,32,24,26,21,28,28,24,17,31,27,21,19,32, - 28,23,30,23,29,15,26,26,15,20,25,26,27,31,21,23,23,33,28,19, - 23,22,22,25,27,17,23,17,25,28,26,30,32,31,19,25,25,19,23,29, - 27,23,34,22,13,21,32,10,20,33,21,17,29,31,14,24,23,19,19,22, - 17,26,37,26,22,26,38,29,29,27,30,20,31,14,32,32,24,23,23,18, - 21,31,24,20,28,15,21,25,25,20,30,25,22,21,21,25,24,25,18,23, - 28,30,20,27,27,19,10,32,24,20,29,26,25,20,25,29,28,24,32,26, - 22,19,23,27,27,29,20,25,21,30,28,31,24,19,23,19,19,18,30,18, - 16,24,20,20,30,25,29,25,31,21,28,31,24,26,27,21,24,23,26,18, - 32,26,28,26,24,26,29,30,22,20,24,28,25,29,20,21,22,15,30,27, - 33,26,22,32,30,31,20,19,24,26,27,31,17,17,33,27,16,27,27,22, - 27,19,24,21,17,24,28,23,26,24,19,26,20,24,22,19,22,21,21,28, - 29,39,19,16,25,29,31,22,22,29,26,22,22,22,26,23,23,23,30,25, - 25,25,27,29,18,33,21,12,22,29,12,20,35,22,34,28,18,29,21,20, - 24,33,24,26,23,34,31,25,31,22,35,21,20,29,27,22,30,22,27,23, - 22,32,16,19,27,22,24,27,21,33,25,25,19,28,20,27,21,25,28,20, - 27,22,21,20,26,30,33,23,20,24,17,23,28,35,14,23,22,28,28,26, - 25,18,20,28,28,22,13,24,22,20,30,26,26,18,22,20,23,24,20,27, - 34,28,18,24,34,33,25,33,37,21,20,31,19,23,29,22,21,24,19,27, - 19,32,25,23,33,26,33,27,29,30,19,22,30,19,18,24,25,17,31,19, - 31,26,22,23,28,28,25,24,19,19,27,28,23,21,29,26,31,22,22,25, - 16,29,21,22,23,25,22,21,22,19,27,26,28,30,22,21,24,22,23,26, - 28,22,18,25,23,27,31,19,15,29,20,19,27,25,21,29,22,24,25,17, - 36,29,22,22,24,28,27,22,26,31,29,31,18,25,23,16,37,27,21,31, - 25,24,20,23,28,33,24,21,26,20,18,31,20,24,23,19,27,17,23,23, - 20,26,28,23,26,31,25,31,19,32,26,18,19,29,20,21,15,25,27,29, - 22,22,22,26,23,22,23,29,28,20,21,22,20,22,27,25,23,32,23,20, - 31,20,27,26,34,20,22,36,21,29,25,20,21,22,29,29,25,22,24,22 - }; + // Normal distribution [0:49] mean = 25 standard deviation = 5.0 + vtkm::Float32 normal[nVerts] = { + 24, 19, 28, 19, 25, 28, 25, 22, 27, 26, 35, 26, 30, 28, 24, 23, 21, 31, 20, 11, 21, 22, 14, 25, + 20, 24, 24, 21, 24, 29, 26, 21, 32, 29, 23, 28, 31, 25, 23, 30, 18, 24, 22, 25, 33, 24, 22, 23, + 21, 17, 20, 28, 30, 18, 20, 32, 25, 24, 32, 15, 27, 24, 27, 19, 30, 27, 17, 24, 29, 23, 22, 19, + 24, 19, 28, 24, 25, 24, 25, 30, 24, 31, 30, 27, 25, 25, 25, 15, 29, 23, 29, 29, 21, 25, 35, 24, + 28, 10, 31, 23, 22, 22, 22, 33, 29, 27, 18, 27, 27, 24, 20, 20, 21, 29, 23, 31, 23, 23, 22, 23, + 30, 27, 28, 31, 16, 29, 25, 19, 33, 28, 25, 24, 15, 27, 37, 29, 15, 19, 14, 19, 24, 23, 30, 29, + 35, 22, 19, 26, 26, 14, 24, 30, 32, 23, 30, 29, 26, 27, 25, 23, 17, 26, 32, 29, 20, 17, 21, 23, + 22, 20, 36, 12, 26, 23, 15, 29, 24, 22, 26, 33, 24, 23, 20, 26, 22, 17, 26, 26, 34, 22, 26, 17, + 23, 18, 29, 27, 21, 29, 28, 29, 24, 25, 28, 19, 18, 21, 23, 23, 27, 25, 24, 25, 24, 25, 21, 25, + 21, 27, 23, 20, 29, 15, 28, 30, 24, 27, 17, 23, 16, 21, 25, 17, 27, 28, 21, 13, 19, 27, 16, 30, + 31, 25, 30, 17, 17, 25, 26, 22, 21, 17, 24, 17, 25, 22, 27, 14, 27, 24, 27, 25, 26, 31, 21, 23, + 30, 30, 22, 19, 23, 22, 23, 25, 24, 25, 24, 28, 26, 30, 18, 25, 30, 37, 27, 34, 28, 34, 25, 10, + 25, 22, 35, 30, 24, 32, 24, 34, 19, 29, 26, 16, 27, 17, 26, 23, 27, 25, 26, 21, 31, 21, 28, 15, + 32, 24, 23, 23, 18, 15, 22, 25, 16, 25, 31, 26, 25, 28, 24, 26, 23, 25, 33, 20, 27, 28, 24, 29, + 32, 20, 24, 20, 19, 32, 24, 6, 24, 21, 26, 18, 15, 30, 19, 26, 22, 30, 35, 23, 22, 30, 20, 22, + 18, 30, 28, 25, 16, 25, 27, 30, 18, 24, 30, 28, 20, 19, 20, 28, 21, 24, 15, 33, 20, 18, 20, 36, + 30, 26, 25, 18, 28, 27, 31, 31, 15, 26, 16, 22, 27, 14, 17, 27, 27, 22, 32, 30, 22, 34, 22, 25, + 20, 22, 26, 29, 28, 33, 18, 23, 20, 20, 27, 24, 28, 21, 25, 27, 25, 19, 19, 25, 19, 32, 29, 27, + 23, 21, 28, 33, 23, 23, 28, 26, 31, 19, 21, 29, 21, 27, 23, 32, 24, 26, 21, 28, 28, 24, 17, 31, + 27, 21, 19, 32, 28, 23, 30, 23, 29, 15, 26, 26, 15, 20, 25, 26, 27, 31, 21, 23, 23, 33, 28, 19, + 23, 22, 22, 25, 27, 17, 23, 17, 25, 28, 26, 30, 32, 31, 19, 25, 25, 19, 23, 29, 27, 23, 34, 22, + 13, 21, 32, 10, 20, 33, 21, 17, 29, 31, 14, 24, 23, 19, 19, 22, 17, 26, 37, 26, 22, 26, 38, 29, + 29, 27, 30, 20, 31, 14, 32, 32, 24, 23, 23, 18, 21, 31, 24, 20, 28, 15, 21, 25, 25, 20, 30, 25, + 22, 21, 21, 25, 24, 25, 18, 23, 28, 30, 20, 27, 27, 19, 10, 32, 24, 20, 29, 26, 25, 20, 25, 29, + 28, 24, 32, 26, 22, 19, 23, 27, 27, 29, 20, 25, 21, 30, 28, 31, 24, 19, 23, 19, 19, 18, 30, 18, + 16, 24, 20, 20, 30, 25, 29, 25, 31, 21, 28, 31, 24, 26, 27, 21, 24, 23, 26, 18, 32, 26, 28, 26, + 24, 26, 29, 30, 22, 20, 24, 28, 25, 29, 20, 21, 22, 15, 30, 27, 33, 26, 22, 32, 30, 31, 20, 19, + 24, 26, 27, 31, 17, 17, 33, 27, 16, 27, 27, 22, 27, 19, 24, 21, 17, 24, 28, 23, 26, 24, 19, 26, + 20, 24, 22, 19, 22, 21, 21, 28, 29, 39, 19, 16, 25, 29, 31, 22, 22, 29, 26, 22, 22, 22, 26, 23, + 23, 23, 30, 25, 25, 25, 27, 29, 18, 33, 21, 12, 22, 29, 12, 20, 35, 22, 34, 28, 18, 29, 21, 20, + 24, 33, 24, 26, 23, 34, 31, 25, 31, 22, 35, 21, 20, 29, 27, 22, 30, 22, 27, 23, 22, 32, 16, 19, + 27, 22, 24, 27, 21, 33, 25, 25, 19, 28, 20, 27, 21, 25, 28, 20, 27, 22, 21, 20, 26, 30, 33, 23, + 20, 24, 17, 23, 28, 35, 14, 23, 22, 28, 28, 26, 25, 18, 20, 28, 28, 22, 13, 24, 22, 20, 30, 26, + 26, 18, 22, 20, 23, 24, 20, 27, 34, 28, 18, 24, 34, 33, 25, 33, 37, 21, 20, 31, 19, 23, 29, 22, + 21, 24, 19, 27, 19, 32, 25, 23, 33, 26, 33, 27, 29, 30, 19, 22, 30, 19, 18, 24, 25, 17, 31, 19, + 31, 26, 22, 23, 28, 28, 25, 24, 19, 19, 27, 28, 23, 21, 29, 26, 31, 22, 22, 25, 16, 29, 21, 22, + 23, 25, 22, 21, 22, 19, 27, 26, 28, 30, 22, 21, 24, 22, 23, 26, 28, 22, 18, 25, 23, 27, 31, 19, + 15, 29, 20, 19, 27, 25, 21, 29, 22, 24, 25, 17, 36, 29, 22, 22, 24, 28, 27, 22, 26, 31, 29, 31, + 18, 25, 23, 16, 37, 27, 21, 31, 25, 24, 20, 23, 28, 33, 24, 21, 26, 20, 18, 31, 20, 24, 23, 19, + 27, 17, 23, 23, 20, 26, 28, 23, 26, 31, 25, 31, 19, 32, 26, 18, 19, 29, 20, 21, 15, 25, 27, 29, + 22, 22, 22, 26, 23, 22, 23, 29, 28, 20, 21, 22, 20, 22, 27, 25, 23, 32, 23, 20, 31, 20, 27, 26, + 34, 20, 22, 36, 21, 29, 25, 20, 21, 22, 29, 29, 25, 22, 24, 22 + }; - //Chi squared distribution [0:49] degrees of freedom = 5.0 - vtkm::Float32 chiSquare[nVerts] = { - 3,1,4,6,5,4,8,7,2,9,2,0,0,4,3,2,5,2,3,6, - 3,8,3,4,3,3,2,7,2,10,9,6,1,1,4,7,3,3,1,4, - 4,3,9,4,4,7,3,2,4,7,3,3,2,10,1,6,2,2,3,8, - 3,3,6,9,4,1,4,3,16,7,0,1,8,7,13,3,5,0,3,8, - 10,3,5,5,1,5,2,1,3,2,5,3,4,3,3,3,3,1,13,2, - 3,1,2,7,3,4,1,2,5,4,4,4,2,6,3,2,7,8,1,3, - 4,1,2,0,1,6,1,8,8,1,1,4,2,1,4,3,5,4,6,4, - 2,3,8,8,3,3,3,4,5,8,8,16,7,12,4,3,14,8,3,12, - 5,0,5,3,5,2,9,2,9,4,1,0,0,4,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, 1, 6, 2, 2, 6, 2, 12, 1, 0, + 6, 3, 3, 5, 4, 7, 2, 2, 15, 7, 3, 10, 4, 2, 6, 3, 4, 8, 3, 1, 5, 5, 5, 4, + 3, 7, 3, 4, 5, 5, 2, 4, 2, 5, 1, 12, 5, 6, 3, 2, 8, 5, 2, 3, 11, 11, 6, 5, + 0, 3, 3, 9, 4, 2, 11, 1, 5, 3, 5, 6, 3, 6, 4, 2, 4, 10, 11, 3, 3, 4, 1, 1, + 1, 3, 5, 5, 1, 1, 4, 1, 5, 1, 6, 8, 6, 4, 6, 7, 6, 3, 5, 3, 6, 6, 6, 4, + 0, 6, 3, 1, 2, 4, 2, 6, 1, 1, 1, 2, 2, 4, 7, 2, 6, 2, 5, 7, 6, 4, 6, 3, + 1, 4, 5, 1, 4, 6, 2, 3, 0, 6, 11, 2, 9, 2, 6, 4, 5, 6, 2, 19, 2, 10, 4, 2, + 3, 3, 11, 7, 3, 3, 1, 5, 3, 6, 4, 3, 0, 6, 6, 6, 4, 2, 5, 2, 2, 2, 6, 10, + 4, 9, 3, 7, 7, 0, 6, 8, 5, 2, 3, 2, 3, 3, 3, 1, 6, 1, 8, 2, 5, 3, 6, 11, + 5, 7, 2, 6, 7, 3, 4, 1, 0, 5, 8, 3, 2, 9, 3, 1, 2, 3, 3, 9, 5, 6, 5, 1, + 4, 5, 6, 7, 6, 1, 5, 1, 6, 6, 2, 6, 7, 2, 4, 6 + }; - // Uniform distribution [0:49] - vtkm::Float32 uniform[nVerts] = { - 0,6,37,22,26,10,2,33,33,46,19,25,41,1,2,26,33,0,19,3, - 20,34,29,46,42,26,4,32,20,35,45,38,13,2,36,16,31,37,49,18, - 12,49,36,37,32,3,31,44,13,21,38,23,11,13,17,8,24,44,45,3, - 45,25,25,15,49,24,13,4,47,3,25,19,13,45,26,23,47,2,38,38, - 41,6,0,34,43,31,36,36,49,44,11,15,17,25,29,42,20,42,13,20, - 26,23,14,8,7,28,40,1,26,24,47,37,27,44,31,42,7,10,35,6, - 4,13,0,20,1,35,46,11,9,15,44,32,7,34,19,19,24,7,29,42, - 29,47,27,7,49,20,7,28,12,24,23,48,6,9,15,31,6,32,31,40, - 12,23,19,10,1,45,21,7,47,20,6,44,4,8,3,18,12,6,39,22, - 17,22,40,46,32,10,33,45,12,43,23,25,30,40,37,23,47,31,21,41, - 34,35,49,47,42,14,26,25,5,20,28,43,22,36,43,35,40,35,37,0, - 44,26,23,3,35,24,33,34,9,45,43,44,27,6,22,49,10,22,15,25, - 44,21,23,40,18,10,49,7,31,30,0,0,38,36,15,20,34,34,10,41, - 35,41,4,4,38,31,10,10,4,19,47,47,19,13,34,14,38,39,21,14, - 9,0,9,49,12,40,6,19,30,8,41,7,49,12,11,5,10,31,34,39, - 34,37,33,31,2,29,11,15,34,5,38,26,27,29,16,35,7,8,24,43, - 40,27,36,15,6,26,15,29,25,21,12,18,19,22,23,19,13,3,18,12, - 33,33,25,36,36,47,23,47,16,23,25,33,20,30,49,7,33,17,27,26, - 41,0,13,32,27,45,13,48,12,42,34,22,40,1,8,35,35,21,29,37, - 49,34,13,37,8,0,24,3,8,45,39,37,21,0,29,25,3,27,19,10, - 19,31,32,35,26,14,40,18,34,15,0,5,26,38,11,2,3,8,36,14, - 2,23,22,25,22,7,14,41,34,28,34,16,2,49,27,0,42,1,18,24, - 28,36,33,26,1,6,48,9,17,30,30,6,27,47,17,41,48,12,12,21, - 40,44,12,38,34,22,13,33,5,10,5,27,0,8,29,21,4,34,18,41, - 6,48,1,4,24,38,46,12,17,38,24,37,33,34,37,1,11,11,28,32, - 30,18,11,11,32,8,37,7,2,33,6,47,24,31,45,0,29,36,24,2, - 22,25,38,3,22,48,23,16,22,37,10,8,18,46,48,12,3,6,26,8, - 25,5,42,18,21,16,35,28,43,37,41,34,19,46,30,18,26,22,20,12, - 4,21,23,14,5,10,40,26,33,43,12,35,13,19,4,22,11,39,24,0, - 13,33,21,9,48,6,39,47,8,30,3,17,14,25,41,41,36,16,40,31, - 2,2,7,38,3,25,46,11,10,4,34,35,24,13,35,18,10,11,21,23, - 43,48,22,1,26,1,37,29,41,16,11,26,21,20,49,48,42,43,15,7, - 49,31,23,46,34,40,27,28,7,47,41,7,2,17,5,4,25,1,28,42, - 25,33,36,34,1,9,33,17,3,7,46,11,19,29,8,1,34,38,35,3, - 29,46,46,21,25,41,45,30,36,25,24,8,48,28,13,26,34,33,4,27, - 30,33,24,28,29,22,7,25,36,1,2,26,16,1,12,5,19,27,29,30, - 46,38,25,24,32,34,20,24,23,35,26,13,30,14,35,26,46,11,20,29, - 39,46,34,41,26,11,7,44,12,32,0,46,13,42,13,47,25,6,20,35, - 21,5,38,4,22,17,14,37,16,16,2,28,24,10,5,48,43,24,18,40, - 8,7,2,7,23,19,44,21,20,32,15,3,40,44,45,45,38,8,28,1, - 40,26,43,13,43,29,19,40,26,46,21,28,37,44,16,9,37,35,43,3, - 35,43,17,4,8,20,4,33,28,40,43,38,31,44,43,24,5,18,19,34, - 6,3,7,23,35,11,19,48,31,34,45,18,42,39,21,3,24,24,22,24, - 37,46,15,7,5,4,48,20,11,48,41,9,6,9,16,28,22,29,21,18, - 19,30,21,7,33,49,34,20,42,40,39,18,0,23,31,32,32,39,18,17, - 19,16,34,7,14,33,42,15,7,30,0,46,19,25,17,13,14,41,6,31, - 2,22,18,7,37,33,0,39,28,14,20,16,25,35,42,11,23,18,2,3, - 10,28,41,21,41,14,9,17,46,29,18,23,31,47,20,2,22,29,37,43, - 6,5,33,41,29,32,49,0,46,9,48,26,13,35,29,41,41,32,36,32, - 17,26,33,16,43,22,45,13,47,5,20,41,48,16,26,26,40,46,33,12 - }; + // Uniform distribution [0:49] + vtkm::Float32 uniform[nVerts] = { + 0, 6, 37, 22, 26, 10, 2, 33, 33, 46, 19, 25, 41, 1, 2, 26, 33, 0, 19, 3, 20, 34, 29, 46, + 42, 26, 4, 32, 20, 35, 45, 38, 13, 2, 36, 16, 31, 37, 49, 18, 12, 49, 36, 37, 32, 3, 31, 44, + 13, 21, 38, 23, 11, 13, 17, 8, 24, 44, 45, 3, 45, 25, 25, 15, 49, 24, 13, 4, 47, 3, 25, 19, + 13, 45, 26, 23, 47, 2, 38, 38, 41, 6, 0, 34, 43, 31, 36, 36, 49, 44, 11, 15, 17, 25, 29, 42, + 20, 42, 13, 20, 26, 23, 14, 8, 7, 28, 40, 1, 26, 24, 47, 37, 27, 44, 31, 42, 7, 10, 35, 6, + 4, 13, 0, 20, 1, 35, 46, 11, 9, 15, 44, 32, 7, 34, 19, 19, 24, 7, 29, 42, 29, 47, 27, 7, + 49, 20, 7, 28, 12, 24, 23, 48, 6, 9, 15, 31, 6, 32, 31, 40, 12, 23, 19, 10, 1, 45, 21, 7, + 47, 20, 6, 44, 4, 8, 3, 18, 12, 6, 39, 22, 17, 22, 40, 46, 32, 10, 33, 45, 12, 43, 23, 25, + 30, 40, 37, 23, 47, 31, 21, 41, 34, 35, 49, 47, 42, 14, 26, 25, 5, 20, 28, 43, 22, 36, 43, 35, + 40, 35, 37, 0, 44, 26, 23, 3, 35, 24, 33, 34, 9, 45, 43, 44, 27, 6, 22, 49, 10, 22, 15, 25, + 44, 21, 23, 40, 18, 10, 49, 7, 31, 30, 0, 0, 38, 36, 15, 20, 34, 34, 10, 41, 35, 41, 4, 4, + 38, 31, 10, 10, 4, 19, 47, 47, 19, 13, 34, 14, 38, 39, 21, 14, 9, 0, 9, 49, 12, 40, 6, 19, + 30, 8, 41, 7, 49, 12, 11, 5, 10, 31, 34, 39, 34, 37, 33, 31, 2, 29, 11, 15, 34, 5, 38, 26, + 27, 29, 16, 35, 7, 8, 24, 43, 40, 27, 36, 15, 6, 26, 15, 29, 25, 21, 12, 18, 19, 22, 23, 19, + 13, 3, 18, 12, 33, 33, 25, 36, 36, 47, 23, 47, 16, 23, 25, 33, 20, 30, 49, 7, 33, 17, 27, 26, + 41, 0, 13, 32, 27, 45, 13, 48, 12, 42, 34, 22, 40, 1, 8, 35, 35, 21, 29, 37, 49, 34, 13, 37, + 8, 0, 24, 3, 8, 45, 39, 37, 21, 0, 29, 25, 3, 27, 19, 10, 19, 31, 32, 35, 26, 14, 40, 18, + 34, 15, 0, 5, 26, 38, 11, 2, 3, 8, 36, 14, 2, 23, 22, 25, 22, 7, 14, 41, 34, 28, 34, 16, + 2, 49, 27, 0, 42, 1, 18, 24, 28, 36, 33, 26, 1, 6, 48, 9, 17, 30, 30, 6, 27, 47, 17, 41, + 48, 12, 12, 21, 40, 44, 12, 38, 34, 22, 13, 33, 5, 10, 5, 27, 0, 8, 29, 21, 4, 34, 18, 41, + 6, 48, 1, 4, 24, 38, 46, 12, 17, 38, 24, 37, 33, 34, 37, 1, 11, 11, 28, 32, 30, 18, 11, 11, + 32, 8, 37, 7, 2, 33, 6, 47, 24, 31, 45, 0, 29, 36, 24, 2, 22, 25, 38, 3, 22, 48, 23, 16, + 22, 37, 10, 8, 18, 46, 48, 12, 3, 6, 26, 8, 25, 5, 42, 18, 21, 16, 35, 28, 43, 37, 41, 34, + 19, 46, 30, 18, 26, 22, 20, 12, 4, 21, 23, 14, 5, 10, 40, 26, 33, 43, 12, 35, 13, 19, 4, 22, + 11, 39, 24, 0, 13, 33, 21, 9, 48, 6, 39, 47, 8, 30, 3, 17, 14, 25, 41, 41, 36, 16, 40, 31, + 2, 2, 7, 38, 3, 25, 46, 11, 10, 4, 34, 35, 24, 13, 35, 18, 10, 11, 21, 23, 43, 48, 22, 1, + 26, 1, 37, 29, 41, 16, 11, 26, 21, 20, 49, 48, 42, 43, 15, 7, 49, 31, 23, 46, 34, 40, 27, 28, + 7, 47, 41, 7, 2, 17, 5, 4, 25, 1, 28, 42, 25, 33, 36, 34, 1, 9, 33, 17, 3, 7, 46, 11, + 19, 29, 8, 1, 34, 38, 35, 3, 29, 46, 46, 21, 25, 41, 45, 30, 36, 25, 24, 8, 48, 28, 13, 26, + 34, 33, 4, 27, 30, 33, 24, 28, 29, 22, 7, 25, 36, 1, 2, 26, 16, 1, 12, 5, 19, 27, 29, 30, + 46, 38, 25, 24, 32, 34, 20, 24, 23, 35, 26, 13, 30, 14, 35, 26, 46, 11, 20, 29, 39, 46, 34, 41, + 26, 11, 7, 44, 12, 32, 0, 46, 13, 42, 13, 47, 25, 6, 20, 35, 21, 5, 38, 4, 22, 17, 14, 37, + 16, 16, 2, 28, 24, 10, 5, 48, 43, 24, 18, 40, 8, 7, 2, 7, 23, 19, 44, 21, 20, 32, 15, 3, + 40, 44, 45, 45, 38, 8, 28, 1, 40, 26, 43, 13, 43, 29, 19, 40, 26, 46, 21, 28, 37, 44, 16, 9, + 37, 35, 43, 3, 35, 43, 17, 4, 8, 20, 4, 33, 28, 40, 43, 38, 31, 44, 43, 24, 5, 18, 19, 34, + 6, 3, 7, 23, 35, 11, 19, 48, 31, 34, 45, 18, 42, 39, 21, 3, 24, 24, 22, 24, 37, 46, 15, 7, + 5, 4, 48, 20, 11, 48, 41, 9, 6, 9, 16, 28, 22, 29, 21, 18, 19, 30, 21, 7, 33, 49, 34, 20, + 42, 40, 39, 18, 0, 23, 31, 32, 32, 39, 18, 17, 19, 16, 34, 7, 14, 33, 42, 15, 7, 30, 0, 46, + 19, 25, 17, 13, 14, 41, 6, 31, 2, 22, 18, 7, 37, 33, 0, 39, 28, 14, 20, 16, 25, 35, 42, 11, + 23, 18, 2, 3, 10, 28, 41, 21, 41, 14, 9, 17, 46, 29, 18, 23, 31, 47, 20, 2, 22, 29, 37, 43, + 6, 5, 33, 41, 29, 32, 49, 0, 46, 9, 48, 26, 13, 35, 29, 41, 41, 32, 36, 32, 17, 26, 33, 16, + 43, 22, 45, 13, 47, 5, 20, 41, 48, 16, 26, 26, 40, 46, 33, 12 + }; - vtkm::cont::ArrayHandleUniformPointCoordinates - coordinates(vtkm::Id3(xVerts, yVerts, 1)); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vtkm::Id3(xVerts, yVerts, 1)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); - // Set point scalars - dataSet.AddField(vtkm::cont::Field("p_poisson", vtkm::cont::Field::ASSOC_POINTS, poisson, nVerts)); - dataSet.AddField(vtkm::cont::Field("p_normal", vtkm::cont::Field::ASSOC_POINTS, normal, nVerts)); - dataSet.AddField(vtkm::cont::Field("p_chiSquare", vtkm::cont::Field::ASSOC_POINTS, chiSquare, nVerts)); - dataSet.AddField(vtkm::cont::Field("p_uniform", vtkm::cont::Field::ASSOC_POINTS, uniform, nVerts)); + // Set point scalars + dataSet.AddField( + vtkm::cont::Field("p_poisson", vtkm::cont::Field::ASSOC_POINTS, poisson, nVerts)); + dataSet.AddField(vtkm::cont::Field("p_normal", vtkm::cont::Field::ASSOC_POINTS, normal, nVerts)); + dataSet.AddField( + vtkm::cont::Field("p_chiSquare", vtkm::cont::Field::ASSOC_POINTS, chiSquare, nVerts)); + dataSet.AddField( + vtkm::cont::Field("p_uniform", vtkm::cont::Field::ASSOC_POINTS, uniform, nVerts)); - // Set cell scalars - dataSet.AddField(vtkm::cont::Field("c_poisson", vtkm::cont::Field::ASSOC_CELL_SET, "cells", poisson, nCells)); - dataSet.AddField(vtkm::cont::Field("c_normal", vtkm::cont::Field::ASSOC_CELL_SET, "cells", normal, nCells)); - dataSet.AddField(vtkm::cont::Field("c_chiSquare", vtkm::cont::Field::ASSOC_CELL_SET, "cells", chiSquare, nCells)); - dataSet.AddField(vtkm::cont::Field("c_uniform", vtkm::cont::Field::ASSOC_CELL_SET, "cells", poisson, nCells)); + // Set cell scalars + dataSet.AddField( + vtkm::cont::Field("c_poisson", vtkm::cont::Field::ASSOC_CELL_SET, "cells", poisson, nCells)); + dataSet.AddField( + vtkm::cont::Field("c_normal", vtkm::cont::Field::ASSOC_CELL_SET, "cells", normal, nCells)); + dataSet.AddField(vtkm::cont::Field("c_chiSquare", vtkm::cont::Field::ASSOC_CELL_SET, "cells", + chiSquare, nCells)); + dataSet.AddField( + vtkm::cont::Field("c_uniform", vtkm::cont::Field::ASSOC_CELL_SET, "cells", poisson, nCells)); - vtkm::cont::CellSetStructured cellSet("cells"); + vtkm::cont::CellSetStructured cellSet("cells"); - //Set regular structure - cellSet.SetPointDimensions(vtkm::make_Vec(xVerts, yVerts)); - dataSet.AddCellSet(cellSet); + //Set regular structure + cellSet.SetPointDimensions(vtkm::make_Vec(xVerts, yVerts)); + dataSet.AddCellSet(cellSet); - return dataSet; + return dataSet; } // // Verify the histogram result and tally // -void VerifyHistogram(const vtkm::filter::ResultField& result, - vtkm::Id numberOfBins, - const vtkm::Range& range, - vtkm::Float64 delta, - bool output = true) +void VerifyHistogram(const vtkm::filter::ResultField& result, vtkm::Id numberOfBins, + const vtkm::Range& range, vtkm::Float64 delta, bool output = true) { - VTKM_TEST_ASSERT( result.IsValid(), "result should be valid" ); - VTKM_TEST_ASSERT( result.GetField().GetName() == "histogram", - "Output field has wrong name."); + VTKM_TEST_ASSERT(result.IsValid(), "result should be valid"); + VTKM_TEST_ASSERT(result.GetField().GetName() == "histogram", "Output field has wrong name."); vtkm::cont::ArrayHandle bins; result.FieldAs(bins); vtkm::cont::ArrayHandle::PortalConstControl binPortal = bins.GetPortalConstControl(); vtkm::Id sum = 0; - for (vtkm::Id i = 0; i < numberOfBins; i++) { + for (vtkm::Id i = 0; i < numberOfBins; i++) + { vtkm::Float64 lo = range.Min + (static_cast(i) * delta); vtkm::Float64 hi = lo + delta; sum += binPortal.Get(i); - if(output) + if (output) { - std::cout << " BIN[" << i << "] Range[" << lo << ", " << hi << "] = " - << binPortal.Get(i) << std::endl; + std::cout << " BIN[" << i << "] Range[" << lo << ", " << hi << "] = " << binPortal.Get(i) + << std::endl; } } VTKM_TEST_ASSERT(test_equal(sum, 1000), "Histogram not full"); @@ -336,7 +306,6 @@ void TestHistogram() range = histogram.GetDataRange(); VerifyHistogram(result, histogram.GetNumberOfBins(), range, delta); - histogram.SetNumberOfBins(100); result = histogram.Execute(ds, "p_normal"); delta = histogram.GetBinDelta(); @@ -357,9 +326,7 @@ void TestHistogram() } // TestFieldHistogram - -int UnitTestHistogramFilter(int, char *[]) +int UnitTestHistogramFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestHistogram); } - diff --git a/vtkm/filter/testing/UnitTestMarchingCubesFilter.cxx b/vtkm/filter/testing/UnitTestMarchingCubesFilter.cxx index 6b35029ec..6c3d86a58 100644 --- a/vtkm/filter/testing/UnitTestMarchingCubesFilter.cxx +++ b/vtkm/filter/testing/UnitTestMarchingCubesFilter.cxx @@ -27,7 +27,8 @@ #include -namespace { +namespace +{ class TangleField : public vtkm::worklet::WorkletMapField { @@ -41,25 +42,43 @@ public: const vtkm::Id cellsPerLayer; VTKM_CONT - TangleField(const vtkm::Id3 dims, const vtkm::FloatDefault mins[3], const vtkm::FloatDefault maxs[3]) : xdim(dims[0]), ydim(dims[1]), zdim(dims[2]), - xmin(mins[0]), ymin(mins[1]), zmin(mins[2]), xmax(maxs[0]), ymax(maxs[1]), zmax(maxs[2]), cellsPerLayer((xdim) * (ydim)) { } + TangleField(const vtkm::Id3 dims, const vtkm::FloatDefault mins[3], + const vtkm::FloatDefault maxs[3]) + : xdim(dims[0]) + , ydim(dims[1]) + , zdim(dims[2]) + , xmin(mins[0]) + , ymin(mins[1]) + , zmin(mins[2]) + , xmax(maxs[0]) + , ymax(maxs[1]) + , zmax(maxs[2]) + , cellsPerLayer((xdim) * (ydim)) + { + } VTKM_EXEC - void operator()(const vtkm::Id &vertexId, vtkm::Float32 &v) const + void operator()(const vtkm::Id& vertexId, vtkm::Float32& v) const { const vtkm::Id x = vertexId % (xdim); const vtkm::Id y = (vertexId / (xdim)) % (ydim); const vtkm::Id z = vertexId / cellsPerLayer; - const vtkm::FloatDefault fx = static_cast(x) / static_cast(xdim-1); - const vtkm::FloatDefault fy = static_cast(y) / static_cast(xdim-1); - const vtkm::FloatDefault fz = static_cast(z) / static_cast(xdim-1); + const vtkm::FloatDefault fx = + static_cast(x) / static_cast(xdim - 1); + const vtkm::FloatDefault fy = + static_cast(y) / static_cast(xdim - 1); + const vtkm::FloatDefault fz = + static_cast(z) / static_cast(xdim - 1); - const vtkm::Float32 xx = 3.0f*vtkm::Float32(xmin+(xmax-xmin)*(fx)); - const vtkm::Float32 yy = 3.0f*vtkm::Float32(ymin+(ymax-ymin)*(fy)); - const vtkm::Float32 zz = 3.0f*vtkm::Float32(zmin+(zmax-zmin)*(fz)); + const vtkm::Float32 xx = 3.0f * vtkm::Float32(xmin + (xmax - xmin) * (fx)); + const vtkm::Float32 yy = 3.0f * vtkm::Float32(ymin + (ymax - ymin) * (fy)); + const vtkm::Float32 zz = 3.0f * vtkm::Float32(zmin + (zmax - zmin) * (fz)); - v = (xx*xx*xx*xx - 5.0f*xx*xx + yy*yy*yy*yy - 5.0f*yy*yy + zz*zz*zz*zz - 5.0f*zz*zz + 11.8f) * 0.2f + 0.5f; + v = (xx * xx * xx * xx - 5.0f * xx * xx + yy * yy * yy * yy - 5.0f * yy * yy + + zz * zz * zz * zz - 5.0f * zz * zz + 11.8f) * + 0.2f + + 0.5f; } }; @@ -69,26 +88,25 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims) const vtkm::Id3 vdims(dims[0] + 1, dims[1] + 1, dims[2] + 1); - vtkm::FloatDefault mins[3] = {-1.0f, -1.0f, -1.0f}; - vtkm::FloatDefault maxs[3] = {1.0f, 1.0f, 1.0f}; + vtkm::FloatDefault mins[3] = { -1.0f, -1.0f, -1.0f }; + vtkm::FloatDefault maxs[3] = { 1.0f, 1.0f, 1.0f }; vtkm::cont::ArrayHandle fieldArray; - vtkm::cont::ArrayHandleIndex vertexCountImplicitArray(vdims[0]*vdims[1]*vdims[2]); - vtkm::worklet::DispatcherMapField tangleFieldDispatcher(TangleField(vdims, mins, maxs)); + vtkm::cont::ArrayHandleIndex vertexCountImplicitArray(vdims[0] * vdims[1] * vdims[2]); + vtkm::worklet::DispatcherMapField tangleFieldDispatcher( + TangleField(vdims, mins, maxs)); tangleFieldDispatcher.Invoke(vertexCountImplicitArray, fieldArray); - vtkm::Vec origin(0.0f, 0.0f, 0.0f); - vtkm::Vec spacing( - 1.0f/static_cast(dims[0]), - 1.0f/static_cast(dims[2]), - 1.0f/static_cast(dims[1])); + vtkm::Vec origin(0.0f, 0.0f, 0.0f); + vtkm::Vec spacing(1.0f / static_cast(dims[0]), + 1.0f / static_cast(dims[2]), + 1.0f / static_cast(dims[1])); - vtkm::cont::ArrayHandleUniformPointCoordinates - coordinates(vdims, origin, spacing); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vdims, origin, spacing); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); - dataSet.AddField(vtkm::cont::Field(std::string("nodevar"), vtkm::cont::Field::ASSOC_POINTS, fieldArray)); + dataSet.AddField( + vtkm::cont::Field(std::string("nodevar"), vtkm::cont::Field::ASSOC_POINTS, fieldArray)); static const vtkm::IdComponent ndim = 3; vtkm::cont::CellSetStructured cellSet("cells"); @@ -102,34 +120,45 @@ class EuclideanNorm { public: VTKM_EXEC_CONT - EuclideanNorm() : Reference(0.,0.,0.) {} + EuclideanNorm() + : Reference(0., 0., 0.) + { + } VTKM_EXEC_CONT - EuclideanNorm(vtkm::Vec reference):Reference(reference) {} + EuclideanNorm(vtkm::Vec reference) + : Reference(reference) + { + } VTKM_EXEC_CONT - vtkm::Float32 operator()(vtkm::Vec v) const + vtkm::Float32 operator()(vtkm::Vec v) const { - vtkm::Vec d(v[0]-this->Reference[0], - v[1]-this->Reference[1], - v[2]-this->Reference[2]); + vtkm::Vec d(v[0] - this->Reference[0], v[1] - this->Reference[1], + v[2] - this->Reference[2]); return vtkm::Magnitude(d); } private: - vtkm::Vec Reference; + vtkm::Vec Reference; }; class CubeGridConnectivity { public: VTKM_EXEC_CONT - CubeGridConnectivity() : Dimension(1), - DimSquared(1), - DimPlus1Squared(4) {} + CubeGridConnectivity() + : Dimension(1) + , DimSquared(1) + , DimPlus1Squared(4) + { + } VTKM_EXEC_CONT - CubeGridConnectivity(vtkm::Id dim) : Dimension(dim), - DimSquared(dim*dim), - DimPlus1Squared((dim+1)*(dim+1)) {} + CubeGridConnectivity(vtkm::Id dim) + : Dimension(dim) + , DimSquared(dim * dim) + , DimPlus1Squared((dim + 1) * (dim + 1)) + { + } VTKM_EXEC_CONT vtkm::Id operator()(vtkm::Id vertex) const @@ -137,23 +166,31 @@ public: typedef vtkm::CellShapeTagHexahedron HexTag; typedef vtkm::CellTraits HexTraits; - vtkm::Id cellId = vertex/HexTraits::NUM_POINTS; - vtkm::Id localId = vertex%HexTraits::NUM_POINTS; + vtkm::Id cellId = vertex / HexTraits::NUM_POINTS; + vtkm::Id localId = vertex % HexTraits::NUM_POINTS; vtkm::Id globalId = - (cellId + cellId/this->Dimension + - (this->Dimension+1)*(cellId/(this->DimSquared))); + (cellId + cellId / this->Dimension + (this->Dimension + 1) * (cellId / (this->DimSquared))); switch (localId) - { - case 2: globalId += 1; - case 3: globalId += this->Dimension; - case 1: globalId += 1; - case 0: break; - case 6: globalId += 1; - case 7: globalId += this->Dimension; - case 5: globalId += 1; - case 4: globalId += this->DimPlus1Squared; break; - } + { + case 2: + globalId += 1; + case 3: + globalId += this->Dimension; + case 1: + globalId += 1; + case 0: + break; + case 6: + globalId += 1; + case 7: + globalId += this->Dimension; + case 5: + globalId += 1; + case 4: + globalId += this->DimPlus1Squared; + break; + } return globalId; } @@ -168,41 +205,41 @@ class MakeRadiantDataSet { public: typedef vtkm::cont::ArrayHandleUniformPointCoordinates CoordinateArrayHandle; - typedef vtkm::cont::ArrayHandleTransform DataArrayHandle; - typedef vtkm::cont::ArrayHandleTransform, - CubeGridConnectivity> ConnectivityArrayHandle; + typedef vtkm::cont::ArrayHandleTransform< + vtkm::Float32, vtkm::cont::ArrayHandleUniformPointCoordinates, EuclideanNorm> + DataArrayHandle; + typedef vtkm::cont::ArrayHandleTransform, + CubeGridConnectivity> + ConnectivityArrayHandle; - typedef vtkm::cont::CellSetSingleType< - vtkm::cont::ArrayHandleTransform, - CubeGridConnectivity>::StorageTag> CellSet; + typedef vtkm::cont::CellSetSingleType, CubeGridConnectivity>::StorageTag> + CellSet; - vtkm::cont::DataSet Make3DRadiantDataSet(vtkm::IdComponent dim=5); + vtkm::cont::DataSet Make3DRadiantDataSet(vtkm::IdComponent dim = 5); }; -class PolicyRadiantDataSet : public vtkm::filter::PolicyBase< PolicyRadiantDataSet > +class PolicyRadiantDataSet : public vtkm::filter::PolicyBase { typedef MakeRadiantDataSet::DataArrayHandle DataHandleType; typedef MakeRadiantDataSet::ConnectivityArrayHandle CountingHandleType; - typedef vtkm::cont::ArrayHandleTransform,CubeGridConnectivity - > TransformHandleType; - + typedef vtkm::cont::ArrayHandleTransform, + CubeGridConnectivity> + TransformHandleType; public: - struct TypeListTagRadiantTypes : vtkm::ListTagBase< - DataHandleType::StorageTag, - CountingHandleType::StorageTag, - TransformHandleType::StorageTag> {}; + struct TypeListTagRadiantTypes + : vtkm::ListTagBase + { + }; typedef TypeListTagRadiantTypes FieldStorageList; - struct TypeListTagRadiantCellSetTypes : vtkm::ListTagBase< - MakeRadiantDataSet::CellSet > {}; + struct TypeListTagRadiantCellSetTypes : vtkm::ListTagBase + { + }; typedef TypeListTagRadiantCellSetTypes AllCellSetList; }; @@ -217,39 +254,31 @@ inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComp typedef vtkm::CellShapeTagHexahedron HexTag; typedef vtkm::CellTraits HexTraits; - typedef vtkm::Vec CoordType; + typedef vtkm::Vec CoordType; - const vtkm::IdComponent nCells = dim*dim*dim; + const vtkm::IdComponent nCells = dim * dim * dim; - vtkm::Float32 spacing = vtkm::Float32(1./dim); - CoordinateArrayHandle coordinates(vtkm::Id3(dim+1,dim+1,dim+1), - CoordType(-.5,-.5,-.5), - CoordType(spacing,spacing,spacing)); + vtkm::Float32 spacing = vtkm::Float32(1. / dim); + CoordinateArrayHandle coordinates(vtkm::Id3(dim + 1, dim + 1, dim + 1), CoordType(-.5, -.5, -.5), + CoordType(spacing, spacing, spacing)); DataArrayHandle distanceToOrigin(coordinates); - DataArrayHandle distanceToOther(coordinates, - EuclideanNorm(CoordType(1.,1.,1.))); + DataArrayHandle distanceToOther(coordinates, EuclideanNorm(CoordType(1., 1., 1.))); ConnectivityArrayHandle connectivity( - vtkm::cont::ArrayHandleCounting(0,1,nCells*HexTraits::NUM_POINTS), + vtkm::cont::ArrayHandleCounting(0, 1, nCells * HexTraits::NUM_POINTS), CubeGridConnectivity(dim)); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); //Set point scalar - dataSet.AddField( - vtkm::cont::Field("distanceToOrigin", vtkm::cont::Field::ASSOC_POINTS, - vtkm::cont::DynamicArrayHandle(distanceToOrigin))); - dataSet.AddField( - vtkm::cont::Field("distanceToOther", vtkm::cont::Field::ASSOC_POINTS, - vtkm::cont::DynamicArrayHandle(distanceToOther))); + dataSet.AddField(vtkm::cont::Field("distanceToOrigin", vtkm::cont::Field::ASSOC_POINTS, + vtkm::cont::DynamicArrayHandle(distanceToOrigin))); + dataSet.AddField(vtkm::cont::Field("distanceToOther", vtkm::cont::Field::ASSOC_POINTS, + vtkm::cont::DynamicArrayHandle(distanceToOther))); CellSet cellSet("cells"); - cellSet.Fill(coordinates.GetNumberOfValues(), - HexTag::Id, - HexTraits::NUM_POINTS, - connectivity); + cellSet.Fill(coordinates.GetNumberOfValues(), HexTag::Id, HexTraits::NUM_POINTS, connectivity); dataSet.AddCellSet(cellSet); @@ -260,7 +289,7 @@ void TestMarchingCubesUniformGrid() { std::cout << "Testing MarchingCubes filter on a uniform grid" << std::endl; - vtkm::Id3 dims(4,4,4); + vtkm::Id3 dims(4, 4, 4); vtkm::cont::DataSet dataSet = MakeIsosurfaceTestDataSet(dims); vtkm::filter::ResultDataSet result; @@ -269,8 +298,7 @@ void TestMarchingCubesUniformGrid() mc.SetGenerateNormals(true); mc.SetIsoValue(0, 0.5); - result = mc.Execute( dataSet, - dataSet.GetField("nodevar") ); + result = mc.Execute(dataSet, dataSet.GetField("nodevar")); { const vtkm::cont::DataSet& outputData = result.GetDataSet(); @@ -284,7 +312,7 @@ void TestMarchingCubesUniformGrid() //Map a field onto the resulting dataset const bool isMapped = mc.MapFieldOntoOutput(result, dataSet.GetField("nodevar")); - VTKM_TEST_ASSERT( isMapped, "mapping should pass" ); + VTKM_TEST_ASSERT(isMapped, "mapping should pass"); VTKM_TEST_ASSERT(outputData.GetNumberOfFields() == 2, "Wrong number of fields in the output dataset"); @@ -303,8 +331,7 @@ void TestMarchingCubesUniformGrid() //Now try with vertex merging disabled mc.SetMergeDuplicatePoints(false); - result = mc.Execute( dataSet, - dataSet.GetField("nodevar") ); + result = mc.Execute(dataSet, dataSet.GetField("nodevar")); { const vtkm::cont::DataSet& outputData = result.GetDataSet(); @@ -330,15 +357,14 @@ void TestMarchingCubesCustomPolicy() DataSetGenerator dataSetGenerator; const vtkm::IdComponent Dimension = 10; - vtkm::cont::DataSet dataSet = - dataSetGenerator.Make3DRadiantDataSet(Dimension); + vtkm::cont::DataSet dataSet = dataSetGenerator.Make3DRadiantDataSet(Dimension); vtkm::cont::Field contourField = dataSet.GetField("distanceToOrigin"); vtkm::filter::ResultDataSet result; vtkm::filter::MarchingCubes mc; - mc.SetGenerateNormals( false ); + mc.SetGenerateNormals(false); mc.SetIsoValue(0, 0.45); mc.SetIsoValue(1, 0.45); mc.SetIsoValue(2, 0.45); @@ -346,7 +372,7 @@ void TestMarchingCubesCustomPolicy() //We specify a custom execution policy here, since the contourField is a //custom field type - result = mc.Execute( dataSet, contourField, PolicyRadiantDataSet() ); + result = mc.Execute(dataSet, contourField, PolicyRadiantDataSet()); //Map a field onto the resulting dataset vtkm::cont::Field projectedField = dataSet.GetField("distanceToOther"); @@ -362,9 +388,8 @@ void TestMarchingCubesCustomPolicy() VTKM_TEST_ASSERT(outputData.GetNumberOfFields() == 2, "Wrong number of fields in the output dataset"); - vtkm::cont::CoordinateSystem coords = outputData.GetCoordinateSystem(); - VTKM_TEST_ASSERT(coords.GetData().GetNumberOfValues() == (414*4), + VTKM_TEST_ASSERT(coords.GetData().GetNumberOfValues() == (414 * 4), "Should have some coordinates"); } @@ -376,8 +401,7 @@ void TestMarchingCubesFilter() } // anonymous namespace - -int UnitTestMarchingCubesFilter(int, char *[]) +int UnitTestMarchingCubesFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestMarchingCubesFilter); } diff --git a/vtkm/filter/testing/UnitTestMaskFilter.cxx b/vtkm/filter/testing/UnitTestMaskFilter.cxx index 3234538ce..817513bb6 100644 --- a/vtkm/filter/testing/UnitTestMaskFilter.cxx +++ b/vtkm/filter/testing/UnitTestMaskFilter.cxx @@ -25,8 +25,8 @@ using vtkm::cont::testing::MakeTestDataSet; -namespace { - +namespace +{ class TestingMask { @@ -51,18 +51,18 @@ public: } vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 8), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 8), "Wrong result for Mask"); - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; OutCellFieldArrayHandleType cellFieldArray; output.GetField("cellvar").GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 8 && - cellFieldArray.GetPortalConstControl().Get(7) == 14.f, + cellFieldArray.GetPortalConstControl().Get(7) == 14.f, "Wrong mask data"); } @@ -86,18 +86,18 @@ public: } vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 7), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 7), "Wrong result for Mask"); - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; OutCellFieldArrayHandleType cellFieldArray; output.GetField("cellvar").GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 7 && - cellFieldArray.GetPortalConstControl().Get(2) == 18.f, + cellFieldArray.GetPortalConstControl().Get(2) == 18.f, "Wrong mask data"); } @@ -121,18 +121,18 @@ public: } vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 2), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 2), "Wrong result for Mask"); - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; OutCellFieldArrayHandleType cellFieldArray; output.GetField("cellvar").GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 2 && - cellFieldArray.GetPortalConstControl().Get(1) == 120.2f, + cellFieldArray.GetPortalConstControl().Get(1) == 120.2f, "Wrong mask data"); } @@ -143,10 +143,9 @@ public: this->TestExplicit(); } }; - } -int UnitTestMaskFilter(int, char *[]) +int UnitTestMaskFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestingMask()); } diff --git a/vtkm/filter/testing/UnitTestMaskPointsFilter.cxx b/vtkm/filter/testing/UnitTestMaskPointsFilter.cxx index c3dbafd14..09da35abd 100644 --- a/vtkm/filter/testing/UnitTestMaskPointsFilter.cxx +++ b/vtkm/filter/testing/UnitTestMaskPointsFilter.cxx @@ -25,8 +25,8 @@ using vtkm::cont::testing::MakeTestDataSet; -namespace { - +namespace +{ class TestingMaskPoints { @@ -41,10 +41,10 @@ public: maskPoints.SetStride(2); result = maskPoints.Execute(dataset); - maskPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); + maskPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar")); vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 12), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 12), "Wrong number of cells for MaskPoints"); VTKM_TEST_ASSERT(test_equal(output.GetField("pointvar").GetData().GetNumberOfValues(), 12), "Wrong number of points for MaskPoints"); @@ -60,10 +60,10 @@ public: maskPoints.SetStride(5); result = maskPoints.Execute(dataset); - maskPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); + maskPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar")); vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 25), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 25), "Wrong number of cells for MaskPoints"); VTKM_TEST_ASSERT(test_equal(output.GetField("pointvar").GetData().GetNumberOfValues(), 25), "Wrong number of points for MaskPoints"); @@ -80,10 +80,10 @@ public: maskPoints.SetCompactPoints(false); result = maskPoints.Execute(dataset); - maskPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); + maskPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar")); vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 3), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 3), "Wrong number of cells for MaskPoints"); VTKM_TEST_ASSERT(test_equal(output.GetField("pointvar").GetData().GetNumberOfValues(), 11), "Wrong number of points for MaskPoints"); @@ -96,10 +96,9 @@ public: this->TestExplicit3D(); } }; - } -int UnitTestMaskPointsFilter(int, char *[]) +int UnitTestMaskPointsFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestingMaskPoints()); } diff --git a/vtkm/filter/testing/UnitTestPointAverageFilter.cxx b/vtkm/filter/testing/UnitTestPointAverageFilter.cxx index 8bcbfbe39..72ebd9e41 100644 --- a/vtkm/filter/testing/UnitTestPointAverageFilter.cxx +++ b/vtkm/filter/testing/UnitTestPointAverageFilter.cxx @@ -22,7 +22,8 @@ #include #include -namespace { +namespace +{ void TestPointAverageUniform3D() { @@ -35,26 +36,23 @@ void TestPointAverageUniform3D() vtkm::filter::PointAverage pointAverage; pointAverage.SetOutputFieldName("avgvals"); - result = pointAverage.Execute( dataSet, dataSet.GetField("cellvar")); + result = pointAverage.Execute(dataSet, dataSet.GetField("cellvar")); - VTKM_TEST_ASSERT(result.GetField().GetName() == "avgvals", - "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_POINTS, + VTKM_TEST_ASSERT(result.GetField().GetName() == "avgvals", "Field was given the wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_POINTS, "Field was given the wrong association."); vtkm::cont::ArrayHandle resultArrayHandle; bool valid = result.FieldAs(resultArrayHandle); - if(valid) + if (valid) { vtkm::Float32 expected[18] = { 100.1f, 100.15f, 100.2f, 100.1f, 100.15f, 100.2f, 100.2f, 100.25f, 100.3f, 100.2f, 100.25f, 100.3f, - 100.3f, 100.35f, 100.4f, 100.3f, 100.35f, 100.4f - }; + 100.3f, 100.35f, 100.4f, 100.3f, 100.35f, 100.4f }; for (vtkm::Id i = 0; i < 18; ++i) { - VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), - expected[i]), "Wrong result for PointAverage worklet on 3D regular data"); + VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for PointAverage worklet on 3D regular data"); } } } @@ -69,28 +67,24 @@ void TestPointAverageRegular3D() vtkm::filter::ResultField result; vtkm::filter::PointAverage pointAverage; - result = pointAverage.Execute( dataSet, dataSet.GetField("cellvar")); + result = pointAverage.Execute(dataSet, dataSet.GetField("cellvar")); // If no name is given, should have the same name as the input. - VTKM_TEST_ASSERT(result.GetField().GetName() == "cellvar", - "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_POINTS, + VTKM_TEST_ASSERT(result.GetField().GetName() == "cellvar", "Field was given the wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_POINTS, "Field was given the wrong association."); vtkm::cont::Field resultField = result.GetField(); vtkm::cont::ArrayHandle resultArrayHandle; resultField.GetData().CopyTo(resultArrayHandle); - if(result.IsValid()) + if (result.IsValid()) { - vtkm::Float32 expected[18] = { 0.f, 0.5f, 1.f, 0.f, 0.5f, 1.f, - 1.f, 1.5f, 2.f, 1.f, 1.5f, 2.f, - 2.f, 2.5f, 3.f, 2.f, 2.5f, 3.f - }; + vtkm::Float32 expected[18] = { 0.f, 0.5f, 1.f, 0.f, 0.5f, 1.f, 1.f, 1.5f, 2.f, + 1.f, 1.5f, 2.f, 2.f, 2.5f, 3.f, 2.f, 2.5f, 3.f }; for (vtkm::Id i = 0; i < 18; ++i) { - VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), - expected[i]), "Wrong result for PointAverage worklet on 3D regular data"); + VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for PointAverage worklet on 3D regular data"); } } } @@ -105,24 +99,22 @@ void TestPointAverageExplicit1() vtkm::filter::ResultField result; vtkm::filter::PointAverage pointAverage; - result = pointAverage.Execute( dataSet, dataSet.GetField("cellvar")); + result = pointAverage.Execute(dataSet, dataSet.GetField("cellvar")); // If no name is given, should have the same name as the input. - VTKM_TEST_ASSERT(result.GetField().GetName() == "cellvar", - "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_POINTS, + VTKM_TEST_ASSERT(result.GetField().GetName() == "cellvar", "Field was given the wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_POINTS, "Field was given the wrong association."); vtkm::cont::ArrayHandle resultArrayHandle; const bool valid = result.FieldAs(resultArrayHandle); - if(valid) + if (valid) { vtkm::Float32 expected[5] = { 100.1f, 100.15f, 100.15f, 100.2f, 100.2f }; for (int i = 0; i < 5; ++i) { - VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), - expected[i]), "Wrong result for PointAverage worklet on 3D regular data"); + VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for PointAverage worklet on 3D regular data"); } } } @@ -137,32 +129,27 @@ void TestPointAverageExplicit2() vtkm::filter::ResultField result; vtkm::filter::PointAverage pointAverage; - result = pointAverage.Execute( dataSet, dataSet.GetField("cellvar")); + result = pointAverage.Execute(dataSet, dataSet.GetField("cellvar")); // If no name is given, should have the same name as the input. - VTKM_TEST_ASSERT(result.GetField().GetName() == "cellvar", - "Field was given the wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_POINTS, + VTKM_TEST_ASSERT(result.GetField().GetName() == "cellvar", "Field was given the wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_POINTS, "Field was given the wrong association."); vtkm::cont::ArrayHandle resultArrayHandle; const bool valid = result.FieldAs(resultArrayHandle); - if(valid) + if (valid) { - vtkm::Float32 expected[11] = { 100.1f, 105.05f, 105.05f, 100.1f, - 115.3f, 115.2f, 115.2f, 115.3f, - 115.1f, 130.5f, 125.35f - }; + vtkm::Float32 expected[11] = { 100.1f, 105.05f, 105.05f, 100.1f, 115.3f, 115.2f, + 115.2f, 115.3f, 115.1f, 130.5f, 125.35f }; for (int i = 0; i < 11; ++i) { - VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), - expected[i]), "Wrong result for PointAverage worklet on 3D regular data"); + VTKM_TEST_ASSERT(test_equal(resultArrayHandle.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for PointAverage worklet on 3D regular data"); } } } - void TestPointAverage() { TestPointAverageUniform3D(); @@ -170,10 +157,9 @@ void TestPointAverage() TestPointAverageExplicit1(); TestPointAverageExplicit2(); } - } -int UnitTestPointAverageFilter(int, char *[]) +int UnitTestPointAverageFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestPointAverage); } diff --git a/vtkm/filter/testing/UnitTestPointElevationFilter.cxx b/vtkm/filter/testing/UnitTestPointElevationFilter.cxx index adea527af..d3c446c4c 100644 --- a/vtkm/filter/testing/UnitTestPointElevationFilter.cxx +++ b/vtkm/filter/testing/UnitTestPointElevationFilter.cxx @@ -23,30 +23,28 @@ #include -namespace { +namespace +{ vtkm::cont::DataSet MakePointElevationTestDataSet() { vtkm::cont::DataSet dataSet; - std::vector > coordinates; + std::vector> coordinates; const vtkm::Id dim = 5; for (vtkm::Id j = 0; j < dim; ++j) { - vtkm::Float32 z = static_cast(j) / - static_cast(dim - 1); + vtkm::Float32 z = static_cast(j) / static_cast(dim - 1); for (vtkm::Id i = 0; i < dim; ++i) { - vtkm::Float32 x = static_cast(i) / - static_cast(dim - 1); - vtkm::Float32 y = (x*x + z*z)/2.0f; - coordinates.push_back(vtkm::make_Vec(x,y,z)); + vtkm::Float32 x = static_cast(i) / static_cast(dim - 1); + vtkm::Float32 y = (x * x + z * z) / 2.0f; + coordinates.push_back(vtkm::make_Vec(x, y, z)); } } vtkm::Id numCells = (dim - 1) * (dim - 1); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); vtkm::cont::CellSetExplicit<> cellSet("cells"); cellSet.PrepareToAddCells(numCells, numCells * 4); @@ -54,11 +52,8 @@ vtkm::cont::DataSet MakePointElevationTestDataSet() { 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, + 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)); } } @@ -67,7 +62,6 @@ vtkm::cont::DataSet MakePointElevationTestDataSet() dataSet.AddCellSet(cellSet); return dataSet; } - } void TestPointElevationNoPolicy() @@ -77,35 +71,32 @@ void TestPointElevationNoPolicy() vtkm::cont::DataSet inputData = MakePointElevationTestDataSet(); vtkm::filter::PointElevation filter; - filter.SetLowPoint( 0.0, 0.0, 0.0 ); - filter.SetHighPoint( 0.0, 1.0, 0.0 ); - filter.SetRange( 0.0, 2.0 ); + filter.SetLowPoint(0.0, 0.0, 0.0); + filter.SetHighPoint(0.0, 1.0, 0.0); + filter.SetRange(0.0, 2.0); filter.SetOutputFieldName("height"); vtkm::filter::ResultField result; - result = filter.Execute(inputData, - inputData.GetCoordinateSystem()); + result = filter.Execute(inputData, inputData.GetCoordinateSystem()); //verify the result - VTKM_TEST_ASSERT( result.IsValid(), "result should be valid" ); - VTKM_TEST_ASSERT(result.GetField().GetName() == "height", - "Output field has wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_POINTS, + VTKM_TEST_ASSERT(result.IsValid(), "result should be valid"); + VTKM_TEST_ASSERT(result.GetField().GetName() == "height", "Output field has wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_POINTS, "Output field has wrong association"); vtkm::cont::ArrayHandle resultArrayHandle; const bool valid = result.FieldAs(resultArrayHandle); - if(valid) + if (valid) { - vtkm::cont::ArrayHandle > coordinates; + vtkm::cont::ArrayHandle> coordinates; inputData.GetCoordinateSystem().GetData().CopyTo(coordinates); for (vtkm::Id i = 0; i < resultArrayHandle.GetNumberOfValues(); ++i) { VTKM_TEST_ASSERT(test_equal(coordinates.GetPortalConstControl().Get(i)[1] * 2.0, resultArrayHandle.GetPortalConstControl().Get(i)), - "Wrong result for PointElevation worklet"); + "Wrong result for PointElevation worklet"); } } } @@ -119,40 +110,35 @@ void TestPointElevationWithPolicy() vtkm::cont::DataSet inputData = MakePointElevationTestDataSet(); vtkm::filter::PointElevation filter; - filter.SetLowPoint( 0.0, 0.0, 0.0 ); - filter.SetHighPoint( 0.0, 1.0, 0.0 ); - filter.SetRange( 0.0, 2.0 ); + filter.SetLowPoint(0.0, 0.0, 0.0); + filter.SetHighPoint(0.0, 1.0, 0.0); + filter.SetRange(0.0, 2.0); vtkm::filter::ResultField result; vtkm::filter::PolicyDefault p; - result = filter.Execute(inputData, - inputData.GetCoordinateSystem(), - p); + result = filter.Execute(inputData, inputData.GetCoordinateSystem(), p); //verify the result - VTKM_TEST_ASSERT( result.IsValid(), "result should be valid" ); - VTKM_TEST_ASSERT(result.GetField().GetName() == "elevation", - "Output field has wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_POINTS, + VTKM_TEST_ASSERT(result.IsValid(), "result should be valid"); + VTKM_TEST_ASSERT(result.GetField().GetName() == "elevation", "Output field has wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_POINTS, "Output field has wrong association"); vtkm::cont::ArrayHandle resultArrayHandle; const bool valid = result.FieldAs(resultArrayHandle); - if(valid) + if (valid) { - vtkm::cont::ArrayHandle > coordinates; + vtkm::cont::ArrayHandle> coordinates; inputData.GetCoordinateSystem().GetData().CopyTo(coordinates); for (vtkm::Id i = 0; i < resultArrayHandle.GetNumberOfValues(); ++i) { VTKM_TEST_ASSERT(test_equal(coordinates.GetPortalConstControl().Get(i)[1] * 2.0, resultArrayHandle.GetPortalConstControl().Get(i)), - "Wrong result for PointElevation worklet"); + "Wrong result for PointElevation worklet"); } } - } void TestPointElevation() @@ -161,7 +147,7 @@ void TestPointElevation() TestPointElevationWithPolicy(); } -int UnitTestPointElevationFilter(int, char *[]) +int UnitTestPointElevationFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestPointElevation); } diff --git a/vtkm/filter/testing/UnitTestTetrahedralizeFilter.cxx b/vtkm/filter/testing/UnitTestTetrahedralizeFilter.cxx index ecc985cb0..47580e29a 100644 --- a/vtkm/filter/testing/UnitTestTetrahedralizeFilter.cxx +++ b/vtkm/filter/testing/UnitTestTetrahedralizeFilter.cxx @@ -25,7 +25,8 @@ using vtkm::cont::testing::MakeTestDataSet; -namespace { +namespace +{ class TestingTetrahedralize { @@ -40,17 +41,17 @@ public: result = tetrahedralize.Execute(dataset); - tetrahedralize.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - tetrahedralize.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + tetrahedralize.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + tetrahedralize.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 20), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 20), "Wrong result for Tetrahedralize"); VTKM_TEST_ASSERT(test_equal(output.GetField("pointvar").GetData().GetNumberOfValues(), 18), "Wrong number of points for Tetrahedralize"); vtkm::cont::ArrayHandle outData = - output.GetField("cellvar").GetData().Cast >(); + output.GetField("cellvar").GetData().Cast>(); VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(5) == 100.2f, "Wrong cell field data"); VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(6) == 100.2f, "Wrong cell field data"); @@ -69,17 +70,17 @@ public: result = tetrahedralize.Execute(dataset); - tetrahedralize.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - tetrahedralize.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + tetrahedralize.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + tetrahedralize.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 11), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 11), "Wrong result for Tetrahedralize"); VTKM_TEST_ASSERT(test_equal(output.GetField("pointvar").GetData().GetNumberOfValues(), 11), "Wrong number of points for Tetrahedralize"); vtkm::cont::ArrayHandle outData = - output.GetField("cellvar").GetData().Cast >(); + output.GetField("cellvar").GetData().Cast>(); VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(5) == 110.f, "Wrong cell field data"); VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(6) == 110.f, "Wrong cell field data"); @@ -94,10 +95,9 @@ public: this->TestExplicit(); } }; - } -int UnitTestTetrahedralizeFilter(int, char *[]) +int UnitTestTetrahedralizeFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestingTetrahedralize()); } diff --git a/vtkm/filter/testing/UnitTestThresholdFilter.cxx b/vtkm/filter/testing/UnitTestThresholdFilter.cxx index 59f883153..09ace9ee6 100644 --- a/vtkm/filter/testing/UnitTestThresholdFilter.cxx +++ b/vtkm/filter/testing/UnitTestThresholdFilter.cxx @@ -25,8 +25,8 @@ using vtkm::cont::testing::MakeTestDataSet; -namespace { - +namespace +{ class TestingThreshold { @@ -44,21 +44,21 @@ public: threshold.SetUpperThreshold(60.1); result = threshold.Execute(dataset, dataset.GetField("pointvar")); - threshold.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + threshold.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); VTKM_TEST_ASSERT(output.GetNumberOfFields() == 1, - "Wrong number of fields in the output dataset"); + "Wrong number of fields in the output dataset"); - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; OutCellFieldArrayHandleType cellFieldArray; output.GetField("cellvar").GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 1 && - cellFieldArray.GetPortalConstControl().Get(0) == 200.1f, + cellFieldArray.GetPortalConstControl().Get(0) == 200.1f, "Wrong cell field data"); } @@ -74,22 +74,22 @@ public: threshold.SetUpperThreshold(20.1); result = threshold.Execute(dataset, std::string("pointvar")); - threshold.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + threshold.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); VTKM_TEST_ASSERT(output.GetNumberOfFields() == 1, - "Wrong number of fields in the output dataset"); + "Wrong number of fields in the output dataset"); - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; OutCellFieldArrayHandleType cellFieldArray; output.GetField("cellvar").GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 2 && - cellFieldArray.GetPortalConstControl().Get(0) == 100.1f && - cellFieldArray.GetPortalConstControl().Get(1) == 100.2f, + cellFieldArray.GetPortalConstControl().Get(0) == 100.1f && + cellFieldArray.GetPortalConstControl().Get(1) == 100.2f, "Wrong cell field data"); } @@ -105,22 +105,22 @@ public: threshold.SetUpperThreshold(20.1); result = threshold.Execute(dataset, std::string("pointvar")); - threshold.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + threshold.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); VTKM_TEST_ASSERT(output.GetNumberOfFields() == 1, - "Wrong number of fields in the output dataset"); + "Wrong number of fields in the output dataset"); - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; OutCellFieldArrayHandleType cellFieldArray; output.GetField("cellvar").GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 2 && - cellFieldArray.GetPortalConstControl().Get(0) == 100.1f && - cellFieldArray.GetPortalConstControl().Get(1) == 100.2f, + cellFieldArray.GetPortalConstControl().Get(0) == 100.1f && + cellFieldArray.GetPortalConstControl().Get(1) == 100.2f, "Wrong cell field data"); } @@ -138,15 +138,15 @@ public: VTKM_TEST_ASSERT(result.IsValid(), "threshold algorithm should return true"); - threshold.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + threshold.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); VTKM_TEST_ASSERT(output.GetNumberOfFields() == 1, - "Wrong number of fields in the output dataset"); + "Wrong number of fields in the output dataset"); - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; OutCellFieldArrayHandleType cellFieldArray; output.GetField("cellvar").GetData().CopyTo(cellFieldArray); @@ -162,10 +162,9 @@ public: this->TestExplicit3DZeroResults(); } }; - } -int UnitTestThresholdFilter(int, char *[]) +int UnitTestThresholdFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestingThreshold()); -} \ No newline at end of file +} diff --git a/vtkm/filter/testing/UnitTestThresholdPointsFilter.cxx b/vtkm/filter/testing/UnitTestThresholdPointsFilter.cxx index 34aa69b3e..e51be601d 100644 --- a/vtkm/filter/testing/UnitTestThresholdPointsFilter.cxx +++ b/vtkm/filter/testing/UnitTestThresholdPointsFilter.cxx @@ -25,8 +25,8 @@ using vtkm::cont::testing::MakeTestDataSet; -namespace { - +namespace +{ class TestingThresholdPoints { @@ -42,10 +42,10 @@ public: result = thresholdPoints.Execute(dataset, dataset.GetField("pointvar")); - thresholdPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); + thresholdPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar")); vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 11), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 11), "Wrong result for ThresholdPoints"); VTKM_TEST_ASSERT(test_equal(output.GetField("pointvar").GetData().GetNumberOfValues(), 25), "Wrong number of points for ThresholdPoints"); @@ -69,10 +69,10 @@ public: result = thresholdPoints.Execute(dataset, std::string("pointvar")); - thresholdPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); + thresholdPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar")); vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 27), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 27), "Wrong result for ThresholdPoints"); VTKM_TEST_ASSERT(test_equal(output.GetField("pointvar").GetData().GetNumberOfValues(), 27), "Wrong number of points for ThresholdPoints"); @@ -96,10 +96,10 @@ public: result = thresholdPoints.Execute(dataset, std::string("pointvar")); - thresholdPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); + thresholdPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar")); vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 6), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 6), "Wrong result for ThresholdPoints"); VTKM_TEST_ASSERT(test_equal(output.GetField("pointvar").GetData().GetNumberOfValues(), 6), "Wrong number of points for ThresholdPoints"); @@ -124,12 +124,12 @@ public: VTKM_TEST_ASSERT(result.IsValid(), "threshold algorithm should return true"); - thresholdPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); + thresholdPoints.MapFieldOntoOutput(result, dataset.GetField("pointvar")); vtkm::cont::DataSet output = result.GetDataSet(); VTKM_TEST_ASSERT(output.GetNumberOfFields() == 1, "Wrong number of fields in the output dataset"); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 0), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 0), "Wrong result for ThresholdPoints"); } @@ -141,10 +141,9 @@ public: this->TestExplicit3DZeroResults(); } }; - } -int UnitTestThresholdPointsFilter(int, char *[]) +int UnitTestThresholdPointsFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestingThresholdPoints()); } diff --git a/vtkm/filter/testing/UnitTestTriangulateFilter.cxx b/vtkm/filter/testing/UnitTestTriangulateFilter.cxx index 945c6ddc3..0e2a5a889 100644 --- a/vtkm/filter/testing/UnitTestTriangulateFilter.cxx +++ b/vtkm/filter/testing/UnitTestTriangulateFilter.cxx @@ -25,7 +25,8 @@ using vtkm::cont::testing::MakeTestDataSet; -namespace { +namespace +{ class TestingTriangulate { @@ -40,17 +41,17 @@ public: result = triangulate.Execute(dataset); - triangulate.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - triangulate.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + triangulate.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + triangulate.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 32), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 32), "Wrong result for Triangulate"); VTKM_TEST_ASSERT(test_equal(output.GetField("pointvar").GetData().GetNumberOfValues(), 25), "Wrong number of points for Triangulate"); - vtkm::cont::ArrayHandle outData = - output.GetField("cellvar").GetData().Cast >(); + vtkm::cont::ArrayHandle outData = + output.GetField("cellvar").GetData().Cast>(); VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(2) == 1.f, "Wrong cell field data"); VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(3) == 1.f, "Wrong cell field data"); @@ -68,17 +69,17 @@ public: result = triangulate.Execute(dataset); - triangulate.MapFieldOntoOutput(result, dataset.GetField("pointvar") ); - triangulate.MapFieldOntoOutput(result, dataset.GetField("cellvar") ); + triangulate.MapFieldOntoOutput(result, dataset.GetField("pointvar")); + triangulate.MapFieldOntoOutput(result, dataset.GetField("cellvar")); vtkm::cont::DataSet output = result.GetDataSet(); - VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 14), + VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 14), "Wrong result for Triangulate"); VTKM_TEST_ASSERT(test_equal(output.GetField("pointvar").GetData().GetNumberOfValues(), 16), "Wrong number of points for Triangulate"); - vtkm::cont::ArrayHandle outData = - output.GetField("cellvar").GetData().Cast >(); + vtkm::cont::ArrayHandle outData = + output.GetField("cellvar").GetData().Cast>(); VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(1) == 1.f, "Wrong cell field data"); VTKM_TEST_ASSERT(outData.GetPortalConstControl().Get(2) == 1.f, "Wrong cell field data"); @@ -92,10 +93,9 @@ public: this->TestExplicit(); } }; - } -int UnitTestTriangulateFilter(int, char *[]) +int UnitTestTriangulateFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestingTriangulate()); } diff --git a/vtkm/filter/testing/UnitTestVectorMagnitudeFilter.cxx b/vtkm/filter/testing/UnitTestVectorMagnitudeFilter.cxx index 1a6fe0d79..d9e9ae0be 100644 --- a/vtkm/filter/testing/UnitTestVectorMagnitudeFilter.cxx +++ b/vtkm/filter/testing/UnitTestVectorMagnitudeFilter.cxx @@ -24,7 +24,8 @@ #include -namespace { +namespace +{ void TestVectorMagnitude() { @@ -34,18 +35,15 @@ void TestVectorMagnitude() vtkm::cont::DataSet dataSet = testDataSet.Make3DUniformDataSet0(); const int nVerts = 18; - vtkm::Float64 fvars[nVerts] = {10.1, 20.1, 30.1, 40.1, 50.2, - 60.2, 70.2, 80.2, 90.3, 100.3, - 110.3, 120.3, 130.4, 140.4, - 150.4, 160.4, 170.5, 180.5}; + vtkm::Float64 fvars[nVerts] = { 10.1, 20.1, 30.1, 40.1, 50.2, 60.2, 70.2, 80.2, 90.3, + 100.3, 110.3, 120.3, 130.4, 140.4, 150.4, 160.4, 170.5, 180.5 }; - std::vector< vtkm::Vec > fvec(nVerts); - for(std::size_t i=0; i < fvec.size(); ++i) + std::vector> fvec(nVerts); + for (std::size_t i = 0; i < fvec.size(); ++i) { - fvec[i] = vtkm::make_Vec(fvars[i],fvars[i],fvars[i]); + fvec[i] = vtkm::make_Vec(fvars[i], fvars[i], fvars[i]); } - vtkm::cont::ArrayHandle< vtkm::Vec > finput = - vtkm::cont::make_ArrayHandle(fvec); + vtkm::cont::ArrayHandle> finput = vtkm::cont::make_ArrayHandle(fvec); vtkm::cont::DataSetFieldAdd::AddPointField(dataSet, "double_vec_pointvar", finput); @@ -54,30 +52,26 @@ void TestVectorMagnitude() result = vm.Execute(dataSet, dataSet.GetField("double_vec_pointvar")); - VTKM_TEST_ASSERT( result.IsValid(), "result should be valid" ); - VTKM_TEST_ASSERT(result.GetField().GetName() == "magnitude", - "Output field has wrong name."); - VTKM_TEST_ASSERT(result.GetField().GetAssociation() == - vtkm::cont::Field::ASSOC_POINTS, + VTKM_TEST_ASSERT(result.IsValid(), "result should be valid"); + VTKM_TEST_ASSERT(result.GetField().GetName() == "magnitude", "Output field has wrong name."); + VTKM_TEST_ASSERT(result.GetField().GetAssociation() == vtkm::cont::Field::ASSOC_POINTS, "Output field has wrong association"); - + vtkm::cont::ArrayHandle resultArrayHandle; bool valid = result.FieldAs(resultArrayHandle); - if(valid) - { + if (valid) + { for (vtkm::Id i = 0; i < resultArrayHandle.GetNumberOfValues(); ++i) { - VTKM_TEST_ASSERT(test_equal(std::sqrt(3*fvars[i]*fvars[i]), + VTKM_TEST_ASSERT(test_equal(std::sqrt(3 * fvars[i] * fvars[i]), resultArrayHandle.GetPortalConstControl().Get(i)), - "Wrong result for Magnitude worklet"); + "Wrong result for Magnitude worklet"); } } - +} } -} - -int UnitTestVectorMagnitudeFilter(int, char *[]) +int UnitTestVectorMagnitudeFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestVectorMagnitude); } diff --git a/vtkm/filter/testing/UnitTestVertexClusteringFilter.cxx b/vtkm/filter/testing/UnitTestVertexClusteringFilter.cxx index 825c38577..72c9c1c4a 100644 --- a/vtkm/filter/testing/UnitTestVertexClusteringFilter.cxx +++ b/vtkm/filter/testing/UnitTestVertexClusteringFilter.cxx @@ -25,7 +25,8 @@ using vtkm::cont::testing::MakeTestDataSet; -namespace { +namespace +{ } void TestVertexClustering() @@ -36,38 +37,38 @@ void TestVertexClustering() vtkm::filter::VertexClustering clustering; vtkm::filter::ResultDataSet result; - clustering.SetNumberOfDivisions( vtkm::Id3(3, 3, 3) ); + clustering.SetNumberOfDivisions(vtkm::Id3(3, 3, 3)); result = clustering.Execute(dataSet); - VTKM_TEST_ASSERT( result.IsValid(), "results should be valid"); + VTKM_TEST_ASSERT(result.IsValid(), "results should be valid"); vtkm::cont::DataSet output = result.GetDataSet(); VTKM_TEST_ASSERT(output.GetNumberOfCoordinateSystems() == 1, "Number of output coordinate systems mismatch"); - // test const vtkm::Id output_points = 6; - vtkm::Float64 output_point[output_points][3] = {{0.0174716003,0.0501927994,0.0930275023}, {0.0320714004,0.14704667,0.0952706337}, {0.0268670674,0.246195346,0.119720004}, {0.00215422804,0.0340906903,0.180881709}, {0.0108188,0.152774006,0.167914003}, {0.0202241503,0.225427493,0.140208006}}; + vtkm::Float64 output_point[output_points][3] = { + { 0.0174716003, 0.0501927994, 0.0930275023 }, { 0.0320714004, 0.14704667, 0.0952706337 }, + { 0.0268670674, 0.246195346, 0.119720004 }, { 0.00215422804, 0.0340906903, 0.180881709 }, + { 0.0108188, 0.152774006, 0.167914003 }, { 0.0202241503, 0.225427493, 0.140208006 } + }; typedef vtkm::Vec PointType; vtkm::cont::ArrayHandle pointArray; output.GetCoordinateSystem(0).GetData().CopyTo(pointArray); VTKM_TEST_ASSERT(pointArray.GetNumberOfValues() == output_points, - "Number of output points mismatch" ); + "Number of output points mismatch"); for (vtkm::Id i = 0; i < pointArray.GetNumberOfValues(); ++i) - { - const PointType &p1 = pointArray.GetPortalConstControl().Get(i); - PointType p2 = vtkm::make_Vec(output_point[i][0], - output_point[i][1], - output_point[i][2]); - std::cout << "point: " << p1 << " " << p2 << std::endl; - VTKM_TEST_ASSERT(test_equal(p1, p2), "Point Array mismatch"); - } + { + const PointType& p1 = pointArray.GetPortalConstControl().Get(i); + PointType p2 = vtkm::make_Vec(output_point[i][0], output_point[i][1], output_point[i][2]); + std::cout << "point: " << p1 << " " << p2 << std::endl; + VTKM_TEST_ASSERT(test_equal(p1, p2), "Point Array mismatch"); + } } -int UnitTestVertexClusteringFilter(int, char *[]) +int UnitTestVertexClusteringFilter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestVertexClustering); - -} \ No newline at end of file +} diff --git a/vtkm/internal/.gitattributes b/vtkm/internal/.gitattributes new file mode 100644 index 000000000..389579816 --- /dev/null +++ b/vtkm/internal/.gitattributes @@ -0,0 +1,2 @@ +# Generated. +FunctionInterfaceDetail*.h -format.clang-format diff --git a/vtkm/internal/ArrayPortalUniformPointCoordinates.h b/vtkm/internal/ArrayPortalUniformPointCoordinates.h index f1a543aac..2fb975f6f 100644 --- a/vtkm/internal/ArrayPortalUniformPointCoordinates.h +++ b/vtkm/internal/ArrayPortalUniformPointCoordinates.h @@ -23,41 +23,44 @@ #include #include -namespace vtkm { -namespace internal { +namespace vtkm +{ +namespace internal +{ /// \brief An implicit array port that computes point coordinates for a uniform grid. /// class VTKM_ALWAYS_EXPORT ArrayPortalUniformPointCoordinates { public: - typedef vtkm::Vec ValueType; + typedef vtkm::Vec ValueType; VTKM_EXEC_CONT - ArrayPortalUniformPointCoordinates() : NumberOfValues(0) { } + ArrayPortalUniformPointCoordinates() + : NumberOfValues(0) + { + } VTKM_EXEC_CONT - ArrayPortalUniformPointCoordinates(vtkm::Id3 dimensions, - ValueType origin, - ValueType spacing) - : Dimensions(dimensions), - NumberOfValues(dimensions[0]*dimensions[1]*dimensions[2]), - Origin(origin), - Spacing(spacing) - { } + ArrayPortalUniformPointCoordinates(vtkm::Id3 dimensions, ValueType origin, ValueType spacing) + : Dimensions(dimensions) + , NumberOfValues(dimensions[0] * dimensions[1] * dimensions[2]) + , Origin(origin) + , Spacing(spacing) + { + } VTKM_EXEC_CONT - ArrayPortalUniformPointCoordinates( - const ArrayPortalUniformPointCoordinates &src) - : Dimensions(src.Dimensions), - NumberOfValues(src.NumberOfValues), - Origin(src.Origin), - Spacing(src.Spacing) - { } + ArrayPortalUniformPointCoordinates(const ArrayPortalUniformPointCoordinates& src) + : Dimensions(src.Dimensions) + , NumberOfValues(src.NumberOfValues) + , Origin(src.Origin) + , Spacing(src.Spacing) + { + } VTKM_EXEC_CONT - ArrayPortalUniformPointCoordinates & - operator=(const ArrayPortalUniformPointCoordinates &src) + ArrayPortalUniformPointCoordinates& operator=(const ArrayPortalUniformPointCoordinates& src) { this->Dimensions = src.Dimensions; this->NumberOfValues = src.NumberOfValues; @@ -70,37 +73,38 @@ public: vtkm::Id GetNumberOfValues() const { return this->NumberOfValues; } VTKM_EXEC_CONT - ValueType Get(vtkm::Id index) const { + ValueType Get(vtkm::Id index) const + { VTKM_ASSERT(index >= 0); VTKM_ASSERT(index < this->GetNumberOfValues()); - return this->Get( - vtkm::Id3(index%this->Dimensions[0], - (index/this->Dimensions[0])%this->Dimensions[1], - index/(this->Dimensions[0]*this->Dimensions[1]))); + return this->Get(vtkm::Id3(index % this->Dimensions[0], + (index / this->Dimensions[0]) % this->Dimensions[1], + index / (this->Dimensions[0] * this->Dimensions[1]))); } VTKM_EXEC_CONT vtkm::Id3 GetRange3() const { return this->Dimensions; } VTKM_EXEC_CONT - ValueType Get(vtkm::Id3 index) const { + ValueType Get(vtkm::Id3 index) const + { VTKM_ASSERT((index[0] >= 0) && (index[1] >= 0) && (index[2] >= 0)); - VTKM_ASSERT((index[0] < this->Dimensions[0]) && - (index[1] < this->Dimensions[1]) && + VTKM_ASSERT((index[0] < this->Dimensions[0]) && (index[1] < this->Dimensions[1]) && (index[2] < this->Dimensions[2])); return ValueType(this->Origin[0] + this->Spacing[0] * static_cast(index[0]), this->Origin[1] + this->Spacing[1] * static_cast(index[1]), - this->Origin[2] + this->Spacing[2] * static_cast(index[2])); + this->Origin[2] + + this->Spacing[2] * static_cast(index[2])); } VTKM_EXEC_CONT - const vtkm::Id3 &GetDimensions() const { return this->Dimensions; } + const vtkm::Id3& GetDimensions() const { return this->Dimensions; } VTKM_EXEC_CONT - const ValueType &GetOrigin() const { return this->Origin; } + const ValueType& GetOrigin() const { return this->Origin; } VTKM_EXEC_CONT - const ValueType &GetSpacing() const { return this->Spacing; } + const ValueType& GetSpacing() const { return this->Spacing; } private: vtkm::Id3 Dimensions; @@ -108,7 +112,6 @@ private: ValueType Origin; ValueType Spacing; }; - } } // namespace vtkm::internal diff --git a/vtkm/internal/ArrayPortalValueReference.h b/vtkm/internal/ArrayPortalValueReference.h index fbe0a4d19..97a51a9b7 100644 --- a/vtkm/internal/ArrayPortalValueReference.h +++ b/vtkm/internal/ArrayPortalValueReference.h @@ -24,8 +24,10 @@ #include #include -namespace vtkm { -namespace internal { +namespace vtkm +{ +namespace internal +{ /// \brief A value class for returning setable values of an ArrayPortal /// @@ -42,18 +44,21 @@ namespace internal { /// set this reference object to a new value, it will call \c Set on the /// \c ArrayPortal to insert the value into the array. /// -template +template struct ArrayPortalValueReference { using ValueType = typename ArrayPortalType::ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalValueReference(const ArrayPortalType &portal, vtkm::Id index) - : Portal(portal), Index(index) { } + ArrayPortalValueReference(const ArrayPortalType& portal, vtkm::Id index) + : Portal(portal) + , Index(index) + { + } VTKM_CONT - void Swap( ArrayPortalValueReference &rhs ) throw() + void Swap(ArrayPortalValueReference& rhs) throw() { //we need use the explicit type not a proxy temp object //A proxy temp object would point to the same underlying data structure @@ -65,8 +70,8 @@ struct ArrayPortalValueReference VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - ArrayPortalValueReference &operator=( - const ArrayPortalValueReference &rhs) + ArrayPortalValueReference& operator=( + const ArrayPortalValueReference& rhs) { this->Portal.Set(this->Index, rhs.Portal.Get(rhs.Index)); return *this; @@ -82,42 +87,40 @@ struct ArrayPortalValueReference VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT - operator ValueType(void) const - { - return this->Portal.Get(this->Index); - } + operator ValueType(void) const { return this->Portal.Get(this->Index); } const ArrayPortalType& Portal; vtkm::Id Index; }; - //implement a custom swap function, since the std::swap won't work //since we return RValues instead of Lvalues -template -void swap( vtkm::internal::ArrayPortalValueReference a, - vtkm::internal::ArrayPortalValueReference b) +template +void swap(vtkm::internal::ArrayPortalValueReference a, + vtkm::internal::ArrayPortalValueReference b) { a.Swap(b); } - } } // namespace vtkm::internal -namespace vtkm { +namespace vtkm +{ // Make specialization for TypeTraits and VecTraits so that the reference // behaves the same as the value. -template -struct TypeTraits > - : vtkm::TypeTraits::ValueType> -{ }; +template +struct TypeTraits> + : vtkm::TypeTraits::ValueType> +{ +}; -template -struct VecTraits > - : vtkm::VecTraits::ValueType> -{ }; +template +struct VecTraits> + : vtkm::VecTraits::ValueType> +{ +}; } // namespace vtkm diff --git a/vtkm/internal/Assume.h b/vtkm/internal/Assume.h index d38e7f05b..f43ca5918 100644 --- a/vtkm/internal/Assume.h +++ b/vtkm/internal/Assume.h @@ -20,7 +20,6 @@ #ifndef vtk_m_internal_Assume_h #define vtk_m_internal_Assume_h - #include // Description: @@ -35,34 +34,38 @@ // assert that only valid cell types will be used, producing more efficient // code. // -#define VTKM_ASSUME(cond) \ - VTKM_SWALLOW_SEMICOLON_PRE_BLOCK \ - { \ - const bool c = cond; \ - VTKM_ASSERT("Bad assumption in VTKM_ASSUME: " #cond && c); \ - VTKM_ASSUME_IMPL(c); \ - (void)c; /* Prevents unused var warnings */ \ - } \ +#define VTKM_ASSUME(cond) \ + VTKM_SWALLOW_SEMICOLON_PRE_BLOCK \ + { \ + const bool c = cond; \ + VTKM_ASSERT("Bad assumption in VTKM_ASSUME: " #cond&& c); \ + VTKM_ASSUME_IMPL(c); \ + (void)c; /* Prevents unused var warnings */ \ + } \ VTKM_SWALLOW_SEMICOLON_POST_BLOCK // VTKM_ASSUME_IMPL is compiler-specific: #if defined(__CUDA_ARCH__) - //For all versions of CUDA this is a no-op while we look - //for a CUDA asm snippet that replicates this kind of behavior - #define VTKM_ASSUME_IMPL(cond) (void)0 /* no-op */ +//For all versions of CUDA this is a no-op while we look +//for a CUDA asm snippet that replicates this kind of behavior +#define VTKM_ASSUME_IMPL(cond) (void)0 /* no-op */ #else #if defined(VTKM_MSVC) -# define VTKM_ASSUME_IMPL(cond) __assume(cond) +#define VTKM_ASSUME_IMPL(cond) __assume(cond) #elif defined(VTKM_ICC) -# define VTKM_ASSUME_IMPL(cond) __assume(cond) -#elif defined(VTKM_GCC) && ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) ) +#define VTKM_ASSUME_IMPL(cond) __assume(cond) +#elif defined(VTKM_GCC) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) // Added in 4.5.0: -# define VTKM_ASSUME_IMPL(cond) if (!(cond)) __builtin_unreachable() +#define VTKM_ASSUME_IMPL(cond) \ + if (!(cond)) \ + __builtin_unreachable() #elif defined(VTKM_CLANG) -# define VTKM_ASSUME_IMPL(cond) if (!(cond)) __builtin_unreachable() +#define VTKM_ASSUME_IMPL(cond) \ + if (!(cond)) \ + __builtin_unreachable() #else -# define VTKM_ASSUME_IMPL(cond) (void)0 /* no-op */ +#define VTKM_ASSUME_IMPL(cond) (void)0 /* no-op */ #endif #endif diff --git a/vtkm/internal/ConfigureFor32.h b/vtkm/internal/ConfigureFor32.h index 16476e118..65628c908 100644 --- a/vtkm/internal/ConfigureFor32.h +++ b/vtkm/internal/ConfigureFor32.h @@ -23,7 +23,7 @@ //need to be included look at vtkm/internal/Configure.h for all defines that //you can over-ride. #ifdef vtk_m_internal_Configure_h -# error Incorrect header order. Include this header before any other VTKm headers. +#error Incorrect header order. Include this header before any other VTKm headers. #endif #ifndef vtk_m_internal_Configure32_h diff --git a/vtkm/internal/ConfigureFor64.h b/vtkm/internal/ConfigureFor64.h index 6c935db03..1573edb8f 100644 --- a/vtkm/internal/ConfigureFor64.h +++ b/vtkm/internal/ConfigureFor64.h @@ -23,7 +23,7 @@ //need to be included look at vtkm/internal/Configure.h for all defines that //you can over-ride. #ifdef vtk_m_internal_Configure_h -# error Incorrect header order. Include this header before any other VTKm headers. +#error Incorrect header order. Include this header before any other VTKm headers. #endif #ifndef vtk_m_internal_Configure32_h diff --git a/vtkm/internal/ConnectivityStructuredInternals.h b/vtkm/internal/ConnectivityStructuredInternals.h index e5d08e298..d43950efb 100644 --- a/vtkm/internal/ConnectivityStructuredInternals.h +++ b/vtkm/internal/ConnectivityStructuredInternals.h @@ -27,35 +27,29 @@ #include #include -namespace vtkm { -namespace internal { +namespace vtkm +{ +namespace internal +{ -template class ConnectivityStructuredInternals; +template +class ConnectivityStructuredInternals; //1 D specialization. -template<> +template <> class ConnectivityStructuredInternals<1> { public: typedef vtkm::Id SchedulingRangeType; VTKM_EXEC_CONT - void SetPointDimensions(vtkm::Id dimensions) - { - this->PointDimensions = dimensions; - } + void SetPointDimensions(vtkm::Id dimensions) { this->PointDimensions = dimensions; } VTKM_EXEC_CONT - vtkm::Id GetPointDimensions() const - { - return this->PointDimensions; - } + vtkm::Id GetPointDimensions() const { return this->PointDimensions; } VTKM_EXEC_CONT - vtkm::Id GetCellDimensions() const - { - return this->PointDimensions - 1; - } + vtkm::Id GetCellDimensions() const { return this->PointDimensions - 1; } VTKM_EXEC_CONT SchedulingRangeType GetSchedulingRange(vtkm::TopologyElementTagCell) const @@ -73,36 +67,35 @@ public: static const vtkm::IdComponent MAX_CELL_TO_POINT = 2; VTKM_EXEC_CONT - vtkm::Id GetNumberOfPoints() const {return this->PointDimensions;} + vtkm::Id GetNumberOfPoints() const { return this->PointDimensions; } VTKM_EXEC_CONT - vtkm::Id GetNumberOfCells() const {return this->PointDimensions-1;} + vtkm::Id GetNumberOfCells() const { return this->PointDimensions - 1; } VTKM_EXEC_CONT - vtkm::IdComponent GetNumberOfPointsInCell() const {return NUM_POINTS_IN_CELL;} + vtkm::IdComponent GetNumberOfPointsInCell() const { return NUM_POINTS_IN_CELL; } VTKM_EXEC_CONT - vtkm::IdComponent GetCellShape() const {return vtkm::CELL_SHAPE_LINE;} + vtkm::IdComponent GetCellShape() const { return vtkm::CELL_SHAPE_LINE; } typedef vtkm::CellShapeTagLine CellShapeTag; VTKM_EXEC_CONT - vtkm::Vec GetPointsOfCell(vtkm::Id index) const + vtkm::Vec GetPointsOfCell(vtkm::Id index) const { - vtkm::Vec pointIds; + vtkm::Vec pointIds; pointIds[0] = index; pointIds[1] = pointIds[0] + 1; return pointIds; } VTKM_EXEC_CONT - vtkm::VecVariable - GetCellsOfPoint(vtkm::Id index) const + vtkm::VecVariable GetCellsOfPoint(vtkm::Id index) const { - vtkm::VecVariable cellIds; + vtkm::VecVariable cellIds; if (index > 0) { - cellIds.Append(index-1); + cellIds.Append(index - 1); } - if (index < this->PointDimensions-1) + if (index < this->PointDimensions - 1) { cellIds.Append(index); } @@ -111,35 +104,23 @@ public: } VTKM_EXEC_CONT - vtkm::Id FlatToLogicalPointIndex(vtkm::Id flatPointIndex) const - { - return flatPointIndex; - } + vtkm::Id FlatToLogicalPointIndex(vtkm::Id flatPointIndex) const { return flatPointIndex; } VTKM_EXEC_CONT - vtkm::Id LogicalToFlatPointIndex(vtkm::Id logicalPointIndex) const - { - return logicalPointIndex; - } + vtkm::Id LogicalToFlatPointIndex(vtkm::Id logicalPointIndex) const { return logicalPointIndex; } VTKM_EXEC_CONT - vtkm::Id FlatToLogicalCellIndex(vtkm::Id flatCellIndex) const - { - return flatCellIndex; - } + vtkm::Id FlatToLogicalCellIndex(vtkm::Id flatCellIndex) const { return flatCellIndex; } VTKM_EXEC_CONT - vtkm::Id LogicalToFlatCellIndex(vtkm::Id logicalCellIndex) const - { - return logicalCellIndex; - } + vtkm::Id LogicalToFlatCellIndex(vtkm::Id logicalCellIndex) const { return logicalCellIndex; } VTKM_CONT - void PrintSummary(std::ostream &out) const + void PrintSummary(std::ostream& out) const { - out<<" UniformConnectivity<1> "; - out<<"this->PointDimensions["<PointDimensions<<"] "; - out<<"\n"; + out << " UniformConnectivity<1> "; + out << "this->PointDimensions[" << this->PointDimensions << "] "; + out << "\n"; } private: @@ -147,40 +128,33 @@ private: }; //2 D specialization. -template<> +template <> class ConnectivityStructuredInternals<2> { public: typedef vtkm::Id2 SchedulingRangeType; VTKM_EXEC_CONT - void SetPointDimensions(vtkm::Id2 dims) - { - this->PointDimensions = dims; - } + void SetPointDimensions(vtkm::Id2 dims) { this->PointDimensions = dims; } VTKM_EXEC_CONT - const vtkm::Id2 &GetPointDimensions() const { - return this->PointDimensions; - } + const vtkm::Id2& GetPointDimensions() const { return this->PointDimensions; } VTKM_EXEC_CONT - vtkm::Id2 GetCellDimensions() const { - return this->PointDimensions - vtkm::Id2(1); - } + vtkm::Id2 GetCellDimensions() const { return this->PointDimensions - vtkm::Id2(1); } VTKM_EXEC_CONT - vtkm::Id GetNumberOfPoints() const { - return vtkm::ReduceProduct(this->GetPointDimensions()); - } + vtkm::Id GetNumberOfPoints() const { return vtkm::ReduceProduct(this->GetPointDimensions()); } //returns an id2 to signal what kind of scheduling to use VTKM_EXEC_CONT - vtkm::Id2 GetSchedulingRange(vtkm::TopologyElementTagCell) const { + vtkm::Id2 GetSchedulingRange(vtkm::TopologyElementTagCell) const + { return this->GetCellDimensions(); } VTKM_EXEC_CONT - vtkm::Id2 GetSchedulingRange(vtkm::TopologyElementTagPoint) const { + vtkm::Id2 GetSchedulingRange(vtkm::TopologyElementTagPoint) const + { return this->GetPointDimensions(); } @@ -188,22 +162,19 @@ public: static const vtkm::IdComponent MAX_CELL_TO_POINT = 4; VTKM_EXEC_CONT - vtkm::Id GetNumberOfCells() const - { - return vtkm::ReduceProduct(this->GetCellDimensions()); - } + vtkm::Id GetNumberOfCells() const { return vtkm::ReduceProduct(this->GetCellDimensions()); } VTKM_EXEC_CONT - vtkm::IdComponent GetNumberOfPointsInCell() const {return NUM_POINTS_IN_CELL;} + vtkm::IdComponent GetNumberOfPointsInCell() const { return NUM_POINTS_IN_CELL; } VTKM_EXEC_CONT vtkm::IdComponent GetCellShape() const { return vtkm::CELL_SHAPE_QUAD; } typedef vtkm::CellShapeTagQuad CellShapeTag; VTKM_EXEC_CONT - vtkm::Vec - GetPointsOfCell(const SchedulingRangeType &logicalCellIndex) const + vtkm::Vec GetPointsOfCell( + const SchedulingRangeType& logicalCellIndex) const { - vtkm::Vec pointIds; + vtkm::Vec pointIds; pointIds[0] = this->LogicalToFlatPointIndex(logicalCellIndex); pointIds[1] = pointIds[0] + 1; pointIds[2] = pointIds[1] + this->PointDimensions[0]; @@ -212,31 +183,30 @@ public: } VTKM_EXEC_CONT - vtkm::Vec - GetPointsOfCell(vtkm::Id cellIndex) const + vtkm::Vec GetPointsOfCell(vtkm::Id cellIndex) const { return this->GetPointsOfCell(this->FlatToLogicalCellIndex(cellIndex)); } VTKM_EXEC_CONT - vtkm::VecVariable - GetCellsOfPoint(const SchedulingRangeType &ij) const + vtkm::VecVariable GetCellsOfPoint( + const SchedulingRangeType& ij) const { - vtkm::VecVariable cellIds; + vtkm::VecVariable cellIds; if ((ij[0] > 0) && (ij[1] > 0)) { - cellIds.Append(this->LogicalToFlatCellIndex(ij - vtkm::Id2(1,1))); + cellIds.Append(this->LogicalToFlatCellIndex(ij - vtkm::Id2(1, 1))); } - if ((ij[0] < this->PointDimensions[0]-1) && (ij[1] > 0)) + if ((ij[0] < this->PointDimensions[0] - 1) && (ij[1] > 0)) { - cellIds.Append(this->LogicalToFlatCellIndex(ij - vtkm::Id2(0,1))); + cellIds.Append(this->LogicalToFlatCellIndex(ij - vtkm::Id2(0, 1))); } - if ((ij[0] > 0) && (ij[1] < this->PointDimensions[1]-1)) + if ((ij[0] > 0) && (ij[1] < this->PointDimensions[1] - 1)) { - cellIds.Append(this->LogicalToFlatCellIndex(ij - vtkm::Id2(1,0))); + cellIds.Append(this->LogicalToFlatCellIndex(ij - vtkm::Id2(1, 0))); } - if ((ij[0] < this->PointDimensions[0]-1) && (ij[1] < this->PointDimensions[1]-1)) + if ((ij[0] < this->PointDimensions[0] - 1) && (ij[1] < this->PointDimensions[1] - 1)) { cellIds.Append(this->LogicalToFlatCellIndex(ij)); } @@ -245,8 +215,7 @@ public: } VTKM_EXEC_CONT - vtkm::VecVariable - GetCellsOfPoint(vtkm::Id pointIndex) const + vtkm::VecVariable GetCellsOfPoint(vtkm::Id pointIndex) const { return this->GetCellsOfPoint(this->FlatToLogicalPointIndex(pointIndex)); } @@ -261,10 +230,9 @@ public: } VTKM_EXEC_CONT - vtkm::Id LogicalToFlatPointIndex(const vtkm::Id2 &logicalPointIndex) const + vtkm::Id LogicalToFlatPointIndex(const vtkm::Id2& logicalPointIndex) const { - return logicalPointIndex[0] - + this->PointDimensions[0]*logicalPointIndex[1]; + return logicalPointIndex[0] + this->PointDimensions[0] * logicalPointIndex[1]; } VTKM_EXEC_CONT @@ -278,19 +246,18 @@ public: } VTKM_EXEC_CONT - vtkm::Id LogicalToFlatCellIndex(const vtkm::Id2 &logicalCellIndex) const + vtkm::Id LogicalToFlatCellIndex(const vtkm::Id2& logicalCellIndex) const { vtkm::Id2 cellDimensions = this->GetCellDimensions(); - return logicalCellIndex[0] - + cellDimensions[0]*logicalCellIndex[1]; + return logicalCellIndex[0] + cellDimensions[0] * logicalCellIndex[1]; } VTKM_CONT - void PrintSummary(std::ostream &out) const + void PrintSummary(std::ostream& out) const { - out<<" UniformConnectivity<2> "; - out<<"pointDim["<PointDimensions[0]<<" "<PointDimensions[1]<<"] "; - out< "; + out << "pointDim[" << this->PointDimensions[0] << " " << this->PointDimensions[1] << "] "; + out << std::endl; } private: @@ -298,7 +265,7 @@ private: }; //3 D specialization. -template<> +template <> class ConnectivityStructuredInternals<3> { public: @@ -309,34 +276,27 @@ public: { this->PointDimensions = dims; this->CellDimensions = dims - vtkm::Id3(1); - this->CellDim01 = (dims[0]-1) * (dims[1]-1); + this->CellDim01 = (dims[0] - 1) * (dims[1] - 1); } VTKM_EXEC_CONT - const vtkm::Id3& GetPointDimensions() const - { - return this->PointDimensions; - } + const vtkm::Id3& GetPointDimensions() const { return this->PointDimensions; } VTKM_EXEC_CONT - const vtkm::Id3& GetCellDimensions() const - { - return this->CellDimensions; - } + const vtkm::Id3& GetCellDimensions() const { return this->CellDimensions; } VTKM_EXEC_CONT - vtkm::Id GetNumberOfPoints() const - { - return vtkm::ReduceProduct(this->PointDimensions); - } + vtkm::Id GetNumberOfPoints() const { return vtkm::ReduceProduct(this->PointDimensions); } //returns an id3 to signal what kind of scheduling to use VTKM_EXEC_CONT - const vtkm::Id3& GetSchedulingRange(vtkm::TopologyElementTagCell) const { + const vtkm::Id3& GetSchedulingRange(vtkm::TopologyElementTagCell) const + { return this->GetCellDimensions(); } VTKM_EXEC_CONT - const vtkm::Id3& GetSchedulingRange(vtkm::TopologyElementTagPoint) const { + const vtkm::Id3& GetSchedulingRange(vtkm::TopologyElementTagPoint) const + { return this->GetPointDimensions(); } @@ -344,27 +304,23 @@ public: static const vtkm::IdComponent MAX_CELL_TO_POINT = 8; VTKM_EXEC_CONT - vtkm::Id GetNumberOfCells() const - { - return vtkm::ReduceProduct(this->GetCellDimensions()); - } + vtkm::Id GetNumberOfCells() const { return vtkm::ReduceProduct(this->GetCellDimensions()); } VTKM_EXEC_CONT - vtkm::IdComponent GetNumberOfPointsInCell() const {return NUM_POINTS_IN_CELL;} + vtkm::IdComponent GetNumberOfPointsInCell() const { return NUM_POINTS_IN_CELL; } VTKM_EXEC_CONT vtkm::IdComponent GetCellShape() const { return vtkm::CELL_SHAPE_HEXAHEDRON; } typedef vtkm::CellShapeTagHexahedron CellShapeTag; VTKM_EXEC_CONT - vtkm::Vec - GetPointsOfCell(const SchedulingRangeType &ijk) const + vtkm::Vec GetPointsOfCell(const SchedulingRangeType& ijk) const { - vtkm::Vec pointIds; + vtkm::Vec pointIds; pointIds[0] = (ijk[2] * this->PointDimensions[1] + ijk[1]) * this->PointDimensions[0] + ijk[0]; pointIds[1] = pointIds[0] + 1; pointIds[2] = pointIds[1] + this->PointDimensions[0]; pointIds[3] = pointIds[2] - 1; - pointIds[4] = pointIds[0] + this->PointDimensions[0]*this->PointDimensions[1]; + pointIds[4] = pointIds[0] + this->PointDimensions[0] * this->PointDimensions[1]; pointIds[5] = pointIds[4] + 1; pointIds[6] = pointIds[5] + this->PointDimensions[0]; pointIds[7] = pointIds[6] - 1; @@ -373,56 +329,51 @@ public: } VTKM_EXEC_CONT - vtkm::Vec - GetPointsOfCell(vtkm::Id cellIndex) const + vtkm::Vec GetPointsOfCell(vtkm::Id cellIndex) const { return this->GetPointsOfCell(this->FlatToLogicalCellIndex(cellIndex)); } VTKM_EXEC_CONT - vtkm::VecVariable - GetCellsOfPoint(const SchedulingRangeType &ijk) const + vtkm::VecVariable GetCellsOfPoint( + const SchedulingRangeType& ijk) const { - vtkm::VecVariable cellIds; + vtkm::VecVariable cellIds; if ((ijk[0] > 0) && (ijk[1] > 0) && (ijk[2] > 0)) { - cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(1,1,1))); + cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(1, 1, 1))); } - if ((ijk[0] < this->PointDimensions[0]-1) && (ijk[1] > 0) && (ijk[2] > 0)) + if ((ijk[0] < this->PointDimensions[0] - 1) && (ijk[1] > 0) && (ijk[2] > 0)) { - cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(0,1,1))); + cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(0, 1, 1))); } - if ((ijk[0] > 0) && (ijk[1] < this->PointDimensions[1]-1) && (ijk[2] > 0)) + if ((ijk[0] > 0) && (ijk[1] < this->PointDimensions[1] - 1) && (ijk[2] > 0)) { - cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(1,0,1))); + cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(1, 0, 1))); } - if ((ijk[0] < this->PointDimensions[0]-1) && - (ijk[1] < this->PointDimensions[1]-1) && + if ((ijk[0] < this->PointDimensions[0] - 1) && (ijk[1] < this->PointDimensions[1] - 1) && (ijk[2] > 0)) { - cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(0,0,1))); + cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(0, 0, 1))); } - if ((ijk[0] > 0) && (ijk[1] > 0) && (ijk[2] < this->PointDimensions[2]-1)) + if ((ijk[0] > 0) && (ijk[1] > 0) && (ijk[2] < this->PointDimensions[2] - 1)) { - cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(1,1,0))); + cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(1, 1, 0))); } - if ((ijk[0] < this->PointDimensions[0]-1) && - (ijk[1] > 0) && - (ijk[2] < this->PointDimensions[2]-1)) + if ((ijk[0] < this->PointDimensions[0] - 1) && (ijk[1] > 0) && + (ijk[2] < this->PointDimensions[2] - 1)) { - cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(0,1,0))); + cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(0, 1, 0))); } - if ((ijk[0] > 0) && - (ijk[1] < this->PointDimensions[1]-1) && - (ijk[2] < this->PointDimensions[2]-1)) + if ((ijk[0] > 0) && (ijk[1] < this->PointDimensions[1] - 1) && + (ijk[2] < this->PointDimensions[2] - 1)) { - cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(1,0,0))); + cellIds.Append(this->LogicalToFlatCellIndex(ijk - vtkm::Id3(1, 0, 0))); } - if ((ijk[0] < this->PointDimensions[0]-1) && - (ijk[1] < this->PointDimensions[1]-1) && - (ijk[2] < this->PointDimensions[2]-1)) + if ((ijk[0] < this->PointDimensions[0] - 1) && (ijk[1] < this->PointDimensions[1] - 1) && + (ijk[2] < this->PointDimensions[2] - 1)) { cellIds.Append(this->LogicalToFlatCellIndex(ijk)); } @@ -431,18 +382,18 @@ public: } VTKM_EXEC_CONT - vtkm::VecVariable - GetCellsOfPoint(vtkm::Id pointIndex) const + vtkm::VecVariable GetCellsOfPoint(vtkm::Id pointIndex) const { return this->GetCellsOfPoint(this->FlatToLogicalPointIndex(pointIndex)); } VTKM_CONT - void PrintSummary(std::ostream &out) const + void PrintSummary(std::ostream& out) const { - out<<" UniformConnectivity<3> "; - out<<"pointDim["<PointDimensions[0]<<" "<PointDimensions[1]<<" "<PointDimensions[2]<<"] "; - out< "; + out << "pointDim[" << this->PointDimensions[0] << " " << this->PointDimensions[1] << " " + << this->PointDimensions[2] << "] "; + out << std::endl; } VTKM_EXEC_CONT @@ -451,47 +402,44 @@ public: const vtkm::Id pointDims01 = this->PointDimensions[0] * this->PointDimensions[1]; const vtkm::Id indexij = flatPointIndex % pointDims01; - return vtkm::Id3(indexij % this->PointDimensions[0], - indexij / this->PointDimensions[0], + return vtkm::Id3(indexij % this->PointDimensions[0], indexij / this->PointDimensions[0], flatPointIndex / pointDims01); } VTKM_EXEC_CONT - vtkm::Id LogicalToFlatPointIndex(const vtkm::Id3 &logicalPointIndex) const + vtkm::Id LogicalToFlatPointIndex(const vtkm::Id3& logicalPointIndex) const { - return logicalPointIndex[0] - + this->PointDimensions[0]*(logicalPointIndex[1] - + this->PointDimensions[1]*logicalPointIndex[2]); + return logicalPointIndex[0] + + this->PointDimensions[0] * + (logicalPointIndex[1] + this->PointDimensions[1] * logicalPointIndex[2]); } VTKM_EXEC_CONT vtkm::Id3 FlatToLogicalCellIndex(vtkm::Id flatCellIndex) const { const vtkm::Id indexij = flatCellIndex % this->CellDim01; - return vtkm::Id3(indexij % this->CellDimensions[0], - indexij / this->CellDimensions[0], - flatCellIndex / this->CellDim01 - ); + return vtkm::Id3(indexij % this->CellDimensions[0], indexij / this->CellDimensions[0], + flatCellIndex / this->CellDim01); } VTKM_EXEC_CONT - vtkm::Id LogicalToFlatCellIndex(const vtkm::Id3 &logicalCellIndex) const + vtkm::Id LogicalToFlatCellIndex(const vtkm::Id3& logicalCellIndex) const { - return logicalCellIndex[0] - + this->CellDimensions[0]*(logicalCellIndex[1] - + this->CellDimensions[1]*logicalCellIndex[2]); + return logicalCellIndex[0] + + this->CellDimensions[0] * + (logicalCellIndex[1] + this->CellDimensions[1] * logicalCellIndex[2]); } private: vtkm::Id3 PointDimensions; vtkm::Id3 CellDimensions; - vtkm::Id CellDim01; + vtkm::Id CellDim01; }; // We may want to generalize this class depending on how ConnectivityExplicit // eventually handles retrieving cell to point connectivity. -template +template struct ConnectivityStructuredIndexHelper { // We want an unconditional failure if this unspecialized class ever gets @@ -502,109 +450,95 @@ struct ConnectivityStructuredIndexHelper "Missing Specialization for Topologies"); }; -template -struct ConnectivityStructuredIndexHelper< - vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, Dimension> +template +struct ConnectivityStructuredIndexHelper { - typedef vtkm::internal::ConnectivityStructuredInternals - ConnectivityType; + typedef vtkm::internal::ConnectivityStructuredInternals ConnectivityType; typedef typename ConnectivityType::SchedulingRangeType LogicalIndexType; - typedef vtkm::Vec IndicesType; + typedef vtkm::Vec IndicesType; - template - VTKM_EXEC_CONT - static IndicesType GetIndices(const ConnectivityType &connectivity, - const IndexType &cellIndex) + template + VTKM_EXEC_CONT static IndicesType GetIndices(const ConnectivityType& connectivity, + const IndexType& cellIndex) { return connectivity.GetPointsOfCell(cellIndex); } VTKM_EXEC_CONT - static LogicalIndexType - FlatToLogicalFromIndex(const ConnectivityType &connectivity, - vtkm::Id flatFromIndex) + static LogicalIndexType FlatToLogicalFromIndex(const ConnectivityType& connectivity, + vtkm::Id flatFromIndex) { return connectivity.FlatToLogicalPointIndex(flatFromIndex); } VTKM_EXEC_CONT - static vtkm::Id - LogicalToFlatFromIndex(const ConnectivityType &connectivity, - const LogicalIndexType &logicalFromIndex) + static vtkm::Id LogicalToFlatFromIndex(const ConnectivityType& connectivity, + const LogicalIndexType& logicalFromIndex) { return connectivity.LogicalToFlatPointIndex(logicalFromIndex); } VTKM_EXEC_CONT - static LogicalIndexType - FlatToLogicalToIndex(const ConnectivityType &connectivity, - vtkm::Id flatToIndex) + static LogicalIndexType FlatToLogicalToIndex(const ConnectivityType& connectivity, + vtkm::Id flatToIndex) { return connectivity.FlatToLogicalCellIndex(flatToIndex); } VTKM_EXEC_CONT - static vtkm::Id - LogicalToFlatToIndex(const ConnectivityType &connectivity, - const LogicalIndexType &logicalToIndex) + static vtkm::Id LogicalToFlatToIndex(const ConnectivityType& connectivity, + const LogicalIndexType& logicalToIndex) { return connectivity.LogicalToFlatCellIndex(logicalToIndex); } }; -template -struct ConnectivityStructuredIndexHelper< - vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint, Dimension> +template +struct ConnectivityStructuredIndexHelper { - typedef vtkm::internal::ConnectivityStructuredInternals - ConnectivityType; + typedef vtkm::internal::ConnectivityStructuredInternals ConnectivityType; typedef typename ConnectivityType::SchedulingRangeType LogicalIndexType; - typedef vtkm::VecVariable - IndicesType; + typedef vtkm::VecVariable IndicesType; - template - VTKM_EXEC_CONT - static IndicesType GetIndices(const ConnectivityType &connectivity, - const IndexType &pointIndex) + template + VTKM_EXEC_CONT static IndicesType GetIndices(const ConnectivityType& connectivity, + const IndexType& pointIndex) { return connectivity.GetCellsOfPoint(pointIndex); } VTKM_EXEC_CONT - static LogicalIndexType - FlatToLogicalFromIndex(const ConnectivityType &connectivity, - vtkm::Id flatFromIndex) + static LogicalIndexType FlatToLogicalFromIndex(const ConnectivityType& connectivity, + vtkm::Id flatFromIndex) { return connectivity.FlatToLogicalCellIndex(flatFromIndex); } VTKM_EXEC_CONT - static vtkm::Id - LogicalToFlatFromIndex(const ConnectivityType &connectivity, - const LogicalIndexType &logicalFromIndex) + static vtkm::Id LogicalToFlatFromIndex(const ConnectivityType& connectivity, + const LogicalIndexType& logicalFromIndex) { return connectivity.LogicalToFlatCellIndex(logicalFromIndex); } VTKM_EXEC_CONT - static LogicalIndexType - FlatToLogicalToIndex(const ConnectivityType &connectivity, - vtkm::Id flatToIndex) + static LogicalIndexType FlatToLogicalToIndex(const ConnectivityType& connectivity, + vtkm::Id flatToIndex) { return connectivity.FlatToLogicalPointIndex(flatToIndex); } VTKM_EXEC_CONT - static vtkm::Id - LogicalToFlatToIndex(const ConnectivityType &connectivity, - const LogicalIndexType &logicalToIndex) + static vtkm::Id LogicalToFlatToIndex(const ConnectivityType& connectivity, + const LogicalIndexType& logicalToIndex) { return connectivity.LogicalToFlatPointIndex(logicalToIndex); } }; - } } // namespace vtkm::internal diff --git a/vtkm/internal/ExportMacros.h b/vtkm/internal/ExportMacros.h index 651d96f68..54adc9f43 100644 --- a/vtkm/internal/ExportMacros.h +++ b/vtkm/internal/ExportMacros.h @@ -30,9 +30,9 @@ #define VTKM_EXEC __device__ __host__ #define VTKM_EXEC_CONT __device__ __host__ #if __CUDAVER__ >= 75000 -# define VTKM_SUPPRESS_EXEC_WARNINGS #pragma nv_exec_check_disable +#define VTKM_SUPPRESS_EXEC_WARNINGS #pragma nv_exec_check_disable #else -# define VTKM_SUPPRESS_EXEC_WARNINGS #pragma hd_warning_disable +#define VTKM_SUPPRESS_EXEC_WARNINGS #pragma hd_warning_disable #endif #define VTKM_EXEC_CONSTANT __device__ __constant__ #else @@ -72,11 +72,11 @@ // - Be a type ( or component of a types signature ) that can be passed between // dynamic libraries and requires RTTI support ( dynamic_cast ). #if defined(VTKM_MSVC) -# define VTKM_ALWAYS_EXPORT -# define VTKM_NEVER_EXPORT +#define VTKM_ALWAYS_EXPORT +#define VTKM_NEVER_EXPORT #else -# define VTKM_ALWAYS_EXPORT __attribute__((visibility("default"))) -# define VTKM_NEVER_EXPORT __attribute__((visibility("hidden"))) +#define VTKM_ALWAYS_EXPORT __attribute__((visibility("default"))) +#define VTKM_NEVER_EXPORT __attribute__((visibility("hidden"))) #endif // constexpr support was added to VisualStudio 2015 and above. So this makes @@ -96,11 +96,9 @@ // http://stackoverflow.com/questions/24511376). These macros will silence the // warning for classes defined within them. #ifdef VTKM_CLANG -#define VTKM_SILENCE_WEAK_VTABLE_WARNING_START \ - _Pragma("clang diagnostic push") \ - _Pragma("clang diagnostic ignored \"-Wweak-vtables\"") -#define VTKM_SILENCE_WEAK_VTABLE_WARNING_END \ - _Pragma("clang diagnostic pop") +#define VTKM_SILENCE_WEAK_VTABLE_WARNING_START \ + _Pragma("clang diagnostic push") _Pragma("clang diagnostic ignored \"-Wweak-vtables\"") +#define VTKM_SILENCE_WEAK_VTABLE_WARNING_END _Pragma("clang diagnostic pop") #else // VTKM_CLANG #define VTKM_SILENCE_WEAK_VTABLE_WARNING_START #define VTKM_SILENCE_WEAK_VTABLE_WARNING_END diff --git a/vtkm/internal/FunctionInterface.h b/vtkm/internal/FunctionInterface.h index 91f507864..6080cd0b6 100644 --- a/vtkm/internal/FunctionInterface.h +++ b/vtkm/internal/FunctionInterface.h @@ -27,61 +27,66 @@ #include -namespace vtkm { -namespace internal { +namespace vtkm +{ +namespace internal +{ -namespace detail { +namespace detail +{ -struct IdentityFunctor { - template - VTKM_EXEC_CONT - T &operator()(T &x) const { return x; } +struct IdentityFunctor +{ + template + VTKM_EXEC_CONT T& operator()(T& x) const + { + return x; + } - template - VTKM_EXEC_CONT - const T &operator()(const T &x) const { return x; } + template + VTKM_EXEC_CONT const T& operator()(const T& x) const + { + return x; + } }; // These functions exist to help copy components of a FunctionInterface. -template -struct FunctionInterfaceMoveParameters { +template +struct FunctionInterfaceMoveParameters +{ VTKM_SUPPRESS_EXEC_WARNINGS - template - static - VTKM_EXEC_CONT - void Move(vtkm::internal::detail::ParameterContainer &dest, - const vtkm::internal::detail::ParameterContainer &src) + template + static VTKM_EXEC_CONT void Move( + vtkm::internal::detail::ParameterContainer& dest, + const vtkm::internal::detail::ParameterContainer& src) { ParameterContainerAccess pca; // using forwarding_type = typename AtType::type; - pca.Move( dest, src ); - // std::forward(pca.Get(src)) ); - // pca.Get(src)); - FunctionInterfaceMoveParameters::Move(dest, src); + pca.Move(dest, src); + // std::forward(pca.Get(src)) ); + // pca.Get(src)); + FunctionInterfaceMoveParameters::Move(dest, src); } }; -template -struct FunctionInterfaceMoveParameters<0, ParameterIndex> { - template - static - VTKM_EXEC_CONT - void Move(vtkm::internal::detail::ParameterContainer &, - const vtkm::internal::detail::ParameterContainer &) +template +struct FunctionInterfaceMoveParameters<0, ParameterIndex> +{ + template + static VTKM_EXEC_CONT void Move(vtkm::internal::detail::ParameterContainer&, + const vtkm::internal::detail::ParameterContainer&) { // Nothing left to move. } }; -template +template struct FunctionInterfaceStaticTransformType; -template +template class FunctionInterfaceDynamicTransformContContinue; } // namespace detail @@ -220,21 +225,20 @@ class FunctionInterfaceDynamicTransformContContinue; /// resolution to run time. See the documentation for each of these methods for /// details on how they are used. /// -template +template class FunctionInterface { - template + template friend class FunctionInterface; public: typedef FunctionSignature Signature; VTKM_SUPPRESS_EXEC_WARNINGS - FunctionInterface(): - Result(), - Parameters() + FunctionInterface() + : Result() + , Parameters() { - } // the number of parameters as an integral constant @@ -244,9 +248,10 @@ public: typedef typename SigInfo::Components ComponentSig; typedef typename SigInfo::Parameters ParameterSig; - template - struct ParameterType { - typedef typename detail::AtType::type type; + template + struct ParameterType + { + typedef typename detail::AtType::type type; }; static const bool RETURN_VALID = FunctionInterfaceReturnContainer::VALID; @@ -275,15 +280,12 @@ public: /// simplify templated programming. /// VTKM_EXEC_CONT - const FunctionInterfaceReturnContainer &GetReturnValueSafe() const + const FunctionInterfaceReturnContainer& GetReturnValueSafe() const { return this->Result; } VTKM_EXEC_CONT - FunctionInterfaceReturnContainer &GetReturnValueSafe() - { - return this->Result; - } + FunctionInterfaceReturnContainer& GetReturnValueSafe() { return this->Result; } /// Gets the value for the parameter of the given index. Parameters are /// indexed starting at 1. To use this method you have to specify a static, @@ -315,12 +317,10 @@ public: /// } /// \endcode /// - template - VTKM_EXEC_CONT - const typename ParameterType::type & - GetParameter( - vtkm::internal::IndexTag = - vtkm::internal::IndexTag()) const { + template + VTKM_EXEC_CONT const typename ParameterType::type& GetParameter( + vtkm::internal::IndexTag = vtkm::internal::IndexTag()) const + { return (detail::ParameterContainerAccess()).Get(this->Parameters); } @@ -361,12 +361,10 @@ public: /// template (which is almost always the case), then you will have to use the /// template keyword. /// - template - VTKM_EXEC_CONT - void SetParameter( - const typename ParameterType::type& parameter, - vtkm::internal::IndexTag = - vtkm::internal::IndexTag()) + template + VTKM_EXEC_CONT void SetParameter( + const typename ParameterType::type& parameter, + vtkm::internal::IndexTag = vtkm::internal::IndexTag()) { return (detail::ParameterContainerAccess()).Set(this->Parameters, parameter); } @@ -377,19 +375,19 @@ public: /// the same, copies the first N arguments, where N is the smaller arity of /// the two function interfaces. /// - template - void Copy(const FunctionInterface &src) + template + void Copy(const FunctionInterface& src) { this->Result = src.GetReturnValueSafe(); - VTKM_CONSTEXPR vtkm::UInt16 minArity = - (ARITY < FunctionInterface::ARITY) ? - ARITY : FunctionInterface::ARITY; + VTKM_CONSTEXPR vtkm::UInt16 minArity = (ARITY < FunctionInterface::ARITY) + ? ARITY + : FunctionInterface::ARITY; (detail::CopyAllParameters()).Copy(this->Parameters, src.Parameters); } - void Copy(const FunctionInterface &src) + void Copy(const FunctionInterface& src) { //optimized version for assignment/copy this->Result = src.GetReturnValueSafe(); this->Parameters = src.Parameters; @@ -402,37 +400,25 @@ public: /// result of the function call is stored within this FunctionInterface and /// can be retrieved with GetReturnValue(). /// - template - VTKM_CONT - void InvokeCont(const Function &f) { - detail::DoInvokeCont(f, - this->Parameters, - this->Result, - detail::IdentityFunctor()); + template + VTKM_CONT void InvokeCont(const Function& f) + { + detail::DoInvokeCont(f, this->Parameters, this->Result, detail::IdentityFunctor()); } - template - VTKM_CONT - void InvokeCont(Function &f) { - detail::DoInvokeCont(f, - this->Parameters, - this->Result, - detail::IdentityFunctor()); + template + VTKM_CONT void InvokeCont(Function& f) + { + detail::DoInvokeCont(f, this->Parameters, this->Result, detail::IdentityFunctor()); } - template - VTKM_EXEC - void InvokeExec(const Function &f) { - detail::DoInvokeExec(f, - this->Parameters, - this->Result, - detail::IdentityFunctor()); + template + VTKM_EXEC void InvokeExec(const Function& f) + { + detail::DoInvokeExec(f, this->Parameters, this->Result, detail::IdentityFunctor()); } - template - VTKM_EXEC - void InvokeExec(Function &f) { - detail::DoInvokeExec(f, - this->Parameters, - this->Result, - detail::IdentityFunctor()); + template + VTKM_EXEC void InvokeExec(Function& f) + { + detail::DoInvokeExec(f, this->Parameters, this->Result, detail::IdentityFunctor()); } /// Invoke a function \c f using the arguments stored in this @@ -444,32 +430,31 @@ public: /// the function call is also transformed and stored within this /// FunctionInterface and can be retrieved with GetReturnValue(). /// - template - VTKM_CONT - void InvokeCont(const Function &f, const TransformFunctor &transform) { + template + VTKM_CONT void InvokeCont(const Function& f, const TransformFunctor& transform) + { detail::DoInvokeCont(f, this->Parameters, this->Result, transform); } - template - VTKM_CONT - void InvokeCont(Function &f, const TransformFunctor &transform) { + template + VTKM_CONT void InvokeCont(Function& f, const TransformFunctor& transform) + { detail::DoInvokeCont(f, this->Parameters, this->Result, transform); } - template - VTKM_EXEC - void InvokeExec(const Function &f, const TransformFunctor &transform) { + template + VTKM_EXEC void InvokeExec(const Function& f, const TransformFunctor& transform) + { detail::DoInvokeExec(f, this->Parameters, this->Result, transform); } - template - VTKM_EXEC - void InvokeExec(Function &f, const TransformFunctor &transform) { + template + VTKM_EXEC void InvokeExec(Function& f, const TransformFunctor& transform) + { detail::DoInvokeExec(f, this->Parameters, this->Result, transform); } - template + template struct AppendType { - using type = - FunctionInterface::type>; + using type = FunctionInterface::type>; }; /// Returns a new \c FunctionInterface with all the parameters of this \c @@ -477,24 +462,22 @@ public: /// parameters. The return type can be determined with the \c AppendType /// template. /// - template - VTKM_CONT - typename AppendType::type - Append(const NewType& newParameter) const + template + VTKM_CONT typename AppendType::type Append(const NewType& newParameter) const { - typedef typename detail::AppendType::type AppendSignature; + typedef typename detail::AppendType::type AppendSignature; - FunctionInterface< AppendSignature > appendedFuncInterface; + FunctionInterface appendedFuncInterface; appendedFuncInterface.Copy(*this); - appendedFuncInterface.template SetParameter(newParameter); + appendedFuncInterface.template SetParameter(newParameter); return appendedFuncInterface; } - template + template struct ReplaceType { using type = - FunctionInterface < typename detail::ReplaceType::type >; + FunctionInterface::type>; }; /// Returns a new \c FunctionInterface with all the parameters of this \c @@ -534,32 +517,32 @@ public: /// \endcode /// /// - template - VTKM_CONT - typename ReplaceType::type - Replace(const NewType& newParameter, - vtkm::internal::IndexTag = - vtkm::internal::IndexTag()) const + template + VTKM_CONT typename ReplaceType::type Replace( + const NewType& newParameter, + vtkm::internal::IndexTag = vtkm::internal::IndexTag()) const { - typedef typename detail::ReplaceType::type ReplaceSigType; - FunctionInterface< ReplaceSigType > replacedFuncInterface; + typedef + typename detail::ReplaceType::type ReplaceSigType; + FunctionInterface replacedFuncInterface; - detail::FunctionInterfaceMoveParameters:: - Move(replacedFuncInterface.Parameters, this->Parameters); + detail::FunctionInterfaceMoveParameters::Move( + replacedFuncInterface.Parameters, this->Parameters); replacedFuncInterface.template SetParameter(newParameter); - detail::FunctionInterfaceMoveParameters:: - Move(replacedFuncInterface.Parameters, this->Parameters); + detail::FunctionInterfaceMoveParameters::Move( + replacedFuncInterface.Parameters, this->Parameters); return replacedFuncInterface; } - template - struct StaticTransformType { + template + struct StaticTransformType + { typedef FunctionInterface< - typename detail::FunctionInterfaceStaticTransformType< - FunctionSignature,Transform>::type> type; + typename detail::FunctionInterfaceStaticTransformType::type> + type; }; /// \brief Transforms the \c FunctionInterface based on compile-time @@ -607,26 +590,20 @@ public: /// } /// \endcode /// - template - VTKM_CONT - typename StaticTransformType::type - StaticTransformCont(const Transform &transform) const + template + VTKM_CONT typename StaticTransformType::type StaticTransformCont( + const Transform& transform) const { typename StaticTransformType::type newFuncInterface; - detail::DoStaticTransformCont(transform, - this->Parameters, - newFuncInterface.Parameters); + detail::DoStaticTransformCont(transform, this->Parameters, newFuncInterface.Parameters); return newFuncInterface; } - template - VTKM_EXEC - typename StaticTransformType::type - StaticTransformExec(const Transform &transform) const + template + VTKM_EXEC typename StaticTransformType::type StaticTransformExec( + const Transform& transform) const { typename StaticTransformType::type newFuncInterface; - detail::DoStaticTransformExec(transform, - this->Parameters, - newFuncInterface.Parameters); + detail::DoStaticTransformExec(transform, this->Parameters, newFuncInterface.Parameters); return newFuncInterface; } @@ -705,22 +682,20 @@ public: /// transform functor. It is also possible to abort the transform by not /// calling the continue functor. /// - template - VTKM_CONT - void DynamicTransformCont(const TransformFunctor &transform, - const FinishFunctor &finish) const { - typedef detail::FunctionInterfaceDynamicTransformContContinue< - FunctionSignature, - ResultType(), - TransformFunctor, - FinishFunctor> ContinueFunctorType; + template + VTKM_CONT void DynamicTransformCont(const TransformFunctor& transform, + const FinishFunctor& finish) const + { + typedef detail::FunctionInterfaceDynamicTransformContContinue + ContinueFunctorType; FunctionInterface emptyInterface; ContinueFunctorType continueFunctor = - ContinueFunctorType(*this, emptyInterface, transform, finish); + ContinueFunctorType(*this, emptyInterface, transform, finish); continueFunctor.DoNextTransform(emptyInterface); -// this->Result = emptyInterface.GetReturnValueSafe(); + // this->Result = emptyInterface.GetReturnValueSafe(); } /// \brief Applies a function to all the parameters. @@ -731,24 +706,24 @@ public: /// the second argument is an \c IndexTag, which can be used to identify the /// index of the parameter. /// - template - VTKM_CONT - void ForEachCont(const Functor &f) const { + template + VTKM_CONT void ForEachCont(const Functor& f) const + { detail::DoForEachCont(f, this->Parameters); } - template - VTKM_CONT - void ForEachCont(const Functor &f) { + template + VTKM_CONT void ForEachCont(const Functor& f) + { detail::DoForEachCont(f, this->Parameters); } - template - VTKM_EXEC - void ForEachExec(const Functor &f) const { + template + VTKM_EXEC void ForEachExec(const Functor& f) const + { detail::DoForEachExec(f, this->Parameters); } - template - VTKM_EXEC - void ForEachExec(const Functor &f) { + template + VTKM_EXEC void ForEachExec(const Functor& f) + { detail::DoForEachExec(f, this->Parameters); } @@ -757,109 +732,93 @@ private: detail::ParameterContainer Parameters; }; -namespace detail { +namespace detail +{ -template +template class FunctionInterfaceDynamicTransformContContinue { public: FunctionInterfaceDynamicTransformContContinue( - const vtkm::internal::FunctionInterface &originalInterface, - vtkm::internal::FunctionInterface &newInterface, - const TransformFunctor &transform, - const FinishFunctor &finish) - : OriginalInterface(originalInterface), - NewInterface(newInterface), - Transform(transform), - Finish(finish) - { } + const vtkm::internal::FunctionInterface& originalInterface, + vtkm::internal::FunctionInterface& newInterface, const TransformFunctor& transform, + const FinishFunctor& finish) + : OriginalInterface(originalInterface) + , NewInterface(newInterface) + , Transform(transform) + , Finish(finish) + { + } - template - VTKM_CONT - void operator()(const T& newParameter) const + template + VTKM_CONT void operator()(const T& newParameter) const { typedef typename FunctionInterface::ComponentSig NewFSigComp; //Determine if we should do the next transform - using appended = brigand::push_back; + using appended = brigand::push_back; using interfaceSig = typename detail::AsSigType::type; - using NextInterfaceType = FunctionInterface< interfaceSig >; + using NextInterfaceType = FunctionInterface; static VTKM_CONSTEXPR std::size_t newArity = NextInterfaceType::ARITY; static VTKM_CONSTEXPR std::size_t oldArity = detail::FunctionSigInfo::Arity; - typedef std::integral_constant ShouldDoNextTransformType; + typedef std::integral_constant ShouldDoNextTransformType; NextInterfaceType nextInterface = this->NewInterface.Append(newParameter); this->DoNextTransform(nextInterface, ShouldDoNextTransformType()); - this->NewInterface.GetReturnValueSafe() - = nextInterface.GetReturnValueSafe(); + this->NewInterface.GetReturnValueSafe() = nextInterface.GetReturnValueSafe(); } - template - void - DoNextTransform( - vtkm::internal::FunctionInterface &nextInterface) const + template + void DoNextTransform(vtkm::internal::FunctionInterface& nextInterface) const { - typedef FunctionInterfaceDynamicTransformContContinue< - OriginalFunction,NextFunction,TransformFunctor,FinishFunctor> NextContinueType; - NextContinueType nextContinue = NextContinueType(this->OriginalInterface, - nextInterface, - this->Transform, - this->Finish); + typedef FunctionInterfaceDynamicTransformContContinue + NextContinueType; + NextContinueType nextContinue = + NextContinueType(this->OriginalInterface, nextInterface, this->Transform, this->Finish); static const vtkm::IdComponent Index = - vtkm::internal::FunctionInterface::ARITY + 1; + vtkm::internal::FunctionInterface::ARITY + 1; vtkm::internal::IndexTag indexTag; - this->Transform(this->OriginalInterface.GetParameter(indexTag), - nextContinue, - indexTag); + this->Transform(this->OriginalInterface.GetParameter(indexTag), nextContinue, indexTag); } private: - template - void - DoNextTransform( - vtkm::internal::FunctionInterface &nextInterface, - std::true_type) const + template + void DoNextTransform(vtkm::internal::FunctionInterface& nextInterface, + std::true_type) const { - typedef FunctionInterfaceDynamicTransformContContinue< - OriginalFunction,NextFunction,TransformFunctor,FinishFunctor> NextContinueType; - NextContinueType nextContinue = NextContinueType(this->OriginalInterface, - nextInterface, - this->Transform, - this->Finish); + typedef FunctionInterfaceDynamicTransformContContinue + NextContinueType; + NextContinueType nextContinue = + NextContinueType(this->OriginalInterface, nextInterface, this->Transform, this->Finish); static const vtkm::IdComponent Index = - vtkm::internal::FunctionInterface::ARITY + 1; + vtkm::internal::FunctionInterface::ARITY + 1; vtkm::internal::IndexTag indexTag; - this->Transform(this->OriginalInterface.GetParameter(indexTag), - nextContinue, - indexTag); + this->Transform(this->OriginalInterface.GetParameter(indexTag), nextContinue, indexTag); } - template - void - DoNextTransform( - vtkm::internal::FunctionInterface &nextInterface, - std::false_type) const + template + void DoNextTransform(vtkm::internal::FunctionInterface& nextInterface, + std::false_type) const { this->Finish(nextInterface); } private: - const vtkm::internal::FunctionInterface &OriginalInterface; - vtkm::internal::FunctionInterface &NewInterface; - const TransformFunctor &Transform; - const FinishFunctor &Finish; + const vtkm::internal::FunctionInterface& OriginalInterface; + vtkm::internal::FunctionInterface& NewInterface; + const TransformFunctor& Transform; + const FinishFunctor& Finish; - void operator=(const FunctionInterfaceDynamicTransformContContinue &) = delete; + void operator=(const FunctionInterfaceDynamicTransformContContinue< + OriginalFunction, NewFunction, TransformFunctor, FinishFunctor>&) = delete; }; } // namespace detail - } } // namespace vtkm::internal diff --git a/vtkm/internal/IndexTag.h b/vtkm/internal/IndexTag.h index edc244191..1dcbe1ba8 100644 --- a/vtkm/internal/IndexTag.h +++ b/vtkm/internal/IndexTag.h @@ -22,8 +22,10 @@ #include -namespace vtkm { -namespace internal { +namespace vtkm +{ +namespace internal +{ /// \brief A convenience tag to represent static indices. /// @@ -34,12 +36,11 @@ namespace internal { /// resolved through function or method arguments. In such cases, it is /// convenient to use this tag to encapsulate the index. /// -template +template struct IndexTag { static const vtkm::IdComponent INDEX = Index; }; - } } // namespace vtkm::internal diff --git a/vtkm/internal/IntegerSequence.h b/vtkm/internal/IntegerSequence.h index 29d960e92..e30113d61 100644 --- a/vtkm/internal/IntegerSequence.h +++ b/vtkm/internal/IntegerSequence.h @@ -23,58 +23,92 @@ #include -namespace vtkm { -namespace internal { +namespace vtkm +{ +namespace internal +{ /// \brief A container of unsigned integers /// /// C++11 Doesn't provide an IntegerSequence class and helper constructor // So we need to roll our own. This class has been tested up to 512 elements. // -template struct IntegerSequence{}; +template +struct IntegerSequence +{ +}; -namespace detail { +namespace detail +{ -template //unroll in blocks of 4 -struct MakeSeq : MakeSeq {}; +template //unroll in blocks of 4 +struct MakeSeq : MakeSeq +{ +}; -template -struct MakeSeq<0,1,2,3,Is...> //termination case -{ using type = IntegerSequence<0,1,2,3,Is...>; }; +template +struct MakeSeq<0, 1, 2, 3, Is...> //termination case +{ + using type = IntegerSequence<0, 1, 2, 3, Is...>; +}; -template -struct PreMakeSeq : MakeSeq {}; +template +struct PreMakeSeq : MakeSeq +{ +}; -template //specialization for value +1 to divisible by 4 -struct PreMakeSeq<1,N> : MakeSeq {}; +template //specialization for value +1 to divisible by 4 +struct PreMakeSeq<1, N> : MakeSeq +{ +}; -template //specialization for value +2 to divisible by 4 -struct PreMakeSeq<2,N> : MakeSeq {}; +template //specialization for value +2 to divisible by 4 +struct PreMakeSeq<2, N> : MakeSeq +{ +}; -template //specialization for value +3 to divisible by 4 -struct PreMakeSeq<3,N> : MakeSeq {}; +template //specialization for value +3 to divisible by 4 +struct PreMakeSeq<3, N> : MakeSeq +{ +}; -template<> //specialization for 4 -struct PreMakeSeq<4,3> { using type = IntegerSequence<0,1,2,3>; }; +template <> //specialization for 4 +struct PreMakeSeq<4, 3> +{ + using type = IntegerSequence<0, 1, 2, 3>; +}; -template<> //specialization for 3 -struct PreMakeSeq<3,2> { using type = IntegerSequence<0,1,2>; }; +template <> //specialization for 3 +struct PreMakeSeq<3, 2> +{ + using type = IntegerSequence<0, 1, 2>; +}; -template<> //specialization for 2 -struct PreMakeSeq<2,1> { using type = IntegerSequence<0,1>; }; +template <> //specialization for 2 +struct PreMakeSeq<2, 1> +{ + using type = IntegerSequence<0, 1>; +}; -template<> //specialization for 1 -struct PreMakeSeq<1,0> { using type = IntegerSequence<0>; }; +template <> //specialization for 1 +struct PreMakeSeq<1, 0> +{ + using type = IntegerSequence<0>; +}; -template<> //specialization for 0 -struct PreMakeSeq<0,-1> { using type = IntegerSequence<>; }; +template <> //specialization for 0 +struct PreMakeSeq<0, -1> +{ + using type = IntegerSequence<>; +}; } //namespace detail /// \brief A helper method to create an Integer sequence of 0...N-1. -template -struct MakeIntegerSequence : detail::PreMakeSeq {}; - +template +struct MakeIntegerSequence : detail::PreMakeSeq +{ +}; } } diff --git a/vtkm/internal/Invocation.h b/vtkm/internal/Invocation.h index 8283c9ca7..8f1a20747 100644 --- a/vtkm/internal/Invocation.h +++ b/vtkm/internal/Invocation.h @@ -22,8 +22,10 @@ #include -namespace vtkm { -namespace internal { +namespace vtkm +{ +namespace internal +{ /// \brief Container for types when dispatching worklets. /// @@ -31,12 +33,10 @@ namespace internal { /// track of the types of all parameters and the associated features of the /// worklet. \c Invocation is a class that manages all these types. /// -template +template struct Invocation { /// \brief The types of the parameters @@ -94,145 +94,142 @@ struct Invocation Invocation(const ParameterInterface& parameters, OutputToInputMapType outputToInputMap = OutputToInputMapType(), VisitArrayType visitArray = VisitArrayType()) - : Parameters(parameters), - OutputToInputMap(outputToInputMap), - VisitArray(visitArray) - { } + : Parameters(parameters) + , OutputToInputMap(outputToInputMap) + , VisitArray(visitArray) + { + } /// Defines a new \c Invocation type that is the same as this type except /// with the \c Parameters replaced. /// - template - struct ChangeParametersType { - typedef Invocation type; + template + struct ChangeParametersType + { + typedef Invocation + type; }; /// Returns a new \c Invocation that is the same as this one except that the /// \c Parameters are replaced with those provided. /// - template - VTKM_CONT - typename ChangeParametersType::type - ChangeParameters(const NewParameterInterface& newParameters) const { + template + VTKM_CONT typename ChangeParametersType::type ChangeParameters( + const NewParameterInterface& newParameters) const + { return typename ChangeParametersType::type( - newParameters, this->OutputToInputMap, this->VisitArray); + newParameters, this->OutputToInputMap, this->VisitArray); } /// Defines a new \c Invocation type that is the same as this type except /// with the \c ControlInterface replaced. /// - template - struct ChangeControlInterfaceType { - typedef Invocation type; + template + struct ChangeControlInterfaceType + { + typedef Invocation + type; }; /// Returns a new \c Invocation that is the same as this one except that the /// \c ControlInterface type is changed to the type given. /// - template - typename ChangeControlInterfaceType::type - ChangeControlInterface(NewControlInterface) const { + template + typename ChangeControlInterfaceType::type ChangeControlInterface( + NewControlInterface) const + { return typename ChangeControlInterfaceType::type( - this->Parameters, this->OutputToInputMap, this->VisitArray); + this->Parameters, this->OutputToInputMap, this->VisitArray); } /// Defines a new \c Invocation type that is the same as this type except /// with the \c ExecutionInterface replaced. /// - template - struct ChangeExecutionInterfaceType { - typedef Invocation type; + template + struct ChangeExecutionInterfaceType + { + typedef Invocation + type; }; /// Returns a new \c Invocation that is the same as this one except that the /// \c ExecutionInterface type is changed to the type given. /// - template - typename ChangeExecutionInterfaceType::type - ChangeExecutionInterface(NewExecutionInterface) const { + template + typename ChangeExecutionInterfaceType::type ChangeExecutionInterface( + NewExecutionInterface) const + { return typename ChangeExecutionInterfaceType::type( - this->Parameters, this->OutputToInputMap, this->VisitArray); + this->Parameters, this->OutputToInputMap, this->VisitArray); } /// Defines a new \c Invocation type that is the same as this type except /// with the \c InputDomainIndex replaced. /// - template - struct ChangeInputDomainIndexType { - typedef Invocation type; + template + struct ChangeInputDomainIndexType + { + typedef Invocation + type; }; /// Returns a new \c Invocation that is the same as this one except that the /// \c InputDomainIndex is changed to the static number given. /// - template - VTKM_EXEC_CONT - typename ChangeInputDomainIndexType::type - ChangeInputDomainIndex() const { + template + VTKM_EXEC_CONT typename ChangeInputDomainIndexType::type + ChangeInputDomainIndex() const + { return typename ChangeInputDomainIndexType::type( - this->Parameters, this->OutputToInputMap, this->VisitArray); + this->Parameters, this->OutputToInputMap, this->VisitArray); } /// Defines a new \c Invocation type that is the same as this type except /// with the \c OutputToInputMapType replaced. /// - template - struct ChangeOutputToInputMapType { - typedef Invocation type; + template + struct ChangeOutputToInputMapType + { + typedef Invocation + type; }; /// Returns a new \c Invocation that is the same as this one except that the /// \c OutputToInputMap is replaced with that provided. /// - template - VTKM_CONT - typename ChangeOutputToInputMapType::type - ChangeOutputToInputMap(NewOutputToInputMapType newOutputToInputMap) const { + template + VTKM_CONT typename ChangeOutputToInputMapType::type + ChangeOutputToInputMap(NewOutputToInputMapType newOutputToInputMap) const + { return typename ChangeOutputToInputMapType::type( - this->Parameters, newOutputToInputMap, this->VisitArray); + this->Parameters, newOutputToInputMap, this->VisitArray); } /// Defines a new \c Invocation type that is the same as this type except /// with the \c VisitArrayType replaced. /// - template - struct ChangeVisitArrayType { - typedef Invocation type; + template + struct ChangeVisitArrayType + { + typedef Invocation + type; }; /// Returns a new \c Invocation that is the same as this one except that the /// \c VisitArray is replaced with that provided. /// - template - VTKM_CONT - typename ChangeVisitArrayType::type - ChangeVisitArray(NewVisitArrayType newVisitArray) const { + template + VTKM_CONT typename ChangeVisitArrayType::type ChangeVisitArray( + NewVisitArrayType newVisitArray) const + { return typename ChangeVisitArrayType::type( - this->Parameters, this->OutputToInputMap, newVisitArray); + this->Parameters, this->OutputToInputMap, newVisitArray); } /// A convenience typedef for the input domain type. @@ -242,8 +239,7 @@ struct Invocation /// A convenience typedef for the control signature tag of the input domain. /// - using InputDomainTag = - typename ControlInterface::template ParameterType::type; + using InputDomainTag = typename ControlInterface::template ParameterType::type; /// A convenience method to get the input domain object. /// @@ -267,60 +263,36 @@ struct Invocation private: // Do not allow assignment of one Invocation to another. It is too expensive. - void operator=(const Invocation &) = delete; + void operator=(const Invocation&) = + delete; }; /// Convenience function for creating an Invocation object. /// -template -VTKM_CONT -vtkm::internal::Invocation -make_Invocation(const ParameterInterface ¶ms, - ControlInterface, - ExecutionInterface, - OutputToInputMapType outputToInputMap, - VisitArrayType visitArray) +template +VTKM_CONT vtkm::internal::Invocation +make_Invocation(const ParameterInterface& params, ControlInterface, ExecutionInterface, + OutputToInputMapType outputToInputMap, VisitArrayType visitArray) { - return vtkm::internal::Invocation(params, - outputToInputMap, - visitArray); + return vtkm::internal::Invocation( + params, outputToInputMap, visitArray); } -template -VTKM_CONT -vtkm::internal::Invocation -make_Invocation(const ParameterInterface ¶ms, - ControlInterface = ControlInterface(), +template +VTKM_CONT vtkm::internal::Invocation +make_Invocation(const ParameterInterface& params, ControlInterface = ControlInterface(), ExecutionInterface = ExecutionInterface()) { return vtkm::internal::make_Invocation( - params, - ControlInterface(), - ExecutionInterface(), - vtkm::internal::NullType(), - vtkm::internal::NullType()); + params, ControlInterface(), ExecutionInterface(), vtkm::internal::NullType(), + vtkm::internal::NullType()); } - } } // namespace vtkm::internal diff --git a/vtkm/internal/ListTagDetail.h b/vtkm/internal/ListTagDetail.h index 1337276af..8a4988d1d 100644 --- a/vtkm/internal/ListTagDetail.h +++ b/vtkm/internal/ListTagDetail.h @@ -28,15 +28,19 @@ #include #include -namespace vtkm { -namespace detail { +namespace vtkm +{ +namespace detail +{ //----------------------------------------------------------------------------- /// Base class that all ListTag classes inherit from. Helps identify lists /// in macros like VTKM_IS_LIST_TAG. /// -struct ListRoot { }; +struct ListRoot +{ +}; template using ListBase = brigand::list; @@ -46,184 +50,150 @@ struct UniversalTag { //We never want this tag constructed, and by deleting the constructor //we get an error when trying to use this class with ForEach. - UniversalTag()=delete; + UniversalTag() = delete; }; - //----------------------------------------------------------------------------- -template +template struct ListJoin { - using type = brigand::append; + using type = brigand::append; }; -template +template struct ListJoin, ListTag> { using type = vtkm::detail::ListBase; }; -template -struct ListJoin > +template +struct ListJoin> { using type = vtkm::detail::ListBase; }; //----------------------------------------------------------------------------- -template struct ListContainsImpl; +template +struct ListContainsImpl; //----------------------------------------------------------------------------- -template -struct ListContainsImpl +template +struct ListContainsImpl { static VTKM_CONSTEXPR bool value = false; }; //----------------------------------------------------------------------------- -template -struct ListContainsImpl > +template +struct ListContainsImpl> { static VTKM_CONSTEXPR bool value = true; }; //----------------------------------------------------------------------------- -template -struct ListContainsImpl > +template +struct ListContainsImpl> { - static VTKM_CONSTEXPR bool value = std::is_same< Type, T1 >::value; + static VTKM_CONSTEXPR bool value = std::is_same::value; }; //----------------------------------------------------------------------------- -template -struct ListContainsImpl > +template +struct ListContainsImpl> { - static VTKM_CONSTEXPR bool value = std::is_same< Type, T1 >::value || - std::is_same< Type, T2 >::value; + static VTKM_CONSTEXPR bool value = std::is_same::value || std::is_same::value; }; //----------------------------------------------------------------------------- -template -struct ListContainsImpl > +template +struct ListContainsImpl> { - static VTKM_CONSTEXPR bool value = std::is_same< Type, T1 >::value || - std::is_same< Type, T2 >::value || - std::is_same< Type, T3 >::value; + static VTKM_CONSTEXPR bool value = + std::is_same::value || std::is_same::value || std::is_same::value; }; //----------------------------------------------------------------------------- -template -struct ListContainsImpl > +template +struct ListContainsImpl> { - static VTKM_CONSTEXPR bool value = std::is_same< Type, T1 >::value || - std::is_same< Type, T2 >::value || - std::is_same< Type, T3 >::value || - std::is_same< Type, T4 >::value; + static VTKM_CONSTEXPR bool value = std::is_same::value || + std::is_same::value || std::is_same::value || std::is_same::value; }; //----------------------------------------------------------------------------- -template struct ListContainsImpl +template +struct ListContainsImpl { - using find_result = brigand::find< List, - std::is_same< brigand::_1, Type> >; + using find_result = brigand::find>; using size = brigand::size; static VTKM_CONSTEXPR bool value = (size::value != 0); }; - //----------------------------------------------------------------------------- template struct intersect_tags { using has_u = ListContainsImpl; - using type = typename std::conditional, - T>::type; + using type = typename std::conditional, T>::type; }; //----------------------------------------------------------------------------- -template +template struct ListIntersect { using type = - brigand::fold< ListTag1, - brigand::list<>, - intersect_tags< brigand::_state, brigand::_element, brigand::pin > - >; + brigand::fold, + intersect_tags>>; }; -template +template struct ListIntersect, ListTag> { using type = ListTag; }; -template -struct ListIntersect > +template +struct ListIntersect> { using type = ListTag; }; -template +template struct ListIntersect { using type = SameListTag; }; //----------------------------------------------------------------------------- -template -VTKM_CONT -void ListForEachImpl(const Functor &, brigand::empty_sequence) +template +VTKM_CONT void ListForEachImpl(const Functor&, brigand::empty_sequence) { } -template -VTKM_CONT -void ListForEachImpl(const Functor &f, brigand::list) +template +VTKM_CONT void ListForEachImpl(const Functor& f, brigand::list) { f(T1()); } -template -VTKM_CONT -void ListForEachImpl(const Functor &f, brigand::list) +template +VTKM_CONT void ListForEachImpl(const Functor& f, brigand::list) { f(T1()); f(T2()); } -template -VTKM_CONT -void ListForEachImpl(const Functor &f, brigand::list) +template +VTKM_CONT void ListForEachImpl(const Functor& f, brigand::list) { f(T1()); f(T2()); f(T3()); } -template -VTKM_CONT -void ListForEachImpl(const Functor &f, brigand::list) +template +VTKM_CONT void ListForEachImpl(const Functor& f, brigand::list) { f(T1()); f(T2()); @@ -232,50 +202,35 @@ void ListForEachImpl(const Functor &f, brigand::list) ListForEachImpl(f, brigand::list()); } -template -VTKM_CONT -void ListForEachImpl(Functor &, brigand::empty_sequence) +template +VTKM_CONT void ListForEachImpl(Functor&, brigand::empty_sequence) { } -template -VTKM_CONT -void ListForEachImpl(Functor &f, brigand::list) +template +VTKM_CONT void ListForEachImpl(Functor& f, brigand::list) { f(T1()); } -template -VTKM_CONT -void ListForEachImpl(Functor &f, brigand::list) +template +VTKM_CONT void ListForEachImpl(Functor& f, brigand::list) { f(T1()); f(T2()); } -template -VTKM_CONT -void ListForEachImpl(Functor &f, brigand::list) +template +VTKM_CONT void ListForEachImpl(Functor& f, brigand::list) { f(T1()); f(T2()); f(T3()); } -template -VTKM_CONT -void ListForEachImpl(Functor &f, brigand::list) +template +VTKM_CONT void ListForEachImpl(Functor& f, brigand::list) { f(T1()); f(T2()); @@ -284,18 +239,16 @@ void ListForEachImpl(Functor &f, brigand::list) ListForEachImpl(f, brigand::list()); } - } // namespace detail //----------------------------------------------------------------------------- /// A basic tag for a list of typenames. This struct can be subclassed /// and still behave like a list tag. -template +template struct ListTagBase : detail::ListRoot { using list = detail::ListBase; }; - } #endif //vtk_m_internal_ListTagDetail_h diff --git a/vtkm/internal/Windows.h b/vtkm/internal/Windows.h index d072e5955..bf3cf3354 100644 --- a/vtkm/internal/Windows.h +++ b/vtkm/internal/Windows.h @@ -22,7 +22,7 @@ #include -#if defined(VTKM_WINDOWS) +#if defined(VTKM_WINDOWS) // Use pragma push_macro to properly save the state of WIN32_LEAN_AND_MEAN // and NOMINMAX that the caller of vtkm has setup @@ -32,10 +32,10 @@ VTKM_THIRDPARTY_PRE_INCLUDE #pragma push_macro("NOMINMAX") #ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN #endif #ifndef NOMINMAX -# define NOMINMAX +#define NOMINMAX #endif // windows.h, clobbers min and max functions so we diff --git a/vtkm/internal/testing/UnitTestArrayPortalValueReference.cxx b/vtkm/internal/testing/UnitTestArrayPortalValueReference.cxx index 81a66fe70..70a782c14 100644 --- a/vtkm/internal/testing/UnitTestArrayPortalValueReference.cxx +++ b/vtkm/internal/testing/UnitTestArrayPortalValueReference.cxx @@ -24,47 +24,39 @@ #include -namespace { +namespace +{ -template -void SetReference( - vtkm::Id index, - vtkm::internal::ArrayPortalValueReference ref) +template +void SetReference(vtkm::Id index, vtkm::internal::ArrayPortalValueReference ref) { using ValueType = typename ArrayPortalType::ValueType; ref = TestValue(index, ValueType()); } -template -void CheckReference( - vtkm::Id index, - vtkm::internal::ArrayPortalValueReference ref) +template +void CheckReference(vtkm::Id index, vtkm::internal::ArrayPortalValueReference ref) { using ValueType = typename ArrayPortalType::ValueType; - VTKM_TEST_ASSERT(test_equal(ref, TestValue(index, ValueType())), - "Got bad value from reference."); + VTKM_TEST_ASSERT(test_equal(ref, TestValue(index, ValueType())), "Got bad value from reference."); } static const vtkm::Id ARRAY_SIZE = 10; struct DoTestForType { - template - VTKM_CONT - void operator()(const ValueType &) const + template + VTKM_CONT void operator()(const ValueType&) const { vtkm::cont::ArrayHandle array; array.Allocate(ARRAY_SIZE); std::cout << "Set array using reference" << std::endl; - using PortalType = - typename vtkm::cont::ArrayHandle::PortalControl; + using PortalType = typename vtkm::cont::ArrayHandle::PortalControl; PortalType portal = array.GetPortalControl(); for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { - SetReference( - index, - vtkm::internal::ArrayPortalValueReference(portal,index)); + SetReference(index, vtkm::internal::ArrayPortalValueReference(portal, index)); } std::cout << "Check values" << std::endl; @@ -73,9 +65,7 @@ struct DoTestForType std::cout << "Check references in set array." << std::endl; for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { - CheckReference( - index, - vtkm::internal::ArrayPortalValueReference(portal,index)); + CheckReference(index, vtkm::internal::ArrayPortalValueReference(portal, index)); } } }; @@ -87,7 +77,7 @@ void DoTest() } // anonymous namespace -int UnitTestArrayPortalValueReference(int, char *[]) +int UnitTestArrayPortalValueReference(int, char* []) { return vtkm::cont::testing::Testing::Run(DoTest); } diff --git a/vtkm/internal/testing/UnitTestConfigureFor32.cxx b/vtkm/internal/testing/UnitTestConfigureFor32.cxx index 05d85308a..2933b3415 100644 --- a/vtkm/internal/testing/UnitTestConfigureFor32.cxx +++ b/vtkm/internal/testing/UnitTestConfigureFor32.cxx @@ -35,23 +35,20 @@ #error VTKM_SIZE_SCALAR an unexpected size. #endif -namespace { +namespace +{ void TestTypeSizes() { - VTKM_TEST_ASSERT(VTKM_SIZE_ID == EXPECTED_SIZE, - "VTKM_SIZE_ID an unexpected size."); - VTKM_TEST_ASSERT(sizeof(vtkm::Id) == EXPECTED_SIZE, - "vtkm::Id an unexpected size."); - VTKM_TEST_ASSERT(VTKM_SIZE_SCALAR == EXPECTED_SIZE, - "VTKM_SIZE_SCALAR an unexpected size."); + VTKM_TEST_ASSERT(VTKM_SIZE_ID == EXPECTED_SIZE, "VTKM_SIZE_ID an unexpected size."); + VTKM_TEST_ASSERT(sizeof(vtkm::Id) == EXPECTED_SIZE, "vtkm::Id an unexpected size."); + VTKM_TEST_ASSERT(VTKM_SIZE_SCALAR == EXPECTED_SIZE, "VTKM_SIZE_SCALAR an unexpected size."); VTKM_TEST_ASSERT(sizeof(vtkm::FloatDefault) == EXPECTED_SIZE, "vtkm::FloatDefault an unexpected size."); } - } -int UnitTestConfigureFor32(int, char *[]) +int UnitTestConfigureFor32(int, char* []) { return vtkm::testing::Testing::Run(TestTypeSizes); } diff --git a/vtkm/internal/testing/UnitTestConfigureFor64.cxx b/vtkm/internal/testing/UnitTestConfigureFor64.cxx index 9ce802f9c..689818e00 100644 --- a/vtkm/internal/testing/UnitTestConfigureFor64.cxx +++ b/vtkm/internal/testing/UnitTestConfigureFor64.cxx @@ -35,23 +35,20 @@ #error VTKM_SIZE_SCALAR an unexpected size. #endif -namespace { +namespace +{ void TestTypeSizes() { - VTKM_TEST_ASSERT(VTKM_SIZE_ID == EXPECTED_SIZE, - "VTKM_SIZE_ID an unexpected size."); - VTKM_TEST_ASSERT(sizeof(vtkm::Id) == EXPECTED_SIZE, - "vtkm::Id an unexpected size."); - VTKM_TEST_ASSERT(VTKM_SIZE_SCALAR == EXPECTED_SIZE, - "VTKM_SIZE_SCALAR an unexpected size."); + VTKM_TEST_ASSERT(VTKM_SIZE_ID == EXPECTED_SIZE, "VTKM_SIZE_ID an unexpected size."); + VTKM_TEST_ASSERT(sizeof(vtkm::Id) == EXPECTED_SIZE, "vtkm::Id an unexpected size."); + VTKM_TEST_ASSERT(VTKM_SIZE_SCALAR == EXPECTED_SIZE, "VTKM_SIZE_SCALAR an unexpected size."); VTKM_TEST_ASSERT(sizeof(vtkm::FloatDefault) == EXPECTED_SIZE, "vtkm::FloatDefault an unexpected size."); } - } -int UnitTestConfigureFor64(int, char *[]) +int UnitTestConfigureFor64(int, char* []) { return vtkm::testing::Testing::Run(TestTypeSizes); } diff --git a/vtkm/internal/testing/UnitTestFunctionInterface.cxx b/vtkm/internal/testing/UnitTestFunctionInterface.cxx index 5804dbaef..073fb011b 100644 --- a/vtkm/internal/testing/UnitTestFunctionInterface.cxx +++ b/vtkm/internal/testing/UnitTestFunctionInterface.cxx @@ -32,7 +32,8 @@ // use the Invoke method. //#define TEST_INVOKE_TIME -namespace { +namespace +{ typedef vtkm::Id Type1; const Type1 Arg1 = 1234; @@ -43,14 +44,15 @@ const Type2 Arg2 = 5678.125; typedef std::string Type3; const Type3 Arg3("Third argument"); -typedef vtkm::Vec Type4; +typedef vtkm::Vec Type4; const Type4 Arg4(1.2f, 3.4f, 5.6f); typedef vtkm::Id3 Type5; const Type5 Arg5(4, 5, 6); -struct ThreeArgFunctor { - void operator()(const Type1 &a1, const Type2 &a2, const Type3 &a3) const +struct ThreeArgFunctor +{ + void operator()(const Type1& a1, const Type2& a2, const Type3& a3) const { std::cout << "In 3 arg functor." << std::endl; @@ -60,8 +62,9 @@ struct ThreeArgFunctor { } }; -struct ThreeArgModifyFunctor { - void operator()(Type1 &a1, Type2 &a2, Type3 &a3) const +struct ThreeArgModifyFunctor +{ + void operator()(Type1& a1, Type2& a2, Type3& a3) const { std::cout << "In 3 arg modify functor." << std::endl; @@ -73,29 +76,37 @@ struct ThreeArgModifyFunctor { struct GetReferenceFunctor { - template - struct ReturnType { - typedef const typename std::remove_reference::type *type; + template + struct ReturnType + { + typedef const typename std::remove_reference::type* type; }; - template - const T *operator()(const T &x) const { return &x; } -}; - -struct PointerTransform { - template - struct ReturnType { - typedef const T *type; - }; - - template - const T *operator()(const T &x, IndexTag) const { + template + const T* operator()(const T& x) const + { return &x; } }; -struct ThreePointerArgFunctor { - void operator()(const Type1 *a1, const Type2 *a2, const Type3 *a3) const +struct PointerTransform +{ + template + struct ReturnType + { + typedef const T* type; + }; + + template + const T* operator()(const T& x, IndexTag) const + { + return &x; + } +}; + +struct ThreePointerArgFunctor +{ + void operator()(const Type1* a1, const Type2* a2, const Type3* a3) const { std::cout << "In 3 point arg functor." << std::endl; @@ -105,10 +116,9 @@ struct ThreePointerArgFunctor { } }; -struct ThreeArgFunctorWithReturn { - std::string operator()(const Type1 &a1, - const Type2 &a2, - const Type3 &a3) const +struct ThreeArgFunctorWithReturn +{ + std::string operator()(const Type1& a1, const Type2& a2, const Type3& a3) const { std::cout << "In 3 arg functor with return." << std::endl; @@ -119,12 +129,10 @@ struct ThreeArgFunctorWithReturn { } }; -struct FiveArgFunctor { - void operator()(const Type1 &a1, - const Type2 &a2, - const Type3 &a3, - const Type4 &a4, - const Type5 &a5) const +struct FiveArgFunctor +{ + void operator()(const Type1& a1, const Type2& a2, const Type3& a3, const Type4& a4, + const Type5& a5) const { std::cout << "In 5 arg functor." << std::endl; @@ -136,12 +144,10 @@ struct FiveArgFunctor { } }; -struct FiveArgSwizzledFunctor { - void operator()(const Type5 &a5, - const Type1 &a1, - const Type3 &a3, - const Type4 &a4, - const Type2 &a2) const +struct FiveArgSwizzledFunctor +{ + void operator()(const Type5& a5, const Type1& a1, const Type3& a3, const Type4& a4, + const Type2& a2) const { std::cout << "In 5 arg functor." << std::endl; @@ -154,19 +160,18 @@ struct FiveArgSwizzledFunctor { }; #ifdef TEST_INVOKE_TIME -struct LotsOfArgsFunctor { - LotsOfArgsFunctor() : Field(0) { } +struct LotsOfArgsFunctor +{ + LotsOfArgsFunctor() + : Field(0) + { + } - void operator()(vtkm::FloatDefault arg1, - vtkm::FloatDefault arg2, - vtkm::FloatDefault arg3, - vtkm::FloatDefault arg4, - vtkm::FloatDefault arg5, - vtkm::FloatDefault arg6, - vtkm::FloatDefault arg7, - vtkm::FloatDefault arg8, - vtkm::FloatDefault arg9, - vtkm::FloatDefault arg10) { + void operator()(vtkm::FloatDefault arg1, vtkm::FloatDefault arg2, vtkm::FloatDefault arg3, + vtkm::FloatDefault arg4, vtkm::FloatDefault arg5, vtkm::FloatDefault arg6, + vtkm::FloatDefault arg7, vtkm::FloatDefault arg8, vtkm::FloatDefault arg9, + vtkm::FloatDefault arg10) + { VTKM_TEST_ASSERT(arg1 == 1.0, "Got bad argument"); VTKM_TEST_ASSERT(arg2 == 2.0, "Got bad argument"); VTKM_TEST_ASSERT(arg3 == 3.0, "Got bad argument"); @@ -178,37 +183,37 @@ struct LotsOfArgsFunctor { VTKM_TEST_ASSERT(arg9 == 9.0, "Got bad argument"); VTKM_TEST_ASSERT(arg10 == 10.0, "Got bad argument"); - this->Field += - arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10; + this->Field += arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10; } vtkm::FloatDefault Field; }; #endif //TEST_INVOKE_TIME -template -std::string ToString(const T &value) +template +std::string ToString(const T& value) { std::stringstream stream; stream.precision(10); stream << value; return stream.str(); } -std::string ToString(const std::string &value) +std::string ToString(const std::string& value) { return value; } struct StringTransform { - template - std::string operator()(const T &input) const { return ToString(input); } + template + std::string operator()(const T& input) const + { + return ToString(input); + } }; struct ThreeArgStringFunctorWithReturn { - std::string operator()(std::string arg1, - std::string arg2, - std::string arg3) const + std::string operator()(std::string arg1, std::string arg2, std::string arg3) const { return arg1 + " " + arg2 + " " + arg3; } @@ -216,18 +221,16 @@ struct ThreeArgStringFunctorWithReturn struct DynamicTransformFunctor { - template - void operator()(const T &input, - const ContinueFunctor continueFunc, + template + void operator()(const T& input, const ContinueFunctor continueFunc, vtkm::internal::IndexTag) const { - continueFunc(input+T(Index)); - continueFunc(ToString(input+T(Index))); + continueFunc(input + T(Index)); + continueFunc(ToString(input + T(Index))); } - template - void operator()(const std::string &input, - const ContinueFunctor continueFunc, + template + void operator()(const std::string& input, const ContinueFunctor continueFunc, vtkm::internal::IndexTag) const { continueFunc(input); @@ -238,13 +241,13 @@ vtkm::Id g_DynamicTransformFinishCalls; struct DynamicTransformFinish { - template - void operator()(vtkm::internal::FunctionInterface &funcInterface) const + template + void operator()(vtkm::internal::FunctionInterface& funcInterface) const { g_DynamicTransformFinishCalls++; - VTKM_TEST_ASSERT(ToString(funcInterface.template GetParameter<1>()) == ToString(Arg1+1), + VTKM_TEST_ASSERT(ToString(funcInterface.template GetParameter<1>()) == ToString(Arg1 + 1), "Arg 1 incorrect"); - VTKM_TEST_ASSERT(ToString(funcInterface.template GetParameter<2>()) == ToString(Arg2+2), + VTKM_TEST_ASSERT(ToString(funcInterface.template GetParameter<2>()) == ToString(Arg2 + 2), "Arg 2 incorrect"); VTKM_TEST_ASSERT(ToString(funcInterface.template GetParameter<3>()) == ToString(Arg3), "Arg 3 incorrect"); @@ -253,13 +256,15 @@ struct DynamicTransformFinish struct ForEachFunctor { - template - void operator()(T &x, vtkm::internal::IndexTag) const { - x = T(Index)+x; + template + void operator()(T& x, vtkm::internal::IndexTag) const + { + x = T(Index) + x; } - template - void operator()(std::string &x, vtkm::internal::IndexTag) const { + template + void operator()(std::string& x, vtkm::internal::IndexTag) const + { std::stringstream message; message << x << "+" << Index; x = message.str(); @@ -267,11 +272,10 @@ struct ForEachFunctor }; void TryFunctionInterface5( - vtkm::internal::FunctionInterface funcInterface) + vtkm::internal::FunctionInterface funcInterface) { std::cout << "Checking 5 parameter function interface." << std::endl; - VTKM_TEST_ASSERT(funcInterface.GetArity() == 5, - "Got wrong number of parameters."); + VTKM_TEST_ASSERT(funcInterface.GetArity() == 5, "Got wrong number of parameters."); VTKM_TEST_ASSERT(funcInterface.GetParameter<1>() == Arg1, "Arg 1 incorrect."); VTKM_TEST_ASSERT(funcInterface.GetParameter<2>() == Arg2, "Arg 2 incorrect."); VTKM_TEST_ASSERT(funcInterface.GetParameter<3>() == Arg3, "Arg 3 incorrect."); @@ -284,22 +288,22 @@ void TryFunctionInterface5( std::cout << "Swizzling parameters with replace." << std::endl; funcInterface.Replace<1>(Arg5) - .Replace(Arg1, vtkm::internal::IndexTag<2>()) - .Replace<5>(Arg2) - .InvokeCont(FiveArgSwizzledFunctor()); + .Replace(Arg1, vtkm::internal::IndexTag<2>()) + .Replace<5>(Arg2) + .InvokeCont(FiveArgSwizzledFunctor()); } void TestBasicFunctionInterface() { std::cout << "Creating basic function interface." << std::endl; - vtkm::internal::FunctionInterface funcInterface = - vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3); + vtkm::internal::FunctionInterface funcInterface = + vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3); std::cout << "Checking parameters." << std::endl; - VTKM_TEST_ASSERT(funcInterface.GetArity() == 3, - "Got wrong number of parameters."); + VTKM_TEST_ASSERT(funcInterface.GetArity() == 3, "Got wrong number of parameters."); VTKM_TEST_ASSERT(funcInterface.GetParameter<1>() == Arg1, "Arg 1 incorrect."); - VTKM_TEST_ASSERT(funcInterface.GetParameter(vtkm::internal::IndexTag<2>()) == Arg2, "Arg 2 incorrect."); + VTKM_TEST_ASSERT(funcInterface.GetParameter(vtkm::internal::IndexTag<2>()) == Arg2, + "Arg 2 incorrect."); VTKM_TEST_ASSERT(funcInterface.GetParameter<3>() == Arg3, "Arg 3 incorrect."); std::cout << "Checking invocation." << std::endl; @@ -319,33 +323,30 @@ void TestBasicFunctionInterface() VTKM_TEST_ASSERT(funcInterface.GetParameter<2>() == Arg2, "Arg 2 incorrect."); VTKM_TEST_ASSERT(funcInterface.GetParameter<3>() == Arg3, "Arg 3 incorrect."); - TryFunctionInterface5( - vtkm::internal::make_FunctionInterface(Arg1,Arg2,Arg3,Arg4,Arg5)); + TryFunctionInterface5(vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3, Arg4, Arg5)); } void TestInvokeResult() { std::cout << "Checking invocation with return." << std::endl; - vtkm::internal::FunctionInterface funcInterface - = vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3); + vtkm::internal::FunctionInterface funcInterface = + vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3); funcInterface.InvokeCont(ThreeArgFunctorWithReturn()); std::string result = funcInterface.GetReturnValue(); std::cout << "Got result: " << result << std::endl; - VTKM_TEST_ASSERT(result == "1234 5678.125 Third argument", - "Got bad result from invoke."); + VTKM_TEST_ASSERT(result == "1234 5678.125 Third argument", "Got bad result from invoke."); } void TestAppend() { std::cout << "Appending interface with return value." << std::endl; - vtkm::internal::FunctionInterface - funcInterface2ArgWRet = - vtkm::internal::make_FunctionInterface(Arg1,Arg2); + vtkm::internal::FunctionInterface funcInterface2ArgWRet = + vtkm::internal::make_FunctionInterface(Arg1, Arg2); - vtkm::internal::FunctionInterface - funcInterface3ArgWRet = funcInterface2ArgWRet.Append(Arg3); + vtkm::internal::FunctionInterface funcInterface3ArgWRet = + funcInterface2ArgWRet.Append(Arg3); VTKM_TEST_ASSERT(funcInterface3ArgWRet.GetParameter<1>() == Arg1, "Arg 1 incorrect."); VTKM_TEST_ASSERT(funcInterface3ArgWRet.GetParameter<2>() == Arg2, "Arg 2 incorrect."); VTKM_TEST_ASSERT(funcInterface3ArgWRet.GetParameter<3>() == Arg3, "Arg 3 incorrect."); @@ -355,75 +356,62 @@ void TestAppend() std::string result = funcInterface3ArgWRet.GetReturnValue(); std::cout << "Got result: " << result << std::endl; - VTKM_TEST_ASSERT(result == "1234 5678.125 Third argument", - "Got bad result from invoke."); + VTKM_TEST_ASSERT(result == "1234 5678.125 Third argument", "Got bad result from invoke."); std::cout << "Appending another value." << std::endl; - vtkm::internal::FunctionInterface - funcInterface4ArgWRet = funcInterface3ArgWRet.Append(Arg4); + vtkm::internal::FunctionInterface funcInterface4ArgWRet = + funcInterface3ArgWRet.Append(Arg4); VTKM_TEST_ASSERT(funcInterface4ArgWRet.GetParameter<4>() == Arg4, "Arg 4 incorrect."); VTKM_TEST_ASSERT(funcInterface4ArgWRet.GetReturnValue() == "1234 5678.125 Third argument", "Got bad result from copy."); std::cout << "Checking double append." << std::endl; - vtkm::internal::FunctionInterface funcInterface3 = - vtkm::internal::make_FunctionInterface(Arg1,Arg2,Arg3); - TryFunctionInterface5(funcInterface3 - .Append(Arg4) - .Append(Arg5)); + vtkm::internal::FunctionInterface funcInterface3 = + vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3); + TryFunctionInterface5(funcInterface3.Append(Arg4).Append(Arg5)); } void TestTransformInvoke() { std::cout << "Trying transform invoke." << std::endl; - vtkm::internal::FunctionInterface - funcInterface = - vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3); + vtkm::internal::FunctionInterface funcInterface = + vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3); - funcInterface.InvokeCont(ThreeArgStringFunctorWithReturn(), - StringTransform()); + funcInterface.InvokeCont(ThreeArgStringFunctorWithReturn(), StringTransform()); std::string result = funcInterface.GetReturnValue(); std::cout << "Got result: " << result << std::endl; - VTKM_TEST_ASSERT(result == "1234 5678.125 Third argument", - "Got bad result from invoke."); + VTKM_TEST_ASSERT(result == "1234 5678.125 Third argument", "Got bad result from invoke."); } void TestStaticTransform() { std::cout << "Trying static transform." << std::endl; - typedef vtkm::internal::FunctionInterface - OriginalType; - OriginalType funcInterface = - vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3); + typedef vtkm::internal::FunctionInterface OriginalType; + OriginalType funcInterface = vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3); std::cout << "Transform with reported type." << std::endl; - typedef OriginalType::StaticTransformType::type - ReportedType; - ReportedType funcInterfaceTransform1 = - funcInterface.StaticTransformCont(PointerTransform()); + typedef OriginalType::StaticTransformType::type ReportedType; + ReportedType funcInterfaceTransform1 = funcInterface.StaticTransformCont(PointerTransform()); funcInterfaceTransform1.InvokeCont(ThreePointerArgFunctor()); - funcInterfaceTransform1 = - funcInterface.StaticTransformExec(PointerTransform()); + funcInterfaceTransform1 = funcInterface.StaticTransformExec(PointerTransform()); funcInterfaceTransform1.InvokeExec(ThreePointerArgFunctor()); } void TestDynamicTransform() { std::cout << "Trying dynamic transform." << std::endl; - vtkm::internal::FunctionInterface funcInterface = - vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3); + vtkm::internal::FunctionInterface funcInterface = + vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3); g_DynamicTransformFinishCalls = 0; - funcInterface.DynamicTransformCont(DynamicTransformFunctor(), - DynamicTransformFinish()); + funcInterface.DynamicTransformCont(DynamicTransformFunctor(), DynamicTransformFinish()); // We use an idiosyncrasy of DynamicTransform to call finish with two // permutations for every non string argument and one permutation for every // string argument. Thus, we expect it to be called 4 times. - std::cout << "Number of finish calls: " << g_DynamicTransformFinishCalls - << std::endl; + std::cout << "Number of finish calls: " << g_DynamicTransformFinishCalls << std::endl; VTKM_TEST_ASSERT(g_DynamicTransformFinishCalls == 4, "DynamicTransform did not call finish the right number of times."); } @@ -431,9 +419,8 @@ void TestDynamicTransform() void TestForEach() { std::cout << "Checking running a function on each parameter." << std::endl; - vtkm::internal::FunctionInterface - funcInterface = vtkm::internal::make_FunctionInterface( - Arg1, Arg2, Arg3, Arg4, Arg5); + vtkm::internal::FunctionInterface funcInterface = + vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3, Arg4, Arg5); VTKM_TEST_ASSERT(funcInterface.GetParameter<1>() == Arg1, "Arg 1 incorrect."); VTKM_TEST_ASSERT(funcInterface.GetParameter<2>() == Arg2, "Arg 2 incorrect."); VTKM_TEST_ASSERT(funcInterface.GetParameter<3>() == Arg3, "Arg 3 incorrect."); @@ -441,18 +428,18 @@ void TestForEach() VTKM_TEST_ASSERT(funcInterface.GetParameter<5>() == Arg5, "Arg 5 incorrect."); funcInterface.ForEachCont(ForEachFunctor()); - VTKM_TEST_ASSERT(funcInterface.GetParameter<1>() == Type1(1)+Arg1, "Arg 1 incorrect."); - VTKM_TEST_ASSERT(funcInterface.GetParameter<2>() == Type2(2)+Arg2, "Arg 2 incorrect."); - VTKM_TEST_ASSERT(funcInterface.GetParameter<3>() == Arg3+"+3", "Arg 3 incorrect."); - VTKM_TEST_ASSERT(funcInterface.GetParameter<4>() == Type4(4)+Arg4, "Arg 4 incorrect."); - VTKM_TEST_ASSERT(funcInterface.GetParameter<5>() == Type5(5)+Arg5, "Arg 5 incorrect."); + VTKM_TEST_ASSERT(funcInterface.GetParameter<1>() == Type1(1) + Arg1, "Arg 1 incorrect."); + VTKM_TEST_ASSERT(funcInterface.GetParameter<2>() == Type2(2) + Arg2, "Arg 2 incorrect."); + VTKM_TEST_ASSERT(funcInterface.GetParameter<3>() == Arg3 + "+3", "Arg 3 incorrect."); + VTKM_TEST_ASSERT(funcInterface.GetParameter<4>() == Type4(4) + Arg4, "Arg 4 incorrect."); + VTKM_TEST_ASSERT(funcInterface.GetParameter<5>() == Type5(5) + Arg5, "Arg 5 incorrect."); funcInterface.ForEachExec(ForEachFunctor()); - VTKM_TEST_ASSERT(funcInterface.GetParameter<1>() == Type1(2)+Arg1, "Arg 1 incorrect."); - VTKM_TEST_ASSERT(funcInterface.GetParameter<2>() == Type2(4)+Arg2, "Arg 2 incorrect."); - VTKM_TEST_ASSERT(funcInterface.GetParameter<3>() == Arg3+"+3+3", "Arg 3 incorrect."); - VTKM_TEST_ASSERT(funcInterface.GetParameter<4>() == Type4(8)+Arg4, "Arg 4 incorrect."); - VTKM_TEST_ASSERT(funcInterface.GetParameter<5>() == Type5(10)+Arg5, "Arg 5 incorrect."); + VTKM_TEST_ASSERT(funcInterface.GetParameter<1>() == Type1(2) + Arg1, "Arg 1 incorrect."); + VTKM_TEST_ASSERT(funcInterface.GetParameter<2>() == Type2(4) + Arg2, "Arg 2 incorrect."); + VTKM_TEST_ASSERT(funcInterface.GetParameter<3>() == Arg3 + "+3+3", "Arg 3 incorrect."); + VTKM_TEST_ASSERT(funcInterface.GetParameter<4>() == Type4(8) + Arg4, "Arg 4 incorrect."); + VTKM_TEST_ASSERT(funcInterface.GetParameter<5>() == Type5(10) + Arg5, "Arg 5 incorrect."); } #ifdef TEST_INVOKE_TIME @@ -468,29 +455,16 @@ void TestInvokeTime() f(1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f); } vtkm::Float64 directCallTime = timer.GetElapsedTime(); - std::cout << "Time for direct call: " << directCallTime << " seconds" - << std::endl; + std::cout << "Time for direct call: " << directCallTime << " seconds" << std::endl; - vtkm::internal::FunctionInterface funcInterface = - vtkm::internal::make_FunctionInterface(vtkm::FloatDefault(1), - vtkm::FloatDefault(2), - vtkm::FloatDefault(3), - vtkm::FloatDefault(4), - vtkm::FloatDefault(5), - vtkm::FloatDefault(6), - vtkm::FloatDefault(7), - vtkm::FloatDefault(8), - vtkm::FloatDefault(9), - vtkm::FloatDefault(10)); + vtkm::internal::FunctionInterface + funcInterface = vtkm::internal::make_FunctionInterface( + vtkm::FloatDefault(1), vtkm::FloatDefault(2), vtkm::FloatDefault(3), vtkm::FloatDefault(4), + vtkm::FloatDefault(5), vtkm::FloatDefault(6), vtkm::FloatDefault(7), vtkm::FloatDefault(8), + vtkm::FloatDefault(9), vtkm::FloatDefault(10)); timer.Reset(); for (vtkm::Id trial = 0; trial < NUM_TRIALS; trial++) @@ -498,10 +472,9 @@ void TestInvokeTime() funcInterface.InvokeCont(f); } vtkm::Float64 invokeCallTime = timer.GetElapsedTime(); - std::cout << "Time for invoking function interface: " << invokeCallTime - << " seconds" << std::endl; - std::cout << "Pointless result (makeing sure compiler computes it) " - << f.Field << std::endl; + std::cout << "Time for invoking function interface: " << invokeCallTime << " seconds" + << std::endl; + std::cout << "Pointless result (makeing sure compiler computes it) " << f.Field << std::endl; #if !defined(NDEBUG) && defined(VTKM_MSVC) // We expect function calls through the FunctionInterface class to take @@ -512,15 +485,14 @@ void TestInvokeTime() // function call, so this might slow things down. Handle that contingency // here with just a warning. (Future builds might need to add more cases // here.) - if (invokeCallTime >= 1.05*directCallTime) + if (invokeCallTime >= 1.05 * directCallTime) { - std::cout << "WARNING: Function interface took longer than expected." - << std::endl + std::cout << "WARNING: Function interface took longer than expected." << std::endl << "That should be corrected in release builds." << std::endl; } #else // Might need to disable this for non-release builds. - VTKM_TEST_ASSERT(invokeCallTime < 1.05*directCallTime, + VTKM_TEST_ASSERT(invokeCallTime < 1.05 * directCallTime, "Function interface invoke took longer than expected."); #endif } @@ -542,7 +514,7 @@ void TestFunctionInterface() } // anonymous namespace -int UnitTestFunctionInterface(int, char *[]) +int UnitTestFunctionInterface(int, char* []) { return vtkm::cont::testing::Testing::Run(TestFunctionInterface); } diff --git a/vtkm/internal/testing/UnitTestIntegerSequence.cxx b/vtkm/internal/testing/UnitTestIntegerSequence.cxx index 8fe1145dd..628d3598f 100644 --- a/vtkm/internal/testing/UnitTestIntegerSequence.cxx +++ b/vtkm/internal/testing/UnitTestIntegerSequence.cxx @@ -25,17 +25,17 @@ namespace { -template +template void verify_correct_length(vtkm::internal::IntegerSequence) { - static_assert( Len == sizeof...(Ts), "Incorrect length"); + static_assert(Len == sizeof...(Ts), "Incorrect length"); //use a runtime time to verify the contents of the integer sequence //are 0...N-1 - std::vector container= {Ts...}; - for(std::size_t i=0; i < Len; ++i) + std::vector container = { Ts... }; + for (std::size_t i = 0; i < Len; ++i) { - VTKM_TEST_ASSERT(container[i]==static_cast(i), "Incorrect value"); + VTKM_TEST_ASSERT(container[i] == static_cast(i), "Incorrect value"); } } @@ -52,7 +52,6 @@ void IntegerSequenceSizes() using two_fifty_six = vtkm::internal::MakeIntegerSequence<256>::type; using five_twelve = vtkm::internal::MakeIntegerSequence<512>::type; - verify_correct_length<0>(zero()); verify_correct_length<1>(one()); verify_correct_length<2>(two()); @@ -64,10 +63,9 @@ void IntegerSequenceSizes() verify_correct_length<256>(two_fifty_six()); verify_correct_length<512>(five_twelve()); } - } -int UnitTestIntegerSequence(int, char *[]) +int UnitTestIntegerSequence(int, char* []) { return vtkm::testing::Testing::Run(IntegerSequenceSizes); -} \ No newline at end of file +} diff --git a/vtkm/interop/BufferState.h b/vtkm/interop/BufferState.h index 636344e5a..9618b50c9 100644 --- a/vtkm/interop/BufferState.h +++ b/vtkm/interop/BufferState.h @@ -28,29 +28,29 @@ #include -namespace vtkm{ -namespace interop{ - +namespace vtkm +{ +namespace interop +{ namespace internal { VTKM_SILENCE_WEAK_VTABLE_WARNING_START - /// \brief Device backend and opengl interop resources management - /// - /// \c TransferResource manages a context for a given device backend and a - /// single OpenGL buffer as efficiently as possible. - /// - /// Default implementation is a no-op - class TransferResource - { - public: - virtual ~TransferResource() {} - }; +/// \brief Device backend and opengl interop resources management +/// +/// \c TransferResource manages a context for a given device backend and a +/// single OpenGL buffer as efficiently as possible. +/// +/// Default implementation is a no-op +class TransferResource +{ +public: + virtual ~TransferResource() {} +}; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } /// \brief Manages the state for transferring an ArrayHandle to opengl. @@ -67,34 +67,34 @@ class BufferState { public: /// Construct a BufferState using an existing GLHandle - BufferState(GLuint& gLHandle): - OpenGLHandle(&gLHandle), - BufferType(GL_INVALID_VALUE), - SizeOfActiveSection(0), - CapacityOfBuffer(0), - DefaultGLHandle(0), - Resource() + BufferState(GLuint& gLHandle) + : OpenGLHandle(&gLHandle) + , BufferType(GL_INVALID_VALUE) + , SizeOfActiveSection(0) + , CapacityOfBuffer(0) + , DefaultGLHandle(0) + , Resource() { } /// Construct a BufferState using an existing GLHandle and type - BufferState(GLuint& gLHandle, GLenum type): - OpenGLHandle(&gLHandle), - BufferType(type), - SizeOfActiveSection(0), - CapacityOfBuffer(0), - DefaultGLHandle(0), - Resource() + BufferState(GLuint& gLHandle, GLenum type) + : OpenGLHandle(&gLHandle) + , BufferType(type) + , SizeOfActiveSection(0) + , CapacityOfBuffer(0) + , DefaultGLHandle(0) + , Resource() { } - BufferState(): - OpenGLHandle(nullptr), - BufferType(GL_INVALID_VALUE), - SizeOfActiveSection(0), - CapacityOfBuffer(0), - DefaultGLHandle(0), - Resource() + BufferState() + : OpenGLHandle(nullptr) + , BufferType(GL_INVALID_VALUE) + , SizeOfActiveSection(0) + , CapacityOfBuffer(0) + , DefaultGLHandle(0) + , Resource() { this->OpenGLHandle = &this->DefaultGLHandle; } @@ -129,9 +129,11 @@ public: /// Will be GL_ELEMENT_ARRAY_BUFFER for /// vtkm::Int32, vtkm::UInt32, vtkm::Int64, vtkm::UInt64, vtkm::Id, and vtkm::IdComponent /// will be GL_ARRAY_BUFFER for everything else. - template + template void DeduceAndSetType(T t) - { this->BufferType = vtkm::interop::internal::BufferTypePicker(t); } + { + this->BufferType = vtkm::interop::internal::BufferTypePicker(t); + } /// \brief Get the size of the buffer in bytes /// @@ -158,7 +160,7 @@ public: bool ShouldRealloc(vtkm::Int64 desiredSize) const { const bool haveNotEnoughRoom = this->GetCapacity() < desiredSize; - const bool haveTooMuchRoom = this->GetCapacity() > (desiredSize*2); + const bool haveTooMuchRoom = this->GetCapacity() > (desiredSize * 2); return (haveNotEnoughRoom || haveTooMuchRoom); } @@ -168,13 +170,13 @@ public: void SetCapacity(vtkm::Int64 capacity) { this->CapacityOfBuffer = capacity; } //Note: This call should only be used internally by vtk-m - vtkm::interop::internal::TransferResource* GetResource() - { return this->Resource.get(); } + vtkm::interop::internal::TransferResource* GetResource() { return this->Resource.get(); } //Note: This call should only be used internally by vtk-m - void SetResource( vtkm::interop::internal::TransferResource* resource) - { this->Resource.reset(resource); } - + void SetResource(vtkm::interop::internal::TransferResource* resource) + { + this->Resource.reset(resource); + } private: // BufferState doesn't support copy or move semantics @@ -184,11 +186,11 @@ private: GLuint* OpenGLHandle; GLenum BufferType; vtkm::Int64 SizeOfActiveSection; //must be Int64 as size can be over 2billion - vtkm::Int64 CapacityOfBuffer; //must be Int64 as size can be over 2billion + vtkm::Int64 CapacityOfBuffer; //must be Int64 as size can be over 2billion GLuint DefaultGLHandle; std::unique_ptr Resource; }; - -}} +} +} #endif //vtk_m_interop_BufferState_h diff --git a/vtkm/interop/TransferToOpenGL.h b/vtkm/interop/TransferToOpenGL.h index 9ee3465b8..8acadf644 100644 --- a/vtkm/interop/TransferToOpenGL.h +++ b/vtkm/interop/TransferToOpenGL.h @@ -24,9 +24,10 @@ #include #include -namespace vtkm{ -namespace interop{ - +namespace vtkm +{ +namespace interop +{ /// \brief Manages transferring an ArrayHandle to opengl . /// @@ -41,16 +42,14 @@ namespace interop{ /// /// This function will throw exceptions if the transfer wasn't possible /// -template -VTKM_CONT -void TransferToOpenGL(vtkm::cont::ArrayHandle handle, - BufferState& state, - DeviceAdapterTag) +template +VTKM_CONT void TransferToOpenGL(vtkm::cont::ArrayHandle handle, + BufferState& state, DeviceAdapterTag) { vtkm::interop::internal::TransferToOpenGL toGL(state); return toGL.Transfer(handle); } - -}} +} +} #endif //vtk_m_interop_TransferToOpenGL_h diff --git a/vtkm/interop/cuda/SetOpenGLDevice.h b/vtkm/interop/cuda/SetOpenGLDevice.h index 73e39e112..f54f2c0ee 100644 --- a/vtkm/interop/cuda/SetOpenGLDevice.h +++ b/vtkm/interop/cuda/SetOpenGLDevice.h @@ -25,9 +25,12 @@ #include -namespace vtkm{ -namespace interop{ -namespace cuda{ +namespace vtkm +{ +namespace interop +{ +namespace cuda +{ static void SetCudaGLDevice(int id) { @@ -39,15 +42,13 @@ static void SetCudaGLDevice(int id) #else cudaError_t cError = cudaSetDevice(id); #endif - if(cError != cudaSuccess) - { + if (cError != cudaSuccess) + { std::string cuda_error_msg("Unable to setup cuda/opengl interop. Error: "); cuda_error_msg.append(cudaGetErrorString(cError)); throw vtkm::cont::ErrorExecution(cuda_error_msg); - } + } } - - } } } //namespace diff --git a/vtkm/interop/cuda/internal/TransferToOpenGL.h b/vtkm/interop/cuda/internal/TransferToOpenGL.h index 8a87bbe7e..121db6b38 100644 --- a/vtkm/interop/cuda/internal/TransferToOpenGL.h +++ b/vtkm/interop/cuda/internal/TransferToOpenGL.h @@ -35,9 +35,12 @@ VTKM_THIRDPARTY_PRE_INCLUDE #include VTKM_THIRDPARTY_POST_INCLUDE -namespace vtkm { -namespace interop { -namespace internal { +namespace vtkm +{ +namespace interop +{ +namespace internal +{ /// \brief cuda backend and opengl interop resource management /// @@ -47,8 +50,8 @@ namespace internal { class CudaTransferResource : public vtkm::interop::internal::TransferResource { public: - CudaTransferResource(): - vtkm::interop::internal::TransferResource() + CudaTransferResource() + : vtkm::interop::internal::TransferResource() { this->Registered = false; } @@ -56,71 +59,63 @@ public: ~CudaTransferResource() { //unregister the buffer - if(this->Registered) + if (this->Registered) { cudaGraphicsUnregisterResource(this->CudaResource); } - } bool IsRegistered() const { return Registered; } void Register(GLuint* handle) { - if(this->Registered) - { + if (this->Registered) + { //If you don't release the cuda resource before re-registering you //will leak memory on the OpenGL side. cudaGraphicsUnregisterResource(this->CudaResource); - } + } this->Registered = true; - cudaError_t cError = cudaGraphicsGLRegisterBuffer(&this->CudaResource, - *handle, - cudaGraphicsMapFlagsWriteDiscard); - if(cError != cudaSuccess) + cudaError_t cError = + cudaGraphicsGLRegisterBuffer(&this->CudaResource, *handle, cudaGraphicsMapFlagsWriteDiscard); + if (cError != cudaSuccess) { - throw vtkm::cont::ErrorExecution( - "Could not register the OpenGL buffer handle to CUDA."); + throw vtkm::cont::ErrorExecution("Could not register the OpenGL buffer handle to CUDA."); } } void Map() { //map the resource into cuda, so we can copy it - cudaError_t cError =cudaGraphicsMapResources(1,&this->CudaResource); - if(cError != cudaSuccess) + cudaError_t cError = cudaGraphicsMapResources(1, &this->CudaResource); + if (cError != cudaSuccess) { throw vtkm::cont::ErrorBadAllocation( - "Could not allocate enough memory in CUDA for OpenGL interop."); + "Could not allocate enough memory in CUDA for OpenGL interop."); } } - template< typename ValueType > - ValueType* GetMappedPoiner( vtkm::Int64 desiredSize) + template + ValueType* GetMappedPoiner(vtkm::Int64 desiredSize) { - //get the mapped pointer - std::size_t cuda_size; - ValueType* pointer = nullptr; - cudaError_t cError = cudaGraphicsResourceGetMappedPointer((void **)&pointer, - &cuda_size, - this->CudaResource); + //get the mapped pointer + std::size_t cuda_size; + ValueType* pointer = nullptr; + cudaError_t cError = + cudaGraphicsResourceGetMappedPointer((void**)&pointer, &cuda_size, this->CudaResource); - if(cError != cudaSuccess) - { - throw vtkm::cont::ErrorExecution( - "Unable to get pointers to CUDA memory for OpenGL buffer."); + if (cError != cudaSuccess) + { + throw vtkm::cont::ErrorExecution("Unable to get pointers to CUDA memory for OpenGL buffer."); + } + + //assert that cuda_size is the same size as the buffer we created in OpenGL + VTKM_ASSERT(cuda_size >= static_cast(desiredSize)); + return pointer; } - //assert that cuda_size is the same size as the buffer we created in OpenGL - VTKM_ASSERT(cuda_size >= static_cast(desiredSize)); - return pointer; - } - - void UnMap() - { - cudaGraphicsUnmapResources(1, &this->CudaResource); - } + void UnMap() { cudaGraphicsUnmapResources(1, &this->CudaResource); } private: bool Registered; @@ -132,106 +127,95 @@ private: /// \c TransferToOpenGL manages to transfer the contents of an ArrayHandle /// to OpenGL as efficiently as possible. /// -template +template class TransferToOpenGL { typedef vtkm::cont::DeviceAdapterTagCuda DeviceAdapterTag; + public: - VTKM_CONT explicit TransferToOpenGL(BufferState& state): - State(state), - Resource(nullptr) + VTKM_CONT explicit TransferToOpenGL(BufferState& state) + : State(state) + , Resource(nullptr) { - if( !this->State.HasType() ) + if (!this->State.HasType()) { - this->State.DeduceAndSetType( ValueType() ); + this->State.DeduceAndSetType(ValueType()); } - this->Resource = dynamic_cast - (state.GetResource()); - if( !this->Resource ) + this->Resource = + dynamic_cast(state.GetResource()); + if (!this->Resource) { vtkm::interop::internal::CudaTransferResource* cudaResource = - new vtkm::interop::internal::CudaTransferResource(); + new vtkm::interop::internal::CudaTransferResource(); //reset the resource to be a cuda resource - this->State.SetResource( cudaResource ); + this->State.SetResource(cudaResource); this->Resource = cudaResource; } } - template< typename StorageTag > - VTKM_CONT - void Transfer ( - vtkm::cont::ArrayHandle &handle) const + template + VTKM_CONT void Transfer(vtkm::cont::ArrayHandle& handle) const { - //make a buffer for the handle if the user has forgotten too - if(!glIsBuffer(*this->State.GetHandle())) - { - glGenBuffers(1, this->State.GetHandle()); + //make a buffer for the handle if the user has forgotten too + if (!glIsBuffer(*this->State.GetHandle())) + { + glGenBuffers(1, this->State.GetHandle()); + } + + //bind the buffer to the given buffer type + glBindBuffer(this->State.GetType(), *this->State.GetHandle()); + + //Determine if we need to reallocate the buffer + const vtkm::Int64 size = + static_cast(sizeof(ValueType)) * handle.GetNumberOfValues(); + this->State.SetSize(size); + const bool resize = this->State.ShouldRealloc(size); + if (resize) + { + //Allocate the memory and set it as GL_DYNAMIC_DRAW draw + glBufferData(this->State.GetType(), static_cast(size), 0, GL_DYNAMIC_DRAW); + + this->State.SetCapacity(size); + } + + if (!this->Resource->IsRegistered() || resize) + { + //register the buffer as being used by cuda. This needs to be done everytime + //we change the size of the buffer. That is why we only change the buffer + //size as infrequently as possible + this->Resource->Register(this->State.GetHandle()); + } + + this->Resource->Map(); + + ValueType* beginPointer = this->Resource->GetMappedPoiner(size); + + //get the device pointers + typedef vtkm::cont::ArrayHandle HandleType; + typedef typename HandleType::template ExecutionTypes::PortalConst PortalType; + PortalType portal = handle.PrepareForInput(DeviceAdapterTag()); + + //Copy the data into memory that opengl owns, since we can't + //give memory from cuda to opengl + + //Perhaps a direct call to thrust copy should be wrapped in a vtkm + //compatble function + ::thrust::copy(thrust::cuda::par, vtkm::cont::cuda::internal::IteratorBegin(portal), + vtkm::cont::cuda::internal::IteratorEnd(portal), + thrust::cuda::pointer(beginPointer)); + + //unmap the resource + this->Resource->UnMap(); } - //bind the buffer to the given buffer type - glBindBuffer(this->State.GetType(), *this->State.GetHandle()); - - //Determine if we need to reallocate the buffer - const vtkm::Int64 size = static_cast(sizeof(ValueType))* handle.GetNumberOfValues(); - this->State.SetSize(size); - const bool resize = this->State.ShouldRealloc(size); - if( resize ) - { - //Allocate the memory and set it as GL_DYNAMIC_DRAW draw - glBufferData(this->State.GetType(), - static_cast(size), - 0, - GL_DYNAMIC_DRAW); - - this->State.SetCapacity(size); - } - - if(!this->Resource->IsRegistered() || resize ) - { - //register the buffer as being used by cuda. This needs to be done everytime - //we change the size of the buffer. That is why we only change the buffer - //size as infrequently as possible - this->Resource->Register(this->State.GetHandle()); - } - - this->Resource->Map(); - - ValueType* beginPointer= this->Resource->GetMappedPoiner(size); - - //get the device pointers - typedef vtkm::cont::ArrayHandle HandleType; - typedef typename HandleType::template - ExecutionTypes::PortalConst PortalType; - PortalType portal = handle.PrepareForInput(DeviceAdapterTag()); - - //Copy the data into memory that opengl owns, since we can't - //give memory from cuda to opengl - - //Perhaps a direct call to thrust copy should be wrapped in a vtkm - //compatble function - ::thrust::copy( - thrust::cuda::par, - vtkm::cont::cuda::internal::IteratorBegin(portal), - vtkm::cont::cuda::internal::IteratorEnd(portal), - thrust::cuda::pointer(beginPointer)); - - //unmap the resource - this->Resource->UnMap(); - - } private: vtkm::interop::BufferState& State; vtkm::interop::internal::CudaTransferResource* Resource; }; - - - } } } //namespace vtkm::interop::cuda::internal - #endif - diff --git a/vtkm/interop/cuda/testing/UnitTestTransferToOpenGLCuda.cu b/vtkm/interop/cuda/testing/UnitTestTransferToOpenGLCuda.cu index 0c13d4376..19100d6a3 100644 --- a/vtkm/interop/cuda/testing/UnitTestTransferToOpenGLCuda.cu +++ b/vtkm/interop/cuda/testing/UnitTestTransferToOpenGLCuda.cu @@ -24,10 +24,10 @@ #include -int UnitTestTransferToOpenGLCuda(int, char *[]) +int UnitTestTransferToOpenGLCuda(int, char* []) { int result = 1; - result = vtkm::interop::testing::TestingOpenGLInterop - ::Run(); + result = + vtkm::interop::testing::TestingOpenGLInterop::Run(); return vtkm::cont::cuda::internal::Testing::CheckCudaBeforeExit(result); } diff --git a/vtkm/interop/internal/BufferTypePicker.h b/vtkm/interop/internal/BufferTypePicker.h index 973535f92..7d14acf4b 100644 --- a/vtkm/interop/internal/BufferTypePicker.h +++ b/vtkm/interop/internal/BufferTypePicker.h @@ -24,54 +24,61 @@ #include #include -namespace vtkm { -namespace interop { -namespace internal { +namespace vtkm +{ +namespace interop +{ +namespace internal +{ -namespace detail { +namespace detail +{ -template -static inline VTKM_CONT -GLenum BufferTypePickerImpl(NumericTag, DimensionalityTag) +template +static inline VTKM_CONT GLenum BufferTypePickerImpl(NumericTag, DimensionalityTag) { return GL_ARRAY_BUFFER; } VTKM_CONT -static inline GLenum BufferTypePickerImpl(vtkm::TypeTraitsIntegerTag, - vtkm::TypeTraitsScalarTag) +static inline GLenum BufferTypePickerImpl(vtkm::TypeTraitsIntegerTag, vtkm::TypeTraitsScalarTag) { return GL_ELEMENT_ARRAY_BUFFER; } } //namespace detail -static inline VTKM_CONT GLenum BufferTypePicker( vtkm::Int32 ) -{ return GL_ELEMENT_ARRAY_BUFFER; } +static inline VTKM_CONT GLenum BufferTypePicker(vtkm::Int32) +{ + return GL_ELEMENT_ARRAY_BUFFER; +} -static inline VTKM_CONT GLenum BufferTypePicker( vtkm::UInt32 ) -{ return GL_ELEMENT_ARRAY_BUFFER; } +static inline VTKM_CONT GLenum BufferTypePicker(vtkm::UInt32) +{ + return GL_ELEMENT_ARRAY_BUFFER; +} -static inline VTKM_CONT GLenum BufferTypePicker( vtkm::Int64 ) -{ return GL_ELEMENT_ARRAY_BUFFER; } - -static inline VTKM_CONT GLenum BufferTypePicker( vtkm::UInt64 ) -{ return GL_ELEMENT_ARRAY_BUFFER; } +static inline VTKM_CONT GLenum BufferTypePicker(vtkm::Int64) +{ + return GL_ELEMENT_ARRAY_BUFFER; +} +static inline VTKM_CONT GLenum BufferTypePicker(vtkm::UInt64) +{ + return GL_ELEMENT_ARRAY_BUFFER; +} /// helper function that guesses what OpenGL buffer type is the best default /// given a primitive type. Currently GL_ELEMENT_ARRAY_BUFFER is used for /// integer types, and GL_ARRAY_BUFFER is used for everything else /// -template -static inline VTKM_CONT GLenum BufferTypePicker( T ) +template +static inline VTKM_CONT GLenum BufferTypePicker(T) { typedef vtkm::TypeTraits Traits; return detail::BufferTypePickerImpl(typename Traits::NumericTag(), typename Traits::DimensionalityTag()); } - - } } } //namespace vtkm::interop::internal diff --git a/vtkm/interop/internal/OpenGLHeaders.h b/vtkm/interop/internal/OpenGLHeaders.h index dc638eaae..c0269cb81 100644 --- a/vtkm/interop/internal/OpenGLHeaders.h +++ b/vtkm/interop/internal/OpenGLHeaders.h @@ -23,22 +23,19 @@ #include #if defined(__APPLE__) -# include +#include -# include +#include #else -# include +#include -# include +#include #endif #ifdef VTKM_CUDA -# include +#include -# include +#include #endif - - - #endif //vtk_m_interop_internal_OpenGLHeaders_h diff --git a/vtkm/interop/internal/TransferToOpenGL.h b/vtkm/interop/internal/TransferToOpenGL.h index e491ecf50..3a99355e7 100644 --- a/vtkm/interop/internal/TransferToOpenGL.h +++ b/vtkm/interop/internal/TransferToOpenGL.h @@ -27,20 +27,19 @@ #include #include - -namespace vtkm { -namespace interop { -namespace internal { +namespace vtkm +{ +namespace interop +{ +namespace internal +{ namespace detail { -template -VTKM_CONT -void CopyFromHandle( - vtkm::cont::ArrayHandle& handle, - vtkm::interop::BufferState& state, - DeviceAdapterTag) +template +VTKM_CONT void CopyFromHandle(vtkm::cont::ArrayHandle& handle, + vtkm::interop::BufferState& state, DeviceAdapterTag) { //Generic implementation that will work no matter what. We copy the data //in the given handle to a temporary handle using the basic storage tag. @@ -49,27 +48,25 @@ void CopyFromHandle( //iterator to the rendering system const vtkm::Id numberOfValues = handle.GetNumberOfValues(); const GLsizeiptr size = - static_cast(sizeof(ValueType)) * - static_cast(numberOfValues); + static_cast(sizeof(ValueType)) * static_cast(numberOfValues); //Copy the data from its specialized Storage container to a basic heap alloc - ValueType* temporaryStorage = - new ValueType[static_cast(numberOfValues)]; + ValueType* temporaryStorage = new ValueType[static_cast(numberOfValues)]; #ifdef VTKM_MSVC - #pragma warning(disable:4244) - #pragma warning(disable:4996) +#pragma warning(disable : 4244) +#pragma warning(disable : 4996) #endif handle.CopyInto(temporaryStorage, DeviceAdapterTag()); #ifdef VTKM_MSVC - #pragma warning(default:4996) - #pragma warning(default:4244) +#pragma warning(default : 4996) +#pragma warning(default : 4244) #endif //Determine if we need to reallocate the buffer state.SetSize(size); const bool resize = state.ShouldRealloc(size); - if( resize ) + if (resize) { //Allocate the memory and set it as GL_DYNAMIC_DRAW draw glBufferData(state.GetType(), size, 0, GL_DYNAMIC_DRAW); @@ -78,17 +75,15 @@ void CopyFromHandle( } //copy into opengl buffer - glBufferSubData(state.GetType(),0,size,temporaryStorage); + glBufferSubData(state.GetType(), 0, size, temporaryStorage); delete[] temporaryStorage; } -template -VTKM_CONT -void CopyFromHandle( +template +VTKM_CONT void CopyFromHandle( vtkm::cont::ArrayHandle& handle, - vtkm::interop::BufferState& state, - DeviceAdapterTag) + vtkm::interop::BufferState& state, DeviceAdapterTag) { //Specialization given that we are use an C allocated array storage tag //that allows us to directly hook into the data. We pull the data @@ -96,14 +91,13 @@ void CopyFromHandle( //from the portal to OpenGL to upload to the rendering system //This also works because we know that this class isn't used for cuda interop, //instead we are specialized - const GLsizeiptr size = - static_cast(sizeof(ValueType)) * - static_cast(handle.GetNumberOfValues()); + const GLsizeiptr size = static_cast(sizeof(ValueType)) * + static_cast(handle.GetNumberOfValues()); //Determine if we need to reallocate the buffer state.SetSize(size); const bool resize = state.ShouldRealloc(size); - if( resize ) + if (resize) { //Allocate the memory and set it as GL_DYNAMIC_DRAW draw glBufferData(state.GetType(), size, 0, GL_DYNAMIC_DRAW); @@ -112,10 +106,9 @@ void CopyFromHandle( } //Allocate the memory and set it as static draw and copy into opengl - const ValueType* memory = &(*vtkm::cont::ArrayPortalToIteratorBegin( - handle.PrepareForInput(DeviceAdapterTag()))); - glBufferSubData(state.GetType(),0,size,memory); - + const ValueType* memory = + &(*vtkm::cont::ArrayPortalToIteratorBegin(handle.PrepareForInput(DeviceAdapterTag()))); + glBufferSubData(state.GetType(), 0, size, memory); } } //namespace detail @@ -125,53 +118,51 @@ void CopyFromHandle( /// \c TransferToOpenGL manages to transfer the contents of an ArrayHandle /// to OpenGL as efficiently as possible. /// -template +template class TransferToOpenGL { public: - VTKM_CONT explicit TransferToOpenGL(BufferState& state): - State(state) + VTKM_CONT explicit TransferToOpenGL(BufferState& state) + : State(state) { - if( !this->State.HasType() ) + if (!this->State.HasType()) { - this->State.DeduceAndSetType( ValueType() ); + this->State.DeduceAndSetType(ValueType()); } } - template< typename StorageTag > - VTKM_CONT - void Transfer ( - vtkm::cont::ArrayHandle& handle) const + template + VTKM_CONT void Transfer(vtkm::cont::ArrayHandle& handle) const { - //make a buffer for the handle if the user has forgotten too - if(!glIsBuffer(*this->State.GetHandle())) - { - glGenBuffers(1, this->State.GetHandle()); + //make a buffer for the handle if the user has forgotten too + if (!glIsBuffer(*this->State.GetHandle())) + { + glGenBuffers(1, this->State.GetHandle()); + } + + //bind the buffer to the given buffer type + glBindBuffer(this->State.GetType(), *this->State.GetHandle()); + + //transfer the data. + //the primary concern that we have at this point is data locality and + //the type of storage. Our options include using CopyInto and provide a + //temporary location for the values to reside before we give it to openGL + //this works for all storage types. + // + //Second option is to call PrepareForInput and get a PortalConst in the + //exection environment. + //if we are StorageTagBasic this would allow us the ability to grab + //the raw memory value and copy those, which we know are valid and remove + //a unneeded copy. + // + //The end result is that we have CopyFromHandle which does number two + //from StorageTagBasic, and does the CopyInto for everything else + detail::CopyFromHandle(handle, this->State, DeviceAdapterTag()); } - //bind the buffer to the given buffer type - glBindBuffer(this->State.GetType(), *this->State.GetHandle()); - - //transfer the data. - //the primary concern that we have at this point is data locality and - //the type of storage. Our options include using CopyInto and provide a - //temporary location for the values to reside before we give it to openGL - //this works for all storage types. - // - //Second option is to call PrepareForInput and get a PortalConst in the - //exection environment. - //if we are StorageTagBasic this would allow us the ability to grab - //the raw memory value and copy those, which we know are valid and remove - //a unneeded copy. - // - //The end result is that we have CopyFromHandle which does number two - //from StorageTagBasic, and does the CopyInto for everything else - detail::CopyFromHandle(handle, this->State, DeviceAdapterTag()); - } private: vtkm::interop::BufferState& State; }; - } } } //namespace vtkm::interop::internal @@ -184,5 +175,4 @@ private: #include #endif - #endif //vtk_m_interop_internal_TransferToOpenGL_h diff --git a/vtkm/interop/internal/testing/UnitTestBufferTypePicker.cxx b/vtkm/interop/internal/testing/UnitTestBufferTypePicker.cxx index 54498b9d6..c46a4782d 100644 --- a/vtkm/interop/internal/testing/UnitTestBufferTypePicker.cxx +++ b/vtkm/interop/internal/testing/UnitTestBufferTypePicker.cxx @@ -36,9 +36,9 @@ void TestBufferTypePicker() type = vtkm::interop::internal::BufferTypePicker(vtkmUint()); VTKM_TEST_ASSERT(type == GL_ELEMENT_ARRAY_BUFFER, "Bad OpenGL Buffer Type"); - type = vtkm::interop::internal::BufferTypePicker(vtkm::Vec()); + type = vtkm::interop::internal::BufferTypePicker(vtkm::Vec()); VTKM_TEST_ASSERT(type == GL_ARRAY_BUFFER, "Bad OpenGL Buffer Type"); - type = vtkm::interop::internal::BufferTypePicker(vtkm::Vec()); + type = vtkm::interop::internal::BufferTypePicker(vtkm::Vec()); VTKM_TEST_ASSERT(type == GL_ARRAY_BUFFER, "Bad OpenGL Buffer Type"); type = vtkm::interop::internal::BufferTypePicker(vtkm::FloatDefault()); VTKM_TEST_ASSERT(type == GL_ARRAY_BUFFER, "Bad OpenGL Buffer Type"); @@ -49,8 +49,7 @@ void TestBufferTypePicker() } } - -int UnitTestBufferTypePicker(int, char *[]) +int UnitTestBufferTypePicker(int, char* []) { - return vtkm::cont::testing::Testing::Run(TestBufferTypePicker); + return vtkm::cont::testing::Testing::Run(TestBufferTypePicker); } diff --git a/vtkm/interop/internal/testing/UnitTestOpenGLHeaders.cxx b/vtkm/interop/internal/testing/UnitTestOpenGLHeaders.cxx index 23e67d914..14a49733b 100644 --- a/vtkm/interop/internal/testing/UnitTestOpenGLHeaders.cxx +++ b/vtkm/interop/internal/testing/UnitTestOpenGLHeaders.cxx @@ -20,7 +20,8 @@ #include #include -namespace { +namespace +{ void TestOpenGLHeaders() { #if defined(GL_VERSION_1_3) && (GL_VERSION_1_3 == 1) @@ -29,15 +30,14 @@ void TestOpenGLHeaders() GLenum e = GL_ELEMENT_ARRAY_BUFFER; GLuint u = 1; u = u * e; - (void) u; + (void)u; #else unable_to_find_required_gl_version(); #endif } - } -int UnitTestOpenGLHeaders(int, char *[]) +int UnitTestOpenGLHeaders(int, char* []) { - return vtkm::cont::testing::Testing::Run(TestOpenGLHeaders); + return vtkm::cont::testing::Testing::Run(TestOpenGLHeaders); } diff --git a/vtkm/interop/testing/TestingOpenGLInterop.h b/vtkm/interop/testing/TestingOpenGLInterop.h index 0a58fb7ce..b79b29680 100644 --- a/vtkm/interop/testing/TestingOpenGLInterop.h +++ b/vtkm/interop/testing/TestingOpenGLInterop.h @@ -34,93 +34,87 @@ #include #include - -namespace vtkm { -namespace interop { -namespace testing { +namespace vtkm +{ +namespace interop +{ +namespace testing +{ /// This class has a single static member, Run, that tests the templated /// DeviceAdapter for support for opengl interop. /// -template< class DeviceAdapterTag, - class StorageTag = VTKM_DEFAULT_STORAGE_TAG> +template struct TestingOpenGLInterop { private: //fill the array with a collection of values and return it wrapped in //an vtkm array handle - template - static - vtkm::cont::ArrayHandle - FillArray(std::vector& data, std::size_t length) + template + static vtkm::cont::ArrayHandle FillArray(std::vector& data, std::size_t length) { typedef typename std::vector::iterator iterator; //make sure the data array is exactly the right length data.clear(); data.resize(length); vtkm::Id pos = 0; - for(iterator i = data.begin(); i != data.end(); ++i, ++pos) - { *i=TestValue(pos,T()); } + for (iterator i = data.begin(); i != data.end(); ++i, ++pos) + { + *i = TestValue(pos, T()); + } - std::random_shuffle(data.begin(),data.end()); + std::random_shuffle(data.begin(), data.end()); return vtkm::cont::make_ArrayHandle(data); } //Transfer the data in a vtkm ArrayHandle to open gl while making sure //we don't throw any errors - template - static - void SafelyTransferArray(ArrayHandleType array, GLuint& handle) + template + static void SafelyTransferArray(ArrayHandleType array, GLuint& handle) { try - { + { vtkm::interop::BufferState state(handle); vtkm::interop::TransferToOpenGL(array, state, DeviceAdapterTag()); - } - catch (vtkm::cont::ErrorBadAllocation &error) - { + } + catch (vtkm::cont::ErrorBadAllocation& error) + { std::cout << error.GetMessage() << std::endl; - VTKM_TEST_ASSERT(true==false, - "Got an unexpected Out Of Memory error transferring to openGL"); - } - catch (vtkm::cont::ErrorBadValue &bvError) - { + VTKM_TEST_ASSERT(true == false, + "Got an unexpected Out Of Memory error transferring to openGL"); + } + catch (vtkm::cont::ErrorBadValue& bvError) + { std::cout << bvError.GetMessage() << std::endl; - VTKM_TEST_ASSERT(true==false, - "Got an unexpected Bad Value error transferring to openGL"); - } + VTKM_TEST_ASSERT(true == false, "Got an unexpected Bad Value error transferring to openGL"); + } } - template - static - void SafelyTransferArray(ArrayHandleType array, GLuint& handle, GLenum type) + template + static void SafelyTransferArray(ArrayHandleType array, GLuint& handle, GLenum type) { try - { + { vtkm::interop::BufferState state(handle, type); vtkm::interop::TransferToOpenGL(array, state, DeviceAdapterTag()); - } - catch (vtkm::cont::ErrorBadAllocation &error) - { + } + catch (vtkm::cont::ErrorBadAllocation& error) + { std::cout << error.GetMessage() << std::endl; - VTKM_TEST_ASSERT(true==false, - "Got an unexpected Out Of Memory error transferring to openGL"); - } - catch (vtkm::cont::ErrorBadValue &bvError) - { + VTKM_TEST_ASSERT(true == false, + "Got an unexpected Out Of Memory error transferring to openGL"); + } + catch (vtkm::cont::ErrorBadValue& bvError) + { std::cout << bvError.GetMessage() << std::endl; - VTKM_TEST_ASSERT(true==false, - "Got an unexpected Bad Value error transferring to openGL"); - } + VTKM_TEST_ASSERT(true == false, "Got an unexpected Bad Value error transferring to openGL"); + } } - - //bring the data back from openGL and into a std vector. Will bind the //passed in handle to the default buffer type for the type T - template - static - std::vector CopyGLBuffer(GLuint& handle, T t) + template + static std::vector CopyGLBuffer(GLuint& handle, T t) { //get the type we used for this buffer. GLenum type = vtkm::interop::internal::BufferTypePicker(t); @@ -132,12 +126,12 @@ private: //get the size of the buffer int bytesInBuffer = 0; glGetBufferParameteriv(type, GL_BUFFER_SIZE, &bytesInBuffer); - const std::size_t size = ( static_cast(bytesInBuffer) / sizeof(T) ); + const std::size_t size = (static_cast(bytesInBuffer) / sizeof(T)); //get the buffer contents and place it into a vector std::vector data; data.resize(size); - glGetBufferSubData(type,0,bytesInBuffer,&data[0]); + glGetBufferSubData(type, 0, bytesInBuffer, &data[0]); return data; } @@ -154,16 +148,14 @@ private: //than pull down the results from the array buffer and verify //that they match the handles contents std::vector tempData; - vtkm::cont::ArrayHandle temp = - FillArray(tempData,Size); + vtkm::cont::ArrayHandle temp = FillArray(tempData, Size); //verify that the signature that doesn't have type works - SafelyTransferArray(temp,GLHandle); + SafelyTransferArray(temp, GLHandle); - GLboolean is_buffer; + GLboolean is_buffer; is_buffer = glIsBuffer(GLHandle); - VTKM_TEST_ASSERT(is_buffer==GL_TRUE, - "OpenGL buffer not filled"); + VTKM_TEST_ASSERT(is_buffer == GL_TRUE, "OpenGL buffer not filled"); std::vector returnedValues = CopyGLBuffer(GLHandle, t); @@ -171,44 +163,41 @@ private: temp.SyncControlArray(); T* expectedValues = temp.Internals->ControlArray.StealArray(); - for(std::size_t i=0; i < Size; ++i) - { - VTKM_TEST_ASSERT(test_equal(*(expectedValues+i),returnedValues[i]), - "Array Handle failed to transfer properly"); - } + for (std::size_t i = 0; i < Size; ++i) + { + VTKM_TEST_ASSERT(test_equal(*(expectedValues + i), returnedValues[i]), + "Array Handle failed to transfer properly"); + } temp.ReleaseResources(); - temp = FillArray(tempData,Size*2); + temp = FillArray(tempData, Size * 2); GLenum type = vtkm::interop::internal::BufferTypePicker(t); - SafelyTransferArray(temp,GLHandle,type); + SafelyTransferArray(temp, GLHandle, type); is_buffer = glIsBuffer(GLHandle); - VTKM_TEST_ASSERT(is_buffer==GL_TRUE, - "OpenGL buffer not filled"); + VTKM_TEST_ASSERT(is_buffer == GL_TRUE, "OpenGL buffer not filled"); returnedValues = CopyGLBuffer(GLHandle, t); //verify the results match what is in the array handle temp.SyncControlArray(); expectedValues = temp.Internals->ControlArray.StealArray(); - for(std::size_t i=0; i < Size*2; ++i) - { - VTKM_TEST_ASSERT(test_equal(*(expectedValues+i),returnedValues[i]), - "Array Handle failed to transfer properly"); - } + for (std::size_t i = 0; i < Size * 2; ++i) + { + VTKM_TEST_ASSERT(test_equal(*(expectedValues + i), returnedValues[i]), + "Array Handle failed to transfer properly"); + } //verify this work for a constant value array handle - T constantValue = TestValue(2,T()); //verified by die roll - vtkm::cont::ArrayHandleConstant constant(constantValue, - static_cast(Size) ); - SafelyTransferArray(constant,GLHandle); + T constantValue = TestValue(2, T()); //verified by die roll + vtkm::cont::ArrayHandleConstant constant(constantValue, static_cast(Size)); + SafelyTransferArray(constant, GLHandle); is_buffer = glIsBuffer(GLHandle); - VTKM_TEST_ASSERT(is_buffer==GL_TRUE, - "OpenGL buffer not filled"); + VTKM_TEST_ASSERT(is_buffer == GL_TRUE, "OpenGL buffer not filled"); returnedValues = CopyGLBuffer(GLHandle, constantValue); - for(std::size_t i=0; i < Size; ++i) - { - VTKM_TEST_ASSERT(test_equal(returnedValues[i],constantValue), - "Constant value array failed to transfer properly"); - } + for (std::size_t i = 0; i < Size; ++i) + { + VTKM_TEST_ASSERT(test_equal(returnedValues[i], constantValue), + "Constant value array failed to transfer properly"); + } } }; @@ -277,12 +266,11 @@ private: // } // }; - public: VTKM_CONT static int Run() - { + { std::cout << "TestingOpenGLInterop Run() " << std::endl; - + //verify that we can transfer basic arrays and constant value arrays to opengl vtkm::testing::Testing::TryTypes(TransferFunctor()); @@ -295,10 +283,10 @@ public: // DeviceAdapterTag() ); return 0; - } + } }; - - -} } } +} +} +} #endif //vtk_m_interop_testing_TestingOpenGLInterop_h diff --git a/vtkm/interop/testing/UnitTestTransferEGL.cxx b/vtkm/interop/testing/UnitTestTransferEGL.cxx index 7d173c188..fa7400349 100644 --- a/vtkm/interop/testing/UnitTestTransferEGL.cxx +++ b/vtkm/interop/testing/UnitTestTransferEGL.cxx @@ -18,23 +18,21 @@ // this software. //============================================================================ - //This sets up testing with the default device adapter and array container #include #include #include -int UnitTestTransferEGL(int, char *[]) +int UnitTestTransferEGL(int, char* []) { //get egl canvas to construct a context for us - vtkm::rendering::CanvasEGL canvas(1024,1024); + vtkm::rendering::CanvasEGL canvas(1024, 1024); canvas.Initialize(); canvas.Activate(); - //get glew to bind all the opengl functions - glewInit(); + //get glew to bind all the opengl functions + glewInit(); - return vtkm::interop::testing::TestingOpenGLInterop< - vtkm::cont::DeviceAdapterTagSerial >::Run(); + return vtkm::interop::testing::TestingOpenGLInterop::Run(); } diff --git a/vtkm/interop/testing/UnitTestTransferGLUT.cxx b/vtkm/interop/testing/UnitTestTransferGLUT.cxx index df40dce7e..713bc13f1 100644 --- a/vtkm/interop/testing/UnitTestTransferGLUT.cxx +++ b/vtkm/interop/testing/UnitTestTransferGLUT.cxx @@ -18,27 +18,25 @@ // this software. //============================================================================ - //This sets up testing with the default device adapter and array container #include #include #include #if (defined(VTKM_GCC) || defined(VTKM_CLANG)) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif // OpenGL Graphics includes //glew needs to go before glut #include -#if defined (__APPLE__) -# include +#if defined(__APPLE__) +#include #else -# include +#include #endif - #if defined(VTKM_GCC) && defined(VTKM_POSIX) && !defined(__APPLE__) // // 1. Some Linux distributions default linker implicitly enables the as-needed @@ -88,31 +86,32 @@ #include #define VTKM_NVIDIA_PTHREAD_WORKAROUND 1 static int vtkm_force_linking_to_pthread_to_fix_nvidia_libgl_bug() - { return static_cast(pthread_self()); } +{ + return static_cast(pthread_self()); +} #endif -int UnitTestTransferGLUT(int argc, char *argv[]) +int UnitTestTransferGLUT(int argc, char* argv[]) { //get glut to construct a context for us glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); - glutInitWindowSize(1024,1024); + glutInitWindowSize(1024, 1024); glutCreateWindow("GLUT test"); //get glew to bind all the opengl functions glewInit(); - if(!glewIsSupported("GL_VERSION_2_1")) - { + if (!glewIsSupported("GL_VERSION_2_1")) + { std::cerr << glGetString(GL_RENDERER) << std::endl; std::cerr << glGetString(GL_VERSION) << std::endl; return 1; - } + } #if defined(VTKM_NVIDIA_PTHREAD_WORKAROUND) std::cout << ::vtkm_force_linking_to_pthread_to_fix_nvidia_libgl_bug(); #endif - return vtkm::interop::testing::TestingOpenGLInterop< - vtkm::cont::DeviceAdapterTagSerial >::Run(); + return vtkm::interop::testing::TestingOpenGLInterop::Run(); } diff --git a/vtkm/interop/testing/UnitTestTransferOSMesa.cxx b/vtkm/interop/testing/UnitTestTransferOSMesa.cxx index 3429848c6..1f5b7838c 100644 --- a/vtkm/interop/testing/UnitTestTransferOSMesa.cxx +++ b/vtkm/interop/testing/UnitTestTransferOSMesa.cxx @@ -18,24 +18,21 @@ // this software. //============================================================================ - //This sets up testing with the default device adapter and array container #include #include #include -int UnitTestTransferOSMesa(int, char *[]) +int UnitTestTransferOSMesa(int, char* []) { //get osmesa canvas to construct a context for us - vtkm::rendering::CanvasOSMesa canvas(1024,1024); + vtkm::rendering::CanvasOSMesa canvas(1024, 1024); canvas.Initialize(); canvas.Activate(); - //get glew to bind all the opengl functions + //get glew to bind all the opengl functions glewInit(); - - return vtkm::interop::testing::TestingOpenGLInterop< - vtkm::cont::DeviceAdapterTagSerial >::Run(); + return vtkm::interop::testing::TestingOpenGLInterop::Run(); } diff --git a/vtkm/io/ErrorIO.h b/vtkm/io/ErrorIO.h index 4345703cd..032916b19 100644 --- a/vtkm/io/ErrorIO.h +++ b/vtkm/io/ErrorIO.h @@ -22,20 +22,24 @@ #include -namespace vtkm { -namespace io { +namespace vtkm +{ +namespace io +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKM_ALWAYS_EXPORT ErrorIO : public vtkm::cont::Error { public: - ErrorIO() { } - ErrorIO(const std::string message) : Error(message) { } + ErrorIO() {} + ErrorIO(const std::string message) + : Error(message) + { + } }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } // namespace vtkm::io diff --git a/vtkm/io/internal/Endian.h b/vtkm/io/internal/Endian.h index d417d3a0c..d1c452cc5 100644 --- a/vtkm/io/internal/Endian.h +++ b/vtkm/io/internal/Endian.h @@ -25,44 +25,46 @@ #include #include -namespace vtkm { -namespace io { -namespace internal { +namespace vtkm +{ +namespace io +{ +namespace internal +{ inline bool IsLittleEndian() { static const vtkm::Int16 i16 = 0x1; - const vtkm::Int8 *i8p = reinterpret_cast(&i16); + const vtkm::Int8* i8p = reinterpret_cast(&i16); return (*i8p == 1); } -template -inline void FlipEndianness(std::vector &buffer) +template +inline void FlipEndianness(std::vector& buffer) { - vtkm::UInt8 *bytes = reinterpret_cast(&buffer[0]); + vtkm::UInt8* bytes = reinterpret_cast(&buffer[0]); const std::size_t tsize = sizeof(T); const std::size_t bsize = buffer.size(); - for (std::size_t i = 0; i < bsize; i++, bytes+=tsize) + for (std::size_t i = 0; i < bsize; i++, bytes += tsize) { std::reverse(bytes, bytes + tsize); } } -template -inline void FlipEndianness(std::vector > &buffer) +template +inline void FlipEndianness(std::vector>& buffer) { - vtkm::UInt8 *bytes = reinterpret_cast(&buffer[0]); + vtkm::UInt8* bytes = reinterpret_cast(&buffer[0]); const std::size_t tsize = sizeof(T); const std::size_t bsize = buffer.size(); for (std::size_t i = 0; i < bsize; i++) { - for (vtkm::IdComponent j = 0; j < N; j++, bytes+=tsize) + for (vtkm::IdComponent j = 0; j < N; j++, bytes += tsize) { std::reverse(bytes, bytes + tsize); } } } - } } } // vtkm::io::internal diff --git a/vtkm/io/internal/VTKDataSetCells.h b/vtkm/io/internal/VTKDataSetCells.h index ed6685e55..436b1867c 100644 --- a/vtkm/io/internal/VTKDataSetCells.h +++ b/vtkm/io/internal/VTKDataSetCells.h @@ -29,25 +29,26 @@ #include #include - -namespace vtkm { -namespace io { -namespace internal { +namespace vtkm +{ +namespace io +{ +namespace internal +{ enum UnsupportedVTKCells { - CELL_SHAPE_POLY_VERTEX = 2, - CELL_SHAPE_POLY_LINE = 4, - CELL_SHAPE_TRIANGLE_STRIP = 6, - CELL_SHAPE_PIXEL = 8, - CELL_SHAPE_VOXEL = 11 + CELL_SHAPE_POLY_VERTEX = 2, + CELL_SHAPE_POLY_LINE = 4, + CELL_SHAPE_TRIANGLE_STRIP = 6, + CELL_SHAPE_PIXEL = 8, + CELL_SHAPE_VOXEL = 11 }; - -inline void FixupCellSet(vtkm::cont::ArrayHandle &connectivity, - vtkm::cont::ArrayHandle &numIndices, - vtkm::cont::ArrayHandle &shapes, - vtkm::cont::ArrayHandle &permutation) +inline void FixupCellSet(vtkm::cont::ArrayHandle& connectivity, + vtkm::cont::ArrayHandle& numIndices, + vtkm::cont::ArrayHandle& shapes, + vtkm::cont::ArrayHandle& permutation) { std::vector newConnectivity; std::vector newNumIndices; @@ -55,137 +56,137 @@ inline void FixupCellSet(vtkm::cont::ArrayHandle &connectivity, std::vector permutationVec; vtkm::Id connIdx = 0; - for (vtkm::Id i = 0; i < shapes.GetNumberOfValues(); ++i) + for (vtkm::Id i = 0; i < shapes.GetNumberOfValues(); ++i) { vtkm::UInt8 shape = shapes.GetPortalConstControl().Get(i); vtkm::IdComponent numInds = numIndices.GetPortalConstControl().Get(i); vtkm::cont::ArrayHandle::PortalConstControl connPortal = - connectivity.GetPortalConstControl(); + connectivity.GetPortalConstControl(); switch (shape) { - case vtkm::CELL_SHAPE_VERTEX: - case vtkm::CELL_SHAPE_LINE: - case vtkm::CELL_SHAPE_TRIANGLE: - case vtkm::CELL_SHAPE_QUAD: - case vtkm::CELL_SHAPE_TETRA: - case vtkm::CELL_SHAPE_HEXAHEDRON: - case vtkm::CELL_SHAPE_WEDGE: - case vtkm::CELL_SHAPE_PYRAMID: + case vtkm::CELL_SHAPE_VERTEX: + case vtkm::CELL_SHAPE_LINE: + case vtkm::CELL_SHAPE_TRIANGLE: + case vtkm::CELL_SHAPE_QUAD: + case vtkm::CELL_SHAPE_TETRA: + case vtkm::CELL_SHAPE_HEXAHEDRON: + case vtkm::CELL_SHAPE_WEDGE: + case vtkm::CELL_SHAPE_PYRAMID: { - newShapes.push_back(shape); - newNumIndices.push_back(numInds); - for (vtkm::IdComponent j = 0; j < numInds; ++j) - { - newConnectivity.push_back(connPortal.Get(connIdx++)); - } - permutationVec.push_back(i); - break; - } - case vtkm::CELL_SHAPE_POLYGON: - { - vtkm::IdComponent numVerts = numInds; - vtkm::UInt8 newShape = vtkm::CELL_SHAPE_POLYGON; - if (numVerts == 3) - { - newShape = vtkm::CELL_SHAPE_TRIANGLE; - } - else if (numVerts == 4) - { - newShape = vtkm::CELL_SHAPE_QUAD; - } - newShapes.push_back(newShape); - newNumIndices.push_back(numVerts); - for (vtkm::IdComponent j = 0; j < numVerts; ++j) - { - newConnectivity.push_back(connPortal.Get(connIdx++)); - } - permutationVec.push_back(i); - break; - } - case CELL_SHAPE_POLY_VERTEX: - { - vtkm::IdComponent numVerts = numInds; - for (vtkm::IdComponent j = 0; j < numVerts; ++j) - { - newShapes.push_back(vtkm::CELL_SHAPE_VERTEX); - newNumIndices.push_back(1); - newConnectivity.push_back(connPortal.Get(connIdx)); - permutationVec.push_back(i); - ++connIdx; - } - break; - } - case CELL_SHAPE_POLY_LINE: - { - vtkm::IdComponent numLines = numInds - 1; - for (vtkm::IdComponent j = 0; j < numLines; ++j) - { - newShapes.push_back(vtkm::CELL_SHAPE_LINE); - newNumIndices.push_back(2); - newConnectivity.push_back(connPortal.Get(connIdx)); - newConnectivity.push_back(connPortal.Get(connIdx+1)); - permutationVec.push_back(i); - ++connIdx; - } - connIdx += 1; - break; - } - case CELL_SHAPE_TRIANGLE_STRIP: - { - vtkm::IdComponent numTris = numInds - 2; - for (vtkm::IdComponent j = 0; j < numTris; ++j) - { - newShapes.push_back(vtkm::CELL_SHAPE_TRIANGLE); - newNumIndices.push_back(3); - if (j % 2) + newShapes.push_back(shape); + newNumIndices.push_back(numInds); + for (vtkm::IdComponent j = 0; j < numInds; ++j) { - newConnectivity.push_back(connPortal.Get(connIdx)); - newConnectivity.push_back(connPortal.Get(connIdx+1)); - newConnectivity.push_back(connPortal.Get(connIdx+2)); - } - else - { - newConnectivity.push_back(connPortal.Get(connIdx+2)); - newConnectivity.push_back(connPortal.Get(connIdx+1)); - newConnectivity.push_back(connPortal.Get(connIdx)); + newConnectivity.push_back(connPortal.Get(connIdx++)); } permutationVec.push_back(i); - ++connIdx; + break; } - connIdx += 2; - break; - } - case CELL_SHAPE_PIXEL: + case vtkm::CELL_SHAPE_POLYGON: { - newShapes.push_back(vtkm::CELL_SHAPE_QUAD); - newNumIndices.push_back(numInds); - newConnectivity.push_back(connPortal.Get(connIdx + 0)); - newConnectivity.push_back(connPortal.Get(connIdx + 1)); - newConnectivity.push_back(connPortal.Get(connIdx + 3)); - newConnectivity.push_back(connPortal.Get(connIdx + 2)); - permutationVec.push_back(i); - connIdx += 4; - break; + vtkm::IdComponent numVerts = numInds; + vtkm::UInt8 newShape = vtkm::CELL_SHAPE_POLYGON; + if (numVerts == 3) + { + newShape = vtkm::CELL_SHAPE_TRIANGLE; + } + else if (numVerts == 4) + { + newShape = vtkm::CELL_SHAPE_QUAD; + } + newShapes.push_back(newShape); + newNumIndices.push_back(numVerts); + for (vtkm::IdComponent j = 0; j < numVerts; ++j) + { + newConnectivity.push_back(connPortal.Get(connIdx++)); + } + permutationVec.push_back(i); + break; } - case CELL_SHAPE_VOXEL: + case CELL_SHAPE_POLY_VERTEX: { - newShapes.push_back(vtkm::CELL_SHAPE_HEXAHEDRON); - newNumIndices.push_back(numInds); - newConnectivity.push_back(connPortal.Get(connIdx + 0)); - newConnectivity.push_back(connPortal.Get(connIdx + 1)); - newConnectivity.push_back(connPortal.Get(connIdx + 3)); - newConnectivity.push_back(connPortal.Get(connIdx + 2)); - newConnectivity.push_back(connPortal.Get(connIdx + 4)); - newConnectivity.push_back(connPortal.Get(connIdx + 5)); - newConnectivity.push_back(connPortal.Get(connIdx + 7)); - newConnectivity.push_back(connPortal.Get(connIdx + 6)); - permutationVec.push_back(i); - connIdx += 6; - break; + vtkm::IdComponent numVerts = numInds; + for (vtkm::IdComponent j = 0; j < numVerts; ++j) + { + newShapes.push_back(vtkm::CELL_SHAPE_VERTEX); + newNumIndices.push_back(1); + newConnectivity.push_back(connPortal.Get(connIdx)); + permutationVec.push_back(i); + ++connIdx; + } + break; } - default: + case CELL_SHAPE_POLY_LINE: { - throw vtkm::io::ErrorIO("Encountered unsupported cell type"); + vtkm::IdComponent numLines = numInds - 1; + for (vtkm::IdComponent j = 0; j < numLines; ++j) + { + newShapes.push_back(vtkm::CELL_SHAPE_LINE); + newNumIndices.push_back(2); + newConnectivity.push_back(connPortal.Get(connIdx)); + newConnectivity.push_back(connPortal.Get(connIdx + 1)); + permutationVec.push_back(i); + ++connIdx; + } + connIdx += 1; + break; + } + case CELL_SHAPE_TRIANGLE_STRIP: + { + vtkm::IdComponent numTris = numInds - 2; + for (vtkm::IdComponent j = 0; j < numTris; ++j) + { + newShapes.push_back(vtkm::CELL_SHAPE_TRIANGLE); + newNumIndices.push_back(3); + if (j % 2) + { + newConnectivity.push_back(connPortal.Get(connIdx)); + newConnectivity.push_back(connPortal.Get(connIdx + 1)); + newConnectivity.push_back(connPortal.Get(connIdx + 2)); + } + else + { + newConnectivity.push_back(connPortal.Get(connIdx + 2)); + newConnectivity.push_back(connPortal.Get(connIdx + 1)); + newConnectivity.push_back(connPortal.Get(connIdx)); + } + permutationVec.push_back(i); + ++connIdx; + } + connIdx += 2; + break; + } + case CELL_SHAPE_PIXEL: + { + newShapes.push_back(vtkm::CELL_SHAPE_QUAD); + newNumIndices.push_back(numInds); + newConnectivity.push_back(connPortal.Get(connIdx + 0)); + newConnectivity.push_back(connPortal.Get(connIdx + 1)); + newConnectivity.push_back(connPortal.Get(connIdx + 3)); + newConnectivity.push_back(connPortal.Get(connIdx + 2)); + permutationVec.push_back(i); + connIdx += 4; + break; + } + case CELL_SHAPE_VOXEL: + { + newShapes.push_back(vtkm::CELL_SHAPE_HEXAHEDRON); + newNumIndices.push_back(numInds); + newConnectivity.push_back(connPortal.Get(connIdx + 0)); + newConnectivity.push_back(connPortal.Get(connIdx + 1)); + newConnectivity.push_back(connPortal.Get(connIdx + 3)); + newConnectivity.push_back(connPortal.Get(connIdx + 2)); + newConnectivity.push_back(connPortal.Get(connIdx + 4)); + newConnectivity.push_back(connPortal.Get(connIdx + 5)); + newConnectivity.push_back(connPortal.Get(connIdx + 7)); + newConnectivity.push_back(connPortal.Get(connIdx + 6)); + permutationVec.push_back(i); + connIdx += 6; + break; + } + default: + { + throw vtkm::io::ErrorIO("Encountered unsupported cell type"); } } } @@ -212,7 +213,7 @@ inline void FixupCellSet(vtkm::cont::ArrayHandle &connectivity, vtkm::cont::ArrayPortalToIteratorBegin(connectivity.GetPortalControl())); } -inline bool IsSingleShape(const vtkm::cont::ArrayHandle &shapes) +inline bool IsSingleShape(const vtkm::cont::ArrayHandle& shapes) { vtkm::cont::ArrayHandle::PortalConstControl shapesPortal = shapes.GetPortalConstControl(); @@ -226,7 +227,6 @@ inline bool IsSingleShape(const vtkm::cont::ArrayHandle &shapes) return true; } - } } } // vtkm::io::internal diff --git a/vtkm/io/internal/VTKDataSetStructures.h b/vtkm/io/internal/VTKDataSetStructures.h index 9ca3a3bd8..c439e1bc4 100644 --- a/vtkm/io/internal/VTKDataSetStructures.h +++ b/vtkm/io/internal/VTKDataSetStructures.h @@ -22,9 +22,12 @@ #include -namespace vtkm { -namespace io { -namespace internal { +namespace vtkm +{ +namespace io +{ +namespace internal +{ enum DataSetStructure { @@ -39,19 +42,17 @@ enum DataSetStructure inline const char* DataSetStructureString(int id) { - static const char *strings[] = { - "", - "STRUCTURED_POINTS", - "STRUCTURED_GRID", - "UNSTRUCTURED_GRID", - "POLYDATA", - "RECTILINEAR_GRID", - "FIELD" - }; + static const char* strings[] = { "", + "STRUCTURED_POINTS", + "STRUCTURED_GRID", + "UNSTRUCTURED_GRID", + "POLYDATA", + "RECTILINEAR_GRID", + "FIELD" }; return strings[id]; } -inline DataSetStructure DataSetStructureId(const std::string &str) +inline DataSetStructure DataSetStructureId(const std::string& str) { DataSetStructure structure = DATASET_UNKNOWN; for (int id = 1; id < 7; ++id) @@ -64,7 +65,6 @@ inline DataSetStructure DataSetStructureId(const std::string &str) return structure; } - } } } // namespace vtkm::io::internal diff --git a/vtkm/io/internal/VTKDataSetTypes.h b/vtkm/io/internal/VTKDataSetTypes.h index fbdf1d616..0d95aefed 100644 --- a/vtkm/io/internal/VTKDataSetTypes.h +++ b/vtkm/io/internal/VTKDataSetTypes.h @@ -26,9 +26,12 @@ #include #include -namespace vtkm { -namespace io { -namespace internal { +namespace vtkm +{ +namespace io +{ +namespace internal +{ enum DataType { @@ -48,24 +51,14 @@ enum DataType inline const char* DataTypeString(int id) { - static const char *strings[] = { - "", - "bit", - "unsigned_char", - "char", - "unsigned_short", - "short", - "unsigned_int", - "int", - "unsigned_long", - "long", - "float", - "double" + static const char* strings[] = { + "", "bit", "unsigned_char", "char", "unsigned_short", "short", "unsigned_int", + "int", "unsigned_long", "long", "float", "double" }; return strings[id]; } -inline DataType DataTypeId(const std::string &str) +inline DataType DataTypeId(const std::string& str) { DataType type = DTYPE_UNKNOWN; for (int id = 1; id < 12; ++id) @@ -79,45 +72,40 @@ inline DataType DataTypeId(const std::string &str) return type; } - struct DummyBitType { // Needs to work with streams' << operator - operator bool() const - { - return false; - } + operator bool() const { return false; } }; class ColorChannel8 { public: - ColorChannel8() : Data() - { } - ColorChannel8(vtkm::UInt8 val) : Data(val) - { } + ColorChannel8() + : Data() + { + } + ColorChannel8(vtkm::UInt8 val) + : Data(val) + { + } ColorChannel8(vtkm::Float32 val) : Data(static_cast(std::min(std::max(val, 1.0f), 0.0f) * 255)) - { } - operator vtkm::Float32() const { - return static_cast(this->Data)/255.0f; - } - operator vtkm::UInt8() const - { - return this->Data; } + operator vtkm::Float32() const { return static_cast(this->Data) / 255.0f; } + operator vtkm::UInt8() const { return this->Data; } private: vtkm::UInt8 Data; }; -inline std::ostream& operator<<(std::ostream& out, const ColorChannel8 &val) +inline std::ostream& operator<<(std::ostream& out, const ColorChannel8& val) { return out << static_cast(val); } -inline std::istream& operator>>(std::istream& in, ColorChannel8 &val) +inline std::istream& operator>>(std::istream& in, ColorChannel8& val) { vtkm::Float32 fval; in >> fval; @@ -125,127 +113,136 @@ inline std::istream& operator>>(std::istream& in, ColorChannel8 &val) return in; } - -template struct DataTypeName +template +struct DataTypeName { static const char* Name() { return "unknown"; } }; -template <> struct DataTypeName +template <> +struct DataTypeName { static const char* Name() { return "bit"; } }; -template <> struct DataTypeName +template <> +struct DataTypeName { static const char* Name() { return "char"; } }; -template <> struct DataTypeName +template <> +struct DataTypeName { static const char* Name() { return "unsigned_char"; } }; -template <> struct DataTypeName +template <> +struct DataTypeName { static const char* Name() { return "short"; } }; -template <> struct DataTypeName +template <> +struct DataTypeName { static const char* Name() { return "unsigned_short"; } }; -template <> struct DataTypeName +template <> +struct DataTypeName { static const char* Name() { return "int"; } }; -template <> struct DataTypeName +template <> +struct DataTypeName { static const char* Name() { return "unsigned_int"; } }; -template <> struct DataTypeName +template <> +struct DataTypeName { static const char* Name() { return "long"; } }; -template <> struct DataTypeName +template <> +struct DataTypeName { static const char* Name() { return "unsigned_long"; } }; -template <> struct DataTypeName +template <> +struct DataTypeName { static const char* Name() { return "float"; } }; -template <> struct DataTypeName +template <> +struct DataTypeName { static const char* Name() { return "double"; } }; - template -inline void SelectVecTypeAndCall(T, vtkm::IdComponent numComponents, const Functor &functor) +inline void SelectVecTypeAndCall(T, vtkm::IdComponent numComponents, const Functor& functor) { switch (numComponents) { - case 1: - functor(T()); - break; - case 2: - functor(vtkm::Vec()); - break; - case 3: - functor(vtkm::Vec()); - break; - case 4: - functor(vtkm::Vec()); - break; - case 9: - functor(vtkm::Vec()); - break; - default: - functor(numComponents, T()); - break; + case 1: + functor(T()); + break; + case 2: + functor(vtkm::Vec()); + break; + case 3: + functor(vtkm::Vec()); + break; + case 4: + functor(vtkm::Vec()); + break; + case 9: + functor(vtkm::Vec()); + break; + default: + functor(numComponents, T()); + break; } } template inline void SelectTypeAndCall(DataType dtype, vtkm::IdComponent numComponents, - const Functor &functor) + const Functor& functor) { switch (dtype) { - case DTYPE_BIT: - SelectVecTypeAndCall(DummyBitType(), numComponents, functor); - break; - case DTYPE_UNSIGNED_CHAR: - SelectVecTypeAndCall(vtkm::UInt8(), numComponents, functor); - break; - case DTYPE_CHAR: - SelectVecTypeAndCall(vtkm::Int8(), numComponents, functor); - break; - case DTYPE_UNSIGNED_SHORT: - SelectVecTypeAndCall(vtkm::UInt16(), numComponents, functor); - break; - case DTYPE_SHORT: - SelectVecTypeAndCall(vtkm::Int16(), numComponents, functor); - break; - case DTYPE_UNSIGNED_INT: - SelectVecTypeAndCall(vtkm::UInt32(), numComponents, functor); - break; - case DTYPE_INT: - SelectVecTypeAndCall(vtkm::Int32(), numComponents, functor); - break; - case DTYPE_UNSIGNED_LONG: - SelectVecTypeAndCall(vtkm::UInt64(), numComponents, functor); - break; - case DTYPE_LONG: - SelectVecTypeAndCall(vtkm::Int64(), numComponents, functor); - break; - case DTYPE_FLOAT: - SelectVecTypeAndCall(vtkm::Float32(), numComponents, functor); - break; - case DTYPE_DOUBLE: - SelectVecTypeAndCall(vtkm::Float64(), numComponents, functor); - break; - default: - assert(false); + case DTYPE_BIT: + SelectVecTypeAndCall(DummyBitType(), numComponents, functor); + break; + case DTYPE_UNSIGNED_CHAR: + SelectVecTypeAndCall(vtkm::UInt8(), numComponents, functor); + break; + case DTYPE_CHAR: + SelectVecTypeAndCall(vtkm::Int8(), numComponents, functor); + break; + case DTYPE_UNSIGNED_SHORT: + SelectVecTypeAndCall(vtkm::UInt16(), numComponents, functor); + break; + case DTYPE_SHORT: + SelectVecTypeAndCall(vtkm::Int16(), numComponents, functor); + break; + case DTYPE_UNSIGNED_INT: + SelectVecTypeAndCall(vtkm::UInt32(), numComponents, functor); + break; + case DTYPE_INT: + SelectVecTypeAndCall(vtkm::Int32(), numComponents, functor); + break; + case DTYPE_UNSIGNED_LONG: + SelectVecTypeAndCall(vtkm::UInt64(), numComponents, functor); + break; + case DTYPE_LONG: + SelectVecTypeAndCall(vtkm::Int64(), numComponents, functor); + break; + case DTYPE_FLOAT: + SelectVecTypeAndCall(vtkm::Float32(), numComponents, functor); + break; + case DTYPE_DOUBLE: + SelectVecTypeAndCall(vtkm::Float64(), numComponents, functor); + break; + default: + assert(false); } } - } } } // namespace vtkm::io::internal diff --git a/vtkm/io/reader/VTKDataSetReader.h b/vtkm/io/reader/VTKDataSetReader.h index 525c51d9b..5bf1c0974 100644 --- a/vtkm/io/reader/VTKDataSetReader.h +++ b/vtkm/io/reader/VTKDataSetReader.h @@ -29,20 +29,24 @@ #include -namespace vtkm { -namespace io { -namespace reader { +namespace vtkm +{ +namespace io +{ +namespace reader +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKDataSetReader : public VTKDataSetReaderBase { public: - explicit VTKDataSetReader(const char *fileName) + explicit VTKDataSetReader(const char* fileName) : VTKDataSetReaderBase(fileName) - { } + { + } - virtual void PrintSummary(std::ostream &out) const + virtual void PrintSummary(std::ostream& out) const { if (this->Reader) { @@ -71,23 +75,23 @@ private: { switch (this->DataFile->Structure) { - case vtkm::io::internal::DATASET_STRUCTURED_POINTS: - this->Reader.reset(new VTKStructuredPointsReader("")); - break; - case vtkm::io::internal::DATASET_STRUCTURED_GRID: - this->Reader.reset(new VTKStructuredGridReader("")); - break; - case vtkm::io::internal::DATASET_RECTILINEAR_GRID: - this->Reader.reset(new VTKRectilinearGridReader("")); - break; - case vtkm::io::internal::DATASET_POLYDATA: - this->Reader.reset(new VTKPolyDataReader("")); - break; - case vtkm::io::internal::DATASET_UNSTRUCTURED_GRID: - this->Reader.reset(new VTKUnstructuredGridReader("")); - break; - default: - throw vtkm::io::ErrorIO("Unsupported DataSet type."); + case vtkm::io::internal::DATASET_STRUCTURED_POINTS: + this->Reader.reset(new VTKStructuredPointsReader("")); + break; + case vtkm::io::internal::DATASET_STRUCTURED_GRID: + this->Reader.reset(new VTKStructuredGridReader("")); + break; + case vtkm::io::internal::DATASET_RECTILINEAR_GRID: + this->Reader.reset(new VTKRectilinearGridReader("")); + break; + case vtkm::io::internal::DATASET_POLYDATA: + this->Reader.reset(new VTKPolyDataReader("")); + break; + case vtkm::io::internal::DATASET_UNSTRUCTURED_GRID: + this->Reader.reset(new VTKUnstructuredGridReader("")); + break; + default: + throw vtkm::io::ErrorIO("Unsupported DataSet type."); } this->TransferDataFile(*this->Reader.get()); @@ -99,7 +103,6 @@ private: }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } } // vtkm::io::reader diff --git a/vtkm/io/reader/VTKDataSetReaderBase.h b/vtkm/io/reader/VTKDataSetReaderBase.h index 8fc3ddd4a..7416d1a17 100644 --- a/vtkm/io/reader/VTKDataSetReaderBase.h +++ b/vtkm/io/reader/VTKDataSetReaderBase.h @@ -39,12 +39,15 @@ #include #include +namespace vtkm +{ +namespace io +{ +namespace reader +{ -namespace vtkm { -namespace io { -namespace reader { - -namespace internal { +namespace internal +{ struct VTKDataSetFile { @@ -56,7 +59,7 @@ struct VTKDataSetFile std::ifstream Stream; }; -inline void PrintVTKDataFileSummary(const VTKDataSetFile &df, std::ostream &out) +inline void PrintVTKDataFileSummary(const VTKDataSetFile& df, std::ostream& out) { out << "\tFile: " << df.FileName << std::endl; out << "\tVersion: " << df.Version[0] << "." << df.Version[0] << std::endl; @@ -66,7 +69,6 @@ inline void PrintVTKDataFileSummary(const VTKDataSetFile &df, std::ostream &out) << std::endl; } - inline void parseAssert(bool condition) { if (!condition) @@ -75,98 +77,170 @@ inline void parseAssert(bool condition) } } - -template struct StreamIOType { typedef T Type; }; -template <> struct StreamIOType { typedef vtkm::Int16 Type; }; -template <> struct StreamIOType { typedef vtkm::UInt16 Type; }; - +template +struct StreamIOType +{ + typedef T Type; +}; +template <> +struct StreamIOType +{ + typedef vtkm::Int16 Type; +}; +template <> +struct StreamIOType +{ + typedef vtkm::UInt16 Type; +}; // Since Fields and DataSets store data in the default DynamicArrayHandle, convert // the data to the closest type supported by default. The following will // need to be updated if DynamicArrayHandle or TypeListTagCommon changes. -template struct ClosestCommonType { typedef T Type; }; -template <> struct ClosestCommonType { typedef vtkm::Int32 Type; }; -template <> struct ClosestCommonType { typedef vtkm::Int32 Type; }; -template <> struct ClosestCommonType { typedef vtkm::Int32 Type; }; -template <> struct ClosestCommonType { typedef vtkm::Int32 Type; }; -template <> struct ClosestCommonType { typedef vtkm::Int64 Type; }; -template <> struct ClosestCommonType { typedef vtkm::Int64 Type; }; - -template struct ClosestFloat { typedef T Type; }; -template <> struct ClosestFloat { typedef vtkm::Float32 Type; }; -template <> struct ClosestFloat { typedef vtkm::Float32 Type; }; -template <> struct ClosestFloat { typedef vtkm::Float32 Type; }; -template <> struct ClosestFloat { typedef vtkm::Float32 Type; }; -template <> struct ClosestFloat { typedef vtkm::Float64 Type; }; -template <> struct ClosestFloat { typedef vtkm::Float64 Type; }; -template <> struct ClosestFloat { typedef vtkm::Float64 Type; }; -template <> struct ClosestFloat { typedef vtkm::Float64 Type; }; +template +struct ClosestCommonType +{ + typedef T Type; +}; +template <> +struct ClosestCommonType +{ + typedef vtkm::Int32 Type; +}; +template <> +struct ClosestCommonType +{ + typedef vtkm::Int32 Type; +}; +template <> +struct ClosestCommonType +{ + typedef vtkm::Int32 Type; +}; +template <> +struct ClosestCommonType +{ + typedef vtkm::Int32 Type; +}; +template <> +struct ClosestCommonType +{ + typedef vtkm::Int64 Type; +}; +template <> +struct ClosestCommonType +{ + typedef vtkm::Int64 Type; +}; template -vtkm::cont::DynamicArrayHandle CreateDynamicArrayHandle(const std::vector &vec) +struct ClosestFloat +{ + typedef T Type; +}; +template <> +struct ClosestFloat +{ + typedef vtkm::Float32 Type; +}; +template <> +struct ClosestFloat +{ + typedef vtkm::Float32 Type; +}; +template <> +struct ClosestFloat +{ + typedef vtkm::Float32 Type; +}; +template <> +struct ClosestFloat +{ + typedef vtkm::Float32 Type; +}; +template <> +struct ClosestFloat +{ + typedef vtkm::Float64 Type; +}; +template <> +struct ClosestFloat +{ + typedef vtkm::Float64 Type; +}; +template <> +struct ClosestFloat +{ + typedef vtkm::Float64 Type; +}; +template <> +struct ClosestFloat +{ + typedef vtkm::Float64 Type; +}; + +template +vtkm::cont::DynamicArrayHandle CreateDynamicArrayHandle(const std::vector& vec) { switch (vtkm::VecTraits::NUM_COMPONENTS) { - case 1: + case 1: { - typedef typename ClosestCommonType::Type CommonType; - if (!std::is_same::value) - { - std::cerr << "Type " << vtkm::io::internal::DataTypeName::Name() - << " is currently unsupported. Converting to " - << vtkm::io::internal::DataTypeName::Name() << "." - << std::endl; - } - - vtkm::cont::ArrayHandle output; - output.Allocate(static_cast(vec.size())); - for (vtkm::Id i = 0; i < output.GetNumberOfValues(); ++i) - { - output.GetPortalControl().Set(i, - static_cast(vec[static_cast(i)])); - } - - return vtkm::cont::DynamicArrayHandle(output); - } - case 2: - case 3: - { - typedef typename vtkm::VecTraits::ComponentType InComponentType; - typedef typename ClosestFloat::Type OutComponentType; - typedef vtkm::Vec CommonType; - if (!std::is_same::value) - { - std::cerr << "Type " << vtkm::io::internal::DataTypeName::Name() - << "[" << vtkm::VecTraits::NUM_COMPONENTS << "] " - << "is currently unsupported. Converting to " - << vtkm::io::internal::DataTypeName::Name() << "[3]." - << std::endl; - } - - vtkm::cont::ArrayHandle output; - output.Allocate(static_cast(vec.size())); - for (vtkm::Id i = 0; i < output.GetNumberOfValues(); ++i) - { - CommonType outval = CommonType(); - for (vtkm::IdComponent j = 0; j < vtkm::VecTraits::NUM_COMPONENTS; ++j) + typedef typename ClosestCommonType::Type CommonType; + if (!std::is_same::value) { - outval[j] = static_cast( - vtkm::VecTraits::GetComponent(vec[static_cast(i)], j)); + std::cerr << "Type " << vtkm::io::internal::DataTypeName::Name() + << " is currently unsupported. Converting to " + << vtkm::io::internal::DataTypeName::Name() << "." << std::endl; } - output.GetPortalControl().Set(i, outval); - } - return vtkm::cont::DynamicArrayHandle(output); + vtkm::cont::ArrayHandle output; + output.Allocate(static_cast(vec.size())); + for (vtkm::Id i = 0; i < output.GetNumberOfValues(); ++i) + { + output.GetPortalControl().Set(i, static_cast(vec[static_cast(i)])); + } + + return vtkm::cont::DynamicArrayHandle(output); } - default: + case 2: + case 3: { - std::cerr << "Only 1, 2, or 3 components supported. Skipping." << std::endl; - return vtkm::cont::DynamicArrayHandle(vtkm::cont::ArrayHandle()); + typedef typename vtkm::VecTraits::ComponentType InComponentType; + typedef typename ClosestFloat::Type OutComponentType; + typedef vtkm::Vec CommonType; + if (!std::is_same::value) + { + std::cerr << "Type " << vtkm::io::internal::DataTypeName::Name() << "[" + << vtkm::VecTraits::NUM_COMPONENTS << "] " + << "is currently unsupported. Converting to " + << vtkm::io::internal::DataTypeName::Name() << "[3]." + << std::endl; + } + + vtkm::cont::ArrayHandle output; + output.Allocate(static_cast(vec.size())); + for (vtkm::Id i = 0; i < output.GetNumberOfValues(); ++i) + { + CommonType outval = CommonType(); + for (vtkm::IdComponent j = 0; j < vtkm::VecTraits::NUM_COMPONENTS; ++j) + { + outval[j] = static_cast( + vtkm::VecTraits::GetComponent(vec[static_cast(i)], j)); + } + output.GetPortalControl().Set(i, outval); + } + + return vtkm::cont::DynamicArrayHandle(output); + } + default: + { + std::cerr << "Only 1, 2, or 3 components supported. Skipping." << std::endl; + return vtkm::cont::DynamicArrayHandle(vtkm::cont::ArrayHandle()); } } } -inline vtkm::cont::DynamicCellSet CreateCellSetStructured(const vtkm::Id3 &dim) +inline vtkm::cont::DynamicCellSet CreateCellSetStructured(const vtkm::Id3& dim) { if (dim[0] > 1 && dim[1] > 1 && dim[2] > 1) { @@ -205,14 +279,15 @@ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKDataSetReaderBase { public: - explicit VTKDataSetReaderBase(const char *fileName) - : DataFile(new internal::VTKDataSetFile), DataSet(), Loaded(false) + explicit VTKDataSetReaderBase(const char* fileName) + : DataFile(new internal::VTKDataSetFile) + , DataSet() + , Loaded(false) { this->DataFile->FileName = fileName; } - virtual ~VTKDataSetReaderBase() - { } + virtual ~VTKDataSetReaderBase() {} const vtkm::cont::DataSet& ReadDataSet() { @@ -226,7 +301,7 @@ public: this->CloseFile(); this->Loaded = true; } - catch (std::ifstream::failure &e) + catch (std::ifstream::failure& e) { std::string message("IO Error: "); throw vtkm::io::ErrorIO(message + e.what()); @@ -236,12 +311,9 @@ public: return this->DataSet; } - const vtkm::cont::DataSet& GetDataSet() const - { - return this->DataSet; - } + const vtkm::cont::DataSet& GetDataSet() const { return this->DataSet; } - virtual void PrintSummary(std::ostream &out) const + virtual void PrintSummary(std::ostream& out) const { out << "VTKDataSetReader" << std::endl; PrintVTKDataFileSummary(*this->DataFile.get(), out); @@ -258,12 +330,11 @@ protected: vtkm::cont::DynamicArrayHandle points; this->DoReadDynamicArray(dataType, numPoints, 3, points); - this->DataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", points)); + this->DataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", points)); } - void ReadCells(vtkm::cont::ArrayHandle &connectivity, - vtkm::cont::ArrayHandle &numIndices) + void ReadCells(vtkm::cont::ArrayHandle& connectivity, + vtkm::cont::ArrayHandle& numIndices) { vtkm::Id numCells, numInts; this->DataFile->Stream >> numCells >> numInts >> std::ws; @@ -274,7 +345,7 @@ protected: std::vector buffer(static_cast(numInts)); this->ReadArray(buffer); - vtkm::Int32 *buffp = &buffer[0]; + vtkm::Int32* buffp = &buffer[0]; vtkm::cont::ArrayHandle::PortalControl connectivityPortal = connectivity.GetPortalControl(); vtkm::cont::ArrayHandle::PortalControl numIndicesPortal = @@ -290,7 +361,7 @@ protected: } } - void ReadShapes(vtkm::cont::ArrayHandle &shapes) + void ReadShapes(vtkm::cont::ArrayHandle& shapes) { std::string tag; vtkm::Id numCells; @@ -301,9 +372,8 @@ protected: std::vector buffer(static_cast(numCells)); this->ReadArray(buffer); - vtkm::Int32 *buffp = &buffer[0]; - vtkm::cont::ArrayHandle::PortalControl shapesPortal = - shapes.GetPortalControl(); + vtkm::Int32* buffp = &buffer[0]; + vtkm::cont::ArrayHandle::PortalControl shapesPortal = shapes.GetPortalControl(); for (vtkm::Id i = 0; i < numCells; ++i) { shapesPortal.Set(i, static_cast(*buffp++)); @@ -382,38 +452,33 @@ protected: { switch (association) { - case vtkm::cont::Field::ASSOC_POINTS: - this->DataSet.AddField(vtkm::cont::Field(name, association, data)); - break; - case vtkm::cont::Field::ASSOC_CELL_SET: - vtkm::cont::CastAndCall( data, - PermuteCellData(this->CellsPermutation, data) ); - this->DataSet.AddField( - vtkm::cont::Field(name, association, "cells", data)); - break; - default: - break; + case vtkm::cont::Field::ASSOC_POINTS: + this->DataSet.AddField(vtkm::cont::Field(name, association, data)); + break; + case vtkm::cont::Field::ASSOC_CELL_SET: + vtkm::cont::CastAndCall(data, PermuteCellData(this->CellsPermutation, data)); + this->DataSet.AddField(vtkm::cont::Field(name, association, "cells", data)); + break; + default: + break; } } } } } - void SetCellsPermutation(const vtkm::cont::ArrayHandle &permutation) + void SetCellsPermutation(const vtkm::cont::ArrayHandle& permutation) { this->CellsPermutation = permutation; } - void TransferDataFile(VTKDataSetReaderBase &reader) + void TransferDataFile(VTKDataSetReaderBase& reader) { reader.DataFile.swap(this->DataFile); this->DataFile.reset(nullptr); } - virtual void CloseFile() - { - this->DataFile->Stream.close(); - } + virtual void CloseFile() { this->DataFile->Stream.close(); } private: void OpenFile() @@ -438,8 +503,7 @@ private: } char dot; - this->DataFile->Stream >> this->DataFile->Version[0] >> dot - >> this->DataFile->Version[1]; + this->DataFile->Stream >> this->DataFile->Version[0] >> dot >> this->DataFile->Version[1]; // skip rest of the line std::string skip; std::getline(this->DataFile->Stream, skip); @@ -468,14 +532,14 @@ private: this->DataFile->Structure = vtkm::io::internal::DataSetStructureId(structStr); if (this->DataFile->Structure == vtkm::io::internal::DATASET_UNKNOWN) { - throw vtkm::io::ErrorIO("Unsupported DataSet type."); + throw vtkm::io::ErrorIO("Unsupported DataSet type."); } } virtual void Read() = 0; - void ReadScalars(std::size_t numElements, std::string &dataName, - vtkm::cont::DynamicArrayHandle &data) + void ReadScalars(std::size_t numElements, std::string& dataName, + vtkm::cont::DynamicArrayHandle& data) { std::string dataType, lookupTableName; vtkm::IdComponent numComponents = 1; @@ -488,7 +552,7 @@ private: { numComponents = std::stoi(tag); } - catch (std::invalid_argument &) + catch (std::invalid_argument&) { internal::parseAssert(false); } @@ -501,28 +565,26 @@ private: this->DoReadDynamicArray(dataType, numElements, numComponents, data); } - void ReadColorScalars(std::size_t numElements, std::string &dataName) + void ReadColorScalars(std::size_t numElements, std::string& dataName) { - std::cerr << "Support for COLOR_SCALARS is not implemented. Skipping." - << std::endl; + std::cerr << "Support for COLOR_SCALARS is not implemented. Skipping." << std::endl; std::size_t numValues; this->DataFile->Stream >> dataName >> numValues >> std::ws; this->SkipArray(numElements * numValues, vtkm::io::internal::ColorChannel8()); } - void ReadLookupTable(std::string &dataName) + void ReadLookupTable(std::string& dataName) { - std::cerr << "Support for LOOKUP_TABLE is not implemented. Skipping." - << std::endl; + std::cerr << "Support for LOOKUP_TABLE is not implemented. Skipping." << std::endl; std::size_t numEntries; this->DataFile->Stream >> dataName >> numEntries >> std::ws; this->SkipArray(numEntries, vtkm::Vec()); } - void ReadTextureCoordinates(std::size_t numElements, std::string &dataName, - vtkm::cont::DynamicArrayHandle &data) + void ReadTextureCoordinates(std::size_t numElements, std::string& dataName, + vtkm::cont::DynamicArrayHandle& data) { vtkm::IdComponent numComponents; std::string dataType; @@ -531,8 +593,8 @@ private: this->DoReadDynamicArray(dataType, numElements, numComponents, data); } - void ReadVectors(std::size_t numElements, std::string &dataName, - vtkm::cont::DynamicArrayHandle &data) + void ReadVectors(std::size_t numElements, std::string& dataName, + vtkm::cont::DynamicArrayHandle& data) { std::string dataType; this->DataFile->Stream >> dataName >> dataType >> std::ws; @@ -540,8 +602,8 @@ private: this->DoReadDynamicArray(dataType, numElements, 3, data); } - void ReadTensors(std::size_t numElements, std::string &dataName, - vtkm::cont::DynamicArrayHandle &data) + void ReadTensors(std::size_t numElements, std::string& dataName, + vtkm::cont::DynamicArrayHandle& data) { std::string dataType; this->DataFile->Stream >> dataName >> dataType >> std::ws; @@ -552,11 +614,9 @@ private: protected: //ReadFields needs to be protected so that derived readers can skip //VisIt header fields - void ReadFields(std::string &dataName, - std::vector *visitBounds = nullptr) + void ReadFields(std::string& dataName, std::vector* visitBounds = nullptr) { - std::cerr << "Support for FIELD is not implemented. Skipping." - << std::endl; + std::cerr << "Support for FIELD is not implemented. Skipping." << std::endl; vtkm::Id numArrays; this->DataFile->Stream >> dataName >> numArrays >> std::ws; @@ -565,8 +625,7 @@ protected: std::size_t numTuples; vtkm::IdComponent numComponents; std::string arrayName, dataType; - this->DataFile->Stream >> arrayName >> numComponents >> numTuples - >> dataType >> std::ws; + this->DataFile->Stream >> arrayName >> numComponents >> numTuples >> dataType >> std::ws; if (arrayName == "avtOriginalBounds" && visitBounds) { visitBounds->resize(6); @@ -585,10 +644,11 @@ private: class SkipDynamicArray { public: - SkipDynamicArray(VTKDataSetReaderBase *reader, - std::size_t numElements) - : Reader(reader), NumElements(numElements) - { } + SkipDynamicArray(VTKDataSetReaderBase* reader, std::size_t numElements) + : Reader(reader) + , NumElements(numElements) + { + } template void operator()(T) const @@ -599,23 +659,23 @@ private: template void operator()(vtkm::IdComponent numComponents, T) const { - this->Reader->SkipArray( - this->NumElements * static_cast(numComponents), T()); + this->Reader->SkipArray(this->NumElements * static_cast(numComponents), T()); } protected: - VTKDataSetReaderBase *Reader; + VTKDataSetReaderBase* Reader; std::size_t NumElements; }; class ReadDynamicArray : public SkipDynamicArray { public: - ReadDynamicArray(VTKDataSetReaderBase *reader, - std::size_t numElements, - vtkm::cont::DynamicArrayHandle &data) - : SkipDynamicArray(reader, numElements), Data(&data) - { } + ReadDynamicArray(VTKDataSetReaderBase* reader, std::size_t numElements, + vtkm::cont::DynamicArrayHandle& data) + : SkipDynamicArray(reader, numElements) + , Data(&data) + { + } template void operator()(T) const @@ -628,13 +688,13 @@ private: template void operator()(vtkm::IdComponent numComponents, T) const { - std::cerr << "Support for " << numComponents - << " components not implemented. Skipping." << std::endl; + std::cerr << "Support for " << numComponents << " components not implemented. Skipping." + << std::endl; SkipDynamicArray::operator()(numComponents, T()); } private: - vtkm::cont::DynamicArrayHandle *Data; + vtkm::cont::DynamicArrayHandle* Data; }; //Make the Array parsing methods protected so that derived classes @@ -645,15 +705,14 @@ protected: { // string is unsupported for SkipDynamicArray, so it requires some // special handling - if(dataType == "string") + if (dataType == "string") { - const vtkm::Id stringCount = - numComponents * static_cast(numElements); - for(vtkm::Id i = 0; i < stringCount; ++i) - { - std::string trash; - this->DataFile->Stream >> trash; - } + const vtkm::Id stringCount = numComponents * static_cast(numElements); + for (vtkm::Id i = 0; i < stringCount; ++i) + { + std::string trash; + this->DataFile->Stream >> trash; + } } else { @@ -661,12 +720,10 @@ protected: vtkm::io::internal::SelectTypeAndCall(typeId, numComponents, SkipDynamicArray(this, numElements)); } - } void DoReadDynamicArray(std::string dataType, std::size_t numElements, - vtkm::IdComponent numComponents, - vtkm::cont::DynamicArrayHandle &data) + vtkm::IdComponent numComponents, vtkm::cont::DynamicArrayHandle& data) { vtkm::io::internal::DataType typeId = vtkm::io::internal::DataTypeId(dataType); vtkm::io::internal::SelectTypeAndCall(typeId, numComponents, @@ -674,14 +731,14 @@ protected: } template - void ReadArray(std::vector &buffer) + void ReadArray(std::vector& buffer) { std::size_t numElements = buffer.size(); if (this->DataFile->IsBinary) { this->DataFile->Stream.read(reinterpret_cast(&buffer[0]), - static_cast(numElements * sizeof(T))); - if(vtkm::io::internal::IsLittleEndian()) + static_cast(numElements * sizeof(T))); + if (vtkm::io::internal::IsLittleEndian()) { vtkm::io::internal::FlipEndianness(buffer); } @@ -697,8 +754,7 @@ protected: { typename internal::StreamIOType::Type val; this->DataFile->Stream >> val; - vtkm::VecTraits::SetComponent(buffer[i], j, - static_cast(val)); + vtkm::VecTraits::SetComponent(buffer[i], j, static_cast(val)); } } } @@ -706,20 +762,16 @@ protected: } template - void ReadArray(std::vector > &buffer) + void ReadArray(std::vector>& buffer) { - std::cerr << "Support for data type 'bit' is not implemented. Skipping." - << std::endl; - this->SkipArray(buffer.size(), vtkm::Vec()); + std::cerr << "Support for data type 'bit' is not implemented. Skipping." << std::endl; + this->SkipArray(buffer.size(), vtkm::Vec()); buffer.clear(); } - void ReadArray(std::vector &buffer) + void ReadArray(std::vector& buffer) { - std::cerr << "Support for data type 'bit' is not implemented. Skipping." - << std::endl; + std::cerr << "Support for data type 'bit' is not implemented. Skipping." << std::endl; this->SkipArray(buffer.size(), vtkm::io::internal::DummyBitType()); buffer.clear(); } @@ -729,9 +781,8 @@ protected: { if (this->DataFile->IsBinary) { - this->DataFile->Stream.seekg( - static_cast(numElements * sizeof(T)), - std::ios_base::cur); + this->DataFile->Stream.seekg(static_cast(numElements * sizeof(T)), + std::ios_base::cur); } else { @@ -763,8 +814,7 @@ protected: if (this->DataFile->IsBinary) { numElements = (numElements + 7) / 8; - this->DataFile->Stream.seekg(static_cast(numElements), - std::ios_base::cur); + this->DataFile->Stream.seekg(static_cast(numElements), std::ios_base::cur); } else { @@ -781,15 +831,18 @@ private: class PermuteCellData { public: - PermuteCellData(const vtkm::cont::ArrayHandle &permutation, - vtkm::cont::DynamicArrayHandle &data) - : Permutation(permutation), Data(&data) - { } + PermuteCellData(const vtkm::cont::ArrayHandle& permutation, + vtkm::cont::DynamicArrayHandle& data) + : Permutation(permutation) + , Data(&data) + { + } template - void operator()(const vtkm::cont::ArrayHandle &handle) const + void operator()(const vtkm::cont::ArrayHandle& handle) const { - if(this->Permutation.GetNumberOfValues() < 1) return; + if (this->Permutation.GetNumberOfValues() < 1) + return; vtkm::cont::ArrayHandle out; out.Allocate(this->Permutation.GetNumberOfValues()); @@ -797,8 +850,7 @@ private: this->Permutation.GetPortalConstControl(); typename vtkm::cont::ArrayHandle::PortalConstControl inPortal = handle.GetPortalConstControl(); - typename vtkm::cont::ArrayHandle::PortalControl outPortal = - out.GetPortalControl(); + typename vtkm::cont::ArrayHandle::PortalControl outPortal = out.GetPortalControl(); for (vtkm::Id i = 0; i < out.GetNumberOfValues(); ++i) { outPortal.Set(i, inPortal.Get(permutationPortal.Get(i))); @@ -808,7 +860,7 @@ private: private: const vtkm::cont::ArrayHandle Permutation; - vtkm::cont::DynamicArrayHandle *Data; + vtkm::cont::DynamicArrayHandle* Data; }; protected: @@ -823,7 +875,6 @@ private: }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } } // vtkm::io::reader diff --git a/vtkm/io/reader/VTKPolyDataReader.h b/vtkm/io/reader/VTKPolyDataReader.h index 30b97d4a7..1ef9ec25e 100644 --- a/vtkm/io/reader/VTKPolyDataReader.h +++ b/vtkm/io/reader/VTKPolyDataReader.h @@ -26,15 +26,19 @@ #include "iterator" -namespace vtkm { -namespace io { -namespace reader { +namespace vtkm +{ +namespace io +{ +namespace reader +{ -namespace internal { +namespace internal +{ -template +template inline vtkm::cont::ArrayHandle ConcatinateArrayHandles( - const std::vector > &arrays) + const std::vector>& arrays) { vtkm::Id size = 0; for (std::size_t i = 0; i < arrays.size(); ++i) @@ -46,19 +50,14 @@ inline vtkm::cont::ArrayHandle ConcatinateArrayHandles( out.Allocate(size); typedef typename vtkm::cont::ArrayPortalToIterators< - typename vtkm::cont::ArrayHandle::PortalControl>::IteratorType - IteratorType; - IteratorType outp = - vtkm::cont::ArrayPortalToIteratorBegin(out.GetPortalControl()); + typename vtkm::cont::ArrayHandle::PortalControl>::IteratorType IteratorType; + IteratorType outp = vtkm::cont::ArrayPortalToIteratorBegin(out.GetPortalControl()); for (std::size_t i = 0; i < arrays.size(); ++i) { std::copy(vtkm::cont::ArrayPortalToIteratorBegin(arrays[i].GetPortalConstControl()), - vtkm::cont::ArrayPortalToIteratorEnd(arrays[i].GetPortalConstControl()), - outp); - typedef typename std::iterator_traits::difference_type - DifferenceType; - std::advance( - outp, static_cast(arrays[i].GetNumberOfValues())); + vtkm::cont::ArrayPortalToIteratorEnd(arrays[i].GetPortalConstControl()), outp); + typedef typename std::iterator_traits::difference_type DifferenceType; + std::advance(outp, static_cast(arrays[i].GetNumberOfValues())); } return out; @@ -71,9 +70,10 @@ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKPolyDataReader : public VTKDataSetReaderBase { public: - explicit VTKPolyDataReader(const char *fileName) + explicit VTKPolyDataReader(const char* fileName) : VTKDataSetReaderBase(fileName) - { } + { + } private: virtual void Read() @@ -87,7 +87,7 @@ private: //at the top of a VTK file std::string tag; this->DataFile->Stream >> tag; - if(tag == "FIELD") + if (tag == "FIELD") { std::string name; this->ReadFields(name); @@ -98,12 +98,11 @@ private: internal::parseAssert(tag == "POINTS"); this->ReadPoints(); - vtkm::Id numPoints = - this->DataSet.GetCoordinateSystem().GetData().GetNumberOfValues(); + vtkm::Id numPoints = this->DataSet.GetCoordinateSystem().GetData().GetNumberOfValues(); // Read the cellset - std::vector > connectivityArrays; - std::vector > numIndicesArrays; + std::vector> connectivityArrays; + std::vector> numIndicesArrays; std::vector shapesBuffer; while (!this->DataFile->Stream.eof()) { @@ -139,8 +138,7 @@ private: connectivityArrays.push_back(cellConnectivity); numIndicesArrays.push_back(cellNumIndices); shapesBuffer.insert(shapesBuffer.end(), - static_cast(cellNumIndices.GetNumberOfValues()), - shape); + static_cast(cellNumIndices.GetNumberOfValues()), shape); } vtkm::cont::ArrayHandle connectivity = @@ -150,7 +148,7 @@ private: vtkm::cont::ArrayHandle shapes; shapes.Allocate(static_cast(shapesBuffer.size())); std::copy(shapesBuffer.begin(), shapesBuffer.end(), - vtkm::cont::ArrayPortalToIteratorBegin(shapes.GetPortalControl())); + vtkm::cont::ArrayPortalToIteratorBegin(shapes.GetPortalControl())); vtkm::cont::ArrayHandle permutation; vtkm::io::internal::FixupCellSet(connectivity, numIndices, shapes, permutation); @@ -159,10 +157,8 @@ private: if (vtkm::io::internal::IsSingleShape(shapes)) { vtkm::cont::CellSetSingleType<> cellSet("cells"); - cellSet.Fill(numPoints, - shapes.GetPortalConstControl().Get(0), - numIndices.GetPortalConstControl().Get(0), - connectivity); + cellSet.Fill(numPoints, shapes.GetPortalConstControl().Get(0), + numIndices.GetPortalConstControl().Get(0), connectivity); this->DataSet.AddCellSet(cellSet); } else @@ -178,7 +174,6 @@ private: }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } } // namespace vtkm::io:reader diff --git a/vtkm/io/reader/VTKRectilinearGridReader.h b/vtkm/io/reader/VTKRectilinearGridReader.h index c03163ba2..a77fab0d7 100644 --- a/vtkm/io/reader/VTKRectilinearGridReader.h +++ b/vtkm/io/reader/VTKRectilinearGridReader.h @@ -22,18 +22,22 @@ #include -namespace vtkm { -namespace io { -namespace reader { +namespace vtkm +{ +namespace io +{ +namespace reader +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKRectilinearGridReader : public VTKDataSetReaderBase { public: - explicit VTKRectilinearGridReader(const char *fileName) + explicit VTKRectilinearGridReader(const char* fileName) : VTKDataSetReaderBase(fileName) - { } + { + } private: virtual void Read() @@ -45,7 +49,7 @@ private: //at the top of a VTK file std::string tag; this->DataFile->Stream >> tag; - if(tag == "FIELD") + if (tag == "FIELD") { std::string name; this->ReadFields(name); @@ -60,42 +64,40 @@ private: //Read the points. std::string dataType; std::size_t numPoints[3]; - vtkm::cont::DynamicArrayHandle X,Y,Z; + vtkm::cont::DynamicArrayHandle X, Y, Z; // Always read coordinates as vtkm::FloatDefault - std::string readDataType = - vtkm::io::internal::DataTypeName::Name(); - + std::string readDataType = vtkm::io::internal::DataTypeName::Name(); + this->DataFile->Stream >> tag >> numPoints[0] >> dataType >> std::ws; if (tag != "X_COORDINATES") throw vtkm::io::ErrorIO("X_COORDINATES tag not found"); this->DoReadDynamicArray(readDataType, numPoints[0], 1, X); - + this->DataFile->Stream >> tag >> numPoints[1] >> dataType >> std::ws; if (tag != "Y_COORDINATES") throw vtkm::io::ErrorIO("Y_COORDINATES tag not found"); this->DoReadDynamicArray(readDataType, numPoints[1], 1, Y); - + this->DataFile->Stream >> tag >> numPoints[2] >> dataType >> std::ws; if (tag != "Z_COORDINATES") throw vtkm::io::ErrorIO("Z_COORDINATES tag not found"); this->DoReadDynamicArray(readDataType, numPoints[2], 1, Z); - if (dim != vtkm::Id3(static_cast(numPoints[0]), - static_cast(numPoints[1]), + if (dim != vtkm::Id3(static_cast(numPoints[0]), static_cast(numPoints[1]), static_cast(numPoints[2]))) throw vtkm::io::ErrorIO("DIMENSIONS not equal to number of points"); - - vtkm::cont::ArrayHandleCartesianProduct< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > coords; - + + vtkm::cont::ArrayHandleCartesianProduct, + vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle> + coords; + vtkm::cont::ArrayHandle Xc, Yc, Zc; X.CopyTo(Xc); Y.CopyTo(Yc); Z.CopyTo(Zc); - coords = vtkm::cont::make_ArrayHandleCartesianProduct(Xc,Yc,Zc); + coords = vtkm::cont::make_ArrayHandleCartesianProduct(Xc, Yc, Zc); vtkm::cont::CoordinateSystem coordSys("coordinates", coords); this->DataSet.AddCoordinateSystem(coordSys); @@ -107,7 +109,6 @@ private: }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } } // namespace vtkm::io:reader diff --git a/vtkm/io/reader/VTKStructuredGridReader.h b/vtkm/io/reader/VTKStructuredGridReader.h index 32f7d56a2..caada4153 100644 --- a/vtkm/io/reader/VTKStructuredGridReader.h +++ b/vtkm/io/reader/VTKStructuredGridReader.h @@ -22,18 +22,22 @@ #include -namespace vtkm { -namespace io { -namespace reader { +namespace vtkm +{ +namespace io +{ +namespace reader +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKStructuredGridReader : public VTKDataSetReaderBase { public: - explicit VTKStructuredGridReader(const char *fileName) + explicit VTKStructuredGridReader(const char* fileName) : VTKDataSetReaderBase(fileName) - { } + { + } private: virtual void Read() @@ -48,7 +52,7 @@ private: //We need to be able to handle VisIt files which dump Field data //at the top of a VTK file this->DataFile->Stream >> tag; - if(tag == "FIELD") + if (tag == "FIELD") { std::string name; this->ReadFields(name); @@ -60,7 +64,6 @@ private: vtkm::Id3 dim; this->DataFile->Stream >> dim[0] >> dim[1] >> dim[2] >> std::ws; - this->DataSet.AddCellSet(internal::CreateCellSetStructured(dim)); // Read the points @@ -74,7 +77,6 @@ private: }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } } // namespace vtkm::io:reader diff --git a/vtkm/io/reader/VTKStructuredPointsReader.h b/vtkm/io/reader/VTKStructuredPointsReader.h index 01cb7362b..de1ea169c 100644 --- a/vtkm/io/reader/VTKStructuredPointsReader.h +++ b/vtkm/io/reader/VTKStructuredPointsReader.h @@ -22,18 +22,22 @@ #include -namespace vtkm { -namespace io { -namespace reader { +namespace vtkm +{ +namespace io +{ +namespace reader +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKStructuredPointsReader : public VTKDataSetReaderBase { public: - explicit VTKStructuredPointsReader(const char *fileName) + explicit VTKStructuredPointsReader(const char* fileName) : VTKDataSetReaderBase(fileName) - { } + { + } private: virtual void Read() @@ -60,7 +64,7 @@ private: this->ReadFields(name, &visitBounds); this->DataFile->Stream >> tag; } - if(visitBounds.empty()) + if (visitBounds.empty()) { internal::parseAssert(tag == "DIMENSIONS"); this->DataFile->Stream >> dim[0] >> dim[1] >> dim[2] >> std::ws; @@ -81,8 +85,8 @@ private: internal::parseAssert(tag == "ORIGIN"); this->DataSet.AddCellSet(internal::CreateCellSetStructured(dim)); - this->DataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", - dim, origin, spacing)); + this->DataSet.AddCoordinateSystem( + vtkm::cont::CoordinateSystem("coordinates", dim, origin, spacing)); // Read points and cell attributes this->ReadAttributes(); @@ -90,7 +94,6 @@ private: }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } } // namespace vtkm::io:reader diff --git a/vtkm/io/reader/VTKUnstructuredGridReader.h b/vtkm/io/reader/VTKUnstructuredGridReader.h index cc7c0890f..1d8bc677a 100644 --- a/vtkm/io/reader/VTKUnstructuredGridReader.h +++ b/vtkm/io/reader/VTKUnstructuredGridReader.h @@ -22,18 +22,22 @@ #include -namespace vtkm { -namespace io { -namespace reader { +namespace vtkm +{ +namespace io +{ +namespace reader +{ VTKM_SILENCE_WEAK_VTABLE_WARNING_START class VTKUnstructuredGridReader : public VTKDataSetReaderBase { public: - explicit VTKUnstructuredGridReader(const char *fileName) + explicit VTKUnstructuredGridReader(const char* fileName) : VTKDataSetReaderBase(fileName) - { } + { + } private: virtual void Read() @@ -47,7 +51,7 @@ private: //at the top of a VTK file std::string tag; this->DataFile->Stream >> tag; - if(tag == "FIELD") + if (tag == "FIELD") { std::string name; this->ReadFields(name); @@ -58,8 +62,7 @@ private: internal::parseAssert(tag == "POINTS"); this->ReadPoints(); - vtkm::Id numPoints = - this->DataSet.GetCoordinateSystem().GetData().GetNumberOfValues(); + vtkm::Id numPoints = this->DataSet.GetCoordinateSystem().GetData().GetNumberOfValues(); // Read the cellset vtkm::cont::ArrayHandle connectivity; @@ -79,10 +82,8 @@ private: if (vtkm::io::internal::IsSingleShape(shapes)) { vtkm::cont::CellSetSingleType<> cellSet("cells"); - cellSet.Fill(numPoints, - shapes.GetPortalConstControl().Get(0), - numIndices.GetPortalConstControl().Get(0), - connectivity); + cellSet.Fill(numPoints, shapes.GetPortalConstControl().Get(0), + numIndices.GetPortalConstControl().Get(0), connectivity); this->DataSet.AddCellSet(cellSet); } else @@ -98,7 +99,6 @@ private: }; VTKM_SILENCE_WEAK_VTABLE_WARNING_END - } } } // namespace vtkm::io:reader diff --git a/vtkm/io/reader/testing/UnitTestVTKDataSetReader.cxx b/vtkm/io/reader/testing/UnitTestVTKDataSetReader.cxx index f7cf06189..f0b2c1535 100644 --- a/vtkm/io/reader/testing/UnitTestVTKDataSetReader.cxx +++ b/vtkm/io/reader/testing/UnitTestVTKDataSetReader.cxx @@ -23,394 +23,388 @@ #include -namespace { +namespace +{ const char polydataAscii[] = -"# vtk DataFile Version 3.0\n" -"Cube example\n" -"ASCII\n" -"DATASET POLYDATA\n" -"POINTS 8 float\n" -"0.0 0.0 0.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0\n" -"1.0 0.0 1.0 1.0 1.0 1.0 0.0 1.0 1.0\n" -"POLYGONS 6 30\n" -"4 0 1 2 3 4 4 5 6 7 4 0 1 5 4 4 2 3 7 6 4 0 4 7 3 4 1 2 6 5\n" -"CELL_DATA 6\n" -"SCALARS cell_scalars int 1\n" -"LOOKUP_TABLE default\n" -"0 1 2 3 4 5\n" -"NORMALS cell_normals float\n" -"0 0 -1 0 0 1 0 -1 0 0 1 0 -1 0 0 1 0 0\n" -"FIELD FieldData 2\n" -"cellIds 1 6 int\n" -"0 1 2 3 4 5\n" -"faceAttributes 2 6 float\n" -"0.0 1.0 1.0 2.0 2.0 3.0 3.0 4.0 4.0 5.0 5.0 6.0\n" -"POINT_DATA 8\n" -"SCALARS sample_scalars float 1\n" -"LOOKUP_TABLE my_table\n" -"0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0\n" -"LOOKUP_TABLE my_table 8\n" -"0.0 0.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 0.0 1.0 1.0 1.0 0.0 1.0\n" -"0.0 0.0 1.0 1.0 1.0 0.0 1.0 1.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0\n"; + "# vtk DataFile Version 3.0\n" + "Cube example\n" + "ASCII\n" + "DATASET POLYDATA\n" + "POINTS 8 float\n" + "0.0 0.0 0.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0\n" + "1.0 0.0 1.0 1.0 1.0 1.0 0.0 1.0 1.0\n" + "POLYGONS 6 30\n" + "4 0 1 2 3 4 4 5 6 7 4 0 1 5 4 4 2 3 7 6 4 0 4 7 3 4 1 2 6 5\n" + "CELL_DATA 6\n" + "SCALARS cell_scalars int 1\n" + "LOOKUP_TABLE default\n" + "0 1 2 3 4 5\n" + "NORMALS cell_normals float\n" + "0 0 -1 0 0 1 0 -1 0 0 1 0 -1 0 0 1 0 0\n" + "FIELD FieldData 2\n" + "cellIds 1 6 int\n" + "0 1 2 3 4 5\n" + "faceAttributes 2 6 float\n" + "0.0 1.0 1.0 2.0 2.0 3.0 3.0 4.0 4.0 5.0 5.0 6.0\n" + "POINT_DATA 8\n" + "SCALARS sample_scalars float 1\n" + "LOOKUP_TABLE my_table\n" + "0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0\n" + "LOOKUP_TABLE my_table 8\n" + "0.0 0.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 0.0 1.0 1.0 1.0 0.0 1.0\n" + "0.0 0.0 1.0 1.0 1.0 0.0 1.0 1.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0\n"; const char polydataBin[] = -"# vtk DataFile Version 4.0\n" -"Cube example\n" -"BINARY\n" -"DATASET POLYDATA\n" -"POINTS 8 float\n" -"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" -"\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\n" -"POLYGONS 6 30\n" -"\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03" -"\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x06\x00\x00\x00\x07" -"\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x05\x00\x00\x00\x04" -"\x00\x00\x00\x04\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x07\x00\x00\x00\x06" -"\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x07\x00\x00\x00\x03" -"\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x06\x00\x00\x00\x05" -"\n" -"CELL_DATA 6\n" -"SCALARS cell_scalars int\n" -"LOOKUP_TABLE default\n" -"\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x04" -"\x00\x00\x00\x05\n" -"NORMALS cell_normals float\n" -"\x00\x00\x00\x00\x00\x00\x00\x00\xbf\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\xbf\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\xbf\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n" -"FIELD FieldData 2\n" -"cellIds 1 6 int\n" -"\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x04" -"\x00\x00\x00\x05\n" -"faceAttributes 2 6 float\n" -"\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00\x40\x00\x00\x00" -"\x40\x40\x00\x00\x40\x40\x00\x00\x40\x80\x00\x00\x40\x80\x00\x00\x40\xa0\x00\x00" -"\x40\xa0\x00\x00\x40\xc0\x00\x00\n" -"POINT_DATA 8\n" -"SCALARS sample_scalars float\n" -"LOOKUP_TABLE lookup_table\n" -"\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00\x40\x40\x00\x00\x40\x80\x00\x00" -"\x40\xa0\x00\x00\x40\xc0\x00\x00\x40\xe0\x00\x00\n" -"LOOKUP_TABLE lookup_table 8\n" -"\x00\x00\x00\xff\xff\x00\x00\xff\x00\xff\x00\xff\xff\xff\x00\xff\x00\x00\xff\xff" -"\xff\x00\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\n"; + "# vtk DataFile Version 4.0\n" + "Cube example\n" + "BINARY\n" + "DATASET POLYDATA\n" + "POINTS 8 float\n" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\n" + "POLYGONS 6 30\n" + "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03" + "\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x06\x00\x00\x00\x07" + "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x05\x00\x00\x00\x04" + "\x00\x00\x00\x04\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x07\x00\x00\x00\x06" + "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x07\x00\x00\x00\x03" + "\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x06\x00\x00\x00\x05" + "\n" + "CELL_DATA 6\n" + "SCALARS cell_scalars int\n" + "LOOKUP_TABLE default\n" + "\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x04" + "\x00\x00\x00\x05\n" + "NORMALS cell_normals float\n" + "\x00\x00\x00\x00\x00\x00\x00\x00\xbf\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\xbf\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\xbf\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n" + "FIELD FieldData 2\n" + "cellIds 1 6 int\n" + "\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x04" + "\x00\x00\x00\x05\n" + "faceAttributes 2 6 float\n" + "\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00\x40\x00\x00\x00" + "\x40\x40\x00\x00\x40\x40\x00\x00\x40\x80\x00\x00\x40\x80\x00\x00\x40\xa0\x00\x00" + "\x40\xa0\x00\x00\x40\xc0\x00\x00\n" + "POINT_DATA 8\n" + "SCALARS sample_scalars float\n" + "LOOKUP_TABLE lookup_table\n" + "\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00\x40\x40\x00\x00\x40\x80\x00\x00" + "\x40\xa0\x00\x00\x40\xc0\x00\x00\x40\xe0\x00\x00\n" + "LOOKUP_TABLE lookup_table 8\n" + "\x00\x00\x00\xff\xff\x00\x00\xff\x00\xff\x00\xff\xff\xff\x00\xff\x00\x00\xff\xff" + "\xff\x00\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\n"; -const char structuredPointsAscii[] = -"# vtk DataFile Version 3.0\n" -"Volume example\n" -"ASCII\n" -"DATASET STRUCTURED_POINTS\n" -"DIMENSIONS 3 4 6\n" -"SPACING 1 1 1\n" -"ORIGIN 0 0 0\n" -"POINT_DATA 72\n" -"SCALARS volume_scalars char 1\n" -"LOOKUP_TABLE default\n" -" 0 0 0 0 0 0 0 0 0 0 0 0\n" -" 0 5 10 15 20 25 25 20 15 10 5 0\n" -" 0 10 20 30 40 50 50 40 30 20 10 0\n" -" 0 10 20 30 40 50 50 40 30 20 10 0\n" -" 0 5 10 15 20 25 25 20 15 10 5 0\n" -" 0 0 0 0 0 0 0 0 0 0 0 0\n"; +const char structuredPointsAscii[] = "# vtk DataFile Version 3.0\n" + "Volume example\n" + "ASCII\n" + "DATASET STRUCTURED_POINTS\n" + "DIMENSIONS 3 4 6\n" + "SPACING 1 1 1\n" + "ORIGIN 0 0 0\n" + "POINT_DATA 72\n" + "SCALARS volume_scalars char 1\n" + "LOOKUP_TABLE default\n" + " 0 0 0 0 0 0 0 0 0 0 0 0\n" + " 0 5 10 15 20 25 25 20 15 10 5 0\n" + " 0 10 20 30 40 50 50 40 30 20 10 0\n" + " 0 10 20 30 40 50 50 40 30 20 10 0\n" + " 0 5 10 15 20 25 25 20 15 10 5 0\n" + " 0 0 0 0 0 0 0 0 0 0 0 0\n"; -const char structuredPointsVisItAscii[] = -"# vtk DataFile Version 3.0\n" -"Volume example\n" -"ASCII\n" -"DATASET STRUCTURED_POINTS\n" -"FIELD FieldData 3\n" -"Nek_SpectralElementData 1 4 int\n" -"8 8 8 68826 \n" -"avtOriginalBounds 1 6 double\n" -"-2 2 -2 2 -2 2 \n" -"FakeData 2 4 int\n" -"81 80 89 68826 \n" -"-81 80 65 6226 \n" -"SPACING 1 1 1\n" -"ORIGIN 0 0 0\n" -"CELL_DATA 27\n" -"VECTORS grad float\n" -"-1 -1 0 0 0 -1 0 0 -1 \n" -"1 1 0 0 0 -1 0 0 -1 \n" -"0 0 -1 0 0 -1 0 0 -1 \n" -"0 0 -1 0 0 -1 0 0 -1 \n" -"0 0 -1 0 0 -1 0 0 -1 \n" -"0 0 -1 0 0 -1 0 0 -1 \n" -"0 0 -1 0 0 -1 0 0 -1 \n" -"0 0 -1 0 0 -1 0 0 -1 \n" -"0 0 -1 0 0 -1 0 0 -1 \n"; +const char structuredPointsVisItAscii[] = "# vtk DataFile Version 3.0\n" + "Volume example\n" + "ASCII\n" + "DATASET STRUCTURED_POINTS\n" + "FIELD FieldData 3\n" + "Nek_SpectralElementData 1 4 int\n" + "8 8 8 68826 \n" + "avtOriginalBounds 1 6 double\n" + "-2 2 -2 2 -2 2 \n" + "FakeData 2 4 int\n" + "81 80 89 68826 \n" + "-81 80 65 6226 \n" + "SPACING 1 1 1\n" + "ORIGIN 0 0 0\n" + "CELL_DATA 27\n" + "VECTORS grad float\n" + "-1 -1 0 0 0 -1 0 0 -1 \n" + "1 1 0 0 0 -1 0 0 -1 \n" + "0 0 -1 0 0 -1 0 0 -1 \n" + "0 0 -1 0 0 -1 0 0 -1 \n" + "0 0 -1 0 0 -1 0 0 -1 \n" + "0 0 -1 0 0 -1 0 0 -1 \n" + "0 0 -1 0 0 -1 0 0 -1 \n" + "0 0 -1 0 0 -1 0 0 -1 \n" + "0 0 -1 0 0 -1 0 0 -1 \n"; const char structuredPointsBin[] = -"# vtk DataFile Version 4.0\n" -"Volume example\n" -"BINARY\n" -"DATASET STRUCTURED_POINTS\n" -"DIMENSIONS 3 4 6\n" -"SPACING 1 1 1\n" -"ORIGIN 0 0 0\n" -"POINT_DATA 72\n" -"SCALARS volume_scalars char\n" -"LOOKUP_TABLE default\n" -"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x0a\x0f\x14\x19\x19\x14" -"\x0f\x0a\x05\x00\x00\x0a\x14\x1e\x28\x32\x32\x28\x1e\x14\x0a\x00\x00\x0a\x14\x1e" -"\x28\x32\x32\x28\x1e\x14\x0a\x00\x00\x05\x0a\x0f\x14\x19\x19\x14\x0f\x0a\x05\x00" -"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n"; + "# vtk DataFile Version 4.0\n" + "Volume example\n" + "BINARY\n" + "DATASET STRUCTURED_POINTS\n" + "DIMENSIONS 3 4 6\n" + "SPACING 1 1 1\n" + "ORIGIN 0 0 0\n" + "POINT_DATA 72\n" + "SCALARS volume_scalars char\n" + "LOOKUP_TABLE default\n" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x0a\x0f\x14\x19\x19\x14" + "\x0f\x0a\x05\x00\x00\x0a\x14\x1e\x28\x32\x32\x28\x1e\x14\x0a\x00\x00\x0a\x14\x1e" + "\x28\x32\x32\x28\x1e\x14\x0a\x00\x00\x05\x0a\x0f\x14\x19\x19\x14\x0f\x0a\x05\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n"; const char unsturctureGridAscii[] = -"# vtk DataFile Version 3.0\n" -"Unstructured Grid Example\n" -"ASCII\n" -"DATASET UNSTRUCTURED_GRID\n" -"POINTS 26 float\n" -"0 0 0 1 0 0 2 0 0 0 1 0 1 1 0 2 1 0 0 0 1 1 0 1 2 0 1\n" -"0 1 1 1 1 1 2 1 1 0.5 1.7 0.5 1.5 1.7 0.5 0 1 2 1 1 2 2 1 2\n" -"0 1 3 1 1 3 2 1 3 0 1 4 1 1 4 2 1 4 0 1 5 1 1 5 2 1 5\n" -"CELLS 12 64\n" -"8 0 1 4 3 6 7 10 9 6 1 7 2 4 10 5 6 2 7 8 5 10 11 5 4 3 9 10 12\n" -"4 5 4 10 13 4 5 10 11 13 6 17 14 18 15 19 16 4 21 22 19 18\n" -"3 20 21 17 3 21 18 17 2 25 24 1 23\n" -"CELL_TYPES 12\n" -"12 13 13 14 10 10 6 9 5 5 3 1\n" -"POINT_DATA 26\n" -"SCALARS scalars float 1\n" -"LOOKUP_TABLE default\n" -"0 1 2 3 4 5 6 7 8 9 10 11 12\n" -"13 14 15 16 17 18 19 20 21 22 23 24 25\n" -"VECTORS vectors float\n" -"1 0 0 1 1 0 0 2 0 1 0 0 1 1 0 0 2 0 1 0 0 1 1 0 0 2 0\n" -"1 0 0 1 1 0 0 2 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1\n" -"0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1\n"; + "# vtk DataFile Version 3.0\n" + "Unstructured Grid Example\n" + "ASCII\n" + "DATASET UNSTRUCTURED_GRID\n" + "POINTS 26 float\n" + "0 0 0 1 0 0 2 0 0 0 1 0 1 1 0 2 1 0 0 0 1 1 0 1 2 0 1\n" + "0 1 1 1 1 1 2 1 1 0.5 1.7 0.5 1.5 1.7 0.5 0 1 2 1 1 2 2 1 2\n" + "0 1 3 1 1 3 2 1 3 0 1 4 1 1 4 2 1 4 0 1 5 1 1 5 2 1 5\n" + "CELLS 12 64\n" + "8 0 1 4 3 6 7 10 9 6 1 7 2 4 10 5 6 2 7 8 5 10 11 5 4 3 9 10 12\n" + "4 5 4 10 13 4 5 10 11 13 6 17 14 18 15 19 16 4 21 22 19 18\n" + "3 20 21 17 3 21 18 17 2 25 24 1 23\n" + "CELL_TYPES 12\n" + "12 13 13 14 10 10 6 9 5 5 3 1\n" + "POINT_DATA 26\n" + "SCALARS scalars float 1\n" + "LOOKUP_TABLE default\n" + "0 1 2 3 4 5 6 7 8 9 10 11 12\n" + "13 14 15 16 17 18 19 20 21 22 23 24 25\n" + "VECTORS vectors float\n" + "1 0 0 1 1 0 0 2 0 1 0 0 1 1 0 0 2 0 1 0 0 1 1 0 0 2 0\n" + "1 0 0 1 1 0 0 2 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1\n" + "0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1\n"; const char unsturctureGridVisItAscii[] = -"# vtk DataFile Version 3.0\n" -"Unstructured Grid Example\n" -"ASCII\n" -"DATASET UNSTRUCTURED_GRID\n" -"FIELD FieldData 1\n" -"Nek_SpectralElementData 1 4 int\n" -"8 8 8 68826 \n" -"POINTS 26 float\n" -"0 0 0 1 0 0 2 0 0 0 1 0 1 1 0 2 1 0 0 0 1 1 0 1 2 0 1\n" -"0 1 1 1 1 1 2 1 1 0.5 1.7 0.5 1.5 1.7 0.5 0 1 2 1 1 2 2 1 2\n" -"0 1 3 1 1 3 2 1 3 0 1 4 1 1 4 2 1 4 0 1 5 1 1 5 2 1 5\n" -"CELLS 12 64\n" -"8 0 1 4 3 6 7 10 9 6 1 7 2 4 10 5 6 2 7 8 5 10 11 5 4 3 9 10 12\n" -"4 5 4 10 13 4 5 10 11 13 6 17 14 18 15 19 16 4 21 22 19 18\n" -"3 20 21 17 3 21 18 17 2 25 24 1 23\n" -"CELL_TYPES 12\n" -"12 13 13 14 10 10 6 9 5 5 3 1\n" -"POINT_DATA 26\n" -"SCALARS scalars float 1\n" -"LOOKUP_TABLE default\n" -"0 1 2 3 4 5 6 7 8 9 10 11 12\n" -"13 14 15 16 17 18 19 20 21 22 23 24 25\n" -"VECTORS vectors float\n" -"1 0 0 1 1 0 0 2 0 1 0 0 1 1 0 0 2 0 1 0 0 1 1 0 0 2 0\n" -"1 0 0 1 1 0 0 2 0 0 1 0 0 1 0 0 0 1 0 0 1 4 5 6\n" -"9 0 1 8 0 1 7 0 1 6 0 1 5 0 1 4 0 1 3 0 1 2 0 1 1 0 1\n"; + "# vtk DataFile Version 3.0\n" + "Unstructured Grid Example\n" + "ASCII\n" + "DATASET UNSTRUCTURED_GRID\n" + "FIELD FieldData 1\n" + "Nek_SpectralElementData 1 4 int\n" + "8 8 8 68826 \n" + "POINTS 26 float\n" + "0 0 0 1 0 0 2 0 0 0 1 0 1 1 0 2 1 0 0 0 1 1 0 1 2 0 1\n" + "0 1 1 1 1 1 2 1 1 0.5 1.7 0.5 1.5 1.7 0.5 0 1 2 1 1 2 2 1 2\n" + "0 1 3 1 1 3 2 1 3 0 1 4 1 1 4 2 1 4 0 1 5 1 1 5 2 1 5\n" + "CELLS 12 64\n" + "8 0 1 4 3 6 7 10 9 6 1 7 2 4 10 5 6 2 7 8 5 10 11 5 4 3 9 10 12\n" + "4 5 4 10 13 4 5 10 11 13 6 17 14 18 15 19 16 4 21 22 19 18\n" + "3 20 21 17 3 21 18 17 2 25 24 1 23\n" + "CELL_TYPES 12\n" + "12 13 13 14 10 10 6 9 5 5 3 1\n" + "POINT_DATA 26\n" + "SCALARS scalars float 1\n" + "LOOKUP_TABLE default\n" + "0 1 2 3 4 5 6 7 8 9 10 11 12\n" + "13 14 15 16 17 18 19 20 21 22 23 24 25\n" + "VECTORS vectors float\n" + "1 0 0 1 1 0 0 2 0 1 0 0 1 1 0 0 2 0 1 0 0 1 1 0 0 2 0\n" + "1 0 0 1 1 0 0 2 0 0 1 0 0 1 0 0 0 1 0 0 1 4 5 6\n" + "9 0 1 8 0 1 7 0 1 6 0 1 5 0 1 4 0 1 3 0 1 2 0 1 1 0 1\n"; const char unsturctureGridBin[] = -"# vtk DataFile Version 4.0\n" -"Unstructured Grid Example\n" -"BINARY\n" -"DATASET UNSTRUCTURED_GRID\n" -"POINTS 26 float\n" -"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" -"\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" -"\x40\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00" -"\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" -"\x3f\x80\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00\x3f\x80\x00\x00" -"\x3f\x80\x00\x00\x3f\x00\x00\x00\x3f\xd9\x99\x9a\x3f\x00\x00\x00\x3f\xc0\x00\x00" -"\x3f\xd9\x99\x9a\x3f\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00" -"\x3f\x80\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00\x40\x00\x00\x00\x3f\x80\x00\x00" -"\x40\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x40\x00\x00\x3f\x80\x00\x00" -"\x3f\x80\x00\x00\x40\x40\x00\x00\x40\x00\x00\x00\x3f\x80\x00\x00\x40\x40\x00\x00" -"\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x80\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" -"\x40\x80\x00\x00\x40\x00\x00\x00\x3f\x80\x00\x00\x40\x80\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x40\xa0\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x40\xa0\x00\x00" -"\x40\x00\x00\x00\x3f\x80\x00\x00\x40\xa0\x00\x00\n" -"CELLS 12 64\n" -"\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x03" -"\x00\x00\x00\x06\x00\x00\x00\x07\x00\x00\x00\x0a\x00\x00\x00\x09\x00\x00\x00\x06" -"\x00\x00\x00\x01\x00\x00\x00\x07\x00\x00\x00\x02\x00\x00\x00\x04\x00\x00\x00\x0a" -"\x00\x00\x00\x05\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x07\x00\x00\x00\x08" -"\x00\x00\x00\x05\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x00\x00\x05\x00\x00\x00\x04" -"\x00\x00\x00\x03\x00\x00\x00\x09\x00\x00\x00\x0a\x00\x00\x00\x0c\x00\x00\x00\x04" -"\x00\x00\x00\x05\x00\x00\x00\x04\x00\x00\x00\x0a\x00\x00\x00\x0d\x00\x00\x00\x04" -"\x00\x00\x00\x05\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x00\x00\x0d\x00\x00\x00\x06" -"\x00\x00\x00\x11\x00\x00\x00\x0e\x00\x00\x00\x12\x00\x00\x00\x0f\x00\x00\x00\x13" -"\x00\x00\x00\x10\x00\x00\x00\x04\x00\x00\x00\x15\x00\x00\x00\x16\x00\x00\x00\x13" -"\x00\x00\x00\x12\x00\x00\x00\x03\x00\x00\x00\x14\x00\x00\x00\x15\x00\x00\x00\x11" -"\x00\x00\x00\x03\x00\x00\x00\x15\x00\x00\x00\x12\x00\x00\x00\x11\x00\x00\x00\x02" -"\x00\x00\x00\x19\x00\x00\x00\x18\x00\x00\x00\x01\x00\x00\x00\x17\n" -"CELL_TYPES 12\n" -"\x00\x00\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x0d\x00\x00\x00\x0e\x00\x00\x00\x0a" -"\x00\x00\x00\x0a\x00\x00\x00\x06\x00\x00\x00\x09\x00\x00\x00\x05\x00\x00\x00\x05" -"\x00\x00\x00\x03\x00\x00\x00\x01\n" -"POINT_DATA 26\n" -"SCALARS scalars float\n" -"LOOKUP_TABLE default\n" -"\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00\x40\x40\x00\x00\x40\x80\x00\x00" -"\x40\xa0\x00\x00\x40\xc0\x00\x00\x40\xe0\x00\x00\x41\x00\x00\x00\x41\x10\x00\x00" -"\x41\x20\x00\x00\x41\x30\x00\x00\x41\x40\x00\x00\x41\x50\x00\x00\x41\x60\x00\x00" -"\x41\x70\x00\x00\x41\x80\x00\x00\x41\x88\x00\x00\x41\x90\x00\x00\x41\x98\x00\x00" -"\x41\xa0\x00\x00\x41\xa8\x00\x00\x41\xb0\x00\x00\x41\xb8\x00\x00\x41\xc0\x00\x00" -"\x41\xc8\x00\x00\n" -"VECTORS vectors float\n" -"\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" -"\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" -"\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" -"\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" -"\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x40\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00" -"\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" -"\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" -"\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" -"\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" -"\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" -"\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\n"; + "# vtk DataFile Version 4.0\n" + "Unstructured Grid Example\n" + "BINARY\n" + "DATASET UNSTRUCTURED_GRID\n" + "POINTS 26 float\n" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" + "\x40\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00" + "\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" + "\x3f\x80\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00\x3f\x80\x00\x00" + "\x3f\x80\x00\x00\x3f\x00\x00\x00\x3f\xd9\x99\x9a\x3f\x00\x00\x00\x3f\xc0\x00\x00" + "\x3f\xd9\x99\x9a\x3f\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00" + "\x3f\x80\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00\x40\x00\x00\x00\x3f\x80\x00\x00" + "\x40\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x40\x00\x00\x3f\x80\x00\x00" + "\x3f\x80\x00\x00\x40\x40\x00\x00\x40\x00\x00\x00\x3f\x80\x00\x00\x40\x40\x00\x00" + "\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x80\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" + "\x40\x80\x00\x00\x40\x00\x00\x00\x3f\x80\x00\x00\x40\x80\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x40\xa0\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x40\xa0\x00\x00" + "\x40\x00\x00\x00\x3f\x80\x00\x00\x40\xa0\x00\x00\n" + "CELLS 12 64\n" + "\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x03" + "\x00\x00\x00\x06\x00\x00\x00\x07\x00\x00\x00\x0a\x00\x00\x00\x09\x00\x00\x00\x06" + "\x00\x00\x00\x01\x00\x00\x00\x07\x00\x00\x00\x02\x00\x00\x00\x04\x00\x00\x00\x0a" + "\x00\x00\x00\x05\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x07\x00\x00\x00\x08" + "\x00\x00\x00\x05\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x00\x00\x05\x00\x00\x00\x04" + "\x00\x00\x00\x03\x00\x00\x00\x09\x00\x00\x00\x0a\x00\x00\x00\x0c\x00\x00\x00\x04" + "\x00\x00\x00\x05\x00\x00\x00\x04\x00\x00\x00\x0a\x00\x00\x00\x0d\x00\x00\x00\x04" + "\x00\x00\x00\x05\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x00\x00\x0d\x00\x00\x00\x06" + "\x00\x00\x00\x11\x00\x00\x00\x0e\x00\x00\x00\x12\x00\x00\x00\x0f\x00\x00\x00\x13" + "\x00\x00\x00\x10\x00\x00\x00\x04\x00\x00\x00\x15\x00\x00\x00\x16\x00\x00\x00\x13" + "\x00\x00\x00\x12\x00\x00\x00\x03\x00\x00\x00\x14\x00\x00\x00\x15\x00\x00\x00\x11" + "\x00\x00\x00\x03\x00\x00\x00\x15\x00\x00\x00\x12\x00\x00\x00\x11\x00\x00\x00\x02" + "\x00\x00\x00\x19\x00\x00\x00\x18\x00\x00\x00\x01\x00\x00\x00\x17\n" + "CELL_TYPES 12\n" + "\x00\x00\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x0d\x00\x00\x00\x0e\x00\x00\x00\x0a" + "\x00\x00\x00\x0a\x00\x00\x00\x06\x00\x00\x00\x09\x00\x00\x00\x05\x00\x00\x00\x05" + "\x00\x00\x00\x03\x00\x00\x00\x01\n" + "POINT_DATA 26\n" + "SCALARS scalars float\n" + "LOOKUP_TABLE default\n" + "\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00\x40\x40\x00\x00\x40\x80\x00\x00" + "\x40\xa0\x00\x00\x40\xc0\x00\x00\x40\xe0\x00\x00\x41\x00\x00\x00\x41\x10\x00\x00" + "\x41\x20\x00\x00\x41\x30\x00\x00\x41\x40\x00\x00\x41\x50\x00\x00\x41\x60\x00\x00" + "\x41\x70\x00\x00\x41\x80\x00\x00\x41\x88\x00\x00\x41\x90\x00\x00\x41\x98\x00\x00" + "\x41\xa0\x00\x00\x41\xa8\x00\x00\x41\xb0\x00\x00\x41\xb8\x00\x00\x41\xc0\x00\x00" + "\x41\xc8\x00\x00\n" + "VECTORS vectors float\n" + "\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x40\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00\n"; const char rectilinearGrid1Ascii[] = -"# vtk DataFile Version 3.0\n" -"\n" // empty title -"ASCII\n" -"DATASET RECTILINEAR_GRID\n" -"DIMENSIONS 5 5 5\n" -"X_COORDINATES 5 float\n" -"-10 -5 0 5 10 \n" -"Y_COORDINATES 5 float\n" -"-10 -5 0 5 10 \n" -"Z_COORDINATES 5 float\n" -"-10 -5 0 5 10 \n" -"POINT_DATA 125\n" -"SCALARS var float\n" -"LOOKUP_TABLE default\n" -"2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" -"2.40193 2.81444 4.07839 3.66217 2.93755 2.52435 2.47503 3.37804 2.94413 \n" -"2.76693 2.51259 2.57481 3.09598 2.42487 2.33772 2.17323 2.44797 2.60943 \n" -"2.25704 2.5559 2.47737 3.19836 3.39212 3.01456 3.56609 3.08355 3.14302 \n" -"3.59813 3.56774 4.3679 3.30292 2.73969 2.31936 4.26606 4.35597 4.08261 \n" -"2.505 2.85494 2.99157 2.99089 2.60786 3.0034 2.6469 2.30827 2.93406 \n" -"2.65975 3.37307 2.8116 3.4624 3.76087 3.17927 3.04305 3.01835 3.37884 \n" -"4.37283 3.78191 2.97252 2.58956 3.74759 4.44983 3.09236 2.54284 2.85325 \n" -"3.18491 3.10996 2.4281 2.81014 2.93146 2.0504 2.35133 2.26906 3.002 \n" -"3.09434 3.69065 3.45153 2.93912 2.59396 2.97304 3.48548 3.70642 3.23255\n" -"2.84452 3.28152 3.35428 3.85919 3.73977 2.74961 2.85595 2.97197 2.81465 \n" -"2.3682 2.44328 2.52139 2.06677 2.12045 1.98058 2.94229 2.80975 3.07295 \n" -"2.70744 2.4395 2.56197 3.56108 3.32331 3.29935 2.85451 2.6538 2.99515 \n" -"3.15239 2.93688 2.75899 2.60132 2.58644 2.70063 2.45959 2.20553 \n" -"CELL_DATA 64\n" -"SCALARS cell_var float\n" -"LOOKUP_TABLE default\n" -"2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" -"2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" -"2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" -"2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" -"2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" -"2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" -"2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" -"0.0\n"; + "# vtk DataFile Version 3.0\n" + "\n" // empty title + "ASCII\n" + "DATASET RECTILINEAR_GRID\n" + "DIMENSIONS 5 5 5\n" + "X_COORDINATES 5 float\n" + "-10 -5 0 5 10 \n" + "Y_COORDINATES 5 float\n" + "-10 -5 0 5 10 \n" + "Z_COORDINATES 5 float\n" + "-10 -5 0 5 10 \n" + "POINT_DATA 125\n" + "SCALARS var float\n" + "LOOKUP_TABLE default\n" + "2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" + "2.40193 2.81444 4.07839 3.66217 2.93755 2.52435 2.47503 3.37804 2.94413 \n" + "2.76693 2.51259 2.57481 3.09598 2.42487 2.33772 2.17323 2.44797 2.60943 \n" + "2.25704 2.5559 2.47737 3.19836 3.39212 3.01456 3.56609 3.08355 3.14302 \n" + "3.59813 3.56774 4.3679 3.30292 2.73969 2.31936 4.26606 4.35597 4.08261 \n" + "2.505 2.85494 2.99157 2.99089 2.60786 3.0034 2.6469 2.30827 2.93406 \n" + "2.65975 3.37307 2.8116 3.4624 3.76087 3.17927 3.04305 3.01835 3.37884 \n" + "4.37283 3.78191 2.97252 2.58956 3.74759 4.44983 3.09236 2.54284 2.85325 \n" + "3.18491 3.10996 2.4281 2.81014 2.93146 2.0504 2.35133 2.26906 3.002 \n" + "3.09434 3.69065 3.45153 2.93912 2.59396 2.97304 3.48548 3.70642 3.23255\n" + "2.84452 3.28152 3.35428 3.85919 3.73977 2.74961 2.85595 2.97197 2.81465 \n" + "2.3682 2.44328 2.52139 2.06677 2.12045 1.98058 2.94229 2.80975 3.07295 \n" + "2.70744 2.4395 2.56197 3.56108 3.32331 3.29935 2.85451 2.6538 2.99515 \n" + "3.15239 2.93688 2.75899 2.60132 2.58644 2.70063 2.45959 2.20553 \n" + "CELL_DATA 64\n" + "SCALARS cell_var float\n" + "LOOKUP_TABLE default\n" + "2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" + "2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" + "2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" + "2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" + "2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" + "2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" + "2.08534 2.23463 2.22555 2.18031 2.07345 2.60855 2.94387 2.77617 2.58245 \n" + "0.0\n"; +const char rectilinearGrid2Ascii[] = "# vtk DataFile Version 3.0\n" + "\n" // empty title + "ASCII\n" + "DATASET RECTILINEAR_GRID\n" + "DIMENSIONS 3 4 2\n" + "X_COORDINATES 3 float\n" + "0 2 4\n" + "Y_COORDINATES 4 float\n" + "1 2 3 4\n" + "Z_COORDINATES 2 float\n" + "0 1\n" + "CELL_DATA 6\n" + "SCALARS cellscalar float\n" + "LOOKUP_TABLE default\n" + "1.1 7.5 1.2 1.5 2.6 8.1\n" + "POINT_DATA 24\n" + "SCALARS scalars float 1\n" + "LOOKUP_TABLE default\n" + "0 1 2 3 4 5 6 7 8 9 10 11\n" + "12 13 14 15 16 17 18 19 20 21 22 23\n"; -const char rectilinearGrid2Ascii[] = -"# vtk DataFile Version 3.0\n" -"\n" // empty title -"ASCII\n" -"DATASET RECTILINEAR_GRID\n" -"DIMENSIONS 3 4 2\n" -"X_COORDINATES 3 float\n" -"0 2 4\n" -"Y_COORDINATES 4 float\n" -"1 2 3 4\n" -"Z_COORDINATES 2 float\n" -"0 1\n" -"CELL_DATA 6\n" -"SCALARS cellscalar float\n" -"LOOKUP_TABLE default\n" -"1.1 7.5 1.2 1.5 2.6 8.1\n" -"POINT_DATA 24\n" -"SCALARS scalars float 1\n" -"LOOKUP_TABLE default\n" -"0 1 2 3 4 5 6 7 8 9 10 11\n" -"12 13 14 15 16 17 18 19 20 21 22 23\n"; - - -const char structuredGridAscii[] = -"# vtk DataFile Version 3.0\n" -"Structured Grid Example\n" -"ASCII\n" -"DATASET STRUCTURED_GRID\n" -"DIMENSIONS 3 2 1\n" -"POINTS 6 float\n" -"0 0 0 1 0 0 2 0 0 0 1 0 1 1 0 2 1 0\n" -"POINT_DATA 6\n" -"SCALARS pointvar float 1\n" -"LOOKUP_TABLE default\n" -"10.1 20.1 30.1 40.1 50.1 60.1\n" -"CELL_DATA 2\n" -"SCALARS cellvar float 1\n" -"LOOKUP_TABLE default\n" -"100.1 200.1\n"; +const char structuredGridAscii[] = "# vtk DataFile Version 3.0\n" + "Structured Grid Example\n" + "ASCII\n" + "DATASET STRUCTURED_GRID\n" + "DIMENSIONS 3 2 1\n" + "POINTS 6 float\n" + "0 0 0 1 0 0 2 0 0 0 1 0 1 1 0 2 1 0\n" + "POINT_DATA 6\n" + "SCALARS pointvar float 1\n" + "LOOKUP_TABLE default\n" + "10.1 20.1 30.1 40.1 50.1 60.1\n" + "CELL_DATA 2\n" + "SCALARS cellvar float 1\n" + "LOOKUP_TABLE default\n" + "100.1 200.1\n"; const char structuredGridBin[] = -"# vtk DataFile Version 3.0\n" -"Structured Grid Example\n" -"BINARY\n" -"DATASET STRUCTURED_GRID\n" -"DIMENSIONS 3 2 3\n" -"POINTS 18 float\n" -"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -"\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" -"\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" -"\x40\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" -"\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" -"\x40\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" -"\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" -"\x3f\x80\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" -"\x40\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" -"\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00" -"\x3f\x80\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00" -"\x40\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00" -"\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00" -"\x3f\x80\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00" -"\x40\x00\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00\n" -"CELL_DATA 4\n" -"SCALARS cellvar float\n" -"LOOKUP_TABLE default\n" -"\x42\xc8\x33\x33\x42\xc8\x66\x66\x42\xc8\x99\x9a\x42\xc8\xcc\xcd\n" -"POINT_DATA 18\n" -"SCALARS pointvar float\n" -"LOOKUP_TABLE default\n" -"\x41\x21\x99\x9a\x41\xa0\xcc\xcd\x41\xf0\xcc\xcd" -"\x42\x20\x66\x66\x42\x48\xcc\xcd\x42\x70\xcc\xcd" -"\x42\x8c\x66\x66\x42\xa0\x66\x66\x42\xb4\x99\x9a" -"\x42\xc8\x99\x9a\x42\xdc\x99\x9a\x42\xf0\x99\x9a" -"\x43\x02\x66\x66\x43\x0c\x66\x66\x43\x16\x66\x66" -"\x43\x20\x66\x66\x43\x2a\x80\x00\x43\x34\x80\x00\n"; + "# vtk DataFile Version 3.0\n" + "Structured Grid Example\n" + "BINARY\n" + "DATASET STRUCTURED_GRID\n" + "DIMENSIONS 3 2 3\n" + "POINTS 18 float\n" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" + "\x3f\x80\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" + "\x40\x00\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" + "\x40\x00\x00\x00\x00\x00\x00\x00\x3f\x80\x00\x00" + "\x00\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" + "\x3f\x80\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" + "\x40\x00\x00\x00\x3f\x80\x00\x00\x3f\x80\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00" + "\x3f\x80\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00" + "\x40\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00" + "\x00\x00\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00" + "\x3f\x80\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00" + "\x40\x00\x00\x00\x3f\x80\x00\x00\x40\x00\x00\x00\n" + "CELL_DATA 4\n" + "SCALARS cellvar float\n" + "LOOKUP_TABLE default\n" + "\x42\xc8\x33\x33\x42\xc8\x66\x66\x42\xc8\x99\x9a\x42\xc8\xcc\xcd\n" + "POINT_DATA 18\n" + "SCALARS pointvar float\n" + "LOOKUP_TABLE default\n" + "\x41\x21\x99\x9a\x41\xa0\xcc\xcd\x41\xf0\xcc\xcd" + "\x42\x20\x66\x66\x42\x48\xcc\xcd\x42\x70\xcc\xcd" + "\x42\x8c\x66\x66\x42\xa0\x66\x66\x42\xb4\x99\x9a" + "\x42\xc8\x99\x9a\x42\xdc\x99\x9a\x42\xf0\x99\x9a" + "\x43\x02\x66\x66\x43\x0c\x66\x66\x43\x16\x66\x66" + "\x43\x20\x66\x66\x43\x2a\x80\x00\x43\x34\x80\x00\n"; - -inline void createFile(const char *buffer, std::size_t size, const char *fname) +inline void createFile(const char* buffer, std::size_t size, const char* fname) { std::ofstream fstr(fname, std::ios_base::out | std::ios_base::binary); fstr.write(buffer, static_cast(size - 1)); fstr.close(); } -inline vtkm::cont::DataSet readVTKDataSet(const char *fname) +inline vtkm::cont::DataSet readVTKDataSet(const char* fname) { vtkm::cont::DataSet ds; vtkm::io::reader::VTKDataSetReader reader(fname); @@ -418,7 +412,7 @@ inline vtkm::cont::DataSet readVTKDataSet(const char *fname) { ds = reader.ReadDataSet(); } - catch (vtkm::io::ErrorIO &e) + catch (vtkm::io::ErrorIO& e) { std::string message("Error reading: "); message += fname; @@ -431,7 +425,7 @@ inline vtkm::cont::DataSet readVTKDataSet(const char *fname) return ds; } -const char *testFileName = "vtkm-io-reader-test.vtk"; +const char* testFileName = "vtkm-io-reader-test.vtk"; enum Format { @@ -441,44 +435,38 @@ enum Format } // anonymous namespace - void TestReadingPolyData(Format format) { - (format == FORMAT_ASCII) ? - createFile(polydataAscii, sizeof(polydataAscii), testFileName) : - createFile(polydataBin, sizeof(polydataBin), testFileName); + (format == FORMAT_ASCII) ? createFile(polydataAscii, sizeof(polydataAscii), testFileName) + : createFile(polydataBin, sizeof(polydataBin), testFileName); vtkm::cont::DataSet ds = readVTKDataSet(testFileName); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 3, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 3, "Incorrect number of fields"); VTKM_TEST_ASSERT(ds.GetCoordinateSystem().GetData().GetNumberOfValues() == 8, "Incorrect number of points"); VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfPoints() == 8, "Incorrect number of points (from cell set)"); - VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 6, - "Incorrect number of cells"); - VTKM_TEST_ASSERT(ds.GetCellSet().IsType >(), + VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 6, "Incorrect number of cells"); + VTKM_TEST_ASSERT(ds.GetCellSet().IsType>(), "Incorrect cellset type"); } void TestReadingStructuredPoints(Format format) { - (format == FORMAT_ASCII) ? - createFile(structuredPointsAscii, sizeof(structuredPointsAscii), testFileName) : - createFile(structuredPointsBin, sizeof(structuredPointsBin), testFileName); + (format == FORMAT_ASCII) + ? createFile(structuredPointsAscii, sizeof(structuredPointsAscii), testFileName) + : createFile(structuredPointsBin, sizeof(structuredPointsBin), testFileName); vtkm::cont::DataSet ds = readVTKDataSet(testFileName); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 1, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 1, "Incorrect number of fields"); VTKM_TEST_ASSERT(ds.GetCoordinateSystem().GetData().GetNumberOfValues() == 72, "Incorrect number of points"); VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfPoints() == 72, "Incorrect number of points (from cell set)"); - VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 30, - "Incorrect number of cells"); - VTKM_TEST_ASSERT(ds.GetCellSet().IsType >(), + VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 30, "Incorrect number of cells"); + VTKM_TEST_ASSERT(ds.GetCellSet().IsType>(), "Incorrect cellset type"); } @@ -490,37 +478,32 @@ void TestReadingStructuredPointsVisIt(Format format) vtkm::cont::DataSet ds = readVTKDataSet(testFileName); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 1, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 1, "Incorrect number of fields"); VTKM_TEST_ASSERT(ds.GetCoordinateSystem().GetData().GetNumberOfValues() == 64, "Incorrect number of points"); VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfPoints() == 64, "Incorrect number of points (from cell set)"); - VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 27, - "Incorrect number of cells"); - VTKM_TEST_ASSERT(ds.GetCellSet().IsType >(), + VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 27, "Incorrect number of cells"); + VTKM_TEST_ASSERT(ds.GetCellSet().IsType>(), "Incorrect cellset type"); } } - void TestReadingUnstructuredGrid(Format format) { - (format == FORMAT_ASCII) ? - createFile(unsturctureGridAscii, sizeof(unsturctureGridAscii), testFileName) : - createFile(unsturctureGridBin, sizeof(unsturctureGridBin), testFileName); + (format == FORMAT_ASCII) + ? createFile(unsturctureGridAscii, sizeof(unsturctureGridAscii), testFileName) + : createFile(unsturctureGridBin, sizeof(unsturctureGridBin), testFileName); vtkm::cont::DataSet ds = readVTKDataSet(testFileName); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, "Incorrect number of fields"); VTKM_TEST_ASSERT(ds.GetCoordinateSystem().GetData().GetNumberOfValues() == 26, "Incorrect number of points"); VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfPoints() == 26, "Incorrect number of points (from cell set)"); - VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 15, - "Incorrect number of cells"); - VTKM_TEST_ASSERT(ds.GetCellSet().IsType >(), + VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 15, "Incorrect number of cells"); + VTKM_TEST_ASSERT(ds.GetCellSet().IsType>(), "Incorrect cellset type"); } @@ -531,15 +514,13 @@ void TestReadingUnstructuredGridVisIt(Format format) createFile(unsturctureGridVisItAscii, sizeof(unsturctureGridVisItAscii), testFileName); vtkm::cont::DataSet ds = readVTKDataSet(testFileName); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, "Incorrect number of fields"); VTKM_TEST_ASSERT(ds.GetCoordinateSystem().GetData().GetNumberOfValues() == 26, "Incorrect number of points"); VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfPoints() == 26, "Incorrect number of points (from cell set)"); - VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 15, - "Incorrect number of cells"); - VTKM_TEST_ASSERT(ds.GetCellSet().IsType >(), + VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 15, "Incorrect number of cells"); + VTKM_TEST_ASSERT(ds.GetCellSet().IsType>(), "Incorrect cellset type"); } } @@ -552,15 +533,13 @@ void TestReadingRectilinearGrid1(Format format) vtkm::cont::DataSet ds = readVTKDataSet(testFileName); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, "Incorrect number of fields"); VTKM_TEST_ASSERT(ds.GetCoordinateSystem().GetData().GetNumberOfValues() == 125, "Incorrect number of points"); VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfPoints() == 125, "Incorrect number of points (from cell set)"); - VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 64, - "Incorrect number of cells"); - VTKM_TEST_ASSERT(ds.GetCellSet().IsType >(), + VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 64, "Incorrect number of cells"); + VTKM_TEST_ASSERT(ds.GetCellSet().IsType>(), "Incorrect cellset type"); } } @@ -573,33 +552,29 @@ void TestReadingRectilinearGrid2(Format format) vtkm::cont::DataSet ds = readVTKDataSet(testFileName); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, "Incorrect number of fields"); VTKM_TEST_ASSERT(ds.GetCoordinateSystem().GetData().GetNumberOfValues() == 24, "Incorrect number of points"); VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfPoints() == 24, "Incorrect number of points (from cell set)"); - VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 6, - "Incorrect number of cells"); - VTKM_TEST_ASSERT(ds.GetCellSet().IsType >(), + VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 6, "Incorrect number of cells"); + VTKM_TEST_ASSERT(ds.GetCellSet().IsType>(), "Incorrect cellset type"); } -} +} void TestReadingStructuredGridASCII() { createFile(structuredGridAscii, sizeof(structuredGridAscii), testFileName); vtkm::cont::DataSet ds = readVTKDataSet(testFileName); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, "Incorrect number of fields"); VTKM_TEST_ASSERT(ds.GetCoordinateSystem().GetData().GetNumberOfValues() == 6, "Incorrect number of points"); VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfPoints() == 6, "Incorrect number of points (from cell set)"); - VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 2, - "Incorrect number of cells"); - VTKM_TEST_ASSERT(ds.GetCellSet().IsType >(), + VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 2, "Incorrect number of cells"); + VTKM_TEST_ASSERT(ds.GetCellSet().IsType>(), "Incorrect cellset type"); } @@ -608,15 +583,13 @@ void TestReadingStructuredGridBin() createFile(structuredGridBin, sizeof(structuredGridBin), testFileName); vtkm::cont::DataSet ds = readVTKDataSet(testFileName); - VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, - "Incorrect number of fields"); + VTKM_TEST_ASSERT(ds.GetNumberOfFields() == 2, "Incorrect number of fields"); VTKM_TEST_ASSERT(ds.GetCoordinateSystem().GetData().GetNumberOfValues() == 18, "Incorrect number of points"); VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfPoints() == 18, "Incorrect number of points (from cell set)"); - VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 4, - "Incorrect number of cells"); - VTKM_TEST_ASSERT(ds.GetCellSet().IsType >(), + VTKM_TEST_ASSERT(ds.GetCellSet().GetNumberOfCells() == 4, "Incorrect number of cells"); + VTKM_TEST_ASSERT(ds.GetCellSet().IsType>(), "Incorrect cellset type"); } @@ -651,7 +624,7 @@ void TestReadingVTKDataSet() TestReadingStructuredGridBin(); } -int UnitTestVTKDataSetReader(int, char *[]) +int UnitTestVTKDataSetReader(int, char* []) { return vtkm::cont::testing::Testing::Run(TestReadingVTKDataSet); } diff --git a/vtkm/io/writer/VTKDataSetWriter.h b/vtkm/io/writer/VTKDataSetWriter.h index fc7ff73ec..f06527ab3 100644 --- a/vtkm/io/writer/VTKDataSetWriter.h +++ b/vtkm/io/writer/VTKDataSetWriter.h @@ -41,20 +41,23 @@ #include #include -namespace vtkm { -namespace io { -namespace writer { +namespace vtkm +{ +namespace io +{ +namespace writer +{ -namespace detail { +namespace detail +{ struct OutputPointsFunctor { private: - std::ostream &out; + std::ostream& out; template - VTKM_CONT - void Output(const PortalType &portal) const + VTKM_CONT void Output(const PortalType& portal) const { for (vtkm::Id index = 0; index < portal.GetNumberOfValues(); index++) { @@ -63,12 +66,12 @@ private: typedef typename PortalType::ValueType ValueType; typedef typename vtkm::VecTraits VecType; - const ValueType &value = portal.Get(index); + const ValueType& value = portal.Get(index); vtkm::IdComponent numComponents = VecType::GetNumberOfComponents(value); for (vtkm::IdComponent c = 0; c < numComponents && c < VTKDims; c++) { - out << (c==0 ? "" : " ") << VecType::GetComponent(value, c); + out << (c == 0 ? "" : " ") << VecType::GetComponent(value, c); } for (vtkm::IdComponent c = numComponents; c < VTKDims; c++) { @@ -80,13 +83,13 @@ private: public: VTKM_CONT - OutputPointsFunctor(std::ostream &o) : out(o) + OutputPointsFunctor(std::ostream& o) + : out(o) { } template - VTKM_CONT - void operator()(const vtkm::cont::ArrayHandle &array) const + VTKM_CONT void operator()(const vtkm::cont::ArrayHandle& array) const { this->Output(array.GetPortalConstControl()); } @@ -95,36 +98,36 @@ public: struct OutputFieldFunctor { private: - std::ostream &out; + std::ostream& out; template - VTKM_CONT - void Output(const PortalType &portal) const + VTKM_CONT void Output(const PortalType& portal) const { for (vtkm::Id index = 0; index < portal.GetNumberOfValues(); index++) { typedef typename PortalType::ValueType ValueType; typedef typename vtkm::VecTraits VecType; - const ValueType &value = portal.Get(index); + const ValueType& value = portal.Get(index); vtkm::IdComponent numComponents = VecType::GetNumberOfComponents(value); for (vtkm::IdComponent c = 0; c < numComponents; c++) { - out << (c==0 ? "" : " ") << VecType::GetComponent(value, c); + out << (c == 0 ? "" : " ") << VecType::GetComponent(value, c); } out << std::endl; } } + public: VTKM_CONT - OutputFieldFunctor(std::ostream &o) : out(o) + OutputFieldFunctor(std::ostream& o) + : out(o) { } template - VTKM_CONT - void operator()(const vtkm::cont::ArrayHandle &array) const + VTKM_CONT void operator()(const vtkm::cont::ArrayHandle& array) const { this->Output(array.GetPortalConstControl()); } @@ -133,19 +136,20 @@ public: class GetDataTypeName { public: - GetDataTypeName(std::string &name) + GetDataTypeName(std::string& name) : Name(&name) - { } + { + } template - void operator()(const ArrayHandleType &) const + void operator()(const ArrayHandleType&) const { - typedef typename vtkm::VecTraits::ComponentType - DataType; + typedef typename vtkm::VecTraits::ComponentType DataType; *this->Name = vtkm::io::internal::DataTypeName::Name(); } + private: - std::string *Name; + std::string* Name; }; } // namespace detail @@ -153,8 +157,7 @@ private: struct VTKDataSetWriter { private: - static void WritePoints(std::ostream &out, - vtkm::cont::DataSet dataSet) + static void WritePoints(std::ostream& out, vtkm::cont::DataSet dataSet) { ///\todo: support other coordinate systems int cindex = 0; @@ -172,44 +175,42 @@ private: } template - static void WriteExplicitCells(std::ostream &out, - CellSetType cellSet) + static void WriteExplicitCells(std::ostream& out, CellSetType cellSet) { vtkm::Id nCells = cellSet.GetNumberOfCells(); vtkm::Id conn_length = 0; - for (vtkm::Id i=0; i ids; - for (vtkm::Id i=0; i ids; + for (vtkm::Id i = 0; i < nCells; ++i) { vtkm::Id nids = cellSet.GetNumberOfPointsInCell(i); cellSet.GetIndices(i, ids); out << nids; - for (int j=0; j 4) { continue; } + if (ncomps > 4) + { + continue; + } if (!wrote_header) { @@ -244,16 +250,14 @@ private: std::string typeName; vtkm::cont::CastAndCall(field, detail::GetDataTypeName(typeName)); - out << "SCALARS " << field.GetName() << " " - << typeName << " " << ncomps << std::endl; + out << "SCALARS " << field.GetName() << " " << typeName << " " << ncomps << std::endl; out << "LOOKUP_TABLE default" << std::endl; vtkm::cont::CastAndCall(field, detail::OutputFieldFunctor(out)); } } - static void WriteCellFields(std::ostream &out, - vtkm::cont::DataSet dataSet, + static void WriteCellFields(std::ostream& out, vtkm::cont::DataSet dataSet, vtkm::cont::DynamicCellSet cellSet) { bool wrote_header = false; @@ -265,7 +269,8 @@ private: { continue; } - if (field.GetAssocCellSet() != cellSet.GetName()) { + if (field.GetAssocCellSet() != cellSet.GetName()) + { continue; } @@ -283,16 +288,14 @@ private: std::string typeName; vtkm::cont::CastAndCall(field, detail::GetDataTypeName(typeName)); - out << "SCALARS " << field.GetName() << " " - << typeName << " " << ncomps << std::endl; + out << "SCALARS " << field.GetName() << " " << typeName << " " << ncomps << std::endl; out << "LOOKUP_TABLE default" << std::endl; vtkm::cont::CastAndCall(field, detail::OutputFieldFunctor(out)); } } - static void WriteDataSetAsPoints(std::ostream &out, - vtkm::cont::DataSet dataSet) + static void WriteDataSetAsPoints(std::ostream& out, vtkm::cont::DataSet dataSet) { out << "DATASET UNSTRUCTURED_GRID" << std::endl; WritePoints(out, dataSet); @@ -300,8 +303,7 @@ private: } template - static void WriteDataSetAsUnstructured(std::ostream &out, - vtkm::cont::DataSet dataSet, + static void WriteDataSetAsUnstructured(std::ostream& out, vtkm::cont::DataSet dataSet, CellSetType cellSet) { out << "DATASET UNSTRUCTURED_GRID" << std::endl; @@ -310,25 +312,21 @@ private: } template - static void WriteDataSetAsStructured( - std::ostream &out, - vtkm::cont::DataSet dataSet, - vtkm::cont::CellSetStructured cellSet) + static void WriteDataSetAsStructured(std::ostream& out, vtkm::cont::DataSet dataSet, + vtkm::cont::CellSetStructured cellSet) { ///\todo: support uniform/rectilinear out << "DATASET STRUCTURED_GRID" << std::endl; out << "DIMENSIONS "; out << cellSet.GetPointDimensions()[0] << " "; - out << (DIM>1 ? cellSet.GetPointDimensions()[1] : 1) << " "; - out << (DIM>2 ? cellSet.GetPointDimensions()[2] : 1) << std::endl; + out << (DIM > 1 ? cellSet.GetPointDimensions()[1] : 1) << " "; + out << (DIM > 2 ? cellSet.GetPointDimensions()[2] : 1) << std::endl; WritePoints(out, dataSet); } - static void Write(std::ostream &out, - vtkm::cont::DataSet dataSet, - vtkm::Id csindex=0) + static void Write(std::ostream& out, vtkm::cont::DataSet dataSet, vtkm::Id csindex = 0) { VTKM_ASSERT(csindex < dataSet.GetNumberOfCellSets()); @@ -344,35 +342,26 @@ private: else { vtkm::cont::DynamicCellSet cellSet = dataSet.GetCellSet(csindex); - if (cellSet.IsType >()) + if (cellSet.IsType>()) { - WriteDataSetAsUnstructured(out, - dataSet, - cellSet.Cast >()); + WriteDataSetAsUnstructured(out, dataSet, cellSet.Cast>()); } - else if (cellSet.IsType >()) + else if (cellSet.IsType>()) { - WriteDataSetAsStructured(out, - dataSet, - cellSet.Cast >()); + WriteDataSetAsStructured(out, dataSet, cellSet.Cast>()); } - else if (cellSet.IsType >()) + else if (cellSet.IsType>()) { - WriteDataSetAsStructured(out, - dataSet, - cellSet.Cast >()); + WriteDataSetAsStructured(out, dataSet, cellSet.Cast>()); } - else if (cellSet.IsType >()) + else if (cellSet.IsType>()) { // these function just like explicit cell sets - WriteDataSetAsUnstructured(out, - dataSet, - cellSet.Cast >()); + WriteDataSetAsUnstructured(out, dataSet, cellSet.Cast>()); } else { - throw vtkm::cont::ErrorBadType( - "Could not determine type to write out."); + throw vtkm::cont::ErrorBadType("Could not determine type to write out."); } WritePointFields(out, dataSet); @@ -382,12 +371,13 @@ private: public: VTKM_CONT - explicit VTKDataSetWriter(const std::string &filename) - : FileName(filename) { } + explicit VTKDataSetWriter(const std::string& filename) + : FileName(filename) + { + } VTKM_CONT - void WriteDataSet(vtkm::cont::DataSet dataSet, - vtkm::Id cellSetIndex = 0) const + void WriteDataSet(vtkm::cont::DataSet dataSet, vtkm::Id cellSetIndex = 0) const { if (cellSetIndex >= dataSet.GetNumberOfCellSets()) { @@ -399,15 +389,14 @@ public: } else { - throw vtkm::cont::ErrorBadValue( - "Selected invalid cell set index."); + throw vtkm::cont::ErrorBadValue("Selected invalid cell set index."); } } if (dataSet.GetNumberOfCoordinateSystems() < 1) { throw vtkm::cont::ErrorBadValue( - "DataSet has no coordinate system, which is not supported by VTK file format."); + "DataSet has no coordinate system, which is not supported by VTK file format."); } try @@ -416,15 +405,14 @@ public: this->Write(fileStream, dataSet, cellSetIndex); fileStream.close(); } - catch (std::ofstream::failure &error) + catch (std::ofstream::failure& error) { throw vtkm::io::ErrorIO(error.what()); } } VTKM_CONT - void WriteDataSet(vtkm::cont::DataSet dataSet, - const std::string &cellSetName) + void WriteDataSet(vtkm::cont::DataSet dataSet, const std::string& cellSetName) { this->WriteDataSet(dataSet, dataSet.GetCellSetIndex(cellSetName)); } @@ -433,7 +421,6 @@ private: std::string FileName; }; //struct VTKDataSetWriter - } } } //namespace vtkm::io::writer diff --git a/vtkm/io/writer/testing/UnitTestVTKDataSetWriter.cxx b/vtkm/io/writer/testing/UnitTestVTKDataSetWriter.cxx index 7b8c6ec15..b756fe505 100644 --- a/vtkm/io/writer/testing/UnitTestVTKDataSetWriter.cxx +++ b/vtkm/io/writer/testing/UnitTestVTKDataSetWriter.cxx @@ -23,7 +23,8 @@ #include #include -namespace { +namespace +{ void TestVTKExplicitWrite() { @@ -66,7 +67,7 @@ void TestVTKWrite() } //Anonymous namespace -int UnitTestVTKDataSetWriter(int, char *[]) +int UnitTestVTKDataSetWriter(int, char* []) { return vtkm::cont::testing::Testing::Run(TestVTKWrite); } diff --git a/vtkm/rendering/Actor.cxx b/vtkm/rendering/Actor.cxx index 00e1c5535..0e5fd7537 100644 --- a/vtkm/rendering/Actor.cxx +++ b/vtkm/rendering/Actor.cxx @@ -23,8 +23,10 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ struct Actor::InternalsType { @@ -37,21 +39,20 @@ struct Actor::InternalsType vtkm::Bounds SpatialBounds; VTKM_CONT - InternalsType(const vtkm::cont::DynamicCellSet &cells, - const vtkm::cont::CoordinateSystem &coordinates, - const vtkm::cont::Field &scalarField, - const vtkm::rendering::ColorTable &colorTable) - : Cells(cells), - Coordinates(coordinates), - ScalarField(scalarField), - ColorTable(colorTable) - { } + InternalsType(const vtkm::cont::DynamicCellSet& cells, + const vtkm::cont::CoordinateSystem& coordinates, + const vtkm::cont::Field& scalarField, const vtkm::rendering::ColorTable& colorTable) + : Cells(cells) + , Coordinates(coordinates) + , ScalarField(scalarField) + , ColorTable(colorTable) + { + } }; -Actor::Actor(const vtkm::cont::DynamicCellSet &cells, - const vtkm::cont::CoordinateSystem &coordinates, - const vtkm::cont::Field &scalarField, - const vtkm::rendering::ColorTable &colorTable) +Actor::Actor(const vtkm::cont::DynamicCellSet& cells, + const vtkm::cont::CoordinateSystem& coordinates, const vtkm::cont::Field& scalarField, + const vtkm::rendering::ColorTable& colorTable) : Internals(new InternalsType(cells, coordinates, scalarField, colorTable)) { VTKM_ASSERT(scalarField.GetData().GetNumberOfComponents() == 1); @@ -60,54 +61,49 @@ Actor::Actor(const vtkm::cont::DynamicCellSet &cells, this->Internals->SpatialBounds = coordinates.GetBounds(); } -void Actor::Render(vtkm::rendering::Mapper &mapper, - vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Camera &camera) const +void Actor::Render(vtkm::rendering::Mapper& mapper, vtkm::rendering::Canvas& canvas, + const vtkm::rendering::Camera& camera) const { mapper.SetCanvas(&canvas); mapper.SetActiveColorTable(this->Internals->ColorTable); - mapper.RenderCells(this->Internals->Cells, - this->Internals->Coordinates, - this->Internals->ScalarField, - this->Internals->ColorTable, - camera, + mapper.RenderCells(this->Internals->Cells, this->Internals->Coordinates, + this->Internals->ScalarField, this->Internals->ColorTable, camera, this->Internals->ScalarRange); } -const vtkm::cont::DynamicCellSet &Actor::GetCells() const +const vtkm::cont::DynamicCellSet& Actor::GetCells() const { return this->Internals->Cells; } -const vtkm::cont::CoordinateSystem &Actor::GetCoordinates() const +const vtkm::cont::CoordinateSystem& Actor::GetCoordinates() const { return this->Internals->Coordinates; } -const vtkm::cont::Field &Actor::GetScalarField() const +const vtkm::cont::Field& Actor::GetScalarField() const { return this->Internals->ScalarField; } -const vtkm::rendering::ColorTable &Actor::GetColorTable() const +const vtkm::rendering::ColorTable& Actor::GetColorTable() const { return this->Internals->ColorTable; } -const vtkm::Range &Actor::GetScalarRange() const +const vtkm::Range& Actor::GetScalarRange() const { return this->Internals->ScalarRange; } -const vtkm::Bounds &Actor::GetSpatialBounds() const +const vtkm::Bounds& Actor::GetSpatialBounds() const { return this->Internals->SpatialBounds; } -void Actor::SetScalarRange(const vtkm::Range &scalarRange) +void Actor::SetScalarRange(const vtkm::Range& scalarRange) { this->Internals->ScalarRange = scalarRange; } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/Actor.h b/vtkm/rendering/Actor.h index fff68c4d9..3e9c1a658 100644 --- a/vtkm/rendering/Actor.h +++ b/vtkm/rendering/Actor.h @@ -28,35 +28,34 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT Actor { public: - Actor(const vtkm::cont::DynamicCellSet &cells, - const vtkm::cont::CoordinateSystem &coordinates, - const vtkm::cont::Field &scalarField, - const vtkm::rendering::ColorTable &colorTable = - vtkm::rendering::ColorTable("default")); + Actor(const vtkm::cont::DynamicCellSet& cells, const vtkm::cont::CoordinateSystem& coordinates, + const vtkm::cont::Field& scalarField, + const vtkm::rendering::ColorTable& colorTable = vtkm::rendering::ColorTable("default")); - void Render(vtkm::rendering::Mapper &mapper, - vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Camera &camera) const; + void Render(vtkm::rendering::Mapper& mapper, vtkm::rendering::Canvas& canvas, + const vtkm::rendering::Camera& camera) const; - const vtkm::cont::DynamicCellSet &GetCells() const; + const vtkm::cont::DynamicCellSet& GetCells() const; - const vtkm::cont::CoordinateSystem &GetCoordinates() const; + const vtkm::cont::CoordinateSystem& GetCoordinates() const; - const vtkm::cont::Field &GetScalarField() const; + const vtkm::cont::Field& GetScalarField() const; - const vtkm::rendering::ColorTable &GetColorTable() const; + const vtkm::rendering::ColorTable& GetColorTable() const; - const vtkm::Range &GetScalarRange() const; + const vtkm::Range& GetScalarRange() const; - const vtkm::Bounds &GetSpatialBounds() const; + const vtkm::Bounds& GetSpatialBounds() const; - void SetScalarRange(const vtkm::Range &scalarRange); + void SetScalarRange(const vtkm::Range& scalarRange); private: struct InternalsType; @@ -64,7 +63,7 @@ private: struct RangeFunctor; }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif //vtk_m_rendering_Actor_h diff --git a/vtkm/rendering/AxisAnnotation.cxx b/vtkm/rendering/AxisAnnotation.cxx index 7f94002d4..23b4812a0 100644 --- a/vtkm/rendering/AxisAnnotation.cxx +++ b/vtkm/rendering/AxisAnnotation.cxx @@ -22,10 +22,13 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -namespace { +namespace +{ inline vtkm::Float64 ffix(vtkm::Float64 value) { @@ -40,16 +43,18 @@ inline vtkm::Float64 ffix(vtkm::Float64 value) } // anonymous namespace -void AxisAnnotation::CalculateTicks(const vtkm::Range &range, - bool minor, - std::vector &positions, - std::vector &proportions, +void AxisAnnotation::CalculateTicks(const vtkm::Range& range, bool minor, + std::vector& positions, + std::vector& proportions, int modifyTickQuantity) const { positions.clear(); proportions.clear(); - if (!range.IsNonEmpty()) { return; } + if (!range.IsNonEmpty()) + { + return; + } vtkm::Float64 length = range.Length(); @@ -60,7 +65,6 @@ void AxisAnnotation::CalculateTicks(const vtkm::Range &range, vtkm::Float64 eps = 10.0e-10; pow10 += eps; - // ffix moves you in the wrong direction if pow10 is negative. if (pow10 < 0.) { @@ -70,7 +74,7 @@ void AxisAnnotation::CalculateTicks(const vtkm::Range &range, vtkm::Float64 fxt = pow(10., ffix(pow10)); // Find the number of integral points in the interval. - int numTicks = int(ffix(length/fxt) + 1); + int numTicks = int(ffix(length / fxt) + 1); // We should get about major 10 ticks on a length that's near // the power of 10. (e.g. length=1000). If the length is small @@ -94,7 +98,7 @@ void AxisAnnotation::CalculateTicks(const vtkm::Range &range, // If there aren't enough major tick points in this decade, use the next // decade. vtkm::Float64 majorStep = fxt / div; - vtkm::Float64 minorStep = (fxt/div) / 10.; + vtkm::Float64 minorStep = (fxt / div) / 10.; // When we get too close, we lose the tickmarks. Run some special case code. if (numTicks <= 1) @@ -123,13 +127,13 @@ void AxisAnnotation::CalculateTicks(const vtkm::Range &range, vtkm::Float64 majorStart, minorStart; if (range.Min < 0.) { - majorStart = majorStep*(ffix(range.Min*(1./majorStep))); - minorStart = minorStep*(ffix(range.Min*(1./minorStep))); + majorStart = majorStep * (ffix(range.Min * (1. / majorStep))); + minorStart = minorStep * (ffix(range.Min * (1. / minorStep))); } else { - majorStart = majorStep*(ffix(range.Min*(1./majorStep) + .999)); - minorStart = minorStep*(ffix(range.Min*(1./minorStep) + .999)); + majorStart = majorStep * (ffix(range.Min * (1. / majorStep) + .999)); + minorStart = minorStep * (ffix(range.Min * (1. / minorStep) + .999)); } // Create all of the minor ticks @@ -147,10 +151,11 @@ void AxisAnnotation::CalculateTicks(const vtkm::Range &range, } AxisAnnotation::AxisAnnotation() -{ } +{ +} AxisAnnotation::~AxisAnnotation() -{ } - +{ +} } } // namespace vtkm::rendering diff --git a/vtkm/rendering/AxisAnnotation.h b/vtkm/rendering/AxisAnnotation.h index 2399b2018..d5d2d0f47 100644 --- a/vtkm/rendering/AxisAnnotation.h +++ b/vtkm/rendering/AxisAnnotation.h @@ -27,29 +27,27 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT AxisAnnotation { protected: - void CalculateTicks(const vtkm::Range &range, - bool minor, - std::vector &positions, - std::vector &proportions, - int modifyTickQuantity) const; + void CalculateTicks(const vtkm::Range& range, bool minor, std::vector& positions, + std::vector& proportions, int modifyTickQuantity) const; public: AxisAnnotation(); virtual ~AxisAnnotation(); - virtual void Render(const vtkm::rendering::Camera &camera, - const vtkm::rendering::WorldAnnotator &worldAnnotator, - vtkm::rendering::Canvas &canvas) = 0; + virtual void Render(const vtkm::rendering::Camera& camera, + const vtkm::rendering::WorldAnnotator& worldAnnotator, + vtkm::rendering::Canvas& canvas) = 0; }; - - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif // vtk_m_rendering_AxisAnnotation_h diff --git a/vtkm/rendering/AxisAnnotation2D.cxx b/vtkm/rendering/AxisAnnotation2D.cxx index 72615ecbe..7bf51248c 100644 --- a/vtkm/rendering/AxisAnnotation2D.cxx +++ b/vtkm/rendering/AxisAnnotation2D.cxx @@ -24,8 +24,10 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ AxisAnnotation2D::AxisAnnotation2D() : AxisAnnotation() @@ -34,17 +36,16 @@ AxisAnnotation2D::AxisAnnotation2D() this->AlignV = TextAnnotation::VCenter; this->FontScale = 0.05f; this->LineWidth = 1.0; - this->Color = vtkm::rendering::Color(1,1,1); + this->Color = vtkm::rendering::Color(1, 1, 1); this->Logarithmic = false; this->MoreOrLessTickAdjustment = 0; } AxisAnnotation2D::~AxisAnnotation2D() { - } -void AxisAnnotation2D::SetRangeForAutoTicks(const Range &range) +void AxisAnnotation2D::SetRangeForAutoTicks(const Range& range) { this->TickRange = range; @@ -67,35 +68,25 @@ void AxisAnnotation2D::SetRangeForAutoTicks(const Range &range) else #endif { - CalculateTicks(this->TickRange, - false, - this->PositionsMajor, - this->ProportionsMajor, + CalculateTicks(this->TickRange, false, this->PositionsMajor, this->ProportionsMajor, this->MoreOrLessTickAdjustment); - CalculateTicks(this->TickRange, - true, - this->PositionsMinor, - this->ProportionsMinor, + CalculateTicks(this->TickRange, true, this->PositionsMinor, this->ProportionsMinor, this->MoreOrLessTickAdjustment); } } -void AxisAnnotation2D::SetMajorTicks(const std::vector &pos, - const std::vector &prop) +void AxisAnnotation2D::SetMajorTicks(const std::vector& pos, + const std::vector& prop) { this->PositionsMajor.clear(); - this->PositionsMajor.insert(this->PositionsMajor.begin(), - pos.begin(), - pos.end()); + this->PositionsMajor.insert(this->PositionsMajor.begin(), pos.begin(), pos.end()); this->ProportionsMajor.clear(); - this->ProportionsMajor.insert(this->ProportionsMajor.begin(), - prop.begin(), - prop.end()); + this->ProportionsMajor.insert(this->ProportionsMajor.begin(), prop.begin(), prop.end()); } -void AxisAnnotation2D::SetMinorTicks(const std::vector &pos, - const std::vector &prop) +void AxisAnnotation2D::SetMinorTicks(const std::vector& pos, + const std::vector& prop) { this->PositionsMinor.clear(); this->PositionsMinor.insert(this->PositionsMinor.begin(), pos.begin(), pos.end()); @@ -104,41 +95,36 @@ void AxisAnnotation2D::SetMinorTicks(const std::vector &pos, this->ProportionsMinor.insert(this->ProportionsMinor.begin(), prop.begin(), prop.end()); } -void AxisAnnotation2D::Render( - const vtkm::rendering::Camera &camera, - const vtkm::rendering::WorldAnnotator &worldAnnotator, - vtkm::rendering::Canvas &canvas) +void AxisAnnotation2D::Render(const vtkm::rendering::Camera& camera, + const vtkm::rendering::WorldAnnotator& worldAnnotator, + vtkm::rendering::Canvas& canvas) { - canvas.AddLine(this->PosX0,this->PosY0, this->PosX1,this->PosY1, this->LineWidth, this->Color); + canvas.AddLine(this->PosX0, this->PosY0, this->PosX1, this->PosY1, this->LineWidth, this->Color); // major ticks unsigned int nmajor = (unsigned int)this->ProportionsMajor.size(); while (this->Labels.size() < nmajor) { - this->Labels.push_back(new vtkm::rendering::TextAnnotationScreen( - "test", - this->Color, - this->FontScale, - vtkm::Vec(0,0), - 0)); + this->Labels.push_back(new vtkm::rendering::TextAnnotationScreen( + "test", this->Color, this->FontScale, vtkm::Vec(0, 0), 0)); } std::stringstream numberToString; - for (unsigned int i=0; iPosX0 + (this->PosX1-this->PosX0) * this->ProportionsMajor[i]; - vtkm::Float64 yc = this->PosY0 + (this->PosY1-this->PosY0) * this->ProportionsMajor[i]; - vtkm::Float64 xs = xc - this->MajorTickSizeX*this->MajorTickOffset; - vtkm::Float64 xe = xc + this->MajorTickSizeX*(1. - this->MajorTickOffset); - vtkm::Float64 ys = yc - this->MajorTickSizeY*this->MajorTickOffset; - vtkm::Float64 ye = yc + this->MajorTickSizeY*(1. - this->MajorTickOffset); + vtkm::Float64 xc = this->PosX0 + (this->PosX1 - this->PosX0) * this->ProportionsMajor[i]; + vtkm::Float64 yc = this->PosY0 + (this->PosY1 - this->PosY0) * this->ProportionsMajor[i]; + vtkm::Float64 xs = xc - this->MajorTickSizeX * this->MajorTickOffset; + vtkm::Float64 xe = xc + this->MajorTickSizeX * (1. - this->MajorTickOffset); + vtkm::Float64 ys = yc - this->MajorTickSizeY * this->MajorTickOffset; + vtkm::Float64 ye = yc + this->MajorTickSizeY * (1. - this->MajorTickOffset); - canvas.AddLine(xs,ys, xe,ye, 1.0, this->Color); + canvas.AddLine(xs, ys, xe, ye, 1.0, this->Color); if (this->MajorTickSizeY == 0) { // slight shift to space between label and tick - xs -= (this->MajorTickSizeX<0?-1.:+1.) * this->FontScale * .1; + xs -= (this->MajorTickSizeX < 0 ? -1. : +1.) * this->FontScale * .1; } numberToString.str(""); @@ -147,35 +133,32 @@ void AxisAnnotation2D::Render( this->Labels[i]->SetText(numberToString.str()); //if (fabs(this->PositionsMajor[i]) < 1e-10) // this->Labels[i]->SetText("0"); - ((TextAnnotationScreen*)(this->Labels[i]))->SetPosition(vtkm::Float32(xs), - vtkm::Float32(ys)); + ((TextAnnotationScreen*)(this->Labels[i]))->SetPosition(vtkm::Float32(xs), vtkm::Float32(ys)); - this->Labels[i]->SetAlignment(this->AlignH,this->AlignV); + this->Labels[i]->SetAlignment(this->AlignH, this->AlignV); } // minor ticks if (this->MinorTickSizeX != 0 || this->MinorTickSizeY != 0) { unsigned int nminor = (unsigned int)this->ProportionsMinor.size(); - for (unsigned int i=0; iPosX0 + (this->PosX1-this->PosX0) * this->ProportionsMinor[i]; - vtkm::Float64 yc = this->PosY0 + (this->PosY1-this->PosY0) * this->ProportionsMinor[i]; - vtkm::Float64 xs = xc - this->MinorTickSizeX*this->MinorTickOffset; - vtkm::Float64 xe = xc + this->MinorTickSizeX*(1. - this->MinorTickOffset); - vtkm::Float64 ys = yc - this->MinorTickSizeY*this->MinorTickOffset; - vtkm::Float64 ye = yc + this->MinorTickSizeY*(1. - this->MinorTickOffset); + vtkm::Float64 xc = this->PosX0 + (this->PosX1 - this->PosX0) * this->ProportionsMinor[i]; + vtkm::Float64 yc = this->PosY0 + (this->PosY1 - this->PosY0) * this->ProportionsMinor[i]; + vtkm::Float64 xs = xc - this->MinorTickSizeX * this->MinorTickOffset; + vtkm::Float64 xe = xc + this->MinorTickSizeX * (1. - this->MinorTickOffset); + vtkm::Float64 ys = yc - this->MinorTickSizeY * this->MinorTickOffset; + vtkm::Float64 ye = yc + this->MinorTickSizeY * (1. - this->MinorTickOffset); - canvas.AddLine(xs,ys, xe,ye, 1.0, this->Color); + canvas.AddLine(xs, ys, xe, ye, 1.0, this->Color); } } - for (unsigned int i=0; iLabels[i]->Render(camera, worldAnnotator, canvas); } } - - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/AxisAnnotation2D.h b/vtkm/rendering/AxisAnnotation2D.h index 1b75a9b27..39e1ba21a 100644 --- a/vtkm/rendering/AxisAnnotation2D.h +++ b/vtkm/rendering/AxisAnnotation2D.h @@ -31,8 +31,10 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT AxisAnnotation2D : public AxisAnnotation { @@ -50,7 +52,6 @@ protected: TextAnnotation::VerticalAlignment AlignV; std::vector Labels; - std::vector PositionsMajor; std::vector ProportionsMajor; @@ -58,6 +59,7 @@ protected: std::vector ProportionsMinor; int MoreOrLessTickAdjustment; + public: AxisAnnotation2D(); @@ -70,41 +72,31 @@ public: } #endif - void SetMoreOrLessTickAdjustment(int offset) - { - this->MoreOrLessTickAdjustment = offset; - } + void SetMoreOrLessTickAdjustment(int offset) { this->MoreOrLessTickAdjustment = offset; } - void SetColor(vtkm::rendering::Color c) - { - this->Color = c; - } + void SetColor(vtkm::rendering::Color c) { this->Color = c; } - void SetLineWidth(vtkm::Float32 lw) - { - this->LineWidth = lw; - } + void SetLineWidth(vtkm::Float32 lw) { this->LineWidth = lw; } void SetMajorTickSize(vtkm::Float64 xlen, vtkm::Float64 ylen, vtkm::Float64 offset) { /// offset of 0 means the tick is inside the frame /// offset of 1 means the tick is outside the frame /// offset of 0.5 means the tick is centered on the frame - this->MajorTickSizeX=xlen; - this->MajorTickSizeY=ylen; + this->MajorTickSizeX = xlen; + this->MajorTickSizeY = ylen; this->MajorTickOffset = offset; } void SetMinorTickSize(vtkm::Float64 xlen, vtkm::Float64 ylen, vtkm::Float64 offset) { - this->MinorTickSizeX=xlen; - this->MinorTickSizeY=ylen; + this->MinorTickSizeX = xlen; + this->MinorTickSizeY = ylen; this->MinorTickOffset = offset; } ///\todo: rename, since it might be screen OR world position? - void SetScreenPosition(vtkm::Float64 x0, vtkm::Float64 y0, - vtkm::Float64 x1, vtkm::Float64 y1) + void SetScreenPosition(vtkm::Float64 x0, vtkm::Float64 y0, vtkm::Float64 x1, vtkm::Float64 y1) { this->PosX0 = x0; this->PosY0 = y0; @@ -113,8 +105,7 @@ public: this->PosY1 = y1; } - void SetLabelAlignment(TextAnnotation::HorizontalAlignment h, - TextAnnotation::VerticalAlignment v) + void SetLabelAlignment(TextAnnotation::HorizontalAlignment h, TextAnnotation::VerticalAlignment v) { this->AlignH = h; this->AlignV = v; @@ -123,27 +114,27 @@ public: void SetLabelFontScale(vtkm::Float32 s) { this->FontScale = s; - for (unsigned int i=0; iLabels.size(); i++) + for (unsigned int i = 0; i < this->Labels.size(); i++) this->Labels[i]->SetScale(s); } - void SetRangeForAutoTicks(const vtkm::Range &range); + void SetRangeForAutoTicks(const vtkm::Range& range); void SetRangeForAutoTicks(vtkm::Float64 lower, vtkm::Float64 upper) { this->SetRangeForAutoTicks(vtkm::Range(lower, upper)); } - void SetMajorTicks(const std::vector &positions, - const std::vector &proportions); + void SetMajorTicks(const std::vector& positions, + const std::vector& proportions); - void SetMinorTicks(const std::vector &positions, - const std::vector &proportions); + void SetMinorTicks(const std::vector& positions, + const std::vector& proportions); - void Render(const vtkm::rendering::Camera &camera, - const vtkm::rendering::WorldAnnotator &worldAnnotator, - vtkm::rendering::Canvas &canvas) VTKM_OVERRIDE; + void Render(const vtkm::rendering::Camera& camera, + const vtkm::rendering::WorldAnnotator& worldAnnotator, + vtkm::rendering::Canvas& canvas) VTKM_OVERRIDE; }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif // vtk_m_rendering_AxisAnnotation2D_h diff --git a/vtkm/rendering/AxisAnnotation3D.cxx b/vtkm/rendering/AxisAnnotation3D.cxx index a27a83328..9fbffd95e 100644 --- a/vtkm/rendering/AxisAnnotation3D.cxx +++ b/vtkm/rendering/AxisAnnotation3D.cxx @@ -20,29 +20,35 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ AxisAnnotation3D::AxisAnnotation3D() - : AxisAnnotation(), - TickMajorSize(1.0), - TickMajorOffset(1.0), - TickMinorSize(0.1), - TickMinorOffset(1.0), - Axis(0), - Invert(1, 1, 1), - Point0(0, 0, 0), - Point1(1, 0, 0), - Range(0, 1), - FontScale(0.05f), // screen space font size - FontOffset(0.1f), // world space offset from axis - LineWidth(1.0), - Color(1,1,1), - MoreOrLessTickAdjustment(0) -{ } + : AxisAnnotation() + , TickMajorSize(1.0) + , TickMajorOffset(1.0) + , TickMinorSize(0.1) + , TickMinorOffset(1.0) + , Axis(0) + , Invert(1, 1, 1) + , Point0(0, 0, 0) + , Point1(1, 0, 0) + , Range(0, 1) + , FontScale(0.05f) + , // screen space font size + FontOffset(0.1f) + , // world space offset from axis + LineWidth(1.0) + , Color(1, 1, 1) + , MoreOrLessTickAdjustment(0) +{ +} AxisAnnotation3D::~AxisAnnotation3D() -{ } +{ +} void AxisAnnotation3D::SetTickInvert(bool x, bool y, bool z) { @@ -54,18 +60,17 @@ void AxisAnnotation3D::SetTickInvert(bool x, bool y, bool z) void AxisAnnotation3D::SetLabelFontScale(Float64 s) { this->FontScale = s; - for (unsigned int i=0; iLabels.size(); i++) + for (unsigned int i = 0; i < this->Labels.size(); i++) { this->Labels[i]->SetScale(vtkm::Float32(s)); } } -void AxisAnnotation3D::Render(const Camera &camera, - const WorldAnnotator &worldAnnotator, - Canvas &canvas) +void AxisAnnotation3D::Render(const Camera& camera, const WorldAnnotator& worldAnnotator, + Canvas& canvas) { bool infront = true; - worldAnnotator.AddLine(this->Point0,this->Point1,this->LineWidth,this->Color,infront); + worldAnnotator.AddLine(this->Point0, this->Point1, this->LineWidth, this->Color, infront); std::vector positions; std::vector proportions; @@ -74,60 +79,72 @@ void AxisAnnotation3D::Render(const Camera &camera, unsigned int nmajor = (unsigned int)proportions.size(); while (this->Labels.size() < nmajor) { - this->Labels.push_back(new TextAnnotationBillboard( - "test", - this->Color, - vtkm::Float32(this->FontScale), - vtkm::Vec(0,0,0), - 0)); + this->Labels.push_back(new TextAnnotationBillboard("test", this->Color, + vtkm::Float32(this->FontScale), + vtkm::Vec(0, 0, 0), 0)); } std::stringstream numberToString; - for (unsigned int i=0; i tickPos = - proportions[i]*(this->Point1-this->Point0) + this->Point0; - for (int pass=0; pass<=1; pass++) + vtkm::Vec tickPos = + proportions[i] * (this->Point1 - this->Point0) + this->Point0; + for (int pass = 0; pass <= 1; pass++) { - vtkm::Vec tickSize(0); + vtkm::Vec tickSize(0); if (pass == 0) { switch (this->Axis) { - case 0: tickSize[1] = this->TickMajorSize; break; - case 1: tickSize[0] = this->TickMajorSize; break; - case 2: tickSize[0] = this->TickMajorSize; break; + case 0: + tickSize[1] = this->TickMajorSize; + break; + case 1: + tickSize[0] = this->TickMajorSize; + break; + case 2: + tickSize[0] = this->TickMajorSize; + break; } } else // pass == 1 { switch (this->Axis) { - case 0: tickSize[2] = this->TickMajorSize; break; - case 1: tickSize[2] = this->TickMajorSize; break; - case 2: tickSize[1] = this->TickMajorSize; break; + case 0: + tickSize[2] = this->TickMajorSize; + break; + case 1: + tickSize[2] = this->TickMajorSize; + break; + case 2: + tickSize[1] = this->TickMajorSize; + break; } } tickSize = tickSize * this->Invert; - vtkm::Vec start = - tickPos - tickSize*this->TickMajorOffset; - vtkm::Vec end = - tickPos - tickSize*(1.0 - this->TickMajorOffset); + vtkm::Vec start = tickPos - tickSize * this->TickMajorOffset; + vtkm::Vec end = tickPos - tickSize * (1.0 - this->TickMajorOffset); - worldAnnotator.AddLine(start, - end, - this->LineWidth, - this->Color, - infront); + worldAnnotator.AddLine(start, end, this->LineWidth, this->Color, infront); } - vtkm::Vec tickSize(0); + vtkm::Vec tickSize(0); vtkm::Float32 s = 0.4f * this->FontOffset; switch (this->Axis) { - case 0: tickSize[1]=s; tickSize[2]=s; break; - case 1: tickSize[0]=s; tickSize[2]=s; break; - case 2: tickSize[0]=s; tickSize[1]=s; break; + case 0: + tickSize[1] = s; + tickSize[2] = s; + break; + case 1: + tickSize[0] = s; + tickSize[2] = s; + break; + case 2: + tickSize[0] = s; + tickSize[1] = s; + break; } tickSize = tickSize * this->Invert; @@ -137,55 +154,63 @@ void AxisAnnotation3D::Render(const Camera &camera, //if (fabs(positions[i]) < 1e-10) // this->Labels[i]->SetText("0"); this->Labels[i]->SetPosition(vtkm::Float32(tickPos[0] - tickSize[0]), - vtkm::Float32(tickPos[1] - tickSize[1]), - vtkm::Float32(tickPos[2] - tickSize[2])); - this->Labels[i]->SetAlignment(TextAnnotation::HCenter, - TextAnnotation::VCenter); + vtkm::Float32(tickPos[1] - tickSize[1]), + vtkm::Float32(tickPos[2] - tickSize[2])); + this->Labels[i]->SetAlignment(TextAnnotation::HCenter, TextAnnotation::VCenter); } // minor ticks CalculateTicks(this->Range, true, positions, proportions, this->MoreOrLessTickAdjustment); unsigned int nminor = (unsigned int)proportions.size(); - for (unsigned int i=0; i tickPos = - proportions[i]*(this->Point1-this->Point0) + this->Point0; - for (int pass=0; pass<=1; pass++) + vtkm::Vec tickPos = + proportions[i] * (this->Point1 - this->Point0) + this->Point0; + for (int pass = 0; pass <= 1; pass++) { - vtkm::Vec tickSize(0); + vtkm::Vec tickSize(0); if (pass == 0) { switch (this->Axis) { - case 0: tickSize[1] = this->TickMajorSize; break; - case 1: tickSize[0] = this->TickMajorSize; break; - case 2: tickSize[0] = this->TickMajorSize; break; + case 0: + tickSize[1] = this->TickMajorSize; + break; + case 1: + tickSize[0] = this->TickMajorSize; + break; + case 2: + tickSize[0] = this->TickMajorSize; + break; } } else // pass == 1 { switch (this->Axis) { - case 0: tickSize[2] = this->TickMajorSize; break; - case 1: tickSize[2] = this->TickMajorSize; break; - case 2: tickSize[1] = this->TickMajorSize; break; + case 0: + tickSize[2] = this->TickMajorSize; + break; + case 1: + tickSize[2] = this->TickMajorSize; + break; + case 2: + tickSize[1] = this->TickMajorSize; + break; } } tickSize = tickSize * this->Invert; - vtkm::Vec start = - tickPos - tickSize*this->TickMinorOffset; - vtkm::Vec end = - tickPos - tickSize*(1.0 - this->TickMinorOffset); + vtkm::Vec start = tickPos - tickSize * this->TickMinorOffset; + vtkm::Vec end = tickPos - tickSize * (1.0 - this->TickMinorOffset); worldAnnotator.AddLine(start, end, this->LineWidth, this->Color, infront); } } - for (unsigned int i=0; iLabels[i]->Render(camera, worldAnnotator, canvas); } } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/AxisAnnotation3D.h b/vtkm/rendering/AxisAnnotation3D.h index 1ea9fa17c..2263a7460 100644 --- a/vtkm/rendering/AxisAnnotation3D.h +++ b/vtkm/rendering/AxisAnnotation3D.h @@ -37,8 +37,10 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT AxisAnnotation3D : public AxisAnnotation { @@ -46,9 +48,9 @@ private: protected: vtkm::Float64 TickMajorSize, TickMajorOffset; vtkm::Float64 TickMinorSize, TickMinorOffset; - int Axis; - vtkm::Vec Invert; - vtkm::Vec Point0, Point1; + int Axis; + vtkm::Vec Invert; + vtkm::Vec Point0, Point1; vtkm::Range Range; vtkm::Float64 FontScale; vtkm::Float32 FontOffset; @@ -56,29 +58,20 @@ protected: vtkm::rendering::Color Color; std::vector Labels; int MoreOrLessTickAdjustment; -public: +public: AxisAnnotation3D(); ~AxisAnnotation3D(); VTKM_CONT - void SetMoreOrLessTickAdjustment(int offset) - { - this->MoreOrLessTickAdjustment = offset; - } + void SetMoreOrLessTickAdjustment(int offset) { this->MoreOrLessTickAdjustment = offset; } VTKM_CONT - void SetColor(vtkm::rendering::Color c) - { - this->Color = c; - } + void SetColor(vtkm::rendering::Color c) { this->Color = c; } VTKM_CONT - void SetAxis(int a) - { - this->Axis = a; - } + void SetAxis(int a) { this->Axis = a; } void SetTickInvert(bool x, bool y, bool z); @@ -99,43 +92,36 @@ public: } VTKM_CONT - void SetWorldPosition(const vtkm::Vec &point0, - const vtkm::Vec &point1) + void SetWorldPosition(const vtkm::Vec& point0, + const vtkm::Vec& point1) { this->Point0 = point0; this->Point1 = point1; } VTKM_CONT - void SetWorldPosition(vtkm::Float64 x0, vtkm::Float64 y0, vtkm::Float64 z0, - vtkm::Float64 x1, vtkm::Float64 y1, vtkm::Float64 z1) + void SetWorldPosition(vtkm::Float64 x0, vtkm::Float64 y0, vtkm::Float64 z0, vtkm::Float64 x1, + vtkm::Float64 y1, vtkm::Float64 z1) { - this->SetWorldPosition(vtkm::make_Vec(x0,y0,z0), vtkm::make_Vec(x1,y1,z1)); + this->SetWorldPosition(vtkm::make_Vec(x0, y0, z0), vtkm::make_Vec(x1, y1, z1)); } void SetLabelFontScale(vtkm::Float64 s); - void SetLabelFontOffset(vtkm::Float32 off) - { - this->FontOffset = off; - } + void SetLabelFontOffset(vtkm::Float32 off) { this->FontOffset = off; } - void SetRange(const vtkm::Range &range) - { - this->Range = range; - } + void SetRange(const vtkm::Range& range) { this->Range = range; } void SetRange(vtkm::Float64 lower, vtkm::Float64 upper) { this->SetRange(vtkm::Range(lower, upper)); } - virtual void Render(const vtkm::rendering::Camera &camera, - const vtkm::rendering::WorldAnnotator &worldAnnotator, - vtkm::rendering::Canvas &canvas) VTKM_OVERRIDE; + virtual void Render(const vtkm::rendering::Camera& camera, + const vtkm::rendering::WorldAnnotator& worldAnnotator, + vtkm::rendering::Canvas& canvas) VTKM_OVERRIDE; }; - - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif // vtk_m_rendering_AxisAnnotation3D_h diff --git a/vtkm/rendering/BitmapFont.cxx b/vtkm/rendering/BitmapFont.cxx index 21a62c0a3..59e567088 100644 --- a/vtkm/rendering/BitmapFont.cxx +++ b/vtkm/rendering/BitmapFont.cxx @@ -22,51 +22,47 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ BitmapFont::BitmapFont() { - for (int i=0; i<256; ++i) + for (int i = 0; i < 256; ++i) ShortMap[i] = 0; - this->PadL=0; - this->PadR=0; - this->PadT=0; - this->PadB=0; + this->PadL = 0; + this->PadR = 0; + this->PadT = 0; + this->PadB = 0; } -const vtkm::rendering::BitmapFont::Character & -BitmapFont::GetChar(char c) const +const vtkm::rendering::BitmapFont::Character& BitmapFont::GetChar(char c) const { - std::size_t mappedCharIndex = - static_cast(this->ShortMap[(unsigned char)c]); + std::size_t mappedCharIndex = static_cast(this->ShortMap[(unsigned char)c]); return this->Chars[mappedCharIndex]; } -vtkm::Float32 -BitmapFont::GetTextWidth(const std::string &text) const +vtkm::Float32 BitmapFont::GetTextWidth(const std::string& text) const { vtkm::Float32 width = 0; - for (unsigned int i=0; iGetChar(text[i]); - char nextchar = (i < text.length()-1) ? text[i+1] : 0; + char nextchar = (i < text.length() - 1) ? text[i + 1] : 0; const bool kerning = true; - if (kerning && nextchar>0) + if (kerning && nextchar > 0) width += vtkm::Float32(c.kern[int(nextchar)]) / vtkm::Float32(this->Height); width += vtkm::Float32(c.adv) / vtkm::Float32(this->Height); } return width; } -void BitmapFont::GetCharPolygon(char character, - vtkm::Float32 &x, vtkm::Float32 &y, - vtkm::Float32 &vl, vtkm::Float32 &vr, - vtkm::Float32 &vt, vtkm::Float32 &vb, - vtkm::Float32 &tl, vtkm::Float32 &tr, - vtkm::Float32 &tt, vtkm::Float32 &tb, - char nextchar) const +void BitmapFont::GetCharPolygon(char character, vtkm::Float32& x, vtkm::Float32& y, + vtkm::Float32& vl, vtkm::Float32& vr, vtkm::Float32& vt, + vtkm::Float32& vb, vtkm::Float32& tl, vtkm::Float32& tr, + vtkm::Float32& tt, vtkm::Float32& tb, char nextchar) const { Character c = this->GetChar(character); @@ -75,21 +71,20 @@ void BitmapFont::GetCharPolygon(char character, // be at the actual bottom, so create an offset. vtkm::Float32 yoff = -vtkm::Float32(this->Descender) / vtkm::Float32(this->Height); - tl = vtkm::Float32(c.x + this->PadL) / vtkm::Float32(this->ImgW); - tr = vtkm::Float32(c.x + c.w - this->PadR) / vtkm::Float32(this->ImgW); - tt = 1.f - vtkm::Float32(c.y + this->PadT) / vtkm::Float32(this->ImgH); + tl = vtkm::Float32(c.x + this->PadL) / vtkm::Float32(this->ImgW); + tr = vtkm::Float32(c.x + c.w - this->PadR) / vtkm::Float32(this->ImgW); + tt = 1.f - vtkm::Float32(c.y + this->PadT) / vtkm::Float32(this->ImgH); tb = 1.f - vtkm::Float32(c.y + c.h - this->PadB) / vtkm::Float32(this->ImgH); - vl = x + vtkm::Float32(c.offx + this->PadL) / vtkm::Float32(this->Height); - vr = x + vtkm::Float32(c.offx + c.w - this->PadR) / vtkm::Float32(this->Height); - vt = yoff + y + vtkm::Float32(c.offy - this->PadT) / vtkm::Float32(this->Height); + vl = x + vtkm::Float32(c.offx + this->PadL) / vtkm::Float32(this->Height); + vr = x + vtkm::Float32(c.offx + c.w - this->PadR) / vtkm::Float32(this->Height); + vt = yoff + y + vtkm::Float32(c.offy - this->PadT) / vtkm::Float32(this->Height); vb = yoff + y + vtkm::Float32(c.offy - c.h + this->PadB) / vtkm::Float32(this->Height); const bool kerning = true; - if (kerning && nextchar>0) + if (kerning && nextchar > 0) x += vtkm::Float32(c.kern[int(nextchar)]) / vtkm::Float32(this->Height); x += vtkm::Float32(c.adv) / vtkm::Float32(this->Height); } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/BitmapFont.h b/vtkm/rendering/BitmapFont.h index 1f0ede382..738327560 100644 --- a/vtkm/rendering/BitmapFont.h +++ b/vtkm/rendering/BitmapFont.h @@ -29,8 +29,10 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT BitmapFont { @@ -38,46 +40,56 @@ public: struct Character { std::string id; - char c; + char c; int offx, offy; int x, y, w, h; int adv; int kern[256]; - Character() + Character() { ResetKerning(); } + Character(const std::string& id_, char c_, int offx_, int offy_, int x_, int y_, int w_, int h_, + int adv_) + : id(id_) + , c(c_) + , offx(offx_) + , offy(offy_) + , x(x_) + , y(y_) + , w(w_) + , h(h_) + , adv(adv_) { ResetKerning(); } - Character(const std::string &id_, char c_, int offx_, int offy_, - int x_, int y_, int w_, int h_, int adv_) - : id(id_), c(c_), offx(offx_), offy(offy_), - x(x_), y(y_), w(w_), h(h_), adv(adv_) - { - ResetKerning(); - } - Character(const std::string &id_, const int metrics[]) - : id(id_), c((char)metrics[0]), offx(metrics[1]), offy(metrics[2]), - x(metrics[3]), y(metrics[4]), w(metrics[5]), h(metrics[6]), - adv(metrics[7]) + Character(const std::string& id_, const int metrics[]) + : id(id_) + , c((char)metrics[0]) + , offx(metrics[1]) + , offy(metrics[2]) + , x(metrics[3]) + , y(metrics[4]) + , w(metrics[5]) + , h(metrics[6]) + , adv(metrics[7]) { ResetKerning(); } void ResetKerning() { - for (int i=0; i<256; i++) + for (int i = 0; i < 256; i++) { - kern[i]=0; + kern[i] = 0; } } }; std::string Name; std::string ImageFile; - int Height; - int Ascender; - int Descender; - int ImgW, ImgH; - int PadL, PadR, PadT, PadB; - int ShortMap[256]; + int Height; + int Ascender; + int Descender; + int ImgW, ImgH; + int PadL, PadR, PadT, PadB; + int ShortMap[256]; std::vector Chars; std::vector RawImageFileData; @@ -85,22 +97,19 @@ public: public: BitmapFont(); - const Character &GetChar(char c) const; + const Character& GetChar(char c) const; VTKM_CONT - const std::vector &GetRawImageData() const - { - return this->RawImageFileData; - } + const std::vector& GetRawImageData() const { return this->RawImageFileData; } - vtkm::Float32 GetTextWidth(const std::string &text) const; + vtkm::Float32 GetTextWidth(const std::string& text) const; - void GetCharPolygon(char character, vtkm::Float32 &x, vtkm::Float32 &y, - vtkm::Float32 &vl, vtkm::Float32 &vr, vtkm::Float32 &vt, vtkm::Float32 &vb, - vtkm::Float32 &tl, vtkm::Float32 &tr, vtkm::Float32 &tt, vtkm::Float32 &tb, + void GetCharPolygon(char character, vtkm::Float32& x, vtkm::Float32& y, vtkm::Float32& vl, + vtkm::Float32& vr, vtkm::Float32& vt, vtkm::Float32& vb, vtkm::Float32& tl, + vtkm::Float32& tr, vtkm::Float32& tt, vtkm::Float32& tb, char nextchar = 0) const; }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif diff --git a/vtkm/rendering/BitmapFontFactory.cxx b/vtkm/rendering/BitmapFontFactory.cxx index 44ef50876..1c6fbe22b 100644 --- a/vtkm/rendering/BitmapFontFactory.cxx +++ b/vtkm/rendering/BitmapFontFactory.cxx @@ -22,9532 +22,5956 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ //---------------------------------------------------------------------------- // Arrays for Liberation Sans 2.0, // available under the OFL (SIL Open Font License) static const int Liberation2Sans_charmetrics[][8] = { - {32,-16,14,1,84,32,28,31}, - {33,-7,91,34,7,44,105,29}, - {34,-12,91,79,7,64,52,40}, - {35,-16,91,144,7,94,105,62}, - {36,-15,97,239,1,92,119,62}, - {37,-12,92,332,6,124,107,100}, - {38,-13,92,457,6,103,107,75}, - {39,-11,91,561,7,43,52,21}, - {40,-10,95,605,3,63,132,37}, - {41,-16,95,669,3,63,132,37}, - {42,-15,91,733,7,74,67,44}, - {43,-11,79,808,19,87,84,65}, - {44,-6,26,896,72,44,54,31}, - {45,-12,48,941,50,61,37,37}, - {46,-6,26,1,205,43,40,31}, - {47,-16,95,45,136,63,110,31}, - {48,-12,92,109,139,86,107,62}, - {49,-8,91,196,140,81,105,62}, - {50,-11,92,278,139,84,106,62}, - {51,-12,92,363,139,86,107,62}, - {52,-14,91,450,140,89,105,62}, - {53,-12,91,540,140,86,106,62}, - {54,-11,92,627,139,85,107,62}, - {55,-11,91,713,140,84,105,62}, - {56,-12,92,798,139,86,107,62}, - {57,-11,92,885,139,84,107,62}, - {58,-6,73,970,158,43,87,31}, - {59,-6,73,1,269,44,102,31}, - {60,-11,79,46,263,87,85,65}, - {61,-11,69,134,273,87,65,65}, - {62,-11,79,222,263,87,85,65}, - {63,-12,92,310,250,86,106,62}, - {64,-8,95,397,247,129,124,114}, - {65,-16,91,527,251,107,105,75}, - {66,-7,91,635,251,93,105,75}, - {67,-11,92,729,250,104,107,81}, - {68,-7,91,834,251,99,105,81}, - {69,-7,91,1,373,94,105,75}, - {70,-7,91,96,373,87,105,68}, - {71,-11,92,184,372,106,107,87}, - {72,-7,91,291,373,95,105,81}, - {73,-6,91,387,373,43,105,31}, - {74,-15,91,431,373,79,106,56}, - {75,-7,91,511,373,97,105,75}, - {76,-7,91,609,373,82,105,62}, - {77,-7,91,692,373,107,105,93}, - {78,-7,91,800,373,95,105,81}, - {79,-11,92,896,372,109,107,87}, - {80,-7,91,1,481,93,105,75}, - {81,-11,92,95,480,109,127,87}, - {82,-7,91,205,481,99,105,81}, - {83,-11,92,305,480,97,107,75}, - {84,-14,91,403,481,97,105,69}, - {85,-8,91,501,481,97,106,81}, - {86,-16,91,599,481,107,105,75}, - {87,-16,91,707,481,140,105,108}, - {88,-14,91,848,481,103,105,75}, - {89,-14,91,1,614,101,105,73}, - {90,-13,91,103,614,94,105,68}, - {91,-9,95,198,610,56,132,31}, - {92,-16,95,255,610,63,110,31}, - {93,-16,95,319,610,56,132,31}, - {94,-16,91,376,614,82,68,50}, - {95,-18,-1,459,706,98,36,62}, - {96,-11,97,558,608,56,45,37}, - {97,-12,74,615,631,90,89,62}, - {98,-9,95,706,610,83,110,62}, - {99,-12,74,790,631,82,89,56}, - {100,-12,95,873,610,83,110,62}, - {101,-12,74,1,764,86,89,62}, - {102,-15,95,88,743,63,109,31}, - {103,-12,74,152,764,83,111,62}, - {104,-9,95,236,743,80,109,62}, - {105,-9,95,317,743,43,109,25}, - {106,-19,95,361,743,53,132,25}, - {107,-9,95,415,743,82,109,56}, - {108,-9,95,498,743,43,109,25}, - {109,-9,74,542,764,113,88,95}, - {110,-9,74,656,764,80,88,62}, - {111,-12,74,737,764,86,89,62}, - {112,-9,74,824,764,83,111,62}, - {113,-12,74,908,764,83,111,62}, - {114,-9,74,1,897,61,88,37}, - {115,-13,74,63,897,81,89,56}, - {116,-15,86,145,885,62,101,31}, - {117,-9,73,208,898,80,88,62}, - {118,-16,73,289,898,87,87,55}, - {119,-17,73,377,898,115,87,81}, - {120,-15,73,493,898,85,87,55}, - {121,-16,73,579,898,85,110,53}, - {122,-12,73,665,898,79,87,56}, - {123,-15,95,745,876,67,132,37}, - {124,-7,95,813,876,42,133,28}, - {125,-15,95,856,876,66,132,37}, - {126,-11,58,923,913,87,42,65}, + { 32, -16, 14, 1, 84, 32, 28, 31 }, { 33, -7, 91, 34, 7, 44, 105, 29 }, + { 34, -12, 91, 79, 7, 64, 52, 40 }, { 35, -16, 91, 144, 7, 94, 105, 62 }, + { 36, -15, 97, 239, 1, 92, 119, 62 }, { 37, -12, 92, 332, 6, 124, 107, 100 }, + { 38, -13, 92, 457, 6, 103, 107, 75 }, { 39, -11, 91, 561, 7, 43, 52, 21 }, + { 40, -10, 95, 605, 3, 63, 132, 37 }, { 41, -16, 95, 669, 3, 63, 132, 37 }, + { 42, -15, 91, 733, 7, 74, 67, 44 }, { 43, -11, 79, 808, 19, 87, 84, 65 }, + { 44, -6, 26, 896, 72, 44, 54, 31 }, { 45, -12, 48, 941, 50, 61, 37, 37 }, + { 46, -6, 26, 1, 205, 43, 40, 31 }, { 47, -16, 95, 45, 136, 63, 110, 31 }, + { 48, -12, 92, 109, 139, 86, 107, 62 }, { 49, -8, 91, 196, 140, 81, 105, 62 }, + { 50, -11, 92, 278, 139, 84, 106, 62 }, { 51, -12, 92, 363, 139, 86, 107, 62 }, + { 52, -14, 91, 450, 140, 89, 105, 62 }, { 53, -12, 91, 540, 140, 86, 106, 62 }, + { 54, -11, 92, 627, 139, 85, 107, 62 }, { 55, -11, 91, 713, 140, 84, 105, 62 }, + { 56, -12, 92, 798, 139, 86, 107, 62 }, { 57, -11, 92, 885, 139, 84, 107, 62 }, + { 58, -6, 73, 970, 158, 43, 87, 31 }, { 59, -6, 73, 1, 269, 44, 102, 31 }, + { 60, -11, 79, 46, 263, 87, 85, 65 }, { 61, -11, 69, 134, 273, 87, 65, 65 }, + { 62, -11, 79, 222, 263, 87, 85, 65 }, { 63, -12, 92, 310, 250, 86, 106, 62 }, + { 64, -8, 95, 397, 247, 129, 124, 114 }, { 65, -16, 91, 527, 251, 107, 105, 75 }, + { 66, -7, 91, 635, 251, 93, 105, 75 }, { 67, -11, 92, 729, 250, 104, 107, 81 }, + { 68, -7, 91, 834, 251, 99, 105, 81 }, { 69, -7, 91, 1, 373, 94, 105, 75 }, + { 70, -7, 91, 96, 373, 87, 105, 68 }, { 71, -11, 92, 184, 372, 106, 107, 87 }, + { 72, -7, 91, 291, 373, 95, 105, 81 }, { 73, -6, 91, 387, 373, 43, 105, 31 }, + { 74, -15, 91, 431, 373, 79, 106, 56 }, { 75, -7, 91, 511, 373, 97, 105, 75 }, + { 76, -7, 91, 609, 373, 82, 105, 62 }, { 77, -7, 91, 692, 373, 107, 105, 93 }, + { 78, -7, 91, 800, 373, 95, 105, 81 }, { 79, -11, 92, 896, 372, 109, 107, 87 }, + { 80, -7, 91, 1, 481, 93, 105, 75 }, { 81, -11, 92, 95, 480, 109, 127, 87 }, + { 82, -7, 91, 205, 481, 99, 105, 81 }, { 83, -11, 92, 305, 480, 97, 107, 75 }, + { 84, -14, 91, 403, 481, 97, 105, 69 }, { 85, -8, 91, 501, 481, 97, 106, 81 }, + { 86, -16, 91, 599, 481, 107, 105, 75 }, { 87, -16, 91, 707, 481, 140, 105, 108 }, + { 88, -14, 91, 848, 481, 103, 105, 75 }, { 89, -14, 91, 1, 614, 101, 105, 73 }, + { 90, -13, 91, 103, 614, 94, 105, 68 }, { 91, -9, 95, 198, 610, 56, 132, 31 }, + { 92, -16, 95, 255, 610, 63, 110, 31 }, { 93, -16, 95, 319, 610, 56, 132, 31 }, + { 94, -16, 91, 376, 614, 82, 68, 50 }, { 95, -18, -1, 459, 706, 98, 36, 62 }, + { 96, -11, 97, 558, 608, 56, 45, 37 }, { 97, -12, 74, 615, 631, 90, 89, 62 }, + { 98, -9, 95, 706, 610, 83, 110, 62 }, { 99, -12, 74, 790, 631, 82, 89, 56 }, + { 100, -12, 95, 873, 610, 83, 110, 62 }, { 101, -12, 74, 1, 764, 86, 89, 62 }, + { 102, -15, 95, 88, 743, 63, 109, 31 }, { 103, -12, 74, 152, 764, 83, 111, 62 }, + { 104, -9, 95, 236, 743, 80, 109, 62 }, { 105, -9, 95, 317, 743, 43, 109, 25 }, + { 106, -19, 95, 361, 743, 53, 132, 25 }, { 107, -9, 95, 415, 743, 82, 109, 56 }, + { 108, -9, 95, 498, 743, 43, 109, 25 }, { 109, -9, 74, 542, 764, 113, 88, 95 }, + { 110, -9, 74, 656, 764, 80, 88, 62 }, { 111, -12, 74, 737, 764, 86, 89, 62 }, + { 112, -9, 74, 824, 764, 83, 111, 62 }, { 113, -12, 74, 908, 764, 83, 111, 62 }, + { 114, -9, 74, 1, 897, 61, 88, 37 }, { 115, -13, 74, 63, 897, 81, 89, 56 }, + { 116, -15, 86, 145, 885, 62, 101, 31 }, { 117, -9, 73, 208, 898, 80, 88, 62 }, + { 118, -16, 73, 289, 898, 87, 87, 55 }, { 119, -17, 73, 377, 898, 115, 87, 81 }, + { 120, -15, 73, 493, 898, 85, 87, 55 }, { 121, -16, 73, 579, 898, 85, 110, 53 }, + { 122, -12, 73, 665, 898, 79, 87, 56 }, { 123, -15, 95, 745, 876, 67, 132, 37 }, + { 124, -7, 95, 813, 876, 42, 133, 28 }, { 125, -15, 95, 856, 876, 66, 132, 37 }, + { 126, -11, 58, 923, 913, 87, 42, 65 }, }; -static const char *Liberation2Sans_charids[] = { - " ","!","\"","#","$","%","&","'","(",")", - "*","+",",","-",".","/","0","1","2","3", - "4","5","6","7","8","9",":",";","<","=", - ">","?","@","A","B","C","D","E","F","G", - "H","I","J","K","L","M","N","O","P","Q", - "R","S","T","U","V","W","X","Y","Z","[", - "\\","]","^","_","`","a","b","c","d","e", - "f","g","h","i","j","k","l","m","n","o", - "p","q","r","s","t","u","v","w","x","y", - "z","{","|","}","~" +static const char* Liberation2Sans_charids[] = { + " ", "!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", "0", "1", "2", + "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "?", "@", "A", "B", "C", "D", "E", + "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", + "Y", "Z", "[", "\\", "]", "^", "_", "`", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", + "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~" }; static const unsigned char Liberation2Sans_rawimage[] = { - 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00, - 0x00,0x0d,0x49,0x48,0x44,0x52,0x00,0x00,0x04,0x00, - 0x00,0x00,0x04,0x00,0x08,0x06,0x00,0x00,0x00,0x7f, - 0x1d,0x2b,0x83,0x00,0x00,0x00,0x04,0x73,0x42,0x49, - 0x54,0x08,0x08,0x08,0x08,0x7c,0x08,0x64,0x88,0x00, - 0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0e, - 0xc4,0x00,0x00,0x0e,0xc4,0x01,0x95,0x2b,0x0e,0x1b, - 0x00,0x00,0x20,0x00,0x49,0x44,0x41,0x54,0x78,0x9c, - 0xec,0xdd,0x75,0x98,0x64,0xd5,0xb5,0xf7,0xf1,0x6f, - 0xcf,0x0c,0xe3,0x0c,0x0c,0xee,0xee,0x36,0x78,0x70, - 0x4f,0x08,0x71,0x1c,0x82,0x5c,0x9c,0x10,0x1c,0x12, - 0x08,0xee,0x12,0x1c,0x42,0x20,0x78,0x90,0x10,0x08, - 0x1a,0x20,0x09,0x10,0xdc,0x5d,0x07,0x08,0x0e,0x83, - 0x3b,0x0c,0x33,0x8c,0x4f,0xbf,0x7f,0xac,0xee,0x97, - 0xa1,0xa9,0x3a,0x7b,0x9d,0xaa,0xe3,0xe7,0xf7,0x79, - 0x9e,0x7e,0xee,0x0d,0xb5,0xbb,0xce,0x9e,0xea,0xee, - 0xaa,0xb3,0xd7,0x5e,0x7b,0xad,0x8e,0xce,0xce,0x4e, - 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0xa4,0xda,0x7a, - 0xe5,0x3d,0x01,0x11,0x11,0x11,0x11,0x11,0x11,0x11, - 0x49,0x9f,0x02,0x00,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x35,0xa0,0x00,0x80,0x88,0x88,0x88,0x88,0x88, - 0x88,0x48,0x0d,0x28,0x00,0x20,0x22,0x22,0x22,0x22, - 0x22,0x22,0x52,0x03,0x0a,0x00,0x88,0x88,0x88,0x88, - 0x88,0x88,0x88,0xd4,0x80,0x02,0x00,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x35,0xa0,0x00,0x80,0x88,0x88, - 0x88,0x88,0x88,0x88,0x48,0x0d,0x28,0x00,0x20,0x22, - 0x22,0x22,0x22,0x22,0x22,0x52,0x03,0x0a,0x00,0x88, - 0x88,0x88,0x88,0x88,0x88,0x88,0xd4,0x80,0x02,0x00, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x35,0xa0,0x00, - 0x80,0x88,0x88,0x88,0x88,0x88,0x88,0x48,0x0d,0x28, - 0x00,0x20,0x22,0x22,0x22,0x22,0x22,0x22,0x52,0x03, - 0x0a,0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0xd4, - 0x80,0x02,0x00,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x35,0xa0,0x00,0x80,0x88,0x64,0xe1,0x09,0xa0,0xb3, - 0xc1,0xd7,0xc4,0x3c,0x27,0x25,0x22,0x22,0x22,0x22, - 0x52,0x27,0x0a,0x00,0x88,0x88,0x88,0x88,0x88,0x88, - 0x88,0xd4,0x80,0x02,0x00,0x22,0x22,0x22,0x22,0xf5, - 0x74,0x21,0x8d,0xb3,0xb3,0xa6,0xfc,0xfa,0x1f,0x30, - 0x34,0xaf,0x09,0xf6,0x30,0x14,0x78,0x99,0xf0,0x9c, - 0x2f,0xc8,0x6b,0x82,0x22,0x22,0x45,0xa7,0x00,0x80, - 0x88,0x88,0x88,0x48,0xfd,0x1c,0x01,0xec,0x18,0x18, - 0xf3,0x29,0xf0,0x53,0xe0,0x8b,0xf4,0xa7,0xe3,0xf2, - 0x05,0xf0,0x33,0xe0,0xf3,0xc0,0xb8,0x9d,0x80,0xc3, - 0xd2,0x9f,0x8e,0x88,0x48,0xf9,0x28,0x00,0x20,0x22, - 0x22,0x22,0x52,0x2f,0xdb,0x01,0x47,0x06,0xc6,0x8c, - 0x03,0x36,0x04,0x5e,0x4f,0x7b,0x32,0x31,0xbd,0x0a, - 0x6c,0x04,0x8c,0x0f,0x8c,0x3b,0x1a,0xf8,0xbf,0xf4, - 0xa7,0x23,0x22,0x52,0x2e,0x1d,0x9d,0x9d,0x9d,0x79, - 0xcf,0x41,0x44,0xaa,0xef,0x09,0x60,0xb9,0x06,0xff, - 0x7d,0x12,0xd0,0x27,0xe3,0xb9,0x94,0xc5,0xfc,0xc0, - 0xba,0xc0,0x2a,0xc0,0x42,0xc0,0xdc,0xc0,0xd4,0xc0, - 0x40,0xec,0xc6,0xfc,0x6b,0x60,0x04,0xf0,0x0a,0xf0, - 0x20,0x70,0x3b,0xc5,0xbb,0x51,0x97,0x6c,0x2d,0x08, - 0xac,0x09,0x0c,0x03,0x16,0x01,0x66,0x07,0x66,0xc2, - 0x7e,0x67,0xfa,0x01,0x13,0x80,0x6f,0x80,0x8f,0x81, - 0x77,0x81,0x17,0x80,0xa7,0x80,0xbb,0x80,0x77,0x72, - 0x98,0xaf,0xe4,0x63,0x15,0xe0,0x6e,0xa0,0x6f,0x60, - 0xdc,0x2e,0x14,0x3b,0x95,0xfe,0xb7,0xc0,0x9f,0x03, - 0x63,0xc6,0x03,0x6b,0x01,0x0f,0xa7,0x3e,0x1b,0x11, - 0x91,0x92,0xa8,0x52,0x06,0xc0,0xef,0x09,0x9f,0x09, - 0xeb,0xfe,0x5a,0x2d,0xa7,0x39,0xf6,0xb4,0x2c,0xbe, - 0xf9,0x3e,0x1b,0xe3,0x39,0x47,0x38,0x9f,0x73,0xde, - 0x44,0xfe,0x05,0xc5,0x35,0x0b,0x8d,0xff,0xdd,0x9f, - 0x24,0x7c,0x9d,0xed,0x9a,0x5c,0xe7,0x8a,0x84,0xaf, - 0x23,0xf5,0xd0,0x0b,0xd8,0x1a,0xbb,0x59,0x7d,0x0d, - 0x38,0x0f,0xdb,0xc1,0x5a,0x19,0x98,0x0d,0x0b,0x00, - 0xf4,0xc6,0x16,0x74,0x33,0x03,0x2b,0x00,0x5b,0x01, - 0xe7,0x74,0x8d,0xbf,0x0f,0xdb,0x19,0x2b,0xba,0x35, - 0x80,0xc9,0x44,0xbf,0x47,0x6d,0x95,0xdb,0xec,0xca, - 0x65,0x1e,0xe0,0x18,0xe0,0x0d,0x2c,0x18,0x74,0x01, - 0xb0,0x07,0xb0,0x1e,0xb0,0x28,0x30,0x3d,0x30,0x00, - 0xfb,0xdd,0xea,0x87,0x9d,0xa1,0x5e,0x18,0x0b,0x2e, - 0xed,0x05,0xfc,0x15,0xfb,0xdc,0x78,0x1a,0xd8,0x17, - 0x98,0x26,0xcb,0xc9,0x17,0xc0,0x2e,0xf8,0x3e,0x33, - 0x2f,0xca,0x6b,0x82,0x09,0x9b,0x1d,0xb8,0x8e,0xf0, - 0xe2,0xff,0x22,0x8a,0xbd,0xf8,0x07,0x7b,0xdf,0xbb, - 0x3c,0x30,0xa6,0x2f,0x70,0x3d,0xf6,0xef,0x16,0x73, - 0x2e,0xcd,0x7f,0xcf,0x9f,0xca,0x71,0x5e,0x22,0x92, - 0x91,0x2a,0xed,0xbc,0x85,0x52,0xc1,0x5a,0x1d,0x9b, - 0xa6,0x51,0xce,0x71,0x5f,0xc7,0x78,0xce,0xd1,0x29, - 0x3c,0x67,0x19,0xad,0xdc,0xe4,0xbf,0x3f,0x9a,0xf0, - 0x75,0x56,0x6a,0xf2,0xdf,0x1f,0x49,0xf8,0x3a,0x45, - 0xd7,0x1f,0x58,0x0a,0x58,0x06,0x5b,0x5c,0xcc,0x03, - 0xcc,0x05,0xcc,0x80,0x2d,0x40,0x06,0x37,0xf9,0xbe, - 0xde,0xd8,0xef,0xec,0x67,0x58,0x70,0xe6,0x6d,0xe0, - 0x2d,0x60,0x38,0xf0,0x0c,0xf0,0x1c,0xf5,0x69,0x15, - 0xb8,0x3c,0x70,0x31,0xb0,0x64,0x1b,0xcf,0xb1,0x7a, - 0xd7,0xd7,0x03,0x58,0xe0,0xe0,0x8d,0x04,0xe6,0x95, - 0xb4,0x01,0xd8,0xe2,0xa2,0x23,0x62,0xcc,0xcd,0xc0, - 0xdf,0xb2,0x99,0x4e,0x69,0xcd,0x0a,0x1c,0x07,0x6c, - 0x43,0x32,0x9f,0xe5,0x4b,0x77,0x7d,0x1d,0x09,0x9c, - 0x0a,0x9c,0x04,0x8c,0x4d,0xe0,0x79,0x8b,0x2e,0x8d, - 0xcf,0xe1,0xa2,0xea,0x0b,0xdc,0x80,0x05,0xc8,0xa3, - 0x3c,0x09,0xec,0x9e,0xfe,0x74,0x12,0xb1,0x2b,0xf6, - 0xd9,0x33,0x2c,0x62,0xcc,0x2c,0x58,0x10,0x60,0x75, - 0x8a,0x73,0xff,0x97,0xa7,0x6f,0x5a,0x7c,0x4c,0x44, - 0x2a,0x42,0x01,0x80,0x7c,0x79,0x6f,0x28,0xe2,0xdc, - 0x78,0xd4,0xe9,0x66,0x26,0x4a,0x56,0x0b,0xf3,0x1f, - 0x64,0x74,0x9d,0x22,0x5a,0x1c,0xdb,0x6d,0xfe,0x21, - 0xf6,0x7a,0x4f,0xd5,0xe2,0xf3,0x0c,0xec,0xfa,0x9a, - 0x13,0xcb,0x8a,0x99,0xd2,0x28,0x6c,0x31,0x7b,0x0b, - 0x70,0x2d,0xf0,0x51,0x8b,0xd7,0x28,0xba,0x5d,0x81, - 0x3f,0xd1,0xfa,0x6b,0xd8,0xd3,0x6a,0xd8,0x4e,0xce, - 0x16,0xc0,0xad,0x09,0x3d,0x67,0x52,0x8e,0x05,0x16, - 0x88,0x78,0xfc,0x4b,0xe0,0x37,0x19,0xcd,0xa5,0xac, - 0xb6,0xc1,0x7e,0x5f,0xd2,0xd8,0xad,0x1f,0x02,0x1c, - 0xd5,0x75,0x8d,0x2d,0xb1,0xe3,0x3b,0x55,0x96,0xc6, - 0xe7,0x70,0x51,0x9d,0x8c,0x65,0x0d,0x45,0x19,0x85, - 0xbd,0x6f,0x8c,0x4b,0x7f,0x3a,0x89,0x18,0x83,0xcd, - 0xf7,0x29,0x2c,0xb8,0xd8,0xcc,0x8a,0xd8,0xbf,0x7f, - 0xef,0x2c,0x26,0x55,0x70,0x51,0x1b,0x45,0xde,0x4d, - 0x24,0x11,0x29,0xb1,0x2a,0x1d,0x01,0x28,0x63,0x00, - 0x20,0x8d,0xc5,0xba,0xe7,0x39,0x27,0x50,0x9e,0x0f, - 0xf7,0x56,0x65,0x91,0x01,0x30,0x90,0xc6,0xbb,0xb5, - 0x63,0x89,0x77,0x6c,0xa3,0x4c,0x06,0x60,0x8b,0xb3, - 0x67,0xb1,0x5d,0xfa,0xa3,0xb1,0x5d,0x95,0xa4,0x16, - 0xae,0x3d,0x0d,0x06,0x7e,0x0c,0x9c,0x0d,0xbc,0x0f, - 0xdc,0x08,0xac,0x9d,0xd2,0xb5,0xf2,0xb2,0x1f,0xf0, - 0x17,0x92,0x7f,0x0d,0xa7,0xc1,0x5e,0xaf,0x0d,0x12, - 0x7e,0xde,0x76,0xac,0x04,0xec,0x13,0x18,0xb3,0x2f, - 0xf6,0xb3,0x96,0xef,0xeb,0xc0,0x76,0xe7,0x2f,0x23, - 0xfd,0x54,0xfd,0x05,0x80,0x87,0xa8,0xfe,0x51,0x8c, - 0xba,0x04,0xcd,0x7f,0x89,0x1d,0xf9,0x08,0xd9,0x13, - 0x3b,0x4e,0x54,0x26,0xff,0x03,0xf6,0x77,0x8c,0xdb, - 0x0b,0xf8,0x45,0xca,0x73,0x29,0x03,0x65,0x00,0x88, - 0xd4,0x9c,0x02,0x00,0xf9,0x1a,0x8d,0x9d,0xb9,0x0a, - 0x49,0xfa,0x08,0x40,0xd9,0x6f,0x64,0x42,0xfa,0xd0, - 0xb8,0xe0,0x5c,0x27,0xf0,0x58,0x82,0xd7,0x59,0x01, - 0x4b,0x61,0xef,0xe9,0x29,0x2c,0xc8,0x52,0x25,0x7d, - 0xb0,0x1b,0xc3,0x11,0xd8,0xf9,0xc1,0xa5,0x72,0x98, - 0x43,0x2f,0xec,0x26,0xf6,0x2e,0xe0,0xce,0x9c,0xe6, - 0x90,0xb4,0x9f,0x03,0xa7,0xc4,0x18,0x3f,0x1e,0x3b, - 0x2e,0xe1,0xbd,0x49,0xeb,0x07,0x5c,0x85,0x1d,0xcb, - 0xc8,0x5b,0x3f,0xec,0x88,0x43,0xd4,0xe7,0xce,0xad, - 0xd8,0x99,0x74,0x69,0xec,0x2c,0x2c,0x60,0x94,0x95, - 0xa9,0xb0,0x33,0xd6,0x55,0xae,0xa4,0x5e,0x87,0x00, - 0xc0,0xec,0xd8,0xdf,0x5e,0xc8,0x35,0x94,0xf7,0xef, - 0xef,0x5c,0xec,0xe8,0x50,0xc8,0x25,0xa8,0x1e,0x80, - 0x32,0x00,0x44,0x6a,0x4e,0x01,0x80,0x7c,0x4d,0xc6, - 0x77,0x23,0xef,0xbd,0x41,0xf1,0x8e,0x8d,0xf3,0x7c, - 0x65,0xb4,0x14,0xb6,0x3b,0xdf,0xd3,0x4b,0xc0,0x57, - 0x09,0x5e,0xa7,0x2e,0xe9,0xff,0xcb,0x60,0x3b,0xfe, - 0x67,0x61,0x67,0xfa,0x8b,0x60,0x1d,0x2c,0x35,0xf9, - 0x30,0xa2,0xcf,0x92,0x17,0xd9,0x8c,0xd8,0xcd,0x76, - 0x68,0xfe,0x2f,0x61,0xe7,0x71,0x17,0xc0,0x6a,0x2d, - 0xcc,0x00,0x0c,0xc2,0x6e,0x62,0xb7,0xc7,0x6a,0x25, - 0x44,0x19,0x02,0xfc,0x9d,0xc6,0xc1,0xaa,0x2c,0x1d, - 0x89,0x15,0xa5,0x6b,0x66,0x24,0x56,0x90,0x4d,0x1a, - 0xdb,0x0d,0x2b,0xee,0x17,0xc7,0xe7,0xd8,0x2e,0xfe, - 0x2d,0x58,0x4d,0x85,0x9b,0xbb,0xfe,0x77,0x9c,0xc5, - 0x6c,0x07,0x56,0x0c,0xae,0x28,0xc5,0x73,0x93,0xe6, - 0x7d,0x2d,0xca,0xfc,0xb9,0x79,0x21,0x30,0x5d,0x60, - 0xcc,0xa7,0x58,0x55,0xfd,0x32,0xdb,0x15,0x3b,0x42, - 0x14,0x65,0x3a,0x8a,0x5f,0xdc,0x30,0x6d,0xca,0x00, - 0x10,0xa9,0x39,0x05,0x00,0xf2,0xe7,0xb9,0xa9,0x48, - 0xfa,0x08,0x40,0x99,0x77,0x32,0x3c,0xf2,0x2e,0x00, - 0x98,0xf4,0x75,0xf2,0xb4,0x1b,0xf6,0xef,0x59,0x2c, - 0xef,0x89,0x34,0x30,0x15,0x76,0x04,0xe1,0x46,0x1a, - 0x07,0x7c,0x8a,0xee,0x8f,0x44,0xdf,0x94,0x77,0x02, - 0x87,0x63,0xc7,0x4c,0xce,0xc1,0x5a,0xfc,0x4d,0x99, - 0x31,0xf4,0x3e,0x16,0x40,0x58,0xb6,0x6b,0x5c,0x94, - 0x65,0xb0,0x9f,0x65,0x5e,0x96,0x03,0x7e,0x17,0x18, - 0xf3,0x7b,0xd4,0x8a,0xae,0x99,0x05,0x80,0xd3,0x9d, - 0x63,0xbf,0xc0,0xba,0x02,0x0c,0xc3,0x82,0x45,0xab, - 0x62,0x99,0x26,0x5b,0x63,0xe9,0xcf,0xab,0x62,0x9d, - 0x00,0x96,0xc7,0xba,0x4c,0x8c,0x71,0x3c,0xe7,0x54, - 0xc0,0xa5,0x94,0xf3,0xef,0x2c,0xa4,0xea,0x19,0x00, - 0x3b,0x62,0xc7,0xa8,0x42,0xf6,0xc6,0x82,0x00,0x65, - 0xf6,0x01,0xe1,0xf7,0x19,0xb0,0x63,0x51,0x3b,0xa6, - 0x3c,0x97,0x22,0x53,0x06,0x80,0x48,0xcd,0x29,0x00, - 0x90,0xbf,0xa4,0x17,0xec,0x3a,0x02,0xa0,0x02,0x80, - 0x49,0x39,0x16,0x5b,0x78,0xa6,0x75,0xbe,0x3f,0x29, - 0xbf,0xc0,0x76,0x36,0xa3,0x0a,0x40,0x15,0xcd,0x02, - 0xc0,0xb6,0x81,0x31,0xfb,0x62,0x0b,0xb9,0x49,0x81, - 0x71,0x9d,0x5d,0xe3,0x0e,0x0d,0x8c,0x3b,0x04,0xcb, - 0x20,0xc8,0xda,0x54,0x58,0xda,0x6d,0x54,0xd1,0xd9, - 0x3b,0x81,0xf3,0xb3,0x99,0x4e,0x29,0x9d,0x86,0x1d, - 0xa1,0x08,0xb9,0x0c,0x98,0x1b,0x0b,0x08,0x3d,0x47, - 0xf3,0x23,0x66,0x93,0xb0,0x4a,0xef,0xbf,0xc1,0x8e, - 0x87,0x3c,0xe0,0x78,0xee,0xf9,0xf0,0x9d,0x21,0x2f, - 0x9b,0x2a,0x07,0x00,0x66,0xc3,0x7e,0x77,0x42,0xfe, - 0x05,0x5c,0x99,0xf2,0x5c,0xb2,0x72,0x11,0xf6,0x7e, - 0x12,0x72,0x1a,0xf5,0x3d,0x0a,0xa0,0x0c,0x00,0x91, - 0x9a,0x53,0x00,0x20,0x7f,0x9e,0x9b,0x0a,0x65,0x00, - 0xc4,0x93,0x45,0x00,0x60,0x4e,0xec,0xe6,0xaa,0xa7, - 0x0f,0xb0,0x73,0xf2,0x65,0x77,0x00,0xb6,0x60,0x6c, - 0xc7,0x24,0x6c,0x97,0xfa,0x09,0x2c,0xbd,0xbb,0x99, - 0x24,0x2a,0xfb,0xaf,0x83,0x2d,0x7e,0xca,0x72,0x1c, - 0x60,0x7f,0xa2,0x53,0xf2,0x6f,0x02,0xce,0x8c,0xf9, - 0x9c,0xc7,0x63,0xe9,0xdd,0xcd,0xcc,0x42,0x3e,0x67, - 0xb9,0x0f,0x21,0xba,0xb5,0xe1,0x68,0x60,0xa7,0x8c, - 0xe6,0x52,0x46,0x4b,0x60,0x3b,0xf8,0x21,0x47,0x60, - 0x3f,0xdf,0xb8,0xef,0xef,0xef,0x00,0x6b,0x61,0x5d, - 0x36,0x42,0xf6,0xa3,0xf8,0x01,0xc1,0xb8,0xaa,0xdc, - 0x05,0xe0,0x34,0xec,0x08,0x50,0x94,0x71,0x54,0x2f, - 0xb0,0xb3,0x27,0xe1,0xf6,0xb1,0x43,0xf0,0x05,0x47, - 0xaa,0x28,0x6a,0x91,0xaf,0x0c,0x00,0x91,0x1a,0xa8, - 0x52,0x00,0x20,0x4e,0x55,0xfb,0x22,0x55,0xc0,0xd7, - 0x11,0x80,0x64,0xcd,0x40,0xe3,0x16,0x63,0xa3,0x80, - 0x17,0x12,0xbc,0x4e,0x95,0xd3,0xff,0xd7,0x03,0x4e, - 0x6c,0xe1,0xfb,0xde,0x06,0xfe,0x8c,0xed,0x6c,0x2f, - 0x84,0xed,0x58,0xce,0x8e,0x15,0x4b,0x7c,0xb5,0xc9, - 0xf7,0x4c,0xc2,0x16,0xa6,0xd3,0x60,0x29,0xc9,0x7b, - 0x62,0xe7,0x95,0x5b,0xb9,0x09,0xd9,0x04,0x5f,0xfa, - 0x67,0xde,0xfa,0x63,0xed,0xd5,0x9a,0x99,0x8c,0xa5, - 0xc3,0xc7,0xd5,0x49,0x38,0x68,0xb3,0x43,0x0b,0xcf, - 0xdb,0x8e,0xa5,0x80,0x83,0x03,0x63,0x0e,0x04,0xde, - 0x4a,0x7f,0x2a,0xa5,0xb5,0xb3,0x63,0xcc,0x35,0xd8, - 0x71,0x98,0x56,0x4d,0xc2,0x8e,0x08,0x3c,0x19,0x18, - 0x37,0x23,0xb0,0x7e,0x1b,0xd7,0x29,0xa2,0x49,0x58, - 0xe7,0x96,0x90,0xb2,0x7d,0x6e,0xae,0x0b,0x6c,0xee, - 0x18,0x77,0x2a,0xf0,0x46,0xca,0x73,0xc9,0xda,0x4b, - 0x58,0xe7,0x98,0x90,0xcd,0xb0,0xd7,0xa9,0x6e,0xa2, - 0x3e,0x5f,0x95,0x01,0x20,0x52,0x03,0x55,0x0a,0x00, - 0x78,0x77,0xf5,0x3b,0x29,0x56,0x85,0x76,0x1d,0x01, - 0x48,0x56,0xb3,0x85,0xf9,0x13,0x84,0x53,0xa9,0xe3, - 0xa8,0x6a,0xfa,0xff,0x60,0x7c,0x85,0xe9,0xa6,0x74, - 0x03,0x16,0x34,0x98,0x17,0x2b,0x52,0x76,0x39,0xb6, - 0xe0,0x8f,0xf3,0x7a,0x8f,0xc4,0x16,0x1f,0x67,0x63, - 0xbb,0x9d,0x33,0x61,0xbb,0x52,0x6f,0xc6,0x78,0x0e, - 0xb0,0x54,0xf8,0xc5,0x63,0x7e,0x4f,0xd6,0x7e,0x42, - 0x74,0x0b,0xb7,0xdb,0x80,0x57,0x5a,0x7c,0xee,0x7b, - 0xb0,0x96,0x58,0xcd,0xac,0x48,0xe3,0x00,0x59,0x1a, - 0xfa,0x60,0xa9,0xff,0x51,0x3b,0xc6,0xf7,0x62,0xc7, - 0x4c,0xa4,0xb9,0x8d,0x03,0x8f,0x7f,0x43,0x32,0xc5, - 0xdb,0xbc,0x3b,0xc1,0x3f,0x4a,0xe0,0x5a,0x45,0x53, - 0xb5,0xc0,0x79,0x1f,0x7c,0x0b,0xe0,0xf7,0xb1,0xcc, - 0xa1,0x2a,0x3a,0x12,0xf8,0xc4,0x31,0xee,0x6c,0xa2, - 0x8f,0x27,0x15,0xd9,0xef,0x69,0x7e,0x2f,0x12,0x25, - 0xe9,0x0c,0x80,0x39,0xb0,0x82,0xb4,0x22,0x52,0x12, - 0x75,0x0c,0x00,0x14,0x69,0xf1,0x0f,0xbe,0x9b,0x0a, - 0x75,0x01,0xf0,0xcb,0x6a,0x67,0xbe,0xaa,0x19,0x00, - 0xfb,0xe1,0x3f,0x17,0xf9,0x3a,0xb6,0x18,0xd8,0x08, - 0x3b,0x73,0xe9,0x69,0x69,0xe9,0xf5,0x0d,0xf0,0x27, - 0xec,0x7c,0xf2,0xf1,0xf8,0x83,0x09,0xfd,0xb0,0x6e, - 0x05,0x45,0xb6,0x41,0xe0,0xf1,0xab,0xdb,0x7c,0xfe, - 0x50,0x2a,0x77,0xe8,0xfa,0x49,0x39,0x00,0x2b,0x50, - 0xd8,0xcc,0x18,0x2c,0xf5,0x3f,0xc9,0xdf,0x9b,0xaa, - 0x99,0x9f,0xf0,0xdf,0xe3,0x85,0x24,0x57,0xbc,0xed, - 0x21,0xe0,0xf1,0xc0,0x98,0x56,0x16,0x1c,0x45,0x97, - 0xf4,0xe7,0x70,0xde,0x76,0x04,0x16,0x71,0x8c,0x3b, - 0x9a,0xea,0xa6,0x7c,0x7f,0x05,0x9c,0xe0,0x18,0xb7, - 0x08,0xe5,0x2c,0x08,0x38,0x1b,0x96,0xa9,0xf7,0x08, - 0xf0,0x3c,0x16,0xbc,0x0b,0x75,0x7a,0xe8,0x96,0x44, - 0x06,0x40,0x5f,0x60,0x53,0xe0,0x3f,0x58,0xf6,0xdf, - 0xc5,0xc0,0x3c,0xce,0xef,0x15,0x91,0x9c,0xd5,0x31, - 0x00,0x50,0xa4,0xf3,0xff,0xa0,0x23,0x00,0x49,0x6b, - 0xd6,0x01,0x20,0xc9,0x9d,0xf9,0xa9,0x68,0xbc,0xb0, - 0x99,0x44,0xf8,0xe6,0xb9,0xc8,0xfa,0x61,0x95,0xa0, - 0x3d,0x9e,0xc5,0x5e,0xeb,0xff,0xa6,0x37,0x1d,0xc0, - 0x02,0x76,0x87,0x60,0x81,0x06,0xef,0x8d,0xc9,0x3a, - 0xf8,0xaa,0x5e,0xe7,0x65,0xbd,0xc0,0xe3,0xb7,0xb7, - 0xf9,0xfc,0x77,0x04,0x1e,0xcf,0x62,0x07,0x77,0x51, - 0xc2,0x9d,0x09,0x0e,0x01,0x5e,0xcb,0x60,0x2e,0x65, - 0xb6,0xbc,0x63,0xcc,0x75,0x09,0x5f,0xf3,0x5f,0x81, - 0xc7,0x17,0x4c,0xf8,0x7a,0x45,0x50,0xa5,0xcf,0xcd, - 0x81,0xd8,0xee,0x77,0xc8,0xeb,0x58,0xc1,0xbc,0x2a, - 0x3b,0x07,0x78,0xd7,0x31,0xee,0x08,0xca,0xd7,0xe1, - 0x62,0x33,0xbe,0xbd,0x87,0x5f,0x02,0xab,0x19,0xf3, - 0x1e,0xd6,0xee,0x73,0xad,0xc0,0xf7,0xb6,0x93,0x01, - 0x30,0xac,0xeb,0x5a,0xef,0x03,0xff,0xc0,0x3e,0x6b, - 0xbb,0xe7,0xb1,0x45,0xe0,0x7b,0xab,0x64,0x05,0xac, - 0x88,0x6a,0xb3,0xaf,0x2a,0x06,0x4a,0xa5,0x42,0xca, - 0x9a,0xf6,0xd4,0x88,0x02,0x00,0xa6,0xce,0x47,0x00, - 0x7a,0x61,0x6f,0xca,0x8d,0x24,0x19,0x00,0x58,0x8a, - 0xc6,0x15,0xe7,0x87,0x53,0xee,0xdd,0x94,0x0d,0xf1, - 0xed,0x20,0xbc,0x87,0x2d,0xb2,0x3f,0x4f,0x77,0x3a, - 0xdf,0x71,0x17,0xf0,0x2b,0xac,0xda,0xbf,0xa7,0x1a, - 0xfa,0x41,0xc0,0xad,0xa9,0xce,0xa8,0x35,0x33,0x11, - 0xbd,0x4b,0xf2,0x06,0x56,0x48,0xb2,0x1d,0x8f,0x61, - 0xc1,0xa8,0x66,0x45,0x06,0xd3,0xbe,0x31,0xe9,0x85, - 0xa5,0xfe,0x47,0xfd,0x9c,0x1e,0x26,0x7e,0x91,0xc3, - 0x3a,0x9a,0x3f,0xf0,0xf8,0x38,0x92,0xcf,0x3a,0x6a, - 0x56,0xaf,0xa3,0xdb,0x50,0xec,0x67,0x3c,0x39,0xe1, - 0xeb,0xe6,0x29,0xf4,0x39,0x3c,0x86,0x64,0x8f,0x90, - 0xa5,0x69,0x6f,0xac,0xae,0x4a,0xc8,0x51,0x84,0x0b, - 0xe5,0x95,0xdd,0x38,0x2c,0xcb,0x21,0xd4,0x61,0x64, - 0x56,0x60,0x1f,0xca,0x75,0x1c,0xa2,0x51,0x7d,0x87, - 0xfe,0xc0,0xaf,0xbb,0xbe,0x5e,0xc5,0xb2,0x83,0x2e, - 0xe5,0xfb,0x85,0x76,0xe3,0x66,0x00,0x0c,0xed,0x7a, - 0xce,0x1d,0x88,0xce,0xea,0xda,0x92,0xd6,0xea,0x07, - 0x95,0xd1,0x2f,0x89,0xae,0xb9,0xf3,0x47,0xca,0x9f, - 0x11,0x2a,0x15,0xa6,0x0c,0x80,0xfc,0xa9,0x0b,0x40, - 0x72,0x96,0x00,0xa6,0x6e,0xf0,0xdf,0x47,0x00,0x1f, - 0x26,0x78,0x9d,0xaa,0xa6,0xff,0x7b,0x2a,0x8d,0x83, - 0xdd,0x28,0x65,0xb9,0xf8,0xef,0xf6,0x5f,0xc2,0xbb, - 0xca,0xdd,0xd6,0x00,0x96,0x4e,0x71,0x2e,0xad,0x8a, - 0xba,0x79,0x02,0x78,0x26,0x81,0x6b,0x8c,0x21,0x7a, - 0x11,0x37,0x23,0x76,0x66,0x33,0x2d,0xfb,0x12,0x1d, - 0x64,0x18,0x8b,0x9d,0x17,0xad,0xd2,0x02,0x32,0x2d, - 0x8d,0x3a,0x8d,0x4c,0xe9,0x6d,0x92,0x2f,0x6a,0xeb, - 0x39,0x4e,0x50,0xb6,0xdd,0xd2,0x90,0xd0,0x67,0x62, - 0x59,0x3e,0x33,0x07,0x62,0xc7,0xb8,0x42,0xde,0xa4, - 0x3a,0x6d,0xff,0x42,0x2e,0xc5,0x82,0xd6,0x21,0xfb, - 0x52,0x9e,0xdf,0xeb,0xb9,0x69,0x7e,0x1f,0xd2,0x6d, - 0x41,0x6c,0x11,0xfa,0x0e,0x96,0x25,0x34,0xe5,0x4e, - 0xbd,0x27,0x03,0xa0,0x17,0x96,0x2d,0xf6,0x77,0x2c, - 0x28,0x7d,0x36,0xe1,0xcf,0xaf,0xa5,0xb0,0xec,0x2f, - 0x11,0x29,0x38,0x05,0x00,0xf2,0xa7,0x23,0x00,0xc9, - 0xc9,0xa2,0xfd,0x5f,0x96,0xd7,0xc9,0xda,0x5a,0x8e, - 0x31,0x2f,0xe1,0x6b,0x17,0x96,0x96,0x53,0xf1,0x1f, - 0xb3,0xd8,0x2e,0xc5,0x79,0xb4,0x6a,0xb1,0xc0,0xe3, - 0x2f,0x27,0x74,0x9d,0xa8,0x42,0x80,0x90,0x5e,0xa1, - 0xc4,0x05,0xb1,0x42,0x8c,0x51,0x8e,0x20,0xb9,0x7f, - 0x67,0xd5,0x0d,0x0e,0x3c,0xfe,0x59,0x0a,0xd7,0x1c, - 0xe4,0x18,0x33,0x26,0x85,0xeb,0xe6,0x29,0xf4,0xb9, - 0x59,0x96,0xcf,0xcc,0x5d,0xb0,0x4e,0x38,0x21,0xa7, - 0x51,0x9e,0x8c,0x86,0x76,0x8d,0xc7,0x97,0x6d,0x34, - 0x03,0xf6,0xfa,0x95,0x81,0xa7,0xbb,0x43,0xb7,0xa9, - 0xb0,0x3a,0x3d,0xff,0xc1,0x02,0x3f,0x47,0x60,0x19, - 0x22,0xcd,0xb2,0x3f,0x66,0xc6,0xb2,0x26,0xde,0xc4, - 0x0a,0xd2,0x6e,0x81,0x2f,0xeb,0xae,0x5b,0x54,0x87, - 0x1b,0x11,0x29,0x08,0x05,0x00,0xf2,0xa7,0x23,0x00, - 0xc9,0xc9,0x6a,0x61,0x5e,0xc5,0x0e,0x00,0xd3,0x12, - 0xde,0x6d,0x04,0xab,0xf8,0x9f,0xa7,0x49,0x84,0x17, - 0x98,0xdd,0xb6,0xa0,0x78,0xef,0x71,0xf3,0x06,0x1e, - 0x4f,0xaa,0x1d,0xd7,0xdb,0x6d,0xce,0xa3,0x15,0x1d, - 0xd8,0x99,0xe2,0x46,0xc7,0x63,0xba,0x3d,0x8e,0x05, - 0x71,0xc4,0x27,0xaa,0x83,0x02,0xa4,0xd3,0xb2,0x2b, - 0x74,0xc6,0xff,0x0b,0xaa,0xb7,0x78,0xac,0x42,0x00, - 0x60,0x2a,0x7c,0x6d,0x50,0x3f,0xc3,0x0a,0xb6,0xd5, - 0xc9,0x79,0x58,0xa7,0x99,0x90,0xfd,0x29,0xc7,0xd1, - 0xd8,0x56,0xcf,0xda,0xcf,0x85,0xd5,0x87,0x78,0x8b, - 0xe6,0x47,0xc4,0xae,0x03,0x0e,0xeb,0x1a,0xdb,0x0a, - 0x05,0x00,0x44,0x4a,0xa0,0x68,0x37,0xc7,0xed,0x28, - 0x6b,0x00,0x20,0x74,0x63,0x31,0x96,0x78,0x37,0x5b, - 0x75,0xee,0x02,0xd0,0xac,0x00,0x60,0x92,0xa9,0xf9, - 0xd3,0xd1,0xf8,0x06,0xf9,0x2b,0xc2,0xbb,0xae,0x45, - 0x16,0x3a,0x6b,0xdc,0xed,0xfe,0x54,0x67,0xe1,0x73, - 0x0b,0xbe,0x36,0x79,0x33,0x63,0x6d,0xef,0x8a,0x64, - 0x9e,0xc0,0xe3,0xef,0x27,0x74,0x9d,0x50,0x1d,0x81, - 0x34,0x02,0x00,0xbb,0x03,0xab,0x47,0x3c,0x3e,0x1e, - 0x4b,0xfd,0xaf,0xda,0xe2,0x31,0x4d,0xa1,0x9d,0xf6, - 0xa1,0x29,0x5c,0x73,0x9d,0xc0,0xe3,0xad,0xb6,0xa8, - 0x2c,0xb2,0xd0,0xe7,0x70,0x19,0x3e,0x33,0x37,0xc4, - 0xd7,0xc1,0xe5,0x22,0xea,0xd7,0xeb,0x7d,0x24,0x70, - 0x99,0x63,0xdc,0x1c,0xd8,0xeb,0x58,0x64,0x83,0xb1, - 0x7f,0x4f,0x3b,0x47,0x7f,0x7a,0x11,0xaf,0xd5,0xaf, - 0xd7,0x04,0xac,0xde,0xc0,0x8c,0x29,0x3c,0xb7,0x88, - 0x24,0xa8,0x4a,0x01,0x00,0xef,0x9b,0x61,0xd2,0xe7, - 0x25,0xdb,0x95,0xf4,0xce,0x43,0x5d,0x8f,0x00,0x4c, - 0x8b,0xb5,0x8c,0xeb,0x69,0x02,0xf0,0x54,0x82,0xd7, - 0x69,0x96,0x65,0xf0,0x18,0xe5,0x6e,0x67,0x36,0xad, - 0x73,0x5c,0xbb,0x05,0xea,0x92,0xd0,0x49,0xb8,0x55, - 0xde,0x3b,0xf8,0x0b,0x06,0x66,0x69,0xa6,0xc0,0xe3, - 0x9e,0xbe,0xd5,0x1e,0xa1,0xe7,0x09,0xcd,0x23,0xae, - 0x79,0x08,0x17,0x7f,0x3a,0x06,0x78,0x21,0xe1,0xeb, - 0x56,0xdd,0x97,0x81,0xc7,0x93,0x0e,0x00,0xcc,0x0d, - 0xfc,0x30,0x30,0xe6,0xc1,0x84,0xaf,0x59,0x04,0x55, - 0xc8,0x00,0xd8,0xdd,0x31,0xa6,0x13,0xb8,0x20,0xed, - 0x89,0x14,0xd4,0x79,0xce,0x71,0x9e,0xd7,0x31,0x4f, - 0xa3,0xb0,0xe3,0x7a,0x43,0xb1,0x8e,0x32,0xc7,0x63, - 0x45,0x55,0xf3,0x28,0xe8,0x38,0x11,0xdb,0x60,0x39, - 0x11,0x58,0x1f,0xbb,0x8f,0x58,0x8d,0xe4,0x3e,0xc7, - 0x44,0x24,0x25,0x65,0x48,0x75,0xf2,0x2a,0x6b,0x06, - 0x40,0xd2,0x37,0x1e,0x75,0x3d,0x02,0xf0,0x03,0x1a, - 0x47,0xb4,0x9f,0xc1,0xb2,0x28,0x92,0xbc,0x4e,0x23, - 0x65,0x4e,0xff,0x07,0x7f,0xf1,0xa3,0x34,0xce,0x1c, - 0xb7,0xe2,0x36,0x2c,0x4d,0x71,0x12,0xb6,0x23,0xf9, - 0x34,0xf6,0xb3,0x7e,0xba,0xeb,0xab,0x28,0xf3,0xec, - 0x29,0xd4,0x65,0xe1,0xab,0x84,0xae,0x13,0x7a,0x1e, - 0x6f,0xbf,0x68,0xaf,0x0b,0x89,0x3e,0x3b,0xfe,0x34, - 0xf5,0xa9,0x0e,0x9d,0xa4,0x77,0x02,0x8f,0x27,0xbd, - 0xd3,0x76,0x02,0xe1,0x8d,0x81,0x7f,0x27,0x7c,0xcd, - 0x22,0x28,0x7b,0x00,0x60,0x71,0xac,0xf0,0x69,0xc8, - 0x5d,0xd4,0xb7,0xf5,0xe6,0x70,0xe0,0x21,0x60,0x95, - 0xc0,0xb8,0x35,0xb1,0xd7,0xb3,0xe8,0xc1,0xca,0x31, - 0xc0,0x9d,0x5d,0x5f,0x60,0x99,0x01,0xab,0x63,0x19, - 0x3c,0x6b,0x03,0xcb,0x90,0xfc,0x26,0xdf,0x64,0xec, - 0xbd,0xfc,0xee,0xae,0xaf,0xfb,0x29,0xfe,0xdf,0x86, - 0x88,0x34,0x50,0xa5,0x00,0x40,0x27,0x16,0x8d,0x0c, - 0xfd,0x9b,0x8a,0x16,0x00,0x48,0xba,0xfa,0xf0,0x04, - 0xec,0xdf,0xd8,0x37,0xc1,0xe7,0x2c,0x83,0x2c,0xd2, - 0xff,0xa1,0xba,0x1d,0x00,0xbc,0xbb,0x07,0x51,0xe7, - 0xbb,0xb3,0xf4,0x08,0xf6,0x33,0x7f,0x8e,0x72,0xa5, - 0xb3,0x86,0x32,0x2d,0x92,0x4a,0x35,0x0e,0x05,0x02, - 0x93,0xdc,0x39,0xde,0x05,0x58,0x37,0xe2,0xf1,0x09, - 0x58,0xea,0x7f,0xd5,0x5b,0x8e,0xa5,0x21,0x54,0x13, - 0x62,0x30,0xb0,0x00,0xc9,0x2c,0xea,0x36,0x23,0x7c, - 0x7e,0x77,0x04,0x76,0xe3,0x5f,0x35,0x65,0xef,0x02, - 0xb0,0x9d,0x73,0xdc,0x5f,0x53,0x9c,0x43,0x19,0x5c, - 0x42,0x38,0x00,0x00,0xb0,0x2d,0x70,0x60,0xca,0x73, - 0x49,0xda,0x28,0xac,0xd0,0xdf,0x7f,0xba,0xfe,0xf7, - 0xb4,0x58,0x30,0xa3,0x3b,0x20,0xb0,0x04,0xf1,0xd3, - 0xfe,0x3b,0xb1,0xcf,0xd8,0xee,0x05,0xff,0x7d,0x84, - 0xb3,0x92,0x44,0xa4,0x04,0xaa,0x74,0x04,0x00,0x7c, - 0x8b,0xfb,0xa2,0x05,0x00,0xd2,0xd8,0x79,0x28,0xfb, - 0x6e,0x46,0x2b,0xb2,0x28,0x00,0xd8,0x41,0xf3,0x33, - 0xe5,0x65,0x0f,0x00,0x78,0x17,0xd1,0x9e,0x33,0xa6, - 0x59,0x98,0x84,0xfd,0x6c,0xcb,0xb4,0xf8,0x87,0xf0, - 0x91,0x84,0xa4,0xb2,0x55,0x42,0x67,0xc7,0x93,0x3a, - 0x1a,0x31,0x07,0x70,0x72,0x60,0xcc,0x09,0xc0,0xb3, - 0x09,0x5d,0xaf,0x6e,0x9e,0x73,0x8c,0x59,0x21,0x81, - 0xeb,0xac,0x8a,0xaf,0x30,0xdc,0xc9,0x54,0xb3,0x7d, - 0x63,0x99,0x3f,0x33,0x7b,0xe1,0x2b,0xbc,0x36,0x06, - 0xf8,0x67,0xca,0x73,0x29,0xba,0xeb,0xb1,0x80,0x64, - 0xc8,0x96,0xa4,0x73,0x46,0x3e,0x4b,0x5f,0x62,0x3f, - 0xef,0xbd,0xb1,0xf6,0x7c,0x33,0x63,0xdd,0x03,0x3c, - 0x59,0x66,0x9f,0x00,0x1b,0x63,0x19,0x46,0x4b,0x63, - 0x2d,0x12,0x6f,0x42,0x8b,0x7f,0x91,0xca,0x50,0x00, - 0x20,0x7f,0x69,0xdc,0x78,0x84,0x76,0xff,0x8a,0x7a, - 0x33,0xf3,0x04,0x16,0x71,0x6e,0xe5,0x6b,0xfd,0x26, - 0xcf,0x79,0x45,0x1b,0xcf,0xd9,0xf3,0x6b,0x32,0xcd, - 0x77,0x70,0x3f,0x89,0xf1,0x3c,0x9e,0x4a,0xcd,0x59, - 0xfb,0xd0,0x39,0x2e,0xd4,0x07,0x58,0xa2,0x45,0x65, - 0xe6,0x40,0x72,0xbb,0xe4,0xa1,0x42,0x7b,0xa1,0xea, - 0xf2,0x5e,0xe7,0x03,0x43,0x22,0x1e,0x7f,0x1e,0x38, - 0x2e,0xa1,0x6b,0xd5,0xd1,0xdb,0x84,0x8f,0xb3,0x2c, - 0xdf,0xe6,0x35,0xd6,0xc5,0x76,0x0d,0x43,0xed,0xff, - 0x5e,0xa5,0xba,0xe7,0xc7,0xcb,0x1c,0x00,0x58,0x0b, - 0x5f,0x60,0xf6,0xdf,0x14,0xfb,0xdf,0x91,0x85,0xcf, - 0x81,0xff,0x3a,0xc6,0xcd,0x89,0xef,0x48,0x45,0x99, - 0x7c,0x82,0x15,0xfb,0x9d,0xc6,0x31,0x76,0x46,0xac, - 0x2d,0x62,0x51,0x8f,0xd2,0x89,0x48,0x9b,0x14,0x00, - 0xc8,0x5f,0x1a,0xd5,0x87,0xa3,0xbe,0xa7,0xfb,0x88, - 0x80,0xc8,0x94,0xde,0xc1,0xb7,0xb3,0xf7,0x8b,0xb4, - 0x27,0x52,0x71,0xa1,0xf7,0xdc,0xa4,0x76,0x57,0x43, - 0x01,0x80,0x24,0x8e,0x7f,0xfd,0x1f,0xb0,0x41,0x60, - 0x0e,0x3b,0xa0,0xf7,0x9b,0x76,0x3d,0x10,0x78,0x3c, - 0xea,0x67,0x10,0xa5,0x03,0xd8,0x07,0xb8,0x15,0x98, - 0x3a,0x30,0x76,0x32,0xb0,0x33,0xc5,0x2b,0xa2,0x9b, - 0x94,0x32,0x77,0x01,0xd8,0xd8,0x39,0xee,0x9a,0x54, - 0x67,0x51,0x1e,0xff,0x70,0x8e,0xf3,0xbe,0xae,0x65, - 0xb1,0x0e,0xfe,0x16,0xba,0x00,0x67,0x02,0xc3,0x52, - 0x9a,0x8b,0x88,0xe4,0x4c,0x01,0x80,0xfc,0x7d,0x8c, - 0xdd,0x88,0x35,0xfb,0xda,0xac,0x85,0xe7,0x5c,0x2c, - 0xe2,0xf9,0x42,0x3b,0x90,0x52,0x4f,0xdf,0x60,0x3b, - 0x7c,0x21,0x6b,0x62,0xc5,0x85,0xa4,0x35,0xa1,0x1d, - 0xfe,0x66,0xbd,0x99,0xe3,0x4a,0xbb,0x16,0xca,0xac, - 0xc0,0xe9,0x81,0x31,0x27,0x63,0x59,0x3d,0xd2,0x9e, - 0xd0,0x99,0xfb,0x45,0xb1,0xa2,0x65,0x71,0xcc,0x8d, - 0x15,0xd2,0x3c,0x1d,0x5f,0x30,0xe8,0x48,0xe0,0xde, - 0x98,0xd7,0x28,0x93,0x7f,0x13,0xfd,0x39,0x7c,0x52, - 0x7e,0x53,0x0b,0xfa,0x99,0x63,0xcc,0x44,0xec,0xe7, - 0x2d,0x96,0xed,0xe2,0xe9,0xd8,0xf3,0xf3,0xb4,0x27, - 0x92,0xa1,0xd9,0x81,0xab,0x88,0xf7,0xf9,0xd2,0x1f, - 0x0b,0x96,0x84,0x82,0x83,0x22,0x52,0x42,0x0a,0x00, - 0x88,0x48,0xb7,0xfb,0x9d,0xe3,0xce,0x21,0xb9,0x85, - 0x6a,0xdd,0x84,0xde,0x7f,0x92,0x2a,0xcc,0x9a,0x76, - 0x00,0xe0,0x5c,0xa2,0x0b,0x09,0xbe,0x84,0x2d,0x1a, - 0xa5,0x7d,0xb7,0x3a,0xc6,0x6c,0xe2,0x7c,0xae,0x41, - 0xd8,0xcf,0xe5,0x25,0xc2,0xed,0xfe,0xba,0x5d,0x0a, - 0x1c,0xeb,0x1c,0x2b,0xd9,0x1a,0x06,0xcc,0xe5,0x18, - 0xf7,0x30,0x3a,0xbf,0xdd,0xed,0x63,0xe0,0x71,0xc7, - 0xb8,0x79,0xb0,0xc2,0x79,0x65,0x37,0x15,0x96,0xfd, - 0xd1,0xac,0x63,0xc8,0xad,0xc0,0x75,0x4d,0x1e,0x5b, - 0x08,0x3b,0xe6,0x25,0x22,0x15,0xa3,0x00,0x80,0x88, - 0x74,0xf3,0x16,0x88,0x5a,0x09,0xf8,0x53,0x9a,0x13, - 0xa9,0xb0,0x50,0xd1,0xc2,0xd0,0x39,0x6c,0xaf,0xc1, - 0x6d,0xce,0x23,0xca,0x96,0xc0,0x2f,0x23,0x1e,0x9f, - 0x8c,0xa5,0xfe,0x57,0x35,0x5d,0x3c,0x6b,0x2f,0x63, - 0xad,0x2e,0xa3,0x6c,0x45,0x74,0xd1,0xb2,0x81,0xc0, - 0xfe,0x58,0x57,0x81,0x23,0xf0,0x77,0xf3,0xb8,0x02, - 0xd8,0x09,0xdf,0x8e,0xa9,0x64,0xaf,0x59,0xed,0x9b, - 0x9e,0xaa,0xd8,0xba,0xb1,0x1d,0xde,0xd7,0xe3,0xc7, - 0xa9,0xce,0x22,0x1b,0xa7,0xd1,0xbc,0x4b,0xd2,0x18, - 0xe0,0xb7,0xc0,0x7e,0x34,0xff,0x4c,0xd8,0x02,0xf8, - 0x4d,0x0a,0xf3,0x12,0x91,0x1c,0x55,0x2d,0x00,0xe0, - 0xb9,0xe1,0xd4,0x4d,0xa9,0x48,0x63,0xff,0x21,0xdc, - 0x77,0xbc,0xdb,0x6e,0x58,0xef,0xf7,0xa4,0x8a,0xc9, - 0xd5,0x45,0xa8,0xa8,0x52,0x52,0xe9,0x96,0xa1,0x00, - 0x40,0xab,0xc5,0x9d,0x66,0x04,0xce,0x0a,0x8c,0x39, - 0x9d,0x64,0xbb,0x6f,0x08,0x5c,0x1b,0x78,0x7c,0x41, - 0x1a,0xa7,0x2c,0x4f,0x0f,0x1c,0x0e,0xbc,0x05,0x9c, - 0x02,0xcc,0x14,0xe3,0x9a,0x27,0x61,0xed,0xd0,0xd4, - 0xbe,0xb1,0xb8,0xd6,0x76,0x8e,0xbb,0x27,0xcd,0x49, - 0x94,0xd0,0x3d,0xce,0x71,0x6b,0xa6,0x39,0x89,0x0c, - 0xfc,0x1a,0xd8,0x23,0xe2,0xf1,0xa3,0x81,0x37,0xb1, - 0xf6,0x9e,0xc7,0x47,0x8c,0x3b,0x03,0xeb,0x06,0x20, - 0x22,0x15,0x51,0xb5,0x00,0x80,0x32,0x00,0xca,0x6d, - 0x79,0xa2,0xcf,0x61,0x36,0xfa,0x9a,0xbb,0xc9,0x73, - 0x75,0x62,0xd5,0x6e,0xe3,0x3e,0x5f,0xb3,0xaf,0x5d, - 0x9b,0x5c,0xe7,0x9a,0x16,0x9e,0xeb,0x14,0xff,0x4b, - 0x92,0xa9,0x49,0x44,0xdf,0x04,0xf4,0xb4,0x23,0xf0, - 0x18,0xb0,0x5c,0x3a,0xd3,0xa9,0xa4,0xd0,0xc2,0x7b, - 0xfa,0x84,0xae,0xd3,0x2c,0xdd,0xd3,0x3b,0x8f,0x66, - 0xfe,0x8c,0x55,0x87,0x6e,0xe6,0x55,0xe0,0xb0,0x16, - 0x9f,0x5b,0x9a,0xfb,0x9b,0x63,0xcc,0x7e,0x53,0xfc, - 0xff,0x8b,0x63,0x47,0x75,0x46,0x00,0x47,0x11,0xfe, - 0x7d,0x98,0xd2,0x57,0xc0,0xa6,0x58,0x1f,0x74,0xed, - 0xfc,0x17,0x57,0x1f,0xac,0x7d,0x63,0xc8,0x37,0xc0, - 0x93,0x29,0xcf,0xa5,0x6c,0x1e,0xc5,0x77,0x2f,0xb8, - 0x1a,0xe5,0xbd,0x4f,0x5e,0x9c,0xe8,0xf4,0xfd,0xe1, - 0xc0,0xa9,0x53,0xfc,0xef,0x53,0x80,0xd7,0x9a,0x8c, - 0xed,0x87,0xdd,0xeb,0x44,0x75,0x7c,0x11,0x91,0x12, - 0x29,0xeb,0x1b,0x5b,0x33,0x0a,0x00,0xd4,0x4f,0xb3, - 0x16,0x58,0x2f,0x03,0x23,0x33,0xb8,0x4e,0xd5,0x8a, - 0x9c,0x5d,0x08,0x3c,0x1d,0x63,0xfc,0xd2,0xd8,0x79, - 0xca,0x1b,0x80,0xd5,0x53,0x99,0x51,0xb5,0xbc,0x1f, - 0x78,0x3c,0xce,0x0e,0x6d,0x94,0x59,0x02,0x8f,0xbf, - 0xdb,0xc2,0x73,0x6e,0x84,0x2d,0x0c,0x9b,0xe9,0xc4, - 0x52,0xff,0xc7,0xc4,0x78,0xce,0x79,0xb0,0x14,0xf3, - 0x4b,0x80,0x07,0x81,0xf7,0xb0,0xbf,0xdb,0x89,0x58, - 0x3b,0xd3,0x8f,0xb0,0xbf,0xb1,0x2b,0x81,0xbd,0xb0, - 0x02,0xa7,0x75,0xf4,0x22,0x16,0x6c,0x8b,0xb2,0x26, - 0xd6,0x62,0xf4,0x6e,0xec,0xe6,0x7e,0x37,0x2c,0xf5, - 0x3f,0x8e,0x3b,0x81,0x25,0x09,0x67,0x1c,0x48,0xfe, - 0x96,0xc6,0x97,0x31,0xf4,0x08,0xd6,0xfd,0x47,0xbe, - 0x35,0x96,0xf0,0xdf,0x13,0x58,0xdb,0xdf,0xa5,0x52, - 0x9e,0x4b,0x1a,0x86,0x00,0xd7,0xd3,0xfc,0x48,0x59, - 0x27,0xb0,0x0b,0xdf,0xfd,0xbd,0x18,0x07,0xec,0x1d, - 0xf1,0x9c,0x0b,0x50,0xdd,0x36,0xa0,0x22,0xb5,0xa3, - 0x00,0x80,0x94,0x5d,0xb3,0x85,0xb9,0xa7,0xc8,0x4f, - 0x12,0xd7,0xa9,0x5a,0x00,0x60,0x22,0x96,0xf6,0x1b, - 0x67,0x11,0xd7,0x01,0xfc,0x0a,0xb8,0x0f,0x0b,0xbc, - 0x1c,0x81,0x2d,0x22,0xe4,0xfb,0xde,0x08,0x3c,0xde, - 0x2c,0xa3,0x25,0xae,0x79,0x02,0x8f,0xbf,0x1e,0xf3, - 0xf9,0xa6,0xc3,0x76,0x94,0xa3,0x9c,0x4d,0xb8,0x65, - 0x1d,0xd8,0xef,0xcb,0xa6,0xd8,0xef,0xcb,0x9b,0xd8, - 0x4d,0xe5,0x76,0xc0,0x2a,0xc0,0x6c,0xd8,0xa2,0xa6, - 0x37,0xb6,0x78,0x9d,0x09,0xcb,0x30,0xd9,0x12,0x6b, - 0x4b,0xf5,0x02,0xb6,0x9b,0xb9,0x1d,0xd5,0xfb,0xfc, - 0x0a,0xf9,0xb3,0x63,0xcc,0xc9,0x58,0x5f,0xf8,0xb8, - 0x3e,0xc6,0xda,0x3a,0xae,0x87,0xff,0x18,0x90,0xe4, - 0xab,0xd9,0x67,0x52,0x4f,0x3a,0x8e,0xd3,0xd8,0xa3, - 0xce,0x71,0xde,0xd7,0xb9,0x48,0x2e,0xc6,0x0a,0xf8, - 0x35,0x73,0x3e,0x56,0x18,0xb2,0xa7,0x7f,0x03,0x37, - 0x45,0x7c,0xdf,0x66,0x58,0xcd,0x00,0x11,0x29,0xb9, - 0xaa,0xdd,0x40,0x29,0x00,0x50,0x3f,0x59,0x04,0x00, - 0xfa,0xd1,0xb8,0x1a,0x70,0x27,0xd5,0x4c,0xad,0x1c, - 0x8e,0x2d,0x06,0x5a,0x49,0xff,0x5d,0x08,0xab,0x32, - 0xfe,0x1c,0xb6,0xc8,0x3c,0x07,0x0b,0x0e,0xf4,0x4b, - 0x6a,0x72,0x25,0x17,0x6a,0xb5,0xb8,0x40,0x42,0xd7, - 0x09,0x3d,0x8f,0xa7,0xe5,0xe3,0x94,0xce,0x04,0x66, - 0x8e,0x78,0xfc,0x4d,0xe0,0x20,0xc7,0xf3,0x2c,0x86, - 0xdd,0x78,0xff,0x83,0xd6,0x33,0x46,0x96,0xc5,0x32, - 0x06,0x9e,0xee,0xfa,0xff,0xeb,0xe2,0x6a,0xc2,0x19, - 0x24,0x71,0x8d,0xc5,0x82,0x06,0x0b,0x03,0x97,0x25, - 0xfc,0xdc,0x92,0x2e,0xef,0xd1,0xab,0x38,0x19,0x5d, - 0x75,0xe2,0x7d,0x5d,0xca,0x76,0xc4,0xed,0x77,0xc0, - 0xc6,0x11,0x8f,0x7f,0x04,0xfc,0x21,0xe2,0xf1,0x7d, - 0xb0,0xf7,0x85,0x66,0x4e,0xa3,0x5e,0xef,0xbb,0x22, - 0x95,0xa4,0x00,0x80,0x94,0x5d,0xb3,0x0f,0xe7,0x24, - 0x03,0x00,0xc3,0x68,0x5c,0xec,0xee,0x35,0xec,0xbc, - 0x6c,0x15,0x5d,0x83,0xd5,0x3d,0x68,0xe7,0x0c,0xf0, - 0x7c,0x58,0x1a,0xf2,0x0d,0x54,0xa3,0x9d,0x52,0x12, - 0x9e,0x09,0x3c,0x9e,0x44,0xe6,0x44,0x6f,0xa2,0x5f, - 0xef,0xf1,0xd8,0x4e,0xba,0xd7,0x4f,0x81,0xad,0x23, - 0x1e,0xef,0xc4,0xea,0x41,0x8c,0x0e,0x3c,0xcf,0x16, - 0x58,0xc6,0xcc,0x0a,0x31,0xae,0x1d,0x65,0x29,0xe0, - 0x21,0x2c,0x1b,0xa0,0x0e,0xc6,0x61,0x8b,0xf5,0x24, - 0x4c,0xc0,0x8e,0xfb,0x2c,0x0c,0x1c,0x80,0x5a,0xc4, - 0x95,0xd1,0x32,0xce,0x71,0x0a,0x00,0x34,0xf6,0x94, - 0x73,0x5c,0x99,0x02,0x00,0x6b,0x00,0x27,0x04,0xc6, - 0xec,0x4b,0xf4,0xdf,0xfb,0x9b,0xc0,0x1f,0x23,0x1e, - 0xef,0x87,0x05,0x70,0x55,0x0f,0x40,0xa4,0xc4,0x14, - 0x00,0x90,0x32,0x9b,0x17,0x4b,0x4d,0xee,0x69,0x22, - 0xe1,0x85,0x56,0x1c,0xcd,0x6e,0x00,0xaa,0x96,0xfe, - 0xdf,0xd3,0x05,0x58,0xca,0x5f,0x3b,0x2d,0xe3,0x42, - 0x7a,0x61,0x55,0xe3,0x7f,0x45,0x72,0x05,0xf0,0x8a, - 0xec,0x05,0xa2,0x8f,0x57,0x2c,0x8d,0x15,0xf7,0x6a, - 0xc7,0x92,0x44,0xb7,0x79,0x1b,0x8e,0xbf,0x1b,0xca, - 0x34,0xc0,0x79,0x81,0x31,0xe7,0x61,0xe7,0xce,0xa3, - 0x6c,0x8b,0x15,0xb2,0xf3,0xb6,0x9f,0xf3,0xea,0x87, - 0xa5,0xbb,0xee,0x94,0xf0,0xf3,0x16,0xcd,0x10,0x6c, - 0xa1,0x7e,0x40,0x9b,0xcf,0x33,0x16,0xf8,0x0b,0xd6, - 0x35,0x60,0x67,0xac,0x48,0xa0,0x94,0x4f,0x07,0x56, - 0xe4,0x2d,0x64,0x14,0xe1,0x63,0x47,0x75,0xf5,0x32, - 0xbe,0xa3,0x6e,0x8b,0x13,0xdd,0x62,0xb3,0x28,0x66, - 0xc5,0xb2,0x84,0xa2,0x3e,0x3f,0x6e,0x03,0xfe,0xee, - 0x78,0xae,0x13,0xb1,0x40,0x40,0x33,0xf3,0x03,0x17, - 0xf9,0xa7,0x26,0x22,0x45,0xa3,0x00,0x80,0x94,0x59, - 0xb3,0xf4,0xff,0xe7,0x89,0x4e,0x61,0x4b,0xea,0x3a, - 0x55,0x4c,0xff,0xef,0xe9,0x5a,0xe0,0x07,0xc0,0xb3, - 0x29,0x3d,0x7f,0x07,0x96,0x72,0x78,0x03,0xf0,0x09, - 0xb6,0x5b,0x75,0x0a,0xf0,0x23,0xa0,0x7f,0x4a,0xd7, - 0xcc,0xd3,0x44,0x6c,0xd7,0xba,0x99,0x41,0xb4,0xbf, - 0x43,0xbe,0x4e,0xe0,0xf1,0x7b,0x62,0x3c,0xd7,0xa9, - 0xc0,0xec,0x11,0x8f,0x8f,0x20,0xbc,0x28,0x5d,0x05, - 0xdb,0x6d,0x4e,0xeb,0xf3,0xa6,0x03,0x38,0x97,0x6a, - 0x16,0xa1,0x1c,0x88,0xa5,0xeb,0xbe,0x85,0xed,0xca, - 0xcd,0xda,0xe2,0xf3,0x7c,0x82,0x75,0x03,0x98,0x0b, - 0xcb,0xca,0x79,0x3b,0x89,0xc9,0x49,0x6e,0xe6,0xc2, - 0xf7,0xfe,0xf8,0x2a,0xea,0xe4,0xd0,0xcc,0x64,0x7c, - 0xb5,0x50,0x06,0x12,0xfd,0x1e,0x58,0x04,0x7d,0xb0, - 0x5d,0xf9,0xa8,0xe2,0xaf,0x63,0xf0,0x9f,0xdf,0x1f, - 0x8b,0x65,0x0a,0x44,0xd9,0x04,0xd8,0xd3,0xf9,0x7c, - 0x22,0x52,0x30,0x0a,0x00,0x48,0x99,0xa9,0x00,0x60, - 0x36,0x86,0x63,0x8b,0xd2,0x83,0xb1,0x1d,0xa5,0xb4, - 0x74,0x60,0x3b,0xe0,0xfb,0x63,0x3b,0x15,0x9f,0x03, - 0xff,0x02,0x7e,0x43,0xb8,0xaa,0x7d,0x99,0xdc,0x16, - 0x78,0xfc,0x17,0x6d,0x3e,0xff,0x86,0x81,0xc7,0x6f, - 0x75,0x3e,0xcf,0x0f,0xb1,0xd4,0xfe,0x28,0x3b,0x03, - 0x5f,0x47,0x3c,0x3e,0x10,0xab,0xe0,0xdf,0xe8,0x08, - 0xcd,0x94,0xc6,0x62,0xe7,0xfa,0x37,0x06,0x16,0xc1, - 0x16,0xba,0xf3,0x61,0x81,0xa0,0x93,0xb0,0x05,0x6c, - 0x94,0x3e,0xd8,0xce,0xd6,0xe0,0xc0,0xb8,0x32,0xd9, - 0x1a,0x3b,0x66,0x74,0x02,0x30,0xb4,0xc5,0xe7,0x78, - 0x18,0xd8,0x06,0x98,0x13,0xab,0xcd,0x11,0x7a,0x1d, - 0xa5,0x1c,0xa2,0x0a,0xbc,0x4d,0xe9,0x95,0x54,0x67, - 0x51,0x7e,0xde,0x5a,0x28,0xde,0xd7,0x3b,0x2f,0x93, - 0xb0,0x4c,0xa8,0xa8,0xbf,0xef,0x63,0x88,0x97,0x0d, - 0xf2,0x4f,0xe0,0x3f,0x11,0x8f,0x8f,0x40,0x19,0x44, - 0x22,0xa5,0x55,0xb5,0x00,0x80,0x27,0xad,0xd5,0x9b, - 0xfa,0x2a,0xc5,0xd7,0x6c,0x61,0xee,0x69,0xef,0xe3, - 0x35,0x80,0xc6,0xad,0xc7,0x26,0xe3,0x3f,0x43,0x58, - 0x05,0x13,0xb0,0x85,0xc8,0x82,0x58,0x41,0xb8,0x34, - 0x03,0x01,0xdd,0x06,0x00,0x3f,0xc1,0x76,0x77,0xdf, - 0xc3,0x76,0xae,0x77,0xa6,0xfc,0x67,0x0f,0x6f,0x0c, - 0x3c,0xbe,0x15,0x76,0x8e,0xbf,0x15,0x0b,0x12,0xdd, - 0x1b,0xfc,0x33,0xe0,0x5e,0xc7,0xf3,0x0c,0x26,0xdc, - 0xf2,0xe9,0x62,0xe0,0xf6,0xc0,0x98,0x43,0x08,0x77, - 0x36,0xb8,0x0b,0x9b,0xf7,0x0e,0x58,0xeb,0xaa,0x97, - 0x81,0x0f,0xb1,0x14,0xd4,0xff,0x62,0xfd,0xe8,0xe7, - 0x23,0x9c,0x72,0x3a,0x3b,0x70,0x58,0x60,0x4c,0x19, - 0x2c,0x84,0x75,0x48,0xb8,0x9c,0xd6,0x77,0xfc,0x01, - 0x5e,0xc2,0xfa,0x98,0x5f,0x41,0x7a,0x9f,0x7b,0x53, - 0x63,0x8b,0xa8,0x3f,0x01,0xeb,0xa3,0x62,0x9f,0x59, - 0x59,0xd0,0x39,0x4e,0x01,0x80,0x68,0xde,0xd7,0xc7, - 0xfb,0x7a,0xe7,0xa5,0x13,0x0b,0xa0,0x2e,0x84,0x75, - 0x0b,0x99,0xd4,0xe3,0xf1,0x17,0xb0,0xcc,0xba,0xb8, - 0xf6,0xe6,0xfb,0x9b,0x66,0xe3,0x81,0xe3,0x81,0x45, - 0xb1,0x20,0x41,0x91,0xdd,0x82,0xbd,0x36,0x69,0x7c, - 0x1d,0x12,0xb8,0xf6,0x81,0x29,0x5e,0xdb,0x1b,0xc4, - 0x17,0x69,0xaa,0x6a,0x01,0x00,0x65,0x00,0xd4,0x47, - 0x07,0xcd,0x2b,0xd1,0x26,0x99,0x01,0xd0,0xec,0x4c, - 0xf6,0x2b,0x44,0xef,0x7c,0x56,0xd5,0x87,0x58,0xca, - 0xfe,0xec,0x58,0x3a,0xa1,0xb7,0x95,0x52,0xbb,0x7a, - 0x61,0x7d,0xce,0xcf,0xc7,0x2a,0xa1,0x9f,0x43,0x72, - 0x2d,0xf3,0xb2,0xf6,0x2a,0xd1,0xad,0xb9,0xe6,0xc4, - 0xda,0xde,0xb5,0xe2,0x00,0xa2,0xcf,0xab,0x5e,0x85, - 0xef,0x3d,0xf0,0x24,0xa2,0x5f,0xdf,0xf7,0x80,0xfd, - 0x02,0xcf,0x31,0x1d,0xd1,0x7d,0xa5,0x01,0x6e,0x06, - 0x7e,0x0c,0xbc,0x1b,0x18,0x37,0x0a,0x3b,0xe7,0x7f, - 0x46,0x60,0xdc,0x5e,0x58,0xeb,0xc0,0xb2,0xda,0x1b, - 0xab,0x5f,0x92,0xc4,0x71,0x86,0x45,0xb1,0x80,0x59, - 0x9a,0xd6,0xc0,0x3a,0x4e,0xec,0x81,0xdd,0x94,0x7e, - 0x8a,0x05,0x71,0xb6,0xa7,0xdc,0x3f,0x87,0xa2,0x9b, - 0xd3,0x39,0x4e,0x47,0x3d,0xa2,0x79,0x5f,0x9f,0x39, - 0x52,0x9d,0x45,0x72,0xbe,0xc4,0xfe,0x16,0x57,0xe0, - 0xdb,0x36,0x7f,0x9d,0x58,0x41,0xdf,0x09,0x2d,0x3c, - 0xdf,0xab,0x7c,0x37,0x70,0x70,0x1b,0x56,0x60,0xf6, - 0x10,0xd2,0xad,0x0d,0x24,0x22,0x29,0x53,0x00,0x40, - 0xca,0x6a,0x7e,0x60,0xda,0x06,0xff,0xfd,0x1b,0xe2, - 0x55,0x38,0x0f,0xa9,0x6b,0x01,0xc0,0x90,0x91,0xd8, - 0xce,0xfc,0x4a,0xd8,0xee,0xec,0xef,0xb1,0xb3,0xed, - 0x93,0x33,0xb8,0xf6,0x20,0xec,0x1c,0xf3,0x2b,0x58, - 0x20,0x60,0x86,0x0c,0xae,0x99,0xb4,0x73,0x02,0x8f, - 0xb7,0x92,0xf6,0xbd,0x22,0xb6,0xf0,0x6a,0xa6,0x13, - 0xfb,0x99,0x85,0xac,0x89,0x1d,0xbb,0x88,0xb2,0x2b, - 0xe1,0x0e,0x18,0xbb,0x61,0x3f,0xab,0x66,0x46,0x60, - 0xd9,0x0e,0x71,0x6e,0x4c,0x7f,0x47,0x74,0x80,0xaf, - 0x3f,0xe5,0x3c,0x97,0x3a,0x0d,0xb6,0x70,0x3e,0x83, - 0x64,0x0b,0x25,0x1e,0x4b,0xeb,0xc7,0x07,0x3c,0xd6, - 0xee,0xf1,0xbf,0x07,0x63,0x47,0x50,0x2e,0x06,0x3e, - 0xc0,0xb2,0x3b,0x24,0x79,0xb3,0x39,0xc7,0x25,0xdd, - 0x36,0xb2,0x6a,0xbc,0xaf,0x4f,0xd1,0x6b,0x00,0xf4, - 0xf4,0x34,0x96,0x09,0xb6,0x3d,0x56,0x3b,0xe4,0xc1, - 0x36,0x9e,0xeb,0xb8,0xae,0xef,0xdf,0x04,0x0b,0xd6, - 0xc6,0x6d,0x21,0x2b,0x22,0x05,0xa4,0x00,0x80,0x94, - 0x55,0xb3,0xf4,0xff,0xa7,0xf9,0x7e,0xfa,0x5b,0x1a, - 0xd7,0xa9,0x43,0x01,0x40,0xaf,0x37,0xb1,0x5d,0x82, - 0x55,0xb1,0x5e,0xf1,0x5b,0x63,0x69,0xc7,0x1f,0xa5, - 0x7c,0xdd,0xbe,0xd8,0x22,0xf3,0x65,0x2c,0x7d,0xbc, - 0x4c,0xfe,0x8e,0x15,0x76,0x6b,0x66,0x0e,0xac,0xa2, - 0xb3,0xb7,0x10,0xe2,0x1c,0x58,0x11,0xa8,0xa8,0xa3, - 0x03,0x37,0x12,0x0e,0x8e,0x0d,0xc4,0x52,0xed,0xa3, - 0xb2,0x08,0x2e,0xc7,0x6a,0x33,0x84,0x6c,0x17,0x78, - 0xfc,0x0f,0xc4,0xcf,0xa2,0x99,0x84,0x05,0x01,0x42, - 0xd7,0x2d,0x43,0xd5,0xee,0x6e,0x73,0x63,0x37,0xd8, - 0xa1,0xda,0x0d,0x3d,0x4d,0x26,0xfc,0x79,0x36,0x03, - 0x70,0x74,0x2b,0x93,0x72,0x5a,0x2f,0xe2,0xb1,0x5e, - 0xe8,0xf3,0x36,0x2d,0xde,0x00,0xc0,0x7b,0xa9,0xce, - 0xa2,0xfc,0xbc,0xaf,0x4f,0xd9,0x02,0x00,0x60,0x01, - 0xdf,0xbf,0x02,0x07,0xb5,0xf9,0x3c,0xdf,0x60,0x47, - 0x89,0xae,0x6b,0x77,0x42,0x22,0x52,0x1c,0x0a,0x00, - 0x48,0x59,0xa9,0x00,0x60,0x31,0x7d,0x8a,0xb5,0x7b, - 0xdb,0x06,0x3b,0xbf,0xbc,0x14,0x96,0xd6,0x9c,0x66, - 0xf1,0xb1,0xe9,0xb0,0x45,0xeb,0xd5,0x94,0xa7,0x08, - 0xdc,0x44,0xc2,0x37,0x66,0x3f,0xc4,0xea,0x1e,0x2c, - 0x12,0x18,0xb7,0x26,0x96,0x7d,0x11,0x95,0xb2,0x3f, - 0xde,0x71,0x3d,0xb0,0xdd,0x9e,0xf9,0x23,0x1e,0xef, - 0x3e,0x02,0x12,0xb2,0x3c,0x96,0x1a,0xde,0xcc,0x3b, - 0x58,0xc0,0xa2,0x15,0xf7,0x11,0xdd,0x95,0x62,0x0e, - 0x2c,0x35,0xbd,0x0c,0x16,0xc6,0x7e,0x76,0x9e,0x96, - 0x6e,0xdd,0x26,0x60,0xe7,0x7d,0x17,0xc1,0x0a,0x7b, - 0x85,0xec,0x86,0xa5,0xed,0x26,0x6d,0x0e,0x60,0x58, - 0x60,0x4c,0xa8,0x46,0x84,0xb4,0x66,0x66,0xe7,0xb8, - 0x0f,0x52,0x9d,0x45,0xf9,0x79,0x33,0x00,0xbc,0xaf, - 0xb7,0x88,0x48,0x29,0x28,0x00,0x20,0x65,0x95,0x45, - 0x00,0x60,0x10,0x8d,0x17,0x5f,0x93,0xb0,0x4c,0x03, - 0x89,0xd6,0x89,0xb5,0x64,0x3c,0x8b,0x6c,0xaa,0x05, - 0x6f,0x86,0xf5,0xa3,0x9f,0x31,0x83,0x6b,0x25,0xe1, - 0x2a,0xc2,0x1d,0x01,0x7e,0x80,0x75,0x61,0xf8,0x27, - 0x96,0x96,0xbf,0x16,0x76,0x2c,0x65,0x2d,0xec,0xac, - 0xe7,0x9d,0x58,0x90,0x20,0x74,0x26,0xf8,0x44,0x2c, - 0x53,0x22,0xca,0x2a,0xd8,0x19,0xfa,0x28,0xbf,0xc5, - 0xba,0x33,0x84,0xfc,0x38,0xf0,0xf8,0xd5,0xb4,0x97, - 0xa9,0x73,0x75,0xe0,0xf1,0x9f,0xb6,0xf1,0xdc,0x59, - 0x99,0x1f,0xfb,0x7d,0xf5,0xee,0xe6,0x82,0x05,0x4d, - 0x16,0xc0,0x32,0x5e,0x5e,0xc5,0xda,0x34,0x86,0xea, - 0x27,0xf4,0xc6,0x8a,0xf4,0x25,0xcd,0xf3,0x1a,0x87, - 0x7e,0xbf,0xa5,0x35,0x8d,0x8e,0xbf,0x35,0xf2,0x45, - 0xaa,0xb3,0x28,0xbf,0x2f,0x9d,0xe3,0xbc,0xaf,0xb7, - 0x88,0x48,0x29,0x28,0x00,0x20,0x65,0x94,0x55,0x01, - 0xc0,0x65,0x68,0x9c,0x52,0xfd,0x3f,0x60,0x74,0x82, - 0xd7,0xa9,0xb3,0x49,0x58,0xc1,0xbb,0x8b,0x49,0xe6, - 0xbc,0xea,0xf2,0x58,0x31,0xb2,0xb2,0x64,0x02,0x6c, - 0x4b,0x38,0x0d,0xb5,0x37,0xd6,0x1a,0xf0,0x5c,0x6c, - 0xc1,0xf8,0x44,0xd7,0xff,0xfd,0x13,0xb0,0x8e,0xe3, - 0x1a,0xf7,0x10,0x4e,0x03,0xef,0x8f,0xfd,0x0c,0xa2, - 0x3e,0x13,0xae,0x06,0x6e,0x70,0x5c,0x0f,0xa2,0x53, - 0xc3,0x01,0xfe,0xed,0x7c,0x9e,0x66,0xa2,0xda,0x53, - 0x81,0x65,0x4f,0x14,0xd9,0x74,0xd8,0xbf,0xc1,0x5b, - 0xe5,0xff,0x0d,0x60,0x03,0x60,0x73,0xbe,0x1b,0x4c, - 0x1b,0x83,0x2f,0xb3,0x63,0x2d,0x92,0x2f,0x08,0xf8, - 0xf3,0xc0,0xe3,0xaf,0x93,0x6c,0x3d,0x16,0xf9,0x96, - 0x67,0x41,0x3a,0x1a,0xcb,0x34,0x92,0xe6,0xbe,0xc1, - 0x57,0x83,0x44,0x01,0x00,0x11,0xa9,0x14,0x05,0x00, - 0xa4,0x8c,0x16,0xc2,0xda,0x4f,0xf5,0xf4,0x05,0xc9, - 0x16,0xa8,0x51,0x01,0xc0,0x6c,0x5c,0x85,0xf5,0x9b, - 0x9f,0x1d,0x0b,0xba,0x1c,0x41,0x7b,0x19,0x16,0xcb, - 0x02,0x97,0x25,0x30,0xaf,0x2c,0x7c,0x0c,0xfc,0x0c, - 0xdf,0xae,0x7a,0x2b,0x9e,0x07,0x36,0x25,0xbc,0xdb, - 0x7e,0x14,0x96,0x8e,0xde,0xcc,0x27,0xf8,0x8b,0xeb, - 0xf5,0xa2,0x79,0x86,0x0e,0xd8,0x0d,0xf7,0xc3,0x11, - 0x8f,0x7b,0x3c,0x47,0x74,0xfd,0x80,0xa5,0x88,0x2e, - 0x40,0x98,0xa7,0x0e,0xec,0x98,0x8c,0xb7,0xb5,0xd8, - 0x4d,0x58,0x37,0x92,0x66,0xad,0x9f,0xfe,0x86,0x1d, - 0x23,0x08,0x39,0x15,0x98,0xcb,0x79,0xcd,0x90,0x69, - 0x09,0x07,0x59,0xae,0x4f,0xe8,0x5a,0xf2,0x5d,0xbd, - 0xf0,0x05,0x38,0x43,0x45,0x3a,0xc5,0x78,0x5e,0xa7, - 0xa9,0x29,0x57,0x5d,0x11,0x31,0x93,0x52,0xfc,0xea, - 0x0c,0x5c,0xbb,0x33,0xe5,0xeb,0x4b,0x6b,0xa6,0x25, - 0xbd,0xf6,0x8c,0x8d,0xbe,0x0a,0x1b,0x3c,0x54,0x00, - 0x40,0xca,0x28,0xab,0x73,0xf9,0x2a,0x00,0x98,0xbd, - 0x67,0xb0,0xdd,0xea,0x65,0xb1,0x05,0xd2,0x51,0xb4, - 0x76,0x7c,0x60,0x43,0xca,0x53,0x18,0xf0,0x19,0x6c, - 0x27,0x3f,0xe9,0x63,0x12,0x0f,0x01,0xeb,0x62,0x75, - 0x19,0xa2,0x2c,0x0f,0xec,0x1f,0x18,0xb3,0x07,0xfe, - 0x3a,0x0e,0x0b,0x11,0xbd,0xf8,0x7e,0x19,0x18,0xeb, - 0x7c,0xae,0x66,0x26,0x63,0xc1,0x8d,0x66,0x7a,0x11, - 0x3e,0x9f,0x9e,0x97,0x7d,0x08,0x1f,0x91,0xe8,0x76, - 0x3c,0xf0,0x2b,0xa2,0x83,0x1d,0x9d,0xc0,0xee,0x84, - 0x6f,0x0a,0xa7,0xc6,0x6a,0x65,0x24,0x61,0x43,0xac, - 0x08,0x67,0x14,0x05,0x00,0xd2,0x31,0x00,0xdf,0x62, - 0xb4,0x8e,0x6d,0x6a,0x5b,0xe1,0x79,0x9d,0x7a,0x91, - 0x6c,0x77,0x0e,0xc9,0xc6,0x2f,0xb1,0x36,0xce,0x69, - 0x7c,0x1d,0x1f,0xb8,0xf6,0x49,0x29,0x5e,0xbb,0x0c, - 0x47,0xdc,0xa4,0xe0,0xaa,0x16,0x00,0x18,0x97,0xd0, - 0x18,0x29,0x36,0x15,0x00,0xac,0x87,0xd7,0x80,0x23, - 0xb1,0x36,0x83,0x9b,0x61,0x47,0x2f,0xe2,0x38,0x01, - 0x18,0x92,0xf0,0x9c,0xd2,0xf2,0x2c,0x96,0xfd,0x70, - 0x4d,0x02,0xcf,0x35,0x01,0x6b,0xfd,0xb4,0x16,0xe1, - 0x45,0x7b,0x5f,0xac,0xa0,0x5c,0x54,0xf7,0x80,0xeb, - 0x89,0x57,0xb0,0x2f,0x54,0xd0,0xee,0xc5,0x18,0xcf, - 0xd5,0xce,0xf3,0x2c,0x99,0xd0,0x75,0x92,0x34,0x27, - 0xbe,0xc2,0x7d,0x60,0x05,0x19,0x0f,0x21,0xbc,0xd3, - 0x04,0x16,0x44,0xfa,0xb3,0x63,0xdc,0x7a,0x84,0x5b, - 0x3c,0x7a,0x6c,0x11,0x78,0xfc,0x6d,0xe0,0xd1,0x04, - 0xae,0x23,0xdf,0x37,0x95,0x73,0x5c,0x2b,0x7d,0xdf, - 0xeb,0xc8,0xfb,0x3a,0x79,0x5f,0x77,0x11,0x91,0xc2, - 0xab,0x5a,0x00,0x40,0x19,0x00,0xf5,0x90,0x45,0x00, - 0x60,0x6a,0x6c,0x27,0xb3,0xa7,0x89,0xd8,0xcd,0xb6, - 0x64,0x67,0x12,0xb6,0x30,0x1e,0x86,0x2d,0xea,0x3d, - 0x0b,0x22,0x80,0x99,0xb0,0xa2,0x75,0x65,0xf1,0x39, - 0x16,0xe8,0x58,0x1d,0xb8,0x99,0xf8,0x69,0x7e,0x63, - 0xb0,0xc5,0xfc,0xe2,0x58,0x8b,0x3d,0xcf,0x8d,0xed, - 0xa1,0x44,0x57,0x88,0xff,0x9c,0xf8,0xaf,0xe1,0xbc, - 0x81,0xc7,0xdf,0x8c,0xf9,0x7c,0xcd,0xbc,0x1d,0x78, - 0x7c,0xbe,0x84,0xae,0x93,0xa4,0xe3,0xf0,0x1d,0x4d, - 0xb8,0x00,0xfb,0xd9,0xc4,0x71,0x18,0xbe,0xb6,0x66, - 0x27,0x03,0xf3,0xc4,0x7c,0xee,0x29,0xcd,0x49,0xb8, - 0xc6,0xc3,0xe5,0xf8,0xff,0x4e,0x25,0x1e,0x05,0x00, - 0x92,0xa5,0x00,0x80,0x88,0xd4,0x8e,0x02,0x00,0x52, - 0x36,0xbd,0xb0,0x9d,0xd2,0x46,0x92,0x0c,0x00,0x2c, - 0x4b,0xe3,0xbf,0x8f,0x17,0xb1,0x85,0x96,0x64,0x6f, - 0x3c,0x70,0x30,0x56,0x34,0xd0,0xbb,0x38,0xde,0x83, - 0xf2,0xbd,0xcf,0x3d,0x80,0x15,0xfd,0x9b,0x0b,0x3b, - 0xc6,0xf0,0x57,0x6c,0x37,0xf5,0x23,0xac,0x68,0xd5, - 0x64,0xac,0xc0,0xd7,0x7b,0x58,0x4b,0xbc,0x73,0xb0, - 0x73,0xfe,0xb3,0xf2,0x6d,0x75,0x78,0x8f,0x61,0x58, - 0xa0,0x20,0xca,0xde,0x5d,0xd7,0x8d,0x23,0xaa,0x1d, - 0x21,0x84,0xab,0xd6,0x7b,0x85,0x9e,0x27,0x14,0x88, - 0xc8,0xda,0x02,0xc0,0xaf,0x1d,0xe3,0x5e,0x26,0xdc, - 0x8d,0xa1,0x91,0x91,0xd8,0x51,0x80,0x90,0xc1,0xd8, - 0xef,0x54,0x54,0xd6,0x47,0x94,0x1d,0x08,0xff,0x4d, - 0x95,0xa5,0x06,0x47,0x19,0x79,0x17,0xa2,0x2a,0x00, - 0xe8,0xa3,0x00,0x80,0x88,0xd4,0x4e,0x9f,0xbc,0x27, - 0x90,0x30,0x05,0x00,0xaa,0x6f,0x11,0x1a,0xef,0xa0, - 0x7d,0x80,0x6f,0xf7,0xcb,0x4b,0x05,0x00,0x8b,0xeb, - 0x6a,0x2c,0xb5,0xff,0x7c,0xc7,0xd8,0xd9,0x81,0x55, - 0x81,0xfb,0x53,0x9d,0x51,0x3a,0xde,0xc7,0x76,0xf4, - 0x2f,0x49,0xe1,0xb9,0xfb,0x74,0x3d,0x6f,0xd4,0x4d, - 0xed,0x2d,0xc0,0x15,0x2d,0x3c,0x77,0xa8,0x67,0xf6, - 0xc7,0x2d,0x3c,0x67,0x23,0xa1,0xe3,0x0d,0xb3,0x24, - 0x74,0x9d,0xa4,0xec,0x46,0x78,0xd1,0xdd,0x89,0x15, - 0xc4,0x6c,0xb5,0x46,0xc2,0x3f,0x81,0x6b,0x81,0x4d, - 0x02,0xe3,0xd6,0xc4,0x8e,0xd7,0x1c,0x16,0xf3,0xf9, - 0x7b,0x03,0xdb,0x07,0xc6,0x3c,0x40,0xb2,0xc5,0x58, - 0x45,0x44,0x44,0x24,0x41,0x65,0xdb,0x19,0x0b,0x51, - 0x00,0xa0,0x7c,0x8e,0x25,0x5e,0x45,0xcd,0x66,0x6d, - 0xa5,0x66,0x8d,0xf9,0x3c,0xa1,0xaf,0x53,0x9b,0x5c, - 0x67,0x87,0x16,0x9f,0xef,0x0e,0xff,0x4b,0x22,0x0e, - 0x17,0x00,0x37,0x3a,0xc7,0xaa,0x60,0xce,0xf7,0x1d, - 0x48,0xf3,0x4c,0x1a,0xb0,0xfe,0xd8,0xbb,0xb6,0xf8, - 0xdc,0xd3,0x05,0x1e,0x4f,0xaa,0x37,0x79,0xa8,0x73, - 0xc2,0xf4,0x09,0x5d,0x27,0x09,0xbd,0x80,0xad,0x1d, - 0xe3,0xfe,0x05,0x3c,0xd8,0xe6,0xb5,0xf6,0x20,0x5c, - 0xf8,0x11,0x2c,0x9b,0x66,0xfd,0x98,0xcf,0xbd,0x21, - 0xe1,0x0c,0x8f,0x73,0x62,0x3e,0xa7,0xc4,0xe3,0xdd, - 0xb1,0xae,0xda,0x06,0x4f,0x5a,0x74,0xa4,0x42,0x44, - 0x6a,0x47,0x01,0x00,0x11,0x29,0xab,0x83,0xf1,0x9d, - 0x33,0xfe,0x41,0xda,0x13,0x29,0x99,0xc5,0x80,0xc3, - 0x03,0x63,0xf6,0xc3,0x32,0x10,0x5a,0x11,0x6a,0x7b, - 0x93,0x54,0x75,0xf2,0xd1,0x81,0xc7,0x87,0x26,0x74, - 0x9d,0x24,0xac,0x8c,0xd5,0xa4,0x08,0x39,0x23,0x81, - 0x6b,0x7d,0x84,0x65,0x1b,0x84,0xf4,0xc2,0xce,0xea, - 0xcf,0x1e,0xe3,0xb9,0xf7,0x0b,0x3c,0xfe,0x21,0x96, - 0x81,0x20,0xe9,0x51,0xca,0x7a,0xb2,0x14,0x00,0x10, - 0x91,0xda,0xa9,0x5a,0x84,0x58,0x01,0x00,0x91,0xfa, - 0x78,0x09,0x3b,0x1b,0xbf,0x52,0x60,0x5c,0x11,0xab, - 0xc1,0xe7,0xa5,0x37,0x96,0xfa,0x1f,0xd5,0xc2,0xed, - 0x36,0xda,0x3b,0x76,0x10,0x6a,0x97,0x95,0x54,0x0d, - 0x8d,0x6f,0xda,0x9c,0x47,0x96,0xd6,0x76,0x8c,0x79, - 0x07,0xb8,0x33,0xa1,0xeb,0x5d,0x0b,0x5c,0x49,0xb8, - 0xe6,0xc0,0x8c,0xc0,0x55,0xd8,0xfc,0x42,0x67,0xc6, - 0x57,0xc3,0x02,0x19,0x51,0xce,0x43,0x0b,0xa5,0xb4, - 0x79,0x5f,0xdf,0x50,0x9b,0x46,0x31,0x0a,0x00,0x88, - 0xd4,0xc7,0x44,0xe0,0xde,0x8c,0xaf,0x57,0x48,0x75, - 0x0b,0x00,0x74,0xa2,0x37,0x71,0x91,0x2a,0xb9,0x9d, - 0x70,0x00,0x60,0x7a,0xac,0x6e,0x44,0x68,0xc7,0xb8, - 0x0e,0xf6,0x03,0x56,0x8c,0x78,0x7c,0x24,0xb0,0x73, - 0x9b,0xd7,0x08,0xdd,0x50,0x27,0xf5,0x81,0x18,0x2a, - 0x04,0x59,0xa4,0x05,0x50,0xb3,0xce,0x25,0x53,0xba, - 0x2f,0xe1,0x6b,0xee,0x01,0xac,0x01,0xcc,0x11,0x18, - 0xb7,0x1a,0x76,0x14,0x2b,0x54,0x10,0xf2,0xc8,0xc0, - 0x69,0x86,0xf4,0x51,0x00,0x00,0x20,0x00,0x49,0x44, - 0x41,0x54,0xe3,0xdf,0xe0,0x6b,0x45,0x28,0xed,0x19, - 0x83,0xdd,0xcb,0x74,0x04,0xc6,0x0d,0xce,0x60,0x2e, - 0x55,0x30,0xb5,0x63,0x4c,0x27,0xad,0xd7,0xe5,0x10, - 0x91,0xe2,0x18,0x85,0xb5,0x48,0xae,0xbd,0xba,0x1d, - 0x01,0xd0,0xe2,0x5f,0xa4,0x5a,0x9a,0xd5,0x84,0xe8, - 0x29,0x54,0x98,0xae,0x0e,0x16,0x02,0x8e,0x0a,0x8c, - 0x39,0x00,0xdb,0x89,0x6e,0x47,0x28,0xb0,0x1c,0xb7, - 0xbd,0x61,0x33,0xa1,0x40,0x42,0x91,0x52,0xa0,0x17, - 0x76,0x8c,0x49,0xba,0x50,0xe5,0x17,0x58,0xdd,0x81, - 0xc9,0x8e,0xb1,0x07,0x60,0x9d,0x24,0x9a,0x59,0x15, - 0x58,0x37,0xf0,0x1c,0x17,0x12,0x2e,0xcc,0x28,0xed, - 0x9b,0x8c,0xdd,0xc4,0x86,0x4c,0x93,0xf6,0x44,0x2a, - 0xc2,0xf3,0x3a,0x8d,0xc4,0xf7,0x77,0x24,0x22,0x52, - 0x0a,0x55,0x0b,0x00,0x8c,0x0b,0x3c,0xae,0xf4,0x7f, - 0x91,0xb0,0x7e,0xd8,0xae,0xfa,0x3e,0xf8,0x0a,0x97, - 0xe5,0xc9,0xbb,0xe0,0x28,0x52,0x3a,0x78,0x1e,0x3a, - 0x80,0x8b,0x88,0x7e,0x1d,0xee,0xc2,0xd7,0x59,0x21, - 0x24,0xb4,0xc0,0x4f,0xea,0x73,0x27,0x54,0x51,0xbf, - 0x48,0xa9,0x77,0x73,0x3a,0xc6,0xbc,0x9d,0xc2,0x75, - 0xef,0x05,0x4e,0x74,0x8c,0xeb,0x00,0x2e,0xa5,0x79, - 0xa6,0xc2,0xc9,0x81,0xef,0x9f,0x40,0xf3,0xc2,0xa9, - 0x92,0xbc,0x2f,0x1d,0x63,0x06,0x51,0xbd,0x2c,0xcf, - 0xa4,0x0d,0xc4,0x17,0x28,0xf4,0xbc,0xde,0x22,0x22, - 0xa5,0x51,0xb5,0x00,0xc0,0x0b,0xd8,0x8d,0x4c,0xb3, - 0x2f,0x4f,0xaa,0x97,0x64,0xeb,0x50,0xa2,0x7f,0x66, - 0x53,0x7e,0x35,0xab,0xfa,0xbe,0x59,0x8c,0xe7,0x08, - 0x7d,0xf5,0xa1,0x79,0xaa,0xf8,0xa2,0x6d,0x3c,0xef, - 0x7a,0xfe,0x97,0x24,0x73,0xf3,0x63,0x67,0x85,0xcf, - 0xc2,0xce,0xd4,0x8f,0x04,0x1e,0x06,0x4e,0xc7,0xaa, - 0xc5,0x17,0x59,0xe8,0x1c,0x78,0xb7,0x22,0xed,0x06, - 0xe7,0x61,0x4f,0x2c,0xd5,0xbb,0x99,0xd1,0xc0,0x4e, - 0xf8,0x8a,0x2a,0x86,0x84,0x32,0xad,0x92,0x5a,0x94, - 0x84,0x9e,0xa7,0x28,0x01,0xdf,0xde,0x34,0x6e,0x5d, - 0xda,0xd3,0x67,0x29,0x5d,0xff,0x08,0xe0,0x11,0xc7, - 0xb8,0x01,0xc0,0x4d,0x7c,0xbf,0x28,0xe0,0x16,0x84, - 0xcf,0xfe,0x5f,0x04,0x8c,0x88,0x3f,0x35,0x69,0x91, - 0x77,0x41,0x5a,0xa4,0x42,0x98,0x45,0x14,0x2a,0x58, - 0xda,0xed,0xab,0x54,0x67,0x21,0x22,0x92,0xb1,0xaa, - 0x05,0x00,0xa4,0xda,0x56,0x68,0xf2,0xdf,0x1f,0x4b, - 0xf0,0x1a,0x8b,0xd3,0xf8,0x66,0xfd,0x0b,0xe0,0xe5, - 0x04,0xaf,0x53,0x04,0x27,0x60,0x3b,0xe8,0xaf,0x01, - 0x7f,0xc3,0x16,0x89,0x2b,0xf2,0xdd,0xb3,0xd3,0x4b, - 0x10,0x3e,0x43,0x9c,0xa7,0x81,0xce,0x71,0x75,0x3e, - 0xff,0x3f,0x1f,0x70,0x7c,0x60,0xcc,0x1f,0x80,0x37, - 0x13,0xba,0x5e,0xe8,0xac,0x6c,0x52,0xd9,0x18,0xa1, - 0x9f,0x7d,0x52,0xc5,0x06,0xdb,0xd5,0xcf,0x39,0x6e, - 0x64,0x4a,0xd7,0x9f,0x08,0x6c,0x4e,0xb8,0x6d,0x22, - 0x58,0x3b,0xd5,0x9b,0xf9,0xf6,0x3d,0x70,0x10,0xf0, - 0xc7,0xc0,0xf7,0x8c,0x01,0x8e,0x69,0x79,0x76,0xd2, - 0x8a,0x8f,0x9c,0xe3,0x66,0x4d,0x75,0x16,0xe5,0x37, - 0x9b,0x73,0xdc,0x87,0xa9,0xce,0x42,0x44,0x24,0x63, - 0x0a,0x00,0x48,0x59,0xcc,0x4a,0xe3,0x76,0x55,0x9f, - 0x90,0x6c,0xea,0x6c,0xb3,0x02,0x69,0x8f,0x91,0xcc, - 0xee,0x68,0x91,0x4c,0x06,0x66,0x70,0x8c,0xdb,0x30, - 0xed,0x89,0xb4,0x61,0x2e,0xe7,0xb8,0xba,0xee,0xe0, - 0x74,0x60,0x67,0xb3,0xa3,0x76,0xa0,0xef,0x23,0xd9, - 0xe2,0x6d,0x5f,0x04,0x1e,0x4f,0xaa,0x38,0x59,0x28, - 0xa3,0xcb,0xb3,0xe0,0xcd,0x82,0xb7,0x78,0x58,0xff, - 0x14,0xe7,0x30,0x02,0xd8,0x16,0xdf,0x7b,0xd8,0x32, - 0x58,0x7b,0xc0,0x0e,0xac,0x38,0x60,0xe8,0x6f,0xec, - 0x2c,0x5a,0x6f,0x19,0x29,0xad,0xf1,0xbe,0xde,0xde, - 0x05,0x6e,0x5d,0x79,0x5f,0x1f,0xfd,0x7e,0x8b,0x48, - 0xa5,0x28,0x00,0x20,0x65,0xd1,0x6c,0xf7,0xff,0xf1, - 0x84,0xaf,0xd3,0xac,0x67,0xfc,0xa3,0x09,0x5f,0xa7, - 0x08,0xee,0x71,0x8e,0xdb,0x87,0xf0,0x79,0xeb,0xbc, - 0x2c,0xe3,0x18,0x33,0x1a,0xf8,0x38,0xed,0x89,0x14, - 0xd4,0xae,0x44,0xb7,0xa0,0x1b,0x03,0xec,0x48,0xb2, - 0xc1,0xad,0x50,0x2a,0x7b,0x52,0x69,0xc9,0xd3,0x07, - 0x1e,0xff,0x34,0xa1,0xeb,0xb4,0x6b,0x32,0xbe,0x20, - 0xc0,0x8c,0x29,0xcf,0xe3,0x5f,0x84,0x77,0xf3,0xbb, - 0x6d,0x88,0xb5,0x07,0xdc,0x33,0x30,0xee,0x53,0x7c, - 0x35,0x06,0x24,0x59,0xef,0x39,0xc7,0x29,0x00,0x10, - 0xcd,0xfb,0xfa,0x78,0x5f,0x6f,0x11,0x91,0x52,0x50, - 0x00,0x40,0xca,0x22,0xab,0x00,0x40,0xb3,0x0c,0x00, - 0xcf,0x19,0xda,0xb2,0xb9,0x17,0xdf,0x59,0xd2,0xf9, - 0x88,0xae,0x10,0x9e,0xa7,0x9f,0x38,0xc6,0x54,0xed, - 0xe8,0x86,0xd7,0x9c,0xc0,0x49,0x81,0x31,0x87,0x62, - 0x47,0x40,0x92,0x14,0x4a,0x4f,0x9e,0x29,0xa1,0xeb, - 0x84,0x3a,0x3b,0x14,0x69,0xd7,0xce,0x53,0xac,0x72, - 0x81,0xd4,0x67,0x61,0x3f,0xef,0xff,0x3a,0xc7,0x6e, - 0x46,0x38,0xf0,0x77,0x08,0x2a,0x90,0x96,0x07,0x6f, - 0xa7,0x8e,0x79,0xd2,0x9c,0x44,0x05,0xcc,0xed,0x1c, - 0xf7,0x6e,0xaa,0xb3,0x10,0x11,0xc9,0x98,0x02,0x00, - 0x52,0x16,0x59,0x04,0x00,0x06,0x61,0x35,0x00,0x1a, - 0xa9,0x62,0x06,0xc0,0x78,0x9a,0x17,0x56,0xec,0xe9, - 0x78,0x60,0x48,0x8a,0x73,0x69,0xc5,0xba,0xc0,0x82, - 0x8e,0x71,0x0f,0xa4,0x3d,0x91,0x82,0xba,0x80,0xe8, - 0x34,0xf9,0x87,0x81,0x33,0x52,0xb8,0xee,0x5b,0x81, - 0xc7,0x3d,0x15,0xf1,0x3d,0x42,0xa9,0xe9,0xaf,0x27, - 0x74,0x9d,0x24,0xbc,0xe1,0x18,0xd3,0x2c,0xf8,0x98, - 0xa4,0x49,0xc0,0x96,0x84,0x7f,0x46,0x1e,0x4f,0x63, - 0xc7,0x4b,0x24,0x7b,0xaf,0x3a,0xc7,0x79,0xde,0x1f, - 0xeb,0xcc,0xfb,0xfa,0x24,0x1d,0x24,0x15,0x11,0xc9, - 0x95,0x02,0x00,0x52,0x16,0xcd,0xda,0x53,0x25,0x19, - 0x00,0x58,0x8e,0xc6,0x3b,0x5e,0xaf,0x52,0x9c,0xf3, - 0xc4,0x49,0xf3,0xb6,0x7d,0x9b,0x97,0x64,0xcf,0x89, - 0xb7,0xab,0x37,0xfe,0xd4,0x63,0xef,0x8e,0x67,0x95, - 0x6c,0x0f,0xac,0x1f,0xf1,0xf8,0x38,0x60,0x07,0xd2, - 0xe9,0x6d,0x1d,0x5a,0x78,0xcf,0x97,0xd0,0x75,0x42, - 0x3b,0xe6,0x45,0xba,0x69,0xff,0x9f,0x63,0xcc,0xfa, - 0x64,0xf3,0x99,0xfc,0x19,0xb0,0x11,0xed,0x15,0x49, - 0x9c,0x0c,0xec,0x8e,0x7a,0xa3,0xe7,0xe5,0x15,0xe7, - 0xb8,0x85,0x52,0x9d,0x45,0xf9,0x79,0x03,0x00,0xde, - 0xd7,0x5b,0x44,0xa4,0x14,0x14,0x00,0x90,0x32,0x98, - 0x8f,0xc6,0xe7,0x7d,0x47,0x90,0xec,0xd9,0xee,0x3a, - 0xa5,0xff,0x77,0x7b,0x18,0x7f,0x17,0x85,0xad,0x81, - 0x7d,0x53,0x9c,0x4b,0x1c,0x47,0xd3,0x3c,0x28,0x34, - 0xa5,0x4f,0x81,0xdb,0x52,0x9e,0x4b,0xd1,0xcc,0x06, - 0x9c,0x16,0x18,0x73,0x04,0xbe,0x45,0x69,0x2b,0x9e, - 0x0f,0x3c,0xde,0x2c,0xcb,0x26,0xae,0x61,0x81,0xc7, - 0x9f,0x4e,0xe8,0x3a,0x49,0x78,0xc8,0x31,0x66,0x36, - 0x2c,0xab,0x25,0x0b,0x4f,0x03,0xdb,0xd1,0x7a,0xed, - 0x87,0x73,0xb0,0xf7,0x0e,0xc9,0xc7,0x3b,0xf8,0x02, - 0x38,0x0b,0x61,0xc5,0x1c,0xe5,0xfb,0x7a,0xe1,0x3b, - 0x76,0x33,0x06,0xff,0x91,0x0b,0x11,0x91,0x52,0x50, - 0x00,0x40,0xca,0x40,0xe7,0xff,0xd3,0x75,0x58,0x8c, - 0xb1,0xa7,0x61,0x8b,0xc7,0x3c,0xed,0x0b,0x1c,0xec, - 0x1c,0xfb,0x57,0xc2,0x7d,0xe9,0xab,0xe6,0x5c,0xa2, - 0xfb,0x5b,0x3f,0x01,0x9c,0x92,0xe2,0xf5,0x5f,0x27, - 0xba,0x13,0xc0,0xc2,0xf8,0xdb,0x37,0x36,0x33,0xa4, - 0xeb,0x79,0x9a,0x19,0x03,0xbc,0xd0,0xe6,0x35,0x92, - 0x74,0xaf,0x73,0xdc,0x1f,0x52,0x9d,0xc5,0x77,0xfd, - 0x03,0x0b,0xa4,0xc5,0xf5,0x0e,0x70,0x50,0xc2,0x73, - 0x91,0x78,0x3a,0x81,0x17,0x1d,0xe3,0x06,0x93,0x5c, - 0xc6,0x4d,0xd5,0x2c,0x88,0xef,0x7d,0xe8,0x45,0xaa, - 0xd7,0x01,0x48,0x44,0x6a,0x4e,0x01,0x00,0x29,0x03, - 0x75,0x00,0x48,0xd7,0xed,0xc0,0xad,0x31,0xc6,0x1f, - 0x09,0x5c,0x4b,0xf6,0x15,0xa6,0x87,0x02,0x17,0x11, - 0xde,0xdd,0xee,0x36,0x0a,0x38,0x39,0xbd,0xe9,0x14, - 0xd2,0xaf,0x81,0x5f,0x44,0x3c,0x3e,0x1e,0x3b,0x1e, - 0x30,0x29,0xe5,0x79,0x44,0xed,0x0e,0xf7,0x01,0x56, - 0x69,0xf3,0xf9,0xd7,0x20,0xfa,0xf3,0xeb,0x41,0x60, - 0x62,0x9b,0xd7,0x48,0xd2,0xdb,0xf8,0x32,0x6d,0xd6, - 0x01,0x36,0x4e,0x79,0x2e,0x53,0x3a,0x0a,0xb8,0x3e, - 0xe6,0xf7,0x3c,0x88,0xfd,0x6d,0x49,0xbe,0x9e,0x72, - 0x8e,0x5b,0x3a,0xd5,0x59,0x94,0x97,0xa7,0x83,0x0c, - 0xc0,0x93,0xa9,0xce,0x42,0x44,0x24,0x07,0x0a,0x00, - 0x48,0x19,0x64,0x11,0x00,0x98,0x99,0xc6,0x45,0xc5, - 0xc6,0x00,0xcf,0x26,0x78,0x9d,0xa2,0xda,0x15,0x18, - 0x19,0x63,0xfc,0xc6,0xc0,0x4b,0xc0,0xfe,0xc0,0x34, - 0xa9,0xcc,0xe8,0x5b,0x53,0x01,0xdb,0x74,0x5d,0x6f, - 0x87,0x18,0xdf,0x77,0x1c,0xf5,0x6a,0xff,0x37,0x13, - 0xd6,0x93,0x3d,0xca,0xb1,0xc0,0xf0,0x0c,0xe6,0x12, - 0x3a,0x76,0xf1,0xd3,0x36,0x9f,0xff,0x97,0x81,0xc7, - 0xff,0xdd,0xe6,0xf3,0xa7,0xe1,0x72,0xe7,0xb8,0xf3, - 0xf0,0x57,0x27,0x6f,0xd7,0xc2,0xc0,0xb2,0x31,0xbf, - 0x67,0x0b,0xac,0x28,0xa8,0xe4,0xcb,0x1b,0x00,0xf0, - 0x2e,0x74,0xeb,0xc6,0xfb,0x7b,0xaf,0x00,0x80,0x48, - 0x63,0x57,0x61,0xd9,0x31,0x9e,0xaf,0x3e,0x39,0xcd, - 0x51,0x9a,0xa8,0x52,0x00,0xe0,0x6c,0xfc,0xbf,0x88, - 0xfd,0x73,0x9a,0xa3,0xc4,0xd7,0x8b,0xc6,0x1f,0xd4, - 0x9d,0x58,0x2a,0x73,0x52,0x9a,0xa5,0xff,0x3f,0x45, - 0xb1,0x76,0x12,0xd3,0x32,0x02,0xd8,0x2d,0xe6,0xf7, - 0x0c,0xc1,0x52,0xc9,0xdf,0x07,0x2e,0xc1,0x76,0x2f, - 0x93,0xfa,0xdb,0xea,0xc0,0xce,0x8a,0x1f,0x8f,0xa5, - 0x1c,0x5f,0x46,0xb8,0xed,0xdb,0x94,0x1e,0xa5,0x7e, - 0xbb,0xff,0x7f,0xa6,0x71,0xad,0x8c,0x6e,0xcf,0x90, - 0x5d,0xcf,0xf6,0x7f,0x05,0x1e,0xdf,0x8c,0xd6,0x6f, - 0x08,0x06,0x02,0x9b,0x44,0x3c,0xde,0x89,0xbf,0xbb, - 0x45,0x96,0x2e,0xc1,0x0a,0xf0,0x85,0x4c,0x8f,0x05, - 0x50,0x66,0x49,0x77,0x3a,0xfc,0x02,0xab,0x4d,0x30, - 0x4f,0x0b,0xdf,0x7b,0x10,0x76,0xd4,0x24,0xd4,0x26, - 0x50,0xd2,0xe3,0x0d,0x80,0xaf,0x94,0xea,0x2c,0xca, - 0xab,0x59,0xc6,0x5f,0x4f,0x49,0xde,0x67,0x88,0x88, - 0x14,0x82,0x22,0x32,0x52,0x74,0x8b,0x61,0xe7,0x18, - 0x7b,0x7a,0x99,0x78,0x3b,0xd6,0x21,0xcd,0x6e,0x06, - 0xaa,0x7e,0xfe,0x7f,0x4a,0x57,0x62,0x8b,0x6e,0xef, - 0xf9,0xfa,0x6e,0x03,0xb1,0x82,0x62,0xdb,0x61,0x29, - 0xe6,0x8f,0x63,0x0b,0x8b,0xd7,0xb1,0xc5,0xfb,0x08, - 0x6c,0x17,0xbf,0x99,0xd9,0xb1,0xd6,0x70,0x73,0x61, - 0x8b,0x91,0x95,0x80,0xd5,0x81,0x19,0x62,0xce,0xa3, - 0xdb,0xfb,0xd8,0x02,0x31,0xed,0x34,0xf7,0x22,0xd9, - 0x84,0xe8,0x45,0xf1,0x44,0x2c,0xf5,0x3f,0xab,0x7a, - 0x08,0xaf,0x63,0xbf,0x03,0xcd,0x52,0xfd,0x67,0x03, - 0x36,0x05,0xfe,0xde,0xc2,0x73,0xef,0x44,0x74,0x8d, - 0x83,0x7b,0x80,0x37,0x5b,0x78,0xde,0xb4,0x8d,0xc6, - 0x82,0x52,0x9e,0x20,0xcc,0xc2,0xd8,0xdf,0xd1,0xd6, - 0xf8,0xeb,0x07,0x78,0x4d,0x0f,0x9c,0x00,0xec,0xdc, - 0xe6,0xf3,0xfc,0x06,0x58,0x14,0xd8,0x0a,0x78,0xaf, - 0xdd,0x49,0x49,0x6c,0xcf,0x00,0x5f,0x13,0xdd,0xea, - 0x13,0xec,0xfd,0xb4,0x0f,0xf5,0x08,0x64,0x7b,0xf5, - 0xc5,0xd7,0x76,0x73,0x24,0xf5,0xc8,0x00,0x94,0xf8, - 0x6e,0x20,0xba,0x9d,0xaa,0x7e,0x6f,0xa4,0xd0,0x14, - 0x00,0x90,0xa2,0x53,0x01,0xc0,0x6c,0x1d,0x82,0xdd, - 0x50,0xee,0xd9,0xe2,0xf7,0xf7,0x05,0x56,0xed,0xfa, - 0xf2,0xe8,0x0d,0xbc,0xdb,0xe2,0xb5,0x1a,0xf9,0x0c, - 0x4b,0x2f,0x4f,0xf2,0x39,0x8b,0x6e,0x7a,0x2c,0x03, - 0x2a,0xca,0x09,0xd8,0x82,0x21,0x4b,0xe7,0x13,0x7d, - 0xd6,0xff,0x38,0xe0,0x26,0x6c,0x61,0xec,0x35,0x23, - 0xe1,0xa2,0x95,0xa1,0xd7,0x22,0x4f,0xa7,0x61,0xc7, - 0x59,0x3c,0x9d,0x10,0xe6,0x00,0xee,0xc2,0x7e,0x76, - 0x27,0xd1,0x7e,0xc0,0x73,0x1a,0xec,0xa8,0xcf,0x1f, - 0xb0,0x7a,0x1a,0x49,0x58,0x13,0x2b,0xb6,0x78,0x24, - 0xd6,0x19,0x60,0x7c,0x42,0xcf,0x2b,0x61,0x93,0x80, - 0x07,0x80,0x0d,0x02,0xe3,0x06,0x61,0x59,0x74,0xde, - 0x6e,0x2f,0x75,0xb0,0x22,0xbe,0x6c,0xb5,0x07,0xa8, - 0x57,0x20,0x59,0xfc,0x9e,0x44,0xc7,0x43,0xa4,0xc4, - 0xaa,0x74,0x04,0x40,0xaa,0x29,0x8b,0x00,0x40,0x47, - 0xc4,0x75,0xaa,0x5e,0x00,0xb0,0x91,0xbd,0xb0,0xe2, - 0x60,0x65,0xab,0x7c,0xfc,0x1e,0x56,0x1c,0x2e,0xeb, - 0x85,0x6e,0xde,0xce,0x22,0xfa,0x78,0xc4,0x70,0xec, - 0xec,0x7f,0xd6,0xae,0xc4,0x8a,0xdf,0x35,0x33,0x2f, - 0x56,0xd4,0xd1,0xfb,0x39,0xd4,0x0f,0xcb,0x18,0x88, - 0xca,0x0c,0x19,0x8e,0xed,0xcc,0x14,0xd5,0x04,0x60, - 0x5b,0x60,0xac,0x73,0x7c,0x2f,0x2c,0x28,0xf7,0x0e, - 0x16,0x3c,0xf0,0xb4,0x2d,0xeb,0xf9,0xfd,0x6b,0x60, - 0xe9,0xfa,0xef,0x00,0x7f,0x24,0xb9,0xc5,0x7f,0xb7, - 0x69,0x80,0xd3,0xb1,0xdd,0xb0,0xa3,0xb0,0xf6,0x8c, - 0xcd,0x5a,0xcf,0x75,0x00,0xf3,0x63,0xd9,0x28,0xf3, - 0x27,0x3c,0x8f,0x3a,0xba,0xc7,0x39,0x6e,0xed,0x34, - 0x27,0x51,0x42,0x6b,0x3a,0xc7,0x25,0x9d,0x7d,0x23, - 0x22,0x52,0x08,0x1d,0x9d,0x9d,0x65,0xbb,0xc7,0x6f, - 0xea,0x6c,0x60,0x77,0xe7,0xd8,0x01,0xf8,0x6f,0xc0, - 0x24,0x5f,0x8f,0xd3,0xb8,0xdf,0xfb,0xca,0x24,0xb7, - 0x3b,0xbf,0x30,0x8d,0x7b,0xa2,0xbf,0x8f,0xa5,0xa7, - 0xd7,0xd5,0xaf,0xb0,0x05,0xda,0x74,0x79,0x4f,0xc4, - 0xe1,0x4e,0x2c,0x15,0xf9,0xa3,0xbc,0x27,0x92,0xb1, - 0x9f,0x63,0xbb,0xe8,0xcd,0x4c,0xc2,0x52,0x80,0xf3, - 0x3a,0xc7,0xba,0x2d,0x70,0x69,0x60,0xcc,0xf5,0x58, - 0x5a,0x7f,0x54,0xeb,0xc0,0x59,0x80,0xbf,0x61,0x75, - 0x26,0xa2,0xac,0x8f,0x75,0xb5,0x28,0xba,0xad,0xf1, - 0x17,0x05,0xec,0xe9,0x5d,0x6c,0x67,0xf2,0x51,0xe0, - 0x43,0xec,0x75,0xfb,0x1c,0x4b,0xf1,0x1e,0x8c,0x1d, - 0xaf,0x58,0x08,0x7b,0xdf,0x5c,0x9d,0xd6,0x16,0xfc, - 0x9f,0x62,0x05,0x34,0x17,0x6b,0x71,0x8e,0xa3,0x80, - 0x57,0x80,0x2f,0xb1,0x40,0xe2,0x00,0x2c,0x70,0x33, - 0x07,0xdf,0xb6,0x5e,0x5b,0x1b,0xff,0x02,0x56,0x1a, - 0x5b,0x0a,0x5f,0xaa,0xf1,0xbd,0xc0,0x5a,0xe9,0x4e, - 0xa5,0x54,0x1e,0xc4,0xd7,0x89,0x64,0x18,0xf0,0x5c, - 0xca,0x73,0x11,0x29,0xab,0xab,0x80,0xcd,0x9d,0x63, - 0xa7,0x42,0xc7,0x90,0x0a,0x45,0x47,0x00,0xa4,0xc8, - 0xfa,0x62,0x37,0x38,0x3d,0x4d,0x24,0xd9,0x5d,0x5e, - 0xa5,0xff,0x37,0x76,0x23,0xf6,0x1a,0x9c,0x4d,0xb6, - 0xad,0xc9,0xe2,0x18,0x09,0x1c,0x0e,0xfc,0x09,0x98, - 0x9c,0xf3,0x5c,0xb2,0x36,0x2d,0xf0,0x97,0xc0,0x98, - 0x53,0xc8,0xb7,0x88,0xd5,0x65,0xc0,0xff,0x11,0xbd, - 0x70,0xdf,0x08,0x5b,0x0c,0x5e,0x80,0x15,0x0f,0x7c, - 0x91,0x6f,0xcf,0x36,0x2f,0x8e,0x55,0xfc,0xdf,0x89, - 0xf0,0x59,0xe7,0x2b,0x28,0xc7,0xe2,0x1f,0x6c,0xae, - 0x43,0xb0,0xbf,0xad,0x66,0xbb,0xe5,0xcd,0xcc,0x81, - 0x55,0xe2,0xdf,0x22,0xe9,0x49,0x75,0x79,0x12,0xfb, - 0x99,0x8c,0xc1,0x16,0xe8,0xad,0x04,0x01,0x06,0x13, - 0xbf,0xbb,0x80,0xc4,0xf7,0x1c,0x56,0x63,0xa5,0x51, - 0x07,0x9b,0x29,0xad,0x8a,0xfd,0xbe,0x25,0x59,0x37, - 0xa7,0xac,0xa6,0xc3,0x57,0x18,0x71,0x04,0x5a,0xfc, - 0x8b,0x48,0x45,0xe9,0x08,0x80,0x14,0xd9,0x30,0x2c, - 0x08,0xd0,0xd3,0xf3,0x24,0x9b,0xc1,0xd1,0xac,0x00, - 0x60,0x1d,0xd3,0xff,0x7b,0xfa,0x10,0x2b,0x2e,0xb7, - 0x1a,0xc5,0x4a,0x87,0x1c,0x8b,0x55,0xbd,0x5f,0x18, - 0x38,0x93,0xfa,0x2d,0xfe,0xc1,0x52,0xc2,0x67,0x8b, - 0x78,0xfc,0x7f,0xd8,0xd9,0xec,0xbc,0x6d,0x03,0x7c, - 0x10,0x18,0x33,0x14,0x38,0x00,0xfb,0x1d,0xfb,0x04, - 0xfb,0xf9,0x7e,0x82,0x2d,0x40,0xf7,0x25,0xbc,0xf8, - 0x7f,0x91,0xf8,0x5d,0x2c,0xf2,0x76,0x0e,0xf1,0x8e, - 0x03,0xa4,0x6d,0x32,0x96,0xca,0xbf,0x1a,0xb6,0xf8, - 0xf9,0x04,0x0b,0xdc,0xa8,0x0a,0x7a,0xb1,0xdd,0xec, - 0x18,0xd3,0x07,0xcb,0x8e,0x11,0xf8,0x31,0xbe,0x7b, - 0x5f,0xcf,0xeb,0x2a,0x22,0x52,0x4a,0x0a,0x00,0x48, - 0x91,0xa9,0x00,0x60,0x71,0x3c,0x88,0xa5,0x90,0x2e, - 0x07,0x5c,0x0c,0x7c,0x95,0xd3,0x3c,0x5e,0xc7,0x76, - 0xfc,0xe7,0x01,0xf6,0xc0,0x02,0x14,0x75,0xb4,0x3e, - 0x76,0x8e,0xba,0x99,0xc9,0xc0,0x0e,0x14,0x63,0x71, - 0xf9,0x3e,0xb6,0x8b,0xff,0x65,0x4a,0xcf,0x3f,0x02, - 0xf8,0x19,0x96,0x76,0x5e,0x36,0x57,0x60,0xa9,0xc8, - 0xaf,0xe4,0x3c,0x8f,0xe7,0xba,0xe6,0xb1,0x1f,0xdf, - 0xfd,0x9d,0xf9,0x08,0x3b,0x2f,0xfd,0x8f,0x3c,0x26, - 0x25,0x2e,0xd7,0x39,0xc7,0x6d,0x9a,0xea,0x2c,0xca, - 0x63,0x33,0xe7,0xb8,0xeb,0x53,0x9d,0x85,0x88,0x48, - 0x8e,0x14,0x00,0x90,0x22,0xcb,0x22,0x00,0xd0,0x0f, - 0xcb,0x34,0xe8,0x69,0x12,0xda,0xf9,0x6a,0xe4,0x29, - 0x60,0x47,0x60,0x26,0xec,0xfc,0xf9,0x39,0x34,0xae, - 0x9f,0x90,0x94,0x89,0x58,0xf5,0xea,0x63,0xb0,0xba, - 0x0f,0x0b,0x74,0xfd,0xff,0x75,0x3b,0xeb,0x3f,0xa5, - 0xa9,0xb1,0x0a,0xfb,0x51,0xce,0x00,0x1e,0xce,0x60, - 0x2e,0x5e,0x8f,0x63,0xbb,0xc9,0x49,0xb7,0x8b,0x7b, - 0x1e,0x2b,0x72,0x57,0xc4,0xb6,0x7f,0x5e,0x4f,0x63, - 0x47,0x9d,0x8e,0x04,0xbe,0xc9,0xf8,0xda,0x6f,0x62, - 0x59,0x08,0xcb,0xd0,0x3c,0xe3,0xe9,0x1b,0xec,0x9c, - 0xe7,0xf6,0xe4,0x17,0xf8,0x93,0xe6,0xee,0xc5,0xf7, - 0x77,0xf5,0x53,0xac,0x23,0x40,0x9d,0x4d,0x83,0x65, - 0x00,0x84,0xbc,0x87,0xea,0x53,0x88,0x24,0x49,0xdd, - 0x34,0x0a,0x46,0x35,0x00,0xa4,0xc8,0xb2,0x08,0x00, - 0x2c,0x4d,0xf3,0x63,0x06,0x59,0xdf,0x8c,0x97,0xc9, - 0x78,0xe0,0x96,0xae,0x2f,0xb0,0x56,0x74,0xc3,0xb0, - 0x85,0xcc,0x82,0xc0,0xdc,0xc0,0x9c,0xd8,0x79,0xcb, - 0xa1,0x44,0xdf,0x78,0x8e,0xc1,0x8a,0x8e,0x7d,0x8a, - 0x55,0x2a,0x7f,0x1d,0x78,0x15,0xab,0xf3,0xf0,0x34, - 0xc5,0xd8,0xc5,0x2e,0x92,0x93,0x89,0x3e,0xf3,0xfb, - 0x1a,0x70,0x68,0x46,0x73,0x89,0xe3,0x69,0xec,0xef, - 0xed,0x3c,0xec,0x8c,0x79,0x3b,0x26,0x61,0xf5,0x0f, - 0x7e,0x8f,0xfd,0xfe,0x94,0xdd,0x38,0xac,0x82,0xfe, - 0x39,0xd8,0x2e,0xfc,0x2e,0xa4,0x5b,0x7c,0xf3,0x5e, - 0xec,0x08,0xcd,0x0d,0xf8,0x0b,0x33,0xfd,0x15,0xb8, - 0x0d,0x6b,0xc3,0xb8,0x13,0x56,0xd4,0x49,0xf2,0x37, - 0x19,0xeb,0x8e,0xf1,0xbb,0xc0,0xb8,0x81,0x58,0x26, - 0xce,0x95,0xa9,0xcf,0xa8,0xb8,0x7e,0x85,0x05,0xfd, - 0x43,0xfe,0x4e,0x3d,0x8f,0x95,0x89,0xa4,0x61,0x22, - 0xe5,0xeb,0x2a,0x55,0x79,0xea,0x02,0x20,0x45,0x35, - 0x18,0xdb,0x6d,0xea,0x99,0xa5,0x32,0x06,0x2b,0x66, - 0x94,0x54,0x35,0xd1,0x3d,0xb1,0x36,0x6a,0x3d,0xfd, - 0x85,0xf2,0x9d,0x29,0x2e,0xb2,0x27,0xb0,0xe3,0x03, - 0x3d,0x4d,0x42,0x81,0xc8,0x38,0xd6,0xc6,0x3a,0x1e, - 0x34,0x2b,0x1c,0xd7,0x89,0xa5,0x6c,0xdf,0x9f,0xd9, - 0x8c,0x5a,0xb3,0x3a,0x70,0x20,0xd6,0xc3,0x3c,0x4e, - 0x26,0xda,0x38,0xe0,0x5a,0xe0,0x44,0xac,0xe5,0x5f, - 0x55,0xf5,0x05,0x7e,0x82,0xa5,0x6d,0xaf,0x4b,0x74, - 0x9b,0x47,0x8f,0xc9,0x58,0x26,0xcd,0x0d,0x58,0x6a, - 0xf3,0x6b,0x6d,0x3e,0xdf,0x9c,0xc0,0xce,0xc0,0x76, - 0x5d,0xff,0x7f,0x5c,0x13,0xb0,0xc2,0x74,0x49,0x1f, - 0xe7,0xaa,0xab,0xc5,0xf1,0xfd,0x3d,0xfc,0x17,0xf8, - 0x51,0xca,0x73,0x29,0xb2,0x7b,0xf0,0xb5,0x00,0x5c, - 0x92,0x6a,0xbf,0xbf,0x88,0x24,0xc1,0xdb,0x05,0x60, - 0x34,0x76,0x4f,0x2f,0x05,0x52,0xa5,0x00,0x80,0x88, - 0x14,0x97,0x02,0x00,0xd2,0xc8,0xec,0xd8,0x82,0x64, - 0x0d,0x60,0x51,0xac,0xb6,0xc3,0x10,0x6c,0x97,0x6e, - 0x0c,0x56,0x37,0xe0,0x75,0xac,0xc8,0xdf,0xdd,0xd8, - 0x02,0x26,0xaa,0x5d,0x60,0x55,0x2d,0x8e,0xa5,0xe9, - 0x2f,0x89,0x1d,0x83,0x99,0x1d,0x98,0x15,0x7b,0xad, - 0xfa,0x63,0x01,0x83,0x09,0xd8,0x8d,0xd6,0x48,0x2c, - 0x93,0xe6,0x4d,0xe0,0x65,0x2c,0xb5,0xff,0x31,0xac, - 0xb3,0x42,0xd2,0x3a,0xb0,0xac,0x9f,0x75,0xbb,0xe6, - 0xb7,0x08,0xd6,0xa5,0x60,0x6a,0x2c,0xd0,0x3e,0x01, - 0xcb,0xa4,0xfa,0xa8,0x6b,0x4e,0xcf,0x77,0xcd,0xe7, - 0x36,0x74,0x9c,0x20,0x69,0xf7,0x61,0x81,0xb5,0x28, - 0x9d,0xc0,0xfc,0x94,0xfb,0xc8,0x4c,0xab,0x9a,0xb5, - 0xfb,0xed,0xe9,0x7e,0xec,0xfd,0x48,0x44,0xe2,0x7b, - 0x03,0x98,0xb7,0xc7,0x7f,0xab,0x7b,0x4b,0xed,0x42, - 0xd2,0x8d,0xb7,0x88,0x88,0xe4,0xe5,0x3d,0xe0,0x92, - 0xae,0x2f,0x69,0xee,0x85,0xae,0xaf,0xa2,0xe9,0xc4, - 0xfa,0xd0,0x7b,0x7a,0xd1,0x4b,0xba,0xce,0x21,0x1c, - 0x00,0xe8,0xc0,0x8e,0x6f,0x1c,0x92,0xfe,0x74,0x0a, - 0x67,0x17,0xe7,0xb8,0xb3,0x53,0x9d,0x85,0x48,0xb5, - 0x35,0xea,0xd8,0xf3,0x69,0xe6,0xb3,0x90,0x20,0x15, - 0x01,0x14,0x11,0x11,0x11,0x29,0xb7,0xeb,0xb0,0x9d, - 0xb6,0x90,0x9d,0xb1,0xac,0x91,0x3a,0x19,0x84,0x1d, - 0x57,0x09,0x79,0x0f,0x55,0xff,0x17,0x69,0xd5,0x40, - 0x60,0x86,0x06,0xff,0xbd,0xae,0xdd,0x9a,0x0a,0x4d, - 0x01,0x00,0x11,0x11,0x11,0x91,0x72,0x9b,0x00,0x9c, - 0xea,0x18,0x37,0x23,0xbe,0xc5,0x70,0x95,0xec,0x8c, - 0xaf,0xa8,0xe6,0x29,0x24,0x57,0x5f,0x48,0xa4,0x6e, - 0x16,0x6e,0xf2,0xdf,0xdb,0xad,0x39,0x23,0x29,0x50, - 0x00,0x40,0x44,0x44,0x44,0xa4,0xfc,0xce,0x03,0x3e, - 0x73,0x8c,0xdb,0x9f,0xfa,0xdc,0xff,0xf5,0x01,0xf6, - 0x75,0x8c,0xfb,0x94,0x70,0x7b,0x55,0x11,0x69,0x6e, - 0xd5,0x26,0xff,0xfd,0x95,0x4c,0x67,0x21,0x2e,0x75, - 0xf9,0x00,0x10,0x11,0x11,0x11,0xa9,0xb2,0xd1,0xc0, - 0xe9,0x8e,0x71,0x0b,0x00,0x5b,0xa4,0x3c,0x97,0xa2, - 0xd8,0x9a,0xe8,0xb6,0xa9,0xdd,0x4e,0x43,0xad,0x7f, - 0x45,0xda,0xb1,0x6e,0x93,0xff,0xae,0x6e,0x2f,0x05, - 0xa4,0x2e,0x00,0x22,0x92,0x05,0x75,0x01,0x10,0x11, - 0x49,0xdf,0x20,0xac,0x73,0x46,0xa8,0x75,0xe4,0x6b, - 0x58,0xe7,0x8d,0x2a,0xa7,0xbc,0xf7,0xc5,0x76,0x1f, - 0xe7,0x0e,0x8c,0xfb,0x00,0x0b,0x8a,0x28,0x00,0x20, - 0xd2,0x9a,0x41,0xc0,0x27,0x58,0xf7,0x97,0x29,0x8d, - 0x05,0xa6,0xc5,0x5a,0xf8,0x4a,0x81,0x28,0x03,0x40, - 0x44,0x44,0x44,0xa4,0x1a,0x46,0x03,0x47,0x3b,0xc6, - 0x2d,0x40,0xf5,0x6b,0x01,0xec,0x4c,0x78,0xf1,0x0f, - 0x70,0x24,0x5a,0xfc,0x8b,0xb4,0x63,0x73,0xbe,0xbf, - 0xf8,0x07,0xb8,0x13,0x2d,0xfe,0x0b,0x49,0x19,0x00, - 0x22,0x22,0x22,0x22,0xd5,0xd1,0x07,0x6b,0x1b,0xb9, - 0x50,0x60,0xdc,0x7b,0x58,0xe1,0xae,0xd1,0xa9,0xcf, - 0x28,0x7b,0x53,0x63,0xbb,0xff,0xb3,0x04,0xc6,0xbd, - 0x04,0x2c,0x89,0x65,0xa3,0x89,0x48,0x6b,0x9a,0x65, - 0x79,0xee,0x08,0x5c,0x9c,0xf1,0x5c,0xc4,0x41,0x19, - 0x00,0x22,0x22,0x22,0x22,0xd5,0x31,0x11,0xd8,0xc3, - 0x31,0x6e,0x76,0xe0,0xa0,0x94,0xe7,0x92,0x97,0xc3, - 0x08,0x2f,0xfe,0xc1,0x5e,0x27,0x2d,0xfe,0x45,0x5a, - 0xf7,0x63,0x1a,0x2f,0xfe,0x47,0x03,0xd7,0x64,0x3c, - 0x17,0x71,0x52,0x06,0x80,0x88,0x88,0x88,0x48,0xf5, - 0xfc,0x03,0xd8,0x34,0x30,0x66,0x2c,0xb0,0x18,0xf0, - 0x66,0xfa,0xd3,0xc9,0xcc,0x82,0xc0,0x70,0xac,0x06, - 0x40,0x94,0xab,0xa9,0x4f,0x31,0x44,0x91,0x34,0x74, - 0x00,0x8f,0x00,0x2b,0x36,0x78,0xec,0x7c,0x60,0xd7, - 0x6c,0xa7,0x23,0x5e,0x0a,0x00,0x88,0x88,0x88,0x88, - 0x54,0xcf,0xec,0xc0,0x8b,0xc0,0x90,0xc0,0xb8,0x7f, - 0x01,0x3f,0x4b,0x7f,0x3a,0x99,0xb9,0x15,0x58,0x3f, - 0x30,0x66,0x24,0x56,0x04,0xf1,0xfd,0xf4,0xa7,0x23, - 0x52,0x59,0xdb,0x00,0x97,0x35,0xf8,0xef,0x93,0xb0, - 0xe3,0x45,0xaf,0x67,0x3b,0x1d,0xf1,0xd2,0x11,0x00, - 0x11,0x11,0x11,0x91,0xea,0x79,0x0f,0xf8,0x9d,0x63, - 0xdc,0x4f,0x81,0x2d,0x53,0x9e,0x4b,0x56,0xfe,0x8f, - 0xf0,0xe2,0x1f,0x60,0x3f,0xb4,0xf8,0x17,0x69,0xc7, - 0x50,0xe0,0xa4,0x26,0x8f,0x5d,0x8a,0x16,0xff,0x85, - 0xa6,0x0c,0x00,0x11,0x11,0x11,0x91,0xea,0xba,0x0d, - 0xf8,0x51,0x60,0xcc,0x27,0xd8,0x51,0x80,0x4f,0xd3, - 0x9f,0x4e,0x6a,0x66,0xc6,0x32,0x1e,0xa6,0x0b,0x8c, - 0xfb,0x0f,0xf0,0x93,0xf4,0xa7,0x23,0x52,0x69,0x97, - 0x03,0x5b,0x37,0xf8,0xef,0xa3,0xb0,0x02,0xa4,0x1f, - 0x64,0x3b,0x1d,0x89,0x43,0x01,0x00,0x11,0x11,0x11, - 0x91,0xea,0x9a,0x13,0x78,0x16,0xdb,0xb1,0x8b,0x72, - 0x0d,0xb0,0x59,0xfa,0xd3,0x49,0xcd,0x0d,0xc0,0xaf, - 0x02,0x63,0xbe,0xc0,0xaa,0xfe,0xbf,0x97,0xfe,0x74, - 0x44,0x44,0x8a,0x49,0x47,0x00,0x44,0x44,0x44,0x44, - 0xaa,0xeb,0x1d,0x60,0x27,0xc7,0xb8,0x4d,0x81,0xed, - 0xd2,0x9d,0x4a,0x6a,0x76,0x21,0xbc,0xf8,0x07,0xd8, - 0x1e,0x2d,0xfe,0x45,0xa4,0xe6,0x94,0x01,0x20,0x22, - 0x22,0x22,0x52,0x7d,0x67,0x03,0xbb,0x07,0xc6,0x8c, - 0x02,0x96,0xa6,0x5c,0xe7,0x77,0x17,0x06,0x9e,0x02, - 0x06,0x06,0xc6,0x9d,0x05,0xec,0x9d,0xfe,0x74,0x44, - 0x44,0x8a,0x4d,0x01,0x00,0x11,0x11,0x11,0x91,0xea, - 0xeb,0x07,0x3c,0x00,0x2c,0x1f,0x18,0xf7,0x24,0xb0, - 0x1a,0xd6,0x22,0xb0,0xe8,0x06,0x00,0x0f,0x61,0x41, - 0x8b,0x28,0x8f,0x01,0xab,0x03,0xe3,0x53,0x9f,0x91, - 0x88,0x48,0xc1,0xe9,0x08,0x80,0x88,0x88,0x88,0x48, - 0xf5,0x8d,0x03,0x36,0x04,0x3e,0x0a,0x8c,0x5b,0x0e, - 0xcb,0x16,0x28,0x83,0x73,0x09,0x2f,0xfe,0x3f,0x04, - 0x36,0x42,0x8b,0x7f,0x11,0x11,0x40,0x01,0x00,0x11, - 0x11,0x11,0x91,0xba,0x78,0x17,0xd8,0x04,0x98,0x10, - 0x18,0xb7,0x23,0xb0,0x73,0xfa,0xd3,0x69,0xcb,0x6f, - 0xb0,0xb6,0x7f,0x51,0xc6,0x03,0x1b,0xa3,0x73,0xff, - 0x22,0x22,0xff,0x9f,0x8e,0x00,0x88,0x88,0x88,0x88, - 0xd4,0xcb,0xf6,0xc0,0xc5,0x81,0x31,0xe3,0x80,0xf5, - 0xb0,0x63,0x03,0x45,0xb3,0x3a,0x70,0x07,0xd0,0x37, - 0x30,0x6e,0x3b,0xac,0x27,0xb9,0x88,0x88,0x74,0x51, - 0x06,0x80,0x88,0x88,0x88,0x48,0xbd,0x5c,0x02,0x1c, - 0x15,0x18,0xd3,0x0f,0x6b,0xad,0x37,0x7f,0xfa,0xd3, - 0x89,0x65,0x01,0x6c,0x5e,0xa1,0xc5,0xff,0xe1,0x68, - 0xf1,0x2f,0x22,0xf2,0x3d,0xca,0x00,0x10,0x11,0x11, - 0x11,0xa9,0xa7,0x8b,0x80,0x1d,0x02,0x63,0x5e,0x06, - 0x56,0x06,0xbe,0x48,0x7f,0x3a,0x41,0x43,0x81,0x47, - 0x80,0x85,0x02,0xe3,0x2e,0xc2,0xd7,0xfa,0x50,0x44, - 0xa4,0x76,0x14,0x00,0x10,0x11,0x11,0x11,0x11,0x11, - 0x11,0xa9,0x01,0x1d,0x01,0x10,0x11,0x11,0x11,0x11, - 0x11,0x11,0xa9,0x01,0x05,0x00,0x44,0x44,0x44,0x44, - 0x44,0x44,0x44,0x6a,0x40,0x01,0x00,0x11,0x11,0x11, - 0x11,0x11,0x11,0x91,0x1a,0x50,0x00,0x40,0x44,0x44, - 0x44,0x44,0x44,0x44,0xa4,0x06,0x14,0x00,0x10,0x11, - 0x11,0x11,0x11,0x11,0x11,0xa9,0x01,0x05,0x00,0x44, - 0x44,0x44,0x44,0x44,0x44,0x44,0x6a,0x40,0x01,0x00, - 0x11,0x11,0x11,0x11,0x11,0x11,0x91,0x1a,0x50,0x00, - 0x40,0x44,0x44,0x44,0x44,0x44,0x44,0xa4,0x06,0x14, - 0x00,0x10,0x11,0x11,0x11,0x11,0x11,0x11,0xa9,0x01, - 0x05,0x00,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x6a, - 0x40,0x01,0x00,0x11,0x11,0x11,0x11,0x11,0x11,0x91, - 0x1a,0x50,0x00,0x40,0x44,0x44,0x44,0x44,0x44,0x44, - 0xa4,0x06,0x14,0x00,0x10,0x11,0x11,0x11,0x11,0x11, - 0x11,0xa9,0x01,0x05,0x00,0x44,0x44,0x44,0x44,0x44, - 0x44,0x44,0x6a,0x40,0x01,0x00,0x11,0x11,0x11,0x11, - 0x11,0x11,0x91,0x1a,0x50,0x00,0x40,0x44,0x44,0x44, - 0x44,0x44,0x44,0xa4,0x06,0x14,0x00,0x10,0x11,0x11, - 0x11,0x11,0x11,0x11,0xa9,0x01,0x05,0x00,0x44,0x44, - 0x44,0x44,0x44,0x44,0x44,0x6a,0x40,0x01,0x00,0x11, - 0x11,0x11,0x11,0x11,0x11,0x91,0x1a,0x50,0x00,0x40, - 0x44,0x44,0x44,0x44,0x44,0x44,0xa4,0x06,0x14,0x00, - 0x10,0x11,0x11,0x11,0x11,0x11,0x11,0xa9,0x01,0x05, - 0x00,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x6a,0x40, - 0x01,0x00,0x11,0x11,0x11,0x11,0x11,0x11,0x91,0x1a, - 0x50,0x00,0x40,0x44,0x44,0x44,0x44,0x44,0x44,0xa4, - 0x06,0x14,0x00,0x10,0x11,0x11,0x11,0x11,0x11,0x11, - 0xa9,0x01,0x05,0x00,0x44,0x44,0x44,0x44,0x44,0x44, - 0x44,0x6a,0x40,0x01,0x00,0x11,0x11,0x11,0x11,0x11, - 0x11,0x91,0x1a,0x50,0x00,0x40,0x44,0x44,0x44,0x44, - 0x44,0x44,0xa4,0x06,0x14,0x00,0x48,0xd6,0xdd,0x40, - 0x67,0xc4,0xd7,0xeb,0xf9,0x4d,0x4d,0x44,0x44,0x44, - 0x44,0x44,0x44,0xea,0x4c,0x01,0x80,0xe4,0x0c,0x02, - 0x56,0x09,0x8c,0xb9,0x3d,0x8b,0x89,0x88,0x88,0x88, - 0x88,0x88,0x88,0x88,0xf4,0xa4,0x00,0x40,0x72,0xd6, - 0x02,0xfa,0x06,0xc6,0xfc,0x37,0x83,0x79,0x88,0x88, - 0x88,0x88,0x88,0x88,0x88,0x7c,0x4f,0x9f,0xbc,0x27, - 0x50,0x21,0x3f,0x0a,0x3c,0x3e,0x09,0xb8,0x2b,0x8b, - 0x89,0x64,0x6c,0x3a,0x60,0x6d,0x60,0x49,0x60,0x21, - 0x60,0x41,0x60,0x46,0x2c,0x23,0x62,0x30,0xf6,0x3b, - 0x36,0xaa,0xeb,0xeb,0x4b,0xe0,0x55,0xe0,0x65,0xe0, - 0x05,0xec,0xf5,0x78,0x3f,0xfb,0x29,0x4b,0x8d,0x2c, - 0x0c,0xac,0x00,0x0c,0xeb,0xfa,0xff,0x67,0x07,0x66, - 0xc5,0x7e,0x3f,0x07,0x60,0x41,0xd0,0x71,0xc0,0x58, - 0xe0,0x73,0xe0,0x03,0xec,0x77,0xf2,0x25,0x60,0x38, - 0xf0,0x38,0x30,0x22,0xf3,0x59,0x17,0xdb,0xb4,0xc0, - 0xca,0xd8,0x6b,0xba,0x04,0x30,0x27,0x30,0x1b,0xf6, - 0x5e,0x30,0x00,0xe8,0x07,0x4c,0xc4,0x5e,0xd3,0xd1, - 0xc0,0x47,0xc0,0x87,0xc0,0x9b,0xd8,0xdf,0xfd,0x73, - 0xc0,0x63,0xd8,0xeb,0x2e,0x22,0xd5,0xd4,0x0b,0x7b, - 0xef,0xfd,0x01,0xb0,0x78,0xd7,0xd7,0x2c,0xc0,0x10, - 0x60,0xea,0xae,0xc7,0xbf,0xc2,0xee,0x0b,0xbe,0xc2, - 0xde,0x7b,0x9f,0x06,0x9e,0x02,0x9e,0x04,0xde,0xcd, - 0x7e,0xca,0x52,0x33,0xdd,0x9f,0x65,0x4b,0xf1,0xed, - 0x67,0xd9,0xac,0xc0,0xf4,0x7c,0xfb,0x59,0x36,0x19, - 0xfb,0x2c,0xfb,0x06,0xf8,0x18,0xfb,0x2c,0x7b,0x1b, - 0xbb,0x3f,0x78,0x0e,0x78,0xb4,0xeb,0x31,0xf9,0xd6, - 0x40,0x60,0x39,0xec,0xef,0x7f,0x09,0x60,0x2e,0xec, - 0xb5,0x1d,0x8a,0xbd,0xae,0x03,0x80,0xf1,0xd8,0xba, - 0xe0,0x6b,0xe0,0x1d,0xe0,0x7f,0x5d,0x5f,0xf7,0x63, - 0xef,0x01,0x9d,0x99,0xcf,0xba,0x66,0x3a,0x3a,0x3b, - 0xf5,0x1a,0x27,0xe4,0x25,0x60,0x91,0x88,0xc7,0x1f, - 0x05,0x56,0xca,0x68,0x2e,0x69,0x9b,0x0d,0xd8,0x01, - 0xf8,0x15,0xb0,0x0c,0xed,0x65,0x92,0x0c,0x07,0x6e, - 0x02,0xce,0xc7,0xde,0x54,0xe5,0x5b,0x73,0x01,0x97, - 0x01,0x6b,0x06,0xc6,0x7d,0x06,0xcc,0x90,0xfe,0x74, - 0x4a,0xa1,0x03,0x7b,0xbd,0xb6,0x02,0x7e,0x0c,0xcc, - 0x91,0xc0,0x73,0xbe,0x06,0xdc,0x06,0x5c,0x09,0x3c, - 0x94,0xc0,0xf3,0x95,0xd1,0x3c,0xc0,0xaf,0xb1,0xbf, - 0xf9,0xe5,0x68,0x3f,0x7b,0x6c,0x2c,0xf0,0x30,0x70, - 0x03,0x70,0x35,0x76,0x63,0x25,0xc9,0xf8,0x07,0xb0, - 0xa9,0x63,0xdc,0x68,0x2c,0x48,0x5b,0x76,0x0f,0x00, - 0xab,0xe6,0x3d,0x09,0xa7,0xd7,0x81,0x05,0xf2,0x9e, - 0x44,0xca,0xd6,0xc0,0xee,0x0f,0x36,0x00,0x66,0x6a, - 0xe3,0x79,0x86,0x63,0x9f,0x7f,0x7f,0xa3,0xdc,0x1b, - 0x05,0x3f,0x06,0xfe,0x93,0xf7,0x24,0x12,0xb2,0x33, - 0x70,0x61,0xde,0x93,0x68,0xd3,0xbc,0xd8,0xfd,0xc1, - 0x2f,0x48,0xe6,0xb3,0x6c,0x02,0x76,0x7f,0x7f,0x13, - 0xf0,0x77,0xea,0x1b,0xb8,0x9a,0x0e,0xd8,0x0c,0xbb, - 0x47,0x58,0x07,0x98,0xaa,0x8d,0xe7,0xfa,0x14,0xb8, - 0x15,0x5b,0x17,0xdc,0xdf,0xfe,0xd4,0xa4,0x11,0x05, - 0x00,0x92,0x31,0x27,0xe1,0x5d,0xc2,0x63,0x80,0xc3, - 0x33,0x98,0x4b,0x9a,0x86,0x01,0x47,0x00,0x3f,0x27, - 0xf9,0xec,0x91,0xc9,0xc0,0xbf,0x80,0x23,0xb1,0xe8, - 0x5f,0xdd,0x6d,0x03,0xfc,0x09,0x98,0xc6,0x31,0x56, - 0x01,0x00,0xe8,0x8f,0xdd,0x74,0xee,0x0f,0xcc,0x97, - 0xe2,0x75,0x5e,0x05,0x4e,0x06,0x2e,0xc5,0x22,0xd8, - 0x55,0xb7,0x0e,0x70,0x00,0x96,0xe1,0xd4,0x91,0xd2, - 0x35,0x26,0x61,0x81,0x80,0x93,0xb0,0x8c,0x0b,0x69, - 0xdd,0xe6,0xc0,0x55,0xce,0xb1,0x55,0x09,0x00,0x0c, - 0xc7,0x76,0x97,0xcb,0xa0,0xca,0x01,0x80,0xcd,0xb1, - 0xf7,0x8a,0x65,0x13,0x7e,0xde,0x49,0xc0,0x8d,0xc0, - 0xef,0xb1,0x2c,0xa2,0xb2,0x51,0x00,0xa0,0x18,0xd6, - 0x05,0xfe,0xd0,0xf5,0x7f,0xd3,0xfa,0x2c,0xeb,0xc4, - 0x16,0xae,0x27,0x01,0xf7,0xa4,0x74,0x8d,0xa2,0x59, - 0x08,0xf8,0x1d,0xb0,0x35,0xb6,0xb3,0x9f,0xb4,0x17, - 0x80,0xa3,0x80,0x6b,0x52,0x78,0xee,0x5a,0x53,0x0d, - 0x80,0x64,0x84,0xd2,0xff,0xa1,0xdc,0xe7,0xff,0x67, - 0xc4,0x22,0x71,0x4f,0x01,0x1b,0x92,0xce,0xd1,0x91, - 0x5e,0x58,0x60,0xe1,0x71,0xe0,0x3c,0x2c,0x05,0xab, - 0x8e,0xa6,0xc3,0x76,0xf0,0x2e,0xc3,0xb7,0xf8,0x17, - 0xd8,0x12,0xbb,0xb1,0xfe,0x33,0xe9,0x2e,0xfe,0xc1, - 0x8e,0xb8,0x9c,0x0f,0xbc,0x82,0xfd,0xbe,0x56,0xd5, - 0x92,0xd8,0x11,0x9d,0x3b,0x81,0xf5,0x49,0xef,0x86, - 0x09,0xa0,0x37,0xb0,0x09,0x76,0x2c,0xe0,0x7a,0x60, - 0xee,0x14,0xaf,0x55,0x65,0x33,0x63,0x7f,0x03,0x75, - 0x33,0x6d,0xde,0x13,0xa8,0xb9,0xc5,0xb0,0xc5,0xce, - 0x55,0x24,0xbf,0xf8,0x07,0x7b,0x7f,0xd8,0x18,0x78, - 0x11,0x38,0x16,0x4b,0x2f,0x16,0xf1,0x5a,0x1c,0xfb, - 0xfd,0xbc,0x03,0x58,0x8f,0x74,0x3f,0xcb,0x3a,0xb0, - 0xcc,0x97,0xbb,0xb1,0xcf,0xcf,0x25,0x52,0xbc,0x56, - 0xde,0x86,0x02,0x67,0x62,0x0b,0xf4,0x9d,0x49,0x67, - 0xf1,0x0f,0xf6,0xf3,0xfb,0x07,0x70,0x1f,0x76,0x5f, - 0x22,0x09,0x51,0x00,0x20,0x19,0xa1,0x00,0xc0,0x28, - 0xe0,0x91,0x2c,0x26,0x92,0x82,0xd5,0x81,0x67,0xb1, - 0x3f,0xf0,0x2c,0x7e,0x5f,0x7a,0x01,0xbb,0x00,0xcf, - 0x60,0x67,0x07,0xeb,0xe4,0x47,0xc0,0xf3,0xf8,0xd2, - 0x77,0xc5,0xce,0x93,0xde,0x8e,0xa5,0xe6,0xcf,0x96, - 0xf1,0xb5,0xe7,0xc6,0x52,0xfe,0xae,0xc4,0xea,0x09, - 0x54,0x45,0x6f,0x2c,0x0b,0xe7,0x69,0xac,0xb6,0x47, - 0xd6,0x36,0xc4,0x6e,0xf4,0x77,0xca,0xe1,0xda,0x65, - 0x57,0xd7,0xc0,0xa9,0x02,0x00,0xf9,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0, - 0x6c,0xf2,0x7d,0xf3,0xec,0x8b,0xfd,0xb1,0x6f,0x97, - 0xe3,0x1c,0xd2,0xb6,0x1c,0x76,0xb4,0x62,0x4f,0xf4, - 0x86,0xe6,0xb5,0x11,0xb6,0xf3,0x3f,0x73,0xde,0x13, - 0xe9,0xd2,0x9d,0x02,0x5b,0xe6,0xd4,0xf5,0xf9,0xb0, - 0xa2,0x7c,0xab,0xe5,0x3d,0x91,0x29,0x6c,0x8f,0xa5, - 0xfe,0x85,0xda,0xab,0xd6,0xdd,0x6c,0xd8,0x42,0xac, - 0x8e,0xaa,0x72,0x53,0x5d,0x26,0x7d,0xb1,0x9a,0x1d, - 0x79,0x06,0xe7,0xe7,0xc4,0x36,0x08,0xaa,0x5a,0x4f, - 0x41,0x5a,0x37,0x13,0xf6,0x79,0xec,0x39,0x9a,0x9b, - 0x95,0x75,0xb0,0xdf,0xd7,0x59,0xf2,0x9e,0x48,0x1b, - 0x3a,0x80,0x53,0x80,0x3f,0x92,0xff,0xda,0xf1,0xb7, - 0x58,0xc6,0x9b,0xee,0x99,0xdb,0xa0,0xdd,0x95,0xf6, - 0x79,0x76,0x20,0x6f,0x4f,0x7d,0x16,0xc9,0xda,0x89, - 0xe4,0x6e,0x28,0x3b,0x69,0xef,0x8f,0xb4,0x03,0x0b, - 0x02,0x8c,0x02,0xae,0x4d,0x64,0x46,0xc5,0xd0,0x1b, - 0x38,0x10,0x4b,0xb7,0xce,0x7a,0x07,0xa5,0xcc,0x7e, - 0x8e,0x55,0x8d,0x2f,0xda,0x7b,0xd7,0xbc,0xc0,0xbf, - 0xb1,0x63,0x2b,0xa3,0x72,0x9e,0x4b,0x5c,0xb3,0x61, - 0x67,0xfd,0xe7,0xc9,0x79,0x1e,0x8d,0x6c,0x08,0xfc, - 0x05,0xa5,0xfd,0x45,0xb9,0x00,0x3b,0x8f,0x59,0x47, - 0x4a,0xff,0xcf,0x56,0x6f,0xac,0xd2,0xf9,0x06,0x79, - 0x4f,0x04,0xfb,0x9d,0xbf,0x1e,0x6b,0xe3,0x36,0x3a, - 0xe7,0xb9,0x48,0x31,0x0c,0xc6,0x32,0x29,0x97,0x69, - 0xe1,0x7b,0xc7,0x62,0x9b,0x31,0x8f,0x63,0x5d,0x69, - 0xbe,0x04,0xbe,0xc0,0x02,0x5e,0xd3,0x76,0x7d,0xcd, - 0x05,0xac,0x88,0x05,0xfd,0xe3,0x2e,0x82,0x97,0xc2, - 0xee,0x11,0xd6,0xa0,0x7c,0xf7,0x08,0x00,0xc7,0x61, - 0x45,0x96,0x93,0xd0,0xee,0xba,0x00,0xec,0x58,0xf2, - 0xd7,0x24,0x37,0xa7,0xda,0x29,0xda,0x4d,0x74,0x19, - 0x85,0xa2,0x8c,0xef,0x62,0xbd,0x2d,0xcb,0x62,0x39, - 0x5a,0x2b,0x24,0xf5,0x01,0x70,0x33,0xd6,0xb2,0xe3, - 0x05,0xac,0x2b,0xc2,0x48,0xac,0x82,0xef,0xd4,0x58, - 0x21,0xc1,0x25,0xb1,0x05,0xd2,0x86,0x58,0xe5,0x50, - 0xaf,0x5e,0xc0,0x25,0x58,0x2d,0x82,0x57,0x5b,0x98, - 0x5b,0xd1,0xcc,0x87,0x15,0xf9,0x2b,0x4b,0xeb,0xaa, - 0xa2,0x58,0x91,0xd6,0x17,0xff,0x5f,0x62,0x67,0x47, - 0xef,0xc7,0x7a,0xf7,0x7e,0x8e,0x75,0x4f,0x98,0x80, - 0x15,0x5e,0x9c,0x0e,0xdb,0x55,0x5a,0x0d,0x3b,0x5e, - 0x10,0xe7,0xf7,0xb3,0xdb,0x62,0x58,0x5a,0xec,0x66, - 0x2d,0x7c,0x6f,0x5e,0x06,0x60,0x37,0x25,0xf3,0xb4, - 0xf0,0xbd,0x63,0xb0,0xe3,0x0f,0x0f,0x61,0x37,0x4d, - 0x9f,0x60,0x37,0x4c,0x5f,0x61,0x7f,0xf3,0x43,0xbb, - 0xbe,0x96,0xc4,0x5e,0xd7,0x55,0x68,0x6d,0xa1,0xba, - 0x3d,0x56,0x93,0xe0,0x4f,0x2d,0x7c,0x6f,0xd5,0xed, - 0x00,0xfc,0x24,0xef,0x49,0xe4,0x48,0x01,0x80,0x6c, - 0x9d,0x89,0x65,0x60,0xc5,0x31,0x0a,0xb8,0x05,0xdb, - 0x08,0x79,0x06,0xbb,0x37,0xf8,0x12,0xfb,0x5c,0x9f, - 0x16,0x3b,0x62,0xb8,0x3c,0xf6,0xbe,0xbb,0x09,0xf1, - 0x3a,0x53,0x2c,0x89,0x6d,0x10,0x6c,0x11,0x73,0x4e, - 0xd2,0x9a,0xa2,0xb7,0x0d,0xbb,0x92,0x78,0x8b,0xff, - 0x49,0x58,0x2d,0x9f,0x3f,0x63,0x3b,0xf4,0xde,0xa3, - 0xba,0x83,0xb1,0xcd,0x88,0x3d,0xb0,0xcf,0x35,0xaf, - 0x65,0x80,0x2b,0xb0,0x56,0x79,0x65,0xb2,0x13,0x70, - 0x50,0x0b,0xdf,0x37,0x01,0xfb,0xbb,0xbf,0x03,0xbb, - 0x47,0x78,0x1d,0xbb,0x47,0x18,0x87,0x1d,0xf5,0x9b, - 0x05,0x58,0x14,0x58,0x0b,0x3b,0xc2,0xb6,0x60,0xcc, - 0xe7,0xdf,0x0f,0x78,0x02,0x0b,0x4a,0x4a,0x4c,0x6a, - 0x03,0xd8,0x9e,0x41,0xd8,0x42,0x22,0x2a,0x45,0xf5, - 0x12,0xca,0xb3,0x7b,0x35,0x04,0x8b,0x80,0xce,0x1f, - 0xe3,0x7b,0x9e,0xc2,0x22,0x83,0x37,0x62,0xad,0xfc, - 0xbc,0xd6,0xc0,0x76,0xbf,0xe3,0x14,0x1a,0x7b,0x06, - 0x58,0x09,0x7b,0xf3,0x28,0xab,0x1d,0xb0,0x9b,0xa8, - 0x24,0xdb,0x6f,0xd5,0xa1,0x0d,0xe0,0x50,0xec,0x77, - 0x6d,0x9e,0x98,0xdf,0xf7,0x34,0x70,0x06,0x56,0xa1, - 0x3a,0x4e,0xdb,0xbe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bd,0x49,0x78,0x0b,0x39, - 0x1d,0x8e,0xdd,0xcc,0x95,0xcd,0x8c,0x58,0xaa,0x6e, - 0x9c,0x42,0x5d,0x0f,0x63,0x1f,0xcc,0xa1,0x1d,0xef, - 0x3a,0x04,0x00,0x2e,0x05,0xb6,0x8d,0x31,0xfe,0x6b, - 0x60,0x6f,0x6c,0x91,0xda,0x8e,0xa5,0xb0,0xfe,0xb3, - 0x71,0x32,0x02,0xde,0xc4,0x22,0xd9,0x93,0xda,0xbc, - 0x76,0xda,0xd6,0x23,0x5e,0x7d,0x92,0xf1,0xc0,0xd1, - 0xc0,0x89,0xb4,0xff,0x6f,0xdb,0x02,0x0b,0x3e,0xc4, - 0x29,0xe0,0x76,0x03,0xf1,0x77,0x1f,0xab,0xec,0x76, - 0xda,0x5b,0x58,0x54,0x21,0x00,0xb0,0x11,0x70,0x9d, - 0x63,0xdc,0xe2,0x58,0x77,0x09,0x69,0xcd,0xbc,0x58, - 0x00,0xde,0x1b,0x6c,0xba,0x06,0xf8,0x0d,0xb6,0x41, - 0xd2,0x8a,0x59,0xb0,0x60,0xc3,0xea,0xce,0xf1,0xcf, - 0x61,0xbb,0xab,0xed,0xdc,0x8b,0xd4,0x55,0x7f,0xec, - 0x67,0xbb,0x70,0x60,0xdc,0x6f,0xb1,0x60,0x4e,0x11, - 0xcd,0x88,0xed,0x2e,0x4f,0xed,0x1c,0x7f,0x2c,0x16, - 0x64,0x4a,0xea,0x33,0x7a,0x6a,0xec,0x5e,0x63,0x63, - 0xe7,0xf8,0xcf,0xb0,0x4c,0xd0,0x91,0x09,0x5d,0x3f, - 0x2d,0x7d,0xb0,0x2c,0xbf,0x38,0x59,0x15,0x77,0x61, - 0x59,0x7b,0x23,0x5a,0xbc,0x66,0x2f,0x60,0x5f,0xec, - 0x3e,0xc3,0x9b,0xed,0x79,0x17,0xe1,0x62,0xec,0xd2, - 0x43,0xde,0x85,0x1c,0xca,0x2e,0x94,0xfe,0xdf,0x89, - 0x6f,0x77,0xa2,0x08,0x16,0xc1,0xaa,0xfe,0x7b,0x8c, - 0xc4,0x7a,0x83,0x9f,0x42,0xfb,0x1f,0xb8,0x17,0x62, - 0x05,0x52,0xbe,0x70,0x8e,0x3f,0x90,0xf2,0x55,0xca, - 0xff,0x29,0xd6,0xde,0xcf,0xbb,0xf8,0x9f,0x8c,0x65, - 0x55,0xac,0x41,0xf1,0x17,0x91,0x59,0x58,0x05,0xab, - 0x72,0xee,0xf5,0x0c,0xb6,0x70,0x6f,0x77,0xf1,0x0f, - 0x76,0x63,0xb9,0x1c,0xf1,0x76,0xf4,0xe7,0xa5,0xf8, - 0x29,0xa9,0xbd,0x89,0x97,0x52,0xff,0x1e,0x76,0x04, - 0xe3,0x38,0x92,0xf9,0x9d,0xbc,0xaa,0xeb,0xf9,0xe2, - 0xec,0xbe,0xfc,0x0a,0xfb,0xb9,0x8a,0x2d,0xae,0x8a, - 0xbe,0xab,0x98,0x05,0xef,0x11,0x80,0x38,0x99,0x2a, - 0xf2,0x7d,0x7f,0xc2,0xbf,0xf8,0x3f,0x04,0x3b,0x06, - 0xd5,0xea,0xe2,0x1f,0xe0,0x43,0xec,0xfe,0xea,0x5f, - 0xce,0xf1,0x4b,0x11,0xef,0x33,0x42,0xbe,0x75,0x1c, - 0xe1,0xc5,0xff,0xfd,0x58,0x2d,0x96,0xa2,0x3a,0x04, - 0xff,0xe2,0xff,0x0c,0xe0,0x30,0x92,0xbd,0xb7,0xfa, - 0x1a,0xdb,0xec,0xbb,0xcf,0x39,0x7e,0x7a,0xca,0x71, - 0x76,0x7d,0x27,0xe2,0x2d,0xfe,0xcf,0xc3,0xfe,0x6e, - 0x5b,0x5d,0xfc,0x83,0xdd,0xff,0x9e,0xda,0xf5,0x3c, - 0xde,0xda,0x1e,0xeb,0x00,0x5b,0xb5,0x71,0xcd,0x5a, - 0x52,0x00,0xa0,0x3d,0xa1,0x00,0xc0,0x33,0x58,0x1a, - 0x5c,0x19,0x9c,0x84,0xaf,0x18,0xdd,0x78,0x2c,0xdd, - 0xee,0xde,0x04,0xaf,0xfd,0x18,0xf0,0x63,0x7c,0xa9, - 0xfd,0x83,0xb0,0xe8,0x6d,0x19,0x0c,0xc2,0x3e,0x34, - 0x6f,0xc1,0x5f,0xb1,0xfe,0x5d,0xec,0xcd,0xec,0x50, - 0x60,0x62,0x4a,0xf3,0x2a,0x9b,0xe3,0xf0,0x17,0x8c, - 0x79,0x01,0x5b,0x18,0xbd,0x95,0xe0,0xf5,0x47,0x01, - 0x9b,0x63,0xbf,0xa7,0x5e,0xde,0x60,0x5a,0x5e,0x36, - 0xc7,0x82,0x7e,0x1e,0x1f,0x61,0xd1,0xf5,0x67,0x13, - 0x9e,0xc3,0x8b,0x58,0x16,0xd5,0xd7,0xce,0xf1,0x1d, - 0x58,0x9a,0x67,0xdd,0xcd,0x0b,0x9c,0x1c,0x18,0xf3, - 0x4c,0x16,0x13,0x29,0x00,0x6f,0x00,0xe0,0xcb,0x54, - 0x67,0x51,0x6d,0x3f,0xc3,0x82,0xd8,0x1e,0xfb,0x61, - 0x29,0xbc,0x49,0x18,0x8b,0xb5,0x59,0xf5,0xa6,0xf6, - 0xfe,0x2e,0xa1,0xeb,0xd6,0xc9,0xaa,0x84,0xb3,0x3e, - 0xc7,0x61,0xc7,0x32,0x8a,0x9a,0x2e,0x3c,0x18,0xff, - 0x31,0xb6,0xbb,0x49,0x6f,0xe1,0x3d,0x1e,0xcb,0x48, - 0xf2,0xde,0xf3,0xef,0x42,0xbe,0xed,0x76,0x43,0x06, - 0x61,0x2d,0x81,0xbd,0x2e,0xc6,0x02,0xd3,0x49,0x05, - 0x56,0xee,0xc6,0xd6,0x1a,0xde,0xa3,0x9b,0xc7,0xa3, - 0x82,0xda,0xb1,0x28,0x00,0xd0,0xba,0xb9,0x08,0x47, - 0x4d,0xcb,0xd2,0xfe,0x6f,0x31,0xec,0x43,0xde,0x63, - 0x4f,0xac,0x98,0x5a,0xd2,0x1e,0xc3,0x52,0xb6,0x3d, - 0xb6,0xc6,0xce,0xd5,0x15,0xd9,0x42,0xd8,0xf9,0xf3, - 0x5d,0x63,0x7c,0xcf,0x8d,0xc0,0x30,0x92,0x0d,0xae, - 0x94,0xdd,0x0a,0x58,0x81,0x18,0x8f,0xee,0x85,0xaa, - 0xf7,0xcc,0x59,0x1c,0x63,0xb1,0x0c,0x0e,0xef,0xae, - 0xd6,0x4a,0xd8,0x19,0xed,0xa2,0xf2,0xde,0x2c,0x4f, - 0xc4,0x3e,0x84,0xd3,0x3a,0x5f,0xf7,0x12,0xf1,0xda, - 0x89,0x6d,0x4a,0xbd,0x3f,0xe4,0x3b,0xb0,0x1b,0xad, - 0xa8,0xd4,0xfd,0x8f,0x69,0xad,0x90,0x6b,0x19,0x79, - 0x02,0x00,0x13,0x51,0x95,0xf8,0x56,0xf5,0xc1,0x8e, - 0x06,0x7a,0xfc,0x25,0xc6,0x58,0xaf,0xaf,0xb1,0x6c, - 0x2a,0x4f,0xa6,0xe1,0x12,0xc0,0xd2,0x09,0x5f,0xbf, - 0xca,0x06,0x60,0x59,0x72,0xa1,0x75,0xc0,0x31,0x14, - 0xfb,0x7c,0xf5,0xa6,0xf8,0x8f,0x32,0xfd,0x81,0x74, - 0x8f,0x89,0x7c,0x86,0xed,0x5e,0x7b,0xcc,0x82,0x65, - 0xd2,0x16,0xd5,0xb6,0xf8,0xdb,0x16,0x3e,0x82,0x2d, - 0xfe,0x93,0x76,0x1f,0xfe,0xa0,0xff,0x5c,0xd8,0xda, - 0x40,0x9c,0x14,0x00,0x68,0x9d,0xa7,0xc7,0x68,0x59, - 0x02,0x00,0xfb,0xe2,0xdb,0x61,0xbd,0x1b,0x38,0x3f, - 0xc5,0x79,0x9c,0x87,0xa5,0x9a,0x85,0x4c,0x05,0xec, - 0x95,0xe2,0x3c,0x92,0xb0,0x22,0xfe,0x8a,0xa6,0x63, - 0xb0,0xf3,0x75,0x1b,0xd2,0x5e,0xda,0x64,0x15,0xed, - 0x14,0x63,0xec,0xbe,0x58,0x10,0x20,0x2d,0x1f,0xe2, - 0xff,0x70,0xef,0xc0,0xbf,0x6b,0x96,0xb5,0x25,0xf0, - 0xa7,0xf5,0x9d,0x86,0x15,0x5f,0x4c,0xd3,0x75,0xc0, - 0x03,0xce,0xb1,0xd3,0x13,0xbf,0x80,0x60,0x95,0xec, - 0x41,0x38,0x20,0x76,0x34,0xe5,0x6c,0x33,0xd5,0x0a, - 0x4f,0xa1,0xb8,0xa2,0x9f,0xb3,0x2d,0xb2,0xcd,0x81, - 0x05,0x1c,0xe3,0x86,0xe3,0x0f,0xe0,0xc7,0xf5,0x0c, - 0x70,0xb9,0x73,0xac,0x8e,0x01,0xf8,0x1d,0x4f,0xf8, - 0x1e,0xe5,0x05,0x2c,0x3b,0xb4,0xc8,0xbc,0x5d,0x50, - 0x6e,0x23,0x5e,0x16,0x5f,0xab,0xfe,0x8c,0x3f,0xe3, - 0xa8,0xc8,0x01,0x00,0xef,0xc2,0x7b,0x2c,0xb6,0xf0, - 0xf6,0x76,0x50,0x88,0xeb,0x62,0xac,0xfe,0x8f,0xc7, - 0x81,0xb4,0xdf,0x5e,0xb0,0x36,0x14,0x00,0x68,0x5d, - 0x28,0x00,0x30,0x06,0xff,0x4d,0x6d,0x9e,0x86,0xe2, - 0x8b,0x9a,0x75,0x62,0xbb,0xff,0x69,0xf3,0xde,0x44, - 0xec,0x82,0x45,0xb0,0xcb,0x6e,0x38,0x16,0x2c,0x28, - 0x6a,0x71,0x9d,0x3c,0x4d,0x85,0xb5,0x85,0xf2,0xb8, - 0x8b,0x6c,0x8a,0x6d,0x9e,0x85,0x45,0xf9,0x3d,0xe2, - 0xb4,0x07,0xca,0xd2,0xe6,0xce,0x71,0x1f,0x01,0x47, - 0xa5,0x39,0x91,0x29,0xc4,0xb9,0xce,0x1a,0xa9,0xcd, - 0xa2,0xd8,0x16,0xc0,0x0a,0x23,0x45,0x79,0x95,0x74, - 0x83,0xb4,0x45,0xe3,0xc9,0x00,0x50,0xfa,0x7f,0xeb, - 0x0e,0x70,0x8c,0x99,0x8c,0x55,0x53,0x8f,0xd3,0x65, - 0x25,0xae,0x63,0x08,0xa7,0xa0,0x8f,0xa2,0xb5,0x76, - 0xa6,0x75,0xf4,0x03,0xc2,0x9b,0x28,0x9d,0xd8,0x7d, - 0x56,0x5a,0x0b,0xbb,0xa4,0xac,0xe5,0x1c,0xe7,0x5d, - 0x44,0xb6,0x6b,0x14,0x76,0x3f,0xe2,0xb1,0x66,0x9a, - 0x13,0x69,0xc3,0xb2,0x58,0xd7,0x1d,0x8f,0xd3,0xb1, - 0x02,0x8c,0x69,0xda,0x1d,0x5f,0x27,0x91,0x85,0xf1, - 0xff,0x3e,0xd4,0x9e,0x02,0x00,0xad,0xe9,0x45,0xb8, - 0xe2,0xe4,0xfd,0x58,0x64,0xac,0xe8,0x36,0xc2,0xd7, - 0xde,0xe3,0x26,0x2c,0x1a,0x9c,0xb6,0xa7,0xf1,0x15, - 0x4e,0x9c,0x96,0xe2,0xee,0xb0,0x7a,0x9d,0x8b,0xed, - 0x66,0x0e,0xcf,0x7b,0x22,0x05,0xf5,0x03,0x60,0x3a, - 0xe7,0xd8,0xb3,0xd2,0x9c,0xc8,0x14,0x46,0xe1,0x6f, - 0x37,0xb5,0x5c,0x9a,0x13,0x69,0x83,0xb7,0x78,0xdc, - 0x65,0xf8,0xdb,0x77,0xb5,0xeb,0x0e,0xe0,0x7d,0xe7, - 0xd8,0x61,0x69,0x4e,0xa4,0xa0,0x7a,0x01,0x7f,0xc5, - 0x7a,0x27,0x47,0x39,0x80,0xe2,0xdf,0xb0,0x27,0xc9, - 0x13,0x00,0x50,0x01,0xc0,0xd6,0xac,0x8f,0xaf,0xe8, - 0xe6,0xe5,0xc0,0x93,0x29,0xcf,0xe5,0x75,0xbe,0xdd, - 0x50,0xe9,0xc4,0x8a,0x87,0xde,0x80,0x05,0x0e,0x37, - 0xc6,0x82,0x63,0x43,0xf0,0x57,0x61,0xaf,0xb3,0xa9, - 0xb0,0xe2,0xcb,0xa1,0xfb,0xff,0xbf,0x00,0x0f,0xa5, - 0x3f,0x9d,0xb6,0xcc,0x8c,0xbf,0x03,0x92,0x77,0x51, - 0x9e,0x84,0xbb,0x9d,0xe3,0x16,0xa6,0x98,0x3b,0xd6, - 0x3f,0x77,0x8e,0xfb,0x06,0xcb,0x12,0x4c,0xdb,0x07, - 0xf8,0x8f,0x17,0x29,0x0b,0xc8,0x49,0x01,0x80,0xd6, - 0x2c,0x47,0x78,0x61,0x52,0x96,0xf4,0x7f,0xef,0x6e, - 0xe0,0x19,0xa9,0xce,0xe2,0xbb,0xbc,0x8b,0xb9,0xa2, - 0x57,0x5a,0x6f,0xe6,0x33,0xac,0xa2,0xf9,0x6f,0x29, - 0x47,0x90,0x28,0x2f,0x6b,0x39,0xc7,0x7d,0x8c,0xbf, - 0x5a,0x74,0x12,0xee,0x74,0x8e,0x9b,0x37,0xd5,0x59, - 0xb4,0x66,0x10,0xfe,0xc0,0xc4,0x5f,0x53,0x9c,0x47, - 0x23,0xde,0x9b,0xa6,0xf9,0x52,0x9d,0x45,0x31,0xed, - 0x8b,0x15,0xec,0x8a,0x72,0x07,0x56,0x47,0xa4,0x4e, - 0x14,0x00,0x48,0xcf,0x0e,0x8e,0x31,0x13,0xb0,0x76, - 0x6a,0x59,0xd8,0x1d,0xfb,0x1b,0x18,0x82,0xf5,0x5c, - 0xdf,0xa8,0xeb,0xda,0xd7,0x63,0x01,0x82,0xa2,0x16, - 0xa9,0x2b,0x9a,0x03,0xb1,0x63,0x60,0x51,0x3e,0x00, - 0x0e,0xca,0x60,0x2e,0xed,0xf2,0x1c,0x4f,0x01,0x3b, - 0x5a,0xf9,0x6a,0x9a,0x13,0xe9,0xe1,0x51,0xe7,0xb8, - 0xfe,0xc0,0x1c,0x69,0x4e,0xa4,0x45,0xde,0xcd,0xb5, - 0x6b,0x48,0xa7,0xe6,0x52,0x23,0x67,0xe1,0xcb,0x32, - 0xda,0x98,0x6a,0x64,0x07,0xa7,0x4e,0x01,0x80,0xd6, - 0x54,0xe5,0xfc,0xff,0x0c,0x58,0xc5,0xf9,0x90,0x77, - 0xc9,0xb6,0x30,0xdd,0xad,0xf8,0xda,0x02,0xfe,0x84, - 0xf2,0xf5,0xb1,0xbe,0x07,0xdb,0xc1,0xfc,0x67,0xce, - 0xf3,0x28,0x83,0xe5,0x9d,0xe3,0x6e,0x26,0xdb,0x8e, - 0x09,0xde,0x22,0x98,0x03,0xb0,0xfe,0xc4,0x45,0xb2, - 0x38,0xbe,0xde,0xba,0xef,0x92,0x7d,0xdf,0x74,0xef, - 0x7b,0x4c,0xd1,0x0b,0x80,0x26,0x6d,0x11,0xc2,0x9d, - 0x4f,0xc6,0x50,0xcf,0x0e,0x09,0x3a,0x02,0x90,0x8e, - 0x21,0xf8,0x76,0x01,0xaf,0x27,0xd9,0x8e,0x2b,0x51, - 0x9e,0xc7,0x76,0xa4,0xeb,0x52,0xdf,0x22,0x0d,0x0b, - 0x63,0x1d,0x86,0x42,0xf6,0xa3,0x1c,0x81,0x33,0x6f, - 0x86,0xe0,0xc7,0xa9,0xce,0xe2,0xfb,0xe2,0x74,0xff, - 0xf2,0xfe,0x1b,0xb2,0xd2,0x1f,0x7f,0x31,0xcd,0x2b, - 0xd3,0x9c,0x48,0x0f,0x1f,0x03,0xd7,0x3a,0xc6,0x0d, - 0xc1,0xb7,0xae,0xa9,0x3d,0x05,0x00,0x5a,0x13,0x0a, - 0x00,0x7c,0x84,0xf5,0x0f,0x2f,0xba,0x75,0xf1,0xb5, - 0x21,0xb9,0x86,0x6c,0xa3,0xeb,0x13,0xf0,0x9d,0xd7, - 0x1a,0x40,0x79,0xce,0xfb,0x4c,0xc4,0x3e,0x78,0xd7, - 0xc5,0x7a,0xaa,0x4b,0x91,0x2b,0xe8,0xb9,0x00,0x00, - 0x20,0x00,0x49,0x44,0x41,0x54,0x98,0xb7,0x4d,0x5d, - 0xda,0x45,0xea,0x7a,0x8a,0x53,0x68,0xd0,0x53,0xa4, - 0x2c,0x4b,0xde,0xd7,0x34,0x8f,0x36,0x72,0xef,0x3a, - 0xc7,0x0d,0x4a,0x75,0x16,0xc5,0xd2,0x1b,0xcb,0xc4, - 0x08,0x1d,0xd3,0x3a,0x18,0x78,0x2d,0xf5,0xd9,0x14, - 0x8f,0xe7,0xef,0xab,0x0c,0x0b,0x99,0xa2,0xd9,0x04, - 0xdf,0x2e,0x9a,0x6a,0xd7,0x94,0x47,0x07,0x70,0x01, - 0xd0,0x2f,0x30,0xee,0xbf,0xc0,0x55,0xe9,0x4f,0x27, - 0x11,0xde,0xcf,0x02,0x6f,0xdd,0x9e,0xa4,0xc4,0xb9, - 0x5e,0xd1,0x36,0xb1,0x96,0xc2,0xd7,0x69,0x67,0x2c, - 0x56,0xa5,0x3f,0x4b,0xff,0x70,0x8e,0xf3,0x6c,0xd2, - 0x66,0xe9,0x19,0x6c,0x0d,0x15,0xfa,0xfa,0x5f,0x96, - 0x93,0xf2,0xec,0x04,0xc9,0x77,0x0d,0x06,0x56,0x0e, - 0x8c,0xb9,0x83,0x72,0xa4,0xa3,0xad,0xed,0x1c,0x77, - 0x6b,0xaa,0xb3,0x68,0xec,0x36,0x7c,0x29,0x88,0xeb, - 0x00,0xb7,0xa4,0x3c,0x97,0x76,0xbd,0x05,0xfc,0x1a, - 0x78,0x38,0xe7,0x79,0x94,0x4d,0x77,0xbb,0xc7,0x59, - 0x7a,0x7c,0xcd,0x3c,0xc5,0xff,0x1d,0x88,0xd5,0x8d, - 0xc8,0xd2,0x48,0x2c,0x15,0xad,0xaf,0x63,0x6c,0xe8, - 0xcc,0x76,0xd6,0xae,0xc1,0x32,0x18,0x66,0x98,0xe2, - 0x6b,0xfa,0x1e,0xff,0x7b,0x06,0xf2,0xc9,0x60,0xf2, - 0xa6,0x12,0xd6,0x29,0xbd,0xef,0x00,0xac,0x16,0x46, - 0x94,0xfb,0x81,0x33,0x33,0x98,0x4b,0x11,0xe9,0x08, - 0x40,0x3a,0x36,0x74,0x8c,0x19,0x81,0x5a,0xd6,0x96, - 0xc9,0x76,0xc0,0xea,0x81,0x31,0xe3,0xb0,0xa3,0x89, - 0x65,0x31,0xc6,0x39,0x2e,0xeb,0xac,0x91,0x38,0xd7, - 0x1b,0x97,0xda,0x2c,0x5a,0xe3,0x2d,0xfe,0xf7,0x38, - 0xd9,0x1f,0x61,0xbd,0x0d,0x7b,0xbd,0x42,0x41,0xac, - 0xa2,0x05,0x00,0x0a,0x49,0x01,0x80,0xf8,0xd6,0x26, - 0x1c,0x1d,0x2b,0x43,0xfa,0x3f,0xf8,0x02,0x00,0xe3, - 0xc9,0xa7,0x9b,0xc1,0x3d,0xce,0x71,0xde,0x20,0x46, - 0x5e,0xae,0xc2,0xfa,0xa3,0xea,0x26,0x34,0xbe,0x27, - 0xba,0xbe,0xa2,0x0c,0x21,0x9f,0x1e,0xdf,0x5f,0x63, - 0x0b,0xe7,0x90,0x34,0x7b,0x0e,0xb7,0x62,0x0c,0x76, - 0x5e,0x36,0xed,0xaa,0xbd,0xad,0xf0,0x1c,0xfb,0x81, - 0x74,0xab,0x8d,0x17,0xc9,0x12,0x84,0xcf,0x57,0x7f, - 0x03,0x6c,0x4f,0x39,0x02,0xce,0x49,0xeb,0x85,0xfd, - 0xfd,0x87,0xe8,0x08,0x40,0x3c,0x53,0xe1,0xcb,0xac, - 0xcb,0xaa,0xaa,0xba,0xb4,0x6f,0x28,0xf0,0x47,0xc7, - 0xb8,0x13,0x29,0x57,0x26,0x91,0xf7,0x33,0x23,0xeb, - 0x4c,0x3c,0xcf,0xfb,0x52,0xb7,0xac,0xb3,0x13,0x42, - 0xe6,0x72,0x8e,0xcb,0x23,0xcb,0x79,0x2c,0x16,0x78, - 0x58,0x2d,0x30,0x6e,0x11,0x6c,0x93,0xe8,0xc3,0xd4, - 0x67,0x54,0x62,0x3a,0x02,0x10,0x9f,0x27,0xb2,0xe4, - 0xa9,0x62,0x9f,0xb7,0x19,0x81,0x85,0x1c,0xe3,0x9e, - 0x24,0xbb,0x4a,0xe0,0x53,0xfa,0x18,0x78,0xd9,0x31, - 0x6e,0x18,0xc5,0x4b,0xb3,0x06,0x8b,0x00,0xef,0x00, - 0x6c,0x89,0x16,0xff,0x69,0x1a,0x09,0x4c,0xca,0xe1, - 0xba,0x53,0x3b,0xc7,0xa9,0x07,0xb9,0x5f,0x28,0xaa, - 0xdf,0xed,0xeb,0x54,0x67,0x51,0x0c,0x7d,0x80,0x4b, - 0x09,0x67,0x99,0xfc,0x81,0x62,0x06,0x73,0xb2,0x30, - 0x04,0x5f,0x05,0x6d,0xbd,0xff,0xc6,0xb3,0x32,0xbe, - 0xb4,0x64,0xd5,0xb1,0x29,0x8f,0xe3,0x09,0xd7,0xa3, - 0x79,0x93,0x70,0x9b,0xd1,0xa2,0xf1,0x2e,0x9e,0x3d, - 0xc1,0xfa,0x24,0x0d,0x8d,0x31,0xf6,0xf3,0xd4,0x66, - 0xd1,0x9a,0x39,0x9d,0xe3,0xf2,0xfa,0xdc,0xf1,0x16, - 0x58,0x2c,0x6a,0x17,0xa6,0xc2,0x50,0x00,0x20,0xbe, - 0x50,0x00,0xe0,0x45,0xca,0x71,0xc6,0xdb,0xdb,0x4a, - 0x2b,0xeb,0xf4,0xea,0xb8,0xd7,0xee,0xc0,0xd7,0xaa, - 0x28,0x6b,0x37,0x02,0x97,0xe4,0x3d,0x09,0x49,0xc5, - 0x40,0x7c,0xe9,0xff,0x9d,0xc4,0x2b,0x06,0x54,0x77, - 0xde,0x82,0x89,0x65,0x78,0x7f,0x6d,0xd7,0xc1,0x58, - 0x2f,0xe6,0x28,0xf7,0x02,0x67,0x67,0x30,0x97,0xa2, - 0xf2,0xa4,0xff,0x83,0x02,0x00,0x71,0xad,0xe7,0x18, - 0x33,0x1e,0x1d,0x69,0x2b,0x8b,0xe5,0x81,0x5d,0x1c, - 0xe3,0xf6,0xa5,0x7c,0x5d,0x89,0xde,0xc4,0x57,0x00, - 0x78,0x66,0xb2,0x6d,0xb7,0xe7,0x2d,0xec,0xf7,0x29, - 0xc5,0x7b,0x7f,0xf2,0x06,0x4b,0xbc,0x6d,0x7b,0x93, - 0xf6,0x92,0x73,0xdc,0x32,0xa9,0xce,0xa2,0x02,0x14, - 0x00,0x88,0x67,0x6e,0xc2,0xbb,0xe6,0x65,0x49,0xff, - 0xf7,0x06,0x00,0xf2,0x28,0x06,0xd6,0xcd,0x1b,0x7c, - 0x28,0x62,0x00,0x40,0xaa,0x6b,0x51,0xe7,0xb8,0x37, - 0xf1,0x9f,0x51,0x14,0xab,0x50,0xed,0x91,0x65,0x3b, - 0xa7,0x3c,0x2c,0x4d,0xb8,0x52,0xf7,0x68,0xea,0x9b, - 0xfa,0xdf,0xcd,0x9b,0xf9,0xa5,0x23,0x00,0xf1,0xac, - 0xe4,0x18,0x93,0xc7,0xf9,0x5f,0x89,0xaf,0x03,0x38, - 0x87,0xf0,0xbd,0xfe,0x7f,0x28,0x67,0x46,0xc7,0x37, - 0xf8,0xee,0x51,0x87,0xe0,0x3f,0xdb,0x9e,0x04,0xef, - 0xe2,0xf3,0xa1,0x54,0x67,0xd1,0x1a,0x6f,0xdd,0xa2, - 0xbc,0xde,0x57,0xbd,0x9f,0xff,0xa1,0x00,0x7a,0xed, - 0x29,0x00,0x10,0x8f,0x27,0xfd,0xff,0xf6,0xd4,0x67, - 0x91,0x0c,0x6f,0x9b,0x8f,0x17,0x52,0x9d,0x45,0xb4, - 0xe1,0xce,0x71,0xde,0x60,0x86,0x48,0x12,0xbc,0x7f, - 0x3b,0x79,0x06,0xcf,0xca,0x28,0x54,0xa0,0xaa,0xdb, - 0x93,0xa9,0xce,0x22,0x5f,0x7d,0xb1,0xd4,0xff,0x50, - 0x9d,0x99,0x03,0xb0,0x00,0x53,0x9d,0x29,0x03,0x20, - 0x1d,0x9e,0x1b,0xe7,0x47,0x52,0x9f,0x85,0x24,0x61, - 0x3b,0x60,0x85,0xc0,0x98,0x09,0xc0,0x3e,0xe9,0x4f, - 0x25,0x35,0xde,0xb6,0xbc,0x59,0xd6,0x8b,0xf2,0x7e, - 0x96,0x15,0x31,0x00,0xe0,0x2d,0xb2,0x9b,0x57,0x00, - 0xd0,0x7b,0xae,0x7f,0xb1,0x54,0x67,0x51,0x01,0x0a, - 0x00,0xc4,0x13,0x0a,0x00,0x8c,0xa7,0x3c,0x55,0x71, - 0xbd,0xbb,0x6d,0x79,0x9e,0x2f,0xf5,0xde,0xe0,0xea, - 0x0f,0x5d,0xb2,0xb4,0x81,0x73,0x5c,0x59,0x82,0x81, - 0x45,0xd0,0x1f,0xf8,0xa9,0x73,0x6c,0x19,0x6a,0xac, - 0xb4,0xea,0x70,0xc2,0x19,0x4d,0x77,0xa1,0xf6,0x6b, - 0xa0,0x00,0x40,0x1a,0xe6,0xc6,0x97,0x02,0xec,0x0d, - 0xce,0x4b,0x7e,0x06,0x03,0xc7,0x39,0xc6,0x9d,0x05, - 0xbc,0x92,0xf2,0x5c,0xd2,0x74,0xbd,0x73,0xdc,0xc6, - 0xa9,0xce,0xe2,0x5b,0x1d,0xf8,0xdb,0x53,0xdf,0x94, - 0xe2,0x3c,0xd2,0x96,0xe5,0x91,0x8a,0x29,0x79,0x8f, - 0x55,0xce,0x4d,0x7e,0x73,0x2c,0x05,0x05,0x00,0xfc, - 0x7a,0x61,0x2d,0xe7,0xa2,0x3c,0x4c,0x3e,0x15,0xc9, - 0x5b,0x31,0xb7,0x63,0xcc,0x28,0xe2,0xf5,0x3c,0x4f, - 0xda,0x9b,0xf8,0x52,0x5c,0x3d,0xff,0x16,0x91,0x24, - 0x0c,0xc2,0x17,0x00,0xe8,0x04,0xfe,0x9d,0xf2,0x5c, - 0xaa,0x64,0x5b,0x7c,0x0b,0xba,0x37,0xc8,0xa7,0xfa, - 0x70,0x16,0x96,0x07,0x0e,0x0c,0x8c,0x19,0x05,0xec, - 0x48,0xbd,0x53,0xff,0xbb,0x29,0x00,0x90,0x3c,0x6f, - 0x76,0xd3,0xf3,0xa9,0xce,0x42,0x92,0x70,0x30,0x30, - 0x6b,0x60,0xcc,0xc7,0xc0,0xd1,0x19,0xcc,0x25,0x4d, - 0xf7,0xe1,0x3b,0x17,0xbe,0x3a,0xb0,0x66,0xca,0x73, - 0x01,0x6b,0xa1,0xe9,0xb9,0x27,0xbd,0x07,0xff,0x79, - 0xf6,0x2c,0x79,0x77,0xf6,0xbd,0x45,0x7b,0x93,0xe6, - 0x9d,0x5f,0x7f,0xc2,0xbf,0xff,0xb5,0xa6,0x36,0x80, - 0x7e,0xcb,0x13,0x2e,0xec,0x51,0x96,0xf3,0xff,0x03, - 0x80,0x99,0x1c,0xe3,0x46,0xa4,0x3d,0x91,0x80,0xb1, - 0xd8,0x07,0xd4,0xcc,0x81,0x71,0xb3,0x61,0x29,0xb3, - 0x13,0x52,0x9f,0x91,0xd4,0xdd,0x4e,0xf8,0xce,0xc8, - 0xdd,0x05,0xbc,0x93,0xf2,0x5c,0xaa,0x62,0x08,0xb6, - 0xf3,0xed,0x71,0x61,0x9a,0x13,0xc9,0x51,0x3f,0x2c, - 0xf5,0x3f,0xf4,0x99,0xfc,0x3b,0xe0,0xad,0xd4,0x67, - 0x53,0x0e,0xaa,0x01,0x90,0x3c,0x4f,0x67,0x20,0x88, - 0xb7,0x63,0xbc,0x30,0x96,0x7e,0xbd,0x04,0xb0,0x38, - 0x56,0x65,0x7c,0x48,0xd7,0x57,0x6f,0x6c,0xd3,0x64, - 0x14,0xf0,0x2e,0x16,0xf4,0x1f,0x8e,0xa5,0x46,0x3f, - 0x4a,0x3e,0x1d,0x88,0xaa,0x60,0x1e,0xac,0xa8,0x5f, - 0xc8,0xa1,0x54,0xa3,0x53,0xcd,0xb9,0x58,0x26,0x43, - 0xc8,0xb1,0x58,0x10,0x20,0xcd,0xf6,0xbc,0x07,0x3b, - 0xc7,0x9d,0x93,0xe2,0x1c,0xda,0xe1,0xad,0x5b,0xe4, - 0x0d,0xc0,0x26,0x6d,0x5c,0x8c,0xb1,0xf3,0x92,0x5f, - 0xb1,0xc2,0xc2,0x53,0x00,0xc0,0xaf,0x4a,0xe7,0xff, - 0xbd,0x7d,0x3e,0xf3,0xdc,0xfd,0xef,0xf6,0x11,0xe1, - 0x00,0x40,0x2f,0xec,0xa6,0xe2,0x8d,0xf4,0xa7,0x23, - 0x35,0xd6,0x1f,0x3b,0x7b,0xed,0x71,0x5e,0x9a,0x13, - 0xa9,0x98,0xbf,0x00,0xb3,0x3b,0xc6,0x7d,0x49,0x71, - 0x6f,0x9a,0xda,0x75,0x34,0xe1,0xa3,0x4c,0x77,0xa0, - 0xdf,0xab,0x29,0x25,0x91,0x01,0xd0,0x81,0xed,0x7a, - 0xff,0x00,0xab,0x25,0xb3,0x20,0xf6,0xbb,0x38,0x13, - 0x16,0x28,0xef,0x87,0xdd,0x70,0x8e,0xe9,0x7a,0x9e, - 0x11,0x5d,0x5f,0x2f,0x00,0x8f,0x61,0xc5,0xf0,0x46, - 0xb5,0x30,0xf7,0xa2,0x9a,0xd7,0x31,0xe6,0x4b,0xc2, - 0xad,0x38,0xe7,0x02,0x7e,0x0b,0x6c,0x84,0xbd,0xa6, - 0x51,0xa6,0xe9,0xfa,0x9a,0x1d,0xfb,0x39,0x74,0x1b, - 0x8b,0x15,0xa7,0xbb,0x12,0xb8,0x81,0x7c,0xda,0xbd, - 0x96,0xd5,0x89,0xd8,0xe7,0x55,0x94,0x17,0x80,0x8b, - 0x33,0x98,0x4b,0x16,0xce,0x03,0x76,0x27,0x7c,0xb4, - 0x75,0x35,0xe0,0x64,0x60,0xff,0x94,0xe6,0x71,0x18, - 0xbe,0xf6,0x73,0x8f,0x00,0xd7,0xa5,0x34,0x87,0x76, - 0x79,0x53,0xec,0xf3,0xda,0x5d,0x1f,0x14,0x63,0xec, - 0x6c,0xa9,0xcd,0xa2,0x02,0x14,0x00,0xf0,0x0b,0x05, - 0x00,0x3e,0xa7,0x3c,0xc5,0xa9,0xbc,0x7f,0x14,0x1f, - 0xa7,0x3a,0x0b,0x1f,0xef,0x1c,0xe6,0x40,0x01,0x00, - 0x49,0xd7,0xa1,0xf8,0xfe,0x76,0x5e,0xc1,0x7f,0x2e, - 0xb1,0xee,0x4e,0x02,0xb6,0x74,0x8e,0x3d,0x92,0x6a, - 0xa6,0x73,0xaf,0x8c,0xed,0xec,0x47,0x19,0x89,0xa5, - 0xfe,0xcb,0xb7,0x3c,0x01,0x80,0x71,0x7c,0x7f,0xc7, - 0xa8,0x17,0xb6,0x23,0xbd,0x0d,0x56,0x77,0x62,0x86, - 0xc0,0x73,0x0c,0xe8,0xfa,0x9a,0x8e,0xef,0x2f,0x90, - 0xc7,0x03,0x77,0x63,0x6d,0x5f,0xff,0x4e,0xf9,0x7f, - 0x3f,0x3d,0x01,0x80,0xa8,0xcc,0xa6,0x85,0x80,0xa3, - 0x80,0x4d,0x68,0xff,0xfe,0xb2,0x3f,0x96,0x4e,0xbd, - 0x21,0x96,0x19,0x70,0x12,0x70,0x01,0x0a,0x04,0x84, - 0x2c,0x07,0x6c,0xe6,0x18,0x77,0x00,0xd5,0x79,0x2d, - 0xc7,0x03,0xbb,0x61,0x99,0x77,0x21,0xfb,0x61,0xad, - 0x64,0x4f,0x4b,0x78,0x0e,0x5b,0x61,0xbf,0xfb,0x21, - 0x13,0x81,0x5d,0x49,0x37,0x0b,0xa1,0x1d,0xde,0x36, - 0xbb,0x0b,0xa4,0x3a,0x8b,0xe6,0xbc,0x99,0x5f,0xe0, - 0x6f,0x69,0x98,0x36,0xef,0xd1,0xaa,0x4c,0xa9,0x06, - 0x80,0xcf,0xd4,0x84,0x5b,0xe3,0xdc,0x45,0x71,0xff, - 0xa0,0x7b,0xf2,0xf6,0x28,0x2d,0x42,0x00,0xc0,0x9b, - 0x85,0xe0,0xfd,0x37,0x89,0xb4,0x62,0x49,0xfc,0xbb, - 0xff,0x47,0x52,0x9d,0x1b,0xab,0xb4,0x4c,0x0b,0x5c, - 0x0e,0xfc,0xde,0x39,0xfe,0x7e,0xe0,0x4f,0xe9,0x4d, - 0x27,0x37,0x03,0x80,0xbf,0x12,0xfe,0x2c,0xde,0x9f, - 0xfc,0x8f,0x64,0x15,0x8d,0x27,0x00,0x30,0x65,0xfa, - 0xff,0x54,0xc0,0xce,0xd8,0xb9,0xdb,0x3b,0x80,0xff, - 0x23,0xbc,0xf8,0x0f,0xe9,0x0b,0xac,0x8f,0xa5,0x20, - 0xbf,0x0b,0x9c,0x8d,0x05,0xa3,0xcb,0xca,0x13,0x00, - 0xf8,0xa0,0xc1,0x7f,0x9b,0x0a,0x0b,0x90,0x3e,0x07, - 0x6c,0x41,0xf2,0x9b,0x4b,0xf3,0x62,0xaf,0xf1,0x93, - 0x7c,0x37,0x4b,0x40,0xbe,0xef,0x44,0xc2,0xc5,0xcf, - 0xee,0xa2,0x7a,0x35,0x6a,0xee,0xc6,0xff,0x19,0x71, - 0x2a,0xf0,0x0f,0xec,0x18,0x4a,0xbb,0x06,0x60,0xc7, - 0x0f,0x2e,0xc7,0x57,0x74,0xee,0x58,0x8a,0x5d,0xc7, - 0xc6,0xfb,0x39,0xb3,0x44,0xaa,0xb3,0x68,0x2e,0x4e, - 0xe0,0x41,0xeb,0x82,0x08,0x0a,0x00,0xf8,0xac,0x4d, - 0xb8,0x2d,0x53,0x59,0xce,0xff,0x83,0xff,0x8f,0xa2, - 0x08,0xbb,0x19,0xde,0x39,0xe8,0x0f,0x5d,0xd2,0x32, - 0x10,0xb8,0x8a,0xf0,0x7b,0x00,0xd8,0xb9,0xd5,0xab, - 0xd3,0x9d,0x4e,0xe9,0x6d,0x0c,0xbc,0x08,0x6c,0xed, - 0x1c,0xff,0x36,0xb0,0x29,0xe5,0x09,0xb0,0xc6,0x71, - 0x3c,0xe1,0x73,0xd7,0xb7,0x51,0xdd,0xda,0x07,0xed, - 0xf0,0x04,0x00,0xba,0x3f,0x3f,0xd6,0xc7,0x6e,0xba, - 0xcf,0xc7,0x7f,0xce,0x3d,0xae,0xc1,0x58,0x1a,0xf2, - 0x2b,0xc0,0x31,0xf8,0xdb,0x69,0x15,0x89,0x27,0xad, - 0xf7,0x8b,0x1e,0xff,0x7b,0x46,0xac,0xfb,0xd1,0x31, - 0xa4,0x5f,0x18,0x6c,0x18,0xf0,0x00,0xbe,0xf3,0xed, - 0x75,0xb4,0x2e,0xb0,0x9e,0x63,0xdc,0x41,0x69,0x4f, - 0x24,0x27,0xfb,0x02,0x37,0x3b,0xc7,0x6e,0x8a,0xfd, - 0xad,0x1e,0x46,0x6b,0x81,0xc0,0x69,0x80,0xbd,0xb0, - 0x82,0x98,0x7b,0xe2,0x5b,0xfc,0x5f,0x86,0x2f,0x4b, - 0x20,0x4f,0xde,0x0e,0x1f,0x2b,0xe0,0xbb,0x27,0x4a, - 0x5a,0x9c,0xb6,0xdf,0x5a,0x17,0x44,0x50,0x00,0xc0, - 0xc7,0x73,0xfe,0xbf,0x4c,0x01,0x80,0xa1,0xce,0x71, - 0x45,0x38,0xdb,0xe8,0x9d,0x83,0xf7,0xdf,0x24,0x12, - 0xd7,0xb9,0xf8,0x5a,0x4d,0x4e,0xc4,0x76,0x18,0xab, - 0xb8,0x50,0x6d,0xd7,0x74,0xd8,0x4d,0xd2,0xd3,0xc0, - 0xb5,0xf8,0xcf,0x0f,0xfe,0x0f,0x3b,0xb7,0x59,0x84, - 0x7a,0x24,0x49,0x5b,0x1d,0xd8,0x3b,0x30,0xe6,0x2b, - 0xac,0xf0,0xa4,0x7c,0x9f,0x27,0x15,0x74,0x02,0x56, - 0x63,0xe2,0x56,0x60,0x91,0x74,0xa7,0xf3,0xff,0x0d, - 0xc0,0x76,0xc3,0x9f,0x20,0xde,0xcd,0x6a,0xde,0xa6, - 0xc2,0xb7,0x23,0x3a,0x65,0x56,0xc5,0x82,0x58,0xf7, - 0xa3,0x95,0x53,0x99,0x51,0x63,0x7d,0xb0,0xf4,0xed, - 0x8b,0xd0,0x3d,0xec,0x94,0x3a,0xb0,0xdd,0xff,0x90, - 0x1b,0xb1,0xfa,0x15,0x55,0x34,0x09,0xcb,0x40,0xb9, - 0xc7,0x39,0x7e,0x66,0xac,0xfe,0xca,0x3b,0x58,0x0d, - 0xaf,0xc3,0x81,0x1f,0x02,0x8b,0x76,0x3d,0xd6,0x17, - 0xfb,0x7b,0x9e,0x05,0x7b,0xff,0xf8,0x11,0xf6,0xb7, - 0x7d,0x13,0x96,0x2a,0x7f,0x26,0x30,0xbf,0xf3,0x5a, - 0xb7,0x50,0x8e,0xf7,0xf2,0xe7,0xf0,0xdd,0xc3,0x0c, - 0x04,0x56,0x49,0x79,0x2e,0x8d,0x78,0x02,0x5c,0xdd, - 0xf2,0x2a,0x54,0x58,0x0a,0xaa,0x01,0xe0,0x13,0x0a, - 0x00,0xbc,0x86,0xbf,0x67,0x7d,0x11,0x78,0x17,0xcb, - 0xa1,0x42,0x3f,0x59,0x50,0x00,0x40,0xf2,0x74,0x30, - 0xd6,0xa2,0xce,0xe3,0x78,0xea,0xdd,0x1e,0xab,0x1f, - 0xdf,0x16,0xf4,0x9a,0x16,0xbb,0x89,0x5a,0xae,0xeb, - 0x6b,0x79,0xe2,0xef,0x0e,0x3e,0x86,0x9d,0xd1,0xfe, - 0x34,0xc1,0x39,0x16,0xc5,0x20,0xe0,0x12,0xc2,0xbb, - 0x46,0xfb,0x62,0xa9,0xe5,0xf2,0x7d,0x9e,0x9b,0xbb, - 0xc5,0xbb,0xbe,0xf2,0xb0,0x18,0x96,0x11,0xb4,0x2d, - 0x96,0x6e,0x5c,0x74,0xde,0xdd,0xb2,0xee,0x00,0xc0, - 0x8c,0x58,0x76,0x8a,0xe7,0xd8,0x40,0x1a,0x76,0xc0, - 0xea,0x04,0x6c,0x83,0x82,0xae,0x00,0xbf,0xc4,0xde, - 0x67,0xa3,0x4c,0xc6,0x16,0xb0,0x55,0xf6,0x0d,0xb6, - 0x88,0x3f,0x85,0x70,0x80,0xb5,0x5b,0xff,0xae,0xef, - 0xf9,0x61,0x0a,0xf3,0x99,0x8c,0x65,0xc7,0x1c,0x4d, - 0x39,0x7e,0x4f,0x47,0x63,0x59,0x00,0x4b,0x39,0xc6, - 0x6e,0x8e,0x65,0xff,0x64,0x65,0x1a,0x7c,0x1b,0xb2, - 0xdd,0xf2,0x6a,0x55,0x58,0x0a,0x0a,0x00,0x84,0xcd, - 0x43,0xb8,0x8a,0x6d,0x99,0x76,0xff,0x21,0x5c,0x1d, - 0xb6,0xdb,0xe8,0x54,0x67,0xe1,0xe3,0x0d,0x00,0x94, - 0x31,0xdd,0x52,0x8a,0x6d,0x3b,0xec,0xbc,0x9e,0xc7, - 0x7d,0x94,0xbf,0x9f,0xb2,0xd7,0xd6,0xd8,0x79,0xc7, - 0xb4,0x8c,0xc5,0xd2,0x24,0x4f,0xc1,0xb2,0x2a,0xaa, - 0xe8,0x24,0xc2,0x3b,0x47,0xff,0xc6,0x82,0x04,0xd2, - 0x58,0x19,0x76,0x77,0xfa,0x61,0xc7,0x87,0x66,0xa6, - 0xf8,0x35,0x2c,0xbc,0x05,0xb3,0xc6,0x61,0x3b,0xa3, - 0x37,0xe2,0x5f,0xfc,0xbf,0x85,0x65,0xf1,0x7c,0x0a, - 0x7c,0x86,0xdd,0x7b,0x0e,0xc1,0xfa,0xa5,0x2f,0x40, - 0xeb,0x9f,0xdf,0xbf,0xc6,0x02,0x64,0x07,0xb6,0xf8, - 0xfd,0x55,0xe2,0x69,0xa5,0x7a,0x1d,0x56,0xfd,0xbf, - 0xea,0x26,0x02,0xfb,0x60,0x9f,0xcb,0x9e,0xf7,0xda, - 0xb4,0x3c,0x8b,0xd5,0x6f,0xb9,0x33,0xa7,0xeb,0xb7, - 0xea,0x36,0x7c,0x01,0x80,0x2d,0xb0,0xda,0x48,0x59, - 0x65,0x0b,0xef,0x82,0xbd,0xf7,0x78,0xc5,0x19,0x5b, - 0x3b,0x4a,0x9f,0x0a,0xab,0x5a,0xfa,0x3f,0xf8,0xcf, - 0xed,0x4c,0x48,0x75,0x16,0x3e,0xde,0x39,0xe8,0x0f, - 0x5d,0x92,0xb4,0x25,0x96,0x62,0xea,0x39,0xd7,0xf7, - 0x11,0x76,0x23,0xaa,0xc2,0x7f,0xed,0x99,0x84,0x75, - 0x4f,0x58,0x12,0x4b,0x65,0xad,0xea,0xe2,0x7f,0x1d, - 0xac,0x62,0x75,0x94,0x2f,0xb1,0x9b,0x1d,0x69,0xae, - 0x0c,0x01,0x00,0xb0,0xf7,0x90,0xb3,0xb0,0x80,0x62, - 0x91,0x79,0xb3,0xe8,0xc6,0x63,0x99,0x51,0x51,0xe9, - 0xbf,0x13,0xb0,0xf6,0x7d,0xdb,0x60,0xed,0xfd,0xe6, - 0xc5,0x0a,0x29,0xff,0x0c,0x2b,0xbe,0xb8,0x15,0xf0, - 0x73,0x6c,0x91,0x31,0x0d,0x76,0x84,0xe0,0x24,0xfc, - 0x15,0xc8,0xa7,0x74,0x00,0xfe,0x4e,0x22,0x55,0xf5, - 0x73,0x60,0x99,0xc0,0x98,0x4e,0x6c,0x27,0xba,0x4e, - 0xae,0xc7,0x32,0xd1,0x7e,0x4b,0x76,0x5d,0xa2,0x26, - 0x63,0xc7,0x62,0x36,0xc2,0x7e,0x26,0x65,0x5b,0xfc, - 0x03,0xfc,0xcb,0x39,0x6e,0x28,0xf0,0x9b,0x34,0x27, - 0x32,0x85,0x41,0x84,0xbb,0xe5,0xf4,0xa4,0x75,0x41, - 0x04,0x05,0x00,0xc2,0x42,0x29,0x41,0x93,0xb0,0xea, - 0xa3,0x65,0xe2,0xfd,0xa3,0x28,0xc2,0x82,0xc6,0xbb, - 0x08,0xc8,0xa3,0x18,0x89,0x54,0xd3,0x2e,0xc0,0x15, - 0xf8,0xde,0x1f,0xc7,0x00,0xbf,0xa0,0xb5,0x1b,0x57, - 0x31,0x9f,0x63,0xbb,0xfd,0xf3,0x63,0x05,0x02,0x5f, - 0xcb,0x77,0x3a,0xa9,0x9a,0x1a,0xeb,0xbd,0x1d,0x0a, - 0x2c,0xed,0x83,0x7e,0xa7,0x42,0x92,0xa8,0xe0,0xfd, - 0x0e,0x96,0xcd,0xb2,0x3b,0xf6,0x59,0xbf,0x10,0x76, - 0xde,0x77,0x1a,0x6c,0xd7,0x7e,0x01,0xbe,0x0d,0xd8, - 0x5c,0x02,0xbc,0xdf,0xc6,0xb5,0x2e,0x24,0xde,0xf9, - 0xd5,0xac,0x79,0xd3,0x65,0xe7,0xa7,0x79,0x11,0xb9, - 0xee,0x9a,0x0b,0x0b,0x62,0x8b,0xfc,0x2b,0x08,0xbf, - 0x66,0x13,0xb0,0xbe,0xe8,0x07,0x02,0xf3,0x61,0xaf, - 0xf5,0xe7,0xce,0xb9,0x74,0xfb,0x33,0xf5,0xee,0xf9, - 0xed,0xd9,0xfd,0xbf,0x99,0x7a,0x1e,0x51,0x9b,0x80, - 0xd5,0xf1,0x99,0x1f,0x58,0x16,0xcb,0xea,0x1b,0x93, - 0xc2,0x75,0xde,0x05,0xb6,0xc7,0xde,0x3f,0x56,0x01, - 0x6e,0xc0,0x82,0x2e,0x65,0x74,0x1f,0x56,0x7c,0xd7, - 0xe3,0x10,0xec,0x38,0x50,0xda,0xfe,0x08,0xcc,0x14, - 0xf3,0x7b,0x14,0x00,0x88,0xa0,0x23,0x00,0xd1,0x7a, - 0x61,0x55,0x55,0xa3,0x3c,0xce,0x77,0x8b,0xe2,0x94, - 0x81,0x77,0xb1,0x5c,0x84,0x1d,0x38,0xef,0x1c,0xf4, - 0x87,0x2e,0x49,0x38,0x14,0xff,0x2e,0xc9,0x64,0x6c, - 0x87,0xab,0xaa,0x05,0x95,0xd2,0xd2,0x89,0xbd,0x66, - 0xb7,0x61,0x85,0x97,0x1e,0xa5,0x18,0xef,0x35,0x59, - 0x38,0x15,0x4b,0x7b,0x8e,0x72,0x33,0x70,0x69,0x06, - 0x73,0x29,0xb3,0xc1,0xb4,0x7e,0xff,0xf2,0x0d,0xb6, - 0x30,0xbd,0x00,0x2b,0xd4,0xd7,0xcc,0x48,0xac,0x15, - 0xee,0xeb,0x58,0x90,0xff,0x2f,0x58,0xe0,0x66,0x55, - 0xac,0xa0,0xe5,0x26,0xc4,0xdb,0x44,0xe9,0xdd,0x75, - 0xdd,0x61,0x14,0xb3,0xa8,0xa5,0xf7,0x33,0xf4,0xff, - 0x68,0xfc,0xef,0x7e,0x17,0x7b,0x4d,0x1e,0x6d,0x63, - 0x0e,0xe3,0xb1,0xd7,0xf9,0x3a,0xe0,0xef,0x84,0xef, - 0xbf,0xba,0x0d,0xc5,0x8e,0x58,0x6c,0xdc,0xc6,0xb5, - 0xcb,0x6a,0x03,0xc2,0x67,0xff,0x21,0xf9,0xbe,0xf7, - 0x65,0x32,0x2b,0x56,0x23,0x61,0xcd,0xae,0xaf,0x34, - 0x8e,0x8c,0xce,0x81,0x65,0xfa,0x6c,0x81,0xb5,0xad, - 0xbd,0x01,0xeb,0x76,0x53,0x46,0x9d,0x58,0x7b,0xda, - 0x23,0x1c,0x63,0xa7,0xc5,0xfe,0x66,0xd3,0xfc,0xdb, - 0xfb,0x09,0x96,0xc5,0x11,0x57,0x59,0x03,0x30,0x99, - 0x50,0x06,0x40,0xb4,0x15,0x08,0xa7,0xc5,0xdd,0x9e, - 0xc5,0x44,0x12,0xe6,0xbd,0x71,0x2a,0x42,0x06,0x80, - 0x77,0x0e,0x0a,0x66,0x49,0x3b,0xba,0xd3,0x74,0xe3, - 0xa4,0x48,0xee,0x86,0xdd,0xa8,0x4a,0x3c,0x93,0xb1, - 0x45,0xd8,0x50,0xac,0x40,0xdb,0x8a,0xd4,0xa3,0x58, - 0xcf,0xfa,0x58,0x97,0x88,0x28,0x5f,0x00,0xbb,0x66, - 0x30,0x97,0xb2,0x6b,0x25,0xfd,0x7f,0x22,0xb6,0x53, - 0x3c,0x37,0xf6,0x1a,0x47,0x2d,0xfe,0x9b,0xe9,0xc4, - 0xda,0xd0,0x6d,0x8e,0x2d,0xba,0xe2,0x2e,0x76,0x67, - 0xc6,0x5a,0x11,0x16,0x91,0x37,0x00,0xd0,0xe8,0xbe, - 0xf1,0x7e,0x6c,0x77,0xb5,0x9d,0xc5,0xff,0x94,0x3e, - 0xc1,0xfe,0x5e,0xae,0x8c,0xf1,0x3d,0x1b,0x61,0xef, - 0x25,0x75,0xf3,0x7b,0xc7,0x98,0xa7,0xc8,0xb6,0x58, - 0x5b,0x51,0x2c,0x85,0x2d,0x64,0xdf,0xc2,0xb2,0x00, - 0xb6,0xc0,0xdf,0x81,0xa6,0x15,0x53,0x63,0xbf,0xb7, - 0xc7,0x62,0xb5,0x16,0xee,0xc0,0x32,0x04,0xcb,0xb8, - 0xd6,0x3a,0x17,0x7f,0xa6,0xc4,0x46,0xd8,0x51,0x9c, - 0x34,0xac,0x80,0x15,0x51,0xf5,0x1c,0xc7,0xec,0x69, - 0x7c,0xc2,0x73,0xa9,0x94,0x32,0xfe,0x52,0x66,0xa9, - 0x8a,0xe7,0xff,0xc1,0xbf,0xdb,0xd6,0x3b,0xd5,0x59, - 0xf8,0x78,0x17,0xf6,0x75,0xd9,0x41,0x94,0xe4,0x0d, - 0x04,0xae,0xc6,0x76,0xf5,0x3c,0x3a,0xb1,0x94,0xe1, - 0xa2,0xde,0xc8,0x17,0x5d,0x6f,0x60,0x6d,0xec,0xf5, - 0x3e,0x0f,0x78,0x10,0xdb,0x69,0xbd,0x1c,0xdb,0xa5, - 0xf1,0x16,0x29,0x2d,0x93,0x69,0xb0,0x14,0xf0,0x90, - 0xbd,0x80,0x0f,0x52,0x9e,0x4b,0x15,0xc4,0x0d,0x00, - 0x0c,0xc7,0x6e,0x24,0xf7,0x20,0xb9,0xae,0x12,0x4f, - 0x63,0x2d,0x2a,0x4f,0x89,0xf9,0x7d,0xbf,0xc0,0x16, - 0x09,0x45,0xd3,0x6a,0x16,0xdd,0x13,0xd8,0x0e,0xdd, - 0x27,0x09,0xce,0x05,0x2c,0xf8,0xbf,0x2d,0xd6,0xc2, - 0xd1,0xcb,0xb3,0x63,0x59,0x25,0xcb,0x60,0xef,0xa5, - 0x21,0xa7,0xa7,0x3d,0x91,0x82,0x19,0x8c,0x7d,0x3e, - 0x3f,0x8b,0x65,0xac,0xe4,0x95,0x21,0xba,0x2e,0xf0, - 0x4f,0xe0,0x21,0x60,0xe1,0x9c,0xe6,0xd0,0xaa,0x8f, - 0xb0,0x9d,0x7d,0xaf,0x13,0x09,0xd7,0xb6,0x89,0x6b, - 0x03,0x2c,0x88,0x32,0xa8,0xc5,0xef,0x57,0x00,0x20, - 0x82,0x76,0x4d,0xa3,0x85,0x02,0x00,0x5f,0x63,0x67, - 0xd7,0xca,0xc6,0xfb,0x47,0x51,0x84,0xdf,0x0f,0xef, - 0x1c,0xf4,0x87,0x2e,0xad,0x98,0x13,0xfb,0x80,0x0e, - 0x15,0x50,0xea,0x36,0x19,0xfb,0x90,0xd3,0xe2,0x3f, - 0x59,0x43,0xb0,0xee,0x02,0x5b,0x63,0xe7,0x7f,0x4f, - 0xc0,0x52,0x7a,0xc7,0xe5,0x39,0xa9,0x04,0x9d,0x89, - 0xa5,0x88,0x46,0xb9,0x11,0x4b,0x11,0x97,0xb0,0x38, - 0x01,0x80,0x0b,0xb1,0x85,0x7f,0x1a,0xbf,0x4b,0x13, - 0xb1,0x1d,0xd8,0x77,0x81,0x33,0x62,0x7c,0xdf,0x49, - 0xd8,0x11,0x98,0x22,0x69,0x65,0x43,0xe8,0x4b,0x2c, - 0xed,0x3f,0xad,0x2a,0xe0,0x93,0xb0,0x02,0xab,0x2f, - 0xe0,0xdb,0xb9,0xfd,0x31,0x56,0x70,0xb0,0x4c,0x6d, - 0x99,0xdb,0xe1,0x29,0x8a,0xf6,0x1e,0x16,0xe0,0xae, - 0x8b,0x95,0xb1,0xf7,0xd1,0xf9,0x62,0x7e,0xdf,0x64, - 0xec,0xf7,0xec,0x29,0xac,0x53,0xc5,0xe7,0x58,0x46, - 0x56,0x5f,0xec,0xfd,0x66,0x5a,0xec,0xac,0xfb,0xf2, - 0x58,0x8d,0x8b,0x38,0x3b,0xd2,0x3f,0xc0,0x02,0x86, - 0x07,0x61,0x9f,0x05,0x65,0x71,0x1c,0x76,0xcc,0x71, - 0x06,0xc7,0xd8,0x0e,0xe0,0x1c,0xac,0x6e,0xca,0x41, - 0xb4,0x77,0x4f,0x3e,0x00,0x3b,0x8e,0x79,0x20,0x8d, - 0x37,0x22,0x9f,0xc2,0x32,0x8e,0x42,0xb4,0x2e,0x88, - 0x50,0x84,0x05,0x5e,0x51,0x4d,0x8d,0x55,0xad,0x8d, - 0x72,0x0f,0xe5,0xdc,0x79,0xf6,0x56,0xd6,0x2f,0xc2, - 0xef,0x87,0x02,0x00,0x92,0x96,0x95,0xb1,0x73,0x7a, - 0x33,0x3b,0xc7,0x4f,0xc0,0x76,0x13,0xfe,0x9e,0xda, - 0x8c,0x04,0xac,0x1f,0xf9,0xc9,0x58,0x86,0xc0,0xc1, - 0xc0,0xdf,0xf2,0x9d,0x4e,0xdb,0xba,0x2b,0x9f,0x47, - 0xf9,0x8c,0xec,0xaa,0x29,0x57,0xc1,0xa7,0xf8,0x6e, - 0xa4,0x9f,0xc1,0x52,0x80,0xd3,0x76,0x26,0x76,0x93, - 0xec,0xed,0xb1,0xbe,0x14,0xb6,0xc1,0x50,0xa4,0x23, - 0x84,0xad,0x74,0xfd,0x39,0x14,0x7f,0xb1,0xb0,0x56, - 0x7d,0x81,0x15,0xc5,0xf4,0x2c,0x62,0x7b,0x01,0x3b, - 0x00,0x87,0xa5,0x3a,0xa3,0x62,0x98,0x03,0xd8,0xcc, - 0x31,0xee,0x5c,0x8a,0xd1,0xd1,0x29,0x0b,0x3f,0x04, - 0x6e,0xc2,0x9f,0x45,0x36,0x09,0xbb,0x07,0xb8,0x04, - 0xcb,0x44,0xfb,0xca,0xf9,0x7d,0xd3,0x60,0xeb,0x83, - 0xed,0xb0,0xf4,0x77,0x4f,0x86,0xc1,0x00,0x2c,0x48, - 0x38,0x2b,0xf0,0x07,0xe7,0x75,0xf2,0xf6,0x19,0xb0, - 0x1f,0x70,0x59,0x8c,0xef,0xd9,0x0f,0xcb,0x70,0x3a, - 0x10,0x7f,0x37,0x81,0x6e,0xfd,0xb0,0x4d,0x80,0x83, - 0x89,0x0e,0xe0,0x1c,0x81,0xd5,0xca,0x09,0xa9,0xca, - 0x06,0x42,0x2a,0x8a,0xb0,0xc0,0x2b,0xaa,0x75,0x08, - 0xbf,0x3e,0x45,0xfa,0xf0,0x8e,0xc3,0xbb,0x58,0x2e, - 0x42,0x65,0x7d,0x6f,0xea,0x96,0x02,0x00,0x12,0xc7, - 0x76,0x58,0x7a,0x9b,0xf7,0xec,0xf9,0x68,0xac,0xc8, - 0x4d,0xd1,0x76,0xed,0xf2,0x30,0x1c,0xab,0xc8,0xdb, - 0x53,0x2f,0xec,0xf5,0xec,0x8f,0x2d,0x86,0x66,0xc2, - 0x2a,0x2f,0xb7,0x7a,0xe6,0x72,0x2e,0x6c,0x27,0x67, - 0x0d,0x6c,0x07,0xb7,0x8c,0x37,0xb1,0xd3,0xe1,0xcb, - 0x16,0xd9,0x93,0x62,0x16,0x86,0x2b,0xaa,0xff,0x61, - 0x8b,0xc2,0x22,0x39,0x02,0x5b,0x14,0x78,0x2b,0xfd, - 0xef,0x41,0xb1,0xee,0x21,0xe2,0x7e,0x86,0x8e,0xc0, - 0x8e,0xf0,0x64,0xe1,0x1a,0x6c,0x51,0x30,0xcc,0x31, - 0xf6,0x97,0xd4,0x23,0x00,0xf0,0x1b,0xc2,0xf7,0xa8, - 0x93,0xb0,0xc5,0x6d,0x1d,0xc4,0x5d,0xfc,0x9f,0x87, - 0xa5,0xad,0xbf,0xd5,0xc2,0xb5,0xbe,0xc2,0xee,0x05, - 0x6e,0xc3,0xb2,0x02,0xf6,0xc1,0xce,0xc0,0x7b,0xd6, - 0x54,0x07,0x62,0x3f,0x97,0x43,0x5a,0xb8,0x6e,0x1e, - 0x2e,0xc7,0x82,0xd8,0x9e,0x60,0x53,0xb7,0xc5,0x81, - 0x5b,0xb0,0x22,0x88,0x97,0x63,0x47,0xa5,0x9f,0xa5, - 0xf1,0x86,0xe9,0x4c,0x58,0x56,0xc5,0x2f,0x80,0x0d, - 0x09,0x57,0xfa,0xbf,0x12,0xcb,0x00,0xf0,0xf0,0x06, - 0x74,0x6a,0x49,0x01,0x80,0xe6,0xaa,0x7a,0xfe,0x1f, - 0xac,0x00,0x97,0xc7,0xe0,0x54,0x67,0xe1,0x33,0xb5, - 0x73,0xdc,0xe8,0x54,0x67,0x21,0x55,0xd1,0x1b,0xab, - 0xc4,0xbe,0x77,0x8c,0xef,0xf9,0x18,0xfb,0x00,0x7c, - 0x3c,0x95,0x19,0x95,0xcf,0x33,0x5d,0x5f,0x5e,0x43, - 0x80,0xe5,0xb0,0xf3,0xd2,0x3f,0xc5,0x0a,0x75,0xc5, - 0x49,0x9f,0xdc,0x05,0x58,0x04,0x0b,0xc0,0x24,0x75, - 0x7e,0x3b,0x2b,0x67,0x13,0x0e,0x80,0x5c,0x8f,0xb2, - 0x4a,0xaa,0x60,0x32,0xf6,0xbb,0xfa,0x22,0xbe,0x45, - 0xc8,0xfa,0xd8,0xdf,0xc6,0xc8,0x34,0x27,0x15,0x43, - 0xdc,0x00,0xc0,0x5f,0xc8,0x2e,0x03,0xb2,0x13,0xdb, - 0x3d,0xf5,0x2c,0x66,0x97,0xc4,0x8e,0x76,0xbd,0x93, - 0xea,0x8c,0xf2,0xd5,0x07,0xcb,0x74,0x08,0xb9,0x95, - 0xf6,0x5a,0x57,0x96,0xc5,0x30,0xec,0x28,0x9f,0xe7, - 0xef,0xee,0x33,0x6c,0x03,0xe0,0x96,0x84,0xae,0xfd, - 0x09,0xb6,0x98,0xbf,0x0e,0xcb,0x36,0x5a,0xd2,0xf1, - 0x3d,0x07,0x63,0x81,0x87,0x0b,0x12,0x9a,0x43,0xda, - 0x76,0x00,0x16,0x03,0x96,0x88,0xf9,0x7d,0x8b,0x61, - 0xc7,0xf9,0x4e,0xc0,0xde,0x2b,0xde,0xc6,0x8e,0x0d, - 0x4d,0xc0,0xde,0xfb,0x66,0x24,0x5e,0x0b,0xc1,0x17, - 0xb0,0x02,0xae,0xde,0xac,0xcd,0xcf,0x62,0x3c,0x77, - 0xed,0xa8,0x08,0x60,0x73,0xa1,0x00,0xc0,0x3b,0xc0, - 0xcb,0x59,0x4c,0x24,0x05,0x5f,0x38,0xc7,0x79,0x17, - 0xdf,0x69,0xf2,0xce,0x21,0x6e,0xdf,0x60,0xa9,0x9f, - 0xe9,0xb1,0x88,0x7d,0x9c,0xc5,0xff,0x2b,0xd8,0x51, - 0x01,0x2d,0xfe,0x5b,0x37,0x12,0x6b,0xa3,0x76,0x0c, - 0xb6,0x43,0xba,0x10,0x16,0x84,0x89,0x13,0xb4,0x5b, - 0x03,0xfb,0xd9,0x15,0xe1,0x3d,0xc9,0x6b,0x23,0x60, - 0xcb,0xc0,0x98,0x4f,0x49,0xbe,0x70,0x92,0xe4,0xe7, - 0x4d,0x2c,0xe5,0xda,0xa3,0x2f,0x56,0x3c,0xaf,0x28, - 0xe2,0xa6,0xcb,0x5e,0x93,0xca,0x2c,0x9a,0xbb,0x16, - 0x7f,0x55,0xf2,0x55,0xd3,0x9c,0x48,0x01,0xfc,0x12, - 0x5f,0x66,0x95,0xa7,0xf0,0x68,0xd9,0x0d,0xc4,0x7e, - 0x37,0x3c,0xad,0xfd,0x5e,0xc3,0xea,0xfd,0x24,0xb5, - 0xf8,0x9f,0xd2,0x53,0xd8,0x59,0x7f,0x6f,0x56,0xcf, - 0x99,0xd8,0x79,0xf9,0x32,0x18,0x8d,0x15,0xe4,0x6b, - 0xa7,0xb6,0x46,0x1f,0x2c,0x23,0x70,0x39,0xec,0x3e, - 0x60,0x31,0xe2,0x2d,0xfe,0x3f,0xc2,0x32,0x04,0x46, - 0x61,0xf7,0x72,0x1e,0x0a,0x00,0x44,0x50,0x00,0xa0, - 0xb1,0x79,0x08,0xff,0x61,0x96,0x75,0xf7,0x1f,0xfc, - 0x7f,0x14,0x45,0xb8,0xd9,0xf6,0xce,0x41,0x7f,0xe8, - 0x12,0x65,0x49,0x6c,0x11,0xef,0xed,0x2b,0x0d,0xd6, - 0xda,0x6a,0x15,0xe0,0x8d,0x54,0x66,0x54,0x5f,0xaf, - 0x61,0xc5,0xab,0xe6,0x23,0xde,0xf9,0xfe,0x65,0x63, - 0x8e,0xcf,0xd3,0x0c,0xf8,0x16,0x82,0xbb,0x63,0x19, - 0x26,0x52,0x1d,0x67,0x60,0xd9,0x00,0x1e,0xab,0xa7, - 0x39,0x91,0x98,0xe2,0xa4,0xcb,0xbe,0x8b,0xfd,0x1d, - 0x67,0x69,0x14,0xf6,0x9e,0xec,0xb1,0x5c,0x9a,0x13, - 0x29,0x00,0x4f,0xab,0xd0,0x8f,0x48,0x67,0xa1,0x5b, - 0x34,0x47,0xe0,0x5b,0x48,0x7f,0x8a,0x1d,0xcf,0x49, - 0x33,0x33,0x64,0x0c,0xb6,0x48,0xf5,0x64,0xc8,0x0d, - 0xc0,0x5a,0x0f,0x97,0xc5,0xbb,0xd8,0xd1,0xe8,0xd7, - 0x73,0xb8,0xf6,0x6b,0xd8,0xbd,0xd8,0xab,0x5d,0xff, - 0xdb,0x1b,0x38,0x28,0x5b,0xc6,0x60,0xa6,0x14,0x00, - 0x68,0xcc,0xd3,0xa2,0xa7,0xcc,0x01,0x00,0xef,0x6e, - 0xf9,0xd0,0x54,0x67,0xe1,0xe3,0xa9,0x3e,0x0a,0xca, - 0x00,0x90,0xe6,0x7e,0x8a,0xb5,0xe1,0x99,0x37,0xc6, - 0xf7,0x5c,0x81,0xdd,0x2c,0x28,0xb0,0x94,0x9e,0x8f, - 0xb1,0x82,0x3f,0x5b,0xe1,0xdf,0xd9,0xfb,0x39,0xb6, - 0x68,0x2e,0xba,0x73,0x09,0x9f,0x65,0xbc,0x06,0xeb, - 0x6f,0x2c,0xd5,0x32,0x02,0x7b,0xbf,0xf1,0x58,0x39, - 0xcd,0x89,0xc4,0x14,0xe7,0x66,0xd9,0x7b,0x06,0x37, - 0x69,0xde,0x5e,0xf6,0x9e,0x34,0xec,0xb2,0x9a,0x0b, - 0x5f,0x9d,0x89,0xbf,0x51,0xce,0x22,0xd5,0x71,0xcc, - 0x89,0x3f,0xa3,0x6f,0x7b,0xd2,0x2f,0x58,0x09,0x76, - 0xc4,0xf6,0xd7,0xf8,0x8e,0xd4,0x6c,0x80,0x2d,0x6c, - 0xcb,0xe2,0x2d,0xec,0x08,0xdf,0x5d,0x19,0x5e,0xf3, - 0xbf,0x58,0x46,0xcf,0x94,0x1b,0x31,0xde,0x0c,0x00, - 0xd5,0xd5,0x89,0xa0,0x00,0x40,0x63,0x3f,0x0c,0x3c, - 0xde,0x89,0xf5,0xa6,0x2c,0x2b,0xef,0x07,0xfd,0x2c, - 0xa9,0xce,0xc2,0xc7,0x3b,0x07,0x45,0xfa,0xa4,0x91, - 0xdd,0xb0,0xb3,0x81,0xde,0x7a,0x16,0x9d,0xc0,0xe1, - 0x58,0xeb,0x1b,0x15,0x96,0xcc,0xc6,0x95,0xd8,0xc2, - 0x7e,0xac,0x73,0xfc,0x71,0xc4,0x4b,0x1d,0xcc,0xda, - 0x16,0x58,0x6b,0xb4,0x28,0xef,0xa1,0xaa,0xff,0x55, - 0xf6,0x1f,0xe7,0xb8,0x45,0x89,0x57,0x0f,0x23,0x4d, - 0x71,0x82,0x9d,0x79,0x65,0x45,0x3d,0xe7,0x1c,0x37, - 0x57,0xaa,0xb3,0xc8,0xd7,0x56,0xf8,0x7e,0x67,0xea, - 0x10,0x5c,0xdc,0x0f,0x5f,0x21,0xdf,0x9b,0xc9,0x36, - 0x1b,0xe2,0x25,0xac,0x46,0x86,0xc7,0xfe,0x69,0x4e, - 0x24,0x05,0x9f,0x63,0x47,0xa4,0xff,0x80,0xff,0x33, - 0xbb,0x15,0x23,0x81,0x9d,0xbb,0xae,0xd5,0x33,0x4b, - 0x2e,0xd4,0x52,0xb7,0x5b,0x5d,0xda,0x81,0xb6,0x44, - 0x01,0x80,0xef,0xeb,0x8d,0xa5,0xb9,0x44,0x79,0x9a, - 0x72,0x2f,0x38,0xbd,0x29,0x50,0xde,0x42,0x1b,0x69, - 0xf2,0xce,0x21,0x8b,0xc8,0xae,0x94,0x47,0x07,0xd6, - 0x6b,0xfb,0x1c,0x1a,0xf7,0x91,0x6d,0x64,0x0c,0xb0, - 0x39,0x76,0x56,0x5d,0xb2,0x75,0x27,0xfe,0x05,0xf1, - 0x34,0xd8,0x8d,0x5f,0x11,0xcd,0x8c,0x15,0xfe,0x8b, - 0x32,0x19,0x0b,0x30,0xfd,0x3f,0xf6,0xee,0x3b,0xcc, - 0xae,0xaa,0x7c,0xfb,0xf8,0x77,0xd2,0x49,0x02,0xa1, - 0x97,0x50,0x12,0x90,0x2e,0x55,0x04,0x04,0xa9,0x82, - 0x54,0x05,0xa9,0x36,0x3a,0xd2,0x8b,0xa2,0x60,0x43, - 0x11,0x05,0x7f,0x08,0x0a,0x16,0x90,0xa6,0x34,0x51, - 0x29,0x82,0xa8,0x34,0x45,0x40,0x41,0x3a,0x21,0x14, - 0xe9,0x90,0x00,0x81,0x50,0x13,0x20,0x09,0x90,0x9e, - 0x79,0xff,0xb8,0x67,0xde,0x84,0x31,0x73,0xf6,0xda, - 0xed,0xec,0x76,0x7f,0xae,0xeb,0x5c,0x51,0x66,0x9d, - 0x7d,0x56,0x26,0x33,0xe7,0xec,0xf5,0xac,0x67,0x3d, - 0x8f,0xb3,0x96,0xea,0xeb,0xbe,0xc0,0x71,0x83,0x28, - 0x47,0xa0,0x1d,0x74,0x33,0x1f,0x5a,0x97,0xa3,0xa8, - 0xfb,0x9f,0xd0,0xba,0x4b,0xa1,0x0b,0x84,0x2a,0xfa, - 0x72,0xc0,0x98,0x71,0xc0,0x03,0x79,0x4f,0xa4,0x60, - 0x03,0x81,0xfd,0x02,0xc7,0xfe,0x38,0xcf,0x89,0xf4, - 0xe2,0x2c,0xb4,0xa1,0x10,0xe5,0xb3,0x84,0xef,0x68, - 0x97,0xc5,0x6c,0xd4,0x09,0x68,0x6d,0x14,0xc0,0x0f, - 0x3d,0xf2,0x14,0x62,0x32,0xea,0xce,0xb0,0x32,0xbd, - 0xd7,0xb0,0x08,0xc9,0xe6,0x9c,0x0a,0xbc,0x96,0xd5, - 0xa4,0xea,0xc8,0x01,0x80,0xff,0xb5,0x21,0xd1,0xa9, - 0xef,0x55,0x4e,0xff,0x07,0xed,0x3e,0x85,0xb4,0xd4, - 0x4a,0xda,0xbe,0x2b,0x2b,0x1d,0x81,0x73,0x78,0x1f, - 0xa7,0xfa,0xd8,0x5c,0x83,0x50,0xcf,0xe8,0x13,0x62, - 0x3c,0x67,0x3c,0x3a,0x8f,0xdb,0xee,0xc2,0x56,0x36, - 0xd7,0x65,0xc0,0x4d,0x81,0x63,0x0f,0x23,0xbc,0x45, - 0x68,0x3b,0x5d,0x40,0xf4,0xcd,0xdc,0xe9,0xa8,0x28, - 0xa2,0xd5,0x57,0x9c,0x02,0xc1,0xcb,0xe6,0x36,0x8b, - 0xf8,0x5e,0x09,0x1c,0x17,0x7a,0x64,0x27,0x6b,0xa1, - 0x37,0xf4,0x0b,0x12,0x1e,0xf8,0xad,0x92,0xf5,0x50, - 0x8b,0xb5,0x28,0xd7,0x10,0xb6,0xf8,0xac,0xb2,0xad, - 0x51,0x9b,0xd5,0x28,0x4f,0x01,0xf7,0xe7,0x3c,0x97, - 0xf9,0x79,0x89,0xb0,0x40,0x60,0x7f,0xc2,0x8e,0x1d, - 0x97,0xd1,0xf3,0x28,0x20,0xb5,0x3a,0xfa,0x5c,0x0b, - 0x7d,0xff,0xe8,0xa9,0x13,0x1d,0x9b,0x3a,0x0e,0x18, - 0x01,0x7c,0x07,0x75,0x57,0xe8,0x4d,0x48,0x00,0xe0, - 0x05,0xea,0xff,0x3b,0x90,0x8a,0x03,0x00,0xff,0xab, - 0xce,0xed,0xff,0xba,0xcd,0x21,0x2c,0x0b,0x60,0x79, - 0xf4,0xe6,0x54,0x94,0xe1,0x84,0x55,0x76,0x7d,0x31, - 0xe7,0x79,0x58,0x75,0x0c,0x06,0x6e,0x04,0xf6,0x8a, - 0xf1,0x9c,0xfb,0x51,0x1f,0xda,0x87,0x72,0x99,0x91, - 0xc5,0xf1,0xdd,0xc0,0x71,0x8b,0x10,0x7d,0x54,0xab, - 0xdd,0xf6,0x45,0xd5,0xb9,0x5b,0x79,0x00,0x1d,0x31, - 0xb1,0x7a,0x7b,0x15,0xed,0x92,0x85,0x28,0x43,0xbb, - 0xdd,0x6e,0xa1,0x05,0xbe,0x8a,0x5a,0x5c,0xbf,0x47, - 0xf8,0xd1,0xac,0xc1,0x79,0x4e,0xa4,0x20,0x9f,0x0f, - 0x1c,0x77,0x4d,0xae,0xb3,0x28,0x87,0xd0,0x45,0xf3, - 0xf5,0xb9,0xce,0xa2,0xb5,0xd0,0xb3,0xf2,0x51,0x59, - 0xc7,0x65,0xf7,0x1c,0x3a,0x12,0xb0,0x02,0xb0,0x0e, - 0x70,0x0c,0x6a,0xd9,0x79,0x17,0x5a,0x6b,0x4c,0x42, - 0xf5,0x28,0xa6,0xa3,0x74,0xfe,0x67,0xd1,0x31,0xea, - 0x9f,0xa1,0x3a,0x40,0xcb,0xa1,0x73,0xfe,0xbf,0x40, - 0x6d,0x02,0xa3,0xac,0x11,0x30,0xa6,0xdd,0x45,0x4a, - 0x2b,0xa7,0x5f,0xd1,0x13,0x28,0xa1,0xa8,0x00,0xc0, - 0x54,0xf4,0x43,0x5d,0x75,0x2f,0xa0,0x2a,0xdc,0xad, - 0xf4,0x45,0x91,0xb6,0x67,0xf3,0x9f,0xce,0x7c,0xad, - 0x12,0x38,0xce,0x55,0xda,0x0d,0x74,0x23,0x7d,0x13, - 0xf1,0x2a,0x6b,0x5f,0x8e,0xce,0x99,0xc5,0x6d,0x81, - 0x65,0xf9,0x78,0x14,0x75,0x6b,0xd8,0x30,0x60,0xec, - 0x76,0x28,0xd8,0x53,0x06,0xc3,0x89,0xae,0xe8,0x3c, - 0x01,0x05,0xa6,0xea,0x5e,0x98,0xcb,0xb4,0xf3,0x34, - 0x95,0xb0,0xc5,0xfd,0x90,0x9c,0xe7,0x12,0x47,0x68, - 0x00,0x20,0xa4,0xdf,0x7a,0x5e,0xa6,0x11,0x96,0xfd, - 0x33,0x08,0x98,0x92,0xf3,0x5c,0xda,0x6d,0xb7,0x80, - 0x31,0xaf,0x12,0x7e,0x04,0xa5,0xca,0x36,0x0a,0x1c, - 0x57,0xe4,0xf7,0x62,0x54,0xe0,0xb8,0xf5,0x73,0x9d, - 0x45,0xfb,0x74,0x02,0xff,0xed,0x7a,0xe4,0x65,0x09, - 0xf4,0x79,0x1b,0xe5,0xe1,0x1c,0xe7,0x50,0x0b,0xce, - 0x00,0xf8,0xb0,0x85,0x50,0x1f,0xcf,0x56,0xee,0xa4, - 0x1e,0x8b,0x85,0xd0,0x5f,0xd0,0x22,0xfb,0x94,0xae, - 0x1a,0x38,0x2e,0xb4,0x30,0x90,0xd5,0xd7,0x30,0xd4, - 0x7f,0x37,0x74,0xf1,0xdf,0x09,0x9c,0x88,0xce,0x10, - 0xd6,0xe1,0xf7,0xb9,0x4e,0x42,0x8f,0x01,0x44,0xbd, - 0x57,0xb7,0xd3,0x5e,0xc0,0xc2,0x11,0x63,0x16,0x47, - 0x69,0xa1,0x9d,0x6d,0x78,0x5c,0x11,0x30,0xe7,0x21, - 0x31,0xae,0xd7,0x84,0x05,0x45,0xd6,0x42,0x03,0x3d, - 0x65,0x4a,0x53,0x0d,0x0d,0x00,0x14,0xd9,0x21,0x28, - 0xb4,0x68,0x62,0xdd,0x8a,0xb8,0xae,0x0e,0xac,0x16, - 0x30,0xee,0x9f,0x94,0xeb,0x67,0x2a,0x2f,0x6b,0x06, - 0x8e,0x2b,0x6a,0x03,0x0b,0xc2,0x8b,0xd0,0x85,0xde, - 0xeb,0x1a,0xac,0x1b,0x38,0xce,0x19,0x9d,0x11,0x1c, - 0x00,0xf8,0xb0,0x4f,0x11,0x9d,0x15,0x51,0xf5,0xf4, - 0xff,0x6e,0xa1,0xd1,0xb1,0xd0,0x5f,0xb6,0x3c,0x7c, - 0x2c,0x70,0x5c,0x51,0x2d,0x89,0xac,0x1c,0x16,0x41, - 0xe9,0x64,0xa1,0x2d,0xb5,0x3e,0x40,0x0b,0xb6,0xff, - 0xcb,0x6d,0x46,0x96,0x46,0x48,0x0f,0x65,0x08,0xcf, - 0x10,0x6a,0x87,0xb2,0x54,0x72,0xb7,0xf2,0x08,0x39, - 0xbe,0x06,0x7a,0x3f,0x2a,0x8b,0xd0,0x60,0x7a,0x51, - 0xf5,0x81,0xfa,0xa1,0xf3,0xfd,0x21,0x8a,0xaa,0x53, - 0x90,0x97,0x90,0xdd,0x7f,0x50,0x20,0xbc,0xee,0x86, - 0x12,0x1d,0x70,0xed,0xf6,0x6a,0x9e,0x13,0x89,0x10, - 0xda,0x59,0x63,0x28,0xda,0xc4,0xb0,0x68,0x9f,0x0c, - 0x1c,0xe7,0x00,0x40,0x04,0x07,0x00,0x3e,0xac,0x09, - 0xe7,0xff,0xbb,0x85,0x06,0x00,0x42,0x17,0xe1,0x79, - 0xd8,0x20,0x70,0x9c,0x53,0x7d,0x9a,0x6b,0x08,0xba, - 0xe1,0xf9,0x78,0xe0,0xf8,0x09,0x28,0xd0,0x77,0x6d, - 0x6e,0x33,0xb2,0xb4,0xc6,0x05,0x8e,0x5b,0x94,0xb0, - 0x16,0x50,0x66,0xed,0x36,0x88,0xf0,0x9f,0xcd,0x32, - 0x05,0x00,0x1e,0x22,0x6c,0xf7,0xf8,0x23,0x79,0x4f, - 0xa4,0x17,0xa1,0x8b,0xbe,0xd9,0xd4,0x2f,0x03,0x60, - 0xe7,0x80,0x31,0x55,0x6f,0x51,0x1d,0x2a,0x4e,0x06, - 0x4a,0x91,0xbf,0x5f,0x71,0x5e,0x7b,0xa1,0xdc,0x66, - 0x51,0x2f,0x5b,0x07,0x8c,0x19,0x4f,0xb1,0x81,0x9f, - 0x4a,0x70,0x00,0xe0,0xc3,0xa2,0x02,0x00,0xaf,0x93, - 0xef,0xd9,0x96,0x76,0x7a,0x8a,0xb0,0x08,0x79,0xe8, - 0xc2,0x2a,0x6b,0x0b,0xa0,0x62,0x22,0x51,0x26,0xe2, - 0x5e,0x9f,0x4d,0xd5,0x17,0x55,0xfb,0x0f,0xfd,0x19, - 0x7d,0x11,0x45,0x8f,0x8b,0xa8,0x08,0x6c,0xe1,0x42, - 0x5b,0x91,0x41,0xb9,0xce,0x4f,0x9b,0x75,0x8b,0xd3, - 0x86,0xae,0x4c,0x1d,0x6c,0x26,0x13,0xd6,0xc1,0x60, - 0x4d,0x8a,0xc9,0x7a,0x09,0x0d,0x00,0xbc,0x9e,0xeb, - 0x2c,0xda,0x2f,0xe4,0x78,0x2a,0xa8,0x86,0x4a,0xcf, - 0x9e,0xe9,0x75,0x14,0xa7,0x06,0x45,0x91,0x41,0xe2, - 0x38,0x45,0xb4,0x8b,0xac,0xab,0x51,0x15,0x83,0x81, - 0x4f,0x04,0x8c,0xab,0xcb,0x46,0x6d,0xae,0x5c,0x04, - 0x70,0xae,0x15,0x89,0x8e,0x6a,0xdf,0x4a,0x7d,0xce, - 0x56,0xcd,0x42,0xc5,0x0c,0xa3,0x2a,0x69,0x8f,0x44, - 0xdf,0x9b,0x76,0x2f,0xb2,0xb7,0x20,0xac,0xd0,0xcf, - 0x6d,0x79,0x4f,0xc4,0x4a,0xeb,0x3c,0xc2,0x76,0x45, - 0x00,0x9e,0x40,0x3f,0xeb,0x4d,0xef,0x0b,0xdb,0x17, - 0x15,0xd1,0x59,0xba,0xeb,0xb1,0x54,0x8f,0x3f,0x97, - 0x46,0xad,0x10,0xcf,0x2b,0x6a,0x82,0xc4,0x6b,0xef, - 0x57,0x97,0xf7,0x63,0xab,0x97,0xd0,0xda,0x39,0xb3, - 0xd1,0x6e,0x55,0x99,0xdc,0x8f,0xce,0x9b,0xb7,0x32, - 0x04,0x58,0x8b,0xf6,0x6f,0x88,0x84,0xb4,0xff,0x82, - 0xe4,0xed,0xc8,0xca,0x6a,0x6b,0xc2,0xee,0xd7,0x9b, - 0x72,0x3f,0x14,0xd2,0xc6,0xba,0xdb,0x22,0x28,0xb0, - 0x55,0x84,0x38,0x8b,0x7a,0xd7,0x22,0x8a,0xb6,0x13, - 0x61,0x01,0x9d,0x7f,0xe4,0x3d,0x91,0x3a,0x70,0x00, - 0x60,0xae,0x26,0xa5,0xff,0x77,0xbb,0x95,0xb0,0x56, - 0x5a,0x9f,0x06,0x2e,0xcc,0x79,0x2e,0x3d,0x6d,0x1b, - 0x38,0xae,0x6e,0xff,0x26,0x16,0xe6,0x7b,0xa8,0x7a, - 0x7f,0x88,0x47,0xd0,0xcf,0xf0,0x84,0xfc,0xa6,0x53, - 0x09,0x97,0xa2,0x56,0x75,0x51,0x99,0x5f,0x1f,0x50, - 0x6c,0x00,0x20,0xce,0x59,0xc8,0x32,0xa5,0x4f,0x9b, - 0x75,0x0b,0x3d,0x3a,0xf7,0x0a,0xe5,0xeb,0x0a,0x71, - 0x0b,0xb0,0x7f,0xc0,0xb8,0x4f,0xd1,0xfe,0x00,0x40, - 0x68,0xe1,0xcf,0x17,0xf3,0x9c,0x44,0x01,0x42,0x5b, - 0x9e,0x36,0x25,0xbb,0x2d,0xce,0xfb,0xfe,0xa2,0xa8, - 0xf8,0x6a,0x11,0x96,0x8c,0x31,0x36,0x4e,0xe6,0x5b, - 0x53,0x85,0xb4,0x77,0x9e,0x83,0xd7,0x05,0x41,0x7c, - 0x04,0x60,0xae,0x90,0x00,0x40,0xdd,0xce,0x56,0x85, - 0x46,0x8b,0x77,0xc9,0x75,0x16,0xf3,0xb7,0x7b,0xe0, - 0xb8,0x26,0x14,0xbc,0xb1,0x0f,0xdb,0x17,0x38,0x25, - 0x70,0xec,0x28,0x74,0xa3,0xda,0xf4,0xc5,0x3f,0xe8, - 0x4c,0x5c,0xc8,0x7b,0x7e,0x68,0x7b,0xa5,0xbc,0xac, - 0x10,0x38,0x6e,0x06,0xde,0x35,0x31,0x19,0x80,0xda, - 0xda,0x6e,0x89,0xfa,0x4a,0x87,0x16,0x04,0xcd,0x4b, - 0xc8,0x39,0x55,0x28,0x67,0x01,0xdb,0x5b,0xd0,0x4d, - 0x74,0x94,0x5d,0xf3,0x9e,0xc8,0x7c,0x84,0x06,0x00, - 0x1e,0xcd,0x75,0x16,0xed,0xb7,0x45,0xe0,0xb8,0x07, - 0x72,0x9d,0x45,0x79,0xbc,0x4b,0x78,0xf6,0xd7,0x12, - 0x79,0x4e,0x24,0xc2,0xb2,0x81,0xe3,0x66,0x03,0x93, - 0xf2,0x9c,0x48,0x0d,0x2c,0x0a,0x7c,0x36,0x60,0xdc, - 0x5d,0x84,0x17,0x5f,0x6c,0x34,0x67,0x00,0x48,0x5f, - 0xb4,0x48,0x68,0xe5,0x09,0xea,0x57,0x54,0x62,0x34, - 0xda,0x81,0x88,0x3a,0xaf,0xb8,0x1d,0xb0,0x18,0xed, - 0xfb,0xa5,0xfa,0x04,0xba,0x99,0x8b,0xf2,0x30,0xe1, - 0x05,0xc3,0xac,0x1e,0xd6,0x27,0x3c,0x1b,0xe5,0x71, - 0x60,0x7b,0xe0,0x9d,0xfc,0xa6,0x53,0x29,0xa1,0xbb, - 0x75,0x4b,0xa0,0x33,0xbe,0x4f,0xe6,0x38,0x97,0x56, - 0x42,0x3b,0x8f,0x94,0xe9,0x77,0x7f,0x3c,0x70,0x77, - 0xd1,0x93,0x98,0xc7,0xe2,0x44,0xb7,0x0c,0x9b,0x03, - 0xdc,0x1b,0x78,0xbd,0x27,0xd2,0x4d,0x27,0x33,0x6b, - 0xa3,0xec,0xb0,0x15,0x80,0xe5,0xe7,0xf9,0x73,0x29, - 0x3e,0x7c,0x26,0xfd,0x4e,0x14,0x0c,0x28,0xc2,0x42, - 0x84,0xb7,0x23,0x2d,0xe3,0x8e,0xed,0x04,0xb4,0x90, - 0x8c,0x3a,0x6b,0xbb,0x25,0xea,0xc7,0xdd,0xae,0xfb, - 0xa2,0xbe,0x84,0x07,0x00,0xca,0x18,0x58,0x49,0x6a, - 0x41,0xe0,0xa3,0x01,0xe3,0xde,0xa0,0xb8,0x9d,0xee, - 0x76,0x9b,0x81,0x7e,0xee,0x42,0x16,0xd8,0x1b,0x51, - 0xdc,0x46,0x51,0x68,0xab,0xc2,0x32,0x66,0x02,0x95, - 0xcd,0xc1,0x84,0x75,0x56,0xf9,0x5d,0xde,0x13,0xa9, - 0x0b,0x07,0x00,0x64,0x23,0xa2,0x8b,0xcb,0xd4,0x71, - 0xa7,0xb9,0x13,0xb8,0x12,0x38,0x3e,0x62,0x5c,0x7f, - 0xe0,0x4b,0xc0,0xd9,0xb9,0xcf,0x48,0x0e,0x0a,0x1c, - 0xf7,0xfb,0x5c,0x67,0x61,0x65,0xb3,0x10,0x3a,0x9f, - 0x1e,0x72,0xae,0x6e,0x2c,0x0a,0x5c,0xbd,0x9d,0xeb, - 0x8c,0xaa,0xe5,0xae,0x18,0x63,0x0f,0x04,0x4e,0xc8, - 0x6b,0x22,0x11,0x36,0x0b,0x1c,0x37,0x36,0xd7,0x59, - 0xc4,0xf3,0xa7,0xae,0x47,0x59,0x7c,0x01,0xb8,0x22, - 0x62,0xcc,0x54,0xc2,0xbf,0xd7,0x65,0xb1,0x26,0x70, - 0x56,0xc0,0xb8,0xcd,0x68,0xef,0xe2,0x74,0x5e,0x5f, - 0x26,0xbc,0xf0,0xd8,0x7f,0xf2,0x9c,0x48,0x0a,0x57, - 0x11,0x1d,0x00,0xe8,0x03,0x1c,0x89,0x8e,0x63,0xb5, - 0xc3,0xce,0x84,0xed,0xe6,0xce,0x02,0xee,0xcb,0x79, - 0x2e,0xed,0xb4,0x31,0x61,0x99,0x5b,0x0f,0xe6,0x3d, - 0x91,0x92,0x79,0x9e,0xb0,0x00,0x40,0x68,0x30,0x2e, - 0x0f,0xa1,0x05,0x8a,0x9f,0xcf,0x75,0x16,0xd9,0xe9, - 0x83,0xea,0x82,0xad,0x81,0xea,0x84,0xfc,0x9d,0xf6, - 0x04,0x87,0x07,0x02,0x47,0x07,0x8c,0x9b,0x4a,0xb9, - 0x3e,0x87,0x4b,0xcd,0x47,0x00,0xa4,0x89,0xe7,0xff, - 0xbb,0xfd,0x31,0x70,0xdc,0x71,0x28,0x02,0x9f,0xb7, - 0x25,0x81,0xfd,0x02,0xc6,0xcd,0x26,0xfa,0x06,0xd7, - 0xea,0xe5,0x7c,0xc2,0xda,0x4f,0xbd,0x8b,0x8a,0xc5, - 0x34,0xbd,0xe0,0x5f,0x4f,0x2f,0x03,0x63,0x02,0xc7, - 0xee,0x47,0xbc,0x0a,0xc6,0x59,0x19,0x4e,0x78,0xfa, - 0xb6,0xdb,0x7f,0x36,0x4f,0xe8,0x82,0xb9,0x0f,0x70, - 0x68,0x9e,0x13,0xe9,0x45,0x5f,0xe0,0xd8,0xc0,0xb1, - 0x6f,0x50,0xde,0x85,0xea,0x1f,0x08,0x2b,0xb4,0x76, - 0x04,0xe1,0x95,0xf9,0xd3,0x3a,0x22,0x70,0xdc,0x3d, - 0xd4,0x2b,0x9d,0x3a,0xf4,0xfd,0xb0,0x69,0x7d,0xcf, - 0x47,0x05,0x8e,0xdb,0x84,0x62,0x3e,0xcb,0xfa,0x02, - 0x5b,0x05,0x8e,0x2d,0x5b,0x26,0x50,0x3f,0x60,0x3d, - 0x14,0x48,0xfe,0x21,0x0a,0x08,0x3e,0x8a,0xea,0x14, - 0x8c,0x01,0x6e,0x00,0x7e,0x46,0xf8,0x7b,0x5d,0x5a, - 0x47,0x10,0x76,0x34,0xf0,0x5a,0x8a,0x2b,0xf8,0x58, - 0x39,0x0e,0x00,0x48,0x54,0x00,0x60,0x06,0x4a,0x29, - 0xac,0xa3,0x87,0x09,0x3b,0x2f,0xb7,0x22,0x3a,0x5b, - 0x99,0xb7,0x6f,0x11,0xb6,0x7b,0x72,0x13,0x5e,0xe0, - 0x35,0xc9,0x67,0x81,0x2f,0x06,0x8c,0x9b,0x0d,0xec, - 0x49,0x58,0x2b,0xab,0x26,0xfa,0x5b,0xe0,0xb8,0x25, - 0x81,0xaf,0xe4,0x39,0x91,0x5e,0x1c,0x49,0x78,0x7b, - 0xb1,0x32,0xa5,0xdc,0x5b,0x7b,0xbc,0x8a,0x8a,0x7a, - 0x86,0xf8,0x3a,0x3a,0x0a,0xd1,0x4e,0xfb,0x13,0x5d, - 0x41,0xbf,0xdb,0x5f,0x08,0x3b,0x6b,0x5f,0x84,0xb7, - 0x80,0xeb,0x03,0xc6,0x2d,0x4a,0x7b,0x32,0x00,0x56, - 0x45,0xc7,0xb9,0x42,0x84,0xcc,0xbb,0x4a,0x42,0x0b, - 0x4a,0x36,0xed,0x33,0x2f,0x34,0xa3,0x6d,0x41,0xb4, - 0x90,0x6d,0xb7,0xed,0x50,0x07,0x82,0x10,0x65,0xfb, - 0x2c,0x5b,0x00,0x05,0x25,0xae,0x00,0x4e,0x02,0xf6, - 0x46,0x6d,0xb9,0x7b,0x66,0x5f,0x7e,0x1e,0xb5,0xe6, - 0xcb,0xd3,0xe2,0xc0,0x89,0x01,0xe3,0x3a,0x81,0x9f, - 0xe6,0x3c,0x97,0x5a,0x71,0x00,0x40,0x15,0xa7,0xa3, - 0x8a,0x5e,0xdd,0x43,0xbd,0x2b,0x74,0x9e,0x19,0x38, - 0xee,0x27,0x28,0x0d,0x3b,0x2f,0x6b,0x00,0xc7,0x04, - 0x8e,0x3d,0x23,0xc7,0x79,0x58,0xb9,0x0c,0x23,0xbc, - 0x2a,0xfd,0xc9,0x34,0xa7,0x15,0x52,0x12,0xa1,0x19, - 0x3f,0x00,0xa7,0x01,0xcb,0xe4,0x35,0x91,0xf9,0x58, - 0x86,0xf0,0xdf,0xff,0xe9,0xd4,0x37,0x28,0x6b,0xad, - 0x5d,0x13,0x38,0x6e,0x41,0xb4,0x7b,0xd5,0x2e,0xcb, - 0xa0,0x5d,0xb1,0x50,0xe7,0xe7,0x35,0x91,0x8c,0xfc, - 0x22,0x70,0xdc,0x57,0x09,0x4f,0x75,0x4e,0xa2,0x03, - 0xd5,0x7d,0x09,0x09,0x0c,0xce,0xa2,0x7e,0x47,0x03, - 0xd7,0x09,0x1c,0xf7,0x6c,0xae,0xb3,0x28,0x9f,0xdb, - 0x50,0xca,0x77,0x88,0x6f,0x12,0x1e,0x58,0xce,0x4a, - 0x68,0xc6,0xca,0x7b,0xc0,0xbf,0xf2,0x9c,0x48,0x02, - 0x53,0x80,0xdb,0x03,0xc6,0x0d,0x43,0xd9,0xc1,0x79, - 0xfa,0x35,0x61,0x81,0xdc,0x1b,0x81,0xc7,0x72,0x9e, - 0x4b,0xad,0x38,0x00,0xa0,0xe2,0x7f,0x51,0xb5,0x10, - 0xea,0x9a,0xfe,0xdf,0xed,0x4a,0xc2,0xfa,0xe6,0x2e, - 0x4d,0x7e,0x75,0x00,0x06,0x02,0x97,0x11,0x96,0xaa, - 0x75,0x37,0xf1,0xce,0x33,0x5b,0xb5,0x9d,0x4c,0xd8, - 0x59,0xbf,0x7f,0x03,0xff,0x97,0xeb,0x4c,0xaa,0x6f, - 0x14,0xe1,0x3b,0xa8,0xc3,0xd0,0x8d,0x77,0x3b,0x8e, - 0xfe,0x74,0x00,0xbf,0x21,0x3c,0xc0,0x78,0x13,0xf5, - 0x4a,0xf3,0xb5,0x70,0x97,0x11,0x5e,0x30,0xeb,0x48, - 0x60,0x8f,0x1c,0xe7,0xd2,0x6d,0x00,0x70,0x35,0xe1, - 0x3b,0x7e,0x77,0x10,0xfe,0x7b,0x58,0x94,0xff,0xa0, - 0xf7,0xd4,0x28,0xfd,0xd0,0x91,0x81,0x38,0xed,0x3b, - 0xe3,0x38,0x9a,0xf0,0x82,0x8e,0x7f,0x03,0x5e,0xcf, - 0x69,0x1e,0x45,0x18,0x8a,0xb2,0x2f,0x43,0x34,0x2d, - 0x00,0x30,0x85,0xf0,0x6c,0x8f,0xb5,0xd0,0x2e,0x76, - 0xbb,0x7c,0x82,0xb0,0x8a,0xf5,0x00,0x7f,0x25,0x3c, - 0x90,0xd1,0x4e,0xa1,0x47,0x6c,0xbf,0x89,0xd6,0x06, - 0x79,0x38,0x84,0xf0,0x7f,0xb7,0x1f,0xe7,0x34,0x87, - 0xda,0xca,0x2a,0x00,0xf0,0x08,0x4a,0xbf,0x88,0x7a, - 0x3c,0x9d,0xd1,0xeb,0x65,0x29,0xe4,0xfc,0x7f,0x1d, - 0x0b,0x00,0xce,0x6b,0x26,0xda,0xed,0x0b,0xb1,0x1f, - 0x8a,0xf8,0x67,0xed,0x5c,0x60,0xc3,0xc0,0xb1,0x3f, - 0xc8,0xe1,0xf5,0xad,0x9c,0x56,0x06,0x8e,0x0a,0x18, - 0x37,0x1d,0x7d,0x58,0x94,0x35,0xa5,0xb6,0x4c,0xe2, - 0x64,0xcf,0x7c,0x06,0xb8,0x94,0xfc,0x83,0xc5,0x67, - 0xa1,0x22,0x5f,0xa1,0x2e,0xca,0x6b,0x22,0x56,0x7a, - 0xaf,0x00,0xd7,0xc5,0x18,0x7f,0x09,0xf9,0xee,0x50, - 0xf7,0x47,0x0b,0xe0,0x38,0x05,0x15,0xdb,0x99,0x99, - 0x90,0xc6,0xc9,0x81,0xe3,0x56,0x45,0x99,0x19,0x03, - 0x32,0x7e,0xfd,0x0d,0x51,0xe6,0x61,0xa8,0x38,0x63, - 0xab,0x60,0x4d,0xc2,0x76,0xae,0xdf,0x40,0x0b,0xe2, - 0xa6,0xb9,0x20,0xc6,0xd8,0x0b,0x09,0x3f,0x9e,0x93, - 0xc6,0x02,0xc0,0xc5,0x31,0xc6,0x87,0x66,0x37,0xb6, - 0xdb,0x35,0x84,0x9d,0xa7,0x5f,0x08,0x6d,0x22,0x66, - 0xbd,0x51,0xb0,0x2d,0xda,0xfd,0x0f,0xf1,0x3b,0xca, - 0x5b,0x4f,0xa5,0xb4,0x9c,0x01,0x10,0x1d,0x00,0x78, - 0x9b,0x7a,0xb5,0x94,0xe9,0xcd,0x05,0x84,0xb7,0x09, - 0xfb,0x39,0x61,0x15,0x39,0x43,0x74,0xa0,0x37,0xc0, - 0xd0,0xca,0xff,0xd7,0xe2,0x14,0xef,0x26,0xf9,0x09, - 0x61,0x59,0x21,0x67,0x50,0x9d,0x4a,0xba,0x45,0xbb, - 0x9a,0xf0,0xdf,0x75,0x50,0xed,0x8f,0x2b,0xc8,0x67, - 0x87,0x6f,0x18,0x4a,0xd9,0xfd,0x5a,0x8c,0xe7,0x3c, - 0x8a,0xd2,0xfd,0xac,0xb9,0x7e,0x88,0xea,0x7d,0x84, - 0x58,0x10,0xed,0x64,0x7f,0x26,0x87,0x79,0x2c,0x8a, - 0x76,0x21,0xf7,0x8c,0xf1,0x9c,0x3f,0x53,0xbe,0x94, - 0xdf,0xde,0xdc,0x41,0x78,0x55,0xed,0x6d,0xd1,0x6e, - 0x66,0x56,0x67,0x82,0x37,0x02,0x6e,0x8e,0x71,0xbd, - 0xbf,0x50,0xbf,0x4a,0xf8,0xab,0x04,0x8e,0x6b,0xea, - 0x67,0xdf,0xed,0x84,0xb7,0x32,0x5d,0x08,0xfd,0x8c, - 0x84,0x74,0x92,0x48,0xaa,0x1f,0x5a,0x0c,0xaf,0x11, - 0x38,0xfe,0x4e,0xca,0x77,0xfe,0xbf,0xdb,0x07,0x84, - 0xb7,0x5c,0xde,0x92,0x6c,0xb3,0x05,0x77,0x45,0xef, - 0xab,0x21,0xf7,0x7e,0x93,0x28,0xae,0x63,0x51,0xa8, - 0x52,0x6e,0x92,0x37,0x3d,0x00,0xb0,0x12,0xd1,0xfd, - 0xe6,0x6f,0xa3,0x19,0xbb,0x8a,0xb3,0x09,0xaf,0xe8, - 0xd9,0x81,0x8e,0x02,0xfc,0x16,0xa5,0xa8,0x25,0xb5, - 0x0c,0xca,0xae,0x38,0x3c,0x70,0xfc,0x07,0xa8,0xb0, - 0x93,0x35,0xc3,0x7a,0x84,0xa5,0xef,0xbe,0x83,0x8b, - 0xbf,0xc4,0x31,0x9b,0xf0,0xb3,0xf6,0xdd,0xf6,0x46, - 0xed,0x7e,0xb2,0x5c,0x44,0xed,0x00,0x3c,0x8e,0xda, - 0xa6,0xc5,0xf1,0xdd,0x0c,0xe7,0x60,0xd5,0xf4,0x04, - 0xfa,0xfc,0x09,0x35,0x04,0xdd,0xfc,0xff,0x8a,0xec, - 0xaa,0xd6,0xef,0x8a,0x6e,0xec,0x42,0x8b,0xd3,0x81, - 0x3a,0x94,0xe4,0x7d,0x66,0x36,0x6b,0xc7,0xa2,0x79, - 0x87,0xd8,0x01,0x2d,0xc8,0x56,0x4d,0xf9,0x9a,0x5f, - 0x41,0x41,0x9b,0xc5,0x02,0xc7,0x7f,0x40,0xf9,0x17, - 0x01,0x49,0x8c,0x0c,0x1c,0x57,0xa7,0x63,0x0f,0x71, - 0x9d,0x80,0x16,0x4f,0x21,0x56,0x43,0x85,0xaf,0xf3, - 0x68,0x7f,0xba,0x18,0x3a,0x9a,0xb6,0x4b,0xe0,0xf8, - 0x39,0x94,0xff,0x67,0xf6,0x2c,0x60,0x5a,0xe0,0xd8, - 0x83,0x50,0x70,0x33,0xcd,0xfb,0x6b,0x7f,0xe0,0x54, - 0xb4,0xd1,0x17,0xd2,0xee,0x19,0xd4,0xc6,0xfc,0xcd, - 0x14,0xaf,0xd9,0x58,0x51,0x67,0xdf,0xeb,0xae,0xc9, - 0xed,0xff,0xe6,0xe7,0xdf,0x68,0x61,0x1f,0xba,0x38, - 0x38,0x18,0xdd,0xfc,0x9c,0x86,0x52,0x9e,0x42,0xdf, - 0x28,0x16,0x46,0x37,0x15,0x5f,0x27,0xde,0xae,0xe2, - 0x31,0xc0,0xb8,0x18,0xe3,0x8b,0xb0,0x29,0xe9,0x6f, - 0x7e,0xe6,0x15,0x12,0x51,0x1d,0x08,0x1c,0x90,0xd1, - 0xeb,0x8d,0x23,0xac,0xf8,0x4b,0x3b,0x7c,0x27,0x70, - 0xdc,0x23,0xb4,0xe7,0x9c,0x6f,0x52,0x77,0x03,0xcf, - 0x15,0x3d,0x89,0x1e,0xee,0x00,0xce,0x21,0x5e,0x26, - 0xcf,0xb2,0x28,0x2a,0xff,0x08,0x8a,0xf6,0xe6,0xbd, - 0xad,0xcd,0x00,0x00,0x20,0x00,0x49,0x44,0x41,0x54, - 0xff,0x81,0xf8,0x2d,0x77,0x86,0x02,0x5f,0x42,0x67, - 0xb3,0xd7,0x8d,0xf9,0x5c,0x50,0x26,0xc2,0x4d,0x09, - 0x9e,0x67,0xf5,0xf3,0x4d,0x60,0x47,0xc2,0xda,0x43, - 0x81,0xde,0x4b,0x8f,0x41,0xdd,0x44,0xce,0x06,0x2e, - 0x07,0x5e,0x88,0xf9,0x9a,0x03,0xd0,0x51,0x95,0xaf, - 0x93,0x6c,0x11,0x71,0x30,0xe5,0xff,0x0c,0xeb,0xe9, - 0x75,0xf4,0x7d,0xbb,0x3c,0x70,0xfc,0x3a,0xa8,0x18, - 0xd7,0x59,0x5d,0x8f,0x09,0x31,0x5e,0x6b,0x4b,0xe0, - 0x47,0xc0,0x16,0x71,0x26,0x88,0x82,0x82,0x75,0xdc, - 0x05,0x0f,0x3d,0xff,0xff,0x46,0xae,0xb3,0x28,0xb7, - 0xbb,0x51,0xaa,0x78,0xe8,0x67,0xd9,0xb2,0x28,0x03, - 0xe7,0x4c,0xe0,0x97,0xa4,0xef,0x26,0xd5,0x17,0x65, - 0xc9,0x9d,0x0e,0x2c,0x15,0xe3,0x79,0xbf,0x06,0x1e, - 0x48,0xf9,0xda,0x79,0x7b,0x0d,0x15,0x36,0x0d,0xed, - 0xf4,0xb1,0x0b,0xea,0x46,0xf1,0x6d,0x74,0x7f,0x30, - 0x23,0xf0,0x79,0x1d,0x28,0x8b,0xea,0x64,0x74,0xec, - 0x25,0xd4,0x1f,0x88,0x17,0x08,0xb6,0x79,0x74,0x74, - 0x76,0x86,0x06,0xce,0x5a,0x7a,0x84,0xb0,0x9b,0xb9, - 0x67,0x68,0xcf,0x19,0x9c,0x50,0x7f,0x06,0x76,0x8b, - 0x18,0x33,0x12,0x78,0x29,0xff,0xa9,0x94,0xc6,0x00, - 0xd4,0xf5,0x60,0x83,0x98,0xcf,0x9b,0x82,0xd2,0x72, - 0xef,0x44,0x1f,0xfe,0xe3,0xd1,0xe2,0xa0,0x03,0xa5, - 0x5e,0xad,0x80,0x76,0x74,0xb7,0x41,0x41,0x83,0xb8,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30,0x74,0x4f,0xbc,0x2a,0x5a,0xcc,0x85,0x1e,0x4f, - 0xe9,0xe9,0x15,0xb4,0xf1,0x58,0x85,0xc5,0x3f,0xe8, - 0x78,0xcd,0xbe,0xe8,0x3e,0x21,0xce,0x9a,0x71,0x31, - 0x54,0xc0,0x79,0xde,0x22,0xce,0x33,0x50,0x07,0x97, - 0xb4,0x75,0x42,0x5e,0x44,0xc7,0x8d,0xaa,0xb0,0xf8, - 0x2f,0xad,0x26,0x07,0x00,0x36,0x26,0x3a,0x92,0xdf, - 0xa4,0xf4,0xff,0x79,0xbd,0x88,0x76,0xea,0xef,0x00, - 0x96,0x2c,0x76,0x2a,0x3c,0x88,0xd2,0x3c,0x3f,0x28, - 0x78,0x1e,0xd6,0x5e,0xed,0xee,0xd9,0xdb,0x54,0x6f, - 0xa1,0xe2,0x5d,0x37,0xa3,0x1d,0x8d,0x32,0x9a,0x80, - 0x76,0x5e,0x9f,0x2c,0x7a,0x22,0x56,0x4a,0xbf,0x47, - 0xc1,0xa8,0xdf,0x52,0xce,0xa0,0xe1,0x2f,0x80,0x6f, - 0x14,0x3d,0x89,0x0c,0xcc,0x42,0xad,0xcd,0xae,0x27, - 0x5e,0x10,0xa0,0xa7,0x05,0xb2,0x99,0x0e,0xff,0x45, - 0xef,0x0b,0xef,0x65,0x74,0xbd,0x32,0x0a,0xe9,0x7f, - 0x0e,0x0e,0x00,0x80,0x76,0x98,0x37,0x07,0x6e,0x25, - 0xbc,0x78,0xe2,0xbc,0xfa,0xa0,0x76,0x81,0x6b,0x65, - 0x39,0xa9,0x1e,0x5e,0x42,0xbf,0x3b,0x21,0x6d,0xb7, - 0xcb,0xe4,0x5e,0x74,0x6c,0x2f,0xb4,0x28,0x60,0x6f, - 0x06,0x90,0xbe,0x53,0xc8,0x2b,0xe8,0x7b,0xf8,0x72, - 0xca,0xeb,0x34,0x5e,0x19,0x3f,0x2c,0xdb,0xc5,0xe7, - 0xff,0x5b,0x7b,0x1a,0x05,0x01,0x5e,0x2c,0x70,0x0e, - 0xff,0x42,0xc7,0x05,0xe2,0x9e,0x33,0x36,0xb3,0x70, - 0xe3,0x81,0x4f,0x12,0xde,0x53,0xb9,0x9d,0x9e,0x44, - 0x67,0xad,0x1f,0x2e,0x7a,0x22,0x56,0x6a,0x97,0xa0, - 0x0c,0x91,0xd0,0x62,0x75,0xed,0x30,0x03,0xa5,0xcc, - 0x1f,0x47,0x7d,0x0a,0x09,0x7f,0x80,0xb2,0x86,0x8a, - 0x7e,0xaf,0xb8,0x17,0xa5,0x0e,0xd7,0xfd,0xec,0x7b, - 0xe8,0x2e,0x73,0x9d,0x83,0x20,0x71,0x8c,0x43,0x9f, - 0x65,0x65,0xec,0x14,0x75,0x2f,0x9a,0xdb,0xd8,0xa2, - 0x27,0x92,0xd0,0x6f,0x80,0x6f,0x15,0x3c,0x87,0x87, - 0xd0,0xb1,0xaf,0xb8,0xb5,0x5b,0x6c,0x3e,0x1c,0x00, - 0xe8,0xdd,0x2c,0xaa,0xd3,0xaa,0x27,0x2f,0x8f,0xa3, - 0x33,0x55,0xb7,0x16,0xf0,0xda,0x67,0xa1,0xb3,0x6f, - 0xef,0x14,0xf0,0xda,0x66,0x4d,0x33,0x05,0x2d,0xa0, - 0x8e,0xa0,0x1c,0x69,0x75,0x9d,0xc0,0x45,0xe8,0x8c, - 0xdf,0x33,0x05,0xcf,0xc5,0xaa,0xe1,0x46,0xf4,0x79, - 0x75,0x67,0xd1,0x13,0x41,0xa9,0xe9,0x1b,0x11,0xde, - 0xc7,0xba,0x4a,0xba,0xd3,0xad,0xbf,0x4b,0x78,0x2b, - 0xc6,0x2c,0xfd,0x0a,0x15,0x0b,0xac,0xfb,0x71,0xa0, - 0x05,0x50,0x81,0xdf,0x10,0xd3,0xf3,0x9c,0x48,0xc5, - 0xbc,0x85,0xee,0xef,0xbf,0x47,0x39,0xd2,0xec,0x67, - 0xa3,0x42,0x7a,0x5b,0xa2,0x60,0x7b,0x95,0x9d,0x81, - 0xaa,0xfd,0x17,0xf1,0x7d,0xfd,0x1d,0xda,0x0c,0xf0, - 0xce,0x7f,0x46,0x9a,0x1a,0x00,0x18,0x46,0x74,0xe1, - 0xab,0x07,0x08,0x2f,0x08,0x52,0x67,0x13,0xd1,0x59, - 0x9b,0x63,0x68,0xcf,0xee,0xca,0xd3,0xe8,0xcd,0xfb, - 0x1b,0x14,0x73,0x73,0x61,0xd6,0x64,0xe7,0xa3,0x33, - 0x8e,0x17,0x53,0xdc,0xae,0xe5,0x28,0xf4,0x41,0xff, - 0x15,0xca,0x11,0x8c,0xb0,0xea,0x18,0x83,0x76,0x86, - 0x0f,0xa1,0x98,0x9b,0xed,0xb7,0x80,0xaf,0x01,0x1b, - 0x02,0x8f,0x16,0xf0,0xfa,0xed,0xd2,0x89,0x8a,0x1a, - 0x6e,0x86,0x8e,0xe9,0xb5,0xc3,0x53,0xe8,0xb8,0xd2, - 0x57,0x99,0x5b,0x48,0xb0,0xce,0x42,0x17,0xff,0xe0, - 0x00,0x40,0x4f,0x73,0x80,0x1f,0xa3,0xe2,0x9d,0xd7, - 0x51,0x5c,0x8d,0x88,0x3b,0x50,0x41,0xed,0x13,0xa8, - 0xcf,0xcf,0xec,0x25,0x68,0xfd,0xd4,0xae,0x0d,0xd2, - 0xb1,0x28,0xeb,0x68,0x7f,0xca,0x11,0xd0,0xa9,0x8d, - 0xa6,0x06,0x00,0xb6,0x21,0xba,0xbd,0x5a,0x93,0xd3, - 0xff,0x7b,0x9a,0x8d,0x5a,0x86,0xad,0x8a,0xa2,0xef, - 0x53,0x72,0x78,0x8d,0x97,0xd0,0x8d,0xd3,0x3a,0xf8, - 0x7b,0x6f,0x56,0xa4,0x57,0x51,0x61,0xb5,0xd5,0x50, - 0xe5,0xef,0x3c,0x7e,0xdf,0x7b,0x9a,0x83,0x2a,0x5e, - 0x6f,0x87,0x16,0x4f,0xf7,0xb4,0xe1,0x35,0xad,0x9e, - 0x3a,0x51,0x3d,0x80,0x95,0x51,0x01,0xaa,0x76,0xd4, - 0x8e,0x78,0x16,0x05,0xad,0x3f,0x82,0x5a,0x8b,0x85, - 0xb6,0xbf,0xaa,0xba,0xfb,0x50,0x3d,0xa5,0xfd,0xd0, - 0x02,0x3d,0x0f,0xcf,0x02,0x87,0xa3,0xc2,0x6b,0x65, - 0x4c,0xed,0xce,0x8b,0x03,0x00,0xe9,0x8d,0x05,0x76, - 0x47,0xf5,0x6d,0x2e,0xa3,0x3d,0xb5,0xa4,0x66,0xa2, - 0xce,0x17,0x9b,0xa1,0x60,0x64,0x1d,0x03,0x81,0xff, - 0x45,0xe7,0xf0,0x77,0x23,0xbf,0x0c,0xbd,0x71,0xc0, - 0xf1,0x28,0x88,0x73,0x63,0x4e,0xaf,0xd1,0x68,0x4d, - 0x0d,0x00,0xf8,0xfc,0x7f,0x32,0x6f,0xa1,0xe8,0xfb, - 0x72,0xc0,0xb1,0xa8,0x53,0xc0,0xac,0x14,0xd7,0x9b, - 0x8c,0xa2,0xb3,0xbb,0x01,0x2b,0xa1,0x1b,0xa7,0xba, - 0x44,0x49,0xcd,0xaa,0xee,0x79,0xf4,0x7b,0xbe,0x14, - 0xba,0x89,0xfa,0x3d,0x0a,0x0e,0x64,0xe5,0x7d,0xb4, - 0xe8,0xff,0x1a,0x7a,0x4f,0xd9,0x1e,0xbf,0xef,0x5a, - 0x76,0xa6,0x01,0xe7,0x32,0xb7,0x85,0xdf,0x4f,0x51, - 0x86,0x59,0x56,0x9e,0x03,0x7e,0x8e,0x6e,0xf2,0x57, - 0x47,0xc7,0xd6,0xda,0x11,0x2c,0x2b,0x9b,0x4e,0xe0, - 0x72,0xd4,0x21,0x60,0x6b,0xd4,0x9b,0x7b,0x42,0xca, - 0x6b,0xbe,0x0d,0x5c,0x8a,0x0a,0x00,0xaf,0x01,0x5c, - 0x40,0xf3,0xee,0x0d,0xe2,0x14,0x4b,0x73,0x00,0xa0, - 0xb5,0x27,0x50,0xbb,0xbe,0xa5,0x80,0x7d,0x80,0xab, - 0xd1,0xfd,0x6c,0x56,0x26,0xa3,0x45,0xea,0x91,0xc0, - 0x32,0xa8,0x3d,0xe0,0xdd,0x19,0x5e,0xbf,0xac,0xfe, - 0x82,0xde,0xfb,0x3e,0x89,0x8e,0x3b,0xa5,0x2d,0x46, - 0x39,0x05,0xad,0x09,0xf6,0x42,0x6b,0x82,0x33,0xf1, - 0xae,0x7f,0x6e,0x3a,0x3a,0x3b,0xeb,0xda,0x3d,0xa5, - 0xa5,0x31,0xe8,0x87,0xab,0x37,0x93,0x51,0xf1,0x95, - 0x34,0x8b,0xdb,0xa6,0x18,0x86,0x22,0x81,0xeb,0xa1, - 0x0f,0xea,0x55,0xd1,0xf7,0x6e,0x68,0xd7,0x63,0x36, - 0x2a,0x50,0x33,0x05,0x78,0x0d,0xdd,0x80,0x3d,0x85, - 0x8e,0x58,0xdc,0x43,0xf3,0x3e,0xd4,0xcd,0xaa,0x6e, - 0x65,0x94,0xd6,0xb8,0x26,0xca,0x12,0x18,0x0e,0x2c, - 0x0d,0x2c,0xca,0xdc,0x73,0xab,0x1d,0xe8,0xa6,0x74, - 0x1a,0x3a,0x4a,0xf5,0x06,0xfa,0xfd,0x1f,0x8b,0x6e, - 0xc6,0x1e,0x47,0x85,0xfd,0xfc,0xfb,0x6f,0xed,0xb6, - 0x04,0x2a,0x24,0xf5,0x51,0xf4,0xf3,0x3b,0x12,0x2d, - 0x0c,0x16,0xe7,0xc3,0xe7,0xae,0xa7,0xa1,0xf3,0xee, - 0x93,0x50,0xe5,0xe9,0x57,0xd0,0xa2,0xff,0x61,0x54, - 0x8c,0xaa,0xea,0xe7,0x79,0xf3,0xd4,0x07,0x58,0x1f, - 0x55,0x65,0x5f,0x1d,0x7d,0x9f,0x57,0x40,0xed,0x82, - 0x87,0xa2,0xef,0xf1,0x34,0xb4,0x23,0x3b,0x11,0x65, - 0x00,0xbe,0x80,0x76,0x4b,0xef,0x45,0x3b,0x8c,0x3e, - 0x02,0x68,0x79,0xea,0x40,0xf7,0xac,0xeb,0xa1,0xf7, - 0x82,0x55,0x98,0xfb,0x59,0xb6,0x30,0x1f,0x7e,0x2f, - 0x98,0xde,0xf5,0x98,0x04,0xbc,0x8e,0x3e,0xcb,0xc6, - 0xa0,0xcf,0xb2,0xc7,0xd0,0xcf,0xad,0x7f,0x5e,0x95, - 0x59,0xdd,0xfd,0x3d,0x5d,0x0f,0x65,0x5e,0x2c,0x05, - 0x2c,0xd4,0xf5,0x58,0xb0,0x6b,0xdc,0x94,0xae,0xc7, - 0x1b,0x68,0x4d,0xf0,0x24,0x3a,0x4a,0x74,0x17,0xbe, - 0x27,0x68,0x9b,0xa6,0x06,0x00,0xcc,0xcc,0xcc,0xcc, - 0xcc,0xcc,0xcc,0x1a,0xa5,0xa9,0x47,0x00,0xcc,0xcc, - 0xcc,0xcc,0xcc,0xcc,0xcc,0x1a,0xc5,0x01,0x00,0x33, - 0x33,0x33,0x33,0x33,0x33,0xb3,0x06,0x70,0x00,0xc0, - 0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xac,0x01,0x1c,0x00, - 0x30,0x33,0x33,0x33,0x33,0x33,0x33,0x6b,0x00,0x07, - 0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x1a,0xc0, - 0x01,0x00,0x33,0x33,0x33,0x33,0x33,0x33,0xb3,0x06, - 0x70,0x00,0xc0,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xac, - 0x01,0x1c,0x00,0x30,0x33,0x33,0x33,0x33,0x33,0x33, - 0x6b,0x00,0x07,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc, - 0xcc,0x1a,0xc0,0x01,0x00,0x33,0x33,0x33,0x33,0x33, - 0x33,0xb3,0x06,0x70,0x00,0xc0,0xcc,0xcc,0xcc,0xcc, - 0xcc,0xcc,0xac,0x01,0x1c,0x00,0x30,0x33,0x33,0x33, - 0x33,0x33,0x33,0x6b,0x00,0x07,0x00,0xcc,0xcc,0xcc, - 0xcc,0xcc,0xcc,0xcc,0x1a,0xc0,0x01,0x00,0x33,0x33, - 0x33,0x33,0x33,0x33,0xb3,0x06,0x70,0x00,0xc0,0xcc, - 0xcc,0xcc,0xcc,0xcc,0xcc,0xac,0x01,0x1c,0x00,0x30, - 0x33,0x33,0x33,0x33,0x33,0x33,0x6b,0x00,0x07,0x00, - 0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x1a,0xc0,0x01, - 0x00,0x33,0x33,0x33,0x33,0x33,0x33,0xb3,0x06,0x70, - 0x00,0xc0,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xac,0x01, - 0x1c,0x00,0x30,0x33,0x33,0x33,0x33,0x33,0x33,0x6b, - 0x00,0x07,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc, - 0x1a,0xc0,0x01,0x00,0x33,0x33,0x33,0x33,0x33,0x33, - 0xb3,0x06,0x70,0x00,0xc0,0xcc,0xcc,0xcc,0xcc,0xcc, - 0xcc,0xac,0x01,0x1c,0x00,0x30,0x33,0x33,0x33,0x33, - 0x33,0x33,0x6b,0x00,0x07,0x00,0xcc,0xcc,0xcc,0xcc, - 0xcc,0xcc,0xcc,0x1a,0xc0,0x01,0x00,0x33,0x33,0x33, - 0x33,0x33,0x33,0xb3,0x06,0x70,0x00,0xc0,0xcc,0xcc, - 0xcc,0xcc,0xcc,0xcc,0xac,0x01,0x1c,0x00,0x30,0x33, - 0x33,0x33,0x33,0x33,0x33,0x6b,0x80,0x7e,0x45,0x4f, - 0xc0,0xcc,0xcc,0xac,0x84,0x3a,0x80,0xe5,0x80,0xd5, - 0x81,0xd5,0x80,0x55,0x80,0xa5,0x81,0xa5,0xba,0x1e, - 0x0b,0x03,0x03,0x81,0x41,0x5d,0x7f,0xce,0x01,0x66, - 0x00,0xd3,0x81,0xf7,0x80,0x89,0x5d,0x8f,0xd7,0x81, - 0x17,0xba,0x1e,0xcf,0x02,0x8f,0x01,0x93,0xdb,0xf8, - 0xf7,0x30,0x33,0x33,0x33,0xfb,0xff,0x3a,0x3a,0x3b, - 0x3b,0x8b,0x9e,0x83,0x99,0x99,0x59,0xd1,0x06,0x02, - 0x5b,0x00,0x9b,0x02,0x9f,0x00,0x36,0x06,0x16,0xc9, - 0xe1,0x75,0x3a,0x81,0x17,0x81,0x07,0x80,0x7f,0x77, - 0x3d,0x9e,0xce,0xe1,0x75,0xcc,0xcc,0xcc,0xcc,0xfe, - 0x87,0x03,0x00,0x66,0x66,0xd6,0x54,0x4b,0x02,0xbb, - 0x01,0x3b,0x03,0xdb,0x00,0x83,0x0b,0x9a,0xc7,0x58, - 0xe0,0x2f,0xc0,0xb5,0xc0,0x3d,0x05,0xcd,0xc1,0xcc, - 0xcc,0xcc,0x1a,0xc0,0x01,0x00,0x33,0xb3,0x7c,0x8d, - 0x00,0x36,0x00,0xd6,0x41,0xe9,0xe4,0xc3,0xbb,0x1e, - 0x0b,0xa3,0xf4,0xf1,0x05,0x80,0xd9,0xc0,0x34,0x60, - 0x2a,0x30,0x01,0xa5,0x8d,0x8f,0x07,0x9e,0x02,0x1e, - 0x07,0x46,0x77,0xfd,0x7f,0x4b,0x6f,0x10,0xb0,0x2b, - 0xb0,0x2f,0xb0,0x3d,0xe5,0x3b,0x0a,0xf7,0x0c,0x70, - 0x11,0x70,0x09,0xfa,0x59,0x30,0x33,0x6b,0x97,0x05, - 0x81,0x8f,0x03,0x6b,0xa0,0xcf,0xae,0x15,0xba,0xfe, - 0x5c,0x02,0x7d,0x56,0x0d,0xee,0x7a,0xf4,0x07,0x66, - 0xa2,0x23,0x4f,0x1f,0x30,0xf7,0xc8,0xd3,0x6b,0x28, - 0xa0,0x39,0x06,0x78,0x02,0x78,0x14,0x7d,0xae,0x99, - 0x59,0x89,0x38,0x00,0x60,0x66,0x96,0xad,0x3e,0xc0, - 0xa7,0x80,0xbd,0x80,0x6d,0x81,0x95,0x32,0xba,0xee, - 0x73,0xc0,0xed,0xc0,0x35,0x5d,0x7f,0xce,0xc9,0xe8, - 0xba,0x4d,0xb1,0x24,0x70,0x14,0x70,0x04,0xba,0x99, - 0x2d,0xbb,0x0f,0x80,0xdf,0x02,0x67,0x02,0xe3,0x0a, - 0x9e,0x4b,0xdd,0x1c,0x02,0x5c,0x18,0x63,0xfc,0x58, - 0x60,0x65,0x74,0x7c,0xa3,0xa9,0xee,0x43,0xc7,0x62, - 0xda,0xa5,0x13,0x2d,0x30,0xbb,0xeb,0x6a,0xbc,0x0b, - 0xbc,0x8d,0x16,0x99,0xe3,0x50,0x4d,0x8d,0xb1,0x68, - 0x81,0xf9,0x1c,0x7e,0x3f,0x4c,0x6a,0x28,0xb0,0x13, - 0x0a,0x86,0x6e,0x8c,0x16,0xfe,0x59,0x16,0x08,0x9f, - 0x0d,0x3c,0x89,0x8e,0x3a,0xfd,0x13,0x7d,0x76,0xbd, - 0x9f,0xe1,0xf5,0xcb,0x60,0x14,0x0a,0xf2,0xe7,0x6d, - 0x06,0x0a,0xa6,0x4c,0xeb,0x7a,0xbc,0x8f,0x36,0x0b, - 0x5e,0xed,0x7a,0x8c,0x47,0xbf,0x0b,0x8f,0x76,0xfd, - 0x7f,0xb3,0x5e,0x39,0x00,0x60,0x66,0x96,0x8d,0x45, - 0x81,0xa3,0x81,0xc3,0x81,0x65,0x72,0x7e,0xad,0xd7, - 0x81,0x0b,0x80,0x5f,0x03,0x6f,0xe5,0xfc,0x5a,0x55, - 0x37,0x1c,0xf8,0x3e,0x70,0x20,0x3a,0xe7,0x5f,0x35, - 0xd3,0x81,0xb3,0x81,0x1f,0xa3,0x45,0x90,0xa5,0x37, - 0x1a,0x58,0x3f,0xe6,0x73,0xb6,0x07,0x6e,0xc9,0x61, - 0x2e,0x55,0xd1,0xee,0x00,0x40,0x1c,0xef,0xa1,0x45, - 0xd8,0x3f,0x81,0x7f,0x00,0x0f,0x15,0x3b,0x9d,0xd2, - 0x1b,0x00,0xec,0xdd,0xf5,0xf8,0x34,0xca,0x8a,0x6a, - 0x97,0x0f,0x80,0x1b,0x81,0x3f,0x02,0xd7,0xa3,0x00, - 0x41,0xd5,0xb5,0x2b,0x00,0x10,0xc7,0x04,0x14,0x08, - 0xb8,0x1f,0xfd,0x5e,0xdc,0x83,0x02,0x08,0x66,0x80, - 0x03,0x00,0x66,0x66,0x69,0x2d,0x00,0x7c,0x1b,0xf8, - 0x06,0x30,0xa4,0xcd,0xaf,0x3d,0x15,0x2d,0x0e,0x4f, - 0x41,0x37,0xc1,0x36,0xd7,0xa2,0xe8,0xdf,0xe5,0x68, - 0xf4,0x6f,0x94,0xb5,0x39,0x68,0x17,0x66,0x7a,0xd7, - 0xa3,0x3f,0x4a,0x9f,0x1d,0x90,0xc3,0x6b,0x81,0x76, - 0x3e,0x8f,0x07,0x2e,0xcd,0xe9,0xfa,0x4d,0xb1,0x31, - 0x5a,0xcc,0xc6,0x75,0x1d,0xb0,0x7b,0xc6,0x73,0xa9, - 0x92,0x32,0x07,0x00,0x7a,0x7a,0x1e,0xf8,0x3d,0xca, - 0xf2,0x78,0xad,0xe0,0xb9,0x94,0xc9,0x92,0x28,0x40, - 0x7d,0x24,0xea,0x64,0x52,0xb4,0x71,0x28,0x88,0x7d, - 0x2e,0xd5,0xfe,0xfc,0x2a,0x63,0x00,0xa0,0xa7,0xf7, - 0x51,0x16,0xc6,0x75,0xc0,0xd5,0xc0,0x94,0x42,0x67, - 0x63,0x85,0x73,0x00,0xc0,0xcc,0x2c,0xb9,0x4f,0x03, - 0xbf,0x41,0x67,0x24,0x8b,0xf4,0x1a,0x70,0x18,0xda, - 0x51,0x69,0xba,0x0e,0xe0,0x20,0xe0,0x74,0x60,0xb1, - 0x94,0xd7,0x7a,0x05,0xed,0x26,0x3e,0xdb,0xf5,0x78, - 0x1e,0x78,0xb3,0xeb,0x31,0x91,0xf9,0xa7,0x84,0x77, - 0x07,0x02,0x16,0x44,0x99,0x20,0x6b,0x74,0x3d,0x56, - 0xef,0x7a,0xac,0xdc,0x35,0xc7,0xa4,0x6e,0x01,0x0e, - 0xee,0x9a,0x9b,0xc5,0x77,0x29,0xb0,0x7f,0x82,0xe7, - 0xcd,0x42,0xe7,0xa1,0x9b,0xba,0xa0,0xac,0x52,0x00, - 0xa0,0xdb,0x74,0xf4,0xef,0xfd,0x23,0x9a,0x9d,0x12, - 0x3d,0x04,0x05,0x43,0x8f,0xa7,0xbd,0xbb,0xfd,0xa1, - 0x26,0x00,0xa7,0x01,0xe7,0x50,0xcd,0x5d,0xea,0x2a, - 0x04,0x00,0xe6,0xf5,0x01,0x3a,0x4a,0x78,0x11,0x70, - 0x67,0xc1,0x73,0xb1,0x82,0x38,0x00,0x60,0x66,0x16, - 0x5f,0x5f,0xb4,0xeb,0xfe,0x6d,0xd2,0x2d,0xe6,0xb2, - 0xf6,0x4b,0x74,0x93,0x37,0xab,0xe8,0x89,0x14,0x64, - 0x4d,0x74,0x34,0x62,0xb3,0x84,0xcf,0x7f,0x01,0xb8, - 0x19,0xa5,0x4c,0xde,0x4f,0x3e,0x8b,0xbd,0xa5,0x81, - 0x1d,0x80,0x1d,0x51,0x8d,0x88,0x45,0x13,0x5c,0x63, - 0x22,0xb0,0x0f,0xf0,0xf7,0x0c,0xe7,0xd5,0x04,0x8b, - 0xa2,0x73,0xb2,0x49,0x17,0x41,0x27,0xa1,0xdf,0xfb, - 0x26,0xaa,0x62,0x00,0xa0,0xdb,0x14,0xf4,0x6f,0xf7, - 0x4b,0x9a,0x57,0xc7,0xe1,0x4b,0xc0,0x19,0xc0,0xb2, - 0x45,0x4f,0x24,0xc0,0x93,0x28,0x90,0x7d,0x57,0xd1, - 0x13,0x89,0xa9,0x6a,0x01,0x80,0x79,0xdd,0x0b,0xfc, - 0x10,0x1d,0x9d,0xb1,0x06,0x71,0x00,0xc0,0xcc,0x2c, - 0x9e,0x81,0xc0,0x15,0xa8,0x7d,0x5c,0x19,0xdd,0x80, - 0xce,0x76,0x36,0xad,0xf2,0xf2,0xd1,0xc0,0x4f,0x89, - 0xbf,0xb8,0x7b,0x1e,0x9d,0x47,0xbd,0x02,0x78,0x3a, - 0xeb,0x49,0x45,0xe8,0x0b,0x6c,0x01,0x1c,0x03,0xec, - 0xd2,0xf5,0xff,0x43,0x75,0x02,0x27,0xa2,0x9d,0x33, - 0x0b,0xf3,0x75,0x54,0x54,0x31,0xa9,0x71,0xc0,0x8a, - 0x34,0xb3,0xe0,0x5c,0x95,0x03,0x00,0xdd,0xae,0x47, - 0xdd,0x3f,0x26,0x15,0x3d,0x91,0x36,0x58,0x18,0x15, - 0x11,0xdd,0xa3,0xe8,0x89,0xc4,0xd4,0x89,0xde,0xd3, - 0x4e,0xa2,0x3a,0xf5,0x01,0xaa,0x1c,0x00,0xe8,0x76, - 0x2f,0x3a,0xc6,0x78,0x6f,0xd1,0x13,0xb1,0xf6,0x70, - 0x00,0xc0,0xcc,0x2c,0xdc,0x00,0x54,0xc0,0x68,0xdb, - 0xa2,0x27,0x12,0xe1,0x76,0xb4,0xc3,0x5c,0xc5,0x74, - 0xca,0xb8,0x16,0x47,0x69,0xbe,0x3b,0xc7,0x78,0xce, - 0x6c,0xe0,0x2f,0xc0,0x2f,0x28,0xcf,0x6e,0xd3,0x0a, - 0xe8,0x6c,0xee,0x57,0x88,0x77,0x74,0xe1,0xc2,0xae, - 0xe7,0x55,0xe5,0x66,0xb9,0x28,0x1d,0xa8,0xc5,0xe2, - 0x2a,0x29,0xaf,0xf3,0x59,0x14,0x64,0x6b,0x9a,0x3a, - 0x04,0x00,0x00,0x1e,0x06,0xb6,0x01,0xde,0x29,0x7a, - 0x22,0x39,0xda,0x08,0xb8,0x0a,0x18,0x59,0xf0,0x3c, - 0xd2,0xb8,0x13,0x05,0xd9,0xdf,0x2e,0x7a,0x22,0x01, - 0xea,0x10,0x00,0x00,0x05,0x36,0xcf,0x01,0xbe,0x4b, - 0xfd,0x3a,0x35,0x58,0x0f,0x0e,0x00,0x98,0x99,0x85, - 0xe9,0x40,0xbb,0xc4,0x9f,0xcf,0xe0,0x5a,0x33,0xd1, - 0x0d,0x68,0xf7,0xa3,0x2f,0xda,0xb1,0xe9,0x7e,0xf4, - 0xcf,0xe0,0x35,0x2e,0x07,0xf6,0xcb,0xe0,0x3a,0x65, - 0xb6,0x16,0xf0,0x37,0xb4,0x2b,0x1b,0x62,0x26,0xaa, - 0xd9,0x70,0x06,0xf0,0x52,0x5e,0x93,0x4a,0x69,0x18, - 0x3a,0xb3,0x7c,0x14,0xe1,0x19,0x01,0x97,0x03,0x07, - 0xd0,0xcc,0x9d,0xe9,0x50,0xdb,0xa2,0xa3,0x1d,0xad, - 0x74,0x12,0x7d,0xa4,0xe7,0x06,0x14,0x04,0x68,0x9a, - 0xba,0x04,0x00,0x00,0x1e,0x04,0x36,0x47,0x35,0x02, - 0xea,0x66,0x37,0xf4,0x39,0x95,0x55,0xc7,0x93,0x4e, - 0x54,0x3f,0xe1,0x05,0x54,0x77,0xe4,0x7d,0x74,0x86, - 0x7c,0x3a,0xaa,0x73,0xb2,0x10,0x7a,0xcf,0x5a,0x1c, - 0x1d,0xc1,0x1a,0x9a,0xd1,0xeb,0x82,0x32,0xb2,0xb6, - 0xa7,0xfc,0x6d,0x50,0xeb,0x12,0x00,0xe8,0xf6,0x12, - 0xca,0x94,0xf9,0x4f,0xd1,0x13,0xb1,0xfc,0x38,0x00, - 0x60,0x66,0x16,0xe6,0xdb,0x24,0x4f,0xb7,0x9e,0x80, - 0x16,0xaa,0xf7,0x76,0x3d,0x9e,0xa4,0xf7,0xb3,0xa8, - 0xfd,0xd0,0xc2,0x76,0x23,0xe0,0x13,0xa8,0xf2,0xf8, - 0xb0,0x84,0xaf,0x7b,0x20,0xf5,0xad,0x1a,0xff,0x59, - 0xe0,0x0f,0xe8,0x26,0x34,0x4a,0x67,0xd7,0xd8,0x93, - 0xd0,0x8d,0x6c,0x15,0xac,0x83,0x2a,0x64,0x87,0xd6, - 0x33,0xb8,0x08,0x65,0x0f,0xd8,0xfc,0x5d,0x4b,0x74, - 0x15,0xff,0xf3,0x80,0x23,0x22,0xc6,0xcc,0x46,0x01, - 0xa7,0x97,0xb3,0x98,0x54,0x85,0x84,0x06,0x00,0x46, - 0xa1,0x9f,0xdb,0xb4,0xfa,0xa0,0xc5,0xe4,0x90,0xae, - 0x3f,0x17,0x07,0x56,0x03,0x56,0x25,0x9b,0x36,0xab, - 0xe7,0x13,0xfd,0x6f,0x5d,0x35,0xfb,0xa3,0xf7,0x81, - 0x38,0x47,0x89,0x7a,0x9a,0x89,0x32,0xc8,0xfe,0x0d, - 0xdc,0x8d,0x82,0x25,0xd3,0x02,0x9f,0xdb,0x01,0xac, - 0x04,0xac,0x0d,0x6c,0x85,0x82,0x11,0x2b,0xa4,0x98, - 0x0b,0xc0,0x8b,0xe8,0x3d,0x70,0x7c,0xca,0xeb,0xe4, - 0x29,0x34,0x00,0xf0,0x00,0x7a,0x8f,0x49,0xa2,0x03, - 0x1d,0x6f,0x1b,0x84,0xba,0xda,0x0c,0x43,0x75,0x1d, - 0x86,0x03,0xcb,0xa3,0xef,0x7b,0x9f,0x84,0xd7,0x9e, - 0x9f,0x99,0xe8,0x58,0xdd,0x85,0x19,0x5e,0xd3,0x4a, - 0xc4,0x01,0x00,0x33,0xb3,0x68,0x1b,0xa2,0x9b,0xa1, - 0xb8,0x3b,0xf3,0x8f,0x00,0xbf,0x42,0x3b,0x32,0xa1, - 0x37,0x51,0x3d,0x0d,0x06,0xbe,0x08,0x7c,0x15,0xdd, - 0x58,0xc5,0x31,0x09,0x55,0xa0,0xaf,0x5b,0xe5,0xf2, - 0x03,0xd1,0x4e,0x7e,0xc8,0x8d,0xee,0x13,0xa8,0xf5, - 0x55,0x59,0x52,0xfd,0xe3,0xfa,0x2a,0xf0,0x33,0x14, - 0x18,0x8a,0xf2,0x7d,0xe0,0xd4,0x7c,0xa7,0x53,0x49, - 0xc3,0xd1,0xae,0x56,0xab,0xef,0xe1,0x1c,0xb4,0xb0, - 0xbc,0x8b,0xe8,0x63,0x02,0xa7,0xa0,0x60,0x52,0x93, - 0x84,0x06,0x00,0xae,0x05,0xf6,0xcc,0x79,0x2e,0x8b, - 0xa0,0x9d,0xe1,0xcf,0x00,0x3b,0x75,0xfd,0xff,0x24, - 0x36,0xa7,0xba,0xef,0x0b,0x3d,0x1d,0x82,0x0a,0xa0, - 0x26,0x2d,0x4a,0xfb,0x08,0x0a,0x8a,0x5c,0x83,0x8a, - 0x8c,0x66,0x65,0x43,0x54,0x88,0xf0,0x10,0x92,0xb7, - 0xc9,0x7d,0x1a,0xf8,0x24,0xe5,0x3d,0x0e,0x10,0x1a, - 0x00,0xb8,0x0a,0xf8,0x42,0x4e,0x73,0x18,0x8c,0xee, - 0x0f,0xd6,0x03,0x3e,0x45,0xf2,0x02,0xb3,0x3d,0x9d, - 0x0b,0x1c,0x8b,0x8f,0x98,0xd5,0x4e,0x96,0xd1,0x22, - 0x33,0xb3,0x3a,0xea,0x83,0xa2,0xe0,0x71,0x16,0xff, - 0xd3,0x80,0xaf,0x01,0x1f,0x03,0x2e,0x21,0xf9,0xe2, - 0x1f,0x94,0x6e,0x79,0x51,0xd7,0xb5,0x7e,0x80,0x22, - 0xf3,0xa1,0x86,0xa1,0x45,0x61,0x9d,0x1c,0x4d,0xd8, - 0x2e,0xd7,0x6c,0x94,0x4a,0xbf,0x3e,0xd5,0xbe,0xc9, - 0xff,0x25,0xea,0x1a,0x10,0x72,0xf3,0xfb,0x23,0xaa, - 0x57,0xf4,0xab,0x1d,0x0e,0x21,0x3a,0x80,0x72,0x17, - 0x6a,0xef,0x78,0x6d,0xc0,0xf5,0x0e,0x0e,0xb8,0x9e, - 0xe5,0xe7,0x1d,0xe0,0x4a,0xd4,0x09,0x63,0x39,0xe0, - 0x04,0xe0,0x8d,0x04,0xd7,0x39,0x2b,0xcb,0x49,0x15, - 0x68,0x07,0xb4,0xb3,0x9c,0x64,0xf1,0xff,0x00,0xaa, - 0x9f,0xb2,0x3e,0x0a,0x20,0x64,0xb9,0xf8,0x07,0x65, - 0x10,0x1c,0x87,0xea,0x11,0x9c,0x06,0x4c,0x4e,0x70, - 0x8d,0xd5,0x51,0x10,0xdd,0x6b,0x96,0xde,0x7d,0x80, - 0x3a,0xd7,0x5c,0x80,0x8e,0x29,0x2e,0x01,0x6c,0x82, - 0x7e,0x2e,0xd2,0x14,0xbd,0x3c,0x12,0x65,0x11,0xfa, - 0x7b,0x5f,0x33,0xfe,0x07,0x35,0x33,0x6b,0xed,0x40, - 0x14,0x55,0x0f,0xf5,0x34,0x5a,0xac,0x67,0xdd,0x72, - 0x6a,0x16,0x5a,0xe0,0x7d,0x82,0x78,0x37,0xbb,0x07, - 0x53,0x8d,0x16,0x50,0x21,0x8e,0x05,0xce,0x26,0xfa, - 0x46,0xf7,0x65,0x60,0x6b,0xe2,0x07,0x4c,0xca,0xea, - 0x36,0xb4,0x93,0xf6,0x44,0xc4,0xb8,0x0e,0x54,0xf9, - 0x3b,0x6d,0xda,0x6d,0x9d,0xf4,0x45,0x01,0x80,0x28, - 0x7f,0xee,0xfa,0xf3,0x4f,0x01,0x63,0x87,0xd3,0xcc, - 0x3a,0x00,0x65,0xf4,0x01,0xca,0x90,0xf9,0x08,0xf1, - 0x8f,0x3b,0x6d,0x88,0x16,0x49,0x55,0xb6,0x36,0x70, - 0x35,0xf1,0xd3,0xfe,0x27,0xa3,0x3a,0x23,0x9f,0x00, - 0x6e,0xca,0x7a,0x52,0xf3,0x31,0x01,0x15,0x97,0x5b, - 0x15,0x15,0xd2,0x8d,0x6b,0x3b,0xe0,0xe4,0x2c,0x27, - 0x54,0x73,0x73,0x50,0xd6,0xce,0x91,0x28,0xb3,0xe9, - 0x2b,0x24,0x3f,0xfe,0xb6,0x0f,0xca,0x0e,0x29,0x53, - 0xcb,0x63,0x4b,0xc9,0x01,0x80,0xfa,0x58,0x09,0x7d, - 0x08,0x36,0x2d,0x2d,0xb1,0xa9,0x4e,0x40,0x0b,0xcc, - 0x55,0x8b,0x9e,0x48,0xcd,0xf5,0x05,0xbe,0x17,0x63, - 0xfc,0x18,0x54,0x61,0xfa,0xa9,0x7c,0xa6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 0x0a,0xbd,0xdd,0xc5,0x87,0x8b,0x8c,0x5d,0x15,0xf0, - 0x9c,0xed,0x08,0xef,0x3e,0x61,0xed,0xf3,0x1d,0xf4, - 0x99,0x18,0x6a,0x87,0xbc,0x26,0xd2,0x06,0x67,0x12, - 0xff,0x67,0xf0,0x8f,0xa8,0xf6,0x41,0xd1,0x45,0x2c, - 0x2f,0x40,0xef,0xd5,0x71,0xd2,0xd3,0xfb,0xa1,0x23, - 0x75,0x69,0x8a,0x1c,0x36,0xd9,0x4c,0xf4,0x7d,0x5f, - 0x93,0xb9,0x19,0x4f,0x71,0x9c,0x80,0x0a,0x3b,0x5a, - 0x0d,0x78,0xc1,0x50,0x4d,0x0b,0x01,0xc7,0xa0,0x45, - 0xc0,0x3f,0x50,0x34,0xd5,0xff,0x96,0xcd,0xd4,0x81, - 0x16,0x04,0x37,0xa0,0x20,0xd0,0xd7,0xd1,0x0e,0xa0, - 0x65,0x23,0x24,0x75,0xb8,0xdb,0xb1,0xa8,0x62,0x71, - 0xbb,0xdc,0x48,0xd8,0x42,0x05,0xf4,0x81,0x5f,0xd5, - 0x63,0x00,0x2b,0xa3,0xbf,0x67,0x54,0x0d,0x86,0xb3, - 0x51,0x2b,0xbc,0x19,0x79,0x4f,0xa8,0x60,0x63,0x81, - 0x1d,0x89,0x3e,0x4b,0x7b,0x1a,0xb0,0x64,0xfe,0xd3, - 0x29,0xb5,0x95,0x51,0x50,0x2e,0xca,0x95,0x3d,0xfe, - 0xff,0x15,0x01,0xcf,0xe9,0xc0,0x41,0x96,0x32,0xea, - 0x44,0x75,0x42,0x66,0x05,0x8e,0x5f,0x0e,0x1d,0x1f, - 0xa8,0x9a,0xed,0x89,0xff,0xf3,0x77,0x09,0x0a,0x06, - 0xa7,0xa9,0x49,0x93,0xa5,0xfb,0x51,0x10,0x20,0x4e, - 0x71,0xbf,0xb5,0x88,0xf7,0xb9,0x6c,0xff,0xeb,0x4d, - 0xb4,0xb9,0x71,0x38,0xe1,0xbf,0x27,0xdd,0x2e,0xa1, - 0x9a,0xbf,0x2f,0xd6,0x83,0x17,0x8d,0xd5,0xb2,0x06, - 0x70,0x0e,0xda,0xa9,0xf8,0x15,0x4e,0xff,0xb6,0x0f, - 0x5b,0x09,0xed,0x08,0x8c,0x47,0x51,0xde,0xb8,0x15, - 0xe3,0xed,0xc3,0x96,0x42,0xe7,0xc8,0x43,0xdc,0x48, - 0xd8,0xd9,0xe1,0xac,0xfd,0x30,0xc6,0xd8,0x2d,0x73, - 0x9b,0x45,0x7e,0x86,0x00,0xd7,0x11,0x1d,0xd4,0x3a, - 0x13,0x05,0x60,0x9a,0xd2,0xd6,0xe6,0x61,0xb4,0xc8, - 0x69,0x65,0x61,0xe2,0x1d,0x5f,0xa9,0xa3,0xc3,0x89, - 0xce,0x1a,0x99,0x89,0xce,0x50,0xcf,0xeb,0x71,0xa2, - 0xeb,0x2d,0x80,0x52,0xce,0xe3,0x76,0x06,0xb1,0xfc, - 0x8d,0x21,0xde,0x39,0xf3,0x35,0xf2,0x9a,0x48,0x4e, - 0x06,0xa0,0x33,0xd9,0x71,0xfc,0x11,0x9d,0x03,0x2f, - 0xdb,0x7b,0xe4,0x43,0x28,0xa0,0x19,0xa7,0x56,0xcb, - 0x0f,0x51,0xd5,0x7b,0x4b,0xe7,0x02,0x94,0x01,0xf3, - 0x6e,0x8c,0xe7,0x0c,0x43,0x3f,0x4b,0xae,0x07,0x50, - 0x71,0x0e,0x00,0x94,0x5f,0x1f,0x60,0x57,0xe0,0x9f, - 0xa8,0x77,0xf8,0x51,0xe8,0xdc,0x97,0x59,0x6f,0x06, - 0xa3,0x9d,0x81,0xc7,0x50,0x2f,0xdf,0x3d,0x71,0xc5, - 0xea,0x24,0x76,0x25,0x3c,0xd5,0xf0,0x3b,0x79,0x4e, - 0xa4,0x85,0xa7,0xd0,0x2e,0x4a,0x88,0xb5,0xf2,0x9c, - 0x48,0x4e,0x2e,0x20,0x7a,0xde,0x17,0x03,0xc7,0xb7, - 0x61,0x2e,0x65,0x73,0x39,0xca,0xfc,0x69,0xe5,0x30, - 0x9a,0x5b,0x10,0x70,0x10,0x5a,0xa0,0x47,0xb9,0x99, - 0xf9,0x9f,0x89,0x0d,0xc9,0x02,0x58,0x0a,0xa7,0xc4, - 0x96,0xd5,0x5f,0x63,0x8c,0xad,0xda,0x8e,0xe6,0x11, - 0x84,0x1f,0x4d,0x03,0x9d,0xf9,0x3f,0x08,0xd5,0xba, - 0x28,0xa3,0x07,0x80,0x13,0x63,0x8c,0x5f,0x12,0x15, - 0xb7,0xb5,0xf4,0x6e,0x43,0x41,0x80,0x38,0xf5,0x18, - 0x36,0xa2,0xda,0xb5,0x33,0x0c,0x07,0x00,0xca,0x6c, - 0x31,0xe0,0x9b,0x28,0x92,0xfd,0x17,0xc2,0xd2,0x18, - 0xcd,0x7a,0xda,0x12,0xed,0x4c,0xbf,0x80,0x3e,0x60, - 0x97,0x28,0x76,0x3a,0x95,0xf2,0xa9,0xc0,0x71,0xa3, - 0x80,0xff,0xe6,0x39,0x91,0x08,0xa1,0xe7,0x5d,0x57, - 0xce,0x75,0x16,0xd9,0xdb,0x1b,0xf8,0x72,0xc4,0x98, - 0x9b,0xc9,0xaf,0x18,0xdb,0x62,0xc0,0x5e,0xc0,0x19, - 0xe8,0x7b,0xfc,0x24,0x4a,0x55,0x9d,0x8e,0x76,0xab, - 0x26,0xa2,0x23,0x1f,0x77,0xa1,0x56,0x4b,0x47,0xd0, - 0xfe,0x33,0xe1,0x87,0xd1,0x7a,0xf7,0x66,0x00,0xfa, - 0x1c,0x69,0xa2,0xbd,0x09,0xab,0x89,0x73,0x79,0x8b, - 0xff,0x1e,0xb2,0x60,0x72,0x31,0xc0,0x72,0xba,0x2f, - 0xc6,0xd8,0x2a,0x1d,0x9b,0x1b,0x4a,0xbc,0xc5,0xf2, - 0xdb,0x68,0x13,0x60,0x7a,0x3e,0xd3,0xc9,0xcc,0xcf, - 0xd0,0x46,0x57,0xa8,0x3a,0x14,0xb6,0x2d,0x8b,0xfb, - 0x81,0xcf,0x11,0xef,0xf8,0xdc,0x69,0x54,0xeb,0xf7, - 0xc6,0x7a,0xc8,0x2a,0x00,0x70,0x25,0x4a,0x2b,0x0a, - 0x79,0x78,0x27,0xb2,0xb5,0xf5,0x51,0xb5,0xce,0x97, - 0x51,0xc5,0xcd,0x91,0x85,0xce,0xc6,0xea,0x62,0x39, - 0xe0,0x54,0xf4,0x73,0xf5,0x3b,0xd4,0xfe,0xc8,0x5a, - 0x0b,0x4d,0x99,0xbf,0x38,0xd7,0x59,0x44,0x1b,0x15, - 0x38,0x6e,0x78,0xae,0xb3,0xc8,0xd6,0x32,0x68,0x51, - 0xdd,0xca,0xb3,0xa8,0xdf,0x71,0xdc,0x33,0x8c,0xad, - 0x0c,0x45,0xe7,0x4b,0xef,0x44,0xe7,0x24,0xaf,0x46, - 0x85,0x8f,0xb6,0x47,0x69,0xc2,0x8b,0xa0,0x45,0x75, - 0x3f,0xb4,0xb8,0x1c,0x01,0x7c,0x12,0xa5,0x9a,0x9f, - 0x8b,0xce,0xe7,0x8f,0x46,0xe9,0xf9,0x03,0x03,0x5f, - 0xf3,0x1f,0xe8,0xdf,0xb0,0xb7,0xc7,0x0f,0x5a,0x3c, - 0xf7,0xd5,0xae,0xf9,0xb5,0xb2,0x3f,0x4a,0xdb,0x6c, - 0x9a,0x90,0xe2,0x7f,0x6f,0xa3,0x22,0xba,0xf3,0x33, - 0x0e,0xb8,0x35,0xe0,0x1a,0x5b,0xe3,0xe3,0x78,0x65, - 0x34,0x36,0xc6,0xd8,0x2a,0x65,0x55,0x1e,0x45,0xbc, - 0x40,0xfe,0x71,0xc0,0x4b,0x39,0xcd,0x25,0x4b,0xdd, - 0xb5,0x1b,0x66,0xb7,0x18,0xf3,0x06,0x3a,0xfa,0xb0, - 0x2d,0x6a,0x5f,0x68,0xd9,0xb9,0x95,0x78,0xc1,0xe2, - 0x25,0x50,0x5b,0x47,0xab,0x28,0x67,0x00,0x94,0x43, - 0x7f,0x74,0x23,0x7b,0x17,0xba,0x79,0x3c,0x08,0x58, - 0xa0,0xd0,0x19,0x59,0x5d,0x0d,0x44,0xd5,0xe3,0x1f, - 0x40,0x51,0xdf,0x7d,0xd0,0x82,0xc6,0x3e,0x6c,0x19, - 0x60,0xe9,0xc0,0xb1,0xb7,0xe4,0x39,0x91,0x00,0x2f, - 0x06,0x8e,0x1b,0x92,0xe7,0x24,0x32,0x76,0x1e,0xad, - 0x77,0x6f,0x3f,0x40,0x45,0x8c,0xa6,0x64,0xf4,0x7a, - 0xc3,0x98,0x1b,0x20,0xbb,0x10,0x55,0xc9,0x4e,0xfa, - 0xf9,0xb8,0x3e,0x2a,0x48,0x38,0x96,0xe8,0x14,0xf4, - 0x15,0x51,0x35,0xf9,0x0d,0x5a,0x3c,0xde,0x8a,0xb8, - 0xc6,0x25,0xc0,0x33,0x2d,0xbe,0x3e,0x14,0x15,0x47, - 0x6c,0x92,0xf5,0x08,0x5b,0x20,0x5c,0x41,0xeb,0x9d, - 0xd1,0x8b,0x02,0xae,0xe1,0x62,0x80,0xe5,0x34,0x9d, - 0xf0,0x62,0x77,0x65,0x29,0x8a,0x17,0xa5,0x0f,0xf1, - 0x32,0x4e,0xfe,0x8d,0x02,0xfe,0x55,0xf1,0x2c,0x6a, - 0x61,0x3a,0xaf,0xf1,0xe8,0xfd,0x74,0x4b,0x14,0xc4, - 0x3e,0x02,0xa5,0xad,0xb7,0x0a,0x14,0x58,0x32,0xbf, - 0x24,0xfa,0x58,0xd9,0xbc,0x0e,0x25,0x7e,0x0b,0x4a, - 0x2b,0x09,0x07,0x00,0x8a,0xb5,0x34,0x70,0x12,0x8a, - 0xce,0x5e,0x89,0x76,0x92,0xd2,0x78,0x01,0xb8,0x3d, - 0xed,0xa4,0xac,0x12,0xee,0x44,0x55,0xff,0xd3,0xd8, - 0x08,0xa5,0xb9,0xbe,0x0c,0x9c,0x42,0x75,0xab,0xc4, - 0xe7,0xe1,0xa3,0x81,0xe3,0x26,0x11,0x6f,0xa7,0x29, - 0x0f,0xa1,0x6d,0x94,0xaa,0x12,0x54,0xdc,0x01,0xd5, - 0x5f,0x68,0xe5,0x58,0x54,0xa8,0x2d,0xad,0x0e,0xb4, - 0x7b,0x3f,0x06,0xa5,0xd5,0x66,0x99,0xd2,0x38,0x1c, - 0x65,0x87,0x5c,0xd3,0xe2,0xba,0x21,0x59,0x26,0x77, - 0x47,0x7c,0x7d,0x36,0xfa,0xfd,0x6d,0x25,0x4e,0xcb, - 0xc8,0x3a,0x08,0xd9,0xfd,0x07,0xb5,0x96,0x6c,0xe5, - 0x2f,0x84,0xf5,0xcc,0x3e,0x80,0xf0,0x8c,0x0f,0x6b, - 0x9f,0xd0,0x45,0x62,0x92,0xbe,0xe8,0x45,0x88,0xd3, - 0x7a,0xb2,0x13,0xbd,0x4f,0x56,0xcd,0x29,0xe8,0xfd, - 0xf8,0x2c,0x60,0x53,0x60,0x79,0xf4,0xf7,0xb8,0x93, - 0xf2,0xd6,0x30,0xa8,0x93,0x43,0x80,0xf7,0x02,0xc7, - 0x0e,0x43,0x85,0x25,0xad,0x82,0x1c,0x00,0x28,0xc6, - 0x26,0x28,0xca,0x39,0x0e,0x55,0x33,0x5d,0x26,0xe5, - 0xf5,0xfe,0x85,0x0a,0x11,0xad,0x0c,0xfc,0x2d,0xe5, - 0xb5,0xac,0x1a,0x6e,0x01,0x56,0x43,0x2d,0x20,0x6f, - 0x21,0x5d,0x65,0xdf,0x25,0x51,0xb5,0xf0,0x17,0x51, - 0xca,0xf3,0x16,0x69,0x27,0x57,0x03,0xaf,0x01,0xdf, - 0x47,0xd5,0xe5,0x2f,0x46,0x95,0xe8,0xff,0x05,0x3c, - 0x82,0x02,0x76,0x93,0xd0,0xf7,0xfc,0x11,0x8a,0xaf, - 0xaa,0x1c,0x5a,0x8d,0xb7,0x0a,0xed,0xf1,0x06,0xa0, - 0x5d,0x88,0x56,0xfe,0x4e,0xd8,0xce,0x6c,0x94,0xe1, - 0x28,0x60,0x7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,0x0e,0x0a,0x36,0x2c,0xd4, - 0xe3,0xbf,0x47,0x05,0xdb,0xee,0x25,0xec,0x7d,0x7d, - 0x26,0xea,0x98,0xd0,0xca,0xe7,0x02,0xae,0x53,0x07, - 0xfb,0x12,0x76,0xdc,0xe5,0xc2,0xc0,0xeb,0xfd,0x26, - 0x70,0x9c,0x8b,0x01,0x96,0xcb,0xb2,0x84,0x07,0x47, - 0x8b,0xce,0xe2,0x0a,0x31,0x84,0x78,0x9f,0x37,0x3f, - 0xce,0x6b,0x22,0x56,0x7b,0x67,0xa2,0x7a,0x0b,0x21, - 0x46,0xa2,0x4c,0x0d,0xab,0x18,0x07,0x00,0xf2,0xb7, - 0x02,0xaa,0x96,0xf9,0x32,0x3a,0xab,0xb9,0x41,0xca, - 0xeb,0x8d,0x03,0xbe,0x8d,0x8a,0xba,0x1d,0x4a,0x36, - 0x69,0xb0,0x56,0x7d,0x4f,0xa3,0xc5,0xd3,0x72,0x28, - 0x72,0x9e,0xf6,0x86,0x66,0x1d,0x74,0x83,0xfc,0x0a, - 0xaa,0xce,0xbb,0x52,0xca,0xeb,0xd5,0xd1,0x1c,0x14, - 0x88,0x2b,0x5a,0x68,0x9b,0xb7,0x57,0x72,0x9d,0x45, - 0x7a,0x43,0xd0,0x7b,0x5b,0x2b,0x3f,0x22,0xfd,0xdf, - 0xe3,0x40,0x74,0x36,0x36,0x4d,0xe6,0xd5,0x4c,0xe2, - 0xef,0x4c,0xad,0xc3,0x87,0x7b,0x77,0x2f,0x47,0xf4, - 0xef,0x55,0x54,0xfa,0xff,0xbc,0x7a,0x9e,0x9d,0xed, - 0x69,0x87,0x18,0xd7,0xaa,0xb2,0xc3,0x03,0xc6,0x4c, - 0x25,0xfa,0xfb,0xd5,0xed,0x49,0xc2,0xfe,0x1d,0x36, - 0x47,0x81,0x58,0x2b,0x87,0xd0,0x63,0x5c,0xd3,0x80, - 0x07,0xf3,0x9c,0x48,0x46,0xb6,0x41,0x1b,0x49,0x21, - 0x46,0x13,0x5e,0x1c,0xd6,0xac,0xa7,0xa9,0x44,0x07, - 0x94,0xe7,0xb5,0x7b,0x5e,0x13,0xb1,0xfc,0x38,0x00, - 0x90,0x9f,0xad,0x81,0x3f,0xa3,0x85,0xd8,0xb7,0x81, - 0xc5,0x53,0x5e,0xef,0x4e,0x94,0x62,0xb8,0x12,0x4a, - 0xcf,0x79,0x3b,0xe5,0xf5,0xac,0x9e,0x26,0xa1,0xb3, - 0x73,0xab,0xa0,0x73,0xd4,0xb7,0xa5,0xbc,0xde,0x22, - 0x28,0xa0,0xf0,0x1c,0xaa,0x96,0xbd,0x1d,0xe1,0xbb, - 0x2a,0xd6,0x1e,0xeb,0x05,0x8e,0x1b,0x93,0xeb,0x2c, - 0xd2,0x3b,0x1a,0x1d,0x47,0xe9,0xcd,0xf3,0xa8,0x18, - 0x54,0x1a,0x47,0xa1,0x23,0x1d,0x71,0xce,0x6b,0x3f, - 0x07,0x9c,0x83,0x52,0xf9,0x57,0x46,0xd9,0x1f,0x03, - 0x50,0x06,0xd7,0x12,0x68,0xd1,0xb7,0x7f,0xd7,0x75, - 0x5f,0x8b,0xb8,0xd6,0x17,0x99,0xdb,0xbe,0x2a,0xe4, - 0xfc,0xff,0x5d,0x31,0xe6,0x39,0x86,0xd6,0x0b,0x99, - 0x4f,0x52,0xff,0x8c,0x9e,0xcd,0x81,0xb5,0x02,0xc6, - 0xfd,0x89,0xd6,0xed,0x13,0x7b,0x72,0x16,0x40,0xf5, - 0x84,0x76,0x71,0x79,0x90,0x6a,0x1c,0x8f,0xda,0x39, - 0xc6,0xd8,0x2a,0x15,0xfe,0xb3,0x72,0xba,0x00,0x05, - 0xba,0x43,0xec,0x96,0xe7,0x44,0x2c,0x1f,0x0e,0x00, - 0x64,0x6b,0x08,0xda,0x7d,0x78,0x1c,0xa5,0x7b,0xee, - 0x06,0xf4,0x4d,0x71,0xbd,0x69,0x28,0x6b,0x60,0x3d, - 0xf4,0x61,0x76,0x2d,0xae,0x7c,0x6a,0x61,0xe6,0xa0, - 0x7a,0x10,0xdb,0xa2,0x1b,0xe2,0x0b,0x51,0xe5,0xf4, - 0xa4,0xfa,0xa0,0x7a,0x03,0xff,0x40,0xd9,0x06,0xc7, - 0xf0,0xbf,0xe9,0xcc,0x56,0x8c,0x6d,0x03,0xc7,0x95, - 0x79,0x97,0x6b,0x01,0x74,0xdc,0xa2,0x95,0x6f,0x91, - 0xee,0x46,0x7d,0x1f,0xe2,0x05,0x10,0x6e,0x47,0x37, - 0xdd,0xab,0xa1,0x9f,0xf7,0x3f,0xa3,0x45,0x76,0x77, - 0xd1,0xc5,0xd9,0xc0,0x04,0xe0,0x29,0x74,0xc3,0x7d, - 0x30,0x4a,0x87,0xfc,0x0a,0xad,0x0b,0x74,0xfe,0x04, - 0x2d,0xc4,0xa3,0xd2,0xff,0x67,0xa1,0x6e,0x1d,0x71, - 0xdc,0xd4,0xe2,0x6b,0xfd,0x81,0x8f,0xc5,0xbc,0x5e, - 0xd5,0x1c,0x19,0x38,0x2e,0x74,0x41,0xdf,0xed,0x4f, - 0x84,0x15,0xdb,0xdc,0x8f,0xea,0x14,0xdb,0xac,0xb3, - 0x0e,0x60,0xef,0xc0,0xb1,0x55,0xa9,0x9b,0x14,0x9a, - 0xc1,0xd3,0x89,0xba,0x5b,0x98,0xa5,0xf1,0x2a,0xe1, - 0x1d,0x8e,0x46,0x12,0x16,0x78,0xb5,0x12,0x71,0x00, - 0x20,0x1b,0x2b,0x03,0x3f,0x47,0xed,0x4a,0xce,0x23, - 0x3c,0xf5,0xac,0x37,0xe3,0x51,0x45,0xea,0xe5,0x51, - 0x4b,0xc0,0x47,0x53,0x5e,0xcf,0x9a,0xed,0x09,0xb4, - 0x33,0xb5,0x1c,0xea,0xf3,0x9a,0xb6,0x27,0xf0,0xaa, - 0xc0,0xaf,0xd0,0xcf,0xe9,0x39,0xc0,0xea,0x29,0xaf, - 0x67,0xc9,0x2d,0x4f,0xd8,0x39,0xf6,0xd9,0xc0,0x7f, - 0xf2,0x9d,0x4a,0x2a,0xfb,0xd0,0x3a,0x4b,0xea,0x51, - 0x54,0x88,0x31,0xa9,0xcf,0xa2,0x60,0x6a,0x48,0xf6, - 0xca,0x04,0xd4,0x96,0x75,0x1b,0xb4,0xa0,0x8e,0x93, - 0xea,0x3f,0x03,0x15,0x28,0x5c,0x87,0xde,0x17,0x99, - 0xcb,0x00,0x5f,0x27,0x7a,0x87,0xf2,0x11,0xe0,0xfd, - 0x18,0xaf,0x0d,0x0a,0xd0,0xb5,0xb2,0x61,0xcc,0xeb, - 0x55,0xc9,0x92,0x84,0xa5,0xa2,0x3e,0x4d,0xbc,0xcc, - 0x0a,0x50,0xf0,0x34,0xe4,0xc8,0xc0,0xc2,0xe8,0x67, - 0xc7,0x8a,0xb5,0x3b,0x61,0xc7,0xd6,0xde,0x07,0x7e, - 0x9b,0xf3,0x5c,0xb2,0xb0,0x14,0xe1,0x47,0xbd,0x1e, - 0x06,0xde,0xcc,0x71,0x2e,0xd6,0x1c,0xd7,0xc7,0x18, - 0x1b,0xd2,0x76,0xd5,0x4a,0xc4,0x01,0x80,0xe4,0x3a, - 0x80,0x9d,0xd0,0x0d,0xe2,0xb3,0xc0,0xd7,0x50,0x4b, - 0x8c,0x34,0xee,0x01,0xbe,0x80,0xa2,0x69,0xff,0x87, - 0x6e,0x44,0xcd,0xb2,0xf2,0x0e,0xf0,0x53,0xe0,0x23, - 0xcc,0xad,0x4c,0x9e,0xc6,0x50,0x94,0x52,0xfd,0x14, - 0xf0,0x4f,0x74,0xe4,0xc0,0xef,0x29,0xed,0xf5,0x5d, - 0xc2,0xbe,0xe7,0xff,0xa1,0xdc,0xef,0x27,0xc7,0x44, - 0x7c,0xfd,0x54,0x92,0x57,0x83,0x1e,0x81,0x2a,0xb9, - 0xf7,0x0b,0x18,0xfb,0x1f,0xb4,0x93,0x71,0x75,0xc2, - 0xd7,0xea,0x36,0x0d,0xd5,0x68,0xe9,0xad,0x1d,0xdd, - 0x29,0x44,0x57,0xe5,0x8f,0xbb,0x48,0x05,0x9d,0xfd, - 0x6d,0x95,0x25,0x11,0x7a,0x5c,0xa4,0x8a,0x0e,0x46, - 0x47,0x33,0xa2,0xc4,0xdd,0xfd,0x8f,0xfb,0xbc,0x90, - 0x1a,0x04,0x96,0x9f,0xa1,0xe8,0x73,0x2e,0xc4,0x65, - 0xc4,0x3b,0x0a,0x52,0x94,0x38,0xb5,0xa3,0xfe,0x99, - 0xdb,0x2c,0xac,0x69,0xae,0x27,0xfc,0x73,0x77,0xe3, - 0x3c,0x27,0x62,0xd9,0xf3,0xcd,0x7a,0x7c,0x0b,0x03, - 0xc7,0xa1,0x45,0xff,0x8d,0xa8,0x2a,0x6b,0x9a,0x33, - 0xd1,0xd3,0xd1,0xcd,0xe9,0xc7,0xd1,0x19,0xcd,0xab, - 0x50,0xea,0xa7,0x59,0x5e,0x66,0xa3,0x74,0xe6,0xad, - 0x80,0x75,0xd1,0x8e,0x65,0xda,0x62,0x76,0xdb,0xa2, - 0x4e,0x14,0x63,0x50,0x96,0xc1,0xa2,0x29,0xaf,0x67, - 0xd1,0x46,0xa2,0x45,0x4f,0x88,0x2c,0xda,0xe6,0xe5, - 0x65,0x4b,0xd4,0xcd,0xa4,0x37,0xcf,0xa3,0xe3,0x4f, - 0x49,0xf4,0x05,0x7e,0x4f,0x58,0x70,0xb6,0xbb,0xc6, - 0x45,0x68,0xf5,0xe3,0x10,0xe7,0x93,0xbc,0x73,0x48, - 0x9c,0x02,0x80,0xdd,0xa6,0xa3,0xf6,0x76,0xbd,0x59, - 0x25,0xe1,0x5c,0xca,0xae,0x0f,0x61,0x2d,0xd2,0x66, - 0x90,0xfc,0x7c,0xf4,0x23,0x84,0x1d,0xa3,0xd9,0x18, - 0xbd,0xaf,0x5a,0xfb,0xf5,0x41,0xff,0xbe,0x2b,0x06, - 0x8c,0x9d,0x80,0xda,0x30,0x57,0x41,0x9c,0xa3,0x3b, - 0x69,0x03,0xfb,0x66,0xdd,0x5e,0x25,0xbc,0x76,0x90, - 0x03,0x00,0x15,0x93,0x55,0x00,0xe0,0x0b,0x68,0x11, - 0x1c,0xf2,0xa8,0xea,0xe2,0x76,0x2d,0x74,0x33,0xf7, - 0x0a,0x2a,0xb2,0xb6,0x72,0xca,0xeb,0xbd,0x06,0xfc, - 0x00,0xa5,0x75,0xed,0x07,0x3c,0x94,0xf2,0x7a,0x66, - 0x49,0x3c,0x86,0xce,0x2c,0x2f,0x8f,0x76,0x93,0x5f, - 0x4e,0x79,0xbd,0x91,0xa8,0x48,0xe5,0x2b,0x28,0xb5, - 0xb2,0xce,0x3b,0x8e,0x45,0xea,0x03,0x5c,0x4a,0x58, - 0x2b,0xd1,0x57,0x48,0xbf,0xa3,0x9d,0xa7,0xfd,0x23, - 0xbe,0x7e,0x1e,0xc9,0x77,0xff,0xbf,0x0b,0x6c,0x16, - 0x30,0xee,0x7a,0x94,0x36,0x3c,0x2d,0xe1,0xeb,0xb4, - 0xf2,0x7d,0x54,0xc4,0x35,0xae,0x24,0x01,0x00,0x50, - 0xd5,0xfa,0xde,0xd4,0x35,0x00,0xb0,0x23,0x7a,0xef, - 0x89,0x72,0x1d,0xe9,0x32,0x61,0x5c,0x0c,0xb0,0xbc, - 0x06,0xa3,0x5a,0x0d,0xa1,0x05,0xc9,0x8e,0xa0,0x3a, - 0xa9,0xf2,0xeb,0xc4,0x18,0xeb,0x23,0xa3,0x96,0xa5, - 0xd0,0x6e,0x12,0x6b,0x92,0xae,0xb5,0xb9,0xb5,0x59, - 0x47,0x67,0x67,0xd2,0xfb,0xaa,0x46,0xe8,0x8b,0xd2, - 0x9a,0x8f,0x21,0xbb,0x7e,0xd1,0x0f,0xa0,0xf3,0xd3, - 0x57,0x13,0x5e,0x61,0xb3,0x8a,0x16,0x24,0xac,0x17, - 0x73,0xd5,0xbc,0xd7,0xf5,0xa8,0xab,0x7e,0xe8,0x06, - 0xea,0x58,0xc2,0x16,0x4e,0x21,0xee,0x42,0xb5,0x02, - 0xfe,0x4c,0xbd,0x7f,0xe6,0xdb,0xe9,0xfb,0xa8,0x25, - 0x5e,0x88,0x43,0x49,0x9e,0xf6,0x9c,0xb7,0x41,0xc0, - 0xeb,0xf4,0xbe,0x43,0x3f,0x15,0xd5,0xae,0x48,0xd2, - 0xf5,0xe4,0x23,0xe8,0x78,0x4a,0xd4,0x4d,0xc9,0x13, - 0xc0,0x26,0xc0,0x94,0x04,0xaf,0x11,0x6a,0x63,0xe0, - 0xbe,0x18,0xe3,0xc7,0xa2,0xf9,0x27,0x71,0x22,0xad, - 0xb3,0x0e,0x06,0xa1,0x4c,0x81,0x3a,0xb9,0x81,0xb0, - 0x2a,0xe9,0xdb,0xa0,0xe2,0x8e,0x49,0x0d,0x45,0xc1, - 0xfb,0xa1,0x11,0xe3,0x26,0xa3,0x3e,0xf4,0x75,0xfa, - 0xac,0xb8,0x8f,0xb0,0x5d,0xbe,0x6b,0x51,0xc7,0xa2, - 0x76,0xda,0x0e,0xf8,0x35,0xe1,0x1b,0x33,0x17,0x52, - 0xad,0x20,0xcd,0x03,0x84,0xd5,0xef,0x98,0x80,0x3a, - 0x93,0x58,0x7b,0x8d,0x22,0xec,0x98,0xc6,0x55,0x68, - 0xc3,0xb4,0x4a,0xbe,0x0e,0x9c,0x19,0x38,0x76,0x25, - 0xe0,0x85,0x1c,0xe7,0x62,0x19,0x0a,0x39,0x13,0xd9, - 0x44,0x8b,0x03,0x87,0xa0,0x08,0xf1,0xf2,0x19,0x5c, - 0x6f,0x26,0x8a,0x4c,0xff,0x92,0xf8,0x55,0x9d,0xab, - 0x6a,0x0a,0xf9,0xde,0x50,0x5b,0x3e,0x66,0xa1,0x9f, - 0xd5,0x3f,0x01,0xeb,0x03,0x5f,0x45,0x1f,0x58,0x71, - 0xda,0xa6,0xf5,0xb4,0x59,0xd7,0xe3,0x55,0xd4,0x5a, - 0xe6,0x42,0xb4,0xe8,0xb3,0x64,0xf6,0x27,0x3c,0x75, - 0xf5,0x41,0xca,0x9d,0xfe,0xbf,0x33,0xad,0xd3,0xf3, - 0xff,0x4a,0xf2,0x96,0xa7,0x3f,0x26,0x7a,0xf1,0xff, - 0x3e,0x0a,0xf2,0xe6,0xfd,0x5e,0x75,0x3f,0xf0,0x2f, - 0xd4,0x1e,0x36,0x44,0xd2,0xdd,0x7f,0x80,0x71,0x11, - 0x5f,0x5f,0x02,0x65,0x85,0xd4,0xc5,0x08,0x94,0x01, - 0x10,0x65,0x0c,0xfa,0x37,0x48,0xe3,0x3d,0xe0,0x4a, - 0x94,0x35,0xd5,0xca,0x42,0xa8,0xe5,0x63,0x59,0x03, - 0x6f,0x75,0xb0,0x20,0xb0,0x0b,0xba,0x4f,0xfb,0x64, - 0x8c,0xe7,0x5d,0x46,0xef,0xb5,0x39,0xca,0x6a,0xb9, - 0xc0,0x71,0xad,0xb2,0x7f,0xcc,0x92,0x78,0x26,0xc6, - 0xd8,0x11,0x38,0x00,0x50,0x19,0xae,0x01,0xf0,0x61, - 0x1f,0x47,0x69,0xb5,0xaf,0xa0,0x22,0x7c,0x69,0x17, - 0xff,0x6f,0xa0,0x62,0x4f,0x23,0x80,0x2f,0xd3,0x9c, - 0xc5,0xbf,0xd5,0xc3,0xc3,0xc0,0x01,0xe8,0xf7,0xe0, - 0xfb,0x68,0x01,0x9f,0xc6,0x70,0xb4,0x70,0x7d,0x09, - 0x55,0xd4,0x76,0xd5,0xd8,0xf8,0xf6,0x41,0xfd,0xe6, - 0x43,0xea,0x8e,0x4c,0x45,0x5d,0x44,0xe6,0xe4,0x3a, - 0xa3,0x74,0xa2,0xd2,0x75,0xaf,0x4a,0x78,0xdd,0x8f, - 0x11,0xd6,0x06,0xec,0x24,0xc2,0xcf,0x38,0xa6,0x75, - 0x63,0x8c,0xb1,0x69,0x02,0x00,0x6f,0x45,0x7c,0xbd, - 0x6e,0x3b,0x84,0x87,0x11,0x76,0x2f,0xf3,0x5b,0x92, - 0x1f,0x25,0x99,0x97,0x8f,0x01,0xb4,0x47,0x07,0x2a, - 0xea,0x38,0x0c,0xed,0x2c,0x6e,0x0a,0xec,0x8b,0x8e, - 0x98,0xdd,0x01,0x4c,0x44,0xf5,0x3d,0xe2,0x2c,0xfe, - 0x2f,0xa0,0xfc,0xef,0x89,0x3d,0xf5,0x47,0x5d,0x00, - 0x42,0xd4,0x29,0xb0,0x67,0xe5,0x10,0xe7,0x58,0xe8, - 0x88,0xdc,0x66,0x61,0x99,0x73,0x06,0x80,0x3e,0x60, - 0xf6,0x02,0x8e,0x26,0xbb,0x05,0xc9,0x43,0x28,0xcd, - 0xff,0x4a,0xd2,0xf5,0xad,0x36,0x2b,0x83,0xb7,0x50, - 0x4a,0xf1,0xe9,0x28,0xb5,0xf3,0x58,0xd2,0xfd,0xae, - 0x0c,0x00,0xbe,0xd4,0xf5,0x78,0x08,0xf5,0x66,0xbf, - 0x92,0xfa,0xa5,0x25,0x67,0xa9,0x03,0x38,0x19,0x05, - 0x62,0x42,0x8b,0x8e,0x1e,0x05,0x3c,0x9e,0xd7,0x84, - 0x32,0xd0,0x81,0x52,0x77,0x7b,0x33,0x19,0xb8,0x39, - 0xe1,0xb5,0xff,0x8f,0xe8,0xef,0xd3,0x23,0x28,0x2b, - 0xab,0x5d,0x42,0x7b,0x2a,0x43,0xb2,0x0e,0x00,0xdd, - 0xa2,0xce,0xb8,0xd7,0xe9,0x68,0xd6,0x00,0xc2,0x0a, - 0x61,0xce,0x42,0xc1,0xfd,0x2c,0x3c,0x80,0x6a,0xa7, - 0x44,0x9d,0xcb,0xde,0x00,0x6d,0x2a,0x84,0x9e,0xa1, - 0xad,0x8b,0x3d,0xc8,0x26,0xd0,0x92,0xa5,0x09,0xe8, - 0x28,0x54,0x9a,0x56,0xa2,0x45,0x59,0x86,0xf0,0xcd, - 0xba,0xb4,0x41,0x7a,0xb3,0x9e,0xe2,0x04,0x00,0x86, - 0xe7,0x36,0x0b,0xcb,0x5c,0x93,0x33,0x00,0x96,0x46, - 0x67,0x68,0xc7,0xa1,0x28,0x72,0xda,0xc5,0xff,0x2c, - 0x74,0xae,0x7f,0x33,0xf4,0xa1,0xff,0x3b,0xbc,0xf8, - 0xb7,0x7a,0x99,0x09,0x5c,0x81,0xce,0x4b,0x6f,0x88, - 0x7e,0x6f,0xd2,0xfe,0x8c,0x6f,0xc0,0xdc,0xac,0x9b, - 0xd3,0x08,0x4f,0x75,0x6c,0x92,0x45,0xd1,0x8d,0xeb, - 0x49,0x84,0x2f,0xfe,0x7f,0x84,0xfa,0xde,0x97,0xd9, - 0xc7,0x69,0xbd,0x1b,0xfd,0x0f,0x92,0x05,0x85,0x56, - 0x05,0xb6,0x0f,0x18,0xf7,0x6d,0xd4,0x11,0xa3,0x5d, - 0x5e,0x0a,0x1c,0xf7,0x0e,0xe9,0x52,0x79,0xa3,0xbe, - 0x67,0x69,0x8e,0xf3,0x94,0xcd,0xee,0xc0,0x92,0x01, - 0xe3,0xae,0x27,0xdb,0x63,0x47,0x17,0x06,0x8e,0x73, - 0x4b,0xc0,0x62,0x4d,0x05,0xce,0x45,0x45,0x9c,0xab, - 0xb8,0xf8,0x07,0x1d,0x27,0x09,0xe5,0x00,0x80,0x65, - 0xed,0x1d,0xc2,0xef,0xf3,0xea,0x14,0x5c,0xae,0xbd, - 0x26,0x07,0x00,0x8e,0x46,0xbb,0x69,0xa1,0xa9,0x55, - 0xbd,0x99,0x80,0x16,0x2e,0x23,0x81,0xcf,0x93,0x2e, - 0x75,0xd3,0xac,0x2a,0x46,0xa1,0x74,0xcc,0x15,0xd0, - 0xce,0x74,0xda,0x9b,0xeb,0xc5,0xd1,0x82,0xec,0xf8, - 0x94,0xd7,0xa9,0x9b,0xad,0x50,0x55,0xe7,0x5d,0x63, - 0x3c,0xe7,0x74,0xd4,0x61,0xa4,0xec,0xb6,0x8d,0xf8, - 0x7a,0xd2,0x7e,0xd6,0x87,0x04,0x8c,0x79,0x18,0x05, - 0x18,0xda,0x69,0x32,0x61,0x5d,0x06,0xee,0x21,0xdd, - 0x0e,0x6a,0x54,0x00,0x60,0x40,0x8a,0x6b,0x97,0x4d, - 0xe8,0x59,0xee,0xac,0xcf,0xe2,0xff,0x81,0xb0,0xd6, - 0xa9,0x5f,0x20,0xde,0x02,0xce,0xb2,0x31,0x0e,0x65, - 0x01,0x8d,0x44,0x99,0x50,0x59,0xb6,0xf6,0x6c,0xb7, - 0x05,0x62,0x8c,0xad,0x53,0xd1,0x49,0x2b,0x8f,0xd0, - 0x36,0xd1,0x83,0x73,0x9d,0x85,0x65,0xaa,0xc9,0x01, - 0x80,0xb4,0x1e,0x41,0xa9,0x87,0xdd,0xed,0xd3,0xc6, - 0x17,0x3b,0x1d,0xb3,0x42,0xbc,0x81,0xce,0xf5,0x8f, - 0x40,0x01,0x01,0xd7,0xb9,0xc8,0x46,0x3f,0x54,0xc4, - 0xee,0x36,0xc2,0xb3,0x22,0x3a,0x81,0x6f,0xa1,0x40, - 0x4a,0x15,0x6c,0x12,0xf1,0xf5,0x24,0x01,0x80,0x01, - 0x44,0xb7,0x15,0x04,0x05,0x49,0x8a,0xf0,0x7e,0xc0, - 0x98,0xb4,0x41,0xe4,0xa8,0xc2,0x87,0x75,0x39,0x6a, - 0xb3,0x26,0xb0,0x45,0xc0,0xb8,0x71,0x64,0x1f,0xec, - 0x79,0x17,0x15,0x4a,0x8d,0x32,0x04,0xd5,0xed,0xb0, - 0xfc,0x75,0xa2,0x3a,0x1b,0xdb,0xa0,0xcf,0xa3,0x13, - 0xa9,0x4e,0x9b,0xbf,0x56,0xe2,0x04,0x00,0xf2,0x68, - 0x63,0x6a,0xe6,0x00,0x40,0x0d,0x39,0x00,0x10,0xcf, - 0x6c,0xd4,0xca,0x6c,0x4b,0x54,0x21,0xfd,0x62,0xfc, - 0x86,0x6b,0x06,0x4a,0x11,0xfb,0x3d,0x6a,0x13,0xb5, - 0x09,0x3a,0xd3,0xef,0x96,0x7f,0xc9,0xac,0x00,0xfc, - 0x07,0x05,0x16,0x43,0xdf,0xa3,0x3f,0x40,0xf5,0x19, - 0xce,0xc8,0x07,0x0c,0x02,0x6f,0x00,0x00,0x20,0x00, - 0x49,0x44,0x41,0x54,0x6b,0x52,0x39,0xd8,0xa8,0xc5, - 0xd7,0x5e,0x01,0x5e,0x4c,0x70,0xcd,0xcf,0x10,0x5d, - 0xe4,0x6e,0x22,0x7a,0x1f,0x2f,0xc2,0x82,0x01,0x63, - 0xd2,0x06,0x00,0xa2,0x16,0x0c,0x1f,0xa4,0xbc,0x7e, - 0x59,0x84,0xee,0xfe,0x5f,0x4c,0x3e,0x45,0xdf,0x5c, - 0x0c,0xb0,0x5c,0x3a,0x50,0x57,0x91,0xdb,0x50,0x2a, - 0xfc,0x75,0xc0,0x71,0xe8,0x48,0x50,0x95,0x0d,0x8a, - 0x31,0xd6,0xf7,0xa3,0x96,0x87,0xd0,0x9f,0xab,0x38, - 0xc1,0x2a,0x2b,0x98,0x03,0x00,0x61,0xde,0x46,0x37, - 0xd6,0x2b,0xa1,0x02,0x37,0x77,0x16,0x3b,0x1d,0xb3, - 0x52,0xbb,0x0f,0xb5,0xc0,0x1a,0x81,0x8a,0x07,0xd6, - 0x61,0x17,0xa6,0x5d,0x3e,0x83,0xd2,0xd3,0xe3,0xd4, - 0x24,0x19,0x83,0x2a,0x61,0x17,0xb5,0xa8,0x4d,0x62, - 0x04,0xad,0x8f,0x5f,0x3d,0x98,0xf0,0xba,0x3b,0x05, - 0x8c,0xf9,0x13,0xc5,0x04,0xa7,0x96,0x20,0x3a,0xfd, - 0x7e,0x06,0xe9,0xb3,0x68,0x9a,0x10,0x00,0x18,0x02, - 0xec,0x17,0x30,0x6e,0x36,0xf9,0xb5,0xc1,0xbc,0x0b, - 0x78,0x3a,0x60,0xdc,0x3a,0x44,0x67,0xbb,0x58,0xb6, - 0x96,0x01,0x3e,0x07,0x9c,0x85,0xda,0x98,0x3d,0x0e, - 0x7c,0x03,0xd5,0x53,0xa9,0x9a,0x38,0xc5,0xba,0xdb, - 0x59,0xd3,0xc4,0x9a,0x23,0xb4,0x6e,0x8c,0x7f,0xfe, - 0x2a,0xc4,0x01,0x80,0xd6,0x1e,0x47,0xd1,0xfb,0xe5, - 0x50,0x6a,0x6d,0x54,0x7f,0x65,0x33,0x9b,0xeb,0x35, - 0x54,0x67,0x63,0x05,0xe0,0x40,0x60,0x74,0xb1,0xd3, - 0x29,0xb5,0x7e,0x28,0x2d,0xfd,0x6f,0xc4,0xbb,0x49, - 0xbd,0x16,0xb5,0xbc,0x7b,0x24,0x8f,0x49,0xe5,0x28, - 0xaa,0x82,0x7a,0xd2,0xca,0xe9,0x9f,0x0e,0x18,0x73, - 0x45,0xc2,0x6b,0xa7,0xb5,0x52,0xc0,0x98,0xd1,0xa4, - 0xdf,0xc5,0x8b,0x4a,0xc3,0x0c,0x39,0x86,0x50,0x76, - 0x5f,0x22,0xec,0x6c,0xfd,0xdf,0xc9,0xb7,0x35,0x5a, - 0x68,0x16,0x80,0x8b,0x01,0x16,0xeb,0xa3,0xc0,0xcf, - 0x50,0x21,0xce,0x9f,0x50,0xad,0xba,0x0c,0x71,0x82, - 0x95,0x71,0xb2,0x05,0xcc,0x42,0x0d,0x0d,0x1c,0xe7, - 0xc2,0xe7,0x15,0xe2,0x00,0x40,0xef,0x7e,0x8c,0x6e, - 0x52,0x2f,0x24,0xfc,0xfc,0x8b,0x99,0xfd,0xaf,0xe9, - 0xa8,0xd2,0xff,0x06,0x28,0x90,0x56,0xb6,0x16,0x51, - 0x45,0x5b,0x0a,0xf8,0x17,0xf0,0x4d,0xc2,0xab,0xfc, - 0x4f,0x07,0x8e,0x41,0x69,0xff,0x93,0x73,0x9a,0x57, - 0x9e,0xa2,0xd2,0x72,0x1f,0x4d,0x70,0xcd,0xd5,0x51, - 0xb0,0xa9,0x95,0x49,0xa4,0x6b,0xb1,0x97,0xc6,0xba, - 0x01,0x63,0xb2,0x28,0x22,0xbb,0x74,0xc4,0xd7,0xeb, - 0x50,0x28,0xac,0xa8,0xe2,0x7f,0x3d,0x5d,0x46,0x58, - 0x4d,0x85,0xbd,0x81,0x45,0x72,0x9e,0x8b,0x45,0x1b, - 0x8a,0x3e,0x83,0x9e,0x41,0xd9,0x9c,0x55,0x10,0x67, - 0x51,0xe5,0x14,0x6c,0xcb,0x43,0x68,0x75,0x7f,0x1f, - 0x41,0xa9,0x90,0x38,0xa9,0x45,0x4d,0x73,0x22,0xb0, - 0x0b,0xf0,0x2b,0xc2,0x2b,0xfe,0x9a,0xd9,0xff,0x1a, - 0x80,0x3a,0x64,0x7c,0x15,0x05,0x01,0x6c,0xae,0x95, - 0x50,0x7f,0xf8,0x8f,0xc4,0x78,0xce,0xb3,0xe8,0xfb, - 0x59,0xb5,0x5d,0xff,0x79,0x45,0x05,0x00,0x9e,0x4f, - 0x70,0xcd,0x4f,0x05,0x8c,0xb9,0x9b,0x7c,0xce,0x83, - 0x87,0x58,0x2f,0x60,0x4c,0x16,0xc1,0x89,0x56,0x45, - 0x23,0xa7,0x53,0xfd,0x23,0x39,0x1b,0xa3,0x1a,0x3c, - 0x51,0x5e,0x43,0x45,0xe1,0xf2,0x34,0x11,0x9d,0x35, - 0xff,0x42,0xc4,0xb8,0x41,0xa8,0x38,0xe5,0x2f,0x72, - 0x9e,0x4f,0x19,0xdc,0x82,0xde,0xeb,0xb3,0xd2,0x81, - 0x52,0x90,0x07,0xa0,0x20,0xca,0xa2,0x28,0xd0,0xb7, - 0x22,0xb0,0x36,0x0a,0xac,0xc5,0x6d,0x3f,0xb6,0x34, - 0x70,0x0d,0x70,0x1e,0x70,0x2c,0x6a,0xe3,0x5c,0x56, - 0x71,0x8e,0xec,0xb8,0x08,0x9b,0x65,0x6d,0x08,0xe1, - 0x9b,0xc5,0xef,0xe4,0x39,0x11,0xcb,0x96,0x03,0x00, - 0xad,0xad,0x8d,0x76,0x10,0x7e,0xd2,0xf5,0xe7,0xb9, - 0xc0,0xcb,0x85,0xce,0xc8,0xac,0x3a,0x96,0x46,0x3b, - 0x75,0x87,0x91,0xbe,0xdd,0x66,0x1d,0xad,0x06,0xfc, - 0x9b,0xe8,0x1d,0xdb,0x79,0x5d,0x0e,0x1c,0x49,0xf5, - 0x77,0x71,0x5b,0x05,0x3c,0x66,0x03,0x63,0x13,0x5c, - 0x33,0xea,0x58,0x01,0xa8,0xb8,0x62,0x51,0x3e,0x19, - 0x30,0xe6,0x9e,0x0c,0x5e,0x67,0xd9,0x16,0x5f,0x1b, - 0x47,0xf5,0x33,0x70,0x42,0x77,0xff,0x2f,0xa1,0x3d, - 0x0b,0xbb,0xdf,0x10,0x1d,0x00,0x00,0x38,0x94,0x66, - 0x04,0x00,0xa6,0x10,0x56,0x1b,0x21,0x2b,0x7d,0x51, - 0x50,0x68,0x27,0x74,0x34,0x64,0xc5,0x18,0xcf,0x3d, - 0x02,0xd5,0x23,0xd9,0x93,0xf2,0x6e,0xf2,0xbc,0x1d, - 0x63,0xac,0x3f,0x67,0x2d,0x6b,0x71,0x32,0x97,0x26, - 0xe6,0x36,0x0b,0xcb,0x9c,0x8f,0x00,0x84,0x59,0x0c, - 0xb5,0xd6,0x1a,0x0b,0x5c,0x4d,0xd8,0x8d,0x9c,0x59, - 0x53,0x6d,0x88,0x3a,0x02,0xbc,0x04,0x9c,0x84,0x6f, - 0x4a,0xe6,0x67,0x49,0xe0,0x26,0xc2,0x17,0xff,0xd3, - 0x80,0x83,0x50,0xe1,0xb3,0xaa,0x2f,0xfe,0x41,0x45, - 0xba,0x7a,0x33,0x9e,0x64,0x45,0xfa,0x56,0x0f,0x18, - 0x93,0xb4,0xb8,0x60,0x5a,0xc3,0x80,0xb5,0x22,0xc6, - 0x3c,0x47,0x36,0xbb,0xf3,0x23,0x5a,0x7c,0xed,0xc5, - 0x0c,0xae,0x5f,0xa4,0x45,0x51,0xf6,0x4b,0x94,0x4e, - 0xf2,0x2b,0xfe,0xd7,0xd3,0xbf,0x50,0x21,0xce,0x28, - 0x6b,0x10,0xd6,0xb6,0xd0,0xe2,0x99,0x8d,0x02,0x67, - 0xdf,0x43,0x81,0xc5,0xcf,0x12,0xef,0xf7,0x7c,0x27, - 0xd4,0xb5,0xa6,0x6f,0xf6,0x53,0xcb,0x44,0x9c,0x45, - 0x55,0x68,0xcb,0x58,0xb3,0x50,0x71,0xba,0x68,0x54, - 0x3d,0xbb,0xac,0x51,0x1c,0x00,0x88,0xa7,0x1f,0xb0, - 0x17,0x4a,0xd3,0x7c,0x08,0xdd,0x8c,0x87,0x56,0xc7, - 0x34,0xab,0xb3,0xfe,0x68,0x17,0xec,0x5e,0x54,0xc5, - 0xfc,0xcb,0x44,0x57,0x3c,0x6f,0xaa,0x7e,0xc0,0x5f, - 0x09,0x2b,0x0a,0x07,0x0a,0xa4,0x6c,0x8a,0x76,0x34, - 0xeb,0xa2,0x55,0x50,0x28,0xe9,0x4d,0xc4,0x1a,0x01, - 0x63,0x92,0x1c,0x2d,0xc8,0xc2,0xb6,0x44,0x7f,0xde, - 0x66,0x55,0x9b,0xa0,0xd5,0x51,0x83,0x17,0x33,0x7a, - 0x8d,0xa2,0x1c,0x40,0x58,0xa1,0xb3,0xdb,0x48,0x96, - 0x45,0x92,0x44,0x27,0xf0,0xdb,0xc0,0xb1,0x2e,0x06, - 0x98,0xaf,0x4e,0xe0,0x06,0x94,0x11,0x70,0x04,0xe1, - 0xbb,0xfa,0xbb,0xa0,0x4c,0xcf,0x32,0x9a,0x44,0xf8, - 0xd9,0xea,0x56,0xd9,0x3f,0x66,0x49,0xac,0x16,0x63, - 0xec,0x8b,0x79,0x4d,0xc2,0xb2,0xe7,0x00,0x40,0x72, - 0x1f,0x43,0x05,0x80,0xc6,0x01,0x3f,0xa4,0xf5,0x8e, - 0x96,0x59,0x5d,0x2d,0x81,0xea,0x65,0xbc,0x88,0xaa, - 0xab,0xc7,0x69,0x5f,0xd7,0x54,0xdf,0x22,0xfc,0xfb, - 0xf4,0x24,0xca,0x38,0x7a,0x38,0xbf,0xe9,0xb4,0x5d, - 0x5f,0x5a,0x77,0x3a,0x78,0x2b,0xc1,0x35,0x17,0x46, - 0x59,0x15,0xad,0xcc,0xa0,0xb8,0x23,0x5c,0x21,0x05, - 0xc7,0xb2,0x28,0x00,0xb8,0x04,0x30,0xbc,0xc5,0xd7, - 0xdb,0x99,0x9a,0x9d,0xb5,0x0e,0xc2,0x17,0xd0,0x79, - 0x17,0xff,0xeb,0xe9,0x52,0xc2,0x8e,0x1b,0xec,0x0e, - 0x2c,0x9e,0xef,0x54,0x0c,0x05,0x02,0xce,0x07,0x36, - 0x07,0x26,0x04,0x3e,0xe7,0x1b,0xc0,0x36,0xb9,0xcd, - 0x28,0xb9,0x4e,0xc2,0x3b,0x50,0x85,0x64,0x41,0x99, - 0xc5,0x11,0x27,0x03,0xa0,0x5d,0x41,0x57,0xcb,0x40, - 0x93,0x03,0x00,0x17,0x02,0x3f,0x07,0xde,0x4d,0x79, - 0x9d,0x25,0x51,0x9a,0xf3,0x4b,0xa8,0x58,0xe0,0x46, - 0x29,0xaf,0x67,0x56,0x05,0xeb,0xa1,0x1d,0xe9,0x97, - 0x81,0x53,0x69,0xbd,0xe8,0x08,0x31,0x05,0x38,0x07, - 0x38,0x3b,0xe5,0x75,0xca,0x6e,0x75,0xd4,0x1a,0x31, - 0xc4,0xb3,0xc0,0x96,0x28,0x25,0xbe,0x4e,0x16,0xa6, - 0x75,0xb7,0x83,0x24,0x01,0x80,0x25,0x02,0xc6,0xbc, - 0x44,0x31,0x05,0x00,0x07,0x02,0x9f,0x09,0x18,0x77, - 0x6f,0x06,0xaf,0x15,0x55,0x68,0xf0,0xbe,0x0c,0x5e, - 0xa3,0x28,0xdb,0x00,0xab,0x04,0x8e,0xbd,0x0a,0x2d, - 0x9c,0xda,0xf5,0x78,0x8d,0xb0,0x9a,0x4a,0x03,0x51, - 0x4b,0x54,0x6b,0x8f,0x87,0x80,0xed,0x08,0xcb,0x04, - 0xe8,0x40,0x9f,0x41,0xfd,0x73,0x9d,0x51,0x32,0x2f, - 0x05,0x8e,0x5b,0x0e,0x1d,0x59,0x35,0xcb,0x4a,0x48, - 0x66,0x1d,0xa8,0x00,0x60,0x68,0xb0,0xcd,0x4a,0xa0, - 0xc9,0x01,0x80,0x71,0xc0,0xd7,0xd1,0x1b,0xe6,0xe1, - 0xc0,0x7f,0x53,0x5e,0xaf,0x3f,0x2a,0x40,0x73,0x3f, - 0xba,0xc9,0xfa,0x22,0xe5,0xfc,0x20,0x31,0x4b,0xaa, - 0x2f,0xda,0xc9,0xbc,0x13,0xed,0x48,0x1f,0x40,0xfa, - 0x23,0x30,0x4f,0xa3,0x76,0x76,0xcb,0x76,0xfd,0x19, - 0x72,0x96,0xb6,0xca,0x7e,0x40,0xd8,0xf7,0x6c,0x02, - 0xb0,0x03,0xf5,0xfc,0x40,0x8d,0xfa,0xfb,0x27,0x29, - 0xc6,0xb5,0x60,0xc0,0x98,0x49,0x09,0xae,0x9b,0x85, - 0x4f,0x13,0x3d,0xbf,0x49,0xc0,0x53,0x19,0xbc,0x56, - 0xab,0x33,0xe6,0x33,0x81,0xd1,0x19,0xbc,0x46,0x51, - 0x42,0x8b,0xff,0x95,0xdd,0xa1,0x84,0xb7,0xfb,0xb4, - 0xf4,0x1e,0x46,0xf7,0x7a,0x21,0x56,0x47,0xf7,0x71, - 0x65,0x13,0x27,0x73,0x27,0xa4,0xdb,0x88,0x59,0x88, - 0xfe,0x84,0xd7,0x3c,0xab,0x53,0x96,0x62,0x23,0x34, - 0x39,0x00,0xd0,0xed,0x7d,0xe0,0x02,0x54,0x41,0x7a, - 0x6b,0xe0,0x5a,0xd2,0x57,0x0e,0xde,0x18,0xf8,0x23, - 0x4a,0x8b,0xfe,0x1e,0x61,0xbb,0x53,0x66,0x65,0xb5, - 0x28,0xea,0x51,0x3f,0x16,0xb5,0x4e,0xda,0x3c,0xe5, - 0xf5,0xe6,0x00,0x7f,0x43,0x0b,0xa3,0x35,0xd0,0xae, - 0xcb,0x94,0x94,0xd7,0xac,0x82,0x91,0xa8,0x86,0x48, - 0x88,0x83,0x81,0x17,0xf2,0x9b,0x4a,0xa1,0xa2,0xce, - 0x70,0x87,0xf4,0x55,0xef,0x29,0x24,0x00,0xf0,0x7e, - 0x82,0xeb,0x66,0xe1,0xa0,0x80,0x31,0x0f,0x91,0x4d, - 0x75,0xfe,0xed,0x5b,0x7c,0xed,0x61,0xaa,0xdb,0xa7, - 0x79,0x38,0x3a,0xa7,0x5d,0x07,0x2b,0x53,0xce,0x54, - 0xf3,0x3a,0xbb,0x10,0x78,0x2c,0x70,0xec,0x71,0x79, - 0x4e,0x24,0xa1,0x47,0x63,0x8c,0xdd,0x2c,0xb7,0x59, - 0x58,0xd3,0x6c,0x0a,0x0c,0x0d,0x1c,0xeb,0x00,0x40, - 0xc5,0x38,0x00,0xf0,0x61,0xff,0x46,0xed,0x60,0x56, - 0x04,0xfe,0x8f,0xf4,0x15,0x2d,0x87,0x03,0xa7,0xa0, - 0x34,0xe9,0x4b,0x08,0xeb,0x5d,0x6c,0x56,0x16,0x1f, - 0x45,0xc1,0xb1,0x97,0x81,0xd3,0x51,0xef,0xe5,0x34, - 0x26,0x02,0x67,0xa0,0xe2,0x77,0xbb,0x02,0xb7,0xa6, - 0xbc,0x5e,0xd5,0x1c,0x49,0x58,0xa5,0xe9,0xab,0x50, - 0x80,0xa4,0xae,0xa2,0x32,0x00,0xea,0x14,0x00,0x58, - 0x03,0xf8,0x5c,0xc0,0xb8,0x2c,0xba,0x13,0x2c,0x06, - 0x6c,0xd0,0xe2,0xeb,0x59,0xb4,0x18,0x2c,0xca,0x21, - 0xd4,0xab,0x6d,0xf1,0x61,0x45,0x4f,0xa0,0x61,0xe6, - 0x00,0xbf,0x0c,0x1c,0xbb,0x2e,0xe1,0x69,0xcf,0xed, - 0xf2,0x48,0x8c,0xb1,0x3b,0xe4,0x36,0x0b,0x6b,0x9a, - 0x4f,0xc7,0x18,0x9b,0x45,0x0d,0x1b,0x6b,0x23,0x07, - 0x00,0xe6,0xef,0x15,0x54,0xd8,0x6c,0x79,0x54,0xe9, - 0xff,0x81,0x94,0xd7,0x1b,0x88,0xd2,0xa5,0x47,0xa3, - 0xf4,0xe9,0x3d,0x28,0x6f,0xcb,0x99,0xac,0xfc,0x82, - 0xf6,0x9e,0xc1,0x6c,0xd7,0xe3,0xd4,0x2c,0xbf,0x49, - 0x25,0xd4,0x07,0xed,0xb4,0xdd,0x0a,0x3c,0x8e,0xd2, - 0x55,0x07,0xa7,0xbc,0xe6,0x68,0xb4,0xa3,0xbd,0x1c, - 0x2a,0x80,0x17,0x7a,0x9e,0xb1,0x6e,0x76,0x0e,0x18, - 0x33,0x9b,0xf0,0x1a,0x01,0x75,0x95,0x24,0x3d,0x3a, - 0xe4,0xb8,0x55,0x11,0x69,0xd7,0xdf,0x0e,0x7c,0xdd, - 0x2c,0x76,0x4f,0x76,0xa6,0xf5,0x67,0xfa,0xf5,0x19, - 0xbc,0x46,0x11,0xfa,0xa2,0x00,0x40,0x9d,0xec,0x8a, - 0xdb,0xa3,0xb6,0xdb,0xb5,0xe8,0xfd,0x35,0xc4,0x4e, - 0x79,0x4e,0x24,0x81,0x47,0x09,0x0f,0x60,0x6e,0x48, - 0xeb,0x22,0xab,0x66,0xa1,0x76,0x0c,0x1c,0x37,0x07, - 0x6d,0xa0,0x5a,0x85,0x38,0x00,0xd0,0xda,0x0c,0xe0, - 0x72,0x94,0xd2,0xbf,0x51,0xd7,0xff,0x4e,0xb2,0x3b, - 0x35,0xaf,0xcd,0x51,0x1a,0xf5,0x58,0x94,0x56,0xed, - 0x37,0x6a,0x2b,0x83,0x61,0x28,0xf5,0xf1,0x39,0xd4, - 0xa2,0x2e,0x6d,0x8a,0xea,0x4c,0xd4,0x5b,0xf9,0x93, - 0x68,0x57,0xf2,0x62,0xaa,0x9b,0x7e,0x9c,0x85,0xe1, - 0xc0,0x9a,0x01,0xe3,0xfe,0x89,0xfe,0x0d,0xea,0x2c, - 0xea,0x3d,0x34,0x49,0xfb,0xc8,0x90,0xf7,0xe5,0x90, - 0x2c,0x81,0x2c,0x8d,0x20,0xfc,0x3c,0x71,0x68,0x7a, - 0x72,0x2b,0x07,0xb4,0xf8,0xda,0x04,0xe0,0x8e,0x0c, - 0x5e,0xa3,0x08,0xbb,0x52,0xbf,0xf6,0x66,0xfd,0x51, - 0x50,0xd4,0xda,0x67,0x12,0xe1,0x81,0xb6,0x4d,0xf3, - 0x9c,0x48,0x02,0xb3,0x08,0x2f,0x12,0xda,0x5d,0xab, - 0xc7,0x2c,0x8d,0xf5,0x51,0xb7,0xb3,0x10,0xa3,0x51, - 0x11,0x40,0xab,0x10,0x07,0x00,0xc2,0x3d,0x88,0xb2, - 0x01,0x96,0x47,0xe7,0xfa,0xd3,0xb6,0x93,0x5a,0x01, - 0xa5,0x55,0xbf,0x82,0xd2,0xac,0x3f,0x9a,0xf2,0x7a, - 0x66,0x49,0xac,0x86,0xce,0xe0,0xbf,0x02,0x9c,0x45, - 0x78,0x6f,0xfa,0xde,0xbc,0x06,0x9c,0x8c,0x7e,0xbe, - 0xbf,0x48,0xb5,0xd3,0x8e,0xb3,0xb4,0x65,0xe0,0xb8, - 0xab,0x72,0x9d,0x45,0x39,0xcc,0x88,0xf8,0xfa,0x02, - 0x09,0xae,0x19,0xb2,0x3b,0xd6,0xee,0x00,0xc0,0x39, - 0x84,0xa5,0xad,0xcf,0x24,0x7d,0xd0,0x67,0x04,0xb0, - 0x55,0x8b,0xaf,0xff,0x85,0xf0,0xdd,0xcf,0xb2,0xa9, - 0x4b,0xf1,0xbf,0x9e,0x0e,0xc1,0xf7,0x60,0xed,0x16, - 0x5a,0x68,0x33,0x24,0x58,0xdb,0x6e,0xb7,0xc5,0x18, - 0xeb,0x4e,0x13,0x96,0xd6,0x91,0x31,0xc6,0xfe,0x39, - 0xb7,0x59,0x58,0x6e,0xfc,0xe1,0x13,0xdf,0x5b,0xc0, - 0x8f,0x51,0x9d,0x80,0x3d,0x49,0xbf,0xab,0xb2,0x00, - 0x4a,0xb3,0x7e,0x1c,0xa5,0x5d,0xef,0x82,0xff,0x5d, - 0x2c,0x5f,0x1d,0x28,0xb5,0xeb,0x66,0x74,0x43,0x74, - 0x14,0xe1,0x85,0x5e,0x7a,0x73,0x37,0x5a,0xf0,0x8f, - 0x00,0x7e,0x08,0xbc,0x9e,0xf2,0x7a,0x75,0x33,0x32, - 0x70,0x5c,0x13,0xce,0xd1,0x4d,0x8e,0xf8,0x7a,0x92, - 0xac,0xa8,0x90,0x7a,0x2d,0xcb,0x25,0xb8,0x6e,0x52, - 0x5f,0x26,0xac,0xf5,0x1f,0xa8,0xf3,0x45,0xda,0xc2, - 0xb3,0x5f,0xa1,0xf5,0x51,0x83,0x6b,0x52,0x5e,0xbf, - 0x28,0xab,0x50,0xdf,0x82,0x79,0x23,0x69,0x5d,0xb4, - 0xd1,0xb2,0x17,0xfa,0xb9,0x34,0x32,0xcf,0x49,0x24, - 0x14,0xe7,0x08,0xcf,0x26,0x94,0xaf,0x8e,0x41,0x5c, - 0xcb,0x00,0xa3,0x80,0xcf,0xe3,0xae,0x19,0xed,0x36, - 0x0c,0xdd,0xcf,0x85,0xba,0x36,0xaf,0x89,0x58,0x7e, - 0xea,0x54,0x54,0xa7,0xdd,0x66,0xa3,0x1f,0xfa,0x6b, - 0x81,0xb5,0x80,0xa3,0x81,0x7d,0x80,0x21,0x29,0xae, - 0xb9,0x4d,0xd7,0x63,0x2c,0xda,0x3d,0xba,0x98,0xe2, - 0x5a,0x57,0x59,0xfd,0x0c,0x45,0x69,0xc2,0xc7,0x00, - 0xab,0x66,0x70,0xbd,0xa9,0xc0,0x15,0xc0,0xd9,0xc4, - 0x2b,0x52,0xd4,0x44,0xcb,0x04,0x8c,0x99,0x4e,0xfd, - 0xd3,0xff,0x41,0x01,0x80,0x19,0xf4,0x9e,0xea,0x9f, - 0xa4,0x6b,0xca,0xf8,0x80,0x31,0x8b,0xa1,0xa3,0x18, - 0xaf,0x26,0xb8,0x7e,0x1c,0x4b,0x12,0x5e,0x70,0x0c, - 0xe0,0xf9,0x94,0xaf,0xb7,0x30,0xfa,0x9d,0xee,0xcd, - 0x0b,0x54,0xb7,0xe0,0xe6,0xe1,0x84,0xdd,0xfc,0xff, - 0x17,0xd8,0x3b,0xe7,0xb9,0xc4,0x71,0x22,0xba,0x1f, - 0x88,0x72,0x18,0x0a,0xc4,0x5a,0x7b,0x84,0x9e,0xa3, - 0x1f,0x84,0x8e,0x69,0xcc,0xcc,0x71,0x2e,0x71,0x3d, - 0x81,0xde,0x2b,0x56,0x0e,0x1c,0xff,0x1d,0x94,0xb5, - 0x5a,0x55,0x27,0xa1,0xe3,0x83,0x57,0xa2,0xac,0xdb, - 0x93,0xd1,0x4e,0x73,0x16,0xdd,0x52,0xac,0xb5,0xa3, - 0x09,0x5f,0xcb,0xdc,0x0f,0x3c,0x9b,0xe3,0x5c,0x2c, - 0x27,0x0e,0x00,0x64,0xe3,0x71,0x74,0xa3,0xf2,0x2d, - 0x94,0x7a,0x75,0x14,0xe1,0x6f,0xd2,0xf3,0xb3,0x12, - 0x4a,0xc7,0xfe,0x11,0x70,0x19,0x5a,0x60,0x3d,0x93, - 0x72,0x8e,0xd6,0x5c,0x1f,0x41,0x6f,0xe8,0x07,0xa2, - 0xc8,0x6e,0x5a,0x2f,0x00,0xe7,0x01,0x17,0x01,0x6f, - 0x67,0x70,0xbd,0x26,0x08,0x09,0x00,0x4c,0xcc,0x7d, - 0x16,0xe5,0xf1,0x16,0xbd,0x9f,0xeb,0x4e,0x72,0xde, - 0x7b,0x32,0xf0,0x06,0xd1,0x85,0xd5,0xd6,0x23,0xdf, - 0x00,0x40,0x3f,0xe0,0x77,0x28,0xd8,0x10,0x2a,0x6d, - 0x51,0xcc,0xaf,0xd2,0xfa,0xf7,0xfa,0x17,0x54,0x33, - 0xfd,0x7f,0x10,0xad,0xeb,0x1a,0xcc,0xeb,0x37,0xc4, - 0xeb,0x95,0x9e,0xb7,0x73,0x08,0x0b,0x00,0x7c,0x06, - 0xfd,0xbc,0x87,0x04,0xb0,0x2c,0xbd,0x38,0xf5,0x45, - 0x06,0x52,0xae,0x00,0x00,0xc0,0x1f,0x80,0x1f,0x04, - 0x8e,0xfd,0x12,0xba,0x87,0x4c,0x1b,0x60,0x2c,0xc2, - 0xda,0x28,0xab,0xa9,0xdb,0x5a,0x28,0x8b,0xe9,0x51, - 0xf4,0xf7,0xff,0x6b,0x11,0x93,0x6a,0x88,0x65,0x51, - 0xf0,0x28,0xd4,0x85,0x79,0x4d,0xc4,0xf2,0xe5,0x54, - 0xf3,0x6c,0x4d,0x42,0x37,0x5b,0xab,0xa2,0x2a,0xb2, - 0x37,0x91,0x2e,0x5a,0x39,0x14,0x05,0x13,0x9e,0x42, - 0xbb,0x04,0x3b,0xe2,0x54,0x28,0x0b,0xb7,0x0d,0x6a, - 0x27,0xf7,0x2c,0xf0,0x35,0xd2,0x2d,0xfe,0x3b,0x51, - 0x81,0xba,0x5d,0x51,0x70,0xeb,0xa7,0x78,0xf1,0x1f, - 0xc7,0x5e,0xe8,0x77,0xb7,0xd5,0xa3,0x6e,0x85,0xce, - 0x5a,0x69,0x55,0x43,0x65,0x04,0xc9,0x82,0xd3,0xff, - 0x0d,0x18,0x13,0xd2,0x89,0x21,0x8d,0xf3,0x89,0x9f, - 0xd6,0x9d,0x26,0x20,0xb1,0x2c,0xf0,0xf5,0x16,0x5f, - 0x7f,0x17,0x65,0x92,0x55,0xd1,0xe7,0x09,0x3b,0x0e, - 0x32,0x0d,0xf8,0x7d,0xce,0x73,0x89,0xeb,0x7e,0xb4, - 0x31,0x10,0xa5,0x2f,0x1f,0x5e,0xe8,0x58,0xbe,0x16, - 0x8e,0x31,0x76,0x6a,0x6e,0xb3,0x48,0xee,0x32,0xc2, - 0xef,0x29,0xfb,0xa2,0x76,0xd6,0x55,0xd3,0x41,0xef, - 0xf5,0x53,0xd6,0x45,0xf5,0x4c,0x46,0x91,0xff,0x7b, - 0x79,0x53,0x9d,0x4e,0xf8,0xee,0xff,0x44,0x9a,0x51, - 0xb7,0xa8,0x96,0x1c,0x00,0xc8,0x47,0x27,0x5a,0xb0, - 0xef,0x8c,0xce,0x30,0xfe,0x1c,0xdd,0x88,0x25,0xd5, - 0x81,0x7a,0xbb,0xde,0x84,0x76,0x39,0x8e,0x26,0xfd, - 0x99,0x6d,0xab,0xa7,0xc1,0x7c,0xb8,0xa6,0xc4,0x67, - 0x49,0xf7,0x7b,0x3e,0x19,0x7d,0x18,0xaf,0x01,0x6c, - 0x87,0x02,0x0a,0x73,0x52,0xce,0xd1,0x6c,0x4c,0x8b, - 0xaf,0xf5,0x43,0x35,0x56,0xe2,0x0a,0x29,0x38,0xb9, - 0x27,0xf9,0xb5,0x60,0x3d,0x89,0xf9,0x57,0x76,0x8f, - 0x6a,0x23,0x9b,0x26,0xf3,0xe3,0x5c,0x60,0xa1,0x16, - 0x5f,0xbf,0x00,0x78,0x2f,0xc5,0xf5,0x8b,0x14,0x5a, - 0xfc,0xef,0x3a,0xca,0x59,0x81,0xfa,0xa2,0xc0,0x71, - 0x5f,0xa1,0xfe,0x6d,0x81,0xcb,0x62,0x64,0xe0,0xb8, - 0xa9,0x94,0x33,0x6b,0xe6,0x05,0xe0,0xef,0x31,0xc6, - 0xef,0x45,0x78,0x2b,0xb7,0xb2,0x38,0x02,0xd8,0x22, - 0x62,0xcc,0x06,0xc0,0x0d,0xc0,0x29,0xf9,0x4f,0xa7, - 0x51,0xb6,0x42,0xf5,0x6b,0x42,0xfd,0x92,0xf0,0x63, - 0x35,0x56,0x32,0x1d,0x9d,0x9d,0x3e,0x4e,0xd3,0x26, - 0x83,0x81,0x7d,0xd1,0x8e,0xfe,0xda,0x19,0x5c,0x6f, - 0x12,0x70,0x09,0x5a,0x9c,0xb5,0xba,0x99,0x2e,0xca, - 0x82,0xa4,0xab,0x87,0x50,0x56,0xef,0x51,0xce,0x1b, - 0xea,0x15,0xd0,0xcf,0xd6,0x21,0xc0,0x22,0x19,0x5c, - 0xef,0x29,0xe0,0xd7,0x68,0xc7,0xa1,0x8c,0x7f,0x5f, - 0xab,0xb6,0x1f,0xa0,0x33,0x9d,0xbd,0xf9,0x02,0xf1, - 0x77,0x16,0x36,0x07,0xee,0x0c,0x18,0xf7,0x65,0xe0, - 0x8f,0x31,0xaf,0x1d,0xe5,0x38,0x74,0x6c,0xab,0xa7, - 0xbf,0xa3,0x1d,0xab,0xf3,0x5b,0x3c,0x77,0x5f,0x92, - 0xed,0x60,0xef,0x8b,0x8e,0x1b,0xf4,0xe6,0x4d,0xd4, - 0xe5,0x23,0x4d,0xf0,0xb9,0x28,0xeb,0xa3,0xd6,0x52, - 0x21,0xb6,0x01,0x6e,0xcf,0x71,0x2e,0x49,0x2d,0x8e, - 0x52,0xfb,0x43,0xd2,0xce,0x77,0x45,0xc1,0xd5,0x32, - 0xbb,0x0f,0xb5,0x44,0x8e,0x72,0x2d,0x0a,0xb4,0x95, - 0xd1,0x6b,0xc0,0xd2,0x01,0xe3,0x9e,0x47,0x9b,0x37, - 0x65,0xf4,0x29,0xe2,0x75,0x04,0x78,0x11,0x58,0x07, - 0x98,0x92,0xcb,0x6c,0xb2,0xb5,0x0a,0x6a,0xd5,0x18, - 0x72,0xef,0x38,0x1b,0x75,0x6b,0x28,0xc3,0xf9,0xf3, - 0x51,0x28,0x28,0x11,0xe5,0x2a,0xf4,0xd9,0x56,0x46, - 0xcb,0x02,0x0f,0x11,0x7d,0x8c,0xae,0xdb,0x24,0x14, - 0xa8,0x2f,0x63,0xf0,0xd5,0x02,0xb8,0x06,0x40,0xfb, - 0x7c,0x80,0x76,0x63,0x2e,0x40,0x2d,0xc1,0x8e,0x41, - 0x1f,0xfa,0x49,0xff,0x0d,0x86,0xa1,0xb4,0xee,0x63, - 0x81,0x1b,0x51,0x24,0x2e,0xce,0x87,0x42,0xde,0xa6, - 0x50,0x8d,0x0f,0x9c,0xaa,0xdb,0x02,0x9d,0x01,0xde, - 0x95,0xf4,0xbb,0x48,0xb3,0x51,0x54,0xfd,0x1c,0xaa, - 0x5b,0x34,0xcc,0xaa,0x21,0x2a,0x5d,0xff,0xe3,0xc4, - 0x0f,0x00,0xdc,0x43,0x58,0x1d,0x80,0x9f,0xa0,0x5d, - 0xe3,0x2c,0x52,0x7c,0xfb,0x74,0x5d,0xef,0x84,0xf9, - 0x7c,0x6d,0x1a,0x73,0xdf,0xe7,0x5b,0x49,0x12,0x85, - 0xdf,0x84,0xe8,0xb3,0x97,0xdf,0xa2,0x9a,0x8b,0x7f, - 0x08,0xdf,0xfd,0x1f,0x03,0xfc,0x2b,0xcf,0x89,0xa4, - 0x30,0x01,0x9d,0x55,0xde,0x2b,0x60,0xec,0x61,0x94, - 0x3f,0x00,0x50,0x75,0xab,0x13,0xb6,0xf8,0x87,0x72, - 0xd7,0x5c,0xba,0x1d,0x65,0x15,0x6d,0x14,0x38,0x7e, - 0x24,0x70,0x29,0xb0,0x47,0x4e,0xf3,0xc9,0xca,0x60, - 0x14,0x3c,0x0a,0xdd,0x38,0xba,0x9c,0x72,0x2c,0xfe, - 0xeb,0x60,0x00,0xfa,0xde,0x87,0x2e,0xfe,0x41,0xd9, - 0x17,0x5e,0xfc,0x57,0x98,0x8f,0x00,0x14,0xe3,0x0e, - 0x14,0x21,0x1f,0x89,0x5a,0x0a,0x86,0xb4,0xb0,0xea, - 0x4d,0x1f,0x94,0xe6,0x7d,0x2b,0x4a,0xfb,0x76,0x5b, - 0xa1,0x66,0xd8,0x0a,0x55,0xde,0xbf,0x03,0xd8,0x9d, - 0x74,0x8b,0xff,0x89,0xc0,0x19,0xa8,0x58,0xe0,0xe7, - 0xf0,0xe2,0xdf,0xf2,0xf7,0x60,0xc4,0xd7,0xb7,0x4c, - 0x70,0xcd,0xd9,0x84,0xed,0xec,0x2f,0x8f,0x0a,0xab, - 0xa6,0xb5,0x0c,0x70,0x0b,0xf3,0x5f,0xfc,0x03,0x9c, - 0x86,0x76,0x12,0xa3,0x6e,0x68,0x17,0x8f,0xf9,0xba, - 0xab,0xa1,0x85,0xe5,0xa0,0x16,0x63,0xee,0x41,0xd9, - 0x3b,0x55,0xb4,0x10,0x2a,0x60,0x16,0xe2,0x62,0xca, - 0x5d,0x15,0xfc,0xb7,0x81,0xe3,0x76,0x40,0xb5,0x2f, - 0x2c,0x3f,0xa1,0x3f,0x53,0x00,0x8f,0xe5,0x36,0x8b, - 0x6c,0x7c,0x2b,0xe6,0xf8,0xdd,0x13,0x3c,0xa7,0x9d, - 0x3a,0x50,0x90,0x22,0x34,0x3b,0x76,0x0a,0xea,0xb4, - 0x61,0xe9,0xf5,0x45,0xef,0xa3,0x21,0xd9,0x3d,0xdd, - 0x9e,0x27,0x9b,0xcf,0x50,0x2b,0x90,0x03,0x00,0xc5, - 0x1a,0x8f,0xda,0x9b,0x2c,0x8f,0xda,0xb5,0x44,0x9d, - 0x15,0x8d,0xf2,0x51,0xaa,0x77,0xde,0xcb,0x92,0xd9, - 0x16,0x15,0xc4,0x49,0x63,0x34,0x70,0x10,0xea,0x8f, - 0xfe,0x2d,0xd2,0x57,0x23,0x37,0x0b,0xf5,0x32,0xad, - 0x7b,0x72,0x7f,0x8c,0x78,0x05,0xbb,0xba,0x9d,0x0d, - 0xcc,0x0a,0x18,0x77,0x30,0x2a,0x64,0x99,0xa4,0xa8, - 0x6a,0x3f,0xb4,0x43,0xfd,0x14,0xbd,0xf7,0xa8,0xbf, - 0x1d,0x05,0x77,0x41,0xed,0xc4,0x5a,0xf9,0x44,0x8c, - 0xd7,0xde,0x02,0x2d,0xee,0x5b,0xb5,0x4a,0x9c,0x82, - 0xfe,0x7e,0x65,0x5e,0x18,0xb7,0xb2,0x1f,0xe1,0x29, - 0xc0,0x97,0xe6,0x3b,0x95,0xd4,0x6e,0x05,0xc6,0x05, - 0x8c,0xeb,0x83,0x8e,0x6f,0x59,0x3e,0x86,0x10,0x9e, - 0x55,0x02,0xe5,0x0f,0x82,0xff,0x1b,0x65,0xeb,0xc5, - 0x71,0x1a,0xe5,0x6d,0x0b,0x78,0x16,0x61,0x99,0x32, - 0xdd,0x7e,0x44,0xfe,0xed,0x5c,0x9b,0x60,0x20,0xf0, - 0x27,0xe2,0x9d,0xfb,0xef,0x44,0xef,0x55,0x33,0x72, - 0x99,0x91,0xb5,0x8d,0x03,0x00,0xe5,0x30,0x03,0xa5, - 0x33,0x6d,0x8c,0xd2,0xba,0x2e,0x47,0x3d,0xc1,0xcd, - 0xb2,0x36,0x13,0xb8,0x02,0xf8,0x24,0x3a,0xb3,0x76, - 0x09,0x4a,0x55,0x36,0x6b,0xb7,0x7f,0xb7,0xf8,0x5a, - 0x5f,0x92,0x05,0x33,0x5f,0xa0,0xf5,0xb9,0xf8,0x79, - 0x1d,0x0f,0xdc,0x4d,0x78,0x20,0x6d,0x61,0x54,0x80, - 0xf5,0x19,0x54,0x7c,0xaf,0xb7,0xae,0x1a,0xaf,0xa0, - 0x73,0x9e,0xdd,0x45,0xc4,0xa2,0xba,0x65,0xec,0x4a, - 0xf4,0xee,0xef,0x20,0x14,0x2c,0xfe,0x27,0xad,0x2b, - 0xe3,0x77,0xa2,0xda,0x00,0x65,0x6a,0x89,0x17,0xd7, - 0xe1,0x81,0xe3,0x6e,0xa6,0xfc,0x8b,0x80,0x39,0xe8, - 0x3d,0x36,0xc4,0x41,0xf8,0x58,0x66,0x5e,0x4e,0x26, - 0x3c,0xd3,0x66,0x32,0x7a,0x5f,0x28,0xbb,0x63,0x88, - 0x57,0x80,0xad,0x03,0xed,0xf4,0x7e,0x3e,0x9f,0xe9, - 0x24,0xf6,0x33,0x74,0x9c,0x35,0xd4,0x43,0xe8,0xc8, - 0xab,0xa5,0xb3,0x20,0x3a,0x3e,0xbc,0x5b,0xcc,0xe7, - 0x9d,0x4b,0xeb,0xcf,0x6e,0xab,0x08,0x07,0x00,0xca, - 0xe7,0x41,0x14,0xa5,0x5d,0x1e,0xa5,0x38,0xb5,0x6a, - 0x97,0x65,0x16,0xea,0x55,0x74,0x13,0xb4,0x02,0x4a, - 0x85,0x0c,0xa9,0x98,0x6e,0x96,0xa7,0x7f,0x46,0x7c, - 0x7d,0xef,0x84,0xd7,0xfd,0x0e,0xe1,0x67,0xdf,0x37, - 0x41,0x47,0x69,0x46,0xa3,0xc2,0x84,0x7b,0xa1,0x5d, - 0xf6,0x75,0x81,0x4d,0xd1,0x51,0xad,0x93,0x50,0x7d, - 0x95,0xd7,0x51,0x86,0xc1,0x4a,0x2d,0xae,0x37,0x05, - 0xa5,0xdb,0xbe,0x35,0xcf,0x7f,0x7b,0x2d,0x62,0x0e, - 0x0b,0xa0,0x0e,0x2f,0x6b,0xcd,0xe7,0x6b,0xc3,0x51, - 0x8d,0x8f,0x27,0xd1,0x99,0xcb,0xa8,0x82,0x72,0x3f, - 0xa2,0xda,0x3d,0xb2,0xb7,0x40,0x99,0x6c,0x21,0x42, - 0xd3,0xeb,0x8b,0x76,0x31,0x61,0x9d,0x53,0x96,0x21, - 0xba,0x5e,0x84,0xc5,0xb7,0x13,0xad,0x5b,0x65,0xf6, - 0xf4,0x07,0xaa,0xb1,0x01,0xf3,0x22,0xf0,0xdd,0x98, - 0xcf,0xe9,0x8b,0x8e,0x49,0x1d,0x9f,0xf9,0x6c,0xe2, - 0xeb,0x8f,0x82,0x63,0xdf,0x88,0xf1,0x9c,0xa9,0xc0, - 0x3e,0x68,0x23,0xc3,0x92,0xdb,0x12,0x78,0x94,0xde, - 0x33,0xd8,0x7a,0xf3,0x08,0xe5,0xf8,0xd9,0xb1,0x0c, - 0x38,0xda,0x5c,0x5e,0x6f,0xa1,0x1e,0xae,0xa7,0xa3, - 0x73,0xd9,0x47,0xa3,0x73,0xdf,0x66,0x71,0xdc,0x8d, - 0x16,0x2d,0x7f,0xc6,0x1f,0x9a,0x56,0x2e,0xff,0x40, - 0x3b,0xd6,0xbd,0xa5,0xe1,0xef,0x88,0x76,0xbb,0xa3, - 0x76,0xd0,0x7b,0x7a,0x13,0x15,0x55,0x8b,0x53,0x44, - 0x70,0xfd,0xae,0x47,0x1a,0x93,0xd0,0x59,0xee,0x9e, - 0xf5,0x0d,0xfe,0x13,0xf0,0xdc,0x35,0xd1,0xb9,0xe3, - 0xff,0xa2,0xa3,0x38,0x0b,0xa2,0xa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x49, - 0x27,0xb0,0x3f,0xca,0x06,0x88,0x6b,0x5f,0x54,0x38, - 0x7a,0x87,0x2c,0x27,0x14,0x60,0x7f,0xb4,0xfb,0x1c, - 0x77,0xf1,0x7f,0x3e,0xf0,0x9b,0xec,0xa7,0xd3,0x08, - 0x43,0x50,0xa6,0xc5,0x58,0xd4,0xb2,0x36,0xee,0xe2, - 0x7f,0x1a,0xfa,0x5c,0x1a,0x9b,0xf1,0xbc,0xac,0x40, - 0x59,0x05,0x00,0xae,0x44,0x6f,0x44,0x21,0x0f,0x67, - 0x1d,0x24,0xf7,0x04,0xda,0x21,0x59,0x16,0xfd,0x12, - 0x3f,0x57,0xec,0x74,0xac,0x64,0x5e,0x40,0x37,0x3d, - 0xcb,0x01,0x5f,0x41,0x1f,0xb2,0x56,0xbc,0xd5,0x09, - 0x7f,0x7f,0x3c,0xb5,0xa0,0x39,0x16,0xe5,0xca,0x88, - 0xaf,0x1f,0x49,0xf2,0x0e,0x17,0xdf,0x44,0x6d,0x57, - 0xf3,0x76,0x17,0x0a,0xb6,0xb5,0x2a,0xe2,0x7a,0x52, - 0x4e,0xaf,0x3d,0x13,0x2d,0xfc,0xf3,0xba,0x7e,0x3b, - 0x1d,0x4c,0xf4,0x11,0x87,0x6e,0xa1,0x0b,0xea,0xb2, - 0xf8,0x0b,0x0a,0x12,0x45,0xe9,0x00,0x0e,0xcd,0x79, - 0x2e,0x75,0xd6,0x0f,0x1d,0xdb,0x79,0x14,0x65,0x4f, - 0x46,0x15,0xe0,0x9c,0xd7,0x64,0xe2,0xa7,0xd4,0x97, - 0xc1,0xdb,0x28,0x5b,0x2a,0x49,0x4b,0xb6,0x15,0x50, - 0x2d,0x8d,0x1b,0x08,0x6f,0x2b,0x98,0xd4,0x66,0x28, - 0x1b,0xea,0x52,0x60,0x91,0x98,0xcf,0xbd,0x05,0xb5, - 0xbc,0xb6,0x78,0x56,0x43,0x47,0xdb,0x5e,0x44,0xb5, - 0x16,0x42,0xdb,0x60,0xce,0x6b,0x06,0xaa,0x1b,0x51, - 0x85,0xba,0x18,0x16,0x83,0x33,0x00,0xaa,0x69,0x12, - 0xf0,0x0b,0xf4,0xcb,0xbd,0x13,0x8a,0x72,0x87,0x9c, - 0x31,0xb4,0xfa,0xe9,0x44,0x67,0xa9,0x77,0x41,0x3b, - 0x86,0x3f,0x25,0x7e,0xca,0xb4,0x59,0x51,0xae,0xa0, - 0x75,0x4a,0xe1,0x4a,0xc4,0xab,0x50,0xdc,0xd3,0xe1, - 0xa8,0xc3,0xc5,0xec,0xa8,0x81,0x09,0x4c,0x47,0x29, - 0xf7,0x5b,0xa1,0xc2,0x7f,0xad,0xdc,0x8c,0xce,0x82, - 0x67,0xe9,0x19,0x74,0x53,0xfd,0xeb,0x8c,0xaf,0x5b, - 0x84,0x3e,0x84,0x2f,0x7c,0xef,0x40,0x6d,0xa8,0xaa, - 0xa4,0xbb,0xd0,0x6f,0x88,0x03,0x09,0x0f,0x84,0x98, - 0x16,0x93,0x3b,0xa2,0x74,0xf8,0x71,0xa8,0xaa,0xf9, - 0xfc,0xea,0x69,0x44,0x39,0x94,0xea,0xd6,0x5c,0x7a, - 0x1a,0xed,0xd0,0xbe,0x97,0xf0,0xf9,0x3b,0x03,0xf7, - 0xa3,0xa3,0x2a,0x5f,0x26,0xac,0x0b,0x47,0x88,0x81, - 0xa8,0xae,0xca,0x1d,0x68,0xf1,0x1f,0x77,0xd7,0x1f, - 0xb4,0xf0,0xdc,0x0d,0x67,0x31,0x86,0x18,0x06,0x6c, - 0x8e,0x6a,0xc1,0x3c,0x8e,0x7e,0x2e,0x4e,0x26,0x7e, - 0xab,0xd9,0x6e,0xd3,0xd0,0xf7,0xfe,0x6f,0x59,0x4c, - 0xce,0xca,0xc5,0xbb,0xf1,0xd5,0xd6,0x89,0x6e,0x2c, - 0x6f,0x46,0x69,0x83,0x47,0xa1,0xe0,0x80,0xd5,0xdf, - 0x24,0x74,0xc3,0x73,0x0e,0xf0,0x6c,0xc1,0x73,0x31, - 0x4b,0x6a,0x22,0x3a,0xa2,0xb2,0x7f,0x8b,0x31,0x27, - 0x75,0x8d,0x49,0x5a,0x98,0xeb,0x0c,0xe0,0x5f,0xc0, - 0x85,0x68,0xa7,0x3e,0xad,0x39,0xc0,0xef,0x81,0xef, - 0x13,0xd6,0xe2,0xad,0xdb,0x21,0xe8,0x3d,0xfb,0xe0, - 0x94,0xaf,0xff,0x2e,0xfa,0x3b,0x9d,0x49,0x7d,0x5a, - 0x31,0xed,0x08,0x8c,0x0c,0x1c,0x5b,0x95,0xe2,0x7f, - 0x3d,0x5d,0x44,0x58,0xb5,0xf3,0x25,0xd0,0x51,0x88, - 0xa8,0xec,0x98,0xb2,0x1a,0x01,0x1c,0x90,0xf1,0x35, - 0xfb,0xa0,0xa0,0xc8,0x20,0x54,0x17,0x64,0x09,0x60, - 0x45,0x60,0x95,0xae,0x3f,0x93,0xb4,0xf3,0x9c,0xd7, - 0x99,0xc4,0xab,0x19,0x52,0x46,0x77,0xa3,0x74,0xfe, - 0x9b,0x51,0x0d,0x91,0x24,0xb6,0xe9,0x7a,0xbc,0x8f, - 0x82,0x01,0x77,0x76,0x3d,0x9e,0x40,0x47,0x0b,0xa3, - 0xf4,0x45,0x1b,0x11,0x9b,0x75,0x5d,0x67,0x67,0x60, - 0xa1,0x84,0x73,0x01,0x05,0x0e,0x76,0x01,0x3e,0x48, - 0x71,0x8d,0x32,0x59,0x91,0x6c,0x7e,0x37,0x16,0x40, - 0xdf,0xd7,0xee,0xc7,0x08,0x74,0x7c,0x2c,0xaa,0x9b, - 0x4c,0x1c,0x6f,0xa1,0xf7,0xa1,0xbb,0x32,0xbc,0xa6, - 0x95,0x48,0x47,0x67,0x67,0x26,0x47,0x06,0xaf,0x24, - 0xbc,0xb5,0x48,0x7f,0xaa,0x75,0x76,0xcf,0xcc,0x2c, - 0x8d,0xd5,0x51,0xcf,0xf8,0x10,0x3f,0x46,0xed,0xde, - 0x9a,0x64,0x03,0xa2,0xcf,0xc8,0x9f,0x8a,0x16,0xdc, - 0x69,0x74,0xa0,0x82,0xaa,0xc7,0xa2,0x6a,0xf3,0x71, - 0x33,0xe0,0xc6,0xa1,0x85,0xff,0xa5,0xa4,0x3b,0x7e, - 0xb5,0x13,0xea,0xc9,0xbd,0x4e,0xcc,0xe7,0x3d,0x8b, - 0xce,0xc0,0xfe,0x86,0xfa,0x05,0x7a,0x6f,0x40,0x8b, - 0x85,0x28,0xef,0xa2,0x6a,0xf9,0x55,0x2d,0x44,0x75, - 0x3f,0x61,0xa9,0xd6,0x77,0x50,0xbe,0xa2,0xbf,0xf7, - 0xa1,0x56,0xc5,0x75,0xf3,0x5b,0x14,0x9c,0xab,0x8b, - 0xf5,0xd0,0x8e,0xed,0xf2,0x19,0x5e,0xb3,0x13,0x75, - 0x12,0x1a,0x8b,0x32,0x0c,0xdf,0x47,0x8b,0xf2,0x3e, - 0x28,0x28,0xb3,0x38,0xea,0x58,0xb2,0x72,0xd7,0xff, - 0xcf,0xc2,0x75,0xa8,0x63,0x51,0x15,0x7e,0xd7,0x47, - 0xa1,0xcf,0xb1,0xba,0x18,0x8d,0x16,0xff,0x2f,0x15, - 0x3d,0x11,0xcb,0x8f,0x33,0x00,0xcc,0xcc,0xac,0x48, - 0x0f,0xa1,0x5d,0xab,0x1d,0x5b,0x8c,0xf9,0x26,0x0a, - 0x34,0x3f,0x91,0xe2,0x75,0x3a,0xd1,0x4d,0xe5,0x75, - 0xa8,0x8e,0xca,0xa7,0x51,0xab,0xbf,0xd5,0xd1,0xee, - 0xf3,0x22,0x68,0x67,0x65,0x1a,0xba,0xc9,0x7d,0x1b, - 0xb5,0xdf,0xbb,0x1f,0x2d,0x7e,0x1e,0x20,0x9b,0x22, - 0x7b,0x37,0x75,0x3d,0x36,0x44,0xc1,0x80,0x8f,0x03, - 0x6b,0x74,0xbd,0xfe,0x42,0x5d,0xaf,0x31,0x05,0xa5, - 0x23,0x3f,0x8d,0xba,0x0a,0xdc,0x42,0xb5,0x8a,0x93, - 0xc5,0x31,0x82,0xd6,0xff,0xf6,0xf3,0xfa,0x03,0xd5, - 0x58,0x10,0xf4,0xe6,0xb7,0x84,0x05,0x00,0xb6,0x44, - 0x3f,0x97,0xae,0x78,0x9e,0xaf,0x53,0xa9,0x47,0xfd, - 0x8c,0x79,0x3d,0x82,0x7e,0xc6,0xae,0x01,0x3e,0x99, - 0xd1,0x35,0x3b,0xd0,0x7b,0xe6,0xb2,0x19,0x5d,0xaf, - 0x95,0x39,0xe8,0x68,0xd5,0x29,0x54,0xbb,0xa8,0x69, - 0x15,0xcd,0x41,0xd9,0x30,0xdf,0xa3,0x3e,0xd9,0x65, - 0xd6,0x0b,0x07,0x00,0xcc,0xcc,0xac,0x68,0x27,0xd3, - 0x7a,0x11,0x38,0x00,0xa5,0xf0,0x6f,0x46,0x36,0x37, - 0x85,0xe3,0xd1,0x4e,0xfe,0xa5,0x19,0x5c,0x2b,0xa9, - 0x07,0xf9,0xdf,0x96,0x81,0x4d,0x74,0x18,0xe1,0xd9, - 0x18,0x55,0x4d,0xff,0xef,0x76,0x25,0xf0,0x73,0xc2, - 0xce,0x58,0x1f,0x4a,0xbc,0xfe,0xf5,0x16,0xee,0x6d, - 0x54,0x1f,0xe4,0x4f,0x45,0x4f,0x24,0x27,0xaf,0xa3, - 0x20,0xd2,0x49,0xc0,0x89,0x24,0x2f,0xa4,0xda,0x6e, - 0xaf,0x00,0x07,0xa1,0xba,0x46,0xd6,0x5e,0xa3,0x51, - 0xd1,0xdd,0xfb,0x8b,0x9e,0x88,0xb5,0x87,0x8b,0x00, - 0x9a,0x99,0x59,0xd1,0x1e,0x40,0xad,0xfb,0x5a,0xd9, - 0x94,0xf4,0xc7,0x00,0xac,0x5c,0x06,0x10,0x5e,0x13, - 0x61,0x34,0xda,0xdd,0xac,0xb2,0x29,0x84,0x2f,0x3a, - 0xf7,0x27,0xbb,0x74,0x6a,0x9b,0xeb,0xcf,0xc0,0x47, - 0xa9,0xef,0xe2,0xbf,0xdb,0x6c,0x54,0x01,0x7e,0x23, - 0x5a,0x77,0x28,0x29,0x83,0x4e,0x14,0xdc,0x5b,0x0b, - 0x2f,0xfe,0xdb,0x6d,0x1c,0x3a,0x02,0xb3,0x21,0x5e, - 0xfc,0x37,0x8a,0x03,0x00,0x66,0x66,0x56,0x06,0xc7, - 0x13,0x5d,0xec,0xe9,0x87,0xc0,0x3e,0x6d,0x98,0x8b, - 0xb5,0xc7,0xee,0xc0,0x92,0x81,0x63,0xab,0xbe,0xfb, - 0xdf,0x2d,0xb4,0x85,0xe1,0xa2,0xa8,0x82,0xba,0x65, - 0xe3,0x0e,0x94,0x12,0xbf,0x07,0xda,0x21,0x6f,0x8a, - 0xd1,0xc0,0x26,0xa8,0xf8,0xdc,0x8b,0x85,0xce,0x64, - 0xfe,0xee,0x44,0x8b,0xcf,0x43,0xa8,0x5f,0x6d,0x93, - 0x32,0x7b,0x02,0x65,0x5f,0xad,0x82,0xde,0x5b,0xdd, - 0x49,0xac,0x61,0x8a,0x08,0x00,0xf8,0x4c,0x8f,0x99, - 0x99,0xf5,0xf4,0x32,0x3a,0x0a,0x10,0xe5,0x22,0xca, - 0x57,0x20,0xcd,0x92,0x39,0x22,0x70,0xdc,0x07,0xc0, - 0x1f,0xf3,0x9c,0x48,0x1b,0xdd,0x85,0x5a,0x38,0x86, - 0x38,0x3c,0xcf,0x89,0x34,0xc0,0x64,0xb4,0xb8,0xf9, - 0x18,0x7a,0xcf,0xb8,0xa7,0xd0,0xd9,0x14,0x67,0x0e, - 0x70,0x19,0xb0,0x2a,0x5a,0x68,0x97,0xa1,0x9e,0xc8, - 0xad,0xa8,0x53,0xc0,0x96,0xa8,0x0e,0x8c,0xe5,0x6f, - 0x12,0x3a,0xf6,0xf6,0x29,0x94,0x6d,0x71,0x21,0x3e, - 0xeb,0xdf,0x58,0xed,0x0e,0x00,0xcc,0x21,0x9f,0x7e, - 0xcc,0x66,0x66,0x56,0x7d,0x67,0xa2,0x7e,0xd1,0xad, - 0x0c,0x40,0x85,0xfc,0x3e,0x9e,0xff,0x74,0x2c,0x47, - 0x6b,0xa2,0x6e,0x0c,0x21,0xae,0xa1,0x5e,0xbb,0x83, - 0xa1,0x59,0x00,0x9b,0x92,0xac,0xa7,0x7d,0x53,0x75, - 0xa2,0xfe,0xe7,0xe7,0xa2,0x9a,0x22,0x4b,0xa0,0x05, - 0xef,0xc3,0x45,0x4e,0xaa,0x44,0x66,0xa2,0x80,0xc8, - 0x3a,0x28,0x20,0x72,0x11,0xf0,0x4e,0x1b,0x5f,0xff, - 0x4d,0x54,0x03,0x63,0x2d,0x54,0x84,0xf5,0xf6,0x36, - 0xbe,0x76,0x13,0xcd,0x41,0xc1,0x9e,0x5f,0xa0,0xdf, - 0x87,0xa5,0x80,0x03,0x51,0x5b,0x5c,0x6b,0xb8,0x76, - 0x17,0x01,0x9c,0xd9,0xe6,0xd7,0x33,0x33,0xb3,0xea, - 0x98,0x03,0xec,0x87,0xd2,0x56,0x17,0x69,0x31,0x6e, - 0x61,0x94,0xd2,0xbb,0x0f,0x0a,0x06,0xd4,0xd5,0x40, - 0x94,0xa6,0x39,0x14,0xf8,0xbf,0x82,0xe7,0x92,0xb5, - 0xd0,0xdd,0x7f,0xa8,0x4f,0xfa,0x7f,0xb7,0xdf,0xa1, - 0x96,0x9f,0xfd,0x03,0xc6,0x1e,0x0e,0x1c,0x9d,0xef, - 0x74,0x2a,0x61,0x26,0x30,0xbd,0xeb,0x31,0x09,0x2d, - 0x26,0xdf,0x40,0xad,0xca,0x9e,0x41,0x1d,0x13,0x46, - 0xa3,0x56,0x91,0x16,0xed,0x8e,0xae,0xc7,0x91,0x68, - 0x17,0xfe,0xd3,0x68,0x47,0x7e,0x1d,0xb2,0x5b,0x1b, - 0xcc,0x02,0x1e,0x03,0x6e,0x03,0xae,0x47,0x19,0x18, - 0xde,0x04,0xcc,0xc6,0x1c,0xe6,0xfe,0x3e,0xbc,0x03, - 0xbc,0x85,0x7e,0x1f,0xc6,0xa0,0x36,0xb5,0x8f,0xa3, - 0xdf,0x87,0xf7,0x8a,0x9a,0xa0,0x95,0x5b,0x47,0x67, - 0x67,0x6e,0x19,0xf9,0x63,0x81,0x15,0x7b,0xfc,0xb7, - 0x49,0xe8,0xc6,0xcd,0xcc,0xcc,0xac,0x37,0xdb,0xa1, - 0x56,0x79,0x51,0xd5,0xab,0x3b,0x81,0x6f,0x03,0x67, - 0xe4,0x3e,0xa3,0xf6,0xea,0x2e,0x8e,0x77,0x22,0x6a, - 0xbd,0x35,0x15,0xb5,0x2a,0x7c,0xb3,0xc0,0x39,0x99, - 0x59,0xfd,0x0d,0x02,0xd6,0x43,0xbb,0xf4,0xab,0x00, - 0x2b,0x01,0xcb,0xa0,0x6c,0x8a,0xc5,0xba,0xbe,0x3e, - 0x10,0x65,0x10,0xcf,0x40,0x0b,0xd0,0xc9,0x68,0xf1, - 0xf9,0x06,0xba,0xf7,0x7f,0x1a,0x9d,0x31,0x1f,0x05, - 0xbc,0xdf,0xde,0xe9,0x9b,0x59,0x88,0x3c,0x03,0x00, - 0x6f,0xf0,0xbf,0xc5,0x7d,0x5e,0x40,0x6f,0x26,0x66, - 0x66,0x66,0xad,0x7c,0x0d,0xa5,0x8b,0x86,0xb8,0x02, - 0x38,0x16,0x98,0x90,0xdf,0x74,0xda,0x62,0x41,0x94, - 0xa2,0xf9,0x0d,0x60,0x85,0x1e,0x5f,0xfb,0x19,0x70, - 0x42,0xdb,0x67,0x64,0x66,0x66,0x66,0xb5,0x92,0x57, - 0x00,0x60,0x00,0xda,0xb1,0xe8,0x59,0x63,0x60,0x14, - 0xaa,0xf6,0x69,0x66,0x66,0x16,0xe5,0x14,0xe0,0x7b, - 0x81,0x63,0x27,0x02,0xdf,0x04,0x2e,0xa1,0x7a,0xc5, - 0x66,0x47,0xa2,0x00,0xc6,0xc1,0xc0,0x42,0xbd,0x8c, - 0x79,0xbf,0x6b,0x5c,0xd5,0x83,0x1c,0x66,0x66,0x66, - 0x56,0xa0,0xbc,0x8a,0x00,0x8e,0xec,0xe5,0xda,0xe3, - 0x73,0x7a,0x3d,0x33,0x33,0xab,0x9f,0xef,0xa3,0x9d, - 0xef,0x10,0x8b,0xa1,0xa2,0x56,0x77,0x00,0xeb,0xe6, - 0x36,0xa3,0xec,0x0c,0x04,0xf6,0x04,0xfe,0x06,0x3c, - 0x0f,0x1c,0x47,0xef,0x8b,0x7f,0x80,0x21,0x28,0x33, - 0xc0,0xcc,0xcc,0xcc,0x2c,0xb1,0xbc,0x02,0x00,0xbd, - 0x55,0x67,0x7e,0x3e,0xa7,0xd7,0x33,0x33,0xb3,0x7a, - 0x3a,0x01,0xf8,0x4e,0x8c,0xf1,0x9b,0xa3,0xaa,0xdf, - 0x7f,0x45,0xfd,0xaf,0xcb,0xa4,0x2f,0x9a,0xdf,0xf9, - 0xc0,0x6b,0xc0,0x9f,0x80,0xcf,0x12,0x5d,0xeb,0xa0, - 0xdb,0x51,0xa8,0x3f,0xbc,0x99,0x99,0x99,0x59,0x22, - 0x79,0x05,0x00,0x36,0xed,0xe5,0xbf,0x3f,0x9d,0xd3, - 0xeb,0x99,0x99,0x59,0x7d,0xfd,0x04,0x55,0xfc,0x9f, - 0x1a,0x38,0xbe,0x03,0xd8,0x05,0x55,0x9d,0x7e,0x14, - 0x55,0x51,0x5f,0x3a,0x9f,0xa9,0x45,0x5a,0x1c,0xcd, - 0xfd,0x8f,0xa8,0x88,0xdf,0x9d,0xa8,0xb2,0x7f,0xab, - 0x2e,0x07,0xbd,0x19,0x85,0xea,0x04,0x98,0x99,0x99, - 0x99,0x25,0x92,0x57,0x0d,0x80,0xf9,0x75,0x00,0x00, - 0xa5,0x65,0x3e,0x96,0xc7,0x0b,0x9a,0x99,0x59,0xed, - 0xad,0x0b,0x5c,0x0b,0x7c,0x24,0xc1,0x73,0xe7,0x00, - 0x77,0x03,0xff,0x40,0xfd,0xa7,0x47,0x91,0x7d,0x6b, - 0xda,0x81,0xc0,0xea,0xc0,0xc6,0x28,0xfb,0xe0,0x13, - 0xc0,0x6a,0x28,0x20,0x91,0xc6,0x93,0xa8,0xbe,0xc1, - 0x8d,0x29,0xaf,0x63,0x66,0x66,0x66,0x0d,0x97,0x47, - 0x00,0x60,0x5d,0xe0,0x91,0xf9,0xfc,0xf7,0x49,0x28, - 0x75,0x71,0x4e,0xd6,0x2f,0x68,0x66,0x66,0x8d,0xb1, - 0x20,0xf0,0x53,0xb4,0x8b,0x9e,0xc6,0x74,0xd4,0x2b, - 0xf9,0x11,0x74,0x3c,0x6d,0x2c,0xf0,0x0a,0x2a,0xb2, - 0xf7,0x36,0xca,0x36,0x98,0x8e,0xfa,0x56,0x0f,0x9a, - 0xe7,0x31,0x14,0x65,0x13,0x2c,0xd3,0xf5,0xe7,0xf2, - 0x68,0xd1,0xbf,0x3a,0x0a,0x7c,0x87,0xa6,0xf3,0x87, - 0x18,0x83,0xb2,0x1f,0x2e,0xc1,0xfd,0xb3,0xcd,0xcc, - 0xcc,0x2c,0x03,0x79,0x04,0x00,0x7e,0x01,0x7c,0x75, - 0x3e,0xff,0xfd,0x4a,0xe0,0x8b,0x59,0xbf,0x98,0x99, - 0x99,0x35,0xd2,0x36,0xc0,0xd9,0xc0,0x1a,0x45,0x4f, - 0x24,0x07,0x0f,0xa1,0x20,0xc7,0x35,0x78,0xe1,0x6f, - 0x66,0x66,0x66,0x19,0xca,0xba,0x06,0xc0,0x60,0x60, - 0xdf,0x5e,0xbe,0x76,0x5d,0xc6,0xaf,0x65,0x66,0x66, - 0xcd,0x75,0x1b,0xb0,0x0e,0x70,0x0c,0xf5,0x68,0x8d, - 0x37,0x13,0x7d,0x4e,0x6e,0x8b,0x0a,0xe9,0x5e,0x85, - 0x17,0xff,0x66,0x66,0x66,0x96,0xb1,0xac,0x33,0x00, - 0x8e,0x05,0x7e,0x39,0x9f,0xff,0xfe,0x36,0x30,0x1c, - 0xa5,0x53,0x9a,0x99,0x99,0x65,0x69,0x08,0x3a,0x12, - 0x70,0x3c,0x4a,0xcd,0xaf,0x92,0xff,0xa2,0x14,0xff, - 0xcb,0xa9,0x47,0x20,0xc3,0xcc,0xcc,0xcc,0x4a,0x2c, - 0xcb,0x00,0xc0,0x20,0xe0,0x39,0x60,0xb9,0xf9,0x7c, - 0xed,0x2c,0xdc,0xbf,0xd8,0xcc,0xcc,0xf2,0x35,0x00, - 0xd8,0x03,0x38,0x14,0xd8,0xaa,0xd8,0xa9,0xf4,0xaa, - 0x13,0x18,0x0d,0xfc,0x0d,0xb5,0x2a,0x7c,0xb4,0xd8, - 0xe9,0x98,0x99,0x99,0x59,0x93,0x64,0x19,0x00,0xf8, - 0x26,0x70,0xfa,0x7c,0xfe,0xfb,0x0c,0x54,0xb1,0xf9, - 0x95,0xac,0x5e,0xc8,0xcc,0xcc,0x2c,0xc2,0x8a,0xc0, - 0x5e,0xc0,0x9e,0x28,0xa5,0x3e,0x6d,0x25,0xfe,0x34, - 0x5e,0x43,0x1d,0x08,0x6e,0x05,0x6e,0x00,0xc6,0x17, - 0x38,0x17,0x33,0x33,0x33,0x6b,0xb0,0xac,0x02,0x00, - 0xcb,0x00,0x4f,0x01,0xc3,0xe6,0xf3,0xb5,0xf3,0x80, - 0x23,0xb3,0x78,0x11,0x33,0x33,0xb3,0x04,0x96,0x04, - 0xb6,0xee,0x7a,0x6c,0x02,0xac,0x09,0xf4,0xcb,0xe9, - 0xb5,0xde,0x41,0x9f,0x87,0x8f,0x01,0xf7,0x02,0x77, - 0xa1,0x0e,0x03,0x66,0x66,0x66,0x66,0x85,0xcb,0x2a, - 0x00,0x70,0x15,0xb0,0xf7,0x7c,0xfe,0xfb,0x64,0x60, - 0x65,0xe0,0xad,0x2c,0x5e,0xc4,0xcc,0xcc,0x2c,0x03, - 0x03,0x81,0xb5,0x51,0xeb,0xbe,0x95,0x50,0xb6,0xc0, - 0x70,0x60,0xf1,0xae,0xc7,0x82,0x5d,0x63,0x06,0xa0, - 0xb6,0x7e,0xd3,0x51,0x5b,0xc0,0x69,0x5d,0x8f,0x77, - 0xd1,0xae,0xfe,0xab,0xf3,0xfc,0xf9,0x1c,0xf0,0x64, - 0xd7,0xff,0x37,0x33,0x33,0x33,0x2b,0xa5,0x3c,0xda, - 0x00,0x9a,0x99,0x99,0x99,0x99,0x99,0x99,0x59,0xc9, - 0x64,0xdd,0x06,0xd0,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc, - 0xcc,0x4a,0xc8,0x01,0x00,0x33,0x33,0x33,0x33,0x33, - 0x33,0xb3,0x06,0x70,0x00,0xc0,0xcc,0xcc,0xcc,0xcc, - 0xcc,0xcc,0xac,0x01,0x1c,0x00,0x30,0x33,0x33,0x33, - 0x33,0x33,0x33,0x6b,0x00,0x07,0x00,0xcc,0xcc,0xcc, - 0xcc,0xcc,0xcc,0xcc,0x1a,0xc0,0x01,0x00,0x33,0x33, - 0x33,0x33,0x33,0x33,0xb3,0x06,0x70,0x00,0xc0,0xcc, - 0xcc,0xcc,0xcc,0xcc,0xcc,0xac,0x01,0x1c,0x00,0x30, - 0x33,0x33,0x33,0x33,0x33,0x33,0x6b,0x00,0x07,0x00, - 0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x1a,0xc0,0x01, - 0x00,0x33,0x33,0x33,0x33,0x33,0x33,0xb3,0x06,0x70, - 0x00,0xc0,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xac,0x01, - 0x1c,0x00,0x30,0x33,0x33,0x33,0x33,0x33,0x33,0x6b, - 0x00,0x07,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc, - 0x1a,0xc0,0x01,0x00,0x33,0x33,0x33,0x33,0x33,0x33, - 0xb3,0x06,0x70,0x00,0xc0,0xcc,0xcc,0xcc,0xcc,0xcc, - 0xcc,0xac,0x01,0x1c,0x00,0x30,0x33,0x33,0x33,0x33, - 0x33,0x33,0x6b,0x00,0x07,0x00,0xcc,0xcc,0xcc,0xcc, - 0xcc,0xcc,0xcc,0x1a,0xc0,0x01,0x00,0x33,0x33,0x33, - 0x33,0x33,0x33,0xb3,0x06,0x70,0x00,0xc0,0xcc,0xcc, - 0xcc,0xcc,0xcc,0xcc,0xac,0x01,0x1c,0x00,0x30,0x33, - 0x33,0x33,0x33,0x33,0x33,0x6b,0x00,0x07,0x00,0xcc, - 0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x1a,0xc0,0x01,0x00, - 0x33,0x33,0x33,0x33,0x33,0x33,0xb3,0x06,0x70,0x00, - 0xc0,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xac,0x01,0x1c, - 0x00,0x30,0x33,0x33,0x33,0x33,0x33,0x33,0x6b,0x00, - 0x07,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x1a, - 0xc0,0x01,0x00,0x33,0x33,0x33,0x33,0x33,0x33,0xb3, - 0x06,0x70,0x00,0xc0,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc, - 0xac,0x01,0x1c,0x00,0x30,0x33,0x33,0x33,0x33,0x33, - 0x33,0x6b,0x80,0x7e,0x45,0x4f,0xc0,0xcc,0x3e,0xa4, - 0x1f,0xb0,0x16,0xb0,0x1e,0xb0,0x42,0xd7,0x63,0x79, - 0x60,0x59,0x60,0x28,0xb0,0xc0,0x3c,0x8f,0x0e,0x60, - 0x46,0xd7,0xe3,0x7d,0xe0,0x9d,0xae,0xc7,0x6b,0xc0, - 0x38,0xe0,0x25,0xe0,0x69,0xe0,0xbf,0xc0,0xeb,0xed, - 0xfc,0x4b,0x98,0x99,0x99,0x99,0x99,0x65,0x64,0x08, - 0xb0,0x01,0xb0,0x26,0x73,0xef,0x8f,0x57,0x00,0x96, - 0x42,0xf7,0xc4,0x83,0xbb,0x1e,0x03,0x81,0x59,0xc0, - 0x74,0x60,0x2a,0x30,0x11,0x98,0x80,0xee,0x83,0xc7, - 0x74,0x3d,0x9e,0x00,0x1e,0x05,0x3e,0x68,0xeb,0xdf, - 0xa0,0x44,0x3a,0x3a,0x3b,0x3b,0xb3,0xb8,0xce,0x7d, - 0xc0,0xc6,0x59,0x5c,0xa8,0xe4,0x26,0x02,0x8b,0x17, - 0x3d,0x89,0x1e,0x5e,0x04,0x46,0x14,0x3d,0x89,0x1c, - 0x9c,0x09,0x1c,0x5f,0xf4,0x24,0xda,0x60,0x00,0xb0, - 0x35,0xb0,0x13,0xfa,0x1d,0x5a,0x17,0x18,0x94,0xc3, - 0xeb,0xbc,0x09,0xdc,0x0d,0xdc,0x09,0xdc,0x02,0x3c, - 0x99,0xc3,0x6b,0x14,0x6d,0x14,0xfa,0x70,0x88,0x72, - 0x15,0xf0,0x85,0x9c,0xe7,0x92,0x85,0x73,0x80,0xa3, - 0x02,0xc6,0x8d,0x01,0x56,0xce,0x79,0x2e,0x21,0x6e, - 0x00,0x76,0x0e,0x18,0x77,0x1b,0xb0,0x6d,0xce,0x73, - 0x29,0xca,0x4f,0x80,0x6f,0xe5,0xfc,0x1a,0x7f,0x05, - 0x3e,0x97,0xf3,0x6b,0x84,0x08,0xfd,0xdc,0xbf,0x16, - 0xd8,0x33,0xe7,0xb9,0xc4,0xf5,0x0d,0xe0,0x67,0x31, - 0xc6,0x3f,0x08,0x7c,0x1a,0x98,0x94,0xcf,0x74,0x52, - 0x79,0x1e,0xf8,0x48,0xc0,0xb8,0x0b,0x80,0xc3,0x73, - 0x9e,0x4b,0xd5,0x3d,0x0d,0xac,0x16,0xf3,0x39,0xb3, - 0x50,0x90,0xbe,0xaa,0x41,0xf6,0x5b,0x81,0x6d,0x62, - 0x3e,0xe7,0x19,0x60,0xf5,0x1c,0xe6,0x12,0x57,0xe8, - 0x67,0x7e,0xb7,0xab,0x81,0xcf,0xe7,0x34,0x97,0xac, - 0xfc,0x0c,0xbd,0x3f,0xb5,0x52,0x96,0xcf,0xfc,0xbc, - 0x2d,0x04,0xec,0x08,0x6c,0x07,0x6c,0x04,0xac,0x01, - 0xf4,0xcd,0xf0,0xfa,0xb3,0xd1,0xbd,0xf0,0xbf,0xd0, - 0xef,0xc1,0xed,0x68,0x33,0xad,0x11,0x9c,0x01,0x60, - 0xd6,0x7e,0xfd,0x80,0x5d,0xd1,0x07,0xd1,0x0e,0xc0, - 0x82,0x6d,0x78,0xcd,0x25,0x81,0xdd,0xba,0x1e,0x00, - 0xcf,0x01,0xd7,0x00,0x17,0xa1,0x0f,0x13,0x33,0xb3, - 0x26,0x38,0x9a,0x78,0x8b,0xff,0x87,0xd0,0x0d,0x68, - 0x19,0x17,0xff,0x56,0xbc,0x7e,0xc0,0x7e,0xc0,0x19, - 0x45,0x4f,0x24,0x81,0x15,0x80,0x4f,0x15,0x3d,0x89, - 0x36,0xda,0x1b,0xb8,0x0c,0xb8,0xa9,0xe8,0x89,0x58, - 0xaf,0x86,0x00,0x5f,0x02,0xf6,0x40,0x9b,0x63,0x03, - 0x72,0x7c,0xad,0xbe,0xc0,0xda,0x5d,0x8f,0x63,0x51, - 0xb6,0xc0,0x4d,0xc0,0x15,0x28,0xd0,0x3e,0x2b,0xc7, - 0xd7,0x2e,0x9c,0x6b,0x00,0x98,0xb5,0xcf,0x92,0xc0, - 0x89,0xc0,0x0b,0x68,0xf1,0xbd,0x17,0xed,0x59,0xfc, - 0xcf,0xcf,0x2a,0xc0,0x77,0x50,0x20,0xe0,0x9f,0xc4, - 0xdf,0x01,0x30,0x33,0xab,0x9a,0x43,0x80,0x5f,0xc5, - 0x18,0xff,0x08,0xda,0xf9,0x7f,0x37,0x9f,0xe9,0x58, - 0x4d,0x1c,0x58,0xf4,0x04,0x12,0xda,0x1f,0x1d,0x25, - 0x6c,0x92,0x73,0xd1,0x22,0xd3,0xca,0x65,0x24,0x0a, - 0xcc,0xbe,0x02,0x5c,0x08,0x6c,0x4f,0xbe,0x8b,0xff, - 0xf9,0x59,0x00,0x05,0x1e,0xae,0x41,0xc7,0x68,0x4f, - 0x06,0x16,0x6b,0xf3,0x1c,0xda,0xc6,0x01,0x00,0xb3, - 0xfc,0x2d,0x08,0xfc,0x18,0x1d,0xd7,0x38,0x15,0x58, - 0xae,0xd0,0xd9,0x7c,0x58,0x07,0x4a,0xc7,0xbe,0x15, - 0x1d,0x11,0xf8,0x78,0xb1,0xd3,0x31,0x33,0xcb,0xc5, - 0xbe,0xc0,0xf9,0x84,0x2f,0x78,0x1e,0x43,0xef,0x8d, - 0xef,0xe4,0x36,0x23,0xab,0x8b,0xd5,0x81,0x4d,0x8b, - 0x9e,0x44,0x02,0xfb,0x17,0x3d,0x81,0x02,0x8c,0x40, - 0xf7,0x61,0x56,0x0e,0x4b,0x01,0xbf,0x41,0x99,0xa8, - 0xdf,0x00,0x16,0x2e,0x76,0x3a,0xff,0xdf,0x32,0xc0, - 0x0f,0xd0,0x7d,0xfb,0x4f,0x28,0xcf,0xbc,0x32,0xe3, - 0x00,0x80,0x59,0x7e,0x3a,0xd0,0x8e,0xd3,0x73,0xc0, - 0x77,0x51,0x74,0xb1,0xcc,0x36,0x05,0xee,0x07,0xce, - 0xc3,0x11,0x72,0x33,0xab,0x8f,0xbd,0x81,0x4b,0x08, - 0xbf,0xe7,0x79,0x02,0x2d,0xfe,0x27,0xe6,0x36,0x23, - 0xab,0x9b,0x83,0x8a,0x9e,0x40,0x4c,0x9b,0x13,0x56, - 0x3b,0xa2,0x8e,0x8e,0xc1,0x9b,0x1d,0x45,0x1b,0x00, - 0x7c,0x1b,0xdd,0x1f,0x7f,0x85,0xf2,0xae,0x47,0x87, - 0xa2,0xba,0x3e,0xcf,0xa2,0xfb,0xf9,0xda,0x64,0xcc, - 0x94,0xf5,0x1b,0x6e,0x56,0x75,0x4b,0x03,0x7f,0x47, - 0xa9,0x4c,0x4b,0x15,0x3c,0x97,0x38,0xfa,0xa0,0x42, - 0x51,0xa3,0x51,0x27,0x02,0x33,0xb3,0x2a,0xfb,0x1c, - 0xf0,0x07,0xc2,0x8b,0x47,0x3d,0x85,0xce,0x45,0xbf, - 0x95,0xdb,0x8c,0xac,0x8e,0xf6,0xa6,0x5a,0x81,0xf3, - 0x03,0x8a,0x9e,0x40,0x81,0xfa,0xa2,0x7b,0xb3,0x2c, - 0x0b,0xca,0x59,0xb8,0x55,0x51,0x11,0xd9,0xd3,0x28, - 0xee,0x18,0x6c,0x5c,0x4b,0xa0,0x9f,0x99,0xdb,0x50, - 0xed,0x8c,0xca,0x73,0x00,0xc0,0x2c,0x7b,0x3b,0xa1, - 0xf4,0xd1,0xed,0x8a,0x9e,0x48,0x0a,0xab,0x02,0x77, - 0x01,0x9f,0x2d,0x7a,0x22,0x66,0x66,0x09,0xed,0x84, - 0xba,0x7e,0x84,0x16,0x3c,0x7e,0x06,0x2d,0xfe,0xdf, - 0xcc,0x6d,0x46,0x56,0x57,0x0b,0x52,0xbe,0x6e,0x17, - 0xbd,0x19,0x8c,0x6a,0x10,0x35,0xd9,0xfa,0xc0,0xd7, - 0x8b,0x9e,0x44,0x03,0x1d,0x80,0x36,0x98,0xd6,0x2f, - 0x78,0x1e,0x49,0x6d,0x8d,0xee,0xef,0x77,0x29,0x7a, - 0x22,0x69,0xb9,0x0b,0x80,0x59,0xb6,0x8e,0x04,0xce, - 0x26,0xbb,0xe0,0x5a,0x27,0xf0,0x1a,0xf0,0x12,0xf0, - 0x32,0x6a,0x51,0xf2,0x01,0xaa,0x56,0x3a,0x10,0xa5, - 0x27,0x75,0x3f,0x46,0xa0,0x94,0xbe,0x81,0x19,0xbd, - 0xf6,0x10,0xe0,0x3a,0xe0,0x60,0x54,0x39,0xd7,0xcc, - 0xac,0x2a,0xb6,0x41,0x2d,0x08,0x43,0x0b,0x49,0x3d, - 0x87,0x6e,0xee,0xaa,0xda,0xce,0xcd,0x8a,0x77,0x10, - 0xd5,0xf8,0xac,0xdc,0x83,0xea,0xec,0xbc,0xe6,0xe9, - 0x64,0x54,0xf0,0xed,0x85,0x82,0xe7,0xd1,0x04,0x1d, - 0xa8,0x53,0x46,0x96,0xed,0xbd,0xe7,0x00,0xaf,0xa2, - 0x73,0xfa,0xe3,0x99,0x7b,0x7f,0x3c,0x0d,0xb5,0xd3, - 0x1e,0x8c,0xee,0x63,0x97,0x05,0x56,0x04,0x86,0x93, - 0x4d,0x0a,0xff,0x30,0xe0,0x2f,0xc0,0xf7,0x51,0x7d, - 0xaf,0x4a,0x6a,0x77,0x00,0xe0,0x19,0xf4,0x4d,0xab, - 0xaa,0x2a,0xf7,0x87,0x1c,0x8d,0xaa,0xbd,0x57,0xc5, - 0x9d,0x45,0x4f,0x20,0x81,0x93,0x51,0xd1,0x90,0x34, - 0x3e,0x00,0x6e,0x41,0xbb,0xef,0xf7,0xa2,0x7f,0xb7, - 0x69,0x31,0x9e,0xdf,0x07,0x05,0x02,0xd6,0x44,0x37, - 0xc0,0xdb,0x01,0x1f,0x4d,0x31,0x9f,0xbe,0xc0,0xc5, - 0xc0,0x4c,0xe0,0x8f,0x29,0xae,0x63,0xd6,0x04,0xff, - 0x4e,0xf1,0xdc,0x3d,0x69,0xee,0x99,0xdc,0xac,0x6d, - 0x01,0xfc,0x0d,0xdd,0x04,0x86,0x18,0x83,0x16,0xff, - 0xaf,0xe5,0x36,0x23,0x6b,0x82,0xee,0x73,0xf5,0x65, - 0x6f,0xad,0x7b,0x40,0xd1,0x13,0x28,0x89,0xc1,0xa8, - 0xe6,0xd1,0x0e,0x45,0x4f,0xa4,0xe6,0xfa,0x01,0xbf, - 0x25,0x7d,0xd1,0xc9,0xf7,0xd0,0xd1,0xda,0xee,0xfb, - 0xe3,0x47,0x80,0x19,0x31,0x9e,0x3f,0x08,0xd8,0x00, - 0xd5,0xbb,0xda,0x1c,0x75,0x78,0x09,0xfd,0x8c,0xe8, - 0xa9,0x03,0x15,0x93,0x5c,0x0a,0xf8,0x2a,0xda,0xac, - 0xab,0x94,0x76,0x07,0x00,0x1e,0x47,0x45,0x1f,0xac, - 0xfd,0xee,0xc5,0xdf,0xfb,0x3c,0x9d,0x01,0x9c,0x90, - 0xe2,0xf9,0x7f,0x47,0x45,0xaa,0x6e,0x24,0x5d,0xa0, - 0x69,0x0e,0x8a,0x66,0xbf,0xd0,0xfd,0x26,0x48,0x63, - 0x00,0x00,0x20,0x00,0x49,0x44,0x41,0x54,0x75,0x2d, - 0x50,0xd4,0x73,0x3f,0xe0,0x08,0x92,0x9d,0x5d,0xea, - 0x03,0x5c,0x8a,0xda,0xb3,0x54,0x31,0x30,0x63,0xd6, - 0x2e,0x7f,0xef,0x7a,0x24,0xb1,0x16,0x0e,0x00,0x64, - 0xe1,0x13,0xe8,0xbd,0x6f,0x70,0xe0,0xf8,0x17,0xd0, - 0xe2,0x7f,0x7c,0x6e,0x33,0xb2,0x3a,0x99,0x48,0xef, - 0xad,0xc1,0x3a,0x50,0x16,0xc0,0x89,0xed,0x9b,0x4e, - 0x6c,0x2b,0xa0,0x9f,0xf7,0xde,0xbc,0x4b,0x0d,0x2b, - 0x9e,0xb7,0xb0,0x3d,0xf0,0x65,0x54,0x27,0xc4,0xb2, - 0xd7,0x07,0x1d,0xc3,0xda,0x3d,0xe1,0xf3,0x3b,0x81, - 0xeb,0xd1,0x3d,0xe8,0xcd,0xc4,0xdb,0x10,0xeb,0x69, - 0x1a,0xea,0x76,0x75,0x37,0xf0,0x53,0x60,0x21,0x60, - 0x57,0x94,0xe5,0xba,0x65,0xc2,0x6b,0x1e,0x83,0xb2, - 0x6e,0x0f,0x4b,0x31,0xaf,0x42,0xb8,0x06,0x80,0x59, - 0x7a,0x47,0x93,0x7c,0xf1,0x7f,0x25,0xb0,0x2e,0xb0, - 0x23,0x70,0x35,0xf9,0x64,0x99,0xbc,0x8a,0xda,0x98, - 0xac,0x84,0x52,0xff,0x9e,0x4a,0x70,0x8d,0xfe,0x28, - 0x55,0xae,0x16,0xc5,0x4f,0xcc,0xac,0x96,0x36,0x40, - 0x01,0x98,0xa1,0x81,0xe3,0x5f,0x42,0x8b,0xa1,0x97, - 0x73,0x9b,0x91,0xd5,0xcd,0xad,0x11,0x5f,0xdf,0x8f, - 0x72,0xdf,0x5b,0xef,0x4f,0xeb,0x34,0xe8,0x7b,0xda, - 0x35,0x91,0x12,0xf9,0x39,0xb0,0x68,0xd1,0x93,0xa8, - 0xa9,0x5f,0x92,0x6c,0xf1,0x3f,0x07,0x1d,0xa7,0x59, - 0x13,0x2d,0xd2,0xaf,0x23,0xdd,0xe2,0x7f,0x7e,0x26, - 0x03,0x97,0x03,0x5b,0xa1,0xac,0x80,0x9b,0x12,0x5e, - 0xe7,0x50,0xe0,0x94,0x8c,0xe6,0xd4,0x36,0x65,0x7e, - 0x93,0x32,0xab,0x82,0x5d,0xd0,0x1b,0x5c,0x5c,0x4f, - 0xa2,0x37,0x9d,0x2f,0xa2,0x82,0x22,0xed,0x30,0x1b, - 0xf8,0x33,0xaa,0xee,0x7f,0x12,0x30,0x3d,0xe6,0xf3, - 0x97,0x00,0x7e,0x87,0xdf,0x37,0xcc,0xac,0x7c,0xd6, - 0x41,0xc7,0xa7,0x86,0x05,0x8e,0x7f,0x19,0x2d,0xfe, - 0x5f,0xca,0x6d,0x46,0x56,0x47,0x51,0x47,0x29,0x97, - 0x43,0xbb,0xca,0x65,0x15,0x95,0x86,0x7d,0x57,0x5b, - 0x66,0xd1,0x1e,0xb3,0x80,0xb7,0x03,0xc6,0x2d,0x01, - 0x9c,0x99,0xf3,0x5c,0x9a,0xe8,0xeb,0x68,0x83,0x2c, - 0xae,0xd1,0xc0,0x26,0xe8,0xa8,0xca,0xd3,0x59,0x4e, - 0xa8,0x85,0x7b,0x81,0x9d,0x51,0xd7,0x98,0x24,0x01, - 0xe1,0xef,0x01,0xfb,0x66,0x3a,0xa3,0x9c,0xf9,0x46, - 0xde,0x2c,0xb9,0x91,0xc0,0xef,0x89,0xff,0x7b,0x74, - 0x3e,0xaa,0x80,0x7a,0x47,0xd6,0x13,0x0a,0x34,0x03, - 0x45,0x2b,0xd7,0x27,0x7e,0xf1,0x9b,0x2d,0x81,0xe3, - 0x32,0x9f,0x91,0x99,0x59,0x72,0x6b,0xa0,0x85,0x59, - 0xe8,0x2e,0xde,0x78,0xb4,0xf8,0x77,0xf1,0x2f,0x8b, - 0xeb,0x01,0x94,0x26,0xdf,0xca,0x81,0xed,0x98,0x48, - 0x02,0xdd,0x35,0x0a,0x7a,0x33,0x03,0xfd,0xfd,0xea, - 0xa2,0x1f,0xf0,0xcd,0xc0,0xb1,0x07,0xd0,0xfa,0x68, - 0x84,0xc5,0xb3,0x15,0x4a,0xb3,0x8f,0xa3,0x13,0x65, - 0xab,0x6e,0x44,0x71,0x3f,0x87,0x7f,0x45,0x59,0x07, - 0xd7,0x24,0x78,0xee,0xf9,0xc0,0xda,0xd9,0x4e,0x27, - 0x3f,0x0e,0x00,0x98,0x25,0xd3,0x07,0xa5,0x27,0xc5, - 0xa9,0xa4,0x3b,0x0b,0x9d,0x35,0x3a,0x82,0x78,0x85, - 0x4b,0xf2,0xf2,0x14,0x8a,0xb2,0x8e,0x8e,0xf9,0xbc, - 0x1f,0xa2,0xaa,0xaa,0x66,0x66,0x45,0x5b,0x19,0xf5, - 0x66,0x5e,0x32,0x70,0xfc,0xab,0xe8,0x46,0xbf,0xec, - 0x85,0xda,0xac,0x9c,0xfa,0x10,0x5d,0xe7,0x63,0x17, - 0xca,0x99,0x52,0x7e,0x40,0xc4,0xd7,0xff,0xd3,0x8e, - 0x49,0xb4,0xd9,0xb5,0xc0,0xbf,0x02,0xc7,0x5e,0x40, - 0xf2,0xa2,0x70,0x36,0xd7,0x42,0xe8,0xcc,0x7e,0x9c, - 0x35,0xe6,0xfb,0xe8,0x88,0xea,0x77,0x50,0xb6,0x6a, - 0x91,0xde,0x43,0x6d,0x32,0xbf,0x4b,0xbc,0xe2,0x7e, - 0x83,0x81,0x2b,0x08,0xef,0x3c,0x53,0x28,0x07,0x00, - 0xcc,0x92,0x39,0x0e,0x55,0x9a,0x0e,0x35,0x0b,0xa5, - 0xfb,0x5f,0x9c,0xcf,0x74,0x12,0x7b,0x03,0xed,0xea, - 0xdf,0x17,0xe3,0x39,0x43,0x88,0x1f,0xd9,0x35,0x33, - 0xcb,0xda,0x48,0xe0,0x76,0x60,0x99,0xc0,0xf1,0xaf, - 0x03,0x9f,0x42,0x2d,0xff,0xcc,0x92,0x18,0x08,0xdc, - 0x10,0x30,0x66,0x9f,0x36,0xcc,0x25,0x8e,0xc1,0x68, - 0x51,0xd3,0xca,0x4d,0x84,0xd7,0xcf,0xa8,0x8a,0x05, - 0x81,0xc3,0x09,0x3b,0xf2,0xb8,0x0a,0x6a,0xed,0x66, - 0xe9,0xfc,0x0a,0x75,0xa3,0x0a,0xf5,0x3e,0x4a,0xbf, - 0xbf,0x2e,0x9f,0xe9,0x24,0x76,0x1a,0x70,0x54,0xcc, - 0xe7,0x7c,0x14,0x1d,0x07,0x28,0x3d,0x07,0x00,0xcc, - 0xe2,0x5b,0x1a,0xed,0x82,0xc7,0xb1,0x1f,0xc9,0x52, - 0x8a,0xda,0xe1,0x3d,0x54,0xa4,0xe5,0xd5,0x18,0xcf, - 0xf9,0x02,0x15,0x4a,0x75,0x32,0xb3,0xda,0x59,0x0e, - 0x2d,0xfe,0x97,0x0f,0x1c,0xff,0x26,0x5a,0xfc,0x3f, - 0x93,0xdb,0x8c,0xac,0x09,0x06,0xa0,0x85,0xf2,0xcc, - 0x88,0x71,0x65,0x3b,0x06,0xb0,0x07,0xd1,0x19,0x8b, - 0x37,0x50,0xbf,0x00,0xc0,0x42,0xc0,0xb3,0x84,0xf7, - 0x6b,0x3f,0x01,0x75,0x64,0xb1,0x64,0xb6,0x22,0x5e, - 0xbb,0xbf,0xe9,0x68,0xf1,0x5f,0xd4,0x91,0xd8,0x28, - 0xe7,0x01,0xc7,0xc6,0x7c,0xce,0xb7,0x51,0x30,0xa9, - 0xd4,0x1c,0x00,0x30,0x8b,0xef,0x24,0xb4,0x0b,0x1e, - 0xea,0x74,0x94,0x16,0x54,0x66,0xaf,0x01,0xbb,0x11, - 0x5e,0x18,0xb0,0x03,0xf8,0x41,0x7e,0xd3,0x31,0x33, - 0xeb,0xd5,0xd2,0x68,0xf1,0xbf,0x62,0xe0,0xf8,0x09, - 0xc0,0x36,0x24,0xeb,0x80,0x62,0x36,0xaf,0x01,0xc0, - 0x3b,0x44,0xa7,0x95,0xaf,0x07,0x7c,0x2c,0xff,0xe9, - 0x04,0x3b,0x20,0xe2,0xeb,0xcf,0x76,0x3d,0xea,0x16, - 0x00,0xe8,0x0e,0x7a,0x9c,0x8e,0x8a,0x2f,0x47,0xe9, - 0x0f,0x5c,0x88,0xd7,0x47,0x49,0x9d,0x1e,0x73,0xfc, - 0x91,0x94,0x77,0xf1,0xdf,0xed,0x6c,0x74,0x3c,0x24, - 0x54,0x7f,0xe2,0x7f,0x1f,0xda,0xce,0x3f,0xe0,0x66, - 0xf1,0xac,0x0c,0x7c,0x25,0xc6,0xf8,0x7f,0x53,0xee, - 0x9e,0xc0,0xf3,0x7a,0x00,0x38,0x35,0x62,0x4c,0x67, - 0xd7,0xb8,0x1f,0x10,0x1e,0x51,0x37,0x33,0xcb,0xca, - 0x12,0xe8,0xcc,0x7f,0xe8,0x0e,0xcb,0x44,0xb4,0xf8, - 0x7f,0x3c,0xb7,0x19,0x59,0x93,0xf4,0xef,0xfa,0x33, - 0x24,0xa3,0xef,0xa0,0x3c,0x27,0xf2,0xff,0xd8,0xbb, - 0xef,0x30,0xbb,0xaa,0xea,0xff,0xe3,0xef,0x54,0x42, - 0x02,0x84,0x40,0xe8,0x25,0xf4,0xde,0xab,0x28,0x25, - 0x48,0x91,0xfa,0xa5,0x0b,0x02,0x42,0x28,0xd2,0xa4, - 0xaa,0x08,0x2a,0x88,0x80,0xa0,0x08,0x76,0xa4,0x48, - 0x31,0x54,0x05,0x04,0x14,0x41,0xe9,0x42,0x00,0x11, - 0xe9,0x35,0xb4,0xd0,0x7b,0x4b,0x08,0x09,0xe9,0x99, - 0xdf,0x1f,0x6b,0xe6,0x97,0xc9,0x30,0x73,0xcf,0xda, - 0xf7,0x9e,0x7d,0xea,0xe7,0xf5,0x3c,0xf3,0x28,0xc9, - 0xbe,0xf7,0xae,0x49,0x32,0xf7,0x9e,0xb3,0xf6,0xda, - 0x6b,0x05,0x58,0x92,0xe4,0x06,0x77,0x37,0xb5,0xff, - 0xef,0x9c,0x91,0x63,0xc9,0x5a,0xc7,0xf7,0x33,0x15, - 0x1b,0xd7,0xe6,0x39,0xd3,0xbd,0x11,0xd6,0xab,0x49, - 0xc2,0xec,0x81,0x35,0xf0,0xf3,0xba,0x80,0xe2,0x1d, - 0x8b,0xed,0xc9,0xd1,0xc0,0x43,0x01,0xeb,0x77,0x01, - 0x36,0x8c,0x14,0x4b,0x2a,0x94,0x00,0x10,0x09,0x73, - 0x02,0xb3,0x2e,0x00,0x92,0x4c,0xc6,0x92,0x05,0x79, - 0x37,0x34,0x09,0x71,0x36,0x5f,0x6c,0x8e,0x35,0x1e, - 0x6b,0xa4,0x73,0x20,0xb6,0xf3,0xb6,0x21,0x70,0x1a, - 0xf0,0x78,0xb6,0xa1,0x89,0x48,0xcd,0xcd,0x87,0x75, - 0xfb,0x5f,0xc5,0xb9,0xfe,0x13,0x60,0x4b,0xb2,0x1b, - 0xb5,0x2a,0xd5,0xd7,0xf1,0xf9,0x7f,0x23,0xc9,0x9f, - 0xed,0x7b,0x63,0xfd,0x00,0xf2,0xb6,0x3f,0x56,0xb5, - 0xd7,0x48,0xc7,0xf9,0x6b,0xef,0xf5,0x4d,0x59,0x74, - 0xfe,0xf3,0x7f,0x00,0xdb,0xdd,0xf7,0x38,0x13,0x35, - 0x3b,0x0e,0xf5,0x93,0x80,0xb5,0xaf,0x01,0xdf,0x8b, - 0x13,0x46,0x14,0x53,0xb1,0x9f,0xa3,0x90,0xf1,0xd9, - 0x27,0x46,0x8a,0x25,0x15,0x4a,0x00,0x88,0xf8,0xcd, - 0x83,0x35,0xf2,0xf3,0x3a,0x83,0xf2,0x75,0x9a,0x9e, - 0x02,0x1c,0x8b,0x35,0xc9,0xfa,0x0d,0x76,0xf1,0x3c, - 0x14,0xd8,0x1d,0xf8,0x13,0x76,0x8e,0x56,0x44,0x24, - 0x6b,0x83,0x81,0xdb,0x80,0x35,0x9d,0xeb,0xc7,0x01, - 0x5b,0x01,0x4f,0x44,0x8b,0x48,0xea,0xa8,0xa3,0xc3, - 0xf7,0x47,0x24,0x97,0x2e,0x0f,0xc1,0xe6,0x8a,0xe7, - 0x2d,0xe9,0x4c,0xf6,0xbb,0xd8,0x1c,0x74,0xb0,0xd1, - 0x79,0x55,0xd2,0xb5,0xab,0xff,0x89,0x58,0x33,0xd0, - 0x24,0xf3,0x00,0xe7,0xa6,0x1f,0x4e,0x65,0x0d,0xc7, - 0x9f,0x98,0x05,0x2b,0xfd,0x9f,0x18,0x27,0x94,0x68, - 0x5e,0xc0,0x12,0x43,0x5e,0x3b,0x01,0x2b,0x44,0x8a, - 0xa5,0x65,0x4a,0x00,0x88,0xf8,0xed,0x87,0xff,0xec, - 0xff,0x7b,0xc0,0x39,0x11,0x63,0x89,0xe9,0x66,0xec, - 0x4d,0xeb,0x38,0xac,0xd4,0x36,0xa9,0xd9,0x91,0x88, - 0x48,0x4c,0x73,0x01,0xff,0x02,0xd6,0x73,0xae,0xff, - 0x14,0xd8,0x9a,0xf0,0x11,0xa7,0x22,0x49,0x3a,0xef, - 0x90,0x97,0xe1,0x18,0xc0,0x26,0xc0,0xb2,0x09,0x6b, - 0xae,0x67,0x56,0x69,0x7c,0xd5,0x12,0x00,0x5d,0x2b, - 0x30,0xc6,0x01,0xc7,0x38,0x1f,0xbb,0x33,0x56,0xca, - 0x2d,0xc9,0x42,0x8e,0x4c,0xdc,0x86,0xbd,0x9f,0x97, - 0xd1,0xcf,0x81,0xb7,0x9c,0x6b,0x7b,0x01,0xdf,0x8a, - 0x18,0x4b,0x4b,0x94,0x00,0x10,0xf1,0x0b,0xf9,0x41, - 0xfe,0x15,0x76,0x04,0x40,0x44,0x44,0x9a,0x37,0x10, - 0x4b,0x4a,0x6e,0xe4,0x5c,0xff,0x19,0xb0,0x0d,0xf0, - 0x70,0xb4,0x88,0xa4,0xce,0x3a,0xcf,0xf8,0xbe,0x01, - 0x98,0x99,0xb0,0x7e,0x4b,0xfc,0x93,0x2a,0x62,0x18, - 0xe1,0x58,0x73,0x6d,0xa7,0xff,0x5f,0xb5,0x04,0x40, - 0xd7,0x0a,0x00,0xb0,0xef,0xf7,0x16,0xe7,0xe3,0x7f, - 0x8f,0x55,0x03,0x48,0xcf,0x16,0x24,0x2c,0x51,0x72, - 0x7a,0xac,0x40,0x32,0x30,0x95,0xb0,0x06,0x7f,0xfb, - 0x53,0xd0,0x63,0x35,0x4a,0x00,0x88,0xf8,0x2c,0x0d, - 0xac,0xe1,0x5c,0x3b,0x1e,0x1b,0x1d,0x22,0x22,0x22, - 0xcd,0x9b,0x03,0xf8,0x1b,0xb0,0x99,0x73,0xfd,0x04, - 0xec,0xe6,0xff,0xbf,0xd1,0x22,0x92,0xba,0xeb,0x7c, - 0x31,0xff,0x3e,0x70,0x5f,0xc2,0xfa,0xde,0xf8,0x6e, - 0xc2,0x63,0x18,0x88,0x35,0x66,0x6b,0xe4,0x4d,0xe0, - 0xfe,0x4e,0xff,0xdd,0x27,0x5e,0x38,0xb9,0xe8,0xa9, - 0x07,0xc3,0xb7,0xf1,0x95,0xa0,0x2f,0x86,0xcd,0x83, - 0x97,0x9e,0xed,0x8c,0xff,0x26,0xf7,0x5e,0xac,0x17, - 0x43,0x99,0x5d,0x8c,0xfd,0xec,0x7b,0x2c,0x80,0x8d, - 0x9f,0x2d,0x1c,0x25,0x00,0x44,0x7c,0xb6,0x0f,0x58, - 0xfb,0x57,0xec,0x42,0x54,0x44,0x44,0x9a,0xd3,0x0f, - 0x7b,0x2f,0xdd,0xca,0xb9,0x7e,0x22,0xb0,0x1d,0xf0, - 0x9f,0x68,0x11,0x89,0xcc,0x5e,0x01,0x00,0xbe,0x63, - 0x00,0x23,0x48,0x6e,0xc2,0x17,0xc3,0xee,0xcc,0x1a, - 0x83,0xd7,0x93,0xab,0x99,0xbd,0x33,0x7e,0x1d,0x2a, - 0x00,0x00,0x5e,0xc7,0x46,0x3a,0x7b,0x1c,0x06,0x7c, - 0x29,0x9d,0x70,0x2a,0x69,0x87,0x80,0xb5,0x17,0x47, - 0x8b,0x22,0x3b,0x93,0x81,0xcb,0x03,0xd6,0x17,0xf2, - 0x18,0x89,0x12,0x00,0x22,0x3e,0x21,0x09,0x80,0x2b, - 0xa2,0x45,0x21,0x22,0x52,0x7d,0x7d,0x81,0xbf,0xe0, - 0xbf,0xb0,0xfc,0x1c,0x7b,0x8f,0x4e,0xda,0x8d,0x15, - 0x69,0x55,0xd7,0x9d,0xce,0xeb,0x49,0x3e,0x06,0xb0, - 0x0c,0xd6,0x24,0x2d,0x6b,0x23,0x1c,0x6b,0x46,0x76, - 0xf9,0xef,0xaa,0x25,0x00,0x1a,0x4d,0x61,0xf8,0x2d, - 0xbe,0x3e,0x21,0xbd,0x81,0x8b,0x28,0x68,0x29,0x77, - 0xce,0x06,0x60,0x63,0x56,0x3d,0x3e,0xc3,0x8e,0xcd, - 0x54,0xc1,0xc8,0x80,0xb5,0x3b,0xc6,0x0a,0xa2,0x15, - 0x4a,0x00,0x88,0x24,0xeb,0x87,0xff,0xc3,0xfb,0x03, - 0x92,0x3b,0x03,0x8b,0x88,0x48,0xf7,0x7a,0x63,0xbb, - 0x2b,0xbb,0x3a,0xd7,0x4f,0xc2,0x2e,0xb0,0xf4,0xbe, - 0x2b,0x59,0xe8,0x7a,0x13,0xf8,0x2e,0x70,0xbb,0xe3, - 0x71,0x07,0x44,0x88,0xa5,0x91,0x61,0x24,0x5f,0xb7, - 0xfc,0x17,0x78,0xbe,0xcb,0xaf,0xd5,0xe5,0x08,0x00, - 0xd8,0x18,0xc7,0x43,0xf0,0x8d,0x6a,0x5e,0x0d,0xf8, - 0x7e,0x2a,0x11,0x55,0xcb,0xa6,0xd8,0x51,0x13,0x8f, - 0x9b,0xb0,0x64,0x6d,0x15,0x3c,0x87,0x7f,0xc2,0xcc, - 0xa2,0x14,0x70,0x1a,0x80,0x12,0x00,0x22,0xc9,0x56, - 0xa3,0xe7,0x32,0xb2,0xae,0xee,0x66,0xf6,0x72,0x3a, - 0x11,0x11,0xf1,0xe9,0x05,0x5c,0x82,0x7f,0xdc,0xea, - 0x64,0x6c,0xd4,0xd2,0xdd,0xd1,0x22,0x12,0x99,0x5d, - 0x77,0xd7,0xcd,0x97,0x3a,0x1e,0xb7,0x1b,0xd9,0x36, - 0x93,0xdb,0x9f,0xe4,0x63,0x07,0x7f,0xea,0xe6,0xd7, - 0xf2,0x38,0xaa,0x10,0x53,0x52,0x45,0xc3,0xa3,0xc0, - 0xef,0x9c,0xcf,0x75,0x12,0xb0,0x7c,0x6b,0xe1,0x54, - 0xce,0x06,0x01,0x6b,0x3d,0x89,0xb2,0x32,0xb9,0x2d, - 0x60,0xed,0xe6,0xd1,0xa2,0x68,0x92,0x12,0x00,0x22, - 0xc9,0xd6,0x09,0x58,0x7b,0x57,0xb4,0x28,0x44,0x44, - 0xaa,0xed,0x7c,0xfc,0x0d,0xd3,0xa6,0x60,0x67,0x2b, - 0xef,0x88,0x16,0x8d,0x88,0xcf,0xdf,0x81,0x8f,0x13, - 0xd6,0x0c,0x04,0xf6,0xca,0x20,0x16,0xb0,0x9b,0xf8, - 0xfd,0x12,0xd6,0x4c,0x02,0xae,0xc9,0x20,0x96,0x32, - 0x38,0x19,0xeb,0x09,0x90,0x64,0x00,0x70,0x61,0xe4, - 0x58,0xca,0x66,0xdd,0x80,0xb5,0x77,0x46,0x8b,0x22, - 0x1f,0x21,0x9f,0x3d,0x21,0x89,0x92,0x4c,0x28,0x01, - 0x20,0x92,0x2c,0x24,0x01,0x70,0x7f,0xf2,0x12,0x11, - 0x11,0xe9,0xe2,0xb7,0xc0,0xa1,0xce,0xb5,0x53,0xb1, - 0x1d,0xd5,0x5b,0xe3,0x85,0x23,0xe2,0x36,0x15,0xb8, - 0xca,0xb1,0xee,0xc0,0xd8,0x81,0xb4,0xdb,0x04,0x58, - 0x36,0x61,0xcd,0x8d,0xc0,0xa7,0x19,0xc4,0x52,0x06, - 0x13,0xb1,0xa9,0x00,0x1e,0x9b,0x93,0xfd,0x71,0x8e, - 0x22,0xf3,0x26,0x00,0x5e,0x06,0xde,0x89,0x19,0x48, - 0x0e,0x1e,0x00,0xa6,0x3b,0xd7,0xae,0x19,0x33,0x90, - 0x66,0x28,0x01,0x20,0x92,0x6c,0x75,0xe7,0xba,0xc9, - 0xc0,0x4b,0x31,0x03,0x11,0x11,0xa9,0xa0,0xb3,0x80, - 0xa3,0x9d,0x6b,0xa7,0x61,0xa3,0xcd,0xbc,0x73,0xbc, - 0x45,0xb2,0xe0,0x39,0x06,0xb0,0x21,0xb0,0x4a,0xec, - 0x40,0xf0,0x55,0xd1,0x74,0x57,0xfe,0x5f,0x67,0xb7, - 0x00,0xd7,0x3a,0xd7,0x9e,0x83,0x8d,0x77,0xab,0xbb, - 0x21,0xc0,0x12,0xce,0xb5,0x4f,0xc5,0x0c,0x24,0x27, - 0x93,0x81,0x17,0x9c,0x6b,0x57,0xa5,0x60,0xf7,0xdc, - 0x85,0x0a,0x46,0xa4,0xa0,0x96,0x74,0xae,0x1b,0x8d, - 0xaf,0x99,0x8c,0x88,0x88,0x98,0xd3,0xf0,0x37,0xd7, - 0x9a,0x0e,0xec,0x89,0x35,0x93,0x12,0x29,0x92,0x27, - 0xf1,0x75,0x94,0x8f,0x5d,0x05,0x30,0x10,0x1b,0xff, - 0xd7,0xc8,0x1b,0xa8,0x6f,0x46,0x77,0x8e,0x01,0xc6, - 0x39,0xd6,0xcd,0x07,0xfc,0x26,0x72,0x2c,0x65,0xb0, - 0x54,0xc0,0xda,0xa7,0x63,0x05,0x91,0xb3,0x27,0x9d, - 0xeb,0x06,0x00,0x8b,0xc5,0x0c,0x24,0x94,0x12,0x00, - 0x22,0x8d,0xf5,0xc6,0x3a,0x78,0x7a,0x78,0x33,0x81, - 0x22,0x22,0x02,0x3f,0xc0,0xce,0xdf,0x7a,0x4c,0xc7, - 0x9a,0x03,0xde,0x18,0x2f,0x1c,0x91,0x96,0x78,0xaa, - 0x00,0xf6,0x25,0xee,0xa8,0xbd,0xdd,0x81,0xb9,0x13, - 0xd6,0x5c,0x46,0xf2,0xe8,0xc2,0x3a,0x7a,0x0f,0x38, - 0xd1,0xb9,0x76,0x6f,0xe0,0x6b,0x11,0x63,0x29,0x83, - 0xc5,0x03,0xd6,0x8e,0x8e,0x16,0x45,0xbe,0x9e,0x0d, - 0x58,0xbb,0x4c,0xb4,0x28,0x9a,0xa0,0x04,0x80,0x48, - 0x63,0x0b,0xe1,0x9f,0xfd,0x5a,0xb5,0xf3,0x4d,0x22, - 0x22,0xb1,0x1c,0x07,0x9c,0xe9,0x5c,0x3b,0x03,0xbb, - 0x71,0xfa,0x6b,0xbc,0x70,0x44,0x5a,0x76,0x35,0x56, - 0x16,0xdc,0xc8,0x42,0xc0,0xf6,0x11,0x63,0x18,0x91, - 0xf0,0xfb,0x6d,0x84,0xcd,0x30,0xaf,0x9b,0x3f,0x62, - 0x67,0xbb,0x3d,0xce,0xc7,0x3f,0x02,0xaf,0x8a,0xbc, - 0xe5,0xff,0x00,0x6f,0x45,0x8b,0x22,0x5f,0x6f,0x07, - 0xac,0xf5,0x56,0x13,0x67,0x22,0xeb,0x04,0xc0,0x6e, - 0xd8,0x9b,0x4f,0x99,0xbe,0x46,0xc6,0xf8,0x83,0x90, - 0xd2,0xf0,0xee,0xfe,0x83,0x12,0x00,0x65,0xb1,0x27, - 0xf9,0xbf,0xaf,0x78,0xbe,0xbc,0x4d,0x89,0x44,0xca, - 0xe6,0x08,0xe0,0x57,0x01,0xeb,0xaf,0x46,0x1d,0xcb, - 0xa5,0xf8,0xc6,0xe2,0xab,0x50,0x89,0x75,0x0c,0x60, - 0x18,0x30,0x3c,0x61,0xcd,0x7d,0xc0,0x2b,0x91,0x5e, - 0xbf,0x0a,0xda,0x80,0x43,0xb0,0x5e,0x23,0x49,0x96, - 0x06,0x4e,0x8d,0x1b,0x4e,0xa1,0x85,0x94,0xb4,0x57, - 0xf5,0xfa,0x38,0xe4,0xfb,0x9a,0x3f,0x5a,0x14,0x4d, - 0x50,0x05,0x80,0x48,0x63,0x49,0xa5,0x74,0x9d,0xbd, - 0x1f,0x2d,0x0a,0x11,0x91,0x6a,0x38,0x10,0x38,0x37, - 0xf0,0x31,0xfb,0x02,0xbb,0x46,0x88,0x45,0x24,0x6d, - 0x9e,0x63,0x00,0xdb,0x61,0x95,0x00,0x69,0xdb,0x1f, - 0x1b,0x01,0xd8,0x88,0x9a,0xff,0x25,0x7b,0x0e,0x6b, - 0x4c,0xea,0x71,0x2c,0xb0,0x56,0xc4,0x58,0x8a,0x6c, - 0x9e,0x80,0xb5,0xef,0x46,0x8b,0x22,0x5f,0x4a,0x00, - 0x88,0x54,0xd4,0x9c,0x01,0x6b,0x27,0x46,0x8b,0x42, - 0x44,0xa4,0xfc,0xf6,0x01,0x2e,0x22,0xf9,0x26,0xa5, - 0xab,0x5e,0xc0,0x95,0xc0,0xfa,0xa9,0x47,0x24,0x92, - 0xae,0xbb,0x48,0x9e,0x29,0xdf,0x17,0xd8,0x2f,0xe5, - 0xd7,0xed,0xe5,0x78,0xce,0x09,0xc0,0x75,0x29,0xbf, - 0x6e,0x55,0xfd,0x14,0x78,0xd1,0xb1,0xae,0x2f,0xf6, - 0x9e,0xd6,0x27,0x6e,0x38,0x85,0xe4,0xbd,0x3e,0x9e, - 0x41,0xf2,0xd1,0x98,0xb2,0x9a,0x10,0xb0,0x76,0x70, - 0xb4,0x28,0x9a,0xa0,0x04,0x80,0x48,0x63,0x03,0x02, - 0xd6,0x56,0xf5,0x0d,0x4e,0x44,0xa4,0x55,0xbb,0x63, - 0xcd,0xc7,0x9a,0xbd,0xee,0x98,0x13,0xf8,0x07,0x56, - 0xe6,0x2c,0x52,0x54,0xde,0xa3,0xa3,0x69,0xcf,0x92, - 0xdf,0x04,0x58,0x36,0x61,0xcd,0x75,0x68,0xa3,0xc2, - 0x6b,0x0a,0x70,0x98,0x73,0xed,0x7a,0xf8,0xc7,0x98, - 0x56,0x89,0x37,0x01,0x30,0x25,0x6a,0x14,0xf9,0x9a, - 0x14,0xb0,0x76,0x8e,0x68,0x51,0x34,0x41,0x09,0x80, - 0xfa,0xf8,0x36,0xf9,0x9f,0x69,0xf6,0x7e,0x6d,0x1c, - 0xe9,0xcf,0xa0,0x19,0x21,0x15,0x00,0x4a,0x00,0x88, - 0x88,0x7c,0xd1,0xff,0x61,0xe7,0xf8,0x5b,0xdd,0x25, - 0x5b,0x08,0xb8,0x99,0xb0,0xd2,0x53,0x91,0xac,0xfd, - 0x09,0xbb,0x96,0x69,0x64,0x65,0x60,0xa3,0x14,0x5f, - 0x73,0x84,0x63,0xcd,0xc8,0x14,0x5f,0xaf,0x0e,0xfe, - 0x8d,0xff,0xc8,0xc4,0xe9,0x14,0xac,0xc9,0x5b,0x06, - 0xbc,0xd7,0xc7,0x55,0xbe,0x36,0x0e,0xf9,0xde,0xfa, - 0x47,0x8b,0xa2,0x09,0x4a,0x00,0x88,0x34,0x16,0x32, - 0xae,0x67,0x46,0xb4,0x28,0x1a,0x9b,0x40,0xbe,0x09, - 0x9b,0x2b,0xe3,0x7f,0x8b,0x22,0x52,0x52,0x6b,0x03, - 0xd7,0xe2,0x9f,0xa6,0x92,0x64,0x35,0x6c,0x27,0x33, - 0xe6,0x28,0x35,0x91,0x56,0xbc,0x0e,0xdc,0xed,0x58, - 0x97,0x56,0x15,0xc0,0x40,0xac,0xc2,0xa6,0x91,0x31, - 0x58,0x03,0x40,0x09,0x73,0x3c,0xf0,0xa1,0x63,0xdd, - 0x20,0xe0,0xbc,0xc8,0xb1,0x14,0x8d,0x37,0xa1,0x9b, - 0xd7,0xb5,0x71,0x16,0x42,0xbe,0xb7,0x42,0xdd,0x73, - 0x17,0x2a,0x18,0x91,0x02,0xf2,0x74,0x82,0xed,0x10, - 0x72,0x5c,0x40,0x44,0xa4,0x0e,0x96,0xc1,0x57,0xfa, - 0x38,0x35,0xe0,0x39,0xb7,0x06,0xfe,0xd0,0x5c,0x38, - 0x22,0x99,0xf0,0x34,0x03,0xdc,0x93,0x74,0xc6,0xc8, - 0xed,0x4e,0x72,0xc3,0xe2,0x91,0x24,0x57,0x25,0xc8, - 0x17,0x7d,0x0c,0x7c,0xc7,0xb9,0x76,0x7b,0xec,0xef, - 0xb4,0x2e,0xbc,0xd7,0xc7,0x55,0xbe,0x36,0x0e,0xf9, - 0xde,0x42,0x3e,0xe3,0xa2,0x53,0x02,0x40,0xa4,0xb1, - 0x90,0x1f,0xd8,0x2a,0xbf,0xc9,0x89,0x88,0xc4,0xf2, - 0x08,0x56,0x12,0xfd,0x97,0x80,0xc7,0x1c,0x02,0x7c, - 0x2f,0x4e,0x38,0x22,0x2d,0xbb,0x01,0x18,0x97,0xb0, - 0x66,0x1e,0x92,0x77,0xee,0x3d,0x46,0x24,0xfc,0xfe, - 0x4c,0xac,0xff,0x86,0x34,0xe7,0x4a,0xe0,0x0e,0xe7, - 0xda,0xdf,0x00,0xf3,0x46,0x8c,0xa5,0x48,0xbc,0xd7, - 0xc7,0x21,0x47,0x69,0xcb,0x26,0xe4,0xba,0xbf,0x50, - 0xbd,0x10,0xb2,0x2e,0xa1,0x7b,0x02,0xb8,0x24,0xe3, - 0xd7,0x6c,0xd5,0xe8,0xbc,0x03,0x90,0x5c,0x85,0x74, - 0xf8,0xac,0xf2,0x9b,0x5c,0x95,0x7c,0x88,0x8d,0xf9, - 0x29,0xba,0xe5,0x81,0x45,0xf3,0x0e,0x42,0x24,0xb2, - 0x73,0x81,0xef,0x62,0x17,0x93,0x07,0x62,0x8d,0xcc, - 0xbc,0xdd,0xfe,0xcf,0xc2,0x66,0x9a,0xdf,0x10,0x27, - 0x34,0x91,0xa6,0x4d,0x06,0xfe,0x0c,0x1c,0x9e,0xb0, - 0xee,0x40,0xe0,0xf2,0x16,0x5e,0x67,0x18,0x30,0x3c, - 0x61,0xcd,0xdd,0xc0,0x9b,0x2d,0xbc,0x86,0x58,0x43, - 0xc0,0x67,0x48,0xbe,0xce,0x5b,0x18,0x38,0x1b,0xf8, - 0x56,0xf4,0x88,0xf2,0xe7,0x6d,0x28,0xd9,0xb7,0xfd, - 0x6b,0x7a,0xc4,0x58,0xf2,0x12,0x92,0x00,0x28,0x54, - 0x03,0xce,0xac,0x13,0x00,0x63,0x08,0x9f,0xff,0x2b, - 0x92,0xa7,0x4f,0x02,0xd6,0x2e,0x18,0x2d,0x0a,0x49, - 0xd3,0xdd,0xc0,0x5e,0x79,0x07,0xe1,0x70,0x2e,0xd6, - 0xbc,0x53,0xa4,0x8a,0xc6,0x03,0x07,0x33,0xfb,0x58, - 0xb2,0x49,0xc0,0x4e,0xc0,0xc3,0xc0,0x62,0x8e,0xe7, - 0xe8,0x0d,0x5c,0x81,0xdd,0xdc,0x3c,0x9c,0x76,0x80, - 0x22,0x2d,0xba,0x94,0xe4,0x04,0xc0,0xa6,0x58,0xd2, - 0x6b,0x4c,0x93,0xaf,0xb1,0x3f,0xc9,0x63,0x35,0xbd, - 0x8d,0xec,0xa4,0x67,0xaf,0x00,0xa7,0x01,0x3f,0x73, - 0xac,0x3d,0x08,0x7b,0x5f,0x1a,0x15,0x35,0xa2,0xfc, - 0x85,0x5e,0x1f,0xbf,0x13,0x2b,0x90,0x1c,0xcd,0x1f, - 0xb0,0xf6,0xe3,0x68,0x51,0x34,0x41,0x47,0x00,0x44, - 0x1a,0x0b,0xf9,0x81,0xf5,0x5c,0xb0,0x8a,0x88,0xd4, - 0xdd,0x13,0xc0,0xba,0x74,0x3f,0x93,0xfc,0x5d,0x6c, - 0x6a,0xc0,0xe7,0xce,0xe7,0x1a,0x08,0xdc,0x84,0xc6, - 0x03,0x4a,0xf1,0x3c,0x02,0x3c,0x95,0xb0,0xa6,0x17, - 0xcd,0x37,0x03,0xec,0x85,0x25,0x00,0x1a,0xf9,0x14, - 0xb8,0xb1,0xc9,0xe7,0x97,0xd9,0x9d,0x03,0x3c,0xed, - 0x58,0xd7,0x0b,0xb8,0x90,0x82,0x8d,0x7d,0x8b,0x20, - 0xe4,0xfa,0xb8,0xaa,0xd5,0x8c,0x8b,0x04,0xac,0x55, - 0x02,0x40,0xa4,0x44,0xde,0x0d,0x58,0xab,0x04,0x80, - 0x88,0x48,0x63,0x17,0x62,0xe3,0xcf,0x5e,0x6e,0xb0, - 0xe6,0x31,0xec,0xc6,0xc6,0xdb,0xb4,0x6c,0x61,0x34, - 0x1e,0x50,0x8a,0xc9,0xb3,0xfb,0xbe,0x3f,0xcd,0x5d, - 0x8f,0x6f,0x8a,0x35,0xd9,0x6c,0xe4,0x2f,0x84,0xcd, - 0x2a,0x97,0x9e,0x4d,0xc7,0x4a,0xfb,0x67,0x3a,0xd6, - 0xae,0x04,0xfc,0x30,0x6e,0x38,0xb9,0x0b,0xb9,0x3e, - 0x56,0x02,0xa0,0x60,0x15,0x10,0x1a,0xa3,0x53,0x1f, - 0x2f,0x52,0x9e,0x12,0xc9,0x0f,0xf2,0x0e,0xa0,0x93, - 0x49,0xc0,0xfb,0xd8,0xfc,0xe9,0x24,0xcb,0x45,0x8e, - 0x45,0x44,0xa4,0xac,0x26,0x60,0x8d,0xfb,0xfe,0xec, - 0x5c,0xff,0x57,0xe0,0x14,0xac,0xec,0xd6,0xa3,0x63, - 0x3c,0xe0,0xf6,0x54,0xf3,0xac,0xa9,0x94,0xd3,0x95, - 0x58,0xaf,0x8a,0x46,0x33,0xc0,0x17,0x07,0xb6,0x02, - 0x6e,0x0b,0x7c,0xee,0x11,0x8e,0x35,0x2a,0xff,0x4f, - 0xd7,0x43,0xd8,0xb8,0xbf,0x23,0x1d,0x6b,0x4f,0xc4, - 0x12,0x30,0x55,0xed,0x25,0xf6,0x5a,0xc0,0xda,0xaa, - 0x5e,0x1f,0x2f,0x19,0xb0,0xf6,0x95,0x68,0x51,0x34, - 0x41,0x09,0x80,0xfa,0xb8,0x03,0xdf,0x1b,0x96,0x7c, - 0xd1,0xab,0xf8,0x12,0x00,0xab,0x63,0x59,0x7c,0x4f, - 0x76,0x38,0x4d,0xf7,0x11,0xaf,0x01,0xe1,0x66,0x91, - 0x9e,0x57,0x44,0xea,0xe3,0x69,0x60,0x0f,0xe0,0x85, - 0xc0,0xc7,0x9d,0x0e,0xac,0x82,0xbf,0x67,0xc7,0xd6, - 0x58,0xef,0x8c,0xc3,0x02,0x5f,0x47,0x24,0x96,0x8f, - 0x80,0x7f,0x00,0xbb,0x25,0xac,0x3b,0x90,0xb0,0x04, - 0xc0,0x20,0x92,0x27,0x08,0x8c,0xc6,0x6e,0x58,0x25, - 0x5d,0x3f,0x02,0x76,0x21,0xb9,0xea,0xb3,0x3f,0xf0, - 0x47,0xac,0x52,0xa3,0x8a,0x23,0x18,0x5f,0x0d,0x58, - 0xbb,0x46,0xb4,0x28,0xf2,0xb5,0xba,0x73,0x5d,0x1b, - 0xf0,0x7a,0xcc,0x40,0x42,0x29,0x01,0x20,0x92,0x6c, - 0x34,0xf0,0x25,0xc7,0xba,0x41,0x58,0x96,0xf3,0xc5, - 0xb8,0xe1,0x7c,0xc1,0xb6,0x11,0x9f,0x7b,0x3a,0xd0, - 0x27,0xe2,0xf3,0x8b,0x48,0xb5,0x3d,0x8c,0x25,0x12, - 0x9b,0x2d,0x43,0x0e,0x9d,0x0c,0x70,0x28,0x76,0xbc, - 0xe0,0x9c,0x26,0x5f,0x4f,0x24,0x6d,0x97,0x90,0x9c, - 0x00,0xd8,0x09,0x98,0x0f,0x7f,0x63,0xb5,0xdd,0x81, - 0xb9,0x12,0xd6,0x8c,0x74,0x3e,0x97,0x84,0x19,0x0f, - 0x1c,0x85,0x6f,0xfa,0xc8,0xc6,0x58,0xe5,0xd3,0x85, - 0x51,0x23,0xca,0xc7,0xdb,0xd8,0x9f,0x85,0xe7,0xe8, - 0x55,0x55,0x13,0x00,0xab,0x39,0xd7,0xbd,0x8c,0x4d, - 0x06,0x29,0x0c,0xf5,0x00,0x10,0x49,0xf6,0x78,0xc0, - 0xda,0x0d,0xa2,0x45,0x21,0x22,0x52,0x3e,0x6f,0xd0, - 0xda,0x19,0xe4,0x8e,0xc9,0x00,0x6f,0x07,0x3c,0xe6, - 0x2c,0x6c,0x87,0x4e,0xa4,0x08,0x6e,0x23,0xf9,0xdf, - 0xef,0x1c,0xc0,0x3e,0x01,0xcf,0x39,0x22,0xe1,0xf7, - 0x67,0x60,0x9d,0xe8,0x25,0x8e,0x1b,0x81,0xbf,0x39, - 0xd7,0xfe,0x1c,0xeb,0x53,0x52,0x35,0x6d,0xc0,0x93, - 0xce,0xb5,0xab,0x62,0x9b,0x64,0x55,0x32,0x2f,0xfe, - 0xe6,0xb3,0x4f,0xc4,0x0c,0xa4,0x19,0x4a,0x00,0x88, - 0x24,0x7b,0x2c,0x60,0xed,0xd6,0xd1,0xa2,0x10,0x11, - 0xa9,0xa7,0xd0,0xc9,0x00,0xbd,0xb1,0xb3,0xd7,0xde, - 0xaa,0x01,0x91,0x98,0x66,0x02,0x97,0x39,0xd6,0x1d, - 0xe8,0x7c,0xbe,0xa5,0x48,0x3e,0x9e,0x77,0x2b,0x61, - 0x4d,0xda,0x24,0xdc,0x51,0xc0,0x67,0x8e,0x75,0xf3, - 0x02,0xbf,0x8f,0x1c,0x4b,0x5e,0xbc,0x1b,0x64,0xfd, - 0xa9,0xde,0x91,0xd2,0xcd,0x48,0x1e,0xc1,0xd9,0xe1, - 0xd1,0x98,0x81,0x34,0x43,0x09,0x00,0x91,0x64,0x8f, - 0xe0,0x2f,0xdd,0xd9,0x1a,0xff,0x1b,0x82,0x88,0x88, - 0xf8,0x84,0x4e,0x06,0xe8,0x18,0x0f,0x18,0xd2,0xa4, - 0x49,0x24,0x16,0x4f,0x33,0xbe,0xb5,0x80,0xb5,0x1d, - 0xeb,0xf6,0x27,0xf9,0x3a,0x63,0xa4,0xe3,0x79,0xa4, - 0x35,0x6f,0x61,0xfd,0x00,0x3c,0x76,0x07,0x76,0x88, - 0x18,0x4b,0x5e,0xee,0x0f,0x58,0xbb,0x55,0xb4,0x28, - 0xf2,0xb1,0x45,0xc0,0xda,0x51,0xd1,0xa2,0x68,0x92, - 0x12,0x00,0x22,0xc9,0xa6,0x00,0xff,0x75,0xae,0x5d, - 0x08,0x1b,0x71,0x25,0x22,0x22,0xe9,0xea,0x98,0x0c, - 0xe0,0xb5,0x30,0x70,0x0b,0x1a,0x0f,0x28,0xf9,0x7b, - 0x19,0xdf,0x4d,0xc0,0x01,0x09,0xbf,0xdf,0x0b,0xd8, - 0x2f,0x61,0xcd,0xc7,0x58,0xf2,0x4b,0xe2,0xfb,0x03, - 0xf0,0x3f,0xe7,0xda,0xf3,0x48,0xee,0xdb,0x90,0x75, - 0x13,0xe9,0x56,0x85,0xdc,0xd8,0xee,0x44,0xb5,0x36, - 0xc8,0xbc,0x09,0x8d,0x89,0x14,0x70,0x0a,0x9b,0x12, - 0x00,0x22,0x3e,0x77,0x04,0xac,0x1d,0x11,0x2b,0x08, - 0x11,0x91,0x9a,0x3b,0x1d,0x1b,0xad,0xe5,0xb5,0x1a, - 0x70,0x2d,0x6a,0x7a,0x2c,0xf9,0xbb,0xd4,0xb1,0x66, - 0x6f,0x1a,0x8f,0x0c,0xdc,0x14,0x58,0x26,0xe1,0x39, - 0xae,0x06,0xa6,0x7a,0x83,0x92,0x96,0xcc,0x04,0xbe, - 0x85,0x6f,0xf4,0xe8,0x12,0xc0,0x19,0x09,0x6b,0xca, - 0x36,0xc2,0xf4,0x7d,0xe0,0x29,0xe7,0xda,0xa5,0xb1, - 0xa6,0x88,0x55,0xb0,0x0e,0xb0,0x92,0x73,0xed,0x5d, - 0x14,0xf0,0xef,0x55,0x09,0x00,0x11,0x9f,0x1b,0x03, - 0xd6,0x7e,0x9d,0x78,0x63,0xf9,0x44,0xa4,0xde,0xaa, - 0x38,0x4e,0x2a,0xd4,0x01,0xf8,0x77,0xdd,0x00,0xbe, - 0x86,0x8d,0x07,0x14,0xc9,0xd3,0x75,0x24,0x9f,0x19, - 0x9f,0x1f,0xd8,0xb1,0xc1,0xef,0x8f,0x70,0xbc,0x8e, - 0xe7,0xb8,0x81,0xa4,0xe7,0x29,0xe0,0x97,0xce,0xb5, - 0x47,0xd2,0xb8,0x37,0x49,0x19,0x13,0x37,0x7f,0x0f, - 0x58,0x9b,0x54,0xbd,0x52,0x16,0xfb,0x06,0xac,0xf5, - 0x4c,0x8b,0xc8,0x9c,0x12,0x00,0x22,0x3e,0xa3,0x81, - 0xe7,0x9d,0x6b,0x07,0x03,0x07,0x45,0x8c,0x45,0x44, - 0xaa,0xa7,0x9f,0x73,0xdd,0xb4,0xa8,0x51,0x94,0xc3, - 0x64,0x60,0x67,0xc2,0x26,0x03,0x1c,0x0a,0x7c,0x2f, - 0x4e,0x38,0x22,0x2e,0x9f,0x03,0xd7,0x38,0xd6,0xed, - 0xde,0xc3,0xaf,0x0f,0x04,0xf6,0x48,0x78,0xec,0x93, - 0x84,0x4d,0x2e,0x92,0x74,0x9c,0x0a,0xbc,0xe2,0x58, - 0xd7,0x1b,0xb8,0x88,0x9e,0x2b,0x92,0x0a,0x35,0x2a, - 0xce,0x29,0xe4,0x06,0x77,0x6f,0x60,0x81,0x58,0x81, - 0x64,0x64,0x00,0xfe,0x89,0x1d,0x53,0x81,0x7f,0x44, - 0x8c,0xa5,0x69,0x4a,0x00,0x88,0xf8,0x79,0xba,0xf8, - 0x76,0x38,0x11,0x1b,0xeb,0x23,0x22,0xe2,0x31,0xd8, - 0xb9,0xae,0x95,0x91,0x7a,0x55,0x12,0x3a,0x19,0x00, - 0x34,0x1e,0x50,0xf2,0xe7,0x39,0x06,0xb0,0x1d,0xdd, - 0x5f,0x3f,0x6c,0x4f,0xf2,0x28,0xb5,0x91,0xa1,0x01, - 0x49,0x2a,0x26,0x01,0x87,0x3b,0xd7,0xae,0x09,0x7c, - 0xb7,0xc1,0xf3,0x94,0xcd,0x13,0xf8,0x8f,0x01,0x0c, - 0xa4,0xe7,0xef,0xbd,0x2c,0x0e,0x02,0x16,0x74,0xae, - 0xbd,0x09,0xf8,0x24,0x62,0x2c,0x4d,0x53,0x02,0x40, - 0xc4,0x6f,0x24,0xfe,0x73,0x3c,0x8b,0x01,0x87,0xc5, - 0x0b,0x45,0x44,0x22,0x58,0x10,0x18,0x0e,0x7c,0x1b, - 0x6b,0xee,0x74,0x0f,0xf0,0x21,0xd6,0xdc,0x33,0x36, - 0x6f,0x02,0x20,0xe4,0x86,0xb7,0xea,0x42,0x27,0x03, - 0x74,0x8c,0x07,0x5c,0x2f,0x5a,0x44,0x22,0x8d,0x3d, - 0x88,0x55,0x14,0x36,0x32,0x0f,0xdd,0x77,0x18,0xef, - 0xa9,0x32,0xa0,0xc3,0x34,0xe0,0xaa,0x66,0x82,0x92, - 0x54,0xdc,0x8e,0xff,0xcf,0xff,0x14,0xba,0xef,0xe5, - 0x30,0x31,0xbd,0x70,0x32,0x15,0x72,0xec,0xe4,0x08, - 0xb2,0xf9,0x4c,0x8d,0xa1,0x1f,0x61,0x95,0x64,0x17, - 0xc7,0x0a,0xa4,0x55,0x4a,0x00,0x88,0xf8,0xbd,0x87, - 0x75,0xa1,0xf6,0x3a,0x0d,0x4b,0x04,0x88,0x48,0xf1, - 0xcc,0x87,0xdd,0xe8,0x9f,0xc7,0xac,0x1b,0xfd,0xf7, - 0x81,0x7f,0x63,0xe7,0xc5,0x8f,0xc0,0xe6,0xfc,0x0e, - 0x05,0x36,0xc8,0x20,0x9e,0x79,0x9d,0xeb,0xde,0x8f, - 0x1a,0x45,0xf9,0x84,0x4e,0x06,0x18,0x88,0x95,0x64, - 0x6a,0x3c,0xa0,0xe4,0xc5,0x73,0xb3,0xd4,0x75,0x64, - 0xdc,0x00,0xac,0x32,0xa0,0x91,0x9b,0xb1,0xf7,0x31, - 0xc9,0xcf,0x71,0xf8,0x76,0x7c,0xe7,0x04,0x2e,0xe8, - 0xe6,0xd7,0xcb,0x9a,0xe0,0xbd,0x0c,0x98,0xe0,0x5c, - 0x3b,0x37,0xfe,0x9e,0x09,0x45,0x73,0x1c,0xb0,0x94, - 0x73,0xed,0x68,0x2c,0x29,0x54,0x48,0x4a,0x00,0x88, - 0x84,0x39,0x2b,0x60,0xed,0x3c,0xa8,0xf1,0x94,0x48, - 0x51,0xf5,0xc5,0x7e,0x3e,0x0f,0x67,0xd6,0x8d,0x7e, - 0x4f,0x36,0x8c,0x1c,0xcb,0x10,0x6c,0x64,0x9d,0xc7, - 0x9b,0x31,0x03,0x29,0xa9,0xd0,0xc9,0x00,0x1a,0x0f, - 0x28,0x79,0xba,0x9c,0xe4,0x6a,0xc2,0x6d,0xbb,0xfc, - 0xf7,0x56,0x24,0x8f,0x90,0x53,0xf3,0xbf,0xfc,0x7d, - 0x08,0x1c,0xef,0x5c,0xbb,0x15,0xf0,0xcd,0x2e,0xbf, - 0xe6,0xbd,0x89,0x2e,0x9a,0xb1,0xc0,0x25,0x01,0xeb, - 0xf7,0xa1,0xfb,0x2a,0x97,0x22,0x5b,0x12,0xf8,0x71, - 0xc0,0xfa,0xb3,0x28,0x70,0xd3,0x5e,0x25,0x00,0x44, - 0xc2,0x3c,0x81,0x65,0xd9,0xbd,0x76,0xc6,0x76,0x12, - 0x45,0xa4,0x58,0x3e,0x00,0x5e,0x77,0xae,0xed,0x7a, - 0x31,0x9e,0xb6,0x75,0x02,0xd6,0x7a,0x1a,0x4d,0xd5, - 0x51,0xe8,0x64,0x00,0x8d,0x07,0x94,0xbc,0xbc,0x0f, - 0xfc,0x33,0x61,0xcd,0x52,0xc0,0xca,0x9d,0xfe,0x7b, - 0x67,0xc7,0x73,0xfe,0xab,0x85,0x98,0x24,0x3d,0x97, - 0x62,0x55,0x65,0x1e,0xbf,0xc2,0x26,0x3f,0x74,0x28, - 0x6b,0x02,0x00,0x6c,0x57,0x7f,0x4a,0xc0,0xfa,0xcb, - 0x28,0x4f,0x43,0xc0,0xde,0x58,0x82,0x23,0xa9,0x07, - 0x47,0x87,0x31,0xd8,0x38,0xce,0xc2,0x52,0x02,0x40, - 0x24,0xdc,0x09,0xc0,0x8c,0x80,0xf5,0xbf,0xa1,0x9c, - 0xb3,0x4f,0xf5,0xfe,0x20,0x55,0x77,0x9f,0x73,0xdd, - 0x3a,0xcc,0x7e,0x31,0x9e,0xb6,0x90,0x33,0xe9,0xea, - 0xf0,0xdd,0xbd,0x8e,0xc9,0x00,0x6f,0x05,0x3c,0xe6, - 0x6b,0xc0,0xef,0xe3,0x84,0x23,0xd2,0x90,0xa7,0x19, - 0xe0,0x36,0xed,0xff,0xdb,0x1b,0x6b,0x00,0xd8,0xc8, - 0x95,0x14,0x70,0xd6,0x78,0x8d,0x1d,0x8a,0xef,0x66, - 0x78,0x28,0x96,0x04,0xe8,0x90,0x34,0x26,0xb2,0xc8, - 0xde,0x24,0xec,0xfd,0x74,0x31,0xe0,0xcf,0x40,0x9f, - 0x38,0xe1,0xa4,0xea,0x34,0x60,0xcb,0x80,0xf5,0x27, - 0x52,0xf0,0x89,0x3d,0xba,0xc0,0x17,0x09,0xf7,0x1c, - 0x70,0x61,0xc0,0xfa,0x7e,0xc0,0x8d,0xd8,0x8e,0x53, - 0x59,0xcc,0x09,0x5c,0x4f,0x39,0xde,0x98,0x45,0x9a, - 0x75,0x5b,0xc0,0xda,0x98,0xf3,0x8b,0x93,0x9a,0x7b, - 0x75,0x78,0x05,0x18,0x17,0x31,0x8e,0xb2,0x7b,0x17, - 0xd8,0x89,0xb0,0x73,0xb4,0x87,0x51,0xfe,0xae,0xd4, - 0x52,0x3e,0xb7,0x90,0xdc,0xcf,0x63,0xab,0xf6,0xff, - 0x5d,0x8f,0xe4,0xa6,0x69,0x2a,0xff,0x2f,0x96,0x17, - 0x81,0x33,0x9c,0x6b,0xf7,0x63,0x56,0x39,0xfc,0xf8, - 0x38,0xe1,0x64,0xe6,0x4c,0xe0,0xe3,0x80,0xf5,0x5b, - 0x00,0xe7,0x03,0xbd,0xe2,0x84,0x93,0x8a,0x3d,0x81, - 0x1f,0x06,0xac,0xbf,0x8f,0xb0,0x7e,0x61,0xb9,0x50, - 0x02,0x40,0xa4,0x39,0x3f,0x20,0x6c,0xa7,0x69,0x28, - 0x70,0x17,0xb0,0x6a,0x9c,0x70,0x52,0xb5,0x08,0x56, - 0xbe,0x96,0x54,0x72,0x28,0x52,0x76,0xb7,0xe2,0xaf, - 0xe6,0xf9,0x36,0x71,0xca,0x15,0xd7,0xc0,0x5f,0x01, - 0x70,0x47,0x84,0xd7,0xaf,0x9a,0xd0,0xc9,0x00,0x00, - 0xbf,0x40,0xef,0x77,0x92,0xad,0xe9,0x58,0x2f,0x80, - 0x46,0x36,0xc5,0x36,0x10,0x92,0x9a,0xff,0x3d,0x0c, - 0x3c,0x9b,0x46,0x50,0x92,0xaa,0xb3,0x48,0x9e,0xf8, - 0xd0,0xe1,0x02,0xac,0xd1,0x63,0xd9,0x13,0x00,0x63, - 0xb1,0x46,0x79,0x21,0xbe,0x85,0x55,0xca,0x16,0xd1, - 0xae,0x58,0x75,0x8d,0x37,0x41,0x31,0x19,0xfb,0x7e, - 0x0a,0x4f,0x09,0x00,0x91,0xe6,0x8c,0x07,0x0e,0x21, - 0xec,0x22,0x73,0x41,0xe0,0x5e,0xe0,0xab,0x51,0x22, - 0x4a,0xc7,0x5e,0xc0,0x33,0x64,0xd3,0xf5,0x5c,0x24, - 0x6f,0x1f,0xe1,0xbf,0xa9,0x9e,0x1b,0x38,0x39,0x42, - 0x0c,0xc7,0x04,0xac,0x4d,0x3a,0x37,0x2c,0x26,0x74, - 0x32,0x40,0x6f,0x6c,0x7c,0x97,0xc6,0x03,0x4a,0x96, - 0x92,0x8e,0x01,0x0c,0xc2,0x3e,0x8b,0xb7,0x4a,0x58, - 0x37,0x32,0x95,0x68,0x24,0x6d,0x53,0xf1,0x5f,0x27, - 0x2e,0x87,0xbd,0x67,0x7d,0x1a,0x35,0xa2,0x6c,0x5c, - 0x41,0x78,0x3f,0x8a,0xa3,0xb1,0x2a,0x96,0xfe,0xe9, - 0x87,0xd3,0xb4,0x11,0x58,0x73,0xd9,0x90,0x3e,0x31, - 0x3f,0x06,0x5e,0x88,0x12,0x4d,0xca,0x94,0x00,0x10, - 0x69,0xde,0xbf,0x80,0x73,0x02,0x1f,0x33,0x3f,0x36, - 0x16,0xe4,0xbb,0x14,0xab,0xe4,0x69,0x19,0xac,0xe4, - 0xff,0xcf,0xd8,0x78,0xb4,0x10,0x85,0x3e,0xe7,0x24, - 0x92,0xe0,0x8a,0x80,0xb5,0x47,0x90,0x6e,0x02,0x6f, - 0x38,0xd6,0xbc,0xce,0xe3,0x63,0xc2,0x8e,0x2c,0xd4, - 0xdd,0xe9,0xd8,0xfb,0x99,0x97,0xc6,0x03,0x4a,0xd6, - 0x9e,0x07,0x1e,0x4c,0x58,0xb3,0x2d,0x8d,0x13,0xf2, - 0x53,0x08,0xfb,0x77,0x2e,0xd9,0xba,0x1f,0xb8,0xc8, - 0xb9,0xf6,0x7b,0x58,0x22,0xa0,0x0a,0xbd,0x1c,0x46, - 0x60,0x47,0xb2,0x42,0x1f,0x73,0x0f,0xb0,0x68,0xca, - 0xb1,0x84,0xea,0x87,0xf5,0x32,0xf8,0x53,0xfb,0xff, - 0xf7,0xfa,0x27,0xe1,0xf7,0x04,0xb9,0x51,0x02,0x40, - 0xa4,0x35,0x3f,0xc4,0xe6,0x86,0x87,0xe8,0x83,0xbd, - 0x49,0xdc,0x47,0xfe,0x47,0x02,0x16,0x01,0xfe,0x80, - 0x5d,0x88,0xec,0xda,0xc4,0xe3,0x1f,0xc7,0x9a,0x22, - 0x8a,0x94,0xd5,0x75,0xc0,0x3b,0xce,0xb5,0x7d,0x80, - 0x6b,0x80,0x61,0x29,0xbc,0xee,0x10,0xe0,0x62,0xfc, - 0x89,0xc0,0xcb,0x08,0xeb,0xb0,0x2c,0x70,0x20,0x61, - 0x93,0x01,0x16,0xc6,0xa6,0xbc,0x68,0x3c,0xa0,0x64, - 0x25,0xa9,0x0a,0xe0,0x10,0x1a,0xef,0x40,0xfe,0x0d, - 0x2b,0xbb,0x96,0xe2,0x3a,0x81,0xe4,0x7e,0x0f,0x60, - 0x7f,0xcf,0x7f,0xa4,0xdc,0x8d,0x00,0x3b,0x7c,0x80, - 0x55,0x94,0x86,0x6e,0x10,0x6d,0x84,0x1d,0x67,0x39, - 0x98,0x7c,0x36,0xc9,0xbe,0x8c,0x1d,0x23,0x3b,0x32, - 0xf0,0x71,0x63,0xb0,0x91,0x8e,0x85,0x1d,0xfb,0xd7, - 0x95,0x12,0x00,0x22,0xad,0x99,0x0e,0xec,0x02,0x3c, - 0xdd,0xc4,0x63,0xbf,0x82,0xdd,0x40,0xff,0x01,0x58, - 0x3a,0xcd,0xa0,0x1c,0x36,0xc1,0x46,0x94,0xbc,0x86, - 0xed,0x6a,0x86,0x64,0x39,0x3b,0xdc,0x83,0xed,0x60, - 0x7e,0x90,0x56,0x50,0x22,0x39,0x98,0x06,0xfc,0x3a, - 0x60,0xfd,0x50,0xec,0x28,0x4f,0x2b,0xc9,0xbb,0x05, - 0xb1,0x9f,0x9f,0x65,0x9d,0xeb,0xa7,0xa2,0x6e,0xf5, - 0xcd,0x68,0x66,0x32,0xc0,0xea,0x68,0x3c,0xa0,0x64, - 0xe7,0x1a,0x60,0x62,0x83,0xdf,0x4f,0xea,0x3b,0xa2, - 0xe6,0x7f,0xc5,0x37,0x0e,0xff,0x51,0xaf,0x0d,0xb1, - 0xe4,0x70,0x15,0x8c,0xc2,0x6e,0xe4,0x43,0xcd,0x8b, - 0x55,0x4d,0xdc,0x4f,0xf2,0xf1,0x97,0xb4,0xac,0x84, - 0x25,0xd9,0xef,0x27,0xbc,0x61,0xf7,0x47,0x58,0xa5, - 0xce,0x27,0x69,0x07,0x15,0x93,0x12,0x00,0x22,0xad, - 0xfb,0x14,0x1b,0xd7,0xf3,0x62,0x13,0x8f,0xed,0x87, - 0xdd,0x80,0xbf,0x88,0xdd,0x90,0x6f,0x43,0x9c,0x0b, - 0xcf,0x5e,0x58,0x19,0xe1,0x19,0x58,0x53,0x9a,0x51, - 0xc0,0x37,0x68,0xfe,0xbc,0xd5,0x8d,0xd8,0x1b,0x5e, - 0xd9,0x1b,0xd6,0x88,0x00,0x9c,0x0b,0xbc,0x11,0xb0, - 0x7e,0x18,0xf0,0x1f,0x60,0x6f,0xc2,0x77,0x29,0x86, - 0x03,0x0f,0x60,0xcd,0xff,0xbc,0x2e,0xc4,0x92,0x75, - 0x12,0xae,0x99,0xc9,0x00,0x1a,0x0f,0x28,0x59,0xf9, - 0x8c,0xe6,0x3b,0x86,0xbf,0x85,0x1a,0x83,0x96,0xc5, - 0x35,0xd4,0xb3,0x87,0xcb,0xe5,0xc0,0xf1,0x4d,0x3e, - 0xf6,0xcb,0xd8,0x91,0xd9,0x87,0xb0,0xa3,0x72,0x69, - 0x57,0x66,0xf5,0x07,0x76,0xc4,0xae,0x67,0x9f,0xc3, - 0xa6,0x31,0x84,0x7e,0x9e,0x8f,0xc3,0x9a,0x74,0xbe, - 0x94,0x6e,0x68,0xf1,0x65,0x9d,0xe1,0x5e,0x0d,0xf8, - 0x79,0xc6,0xaf,0x19,0xcb,0xaf,0xf1,0x95,0xf4,0x48, - 0x3d,0xbc,0x03,0x6c,0x06,0xdc,0x49,0x73,0x3b,0x83, - 0x7d,0xb1,0x1b,0xf2,0x6f,0x60,0xd9,0xc4,0x9b,0xb1, - 0x23,0x02,0x0f,0xd0,0x5c,0x43,0x91,0xb9,0x80,0xb5, - 0xb1,0x9b,0xfe,0x0d,0xb0,0x1d,0xff,0x45,0x9a,0x78, - 0x9e,0xae,0xa6,0x61,0xc7,0x1e,0x7e,0x49,0x89,0x4a, - 0x9d,0x44,0x12,0x4c,0xc6,0xce,0x5f,0x5e,0x1b,0xf0, - 0x98,0x79,0xb0,0xc6,0x71,0xdf,0xc1,0x46,0x1f,0xdd, - 0x46,0xcf,0x3b,0x79,0xfd,0xb0,0x8e,0xde,0x87,0x03, - 0xbb,0x05,0xc6,0xf6,0x3e,0x70,0x6a,0xe0,0x63,0x64, - 0x76,0x8f,0x61,0x17,0x77,0xd7,0xe1,0xbf,0xc0,0x3b, - 0x0c,0x78,0x19,0x7b,0xaf,0xab,0x82,0x0d,0x29,0xee, - 0xf5,0xd7,0x48,0xec,0x18,0x5a,0x5d,0x5d,0x8a,0x4d, - 0xae,0x08,0x75,0x05,0x30,0x33,0xe5,0x58,0x24,0x9e, - 0x23,0xb0,0xf2,0xf6,0x41,0x79,0x07,0x92,0xb1,0x73, - 0xb0,0x7f,0xa7,0xcd,0xbe,0x97,0x76,0x5c,0xc7,0x9e, - 0x87,0xf5,0xde,0xba,0x17,0xbb,0x3e,0x7e,0x12,0xff, - 0x14,0x1f,0xb0,0x4d,0xef,0x55,0xb1,0xc4,0xc2,0x26, - 0xc0,0x0e,0xc0,0xe0,0x26,0x63,0x02,0xdb,0xf1,0xdf, - 0x0a,0xfb,0x7c,0x29,0x9d,0xac,0x13,0x00,0x2b,0x52, - 0x9d,0xf3,0xc2,0x57,0xa2,0x04,0x80,0xcc,0xee,0x3d, - 0xec,0x4d,0xe5,0x1a,0x5a,0x2b,0x5b,0x1a,0x8a,0x35, - 0x43,0x19,0xd1,0xfe,0xdf,0x9f,0x03,0xaf,0xb6,0x7f, - 0xbd,0xd3,0xfe,0xdf,0x9f,0x63,0xe7,0x81,0x07,0x60, - 0xcd,0xab,0x06,0x62,0x0d,0x06,0x87,0xb5,0x7f,0x0d, - 0x6d,0xe1,0xf5,0x7b,0x32,0x06,0x3b,0xd3,0xf5,0x48, - 0x84,0xe7,0x16,0xc9,0xdb,0x75,0x58,0x02,0xe0,0xeb, - 0x81,0x8f,0x5b,0x17,0x6b,0xa0,0x39,0x05,0xab,0x0a, - 0x78,0x0d,0x3b,0x16,0x33,0x13,0x2b,0xf5,0x5f,0x04, - 0x3b,0xee,0xd3,0xec,0x85,0xc6,0x61,0x84,0xcd,0x55, - 0x96,0xee,0x5d,0x8f,0x75,0x68,0x3e,0x3d,0xe0,0x31, - 0xbf,0xc0,0xde,0xf7,0xfe,0x16,0x25,0xa2,0x6c,0xad, - 0xd5,0xfe,0x55,0x44,0xf7,0x53,0xef,0x04,0xc0,0x28, - 0x2c,0xd9,0xb4,0x5c,0xe0,0xe3,0x46,0xa6,0x1f,0x8a, - 0x44,0xf4,0x3a,0xf6,0x1e,0x54,0x95,0xa4,0x62,0x88, - 0x5f,0x01,0x1f,0x62,0xa5,0xfd,0x73,0x34,0xf9,0x1c, - 0x03,0xb0,0x23,0xb7,0xbb,0xb4,0xff,0xf7,0x54,0xec, - 0xf3,0xf6,0x15,0xac,0x1a,0x66,0x02,0x5f,0xbc,0x36, - 0x1e,0x04,0x2c,0x8e,0x1d,0xb3,0x1d,0xd6,0xfe,0xeb, - 0x69,0x78,0x11,0xab,0x1e,0x68,0xa6,0xf2,0xb7,0x10, - 0x74,0xc6,0x4d,0x24,0x5d,0x63,0xb1,0xd2,0xf8,0x9f, - 0x93,0x5e,0xa7,0xff,0x81,0x58,0xd6,0x32,0xaf,0x86, - 0x81,0x33,0xb0,0x37,0xed,0xef,0x53,0x8d,0xe6,0x34, - 0x22,0x3d,0x39,0x14,0x58,0x13,0x4b,0x56,0x87,0x9a, - 0x03,0xd8,0x3c,0xdd,0x70,0xf8,0x05,0xd5,0xb8,0xf9, - 0x2c,0x8a,0x9f,0x02,0xab,0x60,0x95,0x56,0x1e,0x1d, - 0xe3,0x01,0x37,0x05,0x1e,0x8d,0x15,0x94,0x08,0x76, - 0x96,0xff,0x8c,0x80,0xf5,0x0f,0x50,0xe2,0x9b,0x8f, - 0x1a,0xfb,0x2d,0xb0,0x2f,0x56,0xa1,0x59,0x37,0x57, - 0x60,0x89,0xae,0xeb,0x80,0xc5,0x52,0x78,0xbe,0xfe, - 0xc0,0x0a,0xed,0x5f,0x59,0xfa,0x27,0xf6,0x77,0x58, - 0xea,0xe6,0x9b,0xea,0x01,0x20,0x92,0xbe,0x19,0xd8, - 0x99,0xa7,0xad,0x81,0xb7,0x73,0x8e,0xa5,0x55,0xf7, - 0x00,0xeb,0x60,0xa5,0xcb,0xba,0xf9,0x97,0xaa,0x1b, - 0x87,0x95,0x05,0x16,0xa1,0xba,0xeb,0x5a,0xe0,0xc4, - 0xbc,0x83,0xa8,0xa0,0xd0,0xc9,0x00,0x1d,0xe3,0x01, - 0x97,0x88,0x13,0x8e,0x08,0x60,0x0d,0xc8,0x42,0xca, - 0x99,0xd5,0xfc,0xaf,0x9c,0x66,0x00,0xdf,0x22,0xec, - 0xef,0xba,0x4a,0x1e,0xc4,0xfa,0xdf,0xdc,0x90,0x77, - 0x20,0x4d,0x98,0x8c,0x35,0x73,0xdc,0x9e,0x92,0xdf, - 0xfc,0x83,0x12,0x00,0x22,0x31,0xdd,0x89,0xed,0x36, - 0xfd,0x9a,0xf2,0xcd,0x75,0x7d,0x1e,0xd8,0x1d,0xdb, - 0xd1,0x7c,0x2a,0xe7,0x58,0x44,0xb2,0xf4,0x32,0xd6, - 0xcf,0x23,0xcf,0xe4,0xdd,0x95,0x58,0x83,0x41,0xf5, - 0xd9,0x48,0xdf,0x64,0xac,0x29,0x60,0xc8,0x64,0x80, - 0x45,0x80,0x5b,0x80,0xb9,0xa3,0x44,0x24,0x62,0xef, - 0x37,0xb7,0x3b,0xd7,0x7e,0x4e,0x58,0xbf,0x12,0x29, - 0x96,0x47,0x81,0xdf,0xe5,0x1d,0x44,0x8e,0x3e,0xc1, - 0x7a,0xe1,0xec,0x01,0xbc,0x99,0x73,0x2c,0x5e,0xb7, - 0x62,0x7d,0xec,0x2a,0xf3,0xf7,0xa6,0x04,0x80,0x48, - 0x5c,0xe3,0xb1,0x26,0x61,0xab,0x63,0x65,0x4f,0x45, - 0xbf,0xa0,0xff,0x37,0xb6,0x03,0xba,0x0a,0x76,0x66, - 0x56,0xa4,0x8e,0x5e,0xc0,0x9a,0x0e,0x3d,0x98,0xf1, - 0xeb,0xce,0x04,0x4e,0xc1,0x1a,0xd6,0xd5,0x75,0x87, - 0x28,0x0b,0xef,0x11,0x3e,0x19,0xa0,0x63,0x3c,0x60, - 0x9f,0x28,0x11,0x89,0x58,0x33,0x40,0x8f,0xeb,0x51, - 0x45,0x5e,0xd9,0x9d,0x4c,0xd8,0xe4,0x99,0x2a,0xfa, - 0x2b,0xb0,0x32,0xf6,0x67,0x31,0x2e,0xe7,0x58,0x7a, - 0xf2,0x04,0x76,0xd6,0x7f,0x5b,0xac,0x1f,0x4c,0x65, - 0x28,0x01,0x20,0x92,0x8d,0xe7,0xb1,0xe6,0x62,0x6b, - 0x60,0x1f,0xf2,0x93,0xf2,0x0d,0x67,0x36,0x9f,0x00, - 0x17,0x63,0x0d,0xa2,0xbe,0x8a,0xed,0x74,0x15,0x3d, - 0x51,0x21,0x12,0x5b,0xc7,0x64,0x8f,0x1f,0x63,0x4d, - 0x85,0x62,0x7b,0x01,0xfb,0xf9,0x3b,0x0d,0xfd,0xfc, - 0x65,0xa1,0x63,0x32,0x40,0xc8,0x9f,0xf5,0x36,0x68, - 0x3c,0xa0,0xc4,0x73,0x13,0x36,0x05,0x28,0x89,0xca, - 0xff,0xcb,0x6f,0x22,0xf0,0xed,0xbc,0x83,0x28,0x80, - 0x89,0x58,0x6f,0x96,0xa5,0x81,0x1f,0x51,0x9c,0x8a, - 0x80,0x51,0xc0,0xae,0xd8,0x11,0xd8,0x9b,0x73,0x8e, - 0x25,0x0a,0x25,0x00,0x44,0xb2,0xf5,0x0c,0x70,0x10, - 0xd6,0x00,0xe5,0xdb,0xd8,0x9b,0x4c,0x1e,0x63,0x7c, - 0x3e,0x06,0x2e,0xc1,0x2e,0x68,0x17,0xc2,0xce,0xa4, - 0x3d,0x99,0x43,0x1c,0x22,0x45,0x36,0x0d,0xeb,0x1a, - 0xbf,0x0a,0xd6,0x71,0x3b,0xc6,0x51,0x9e,0x77,0xb0, - 0x86,0xa1,0xab,0x63,0xe3,0x8d,0x24,0x3b,0x1d,0x93, - 0x01,0x42,0x1c,0x8e,0x55,0x75,0x89,0xa4,0x6d,0x2a, - 0xd6,0x74,0xb2,0x91,0xd7,0xb0,0xde,0x3c,0x52,0x7e, - 0x37,0x63,0x95,0xa1,0x62,0x15,0x00,0x67,0x62,0x89, - 0x80,0x9d,0xb1,0x3f,0x97,0x90,0x0a,0xad,0x34,0xbc, - 0x89,0x4d,0x68,0x58,0x03,0x4b,0xfe,0xdf,0x48,0x85, - 0x93,0xf1,0x9a,0x02,0x20,0x92,0x8f,0xb1,0xd8,0x4c, - 0xd3,0xf3,0x80,0x85,0xb1,0xb1,0x81,0x5b,0x60,0xdd, - 0xa6,0x97,0x8e,0xf0,0x7a,0x6f,0x63,0x23,0xca,0x3a, - 0xbe,0x1e,0xa3,0x7c,0x7d,0x09,0x44,0xf2,0xf2,0x0a, - 0x70,0x00,0x70,0x12,0xb6,0x6b,0xbc,0x27,0x36,0x2d, - 0xa0,0x59,0x53,0xb0,0x1e,0x21,0x57,0x63,0x17,0x3a, - 0xd3,0x5a,0x0d,0x50,0x9a,0x16,0x3a,0x19,0x00,0xe0, - 0x6c,0xec,0xdf,0x84,0x26,0x34,0x48,0xda,0x2e,0xc1, - 0x1a,0x8d,0xf5,0xe4,0x32,0x2a,0x7c,0x53,0x52,0x43, - 0xc7,0x60,0x0d,0xa3,0x5b,0x99,0x47,0x5f,0x25,0x33, - 0x80,0xbf,0xb7,0x7f,0x0d,0xc2,0xaa,0xe2,0xb6,0xc4, - 0xfa,0x51,0xad,0x42,0xba,0x47,0xb0,0x26,0x62,0x63, - 0xad,0xef,0x04,0x6e,0x6b,0xff,0xff,0xb5,0xf9,0xd9, - 0xea,0xd5,0xd6,0x56,0x9b,0xef,0x55,0xa4,0x2c,0x86, - 0x60,0x65,0x47,0x2b,0x03,0xcb,0x62,0x09,0x81,0x85, - 0x80,0xa1,0xed,0xbf,0x37,0x00,0x1b,0x7f,0xd2,0x07, - 0x3b,0x4a,0x30,0x11,0xcb,0x94,0x4e,0xc4,0x7a,0x0e, - 0xbc,0x81,0x5d,0x9c,0xbe,0x02,0xbc,0x8a,0x95,0x16, - 0x87,0x34,0xbc,0x12,0x91,0x64,0x8b,0x60,0x09,0xbb, - 0xb5,0xb0,0x11,0x9d,0x8b,0xb7,0xff,0xda,0xdc,0xd8, - 0xcf,0x68,0x1b,0xf6,0xf3,0xf9,0x19,0x96,0x80,0x7b, - 0x15,0x78,0x16,0xf8,0x2f,0xd6,0x5b,0x40,0x67,0x78, - 0x45,0x44,0x44,0x7c,0x06,0x62,0xe3,0x13,0x57,0xc3, - 0xae,0x8d,0x97,0xc1,0x3e,0x73,0x87,0x02,0xf3,0x01, - 0x73,0x62,0xd7,0xc6,0x7d,0xb1,0xa4,0xfa,0x54,0xec, - 0xba,0xf8,0x23,0xe0,0x43,0xec,0x73,0x78,0x0c,0xf0, - 0x12,0x56,0xf1,0xfa,0x1c,0x35,0xee,0xb5,0xa3,0x04, - 0x80,0x88,0x88,0x88,0x88,0x88,0x88,0x48,0x0d,0xa8, - 0x07,0x80,0x88,0x88,0x88,0x88,0x88,0x88,0x48,0x0d, - 0x28,0x01,0x20,0x22,0x22,0x22,0x22,0x22,0x22,0x52, - 0x03,0x4a,0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x88, - 0xd4,0x80,0x12,0x00,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x35,0xa0,0x04,0x80,0x88,0x88,0x88,0x88,0x88, - 0x88,0x48,0x0d,0x28,0x01,0x20,0x22,0x22,0x22,0x22, - 0x22,0x22,0x52,0x03,0x4a,0x00,0x88,0x88,0x88,0x88, - 0x88,0x88,0x88,0xd4,0x80,0x12,0x00,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x35,0xa0,0x04,0x80,0x88,0x88, - 0x88,0x88,0x88,0x88,0x48,0x0d,0x28,0x01,0x20,0x22, - 0x22,0x22,0x22,0x22,0x22,0x52,0x03,0x4a,0x00,0x88, - 0x88,0x88,0x88,0x88,0x88,0x88,0xd4,0x80,0x12,0x00, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x35,0xa0,0x04, - 0x80,0x88,0x88,0x88,0x88,0x88,0x88,0x48,0x0d,0x28, - 0x01,0x20,0x22,0x22,0x22,0x22,0x22,0x22,0x52,0x03, - 0x4a,0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0xd4, - 0x80,0x12,0x00,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x35,0xa0,0x04,0x80,0x88,0x88,0x88,0x88,0x88,0x88, - 0x48,0x0d,0x28,0x01,0x20,0x22,0x22,0x22,0x22,0x22, - 0x22,0x52,0x03,0x4a,0x00,0x88,0x88,0x88,0x88,0x88, - 0x88,0x88,0xd4,0x80,0x12,0x00,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x35,0xa0,0x04,0x80,0x88,0x88,0x88, - 0x88,0x88,0x88,0x48,0x0d,0x28,0x01,0x20,0x22,0x22, - 0x22,0x22,0x22,0x22,0x52,0x03,0x4a,0x00,0x88,0x88, - 0x88,0x88,0x88,0x88,0x88,0xd4,0x80,0x12,0x00,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x35,0xa0,0x04,0x80, - 0x88,0x88,0x88,0x88,0x88,0x88,0x48,0x0d,0x28,0x01, - 0x20,0x22,0x22,0x22,0x22,0x22,0x22,0x52,0x03,0x4a, - 0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0xd4,0x80, - 0x12,0x00,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x35, - 0xd0,0x37,0xef,0x00,0xa4,0x54,0x06,0x01,0xeb,0x02, - 0xab,0x00,0x4b,0x76,0xfa,0x5a,0x08,0x98,0x13,0x18, - 0xd8,0xfe,0x35,0x07,0x30,0x1d,0x98,0x02,0x4c,0x02, - 0x3e,0x06,0x3e,0x02,0xde,0x05,0xc6,0xb4,0x7f,0x3d, - 0x0b,0x3c,0xd9,0xfe,0xfb,0x22,0x55,0x34,0x2f,0xb0, - 0x16,0xb0,0x3c,0xb0,0x2c,0xb0,0x34,0xb0,0x00,0x30, - 0x14,0x98,0x1f,0xfb,0x59,0xe9,0xdf,0xfe,0xd5,0x1b, - 0x98,0x06,0x4c,0x05,0x26,0x03,0x9f,0x02,0xe3,0xb0, - 0x9f,0x9d,0xb7,0xda,0xbf,0x5e,0xc1,0x7e,0x6e,0x46, - 0x03,0x9f,0x67,0xf8,0x7d,0x88,0x88,0x88,0x88,0x48, - 0x45,0xf4,0x6a,0x6b,0x6b,0x4b,0xe3,0x79,0xfe,0x0b, - 0x6c,0x98,0xc6,0x13,0xb5,0x60,0x1a,0x76,0xe1,0x3c, - 0x19,0xf8,0x04,0x78,0x8f,0x59,0x37,0x9c,0xcf,0x00, - 0x4f,0x61,0x17,0xce,0xa9,0x7c,0xc3,0x35,0x31,0x0f, - 0xb0,0x2d,0xb0,0x35,0xb0,0x01,0xb0,0x32,0xd0,0x27, - 0xc5,0xe7,0x9f,0x81,0xdd,0xd0,0xfc,0x1b,0xb8,0x13, - 0xb8,0x9b,0x7a,0xdc,0xd8,0x3c,0x82,0x25,0x52,0x8a, - 0x64,0x0a,0xb3,0x7e,0x7e,0x3e,0xc2,0x7e,0x7e,0xde, - 0x03,0x5e,0x04,0x9e,0xc3,0x7e,0x7e,0x5e,0xcc,0x2d, - 0xba,0x72,0x98,0x1f,0xf8,0x1a,0xb0,0x0d,0xf0,0x25, - 0x60,0x39,0xa0,0x57,0x84,0xd7,0x99,0x09,0x3c,0x0d, - 0xdc,0x07,0xdc,0x05,0xdc,0x4e,0x35,0x7e,0x6e,0x4e, - 0x04,0x7e,0x96,0x77,0x10,0x39,0x3a,0x1c,0xb8,0x20, - 0xef,0x20,0x80,0xbd,0x80,0x3f,0x3b,0xd7,0x2e,0x81, - 0x25,0xa7,0x8a,0x6e,0x2e,0xe0,0x33,0xe7,0xda,0x6f, - 0x00,0x7f,0x89,0x18,0x8b,0xd7,0xf6,0xc0,0xcd,0xce, - 0xb5,0x37,0x02,0xbb,0x46,0x8c,0x25,0x6b,0x37,0x01, - 0x3b,0x3a,0xd7,0xee,0x00,0xdc,0x12,0x31,0x16,0xaf, - 0x6f,0x00,0x57,0x3b,0xd7,0x9e,0x09,0xfc,0x28,0x62, - 0x2c,0xcd,0x98,0x07,0xfb,0xec,0xef,0xe7,0x58,0xbb, - 0x39,0x70,0x4f,0xd4,0x68,0xc2,0x1d,0x0e,0x9c,0xe7, - 0x5c,0xfb,0x7d,0xe0,0xec,0x88,0xb1,0x84,0x1a,0x00, - 0x3c,0x04,0xac,0xe1,0x5c,0x7f,0x1d,0xf0,0xf5,0x78, - 0xe1,0xa4,0xe6,0x64,0xe0,0x34,0xe7,0xda,0x8f,0xb1, - 0xef,0xff,0x9d,0x78,0xe1,0x48,0x67,0x55,0xaa,0x00, - 0xe8,0xd7,0xfe,0x35,0x37,0xb6,0xcb,0xb6,0x62,0x37, - 0x6b,0x3e,0x06,0xee,0x05,0x6e,0x03,0xfe,0x8a,0x25, - 0x0a,0x64,0x76,0x83,0xb0,0x0f,0xb2,0xdd,0x80,0xaf, - 0x62,0xbb,0x93,0xb1,0xf4,0xc1,0x7e,0xe0,0xd7,0x00, - 0x8e,0xc1,0x6e,0x62,0x6e,0xc1,0x3e,0x44,0x6f,0xc6, - 0xaa,0x08,0x24,0x1b,0x73,0xb4,0x7f,0x0d,0xc6,0x2a, - 0x3a,0x56,0xed,0x66,0xcd,0x07,0xc0,0x28,0xe0,0x5f, - 0xc0,0x0d,0xd8,0x0e,0x75,0xdd,0xcd,0x09,0xec,0x02, - 0x1c,0x88,0x5d,0x14,0x65,0x71,0xac,0xaa,0x37,0xb0, - 0x66,0xfb,0xd7,0x91,0x58,0xd2,0xe6,0x5f,0xc0,0x45, - 0xd8,0x7b,0xdb,0xcc,0x0c,0x62,0x10,0x91,0xb8,0xfe, - 0x05,0xbc,0x0e,0x0c,0x73,0xac,0xdd,0x11,0x58,0x18, - 0x4b,0xda,0x96,0xdd,0x62,0xc0,0x76,0xce,0xb5,0xaf, - 0x63,0x7f,0x4e,0x45,0xf0,0x2f,0xec,0x9a,0xc5,0x73, - 0x5d,0xbd,0x1d,0xc5,0x4b,0x00,0x6c,0x8d,0xef,0xe6, - 0x1f,0x2c,0xfe,0x7b,0xe2,0x85,0xd2,0x94,0xed,0x03, - 0xd6,0xde,0x14,0x2d,0x8a,0xe6,0x4c,0x06,0xf6,0x04, - 0x1e,0xc5,0x2a,0x03,0x93,0xec,0x01,0x1c,0x00,0xfc, - 0x29,0x66,0x50,0x2d,0x5a,0x17,0x4b,0x00,0x78,0x1d, - 0x88,0x6e,0xfe,0x33,0x55,0xb7,0x1e,0x00,0xf3,0x63, - 0x59,0xf2,0x0b,0xb1,0x0f,0xca,0xbf,0x01,0xc3,0xf3, - 0x0c,0xa8,0x40,0x96,0xc2,0x32,0xa2,0x6f,0x61,0x37, - 0x12,0xdb,0x10,0xf7,0xe6,0xbf,0x3b,0x03,0xb1,0x37, - 0xb6,0x1b,0x81,0xd7,0x80,0x1f,0x03,0x43,0x32,0x8e, - 0x41,0x7a,0xb6,0x20,0xb0,0x3b,0x70,0x09,0xf0,0x3e, - 0xf6,0xf7,0xb4,0x59,0xae,0x11,0xe5,0x67,0x1e,0xe0, - 0x87,0xc0,0x9b,0xc0,0x55,0xc0,0x16,0xe4,0xf7,0x7e, - 0x3a,0x00,0x4b,0x42,0xfc,0x13,0x78,0x01,0xf8,0x26, - 0xe9,0x56,0xea,0x88,0x48,0xf6,0x66,0x62,0xd7,0x2a, - 0x1e,0x7d,0x81,0x11,0xf1,0x42,0xc9,0xd4,0x01,0xf8, - 0xdf,0xbf,0x2e,0xa4,0x38,0x09,0xcf,0x71,0x58,0x55, - 0x96,0xc7,0x5a,0x58,0xa2,0xa3,0x48,0x42,0x6e,0xa0, - 0xb7,0x8d,0x16,0x45,0x73,0x06,0x60,0x09,0x78,0x8f, - 0x67,0x45,0x27,0x07,0x00,0x00,0x20,0x00,0x49,0x44, - 0x41,0x54,0x17,0xb1,0xcf,0xc9,0xa2,0x79,0x1e,0x38, - 0x2a,0x60,0xfd,0xef,0xb0,0x2a,0xc3,0x22,0x9a,0x13, - 0xb8,0x12,0x7f,0x42,0xe9,0x0f,0x14,0x2f,0x29,0x53, - 0x79,0x75,0x4b,0x00,0x74,0xd6,0x0f,0xd8,0x09,0x2b, - 0x3f,0x7f,0x88,0xfa,0x26,0x02,0x16,0x04,0xfe,0x08, - 0xbc,0x0c,0x7c,0x0f,0x3b,0xb7,0x5c,0x04,0x8b,0x01, - 0xa7,0x62,0x89,0x80,0x9f,0x62,0x37,0x5c,0x52,0x1c, - 0xfd,0x81,0x9d,0xb1,0x5d,0x80,0x87,0xa9,0xcf,0xcf, - 0x4f,0x2f,0x2c,0x53,0xfd,0x0a,0x70,0x06,0x96,0x54, - 0x2c,0x92,0xe5,0x80,0xcb,0x81,0xff,0x61,0x15,0x02, - 0x22,0x52,0x5e,0x97,0x60,0x7d,0x41,0x3c,0x0e,0x26, - 0xce,0x91,0xa3,0x2c,0xf5,0x02,0x0e,0x72,0xae,0x9d, - 0x8a,0xfd,0xf9,0x14,0xc9,0x3f,0x02,0xd6,0x7a,0xab, - 0x1c,0xb2,0xd0,0x0b,0xdb,0xf4,0xf1,0x5a,0x0d,0x3b, - 0xfe,0x53,0x14,0xc3,0xf1,0xed,0x9c,0x43,0xd8,0xdf, - 0x51,0xd6,0x2e,0xc5,0x7f,0xfc,0x6a,0x2e,0xac,0x5a, - 0xd6,0x7b,0x93,0x9d,0xa5,0xb3,0x80,0x95,0x9c,0x6b, - 0x9f,0xc1,0xee,0x3d,0x24,0x63,0x75,0x4e,0x00,0x74, - 0xb6,0x01,0x96,0x08,0xb8,0x0a,0x6b,0xd0,0x55,0x07, - 0xfd,0x81,0x13,0xb0,0x1b,0xff,0x6f,0x51,0xdc,0x1d, - 0xc3,0x79,0xb0,0x52,0xb9,0x17,0x81,0xfd,0x29,0xff, - 0x05,0x4e,0x15,0xad,0x87,0xfd,0xfc,0x5c,0x4b,0xb5, - 0x7f,0x7e,0x16,0xc1,0xfa,0x54,0x5c,0x42,0xf1,0x6e, - 0xfc,0xbb,0x5a,0x07,0xeb,0x35,0x71,0x64,0xde,0x81, - 0x88,0x48,0xd3,0x3e,0xc0,0x8e,0x5b,0x79,0x2c,0x8b, - 0x1d,0xdb,0x2b,0xb3,0x2d,0xb1,0x6a,0x44,0x8f,0x1b, - 0xb0,0x3f,0x9f,0x22,0x09,0xd9,0xc5,0x0c,0xd9,0x71, - 0x8f,0x6d,0x5d,0xec,0x08,0x49,0x88,0x22,0x55,0x01, - 0x84,0x24,0x53,0x8a,0xbe,0xd3,0x7c,0x28,0xd6,0xbb, - 0xcc,0x63,0x7d,0x6c,0xa3,0xac,0x48,0xb6,0xc4,0x7f, - 0xdd,0x31,0x09,0xeb,0x39,0x33,0x39,0x5e,0x38,0xd2, - 0x13,0x25,0x00,0x66,0xb7,0x37,0xf0,0x38,0xf0,0xe5, - 0xbc,0x03,0x89,0x6c,0x79,0xe0,0x41,0xe0,0xe7,0x58, - 0xcf,0x84,0x32,0x58,0x08,0x18,0x09,0xdc,0x0a,0x2c, - 0x9a,0x6f,0x28,0xd2,0x83,0x3d,0xb0,0xc9,0x0e,0xc3, - 0x73,0x8e,0x23,0x86,0x8d,0xb0,0xf3,0x79,0xc3,0x73, - 0x8e,0x23,0x44,0x5f,0xe0,0xf7,0xed,0x5f,0x22,0x52, - 0x4e,0xe7,0x07,0xac,0xfd,0x56,0xb4,0x28,0xb2,0x11, - 0x12,0x7f,0xc8,0x9f,0x4b,0x56,0xc6,0x60,0xcd,0xa6, - 0x3d,0xb6,0xc4,0xfa,0xee,0x14,0x41,0x33,0xd5,0x08, - 0x45,0xaa,0x60,0xf0,0x26,0x23,0x3e,0x01,0x1e,0x88, - 0x19,0x48,0x0a,0x3e,0xc3,0x6e,0x8a,0xbd,0x95,0x3f, - 0x27,0x50,0x9c,0xa3,0x98,0x43,0xb0,0xeb,0x74,0xef, - 0x46,0xdd,0x77,0xb1,0x46,0xe0,0x92,0x03,0x25,0x00, - 0xbe,0x68,0x71,0xac,0x51,0xe0,0x5e,0x79,0x07,0x12, - 0xc9,0x37,0x81,0xc7,0xb0,0x1d,0xc2,0x32,0xda,0x1a, - 0x2b,0x19,0x2a,0x52,0xf6,0x59,0x66,0x59,0x14,0xeb, - 0x4a,0xff,0x8d,0xbc,0x03,0x49,0xd1,0x66,0xc0,0x1d, - 0x58,0x05,0x40,0x5a,0xda,0x80,0xf1,0xd8,0x0e,0xd6, - 0x5b,0xd8,0xc4,0x92,0xf1,0xd8,0x64,0x8c,0xb4,0x1d, - 0x89,0x9d,0x17,0x14,0x91,0xf2,0x19,0x85,0x4d,0x62, - 0xf1,0xd8,0x85,0xf2,0x56,0x61,0x2d,0x80,0x1d,0xcb, - 0xf4,0x78,0x0e,0xfb,0x73,0x29,0x22,0xef,0x0e,0xf3, - 0x20,0x8a,0x73,0xe3,0xd6,0x4c,0x35,0xc2,0x16,0x64, - 0xdf,0x27,0xaa,0x3b,0xcb,0xe3,0x3f,0x0b,0xff,0x4f, - 0xe2,0x7c,0xc6,0xa6,0xed,0x11,0xe0,0x07,0xce,0xb5, - 0xbd,0x81,0x2b,0x28,0xc6,0xf1,0xdd,0xf3,0xf0,0xf7, - 0xb6,0xf8,0x3b,0xc5,0x4c,0xe2,0xd5,0x46,0x95,0xa6, - 0x00,0xa4,0xa9,0x2f,0x76,0x1c,0x60,0x0e,0xe0,0xb2, - 0x9c,0x63,0x49,0xd3,0x59,0xd8,0xf8,0x93,0xb4,0xcc, - 0xc4,0xba,0x76,0xbe,0x06,0xbc,0x0d,0x4c,0xc4,0x3a, - 0xf9,0x4f,0xc6,0x9a,0xb2,0x0c,0xc4,0x3e,0xe4,0x16, - 0xc7,0x66,0xa0,0x2f,0x42,0x3a,0x25,0xfc,0x43,0xb0, - 0x29,0x01,0x27,0x00,0xe7,0xa4,0xf0,0x7c,0x92,0xae, - 0x7e,0xd8,0xcf,0xcf,0x00,0x8a,0xdd,0xa5,0xd6,0x63, - 0x2d,0x6c,0x32,0xc5,0xa0,0x26,0x1f,0xff,0x19,0x70, - 0x3f,0x56,0x3d,0xf0,0x34,0xd6,0x3b,0xe0,0x0d,0x6c, - 0x22,0x49,0x4f,0x17,0x22,0x73,0x60,0xe5,0x98,0x2b, - 0x60,0x17,0x37,0x2b,0x63,0x17,0x5b,0x2b,0x37,0x19, - 0x03,0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0x02,0x1f,0xf7,0x39,0xd6,0xc8,0xe7, - 0x2f,0x58,0x93,0xc4,0xb4,0xc6,0x59,0x2e,0x89,0x5d, - 0xec,0x7c,0x9b,0xee,0xc7,0x34,0x26,0x99,0x8e,0xfd, - 0xdc,0xfd,0x37,0xa5,0x78,0xd2,0xb6,0x19,0xd9,0x55, - 0xf6,0xec,0x83,0xef,0xf3,0xe1,0x19,0xb2,0x9b,0x31, - 0x7e,0x23,0xd6,0x90,0x36,0x6f,0x7b,0xe1,0x6f,0x44, - 0xb5,0x04,0x56,0xc1,0x52,0x74,0x73,0x61,0xc9,0x38, - 0x8f,0x6f,0x60,0x3f,0xbb,0x45,0x32,0x0f,0x96,0x6c, - 0xf7,0x24,0x22,0x9f,0xa7,0xb5,0x64,0x61,0x5e,0x46, - 0xe3,0x6b,0x1c,0x36,0x11,0xab,0x34,0x1b,0x1f,0x37, - 0x9c,0xa6,0xf5,0xc6,0xa6,0x4c,0x2d,0xe0,0x58,0x3b, - 0x86,0xfc,0x3b,0xb9,0x7f,0x13,0x6b,0x1c,0xdb,0x8c, - 0x5f,0x92,0x7f,0x03,0xb7,0xdb,0xb1,0x6b,0xc9,0x24, - 0x53,0xb1,0xbf,0x93,0xa2,0xfe,0xbb,0xe9,0xce,0x50, - 0xec,0x58,0xa5,0xf7,0xd8,0xeb,0x81,0xe4,0xb3,0xe9, - 0xb2,0x18,0xb6,0xc1,0xe1,0x99,0xda,0x35,0x13,0x3b, - 0xfe,0xf2,0xef,0xa8,0x11,0x49,0xa2,0xac,0x2b,0x00, - 0x5e,0xc7,0xce,0x87,0x64,0x65,0x31,0xec,0xa2,0x72, - 0x37,0xec,0xc2,0x39,0xf4,0x66,0xb3,0x2f,0x70,0x1d, - 0xb6,0x0b,0xf8,0x66,0xba,0xa1,0x65,0xa6,0x37,0xd6, - 0x29,0xb4,0xd9,0xcc,0x60,0x1b,0x76,0x01,0x3c,0x12, - 0x2b,0x9f,0x9a,0xd4,0x42,0x2c,0x93,0xb1,0xe4,0xc1, - 0xfd,0xc0,0x2f,0xb0,0x8b,0x9a,0x9d,0xb1,0xee,0xc5, - 0x9b,0x34,0xf9,0x9c,0xdf,0xc3,0xfe,0x5e,0x8f,0x6e, - 0x21,0xae,0xa2,0x7a,0x95,0x6c,0x7f,0x5e,0x3a,0xeb, - 0x8d,0xed,0x40,0x6f,0x01,0xec,0x87,0x35,0xca,0x0c, - 0xd5,0x17,0x6b,0x0c,0xb8,0x2a,0x56,0xe2,0x5e,0x36, - 0x67,0x13,0x76,0xf3,0x3f,0x19,0xdb,0x61,0x3f,0x0b, - 0x3b,0x6b,0x98,0xb6,0x37,0xb0,0x84,0xd0,0x05,0xd8, - 0xfb,0xd9,0x69,0xc0,0xda,0x01,0x8f,0xef,0x8b,0x35, - 0x30,0x5c,0x9b,0xb0,0xc4,0x5d,0x56,0xee,0x6d,0xff, - 0xca,0xc2,0xc6,0xf8,0x12,0x00,0x8f,0x02,0x27,0x46, - 0x8e,0x45,0x24,0xc9,0x78,0xec,0x73,0xdc,0x73,0x46, - 0x7e,0x25,0x60,0x53,0x8a,0x5b,0x22,0xdf,0x9d,0x4d, - 0xf0,0x77,0x0d,0xbf,0x9a,0x62,0xdf,0xc4,0xcd,0xc4, - 0xae,0x99,0x46,0x38,0xd6,0x2e,0x0b,0xac,0x48,0xbe, - 0x63,0xe9,0x5a,0x39,0xcb,0xbf,0x1d,0xf9,0x26,0x00, - 0x06,0x62,0xff,0xd6,0x3d,0xee,0xa5,0xd8,0xff,0x6e, - 0xba,0xf3,0x11,0x96,0xac,0xbe,0x0b,0xdf,0x91,0xed, - 0xdf,0x61,0xa3,0x28,0x5f,0x8e,0x19,0x54,0x17,0xbd, - 0xb0,0xa4,0x83,0x77,0x64,0xf7,0xcf,0xd1,0xcd,0x7f, - 0x21,0x54,0xbd,0x07,0xc0,0xdb,0xd8,0x87,0xc5,0x6e, - 0xd8,0x4e,0xc5,0x69,0x58,0xf6,0x38,0xc4,0x7c,0xd8, - 0xb9,0x96,0xb2,0xfa,0x25,0xcd,0xdd,0xfc,0xb7,0x61, - 0x73,0x3c,0x57,0x07,0x76,0x04,0xae,0xa7,0xb5,0x9b, - 0xff,0xee,0x8c,0xc7,0x32,0xcf,0x9b,0x62,0x17,0x00, - 0xb7,0x35,0xf9,0x3c,0x47,0x61,0x93,0x02,0x24,0x3d, - 0x33,0xb1,0x9d,0xa4,0x3f,0x60,0xd5,0x3d,0x2b,0x62, - 0x37,0x8f,0xa1,0x25,0x43,0x43,0xf0,0xcf,0xb2,0x2e, - 0x92,0xb5,0xb1,0x6c,0xba,0xd7,0xd3,0x58,0x55,0xc7, - 0x09,0xc4,0xb9,0xf9,0xef,0xac,0x0d,0x3b,0x02,0xb3, - 0x21,0x56,0x01,0x13,0xf2,0x77,0xb2,0x0a,0x70,0x5c, - 0x8c,0xa0,0x44,0x24,0xaa,0x2a,0x37,0x03,0x2c,0x7b, - 0xf3,0xbf,0xae,0x42,0x4a,0xcd,0xf3,0x9c,0x06,0xd0, - 0x07,0xeb,0xab,0xd4,0xac,0x95,0x81,0x61,0x29,0xc5, - 0xd2,0x8c,0x2d,0xf0,0x6f,0xec,0x95,0xa9,0xfc,0xbf, - 0xb3,0x7b,0xb0,0x91,0xc3,0x1e,0x1d,0xa3,0x01,0xb3, - 0xdc,0xdc,0x3d,0x0a,0x5f,0x05,0x06,0x58,0x85,0xdb, - 0x29,0x11,0x63,0x91,0x00,0x55,0x4f,0x00,0x74,0xf6, - 0x21,0xf6,0x0f,0x6f,0x05,0xc2,0xcf,0x5c,0xed,0x80, - 0xed,0x54,0x97,0xcd,0x91,0xc0,0xb1,0x4d,0x3c,0xee, - 0x49,0xe0,0x2b,0x58,0x69,0x58,0x56,0x1d,0x3a,0xef, - 0xc7,0xe6,0xd0,0xee,0x8e,0x25,0x6e,0x42,0xfd,0x94, - 0x7c,0xcf,0x3f,0x55,0xdd,0x8b,0x58,0xa5,0xc6,0x57, - 0xb0,0x7f,0x1f,0x21,0x76,0xc4,0xff,0x01,0x51,0x14, - 0x27,0xe2,0x7f,0x7f,0xbc,0x1f,0xdb,0x51,0xf6,0x36, - 0xea,0x4a,0xcb,0x34,0xec,0xf8,0xcb,0x1e,0x84,0x35, - 0x36,0x3a,0x01,0x18,0x1c,0x25,0x22,0x11,0x89,0xe5, - 0x71,0xfc,0x47,0x44,0x76,0xc7,0xbf,0x23,0x97,0xb7, - 0x79,0xb1,0x78,0x3d,0x1e,0xc2,0xfe,0x1c,0x8a,0xee, - 0x76,0x60,0x8a,0x73,0x6d,0x9e,0x09,0x80,0x2f,0x61, - 0x9b,0x5c,0x8d,0x24,0x55,0x8b,0xe5,0x39,0x0d,0xa0, - 0x4a,0xe3,0xff,0x1a,0x39,0x15,0xdb,0xd9,0xf7,0xc8, - 0x72,0x34,0xe0,0x4a,0xd8,0x8e,0xbe,0xc7,0x78,0xec, - 0x78,0x55,0x5a,0x47,0x22,0xa5,0x45,0x75,0x4a,0x00, - 0x74,0x78,0x07,0xbb,0xd1,0xfc,0x4d,0xe0,0xe3,0x7e, - 0x1c,0x21,0x96,0x98,0x36,0x06,0x7e,0xdb,0xc4,0xe3, - 0x7e,0x85,0x9d,0xd3,0x7f,0x30,0xdd,0x70,0xdc,0xae, - 0xc7,0x76,0x29,0xff,0xde,0xc4,0x63,0x2f,0xc1,0x5f, - 0x46,0x28,0xcd,0x79,0x10,0xdb,0x79,0xbe,0x36,0xf0, - 0x71,0xa7,0x45,0x88,0x25,0x96,0x85,0xb1,0x6e,0xda, - 0x1e,0xaf,0x60,0x9d,0xab,0xf3,0x2c,0x2d,0xbc,0x1e, - 0x38,0x3c,0x60,0xfd,0x10,0xac,0x8f,0x80,0x88,0x94, - 0x8b,0x77,0xf7,0x7b,0x00,0x96,0xc0,0x2f,0x83,0x7d, - 0x80,0x39,0x9d,0x6b,0xcb,0xb0,0xfb,0x0f,0x30,0x01, - 0x7f,0x99,0xf3,0x26,0xe4,0x37,0x8e,0x39,0x29,0xf9, - 0x30,0x8e,0xe4,0x1e,0x28,0x79,0x4e,0x64,0xf2,0xbe, - 0xf6,0xd3,0xd8,0x11,0xe4,0xb2,0x9a,0x81,0x8d,0x29, - 0xf7,0x56,0x17,0x9e,0x88,0xff,0x68,0x44,0xb3,0xfa, - 0x62,0xd3,0x07,0xbc,0x3f,0xbb,0x87,0x61,0xc7,0x5a, - 0xa5,0x20,0xea,0x98,0x00,0x00,0x2b,0x99,0x3d,0x0e, - 0xeb,0x9a,0xe9,0xb5,0x36,0xd6,0x10,0xb0,0x0c,0xe6, - 0xc2,0x4a,0xeb,0x43,0xfe,0x7e,0x27,0x01,0x7b,0x62, - 0x73,0x39,0xf3,0xce,0xd0,0x8d,0xc7,0x6e,0xc0,0x42, - 0xb3,0x98,0x73,0x61,0xcd,0xab,0x34,0xdd,0x22,0xae, - 0x29,0xd8,0x87,0x51,0x48,0x46,0xfd,0x4b,0x94,0x67, - 0xf4,0xe4,0x4e,0xd8,0x24,0x03,0x8f,0xc3,0x88,0x5f, - 0xf2,0xef,0x71,0x11,0x61,0x0d,0x56,0x0f,0xc5,0xca, - 0x3f,0x45,0xa4,0x3c,0xae,0xc1,0xff,0x7e,0x53,0x96, - 0x63,0x00,0xde,0x38,0x3f,0xc1,0xbe,0xff,0xb2,0xf0, - 0x7e,0x3e,0xf6,0x23,0xbf,0x0a,0xb9,0xa4,0x1d,0xf4, - 0x07,0x81,0xff,0x24,0xac,0xf9,0x2a,0xad,0x37,0x73, - 0x6e,0xc6,0xaa,0xf8,0x8f,0x1f,0x94,0x79,0xf7,0xbf, - 0xc3,0x5b,0xc0,0x01,0xce,0xb5,0xbd,0xb1,0x23,0xbc, - 0x31,0x47,0x03,0xfe,0x18,0xff,0xf4,0x88,0xcb,0xf0, - 0x37,0x96,0x95,0x8c,0xd4,0x35,0x01,0xd0,0xe1,0x48, - 0xe0,0x89,0x80,0xf5,0x65,0xc9,0xa8,0xff,0x1a,0x1b, - 0xbb,0xe7,0x35,0x09,0xf8,0x3f,0xc2,0x77,0x75,0x63, - 0x6a,0x03,0x7e,0x42,0xf8,0x11,0x86,0xb5,0xf0,0x8f, - 0xe0,0x91,0xe6,0xcd,0xc0,0x7e,0x1e,0x42,0xb2,0xea, - 0xfb,0x45,0x8a,0x25,0x6d,0xde,0x44,0xdf,0x7f,0x80, - 0x3b,0x62,0x06,0x12,0xe8,0x24,0xac,0x69,0x90,0xc7, - 0x92,0x58,0x25,0x94,0x88,0x94,0xc7,0x64,0xfc,0x8d, - 0x61,0x57,0xc3,0x12,0xaf,0x45,0xb6,0x3e,0xb0,0xa6, - 0x73,0xed,0x48,0xec,0xfb,0x2f,0x8b,0xa2,0xf7,0x01, - 0x58,0x94,0xe4,0x3f,0xfb,0x8e,0x89,0x4f,0x8d,0x0c, - 0xc2,0x9a,0x6d,0x67,0x2d,0xa4,0xfc,0xbf,0xac,0xe7, - 0xff,0xbb,0xba,0x09,0xdf,0x38,0x50,0x98,0x35,0x1a, - 0x30,0x86,0x0d,0x81,0x1f,0x3a,0xd7,0xbe,0x8c,0xdd, - 0x6b,0x49,0xc1,0xd4,0x3d,0x01,0x30,0x8d,0xb0,0xd2, - 0xd9,0x9d,0xb0,0xd2,0xba,0x22,0xdb,0x18,0x3b,0xab, - 0xed,0x35,0x0d,0xfb,0xbe,0x8a,0x3a,0xaa,0xed,0xb7, - 0x84,0x8f,0xf9,0x3b,0x19,0x58,0x2a,0xfd,0x50,0xa4, - 0x8b,0xf1,0x84,0x35,0x94,0xdb,0x31,0x56,0x20,0x29, - 0xf3,0x4e,0x3c,0xb8,0x32,0x6a,0x14,0xe1,0xc6,0x61, - 0xff,0xf6,0xbd,0xd4,0x33,0x43,0xa4,0x7c,0x2e,0xc0, - 0xdf,0xf8,0xf3,0x90,0x98,0x81,0xa4,0xc0,0x7b,0xad, - 0xd2,0x86,0x7d,0xdf,0x65,0xf2,0x16,0xfe,0x7e,0x05, - 0xdb,0x61,0xdd,0xd4,0xb3,0xe4,0xb9,0x81,0x7e,0x00, - 0x9b,0x84,0x32,0x2d,0x61,0x5d,0x1e,0xc7,0x00,0xbc, - 0xaf,0xf9,0x1e,0x36,0x52,0xb9,0x2a,0x8e,0xc7,0xff, - 0xef,0x6a,0x0f,0xfc,0x55,0x03,0x5e,0x83,0xb0,0xd2, - 0x7f,0x4f,0x05,0xe1,0x34,0xec,0xdc,0xff,0x84,0x94, - 0x63,0x90,0x14,0xd4,0x3d,0x01,0x00,0x36,0x13,0xdb, - 0xbb,0x8b,0x37,0x17,0x96,0xf9,0x2a,0x32,0x6f,0x43, - 0x8e,0x0e,0xc7,0x50,0xac,0x5d,0xcc,0xee,0x9c,0x43, - 0xd8,0x6c,0xd3,0x39,0x08,0xff,0x73,0x90,0xe6,0xdc, - 0x88,0xbf,0x51,0xe4,0x32,0xf8,0x46,0xaf,0xe5,0x69, - 0x2e,0x6c,0x7c,0xa8,0x47,0x11,0x47,0xd9,0x5c,0x8e, - 0xef,0xc3,0x76,0x0a,0x56,0x05,0x20,0x22,0xe5,0xf2, - 0x12,0x36,0x16,0xcc,0xe3,0xeb,0xd8,0xb8,0xdd,0x22, - 0x1a,0x84,0xdd,0x1c,0x78,0xdc,0x85,0x7d,0xdf,0x65, - 0xe3,0xdd,0x79,0x5e,0x98,0xec,0x8f,0xc8,0x25,0xdd, - 0x40,0x4f,0xc5,0x6e,0x9c,0x27,0x93,0x7c,0xc3,0x99, - 0x75,0x23,0xc0,0xb9,0xb1,0xcd,0x2e,0x8f,0x5b,0x08, - 0x9f,0x5e,0x54,0x64,0x53,0x80,0xbd,0xf0,0xdf,0x54, - 0xff,0x0e,0x1b,0x37,0x99,0x96,0x73,0x80,0xe5,0x9d, - 0x6b,0x7f,0x04,0x3c,0x92,0xe2,0x6b,0x4b,0x8a,0x94, - 0x00,0x30,0x97,0x06,0xac,0xf5,0xbe,0xe9,0xe4,0x61, - 0x27,0xac,0x4b,0xbb,0xd7,0x9f,0x28,0x4f,0x53,0x9d, - 0x23,0x80,0xc7,0x02,0xd6,0xef,0x49,0xd8,0x8c,0x74, - 0x69,0xde,0x15,0x01,0x6b,0x8b,0x9e,0x40,0xf3,0xde, - 0x14,0xcf,0xa0,0x98,0x17,0xa4,0x9f,0x63,0x4d,0x01, - 0x3b,0xb4,0x01,0x63,0xb0,0xa6,0x9a,0x3f,0xc5,0x7e, - 0x2e,0x56,0xc1,0x12,0x1d,0x9b,0x67,0x1e,0x9d,0x88, - 0xa4,0xc1,0xfb,0xb9,0x3d,0x08,0xeb,0xd7,0x52,0x44, - 0x7b,0xe1,0x6f,0x7e,0x57,0x96,0xeb,0x94,0xae,0x42, - 0xce,0x9e,0x67,0x79,0x0c,0xc0,0xd3,0x77,0xe0,0x31, - 0x66,0x8d,0x7e,0x7e,0x20,0x61,0xed,0x0a,0x58,0x82, - 0x3f,0x2b,0x5b,0xe2,0xef,0xd3,0x53,0x85,0xf3,0xff, - 0x5d,0xbd,0x88,0xbf,0x91,0x6f,0x9a,0xa3,0x01,0xb7, - 0xc5,0xfa,0x1e,0x79,0xdc,0x81,0x25,0x0b,0xa4,0xa0, - 0x94,0x00,0x30,0xb7,0xe0,0x1f,0xa3,0xb5,0x56,0xcc, - 0x40,0x5a,0x14,0xd2,0x34,0xef,0x2d,0x6c,0xf7,0xbf, - 0x2c,0x26,0x63,0x67,0xc8,0x93,0x4a,0xd1,0x3a,0x3b, - 0x31,0x52,0x2c,0x32,0xbb,0x90,0x0a,0x92,0xe5,0xa2, - 0x45,0x91,0x0e,0xef,0x05,0xe9,0x78,0xc2,0x46,0xef, - 0x65,0xe9,0x1c,0xac,0xb4,0x76,0x43,0xec,0xfb,0x59, - 0x0e,0x1b,0x63,0x7a,0x32,0xd6,0xe7,0x63,0x34,0xf9, - 0x37,0xfa,0x14,0x91,0xe6,0xdd,0x84,0x4d,0x34,0xf2, - 0x28,0x6a,0x33,0x40,0x6f,0x5c,0xef,0x50,0xde,0x9b, - 0xb8,0x47,0xf1,0x8f,0x35,0xce,0x32,0x01,0xe0,0x99, - 0x3c,0x70,0x7f,0xa7,0xff,0x9f,0xd4,0x08,0x10,0xb2, - 0xad,0x02,0xf0,0xfe,0x59,0x4d,0xa2,0xf8,0x15,0xae, - 0xcd,0xba,0x1c,0xff,0xe6,0xcb,0x06,0xb4,0x3e,0x1a, - 0x70,0x7e,0xfc,0x9b,0xa5,0x1f,0x62,0xd7,0xeb,0x55, - 0xaa,0xbc,0xa8,0x1c,0x25,0x00,0xcc,0x67,0xd8,0x98, - 0x10,0x8f,0x2c,0xb3,0x9c,0x21,0x36,0xc6,0xdf,0x4c, - 0x07,0xe0,0x28,0xec,0xfb,0x2e,0x93,0x67,0x09,0xcb, - 0x28,0xee,0x46,0x71,0xff,0xbe,0xaa,0xe4,0x49,0xfc, - 0x89,0x99,0xa2,0xff,0x7d,0x0c,0x74,0xae,0x2b,0xf2, - 0x7b,0xe7,0x33,0xd8,0x48,0xcc,0xff,0x01,0x13,0x73, - 0x8e,0x45,0x44,0xd2,0x37,0x1d,0x9b,0xfc,0xe1,0xb1, - 0x0e,0xb0,0x6e,0xc4,0x58,0x9a,0xb1,0x1a,0xfe,0x6a, - 0xb0,0x8b,0x28,0x77,0xc2,0xf2,0x66,0xe7,0xba,0xf5, - 0x81,0x05,0x63,0x06,0xd2,0x89,0xe7,0x66,0xbd,0x73, - 0x02,0x20,0xa9,0x02,0x00,0xb2,0xed,0x03,0xe0,0x6d, - 0x60,0x7b,0x17,0xb3,0xaa,0x18,0xaa,0xe8,0x08,0xac, - 0x1a,0xc0,0xa3,0xd5,0xd1,0x80,0x17,0x62,0x47,0x55, - 0x3c,0x0e,0xc0,0x7a,0x2f,0x48,0x81,0x15,0xf9,0x22, - 0x36,0x6b,0xa3,0x9d,0xeb,0x96,0x8a,0x19,0x44,0x0b, - 0xbc,0x65,0x39,0x00,0xf7,0x00,0x7f,0x8b,0x14,0x47, - 0x6c,0xa7,0xe3,0x7f,0x63,0xe9,0x43,0x58,0x43,0x44, - 0x69,0xce,0x0c,0xe0,0x0d,0xe7,0xda,0xc1,0x31,0x03, - 0x49,0xc1,0x14,0xe7,0xba,0x79,0xf0,0x97,0x20,0x8a, - 0x88,0xa4,0xed,0x22,0xfc,0x55,0x48,0x45,0xab,0x02, - 0xf0,0xc6,0x33,0x03,0x7f,0xa2,0xa3,0xa8,0xbc,0xd5, - 0x0b,0xbd,0xc8,0xee,0x26,0x3a,0x29,0x01,0xd0,0xc6, - 0xec,0x09,0x80,0x77,0x81,0x57,0x12,0x1e,0xb3,0x39, - 0xd9,0x34,0xc9,0x5e,0x13,0x7f,0x9f,0x9e,0xb2,0x56, - 0x8e,0x78,0x4d,0xc0,0x8e,0xd2,0x78,0xae,0x5b,0x5a, - 0x19,0x0d,0xb8,0x1f,0xb6,0xa1,0xe6,0xf1,0x3b,0xac, - 0xaa,0x5a,0x0a,0x4e,0x09,0x80,0x59,0xbc,0xe3,0xcc, - 0x8a,0x78,0x03,0x33,0x3f,0xb0,0x7b,0xc0,0xfa,0xd3, - 0x62,0x05,0x92,0x81,0x49,0x84,0x55,0x01,0x8c,0x40, - 0xf3,0xce,0xb3,0xf0,0xa9,0x73,0xdd,0x5c,0x51,0xa3, - 0x68,0x9d,0xb7,0x2a,0xa6,0x17,0x61,0x15,0x37,0x22, - 0x22,0x69,0x7a,0x1b,0xff,0x0d,0xce,0xde,0x58,0x3f, - 0x80,0x22,0x18,0x80,0x7f,0xa4,0xf2,0x4d,0xf8,0x4b, - 0xe8,0x8b,0xea,0x6e,0xfc,0x95,0x58,0x59,0x1c,0x03, - 0x18,0x06,0xac,0x9c,0xb0,0xe6,0x79,0xe0,0xe3,0x2e, - 0xbf,0x76,0x5f,0xc2,0x63,0xe6,0x04,0x86,0x37,0x19, - 0x53,0x08,0xef,0x51,0x83,0x36,0xfc,0xd5,0x17,0x65, - 0xf6,0x38,0xf0,0x7d,0xe7,0xda,0x25,0xb0,0x9d,0xfc, - 0x10,0x4b,0xe2,0x1f,0x3d,0xf8,0x54,0x40,0x2c,0x92, - 0x33,0x25,0x00,0x66,0xf1,0x5e,0xf8,0xf7,0xc1,0xba, - 0xcc,0x17,0xc9,0xff,0xe1,0x8f,0xe9,0xbf,0x14,0xb3, - 0x7b,0x79,0x88,0x0b,0xf0,0xcf,0x3b,0x5f,0x84,0x7c, - 0x66,0xd4,0xd6,0xcd,0x54,0xe7,0xba,0xa2,0x27,0x63, - 0xbc,0x95,0x0c,0x90,0x7d,0xe7,0x63,0x11,0x91,0xce, - 0xbc,0xcd,0xf1,0xe6,0xc6,0x76,0x0a,0x8b,0x60,0x37, - 0x60,0x88,0x73,0x6d,0x59,0x9b,0xff,0x75,0x36,0x19, - 0xff,0x39,0xf4,0xad,0x49,0xa7,0x59,0x5b,0x23,0x9e, - 0xcf,0xad,0x51,0xce,0x5f,0x6b,0xe6,0xb9,0x5b,0xe5, - 0xad,0x92,0x78,0x04,0xab,0x5c,0xa8,0x83,0xdf,0xe1, - 0x4f,0x06,0x7e,0x1d,0xdb,0x18,0xf3,0xe8,0x05,0x5c, - 0x86,0x6f,0x92,0xc8,0xe7,0xf8,0xab,0x11,0xa4,0x00, - 0x94,0x00,0x98,0x65,0x72,0xc0,0xda,0xa2,0x95,0xfe, - 0xee,0x10,0xb0,0xb6,0xec,0xe5,0x74,0x60,0xd9,0xf4, - 0x90,0x19,0xec,0xbb,0xc4,0x0a,0x44,0xfe,0x3f,0xef, - 0xee,0x52,0xd1,0xcf,0xe3,0x7d,0x0a,0xbc,0xef,0x5c, - 0x7b,0x28,0xd9,0x94,0x3c,0x8a,0x88,0x74,0xe7,0x4e, - 0xe0,0x65,0xe7,0xda,0xa2,0x1c,0x03,0xf0,0x1e,0xcb, - 0x7b,0x19,0xfb,0xfe,0xaa,0xc0,0x3b,0x0e,0x70,0x30, - 0xf1,0x27,0x4d,0x79,0x6e,0xd2,0xef,0xee,0xe6,0xd7, - 0xee,0x75,0x3c,0x2e,0xf6,0x11,0x86,0x79,0x81,0x2f, - 0x3b,0xd7,0x7a,0xff,0xcc,0xab,0xe2,0x00,0xac,0xb9, - 0xb7,0xc7,0xef,0xf1,0x8d,0x06,0xfc,0x0e,0xfe,0xaa, - 0x8e,0x63,0xf1,0x1f,0xa5,0x96,0x02,0x50,0x02,0x60, - 0x96,0x39,0x03,0xd6,0x7e,0x1e,0x2d,0x8a,0x70,0xfd, - 0x49,0x1e,0xe7,0xd2,0xe1,0x73,0xe0,0xba,0x88,0xb1, - 0x64,0xe9,0xb2,0x80,0xb5,0x3b,0x46,0x8b,0x42,0x3a, - 0x78,0x9b,0xc3,0x78,0x8f,0x0a,0xe4,0xe9,0x41,0xe7, - 0xba,0x45,0x81,0x33,0x63,0x06,0x22,0x22,0xd2,0x40, - 0x1b,0x56,0x11,0xe7,0xb1,0x21,0xb0,0x46,0xc4,0x58, - 0x3c,0x96,0xc7,0x7f,0x43,0x71,0x01,0xd5,0xe9,0x22, - 0x7e,0x33,0x30,0xd3,0xb9,0x36,0xe6,0x31,0x80,0x39, - 0x80,0xaf,0x26,0xac,0x69,0xa3,0xfb,0x04,0xc0,0x18, - 0x92,0x6f,0x30,0x97,0xc3,0x3f,0x23,0xbe,0x19,0x5b, - 0xe3,0xaf,0x22,0xac,0xfa,0xf9,0xff,0xae,0x3e,0xc1, - 0x8e,0xfa,0x78,0xfa,0x82,0x78,0x46,0x03,0xae,0x0a, - 0x9c,0xe1,0x7c,0xed,0xeb,0xa9,0xc6,0xe6,0x62,0xad, - 0x28,0x01,0x30,0x8b,0xa7,0xc4,0x05,0xac,0x52,0xc0, - 0xfb,0x46,0x9e,0x85,0xaf,0xe0,0x1f,0x5d,0x76,0x0b, - 0xe5,0xeb,0xfc,0xdf,0x93,0x27,0xb0,0xa9,0x00,0x1e, - 0xc3,0x28,0x7e,0xf7,0xf9,0x32,0x9b,0x07,0x58,0xc0, - 0xb9,0xf6,0xcd,0x98,0x81,0xa4,0x24,0x64,0xd7,0xe9, - 0x38,0xc2,0x1a,0x70,0x8a,0x88,0xa4,0xe9,0x4f,0xf8, - 0x2b,0x18,0xf3,0xae,0x02,0xf0,0xee,0xfe,0x4f,0xc6, - 0xbe,0xaf,0xaa,0xf8,0x00,0x9b,0xca,0xe2,0x11,0xb3, - 0x8c,0x7e,0x33,0x92,0x27,0xdd,0x3c,0x4e,0xcf,0x47, - 0x2c,0xbb,0x4b,0x0c,0x74,0x15,0xb3,0x0a,0xc0,0xfb, - 0x67,0xf3,0x06,0x36,0x9d,0xa8,0x6e,0xee,0xc3,0xdf, - 0xe3,0xab,0xd1,0x68,0xc0,0xfe,0x58,0x95,0xad,0xe7, - 0x68,0xf1,0x9b,0xe4,0xff,0xbe,0x22,0x4d,0x50,0x02, - 0x60,0x96,0x25,0x9d,0xeb,0x3e,0x88,0x1a,0x45,0x38, - 0xef,0x28,0x1d,0x80,0xdb,0xa2,0x45,0x91,0x8f,0x90, - 0xef,0x67,0x78,0xac,0x20,0x84,0x8d,0x02,0xd6,0x7a, - 0xcb,0x55,0xf3,0x74,0x2d,0xfe,0xb1,0x86,0x00,0xe7, - 0x01,0x3f,0xc1,0xce,0xcb,0x89,0x88,0x64,0xe9,0x13, - 0xe0,0x1a,0xe7,0xda,0x7d,0x09,0xab,0x76,0x4c,0x53, - 0x3f,0x60,0x7f,0xe7,0xda,0x6b,0xb1,0xef,0xab,0x4a, - 0xbc,0x3b,0xd2,0xab,0x10,0x6f,0xda,0x94,0xe7,0x06, - 0xba,0x51,0xbf,0x82,0xbb,0x52,0x7a,0x8d,0x66,0xf4, - 0xc2,0x3f,0xfe,0xaf,0x6e,0xe5,0xff,0x9d,0xfd,0x14, - 0x9b,0xf4,0xe5,0xd1,0xd3,0x68,0xc0,0xd3,0x80,0xb5, - 0x1c,0x8f,0x9f,0x01,0xec,0x03,0x8c,0x75,0xbe,0x9e, - 0x14,0x88,0x12,0x00,0xb3,0xac,0xe8,0x5c,0x97,0x34, - 0x0a,0x25,0x6b,0x21,0xf3,0x7d,0xbd,0x8d,0x68,0xca, - 0x22,0xe4,0xfb,0x09,0x49,0x94,0x48,0x98,0x90,0x8c, - 0xff,0x63,0xd1,0xa2,0x48,0xcf,0x87,0x84,0x1d,0x95, - 0xe9,0x05,0x9c,0x82,0x35,0xd7,0x5c,0x21,0x4a,0x44, - 0x22,0x22,0x3d,0xf3,0x36,0xcb,0x9b,0x17,0xd8,0x23, - 0x66,0x20,0x0d,0xec,0x08,0x2c,0xe4,0x5c,0x5b,0x85, - 0xe6,0x7f,0x5d,0x85,0x94,0xa4,0xc7,0x3a,0x06,0xe0, - 0xb9,0x39,0xbf,0x3d,0xe1,0xf7,0x92,0x8e,0x65,0x78, - 0xaa,0x0c,0x9a,0xb1,0x0e,0xfe,0x7f,0x3f,0x75,0x2b, - 0xff,0xef,0x6c,0x26,0x76,0x53,0xee,0x69,0x94,0xdd, - 0x1b,0xb8,0x82,0xd9,0x47,0x03,0x6e,0x0c,0x1c,0xef, - 0x7c,0xad,0x33,0x48,0x9e,0x0e,0x21,0x05,0xa5,0x04, - 0x80,0x99,0x13,0x58,0xdd,0xb9,0xf6,0xa5,0x98,0x81, - 0x34,0xc1,0x9b,0x00,0x78,0x8d,0xb0,0x0e,0xe7,0x65, - 0x30,0x0a,0xff,0x1c,0x64,0x8d,0x6c,0x8b,0xa3,0x3f, - 0xb0,0xa7,0x73,0xed,0x58,0xca,0xd3,0x24,0xe6,0xa7, - 0xf8,0xff,0x6d,0x75,0xd8,0x0c,0x78,0x06,0xf8,0x23, - 0x3a,0x72,0x22,0x22,0xd9,0x79,0x08,0x2b,0xdd,0xf6, - 0xc8,0xab,0x5c,0xd7,0xfb,0xba,0x4f,0x60,0xd3,0x8a, - 0xaa,0xe6,0x59,0xfc,0x1b,0x48,0x31,0x12,0x00,0xcb, - 0x92,0x7c,0x3e,0x7f,0x22,0x70,0x7f,0x83,0xdf,0x7f, - 0x0f,0xfb,0xfb,0x69,0x64,0x00,0xb0,0x79,0x40,0x5c, - 0x5e,0xde,0xca,0x82,0xcf,0xf0,0xef,0x80,0x57,0xd5, - 0x3b,0x58,0xa7,0x7f,0x4f,0x0f,0x8d,0x25,0x99,0x35, - 0x1a,0x70,0x2e,0xac,0xbf,0x96,0xe7,0xde,0xf0,0x3f, - 0x94,0x7b,0xa4,0x78,0xed,0x29,0x01,0x60,0x42,0x46, - 0xaf,0x78,0x1b,0x84,0x65,0x61,0x30,0xb0,0xb4,0x73, - 0xed,0x53,0x31,0x03,0xc9,0xc9,0xe7,0xf8,0x4b,0xca, - 0x57,0x47,0x25,0xda,0x31,0x1c,0x84,0xbf,0x01,0xe0, - 0xad,0x84,0xdf,0x54,0xe7,0x65,0x34,0xf0,0x9b,0x26, - 0x1e,0xd7,0x0f,0xbb,0xd0,0x7d,0x09,0xfb,0x7e,0xf7, - 0x63,0xf6,0xec,0xba,0x88,0x48,0x0c,0xde,0x5d,0xf3, - 0x8d,0x81,0x95,0x62,0x06,0xd2,0x8d,0x25,0xb1,0xeb, - 0x2c,0x8f,0x2a,0xee,0xfe,0x77,0xf0,0x96,0xa6,0x6f, - 0x4e,0xfa,0xbb,0xe8,0x9e,0x1b,0xe8,0x7b,0x48,0x1e, - 0xe9,0xeb,0x39,0x7a,0x19,0xe3,0x18,0x80,0xb7,0xd2, - 0xf0,0x36,0xfc,0x63,0x89,0xab,0xec,0x16,0xfc,0xd7, - 0x30,0x1d,0xa3,0x01,0x7f,0x8b,0x6f,0xf3,0xe2,0x53, - 0xfc,0x0d,0x07,0xa5,0xa0,0x94,0x00,0x30,0x7b,0x07, - 0xac,0x6d,0x94,0x1d,0xcd,0xda,0xb0,0x80,0xb5,0x55, - 0x4c,0x00,0x80,0xbf,0xd1,0xcb,0x40,0x60,0x91,0x98, - 0x81,0xd4,0xd0,0x02,0xc0,0xe9,0x01,0xeb,0xaf,0x8d, - 0x15,0x48,0x24,0x27,0x03,0x4f,0x37,0xf9,0xd8,0xde, - 0xc0,0xd7,0xb0,0x6c,0xfa,0x07,0x58,0xf3,0xa4,0xe3, - 0xb1,0x4a,0x14,0x25,0xa2,0x44,0x24,0x6d,0x57,0x03, - 0xe3,0x9d,0x6b,0xb3,0xae,0x02,0x38,0x10,0xdf,0xf5, - 0xe6,0x78,0xe0,0xaa,0xc8,0xb1,0xe4,0xc9,0x9b,0x00, - 0x18,0x40,0x72,0xb7,0xfe,0x50,0x9e,0x1b,0x68,0xcf, - 0xcd,0xfd,0xad,0x29,0xbd,0x56,0x88,0xf9,0xf0,0x1f, - 0xe3,0xac,0xf3,0xf9,0xff,0xae,0x4e,0x04,0x1e,0x75, - 0xae,0x3d,0x1f,0xfb,0x39,0xf5,0x38,0x04,0x78,0xbd, - 0xa9,0x88,0xa4,0x30,0x94,0x00,0xb0,0x66,0x2b,0xbb, - 0x3a,0xd7,0xbe,0x40,0xb1,0x8e,0x00,0x2c,0x11,0xb0, - 0xf6,0xb9,0x68,0x51,0xe4,0xeb,0x99,0x80,0xb5,0x2a, - 0xcb,0x4e,0x4f,0x1f,0xac,0x4b,0xec,0xfc,0xce,0xf5, - 0xef,0x60,0xa3,0x90,0xca,0x64,0x12,0xb0,0x33,0xbe, - 0xb3,0x74,0x8d,0xf4,0xc3,0x76,0x74,0x7e,0x81,0x95, - 0x4f,0xbe,0x8f,0xf5,0x18,0xf8,0x36,0x36,0x96,0x4b, - 0xef,0xc3,0x22,0xd2,0xaa,0x89,0xc0,0xe5,0xce,0xb5, - 0xfb,0xe1,0xeb,0xf0,0x9d,0x86,0xde,0xf8,0x6f,0x2c, - 0xae,0xc0,0xbe,0x8f,0xaa,0x1a,0x85,0x7f,0x14,0x6e, - 0x9a,0xc7,0x00,0xe6,0xc4,0x57,0x96,0xef,0x49,0x00, - 0xfc,0x87,0xe4,0x69,0x52,0x4b,0x93,0x6e,0x95,0xc9, - 0xd7,0xf0,0x7d,0x4e,0xce,0xc0,0x76,0xbe,0xc5,0x4c, - 0xc5,0x8e,0x68,0x7a,0xa6,0x7f,0x0d,0x70,0x3e,0xe7, - 0xa5,0x94,0x6f,0x33,0x47,0xba,0xa1,0x0b,0x4f,0xf8, - 0x25,0xfe,0xf2,0xff,0x3f,0xc7,0x0c,0xa4,0x09,0x8b, - 0x07,0xac,0x7d,0x3b,0x5a,0x14,0xf9,0x4a,0x9a,0x4b, - 0xdb,0x99,0x77,0xd2,0x83,0x34,0xd6,0x07,0x1b,0xd1, - 0xe4,0x2d,0xe9,0x04,0x38,0x1b,0x98,0x1e,0x27,0x9c, - 0xa8,0x5e,0xc1,0x76,0x62,0x5a,0x4d,0x02,0x74,0xb6, - 0x00,0xb0,0x3b,0x70,0x2e,0x56,0xc1,0xf2,0x31,0xf0, - 0x4f,0xac,0xe2,0x60,0x0b,0xec,0x1c,0x9e,0x88,0x48, - 0xa8,0x0b,0x9c,0xeb,0x86,0x02,0xbb,0xc4,0x0c,0xa4, - 0x93,0x6d,0xf0,0x6f,0x56,0x78,0xe3,0x2f,0xab,0x69, - 0xf8,0x76,0xd0,0x21,0xdd,0x04,0xc0,0xe6,0x24,0xdf, - 0xe0,0xbd,0x0a,0xbc,0xe8,0x78,0xae,0x69,0x64,0x3f, - 0x0e,0xd0,0xfb,0x5c,0x0f,0x62,0x9f,0xa7,0x32,0xcb, - 0x18,0xd2,0x1b,0x55,0xfc,0x22,0x70,0x74,0x4a,0xcf, - 0x25,0x39,0xab,0x7b,0x02,0x60,0x7f,0xfc,0xbb,0xff, - 0xd3,0xb1,0x72,0xde,0x22,0x09,0x49,0x00,0xbc,0x13, - 0x2d,0x8a,0x7c,0x85,0x7c,0x5f,0x43,0xa3,0x45,0x51, - 0x1f,0x4b,0x60,0xbb,0x04,0xdf,0x0c,0x78,0xcc,0x9b, - 0x94,0xfb,0xc2,0xee,0x69,0x6c,0xd4,0xe1,0xb3,0x91, - 0x9e,0x7f,0x5e,0xec,0x02,0xe7,0x34,0xe0,0x4e,0x60, - 0x1c,0xf0,0x08,0x76,0x7e,0x6f,0x0f,0x74,0x74,0x45, - 0x44,0x7c,0x9e,0xc5,0x76,0x99,0x3d,0xb2,0x3a,0x06, - 0xe0,0x7d,0x9d,0xfb,0x08,0xab,0xe8,0x2b,0x2b,0x6f, - 0x87,0xfa,0x25,0xf0,0x37,0xa7,0x4e,0x92,0x56,0xf9, - 0x7f,0x07,0x4f,0x12,0x23,0xad,0x3e,0x00,0xbd,0xb0, - 0x0a,0x00,0x8f,0x3a,0x77,0xff,0x6f,0xe4,0x6a,0x6c, - 0xd3,0xa6,0x15,0x53,0x81,0xbd,0xa8,0x76,0x85,0x4e, - 0xad,0xd4,0x39,0x01,0xb0,0x35,0x61,0x37,0x25,0x57, - 0x63,0x9d,0xf4,0x8b,0x64,0x70,0xc0,0x5a,0x25,0x00, - 0xfc,0xe5,0xea,0xf2,0x45,0xbd,0x81,0x03,0xb0,0x9b, - 0xe1,0x2d,0x02,0x1f,0x7b,0x04,0x30,0x39,0xf5,0x88, - 0xb2,0xf5,0x32,0xf0,0x25,0xac,0x5b,0xae,0xa7,0xb3, - 0x6e,0x2b,0xfa,0x60,0xd3,0x3d,0x8e,0xc1,0x4a,0xed, - 0xde,0xc1,0xb2,0xf8,0x97,0x61,0xa5,0xbb,0x8b,0x46, - 0x7e,0x7d,0x11,0x29,0x2f,0x6f,0x13,0xbd,0xcd,0x81, - 0xe5,0x62,0x06,0x82,0x35,0x88,0xdd,0xc1,0xb9,0xb6, - 0xca,0xcd,0xff,0x3a,0xfb,0x17,0xfe,0x6a,0xb8,0xb4, - 0xaa,0x00,0xf2,0x48,0x00,0x6c,0x02,0x0c,0x0a,0x78, - 0xce,0x9e,0xac,0x07,0x2c,0xe8,0x5c,0xab,0xf3,0xff, - 0x3d,0x3b,0x0a,0x78,0xbe,0x85,0xc7,0x9f,0x88,0x7f, - 0xd2,0x88,0x94,0x40,0x5d,0x13,0x00,0x07,0x00,0x7f, - 0xc7,0x7f,0xe6,0x65,0x0a,0x36,0x16,0xac,0x68,0xe6, - 0x74,0xae,0x9b,0x89,0x75,0xcc,0xaf,0x22,0x6f,0xd3, - 0x23,0x50,0x37,0xf6,0x66,0x2c,0x04,0xfc,0x10,0x2b, - 0x85,0xbf,0x94,0xb0,0xa4,0x13,0xc0,0x25,0x94,0xef, - 0xec,0x7f,0x4f,0x26,0x60,0xa5,0x74,0x9b,0x03,0x8f, - 0x65,0xfc,0xda,0xcb,0x60,0x37,0xff,0x97,0x61,0xc7, - 0x79,0x9e,0xc3,0x8e,0x55,0x6c,0x90,0x71,0x1c,0x22, - 0x52,0x6c,0x37,0x60,0x8d,0x47,0x93,0xf4,0x02,0x0e, - 0x8e,0x1c,0xcb,0x08,0x7c,0x47,0x2c,0x3f,0x04,0xae, - 0x8f,0x1b,0x4a,0x61,0x8c,0xc5,0xdf,0x4c,0x3a,0x8d, - 0x04,0xc0,0xf2,0xd8,0x08,0xc0,0x46,0xa6,0x01,0x77, - 0x05,0x3c,0xe7,0x6b,0x58,0x4f,0xac,0x46,0xe6,0x20, - 0x7c,0xb3,0xa0,0x3b,0xde,0xf2,0xff,0x97,0x68,0xed, - 0x06,0xb7,0xea,0x26,0x62,0xfd,0x00,0x9a,0xd9,0x8c, - 0xb9,0x95,0xe6,0xa6,0x22,0x49,0x81,0xd5,0x2d,0x01, - 0xb0,0x34,0x70,0x23,0x76,0x23,0xe3,0xbd,0xf9,0x07, - 0xf8,0x19,0xc5,0x6a,0xfe,0xd7,0xc1,0x9b,0x00,0x98, - 0x12,0x35,0x8a,0x7c,0x85,0xbc,0x99,0x65,0xd5,0xf4, - 0xa8,0x6c,0xe6,0xc4,0xca,0xcc,0x57,0xc2,0x4a,0xdd, - 0x0f,0xc4,0xaa,0x63,0x1e,0xc7,0x7a,0x2c,0x9c,0x41, - 0xd8,0xc4,0x89,0x0e,0x8f,0x00,0x47,0xa6,0x14,0x63, - 0x91,0xdc,0x8b,0xed,0x4a,0xec,0x43,0x7e,0x25,0xab, - 0x2b,0x03,0xdf,0xc3,0xe6,0x7f,0xbf,0x8e,0x35,0x18, - 0x4c,0x9a,0xf1,0x2c,0x22,0xd5,0x37,0x15,0x4b,0xbc, - 0x7a,0x8c,0xc0,0x9a,0x94,0xc6,0x10,0x92,0x60,0xb8, - 0x84,0x7a,0x8d,0x6e,0xf3,0x96,0xaa,0x6f,0x04,0x0c, - 0x69,0xf1,0xb5,0x3c,0x37,0xd0,0x0f,0xe2,0x6b,0x14, - 0xd7,0x59,0x56,0xd3,0x00,0xbc,0xcf,0xa1,0xf2,0xff, - 0x64,0x4f,0x01,0xdf,0x0d,0x7c,0xcc,0x4c,0xe0,0x50, - 0xe2,0x57,0x3e,0x4a,0xc6,0xea,0x90,0x00,0xe8,0x83, - 0x65,0x21,0xaf,0xc2,0x1a,0x58,0xec,0x1c,0xf8,0xf8, - 0xc7,0x80,0x9f,0xa7,0x1d,0x54,0x4a,0xbc,0x09,0x80, - 0xb2,0x97,0x5f,0x37,0x12,0xf2,0xbd,0xf5,0x8f,0x16, - 0x45,0x1c,0x7b,0x62,0x6f,0xba,0xb1,0xbf,0x3e,0xc7, - 0xca,0xcc,0x47,0x63,0x1d,0x7e,0x2f,0xc1,0xde,0xf0, - 0xd7,0xc2,0xdf,0x20,0xb3,0xab,0xe7,0xb1,0x33,0x80, - 0x55,0xfd,0xb7,0xd7,0x86,0x1d,0x0b,0x5a,0x03,0xdb, - 0xa5,0xb9,0x15,0xfb,0xa0,0xcc,0xc3,0x92,0xd8,0x88, - 0xc1,0x17,0xb0,0x5d,0x9c,0x5d,0xd1,0xa8,0x41,0x91, - 0x3a,0xfb,0x23,0xbe,0xf7,0xa3,0x85,0x80,0xff,0x8b, - 0x14,0xc3,0xe6,0x24,0xef,0x3c,0x83,0xc5,0x79,0x61, - 0xa4,0x18,0x8a,0xca,0x5b,0xaa,0xde,0x07,0xff,0xf9, - 0xf7,0x9e,0x78,0x6e,0xa0,0xbd,0x8d,0x09,0x43,0x1f, - 0xd3,0x6a,0x02,0x60,0x7e,0xfc,0x55,0x6e,0x2a,0xff, - 0x8f,0xa3,0x37,0x70,0x6c,0xde,0x41,0x48,0xfa,0xaa, - 0x92,0x00,0xe8,0x83,0xcd,0x79,0x5f,0x18,0xbb,0x69, - 0xd9,0x09,0x3b,0xaf,0x72,0x23,0x56,0x0a,0x77,0x27, - 0xb0,0x37,0xe1,0x37,0x33,0x1f,0x61,0x17,0xd3,0x45, - 0xdd,0x41,0xf7,0x66,0xee,0xcb,0xd8,0x7d,0xdd,0x6b, - 0x5a,0xc0,0xda,0x3e,0xd1,0xa2,0x90,0xce,0x1e,0xc7, - 0x2e,0xfe,0x3e,0xcc,0x3b,0x90,0x0c,0xb4,0x61,0x1d, - 0xfc,0xb7,0xc5,0xaa,0x24,0xbe,0x8f,0x55,0x3e,0xe4, - 0xa1,0x17,0x36,0xb1,0xe0,0x7a,0x2c,0xd3,0xbf,0x3b, - 0x4a,0x04,0x88,0xd4,0xd1,0x6b,0xd8,0x59,0x73,0x8f, - 0x58,0xcd,0x00,0xbd,0xbb,0xff,0xb7,0x52,0xbc,0xfe, - 0x4a,0xb1,0xbd,0x8c,0x25,0xdc,0x3d,0x5a,0x39,0x06, - 0x30,0x27,0x30,0xdc,0xb1,0x2e,0xe4,0xfc,0x7f,0x87, - 0x7b,0x49,0x4e,0xf0,0x0f,0x03,0x56,0x69,0xe2,0xb9, - 0x3b,0x78,0xc7,0xff,0x7d,0x82,0xff,0x58,0x45,0x9d, - 0xad,0x89,0x4d,0x3e,0x0b,0x75,0x2c,0xb0,0x55,0xca, - 0xb1,0x48,0xce,0xb2,0x4e,0x00,0xec,0x46,0x9c,0x1d, - 0xcc,0xe9,0xd8,0xf9,0x96,0x77,0xb1,0x9b,0x8f,0xbf, - 0x61,0x65,0xfb,0x3b,0x03,0xf3,0x35,0x19,0xeb,0x78, - 0x60,0x47,0xac,0xbc,0xb6,0xa8,0xbc,0x37,0xbf,0x55, - 0x2e,0x7d,0x0f,0x39,0xca,0x51,0xd5,0xdd,0xe8,0x22, - 0xb9,0x0e,0xd8,0x14,0x78,0x2f,0xef,0x40,0x72,0xf0, - 0x16,0x76,0x2e,0x7f,0x7d,0x6c,0x57,0xfe,0x70,0x6c, - 0x57,0x62,0x42,0x0e,0xb1,0xac,0x86,0xfd,0x5d,0x3c, - 0x8c,0x55,0x29,0x88,0x48,0xbd,0x78,0x9b,0xea,0x6d, - 0x45,0x73,0x47,0xbc,0x1a,0x99,0x1f,0xff,0x84,0xa5, - 0xba,0x34,0xff,0xeb,0xca,0xbb,0x63,0xbd,0x0d,0xcd, - 0x5f,0xab,0x0f,0x27,0xf9,0x1a,0xe9,0x7d,0x9a,0x6b, - 0xee,0x36,0x09,0x4b,0x02,0x24,0x69,0x65,0x1a,0x80, - 0xb7,0x82,0xe0,0x5f,0xc0,0x8c,0x16,0x5e,0xa7,0x0e, - 0x06,0x01,0x7f,0x21,0xec,0x9a,0xb9,0x43,0x2f,0xac, - 0xff,0x90,0x1a,0x69,0x57,0x48,0x55,0x2a,0x00,0xd2, - 0xf6,0x29,0xf6,0xa6,0xfb,0xdf,0xbc,0x03,0x49,0xe0, - 0x4d,0x00,0x78,0x8f,0x0a,0x94,0x91,0x12,0x00,0xc5, - 0xf0,0x09,0x70,0x10,0xf0,0x75,0xf2,0xb9,0xe1,0x2d, - 0x9a,0x8e,0xd1,0x87,0xff,0x87,0x25,0x21,0x37,0x01, - 0x7e,0x8c,0x95,0xe8,0x67,0x39,0x46,0x67,0x5d,0xac, - 0x22,0xe1,0xc7,0x34,0x7f,0x9c,0x43,0x44,0xca,0xe7, - 0x5f,0xf8,0x36,0x30,0x7a,0x93,0x7e,0x33,0xc0,0x6f, - 0xe2,0xdb,0x78,0x78,0x1d,0xab,0xa0,0xaa,0x23,0xef, - 0x99,0xf5,0xa1,0xc0,0x86,0x4d,0xbe,0x86,0xe7,0x06, - 0xfa,0x76,0x9a,0x3f,0xdf,0xed,0xa9,0x1c,0x68,0xf6, - 0x18,0x40,0x6f,0x34,0xfe,0x2f,0x4d,0xe7,0x62,0x7d, - 0x9e,0x9a,0xb5,0x08,0x70,0x71,0x4a,0xb1,0x48,0x01, - 0x28,0x01,0xf0,0x45,0x2f,0x62,0xe3,0xbe,0x1e,0xcc, - 0x3b,0x10,0x07,0xef,0x8d,0x44,0x3f,0xaa,0xfb,0x77, - 0x1d,0x52,0xdd,0xa0,0x04,0x40,0xfa,0x26,0x01,0xbf, - 0x05,0x56,0xc0,0x9a,0x6b,0xca,0x17,0x4d,0xc3,0xca, - 0x13,0x4f,0x07,0xb6,0xc4,0xa6,0x51,0xac,0x0f,0x1c, - 0x0d,0x5c,0x83,0x55,0x0e,0xc4,0xd4,0x0f,0x38,0x15, - 0x9b,0x7c,0x52,0xe5,0x64,0xa0,0x88,0xcc,0x12,0x72, - 0xb6,0xfe,0x00,0xd2,0x3d,0x22,0xe7,0x4d,0x28,0x78, - 0x7b,0x15,0x54,0xd1,0x83,0xd8,0x31,0x53,0x8f,0x66, - 0x8f,0x01,0x78,0x6e,0xbe,0xbd,0x47,0x45,0xba,0xe3, - 0xe9,0x03,0xb0,0x31,0x30,0x77,0x13,0xcf,0xbd,0x1e, - 0xb0,0x80,0x63,0xdd,0x34,0x67,0x1c,0x75,0xb6,0x0f, - 0xd6,0xf0,0xb3,0x55,0x3b,0x03,0x87,0xa4,0xf0,0x3c, - 0x52,0x00,0x55,0xbd,0x29,0x6c,0xd6,0x55,0x58,0xc3, - 0x91,0xb2,0x8c,0x12,0x19,0x1b,0xb0,0x76,0x68,0xb4, - 0x28,0xf2,0x15,0x72,0xc4,0x23,0x64,0x64,0xa0,0x34, - 0xf6,0x32,0x70,0x12,0x56,0x3a,0x7a,0x2c,0xf0,0x71, - 0xbe,0xe1,0x94,0xca,0x74,0x6c,0x57,0xfe,0xf7,0xc0, - 0x5e,0xc0,0x12,0xd8,0x91,0x81,0x6f,0x60,0x59,0xfa, - 0x27,0x88,0x73,0x51,0xbc,0x1d,0xb6,0x63,0x13,0x3a, - 0xca,0x51,0x44,0xca,0xc9,0xdb,0x5d,0x7f,0x31,0x5a, - 0x2b,0xd5,0xee,0x6c,0x23,0x60,0x55,0xc7,0xba,0x69, - 0xf8,0xa7,0x15,0x54,0xd1,0x4c,0xe0,0x16,0xe7,0xda, - 0x66,0x12,0x00,0xcb,0x02,0xcb,0x39,0x62,0xb8,0xbd, - 0x89,0xe7,0xee,0x30,0x9a,0xe4,0x2a,0x93,0xfe,0x58, - 0xe2,0x3b,0x94,0xb7,0x72,0xe0,0x5e,0x74,0x6d,0xd7, - 0xc8,0x72,0xa4,0x7b,0xcc,0xe6,0xd7,0xd8,0x86,0x8f, - 0x94,0x9c,0x12,0x00,0xe6,0x25,0xec,0xc3,0x6f,0x5f, - 0xac,0xfc,0xbf,0x2c,0x42,0x6e,0xba,0x16,0x8b,0x16, - 0x45,0xbe,0x16,0x09,0x58,0xfb,0x6e,0xb4,0x28,0xaa, - 0x6f,0x2c,0x70,0x07,0xf0,0x23,0x60,0x1d,0x6c,0xe4, - 0xdc,0x19,0xd4,0xa3,0xd1,0x5f,0x16,0xde,0xc4,0xce, - 0xe7,0x1d,0x05,0xac,0x8d,0x8d,0x7e,0xda,0x16,0xfb, - 0x33,0x1e,0x45,0x7a,0x23,0xb2,0x36,0x01,0xfe,0x8a, - 0xde,0xfb,0x45,0xea,0xe0,0x03,0xe0,0x06,0xe7,0xda, - 0xb4,0x76,0xf6,0xbc,0x4d,0x05,0x6f,0xc0,0xce,0x9f, - 0xd7,0x99,0xb7,0x74,0x7d,0x2d,0xc2,0xaf,0xe1,0xb6, - 0x71,0xac,0x79,0x84,0xd6,0x93,0xf7,0xb1,0x8e,0x01, - 0x68,0xfc,0x5f,0xeb,0xfa,0x63,0x55,0x86,0x9e,0x0a, - 0x8c,0x51,0xf8,0x12,0x29,0x03,0xb1,0x09,0x48,0xb1, - 0xc6,0x87,0x4a,0x46,0xea,0x7e,0x11,0xf8,0x02,0x36, - 0xf3,0x7c,0x65,0x5a,0x2b,0x83,0xca,0x4b,0x48,0xa3, - 0xb5,0x45,0xa3,0x45,0x91,0x2f,0x25,0x00,0xe2,0x9b, - 0x89,0x35,0x8a,0xda,0x1a,0x38,0x93,0xe6,0x1a,0x06, - 0x49,0x98,0xf1,0x58,0x59,0xe3,0x49,0xc0,0x66,0x58, - 0x42,0x60,0x1b,0x2c,0x93,0xff,0x4e,0x8b,0xcf,0xbd, - 0x25,0x96,0xc8,0x11,0x91,0xea,0xf3,0xee,0xfe,0x6d, - 0x4b,0xeb,0x1b,0x05,0x73,0x63,0x7d,0x60,0x3c,0xea, - 0xda,0xfc,0xaf,0xb3,0xdb,0xf1,0x4f,0x99,0x0a,0xad, - 0xd0,0x88,0x35,0xfe,0xaf,0x99,0xe7,0x08,0x4d,0x00, - 0xcc,0x8f,0x1d,0x93,0xf3,0xd0,0xf8,0xbf,0x9e,0x9d, - 0x8d,0x6d,0xd8,0x24,0xf9,0x10,0xfb,0xb9,0x3d,0xda, - 0xf9,0xbc,0xeb,0x62,0x47,0x1a,0xa5,0xc4,0xea,0xd8, - 0x14,0xea,0x3d,0xac,0xec,0x6a,0x24,0xe5,0x1f,0x1b, - 0x12,0x32,0xa1,0x60,0xe9,0x68,0x51,0xe4,0x6b,0xf1, - 0x80,0xb5,0xad,0xde,0x38,0x65,0xed,0x1e,0x6c,0x07, - 0x38,0x96,0x79,0xb1,0x63,0x2f,0xfd,0x13,0xd6,0xf5, - 0xc6,0xce,0xf7,0xaf,0x47,0xd8,0xd8,0x45,0x49,0xcf, - 0xe7,0xd8,0x4e,0xcb,0x6d,0xc0,0x91,0x58,0x42,0xe6, - 0x60,0x60,0x17,0x9a,0x3b,0xbb,0x7b,0x0a,0x56,0xd1, - 0x51,0xf4,0x46,0xa7,0x22,0xd2,0x9a,0x51,0xc0,0x73, - 0x24,0x8f,0x63,0xeb,0x83,0x6d,0x88,0xb4,0x72,0x61, - 0xbf,0x37,0xd6,0x6d,0x3c,0xc9,0x73,0xf8,0x3a,0xc8, - 0x57,0xdd,0x04,0xe0,0xdf,0xf8,0x76,0xeb,0xb7,0x07, - 0x2e,0x72,0x3e,0xef,0x1c,0xd8,0x28,0xde,0x24,0x69, - 0x24,0x00,0xee,0xc2,0xae,0x0b,0x1a,0xed,0x08,0x2f, - 0x0e,0xac,0x0e,0x3c,0xed,0x7c,0xce,0xad,0xf1,0x6d, - 0x50,0x3e,0x4d,0xfd,0x46,0x48,0x7a,0xed,0x88,0xff, - 0x86,0xfe,0x60,0xac,0x1a,0xe7,0x32,0x6c,0x8c,0xfa, - 0x2e,0x8e,0xc7,0x1c,0x8f,0xfd,0xfb,0xb9,0xa7,0x99, - 0xe0,0x24,0x7f,0x55,0x4f,0x00,0x7c,0x06,0xbc,0x82, - 0x9d,0xa9,0x7d,0x1c,0xfb,0x20,0x7c,0x82,0xe6,0x3b, - 0x9e,0x16,0xcd,0x6b,0x01,0x6b,0xab,0x3a,0x0a,0x6c, - 0x35,0xe7,0xba,0x36,0xe0,0xd5,0x98,0x81,0x44,0xf0, - 0x3e,0x70,0x67,0xe4,0xd7,0x58,0x1d,0xeb,0x10,0x9f, - 0x64,0x0d,0xe0,0x64,0xe7,0x5a,0x89,0x6b,0x26,0xb3, - 0x92,0x01,0x4b,0x63,0x37,0xf3,0xdf,0x24,0xac,0xa2, - 0xab,0x0f,0x70,0x1a,0x76,0xa1,0x25,0x22,0xd5,0x76, - 0x3e,0xd6,0x73,0x24,0xc9,0x41,0x58,0xd2,0xb9,0xd9, - 0x1e,0x24,0xde,0xf2,0xff,0x0b,0x9a,0x7c,0xfe,0x2a, - 0xfa,0x07,0xbe,0x04,0xc0,0x96,0xd8,0x8d,0xbd,0xa7, - 0x62,0x60,0x13,0xac,0x54,0xbb,0x91,0x4f,0x80,0xff, - 0x39,0x9e,0x2b,0xc9,0x78,0xac,0xa1,0xe1,0xa6,0x09, - 0xeb,0xb6,0xc3,0x9f,0x00,0xf0,0x56,0x0c,0x68,0xf7, - 0xbf,0x7b,0x8b,0x03,0x7f,0x72,0xae,0xfd,0x23,0xb3, - 0x1f,0xa3,0x38,0x04,0xf8,0x32,0xb0,0x50,0xc2,0xe3, - 0x7a,0x03,0x97,0x03,0x6b,0x12,0xd6,0x8f,0x4c,0x0a, - 0x22,0xeb,0x04,0xc0,0x7d,0xd8,0x45,0x67,0x0c,0x33, - 0xb1,0x37,0xc6,0xc9,0x58,0x56,0xf5,0x1d,0x2c,0x01, - 0x50,0x65,0xaf,0x61,0x5d,0xd8,0x3d,0x9d,0xbd,0xeb, - 0x9e,0x00,0x78,0x1d,0x35,0x8a,0xe9,0xce,0x99,0x58, - 0xe9,0x97,0x67,0x3c,0xcc,0x0f,0x80,0x1b,0xd1,0x11, - 0x80,0x22,0x79,0x15,0xeb,0xee,0xfb,0x07,0xe0,0x0a, - 0x60,0xc5,0x80,0xc7,0x6e,0x85,0x95,0x59,0x3e,0x9c, - 0x7e,0x58,0x22,0x85,0xd2,0x2b,0x60,0x6d,0x55,0x36, - 0x08,0x3a,0xbb,0x1c,0xf8,0x39,0xc9,0xbb,0xf3,0xc3, - 0xb0,0xa4,0x60,0x33,0x3b,0xc3,0x6b,0x63,0xa5,0xc1, - 0x49,0x3e,0x6f,0x8f,0x47,0xcc,0x3f,0xb0,0xf7,0xef, - 0x24,0x83,0xb0,0xe3,0x60,0x9e,0xa6,0x7d,0x9e,0x84, - 0xc2,0x1d,0xc0,0x0c,0xc7,0x3a,0x8f,0x5b,0x49,0x4e, - 0x00,0x6c,0x0b,0x9c,0xe5,0x78,0xae,0x5e,0x68,0xfc, - 0x5f,0x2b,0xfa,0x60,0x95,0x9d,0xf3,0x3b,0xd6,0xbe, - 0x08,0x7c,0xa7,0xcb,0xaf,0x7d,0x84,0x25,0xf2,0x3c, - 0x7f,0xb6,0x4b,0x60,0xc9,0xbc,0x3d,0x43,0x02,0x94, - 0x62,0xc8,0x3a,0x01,0xf0,0x01,0xf1,0x77,0x34,0xeb, - 0x64,0x26,0x56,0x4a,0xe7,0xf9,0xd0,0x5d,0x1d,0x2b, - 0xf5,0x4e,0xab,0x99,0x58,0x11,0x0c,0xc4,0x3a,0xdd, - 0x7a,0x78,0x33,0xcf,0x75,0x33,0x05,0x38,0x14,0x2b, - 0xe3,0x4a,0xba,0x48,0xee,0x8b,0x1d,0x9d,0xd1,0x51, - 0x80,0xe2,0x79,0x18,0xfb,0x7b,0xb9,0x01,0xbb,0xb1, - 0xf7,0x3a,0x1e,0xff,0x99,0x5d,0x91,0xae,0xd2,0x1c, - 0x1d,0x17,0x53,0xc8,0xf8,0x4b,0xef,0x99,0xec,0x32, - 0x19,0x8f,0x35,0xee,0xf2,0xec,0xd0,0x7f,0x8b,0xe6, - 0x12,0x00,0xde,0xdd,0xff,0xab,0x29,0x57,0xb3,0xe5, - 0xd8,0xde,0xc4,0x2a,0x53,0xd7,0x72,0xac,0xdd,0x1e, - 0x5f,0x02,0xc0,0x73,0x03,0x9d,0xe6,0xe8,0xbc,0x5b, - 0xb1,0xcd,0x84,0x46,0xbe,0x8c,0x25,0x31,0x92,0xc6, - 0x57,0xaf,0x03,0x2c,0xe8,0x78,0xcd,0xf7,0x49,0xa7, - 0x82,0xa1,0x6a,0x4e,0x21,0x39,0x19,0x03,0x36,0x8d, - 0x68,0x5f,0xba,0xff,0xfb,0xf8,0x07,0x36,0xa1,0xe3, - 0x20,0xc7,0xf3,0x7c,0x1d,0xeb,0xa1,0x36,0xd2,0x19, - 0x9f,0x14,0x44,0xdd,0x9b,0x00,0x56,0x81,0x77,0x37, - 0x76,0x20,0x36,0x9e,0xa7,0x4a,0x36,0xc6,0x7f,0x01, - 0xfa,0x64,0xcc,0x40,0x4a,0x6e,0x14,0x76,0xc6,0xdf, - 0x63,0x0d,0xac,0x31,0x9d,0x14,0xcf,0x04,0x60,0x07, - 0xec,0xef,0xd3,0x6b,0x7b,0x92,0x4b,0x45,0xa5,0x5e, - 0x42,0x6e,0x80,0x07,0x44,0x8b,0x22,0x5d,0x21,0x09, - 0x80,0xaa,0x56,0x8a,0x79,0x9b,0xee,0xed,0x48,0x72, - 0xf9,0x6f,0x57,0x03,0xb1,0xf3,0xff,0x69,0xc6,0x51, - 0x27,0xde,0x9d,0x6c,0xcf,0x91,0xad,0xc5,0x48,0xae, - 0x8c,0x6c,0x23,0xdd,0x04,0xc0,0x13,0x24,0x4f,0x74, - 0xe8,0x87,0x55,0x30,0x24,0xf1,0x96,0xff,0xdf,0x4c, - 0x35,0xab,0x75,0x5a,0x31,0x1c,0x7f,0x83,0xdf,0x9f, - 0xd0,0xb8,0xfa,0xef,0x38,0xfc,0xc7,0x66,0x7f,0x07, - 0x2c,0xe3,0x5c,0x2b,0x05,0xa1,0x04,0x40,0xf9,0xfd, - 0x27,0x60,0x6d,0xd5,0xce,0xfb,0x7e,0x35,0x60,0xed, - 0x7d,0xd1,0xa2,0xa8,0x86,0xe3,0xf1,0x8f,0x64,0xfa, - 0x01,0xbe,0xdd,0x0a,0xc9,0xde,0x54,0x60,0x77,0xfc, - 0x67,0xf2,0x06,0x02,0x5f,0x89,0x17,0x8e,0x94,0x50, - 0xc8,0x0d,0x70,0xc8,0x8d,0x75,0x9e,0x86,0x06,0xac, - 0xad,0x6a,0x02,0xe0,0x71,0xe0,0x21,0xc7,0xba,0x7e, - 0xc0,0x01,0x81,0xcf,0xbd,0x07,0x30,0xd8,0xb1,0xee, - 0x7f,0xc0,0x63,0x81,0xcf,0x5d,0x07,0xde,0xb3,0xec, - 0x2b,0x91,0x3c,0xd1,0xc9,0x73,0x9d,0xf7,0x24,0x61, - 0x53,0xa4,0x92,0xb4,0xe1,0xab,0x4c,0xd8,0xd2,0xb1, - 0xc6,0x5b,0xfe,0xaf,0xf3,0xff,0xb3,0x1b,0x8a,0x95, - 0xfe,0x7b,0xee,0xeb,0xee,0xc7,0x8e,0x04,0x35,0xf2, - 0x19,0xb0,0x3f,0xbe,0x7e,0x20,0x73,0xb7,0xbf,0x76, - 0xd5,0xfb,0xca,0x55,0x8a,0x12,0x00,0xe5,0x17,0x32, - 0xc9,0x60,0x87,0x68,0x51,0xe4,0x63,0x0b,0xe7,0xba, - 0xa9,0x94,0x7f,0xe2,0x43,0x6c,0x63,0x81,0x63,0x9d, - 0x6b,0xfb,0x61,0xe5,0x5e,0x9a,0x03,0x5b,0x4c,0x1f, - 0x12,0x36,0x3d,0xc2,0x3b,0x6e,0x49,0xea,0x21,0xe4, - 0x06,0x38,0x74,0xa7,0x38,0x2f,0x21,0xd3,0x62,0xaa, - 0x5c,0x9e,0xee,0xdd,0x7d,0x3f,0x98,0xb0,0xbe,0x09, - 0xde,0xf2,0x7f,0xed,0xfe,0x77,0xef,0x51,0xe0,0x6d, - 0xe7,0xda,0xa4,0x9b,0x68,0x4f,0x02,0x20,0xcd,0xdd, - 0xff,0x90,0xe7,0x4c,0xba,0x66,0x1b,0x0c,0x7c,0xc9, - 0xf1,0x3c,0x93,0xb0,0x1e,0x06,0x62,0x7a,0x61,0x1d, - 0xfc,0x3d,0xe3,0xbe,0xc7,0x63,0x4d,0x83,0x3d,0xfd, - 0x1f,0xee,0x03,0xce,0x71,0xc6,0xf0,0x25,0xd4,0x24, - 0xba,0x54,0x94,0x00,0x28,0xbf,0x97,0xf0,0x4f,0x03, - 0x58,0x03,0xeb,0x05,0x50,0x05,0xcb,0x62,0x67,0x9e, - 0x3d,0x1e,0xc4,0x1a,0x0f,0x49,0x63,0x7f,0xc1,0xce, - 0x72,0x79,0xac,0x89,0x66,0xc9,0x17,0xd9,0x48,0xfc, - 0x7d,0x1a,0x56,0x88,0x18,0x87,0x94,0x4f,0xc8,0x0d, - 0x70,0xab,0x73,0xe3,0xb3,0xb2,0x64,0xc0,0xda,0x4f, - 0xa2,0x45,0x91,0xbf,0x6b,0xf0,0x7d,0x7f,0xcb,0xe2, - 0xaf,0xb0,0x5b,0x19,0x5f,0x15,0xd1,0xd8,0xf6,0xd7, - 0x97,0x2f,0x6a,0xc3,0x4a,0xda,0x3d,0x1a,0xdd,0x44, - 0xf7,0x4a,0xf8,0xfd,0x0e,0x31,0x12,0x00,0xb7,0x93, - 0xbc,0x5b,0xbc,0x3a,0x8d,0xcf,0xf7,0x6f,0x89,0x6f, - 0x17,0xf9,0x2e,0x74,0x4d,0xd7,0xd9,0x77,0xb0,0x29, - 0x0b,0x1e,0x47,0x12,0x36,0x41,0xec,0x64,0xe0,0x29, - 0xe7,0xda,0x1f,0xa2,0x8a,0xc2,0xd2,0x50,0x02,0xa0, - 0x1a,0x6e,0x09,0x58,0xbb,0x7f,0xb4,0x28,0xb2,0xb5, - 0x6f,0xc0,0xda,0x90,0x3f,0x9f,0xba,0x3b,0x82,0xe4, - 0x26,0x3d,0x1d,0x7e,0x88,0x25,0x02,0xa4,0x78,0x3e, - 0xc6,0xce,0x65,0x7a,0x84,0xdc,0x1c,0x49,0xf5,0x7d, - 0x18,0xb0,0x76,0xf9,0x68,0x51,0xa4,0xcb,0x7b,0x64, - 0xe9,0x03,0xec,0x67,0xa7,0xaa,0x26,0xe3,0x1f,0x0f, - 0xe6,0xdd,0xd5,0x3f,0xd8,0xb9,0x6e,0x24,0xb6,0x73, - 0x2b,0xdd,0xf3,0x96,0xb4,0x37,0xba,0xc1,0x5f,0x0b, - 0x58,0x20,0xe1,0xf1,0xe3,0x09,0x3b,0x3a,0xea,0xf5, - 0x11,0x56,0xc9,0xd0,0x48,0x2f,0x1a,0x27,0x96,0xbc, - 0xc7,0x54,0x55,0xfe,0x3f,0xcb,0xfa,0xc0,0xcf,0x9c, - 0x6b,0xaf,0xc1,0xa6,0x05,0x85,0x98,0x8a,0x55,0x0c, - 0x78,0x1a,0x88,0xf7,0x01,0xae,0x04,0xe6,0x09,0x7c, - 0x0d,0xc9,0x81,0x12,0x00,0xd5,0x70,0x63,0xc0,0xda, - 0x11,0x24,0x8f,0x02,0x2a,0xba,0xde,0xd8,0x1b,0x92, - 0x47,0x1b,0xf0,0xe7,0x88,0xb1,0x54,0xcd,0x6b,0x58, - 0x17,0x59,0x0f,0x1d,0x05,0x28,0x36,0x6f,0xe3,0x4b, - 0x7d,0x58,0x4b,0x67,0x63,0xb1,0x31,0xba,0x1e,0x65, - 0xe9,0x05,0xe2,0x99,0x94,0x03,0xf5,0x98,0x16,0x73, - 0x01,0xbe,0xe6,0x69,0xbb,0x00,0xf3,0x26,0xac,0xe9, - 0x83,0x2f,0x19,0xdf,0xd6,0xfe,0xba,0xd2,0x33,0xef, - 0xae,0xf6,0x62,0xf4,0x3c,0xee,0xd5,0x53,0xb5,0x71, - 0x17,0xf1,0xa6,0xf8,0x78,0x2a,0x0b,0x5a,0x4d,0x00, - 0xb4,0xa1,0x04,0x40,0x87,0x79,0xb0,0xca,0x4d,0xcf, - 0x35,0xd8,0x5b,0xc0,0x61,0x4d,0xbe,0xce,0x53,0x58, - 0x25,0x80,0xc7,0x52,0xc0,0x79,0x4d,0xbe,0x8e,0x64, - 0x48,0x09,0x80,0x6a,0xf8,0x37,0xfe,0x0b,0xb6,0xf9, - 0x81,0xc3,0x23,0xc6,0x92,0x85,0xdd,0xf1,0x8f,0xff, - 0x1b,0x85,0xbd,0xf1,0x89,0xdf,0x6f,0xf0,0x4f,0x97, - 0x58,0x0b,0xab,0x04,0x90,0xe2,0xf1,0xee,0x64,0x96, - 0xa5,0x93,0xbb,0x64,0xc7,0x5b,0xf2,0xb9,0x1e,0x61, - 0x67,0xc5,0xf3,0xb0,0x20,0x76,0xfc,0xcd,0xc3,0xfb, - 0x7d,0x97,0xd9,0xcb,0xf8,0xc6,0x31,0xf7,0x07,0x76, - 0x4e,0x58,0xf3,0x55,0x7c,0x23,0xdb,0xee,0xc6,0x66, - 0x8e,0x4b,0xcf,0x26,0xe3,0x3f,0xd7,0xde,0x53,0x1f, - 0x00,0x4f,0x97,0x7d,0xef,0x31,0xbf,0x66,0x78,0x12, - 0x00,0x9b,0xf7,0xf0,0xeb,0xcb,0x60,0x37,0x8f,0x49, - 0x1e,0x05,0xde,0xf5,0x06,0x54,0x71,0x17,0xe2,0xeb, - 0xbe,0x3f,0x13,0xd8,0x0f,0x18,0xd7,0xc2,0x6b,0x9d, - 0x83,0xbf,0x97,0xd6,0x3e,0xc0,0x37,0x5a,0x78,0x2d, - 0xc9,0x80,0x12,0x00,0xd5,0x30,0x13,0x2b,0xbb,0xf1, - 0xfa,0x2e,0xe5,0x1e,0xfd,0x75,0x62,0xc0,0xda,0x91, - 0xb1,0x82,0xa8,0xb0,0x19,0x58,0xf9,0xa7,0xa7,0x49, - 0x0c,0x58,0x2f,0x00,0xef,0x05,0x76,0xd9,0xcc,0x8b, - 0x95,0x5c,0x7e,0x1f,0x58,0x3b,0xe7,0x58,0x42,0x4d, - 0x76,0xae,0xab,0xe2,0xdc,0x73,0x69,0x8d,0xf7,0x46, - 0x78,0x28,0xfe,0x5e,0x2c,0x79,0xd9,0x16,0x7f,0x92, - 0xa2,0x2e,0xe3,0x62,0xbd,0xcd,0xf8,0xf6,0x4c,0xf8, - 0xfd,0xaf,0xa7,0xfc,0x7a,0x75,0xe7,0x1d,0x07,0xd8, - 0xdd,0x31,0x80,0xde,0xc0,0x26,0x8e,0xc7,0xc6,0x38, - 0xff,0xdf,0xe1,0x21,0x92,0x27,0xd0,0x2c,0x47,0xf7, - 0x4d,0x39,0x3d,0xc9,0x0b,0xf0,0xff,0x19,0x55,0xdd, - 0xc1,0xc0,0x5e,0xce,0xb5,0xbf,0xc4,0x36,0x0a,0x5b, - 0xd1,0x91,0x44,0xf8,0xcc,0xb9,0xfe,0x7c,0x60,0x58, - 0x8b,0xaf,0x29,0x11,0x29,0x01,0x50,0x1d,0xe7,0xe3, - 0x1b,0xd7,0x01,0xb0,0x30,0xe5,0xed,0xd6,0xb9,0x0f, - 0xfe,0x1b,0xb1,0x77,0x81,0xab,0x23,0xc6,0x52,0x65, - 0x8f,0x62,0xb3,0x5d,0x3d,0x3a,0x8e,0x02,0x94,0x7d, - 0x04,0xcc,0x60,0x6c,0x47,0xeb,0x78,0xec,0xac,0xdc, - 0xcb,0xd8,0xc5,0xcc,0x9d,0xc0,0x59,0x94,0xaf,0x72, - 0x66,0x6e,0xe7,0x3a,0xef,0x07,0xba,0xd4,0xc7,0xff, - 0x02,0xd6,0xee,0x14,0x2d,0x8a,0x74,0x78,0xfb,0xc5, - 0xcc,0x24,0xee,0xcd,0x51,0x91,0xfc,0x03,0x5f,0xd7, - 0xf9,0x2d,0xb1,0xaa,0xc1,0xee,0xf4,0x03,0x76,0x75, - 0x3c,0xc7,0x3b,0xc0,0xdf,0x9d,0x71,0xd5,0xdd,0x2d, - 0xf8,0xae,0xe3,0x86,0xf3,0xc5,0xeb,0xf7,0x35,0x49, - 0x3e,0xb2,0xf1,0x2c,0xf0,0x66,0x78,0x58,0x6e,0x33, - 0xf0,0x55,0x97,0x74,0x57,0x05,0xb0,0xa9,0xf3,0x35, - 0x54,0xfe,0x0f,0xab,0x00,0xbf,0x75,0xae,0x7d,0x02, - 0x38,0x29,0xa5,0xd7,0x7d,0x15,0x38,0xce,0xb9,0x76, - 0x30,0xd6,0x6f,0x40,0xf7,0x99,0x05,0xa5,0xbf,0x98, - 0xea,0x78,0x8d,0xb0,0x0f,0xd9,0xef,0x00,0xab,0xc6, - 0x09,0x25,0x9a,0xc1,0xf8,0x47,0x92,0x80,0xdd,0xc0, - 0x7a,0x1a,0x97,0x48,0xf7,0x4e,0x06,0x5e,0x77,0xae, - 0x5d,0x9b,0xf2,0x1e,0x05,0x38,0x07,0x9b,0xa6,0x31, - 0x16,0x3b,0x1f,0xf9,0x0b,0x6c,0x67,0xab,0xeb,0x31, - 0x93,0xdd,0x28,0x57,0xbf,0x83,0xa5,0x9d,0xeb,0x3e, - 0x8a,0x1a,0x85,0x94,0xd1,0x6d,0xf8,0x2b,0x48,0xf6, - 0xa7,0xb8,0xd7,0x12,0xcb,0xe3,0x1f,0x17,0xfb,0x1f, - 0xe0,0xfd,0x88,0xb1,0x14,0xc9,0x74,0xe0,0x22,0xc7, - 0xba,0xbe,0xf4,0x7c,0x93,0xbf,0x25,0x30,0x9f,0xe3, - 0x39,0x2e,0x6e,0x7f,0x3d,0x49,0xf6,0x3e,0xbe,0xe4, - 0xdb,0x10,0xbe,0xd8,0x01,0xe4,0x49,0x86,0x00,0x00, - 0x20,0x00,0x49,0x44,0x41,0x54,0x7f,0xc3,0x73,0x03, - 0x1d,0xb3,0xfc,0xbf,0x43,0xb3,0xc7,0x00,0x3c,0x15, - 0x00,0x6f,0xe0,0x6f,0x6e,0x5b,0x55,0x73,0x62,0x1b, - 0x14,0x9e,0x2a,0xde,0xc9,0xd8,0xa6,0x59,0x9a,0xd7, - 0xc1,0x97,0xe0,0x4f,0xc2,0x6c,0x42,0x79,0xaf,0x0b, - 0x2b,0xaf,0xa8,0x1f,0xda,0xd2,0x9c,0x53,0xf0,0x57, - 0x01,0xf4,0xc3,0xb2,0x73,0x65,0x3a,0xff,0xfb,0x4b, - 0xac,0x7a,0xc1,0x63,0x2c,0x6a,0x3a,0xd4,0xaa,0x89, - 0xd8,0x54,0x00,0xaf,0x93,0x28,0xe7,0x98,0xc9,0xb9, - 0xb1,0xb2,0xc4,0xa4,0x32,0xe1,0xf9,0x80,0xed,0xe3, - 0x87,0x93,0x1a,0x6f,0xa5,0xcc,0xf3,0x51,0xa3,0x90, - 0x32,0x9a,0x80,0x25,0x01,0x3c,0x16,0xc7,0xb7,0x13, - 0x9c,0x87,0x93,0xf1,0x97,0xff,0xdf,0x10,0x33,0x90, - 0x02,0xba,0x08,0xdf,0x8d,0x79,0x4f,0xc7,0x00,0x3c, - 0xe5,0xff,0x33,0xf0,0x25,0x1a,0x64,0x96,0x90,0x9b, - 0xab,0xce,0x3c,0x09,0x80,0x2c,0x2a,0x5c,0x3c,0xef, - 0x1b,0xc3,0xbb,0xfc,0xf7,0xe2,0xf8,0x12,0xd6,0xde, - 0x51,0x89,0x55,0xf6,0x1b,0x60,0x35,0xe7,0xda,0xef, - 0x03,0xcf,0x45,0x88,0xe1,0x5b,0xf8,0xa7,0xc5,0x9c, - 0x02,0x6c,0x10,0x21,0x06,0x69,0x91,0x12,0x00,0xd5, - 0xf2,0x34,0x70,0x59,0xc0,0xfa,0xb5,0x81,0xdf,0x47, - 0x8a,0x25,0x6d,0xfb,0x03,0x07,0x05,0xac,0xff,0x09, - 0xad,0x35,0x3c,0x11,0xf3,0x4f,0xe0,0x5a,0xe7,0xda, - 0xb2,0x1e,0x05,0x08,0xb9,0x28,0x3a,0x83,0x72,0x7c, - 0x7f,0xab,0xe2,0x6b,0xa8,0x04,0x71,0x2e,0x10,0xa4, - 0xfc,0xae,0x0f,0x58,0x7b,0x2a,0xc5,0xbb,0x9e,0x58, - 0x1b,0xdb,0xfd,0xf2,0x98,0x01,0xfc,0x35,0x62,0x2c, - 0x45,0xf4,0x0e,0xbe,0xf3,0xd4,0xc3,0xf9,0x62,0xa3, - 0x3f,0x4f,0x83,0x40,0xb0,0x9b,0x59,0x35,0xe1,0x0d, - 0xe3,0x3d,0xe3,0xbe,0x71,0xc2,0x7f,0x77,0x35,0x01, - 0xb8,0x2f,0x3c,0x9c,0x60,0x6f,0x03,0xcf,0x24,0xac, - 0x59,0x9a,0xd9,0xfb,0x00,0x78,0x7a,0x17,0x80,0xce, - 0xff,0xef,0x01,0x1c,0xe2,0x5c,0x7b,0x2b,0x70,0x6e, - 0xa4,0x38,0xde,0x0f,0x88,0xa3,0x2f,0x70,0x15,0x30, - 0x57,0xa4,0x58,0xa4,0x49,0x45,0xfb,0xc0,0x96,0xd6, - 0x9d,0x4c,0xd8,0xac,0xdd,0x83,0x81,0xa3,0x23,0xc5, - 0x92,0x96,0xf5,0x08,0x6b,0x22,0x34,0x1a,0x8d,0x21, - 0x49,0xd3,0x31,0xf8,0x93,0x29,0xeb,0x10,0xd6,0xa4, - 0xb1,0x08,0x6e,0x05,0x3e,0x75,0xae,0x5d,0x05,0x38, - 0x32,0x62,0x2c,0x69,0x09,0x19,0xf7,0x73,0x4f,0xac, - 0x20,0xa4,0xd4,0xfe,0x06,0x7c,0xe2,0x5c,0xbb,0x0a, - 0x70,0x6c,0xc4,0x58,0x42,0xcd,0x81,0x25,0xc3,0xbd, - 0xd7,0x38,0x57,0x13,0xf7,0x6c,0x74,0x51,0x79,0x3e, - 0x57,0xfb,0x60,0x93,0x77,0x3a,0xfb,0x1a,0xc9,0xe7, - 0xcd,0xbd,0xcf,0x2f,0xb3,0x7b,0x06,0x3b,0x6b,0x9d, - 0xa4,0xf3,0x0d,0xff,0x8a,0x24,0x4f,0x63,0xf8,0x37, - 0xd9,0x1d,0x89,0xf4,0x24,0xd5,0x3b,0x57,0x2c,0x78, - 0xca,0xff,0x3f,0xa3,0xf5,0x46,0x76,0x65,0xb6,0x34, - 0xfe,0x6a,0x9a,0x8f,0x80,0x03,0xf0,0x8d,0xfb,0x6c, - 0xd6,0xdf,0xf0,0x37,0xd9,0x5e,0x0e,0x7f,0x4f,0x29, - 0xc9,0x88,0x12,0x00,0xd5,0xf3,0x36,0xf0,0xab,0xc0, - 0xc7,0xfc,0x86,0xb0,0xdd,0xf5,0x2c,0xad,0x89,0x95, - 0x94,0xcd,0xe9,0x5c,0xdf,0x86,0xdd,0xa0,0xe9,0xcc, - 0x61,0x7a,0xde,0xc3,0x4a,0xc9,0xbc,0x4e,0xa6,0x5c, - 0x47,0x01,0x26,0x01,0x7f,0x0e,0x58,0xff,0x13,0xec, - 0x03,0xad,0xa8,0x96,0xc1,0xff,0xf3,0xfc,0x04,0xfe, - 0x11,0xa2,0x52,0x2f,0x9f,0x01,0xbf,0x0e,0x58,0x7f, - 0x06,0xfe,0xd2,0xd4,0xd8,0x7e,0x8b,0xff,0x3d,0x68, - 0x26,0x70,0x66,0xc4,0x58,0x8a,0xec,0x2e,0xac,0xff, - 0x49,0x92,0xae,0xc7,0x00,0x92,0xa6,0x03,0x80,0x35, - 0x51,0xf5,0x8e,0xb5,0x93,0xd9,0x79,0x8e,0x01,0x2c, - 0xcc,0xac,0xcf,0x21,0xcf,0x0e,0x7a,0x16,0xe7,0xff, - 0x3b,0x84,0x26,0x00,0x3c,0xf1,0xdf,0x4e,0x7d,0x7b, - 0x3a,0xf5,0xc3,0xae,0x51,0x06,0x3b,0xd7,0x1f,0x8c, - 0x5d,0xb7,0xc5,0x76,0x0c,0xfe,0x3e,0x51,0x07,0xf0, - 0xc5,0x44,0xa2,0xe4,0x48,0x09,0x80,0x6a,0xfa,0x29, - 0x61,0xf3,0x8c,0x7b,0x01,0x7f,0x04,0x8e,0x8a,0x13, - 0x4e,0xd3,0x36,0xc0,0x3a,0xca,0x7a,0x1a,0x0d,0x75, - 0xf8,0x0d,0x36,0x73,0x58,0xd2,0x75,0x31,0xfe,0xf2, - 0xc1,0xfe,0xc0,0x9f,0x28,0x47,0xa9,0x7c,0x87,0xdf, - 0xe1,0xef,0x9f,0x31,0x18,0x4b,0x4a,0x79,0xfb,0x51, - 0x64,0xa9,0x1f,0xf6,0x67,0xef,0x4d,0x98,0x5d,0x15, - 0x31,0x16,0x29,0xbf,0xdf,0x91,0x3c,0xd6,0xab,0xc3, - 0x00,0xec,0x8c,0xee,0x22,0xf1,0xc2,0x71,0x39,0x19, - 0x38,0x34,0x60,0xfd,0x75,0xd4,0xb7,0x0f,0x46,0x1b, - 0xbe,0x5e,0x39,0x1b,0x03,0x8b,0xb6,0xff,0xff,0x01, - 0xc0,0xff,0x39,0x1e,0x73,0x21,0x71,0x77,0x20,0xab, - 0x2c,0xf4,0x18,0x40,0x52,0xf9,0x3f,0x64,0x3b,0xe1, - 0xe2,0x3e,0xac,0x87,0x50,0x23,0x1d,0x09,0x80,0xa1, - 0x58,0x05,0x51,0x92,0x3a,0x97,0xff,0x9f,0x01,0x6c, - 0xe8,0x5c,0x7b,0x11,0xd9,0x4d,0xdd,0x18,0x8f,0x1d, - 0xcf,0xf5,0x5e,0x3b,0x5d,0x48,0xf7,0x23,0x20,0x25, - 0x07,0x4a,0x00,0x54,0xd3,0x64,0xec,0xac,0xd0,0x84, - 0x80,0xc7,0xf4,0xc6,0x2e,0xf6,0x2e,0xa4,0x18,0x9d, - 0xce,0x47,0x00,0xa3,0xb0,0x0f,0x07,0xaf,0xa7,0x81, - 0x1f,0x44,0x89,0x46,0xda,0xb0,0x33,0x5f,0xde,0x0c, - 0xfc,0xba,0xc0,0x09,0xf1,0xc2,0x49,0xdd,0x68,0xec, - 0x46,0xc0,0x6b,0x19,0xec,0x82,0xaa,0xa7,0x11,0x59, - 0x79,0xe8,0x83,0x75,0xe8,0xf5,0x8e,0x53,0xfa,0x1c, - 0x4b,0xec,0x88,0xf4,0x64,0x3c,0x70,0x76,0xc0,0xfa, - 0x61,0xd8,0xae,0xf2,0x12,0x71,0xc2,0x69,0xa8,0x17, - 0x36,0xae,0xf3,0xb4,0x80,0xc7,0x4c,0x40,0x9f,0x19, - 0x23,0x49,0x9e,0xf8,0xd0,0x1b,0xbb,0xa6,0x00,0xd8, - 0x96,0xe4,0x11,0xa3,0x53,0xb0,0x44,0xa4,0x34,0x67, - 0x14,0xbe,0x63,0x69,0x1d,0x37,0xfe,0x5f,0x49,0x58, - 0xf7,0x02,0xbe,0x63,0x05,0x69,0x99,0x4a,0x72,0xb9, - 0xfe,0x4a,0xd8,0xe6,0x8e,0xe7,0xf3,0x6a,0x06,0xd6, - 0x8f,0xa8,0x8e,0xb6,0x01,0xbe,0xe7,0x5c,0xfb,0x12, - 0xfe,0x31,0x7d,0x69,0xb9,0x17,0x7f,0xa5,0xd8,0x7c, - 0xd8,0xd1,0x2c,0x6f,0x63,0x56,0x89,0x48,0x09,0x80, - 0xea,0x7a,0x91,0xb0,0x5d,0x90,0x0e,0x87,0x00,0x0f, - 0x63,0x37,0x70,0x79,0x58,0x10,0xb8,0x12,0xbb,0x78, - 0x98,0x23,0xe0,0x71,0x1f,0x63,0x63,0xda,0xa6,0xc4, - 0x08,0x4a,0x00,0xdb,0x25,0xfb,0x59,0xc0,0xfa,0x1f, - 0x53,0x9c,0x92,0x60,0x8f,0x1f,0x11,0xd6,0x3f,0x63, - 0x4d,0xac,0xd2,0x66,0xcb,0x38,0xe1,0x04,0x19,0x82, - 0x9d,0xc9,0xfb,0x66,0xc0,0x63,0xce,0x45,0x8d,0x32, - 0x25,0xd9,0xd9,0xc0,0x23,0x01,0xeb,0x57,0xc6,0x46, - 0xea,0x79,0x76,0x25,0xd3,0xb2,0x10,0xb6,0x43,0x18, - 0x72,0x54,0x09,0x6c,0x1c,0x6e,0x96,0x37,0x46,0x45, - 0xf4,0x09,0x36,0x56,0x2c,0xc9,0x9e,0x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- 0x49,0x6f,0x6c,0x54,0x77,0x52,0x73,0xc7,0x0e,0xa7, - 0x62,0x9b,0x77,0x79,0x98,0x02,0xec,0x8b,0x25,0xae, - 0x3c,0x4e,0xc7,0x3f,0xa6,0x58,0x22,0x51,0x02,0xa0, - 0xfa,0x8e,0x06,0x2e,0x6d,0xe2,0x71,0x7d,0xb0,0x06, - 0x1f,0xaf,0x62,0xa3,0x02,0x57,0x4d,0x33,0xa8,0x4e, - 0x16,0xc1,0x4a,0x30,0x5f,0x6b,0x7f,0x9d,0x21,0x81, - 0x8f,0x9f,0x81,0x9d,0x41,0xba,0x3f,0xdd,0xb0,0xa4, - 0x07,0x53,0xb1,0xca,0x12,0xef,0xd9,0xce,0xf5,0x28, - 0xd7,0x51,0x80,0x73,0xb0,0x12,0xe6,0x10,0xbd,0xb0, - 0xb2,0xbb,0x57,0xb1,0xb3,0x7a,0xc3,0xd2,0x0e,0xaa, - 0x1b,0xfd,0xb0,0x39,0xdc,0xff,0xc5,0xc6,0x97,0x85, - 0x9c,0xab,0x9b,0x89,0xcd,0xf1,0x0d,0x39,0x22,0x24, - 0xf5,0xf6,0x3c,0xf0,0xdd,0xc0,0xc7,0xf4,0xc1,0x76, - 0x7a,0xc6,0x00,0x3f,0xc4,0x7f,0x21,0xeb,0x31,0x37, - 0x36,0xe9,0xe2,0x19,0xec,0x26,0x7e,0x81,0xc0,0xc7, - 0x8f,0xa1,0xb8,0x8d,0x6f,0xf3,0xf0,0x10,0xf0,0x78, - 0xc2,0x9a,0x5e,0xd8,0xb5,0xc4,0xa0,0x84,0x75,0x4f, - 0x62,0x3b,0xb6,0xd2,0x9a,0x7f,0xe2,0x6b,0x66,0x9c, - 0x54,0x1e,0x3e,0x09,0x2b,0xd3,0xce,0xda,0x18,0xac, - 0x11,0x64,0x23,0x3b,0xe3,0x6b,0xd6,0x59,0xc7,0xf3, - 0xff,0x3f,0x00,0xb6,0x70,0xae,0x7d,0x80,0xb0,0xea, - 0xcc,0x18,0x9e,0x00,0x4e,0x71,0xae,0xed,0x8f,0x6d, - 0x50,0x0e,0x8c,0x17,0x8e,0x24,0x51,0x02,0xa0,0xfa, - 0x66,0x62,0x3b,0x24,0x97,0x34,0xf9,0xf8,0x8e,0x9d, - 0xf9,0x67,0xb0,0x0b,0x84,0x13,0xb1,0x66,0x24,0xcd, - 0xf6,0x09,0xe8,0x03,0xac,0x85,0x35,0x1c,0xbc,0x07, - 0x9b,0x11,0x7c,0x26,0x56,0xc6,0x16,0x6a,0x2a,0x56, - 0x8e,0xe8,0x29,0x5f,0x94,0xf4,0x8c,0x22,0xec,0xdf, - 0xd3,0x8f,0x89,0x97,0x40,0x4a,0xdb,0x0c,0x60,0x2f, - 0x2c,0x21,0x15,0x6a,0x5e,0xec,0x46,0xe7,0x15,0x2c, - 0x21,0xf5,0x3d,0xec,0x28,0x4d,0x5a,0x15,0x10,0xf3, - 0x03,0xbb,0x62,0x37,0x3c,0xef,0x62,0xff,0xee,0xbd, - 0x8d,0x81,0x3a,0x3b,0x95,0x7c,0x4a,0x42,0xa5,0xdc, - 0xce,0xa7,0xb9,0x6e,0xf9,0x43,0xb1,0xc4,0xd8,0x9b, - 0xd8,0xae,0xfb,0x61,0xd8,0x4e,0x72,0xc8,0xf5,0x47, - 0x2f,0x60,0x05,0xac,0x93,0xf4,0xf5,0xd8,0xbf,0xff, - 0xf3,0xdb,0x9f,0x27,0xd4,0x3b,0xc0,0x56,0xd8,0x2c, - 0x6b,0x99,0xc5,0xb3,0x6b,0xbf,0x51,0x4a,0xcf,0x23, - 0xc9,0xc6,0x62,0x37,0x76,0x49,0x56,0x48,0xf8,0xfd, - 0x7f,0x93,0xdc,0xe3,0x21,0x96,0xdb,0x12,0x7e,0x7f, - 0x65,0x92,0xcb,0xdb,0x5f,0xa6,0x7e,0x4d,0x3a,0xbf, - 0x82,0xbf,0x1a,0xf1,0x33,0xac,0x42,0x6b,0x46,0xbc, - 0x70,0xdc,0x7e,0x81,0x1d,0xff,0xf2,0x58,0x89,0xf0, - 0x89,0x65,0x92,0xa2,0x32,0x75,0xe9,0x96,0xe6,0xb5, - 0x61,0x3b,0x7e,0x33,0xb0,0x33,0xfe,0xcd,0x5a,0xab, - 0xfd,0x0b,0xac,0x81,0xd8,0xe3,0x58,0x96,0xf7,0x15, - 0xec,0x46,0x7e,0x42,0xfb,0xaf,0x4f,0xc1,0x12,0x07, - 0x03,0xb1,0xdd,0x82,0xc5,0xb1,0x19,0xa6,0xcb,0x60, - 0x65,0x3f,0x73,0xb5,0x10,0x43,0x87,0x89,0x58,0xe9, - 0x73,0xd2,0x07,0x8c,0xc4,0xf1,0x7d,0x60,0x47,0x7c, - 0x89,0x9b,0x39,0xb0,0xa3,0x00,0x1b,0x51,0x8c,0x0f, - 0xa9,0x24,0x1f,0x61,0x99,0xf7,0x7b,0x69,0xae,0x63, - 0x6d,0x6f,0xec,0x03,0xbc,0xa3,0x31,0xd3,0x44,0x2c, - 0x81,0xf6,0x2c,0x96,0x58,0x78,0xb3,0xfd,0x35,0xc6, - 0x62,0x3f,0x2f,0x53,0xb1,0x44,0x5d,0x3f,0x2c,0x33, - 0x3e,0x0f,0xd6,0x2c,0x67,0x21,0x60,0x29,0xec,0x7c, - 0xe7,0x9a,0xed,0xff,0xbf,0xd5,0xe6,0x39,0x7f,0x40, - 0xa5,0xff,0xd2,0xbc,0x1f,0x61,0xbb,0xef,0xcd,0x4c, - 0x8c,0xe9,0x0f,0x6c,0xd7,0xfe,0x05,0xf6,0x79,0x31, - 0x1a,0xfb,0x79,0x78,0x07,0xfb,0x39,0x99,0x84,0xfd, - 0x1b,0x1f,0x80,0x7d,0x76,0x2c,0x8a,0x35,0x14,0x5c, - 0x89,0xe4,0xc6,0x73,0x1e,0x1f,0x03,0x5b,0xa3,0x73, - 0xff,0xdd,0xb9,0x1a,0xab,0x80,0x6a,0xe5,0xc8,0xc6, - 0x67,0x68,0xb2,0x48,0x9a,0x6e,0x02,0x36,0x6b,0xf1, - 0x39,0xf2,0x4c,0xf6,0xde,0x0a,0x7c,0xbb,0xc5,0xe7, - 0xa8,0xdb,0xee,0xff,0x10,0xec,0x67,0xd1,0xbb,0x71, - 0x70,0x24,0xc5,0x79,0x3f,0x9b,0x01,0xec,0x87,0x55, - 0x01,0x25,0x55,0x0a,0x81,0x55,0x93,0xfe,0x93,0xfa, - 0xfd,0x1d,0x17,0x82,0x12,0x00,0xf5,0xd1,0x86,0xfd, - 0xb0,0x3d,0x8a,0x9d,0xed,0xf7,0x8e,0x09,0xeb,0xc9, - 0x40,0x66,0xbf,0xc9,0xc9,0xd2,0x68,0x6c,0x9e,0xe8, - 0x73,0x39,0xbc,0xb6,0x98,0xb1,0xc0,0xb1,0xd8,0x6c, - 0x5a,0x8f,0xf5,0xb1,0xa4,0x41,0xde,0x65,0x6a,0x5e, - 0xaf,0x00,0xc3,0xb1,0x0f,0xa7,0xa4,0x1d,0x96,0x24, - 0x83,0xb0,0x9d,0xfa,0x66,0x76,0xeb,0xd3,0xf4,0x6b, - 0xac,0xe9,0x99,0x48,0x2b,0x8e,0xc1,0xce,0x7a,0xb6, - 0xfa,0x6f,0x69,0x2e,0xec,0x7d,0x61,0xfd,0x96,0x23, - 0xf2,0x79,0x01,0xd8,0x05,0xfb,0xfc,0x90,0x2f,0x9a, - 0x08,0x5c,0x8e,0xdd,0x50,0x34,0xeb,0x0a,0x74,0xb4, - 0x28,0x4d,0x37,0x01,0xbf,0x6c,0xf1,0x39,0xf2,0x4c, - 0x00,0xfc,0x1b,0xdb,0x10,0x0a,0x69,0xe8,0xdc,0x55, - 0xdd,0x6e,0x0e,0x2f,0x05,0x96,0x74,0xae,0xbd,0x16, - 0xfb,0x99,0x2d,0x92,0x31,0xd8,0x67,0xc3,0x85,0xce, - 0xf5,0x97,0x60,0xc7,0x40,0xde,0x8b,0x16,0x91,0x74, - 0x4b,0x47,0x00,0xea,0xe7,0x8f,0xc0,0x06,0x94,0xf7, - 0xe6,0xf9,0x2a,0xca,0x1d,0x7f,0x95,0xfc,0x85,0xb0, - 0x8b,0x8b,0x53,0xf0,0xcd,0xfb,0x2d,0x8a,0x31,0xd8, - 0x4d,0x7b,0x1e,0x0d,0x94,0xd2,0x34,0x09,0xeb,0x93, - 0xa1,0x9b,0x7f,0x49,0x43,0x1b,0xd6,0x0f,0x60,0x6f, - 0xac,0x82,0xa5,0x0c,0xfe,0x8e,0x7d,0x6e,0xe8,0xe6, - 0xbf,0xb1,0x0b,0x5a,0x7c,0xbc,0xca,0xff,0xd3,0xd5, - 0x6a,0xf9,0xfb,0xcb,0xd8,0xe7,0x58,0x5e,0x26,0xd2, - 0x5a,0x7f,0x26,0xef,0x31,0x88,0xaa,0x38,0x0a,0xeb, - 0x8b,0xe0,0xf1,0x16,0x76,0x9c,0xaa,0x88,0xfe,0x88, - 0x7f,0x6c,0xe3,0x50,0x6c,0x14,0xa9,0x46,0x03,0x66, - 0x4c,0x09,0x80,0x7a,0x7a,0x06,0xdb,0x75,0xf9,0x03, - 0xe5,0x28,0xc9,0x06,0xfb,0x10,0xdb,0x16,0xeb,0x34, - 0xaa,0x1d,0x86,0xe2,0x38,0x1c,0xff,0xd8,0x99,0x8e, - 0xa3,0x00,0x65,0x99,0x0a,0x00,0x36,0x26,0x6f,0x3b, - 0xe0,0x08,0xac,0xbc,0xb5,0x6c,0x1e,0xc0,0x7e,0xd6, - 0x8b,0xb6,0x4b,0x20,0xe5,0xf7,0x67,0xac,0x33,0xfc, - 0x33,0x79,0x07,0xd2,0xc0,0x04,0xac,0x17,0xc7,0x2e, - 0xc0,0xf8,0x9c,0x63,0x29,0x83,0x67,0xb1,0x1e,0x2f, - 0xcd,0xb8,0x9f,0x62,0xff,0x5b,0x28,0xab,0x56,0x76, - 0xc0,0x8b,0xd0,0xeb,0xa5,0x95,0x04,0xba,0xb7,0x11, - 0x62,0x15,0xac,0x85,0x8d,0x5c,0xf5,0x68,0xc3,0x92, - 0xfa,0x63,0xe3,0x85,0xd3,0xb2,0x83,0xf0,0x8f,0x02, - 0xfd,0x1a,0x56,0x59,0x26,0x19,0x52,0x02,0xa0,0xbe, - 0x3e,0xc7,0x4a,0xfd,0xd6,0x25,0xbc,0xeb,0x79,0x96, - 0x3e,0xc2,0xce,0x9d,0xae,0x46,0xf9,0x77,0x62,0xab, - 0xe8,0x75,0xac,0xc9,0x9f,0xd7,0x06,0x24,0x77,0x2d, - 0x2e,0x9a,0x36,0x6c,0x67,0x6b,0x65,0x2c,0x81,0x51, - 0x86,0xa4,0xd9,0x5b,0x58,0xf3,0xcf,0x4d,0xf0,0xcf, - 0xe7,0x15,0x09,0xf5,0x34,0x76,0xe1,0x7a,0x24,0xc5, - 0x9a,0xfb,0xde,0x86,0x95,0xa3,0xaf,0x80,0x95,0x50, - 0x7b,0xa7,0x96,0x48,0xf3,0xbb,0xf8,0xda,0xfd,0x8f, - 0xa3,0x95,0x11,0x78,0x65,0x4f,0x00,0xd4,0x65,0xfc, - 0xdf,0x5c,0x58,0x53,0x5f,0xef,0x51,0x89,0x5f,0x02, - 0x77,0xc7,0x0b,0x27,0x15,0xef,0x61,0xc7,0x8e,0xbd, - 0x7e,0x8e,0x6f,0x22,0x84,0xa4,0x44,0x09,0x00,0x79, - 0x12,0xd8,0x12,0xd8,0x18,0xcb,0xb6,0x16,0xe5,0x42, - 0xe9,0x4d,0xac,0xcc,0x74,0x29,0xac,0xf3,0x74,0x5e, - 0x5d,0x6c,0x25,0xd9,0x6f,0x81,0xc7,0x02,0xd6,0x9f, - 0x8a,0xdd,0x4c,0x97,0xcd,0xdb,0xc0,0x81,0xd8,0x87, - 0xd4,0xc5,0x84,0xcd,0x45,0xcf,0xca,0x4b,0x58,0x55, - 0xc6,0xb2,0xd8,0xd9,0xba,0xa2,0xfc,0x3c,0x4b,0x75, - 0xcd,0xc0,0xaa,0xc9,0x96,0xc7,0x9a,0xc8,0x8d,0xcb, - 0x39,0x96,0xbf,0x63,0x0d,0x47,0xf7,0xc3,0xa6,0x05, - 0x48,0x98,0x1b,0x80,0x0f,0x02,0x1f,0xf3,0x21,0x36, - 0x8e,0x54,0xd2,0xf7,0x1f,0x6c,0x23,0x24,0xd4,0x64, - 0x6c,0xd2,0x52,0xde,0x9e,0xc1,0x12,0xd2,0xa1,0xa6, - 0x51,0x9f,0x4d,0x9f,0xf3,0xf0,0xf7,0x1a,0x7a,0x12, - 0xdb,0x14,0x2b,0x83,0xeb,0xb1,0x44,0xac,0xc7,0x1c, - 0x58,0xf3,0xc3,0x01,0xf1,0xc2,0x91,0xce,0x94,0x00, - 0x90,0x0e,0x0f,0x00,0xdb,0x63,0x1d,0xc7,0xcf,0xc2, - 0x76,0x76,0xb3,0x36,0x01,0x2b,0x55,0xde,0x0a,0xbb, - 0xf1,0xff,0x15,0xfe,0xf2,0x72,0xc9,0xcf,0x0c,0x66, - 0x4d,0x99,0xf0,0x28,0xe3,0x51,0x80,0xce,0x46,0x63, - 0xdf,0xef,0x62,0xd8,0xd1,0x80,0x7b,0xb1,0x2e,0xfe, - 0x79,0xf9,0x18,0xfb,0xf3,0xdc,0x14,0xbb,0x88,0xb8, - 0x00,0x9b,0x2c,0x20,0x92,0xa5,0xb1,0xc0,0xf1,0x58, - 0xe7,0xfe,0x03,0x81,0x87,0x33,0x7c,0xed,0xf7,0xb0, - 0x51,0x83,0x4b,0x63,0x67,0x68,0x1f,0xca,0xf0,0xb5, - 0xab,0x66,0x2a,0xe1,0x63,0x83,0x2f,0x45,0xef,0x39, - 0xb1,0xcc,0xc4,0x7f,0x9e,0xba,0xb3,0x7b,0x29,0x4e, - 0x92,0xba,0x99,0x69,0x4d,0xa3,0x80,0x4f,0xd3,0x0e, - 0xa4,0x80,0xf6,0xc3,0xc6,0xf8,0x79,0x4c,0x06,0xf6, - 0xa1,0x5c,0x3f,0x6b,0x47,0x61,0x1b,0x7a,0x1e,0xab, - 0x61,0xa3,0x04,0x25,0x03,0x4a,0x00,0x48,0x57,0xaf, - 0x00,0x27,0x62,0x37,0xe0,0xeb,0x03,0x3f,0x01,0xee, - 0x23,0xce,0x1b,0xce,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7f,0xbd,0x85,0xfd, - 0xac,0x8c,0xc1,0xaa,0x0f,0xc6,0xa0,0xd2,0x7e,0x29, - 0x9f,0xbe,0xd8,0xcf,0xc4,0x4a,0xd8,0x85,0xef,0x8a, - 0xd8,0xe7,0xc8,0x60,0xec,0x0c,0x6c,0xc7,0x17,0x58, - 0xe5,0xd7,0x84,0xf6,0xaf,0xcf,0x80,0x37,0xb0,0x31, - 0x7e,0x2f,0x00,0x2f,0x62,0x9f,0x1f,0x6a,0x06,0x2b, - 0x22,0x22,0xd2,0x04,0x25,0x00,0x24,0x2d,0x8f,0x02, - 0xeb,0x38,0xd6,0xcd,0x00,0x96,0x40,0x67,0x33,0x45, - 0x44,0x44,0x44,0x44,0x44,0x32,0xa5,0x23,0x00,0x92, - 0x96,0x6b,0x9d,0xeb,0xfa,0x60,0x65,0xfe,0x22,0x22, - 0x22,0x22,0x22,0x22,0x92,0x21,0x55,0x00,0x48,0x5a, - 0x96,0xc6,0x4a,0x93,0x7b,0x39,0xd6,0xbe,0x8c,0x95, - 0x7f,0xaa,0xfc,0x5f,0x44,0x44,0x44,0x44,0x44,0x24, - 0x23,0xaa,0x00,0x90,0xb4,0xbc,0x8a,0x75,0x9d,0xf5, - 0x58,0x0e,0xd8,0x3b,0x62,0x2c,0x22,0x22,0x22,0x22, - 0x22,0x22,0xd2,0x85,0x12,0x00,0x92,0xa6,0x8b,0x03, - 0xd6,0x9e,0x82,0x35,0x85,0x12,0x11,0x11,0x11,0x11, - 0x11,0x91,0x0c,0x28,0x01,0x20,0x69,0xfa,0x2b,0xf0, - 0xbe,0x73,0xed,0x72,0xc0,0xd1,0x11,0x63,0x11,0x11, - 0x11,0x11,0x11,0x11,0x91,0x4e,0x94,0x00,0x90,0x34, - 0x4d,0x01,0xce,0x0d,0x58,0x7f,0x26,0x36,0x16,0x4a, - 0x44,0x44,0x44,0x44,0x44,0x44,0x22,0x53,0x13,0x40, - 0x49,0xdb,0x7c,0x58,0x3f,0x80,0x79,0x9c,0xeb,0x9f, - 0x01,0x36,0x01,0xc6,0x45,0x8b,0x48,0x44,0x44,0x44, - 0x44,0x44,0x44,0x54,0x01,0x20,0xa9,0xfb,0x04,0x38, - 0x27,0x60,0xfd,0x6a,0xc0,0x1d,0xc0,0xbc,0x71,0xc2, - 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x50,0x05,0x80, - 0xc4,0x31,0x08,0x78,0x01,0x58,0x2c,0xe0,0x31,0xcf, - 0x00,0xdf,0x04,0x9e,0x88,0x12,0x91,0x88,0x88,0x88, - 0x88,0x88,0x48,0xcd,0xa9,0x02,0x40,0x62,0x98,0x08, - 0x1c,0x17,0xf8,0x98,0xd5,0x80,0xff,0x61,0x7d,0x01, - 0x16,0x4a,0x3d,0x22,0x11,0x11,0x11,0x11,0x11,0x91, - 0x9a,0x53,0x05,0x80,0xc4,0xf4,0x57,0x60,0xb7,0x26, - 0x1e,0x37,0x15,0xb8,0x01,0xb8,0x1d,0xb8,0x1f,0x78, - 0xa9,0x87,0x75,0x4b,0x00,0xab,0xb4,0x7f,0xfd,0x1e, - 0x98,0xde,0xc4,0x6b,0x89,0x88,0x88,0x88,0x88,0x88, - 0xd4,0x82,0x12,0x00,0x12,0xd3,0x10,0xe0,0x71,0x60, - 0x58,0x8b,0xcf,0x33,0x0d,0x18,0x8b,0x35,0x0a,0xec, - 0x07,0x0c,0xc6,0x9a,0x0c,0xf6,0xed,0xb4,0x66,0x4e, - 0x60,0x72,0x8b,0xaf,0x23,0x22,0x22,0x22,0x22,0x22, - 0x52,0x59,0x4a,0x00,0x48,0x6c,0xab,0x63,0xbb,0xf8, - 0xde,0xa9,0x00,0xcd,0x52,0x02,0x40,0x44,0x44,0x44, - 0x44,0x44,0xa4,0x01,0xf5,0x00,0x90,0xd8,0x9e,0x06, - 0x76,0x04,0x26,0xe4,0x1d,0x88,0x88,0x88,0x88,0x88, - 0x88,0x48,0x9d,0x29,0x01,0x20,0x59,0x18,0x05,0x6c, - 0x01,0xbc,0x9b,0x77,0x20,0x22,0x22,0x22,0x22,0x22, - 0x22,0x75,0xa5,0x04,0x80,0x64,0xe5,0x7f,0xc0,0x3a, - 0xc0,0x6d,0x79,0x07,0x22,0x22,0x22,0x22,0x22,0x22, - 0x52,0x47,0x4a,0x00,0x48,0x96,0xde,0x03,0xb6,0x01, - 0xf6,0x06,0x5e,0xc9,0x39,0x16,0x11,0x11,0x11,0x11, - 0x11,0x91,0x5a,0x51,0x02,0x40,0xf2,0xf0,0x67,0x60, - 0x45,0xe0,0x1b,0xc0,0x9d,0xc0,0x8c,0x16,0x9f,0xef, - 0x7d,0x60,0x66,0xab,0x41,0x89,0x88,0x88,0x88,0x88, - 0x88,0x54,0x99,0xa6,0x00,0x48,0x11,0x0c,0x01,0xb6, - 0x02,0x36,0xc0,0xa6,0x06,0x0c,0x03,0x16,0x02,0x06, - 0x62,0xa3,0xfe,0xa6,0x02,0x9f,0x03,0x1f,0x61,0x55, - 0x04,0xaf,0x03,0x2f,0x00,0xa3,0x81,0x47,0xdb,0xff, - 0x5b,0x44,0x44,0x44,0x44,0x44,0x44,0x1a,0x50,0x02, - 0x40,0x44,0x44,0x44,0x44,0x44,0x44,0xa4,0x06,0x74, - 0x04,0x40,0x44,0x44,0x44,0x44,0x44,0x44,0xa4,0x06, - 0x94,0x00,0x10,0x11,0x11,0x11,0x11,0x11,0x11,0xa9, - 0x01,0x25,0x00,0x44,0x44,0x44,0x44,0x44,0x44,0x44, - 0x6a,0x40,0x09,0x00,0x11,0x11,0x11,0x11,0x11,0x11, - 0x91,0x1a,0x50,0x02,0x40,0x44,0x44,0x44,0x44,0x44, - 0x44,0xa4,0x06,0x94,0x00,0x10,0x11,0x11,0x11,0x11, - 0x11,0x11,0xa9,0x01,0x25,0x00,0x44,0x44,0x44,0x44, - 0x44,0x44,0x44,0x6a,0x40,0x09,0x00,0x11,0x11,0x11, - 0x11,0x11,0x11,0x91,0x1a,0x50,0x02,0x40,0x44,0x44, - 0x44,0x44,0x44,0x44,0xa4,0x06,0x94,0x00,0x10,0x11, - 0x11,0x11,0x11,0x11,0x11,0xa9,0x01,0x25,0x00,0x44, - 0x44,0x44,0x44,0x44,0x44,0x44,0x6a,0x40,0x09,0x00, - 0x11,0x11,0x11,0x11,0x11,0x11,0x91,0x1a,0x50,0x02, - 0x40,0x44,0x44,0x44,0x44,0x44,0x44,0xa4,0x06,0x94, - 0x00,0x10,0x11,0x11,0x11,0x11,0x11,0x11,0xa9,0x01, - 0x25,0x00,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x6a, - 0x40,0x09,0x00,0x11,0x11,0x11,0x11,0x11,0x11,0x91, - 0x1a,0x50,0x02,0x40,0x44,0x44,0x44,0x44,0x44,0x44, - 0xa4,0x06,0x94,0x00,0x10,0x11,0x11,0x11,0x11,0x11, - 0x11,0xa9,0x01,0x25,0x00,0x44,0x44,0x44,0x44,0x44, - 0x44,0x44,0x6a,0x40,0x09,0x00,0x11,0x11,0x11,0x11, - 0x11,0x11,0x91,0x1a,0x50,0x02,0x40,0x44,0x44,0x44, - 0x44,0x44,0x44,0xa4,0x06,0x94,0x00,0x10,0x11,0x11, - 0x11,0x11,0x11,0x11,0xa9,0x01,0x25,0x00,0x44,0x44, - 0x44,0x44,0x44,0x44,0x44,0x6a,0x40,0x09,0x00,0x11, - 0x11,0x11,0x11,0x11,0x11,0x91,0x1a,0x50,0x02,0x40, - 0x44,0x44,0x44,0x44,0x44,0x44,0xa4,0x06,0x94,0x00, - 0x10,0x11,0x11,0x11,0x11,0x11,0x11,0xa9,0x01,0x25, - 0x00,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x6a,0x40, - 0x09,0x00,0x11,0x11,0x11,0x11,0x11,0x11,0x91,0x1a, - 0x50,0x02,0x40,0x44,0x44,0x44,0xea,0x64,0x38,0xd0, - 0x16,0xf0,0xf5,0x9d,0x5c,0xa2,0x14,0x11,0x11,0x89, - 0x40,0x09,0x00,0x11,0x11,0x11,0xa9,0x93,0x8f,0x81, - 0xe9,0x01,0xeb,0x7f,0x06,0xac,0x1b,0x29,0x16,0x11, - 0x11,0x91,0x4c,0x29,0x01,0x20,0x12,0xc7,0x5c,0x84, - 0xed,0x30,0x85,0x7c,0x2d,0x95,0xdd,0xb7,0xd1,0xd0, - 0x18,0x1a,0xc7,0x79,0x77,0x7e,0xa1,0x65,0x62,0x29, - 0xe2,0xfd,0x1d,0xcf,0x95,0xdd,0xb7,0x21,0x52,0x3b, - 0x4f,0x03,0xdb,0x02,0x9f,0x3a,0xd7,0xf7,0x07,0xae, - 0x01,0xe6,0x8e,0x16,0x91,0x94,0xd9,0x49,0xf8,0xde, - 0xd7,0xf7,0xcd,0x2b,0x40,0x91,0x82,0xda,0x17,0xdf, - 0xcf,0xce,0x49,0x79,0x05,0x58,0x55,0x4a,0x00,0x88, - 0x48,0xb3,0xee,0x48,0xf8,0xfd,0xaf,0x00,0x03,0xb3, - 0x08,0x44,0x44,0x24,0xd0,0x9d,0xc0,0x46,0xc0,0xab, - 0xce,0xf5,0xcb,0x02,0x17,0xc4,0x0b,0x47,0x44,0x44, - 0x24,0x1b,0x4a,0x00,0x88,0x48,0xb3,0x92,0x12,0x00, - 0xfd,0xb1,0xb3,0xb6,0x22,0x22,0x45,0x34,0x1a,0xd8, - 0x10,0xf8,0x8f,0x73,0xfd,0xde,0xc0,0x81,0xf1,0xc2, - 0x11,0x11,0x11,0x89,0x4f,0x09,0x00,0x11,0x69,0xd6, - 0xdd,0xc0,0xcc,0x84,0x35,0x5b,0x67,0x11,0x88,0x88, - 0x48,0x93,0x3e,0x04,0xbe,0x0a,0x5c,0xed,0x5c,0xff, - 0x7b,0x60,0xa5,0x78,0xe1,0x88,0x88,0x88,0xc4,0x95, - 0x56,0x02,0x60,0x6b,0xfc,0x67,0x5b,0x67,0x00,0xeb, - 0xa7,0xf4,0xba,0x59,0x59,0x0f,0x8b,0xdb,0xfb,0x3d, - 0x16,0xf5,0xa6,0xe7,0x27,0xc4,0x3b,0xb3,0x9c,0xe7, - 0xd7,0xe4,0x14,0xff,0x8c,0xc4,0x6f,0x2c,0xf0,0x48, - 0xc2,0x9a,0xa2,0xfe,0x2c,0x48,0xb6,0x7a,0x61,0xe7, - 0xae,0xbd,0x3f,0xd3,0xf7,0xe4,0x12,0xa5,0xd4,0xd5, - 0x14,0x60,0x1f,0xe0,0x34,0xc7,0xda,0x81,0x58,0x3f, - 0x80,0x01,0x51,0x23,0x12,0x11,0x11,0x89,0x24,0xad, - 0x04,0xc0,0xed,0xc0,0xe5,0x01,0xaf,0x79,0x21,0xd0, - 0x27,0xa5,0xd7,0x8e,0xad,0x37,0x76,0xee,0xcf,0xfb, - 0x67,0x75,0x05,0xf6,0xe7,0x21,0x52,0x07,0x49,0xff, - 0xd6,0x57,0x06,0x16,0xcf,0x22,0x10,0x29,0xb4,0x1d, - 0x80,0xd5,0x02,0xd6,0x6f,0x86,0x9d,0xcf,0x16,0xc9, - 0xd2,0x29,0x58,0x53,0xaa,0x29,0x09,0xeb,0xd6,0x00, - 0x7e,0x15,0x3f,0x1c,0x11,0x11,0x91,0xf4,0xa5,0x79, - 0x04,0xe0,0x3b,0x58,0x29,0x9d,0xc7,0xda,0xc0,0xd1, - 0x29,0xbe,0x76,0x4c,0x47,0xe0,0x1f,0xff,0xf3,0x21, - 0x70,0x5c,0xc4,0x58,0x44,0x8a,0x26,0xa9,0x0f,0x00, - 0xa8,0x0a,0x40,0xe0,0x07,0x4d,0x3c,0xe6,0x87,0xa9, - 0x47,0x21,0x92,0xec,0x2a,0x60,0x0b,0xe0,0xa3,0x84, - 0x75,0x87,0x03,0xbb,0xc6,0x0f,0x47,0x44,0x44,0x24, - 0x5d,0x69,0x26,0x00,0x3e,0x26,0xec,0xa6,0xfe,0x34, - 0x8a,0xbf,0x33,0xb8,0x10,0xf0,0xd3,0x80,0xf5,0xc7, - 0x62,0x7f,0x0e,0x22,0x5e,0xa7,0x02,0x43,0x02,0xbf, - 0xde,0xc8,0x25,0xd2,0xee,0x3d,0x08,0x4c,0x48,0x58, - 0x53,0xd5,0x04,0xc0,0x1b,0x84,0xff,0xdd,0x9d,0x9a, - 0x4b,0xa4,0xf9,0x6a,0x76,0x37,0x7f,0x7b,0x60,0xf5, - 0x94,0x63,0x11,0xf1,0x78,0x00,0x6b,0x0e,0xf8,0x7c, - 0xc2,0xba,0x8b,0x81,0x61,0xf1,0xc3,0x11,0x11,0x11, - 0x49,0x4f,0xda,0x4d,0x00,0xff,0x02,0xdc,0xe2,0x5c, - 0x3b,0x17,0x70,0x6e,0xca,0xaf,0x9f,0xb6,0x5f,0x01, - 0x83,0x9d,0x6b,0x6f,0xc5,0xdf,0x44,0x48,0xa4,0xc3, - 0x64,0x60,0x5c,0xe0,0x57,0x52,0xe3,0xbd,0x2c,0x4d, - 0x03,0xee,0x4d,0x58,0xb3,0x05,0xd5,0x6c,0x38,0x3a, - 0x93,0xf0,0xbf,0xbb,0x3a,0xf6,0xab,0x68,0x66,0xf7, - 0x1f,0xac,0x6f,0x40,0xb3,0x8f,0x15,0x69,0xd5,0x2b, - 0x58,0xe2,0xea,0xae,0x06,0x6b,0x86,0x60,0x9f,0xfb, - 0x7d,0x33,0x89,0x48,0x44,0x44,0x24,0x05,0x31,0x2e, - 0xca,0x0f,0x07,0x3e,0x73,0xae,0xdd,0xa9,0xfd,0xab, - 0x88,0x36,0xc7,0x46,0xfe,0x78,0x4c,0x00,0x0e,0x8b, - 0x18,0x8b,0x48,0x91,0x25,0x1d,0x03,0x18,0x0a,0xac, - 0x93,0x45,0x20,0x52,0x38,0x6b,0x03,0x5f,0x6b,0xf0, - 0xfb,0x9f,0x24,0x3c,0xfe,0xeb,0xc0,0x32,0xe9,0x85, - 0x23,0x12,0x64,0x1c,0xb0,0x0d,0x70,0x51,0x83,0x35, - 0x5f,0xc6,0xd7,0x3c,0x50,0x44,0x44,0xa4,0x10,0x62, - 0x24,0x00,0xde,0x24,0x6c,0xd7,0xe6,0xf7,0xc0,0xa0, - 0x08,0x71,0xb4,0xa2,0x3f,0x70,0x5e,0xc0,0xfa,0x93, - 0x80,0xd7,0x23,0xc5,0x22,0x52,0x74,0x9e,0xa6,0x97, - 0x5b,0x45,0x8f,0x42,0x8a,0x28,0xe9,0xb3,0xe0,0x17, - 0x58,0xf5,0x54,0x4f,0xfa,0x00,0xdf,0x4f,0x2f,0x1c, - 0x91,0x60,0xd3,0x81,0x43,0xb0,0x7f,0x87,0x3d,0x55, - 0x5f,0x9d,0x80,0x55,0x3a,0x89,0x88,0x88,0x14,0x5e, - 0xac,0xb2,0xdc,0xf3,0xb0,0x33,0x74,0x1e,0x4b,0x50, - 0xbc,0xec,0xf9,0xf1,0xf8,0xe7,0xfc,0xfe,0x0f,0x4b, - 0x62,0x48,0x7e,0xc6,0xe5,0x1d,0x40,0xcd,0x8d,0x06, - 0xde,0x4e,0x58,0x53,0xd5,0x3e,0x00,0xd2,0xb3,0x15, - 0x80,0xdd,0x1a,0xfc,0xfe,0x04,0x6c,0x22,0xcc,0xd9, - 0x09,0xcf,0x33,0x02,0x58,0x24,0xa5,0x98,0x44,0x9a, - 0x75,0x36,0xf6,0xef,0xf9,0xf3,0x6e,0x7e,0xaf,0x37, - 0x70,0x25,0xb0,0x60,0xa6,0x11,0x89,0x88,0x88,0x34, - 0x21,0xd6,0xb9,0xb5,0x36,0xe0,0x5b,0xc0,0x13,0xd8, - 0x6e,0x7a,0x92,0x63,0xb0,0xf1,0x79,0x4f,0x44,0x8a, - 0x27,0xc4,0xd2,0xc0,0x8f,0x9c,0x6b,0xa7,0x01,0x07, - 0x53,0xac,0x33,0xd9,0x8d,0xdc,0x0f,0x9c,0x95,0x77, - 0x10,0x0e,0x03,0x81,0x6f,0xe3,0x4b,0x50,0xb5,0x01, - 0x07,0xc6,0x0d,0x47,0x1c,0xee,0xc0,0x6e,0xd4,0x7a, - 0xf2,0x65,0xac,0xd2,0x67,0x62,0x26,0xd1,0x48,0x11, - 0x7c,0x9f,0xc6,0x3f,0xc3,0x97,0x60,0xc9,0xbb,0xbb, - 0x81,0xc7,0xe8,0xf9,0x98,0xc8,0x1c,0xd8,0x94,0x99, - 0xe3,0x53,0x8d,0x4e,0x24,0xdc,0xdf,0x80,0x4d,0x80, - 0x7f,0xc0,0xff,0x63,0xef,0xbe,0xc3,0x24,0xa9,0xaa, - 0xff,0x8f,0xbf,0x87,0x9d,0xcd,0x79,0x59,0xb2,0xe4, - 0x25,0x67,0x24,0x49,0x12,0x90,0x20,0x08,0xfc,0xc8, - 0x22,0x82,0x64,0x10,0x05,0x51,0x92,0x80,0x28,0x19, - 0x24,0x29,0x02,0x22,0x51,0x50,0x01,0x41,0x40,0x04, - 0x41,0x71,0x09,0x92,0x11,0x45,0x72,0x66,0x85,0x25, - 0xa7,0x5d,0x60,0x97,0xcd,0xa9,0x7e,0x7f,0x9c,0x9e, - 0x2f,0xc3,0x6c,0x77,0xd7,0xa9,0xee,0xba,0x55,0xd5, - 0x5d,0x9f,0xd7,0xf3,0xf4,0xc3,0xc3,0xce,0x9d,0xaa, - 0x33,0x1d,0xaa,0xeb,0x9e,0x7b,0xef,0xb9,0x2c,0xdc, - 0xe3,0x67,0x0b,0x62,0xdb,0x21,0x6f,0x8d,0x7d,0x2f, - 0x89,0x88,0x88,0x14,0x52,0xc8,0xc2,0x35,0x2f,0x62, - 0x15,0xf4,0x3d,0xa3,0xfb,0xbd,0xb0,0x91,0xa0,0xaf, - 0x90,0x7f,0x67,0xfa,0x02,0xa0,0xbf,0xb3,0xed,0xd9, - 0xc0,0xb3,0x01,0x63,0x49,0xdb,0xdd,0x95,0x47,0xd1, - 0xfd,0x1e,0xff,0xec,0x94,0x33,0x81,0xbf,0x05,0x8c, - 0x45,0x7c,0xe2,0x12,0x00,0x7d,0x80,0x4d,0xf0,0x17, - 0x09,0x95,0xd6,0xb6,0x08,0xb0,0x57,0x9d,0x9f,0xcf, - 0x06,0xce,0xef,0xf6,0xff,0xe7,0x61,0xdb,0xaf,0xd5, - 0xf2,0x5d,0xe0,0x0c,0xe0,0x93,0xe6,0x43,0x13,0x69, - 0xca,0x13,0xd8,0x0e,0x01,0x7f,0x05,0x56,0xef,0xf1, - 0xb3,0xad,0x80,0xa3,0x88,0x9f,0xd5,0x22,0x22,0x22, - 0x92,0x9b,0xd0,0x95,0xb9,0x7f,0x0e,0x3c,0xe7,0x6c, - 0xbb,0x0e,0x56,0x40,0x30,0x4f,0x3b,0x00,0xdb,0x3a, - 0xdb,0xbe,0x0c,0x9c,0x1a,0x30,0x96,0xb2,0x3a,0x98, - 0xfa,0x1d,0x87,0xee,0xee,0x05,0x7e,0x16,0x30,0x16, - 0xf1,0xbb,0x9b,0xf8,0x51,0x2f,0x2d,0x03,0x28,0x8f, - 0x23,0xa8,0x3f,0xfb,0xeb,0x66,0x60,0x6c,0xb7,0xff, - 0xff,0x13,0xf5,0xb7,0xb7,0x1c,0x04,0x1c,0xd6,0x7c, - 0x58,0x22,0xa9,0x78,0x9b,0xcf,0x67,0x02,0xf4,0xf4, - 0x8d,0x8c,0x63,0x11,0x11,0x11,0x49,0x24,0x74,0x02, - 0x20,0xe9,0x14,0xf9,0xd3,0xc9,0x6f,0xad,0xe7,0x40, - 0xe0,0x57,0xce,0xb6,0x11,0x56,0x14,0x68,0x7a,0xb8, - 0x70,0x4a,0xe9,0xcb,0xf8,0x5f,0x83,0xf7,0xb0,0x5d, - 0x1a,0x66,0x87,0x0b,0x47,0x12,0xf8,0x10,0x78,0x3a, - 0xa6,0x8d,0x12,0x00,0xe5,0x30,0x02,0xbb,0x3e,0xd6, - 0x73,0x5e,0x8f,0xff,0x9f,0xc5,0x17,0x67,0x04,0x54, - 0xf3,0x03,0x8a,0x57,0x30,0x56,0xca,0x6b,0x12,0xb0, - 0x3d,0xb6,0x5d,0x65,0xf7,0xc7,0x26,0x39,0xc6,0x24, - 0x22,0x22,0x12,0x2b,0x8b,0xbd,0xb9,0x1f,0xc3,0x5f, - 0x24,0x6f,0x28,0xf1,0x37,0x81,0xa1,0x9c,0x08,0x2c, - 0xe6,0x6c,0x7b,0x39,0xf0,0x40,0xc0,0x58,0xca,0x68, - 0x38,0x70,0x13,0xb6,0xde,0x37,0xce,0x2c,0xe0,0x9b, - 0xc0,0x07,0x41,0x23,0x92,0xa4,0xe2,0xb6,0x03,0x5c, - 0x1e,0x2b,0xfa,0x29,0xed,0xed,0x30,0x6c,0xc4,0xbe, - 0x96,0x87,0xb0,0xe2,0xa9,0x3d,0x5d,0x01,0x4c,0xa8, - 0xf3,0x7b,0xf3,0x12,0x9f,0x58,0x10,0x11,0x11,0x11, - 0x91,0x3a,0xb2,0x48,0x00,0x80,0x15,0xd5,0xf3,0x6e, - 0x93,0xb7,0x1b,0xb6,0xef,0x6e,0x96,0x56,0x02,0x7e, - 0xe8,0x6c,0xfb,0x2e,0xda,0x96,0x2a,0x6d,0x1d,0xd8, - 0xba,0xff,0x25,0x9c,0xed,0x8f,0x07,0x1e,0x0c,0x16, - 0x8d,0x34,0x2a,0x2e,0x01,0x00,0x9a,0x05,0xd0,0xee, - 0x06,0x12,0x3f,0x55,0xff,0xdc,0x1a,0xff,0xfe,0x19, - 0x70,0x49,0xcc,0xef,0x1e,0x89,0xaf,0xb0,0xac,0x88, - 0x88,0x88,0x88,0x54,0x91,0x55,0x02,0x60,0x32,0xb6, - 0xb6,0xdb,0xeb,0x62,0xfc,0x85,0xf8,0xd2,0x70,0x31, - 0xd0,0xdb,0xd9,0xf6,0x50,0xea,0x8f,0x52,0x49,0x72, - 0xc7,0xe1,0xaf,0xbd,0x70,0x2b,0x2a,0xb0,0x54,0x54, - 0x0f,0x02,0xd3,0x62,0xda,0x28,0x01,0xd0,0xde,0x0e, - 0xc2,0x46,0xea,0x6b,0x79,0x95,0xea,0xeb,0xa6,0xbb, - 0x5c,0x00,0xcc,0xa8,0xf3,0xf3,0x45,0x80,0xef,0x34, - 0x10,0x97,0x88,0x88,0x88,0x88,0x90,0x5d,0x02,0x00, - 0xe0,0x1f,0xd8,0x56,0x7f,0x1e,0x4b,0x92,0x5d,0x71, - 0xb7,0xbd,0x81,0x8d,0x9d,0x6d,0x6f,0xa9,0x3c,0x24, - 0x3d,0x9b,0xe2,0xdb,0x29,0x02,0xe0,0x35,0xea,0x57, - 0x9a,0x97,0x7c,0x4d,0x23,0x7e,0x66,0xc6,0xd7,0xc8, - 0xf6,0xba,0x23,0xd9,0xe9,0x83,0x8d,0xd0,0xd7,0xf3, - 0x4b,0xea,0xd7,0x84,0x79,0x17,0xb8,0x2e,0xe6,0x18, - 0x71,0xdb,0x0b,0x8a,0x88,0x88,0x88,0x48,0x0d,0x59, - 0xdf,0x44,0xfd,0x08,0xf8,0xc8,0xd9,0xf6,0x48,0x6c, - 0x6a,0x7e,0x48,0xc3,0xf1,0x8f,0x26,0x4f,0xc0,0xf6, - 0xa6,0x97,0xf4,0x2c,0x0c,0xfc,0x11,0xdb,0x06,0x32, - 0xce,0x74,0x60,0x57,0x6c,0xdf,0x70,0x29,0xae,0xb8, - 0x65,0x00,0xf3,0x52,0x7b,0xbf,0x77,0x69,0x6d,0x7b, - 0x61,0x23,0xf4,0xb5,0x8c,0x03,0xae,0x76,0x1c,0xa7, - 0xd6,0x12,0x81,0x2e,0xcb,0x00,0xbb,0x38,0x63,0x12, - 0x11,0x11,0x11,0x91,0x6e,0x3a,0x33,0x3e,0xdf,0x78, - 0xe0,0x70,0xe2,0x47,0x78,0xc0,0xa6,0xe4,0x5f,0x82, - 0x8d,0xce,0xc7,0x6d,0x2f,0xd6,0xa8,0x9f,0x03,0xf3, - 0x39,0xdb,0x1e,0x83,0x55,0x9e,0x97,0x74,0x74,0x02, - 0x37,0x00,0x0b,0x38,0xdb,0xff,0x00,0xdb,0x7f,0x59, - 0x8a,0xcd,0x5b,0x07,0xe0,0xf1,0xd0,0x81,0x48,0xa6, - 0xe6,0x21,0xbe,0x36,0xca,0x6f,0x80,0xa9,0x8e,0x63, - 0x3d,0x0f,0xdc,0x49,0xfd,0x5a,0x30,0xc7,0x61,0x5b, - 0x07,0x8a,0x48,0x38,0x9d,0xd8,0x40,0xcc,0x5a,0xc0, - 0x72,0xc0,0xd2,0xc0,0x97,0x80,0x91,0xd8,0x00,0x4a, - 0xdf,0xca,0x23,0xc2,0x66,0x80,0x4d,0xc3,0x76,0x84, - 0x79,0x1f,0xab,0xfb,0xf4,0x1c,0xf0,0x0c,0xf0,0x28, - 0xb6,0x14,0x54,0xfc,0x46,0x02,0x5b,0x00,0xab,0x02, - 0x2b,0x00,0xa3,0x80,0x61,0x58,0x81,0xd5,0x41,0xd8, - 0x52,0xa9,0xc9,0xd8,0xa0,0xc8,0x6b,0xc0,0x18,0xac, - 0xb8,0xea,0x7d,0xf8,0x6b,0x6e,0xb5,0xbb,0x91,0xc0, - 0x06,0xd8,0x36,0xe3,0x4b,0x03,0x4b,0x61,0x3b,0x8d, - 0x0d,0x04,0x06,0x60,0xef,0xef,0xa9,0xd8,0x8e,0x1e, - 0xef,0x03,0x6f,0x61,0xef,0xd9,0xa7,0x80,0xfb,0x51, - 0xa1,0xe9,0x61,0xd8,0xae,0x26,0x1b,0x62,0x9f,0xff, - 0x51,0xd8,0x20,0xce,0x20,0x6c,0xc6,0xdf,0x64,0xac, - 0x76,0xcf,0x04,0xec,0xfd,0xf7,0x12,0xf6,0x79,0xbf, - 0x0b,0xbb,0x0e,0x48,0x81,0x65,0x9d,0x00,0x00,0x1b, - 0xf1,0xfd,0x36,0xbe,0xbd,0x72,0x37,0x04,0xf6,0xc7, - 0xaa,0x43,0xa7,0x6d,0x5d,0x6c,0x8b,0x42,0x8f,0x07, - 0xb0,0xca,0xff,0x92,0x9e,0x9f,0x63,0xaf,0xaf,0xc7, - 0x1f,0x80,0xcb,0x02,0xc6,0x22,0xe9,0x79,0x1a,0xbb, - 0xf0,0xcf,0x5f,0xa7,0xcd,0x96,0xc0,0x19,0xd9,0x84, - 0x23,0x19,0xd9,0x19,0x58,0xb6,0xce,0xcf,0xa7,0x03, - 0xbf,0x4e,0x70,0xbc,0x73,0xa8,0x9f,0x00,0x58,0x1d, - 0xd8,0x1a,0xf8,0x7b,0x82,0x63,0x8a,0x48,0xbc,0x21, - 0xd8,0x0c,0x9b,0xed,0xb1,0x25,0x5b,0xf5,0x76,0xf4, - 0xe8,0xae,0xab,0x63,0x3a,0x12,0x58,0xb1,0xc7,0xcf, - 0x66,0x62,0x3b,0x42,0xdd,0x00,0x5c,0x8f,0xcd,0x06, - 0x92,0xb9,0x0d,0x00,0xf6,0x05,0xf6,0xc4,0x3a,0xad, - 0xf5,0x66,0xe9,0xf6,0xaf,0x3c,0x46,0x62,0x1d,0xb3, - 0x2d,0x81,0xef,0x55,0x7e,0xf6,0x1c,0x70,0x15,0x56, - 0x5c,0xb9,0x6c,0xcf,0xf5,0x62,0xc0,0xb7,0x80,0xdd, - 0xb1,0xef,0x89,0x38,0x5d,0xef,0xdb,0x05,0x2b,0xed, - 0xb7,0xeb,0xf6,0xb3,0x67,0xb0,0x3e,0xcb,0x35,0xc0, - 0xdb,0xe9,0x86,0x59,0x58,0x9d,0xc0,0x0e,0x58,0x3d, - 0x9f,0xb8,0x25,0x9b,0x43,0x2a,0x8f,0x45,0xb0,0xcf, - 0xfc,0xf6,0x95,0x7f,0x8f,0xb0,0x41,0x9e,0x6b,0x81, - 0x2b,0xb1,0x04,0x8b,0x14,0x4c,0x5e,0xeb,0x28,0x0f, - 0xc1,0xb2,0x46,0x1e,0x67,0xe1,0x1f,0xa5,0xf7,0xea, - 0x85,0x8d,0x46,0x79,0xfe,0xfe,0xe9,0xd8,0x07,0x21, - 0xd4,0x2c,0x84,0x32,0xda,0x91,0xf8,0xb5,0xc2,0x5d, - 0x9e,0x03,0xbe,0x1b,0x30,0x16,0x49,0x57,0x04,0xdc, - 0x1d,0xd3,0xe6,0x2b,0x68,0x3f,0xf7,0x76,0x73,0x6c, - 0xcc,0xcf,0xff,0x40,0xb2,0xd1,0x94,0x7b,0x89,0x9f, - 0xf1,0x73,0x7c,0x82,0xe3,0x89,0x48,0x7d,0xcb,0x62, - 0x37,0xeb,0xef,0x57,0xfe,0xfb,0xff,0xf0,0x77,0xfe, - 0xe3,0xf4,0xc6,0x12,0xfe,0x17,0x02,0xef,0x60,0x09, - 0xfd,0xa5,0x52,0x3a,0x76,0x2b,0xa9,0x75,0x1f,0xd9, - 0x1b,0xdb,0x2d,0xeb,0x2d,0xe0,0x22,0x60,0x3d,0x9a, - 0xbb,0x3f,0x5f,0x19,0x38,0x0f,0x78,0x1d,0x38,0x89, - 0xf4,0x5e,0xc7,0x22,0x5b,0x05,0x4b,0x2e,0xbd,0x8e, - 0x0d,0x30,0x79,0x3a,0xff,0x71,0x56,0x05,0xce,0xac, - 0x1c,0xf3,0x1a,0xea,0x27,0xb9,0xdb,0xc1,0x4e,0xc0, - 0x0b,0xc0,0x8d,0xd8,0xec,0x93,0x46,0xdf,0x83,0x1d, - 0xc0,0xda,0xd8,0xb6,0xee,0x6f,0x61,0xef,0x41,0xcf, - 0x16,0xdf,0x92,0xa1,0xbc,0x12,0x00,0x6f,0xe1,0xbf, - 0x79,0x1b,0x01,0xfc,0x22,0xe5,0xf3,0x7f,0x1f,0x58, - 0xc3,0xd9,0xf6,0x54,0xe0,0xe5,0x94,0xcf,0x5f,0x66, - 0xa3,0xf0,0xad,0x03,0x06,0x4b,0x12,0xed,0x02,0x4c, - 0x09,0x16,0x8d,0x84,0x10,0xb7,0x0c,0xa0,0x0f,0x56, - 0xfc,0x51,0xda,0xc3,0x96,0xd4,0xaf,0xeb,0x10,0xd1, - 0xd8,0x35,0xfc,0xbc,0x98,0x9f,0x6f,0x88,0x7f,0x16, - 0x91,0x88,0x54,0x37,0x1c,0xdb,0x09,0xe9,0x45,0x60, - 0x3f,0xc2,0xef,0xc0,0xd4,0x07,0x38,0x10,0xeb,0x68, - 0x9c,0x48,0xb9,0xb6,0xf5,0xac,0x56,0x00,0x75,0x75, - 0xe0,0x3f,0xc0,0x69,0xd8,0xfd,0x6e,0x9a,0x06,0x61, - 0xcf,0xf1,0xd3,0xd8,0xac,0xd7,0x76,0x34,0x14,0x4b, - 0x28,0x3d,0x0d,0x7c,0x93,0x30,0xfd,0x9a,0x4e,0x6c, - 0xe6,0xf2,0x73,0xd8,0xf7,0x52,0x96,0xbb,0x94,0x65, - 0x61,0x38,0xf0,0x67,0xe0,0x66,0xac,0xc6,0x4e,0x9a, - 0x86,0x61,0xef,0xc1,0x27,0xb0,0xa4,0x40,0x4f,0x1a, - 0x5c,0xcd,0x49,0x9e,0x95,0x94,0x2f,0x06,0x1e,0x71, - 0xb6,0xdd,0x13,0x9b,0x8a,0x92,0x86,0x85,0xb0,0x4e, - 0xbd,0xc7,0xb3,0xc0,0xd9,0x29,0x9d,0x57,0xec,0xa2, - 0x79,0x13,0x36,0x65,0xc8,0xe3,0x00,0x94,0x7c,0x69, - 0x45,0xde,0x3a,0x00,0xd2,0x1e,0x8e,0x8b,0xf9,0xf9, - 0xdf,0xb1,0xce,0x45,0x52,0x7f,0x02,0xde,0x6c,0xf2, - 0xdc,0x22,0x52,0xdb,0x46,0x58,0xa7,0xe6,0x10,0xb2, - 0xbf,0x1f,0xec,0x8b,0x8d,0x0c,0x3e,0x80,0x15,0x04, - 0x2e,0x83,0x59,0x3d,0xfe,0x7f,0x73,0xe0,0x61,0x60, - 0xb5,0xc0,0xe7,0x5d,0x0a,0x78,0x88,0xf6,0xdb,0x45, - 0x69,0x13,0xec,0xbb,0xe5,0x40,0x6c,0xd4,0x39,0xb4, - 0xde,0xc0,0x11,0xc0,0x93,0x84,0x7f,0xcd,0xb2,0xb2, - 0x0c,0xd6,0x39,0xdf,0x31,0xf0,0x79,0x56,0xc4,0x76, - 0x89,0xda,0xa1,0xc7,0xbf,0xd7,0xdb,0x15,0x48,0x02, - 0xca,0x33,0x01,0x30,0x07,0xeb,0xe0,0xd5,0xdb,0xf3, - 0xb9,0xbb,0x8b,0x49,0x67,0x0a,0xc9,0x2f,0xf0,0x75, - 0x40,0xbb,0xe2,0x9b,0x99,0xc2,0x39,0xc5,0x5c,0x8c, - 0xff,0xa2,0x79,0x21,0x2a,0xf2,0xd5,0xaa,0xde,0x21, - 0xbe,0xc3,0xa7,0x04,0x40,0x7b,0x58,0x0f,0xbb,0x09, - 0xab,0x27,0xae,0xaa,0x7f,0x2d,0xb3,0xb0,0x29,0x84, - 0xf5,0x6c,0x43,0xfb,0xdc,0x88,0x89,0x64,0x69,0x4f, - 0x6c,0xa9,0x4d,0xde,0x9d,0xef,0x75,0xb1,0xe2,0x75, - 0x4b,0xe7,0x1c,0x47,0x16,0xba,0xdf,0x4f,0x6e,0x03, - 0xdc,0x8e,0xad,0xfb,0xcf,0x42,0x27,0xf0,0x5b,0xe0, - 0xe0,0x8c,0xce,0x17,0xda,0x41,0xc0,0x68,0x6c,0x50, - 0x2f,0x6b,0xcb,0x61,0x89,0x9b,0xed,0xe3,0x1a,0x16, - 0xdc,0x0a,0x58,0x02,0x6e,0x89,0x8c,0xce,0xd7,0x17, - 0x1b,0x04,0xfc,0x76,0xb7,0x7f,0x53,0x1f,0x2b,0x27, - 0x79,0xef,0xa5,0xfc,0x22,0x70,0xba,0xb3,0xed,0xb2, - 0x34,0xbf,0xe6,0x73,0x73,0xac,0x30,0x88,0xc7,0x85, - 0xd8,0x97,0x92,0xa4,0xe3,0x00,0xfc,0xd9,0xe7,0xc7, - 0xf0,0xd7,0x08,0x90,0x62,0x8a,0x9b,0x05,0xb0,0x1c, - 0x56,0xac,0x47,0x5a,0x5b,0xdc,0x08,0xfc,0x93,0xc0, - 0x3f,0x9b,0x38,0xfe,0xe5,0xc4,0x6f,0xfd,0xa9,0x59, - 0x00,0x22,0xc9,0xec,0x81,0x15,0x88,0xcb,0xa3,0x10, - 0x74,0x35,0x8b,0x60,0xc9,0x88,0x05,0xf3,0x0e,0x24, - 0xb0,0xae,0x01,0xaf,0x65,0xb0,0xf5,0xea,0x59,0xaf, - 0x8b,0xee,0xc0,0x8a,0xb1,0x6e,0x91,0xf1,0x79,0xd3, - 0x76,0x04,0x70,0x29,0x36,0x22,0x9f,0x97,0x81,0xd8, - 0x94,0xf9,0x9d,0x72,0x8c,0xa1,0x19,0x23,0xb1,0xd9, - 0x79,0x59,0x7f,0xe6,0x7a,0x61,0x89,0xa8,0xae,0x25, - 0x29,0x3d,0x67,0xc5,0x48,0x46,0x8a,0x70,0xf1,0x3f, - 0x13,0xd8,0x0d,0xdb,0x6a,0x26,0xce,0xb1,0xd8,0x16, - 0x82,0x8d,0x4c,0x0b,0xef,0x8b,0xbf,0x0a,0xf5,0x1b, - 0x58,0x41,0x16,0x49,0xc7,0xea,0x58,0x42,0xc5,0x63, - 0x3c,0xb0,0x2b,0xca,0x0a,0xb6,0xba,0xd1,0xd8,0xd6, - 0x8d,0xf5,0x6c,0x49,0x98,0x1d,0x3e,0x24,0x1b,0x2b, - 0xf1,0xc5,0x8a,0xc9,0xd5,0xc4,0xad,0xe3,0x8f,0x33, - 0x09,0xbb,0xd1,0xfb,0x71,0x9d,0x36,0xbb,0x60,0xb5, - 0x45,0xc6,0x34,0x79,0x2e,0x91,0x32,0x58,0x07,0xbb, - 0x01,0x6f,0x64,0xca,0xf4,0x4c,0x3e,0xdf,0xee,0xeb, - 0x63,0xec,0xf3,0x39,0x09,0x5b,0xde,0x37,0x0c,0x5b, - 0x4b,0xbc,0x32,0x8d,0xad,0x23,0x5e,0x0c,0xeb,0x14, - 0x7f,0x0d,0x98,0xdd,0xc0,0xef,0xb7,0x82,0xa9,0x40, - 0x3f,0x6c,0x14,0x74,0xb0,0xa3,0xfd,0x04,0xe0,0x55, - 0xac,0x02,0xfd,0x64,0xac,0xb3,0x34,0x18,0xdb,0x8a, - 0x71,0x39,0x6c,0xfd,0x7b,0x52,0xbd,0xb0,0xe7,0x79, - 0x35,0x5a,0xb3,0xb2,0xfd,0x01,0x34,0xfe,0xbd,0x32, - 0x1b,0xbb,0xbf,0xff,0x10,0x7b,0x3e,0xfb,0x62,0xef, - 0xdb,0x91,0x34,0xd6,0x11,0xee,0xe4,0xf3,0xf7,0xec, - 0x83,0x0d,0xc6,0x94,0x87,0x0e,0x2c,0xee,0xc5,0x1b, - 0xf8,0xdd,0x0f,0xb0,0x64,0xdd,0x73,0xc0,0x58,0xac, - 0x56,0x57,0x07,0x96,0x10,0x59,0x08,0xfb,0x2e,0x5e, - 0x0f,0x7b,0x7f,0xd5,0x1a,0x64,0xee,0x83,0x25,0x4f, - 0xd6,0x40,0x09,0x80,0xdc,0x14,0x21,0x01,0x30,0x13, - 0xfb,0x40,0x3f,0x4c,0xfc,0x8c,0x84,0x3e,0x58,0xf5, - 0xfe,0xcd,0x1a,0x38,0xcf,0x31,0xf8,0x2b,0x78,0x1e, - 0x82,0xf6,0xac,0x4d,0xcb,0x50,0xec,0x83,0xde,0xcf, - 0xd1,0x36,0xc2,0xa6,0x25,0xbe,0x15,0x34,0x22,0xc9, - 0xc2,0xfd,0xd8,0x67,0xbb,0x5e,0x86,0x5e,0x09,0x80, - 0xd6,0x76,0x2c,0xf5,0x3b,0x11,0x6f,0x61,0xdb,0x7e, - 0x35,0xeb,0x02,0xe0,0x47,0xd4,0x2e,0x16,0xd6,0x0b, - 0x4b,0x10,0x1c,0x98,0xc2,0xb9,0x44,0xda,0x59,0x7f, - 0x6c,0x47,0x8e,0x24,0x23,0xcf,0x13,0xb0,0x81,0x97, - 0x9b,0xb0,0x4e,0x8e,0x27,0x39,0x3f,0x12,0xbb,0x4f, - 0x3b,0x1c,0x58,0x3f,0xc1,0xb9,0xbe,0x0a,0x1c,0x46, - 0xfc,0xd2,0x9f,0x56,0x35,0x15,0xbb,0x56,0xad,0x5a, - 0xa7,0xcd,0xf3,0xd8,0x16,0x7e,0xff,0xc0,0x3a,0x59, - 0xb5,0xcc,0x03,0x7c,0x19,0x1b,0x40,0xdb,0x8f,0x64, - 0x05,0x04,0x47,0x00,0xbf,0xc2,0xb6,0x6f,0x6d,0x25, - 0xeb,0x61,0x4b,0x49,0x93,0x18,0x83,0xbd,0xe7,0xef, - 0xc2,0xb6,0xa6,0xab,0xf5,0xfe,0x5d,0xa8,0x72,0xfc, - 0x5d,0xb1,0xa4,0xb2,0x77,0x76,0x41,0x6f,0xec,0xb3, - 0xb1,0x3a,0xf0,0x5e,0xc2,0xd8,0xf2,0x72,0x30,0xc9, - 0xeb,0xaa,0xdd,0x85,0x6d,0xcf,0x7b,0x37,0xbe,0xc2, - 0x7d,0x23,0xb1,0xa9,0xfe,0x87,0x51,0x7d,0x79,0xcf, - 0x22,0x58,0x8d,0xb5,0x34,0xee,0x11,0xa4,0x01,0x79, - 0x2f,0x01,0xe8,0xf2,0x2f,0x6c,0xeb,0x13,0x8f,0x4d, - 0x81,0xef,0x24,0x3c,0xfe,0x52,0xf8,0x97,0x0f,0x5c, - 0x87,0xf6,0x96,0x4e,0xd3,0xef,0xf0,0x6f,0xf7,0x73, - 0x1a,0x70,0x67,0xc0,0x58,0x24,0x3b,0x93,0x80,0x47, - 0x63,0xda,0xc4,0xed,0x31,0x2b,0xc5,0xb5,0x04,0xf1, - 0xcb,0xa9,0x2e,0x20,0x9d,0xec,0xfe,0xbb,0xd8,0x75, - 0xb9,0x9e,0xef,0x60,0x37,0x14,0x22,0x52,0xdb,0x91, - 0x24,0xdb,0xca,0xec,0x72,0x6c,0x44,0xef,0x7b,0xd8, - 0xa8,0x9f,0x77,0x66,0xde,0x38,0xac,0x86,0xcf,0x06, - 0x58,0x8d,0x90,0x24,0x23,0xcd,0x27,0x01,0xf3,0x26, - 0x68,0xdf,0x4a,0x86,0x02,0x47,0xd7,0xf8,0xd9,0x2b, - 0xd8,0xd6,0x8b,0x5d,0x5b,0xf8,0xd5,0xeb,0xfc,0x83, - 0xd5,0xa9,0xfa,0x4f,0xe5,0x78,0x4b,0xe1,0xbf,0x87, - 0xee,0xb2,0x13,0xad,0x55,0x8b,0x67,0x38,0x36,0x6a, - 0xed,0xed,0x98,0x8f,0xc5,0xbe,0xa3,0x96,0x05,0x4e, - 0xc1,0xee,0x47,0xea,0xbd,0x7f,0xdf,0x03,0x6e,0xc1, - 0x96,0xc7,0x2c,0x86,0xed,0x61,0xef,0x35,0x3f,0x36, - 0x53,0xad,0x15,0xcc,0x8f,0xcd,0xbc,0xf6,0x9a,0x88, - 0x25,0x99,0xb6,0xc4,0x92,0x00,0xde,0xaa,0xfd,0xe3, - 0xb0,0x24,0xd3,0x0a,0xc0,0x51,0xd8,0x96,0xea,0x3d, - 0xed,0x8d,0x25,0xb1,0x24,0x07,0x45,0xba,0xf9,0xfe, - 0x09,0x36,0x35,0xc7,0xe3,0x5c,0x92,0x65,0x3b,0x2f, - 0xc2,0x37,0x02,0x3d,0x1e,0xf8,0x61,0x82,0xe3,0x4a, - 0x7d,0xc7,0x60,0x5f,0x68,0x1e,0x77,0x63,0x5f,0xfc, - 0xd2,0x3e,0xe2,0xea,0x00,0x8c,0x40,0x17,0xff,0x56, - 0x75,0x34,0xf5,0x67,0x90,0x7d,0x86,0x75,0x1e,0xd2, - 0x12,0x57,0x48,0xb0,0x0f,0xaa,0x1b,0x22,0x52,0xcf, - 0x50,0xec,0x46,0xdc,0xeb,0x48,0xac,0xd0,0xda,0xb8, - 0x26,0xcf,0x7b,0x3f,0x76,0x9d,0x8f,0x4b,0x08,0x77, - 0x19,0x8a,0xcd,0xc2,0x6c,0x47,0x67,0x60,0x53,0xa5, - 0x7b,0xfa,0x3d,0x36,0x1d,0xfa,0xb6,0x06,0x8f,0x3b, - 0x01,0x1b,0x69,0xdd,0x8d,0x64,0xcb,0x27,0x7f,0xd6, - 0xe0,0xf9,0xf2,0x70,0x26,0xfe,0x29,0xeb,0xb7,0x60, - 0x53,0xd0,0x6f,0xa0,0xb1,0x6d,0xe6,0xde,0xc7,0x66, - 0xa3,0xee,0x85,0x3f,0x89,0xbd,0x1d,0xf1,0x4b,0xe2, - 0x8a,0xe0,0x68,0x6c,0xd9,0x83,0xc7,0x38,0x6c,0x06, - 0xcf,0x8d,0x4d,0x9c,0x6f,0x26,0x96,0xd0,0xfa,0x0a, - 0xb6,0x7c,0xa0,0xbb,0x0e,0xb4,0xdc,0x3a,0x37,0x45, - 0x4a,0x00,0x4c,0x02,0xbe,0xeb,0x6c,0x3b,0x1f,0x36, - 0x15,0xc5,0x63,0x67,0x60,0x6b,0x67,0xdb,0x1f,0x01, - 0x1f,0x39,0xdb,0x4a,0x7d,0x1b,0x63,0x5f,0x76,0x1e, - 0xef,0x60,0x59,0x57,0x6d,0x07,0xd2,0x5e,0x46,0x3b, - 0xda,0xb4,0xd2,0x08,0x84,0x98,0x05,0xb0,0x29,0xa7, - 0xf5,0x5c,0x8e,0xdd,0x94,0xa6,0xe5,0x79,0xe2,0x67, - 0x07,0x1d,0x44,0xfa,0xfb,0x68,0x8b,0xb4,0x8b,0xef, - 0xe0,0x5f,0x33,0x7e,0x31,0xb6,0x63,0x52,0x5a,0x3e, - 0xc4,0x3a,0x47,0xef,0x38,0xdb,0x7f,0x8f,0x62,0xdd, - 0x9f,0xa6,0x65,0xcd,0x2a,0xff,0xf6,0x2b,0x6c,0x24, - 0x74,0x4a,0x0a,0xc7,0xbf,0x11,0xeb,0xb4,0x7a,0x6d, - 0x80,0xdd,0xab,0x15,0xdd,0xea,0xf8,0x97,0x78,0x5d, - 0x87,0x4d,0xe3,0x9f,0x98,0xc2,0x79,0xaf,0xc1,0x8a, - 0x57,0x7b,0x93,0x08,0xa7,0x93,0xcd,0x76,0x84,0x8d, - 0x1a,0x81,0xbf,0x9f,0x35,0x13,0xf8,0x06,0xf6,0xdd, - 0x9b,0x86,0x27,0xb1,0xd9,0x40,0x9f,0xf4,0xf8,0xf7, - 0xfe,0x29,0x1d,0x5f,0x12,0x2a,0xda,0x05,0xf6,0x4e, - 0xec,0x03,0xe7,0xb1,0x2f,0xb6,0x87,0x6d,0x3d,0x83, - 0xf0,0xaf,0x25,0x1b,0x8d,0xad,0x13,0x92,0xe6,0x2d, - 0x88,0x65,0x5e,0x7b,0x39,0xda,0xce,0x02,0xbe,0x89, - 0x12,0x2f,0xed,0xe8,0x71,0xe6,0xbe,0xd8,0xf7,0xa4, - 0x04,0x40,0xeb,0xf9,0x21,0xf5,0x67,0x54,0xcd,0xc2, - 0x6e,0x6a,0xd3,0x16,0x97,0xf4,0x1d,0x88,0xad,0x39, - 0x16,0x91,0xb9,0xed,0xed,0x6c,0xf7,0x3e,0x61,0x76, - 0xd6,0x48,0x32,0xc3,0x72,0x21,0x92,0xd5,0x0e,0x68, - 0x55,0xb7,0x61,0x03,0x4f,0x69,0xba,0x01,0x7f,0xc1, - 0x6b,0xb0,0x1a,0x5c,0x45,0x77,0x06,0xbe,0xfe,0xca, - 0xe3,0x58,0x72,0x3a,0xcd,0x22,0x92,0xd7,0xe2,0xef, - 0x47,0xac,0x42,0xb1,0x77,0x58,0xd8,0x17,0xeb,0x17, - 0x79,0x9c,0x44,0xfa,0x3b,0xa1,0xbd,0x84,0x0d,0xf6, - 0x49,0x01,0x14,0x2d,0x01,0x00,0x76,0x31,0xf4,0x4c, - 0x39,0xeb,0x00,0x2e,0xa1,0xfe,0x7a,0xa0,0x93,0xb0, - 0x6a,0xa9,0x71,0xa6,0xe0,0xcf,0x8a,0x49,0x7d,0x5d, - 0x15,0x66,0xbd,0x15,0x55,0x8f,0xc5,0x0a,0x40,0x4a, - 0xfb,0x99,0x83,0xad,0x1b,0xad,0xe7,0x2b,0xf8,0xbf, - 0x90,0x24,0x7f,0x43,0x88,0x9f,0x9e,0x7b,0x13,0xf0, - 0x66,0x80,0x73,0xdf,0x0b,0x3c,0x11,0xd3,0xe6,0x50, - 0xf4,0x7e,0x12,0xe9,0x69,0x21,0xaa,0x8f,0x3e,0x57, - 0x73,0x25,0xe9,0x8c,0x9e,0x56,0x73,0x33,0xb6,0xd6, - 0xdd,0x63,0xdb,0x40,0x31,0x14,0xc5,0x47,0x24,0x1b, - 0x5d,0x4e,0xe2,0x78,0x2c,0xe1,0xe2,0xb1,0x13,0xd5, - 0x97,0x25,0x14,0xc5,0x4a,0xf8,0x66,0xf1,0xce,0xc6, - 0x3a,0xff,0xd5,0xd6,0x9a,0x37,0xeb,0xa7,0xf8,0xbf, - 0xd3,0x8a,0xdc,0x97,0xf0,0xd6,0x4f,0x7b,0x93,0xe6, - 0x77,0xf0,0xa9,0xe5,0x4e,0x6c,0xc9,0x8b,0xe4,0xac, - 0x88,0x09,0x80,0x71,0xf8,0x47,0x71,0x56,0xa4,0x76, - 0x41,0x95,0x55,0x12,0x1c,0xe7,0xa7,0xc0,0xeb,0xce, - 0xb6,0x52,0xdf,0x19,0x58,0x25,0x5f,0x8f,0x5b,0x08, - 0x77,0x91,0x91,0x62,0x88,0xab,0x03,0xd0,0x1b,0x2b, - 0xec,0x29,0xad,0xe1,0x7b,0xc4,0x4f,0x23,0x8e,0x5b, - 0xaf,0xdf,0x8c,0xb8,0x63,0x8f,0xc0,0x2a,0x1c,0x8b, - 0xc8,0xe7,0x36,0xc1,0x3f,0x35,0x39,0xe4,0xcd,0x79, - 0x84,0x7f,0x96,0xe7,0x7a,0x01,0xe3,0x28,0x82,0x9f, - 0x10,0x3f,0x43,0xae,0x51,0x13,0xf1,0xdf,0x5b,0x0d, - 0x04,0xb6,0x09,0x14,0x47,0x1a,0xbc,0x33,0x24,0x7e, - 0x0f,0x3c,0x1b,0x28,0x86,0xc9,0xf8,0x67,0xb5,0x6d, - 0x4d,0x31,0x13,0x2a,0xab,0x50,0x7f,0xf7,0x89,0xee, - 0xce,0x25,0x4c,0x22,0xa5,0xcb,0x71,0xc0,0xde,0x03, - 0xd3,0xfe,0x00,0x00,0x20,0x00,0x49,0x44,0x41,0x54, - 0x8c,0x80,0xc7,0x17,0x87,0x22,0x26,0x00,0xc0,0xd6, - 0xf0,0xfc,0xcd,0xd9,0xf6,0x04,0xe6,0xae,0x32,0xdf, - 0x81,0x6d,0x17,0xe8,0xd9,0xe6,0xf0,0x71,0xc2,0x4c, - 0x57,0x2d,0xa3,0xed,0xa9,0x9d,0x90,0xe9,0x69,0x0c, - 0x36,0x1d,0x49,0xda,0x5b,0x5c,0x02,0x00,0xb4,0x0c, - 0xa0,0x55,0xf4,0x23,0x7e,0x0a,0xef,0xfd,0xc0,0x7f, - 0x03,0xc6,0x70,0x23,0xf1,0xc5,0x62,0x8f,0x20,0xd9, - 0x36,0x67,0x22,0xed,0xce,0x5b,0x6c,0xf5,0x43,0xfc, - 0x23,0xf4,0x8d,0xf2,0x7c,0x27,0x80,0x7f,0xc6,0x42, - 0x2b,0x7a,0x07,0xb8,0x3a,0xf0,0x39,0x7e,0x8b,0xbf, - 0x20,0xe0,0x56,0x21,0x03,0x69,0x42,0x5f,0xac,0xb0, - 0xa1,0x47,0x9a,0x35,0x2b,0xaa,0xb9,0x0a,0x98,0xe6, - 0x68,0xd7,0x0f,0xd8,0x3c,0x70,0x2c,0x8d,0xf0,0x26, - 0x79,0xa6,0x12,0x7e,0x39,0xf4,0xbb,0x19,0x9c,0x43, - 0x62,0x14,0x35,0x01,0x00,0x36,0xcd,0x74,0x92,0xa3, - 0x5d,0x7f,0xe6,0xde,0x17,0x74,0x5f,0xac,0xb8,0x49, - 0x9c,0x59,0xd8,0xfa,0xa7,0x34,0xd7,0x0b,0x95,0xd5, - 0x52,0xd8,0x96,0x7f,0x9e,0x51,0x86,0x69,0xd8,0x3e, - 0xab,0x69,0x16,0x09,0x93,0x62,0x7a,0x0d,0xf8,0x5f, - 0x4c,0x1b,0x25,0x00,0x5a,0xc3,0x7e,0x58,0x01,0xc0, - 0x7a,0x42,0xcf,0xe8,0xf1,0xd4,0x17,0x58,0x18,0xff, - 0x7a,0x67,0x91,0x32,0x38,0x15,0xdb,0x5e,0x6e,0x73, - 0x6c,0x6f,0xee,0x23,0xb0,0x3d,0xb8,0x7f,0x87,0x4d, - 0xc9,0x7d,0x0a,0xdb,0x06,0xed,0x3f,0x19,0xc4,0xf2, - 0x24,0xbe,0x7b,0xae,0xc1,0xb4,0x6f,0x51,0xcf,0xdf, - 0x90,0xac,0x5a,0x7f,0x23,0x3e,0x00,0xee,0x71,0xb6, - 0x2d,0xea,0xba,0xf5,0xad,0xb1,0xf7,0x41,0x9c,0x27, - 0x88,0xdf,0x36,0xb1,0x59,0x9f,0x60,0x5b,0x96,0x7b, - 0x6c,0x18,0x32,0x90,0x06,0x79,0x93,0x3c,0xa3,0x81, - 0x4f,0x43,0x06,0x52,0xf1,0xdb,0x0c,0xce,0x21,0x75, - 0x78,0x46,0xc8,0xf3,0xf2,0x26,0x36,0x4d,0xe4,0x42, - 0x47,0xdb,0xad,0xb0,0xfd,0x3e,0xaf,0xc7,0xbe,0x30, - 0xce,0x72,0x9e,0xe3,0x5c,0xe0,0xe9,0x86,0xa2,0x93, - 0xee,0xfa,0x61,0xeb,0x7e,0xbd,0x5b,0x8b,0x1c,0x8a, - 0x9e,0xf7,0x32,0xb9,0x0b,0x58,0xba,0xce,0xcf,0x97, - 0xc5,0xb6,0xf7,0xf1,0x6e,0x03,0x2a,0xd9,0xeb,0x24, - 0x7e,0x76,0xcf,0xcb,0xc0,0xed,0x19,0xc4,0x72,0x39, - 0xb6,0x7d,0x55,0xbd,0xeb,0xcd,0x31,0xd8,0x5a,0x66, - 0x25,0x77,0x45,0x2c,0xd9,0x3e,0x81,0xf4,0x2a,0x7a, - 0x37,0x63,0x3a,0xb6,0xe4,0x72,0x94,0xa3,0xed,0xa2, - 0xc0,0xc7,0x61,0xc3,0xc9,0xc5,0x1f,0x33,0x3a,0xcf, - 0xed,0xc0,0xd7,0x1d,0xed,0x16,0x03,0x16,0xc1,0xbf, - 0x4b,0x43,0x56,0x76,0x72,0xb6,0xbb,0x39,0x68,0x14, - 0x9f,0x7b,0x00,0xdb,0x91,0x60,0x7c,0xcc,0x23,0xf4, - 0x2c,0x9a,0xa4,0xfa,0xe0,0x2f,0xaa,0x99,0xc5,0x77, - 0x38,0xd8,0xb6,0xa0,0x6f,0x62,0xef,0x3d,0xc9,0x41, - 0x91,0x67,0x00,0x80,0x8d,0xec,0x7b,0xf7,0x8e,0xfd, - 0x25,0xb6,0x36,0xf5,0x2c,0x60,0xa4,0xa3,0xfd,0x18, - 0xe0,0xe4,0x06,0xe3,0x92,0x2f,0xba,0x10,0xdb,0xc3, - 0xd6,0xe3,0x6a,0xec,0xc6,0x5c,0xca,0x43,0xcb,0x00, - 0x5a,0xdf,0xee,0xc0,0x12,0x31,0x6d,0x7e,0x41,0x98, - 0x82,0x56,0x3d,0x4d,0x02,0x2e,0x8d,0x69,0xb3,0x34, - 0xfe,0xa9,0xa3,0x22,0x92,0xad,0xf7,0x9d,0xed,0x86, - 0x04,0x8d,0x22,0x1f,0x4f,0x63,0x33,0xe3,0xb2,0x70, - 0x7f,0x82,0xb6,0x45,0x5c,0x72,0xb1,0x89,0xb3,0xdd, - 0xdd,0x21,0x83,0xe8,0xe6,0x44,0x60,0x38,0x96,0xbc, - 0x5a,0x17,0x9b,0x56,0xbf,0x17,0xb6,0x34,0xee,0x54, - 0xac,0xcf,0x72,0x03,0x36,0xcb,0xa5,0x48,0x56,0xc6, - 0xbf,0x2c,0xee,0x81,0x90,0x81,0x74,0x13,0xe1,0xdb, - 0x2a,0x5a,0x02,0x29,0x7a,0x02,0x60,0x0e,0x36,0x45, - 0xdf,0x53,0x2c,0x62,0x41,0xe0,0xcf,0xc0,0xfe,0xce, - 0x63,0x1f,0x84,0x6f,0x3d,0x8f,0xd4,0xb7,0x37,0xfe, - 0x6d,0x64,0x9e,0xc1,0x8a,0x88,0x49,0xb9,0xdc,0x4b, - 0xfc,0x48,0xac,0x12,0x00,0xc5,0xd5,0x81,0xed,0xd6, - 0x51,0xcf,0x47,0x64,0x5b,0xd9,0xf7,0x02,0xe2,0xbf, - 0x17,0xe2,0x62,0x16,0x91,0x7c,0x78,0x8b,0xdf,0x0d, - 0x08,0x1a,0x45,0x3e,0xe2,0x76,0xc6,0x49,0xd3,0x0b, - 0xf8,0x77,0x74,0xf0,0x0e,0xe2,0x64,0x65,0x49,0x6c, - 0x06,0x48,0x9c,0x29,0xc4,0xef,0x0e,0x53,0x76,0xde, - 0x1a,0x20,0x9f,0x00,0xaf,0x86,0x0c,0xa4,0x87,0x2c, - 0x3f,0x0b,0xd2,0x43,0xd1,0x13,0x00,0x60,0x17,0xb0, - 0x33,0x9c,0x6d,0x37,0xc3,0xb7,0x06,0xfd,0x4a,0xe0, - 0x9f,0x0d,0x47,0x24,0x5d,0x56,0xc5,0xd6,0xb2,0x79, - 0x4c,0xc4,0xd6,0xfd,0x4f,0x0d,0x17,0x8e,0x14,0xd4, - 0xa7,0xc4,0xaf,0x2d,0xdd,0x8c,0xd6,0xb8,0x1e,0x95, - 0xd1,0x76,0xd8,0x56,0x4c,0xf5,0xfc,0x9a,0x6c,0x13, - 0xaa,0xef,0x62,0xc5,0x62,0xeb,0x59,0x95,0xf6,0xdf, - 0x4a,0x4c,0xa4,0x15,0x79,0xaf,0x15,0xf5,0xb6,0x79, - 0x6e,0x55,0x0f,0x66,0x78,0xae,0x39,0xf8,0x2b,0xe3, - 0x2f,0x1f,0x32,0x90,0x06,0x7c,0xc5,0xd9,0xee,0x39, - 0xac,0x36,0x8c,0xd4,0xe6,0xad,0xfe,0xff,0x2c,0xd9, - 0xcc,0xe2,0xeb,0x12,0xb2,0x60,0xb0,0xc4,0x68,0x95, - 0x1b,0xee,0x33,0x49,0x6f,0xed,0xda,0xfb,0xc0,0x51, - 0x29,0x1d,0xab,0xcc,0x86,0x60,0xeb,0xfe,0xfb,0x3b, - 0xdb,0xef,0x47,0xb6,0x99,0x45,0x29,0x96,0xb8,0x65, - 0x00,0x23,0x80,0xb5,0xb2,0x08,0x44,0x12,0x3b,0x2e, - 0xe6,0xe7,0xd3,0x98,0xbb,0x10,0x6b,0x16,0x3c,0xdb, - 0x0d,0xc6,0xc5,0x2e,0x22,0xd9,0x9b,0x93,0x77,0x00, - 0x39,0x7a,0x2a,0xe3,0xf3,0xbd,0xec,0x6c,0xb7,0x64, - 0xd0,0x28,0x92,0x8b,0x4b,0x3a,0x77,0x29,0x42,0x5d, - 0x8b,0xa2,0xab,0x57,0x83,0xa9,0xbb,0x97,0x82,0x46, - 0x31,0xb7,0x31,0xd8,0x16,0x8b,0x92,0x83,0x56,0x49, - 0x00,0xcc,0xc0,0xa6,0x99,0xa7,0xf1,0xa5,0xf1,0x03, - 0xb2,0xa9,0x70,0xd9,0xee,0xae,0x02,0x96,0x71,0xb6, - 0x3d,0x9f,0xec,0x8a,0xb4,0x48,0x31,0xa9,0x0e,0x40, - 0x6b,0xda,0x84,0xf8,0xfd,0xb8,0x7f,0x8f,0x2d,0x01, - 0xc8,0xda,0xf3,0xc0,0xdf,0x63,0xda,0xac,0x0f,0x7c, - 0x35,0x83,0x58,0x44,0x44,0xe2,0x4c,0x02,0xc6,0x66, - 0x7c,0xce,0x31,0xce,0x76,0x4b,0x84,0x0c,0xa2,0x01, - 0x2b,0x3a,0xdb,0x79,0xff,0xbe,0x32,0xf3,0x26,0x77, - 0xb2,0x7e,0x2e,0xe7,0x10,0xbf,0x4b,0x94,0x04,0xd2, - 0x2a,0x09,0x00,0xb0,0xed,0x37,0x2e,0x6a,0xf2,0x18, - 0xb7,0x61,0xfb,0x48,0x4b,0x73,0x8e,0xc0,0x5f,0x9d, - 0xf5,0x11,0xac,0x22,0xb7,0x94,0xdb,0xbf,0x88,0xdf, - 0xd6,0x53,0x09,0x80,0xe2,0xb9,0x0f,0x5b,0x56,0x55, - 0xef,0x71,0x70,0x5e,0xc1,0x61,0x45,0x98,0xe2,0xe2, - 0x4b,0x52,0x08,0x4b,0x44,0x24,0x94,0xff,0x91,0xed, - 0x14,0x6b,0xb0,0xe5,0x52,0x1e,0x0b,0x50,0xac,0x9d, - 0xc1,0x96,0x75,0xb6,0x7b,0x3b,0x68,0x14,0xed,0x61, - 0x71,0x67,0x3b,0xef,0x7b,0x25,0x4d,0xda,0xfd,0x29, - 0x27,0x45,0xfa,0xb0,0x7b,0xfc,0x04,0xd8,0x81,0xc6, - 0xb6,0x8d,0x98,0x88,0x0a,0xd0,0xa5,0x61,0x43,0xfc, - 0xdb,0x2c,0x8e,0x03,0xbe,0x49,0xf8,0xfd,0x6e,0xa5, - 0xf8,0x66,0x62,0x9d,0xc9,0x7a,0x6b,0xb2,0xd7,0xc3, - 0xf6,0xfc,0xfd,0x2c,0x8b,0x80,0x44,0x44,0x24,0xd6, - 0xc2,0xc0,0x0a,0xd8,0x08,0xf1,0x42,0x95,0xc7,0x08, - 0x60,0x10,0x76,0xbd,0xee,0x8f,0xdd,0x4b,0x76,0x62, - 0x6b,0xf6,0x3b,0x1d,0xff,0xdf,0x2b,0xcb,0x3f,0xa0, - 0x40,0xde,0xca,0xe1,0x9c,0xde,0x4e,0x5d,0x07,0x56, - 0xe1,0x3e,0x8f,0xd9,0x5c,0xd5,0x2c,0xec,0x6c,0x57, - 0xb4,0xad,0x0b,0x8b,0x66,0x10,0xfe,0xa5,0xba,0xef, - 0x85,0x0c,0xa4,0x06,0x25,0x70,0x72,0xd2,0x6a,0x09, - 0x80,0x49,0xd8,0x68,0x53,0xdc,0xb4,0xcf,0x6a,0x8e, - 0x45,0x17,0x8a,0x66,0xcd,0x8f,0x6d,0x71,0xe2,0x79, - 0xdf,0xcc,0x01,0xf6,0x40,0x1f,0x6e,0xf9,0xdc,0x68, - 0xea,0x27,0x00,0x7a,0x03,0x9b,0x62,0x33,0x75,0x44, - 0x44,0x24,0x5b,0x7d,0xb0,0x25,0x33,0x1b,0x03,0x1b, - 0x60,0xd5,0xc3,0xdb,0x71,0x2b,0xbe,0xbc,0xe4,0x71, - 0x3f,0xf4,0x71,0x82,0xb6,0x23,0x28,0x46,0x02,0xa0, - 0x2f,0x30,0xcc,0xd9,0x36,0xc9,0xdf,0x57,0x46,0x23, - 0x12,0xb4,0xf5,0xee,0xce,0x91,0x26,0xbd,0x7e,0x39, - 0x69,0xb5,0x04,0x00,0xc0,0x9d,0xc0,0xb5,0xc0,0xb7, - 0x13,0xfc,0xce,0xc3,0xc0,0x25,0x61,0xc2,0x29,0x8d, - 0x5e,0xc0,0x1f,0xf1,0x67,0x65,0x4f,0xc5,0xb7,0xee, - 0x5b,0xca,0xc3,0x5b,0x07,0x40,0x09,0x00,0x11,0x91, - 0xec,0x6c,0x82,0xd5,0x59,0xda,0x16,0x18,0x9a,0x6f, - 0x28,0x6d,0x2d,0x8f,0x0e,0x96,0x77,0x1b,0x40,0xb0, - 0x19,0x00,0x45,0xb0,0x40,0x82,0xb6,0x13,0x82,0x45, - 0xd1,0x1e,0xe6,0x4d,0xd0,0x36,0x8f,0xe7,0x32,0x8f, - 0xcf,0x84,0xd0,0x5a,0x35,0x00,0xba,0xfb,0x21,0x36, - 0xbd,0xdc,0x63,0x06,0x70,0x20,0xd9,0xaf,0xbb,0x6a, - 0x37,0xa7,0x60,0x5b,0xb5,0x79,0x8c,0xae,0xb4,0x17, - 0xe9,0xee,0x25,0xe2,0x47,0x40,0x54,0x07,0x40,0x44, - 0x24,0x1b,0xbb,0x60,0xdb,0xa8,0xfd,0x13,0x1b,0x54, - 0x51,0xe7,0x3f,0xac,0x3c,0x0a,0x50,0x27,0x49,0x00, - 0xf4,0x0b,0x16,0x45,0x32,0x83,0x13,0xb4,0xd5,0x92, - 0xc1,0xfa,0x06,0x25,0x68,0x9b,0xc7,0x73,0xa9,0x5d, - 0x00,0x72,0xd2,0xaa,0x09,0x80,0x71,0xc0,0x1d,0xce, - 0xb6,0xff,0x01,0x5e,0x0c,0x18,0x4b,0x19,0x6c,0x83, - 0x7f,0x3b,0xad,0xb7,0xb1,0x1b,0x89,0x32,0x6f,0xf3, - 0x23,0xb5,0xc5,0xcd,0x02,0x58,0x86,0xe2,0x55,0x23, - 0x16,0x11,0x69,0x27,0xa3,0x80,0x87,0xb0,0xa2,0xc8, - 0xde,0xed,0xd6,0xa4,0x79,0x79,0x74,0xb0,0x66,0x24, - 0x68,0xdb,0x3b,0x58,0x14,0xc9,0xf4,0x4d,0xd0,0x36, - 0xc9,0xdf,0x57,0x46,0x49,0x9e,0xcb,0x3c,0xea,0x75, - 0xa9,0x46,0x58,0x4e,0x5a,0x35,0x01,0x20,0xd9,0x59, - 0x02,0xf8,0x03,0x56,0x20,0x26,0xce,0x4c,0x60,0x37, - 0xfc,0xb3,0x33,0xa4,0x7c,0xb4,0x1d,0xa0,0x88,0x48, - 0x7e,0x76,0x05,0x9e,0xc4,0xd6,0xf8,0x4b,0xb6,0xf2, - 0xe8,0xac,0xce,0x4a,0xd0,0xb6,0x4f,0xb0,0x28,0x92, - 0x49,0xd2,0x69,0x4d,0xf2,0xf7,0x95,0x51,0x92,0xa4, - 0x8e,0x12,0x00,0x25,0xa2,0x04,0x80,0xd4,0xd3,0x17, - 0x1b,0x21,0xf0,0x16,0x11,0x39,0x06,0x78,0x34,0x5c, - 0x38,0xd2,0x06,0xee,0x26,0x7e,0x39,0xce,0x16,0x59, - 0x04,0x22,0x22,0x52,0x32,0x07,0x03,0xd7,0x93,0x6c, - 0x5a,0x70,0xb3,0xe6,0x00,0xd3,0xb1,0x22,0xce,0x9f, - 0x00,0x1f,0x02,0x53,0x33,0x3c,0x7f,0x91,0xe4,0xd1, - 0xd9,0x49,0xd2,0x41,0x2e,0x4a,0x9f,0x20,0x49,0xa7, - 0x55,0xb3,0x4d,0xeb,0x4b,0xf2,0x5c,0xce,0x0e,0x16, - 0x45,0x6d,0x45,0x79,0xcf,0x95,0x4e,0x2b,0x16,0x01, - 0x94,0xec,0x9c,0x0f,0xac,0xe5,0x6c,0x7b,0x53,0xa5, - 0xbd,0x48,0x3d,0x1f,0x01,0x4f,0x01,0x6b,0xd4,0x69, - 0xf3,0x35,0xec,0x4b,0x41,0x5f,0xec,0x22,0x22,0xe9, - 0xd8,0x19,0xf8,0x0d,0xbe,0xd9,0x7c,0xd5,0xbc,0x05, - 0x3c,0x8b,0xd5,0x0c,0x78,0x1b,0xdb,0x32,0xec,0x03, - 0x6c,0x0d,0xef,0x94,0xca,0x63,0x46,0xe5,0x31,0xb3, - 0xdb,0xa3,0x5a,0xa7,0xe2,0x7a,0x6c,0x8b,0xe0,0xb2, - 0xc9,0xa3,0x16,0x55,0x92,0xfb,0xfc,0xa2,0x8c,0xc6, - 0x26,0x89,0x43,0xfd,0x98,0xfa,0x92,0xdc,0x47,0xe5, - 0xf1,0x5c,0x16,0x65,0xd9,0x49,0xe9,0xe8,0x83,0x23, - 0xb5,0xec,0x09,0x7c,0xd7,0xd9,0xf6,0x55,0x60,0xff, - 0x80,0xb1,0x48,0x7b,0xb9,0x8b,0xfa,0x09,0x80,0xe1, - 0xc0,0xda,0xc0,0x63,0xd9,0x84,0x23,0x22,0xd2,0xd6, - 0x96,0xc5,0xbf,0x94,0xaf,0xbb,0x67,0x80,0x2b,0x80, - 0xbf,0x01,0xff,0x4b,0x3b,0xa8,0x12,0xca,0xa3,0xb3, - 0x93,0xe4,0x3e,0xbf,0x28,0xeb,0xe9,0xa7,0x25,0x68, - 0xab,0x0e,0x64,0x7d,0x45,0x4f,0xa6,0xe8,0xf5,0xcb, - 0x89,0xa6,0x5e,0x48,0x35,0x2b,0x01,0x97,0x3a,0xdb, - 0x4e,0xc5,0x2a,0x09,0x27,0xa9,0x34,0x2b,0xe5,0xa6, - 0x3a,0x00,0x22,0x22,0xd9,0xb9,0x12,0xe8,0x9f,0xa0, - 0xfd,0x18,0xac,0xf8,0xef,0x6a,0xc0,0x85,0xa8,0xf3, - 0x9f,0x96,0x3c,0x3a,0x3b,0x49,0xd6,0xf5,0x17,0x25, - 0x01,0x30,0x3d,0x41,0xdb,0x01,0xc1,0xa2,0x68,0x0f, - 0x49,0x5e,0xd3,0x3c,0x6a,0x40,0x0c,0xc9,0xe1,0x9c, - 0x82,0x12,0x00,0x32,0xb7,0xc1,0xc0,0xcd,0xf8,0x2f, - 0xaa,0xdf,0xc3,0x46,0x09,0x44,0xbc,0x1e,0x24,0x7e, - 0x0d,0xa8,0x12,0x00,0x22,0x22,0xcd,0xdb,0x01,0xd8, - 0x30,0x41,0xfb,0x6b,0x81,0x55,0x80,0xbf,0x87,0x09, - 0xa7,0xd4,0xb2,0xac,0xbd,0xd0,0xa5,0x15,0xb7,0xd4, - 0x4b,0x32,0xa0,0x34,0x3c,0x58,0x14,0xed,0x21,0x49, - 0x32,0x25,0x8f,0xce,0xb8,0x5e,0xbf,0x9c,0x28,0x01, - 0x20,0x3d,0x5d,0x01,0x2c,0xe7,0x6c,0x7b,0x25,0x70, - 0x75,0xb8,0x50,0xa4,0x4d,0x4d,0xc7,0x92,0x00,0xf5, - 0xac,0x47,0xb2,0x1b,0x17,0x11,0x11,0x99,0x9b,0x77, - 0x0b,0x5f,0xb0,0x99,0x7f,0x7b,0x92,0x6c,0x0a,0xb6, - 0xf8,0xe5,0xd1,0xd9,0x19,0x9a,0xa0,0xed,0xc7,0xc1, - 0xa2,0x48,0xe6,0xc3,0x04,0x6d,0xbd,0x45,0xaa,0xcb, - 0xea,0x93,0x04,0x6d,0xf3,0x48,0x00,0xe8,0xf5,0xcb, - 0x89,0x12,0x00,0xd2,0xdd,0xe1,0xd8,0x36,0x7e,0x1e, - 0x4f,0x01,0x87,0x06,0x8c,0x45,0xda,0x5b,0xdc,0x32, - 0x80,0x4e,0x60,0xb3,0x2c,0x02,0x11,0x11,0x69,0x53, - 0x2b,0x00,0xeb,0x38,0xdb,0x3e,0x42,0x76,0xdf,0xe9, - 0x65,0x9d,0xf6,0x3b,0x6f,0x0e,0xe7,0x1c,0x96,0xa0, - 0xed,0xf8,0x60,0x51,0x24,0x33,0x03,0x7f,0xc7,0x75, - 0x91,0x90,0x81,0xb4,0x81,0x24,0x49,0x9d,0x3c,0x3a, - 0xe3,0x8b,0xe6,0x70,0x4e,0x41,0x09,0x00,0xf9,0xdc, - 0x7a,0xc0,0x39,0xce,0xb6,0x13,0xb0,0x75,0xff,0x1a, - 0x25,0x90,0x46,0xa9,0x0e,0x80,0x88,0x48,0x58,0x3b, - 0x3b,0xdb,0xcd,0xc1,0x3a,0xff,0x59,0xed,0xa9,0x5e, - 0xd6,0x69,0xbf,0x5f,0xca,0xe1,0x9c,0xde,0x0e,0x72, - 0xd7,0x4e,0x0e,0x45,0xf1,0x9e,0xb3,0xdd,0x62,0x41, - 0xa3,0x68,0x7d,0x49,0x12,0x00,0x0b,0x07,0x8b,0xa2, - 0x36,0x25,0x00,0x72,0xa2,0x04,0x80,0x00,0x8c,0x04, - 0x6e,0xc4,0x5f,0xa0,0x66,0x5f,0x54,0x14,0x48,0x9a, - 0xf3,0x0c,0xb6,0x85,0x54,0x3d,0x4a,0x00,0x88,0x88, - 0x34,0x6e,0x63,0x67,0xbb,0xbb,0x81,0x27,0x43,0x06, - 0xd2,0xc3,0xa8,0x0c,0xcf,0x55,0x24,0x79,0x74,0x56, - 0x17,0x72,0xb6,0x1b,0x1b,0x32,0x88,0x06,0xbc,0xec, - 0x6c,0x57,0xd6,0xf7,0x92,0xd7,0x4c,0x6c,0xfb,0x65, - 0x8f,0xac,0x13,0x00,0xbd,0x80,0xa5,0x32,0x3e,0xa7, - 0x54,0x28,0x01,0x20,0xf3,0x60,0x45,0x7f,0xbc,0x99, - 0xe9,0xf3,0x80,0x5b,0xc2,0x85,0x23,0x25,0x11,0x61, - 0x37,0x9d,0xf5,0x8c,0x02,0x96,0x08,0x1f,0x8a,0x88, - 0x48,0x5b,0x5a,0xcb,0xd9,0xee,0xfa,0xa0,0x51,0x7c, - 0xd1,0x12,0xd8,0xa0,0x43,0x19,0x8d,0x22,0xfb,0xfb, - 0x6e,0x6f,0x07,0xf9,0xb5,0xa0,0x51,0x24,0xf7,0xa2, - 0xb3,0xdd,0xaa,0x41,0xa3,0x68,0x0f,0xaf,0x3b,0xdb, - 0x65,0x9d,0x4c,0x59,0x06,0xe8,0x97,0xf1,0x39,0xa5, - 0x42,0x09,0x00,0x39,0x11,0xff,0x48,0xeb,0xc3,0xc0, - 0xb1,0x01,0x63,0x91,0x72,0xd1,0x32,0x00,0x11,0x91, - 0x30,0x46,0xe0,0x9f,0x6a,0xff,0x48,0xc8,0x40,0x7a, - 0xd8,0x34,0xc3,0x73,0x15,0xcd,0x00,0xac,0xd3,0x93, - 0x25,0x6f,0x51,0xe7,0xa2,0x25,0x00,0x5e,0x70,0xb6, - 0x5b,0x19,0xed,0x25,0x1f,0xc7,0x9b,0x00,0xf0,0xbe, - 0x57,0xd2,0xb2,0x46,0xc6,0xe7,0x93,0x6e,0x94,0x00, - 0x28,0xb7,0xad,0x80,0x13,0x9c,0x6d,0x3f,0x02,0xbe, - 0x49,0x76,0x6b,0x04,0xa5,0xfd,0xc5,0xcd,0x00,0x00, - 0x25,0x00,0x44,0x44,0x1a,0xe1,0x5d,0xfb,0x3d,0x1d, - 0x78,0x35,0x64,0x20,0x3d,0x7c,0x2b,0xc3,0x73,0x15, - 0x91,0x77,0x56,0x46,0x1a,0x3a,0xb0,0x0e,0xb2,0x47, - 0xd1,0xb6,0x73,0x7e,0xd4,0xd9,0xae,0x3f,0xb0,0x76, - 0xc8,0x40,0xda,0xc0,0x4b,0xce,0x76,0xab,0x92,0x6d, - 0xbf,0xf0,0xab,0x19,0x9e,0x4b,0x7a,0xe8,0xcc,0x3b, - 0x00,0xc9,0xcd,0x62,0xd8,0xd4,0x7f,0xcf,0x87,0x7d, - 0x0e,0xf6,0xa5,0xfd,0x4e,0xd0,0x88,0xa4,0x6c,0xde, - 0xc1,0xb2,0xfc,0x2b,0xd6,0x69,0xb3,0x19,0xb6,0x4e, - 0x6c,0x76,0x26,0x11,0x89,0x88,0xb4,0x07,0xef,0x9e, - 0xf3,0x9f,0x60,0xdf,0xf1,0x59,0x58,0x1c,0xed,0xee, - 0xb2,0x29,0x76,0xef,0x95,0x85,0xe5,0xf1,0xcf,0x02, - 0xf9,0x6f,0xc8,0x40,0x1a,0xf0,0x1a,0xf0,0x36,0xbe, - 0xe5,0xa9,0x9b,0x91,0xcd,0x2c,0x96,0xfe,0xd8,0x60, - 0xd8,0x24,0xe0,0x53,0xec,0xb3,0x53,0xeb,0xbf,0x57, - 0x62,0x4b,0x1d,0x8b,0xc0,0x5b,0xdf,0x63,0x08,0xf6, - 0x9e,0xf1,0xce,0xbe,0x68,0x56,0xd9,0xaf,0x05,0xb9, - 0x52,0x02,0xa0,0x9c,0xfa,0x00,0x7f,0xc2,0xbf,0x25, - 0xcd,0x49,0xc0,0x3d,0xc1,0xa2,0x91,0x32,0x1b,0x4d, - 0xfd,0x04,0xc0,0x70,0x2c,0xbb,0xff,0xaf,0x6c,0xc2, - 0x11,0x11,0x69,0x0b,0xde,0xb5,0xb5,0x93,0x82,0x46, - 0xf1,0x45,0xc7,0x61,0x09,0xdd,0x32,0xdb,0x12,0x1b, - 0x99,0xcf,0xa2,0x73,0xb8,0x91,0xb3,0xdd,0x74,0xe0, - 0xf9,0x90,0x81,0x34,0xe8,0x3e,0x60,0x4f,0x47,0xbb, - 0x5d,0x80,0xd3,0xc2,0x86,0x02,0xd8,0xec,0x8d,0x81, - 0x95,0xc7,0x02,0x75,0xda,0xbd,0x03,0x5c,0x91,0x41, - 0x3c,0x5e,0x49,0x0a,0x7c,0x6e,0x42,0x36,0x09,0x80, - 0x55,0xc9,0x7e,0x39,0x8c,0x74,0xa3,0x25,0x00,0xe5, - 0xf4,0x0b,0x60,0x5d,0x67,0xdb,0x3b,0xc9,0xe6,0xc2, - 0x2a,0xe5,0xa4,0x3a,0x00,0x22,0x22,0xe9,0x9b,0xe9, - 0x6c,0xe7,0x9d,0x29,0xd0,0xac,0xa5,0xb0,0x1d,0x84, - 0xca,0x6e,0x51,0x60,0xfd,0x8c,0xce,0xb5,0x9d,0xb3, - 0xdd,0x43,0xf8,0xdf,0x2f,0x59,0xf2,0x16,0x9c,0x5e, - 0x0d,0xff,0x52,0x87,0x66,0x78,0x5f,0xb7,0xa7,0x83, - 0x46,0x91,0xdc,0x9b,0xd8,0x6c,0x0a,0x8f,0x6d,0x43, - 0x06,0xd2,0xcd,0x1e,0x19,0x9d,0x47,0x6a,0x50,0x02, - 0xa0,0x7c,0x76,0x07,0xbe,0xef,0x6c,0xfb,0x26,0x96, - 0x7d,0x2d,0xca,0x34,0x26,0x69,0x3f,0xf7,0x03,0x33, - 0x62,0xda,0x28,0x01,0x20,0x22,0x92,0x8c,0x77,0x64, - 0x7f,0x44,0xd0,0x28,0x3e,0x77,0x39,0x36,0xfb,0x50, - 0x60,0xff,0x0c,0xce,0x31,0x1c,0xd8,0xdc,0xd9,0xf6, - 0x1f,0x21,0x03,0x69,0xc2,0xdf,0xf0,0xbf,0x8f,0x7f, - 0x18,0x32,0x90,0x8a,0x6f,0x3b,0xdb,0xdd,0x17,0x32, - 0x88,0x06,0x79,0x6a,0x2e,0x01,0x7c,0x0d,0x98,0x2f, - 0x64,0x20,0x58,0x31,0xcc,0x03,0x03,0x9f,0x43,0x62, - 0x28,0x01,0x50,0x2e,0x2b,0x60,0x5f,0xc2,0x1e,0x33, - 0x80,0xdd,0x80,0xf1,0xe1,0xc2,0x11,0x61,0x32,0xf1, - 0xc5,0x7e,0xd6,0xc5,0xd6,0xa6,0x89,0x88,0x88,0xcf, - 0xbb,0xce,0x76,0x7d,0x08,0x5f,0xfd,0xfb,0x50,0x1a, - 0x5b,0xef,0xdb,0x37,0xed,0x40,0x0a,0x62,0x0f,0x60, - 0xa1,0xc0,0xe7,0xd8,0x0b,0xff,0x32,0x90,0xbf,0x85, - 0x0c,0xa4,0x09,0xd3,0x80,0x9b,0x9d,0x6d,0xf7,0x02, - 0x96,0x0e,0x18,0xcb,0x7a,0xc0,0x2a,0xce,0xb6,0x77, - 0x06,0x8c,0xa3,0x51,0xa3,0x9d,0xed,0xfa,0x10,0x3e, - 0x41,0xf5,0x7d,0xb2,0x4b,0x3c,0x4a,0x0d,0x4a,0x00, - 0x94,0xc7,0x40,0xec,0x42,0xea,0x9d,0xee,0x77,0x14, - 0xf0,0x58,0xb8,0x70,0x44,0xfe,0x4f,0xdc,0x32,0x80, - 0x4e,0x54,0x2c,0x46,0x44,0x24,0x89,0xae,0x62,0x65, - 0x1e,0x21,0xab,0x71,0x6f,0x09,0xfc,0xb2,0xc1,0xdf, - 0x1d,0x98,0x66,0x20,0x05,0xd2,0x17,0x38,0x3d,0xf0, - 0xf1,0x8f,0x72,0xb6,0x7d,0x8a,0x62,0xae,0xff,0xef, - 0xe2,0x7d,0xef,0xf4,0x01,0x7e,0x15,0x28,0x86,0x0e, - 0xe0,0x0c,0x67,0xdb,0xe7,0x80,0x67,0x03,0xc5,0xd1, - 0x8c,0x3b,0x80,0xa9,0xce,0xb6,0x47,0x02,0x83,0x03, - 0xc5,0xb1,0x10,0xfe,0xdd,0xc7,0x24,0x20,0x25,0x00, - 0xca,0xe3,0x72,0x6c,0x06,0x80,0xc7,0x0d,0xc0,0x85, - 0x01,0x63,0x11,0xe9,0xce,0x93,0x99,0xd6,0x32,0x00, - 0x11,0x11,0xbf,0x08,0xff,0x5a,0xe4,0xfd,0x02,0xc5, - 0xb0,0x31,0x70,0x23,0x73,0x17,0x9c,0x7e,0xd9,0xf9, - 0xfb,0xde,0xad,0x0c,0xf3,0xd6,0xd1,0xc0,0xef,0xec, - 0x03,0x6c,0x91,0x72,0x1c,0x5d,0x8e,0xc2,0x6a,0x0d, - 0x78,0xfc,0x3e,0x50,0x0c,0x69,0x79,0x1a,0x7f,0x11, - 0xea,0x6f,0x00,0x87,0x05,0x88,0xe1,0x40,0x6c,0xf7, - 0x06,0x8f,0x2b,0x03,0x9c,0x3f,0x0d,0x13,0x81,0x5b, - 0x9d,0x6d,0x47,0xe2,0x4f,0x78,0x24,0x31,0x0f,0x70, - 0x0d,0x9a,0xd1,0x59,0x08,0x4a,0x00,0x94,0xc3,0xf7, - 0xf1,0xef,0xbd,0xfb,0x32,0x70,0x40,0xc0,0x58,0x44, - 0x7a,0xfa,0x2f,0xf0,0x71,0x4c,0x1b,0x25,0x00,0x44, - 0x44,0x92,0x79,0xd0,0xd9,0x6e,0x5d,0xe0,0xeb,0x29, - 0x9f,0xfb,0x9b,0x58,0x72,0xb7,0xe7,0xcd,0xfe,0x13, - 0xc0,0xf7,0x9c,0xc7,0x18,0x95,0x6a,0x44,0xe1,0x34, - 0x92,0x00,0xe8,0x00,0xae,0x23,0xfd,0xbf,0x71,0x1d, - 0xe0,0x44,0x67,0xdb,0xcf,0x80,0xab,0x53,0x3e,0x7f, - 0x08,0xc7,0xe1,0xaf,0x45,0xf5,0x0b,0x60,0x87,0x14, - 0xcf,0xfd,0x0d,0xe0,0x02,0x67,0xdb,0xf1,0xf8,0x97, - 0xd9,0xe6,0x21,0x49,0x6c,0xdf,0x07,0x76,0x4d,0xf1, - 0xdc,0x1d,0xc0,0x65,0x68,0x36,0x67,0x61,0x28,0x01, - 0xd0,0xfe,0xd6,0xc6,0x2e,0x88,0x1e,0x53,0xb0,0xed, - 0x54,0xb2,0xdc,0x16,0x48,0x64,0x0e,0x70,0x6f,0x4c, - 0x9b,0xa5,0x81,0x25,0x33,0x88,0x45,0x44,0xa4,0x5d, - 0xdc,0x9e,0xa0,0xed,0xd5,0xc0,0xc2,0x29,0x9c,0x73, - 0x08,0x36,0x0a,0x7a,0x3d,0x73,0xaf,0xe1,0x9f,0x03, - 0x1c,0x0c,0xbc,0xe5,0x3c,0x56,0x56,0xd5,0xf2,0xb3, - 0xd2,0x73,0x0a,0xf6,0x48,0xac,0x10,0xae,0x77,0x6d, - 0x79,0x9c,0x95,0xb0,0xa9,0xde,0xbd,0x9d,0xed,0x7f, - 0x83,0xed,0x59,0x5f,0x74,0xff,0x01,0x7e,0xe7,0x6c, - 0xdb,0x89,0x6d,0x73,0x7d,0x48,0x0a,0xe7,0xdd,0x1b, - 0xf8,0x33,0xfe,0x5a,0x14,0xa7,0x63,0x75,0x8d,0x8a, - 0xea,0x5e,0xe0,0xdf,0xce,0xb6,0x1d,0xd8,0x68,0xfd, - 0x2e,0x29,0x9c,0x77,0x30,0x76,0x3d,0xa8,0x56,0x5b, - 0xe0,0xf1,0x04,0xf1,0x48,0x8a,0x7a,0x4e,0xcb,0x92, - 0xf6,0x32,0x2f,0x70,0x13,0xfe,0xca,0xbb,0x2f,0xe2, - 0xdb,0x73,0xb5,0xc8,0xee,0xc5,0x5f,0xec,0x44,0x8a, - 0xe3,0x2e,0xe2,0xbf,0x68,0xb6,0x04,0x2e,0xcd,0x20, - 0x16,0x11,0x91,0x76,0xf0,0x08,0x30,0x06,0xdf,0x28, - 0xf3,0x02,0x58,0x67,0x74,0x07,0x1a,0x5b,0x13,0xde, - 0x17,0x9b,0x3d,0x78,0x3c,0xb5,0x13,0x09,0x17,0x62, - 0x37,0xfc,0x03,0xb1,0x11,0xdd,0xb8,0x9b,0xfa,0xe5, - 0xb1,0x4e,0x6d,0x91,0xd7,0xa8,0x03,0xf4,0x72,0xb6, - 0x3b,0x11,0x38,0x8b,0x2f,0xfe,0xdd,0x0b,0x63,0xf5, - 0x96,0x7e,0x8c,0x75,0xc8,0x67,0x35,0x18,0xc3,0xae, - 0x58,0xe2,0xc5,0xbb,0x76,0xfb,0x13,0xe0,0xdc,0x06, - 0xcf,0x95,0x87,0x63,0x80,0xad,0xf0,0x15,0x4f,0xec, - 0x0d,0x5c,0x8c,0x6d,0x83,0x78,0x04,0xf0,0x52,0xc2, - 0x73,0xad,0x08,0x9c,0x47,0xb2,0x59,0x31,0x4f,0xd3, - 0x1a,0x4b,0x67,0x4f,0xc1,0x9f,0x18,0xec,0x83,0x25, - 0x53,0x2e,0x04,0x7e,0x8a,0x2d,0x23,0x48,0x6a,0x47, - 0xec,0x7d,0xb6,0x54,0x95,0x9f,0x4d,0xc6,0x96,0x6c, - 0xc4,0x15,0x82,0x06,0x0d,0x58,0xa7,0x4e,0x09,0x80, - 0xf6,0xb6,0x1f,0xb0,0x58,0x82,0xf6,0x5f,0xae,0x3c, - 0x5a,0xd9,0x2c,0x94,0x00,0x68,0x45,0xde,0x3a,0x00, - 0x4a,0x00,0x88,0x88,0xf8,0x44,0xd8,0xcd,0xbb,0xb7, - 0x38,0xda,0x28,0xac,0x33,0xfa,0x6b,0xac,0xf8,0xda, - 0xfb,0x8e,0xdf,0x59,0x07,0x4b,0xde,0xee,0x49,0xfd, - 0xce,0xd9,0xbf,0xb1,0x4e,0x2e,0xd8,0x8d,0xff,0x4b, - 0xf8,0xea,0x12,0x9d,0x86,0x75,0x22,0x8a,0xcc,0xdb, - 0x39,0xb9,0x0f,0x5b,0x73,0xbf,0x77,0x8f,0x7f,0xef, - 0x8f,0x4d,0x33,0x3f,0xb4,0xf2,0xdf,0xeb,0xf0,0x8d, - 0xcc,0x77,0x60,0x53,0xaa,0x7f,0x4c,0xf2,0x7a,0x02, - 0xc7,0x61,0x85,0x22,0x5b,0xc5,0x47,0xd8,0x36,0x7c, - 0x77,0xe3,0x7f,0xbe,0xb7,0xc6,0x3a,0xf1,0x77,0x62, - 0xb5,0x28,0xee,0x05,0xde,0xa8,0xd2,0xae,0x03,0x4b, - 0x36,0x6d,0x50,0x39,0xc7,0x26,0x09,0x63,0x9b,0x8c, - 0xed,0xec,0xd0,0x68,0xf2,0x26,0x4b,0x77,0x60,0x09, - 0x80,0x6d,0x9d,0xed,0x3b,0x80,0x1f,0x60,0xcf,0xcb, - 0x95,0x58,0x42,0xe0,0x09,0xea,0x2f,0xc9,0x58,0x09, - 0x7b,0xee,0xf7,0xa3,0xfe,0x67,0xfc,0x6c,0x6c,0xbb, - 0x71,0x0f,0x6f,0x92,0x4d,0x9c,0x94,0x00,0x68,0x6f, - 0xfa,0xc0,0x48,0xab,0x18,0x4b,0xfc,0x48,0xd5,0x66, - 0xd8,0x7b,0x7a,0x76,0x16,0x01,0x89,0x88,0xb4,0x81, - 0x4b,0x81,0x1f,0x01,0x4b,0x38,0xdb,0x0f,0xc4,0x46, - 0x5b,0x8f,0xc2,0x2a,0xc4,0x3f,0x82,0x25,0x02,0x3e, - 0xc6,0x46,0x56,0x87,0x62,0xfb,0x84,0xaf,0x02,0xac, - 0x86,0xed,0x37,0x1f,0xe7,0x03,0x60,0x67,0x60,0x7a, - 0xb7,0x7f,0x7b,0x14,0x5f,0x02,0x60,0x07,0xe0,0x0a, - 0xe0,0x68,0x8a,0x3b,0x5d,0xdd,0x7b,0x2f,0x3d,0x19, - 0xfb,0x3b,0x36,0xa7,0x7a,0x81,0xc3,0x65,0x81,0x8b, - 0xb0,0x84,0xcd,0x13,0x58,0xd2,0x64,0x0c,0xf6,0xfc, - 0x77,0x4d,0x2d,0x1f,0x04,0x2c,0x0e,0xac,0x8c,0xed, - 0xd9,0xbe,0x60,0x03,0xf1,0xde,0x8d,0xad,0xc7,0x6e, - 0x35,0xff,0xc4,0x46,0xf4,0xcf,0x4f,0xf0,0x3b,0x1d, - 0x58,0x67,0x74,0xeb,0xca,0xff,0x4f,0xc2,0x3a,0x9d, - 0x93,0xb0,0xd7,0x6d,0x38,0xf6,0x7e,0xf6,0xee,0x90, - 0xd5,0xd3,0x1c,0xac,0xa3,0xfb,0x42,0x83,0xbf,0x9f, - 0x87,0x43,0x81,0x0d,0x81,0x61,0x09,0x7e,0x67,0x5e, - 0xec,0xba,0x70,0x0c,0x30,0x01,0x9b,0x31,0xfc,0x0e, - 0xf6,0x3c,0xf6,0xc2,0x9e,0xbf,0x45,0x80,0x65,0x9c, - 0xc7,0x7d,0x1a,0x4b,0x00,0x0c,0x70,0x9e,0x5f,0xfd, - 0x99,0x94,0x29,0x01,0x20,0x22,0x45,0x71,0x17,0xf5, - 0x13,0x00,0xc3,0xb0,0xd1,0x26,0xcf,0x74,0x31,0x11, - 0x11,0xb1,0x4e,0xf7,0xc1,0xc0,0x3f,0x12,0xfe,0xde, - 0x3c,0xc0,0x9a,0x95,0x47,0x33,0x3e,0x03,0x76,0x02, - 0xde,0xee,0xf1,0xef,0x77,0xe2,0xdf,0x7d,0x60,0x7f, - 0x6c,0x9f,0xf7,0x7f,0x01,0xef,0x62,0xf7,0xae,0xf3, - 0x63,0x09,0x84,0xf9,0x9b,0x8c,0x2f,0x0d,0xde,0x35, - 0xf7,0x9f,0x61,0x23,0xd9,0xbb,0x60,0xcb,0x2d,0x6a, - 0x2d,0xcf,0xec,0x85,0xd5,0x6f,0x5a,0xbb,0xf9,0xd0, - 0xe6,0x32,0x16,0xd8,0x1d,0x7f,0x51,0xbd,0xa2,0xf9, - 0x15,0x76,0x2f,0x70,0x52,0x83,0xbf,0x3f,0x08,0x9b, - 0xe2,0x9f,0x86,0x08,0xeb,0x4c,0xff,0x29,0xa5,0xe3, - 0x65,0xe5,0x0d,0x6c,0x44,0xff,0xaf,0x34,0x36,0xb5, - 0x7e,0x28,0xb0,0x5e,0x13,0xe7,0x9f,0x88,0x2d,0x59, - 0x99,0x86,0x25,0x50,0x3c,0xbc,0x9f,0x31,0x71,0xd2, - 0x9a,0x0a,0x11,0x29,0x8a,0xbb,0x1c,0x6d,0xb4,0x1b, - 0x80,0x88,0x48,0x32,0xa3,0x09,0xb3,0xad,0x57,0x9c, - 0x4f,0xb0,0xd1,0xee,0x47,0xaa,0xfc,0xec,0x56,0x60, - 0x5c,0x82,0x63,0xf5,0xc1,0xb6,0x15,0xdc,0x1d,0xeb, - 0x40,0x6f,0x8c,0x8d,0xdc,0x16,0x81,0xb7,0x73,0x32, - 0xa1,0xf2,0xdf,0x7f,0x61,0x49,0x8d,0xac,0x67,0xb3, - 0xbd,0x0f,0x6c,0x83,0x55,0xab,0x6f,0x65,0x27,0x63, - 0x33,0x01,0xf2,0x9c,0x0d,0x38,0x13,0xf8,0x0e,0x56, - 0xb7,0xa1,0x15,0xfd,0x0d,0x9b,0xda,0x9f,0x75,0x22, - 0x68,0x3a,0xb6,0x5c,0xe2,0xd5,0xca,0xff,0xcf,0xa8, - 0x3c,0xe2,0x78,0x0b,0x31,0x8a,0x93,0x12,0x00,0x22, - 0x52,0x14,0xf7,0x12,0xff,0x85,0xae,0x04,0x80,0x88, - 0x48,0x72,0x27,0x90,0xed,0x1e,0xe5,0xaf,0x03,0x5f, - 0xa5,0x76,0xd5,0xf1,0x19,0xf8,0xb7,0x57,0x2b,0xba, - 0xfe,0x8e,0x36,0x73,0xb0,0x19,0x00,0x5d,0xae,0xc1, - 0xb6,0x4a,0xf4,0x74,0x7e,0xd2,0x30,0x16,0x7b,0x3d, - 0x5e,0xcc,0xe8,0x7c,0xa1,0xfd,0x12,0x5b,0xc7,0x9e, - 0x47,0x1d,0x83,0x37,0xb1,0x3a,0x01,0xd7,0xe4,0x70, - 0xee,0x34,0xfd,0x1a,0x38,0x90,0xec,0x6a,0x17,0x4c, - 0xc1,0x0a,0x33,0xde,0xd1,0xe3,0xdf,0x27,0x54,0x69, - 0xdb,0x93,0x12,0x00,0x29,0x53,0x02,0x40,0x44,0x8a, - 0x62,0x02,0xf1,0x5b,0xd4,0xac,0x83,0x4d,0x3f,0x13, - 0x11,0x11,0xbf,0x08,0xab,0xd2,0x7f,0x0a,0xfe,0x69, - 0xb7,0x8d,0xba,0x0c,0x58,0x15,0x78,0x36,0xa6,0xdd, - 0x59,0x14,0xbf,0xc2,0xbf,0xc7,0x40,0x47,0x9b,0x4f, - 0x99,0x7b,0xb4,0xf5,0x66,0x60,0x53,0x3e,0x1f,0x0d, - 0x0d,0xe5,0x16,0x60,0x0d,0xe0,0x95,0xc0,0xe7,0xc9, - 0xda,0x9d,0xd8,0x32,0x90,0x3f,0x64,0x74,0xbe,0x39, - 0xd8,0x7b,0x7b,0x75,0xaa,0xcf,0x6a,0x69,0x45,0x57, - 0x62,0xb3,0x69,0xc6,0x06,0x3e,0xcf,0x73,0xc0,0x46, - 0x54,0x9f,0xe9,0xf9,0xb1,0xe3,0xf7,0x3d,0x9f,0x31, - 0x49,0x40,0x09,0x00,0x11,0x29,0x92,0xb8,0x65,0x00, - 0x9d,0x58,0x31,0x40,0x11,0x11,0x49,0xee,0x44,0x6c, - 0xf4,0xf2,0xe9,0x00,0xc7,0x1e,0x8d,0x75,0x26,0x0e, - 0xc6,0x8a,0x83,0xc5,0x99,0x81,0x8d,0x08,0x8e,0x09, - 0x10,0x4b,0x96,0x3c,0x5b,0xef,0xd5,0x9a,0x76,0xff, - 0x08,0x56,0x4c,0xf1,0x4c,0xbe,0x38,0x43,0x20,0x0d, - 0x63,0xb0,0xe5,0x12,0x3b,0x61,0x09,0x88,0x76,0x34, - 0x1e,0x9b,0x8a,0xff,0x65,0x2c,0xa1,0x12,0x22,0xb9, - 0x15,0x01,0x7f,0xae,0x9c,0xe3,0x60,0x8a,0x5b,0x8c, - 0xb2,0x51,0x8f,0x62,0x09,0xbb,0x53,0xf9,0xbc,0xd8, - 0x64,0x5a,0x3e,0xc5,0x96,0x6c,0x7c,0x19,0x2b,0x6c, - 0x59,0x8d,0x67,0x16,0x87,0x77,0x7b,0x4b,0x71,0x52, - 0x02,0x40,0x44,0x8a,0x44,0x75,0x00,0x44,0x44,0xc2, - 0x7a,0x10,0x2b,0xee,0xb7,0x33,0xd6,0x69,0x6f,0x66, - 0x2d,0xf5,0x1b,0xd8,0x54,0xe2,0x35,0xb1,0x7d,0xda, - 0x1f,0x4c,0xf8,0xfb,0xaf,0x63,0xdb,0xaf,0xfd,0xbe, - 0xc9,0x38,0xf2,0x34,0xc2,0xd1,0xe6,0x83,0x3a,0x3f, - 0x9b,0x0a,0x1c,0x0f,0x2c,0x8a,0x55,0x59,0x7f,0xaa, - 0x89,0x58,0xe6,0x60,0x55,0xfe,0x77,0xc3,0x8a,0xdd, - 0xdd,0xdc,0xc4,0xb1,0x5a,0xc9,0x13,0x58,0xb2,0x63, - 0x69,0xec,0xb9,0x7c,0x26,0x85,0x63,0xbe,0x84,0xcd, - 0x98,0x59,0x06,0xfb,0xac,0x34,0xf3,0xba,0x14,0xdd, - 0x67,0xc0,0xcf,0x80,0x25,0xb1,0x9d,0x2a,0x9a,0xd9, - 0xd5,0x20,0x02,0x1e,0x07,0x0e,0xc7,0xde,0xd3,0x27, - 0x51,0x7f,0xa9,0xcb,0xbb,0x8e,0x63,0x8e,0x6c,0x22, - 0x1e,0xa9,0xa2,0x23,0x8a,0x5a,0xb5,0x10,0xa8,0x48, - 0xa1,0x0d,0xc2,0x97,0xcd,0x3f,0x0e,0xf8,0x79,0xe0, - 0x58,0x5a,0x49,0x27,0x36,0x1d,0xac,0x5e,0xb6,0xf7, - 0x35,0xec,0x4b,0xbe,0x15,0x1d,0x8b,0x8d,0xf4,0xc4, - 0x19,0x8c,0x6f,0x04,0x4d,0x44,0xa4,0x59,0x23,0xb0, - 0x62,0x7d,0xeb,0x60,0xdb,0xcb,0x2d,0x86,0x6d,0x2f, - 0x37,0x00,0x2b,0x70,0x37,0x05,0xbb,0x1e,0x7d,0x86, - 0xad,0x7f,0x7e,0x01,0x9b,0xba,0xff,0x28,0xe9,0x74, - 0xb4,0xba,0x2c,0x03,0xec,0x88,0x4d,0x8b,0x5f,0xb6, - 0x12,0x57,0xd7,0xb5,0x70,0x22,0xb6,0x4c,0xec,0x03, - 0x6c,0x3a,0xf1,0xb3,0x95,0x47,0xdc,0xb2,0xb1,0x56, - 0xb5,0x10,0xb0,0x05,0x36,0x32,0xbb,0x3c,0xf6,0x9d, - 0x37,0x0c,0xbb,0xb7,0x18,0x80,0x75,0xa8,0x26,0x61, - 0xdf,0x97,0x63,0xb0,0xce,0xea,0xc3,0xd8,0x56,0x79, - 0xed,0x36,0x42,0xdd,0xa8,0xf9,0x80,0xf5,0xb1,0xf7, - 0xf5,0xd2,0x58,0xe7,0x76,0x61,0x3e,0x7f,0x0e,0x3b, - 0xb1,0xa2,0x74,0x93,0xb1,0x02,0x89,0x6f,0x61,0x35, - 0x12,0x9e,0xc4,0x76,0x69,0x78,0x2b,0xfb,0x90,0x0b, - 0x65,0x09,0xec,0xb3,0xb8,0x16,0xf6,0xd9,0x5c,0x0a, - 0x7b,0x0f,0x0e,0xe4,0x8b,0xd7,0x85,0x4f,0xb1,0x65, - 0x2c,0x2f,0x61,0xd7,0x83,0xd1,0xe4,0x53,0x9b,0x41, - 0x12,0x50,0x02,0x40,0x24,0x0c,0x25,0x00,0xa4,0x1a, - 0x25,0x00,0x44,0x44,0x44,0x44,0x24,0x37,0x5a,0x02, - 0x20,0x22,0x22,0x22,0x22,0x22,0x22,0x52,0x02,0x4a, - 0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x94,0x80, - 0x12,0x00,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x25, - 0xa0,0x04,0x80,0x88,0x88,0x88,0x88,0x88,0x88,0x48, - 0x09,0x28,0x01,0x20,0x22,0x22,0x22,0x22,0x22,0x22, - 0x52,0x02,0x4a,0x00,0x88,0x88,0x88,0x88,0x88,0x88, - 0x88,0x94,0x80,0x12,0x00,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x25,0xa0,0x04,0x80,0x88,0x88,0x88,0x88, - 0x88,0x88,0x48,0x09,0x28,0x01,0x20,0x22,0x22,0x22, - 0x22,0x22,0x22,0x52,0x02,0x4a,0x00,0x88,0x88,0x88, - 0x88,0x88,0x88,0x88,0x94,0x80,0x12,0x00,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x25,0xa0,0x04,0x80,0x88, - 0x88,0x88,0x88,0x88,0x88,0x48,0x09,0x28,0x01,0x20, - 0x22,0x22,0x22,0x22,0x22,0x22,0x52,0x02,0x9d,0x79, - 0x07,0x20,0x52,0x72,0xfd,0x80,0x61,0x09,0x7f,0x67, - 0x22,0x30,0x27,0x40,0x2c,0x92,0xcc,0x3c,0xc0,0x90, - 0x84,0xbf,0xd3,0x2f,0x44,0x20,0xd2,0x12,0x6e,0x07, - 0xbe,0x91,0x77,0x10,0x39,0xdb,0x14,0xb8,0x2f,0xef, - 0x20,0x44,0x44,0x44,0xca,0x4c,0x09,0x00,0x91,0x7c, - 0x9d,0x58,0x79,0x24,0xb1,0x24,0x30,0x36,0xfd,0x50, - 0x24,0xa1,0xc5,0x80,0xd7,0xf3,0x0e,0x42,0x44,0x44, - 0x44,0x44,0xc4,0x4b,0x4b,0x00,0x44,0x44,0x44,0x44, - 0x44,0x44,0x44,0x4a,0x40,0x09,0x00,0x11,0x11,0x11, - 0x11,0x11,0x11,0x91,0x12,0x50,0x02,0x40,0x44,0x44, - 0x44,0x44,0x44,0x44,0xa4,0x04,0x94,0x00,0x10,0x11, - 0x11,0x11,0x11,0x11,0x11,0x29,0x01,0x25,0x00,0x44, - 0x44,0x44,0x44,0x44,0x44,0x44,0x4a,0x40,0xbb,0x00, - 0x88,0x88,0x88,0x84,0xb7,0x37,0xd0,0x3f,0xef,0x20, - 0x72,0xf6,0x51,0xde,0x01,0x88,0x88,0x88,0x94,0x5d, - 0x47,0x14,0x45,0x79,0xc7,0x20,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x81,0x69,0x09,0x80,0x88,0x88,0x88, - 0x88,0x88,0x88,0x48,0x09,0x28,0x01,0x20,0x22,0x22, - 0x22,0x22,0x22,0x22,0x52,0x02,0x4a,0x00,0x88,0x88, - 0x88,0x88,0x88,0x88,0x88,0x94,0x80,0x12,0x00,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x25,0xa0,0x04,0x80, - 0x88,0x88,0x88,0x88,0x88,0x88,0x48,0x09,0x28,0x01, - 0x20,0x22,0x22,0x22,0x22,0x22,0x22,0x52,0x02,0x4a, - 0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x94,0x80, - 0x12,0x00,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x25, - 0xa0,0x04,0x80,0x88,0x88,0x88,0x88,0x88,0x88,0x48, - 0x09,0x28,0x01,0x20,0x22,0x22,0x22,0x22,0x22,0x22, - 0x52,0x02,0x4a,0x00,0x88,0x88,0x88,0x88,0x88,0x88, - 0x88,0x94,0x80,0x12,0x00,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x25,0xa0,0x04,0x80,0x88,0x88,0x88,0x88, - 0x88,0x88,0x48,0x09,0x28,0x01,0x20,0x22,0x22,0x22, - 0x22,0x22,0x22,0x52,0x02,0x4a,0x00,0x88,0x88,0x88, - 0x88,0x88,0x88,0x88,0x94,0x80,0x12,0x00,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x25,0xa0,0x04,0x80,0x88, - 0x88,0x88,0x88,0x88,0x88,0x48,0x09,0x28,0x01,0x20, - 0x22,0x22,0x22,0x22,0x22,0x22,0x52,0x02,0x4a,0x00, - 0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x94,0x80,0x12, - 0x00,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x25,0xa0, - 0x04,0x80,0x88,0x88,0x88,0x88,0x88,0x88,0x48,0x09, - 0x28,0x01,0x20,0x22,0x22,0x22,0x22,0x22,0x22,0x52, - 0x02,0x4a,0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x88, - 0x94,0x80,0x12,0x00,0x22,0x22,0x22,0x22,0x22,0x22, - 0x22,0x25,0xa0,0x04,0x80,0x88,0x88,0x88,0x88,0x88, - 0x88,0x48,0x09,0x28,0x01,0x20,0x22,0x22,0x22,0x22, - 0x22,0x22,0x52,0x02,0x4a,0x00,0x88,0x88,0x88,0x88, - 0x88,0x88,0x88,0x94,0x80,0x12,0x00,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x25,0xa0,0x04,0x40,0xfb,0xeb, - 0x03,0x7c,0x15,0x38,0x0e,0xb8,0x0d,0x78,0x1a,0x78, - 0x13,0xf8,0x0c,0x98,0x0d,0x4c,0x03,0x3e,0x01,0x5e, - 0x03,0x1e,0x01,0xae,0x05,0x7e,0x0c,0x0c,0xc9,0x23, - 0x58,0x09,0x6e,0x73,0x20,0x72,0x3c,0x2e,0xca,0x2b, - 0xc0,0x16,0x70,0x2c,0xbe,0xe7,0x70,0x9f,0x9c,0xe2, - 0x6b,0x54,0xab,0xfd,0x5d,0x47,0xe1,0x8b,0xf7,0x80, - 0xbc,0x02,0x6c,0x21,0x87,0xe2,0x7b,0x2e,0x0f,0xcd, - 0x2b,0x40,0x11,0x11,0x11,0x49,0x47,0x67,0xde,0x01, - 0x48,0x30,0x23,0x80,0x43,0xb0,0x1b,0xb6,0x05,0xeb, - 0xb4,0xeb,0x5b,0x79,0x0c,0x03,0x96,0x04,0xbe,0x02, - 0xec,0x01,0xdc,0x0a,0x4c,0x0c,0x1c,0xa3,0x88,0x88, - 0x88,0x88,0x88,0x88,0x64,0x44,0x09,0x80,0xf6,0xb4, - 0x0d,0x70,0x0d,0x30,0x3c,0xef,0x40,0x44,0x44,0x44, - 0x44,0x44,0x44,0xa4,0x18,0xb4,0x04,0xa0,0xfd,0x1c, - 0x0f,0xdc,0x8e,0x3a,0xff,0x22,0x22,0x22,0x22,0x22, - 0x22,0xd2,0x8d,0x66,0x00,0xb4,0x97,0x7d,0x80,0xd3, - 0xf3,0x0e,0x42,0x44,0x44,0x44,0x44,0x44,0x44,0x8a, - 0x47,0x33,0x00,0xda,0xc7,0xc2,0xc0,0xaf,0xf2,0x0e, - 0x42,0x44,0x44,0x44,0x44,0x44,0x44,0x8a,0x49,0x09, - 0x80,0xf6,0xa1,0xca,0xfd,0x22,0x22,0x22,0x22,0x22, - 0x22,0x52,0x93,0x96,0x00,0xb4,0x87,0x7e,0x34,0xb6, - 0x35,0xd7,0x14,0xe0,0x15,0x6c,0x1b,0xc0,0x4e,0x60, - 0x30,0xb0,0x28,0x30,0x6f,0x6a,0x91,0x89,0x88,0x88, - 0x88,0x88,0x88,0x48,0x21,0x28,0x01,0xd0,0x1e,0xb6, - 0x24,0xd9,0xe8,0xff,0x7d,0xc0,0x69,0xc0,0x03,0xc0, - 0xcc,0x2a,0x3f,0x1f,0x06,0x4c,0x6e,0x3e,0x2c,0x11, - 0x11,0x11,0x11,0x11,0x11,0x29,0x0a,0x25,0x00,0xda, - 0xc3,0x66,0x09,0xda,0x5e,0x04,0xfc,0x00,0x88,0xea, - 0xb4,0xf9,0xb4,0xb9,0x70,0x44,0xda,0xda,0x9d,0xf8, - 0x3e,0x23,0x8f,0x86,0x0e,0x24,0x65,0xed,0xfa,0x77, - 0x89,0x88,0x88,0x88,0x48,0x85,0x12,0x00,0xed,0x61, - 0x4d,0x67,0xbb,0xe7,0x80,0x23,0xa8,0xdf,0xf9,0x17, - 0x91,0xfa,0x9e,0xaa,0x3c,0xda,0x4d,0xbb,0xfe,0x5d, - 0x22,0x22,0x22,0x22,0x52,0xa1,0x22,0x80,0xed,0x61, - 0x39,0x67,0xbb,0x8b,0xa9,0x3e,0xe5,0x5f,0x44,0x44, - 0x44,0x44,0x44,0x44,0xda,0x9c,0x12,0x00,0xad,0xaf, - 0x13,0x98,0xcf,0xd9,0xf6,0xaf,0x21,0x03,0x11,0x11, - 0x11,0x11,0x11,0x11,0x91,0xe2,0x52,0x02,0xa0,0xf5, - 0x8d,0x00,0x3a,0x1c,0xed,0x3e,0x05,0xde,0x0e,0x1c, - 0x8b,0x88,0x88,0x88,0x88,0x88,0x88,0x14,0x94,0x12, - 0x00,0xad,0xaf,0x9f,0xb3,0xdd,0x6b,0x41,0xa3,0x10, - 0x11,0x11,0x11,0x11,0x11,0x91,0x42,0x53,0x02,0xa0, - 0xf5,0xf5,0x76,0xb6,0xfb,0x2c,0x68,0x14,0x22,0x22, - 0x22,0x22,0x22,0x22,0x52,0x68,0x4a,0x00,0xb4,0x3e, - 0xcf,0xf4,0x7f,0x80,0x29,0x41,0xa3,0x10,0x11,0x11, - 0x11,0x11,0x11,0x91,0x42,0x53,0x02,0xa0,0x3c,0xe6, - 0xe4,0x1d,0x80,0x88,0x88,0x88,0x88,0x88,0x88,0xe4, - 0x47,0x09,0x00,0x11,0x11,0x11,0x11,0x11,0x11,0x91, - 0x12,0x50,0x02,0x40,0x44,0x44,0x44,0x44,0x44,0x44, - 0xa4,0x04,0x94,0x00,0x10,0x11,0x11,0x11,0x11,0x11, - 0x11,0x29,0x81,0xce,0xbc,0x03,0xa8,0x62,0x59,0x60, - 0x7d,0x60,0x35,0x60,0x09,0x60,0x49,0x60,0x3e,0x60, - 0x40,0xe5,0x31,0x0f,0x56,0xd0,0x6e,0x0a,0xf0,0x09, - 0xf0,0x06,0x30,0x16,0x78,0x11,0x78,0x14,0x78,0x0a, - 0x98,0x99,0x71,0xcc,0x52,0x4c,0x03,0xb0,0xf7,0xd2, - 0x46,0xc0,0xf2,0xc0,0x28,0x60,0x41,0x60,0x10,0x30, - 0x10,0x98,0x06,0x7c,0x8a,0xbd,0x8f,0x5e,0x06,0x9e, - 0x04,0x1e,0x07,0xfe,0x09,0xcc,0xc8,0x21,0xde,0x22, - 0x99,0x9d,0xb0,0xfd,0xea,0xc0,0x86,0xc0,0x4a,0xc0, - 0xca,0xc0,0x42,0xc0,0x60,0x60,0x08,0xb6,0x53,0xc5, - 0x54,0x60,0x32,0xf0,0x1e,0xf0,0x36,0xf0,0x1c,0xf0, - 0x04,0xf6,0x5c,0x8f,0x4b,0x27,0x64,0x11,0x91,0x86, - 0x0d,0x07,0xbe,0x0e,0xac,0x89,0x5d,0xc3,0x96,0x06, - 0x86,0x62,0xd7,0xb0,0x5e,0xd8,0x4e,0x3a,0x9f,0x01, - 0xe3,0xb1,0xfb,0x8d,0x67,0x81,0x7f,0x03,0x0f,0x90, - 0xfc,0x7a,0x19,0x67,0x49,0x60,0x0b,0x60,0x95,0x4a, - 0x2c,0x8b,0x56,0xe2,0xe8,0x8a,0x65,0x2a,0x30,0x01, - 0x78,0x07,0xdb,0xe2,0xf7,0xbf,0xc0,0x43,0x95,0x78, - 0xa2,0x94,0x63,0x69,0x45,0x6b,0x00,0x5f,0x05,0x56, - 0x04,0x56,0x00,0x16,0xc6,0xbe,0x8f,0x06,0xa3,0xef, - 0xa3,0x5a,0xfa,0x61,0xcf,0xdb,0xba,0xd8,0xfd,0xd2, - 0x62,0xc0,0xe2,0xd8,0xe7,0xa2,0xeb,0xfe,0xbb,0x03, - 0x7b,0xee,0xa6,0x02,0x13,0xb1,0xe7,0xee,0x2d,0x3e, - 0x7f,0x0f,0xfe,0x07,0x78,0x3f,0xeb,0xc0,0x5b,0xcc, - 0xa2,0xc0,0xe6,0xd8,0xbd,0xd2,0xf2,0xd8,0x75,0x66, - 0x08,0x9f,0xdf,0x97,0xce,0x00,0x26,0x61,0xf7,0xa5, - 0xaf,0x01,0x63,0x80,0x7f,0x01,0xf7,0x61,0x9f,0xf7, - 0xb2,0x1a,0x06,0x6c,0x82,0xdd,0x67,0x2e,0x87,0xdd, - 0xcf,0xcf,0x8b,0x3d,0x6f,0x7d,0xb0,0x3e,0xe1,0x24, - 0xec,0xba,0x38,0x06,0xbb,0xa7,0x7f,0x16,0xb8,0x0b, - 0x78,0x37,0xc1,0x79,0xee,0x00,0xb6,0x89,0x69,0xf3, - 0x14,0xf6,0x59,0x69,0x6d,0x51,0x14,0xe5,0xfd,0xe8, - 0x15,0x45,0xd1,0x16,0x51,0x14,0x5d,0x1e,0x45,0xd1, - 0x87,0x51,0xf3,0xa6,0x46,0x51,0x74,0x5b,0x14,0x45, - 0x7b,0x46,0x51,0x34,0xb8,0x00,0x7f,0x5f,0xb3,0x8f, - 0x43,0x53,0x78,0x4e,0x1a,0xb1,0x7c,0x82,0x18,0x8b, - 0xf4,0x98,0x27,0x8a,0xa2,0x6f,0x44,0x51,0x74,0x53, - 0x14,0x45,0xd3,0x1b,0xfc,0xdb,0x3f,0x89,0xa2,0xe8, - 0x8a,0x28,0x8a,0xd6,0x76,0x9e,0xf3,0x8f,0x8e,0x63, - 0x3e,0x94,0xe1,0x73,0x50,0xef,0xb1,0xb9,0xf3,0x39, - 0x38,0xdb,0x71,0xac,0xc5,0xa3,0x28,0x3a,0x37,0x8a, - 0xa2,0xd7,0x9c,0xc7,0xac,0x66,0x76,0x64,0xcf,0xcd, - 0x3e,0x51,0x14,0xf5,0x4b,0xf1,0xef,0x0c,0xf9,0x38, - 0xd6,0xf9,0xb7,0xed,0x53,0x80,0x58,0xdb,0xf9,0xef, - 0x3a,0xca,0x19,0xef,0x01,0x19,0xc4,0xb2,0x7c,0x14, - 0x45,0xe3,0x9c,0xf1,0x44,0x51,0x14,0x1d,0x9e,0x41, - 0x4c,0x49,0x1e,0xde,0xef,0x99,0x43,0x0b,0x10,0x2b, - 0x51,0x14,0x7d,0xc7,0x11,0xeb,0x38,0xc7,0x71,0x3a, - 0xa2,0x28,0xda,0x31,0x8a,0xa2,0xbb,0xa2,0x28,0x9a, - 0xe9,0x7c,0x0e,0x7a,0xfa,0x30,0x8a,0xa2,0x4b,0xa3, - 0x28,0x5a,0xb6,0xc9,0xbf,0x69,0x70,0x14,0x45,0x47, - 0x47,0x51,0xf4,0x64,0x83,0x71,0x44,0x51,0x14,0xbd, - 0x1f,0xd9,0xb5,0x7b,0xb1,0x26,0x63,0xc9,0xea,0x71, - 0xb6,0xe3,0x6f,0xba,0xcf,0x79,0xac,0x51,0x51,0x14, - 0x5d,0x10,0x45,0xd1,0x5b,0xee,0x67,0x6b,0x6e,0xb3, - 0xa3,0x28,0x7a,0x24,0x8a,0xa2,0xfd,0xa2,0x28,0xea, - 0x1f,0xf0,0xef,0x2e,0xca,0x63,0xfe,0x28,0x8a,0x0e, - 0x8e,0xa2,0x68,0x74,0x14,0x45,0x33,0x9a,0x78,0xde, - 0xba,0x7b,0x25,0x8a,0xa2,0x73,0xa2,0x28,0xda,0xa0, - 0x00,0x7f,0x5f,0xb3,0x8f,0x87,0x1c,0x7f,0xef,0xc3, - 0x8e,0xe3,0x0c,0x8d,0xa2,0xe8,0xb8,0x28,0x8a,0x9e, - 0x72,0x1c,0xaf,0x9e,0xff,0x46,0x51,0x74,0x58,0x14, - 0x45,0xc3,0x02,0xfc,0xad,0x45,0x7c,0x74,0x46,0x51, - 0xb4,0x4b,0x64,0xef,0xcf,0xd9,0x4d,0x3c,0x6f,0x4f, - 0x45,0x76,0xbf,0x30,0xd4,0x71,0xce,0xe7,0x1d,0xc7, - 0xbb,0x3b,0xf0,0xdf,0x9d,0xc9,0x23,0xcf,0x25,0x00, - 0xfd,0x81,0xef,0x63,0x99,0x9a,0xd1,0xc0,0x01,0xd8, - 0x48,0x7f,0xb3,0xfa,0x01,0xdb,0x01,0x7f,0xc0,0xb2, - 0x65,0x67,0x63,0xa3,0x91,0xd2,0xfe,0xb6,0x03,0x9e, - 0x06,0x6e,0x07,0x76,0xc6,0xb2,0x82,0x8d,0x18,0x06, - 0xec,0x8f,0x8d,0xa6,0xfc,0x19,0x1b,0x45,0xa8,0x67, - 0x09,0xc7,0x31,0x5b,0x6d,0x54,0x61,0x7a,0x9d,0x9f, - 0x2d,0x08,0x5c,0x06,0xbc,0x0a,0x1c,0x89,0x8d,0x56, - 0x35,0x6a,0x1e,0x60,0x03,0xe0,0xaa,0xca,0xf1,0xf6, - 0x69,0xe2,0x58,0x22,0x79,0x58,0x04,0xf8,0x07,0x36, - 0x1a,0xe1,0xf1,0x53,0xe0,0x57,0xe1,0xc2,0x29,0x85, - 0xf1,0x8e,0x36,0x43,0x63,0x7e,0xfe,0x35,0xe0,0x19, - 0xec,0x1a,0xbf,0x39,0x8d,0xcf,0x88,0x9c,0x0f,0x38, - 0x08,0x78,0x1e,0xb8,0x04,0xfb,0xfe,0x48,0xa2,0x0f, - 0x70,0x02,0x36,0x9b,0xf1,0x6c,0x6c,0x36,0x55,0xa3, - 0x16,0x00,0x8e,0x06,0x5e,0x01,0xce,0xc0,0xee,0x87, - 0x8a,0x2c,0x8d,0xd7,0x71,0x31,0xe0,0x7a,0xe0,0x25, - 0xe0,0x30,0xe0,0x4b,0x4d,0xc4,0x33,0x0f,0xf0,0x15, - 0xe0,0x4a,0xec,0xde,0x74,0xff,0x26,0x8e,0x55,0x64, - 0xab,0x00,0x57,0x63,0xa3,0xf7,0x97,0x60,0xb3,0x4d, - 0x7a,0xa7,0x74,0xec,0x65,0x80,0xa3,0xb0,0x19,0x29, - 0xcf,0x62,0xcf,0x61,0xdf,0x94,0x8e,0x9d,0xb5,0x8f, - 0x1d,0x6d,0x16,0xac,0xf3,0xb3,0xbe,0xc0,0xa9,0xc0, - 0x9b,0xd8,0xe7,0x71,0xb5,0x26,0xe3,0x59,0x13,0xb8, - 0x00,0x78,0x1d,0x38,0x16,0xeb,0x47,0xb5,0xab,0x9d, - 0x80,0x17,0x80,0x1b,0xb1,0xf7,0x67,0x33,0xfd,0xd5, - 0xd5,0x80,0x73,0xb0,0xf7,0xfb,0x69,0xd4,0x7f,0x3f, - 0x8e,0x74,0x1c,0x6f,0x62,0x13,0xb1,0x14,0x46,0x5e, - 0x09,0x80,0xdd,0xb0,0x8b,0xeb,0x45,0xf8,0x3a,0x4f, - 0x8d,0x1a,0x8c,0x7d,0x19,0xbe,0x06,0xfc,0x84,0xf4, - 0x2e,0x70,0x52,0x2c,0xc3,0xb1,0x8b,0xc4,0x6d,0xd8, - 0x74,0xc9,0x34,0xed,0x88,0x2d,0x0d,0x38,0xbc,0x4e, - 0x1b,0x4f,0xe2,0xea,0xb3,0x74,0xc2,0xc9,0x4c,0xad, - 0x04,0xc0,0xb6,0xd8,0x97,0xfa,0x81,0xa4,0xff,0x79, - 0xfa,0x12,0x96,0x08,0xf8,0x2b,0xf6,0x9a,0x8a,0x14, - 0xdd,0x70,0xe0,0x4e,0xac,0x13,0xe2,0x71,0x0e,0x76, - 0x03,0x22,0xcd,0xf1,0x5c,0x4f,0x3b,0xa9,0xde,0x01, - 0xee,0x0d,0x9c,0x85,0x4d,0x0d,0x4d,0xf3,0xfb,0xa2, - 0x13,0x38,0x18,0x78,0x0c,0x5b,0xca,0xe8,0xb1,0x42, - 0xa5,0xfd,0xa9,0xa4,0x7b,0xcd,0xeb,0x0b,0x1c,0x07, - 0x3c,0x8c,0xff,0xbd,0x99,0x07,0xcf,0xeb,0x38,0xb8, - 0xce,0xcf,0xf6,0xc2,0x92,0x38,0xdf,0xc4,0x96,0x46, - 0xa4,0x69,0x61,0xe0,0x0a,0x6c,0x4a,0xf0,0x88,0x94, - 0x8f,0x9d,0x97,0xf9,0xb0,0xef,0xd8,0xa7,0x81,0xbd, - 0x69,0x7c,0x90,0xc4,0x6b,0x65,0xec,0x39,0x7c,0x01, - 0x1b,0xa0,0x69,0x35,0x9e,0xf7,0x67,0xad,0xc4,0xef, - 0x4a,0xd8,0x20,0xd2,0x09,0xd8,0x14,0xff,0x34,0x0d, - 0x03,0xce,0xc4,0x96,0x5d,0xb4,0xfe,0x54,0xf4,0x2f, - 0x1a,0x8e,0x25,0x65,0x6f,0xc6,0x92,0x49,0x69,0x1a, - 0x8c,0xf5,0x05,0x9f,0x04,0xd6,0xae,0x73,0xfe,0x38, - 0x93,0x53,0x8b,0x28,0x47,0x59,0x27,0x00,0xe6,0xc5, - 0x2e,0xa6,0x37,0x60,0x17,0xd7,0xac,0xf4,0xc3,0x6e, - 0xba,0x9e,0x24,0x7e,0x34,0x57,0x5a,0xcb,0x0a,0xd8, - 0x7a,0x9c,0x5d,0x02,0x9e,0xa3,0x0f,0x70,0x3e,0x70, - 0x0b,0xd5,0x33,0xae,0x9e,0x9b,0x83,0x56,0xbb,0x60, - 0x54,0x4b,0x00,0x9c,0x8c,0x75,0xce,0x3d,0x19,0xd2, - 0x66,0x6c,0x8b,0xad,0xab,0xad,0x97,0x59,0x17,0xc9, - 0x5b,0x7f,0xec,0xf3,0xe0,0xed,0x44,0xfe,0x06,0x38, - 0x26,0x5c,0x38,0xa5,0x32,0xc5,0xd9,0xae,0x67,0xe7, - 0xb1,0x37,0x96,0x2c,0x3e,0x06,0x5b,0xcf,0x1c,0xc2, - 0xb2,0xd8,0x9a,0xdd,0xb8,0x24,0xc0,0x16,0x58,0xcd, - 0x99,0x66,0x46,0xfc,0xe3,0xac,0x89,0xad,0x1d,0x5e, - 0x34,0xe0,0x39,0x9a,0xe1,0x79,0x1d,0x6b,0x25,0x00, - 0xce,0x03,0x7e,0x4f,0xfc,0x0c,0x81,0x66,0x6d,0x43, - 0x7b,0x7c,0x1f,0xed,0x82,0xcd,0x0c,0xd9,0x87,0x70, - 0xef,0xfd,0x5a,0x96,0xc2,0x06,0x68,0xfe,0x84,0xad, - 0xd9,0x6e,0x15,0x9e,0xfb,0xb6,0x21,0xcc,0xfd,0x7c, - 0x6e,0x8c,0x5d,0x03,0x56,0x4d,0x3d,0xa2,0x2f,0x5a, - 0xa1,0x72,0x9e,0xdd,0x02,0x9f,0x27,0x2b,0xcb,0x60, - 0xb5,0x38,0x76,0x0c,0x7c,0x9e,0x15,0x80,0xfb,0x99, - 0x7b,0xad,0x7f,0x7f,0x7c,0x03,0x5b,0xd3,0x52,0x8f, - 0x28,0x07,0x59,0x26,0x00,0x56,0xc7,0xbe,0xec,0xe2, - 0x8a,0x2b,0x84,0xb4,0x12,0x56,0x28,0xf0,0x1b,0x39, - 0xc6,0x20,0xe9,0x59,0x03,0xfb,0x62,0xce,0x6a,0x84, - 0x63,0x07,0xe0,0x56,0xe6,0x4e,0x02,0x78,0xb2,0xbb, - 0xf5,0xa6,0xd4,0x17,0x51,0xcf,0x78,0xcf,0x06,0x7e, - 0x96,0xe1,0xf9,0x57,0xc6,0x9e,0xeb,0xa2,0x4f,0x61, - 0x95,0x72,0xea,0x85,0x25,0xb2,0x37,0x70,0xb6,0xbf, - 0x06,0x5b,0xf2,0x26,0xe9,0xf0,0xde,0x80,0x75,0xef, - 0x3c,0x76,0x62,0xaf,0xd9,0xff,0x4b,0x3f,0x9c,0xb9, - 0x0c,0x07,0xfe,0x42,0xed,0xce,0xeb,0xd6,0x58,0x87, - 0x68,0x40,0x06,0xb1,0x2c,0x89,0x8d,0xa6,0x85,0x1e, - 0xed,0x6d,0x84,0xe7,0x75,0xec,0xf9,0x1c,0x76,0x00, - 0x17,0x03,0x47,0xa4,0x1f,0x4e,0x4d,0x2b,0x61,0xdf, - 0x47,0xad,0x38,0x95,0x7d,0x1e,0xe0,0xe7,0x58,0xe2, - 0x2b,0xe9,0xf2,0x94,0xb4,0xed,0x8a,0x8d,0x8a,0x8f, - 0xca,0x39,0x0e,0xaf,0xa9,0x8e,0x36,0x1d,0x7c,0x31, - 0xa9,0xb1,0x31,0xf0,0x37,0xb2,0x4b,0x74,0xf4,0x01, - 0xfe,0x08,0xec,0x97,0xd1,0xf9,0x42,0x59,0x01,0xbb, - 0x9f,0x5f,0x22,0xa3,0xf3,0xf5,0xc7,0xae,0xd1,0x3b, - 0x75,0xfb,0xb7,0x7a,0xb3,0x8d,0xba,0x6b,0xb5,0xfb, - 0xf9,0xaa,0xb2,0x4a,0x00,0x7c,0x85,0x6c,0x5f,0xd8, - 0x7a,0x86,0x60,0x17,0xf2,0x9d,0xf3,0x0e,0x44,0x9a, - 0xb2,0x08,0x36,0x9b,0x24,0xf4,0x68,0x74,0x4f,0x5b, - 0x60,0x37,0x53,0x5d,0x9f,0x9d,0x01,0xf8,0xa6,0x1e, - 0xb6,0xda,0x05,0xa3,0x7b,0xbc,0x3f,0xc5,0x96,0xd2, - 0x64,0x6d,0x1d,0x34,0x5d,0x5a,0x8a,0xe9,0x32,0xfc, - 0x53,0x5a,0xff,0x02,0xec,0x8b,0xaa,0xb3,0xa7,0xc9, - 0xbb,0xd3,0x4f,0xf7,0x0e,0xf6,0xa9,0x84,0x1f,0x59, - 0xea,0x6e,0x05,0x2c,0x71,0xda,0xd3,0x9a,0xd8,0x14, - 0xd7,0x2c,0x93,0x9b,0x6b,0x63,0x6b,0x86,0x8b,0xc6, - 0xf3,0x3a,0xf6,0xe7,0x8b,0x23,0xac,0x27,0x02,0x87, - 0x84,0x09,0xa7,0xae,0x75,0x80,0xd3,0x73,0x38,0x6f, - 0x33,0x3a,0x80,0xcb,0x81,0x1f,0xe7,0x1d,0x48,0x37, - 0x2b,0x60,0xb3,0x52,0x96,0xce,0x39,0x0e,0x0f,0xef, - 0x75,0xa6,0xab,0xb3,0xbf,0x08,0x76,0x7f,0x38,0x30, - 0x4c,0x38,0x35,0xcd,0x03,0x5c,0x8a,0xd5,0x32,0x69, - 0x45,0x23,0x81,0xbf,0x93,0xfd,0x2c,0x9b,0xde,0x58, - 0xbd,0xb8,0xae,0x99,0x1a,0xde,0x04,0x40,0x5b,0xec, - 0x34,0x97,0xc5,0x36,0x80,0xeb,0x60,0x6b,0x24,0xbd, - 0x4f,0x6c,0x97,0x08,0x5b,0x37,0xf4,0x30,0x36,0x6d, - 0xe9,0x1d,0x6c,0x3a,0x4e,0x07,0xf6,0xa5,0xbe,0x30, - 0x36,0xad,0x68,0x6d,0xe0,0xcb,0x24,0x5b,0xff,0xd5, - 0x0b,0xb8,0x0e,0xd8,0x1e,0x2b,0xde,0x24,0xad,0xa5, - 0x37,0x76,0x53,0xdd,0x48,0x71,0xc7,0x69,0x58,0x71, - 0x9a,0x67,0xb0,0xda,0x10,0x13,0x81,0x39,0xd8,0xda, - 0xb8,0x45,0xb1,0xec,0xed,0x1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4a,0x92,0x00,0xe8,0x85, - 0x8d,0xc4,0x7b,0x06,0xa5,0x3e,0xc5,0xfa,0x37,0x9f, - 0x60,0xd7,0x9d,0x19,0xd8,0x67,0x7c,0x51,0xec,0xf3, - 0x9d,0xb4,0xbf,0x04,0x76,0xcf,0x75,0x23,0xf6,0x9a, - 0xb4,0xd2,0x76,0x81,0x1d,0x58,0x11,0xcf,0xc5,0x1b, - 0xf8,0xdd,0x0f,0x80,0x7b,0xb0,0xcf,0xe3,0x1b,0x7c, - 0x5e,0xb3,0x61,0x20,0xf6,0x19,0x1f,0x85,0x0d,0x40, - 0xaf,0x4a,0x75,0xb8,0xf0,0x64,0x00,0x00,0x20,0x00, - 0x49,0x44,0x41,0x54,0xed,0x6b,0xe6,0x00,0xac,0x3f, - 0xb1,0x26,0xfe,0x19,0x59,0xad,0x76,0x3f,0x5f,0x55, - 0xe8,0x04,0xc0,0x42,0xd8,0x68,0x7b,0x92,0x8b,0xc3, - 0x78,0xe0,0x42,0x6c,0x6d,0xd7,0xeb,0xce,0xdf,0x99, - 0x17,0x1b,0xd1,0xff,0x01,0x36,0x55,0xcb,0xa3,0x0f, - 0xf6,0xa6,0x5b,0x0d,0xab,0xd0,0x59,0x54,0xd7,0x61, - 0xd9,0xd2,0x5a,0x16,0xc5,0xa6,0x1b,0xc5,0x79,0x80, - 0x64,0x53,0x50,0x5f,0x4b,0xd0,0x36,0x6b,0x47,0x03, - 0x6b,0x25,0xfc,0x9d,0xe7,0xb0,0x1b,0xb1,0x1b,0x88, - 0x9f,0xd6,0xb5,0x00,0xf6,0x5c,0x7d,0x8f,0xda,0x05, - 0x5e,0x4e,0xc6,0x2e,0x3c,0x1f,0x3a,0xcf,0x9f,0xf6, - 0x3e,0xd1,0xa1,0x4d,0xc4,0xbe,0xa4,0xaf,0xa5,0xf6, - 0x4c,0xa1,0x97,0xf8,0xbc,0x68,0xdf,0x8b,0x31,0xc7, - 0x5b,0x12,0xdb,0x63,0xfb,0x10,0xac,0x02,0xb1,0x57, - 0x27,0x96,0x6c,0xd9,0x33,0xc1,0xef,0x88,0x84,0x72, - 0x38,0xfe,0x91,0xd4,0x87,0xb0,0x65,0x43,0xad,0x36, - 0xfb,0xa7,0x15,0x78,0x3b,0x8e,0x7d,0xb1,0x35,0xe2, - 0xbf,0xa3,0xfa,0x0d,0xe0,0x24,0xec,0x5e,0xe3,0x1a, - 0x6c,0x6a,0x72,0xad,0xeb,0xf4,0x60,0x60,0x23,0x6c, - 0xfd,0xf4,0x2e,0x35,0x8e,0x55,0x4d,0x27,0x36,0x83, - 0x6a,0xef,0xca,0xff,0x5f,0x41,0xed,0x5d,0x53,0xde, - 0xc6,0x46,0x6b,0x6f,0xa4,0xfe,0xf5,0x74,0x04,0xb6, - 0xc7,0xfd,0x77,0x81,0x2d,0x9d,0x71,0x80,0xdd,0x14, - 0x7f,0x17,0xfb,0xee,0x2a,0x8a,0x24,0xaf,0xe3,0x08, - 0x6c,0xb4,0xae,0xd6,0x73,0xff,0x0c,0xf6,0x7d,0x74, - 0x07,0xd6,0xf9,0xaf,0x67,0x41,0x6c,0x36,0xdf,0xc1, - 0xf8,0x97,0xf1,0x80,0xbd,0x9e,0x3f,0x06,0xbe,0x93, - 0xe0,0x77,0xf2,0x72,0x20,0xc9,0x67,0x4a,0xfc,0x0f, - 0x5b,0x5e,0x71,0x2d,0xfe,0x8e,0x79,0x2f,0x6c,0x47, - 0x8d,0x03,0xb1,0xfb,0x70,0xef,0x67,0x63,0xd1,0xca, - 0x79,0xb6,0xc4,0x06,0x61,0x8a,0xc8,0xfb,0xfe,0x1c, - 0x88,0x3d,0xd7,0x1b,0xd5,0xf8,0x79,0x84,0x7d,0x1f, - 0xfc,0x01,0x4b,0x0a,0x8f,0xad,0x73,0xac,0x79,0xb0, - 0xc4,0xc8,0xee,0xd8,0xcc,0xb1,0x24,0x35,0x2e,0x86, - 0x61,0xb5,0x66,0xb6,0x4f,0xf0,0x3b,0x79,0x3b,0x18, - 0x7b,0xff,0x24,0x71,0x17,0x36,0xbb,0xea,0x1e,0x7c, - 0x33,0xeb,0x16,0xc0,0x3e,0xb3,0x87,0x51,0xbd,0x1e, - 0xca,0x92,0xd8,0x2e,0x0d,0xbf,0x73,0x9e,0xbf,0x3d, - 0x12,0xfa,0x01,0xf7,0x18,0xec,0x8c,0xa2,0xe8,0x01, - 0xc7,0x7e,0x8a,0x5d,0x66,0x47,0x51,0x74,0x7e,0x14, - 0x45,0x83,0x9a,0x38,0x67,0x47,0x64,0xfb,0xb7,0x7e, - 0x92,0xe0,0xbc,0x0f,0x45,0x51,0xd4,0x2b,0xe0,0xf3, - 0x10,0xfa,0x31,0xca,0xf9,0x77,0xde,0x5e,0x80,0x58, - 0xd3,0x78,0x2c,0x19,0x45,0xd1,0x54,0xe7,0xdf,0x1c, - 0x45,0xb6,0xb7,0xed,0x91,0x51,0x63,0xaf,0xf1,0xbc, - 0x51,0x14,0x5d,0x57,0xe7,0xd8,0x8f,0x45,0x51,0xb4, - 0xb2,0x33,0x8e,0x13,0x1b,0x38,0x7f,0x88,0xc7,0xe6, - 0xce,0x78,0x37,0x89,0xa2,0xe8,0xa6,0x1a,0x3f,0x7b, - 0x27,0x8a,0xa2,0xdd,0xa3,0x28,0x9a,0xa7,0xc1,0x18, - 0xf6,0x89,0xa2,0x68,0x82,0x33,0x8e,0x28,0xb2,0xfd, - 0xb9,0xe7,0x6b,0xf0,0x5c,0x21,0x1e,0xc7,0x3a,0xe3, - 0xde,0xa7,0x00,0xb1,0xb6,0xf3,0xdf,0x75,0x94,0x33, - 0xde,0x03,0x52,0x3a,0xdf,0xb7,0xa2,0x28,0x9a,0xe3, - 0x3c,0xe7,0x7f,0xa3,0x28,0x1a,0x52,0x80,0xe7,0xc8, - 0xfb,0x38,0xd4,0xf9,0x77,0x1d,0x5a,0x80,0x58,0x89, - 0xa2,0x68,0x51,0x67,0xbc,0x5f,0x8b,0xa2,0xe8,0x17, - 0x35,0x7e,0x76,0x55,0x64,0xfb,0xa0,0x27,0x3d,0xf7, - 0x9a,0x91,0xed,0x75,0xee,0xf5,0x59,0x14,0x45,0x03, - 0xa2,0x28,0xda,0xaa,0xc6,0xcf,0xa7,0x45,0xf6,0xd9, - 0xeb,0xdb,0x40,0x2c,0x9b,0x46,0x51,0xf4,0x7e,0x82, - 0x58,0xde,0x8e,0xec,0x3e,0x29,0xef,0xd7,0xaf,0xeb, - 0xb1,0xb5,0x33,0xee,0x05,0xa2,0x28,0xba,0xb9,0xc6, - 0xcf,0x5e,0x8b,0xa2,0xe8,0xff,0x35,0x11,0xc3,0x8e, - 0x51,0x14,0x8d,0x77,0xc6,0x11,0x45,0x76,0x4f,0x51, - 0xa4,0xef,0xa3,0x6a,0x8f,0x55,0xa3,0x64,0xf7,0x49, - 0x93,0xa3,0x28,0xfa,0x41,0x14,0x45,0xbd,0x9b,0x3c, - 0xef,0x9a,0x51,0x14,0x3d,0x99,0xe0,0xbc,0x51,0x64, - 0xef,0xfd,0xbc,0x9f,0xaf,0x5a,0x8f,0x93,0x9d,0x7f, - 0xc3,0xd6,0x51,0x14,0x7d,0x54,0xe3,0x67,0xff,0x8e, - 0xa2,0x68,0x9d,0x06,0xcf,0x3f,0x6f,0x14,0x45,0x57, - 0x38,0x63,0xe8,0x6e,0xbb,0x06,0xcf,0x97,0xf5,0x63, - 0xfe,0x28,0x59,0x7f,0x6d,0x62,0x14,0x45,0xbb,0x35, - 0x71,0xbe,0x7e,0x91,0xdd,0x8b,0xcf,0xac,0x72,0xec, - 0xd9,0x91,0xf5,0x15,0x3c,0x4e,0x6d,0x22,0x86,0xc2, - 0x3c,0x42,0xd6,0x00,0x38,0x9c,0xda,0xd9,0xb0,0x9e, - 0x26,0x60,0x85,0xf9,0x7e,0x88,0x65,0xe4,0x1b,0x15, - 0x01,0xbf,0xc5,0xa6,0x70,0x3f,0xe7,0xfc,0x9d,0x0d, - 0xb0,0x0c,0x94,0xb4,0x86,0x9f,0xe0,0x5f,0x3b,0x39, - 0x19,0xcb,0xf2,0x9f,0x47,0x63,0x23,0xf0,0xe3,0x81, - 0x3d,0xb0,0xcc,0x76,0xb5,0xdf,0x5f,0x07,0xdb,0x86, - 0xc8,0xa3,0xa8,0x19,0xee,0x5a,0xd6,0xa7,0x7a,0x9d, - 0x8c,0x5b,0xb1,0x59,0x36,0xd7,0xd3,0xf8,0xdf,0x74, - 0x35,0xb0,0x19,0x36,0xfd,0xcd,0xa3,0xb3,0x46,0x2c, - 0x22,0x59,0xd9,0x82,0xda,0xa3,0xc8,0x3d,0xbd,0x80, - 0x4d,0x39,0x6f,0x8b,0xbd,0x82,0x0b,0xca,0x5b,0x4f, - 0x61,0x35,0xe0,0xd0,0x1e,0xff,0x36,0x03,0x9b,0x51, - 0xb4,0x2f,0xfe,0x19,0x5c,0xdd,0x3d,0x01,0x6c,0x02, - 0xbc,0xec,0x6c,0x3f,0x08,0x2b,0x34,0x75,0x41,0x95, - 0x9f,0xbd,0x87,0x4d,0x51,0xfd,0x39,0x8d,0xcd,0x14, - 0xf9,0x67,0x25,0x96,0xf7,0x9c,0xed,0x17,0xa1,0xf6, - 0xf6,0x57,0x79,0xf0,0xbe,0x8e,0x3b,0xf3,0xc5,0x62, - 0x5d,0x5d,0xae,0xc5,0x66,0x94,0xdd,0xda,0x44,0x0c, - 0xb7,0x60,0x23,0x90,0x9f,0x3a,0xdb,0xf7,0xae,0x11, - 0x4b,0x51,0x74,0x60,0xa3,0xc0,0xde,0xfb,0xa4,0xd7, - 0xb1,0x19,0x95,0x17,0xd0,0xfc,0xd4,0xe6,0x27,0x80, - 0xf5,0xb0,0x19,0x35,0x5e,0x27,0x60,0xef,0xcb,0x22, - 0xf2,0xde,0x37,0xfe,0x9c,0xea,0x53,0xff,0x2f,0xc0, - 0x9e,0x8f,0x7f,0x37,0x78,0xfe,0xf1,0xd8,0x32,0xa2, - 0x7d,0x13,0xc4,0x02,0xd9,0x16,0x6c,0x6e,0xc6,0xd1, - 0xf8,0x0b,0x53,0x8e,0xc3,0xee,0x4b,0xff,0x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,0xa7,0xfa,0x20,0x4a,0x33,0xae,0xc2,0x66, - 0x38,0x7b,0x25,0x19,0x60,0xc9,0xc3,0xbe,0xf8,0xfb, - 0x89,0xa7,0x61,0x05,0x29,0xd3,0xf4,0x38,0x70,0x50, - 0x83,0xbf,0xab,0x04,0x40,0x0d,0x8b,0xe1,0x2f,0xd8, - 0xf5,0x1b,0xec,0x83,0x12,0xca,0x6b,0xf8,0x3b,0xf6, - 0xdf,0x45,0x7b,0x8e,0x17,0x59,0x07,0xfe,0xd1,0xff, - 0xb7,0xf0,0x4f,0xe5,0x49,0xe2,0x17,0x58,0x05,0xe7, - 0xb2,0x79,0x01,0xfb,0x32,0x09,0x31,0x8b,0xe1,0x97, - 0xce,0x76,0xc3,0x98,0x7b,0x04,0x4d,0x24,0xa4,0x85, - 0xb0,0x24,0xe2,0x7c,0x8e,0xb6,0x1f,0x61,0x23,0x0a, - 0x63,0x43,0x06,0x24,0xff,0xa7,0x91,0x6b,0xd1,0xa3, - 0xc0,0x45,0x29,0xc7,0x71,0x75,0x83,0xbf,0x77,0x29, - 0xb6,0xc3,0x51,0x9a,0xae,0x72,0xb6,0xfb,0x72,0xca, - 0xe7,0x6d,0x46,0x23,0xaf,0xe3,0x73,0x84,0xdb,0x06, - 0xb0,0xda,0x32,0x8d,0x6a,0x86,0x01,0xcb,0x05,0x8a, - 0xa1,0x19,0x3b,0x61,0xd5,0xf9,0x3d,0xce,0xa0,0xf9, - 0xd9,0x27,0xf5,0x4c,0xc1,0x06,0x0d,0x3c,0x3a,0xb1, - 0x02,0x6d,0x45,0xd3,0xc8,0xfb,0xf3,0x63,0x6c,0x06, - 0x44,0x88,0xfb,0xa5,0xa3,0xf1,0xcf,0xc0,0xdc,0x1e, - 0xdb,0xad,0xa1,0xa8,0xbc,0xf7,0xf3,0xef,0x52,0x7d, - 0x3b,0xd5,0x34,0x5c,0x8b,0x15,0x0d,0x4d,0xaa,0xd5, - 0x66,0xf4,0x56,0x15,0x22,0x01,0xf0,0x23,0x7c,0xa3, - 0xb4,0xff,0x23,0x9b,0x51,0xf7,0xab,0xb0,0xe9,0x5d, - 0x71,0x46,0x62,0x59,0x48,0x29,0xa6,0xf5,0x80,0x25, - 0x9c,0x6d,0xcf,0xc0,0xb2,0xdb,0x21,0x1c,0x4e,0x73, - 0x75,0x2a,0x5a,0x4d,0x84,0x4d,0x3d,0xeb,0x39,0x55, - 0x2a,0x2d,0xf7,0xf2,0xf9,0xd6,0x2d,0x71,0x56,0x08, - 0x14,0x83,0x48,0x4f,0x43,0xb1,0x51,0xd5,0x25,0x1c, - 0x6d,0x27,0x60,0xd3,0x2d,0x5f,0x0a,0x19,0x90,0x34, - 0x65,0x16,0x56,0xeb,0x27,0xed,0x1b,0xb7,0x7b,0x88, - 0xdf,0x55,0xa6,0xa7,0x0f,0x81,0xe3,0x53,0x8e,0x03, - 0x6c,0x37,0x16,0x8f,0xf9,0x68,0xdd,0x25,0x8f,0x11, - 0xf6,0x3a,0x86,0xfa,0x7e,0xbf,0x03,0xff,0x3a,0xf8, - 0xe5,0x03,0xc5,0xd0,0x8c,0x1f,0x38,0xdb,0xbd,0x4d, - 0xb8,0x4e,0x55,0x77,0x0f,0xe0,0xef,0x60,0xed,0x4b, - 0x63,0x5b,0x6d,0x16,0xcd,0x69,0x58,0x12,0x20,0x84, - 0x8f,0x81,0xf3,0x9d,0x6d,0xfb,0x62,0xb5,0xd5,0x8a, - 0x68,0x15,0xaa,0x2f,0x9b,0xa8,0xe6,0x3c,0xc2,0x7d, - 0xde,0xc1,0x66,0x85,0xb5,0xc5,0x88,0x7e,0x52,0x69, - 0x27,0x00,0x3a,0x81,0x6f,0x3b,0xdb,0x9e,0x43,0xf2, - 0x2f,0xce,0x46,0x44,0xd8,0x07,0xd2,0x43,0x5b,0x8d, - 0x15,0xd7,0xd7,0x9d,0xed,0x3e,0x23,0x59,0x01,0x9a, - 0xa4,0xde,0xc5,0xd6,0x76,0x95,0xc5,0x8d,0xc0,0x23, - 0x01,0x8f,0x3f,0x13,0xff,0x48,0x98,0x66,0x00,0x48, - 0x16,0xfa,0x01,0xb7,0xe1,0xbb,0x41,0x99,0x0c,0x6c, - 0x43,0xd8,0x91,0x34,0x69,0xde,0x9f,0x80,0x67,0x03, - 0x1c,0x77,0x06,0xf0,0x58,0xc2,0xdf,0xb9,0x80,0x74, - 0xea,0xa8,0xf4,0xf4,0x3e,0x30,0xc6,0xd9,0x76,0xe9, - 0x00,0xe7,0xcf,0xc2,0x5f,0x08,0xfb,0x7d,0xf4,0x19, - 0xfe,0x82,0x6d,0x45,0xfb,0x3e,0x5a,0x0c,0xff,0x96, - 0x86,0xe7,0x93,0xdd,0xf6,0xa4,0xde,0x0e,0xeb,0x48, - 0xac,0x76,0x57,0x2b,0xfb,0x00,0xf8,0x75,0xe0,0x73, - 0x5c,0x86,0x7f,0x1b,0xba,0xa2,0xd6,0x01,0xd8,0xc6, - 0xd9,0x6e,0x06,0xfe,0xad,0xf9,0x1a,0xf5,0x0a,0x76, - 0x5d,0x29,0x9d,0xb4,0x13,0x00,0x5b,0xe1,0x9b,0x2e, - 0x39,0x0e,0xdb,0x7b,0x37,0x2b,0xb7,0xe2,0xab,0x92, - 0xbb,0x31,0xd5,0x2b,0x79,0x4a,0xfe,0xbc,0x17,0xb2, - 0xbf,0x10,0x7e,0x84,0xfe,0x62,0xfc,0xa3,0xd6,0xad, - 0xee,0xcc,0x0c,0xce,0xe1,0x2d,0xec,0xb2,0x60,0xd0, - 0x28,0x44,0x6c,0x04,0xea,0x3a,0xec,0xbb,0x20,0xce, - 0x74,0xac,0xce,0x4c,0xc8,0x0e,0x89,0xa4,0xe3,0xea, - 0x80,0xc7,0x4e,0x92,0x58,0x88,0xb0,0xbd,0xc0,0x43, - 0xf1,0xc6,0xb2,0x40,0xc0,0x18,0x42,0x3a,0x27,0x83, - 0x73,0x3c,0xe3,0x6c,0xb7,0x50,0xd0,0x28,0x92,0xdb, - 0x15,0x5f,0x5d,0x82,0x19,0x24,0x5b,0x4b,0xde,0xac, - 0x7b,0xb0,0x65,0x99,0x1e,0xad,0xbe,0xdb,0xcf,0x55, - 0xd8,0xf3,0x1b,0xd2,0x7b,0xc0,0x7d,0xce,0xb6,0x5b, - 0x06,0x8c,0xa3,0x19,0xde,0xfb,0xf9,0xbb,0xb1,0x7a, - 0x6e,0xa1,0x5d,0x96,0xc1,0x39,0x0a,0x27,0xed,0x04, - 0xc0,0x2e,0xce,0x76,0x97,0x91,0xcd,0xe8,0x7f,0x97, - 0x59,0xf8,0xb6,0x8e,0xe8,0x85,0xdd,0xd0,0x49,0xb1, - 0x0c,0xc0,0xaa,0x9a,0x7a,0xdc,0x16,0x32,0x90,0x8a, - 0x89,0x64,0xfb,0x05,0x9a,0x97,0x27,0xf1,0x2d,0x9f, - 0x69,0xd6,0x2b,0xce,0x76,0x9e,0xe4,0xa2,0x48,0x33, - 0x7e,0x83,0x55,0x89,0x8f,0x33,0x0b,0xdb,0x19,0xe4, - 0x9e,0xb0,0xe1,0x48,0x0a,0xde,0x22,0xec,0xeb,0xe4, - 0x1d,0x75,0x07,0xdb,0x95,0xe6,0xcd,0x50,0x81,0xe0, - 0x8f,0xa5,0x15,0xaf,0xa5,0xaf,0xe0,0x2f,0xd2,0xd7, - 0x8c,0x17,0x9c,0xed,0xe6,0x0f,0x1a,0x45,0x72,0xde, - 0x9d,0x72,0xee,0xc4,0xbf,0x05,0x6f,0x1a,0x22,0xac, - 0x88,0xb2,0xc7,0x16,0x21,0x03,0xc9,0xc0,0x95,0x19, - 0x9d,0xc7,0x7b,0x9f,0x3b,0x3f,0xfe,0xa5,0xb3,0x59, - 0xe9,0x83,0x7f,0x97,0x8a,0x90,0x35,0xe2,0xba,0xbb, - 0x07,0xab,0xe3,0x53,0x2a,0x69,0x27,0x00,0x36,0x73, - 0xb6,0x6b,0xa4,0xe8,0x42,0xb3,0xbc,0x1f,0x98,0xaf, - 0x06,0x8d,0x42,0x1a,0xb1,0x1a,0xbe,0xb5,0x61,0x11, - 0xd9,0xdd,0x90,0x5f,0x9e,0xd1,0x79,0xf2,0xe4,0xad, - 0x70,0xdd,0x2c,0xef,0x5e,0xdc,0x43,0x83,0x46,0x21, - 0x65,0x77,0x2a,0xbe,0xad,0x96,0xe6,0x60,0x45,0x9e, - 0xb2,0x48,0x36,0x4a,0xf3,0x6e,0x23,0xec,0x1a,0xcf, - 0x24,0x55,0xd4,0xbd,0xeb,0xf4,0x1b,0xe5,0x8d,0x65, - 0x48,0xd0,0x28,0xc2,0xc8,0xea,0xfb,0xc8,0x33,0x5b, - 0x14,0x8a,0xf5,0x7d,0xd4,0x17,0x58,0xd7,0xd9,0x36, - 0xf4,0x7b,0xb0,0x1a,0xef,0x8e,0x4c,0xa3,0x28,0x5e, - 0x62,0xc5,0xeb,0x65,0x92,0x25,0x03,0x9b,0x71,0x5f, - 0x82,0xb6,0x6b,0x86,0x0a,0xa2,0x41,0x2b,0x63,0xef, - 0x57,0x8f,0x34,0xb6,0xf1,0xf6,0x98,0x45,0xba,0xbb, - 0x86,0xb5,0x84,0x34,0x13,0x00,0xa3,0xb0,0x35,0x48, - 0x71,0x26,0x03,0xff,0x49,0xf1,0xbc,0x5e,0x8f,0xe0, - 0x9b,0x9a,0xb3,0x61,0xe8,0x40,0x24,0x31,0xef,0x05, - 0xec,0x65,0xb2,0xcb,0x6c,0x3f,0x4f,0x7a,0x5b,0x38, - 0x15,0xd5,0x5d,0x19,0x9d,0xc7,0x9b,0x00,0xf0,0x7e, - 0x69,0x88,0x24,0xf5,0x7d,0xe0,0x04,0x67,0xdb,0x43, - 0xb0,0x65,0x02,0xd2,0x1a,0x9e,0x08,0x7c,0xfc,0x24, - 0x53,0x54,0x8b,0x12,0x4b,0x9f,0xa0,0x51,0x84,0x71, - 0x6f,0x46,0xe7,0xf9,0xc0,0xd9,0xae,0x48,0xdf,0x47, - 0xeb,0xe2,0xdf,0xc5,0x2a,0xab,0xe7,0xb1,0xbb,0x87, - 0xf0,0x27,0xe1,0xbc,0x75,0x0c,0x8a,0x26,0xab,0xfb, - 0x25,0xb0,0xfb,0xcf,0x09,0xce,0xb6,0x6b,0x84,0x0c, - 0xa4,0x01,0xde,0x5d,0x48,0x26,0x00,0x2f,0x86,0x0c, - 0xa4,0x87,0xd2,0xcd,0xe6,0x4b,0x33,0x01,0xe0,0x9d, - 0xd2,0xf1,0x10,0xfe,0x2a,0xab,0x69,0x9a,0x06,0xfc, - 0xd7,0xd1,0x6e,0x49,0xb4,0xd6,0xb8,0x68,0x56,0x76, - 0xb6,0xf3,0xbc,0xbe,0x69,0xba,0x35,0xe3,0xf3,0x65, - 0x69,0x16,0xd9,0x4c,0xff,0x07,0x4b,0x0a,0x7a,0x14, - 0xe9,0x86,0x4b,0xda,0xc7,0xae,0xf8,0xb7,0xff,0x3a, - 0x8a,0x92,0xae,0x17,0x6c,0x61,0xa1,0x3b,0xdd,0xde, - 0x1b,0x71,0x08,0x7f,0x4d,0xf5,0xc6,0xd2,0x8a,0xd7, - 0xd2,0xac,0x06,0x8e,0xbc,0xf5,0x7d,0x8a,0x94,0x44, - 0x59,0xdb,0xd9,0xee,0x03,0x6c,0x7b,0xec,0xac,0x4d, - 0x04,0x5e,0x75,0xb6,0x5d,0x3d,0x64,0x20,0x01,0xfd, - 0x33,0xc3,0x73,0xcd,0xc1,0x5f,0x3b,0x69,0x99,0x90, - 0x81,0x34,0xc0,0x5b,0xfd,0xff,0x59,0xb2,0xdd,0x6e, - 0x2f,0x8f,0x81,0xe9,0x5c,0xa5,0x99,0x00,0xf0,0x76, - 0xd2,0xb2,0xea,0x54,0x54,0xe3,0x2d,0xee,0xb2,0x52, - 0xd0,0x28,0x24,0x29,0xef,0xbe,0xb6,0x59,0x66,0x0b, - 0x21,0xbb,0xe9,0x49,0x79,0x78,0x95,0xf0,0xc5,0x6c, - 0xba,0x78,0xcf,0xd3,0x0e,0x5b,0x04,0x49,0xb1,0x7c, - 0x0d,0xdb,0x35,0xc4,0xf3,0x5d,0x78,0x0a,0xb6,0x25, - 0x91,0xb4,0x8e,0x19,0xd8,0x68,0x59,0xe8,0x73,0x78, - 0xbc,0x41,0x98,0xea,0xff,0xdd,0x79,0x63,0x09,0xb1, - 0x05,0x74,0x48,0x6f,0x93,0x2c,0xd1,0xd2,0x0c,0x6f, - 0x75,0xfc,0x22,0x7d,0x1f,0x79,0xb7,0xc8,0xf5,0xde, - 0x03,0x87,0xe0,0xfd,0x1c,0x2e,0x17,0x34,0x8a,0x70, - 0xb2,0x7e,0x6e,0xbd,0xdb,0xce,0x2e,0x19,0x34,0x8a, - 0xe4,0xbc,0x3b,0x90,0x64,0xbd,0xad,0xee,0x4b,0x64, - 0xb7,0x33,0x46,0x21,0xe4,0x91,0x00,0x78,0x27,0xc5, - 0x73,0x26,0xe5,0xbd,0x00,0x15,0x71,0x7f,0xd7,0x32, - 0x5b,0xc2,0xd9,0xce,0x5b,0x4c,0x2e,0x2d,0x8f,0x67, - 0x7c,0xbe,0x2c,0x79,0xab,0xf6,0xa6,0xa1,0x54,0x17, - 0x5d,0x29,0x8c,0x35,0x81,0x5b,0xf0,0x8d,0xe4,0xfd, - 0x12,0x38,0x31,0x6c,0x38,0x12,0xc0,0x38,0xc2,0xcf, - 0x38,0xf4,0x1e,0xff,0xfd,0xa0,0x51,0x98,0x3c,0x66, - 0x57,0x66,0x61,0x6c,0x86,0xe7,0x6a,0xc5,0xef,0x23, - 0x6f,0x02,0xc0,0x3b,0x6a,0x1c,0x82,0xb7,0x43,0xd7, - 0x8a,0x09,0x80,0x69,0x64,0x3f,0xb3,0xc2,0x5b,0x6f, - 0xa0,0x68,0x09,0x00,0x6f,0x3c,0x59,0xd5,0x53,0xe8, - 0x32,0x8b,0xf6,0x5f,0xd6,0xfb,0x05,0x69,0x26,0x00, - 0xbc,0x7b,0xa2,0xbe,0x9b,0xe2,0x39,0x93,0x7a,0xdd, - 0xd9,0xae,0x15,0x2f,0x40,0xed,0xcc,0x53,0x5b,0x02, - 0x92,0x15,0x63,0x4a,0xc3,0xbb,0xe4,0xfb,0x7e,0x0e, - 0xc9,0xbb,0x2e,0x3f,0x0d,0x59,0x4e,0xf3,0x12,0x01, - 0x1b,0x85,0xf8,0x3b,0x30,0xd8,0xd1,0xf6,0x0a,0xe0, - 0x88,0xb0,0xe1,0x48,0x20,0x59,0x8c,0x1a,0x7b,0xaf, - 0x5f,0x13,0x83,0x46,0x61,0xda,0xf5,0x5a,0x9a,0x45, - 0xf2,0xa4,0x4b,0x2b,0x3e,0x87,0xde,0x69,0xde,0x63, - 0x43,0x06,0x11,0xc3,0xbb,0xfb,0x45,0xd1,0x3a,0xac, - 0x1e,0x2f,0x13,0xb6,0xd0,0x68,0x35,0xde,0x7b,0xcf, - 0xf9,0x80,0xce,0x90,0x81,0x24,0xb4,0xb8,0xb3,0x5d, - 0x1e,0xf7,0xd6,0x6f,0xe4,0x70,0xce,0xdc,0xa4,0x99, - 0x00,0xf0,0xee,0x89,0x9a,0x67,0x87,0xc9,0x3b,0xaa, - 0xe9,0xed,0x70,0x4a,0x78,0x83,0xf0,0x17,0xb7,0xc9, - 0x63,0x76,0xc9,0xcb,0x39,0x9c,0x33,0x0b,0x59,0x6e, - 0xd3,0x29,0x92,0xa5,0x05,0xb1,0x8a,0xbf,0x9e,0x6a, - 0xd3,0xd7,0x03,0x07,0x87,0x0d,0x47,0x02,0xca,0xa2, - 0xd3,0xed,0x95,0xd5,0x14,0xf6,0x76,0xe4,0x5d,0x97, - 0x5f,0x46,0x9d,0xc0,0x48,0x67,0xdb,0x90,0x5b,0x50, - 0xc6,0xf1,0xde,0x7f,0x0f,0xa5,0x58,0xf5,0x15,0x3c, - 0xf2,0xb8,0xf7,0x4c,0x72,0xce,0x11,0xc1,0xa2,0x48, - 0x66,0x10,0xd0,0xdf,0xd9,0x36,0x8f,0xbe,0x62,0x9e, - 0x9f,0x8f,0xcc,0xa5,0x95,0x15,0x1a,0x82,0xed,0xd5, - 0xee,0xf1,0x48,0x4a,0xe7,0x0c,0xa9,0x55,0xb7,0x21, - 0x69,0x47,0xf3,0x26,0x68,0x3b,0x2e,0x58,0x14,0xb5, - 0x65,0x39,0x55,0x3e,0x4b,0x59,0xad,0xff,0x17,0xc9, - 0xd2,0x10,0x6c,0xe4,0xdf,0x53,0x57,0xe4,0x76,0x60, - 0x2f,0xb2,0x1f,0xd9,0x91,0xf4,0x14,0xa9,0xd3,0x5d, - 0xa4,0x64,0x44,0xab,0x99,0x96,0x77,0x00,0x05,0x36, - 0x1f,0xd0,0xe1,0x6c,0xeb,0xdd,0xe1,0x20,0x84,0x24, - 0xbb,0x65,0xcc,0x4f,0xf6,0x33,0x3a,0x9b,0x91,0xc7, - 0xf3,0x9a,0x64,0xc7,0xab,0x11,0x64,0x3b,0xab,0xb3, - 0x96,0x24,0x89,0x88,0x8f,0x83,0x45,0x51,0xac,0x73, - 0xe6,0x26,0xad,0x19,0x00,0x0b,0xa4,0x74,0x9c,0xa2, - 0x50,0x02,0xa0,0x38,0xbc,0x17,0x8c,0x59,0xc0,0x94, - 0x90,0x81,0xd4,0xd0,0x4a,0x5f,0x52,0x22,0x65,0xd6, - 0x17,0xf8,0x0b,0xbe,0x2a,0xd3,0x73,0x80,0x1f,0x60, - 0xd7,0x15,0x69,0x5d,0x45,0x5a,0x13,0x5f,0xa4,0x58, - 0x5a,0x8d,0x92,0x70,0xb5,0x25,0xb9,0x5f,0xcd,0x6a, - 0x9b,0xe4,0x6a,0x92,0x14,0xc0,0x9c,0x2f,0x58,0x14, - 0x61,0xe4,0x91,0x00,0x48,0x92,0x50,0x1c,0x1e,0x2c, - 0x8a,0x64,0x92,0x0c,0xe8,0xe5,0x91,0x30,0x55,0x02, - 0xa0,0x01,0x03,0x53,0x3a,0x4e,0x51,0x78,0xa7,0x53, - 0x49,0x78,0x83,0x9c,0xed,0xf2,0x1a,0xe9,0xc9,0x33, - 0xa3,0x2e,0x22,0x3e,0xf3,0x60,0xd5,0xfe,0x37,0x4d, - 0xd0,0xfe,0xb7,0x14,0xab,0xd2,0xb7,0x88,0x48,0x4f, - 0xde,0x7b,0x24,0x08,0xbf,0x0b,0x45,0x3d,0x49,0xee, - 0xd1,0xbc,0x33,0x8a,0x8b,0x22,0x8f,0x8e,0x63,0x92, - 0x65,0x31,0x45,0xd9,0xf6,0x33,0xc9,0x7b,0x35,0x8f, - 0x65,0x3f,0x93,0x72,0x38,0x67,0x6e,0xd2,0x4a,0x00, - 0x78,0xd7,0x68,0xb7,0x8a,0x76,0xfb,0x7b,0x5a,0x99, - 0x77,0x2d,0x58,0x5e,0x95,0x7b,0xb5,0x56,0x5e,0xa4, - 0xf8,0x2e,0x02,0x76,0x49,0xf8,0x3b,0x9b,0x00,0x27, - 0xa5,0x1e,0x89,0x88,0x48,0x7a,0x92,0x74,0xee,0xf2, - 0xdc,0xe1,0x20,0xc9,0xb2,0xc2,0xa2,0x74,0x58,0xbd, - 0xf2,0x58,0xa2,0x92,0xe4,0xf9,0xec,0x1d,0x2c,0x8a, - 0x64,0x92,0xbc,0xae,0x79,0x2c,0x43,0x2d,0xd5,0x2c, - 0x2d,0x25,0x00,0xaa,0x6b,0xb5,0x02,0x24,0xed,0xcc, - 0xfb,0x5a,0xe4,0x35,0x55,0x37,0x8f,0x65,0x07,0x22, - 0xe2,0xf7,0x03,0xe0,0x90,0x06,0x7f,0xf7,0x78,0x60, - 0x8b,0x14,0x63,0x11,0x11,0x49,0x53,0x92,0x4e,0x55, - 0x9e,0x1d,0x9c,0x24,0xe7,0x6e,0xb5,0x7b,0xf0,0xa2, - 0x77,0x56,0x8b,0xf2,0x7c,0x26,0x49,0x44,0xe4,0xf1, - 0x5e,0x55,0x02,0xa0,0x01,0xde,0x02,0x24,0xad,0xa2, - 0x83,0xe2,0x7c,0x60,0xca,0xce,0x7b,0xc1,0xc8,0x2b, - 0x01,0xa0,0xe2,0x44,0x22,0xc5,0xb6,0x4a,0x13,0xbf, - 0xdb,0xb5,0x74,0xc0,0xbb,0xcb,0x8d,0x88,0x48,0x96, - 0x92,0x74,0xaa,0x66,0x07,0x8b,0x22,0x5e,0x92,0x7b, - 0xb4,0xa2,0x8c,0x58,0x7b,0xe5,0x31,0xb3,0x22,0xc9, - 0x6b,0x99,0xe6,0x8e,0x6f,0xcd,0x28,0xfa,0x7b,0xb5, - 0x28,0xcf,0x53,0x26,0xd2,0xfa,0x63,0xf3,0x9c,0x56, - 0x14,0x4a,0xab,0x5d,0x80,0xda,0x95,0x77,0x4f,0xde, - 0xbc,0x3e,0xb8,0x45,0xda,0x5f,0x55,0x44,0xd2,0x37, - 0x3f,0xf0,0x47,0x54,0x0f,0x40,0x44,0x8a,0x27,0xc9, - 0xa8,0x65,0x9e,0xf7,0x2b,0x49,0xee,0xa9,0x5b,0x6d, - 0x17,0xa2,0x3c,0x3a,0xab,0x49,0x5e,0xcb,0xa2,0x8c, - 0x6c,0x27,0x29,0xe6,0x99,0xc7,0x7b,0xb5,0x54,0xfd, - 0xbe,0xb4,0x9e,0xe0,0x24,0x09,0x80,0x8b,0x12,0xb6, - 0xcf,0x4b,0x51,0x3e,0x30,0x65,0xe7,0xfd,0x22,0xc8, - 0xeb,0x8b,0xcd,0xbb,0xa7,0xa9,0x88,0xb4,0xae,0xaf, - 0x02,0x27,0x03,0x27,0xe4,0x1d,0x88,0x88,0x48,0x37, - 0x49,0x66,0x21,0xe6,0xd9,0xc1,0x49,0x32,0xab,0xb6, - 0x15,0xfa,0x08,0xdd,0xe5,0xf1,0xbc,0xb6,0x62,0x42, - 0xa5,0xe8,0xc9,0xaa,0x52,0xcd,0xfc,0x4e,0xeb,0x09, - 0x4e,0x72,0x01,0x3a,0x05,0xf8,0x28,0xa5,0xf3,0x4a, - 0xfb,0xf3,0x5e,0x30,0xf2,0x4a,0x00,0xb4,0x5a,0xb5, - 0x5a,0x11,0x31,0x6f,0x01,0x87,0x03,0x57,0x01,0x43, - 0x1d,0xed,0x8f,0x03,0x1e,0x00,0x46,0x87,0x0c,0x4a, - 0x44,0x24,0x81,0x24,0x9d,0xe5,0x3c,0x07,0x2c,0x92, - 0xd4,0x2a,0x68,0xb5,0xa5,0x95,0x4a,0x00,0xf8,0x24, - 0x89,0x23,0x8f,0xce,0xf8,0x90,0x1c,0xce,0x99,0x9b, - 0xb4,0xa6,0x4d,0x27,0xd9,0x5b,0xb4,0xd5,0xaa,0x7b, - 0x4a,0xbe,0xbc,0x17,0x8c,0x24,0xdb,0x8b,0xa4,0xc9, - 0xd3,0x71,0x10,0x91,0x62,0x79,0x04,0x58,0x1b,0xb8, - 0x05,0xd8,0xdf,0xf9,0x3b,0x5d,0xf5,0x00,0x16,0x0e, - 0x15,0x94,0x88,0x48,0x42,0x49,0xb6,0xd7,0x1b,0x16, - 0x2c,0x8a,0x74,0xcf,0xdd,0x6a,0xdb,0xb1,0xe5,0xb1, - 0x15,0x7a,0x92,0xce,0x6a,0x1e,0x5b,0xea,0x55,0x93, - 0x24,0xb1,0x93,0x47,0x67,0x7c,0x78,0x0e,0xe7,0xcc, - 0x4d,0x5a,0x09,0x80,0x0f,0xf1,0xaf,0xd5,0x2e,0x55, - 0x86,0x45,0x9a,0xe6,0xfd,0x72,0x1b,0x48,0x3e,0x75, - 0x00,0x16,0xcd,0xe1,0x9c,0x22,0xd2,0xb8,0xab,0x80, - 0x4d,0x81,0x0f,0x2a,0xff,0x7f,0x33,0x70,0xb1,0xf3, - 0x77,0xe7,0x43,0xf5,0x00,0x44,0xa4,0x38,0x3e,0x88, - 0x6f,0xf2,0x7f,0xf2,0xec,0xe0,0x24,0x39,0x77,0x92, - 0xbf,0xa9,0x08,0xf2,0x78,0x5e,0x93,0xf4,0xa5,0xc6, - 0x07,0x8b,0x22,0x99,0x4f,0x13,0xb4,0xcd,0xa3,0xaf, - 0x38,0x32,0x87,0x73,0xe6,0x26,0xad,0x0e,0xd3,0x2c, - 0xfc,0x6f,0xb0,0xf9,0x53,0x3a,0xa7,0x94,0x83,0x77, - 0x76,0x49,0x07,0xf9,0x8c,0xc6,0x2b,0x01,0x20,0xd2, - 0x1a,0x66,0x03,0x47,0x00,0xfb,0x31,0xf7,0xcc,0xa2, - 0x23,0x80,0xa7,0x9c,0xc7,0xd9,0x18,0x5b,0xca,0x26, - 0x22,0x92,0xb7,0xf1,0xf8,0x2b,0xec,0xe7,0x39,0x7b, - 0xc9,0x7b,0xef,0x9f,0xa4,0x3f,0x51,0x14,0xf3,0xe6, - 0x70,0xce,0x24,0x49,0x87,0xa2,0x3c,0x9f,0x49,0xe2, - 0x18,0x11,0x2c,0x8a,0xda,0x16,0xcb,0xe1,0x9c,0xb9, - 0x49,0x73,0xc4,0xf4,0x2d,0x67,0x3b,0x6d,0xa7,0x24, - 0x49,0x7c,0x9c,0xa0,0xed,0x02,0xc1,0xa2,0xa8,0x6d, - 0xc9,0x1c,0xce,0x29,0x22,0xc9,0x7c,0x0a,0x6c,0x03, - 0xfc,0xb2,0xc6,0xcf,0xa7,0x03,0xbb,0xe1,0x9f,0x2a, - 0x79,0x1c,0xb0,0x55,0x0a,0x71,0x89,0x88,0x34,0x23, - 0x02,0xde,0x73,0xb6,0xcd,0xb3,0x83,0xb3,0xb8,0xb3, - 0xdd,0x87,0x24,0xab,0x16,0x5f,0x04,0x5f,0xca,0xe1, - 0x9c,0xde,0x64,0xce,0x64,0x60,0x6a,0xc8,0x40,0x12, - 0x48,0x72,0x3f,0x9f,0x47,0xb2,0x4a,0x09,0x80,0x06, - 0xbd,0xe4,0x6c,0xb7,0x6c,0x8a,0xe7,0x94,0xf6,0x37, - 0x05,0xff,0x7a,0xb0,0xac,0x93,0x4b,0x03,0x81,0xe5, - 0x33,0x3e,0xa7,0x88,0x24,0xf3,0x0a,0xb0,0x2e,0xf1, - 0xc5,0xfb,0x5e,0x05,0xbe,0xeb,0x3c,0x66,0x07,0xf0, - 0x07,0x60,0x91,0x26,0xe2,0x12,0x11,0x49,0xc3,0xcb, - 0xce,0x76,0x4b,0x05,0x8d,0xa2,0x3e,0x6f,0x02,0xe0, - 0xd5,0xa0,0x51,0x84,0x91,0x47,0xc7,0xd1,0xdb,0x41, - 0x1e,0x1b,0x32,0x88,0x84,0x66,0xe1,0x5f,0xde,0x91, - 0x75,0x02,0xa0,0x2f,0x25,0x1b,0xd0,0x4b,0x33,0x01, - 0xf0,0x82,0xb3,0xdd,0x0a,0x29,0x9e,0x53,0xca,0xe1, - 0x4d,0x67,0xbb,0xac,0x3f,0xbc,0x6b,0xa2,0xb5,0xc0, - 0x22,0x45,0x77,0x0e,0x96,0x04,0xf0,0xb8,0x0e,0xb8, - 0xd2,0xd9,0x56,0xf5,0x00,0x44,0xa4,0x08,0x5e,0x74, - 0xb6,0x5b,0x35,0x68,0x14,0xf5,0xad,0xec,0x6c,0xe7, - 0xed,0x4b,0x14,0xc9,0x28,0xb2,0xaf,0x41,0xb5,0xb4, - 0xb3,0xdd,0xeb,0x41,0xa3,0x48,0x6e,0xac,0xb3,0xdd, - 0x32,0x21,0x83,0xa8,0x62,0x45,0xf2,0xdb,0x4d,0x2c, - 0x17,0x69,0xbe,0x61,0x9f,0x75,0xb6,0x5b,0x2f,0xc5, - 0x73,0x4a,0x39,0xbc,0xe1,0x6c,0x97,0xf5,0x68,0xfc, - 0x06,0x19,0x9f,0x4f,0x44,0xc2,0x3b,0x0c,0x78,0xde, - 0xd9,0x76,0x23,0xe0,0xd4,0x80,0xb1,0x88,0x88,0xc4, - 0x79,0xce,0xd9,0x6e,0x55,0xf2,0x29,0x96,0x0c,0xb0, - 0x8a,0xb3,0x9d,0xf7,0xda,0x5b,0x24,0x03,0xf1,0x77, - 0xc8,0xd3,0xb2,0x9c,0xb3,0xdd,0xff,0x82,0x46,0x91, - 0x9c,0x37,0x21,0x91,0xf5,0xfd,0xfc,0x5a,0x19,0x9f, - 0x2f,0x77,0x69,0x5e,0x08,0x1e,0xc1,0xb7,0x13,0xc0, - 0xe2,0x94,0x6c,0x9d,0x85,0x34,0xcd,0x7b,0x01,0x5b, - 0x29,0x68,0x14,0x73,0xdb,0x21,0xe3,0xf3,0x89,0x48, - 0x78,0x53,0xb1,0x7a,0x00,0x53,0x9c,0xed,0x8f,0x05, - 0xbe,0x1e,0x2e,0x1c,0x11,0x91,0xba,0x1e,0x76,0xb6, - 0x1b,0x0c,0xac,0x16,0x32,0x90,0x1a,0x96,0xc6,0x5f, - 0x04,0xf0,0xdf,0x21,0x03,0x09,0x28,0xcb,0x0e,0x64, - 0x07,0xfe,0xfb,0xdd,0x67,0x42,0x06,0xd2,0x00,0xef, - 0x6c,0x95,0x55,0xc8,0x36,0x59,0xb5,0x49,0x86,0xe7, - 0x2a,0x84,0x34,0x9f,0xdc,0x8f,0xf0,0x4f,0xdd,0xd9, - 0x36,0xc5,0xf3,0x4a,0xfb,0xf3,0x5e,0xc0,0xd6,0x09, - 0x1a,0xc5,0x17,0x2d,0x9c,0xf1,0xf9,0x44,0x24,0x3b, - 0x2f,0x00,0x87,0x3a,0xdb,0xaa,0x1e,0x80,0x88,0xe4, - 0xe9,0x05,0x60,0x9c,0xb3,0xed,0x66,0x21,0x03,0xa9, - 0x61,0x53,0x67,0xbb,0xcf,0x80,0x27,0x42,0x06,0x12, - 0xd0,0x26,0x19,0x9e,0x6b,0x59,0xfc,0x55,0xf2,0x8b, - 0xf6,0x7c,0x3e,0xe9,0x6c,0x37,0x18,0x9b,0x96,0x9f, - 0x85,0x79,0x80,0xaf,0x65,0x74,0xae,0xc2,0x48,0x3b, - 0xbb,0x72,0x8f,0xb3,0xdd,0xae,0x29,0x9f,0x57,0xda, - 0x9b,0x77,0x7b,0xae,0x91,0x64,0x57,0x64,0x72,0x2f, - 0xec,0xc6,0x5f,0x44,0xda,0xd3,0x55,0xc0,0x35,0xce, - 0xb6,0x23,0x81,0xeb,0x51,0x3d,0x00,0x11,0xc9,0x5e, - 0x04,0xdc,0xe7,0x6c,0xbb,0x63,0xc0,0x38,0x6a,0xd9, - 0xce,0xd9,0xee,0x21,0x6c,0xbb,0xd6,0x56,0x94,0xe5, - 0xae,0x30,0x1b,0x39,0xdb,0x4d,0xa3,0x78,0x4b,0x2a, - 0x92,0x24,0x24,0x36,0x09,0x15,0x44,0x0f,0x1b,0x93, - 0xcf,0x2e,0x62,0xb9,0x4a,0x3b,0x01,0x70,0x93,0xb3, - 0xdd,0x26,0xa8,0x7a,0xba,0xf8,0x3d,0xcb,0xdc,0xfb, - 0x76,0xd7,0xb2,0x4d,0xc8,0x40,0x2a,0x7a,0x63,0xeb, - 0x84,0x45,0xa4,0xbd,0x1d,0x82,0xbf,0xc2,0xf6,0x86, - 0xc0,0x69,0x01,0x63,0x11,0x11,0xa9,0xe5,0x66,0x67, - 0xbb,0xf5,0xf1,0x57,0xe4,0x4f,0xc3,0x50,0xfc,0x9d, - 0xe3,0xdb,0x42,0x06,0x12,0xd8,0xe2,0x64,0x57,0xe3, - 0xcc,0x3b,0x8b,0xfa,0x21,0x60,0x66,0xc8,0x40,0x1a, - 0xf0,0x0e,0xfe,0xba,0x5e,0xdb,0x87,0x0c,0xa4,0x9b, - 0xef,0x64,0x74,0x9e,0x42,0x49,0x3b,0x01,0xf0,0x10, - 0xf0,0xb6,0xb3,0xed,0x31,0x29,0x9f,0xdb,0xe3,0x20, - 0x6c,0xfa,0xc9,0x59,0xd8,0x34,0xa8,0x3e,0x39,0xc4, - 0x20,0xc9,0x4d,0x03,0x1e,0x75,0xb6,0xdd,0x29,0x64, - 0x20,0x15,0xdf,0x46,0xd3,0x7d,0x45,0xca,0x60,0x12, - 0xf0,0x4d,0xec,0x1a,0xe4,0xf1,0x63,0x54,0x0f,0x40, - 0x44,0xb2,0xf7,0x57,0x7c,0xfb,0xbd,0x77,0x00,0xdf, - 0x0b,0x1c,0x4b,0x77,0xfb,0x62,0x5b,0xac,0xc5,0x99, - 0x09,0xdc,0x18,0x38,0x96,0xd0,0xf6,0xcf,0xe0,0x1c, - 0x43,0x81,0x2d,0x9c,0x6d,0xff,0x11,0x32,0x90,0x26, - 0xdc,0xe5,0x6c,0xb7,0x29,0xe1,0xb7,0xf7,0x9e,0x0f, - 0xf8,0x56,0xe0,0x73,0x14,0x52,0xda,0x09,0x80,0x08, - 0xf8,0xbd,0xb3,0xed,0x77,0xf0,0x6f,0x0b,0x92,0x86, - 0x4e,0x2c,0xe9,0xb0,0x7a,0xe5,0xbf,0xf7,0x00,0x1f, - 0x03,0xb7,0x63,0xa3,0xb9,0x59,0x4d,0x1d,0x97,0xc6, - 0xdc,0xeb,0x6c,0xb7,0x11,0x61,0x5f,0xcb,0x21,0xc0, - 0x99,0x01,0x8f,0x2f,0x22,0xc5,0xf2,0x34,0xf0,0x23, - 0x67,0xdb,0xae,0x7a,0x00,0x5f,0x0a,0x17,0x8e,0x88, - 0xc8,0x5c,0x26,0xe3,0x9f,0x05,0x70,0x10,0x30,0x3c, - 0x60,0x2c,0x5d,0xfa,0x00,0x3f,0x74,0xb6,0xfd,0x07, - 0x30,0x3e,0x60,0x2c,0x59,0xd8,0x93,0xf0,0x53,0xc9, - 0xf7,0x02,0x06,0x38,0xdb,0xfe,0x2d,0x64,0x20,0x4d, - 0x18,0xed,0x6c,0xd7,0x09,0x1c,0x18,0x32,0x10,0xe0, - 0x78,0xa0,0x5f,0xe0,0x73,0x14,0x52,0x88,0x0a,0x8b, - 0x17,0x02,0xd3,0x1d,0xed,0x7a,0x01,0xbf,0x25,0xbb, - 0x7d,0x17,0x7f,0xc6,0xdc,0xdb,0x74,0x0c,0x04,0xbe, - 0x01,0x5c,0x80,0x4d,0xf3,0x1c,0x8b,0x4d,0x8f,0x92, - 0xe2,0xf9,0x6b,0x82,0xb6,0x3f,0x0e,0x16,0x05,0x9c, - 0x01,0x2c,0x18,0xf0,0xf8,0x22,0x52,0x3c,0x97,0xe0, - 0x1f,0x9d,0x1a,0x09,0xfc,0x91,0x92,0xed,0x29,0x2c, - 0x22,0xb9,0xfb,0x85,0xb3,0xdd,0x30,0xe0,0xe4,0x90, - 0x81,0x54,0xfc,0x10,0xff,0x72,0x83,0xf3,0x43,0x06, - 0x92,0x91,0x7e,0xc0,0xe9,0x01,0x8f,0xdf,0x17,0x38, - 0xca,0xd9,0xf6,0x49,0xfc,0x85,0xd9,0xb3,0xf6,0x37, - 0x2c,0x61,0xe5,0xf1,0x23,0xc2,0x25,0xab,0x56,0x00, - 0xbe,0x1f,0xe8,0xd8,0x85,0x17,0x22,0x01,0xf0,0x3e, - 0xf0,0x3b,0x67,0xdb,0xb5,0x81,0xb3,0x03,0xc4,0xd0, - 0xd3,0x96,0x58,0x96,0x27,0x4e,0x5f,0x8a,0x57,0x31, - 0x53,0xcc,0x93,0xc0,0x4b,0xce,0xb6,0x7b,0x13,0x66, - 0xab,0x9b,0x3d,0x28,0xf1,0xc5,0x42,0xa4,0xe4,0x0e, - 0x00,0x5e,0x73,0xb6,0x55,0x3d,0x00,0x11,0xc9,0xda, - 0x93,0xf8,0x8b,0x71,0x7f,0x1f,0x7f,0x75,0xfe,0x46, - 0xac,0x88,0x0d,0xbc,0x79,0x3c,0x8e,0x3f,0xee,0xa2, - 0xdb,0x8f,0x70,0x15,0xe5,0x8f,0xc4,0x9f,0x50,0xf1, - 0xce,0xc6,0xce,0xc3,0x64,0xe0,0xcf,0xce,0xb6,0xc3, - 0x80,0x73,0x02,0xc4,0xd0,0x0f,0x2b,0xdc,0xdb,0x3b, - 0xc0,0xb1,0x5b,0x42,0xa8,0x3d,0x16,0x4f,0xc6,0xb6, - 0xf3,0xf0,0xf8,0x11,0xfe,0x8c,0x56,0x23,0x36,0x07, - 0xfe,0x82,0xaf,0x3a,0xf3,0x79,0xf8,0xd7,0x7a,0x4a, - 0xf6,0xbc,0x17,0xb4,0x5e,0xd8,0x34,0xdc,0x81,0x29, - 0x9e,0x7b,0x63,0xe0,0x8a,0x2a,0xff,0xfe,0x7a,0x8a, - 0xe7,0x10,0x91,0xe2,0x9a,0x88,0xd5,0x03,0xf0,0x16, - 0x24,0x3d,0x86,0x6c,0x8a,0x92,0x8a,0x88,0x74,0xf9, - 0x31,0x30,0xc7,0xd1,0x6e,0x1e,0xe0,0x3a,0xe6,0x9e, - 0x19,0x9b,0x86,0x05,0x80,0x5b,0xf0,0xdf,0x83,0xfd, - 0x34,0x40,0x0c,0x79,0xe9,0xc0,0x9e,0xd7,0xa5,0x52, - 0x3e,0xee,0xba,0xc0,0x49,0xce,0xb6,0x13,0x81,0xab, - 0x53,0x3e,0x7f,0xda,0x2e,0x4b,0xd0,0x76,0x7f,0xd2, - 0x2d,0xd4,0xd7,0x1b,0xf8,0x13,0xb0,0x6a,0x8a,0xc7, - 0x6c,0x39,0xa1,0x12,0x00,0xef,0xe2,0x7f,0xa3,0x82, - 0x65,0x77,0xce,0x25,0xdd,0x4c,0x4c,0x07,0x76,0x03, - 0xf6,0x77,0xa0,0xbf,0xa3,0xfd,0x07,0xd8,0x34,0x4f, - 0x29,0xae,0x4b,0xf1,0x4f,0x1b,0x5a,0x05,0xfb,0x02, - 0xf2,0xbc,0xf6,0x71,0x76,0xc0,0xd6,0xa7,0xf5,0x3c, - 0xd6,0x27,0x68,0x94,0x4f,0xa4,0x4c,0x1e,0xc7,0x5f, - 0xc0,0xb6,0x03,0x4b,0x5a,0xaa,0x1e,0x80,0x88,0x64, - 0xe5,0xbf,0xd8,0x16,0xa6,0x1e,0x0b,0x62,0xf5,0x95, - 0x56,0x4a,0xf1,0xfc,0x4b,0x03,0xf7,0xe3,0xaf,0xc5, - 0x74,0x13,0x70,0x67,0x8a,0xe7,0xcf,0xc3,0xc7,0x3d, - 0xfe,0x7f,0x7e,0xec,0x39,0x48,0xeb,0x79,0x5d,0x19, - 0xab,0x57,0xe6,0xed,0x23,0x5d,0x0c,0x7c,0x9a,0xd2, - 0xb9,0x43,0x79,0x08,0x78,0x38,0x41,0xfb,0x2b,0xb1, - 0x1a,0x0b,0xcd,0x9a,0x17,0x5b,0x82,0x50,0x6d,0x6b, - 0xca,0x07,0x52,0x38,0x7e,0xcb,0x08,0x95,0x00,0x00, - 0x5b,0x57,0x9f,0xe4,0xc5,0x3d,0x12,0xab,0xf4,0x9e, - 0xc6,0x36,0x1a,0x1b,0x61,0x2f,0xe4,0x59,0xf8,0xd7, - 0x61,0xee,0x87,0x55,0x7c,0x96,0xe2,0xfa,0x98,0x64, - 0x59,0xc3,0x2d,0x80,0x47,0xb0,0x75,0x3e,0x8d,0x18, - 0x84,0xd5,0xb4,0xf8,0x33,0xd5,0x8b,0x84,0x9c,0xca, - 0xdc,0x17,0x7e,0x11,0x69,0x6f,0xbf,0x02,0x6e,0x75, - 0xb6,0x9d,0x17,0x9b,0x66,0xa8,0x7a,0x00,0x22,0x92, - 0x95,0x63,0x80,0xb7,0x9c,0x6d,0x17,0x03,0x1e,0xc3, - 0x0a,0x03,0x36,0xd3,0x27,0xe8,0xc5,0xe7,0x3b,0x6d, - 0x2d,0xe7,0xfc,0x9d,0xf1,0xf8,0x8b,0x04,0x16,0xd9, - 0x49,0x58,0x11,0xf4,0xee,0xbe,0x04,0xfc,0x1b,0xdb, - 0x71,0xc1,0x33,0x03,0xb9,0x96,0x6f,0x62,0xf7,0xb1, - 0x23,0x9d,0xed,0x3f,0xc1,0x66,0x33,0xb7,0x82,0x53, - 0x12,0xb4,0xed,0xc4,0x66,0xf6,0x5e,0x42,0x63,0x35, - 0x01,0x3a,0xb0,0x02,0x8a,0xcf,0x62,0x33,0xc3,0x7b, - 0xfa,0x94,0x64,0x03,0xd7,0x2d,0x2f,0x64,0x02,0x60, - 0x16,0xb0,0x1b,0x36,0xb2,0xee,0xf5,0x65,0x2c,0x09, - 0x30,0xba,0xf2,0xbb,0x49,0xa6,0x70,0x2f,0x8c,0xad, - 0x69,0x7a,0xa0,0xf2,0xd8,0x30,0xc1,0xef,0x5e,0x4c, - 0x71,0xab,0x65,0xca,0x17,0x9d,0x06,0x8c,0x4b,0xd0, - 0x7e,0x75,0xe0,0x19,0xec,0xa2,0xe1,0xdd,0x75,0x62, - 0x38,0x70,0x34,0x56,0x73,0xe0,0x50,0xec,0xc2,0xd1, - 0xd3,0x7f,0x80,0x8b,0x12,0xc4,0x21,0x22,0xed,0x63, - 0x5f,0xe0,0x4d,0x67,0xdb,0x0d,0x08,0x5b,0x18,0x4a, - 0x44,0xa4,0xbb,0x8f,0xb1,0xad,0xcd,0x66,0x39,0xdb, - 0x0f,0xc4,0x66,0x58,0x3e,0x89,0x5d,0xdb,0xbc,0x55, - 0xe6,0xc1,0xb6,0x51,0x3b,0x1c,0x2b,0x38,0x77,0x29, - 0x30,0xd8,0xf9,0x7b,0xb3,0x81,0xdd,0xb1,0x7d,0xe1, - 0x5b,0xdd,0xcb,0x58,0xa2,0xb7,0xa7,0x01,0xc0,0xaf, - 0x81,0xe7,0xb1,0x44,0x80,0xb7,0xe3,0xda,0x81,0xd5, - 0x2e,0xbb,0xbb,0x72,0x5c,0xef,0x73,0x0a,0xb6,0x04, - 0x24,0xc9,0x3d,0x72,0x9e,0x46,0xe3,0xaf,0x05,0xd0, - 0xe5,0x60,0xac,0x16,0xcf,0x79,0x58,0x1d,0xb9,0x7a, - 0xfd,0xd8,0x0e,0xac,0x1e,0xd8,0x71,0xc0,0x18,0x6c, - 0x46,0x5e,0xad,0x6d,0x05,0x4f,0xc1,0x96,0x4e,0x94, - 0x46,0xe8,0x51,0x89,0x77,0xb1,0xe9,0xd3,0x77,0x61, - 0xa3,0xa9,0x5e,0x5b,0x54,0x1e,0x33,0xb1,0xe9,0x4c, - 0x2f,0x60,0x6b,0xad,0x27,0x62,0x6b,0xf4,0x07,0x60, - 0x1f,0x88,0x11,0x58,0xa6,0x71,0x65,0x60,0xd1,0x06, - 0x63,0x7c,0x94,0xb0,0x35,0x08,0x24,0x5d,0x1f,0x63, - 0xaf,0xd7,0xd5,0x09,0x7e,0xa7,0x13,0xbb,0x68,0x1c, - 0x8c,0x5d,0x04,0xee,0xc7,0x3a,0xf7,0xef,0x60,0xb3, - 0x3e,0x3a,0xb1,0xec,0xea,0xe2,0xd8,0xec,0x91,0x75, - 0xa9,0xbf,0x6f,0xed,0x27,0xc0,0xae,0xd8,0xfb,0x53, - 0x44,0xca,0xe7,0x13,0xec,0xe6,0xf5,0x01,0x7c,0xdf, - 0xa3,0x47,0x57,0xda,0xde,0x11,0x32,0x28,0x11,0x91, - 0x8a,0x87,0xb1,0x4e,0x67,0x92,0x59,0x93,0xab,0x62, - 0xbb,0x73,0xfd,0x06,0x1b,0x75,0x7e,0x02,0x78,0x15, - 0xbb,0xef,0x9a,0x8c,0x6d,0xeb,0x37,0x10,0x1b,0xdd, - 0x5e,0x1a,0x9b,0xb1,0xbb,0x32,0xd5,0x07,0x49,0xe2, - 0x1c,0x81,0x75,0x70,0xdb,0x41,0x3f,0xec,0x1a,0xbf, - 0x05,0xd5,0x47,0xea,0x97,0xc3,0x12,0x01,0x17,0x60, - 0x7d,0x9a,0x7f,0x63,0xf7,0xa2,0xef,0x03,0x53,0x2a, - 0x6d,0x06,0x61,0xf7,0xa0,0xab,0x60,0x45,0x04,0x1b, - 0xd9,0x4e,0xf0,0x2e,0xaa,0xd7,0xaa,0x2a,0xb2,0xc3, - 0x81,0x4d,0xb0,0xfe,0x9c,0xd7,0x30,0xec,0xfd,0x73, - 0x04,0x30,0x01,0xbb,0x9f,0x7f,0x1b,0xbb,0x9f,0xef, - 0x85,0x3d,0x97,0x5f,0xc2,0x96,0xa1,0x0c,0x71,0x1c, - 0xef,0x7e,0xec,0xb5,0x59,0x27,0x41,0x0c,0x2d,0x2f, - 0x8b,0x69,0x89,0xff,0x02,0xb6,0xc6,0xd6,0xf8,0x24, - 0x2d,0xca,0xd6,0x1b,0xbb,0xc0,0xa4,0xb1,0x2c,0xa0, - 0x9a,0x87,0xb1,0xd8,0xa6,0x06,0x3a,0xbe,0x84,0xf1, - 0x3b,0xac,0x7a,0xed,0xde,0x0d,0xfc,0xee,0xa8,0xca, - 0xa3,0x51,0x33,0x81,0x6f,0x03,0x6f,0x34,0x71,0x0c, - 0x11,0x69,0x7d,0x8f,0x02,0x27,0x00,0x3f,0x77,0xb4, - 0xed,0xc0,0xae,0x5b,0x6b,0xe0,0x9f,0x9a,0x2b,0x22, - 0xd2,0x8c,0xcb,0xb1,0xc1,0xb2,0xa4,0x53,0xc2,0xfb, - 0x62,0xf7,0x58,0xa1,0x76,0x09,0xf8,0x11,0xd6,0xe1, - 0x6a,0x17,0x9d,0xd8,0x80,0xd2,0x9e,0xd8,0x6c,0xe2, - 0x5a,0xa3,0xd2,0xbd,0xb0,0x4e,0x66,0x88,0x8e,0xe6, - 0x58,0x6c,0xd6,0x47,0xcf,0xa5,0x08,0x45,0xf7,0x36, - 0x76,0x4f,0x7d,0x07,0x8d,0xcd,0x4a,0x1f,0x8a,0x0d, - 0xda,0xad,0xdb,0xe0,0xf9,0x3f,0xc4,0x9e,0xb7,0xd9, - 0x58,0x82,0xab,0x34,0x42,0x2e,0x01,0xe8,0xee,0x21, - 0xe0,0xab,0x14,0xab,0xd3,0x74,0x0f,0xf0,0x75,0xfc, - 0xbb,0x15,0x48,0xb1,0x7c,0x17,0x78,0x30,0xe3,0x73, - 0x4e,0x07,0x76,0xc2,0x0a,0x4b,0x8a,0x88,0x9c,0x8d, - 0xbf,0x80,0x95,0xea,0x01,0x88,0x48,0xd6,0x7e,0x81, - 0x6d,0x61,0xea,0xdd,0xbd,0x24,0xa4,0x69,0xd8,0x12, - 0x83,0xf3,0xf3,0x0e,0x24,0x65,0x5d,0x6b,0xfc,0xff, - 0x81,0x8d,0x68,0x67,0xdd,0x09,0x7f,0x0f,0x1b,0xcc, - 0x1c,0x9f,0xf1,0x79,0xd3,0x72,0x27,0x70,0x18,0xd9, - 0x3f,0x6f,0x9f,0x01,0x3b,0x62,0xcf,0x1f,0x28,0x01, - 0x10,0xcc,0x7f,0xb1,0x35,0xfe,0xb7,0x67,0x78,0xce, - 0x6a,0xa6,0x63,0x53,0x75,0xb6,0x44,0x45,0xff,0x5a, - 0xd9,0x34,0x2c,0x81,0x73,0x57,0x46,0xe7,0x1b,0x8f, - 0x55,0x0d,0xcd,0xfb,0xfd,0x2b,0x22,0xc5,0x11,0x61, - 0x85,0x85,0xde,0x75,0xb6,0x5f,0x1f,0x38,0x23,0x5c, - 0x38,0x22,0x22,0x73,0xb9,0x12,0x9b,0x56,0xee,0xad, - 0x5b,0x12,0xc2,0x2b,0xd8,0x6c,0xde,0xab,0x73,0x8c, - 0x21,0x94,0xee,0x45,0xfe,0x2e,0xc2,0x12,0x2e,0x9e, - 0xad,0x18,0xd3,0xf0,0x3a,0xb6,0x4d,0xf5,0x4b,0x19, - 0x9d,0x2f,0x94,0x8b,0x81,0x03,0xf1,0xd7,0xad,0x68, - 0xd6,0x44,0x60,0x2b,0x6c,0xa9,0x4b,0x97,0x7a,0x4b, - 0x7f,0xdb,0x4e,0x96,0x09,0x00,0xf8,0xbc,0x13,0xb5, - 0x0b,0xf9,0x4c,0x83,0xbc,0x0f,0x4b,0x42,0x9c,0x4b, - 0x76,0x1f,0x4e,0x09,0x67,0x0a,0xb6,0xcf,0xf6,0x99, - 0x84,0x7d,0x3d,0xef,0xc2,0xd6,0x65,0x65,0x95,0x6c, - 0x10,0x91,0xd6,0x31,0x0e,0xd8,0x03,0x9b,0x42,0xe8, - 0x71,0x14,0xb0,0x6d,0xb8,0x70,0x44,0x44,0xe6,0xf2, - 0x10,0xb6,0x2d,0xdd,0xf9,0xf8,0xaf,0x55,0x69,0x98, - 0x82,0x2d,0x95,0x5a,0x15,0x78,0x3a,0xc3,0xf3,0x66, - 0xa9,0x67,0x5f,0xea,0xb7,0xd8,0xba,0xf6,0x31,0x81, - 0xcf,0x7b,0x0b,0xb0,0x66,0x06,0xe7,0xc9,0xca,0x95, - 0x64,0x33,0x5b,0xfc,0x69,0x2c,0x19,0xff,0x68,0x8f, - 0x7f,0xd7,0x0c,0x80,0x0c,0xdc,0x8c,0x15,0x67,0x38, - 0x18,0xab,0x9e,0x19,0xd2,0x1c,0xec,0x43,0xb2,0x1e, - 0xb6,0x9e,0xe9,0xf9,0xc0,0xe7,0x93,0x6c,0xcd,0x02, - 0x8e,0xc7,0x76,0x7d,0x48,0xb2,0xed,0xa4,0xc7,0x8b, - 0xd8,0xda,0xa0,0xad,0xf8,0x7c,0x8a,0x50,0xa3,0xb2, - 0xfc,0xc2,0x15,0x91,0x6c,0xdd,0x8f,0x7f,0x4b,0xa3, - 0xae,0x7a,0x00,0x8d,0x16,0xae,0x15,0x11,0x69,0xc4, - 0x24,0x6c,0xfd,0xfd,0x72,0x58,0x71,0xc0,0xe9,0x01, - 0xcf,0x35,0x1e,0x9b,0xed,0xb4,0x34,0xb6,0x0b,0x4a, - 0xc8,0x73,0xe5,0xad,0x5a,0x11,0xc4,0x07,0xb1,0x0a, - 0xf4,0xa7,0x63,0x85,0xea,0xd2,0xf4,0x2a,0xb0,0x33, - 0xb6,0x24,0xf5,0xd3,0x94,0x8f,0x9d,0xb7,0x47,0xb0, - 0x01,0xb7,0x53,0xb1,0xc2,0x93,0x69,0x9a,0x58,0x39, - 0xee,0x3a,0x54,0xef,0x0b,0x2a,0x01,0x90,0x91,0x69, - 0xd8,0x05,0x68,0x05,0x6c,0xfa,0xca,0x85,0xa4,0x37, - 0x2b,0x60,0x1a,0xb6,0x4e,0xfb,0x50,0x60,0x49,0xec, - 0x43,0xf2,0x58,0x4a,0xc7,0x96,0x62,0x7a,0x14,0x4b, - 0x02,0x6c,0x8e,0xad,0xb3,0x9d,0xd6,0xe0,0x71,0xa6, - 0x01,0xb7,0x61,0xdb,0x50,0xae,0x5c,0x39,0x56,0xbd, - 0x75,0x49,0xde,0x0b,0x86,0x0a,0x4d,0x8a,0xb4,0xb7, - 0xd3,0x80,0x7b,0x9d,0x6d,0x47,0x00,0x37,0xa0,0x7a, - 0x00,0x22,0x92,0xbd,0xff,0x61,0x03,0x70,0x8b,0x54, - 0xfe,0x7b,0x2f,0xe9,0x4c,0xbd,0x9e,0x88,0xdd,0x33, - 0xed,0x8a,0x25,0x38,0x7f,0x82,0x55,0xba,0x2f,0xab, - 0xae,0xd9,0x0f,0x8b,0x02,0x47,0x62,0xdb,0x47,0x37, - 0xba,0xce,0x7d,0x0e,0xb6,0x6b,0xc2,0x6e,0xd8,0x4c, - 0x8e,0xa4,0xdb,0xe7,0xb5,0x92,0xcf,0x80,0x9f,0x61, - 0xfd,0xb7,0xa3,0xb1,0xc1,0xb8,0x66,0x3c,0x8b,0x6d, - 0x05,0xb8,0x58,0xe5,0xb8,0xb5,0xea,0x61,0x94,0xea, - 0xfb,0xb8,0x23,0x8a,0x0a,0x57,0x30,0x72,0x71,0x6c, - 0xb4,0x7e,0x0d,0xec,0xc5,0x5f,0x1c,0x58,0x18,0xdb, - 0x41,0x60,0x00,0xd6,0xe1,0x9a,0x8a,0x65,0x32,0x27, - 0x61,0x6f,0x94,0x77,0xb0,0xf5,0x2f,0x2f,0x56,0x1e, - 0x4f,0xa2,0x0e,0x57,0xd9,0x0d,0xc0,0xf6,0xdf,0xde, - 0x08,0x58,0x11,0xab,0xfc,0xbf,0x20,0xf6,0x3e,0xea, - 0x8f,0x75,0xf4,0x27,0x60,0xd9,0xd3,0x31,0xd8,0x94, - 0xa0,0x27,0xb0,0xe2,0x90,0x49,0x0a,0x43,0xee,0x85, - 0xed,0x2d,0x1a,0xe7,0x10,0xe0,0x92,0x04,0xc7,0x15, - 0xc9,0xda,0xb1,0xd8,0x72,0x9a,0x38,0xfb,0xd2,0x9e, - 0xeb,0x38,0x45,0x44,0xca,0xaa,0x3f,0x36,0x32,0xba, - 0x2e,0x36,0x43,0x60,0x09,0xac,0xc3,0x34,0x14,0xbb, - 0x9f,0xea,0x8f,0x25,0x09,0xa6,0x62,0x23,0xb3,0x1f, - 0x61,0x53,0xb5,0xdf,0x00,0x9e,0xc1,0x06,0xd9,0x9e, - 0xa7,0xbd,0x96,0xd7,0x9e,0x80,0x8d,0x18,0xc7,0xd9, - 0x0b,0xb8,0xc6,0x79,0xcc,0x05,0xb0,0xed,0x02,0x57, - 0xc1,0x06,0x40,0x47,0x61,0xdb,0xda,0x0d,0xc2,0x9e, - 0xe7,0x99,0x58,0xdf,0xe6,0x63,0xec,0xde,0xf4,0x25, - 0x6c,0x76,0xeb,0x3f,0xb1,0xed,0x67,0xcb,0x6a,0x49, - 0x6c,0x16,0xf7,0x5a,0xd8,0x73,0xb6,0x14,0xf6,0xbc, - 0x0d,0xc4,0xfa,0x85,0x53,0xb0,0xe7,0x6d,0x02,0xf0, - 0x1a,0xd6,0x17,0x7c,0x0e,0x4b,0x9a,0x78,0x07,0x97, - 0xf7,0x04,0xfe,0xe0,0x68,0xf7,0x53,0x2c,0xe1,0xdf, - 0xd2,0x8a,0x98,0xed,0xe8,0xba,0xa0,0xdc,0x90,0x77, - 0x20,0xd2,0xd2,0xa6,0x60,0x6b,0xf6,0x43,0xaf,0xdb, - 0x9f,0xd7,0xd9,0x6e,0x62,0xd0,0x28,0x44,0x44,0x44, - 0x44,0x1a,0x33,0x15,0x5b,0xca,0x74,0x7f,0xde,0x81, - 0xb4,0xb9,0x0f,0xf0,0x27,0x0b,0xe4,0x73,0xaf,0x57, - 0x1e,0xbf,0xcd,0x3b,0x90,0x76,0x91,0xe7,0x12,0x00, - 0x91,0x76,0xb0,0xa0,0xb3,0x9d,0xb7,0x4a,0xb8,0x88, - 0x88,0x88,0x88,0x88,0x48,0x10,0x4a,0x00,0x88,0x34, - 0x67,0x19,0x67,0x3b,0x25,0x00,0x44,0x44,0x44,0x44, - 0x44,0x24,0x57,0x4a,0x00,0x88,0x34,0x67,0x15,0x47, - 0x9b,0x99,0xc0,0xd8,0xc0,0x71,0x88,0x88,0x88,0x88, - 0x88,0x88,0xd4,0xa5,0x04,0x80,0x48,0xe3,0x16,0xc0, - 0x37,0x03,0xe0,0x45,0x6a,0x57,0x1d,0x15,0x11,0x11, - 0x11,0x11,0x11,0xc9,0x84,0x12,0x00,0x22,0x8d,0xfb, - 0xba,0xb3,0xdd,0x53,0x41,0xa3,0x10,0x49,0x47,0xbf, - 0xbc,0x03,0x10,0x11,0x11,0x11,0x91,0xb0,0x8a,0xb8, - 0x0b,0x80,0x88,0x47,0xd7,0xe8,0x7b,0xf7,0xc7,0xa8, - 0xca,0x7f,0x37,0x24,0x9b,0x4e,0xf7,0x1e,0xce,0x76, - 0xf7,0x04,0x8d,0x42,0x24,0x1d,0x03,0x9c,0xed,0x66, - 0x07,0x8d,0x42,0x44,0x44,0x44,0x44,0x82,0x51,0x02, - 0x40,0x5a,0xc9,0x59,0xd8,0xfe,0xa9,0xa3,0x80,0xc1, - 0x75,0xda,0xed,0x4a,0xf8,0x04,0xc0,0x8a,0x95,0x58, - 0xe2,0x44,0xc0,0xe8,0xc0,0xb1,0x88,0xa4,0x61,0x98, - 0xb3,0xdd,0xf4,0xa0,0x51,0x88,0x88,0x88,0x88,0x48, - 0x30,0x5a,0x02,0x20,0xad,0xa4,0x1f,0xb0,0x06,0xf5, - 0x3b,0xff,0x00,0x07,0x01,0x43,0x03,0xc7,0xf2,0x73, - 0xa0,0xc3,0xd1,0xee,0x61,0xe0,0xfd,0xc0,0xb1,0x88, - 0xa4,0x61,0x29,0x67,0xbb,0x49,0x41,0xa3,0x10,0x11, - 0x11,0x11,0x91,0x60,0x94,0x00,0x90,0x56,0xf2,0x67, - 0x67,0xbb,0x91,0xc0,0x89,0x01,0xe3,0xd8,0x1d,0xd8, - 0xce,0xd9,0xf6,0x8a,0x80,0x71,0x88,0xa4,0x69,0x05, - 0x67,0xbb,0x8f,0x82,0x46,0x21,0x22,0x22,0x22,0x22, - 0xc1,0x28,0x01,0x20,0xad,0xe4,0x01,0xe0,0x35,0x67, - 0xdb,0x1f,0x61,0x1d,0xf5,0xb4,0xad,0x0d,0x5c,0xee, - 0x6c,0xfb,0x21,0x70,0x63,0x80,0x18,0x44,0xd2,0xb6, - 0x2a,0xb0,0xb0,0xb3,0xed,0x5b,0x21,0x03,0x11,0x11, - 0x11,0x11,0x91,0x70,0x94,0x00,0x90,0x56,0x12,0x01, - 0xe7,0x26,0x68,0xff,0x3b,0x60,0xbf,0x14,0xcf,0xbf, - 0x05,0xb6,0x9e,0x7f,0x90,0xb3,0xfd,0x19,0xc0,0x94, - 0x14,0xcf,0x2f,0x12,0xca,0x41,0xce,0x76,0x13,0xd1, - 0x92,0x16,0x11,0x11,0x11,0x91,0x96,0xa5,0x04,0x80, - 0xb4,0x9a,0xdf,0x02,0x63,0x9c,0x6d,0xfb,0x00,0x57, - 0x02,0x7f,0x00,0x16,0x6d,0xe2,0x9c,0x43,0x81,0xf3, - 0x81,0x3b,0xf1,0x17,0x4a,0x7b,0x19,0xb8,0xa4,0x89, - 0x73,0x8a,0x64,0x65,0x6b,0xe0,0x60,0x67,0xdb,0xc7, - 0x43,0x06,0x22,0x22,0x22,0x22,0x22,0x61,0x29,0x01, - 0x20,0xad,0x66,0x3a,0xf0,0x3d,0x6c,0x36,0x80,0xd7, - 0x9e,0xc0,0x2b,0xc0,0x55,0x58,0x67,0xa7,0x8f,0xe3, - 0x77,0x7a,0x01,0xeb,0x03,0x17,0x60,0x53,0x9e,0x0f, - 0xc7,0xff,0x79,0x99,0x0d,0xec,0x8d,0xaa,0xa5,0x4b, - 0x31,0xd4,0xda,0xde,0x6f,0x79,0x2c,0xb1,0x75,0x2b, - 0xfe,0x1d,0x61,0xee,0x4f,0x25,0x22,0x11,0x11,0x11, - 0x11,0xc9,0x85,0xb6,0x01,0x94,0x56,0x74,0x17,0x70, - 0x0e,0x70,0x4c,0x82,0xdf,0xe9,0x07,0xec,0x53,0x79, - 0xcc,0x00,0x5e,0x02,0x5e,0x00,0x3e,0xc6,0xa6,0x35, - 0xcf,0x02,0xfa,0x03,0x0b,0x60,0xd5,0xd0,0x57,0x03, - 0x06,0x36,0x18,0xdf,0xb1,0xc0,0x63,0x0d,0xfe,0xae, - 0x48,0xda,0x6e,0x03,0x36,0xc4,0xa6,0xee,0x7f,0x88, - 0x7d,0x16,0x16,0xc2,0x8a,0x65,0x26,0x75,0x4b,0x8a, - 0x71,0x89,0x88,0x88,0x88,0x48,0xc6,0x94,0x00,0x90, - 0x56,0x75,0x1c,0xb0,0x34,0xb0,0x73,0x03,0xbf,0xdb, - 0x07,0x2b,0x7a,0xb6,0x6a,0xaa,0x11,0x99,0x8b,0x48, - 0x56,0xa7,0x40,0x24,0x0b,0x7d,0x81,0xc5,0x2b,0x8f, - 0x46,0x3d,0x0a,0x3c,0x9b,0x4e,0x38,0x22,0x22,0x22, - 0x22,0x92,0x07,0x2d,0x01,0x90,0x56,0x35,0x07,0xd8, - 0x03,0xb8,0x21,0xef,0x40,0xba,0x39,0x13,0x38,0x2c, - 0xef,0x20,0x44,0x02,0x39,0x39,0xef,0x00,0x44,0x44, - 0x44,0x44,0xa4,0x39,0x4a,0x00,0x48,0x2b,0x9b,0x01, - 0x7c,0x0b,0x38,0x11,0x5b,0x77,0x9f,0x97,0x89,0xd8, - 0x9a,0xff,0xe3,0x73,0x8c,0x41,0x24,0xa4,0x6b,0x81, - 0x7f,0xe4,0x1d,0x84,0x88,0x88,0x88,0x88,0x34,0x47, - 0x09,0x00,0x69,0x75,0x11,0x70,0x0a,0x56,0xb0,0xef, - 0xc1,0x1c,0xce,0xff,0x57,0x6c,0x29,0xc1,0xef,0x73, - 0x38,0xb7,0x48,0x16,0xee,0xc5,0xbf,0x4b,0x80,0x88, - 0x88,0x88,0x88,0x14,0x98,0x12,0x00,0xd2,0x2e,0xfe, - 0x0d,0x6c,0x0c,0x6c,0x0b,0x3c,0x15,0xf8,0x5c,0x73, - 0x80,0x3b,0xb0,0xa4,0xc3,0xf6,0xc0,0x1b,0x81,0xcf, - 0x27,0x92,0x97,0x6b,0xb1,0x9d,0x33,0x26,0xe7,0x1d, - 0x88,0x88,0x88,0x88,0x88,0x34,0x4f,0x45,0x00,0xa5, - 0xdd,0xdc,0x51,0x79,0xac,0x02,0xec,0x52,0x79,0xac, - 0x98,0xc2,0x71,0x67,0x03,0xff,0xaa,0x1c,0xfb,0x1a, - 0x6c,0x6b,0x40,0x91,0x76,0xf5,0x6f,0xe0,0x04,0x6c, - 0xc7,0x0d,0x11,0x11,0x11,0x11,0x69,0x13,0x4a,0x00, - 0x48,0xbb,0x7a,0xb6,0xf2,0x38,0x11,0x58,0x04,0x9b, - 0xa6,0xbf,0x0a,0xb0,0x32,0x30,0x0a,0x18,0x52,0x79, - 0x0c,0x06,0x06,0x55,0x7e,0x67,0x1a,0x30,0x15,0x18, - 0x07,0xbc,0x83,0x75,0xf2,0x9f,0xc7,0x66,0x14,0x3c, - 0x0e,0x4c,0xc8,0x2e,0x7c,0x91,0xd4,0xdc,0x04,0x7c, - 0x06,0x7c,0x09,0x98,0x1f,0x7b,0xdf,0x0f,0x00,0x7a, - 0x63,0xdb,0x5f,0x8e,0xaf,0x3c,0xc6,0x02,0xff,0x04, - 0xee,0x21,0xfc,0x2c,0x1a,0x11,0x11,0x11,0x11,0xc9, - 0x41,0x47,0x14,0x45,0x79,0xc7,0x20,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x81,0xa9,0x06,0x80,0x88,0x88, - 0x88,0x88,0x88,0x88,0x48,0x09,0x28,0x01,0x20,0x22, - 0x22,0x22,0x22,0x22,0x22,0x52,0x02,0x4a,0x00,0x88, - 0x88,0x88,0x88,0x88,0x88,0x88,0x94,0x80,0x12,0x00, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x25,0xa0,0x04, - 0x80,0x88,0x88,0x88,0x88,0x88,0x88,0x48,0x09,0x28, - 0x01,0x20,0x22,0x22,0x22,0x22,0x22,0x22,0x52,0x02, - 0x4a,0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x94, - 0x80,0x12,0x00,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x25,0xa0,0x04,0x80,0x88,0x88,0x88,0x88,0x88,0x88, - 0x48,0x09,0x28,0x01,0x20,0x22,0x22,0x22,0x22,0x22, - 0x22,0x52,0x02,0x4a,0x00,0x88,0x88,0x88,0x88,0x88, - 0x88,0x88,0x94,0x80,0x12,0x00,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x25,0xa0,0x04,0x80,0x88,0x88,0x88, - 0x88,0x88,0x88,0x48,0x09,0x28,0x01,0x20,0x22,0x22, - 0x22,0x22,0x22,0x22,0x52,0x02,0x4a,0x00,0x88,0x88, - 0x88,0x88,0x88,0x88,0x88,0x94,0x80,0x12,0x00,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x25,0xa0,0x04,0x80, - 0x88,0x88,0x88,0x88,0x88,0x88,0x48,0x09,0x28,0x01, - 0x20,0x22,0x22,0x22,0x22,0x22,0x22,0x52,0x02,0x4a, - 0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x94,0x80, - 0x12,0x00,0x22,0x22,0x22,0x22,0x72,0x63,0x1b,0xf0, - 0x00,0x00,0x20,0x00,0x49,0x44,0x41,0x54,0x22,0x22, - 0x22,0x25,0xa0,0x04,0x80,0x88,0x88,0x88,0x88,0x88, - 0x88,0x48,0x09,0x28,0x01,0x20,0x22,0x22,0x22,0x22, - 0x22,0x22,0x52,0x02,0x4a,0x00,0x88,0x88,0x88,0x88, - 0x88,0x88,0x88,0x94,0x80,0x12,0x00,0x22,0x22,0x22, - 0x22,0x22,0x22,0x22,0x25,0xa0,0x04,0x80,0x88,0x88, - 0x88,0x88,0x88,0x88,0x48,0x09,0x28,0x01,0x20,0x22, - 0x22,0x22,0x22,0x22,0x22,0x52,0x02,0x4a,0x00,0x88, - 0x88,0x88,0x88,0x88,0x88,0x88,0x94,0x80,0x12,0x00, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x25,0xa0,0x04, - 0x80,0x88,0x88,0x88,0x88,0x88,0xc4,0xe9,0x04,0xb6, - 0x00,0xce,0x02,0xee,0x06,0x5e,0x03,0x3e,0x03,0x66, - 0x03,0x51,0x9d,0xc7,0xa0,0x3c,0x82,0xad,0x62,0x1f, - 0xea,0xc7,0x19,0x01,0xb7,0xe7,0x15,0x5c,0x0f,0xcb, - 0x53,0x3f,0xce,0x19,0xc0,0x27,0xc0,0xf3,0xc0,0xad, - 0xc0,0x71,0xc0,0xaa,0xb9,0x44,0x2a,0x2d,0xa7,0x33, - 0xef,0x00,0x44,0x44,0x44,0x44,0x44,0xa4,0xb0,0xfa, - 0x03,0x3f,0x04,0x0e,0x07,0x16,0xc8,0x39,0x16,0x31, - 0xbd,0x81,0x61,0x95,0xc7,0x8a,0xc0,0xf6,0xc0,0x19, - 0xc0,0xd3,0xc0,0xe9,0xc0,0x8d,0xf9,0x85,0x26,0x45, - 0xa7,0x19,0x00,0x22,0x22,0x22,0x22,0x22,0x52,0xcd, - 0xda,0xc0,0x73,0x58,0xe7,0x52,0x9d,0xff,0xe2,0x5b, - 0x0d,0xf8,0x13,0x30,0x1a,0x98,0x2f,0xe7,0x58,0xa4, - 0xa0,0x94,0x00,0x10,0x11,0x11,0x11,0x11,0x91,0x9e, - 0xbe,0x01,0x3c,0xf8,0xff,0xdb,0xbb,0xef,0x38,0xb9, - 0xab,0xea,0xff,0xe3,0xaf,0x25,0x9d,0x00,0x81,0x40, - 0xe8,0x25,0x84,0x2e,0x20,0xbd,0x29,0x48,0xc0,0x2f, - 0x82,0x34,0x01,0x81,0x2f,0x82,0x22,0x22,0x20,0x4d, - 0x10,0x14,0xf5,0x47,0xf3,0x8b,0xa0,0x80,0x28,0xa2, - 0x20,0x45,0x2c,0x01,0xe9,0x1d,0x05,0xa5,0x13,0x3a, - 0x04,0xa5,0x23,0xa1,0x23,0x10,0x4a,0xe8,0x21,0x90, - 0x9e,0xfd,0xfd,0x71,0x76,0xcd,0xb2,0xec,0x7c,0xee, - 0xf9,0xcc,0x7c,0xee,0x7c,0xda,0xfb,0xf9,0x78,0xec, - 0x83,0x24,0x73,0x67,0xe6,0xb2,0xb3,0x3b,0xf3,0xb9, - 0xe7,0x9e,0x7b,0x0e,0x30,0x2a,0xef,0x89,0x48,0x6a, - 0x5b,0x00,0xe3,0x80,0x65,0xf2,0x9e,0x88,0x14,0x8f, - 0x02,0x00,0x22,0x22,0x22,0x22,0x22,0xd2,0xd3,0xea, - 0xc0,0x15,0xc0,0xa0,0xbc,0x27,0x22,0x4d,0x1b,0x09, - 0xdc,0x80,0x1d,0xe1,0x10,0xf9,0x2f,0x05,0x00,0x44, - 0x44,0x44,0x44,0x44,0xa4,0xdb,0x00,0xe0,0x7c,0x60, - 0x70,0xde,0x13,0x91,0x96,0xad,0x0c,0x9c,0x98,0xf7, - 0x24,0xa4,0x58,0x14,0x00,0x10,0x11,0x11,0x11,0x11, - 0x91,0x6e,0x47,0x00,0x6b,0xe6,0x3d,0x09,0xc9,0xcc, - 0x21,0xc0,0x06,0x79,0x4f,0x42,0x8a,0x43,0x5d,0x00, - 0x44,0x44,0x44,0x44,0x44,0x04,0x6c,0x6d,0x70,0x70, - 0xca,0xfb,0x3c,0x01,0x5c,0x03,0xdc,0x0e,0xbc,0x0e, - 0xbc,0x0d,0xcc,0xe8,0x71,0xfb,0xe4,0x6c,0xa6,0x56, - 0x2b,0xcf,0x00,0x0b,0xf4,0xf8,0xfb,0x10,0xac,0xa8, - 0xdf,0xb2,0xc0,0x96,0xc0,0x8e,0xc0,0xa2,0xce,0xc7, - 0xea,0xc0,0x3a,0x38,0xec,0x9e,0xe5,0x04,0xa5,0xbc, - 0x14,0x00,0x10,0x11,0x11,0x11,0x11,0x11,0x80,0x1d, - 0x80,0xc5,0x9c,0x63,0x27,0x01,0x87,0x03,0x7f,0xc2, - 0x7a,0xd3,0x4b,0x76,0x66,0x03,0xef,0xf7,0xf8,0xfb, - 0xfb,0x58,0x70,0xe5,0x31,0xe0,0x5a,0xe0,0x87,0xc0, - 0xb1,0xc0,0x0f,0xb0,0x05,0x7e,0xc8,0x57,0xb1,0x00, - 0xc2,0x5b,0xd9,0x4e,0x53,0xca,0x48,0x47,0x00,0xa4, - 0x4c,0x76,0xc6,0x3e,0x60,0xfa,0xfa,0xda,0x2d,0xc7, - 0x79,0x89,0x88,0x88,0x88,0x54,0xc1,0xd7,0x9c,0xe3, - 0xa6,0x00,0xdb,0x02,0x7f,0x44,0x8b,0xff,0x3c,0x4c, - 0xc6,0x82,0x00,0x87,0x39,0xc7,0x0f,0xc4,0xae,0xa3, - 0x45,0x14,0x00,0x90,0x52,0xd9,0x28,0xef,0x09,0x88, - 0x88,0x88,0x88,0x54,0xd8,0x86,0xce,0x71,0xc7,0x62, - 0x2d,0x02,0x25,0x5f,0xbf,0x01,0x2e,0x77,0x8e,0x55, - 0x1d,0x00,0x01,0x14,0x00,0x90,0x72,0x51,0x00,0x40, - 0x44,0x44,0x44,0x24,0x8e,0x25,0x81,0xc5,0x1d,0xe3, - 0x26,0x00,0xa7,0x47,0x9e,0x8b,0xf8,0xfd,0x08,0x98, - 0xe5,0x18,0xb7,0x7e,0xec,0x89,0x48,0x39,0x28,0x00, - 0x20,0x65,0x31,0x10,0x58,0x3b,0xef,0x49,0x88,0x88, - 0x88,0x88,0x54,0xd4,0x1a,0xce,0x71,0x97,0x02,0xd3, - 0x62,0x4e,0x44,0x52,0x79,0x11,0xb8,0xc3,0x31,0x6e, - 0x25,0xd4,0xda,0x51,0x50,0x00,0x40,0xca,0x63,0x6d, - 0x60,0x50,0xde,0x93,0x10,0x11,0x11,0x11,0xa9,0xa8, - 0x11,0xce,0x71,0xd7,0x46,0x9d,0x85,0x34,0xe3,0x4a, - 0xc7,0x98,0xb9,0x80,0xe1,0xb1,0x27,0x22,0xc5,0xa7, - 0x00,0x80,0x94,0x85,0xd2,0xff,0x45,0x44,0x44,0x44, - 0xe2,0x19,0xe6,0x18,0xd3,0x09,0xfc,0x2b,0xf6,0x44, - 0x24,0x35,0xef,0x6b,0x32,0x7f,0xd4,0x59,0x48,0x29, - 0x28,0x00,0x20,0x65,0xa1,0x00,0x80,0x88,0x88,0x88, - 0x48,0x3c,0x9e,0xc5,0xe1,0x2b,0xc0,0x47,0xb1,0x27, - 0x22,0xa9,0xfd,0xdb,0x39,0x4e,0x01,0x00,0x51,0x00, - 0x40,0x4a,0x43,0x01,0x00,0x11,0x11,0x11,0x91,0x78, - 0x3c,0xe7,0xc3,0x5f,0x89,0x3e,0x0b,0x69,0xc6,0x87, - 0xc0,0xbb,0x8e,0x71,0x43,0x62,0x4f,0x44,0x8a,0x4f, - 0x01,0x00,0x29,0x83,0x25,0xbb,0xbe,0x44,0x44,0x44, - 0x44,0x24,0x8e,0x0e,0xc7,0x98,0xc9,0xd1,0x67,0x21, - 0xcd,0xf2,0xbc,0x36,0x9e,0xd7,0x58,0x2a,0x4e,0x01, - 0x00,0x29,0x03,0xed,0xfe,0x8b,0x88,0x88,0x88,0xe4, - 0x4f,0x01,0x80,0xe2,0xfa,0x30,0xef,0x09,0x48,0x39, - 0x28,0x00,0x20,0x65,0xa0,0x00,0x80,0x88,0x88,0x88, - 0x48,0xfe,0x66,0xe6,0x3d,0x01,0x69,0x48,0xaf,0x8d, - 0xb8,0x28,0x00,0x20,0x65,0xa0,0x00,0x80,0x88,0x88, - 0x88,0x88,0x88,0x48,0x8b,0xfa,0xe7,0x3d,0x81,0x5e, - 0x06,0x01,0xdb,0x01,0x9b,0x00,0x1b,0x02,0x8b,0x62, - 0xfd,0x2a,0x07,0x01,0xef,0x01,0x2f,0x03,0x0f,0x02, - 0x47,0xe3,0x2b,0x74,0x51,0x64,0xfd,0x81,0xd5,0x80, - 0x75,0x81,0x15,0x81,0x15,0x80,0xc5,0x81,0x85,0x80, - 0x05,0xb0,0x42,0x2c,0x03,0x81,0xd9,0x58,0xba,0x55, - 0xf7,0xd7,0x24,0xe0,0x45,0x60,0x3c,0xf0,0x34,0xf0, - 0x14,0xf0,0x04,0x30,0xab,0xbd,0xd3,0x6f,0x9b,0x41, - 0xc0,0xda,0x79,0x4f,0x42,0x44,0x44,0x44,0x44,0x44, - 0xa4,0xec,0xb2,0xca,0x00,0x38,0x17,0xeb,0x0b,0x9a, - 0xf4,0x75,0x6d,0xc2,0xfd,0x07,0x00,0x47,0x02,0xff, - 0x01,0x2e,0x07,0x0e,0x01,0xd6,0x07,0x96,0x06,0xe6, - 0xe9,0xba,0x7d,0x61,0x6c,0xb1,0x7c,0x40,0xd7,0x9f, - 0xcb,0x68,0x7e,0x60,0x5f,0xe0,0xaf,0xc0,0x07,0xc0, - 0xc3,0xd8,0xf7,0xee,0x08,0x60,0x07,0xec,0xff,0x79, - 0x14,0x16,0x00,0x18,0x02,0xf4,0xc3,0xfe,0xdf,0x17, - 0x00,0x96,0x02,0x56,0x01,0x36,0x00,0x76,0x03,0xfe, - 0x0f,0xb8,0x18,0x78,0x04,0x78,0x13,0xb8,0x00,0xf8, - 0x5f,0x7c,0x3d,0x5c,0x8b,0x66,0x67,0x1a,0xff,0xdc, - 0x4c,0xc5,0x02,0x21,0x21,0x17,0x27,0x3c,0x46,0xef, - 0xaf,0x35,0xb3,0x9d,0x7e,0x4b,0xee,0xc6,0x37,0xe7, - 0x91,0x6d,0x9c,0xd3,0x19,0xce,0x39,0xfd,0x4f,0x1b, - 0xe7,0x94,0xe4,0x70,0x7c,0xf3,0x9d,0x46,0xfe,0xed, - 0x6f,0xe6,0xc6,0x02,0x79,0x9e,0xf9,0x1e,0x96,0xd3, - 0x1c,0x7b,0x9b,0x17,0x98,0x4e,0x78,0xbe,0xd7,0xb5, - 0x69,0x3e,0x2f,0x38,0xe6,0xd2,0x89,0xbd,0xc7,0xf6, - 0x6b,0xc3,0x7c,0x8e,0x71,0xce,0x67,0x99,0x36,0xcc, - 0xc5,0xeb,0x08,0xfc,0xef,0x97,0xdf,0x6e,0xf3,0xdc, - 0x6e,0x72,0xce,0x6b,0x16,0xf0,0x85,0x36,0xcf,0x2d, - 0xc9,0x2f,0xf1,0xcd,0xfb,0x2d,0xf2,0xdd,0x7c,0x19, - 0xdb,0xc7,0x9c,0xfa,0xfa,0xfa,0x63,0x4e,0xf3,0x6b, - 0xe4,0x6c,0xfc,0x3f,0xb3,0x79,0x7f,0x6d,0x15,0xe9, - 0x7b,0x20,0x22,0x92,0x89,0xac,0x02,0x00,0x53,0x1c, - 0x63,0xe6,0x6e,0xf0,0xef,0x23,0xb1,0x45,0xd0,0xcf, - 0x80,0x45,0x32,0x9a,0x4f,0xd1,0xac,0x00,0x8c,0x01, - 0x5e,0x03,0x7e,0x8f,0x65,0x39,0x34,0xfa,0x7e,0x34, - 0x63,0x41,0x60,0x0f,0xe0,0x92,0xae,0xe7,0x38,0x15, - 0xcb,0x26,0x10,0xa9,0x83,0x4b,0xb0,0x4c,0x99,0x90, - 0x81,0xc0,0xf6,0x91,0xe7,0x12,0xb2,0x2d,0x30,0xd4, - 0x31,0x6e,0x26,0x70,0x51,0xe4,0xb9,0x78,0x7d,0x08, - 0xdc,0xeb,0x18,0xb7,0x31,0xf1,0x17,0xdc,0xa3,0x80, - 0x65,0x9d,0x63,0xe7,0x03,0xd6,0x89,0x38,0x97,0x6e, - 0x5f,0x74,0x8c,0xf9,0x37,0x16,0xe0,0x2e,0x8a,0x5f, - 0x61,0x9f,0xbb,0x1e,0xbf,0x00,0x46,0x44,0x9c,0x4b, - 0x4f,0xbb,0x03,0x5b,0x38,0xc7,0xfe,0x1a,0xb8,0x33, - 0xe2,0x5c,0xd2,0x3a,0xcf,0x39,0x6e,0x21,0xfc,0xff, - 0x8f,0x59,0x5b,0x08,0xfb,0x3d,0xf5,0xb8,0x20,0xe6, - 0x44,0x44,0x44,0x24,0x3f,0x59,0x05,0x00,0x3e,0x76, - 0x8c,0xe9,0xeb,0xa2,0x77,0x09,0xe0,0x0e,0x6c,0xe7, - 0xbb,0x8a,0xe6,0x05,0x7e,0x87,0xa5,0xe9,0x7f,0x93, - 0xf6,0xf4,0xde,0x9c,0x1b,0xdb,0x39,0x7c,0xa1,0xeb, - 0xb9,0xcb,0x98,0x11,0x20,0x92,0xc6,0x6b,0xc0,0xed, - 0xce,0xb1,0x3b,0xc7,0x9c,0x88,0xc3,0xff,0x3a,0xc7, - 0xdd,0x84,0x65,0xf6,0x14,0xc5,0x0d,0x8e,0x31,0xc3, - 0x80,0xb5,0x22,0xcf,0x23,0x6d,0xd6,0xc9,0x66,0x51, - 0x66,0x31,0xc7,0x10,0xec,0xb8,0x5a,0xc8,0xdf,0x23, - 0xcf,0x23,0xad,0xd9,0xc0,0x5e,0xc0,0x47,0x8e,0xb1, - 0xc3,0xb1,0x80,0x41,0x6c,0xc3,0xb0,0xe0,0xb5,0xc7, - 0x93,0xc0,0x51,0x11,0xe7,0xd2,0x8c,0xc7,0x81,0x87, - 0x9c,0x63,0x77,0x8f,0x39,0x91,0x04,0xdb,0xe3,0x0b, - 0xd2,0xbd,0x82,0x65,0x0a,0x88,0x88,0x48,0x05,0xe5, - 0x19,0x00,0xe8,0x87,0xa5,0xfb,0x2f,0x9d,0xd1,0x1c, - 0x8a,0x66,0x6d,0xec,0x6c,0xfe,0x81,0xb4,0x27,0x0d, - 0xb5,0xb7,0x41,0x5d,0xcf,0xfd,0x38,0xd5,0x0d,0xb0, - 0x88,0x74,0xbb,0xd0,0x39,0xee,0x4b,0xd8,0xce,0x70, - 0x1e,0xe6,0x05,0xb6,0x76,0x8e,0x3d,0x3f,0xe6,0x44, - 0x9a,0xe0,0x09,0x00,0x00,0x8c,0x8e,0x39,0x09,0x7c, - 0xbb,0xed,0x3d,0x6d,0x1e,0x65,0x16,0x73,0x6c,0x8c, - 0xbd,0xd7,0x86,0x14,0x2d,0x00,0x00,0xf0,0x3c,0xf0, - 0x03,0xe7,0xd8,0x6f,0x10,0xff,0x7b,0x79,0x22,0xbe, - 0x2c,0xc0,0x19,0xc0,0x9e,0xd8,0x91,0x9e,0xa2,0xf1, - 0x66,0x01,0x7c,0x85,0xf6,0x6c,0x08,0xf4,0xb6,0xa3, - 0x73,0xdc,0x45,0x58,0x2a,0xbb,0x88,0x88,0x54,0x50, - 0x56,0x01,0x80,0xa9,0x8e,0x31,0xbd,0x53,0xde,0x0f, - 0xa5,0xba,0xd5,0xdd,0xb7,0xc2,0xd2,0x2b,0x8b,0x10, - 0xdc,0x58,0x0a,0x8b,0xe4,0x6f,0x9b,0xf3,0x3c,0x44, - 0x62,0xba,0x12,0xdf,0xfb,0x50,0x77,0xa1,0xd1,0x3c, - 0x6c,0x8f,0x15,0xf7,0x0c,0x99,0x44,0x72,0xcd,0x94, - 0x3c,0x3c,0x0a,0xbc,0xe1,0x18,0x37,0x3a,0xe2,0x1c, - 0x3a,0x48,0xbf,0x08,0xfd,0x3c,0x56,0x47,0x25,0x16, - 0xcf,0x7c,0x3e,0xc4,0x9f,0x6e,0xdf,0x6e,0x67,0x03, - 0x37,0xa6,0x18,0xeb,0x09,0x76,0x34,0x63,0x7d,0xe0, - 0x3b,0xce,0xb1,0xc7,0xe3,0xdf,0x69,0x6f,0xb7,0x8b, - 0xb0,0x00,0x45,0xc8,0xbc,0xb4,0xff,0x7d,0x68,0x1e, - 0xfc,0x19,0x34,0x7f,0x89,0x39,0x11,0x11,0x11,0xc9, - 0x57,0x3b,0x03,0x00,0x3d,0x33,0x00,0x16,0x04,0x8e, - 0xcd,0xe8,0xb9,0x8b,0xe6,0x73,0xc0,0x55,0xe4,0x13, - 0xdd,0x6f,0x64,0x08,0x96,0x6d,0xb1,0x49,0xde,0x13, - 0x11,0x89,0x64,0x12,0xfe,0x22,0x74,0x79,0x1d,0x03, - 0xf0,0xa6,0xff,0x5f,0x8e,0xef,0x3d,0xb5,0x9d,0x3a, - 0xf1,0x2d,0x14,0x63,0xd6,0x01,0x58,0x13,0x3b,0xc3, - 0x9c,0xc6,0x50,0xac,0x70,0x6a,0x2c,0x9e,0x8c,0x84, - 0x5b,0xf0,0x2d,0x0a,0xf3,0xf2,0x6d,0xe0,0x7d,0xc7, - 0xb8,0x15,0xb0,0x62,0xbd,0x59,0xeb,0x07,0x9c,0x83, - 0xef,0x7a,0x64,0x1c,0xf0,0xf3,0x08,0x73,0xc8,0xca, - 0xdb,0xc0,0xf5,0xce,0xb1,0x5f,0x8b,0x39,0x91,0x3e, - 0x6c,0x85,0x2f,0x00,0xf9,0x08,0x76,0xc4,0x42,0x44, - 0x44,0x2a,0x2a,0xab,0x4a,0xb4,0x9e,0x54,0xbc,0x9e, - 0x19,0x00,0x87,0x51,0xcd,0xb3,0xe9,0xc3,0xb1,0x82, - 0x64,0xcd,0x2c,0xfe,0x27,0x02,0xcf,0x75,0x7d,0x4d, - 0xc4,0x8e,0x55,0x7c,0x84,0x5d,0x78,0xcf,0x8b,0x5d, - 0xc8,0x2e,0x05,0xac,0x84,0xb5,0x0d,0xf4,0x7c,0x90, - 0xf7,0x34,0x18,0xb8,0x14,0xbb,0x88,0x9e,0xd8,0xc4, - 0xfc,0x44,0x8a,0xee,0x42,0x7c,0x8b,0xfb,0xad,0xb0, - 0xdd,0xb0,0xc9,0x71,0xa7,0xf3,0x09,0xf3,0x03,0x5b, - 0x3a,0xc7,0x16,0x2d,0xfd,0xbf,0xdb,0x0d,0x58,0x2d, - 0x93,0x24,0xdd,0x75,0x00,0xfe,0x19,0xe1,0xf9,0xd3, - 0xa6,0xff,0x77,0xdb,0x8c,0x38,0x3b,0xf0,0xc3,0xf0, - 0xb5,0x28,0x2d,0x62,0xfa,0x7f,0x4f,0x13,0x80,0x83, - 0xf1,0x15,0x7d,0xfb,0x31,0xb6,0xcb,0xfd,0x74,0x86, - 0xcf,0x7f,0x08,0xbe,0xce,0x2c,0x53,0xb0,0xd4,0xff, - 0xa2,0xb7,0xbc,0x1d,0x83,0x75,0xf5,0x09,0xf9,0x32, - 0xf6,0xbe,0xe0,0x09,0xbe,0x64,0xc1,0x9b,0xfe,0xaf, - 0xdd,0x7f,0x11,0x91,0x8a,0xcb,0x2a,0x00,0xe0,0xd9, - 0xad,0xea,0x5e,0x14,0xcf,0x0d,0x1c,0x94,0xd1,0xf3, - 0x16,0xcd,0xcf,0xb0,0x45,0xba,0xd7,0xe3,0xc0,0x9f, - 0xb0,0x0b,0xeb,0xf1,0x29,0xee,0x37,0x08,0xd8,0x14, - 0x4b,0x21,0xdc,0x13,0xff,0x99,0xe6,0xc5,0xb0,0x22, - 0x4b,0x5f,0x4f,0xf1,0x5c,0xed,0x70,0x13,0xb0,0x7a, - 0x83,0xdb,0x0e,0xc4,0x5a,0x3f,0x86,0x1c,0x81,0xff, - 0x9c,0xf2,0x73,0xce,0x71,0x52,0x2e,0x7f,0x07,0xde, - 0xc3,0xda,0x66,0x26,0x19,0x8c,0x1d,0x89,0xb9,0x24, - 0xfa,0x8c,0xe6,0xd8,0x01,0x5f,0x3b,0xcb,0x97,0x80, - 0xbb,0xe2,0x4e,0xa5,0x69,0x37,0x61,0xc5,0xe3,0x42, - 0x3b,0xb5,0xa3,0x89,0x13,0x00,0x68,0xb6,0xed,0xe4, - 0xe6,0x58,0xda,0x78,0xd6,0x46,0xe3,0xcb,0x76,0xf8, - 0x47,0x84,0xe7,0xce,0xda,0x85,0xd8,0x02,0xf1,0xab, - 0x81,0x71,0x03,0xb1,0xdd,0xfa,0xd1,0x19,0x3d,0xef, - 0x12,0xc0,0x4f,0x9d,0x63,0x7f,0x4c,0xb6,0x81,0x87, - 0x58,0xfe,0x8e,0xb5,0xfa,0x0b,0x75,0x4e,0x18,0x04, - 0xec,0x84,0x5d,0x03,0xc4,0x36,0x00,0xd8,0xc6,0x31, - 0x6e,0x16,0xd6,0x52,0xb7,0x88,0xee,0x26,0xbf,0xf6, - 0x89,0xeb,0x02,0x6b,0x38,0xc7,0x76,0x52,0xac,0x02, - 0xae,0x22,0x22,0x9f,0x92,0xd5,0x9b,0xe9,0x4c,0xc7, - 0x98,0x81,0xd8,0xc5,0xd2,0xd7,0x68,0xdc,0x8b,0x7b, - 0x02,0xf6,0xe1,0x73,0x0b,0xd6,0x36,0xe9,0x1d,0xec, - 0x82,0x73,0x20,0xb6,0xbb,0xbe,0x14,0xb6,0x50,0x7c, - 0xa7,0xc5,0xf9,0xc6,0x30,0x12,0xd8,0xc7,0x39,0xf6, - 0x2d,0x6c,0x51,0x7b,0x15,0xcd,0x15,0xda,0x99,0x86, - 0x5d,0x8c,0xdf,0x84,0xf5,0xa0,0x3e,0x14,0x4b,0xcd, - 0xf4,0x2c,0x30,0xf6,0x00,0x4e,0x23,0xce,0x05,0x7a, - 0xb3,0x26,0x61,0x05,0x13,0xfb,0xe2,0xcd,0x56,0x78, - 0x35,0xe1,0x31,0xa4,0x1e,0xa6,0x03,0x57,0x00,0xfb, - 0x3a,0xc6,0xee,0x4c,0x7b,0x03,0x00,0xde,0xf4,0xff, - 0x0b,0x28,0x6e,0xf1,0xad,0x77,0x81,0x07,0x09,0xa7, - 0xd4,0x8f,0xc6,0x7a,0xa2,0x67,0x69,0x20,0xc9,0x47, - 0x98,0x9e,0x00,0x56,0x6b,0x70,0xdb,0x46,0x58,0xd0, - 0x27,0xeb,0x63,0x15,0x9e,0xf3,0xff,0x8f,0x61,0x9f, - 0x6b,0x65,0xb0,0x3f,0x76,0x84,0x23,0x54,0x88,0x6f, - 0x53,0xac,0x83,0xc0,0x98,0x0c,0x9e,0xf3,0xb7,0x58, - 0x36,0x4e,0xc8,0x6d,0xc0,0xe9,0x19,0x3c,0x5f,0x3b, - 0xcc,0xc0,0xb2,0x24,0x0e,0x75,0x8c,0xdd,0x9d,0xf6, - 0x04,0x00,0x36,0xc7,0x97,0x75,0x79,0x2b,0xf0,0x7a, - 0xe4,0xb9,0x34,0xeb,0x02,0xf2,0x69,0x4d,0xb8,0x34, - 0xf0,0x70,0x8a,0xf1,0x27,0xa5,0x1c,0x2f,0x22,0xd2, - 0x76,0x59,0xd5,0x00,0xf0,0x04,0x00,0xc0,0x2e,0xc2, - 0xf6,0xee,0xe3,0xdf,0x27,0x63,0x1f,0x96,0xa3,0xb0, - 0x9d,0xdc,0x1b,0xb1,0x36,0x34,0x1f,0x63,0x17,0x6d, - 0x93,0x98,0xb3,0x33,0x76,0x26,0xb6,0x80,0x2e,0x9a, - 0x7d,0xf1,0x05,0x54,0x9e,0x03,0xd6,0xc3,0x8a,0x96, - 0x65,0x71,0xa1,0xff,0x3e,0x70,0x1c,0xd6,0x8a,0xea, - 0x05,0xe7,0x7d,0x7e,0x98,0xc1,0xf3,0x8a,0x14,0x91, - 0xf7,0x02,0xf1,0xcb,0xf4,0xdd,0x9a,0x34,0x86,0x05, - 0xa9,0x4e,0xf1,0x2d,0x4f,0x96,0x4d,0x8c,0x3a,0x00, - 0x1b,0xf1,0xe9,0x42,0xb2,0x3d,0x9d,0x91,0x70,0xdb, - 0x20,0xac,0x36,0x4b,0xd6,0x3c,0x47,0x12,0x8a,0x9e, - 0xfe,0xdf,0xd3,0xdb,0xc0,0x7e,0xce,0xb1,0xbf,0x24, - 0x7d,0x3d,0x86,0xde,0xb6,0xc1,0x76,0xc0,0x43,0x3e, - 0x00,0xbe,0x45,0x71,0x03,0x63,0x7d,0x19,0xe3,0x1c, - 0x37,0x1a,0x58,0x34,0xde,0x34,0xfe,0xcb,0x73,0x24, - 0x01,0xf2,0x59,0x60,0x17,0xd9,0x00,0xe0,0x32,0x6c, - 0x03,0xca,0xe3,0x4e,0x6c,0x53,0x46,0x44,0xa4,0xd0, - 0xb2,0x0a,0x00,0x78,0x0b,0x1c,0xad,0xc2,0xa7,0x2f, - 0xc4,0xfe,0x83,0x2d,0x88,0x7f,0x8b,0xed,0xe0,0x95, - 0xd5,0x2e,0x8e,0x31,0x33,0x80,0xdd,0xb0,0xff,0xe7, - 0xac,0x3d,0x8c,0x5d,0x90,0xbe,0xe6,0x18,0xbb,0x23, - 0xb6,0x28,0x11,0xa9,0x9a,0xbb,0x80,0x97,0x1d,0xe3, - 0xe6,0xc6,0xdf,0x92,0xaf,0x55,0x3b,0xe1,0x0b,0x0e, - 0x3e,0x00,0x3c,0x13,0x79,0x2e,0xad,0xf2,0x04,0x00, - 0xba,0xeb,0x00,0x64,0x29,0x29,0x80,0x32,0x1d,0x5b, - 0xb8,0x24,0xb5,0xa3,0xdd,0x2c,0xdb,0xe9,0xb0,0x08, - 0xb0,0xaa,0x63,0x5c,0x19,0xd2,0xff,0x7b,0xfa,0x2b, - 0xbe,0xc5,0xeb,0x82,0xc0,0x29,0x2d,0x3c,0xcf,0xdc, - 0x24,0x07,0x6d,0x7a,0x3a,0x14,0xdf,0xef,0x74,0x91, - 0x3c,0x82,0x65,0x7f,0x84,0xf4,0xc3,0x9f,0x1d,0xd4, - 0xac,0x0e,0xac,0xed,0x60,0xc8,0x47,0x58,0x56,0xa2, - 0xcc,0x71,0x32,0xfe,0x22,0xa2,0x13,0xb1,0xeb,0xbb, - 0xa2,0xd7,0xa8,0x10,0x11,0xc9,0x2c,0x00,0xe0,0x8d, - 0xcc,0xf7,0xae,0x7a,0xfb,0x26,0x76,0x61,0x96,0xe6, - 0xfc,0x7b,0x11,0x2d,0x89,0x55,0x48,0x0e,0xb9,0x1c, - 0xf8,0x57,0xc4,0x79,0xbc,0x84,0xaf,0xb2,0x70,0x7f, - 0x7c,0x3b,0x2f,0x22,0x65,0xd3,0x89,0xff,0x0c,0x6b, - 0xbb,0xba,0x01,0x78,0x2f,0xf0,0x8b,0x5a,0xfc,0xaf, - 0xa7,0x71,0xd8,0x51,0x80,0x90,0xd1,0x19,0x3f,0x6f, - 0x52,0x00,0xe0,0x11,0x6c,0xf1,0x92,0xf4,0xde,0x9a, - 0x75,0x0f,0x7b,0xcf,0xe3,0xbd,0x0f,0xdc,0x9b,0xf1, - 0xf3,0xb6,0x83,0x77,0xc1,0xbd,0x17,0x76,0x1c,0xa0, - 0x19,0xc7,0x62,0xc7,0xe6,0x42,0xae,0x01,0xce,0x6b, - 0xf2,0x39,0xf2,0x36,0xc6,0x39,0x2e,0x76,0x37,0x80, - 0x0d,0xb1,0xfa,0x3f,0x21,0xd7,0x60,0xbf,0x47,0x62, - 0x76,0xc0,0x0a,0x56,0x7b,0xcc,0xc6,0x6a,0x2b,0x15, - 0xf5,0xf8,0x84,0x88,0xc8,0x27,0x64,0x15,0x00,0x98, - 0xed,0x1c,0xb7,0x7f,0x8f,0x3f,0x77,0x62,0xe7,0xd1, - 0x5f,0xcc,0x68,0x0e,0x79,0x6a,0x54,0xc0,0xae,0xb7, - 0x76,0x9c,0x39,0xbe,0x13,0xb8,0xda,0x31,0xae,0xd9, - 0x82,0x5a,0x22,0x45,0x77,0xa1,0x73,0xdc,0x36,0xc4, - 0x6f,0xd7,0xb9,0x30,0xbe,0xc5,0xf0,0x74,0xda,0x5b, - 0x93,0xa0,0x59,0xb3,0x81,0x9b,0x1d,0xe3,0x46,0x67, - 0xf8,0x9c,0xf3,0x61,0x59,0x62,0x8d,0xdc,0xd7,0xf5, - 0xdf,0x07,0x12,0xc6,0xac,0x47,0xb6,0x47,0x3e,0x3c, - 0x01,0x80,0x9b,0xf1,0x1f,0x8f,0x2b,0x92,0x49,0xf8, - 0x53,0xee,0xcf,0xc1,0x57,0x7b,0xa6,0xa7,0x55,0x81, - 0xc3,0x1d,0xe3,0xde,0x02,0xbe,0x93,0xf2,0xb1,0x8b, - 0xe4,0x42,0x7c,0xaf,0xff,0x06,0xd8,0xf1,0xc7,0x58, - 0x54,0xfd,0x3f,0xbd,0x91,0xc0,0x9f,0x53,0x8c,0x3f, - 0x01,0xdf,0xfb,0xa2,0x88,0x48,0x21,0x64,0x15,0x00, - 0xf0,0xa6,0x3c,0xf5,0x3c,0xc3,0xf9,0x27,0xac,0xe0, - 0x4c,0x15,0x2c,0xe7,0x1c,0xd7,0xae,0x0a,0xc6,0x8d, - 0x8a,0x0a,0xbd,0x83,0xed,0x92,0x5d,0x85,0xed,0x9a, - 0x89,0x54,0xd1,0xe3,0x5d,0x5f,0x21,0x43,0xb1,0x5a, - 0x00,0x31,0xed,0x8c,0xef,0x3c,0xfc,0xf5,0xf8,0x76, - 0xd6,0x8b,0xa0,0xdd,0x75,0x00,0x46,0x07,0x1e,0xab, - 0x3b,0x00,0x30,0x2e,0x61,0xcc,0x00,0x92,0x8b,0x08, - 0xa6,0x55,0xb5,0xf3,0xff,0xbd,0xdd,0x86,0x2f,0x45, - 0x7f,0x25,0xac,0x3a,0xbf,0x57,0x07,0x70,0x36,0xf6, - 0x7a,0x84,0xec,0x47,0xb9,0x5b,0xd6,0x4e,0xc4,0x7f, - 0x04,0x24,0x66,0x16,0x80,0xe7,0xfc,0xff,0x1b,0x58, - 0xf1,0x65,0xb1,0x80,0xd6,0x65,0x34,0x2e,0x56,0xdd, - 0xdb,0x6d,0x58,0x1d,0x26,0x11,0x91,0xd2,0xc8,0x2a, - 0x00,0x90,0xd6,0x54,0x2c,0x05,0xb0,0x2a,0xbc,0x1f, - 0x14,0xed,0x2a,0x5e,0x78,0x0b,0x76,0x76,0xed,0x20, - 0xac,0xdd,0xd9,0x6a,0x58,0xa5,0xe5,0x85,0xb0,0x76, - 0x36,0x5f,0x05,0x4e,0x6c,0xd3,0x5c,0x44,0xf2,0xe0, - 0xcd,0x02,0xf0,0xd4,0xee,0x68,0xc5,0xae,0xce,0x71, - 0x65,0xda,0x7d,0xbb,0xd1,0x31,0x26,0xcb,0x3a,0x00, - 0xa1,0x6c,0xa5,0xee,0x34,0xfb,0xa4,0x0c,0x00,0xc8, - 0xae,0x0e,0xc0,0x48,0x60,0xd9,0xc0,0x98,0x4e,0xfc, - 0x6d,0x49,0x8b,0xea,0xc7,0xf8,0x6a,0x52,0x1c,0x89, - 0xef,0x08,0x1c,0x58,0x11,0xe0,0x8d,0x1d,0xe3,0xce, - 0xc3,0x52,0xd2,0xcb,0x6e,0x8c,0x73,0x5c,0xac,0x00, - 0xc0,0xaa,0xf8,0x5e,0x9b,0x8b,0xd1,0xd9,0xf5,0x6e, - 0xa7,0x90,0x9c,0x71,0xd4,0xd3,0x1b,0x58,0x27,0x07, - 0x6f,0x16,0x6c,0x19,0x0c,0xca,0x7b,0x02,0x12,0x5d, - 0xda,0xac,0x2d,0xa9,0xa0,0xbc,0x7a,0xaa,0x5e,0x8a, - 0xaf,0x58,0x5d,0x59,0x0c,0x76,0x8e,0x9b,0x17,0xeb, - 0x53,0x1e,0xdb,0x54,0xd2,0xed,0xca,0x88,0x54,0xcd, - 0xc5,0x58,0x90,0xab,0x23,0x30,0x6e,0x1b,0xe2,0xb4, - 0x88,0x03,0x3b,0x77,0xeb,0xd9,0x75,0x7e,0x07,0xcb, - 0x00,0x28,0x8b,0xd7,0x81,0x47,0x09,0xf7,0xc5,0x1e, - 0x4d,0x36,0xed,0x46,0x93,0x76,0xdb,0x5f,0xc5,0x3a, - 0xc6,0x80,0x9d,0x5b,0x7f,0x83,0xc6,0x55,0xd5,0xb3, - 0xaa,0x03,0xe0,0xd9,0xfd,0x7f,0xb8,0x6b,0x2e,0x65, - 0xf6,0x31,0xf0,0x4d,0xac,0xff,0x7a,0x52,0x06,0xc6, - 0x20,0x6c,0x57,0x3f,0xf4,0x7d,0x59,0x08,0x0b,0x4c, - 0x87,0xbc,0x82,0xaf,0x85,0x5e,0x19,0x5c,0x87,0xfd, - 0x7e,0x87,0x8a,0xee,0xae,0x0a,0x7c,0x16,0x5f,0xe1, - 0xc0,0x34,0xbc,0xe9,0xff,0xaa,0xfe,0x6f,0x76,0x02, - 0x0e,0x71,0x8e,0x9d,0x85,0x05,0x6e,0xde,0x8c,0x37, - 0x9d,0x5c,0x78,0x37,0xb4,0xa4,0xbc,0x3c,0x2d,0x41, - 0xcb,0x64,0x38,0xf6,0xf9,0xbe,0x1e,0xf6,0x3e,0xba, - 0x34,0x76,0x1d,0x30,0x14,0xfb,0xec,0x9a,0x84,0xd5, - 0xe4,0x99,0x08,0x3c,0x85,0xb5,0x99,0x7f,0x02,0xcb, - 0x1e,0xfc,0x20,0x87,0xf9,0x16,0x42,0x5e,0x19,0x00, - 0xe7,0xe6,0xf4,0xbc,0xb1,0x78,0x0b,0xe7,0x84,0x2e, - 0x98,0x45,0x24,0x1b,0x2f,0x63,0x1d,0x01,0x42,0xe6, - 0x05,0xb6,0x8c,0x34,0x87,0x5d,0xf0,0xbd,0xc7,0x5e, - 0x4a,0xf9,0x3a,0xa0,0x78,0x76,0xb7,0x47,0x67,0xf0, - 0x3c,0x8b,0x01,0x9f,0x49,0xb8,0xfd,0xce,0x5e,0x7f, - 0x4f,0x3a,0x06,0xb0,0x16,0xd9,0x5c,0xf8,0x78,0x02, - 0x09,0x65,0x4e,0xff,0xef,0xe9,0x7e,0x7c,0x8b,0xf6, - 0xcd,0x81,0x6f,0x04,0xc6,0x9c,0x42,0x78,0x21,0xdc, - 0x89,0x15,0x17,0xac,0xca,0x45,0xd9,0x74,0xfc,0x45, - 0x49,0x63,0x64,0x01,0x78,0x02,0x00,0xff,0x06,0x1e, - 0x8a,0xf0,0xdc,0x65,0x33,0x8a,0xc6,0xc7,0x27,0xfb, - 0xf2,0x13,0x60,0x6c,0x9c,0xa9,0xe4,0xca,0xf3,0x1e, - 0xa9,0x6c,0x91,0xe2,0xf2,0xbc,0x36,0x55,0x08,0x00, - 0x0c,0xc1,0x02,0xd4,0x63,0xb1,0x85,0xfd,0xe5,0x58, - 0x8b,0xf3,0xad,0xb0,0x6b,0x86,0xe1,0x58,0x70,0xba, - 0x7f,0xd7,0x9f,0x47,0x61,0x05,0x51,0xbf,0x85,0x7d, - 0x16,0xfd,0x03,0x3b,0x76,0xf9,0x2f,0xe0,0x78,0xac, - 0xd5,0x70,0xbb,0xd7,0xc4,0xfd,0xb1,0xd6,0xf6,0xb9, - 0xc8,0x23,0x00,0xf0,0x1a,0xe5,0xac,0x8c,0x9c,0xc4, - 0x7b,0x76,0x77,0x8f,0xa8,0xb3,0x10,0x91,0x9e,0xbc, - 0xbb,0x5a,0xb1,0x8e,0x01,0x78,0xab,0xff,0x97,0x29, - 0xfd,0xbf,0x5b,0xbb,0xea,0x00,0x84,0xd2,0xff,0x7b, - 0x07,0x00,0xee,0xeb,0x73,0x94,0xe9,0x47,0xf3,0x55, - 0xeb,0x7b,0xf2,0x04,0x00,0xca,0xd6,0xfe,0x2f,0xc9, - 0x71,0x58,0xc6,0x47,0xc8,0xaf,0x68,0xdc,0x2f,0xfd, - 0x0b,0xd8,0xc2,0x3e,0xe4,0x74,0xec,0x4c,0x75,0x95, - 0x78,0xbb,0x18,0xec,0x46,0x38,0x63,0x29,0x8d,0xa5, - 0x81,0xb5,0x1d,0xe3,0xb4,0xfb,0x6f,0x0b,0x85,0xcb, - 0xf1,0x2f,0x8c,0x6e,0x04,0x7e,0x1e,0x6f,0x3a,0xb9, - 0x0a,0x1d,0x6f,0x82,0xf6,0x64,0xb2,0x4a,0x73,0x3c, - 0xc1,0xd3,0x98,0x45,0x47,0x63,0x1b,0x8c,0x2d,0xf4, - 0x5f,0xc2,0x8e,0x58,0x6d,0x4a,0xf3,0xd7,0x19,0x73, - 0x61,0xef,0x91,0x47,0x63,0xeb,0xd2,0x57,0x81,0xdf, - 0x61,0xc7,0x05,0x63,0xaf,0x8f,0x97,0xc6,0x3e,0xeb, - 0x0e,0x88,0xfc,0x3c,0x0d,0xe5,0x11,0x00,0xb8,0x19, - 0x7f,0xdb,0xc0,0xb2,0x78,0xd2,0x39,0x6e,0x57,0xb2, - 0xef,0x47,0x2d,0x22,0x7d,0xbb,0x02,0xdf,0xce,0xfa, - 0x76,0x64,0x7f,0x26,0x6e,0x29,0x2c,0xa2,0x1c,0xf2, - 0x0c,0xb6,0xcb,0x5a,0x36,0xf7,0x00,0x1f,0x06,0xc6, - 0x64,0x51,0x07,0x20,0x94,0x56,0x7e,0x47,0xe0,0xef, - 0xbd,0xb5,0xfa,0xfe,0xfb,0x19,0x1a,0x1f,0x31,0xe8, - 0xf6,0x2e,0xe5,0x7c,0x4d,0x1b,0x99,0x0e,0xec,0x49, - 0xf8,0x77,0x69,0x04,0xf0,0x8b,0x3e,0xfe,0x7d,0x00, - 0x70,0x96,0xe3,0x79,0x9e,0xa6,0x9a,0x47,0xd7,0xfe, - 0x89,0xef,0x1a,0x61,0x24,0xbe,0xf7,0x0c,0x2f,0x4f, - 0xf1,0xbf,0x4e,0xfc,0xf5,0x52,0xaa,0xec,0x54,0x7c, - 0xc1,0x12,0x80,0x09,0x58,0xb6,0x4b,0xd5,0xae,0x63, - 0xc1,0x76,0x55,0x57,0x73,0x8c,0x7b,0x27,0xf6,0x44, - 0xa4,0x69,0x9e,0x0d,0x49,0x6f,0x8d,0x8b,0xa2,0xf9, - 0x12,0x96,0xba,0x7f,0x32,0xd6,0x61,0x29,0x6b,0x8b, - 0x01,0x07,0x62,0x0b,0xf3,0x57,0x81,0x5f,0x93,0xfd, - 0xf7,0x6a,0x2e,0x60,0x5f,0x2c,0xa8,0x9e,0x65,0x61, - 0xe2,0xa6,0x26,0xd2,0x6e,0xbd,0x77,0x6c,0xaa,0xe0, - 0x61,0x7c,0x0b,0x8d,0x0e,0xac,0x02,0x7f,0x96,0x1f, - 0xf2,0x22,0xd2,0xb7,0xf7,0xf0,0xa5,0x62,0xcf,0x87, - 0x7d,0xb0,0x64,0x69,0x57,0x7c,0xbb,0x79,0x65,0xdc, - 0xfd,0x07,0x98,0x81,0x6f,0xa7,0x76,0x74,0x8b,0xcf, - 0x93,0x14,0x00,0x78,0x13,0x18,0xdf,0xeb,0xdf,0x1e, - 0x24,0xf9,0x48,0x56,0xab,0x75,0x00,0x3c,0xf7,0xbf, - 0x91,0x6a,0x15,0x05,0x03,0x3b,0x9b,0xfe,0x13,0xc7, - 0xb8,0xbd,0xf9,0xf4,0x45,0xcd,0x11,0x24,0x1f,0xe3, - 0x00,0x6b,0x97,0xb7,0x27,0x30,0x25,0xfd,0xd4,0x4a, - 0xc1,0x9b,0x05,0xb0,0x7b,0x86,0xcf,0xe9,0x49,0xff, - 0xbf,0x13,0x3b,0x2e,0x55,0x67,0xbb,0x62,0x17,0xfd, - 0x1e,0x33,0xb1,0x4c,0x8d,0x76,0x15,0x74,0x6e,0xb7, - 0x75,0xf0,0xd5,0x06,0x6b,0x57,0x47,0x2b,0x49,0xef, - 0x59,0xc7,0x98,0x75,0x28,0x5f,0x21,0xc0,0x5f,0x61, - 0x99,0x87,0xde,0xae,0x6b,0xad,0x5a,0x0c,0xf8,0x1e, - 0x76,0xac,0x70,0x3c,0x70,0x0c,0xb0,0x4a,0x0b,0x8f, - 0xd7,0x01,0x6c,0x8f,0x5d,0xa3,0xfc,0x9e,0x02,0xd4, - 0xda,0xc8,0x23,0x00,0x50,0xc5,0xb3,0x66,0x1f,0xe1, - 0x3f,0xf3,0x39,0x3f,0x76,0x66,0xe5,0x28,0xca,0xf7, - 0x0b,0x28,0x52,0x36,0x79,0x75,0x03,0xf0,0xa4,0xff, - 0x77,0x52,0xee,0xf4,0xdb,0xd8,0x75,0x00,0x56,0x06, - 0x96,0x4c,0xb8,0x7d,0x6c,0x1f,0xff,0x36,0x13,0xcb, - 0x4e,0x68,0x64,0x75,0xc2,0xe7,0xd0,0x93,0x78,0x0a, - 0x00,0x56,0x29,0xfd,0xbf,0xa7,0x53,0x48,0x3e,0x62, - 0x01,0x73,0xda,0xfc,0x75,0x7f,0xb6,0x2d,0x8b,0xa5, - 0x57,0x86,0x9c,0x48,0x72,0xfd,0x86,0xb2,0xfb,0x0b, - 0xbe,0xb3,0xb9,0xbb,0x90,0x4d,0xfb,0xcc,0x05,0xf1, - 0xed,0x2e,0x95,0xf9,0xfd,0x27,0x0b,0x2b,0x00,0x7f, - 0x48,0x31,0xfe,0x28,0xac,0x28,0x66,0x55,0xed,0xe9, - 0x1c,0x57,0xe5,0xef,0x41,0xd9,0x25,0x7d,0xfe,0x75, - 0x9b,0x17,0x7f,0x81,0xd0,0xa2,0x38,0x9c,0x6c,0x8f, - 0x48,0xa5,0xb1,0x12,0xf0,0x53,0xac,0x5e,0xca,0x33, - 0x58,0x66,0xc0,0xb6,0x58,0x61,0xdb,0x90,0x55,0xb1, - 0xcf,0xc0,0xf1,0xc0,0xb5,0xf8,0x33,0x8d,0xa2,0x6b, - 0x77,0x00,0x60,0x16,0x56,0x81,0xb1,0x8a,0x3c,0x29, - 0x8e,0xdd,0x06,0x02,0x27,0x00,0xcf,0x61,0x11,0xa6, - 0x56,0x2e,0x48,0x45,0xa4,0xb1,0xeb,0xb0,0x0a,0xb0, - 0x21,0xdb,0xe3,0xeb,0x4d,0xee,0xb1,0x2c,0xbe,0xb4, - 0xb1,0xbb,0xb0,0x73,0x6c,0x65,0x15,0xbb,0x0e,0x40, - 0x68,0xb1,0x3d,0xb6,0xc1,0xbf,0x27,0x1d,0x03,0xe8, - 0xa0,0xf9,0x63,0x00,0x73,0x11,0xae,0x21,0x30,0x9b, - 0xf2,0xb7,0xff,0x6b,0x64,0x16,0x56,0x74,0xe9,0xe3, - 0xc0,0xb8,0xcf,0x60,0xbb,0xfe,0x60,0xe7,0x29,0x87, - 0x04,0xc6,0x3f,0x84,0x15,0x61,0xaa,0xb2,0x37,0xf0, - 0xb5,0xcf,0x5c,0x98,0x70,0xdd,0x0b,0x8f,0xed,0x08, - 0xff,0xde,0x4d,0xc5,0xce,0xbd,0xd7,0xd5,0x60,0xe0, - 0x32,0x6c,0x31,0xe4,0x71,0x3d,0x16,0x04,0xab,0xaa, - 0x61,0xf8,0x32,0x50,0x9e,0x42,0x59,0x23,0x45,0x76, - 0x17,0xbe,0xae,0x46,0xb9,0x9d,0x3d,0x2f,0xb9,0x15, - 0xb0,0x75,0xdb,0xdf,0xb0,0x4c,0xa0,0x67,0xb1,0x85, - 0xfd,0xb9,0x58,0x5d,0x90,0x93,0x81,0x73,0xb0,0x76, - 0xec,0x13,0xb1,0x23,0x0b,0xc7,0x03,0x2b,0xe6,0x31, - 0xd9,0x24,0xed,0x0e,0x00,0xbc,0x0e,0x4c,0x6b,0xf3, - 0x73,0xb6,0xcb,0x4d,0x5d,0x5f,0x69,0x2c,0x85,0x45, - 0x92,0x5e,0xc7,0x32,0x08,0xf6,0x03,0x96,0xc8,0x78, - 0x5e,0x22,0x75,0x36,0x15,0xb8,0xd2,0x31,0x6e,0x7e, - 0xb2,0xb9,0xf0,0x06,0x7f,0xf1,0xbf,0xf3,0x33,0x7a, - 0xbe,0xbc,0xbc,0x44,0x38,0x15,0xb4,0x95,0x3a,0x00, - 0xa1,0xd7,0xe3,0xf6,0x06,0xff,0x3e,0x36,0x70,0xbf, - 0x66,0x03,0x00,0x6b,0x03,0x0b,0x04,0xc6,0xfc,0x93, - 0xea,0xa6,0x07,0x83,0x5d,0xec,0xfc,0xd0,0x31,0xee, - 0x68,0xec,0x3c,0xff,0x97,0x03,0xe3,0xa6,0x61,0xbb, - 0x8e,0x33,0x5a,0x9c,0x57,0x19,0x78,0x8f,0x01,0x64, - 0xd1,0x0d,0xc0,0xb3,0xbb,0x77,0x1d,0xd5,0xe9,0xb6, - 0xd0,0x8c,0xdf,0x00,0x6b,0x3a,0xc7,0xbe,0x8c,0xfd, - 0x9c,0x56,0xf1,0xdc,0x7f,0xb7,0x5f,0x63,0x6d,0xd3, - 0x42,0x72,0xab,0x5a,0x2e,0x2e,0x1f,0x60,0x9d,0x85, - 0x42,0x36,0xa5,0x7a,0x85,0xc9,0x67,0x61,0x1b,0xab, - 0x37,0x61,0xdf,0x83,0x31,0xd8,0xf5,0xdf,0xad,0xd8, - 0xce,0x7d,0x8c,0xee,0x15,0xcb,0x63,0x1b,0x48,0xfb, - 0x00,0xff,0x0f,0xfb,0x7c,0xdc,0x0f,0xdb,0xc0,0x18, - 0x11,0xe1,0xf9,0x32,0xd3,0xee,0x00,0x40,0xd5,0xa3, - 0x86,0xfb,0xd0,0x5c,0x71,0x94,0x01,0xd8,0x85,0xd2, - 0x39,0x58,0xe1,0x89,0x47,0xb1,0x48,0xf3,0x97,0x80, - 0xb9,0x33,0x9b,0x9d,0x48,0x3d,0xb5,0xfb,0x18,0x80, - 0x27,0x00,0x30,0x15,0x2b,0x52,0x58,0x76,0xb1,0x8e, - 0x01,0xf4,0x0b,0xdc,0xef,0x75,0x1a,0x07,0x1f,0x62, - 0xd5,0x01,0xa8,0x5b,0xf5,0xff,0x46,0xce,0xc4,0x76, - 0x37,0x92,0x0c,0xc6,0xd2,0xfa,0x43,0x8e,0xc2,0x5f, - 0x44,0xb7,0xec,0xae,0xc5,0x57,0x3d,0x7d,0x47,0xec, - 0xfb,0xd7,0xac,0xa1,0xf8,0x6a,0x9a,0x94,0xb5,0xfe, - 0x48,0x16,0x76,0xc7,0x2e,0xd2,0x3d,0x66,0x60,0x75, - 0x02,0xbc,0xdd,0x9e,0xca,0x68,0x77,0xac,0x3d,0x5a, - 0xc8,0x44,0xfc,0x81,0x2c,0xc9,0xcf,0x69,0xf8,0xea, - 0xd0,0xfc,0x0e,0x3b,0x6a,0x57,0x66,0xef,0x62,0x67, - 0xea,0xb7,0xc2,0x02,0xf4,0x2b,0x60,0xad,0x9d,0x77, - 0xc3,0x7e,0xa6,0x77,0xc6,0x36,0x13,0x56,0xc2,0xde, - 0x1b,0xd7,0xc0,0xb2,0x1f,0x2e,0xc3,0x7e,0x9e,0x6b, - 0xab,0xdd,0x01,0x80,0x2a,0xef,0x8c,0x00,0xbc,0x82, - 0x2d,0x22,0x3c,0xe9,0x37,0x49,0x3e,0x0b,0xfc,0x00, - 0x4b,0x19,0x7c,0x0f,0x4b,0xe9,0x39,0x1e,0xbb,0x00, - 0x6d,0xe5,0xc2,0x40,0xa4,0x8e,0x6e,0xc7,0xda,0x8f, - 0x86,0x7c,0x05,0x5f,0x01,0xa4,0x24,0x2b,0xe2,0xdb, - 0x55,0xba,0x96,0x6a,0xec,0xbe,0xc5,0x0a,0x00,0xac, - 0x43,0x72,0x91,0x9c,0xb1,0x09,0xb7,0xcd,0x20,0xb9, - 0xd5,0xec,0xca,0x84,0x2b,0xf9,0xf7,0xc5,0x73,0xfe, - 0xdf,0x5b,0x0b,0xa6,0xcc,0x3a,0xb1,0x62,0x7f,0xad, - 0xfe,0xfc,0xde,0x89,0xed,0x3a,0xd6,0xc5,0x34,0x7c, - 0x3b,0x73,0xf3,0x01,0xdb,0xb4,0xf0,0x3c,0x5b,0x11, - 0xbe,0x4e,0x78,0x87,0x7a,0x04,0xab,0xfa,0xb2,0x12, - 0xb6,0xd9,0xe2,0xf5,0x23,0xe0,0x81,0x48,0x73,0x29, - 0x82,0x43,0xf1,0x07,0x83,0x0e,0x21,0xdc,0xfd,0x45, - 0xf2,0xf7,0x08,0x70,0x86,0x63,0xdc,0x30,0xac,0x66, - 0xc0,0x17,0xe2,0x4e,0x27,0x8a,0x09,0xc0,0x41,0x58, - 0x9d,0xa0,0xef,0x60,0xeb,0xa5,0xd0,0xcf,0xe6,0x34, - 0xac,0xa0,0xed,0xd9,0xd8,0x46,0xcd,0x22,0xc0,0x06, - 0x58,0xf7,0x9a,0xe7,0xa3,0xcd,0x34,0x59,0x6e,0xb5, - 0x6f,0xda,0x1d,0x00,0xa8,0x43,0xef,0xd0,0xdb,0xb1, - 0xf6,0x3b,0x49,0x3b,0x50,0x69,0x0c,0xc4,0xce,0xd1, - 0x1e,0x8d,0xa5,0xb1,0xbc,0x8f,0xed,0xbe,0xfc,0x08, - 0x0b,0x14,0x88,0x48,0xb2,0xd9,0xc0,0x25,0x8e,0x71, - 0xc3,0xf1,0x2d,0xf2,0x92,0xd4,0x25,0xfd,0xbf,0xdb, - 0x1d,0x84,0x03,0x9e,0xcd,0xd4,0x01,0x68,0x36,0xfd, - 0xbf,0x5b,0xa8,0x1d,0x60,0xda,0x2c,0x80,0xee,0xf7, - 0xe1,0x24,0x6f,0x61,0xd9,0x07,0x75,0xf0,0x0a,0xb6, - 0x18,0x68,0xd6,0x87,0xc0,0x5e,0x54,0xaf,0x5b,0x42, - 0xc8,0x18,0xe7,0xb8,0x56,0xba,0x01,0x78,0xda,0xff, - 0x5d,0x4a,0x3d,0x8e,0x5d,0xf4,0x36,0x04,0xab,0x7b, - 0x30,0x8f,0x73,0xfc,0x35,0x54,0x37,0x48,0xb5,0x21, - 0x76,0x2d,0x79,0x1a,0xbe,0xb5,0xc0,0x25,0xf8,0x02, - 0x58,0x52,0x0c,0x47,0xe2,0xab,0xb9,0x36,0x1c,0x5b, - 0x5b,0xfc,0x11,0x6b,0x45,0x5a,0x74,0x33,0xb0,0x82, - 0x7c,0x2b,0x62,0xd9,0x68,0xad,0x76,0x8e,0x19,0x87, - 0xad,0xa7,0x96,0xc7,0x8e,0x2b,0x9e,0x04,0xbc,0xd0, - 0xe2,0x63,0x7a,0x4c,0x03,0x8e,0x03,0x3e,0xdf,0x86, - 0xe7,0xea,0x53,0xbb,0x03,0x00,0x59,0x2d,0x8a,0x8b, - 0xee,0x46,0xec,0x45,0x7d,0x29,0xc2,0x63,0x0f,0xc2, - 0x16,0x29,0x27,0x61,0x47,0x05,0x5e,0xc6,0x22,0x7d, - 0x9b,0x91,0x4f,0x57,0x07,0x91,0x32,0xf0,0x56,0xbb, - 0xde,0xb9,0xc5,0xe7,0xf1,0x04,0x00,0xde,0xc4,0x57, - 0x10,0xac,0x0c,0xa6,0x10,0x5e,0x6c,0x37,0x53,0x07, - 0xa0,0xd5,0x00,0xc0,0xd8,0xc0,0xed,0x69,0xeb,0x00, - 0x6c,0x48,0xf8,0x38,0xd6,0x0d,0x54,0xfb,0x8c,0x70, - 0x6f,0xe7,0x63,0x0b,0xa4,0x66,0x1c,0x0e,0xbc,0x98, - 0xe1,0x5c,0xca,0xe2,0x01,0x3e,0xdd,0xba,0xb2,0x2f, - 0x5b,0x63,0x99,0x00,0x69,0x0d,0xc0,0xaa,0x53,0x87, - 0xd4,0xb5,0xfa,0xff,0x19,0x58,0x27,0x10,0x8f,0x17, - 0xf1,0xa5,0xc5,0x97,0xc1,0x02,0xc0,0x6a,0x58,0x66, - 0xc9,0x2f,0xb0,0x6b,0xc7,0xfb,0xf0,0x07,0xbc,0x6f, - 0xc3,0x02,0x76,0x52,0x1e,0x1f,0x61,0x47,0x81,0x3c, - 0x47,0xaf,0xfb,0x63,0x59,0x5d,0xcf,0x62,0x99,0x59, - 0x47,0x61,0x3f,0x1b,0x2b,0xe1,0x2f,0x92,0xd9,0x0e, - 0x8f,0x01,0xeb,0x62,0x2d,0x69,0x43,0xc5,0x68,0x9b, - 0xf1,0x08,0x76,0x8e,0x7f,0x39,0xac,0x90,0xf3,0x2f, - 0x81,0xff,0x64,0xfc,0x1c,0x9d,0xc0,0xd5,0xd8,0xfb, - 0xd0,0xff,0x61,0x9d,0x8b,0x72,0xd1,0xee,0x05,0x63, - 0x9d,0x22,0xce,0x8f,0x62,0x67,0x4d,0x7e,0x4f,0xdc, - 0x8b,0xc2,0xa5,0xb0,0x34,0x98,0xdb,0xb0,0x5d,0x99, - 0x13,0xb1,0x2a,0xe4,0x22,0x32,0xc7,0xc3,0xf8,0xa2, - 0xe1,0x3b,0xd0,0x7c,0xd5,0xfa,0x55,0xbb,0xbe,0x42, - 0x2e,0x26,0x4e,0x31,0x9a,0xbc,0x64,0x7d,0x0c,0x60, - 0x08,0xf0,0xb9,0x84,0xdb,0x5f,0xc5,0x0a,0xfd,0x24, - 0x19,0x47,0xf2,0x05,0x42,0xda,0x0c,0x00,0x9d,0xff, - 0xef,0xdb,0x77,0x48,0x7f,0xb4,0xef,0x7a,0xd2,0xb5, - 0x5e,0xab,0x1a,0xcf,0x19,0xea,0xc1,0xc0,0x4e,0x4d, - 0x3c,0xf6,0x68,0xc2,0xfd,0xa5,0x9f,0x23,0xdc,0xce, - 0xb1,0x8a,0xf6,0xc4,0x16,0x39,0x1e,0xd3,0xb1,0x73, - 0xff,0xef,0xc7,0x9b,0x4e,0xdb,0xac,0x8c,0x9d,0x93, - 0x7e,0x1c,0x2b,0xfc,0x78,0x04,0xe9,0xb2,0x47,0xaf, - 0xc0,0x8e,0xc7,0x55,0xb5,0x80,0x77,0x95,0xbd,0x8a, - 0xbd,0x27,0x3c,0xe2,0x1c,0xdf,0x1f,0x6b,0x1f,0x7a, - 0x02,0x96,0x1d,0x32,0x1e,0x5f,0x17,0xa5,0x76,0xf8, - 0x33,0x16,0x88,0x7f,0xac,0x4d,0xcf,0xf7,0x4f,0xec, - 0x77,0x65,0x24,0xb0,0x11,0x96,0x09,0xd4,0x4a,0xd0, - 0xfa,0x03,0xec,0xe8,0xd1,0x1a,0xd8,0x7b,0xfb,0xb3, - 0x2d,0xce,0xaf,0x65,0x79,0xb4,0x01,0xac,0x93,0x49, - 0xd8,0x05,0xd2,0x06,0xb4,0xe7,0xe2,0x70,0x71,0xac, - 0xf2,0xf2,0xb3,0xd8,0x22,0x63,0xa5,0x36,0x3c,0xa7, - 0x48,0x59,0x78,0x8a,0x01,0x2e,0x44,0xf3,0x55,0xe2, - 0x77,0x75,0x8e,0xab,0x4a,0xfa,0x7f,0xb7,0xac,0x03, - 0x00,0x1b,0x63,0x99,0x4e,0x8d,0x84,0x76,0xff,0xc1, - 0x82,0xcd,0x49,0x8b,0x9c,0x51,0xc0,0xd2,0x29,0xe6, - 0x14,0xda,0x29,0x9b,0x45,0x75,0xb2,0x3a,0xd2,0x98, - 0x88,0x7d,0xe6,0xa4,0x71,0x58,0x8c,0x89,0x94,0xc8, - 0x5f,0xf0,0x1d,0x7d,0x68,0xa6,0x1b,0x80,0xa7,0xfa, - 0xbf,0xb7,0x28,0x6a,0x95,0xac,0x42,0xba,0xea,0xf5, - 0xdf,0xc7,0x16,0x00,0x75,0xf6,0x1e,0xf0,0x5d,0xac, - 0xae,0xd5,0xe4,0x9c,0xe7,0x22,0xcd,0x7b,0x11,0x5b, - 0xc0,0x9e,0x4e,0x8e,0xbb,0xcd,0x19,0xd8,0x9b,0xd6, - 0xd3,0xfd,0x9b,0x75,0x3f,0x96,0xb5,0x36,0x0a,0x3b, - 0x7a,0xb0,0x0f,0xd6,0xfa,0x7d,0x2c,0xf6,0xfd,0x9d, - 0x8c,0x5d,0x03,0xcc,0xc2,0x32,0x2f,0x26,0x60,0xef, - 0x1f,0x97,0x61,0xc7,0xb7,0x37,0xc3,0x3a,0x02,0xec, - 0x8f,0x05,0xe2,0x0a,0x41,0x29,0xe3,0xed,0xf1,0x20, - 0x96,0xd2,0xb7,0x1a,0x96,0x82,0xd6,0x4c,0xa7,0x80, - 0x34,0xfa,0x61,0x15,0x30,0x9f,0xc4,0xce,0x77,0x15, - 0x29,0x85,0x47,0x24,0x2f,0x17,0x39,0xc7,0x35,0x7b, - 0x0c,0xc0,0x93,0xfe,0xff,0x04,0x96,0x8d,0x50,0x25, - 0xe3,0x09,0x1f,0x77,0x4a,0x53,0x07,0xa0,0xd5,0xf4, - 0xff,0x6e,0x63,0x03,0xb7,0x7b,0xb3,0x00,0x86,0x62, - 0x41,0xdc,0x24,0x0f,0x50,0xed,0x2a,0xe1,0x8d,0x74, - 0x90,0xfe,0xbc,0xfa,0x0f,0x62,0x4c,0xa4,0x44,0x26, - 0x10,0xee,0xa2,0x00,0x16,0x74,0x5a,0x38,0xc5,0xe3, - 0x76,0x60,0x3b,0xb5,0x21,0x75,0x4b,0xff,0x9f,0x1b, - 0x3b,0xf7,0xef,0x69,0x71,0x47,0xd7,0x58,0x4f,0x01, - 0xb5,0xaa,0x7a,0x09,0x3b,0x63,0x3d,0x8a,0x7a,0x7f, - 0x1f,0xaa,0x64,0x2a,0x56,0xb3,0x65,0x25,0x2c,0xfb, - 0xaa,0x0e,0xf5,0xd8,0x62,0x79,0x16,0xab,0x97,0x70, - 0x20,0xb6,0xb0,0x1f,0x85,0xad,0xb1,0xfa,0x77,0x7d, - 0xcd,0x83,0x15,0x26,0x5c,0x0f,0xbb,0x26,0xfc,0x19, - 0x76,0x2d,0x52,0xb8,0x0c,0x78,0x05,0x00,0xda,0xeb, - 0x49,0x2c,0xa2,0xba,0x38,0xd6,0x37,0xf2,0x02,0xe2, - 0xfe,0x22,0xf6,0xc3,0x2a,0xbc,0x3e,0x46,0xf8,0x02, - 0x56,0xa4,0xea,0x5e,0x24,0xb9,0x3a,0x7c,0xb7,0x1d, - 0x49,0x7f,0x0c,0x60,0x0d,0x7c,0x19,0x37,0x55,0x6d, - 0xbd,0x15,0xda,0xfd,0x4e,0x53,0x07,0x20,0xb4,0xdb, - 0x7e,0x9b,0xf3,0x71,0xc6,0x06,0x6e,0xf7,0x66,0x7a, - 0x6c,0x82,0x9d,0xad,0x4e,0x52,0xc7,0xf4,0x7f,0xb0, - 0x8b,0xa0,0xb4,0x85,0x33,0xf7,0xc3,0xda,0xde,0xd6, - 0xd9,0x18,0xc7,0x98,0x7e,0xf8,0xb3,0x8a,0x00,0xd6, - 0xc7,0xae,0x2d,0x92,0xdc,0x4f,0xf8,0xf8,0x4c,0xd5, - 0x9c,0x89,0xef,0x68,0x16,0xd8,0xf7,0x66,0x9f,0x88, - 0x73,0x29,0xba,0x3f,0x60,0xc7,0xaf,0x7e,0x42,0x35, - 0x8e,0x3f,0xc8,0x27,0xbd,0x00,0xec,0x8b,0x65,0xe4, - 0x79,0x03,0xe9,0x52,0x51,0x0a,0x00,0xe4,0x63,0x3a, - 0xf0,0x37,0xe0,0x1b,0x58,0x84,0x7f,0x33,0xe6,0x14, - 0x66,0x89,0x51,0x2f,0x60,0x24,0x56,0xa8,0xeb,0xab, - 0x11,0x1e,0x5b,0xa4,0x4c,0x3c,0xe9,0xaf,0x0b,0x93, - 0xbe,0x2d,0x8e,0x67,0xf7,0x7f,0x36,0xd5,0xdd,0x7d, - 0xcb,0xea,0x18,0xc0,0x70,0x92,0x03,0x05,0x2f,0xe2, - 0x2f,0xca,0x33,0x8e,0xe4,0x94,0x41,0x6f,0x00,0xc0, - 0x93,0x29,0x50,0x87,0xf6,0x7f,0xbd,0x2d,0x07,0x9c, - 0xdc,0xe4,0x7d,0xff,0x80,0xbd,0xd6,0x75,0x75,0x0d, - 0xbe,0x36,0x8a,0x69,0x8e,0x01,0x78,0xd2,0xff,0xab, - 0x1a,0x80,0x6c,0xe4,0x5b,0xc0,0x37,0x9d,0x63,0xa7, - 0x62,0xe9,0xee,0x45,0x39,0xf3,0x9c,0x87,0x7d,0x98, - 0x93,0xa1,0x52,0xc6,0xd6,0x70,0xd2,0x58,0x7f,0xac, - 0x90,0xe3,0x78,0x6c,0xad,0xd1,0xec,0x51,0x47,0xa9, - 0x08,0x05,0x00,0xf2,0x37,0x13,0xdb,0xa9,0xfa,0x11, - 0xd6,0x3f,0x7c,0x11,0x2c,0x7d,0xff,0x0f,0x64,0x5b, - 0x25,0x79,0x10,0xd6,0xc6,0x65,0x74,0x86,0x8f,0x29, - 0x52,0x36,0x97,0xe1,0x3b,0x07,0x97,0xf6,0x18,0x80, - 0x67,0xa7,0xee,0x56,0xe0,0xb5,0x94,0x8f,0x5b,0x16, - 0xb7,0x12,0x4e,0x71,0x1b,0xed,0x78,0x9c,0xcd,0x49, - 0xfe,0x5c,0xf2,0xee,0xfe,0x83,0x05,0x5a,0x93,0xea, - 0x00,0x2c,0x85,0xb5,0xfe,0x09,0x09,0xed,0x70,0xbf, - 0x41,0xf5,0x8e,0x75,0x84,0xcc,0x85,0x15,0xb3,0xf3, - 0xa6,0x55,0xf7,0xb6,0x38,0xf0,0xbb,0xec,0xa6,0x53, - 0x3a,0x53,0xb0,0xf7,0xa2,0x90,0x8d,0x80,0x65,0x9c, - 0x8f,0x19,0x6a,0xff,0x37,0x83,0x7a,0xb5,0x71,0xeb, - 0x3e,0x72,0xe9,0xf5,0x3d,0xfc,0xc5,0xd2,0xaa,0xac, - 0x03,0x7b,0xcf,0xbb,0x03,0xf8,0x2b,0xb0,0x60,0xbe, - 0xd3,0x91,0x0c,0xac,0x89,0x9d,0x3d,0xff,0x33,0xaa, - 0x0d,0x26,0x5d,0x14,0x00,0x28,0x9e,0xb7,0xb0,0x0f, - 0xe9,0x7d,0xb1,0xb3,0x25,0xa3,0xb0,0x94,0xc9,0xcb, - 0x48,0x5f,0x6d,0xb9,0xb7,0xfe,0xd8,0xf9,0xb6,0x91, - 0x2d,0x3e,0x8e,0x48,0x59,0xbd,0x8d,0xaf,0x58,0xdb, - 0x4e,0xf8,0xdf,0x1f,0xd7,0xc5,0x76,0x43,0x43,0xaa, - 0xbc,0xfb,0xf6,0x21,0xe1,0xe3,0x15,0x9e,0x3a,0x00, - 0xa1,0xc5,0x76,0xda,0xb4,0xc5,0xb1,0x81,0xdb,0x43, - 0xbb,0xfb,0x0b,0x60,0x17,0x4f,0x49,0xea,0xd6,0xfe, - 0x0f,0xac,0x48,0x5a,0xab,0xfd,0x8b,0x77,0x23,0x5d, - 0x8a,0x7b,0xd5,0x78,0xba,0x01,0x74,0x60,0xbb,0xd2, - 0x21,0xab,0x10,0xbe,0xb0,0xff,0x07,0xf1,0xeb,0x0f, - 0x15,0xc5,0x50,0xec,0x5a,0x27,0xd4,0xba,0xb3,0xdb, - 0x45,0x58,0x85,0xee,0x2a,0xf2,0x14,0x9c,0x6c,0x64, - 0x3b,0x2c,0x28,0x92,0xb6,0x8d,0xab,0x14,0xc7,0x37, - 0xb0,0xa3,0x3f,0x2b,0x37,0x79,0xff,0x56,0x7e,0x7e, - 0xa4,0xc0,0x14,0x00,0x28,0xbe,0x17,0x81,0x73,0xb1, - 0x14,0xe3,0x45,0x80,0x75,0xb0,0x02,0x2d,0xcd,0x46, - 0xaa,0x17,0xc2,0xa2,0x80,0x22,0x8d,0x34,0xdb,0x06, - 0xaf,0x2c,0x3c,0x69,0xf8,0x8b,0x62,0x0b,0x56,0x0f, - 0x4f,0xfa,0xff,0x64,0xe0,0x2a,0xe7,0xe3,0x95,0x55, - 0xe8,0x18,0x80,0xa7,0x0e,0x40,0xa8,0x00,0x60,0x9a, - 0x0c,0x00,0x68,0xbd,0x0e,0xc0,0x66,0x84,0x3f,0x27, - 0xeb,0x96,0xfe,0xff,0x19,0xe0,0x78,0xc7,0xb8,0xe9, - 0x8e,0x31,0x67,0x62,0xbf,0x6b,0x75,0x74,0x0f,0xbe, - 0x56,0x50,0x9e,0xa3,0x7b,0x9e,0xf4,0xff,0xaa,0x1e, - 0x3f,0xea,0xcb,0x39,0xf8,0x17,0x3c,0x4f,0x63,0xdd, - 0x9a,0xaa,0xea,0x19,0xac,0xb5,0xea,0x0a,0xd8,0xfb, - 0xeb,0xf1,0xd8,0xf1,0x28,0x6f,0xd0,0x72,0x49,0xe0, - 0x26,0x9a,0x5f,0x40,0x4a,0x7e,0x76,0xc6,0xea,0x8d, - 0x24,0x75,0xd5,0xe9,0xe9,0x23,0xec,0x78,0xf2,0x21, - 0x58,0xdd,0xb0,0xa5,0x52,0xdc,0x57,0x4a,0x46,0x01, - 0x80,0x72,0xe9,0x04,0x1e,0xc2,0x0a,0xb4,0xac,0xd5, - 0xf5,0x75,0x36,0x76,0x76,0x2d,0x8d,0xd1,0xc0,0x96, - 0x99,0xce,0x4c,0xaa,0x64,0x48,0xde,0x13,0x88,0xec, - 0xaf,0xf8,0xda,0x1a,0x79,0x8e,0x01,0x74,0xe0,0xdb, - 0xc5,0xbc,0x0a,0xfb,0x70,0xad,0xb2,0x56,0xeb,0x00, - 0x2c,0x4d,0x72,0x4a,0xfe,0x78,0xe0,0xf5,0x34,0x13, - 0xa2,0xf5,0x3a,0x00,0xa1,0x0c,0x81,0x99,0xd8,0xc5, - 0x71,0x5d,0xf4,0xc7,0x76,0xae,0x43,0x17,0x85,0xaf, - 0x60,0xd9,0x1c,0xa1,0xe3,0x36,0x0b,0x62,0x15,0x95, - 0xeb,0xca,0x93,0x05,0xb0,0x01,0xb0,0x44,0x60,0x4c, - 0x28,0x00,0xf0,0x01,0x76,0x61,0x5f,0x07,0xfb,0x02, - 0x7b,0x38,0xc7,0x4e,0xa1,0x1e,0x6d,0xee,0xa6,0x62, - 0x05,0x0e,0x6f,0x05,0x8e,0xc5,0x7e,0xa6,0xd6,0xc2, - 0x3e,0x0b,0x3d,0x16,0xc2,0xde,0xdf,0xe7,0x8b,0x32, - 0x3b,0x89,0xe1,0xb3,0x58,0xcd,0x23,0xcf,0x3a,0x6f, - 0x32,0x70,0x22,0xf6,0x19,0xbc,0x3d,0xd6,0x32,0x70, - 0x1c,0xf0,0x2a,0xe5,0x6e,0x1d,0x28,0x09,0x14,0x00, - 0x28,0xb7,0x47,0x80,0x03,0xb0,0xbe,0x94,0x69,0x7b, - 0xfb,0x9e,0x90,0xfd,0x74,0xa4,0x22,0xe6,0xc9,0x7b, - 0x02,0x91,0x7d,0x0c,0x5c,0xed,0x18,0xb7,0x13,0xb6, - 0xc0,0x4f,0xb2,0x21,0xbe,0x7e,0xf2,0xe7,0x3b,0xc6, - 0x94,0xdd,0xa3,0xd8,0x79,0xf8,0x24,0xa3,0x13,0x6e, - 0xcb,0xaa,0xfd,0x5f,0x4f,0xd3,0xb0,0xf4,0xc7,0x46, - 0x16,0xc1,0x76,0xb4,0x1b,0x09,0x1d,0x49,0xb8,0x17, - 0x5f,0x31,0xb7,0xaa,0x38,0x12,0x3b,0xf2,0x12,0x72, - 0x00,0x70,0x37,0x70,0x8a,0x63,0xec,0xd6,0xd8,0xa2, - 0xad,0x8e,0xfe,0x42,0x38,0xc5,0xb6,0x83,0xe4,0xf3, - 0xfd,0x4b,0x12,0x7e,0x4d,0xae,0x20,0xfd,0x46,0x41, - 0x19,0xad,0x01,0xfc,0x36,0xc5,0xf8,0x83,0x28,0x50, - 0x5f,0xee,0x36,0x7b,0x14,0x6b,0x1b,0xf9,0x4d,0x7c, - 0xd9,0x3a,0xcb,0x60,0xc5,0xaa,0xa5,0xf8,0xfa,0x61, - 0x81,0xd5,0x81,0x8e,0xb1,0x2f,0x62,0x1d,0x44,0x8e, - 0xa4,0x9e,0xad,0x6c,0x6b,0x4b,0x01,0x80,0x6a,0x78, - 0x05,0xf8,0x7a,0xd7,0xd7,0x34,0xe7,0x7d,0xd6,0xc5, - 0x8a,0xe4,0x48,0x39,0x84,0x16,0xa2,0x59,0x5a,0xac, - 0x8d,0xcf,0x95,0x17,0x4f,0xc0,0x6c,0x09,0xac,0x25, - 0x52,0x12,0x4f,0xfa,0xff,0xab,0xd4,0xa3,0xe5,0x4e, - 0x27,0xe1,0xfa,0x0a,0x49,0x75,0x00,0xb2,0x4e,0xff, - 0xef,0x36,0x36,0x70,0x7b,0xa3,0x5d,0xfe,0xc5,0x08, - 0xa7,0xbd,0xd6,0xa9,0xfd,0xdf,0x5a,0xc0,0xd1,0x8e, - 0x71,0x97,0x00,0xd7,0x77,0xfd,0xf9,0xa7,0xf8,0xd2, - 0xdc,0x4f,0x05,0x96,0x6d,0x72,0x5e,0x65,0xf6,0x32, - 0xbe,0xf7,0x86,0xa4,0x1d,0xfe,0x50,0xf1,0x3f,0xa8, - 0x76,0xfd,0x91,0x6e,0xf3,0x62,0xb5,0x92,0x06,0x3b, - 0xc7,0x9f,0x87,0x8e,0x43,0x82,0x05,0xa7,0x77,0xc0, - 0x77,0x24,0x60,0x3f,0x60,0xf5,0xb8,0xd3,0x91,0x0c, - 0xec,0x8e,0x2f,0x50,0xfb,0x0a,0x96,0x0d,0xf2,0x54, - 0xdc,0xe9,0x48,0x11,0x29,0x00,0x50,0x2d,0x17,0x62, - 0xa9,0x6f,0xde,0xa2,0x1d,0x5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xa9,0x6c, - 0x8e,0xc3,0x97,0x31,0x76,0x38,0x9f,0xbe,0xa0,0x1c, - 0x8b,0xef,0x9c,0xff,0x17,0x80,0xc3,0xd2,0x4d,0xab, - 0x12,0xae,0xc4,0xba,0x68,0x24,0xe9,0x0f,0x6c,0xd3, - 0xc7,0xbf,0x2f,0x0c,0x6c,0x12,0xb8,0xef,0x45,0x54, - 0xbf,0x4b,0xc5,0x01,0x58,0x57,0x09,0x8f,0x8f,0xb0, - 0x73,0xff,0x1f,0xc7,0x9b,0x4e,0x29,0x1d,0x83,0x2f, - 0x05,0x7c,0x0f,0xc2,0x81,0x40,0xc9,0xcf,0x8a,0x58, - 0x4a,0x7f,0xc8,0xd5,0xd4,0x23,0x33,0x51,0x1a,0x50, - 0x00,0xa0,0x9a,0xbc,0xe7,0xfb,0x3d,0x3d,0xb0,0x25, - 0x2e,0xcf,0xd9,0x3b,0x68,0x5f,0xf1,0x1d,0xcf,0x07, - 0x47,0x55,0x78,0x8e,0x01,0x2c,0x4f,0xe3,0xdf,0x13, - 0x4f,0x75,0xee,0x87,0x80,0x7f,0xbb,0x67,0x54,0x7e, - 0xef,0x02,0x0f,0x06,0xc6,0xf4,0xb5,0xe3,0x1e,0x2b, - 0xfd,0x1f,0xc2,0x75,0x00,0x86,0x63,0x67,0x87,0x7b, - 0x0b,0x65,0x00,0xd4,0x25,0xfd,0x7f,0x43,0xe0,0x08, - 0xc7,0xb8,0x9b,0x68,0x1c,0xec,0x3a,0x02,0x5f,0xc6, - 0xcd,0x09,0x24,0xd7,0x64,0xa8,0xa2,0x8f,0xb1,0x33, - 0xfa,0x21,0x7d,0xa5,0xfa,0xef,0x48,0xf8,0x3a,0xae, - 0xea,0xe9,0xff,0x6b,0x01,0xbf,0x4e,0x31,0x7e,0x7f, - 0x94,0xf2,0xdc,0x97,0xa9,0xf8,0x8e,0x44,0x0c,0x05, - 0xd6,0x8e,0x3c,0x17,0x69,0x5e,0x28,0x20,0xd8,0xed, - 0xac,0xa8,0xb3,0x90,0xc2,0x53,0x00,0xa0,0x9a,0x5e, - 0xc0,0xb7,0xe8,0x18,0x11,0x7b,0x22,0x12,0xe4,0xad, - 0xd9,0x90,0xb4,0x3b,0x9a,0xa5,0x50,0x55,0xf4,0x2a, - 0x19,0x87,0x55,0x46,0x0e,0x69,0x74,0x54,0x66,0x27, - 0xc7,0x7d,0xeb,0xb4,0xfb,0xdf,0x2d,0x74,0x0c,0xe0, - 0xf3,0x7c,0xfa,0xb3,0x27,0x46,0x01,0xc0,0x9e,0xc6, - 0x06,0x6e,0xdf,0xb4,0xd7,0xdf,0x97,0x23,0x7c,0x14, - 0xa6,0x0e,0xe9,0xff,0x43,0xb0,0x8c,0xb2,0x50,0x6b, - 0xd0,0x8f,0x48,0x6e,0xa5,0xf6,0x1e,0x9f,0x3c,0x1a, - 0xd0,0xc8,0x60,0x7c,0x47,0x0d,0xaa,0x66,0x8c,0x63, - 0xcc,0x56,0x7c,0xfa,0x7c,0x7b,0x28,0x08,0xf9,0x30, - 0xd5,0x0e,0x40,0xce,0x07,0x5c,0x8e,0xbf,0x55,0xd9, - 0x1f,0xa8,0x57,0x3b,0xc4,0xb4,0xbc,0xdf,0x9b,0x8d, - 0xa2,0xce,0x42,0x5a,0xb1,0x81,0x63,0xcc,0x44,0x5a, - 0x0b,0xaa,0x4b,0x05,0x28,0x00,0x50,0x5d,0x9e,0x85, - 0x4d,0xd5,0xdb,0xbd,0x95,0xc1,0x24,0xe7,0xb8,0x76, - 0x15,0xe6,0xf3,0xec,0x6a,0x57,0x89,0x27,0x0b,0xa0, - 0xaf,0x00,0xc0,0x5a,0x84,0x8b,0x96,0xcd,0x04,0x2e, - 0x4e,0x3d,0xa3,0xf2,0xf3,0xd4,0x01,0xe8,0xb9,0xcb, - 0x3b,0x00,0x4b,0xff,0x6e,0x64,0x16,0x70,0x47,0x8b, - 0x73,0x0a,0xdd,0xbf,0xf7,0xf3,0x87,0x76,0xff,0x67, - 0x60,0x75,0x24,0xaa,0xee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34,0xcf,0x6b, - 0xf3,0xcf,0xe8,0xb3,0x90,0xc2,0x53,0x00,0xa0,0x35, - 0xf3,0x63,0x11,0xf8,0xef,0x63,0x85,0x76,0xc6,0x63, - 0x17,0xaa,0x77,0x61,0x17,0x44,0x87,0x90,0x5f,0xaa, - 0x94,0x27,0x65,0xbc,0x4a,0xfd,0xab,0xdb,0xd9,0x26, - 0x2f,0x4b,0xaf,0x3b,0xc7,0x7d,0x36,0xea,0x2c,0x8c, - 0x52,0x90,0x39,0xb4,0x00,0x00,0x0e,0x58,0x49,0x44, - 0x41,0x54,0xe7,0x9c,0x6f,0xd5,0x3c,0x87,0x2d,0x60, - 0x92,0x0c,0xe6,0xd3,0x3b,0xc4,0x4a,0xff,0x6f,0x6c, - 0x36,0x70,0x73,0x60,0x4c,0xcf,0x34,0xc5,0xd8,0xe9, - 0xff,0x60,0x17,0xfe,0x49,0x75,0x00,0x46,0xf0,0xc9, - 0x20,0x5b,0xa8,0xfd,0x63,0xd5,0xd3,0xff,0xe7,0xc1, - 0xce,0x03,0x87,0xde,0x57,0x67,0x00,0xfb,0xe0,0x2f, - 0x66,0xfa,0x2a,0xb6,0xb8,0x0f,0xe9,0x8f,0xfd,0xfe, - 0x78,0x5b,0xba,0x55,0xc1,0x79,0x84,0x77,0xe5,0xb6, - 0x65,0xce,0x75,0x5b,0x68,0xf1,0x7b,0x0b,0xf0,0x46, - 0xab,0x93,0x2a,0xa8,0x75,0x81,0x5f,0xa6,0x18,0xbf, - 0x1f,0xf0,0x4c,0xa4,0xb9,0x54,0xcd,0x04,0xc7,0x98, - 0xa1,0xd1,0x67,0x21,0xcd,0x9a,0xdb,0x31,0xc6,0xf3, - 0x1a,0x4b,0xc5,0x29,0x00,0xd0,0x9a,0x6b,0xb1,0x73, - 0x34,0xbf,0x04,0xbe,0x06,0xac,0xc4,0xa7,0xbf,0xa7, - 0x7b,0xb7,0x7b,0x52,0x5d,0x3c,0x3d,0x95,0x43,0x29, - 0x87,0x65,0xe2,0x79,0xd3,0x2b,0x22,0xef,0x45,0x49, - 0x68,0x97,0xb4,0x55,0x9b,0x00,0xdb,0x47,0x7c,0xfc, - 0x22,0xf3,0x1c,0x03,0xd8,0xaa,0xc7,0x9f,0x97,0x27, - 0x9c,0x91,0xf1,0x01,0xf0,0xd7,0xa6,0x67,0x54,0x7e, - 0xa1,0x63,0x00,0x69,0x02,0x00,0x59,0x9d,0x55,0x1c, - 0x1b,0xb8,0xbd,0x3b,0xc8,0xb3,0x18,0x30,0x32,0x30, - 0xb6,0xea,0x01,0x80,0x53,0x09,0x7f,0x0f,0x00,0x4e, - 0xc6,0x3a,0x34,0xa4,0x71,0x26,0x70,0x9f,0x63,0xdc, - 0x2a,0xc0,0x89,0x29,0x1f,0xbb,0xcc,0x5e,0x22,0xdc, - 0xae,0x6f,0x04,0x56,0x43,0x63,0x18,0xe1,0xdf,0x9b, - 0xaa,0x9e,0x75,0x9f,0x1f,0x3b,0x4e,0xe2,0xed,0x8c, - 0x73,0x16,0x70,0x49,0xbc,0xe9,0x54,0x8e,0x67,0x63, - 0xa8,0xac,0x1b,0x2e,0x75,0xe0,0x79,0x6d,0xaa,0xb4, - 0xf9,0x27,0x4d,0x52,0x00,0xa0,0x35,0x37,0x39,0xc6, - 0x7c,0x8b,0xbe,0x2b,0x4c,0xc7,0xb4,0x3a,0xbe,0x54, - 0xee,0x27,0x63,0x4f,0x24,0x03,0xde,0x73,0x4a,0xc3, - 0xa2,0xce,0x22,0x9e,0xf1,0xce,0x71,0x03,0x69,0x5c, - 0x8c,0xae,0x55,0x73,0x03,0x67,0x47,0x7a,0xec,0x32, - 0xb8,0x14,0x4b,0x97,0x4d,0xd2,0x33,0x00,0xd0,0x57, - 0x3b,0xae,0xde,0x2e,0xa7,0xde,0xe9,0xa6,0x37,0x06, - 0x6e,0xff,0x0c,0x30,0x2f,0x16,0xd4,0x4a,0xea,0x3c, - 0x31,0x03,0xcb,0xa8,0xca,0x82,0xb7,0x0e,0x40,0x28, - 0x6b,0xeb,0x3f,0x54,0xbb,0xb0,0xda,0x56,0xc0,0xbe, - 0x8e,0x71,0xe3,0xf1,0x77,0x9c,0xe9,0x69,0x76,0xd7, - 0xe3,0xcf,0x70,0x8c,0x3d,0x94,0xf0,0x71,0x8c,0x2a, - 0x19,0xe3,0x18,0xb3,0x3d,0xd6,0x9e,0x34,0x69,0x01, - 0xfc,0x11,0xd6,0xe6,0xab,0x8a,0xfe,0x84,0x6f,0x83, - 0x03,0xec,0xf8,0x50,0x1d,0x5b,0x4b,0xb6,0xe2,0xfd, - 0xbc,0x27,0x20,0xd1,0x79,0x6b,0x4f,0x49,0x85,0x29, - 0x00,0xd0,0x9a,0xcb,0x1c,0x63,0xfa,0x01,0xbf,0xa7, - 0xbd,0xa9,0x8c,0x07,0x39,0xc7,0xdd,0x1a,0x75,0x16, - 0xd9,0x98,0xec,0x1c,0xe7,0x29,0x54,0x55,0x44,0xdd, - 0xc7,0x46,0x3c,0x62,0x15,0x30,0x3a,0x87,0xfa,0xb5, - 0xde,0xea,0xe9,0x4d,0xc2,0x05,0xdd,0x56,0x06,0x96, - 0xee,0xfa,0xb3,0x27,0x00,0x50,0xd7,0xf4,0xff,0x6e, - 0xaf,0x03,0x8f,0x26,0xdc,0x3e,0x17,0x56,0xec,0x6d, - 0x23,0x92,0x2b,0xbe,0x3f,0x40,0x76,0xfd,0xba,0xef, - 0x23,0xb9,0x0e,0x40,0x77,0x00,0x20,0x94,0xfe,0x5f, - 0xe5,0xf6,0x7f,0xf3,0x63,0x95,0xd2,0x43,0x3a,0xb1, - 0x45,0xbc,0xb7,0x8b,0x49,0x6f,0x4f,0x62,0x05,0x06, - 0x43,0x3a,0xb0,0x45,0xf1,0xbc,0x4d,0x3e,0x4f,0xd9, - 0x5c,0x81,0x2d,0xde,0x93,0x6c,0x47,0xb8,0x06,0xc9, - 0xd5,0x8e,0xc7,0x29,0xa3,0xef,0xf1,0xc9,0x3a,0x08, - 0x49,0x3e,0xc0,0xce,0xfd,0x37,0xfb,0x33,0x5a,0x57, - 0x33,0xf3,0x9e,0x80,0x44,0xa7,0xd7,0x58,0x14,0x00, - 0x68,0xd1,0xb3,0x58,0x31,0xa8,0x90,0xf5,0xb1,0x60, - 0x41,0x52,0xc1,0x9e,0xac,0x6c,0x81,0x9d,0x77,0x0b, - 0x99,0x44,0x38,0x25,0xb6,0x08,0xbc,0x8b,0xe3,0xb2, - 0xb6,0xa5,0x99,0x0d,0xdc,0xeb,0x1c,0xbb,0x31,0xb0, - 0x6b,0xc6,0xcf,0x7f,0x2a,0xf0,0xf5,0x5e,0xff,0xe6, - 0x0d,0xba,0x54,0x89,0xe7,0x18,0xc0,0x96,0xd8,0xd9, - 0xc7,0xa4,0x8a,0xf5,0x00,0x2f,0xe2,0x7b,0x5f,0xa8, - 0xba,0xd0,0x31,0x80,0xf5,0xb1,0x9f,0xe9,0x24,0x59, - 0xb6,0x2a,0x9a,0x8a,0x05,0x14,0x1a,0x59,0x12,0x18, - 0x45,0xf8,0xbd,0xa4,0xca,0xe9,0xff,0x67,0x00,0x4b, - 0x38,0xc6,0x9d,0x4d,0xeb,0x3f,0xe3,0x3f,0xc3,0x97, - 0x01,0xb5,0x0c,0x70,0x5a,0x8b,0xcf,0x55,0x16,0x93, - 0x81,0x2b,0x03,0x63,0x56,0x22,0x1c,0x84,0xac,0x62, - 0xf5,0xff,0x0d,0x80,0x5f,0xa4,0x18,0xff,0x6d,0xaa, - 0x75,0xcc,0x51,0x44,0x24,0x33,0x0a,0x00,0xb4,0xce, - 0xfb,0x81,0xb4,0x1d,0x76,0x31,0x1b,0xea,0x2d,0xdd, - 0x8a,0x6d,0xb0,0x8b,0x07,0xcf,0x19,0xa0,0xf3,0xf1, - 0xb5,0x7b,0xc9,0x9b,0x37,0x1d,0xed,0xb3,0xb4,0xa7, - 0x50,0x5e,0x0c,0x9e,0xd6,0x58,0xdd,0xce,0x02,0x56, - 0xcb,0xe0,0x39,0x87,0x62,0x85,0x2b,0xfb,0x4a,0x8f, - 0x3c,0xd4,0xf9,0x18,0x55,0x7a,0xff,0xb8,0x9a,0xf0, - 0x4e,0xf3,0x96,0xd8,0xb9,0xdb,0x50,0xcf,0xe9,0xbf, - 0xa0,0x16,0x3b,0x10,0x0e,0x00,0xac,0x87,0x9d,0x67, - 0x4e,0x92,0x75,0xaf,0xe2,0xd0,0x31,0x80,0xff,0xc1, - 0x32,0x13,0x1a,0x99,0x46,0x75,0xfb,0x27,0xef,0x08, - 0xec,0xe1,0x18,0xf7,0x2a,0xf0,0xe3,0x0c,0x9e,0x6f, - 0x1a,0x16,0xac,0xf6,0xfc,0xae,0xec,0x8d,0x7d,0x86, - 0xd6,0xc1,0x18,0xc7,0x98,0xa4,0xac,0x99,0xd7,0x29, - 0x47,0x76,0x5f,0x1a,0x0b,0x60,0x47,0xb5,0x92,0xfe, - 0xbf,0x7b,0xfa,0x2d,0xe1,0x40,0x8a,0x88,0x48,0x6d, - 0x55,0xe9,0x02,0x3e,0x2f,0x7f,0xc3,0xbf,0x83,0xbb, - 0x09,0xd6,0x8b,0xf6,0x58,0x60,0xa1,0x0c,0xe7,0xb0, - 0x38,0x70,0x3a,0x56,0x74,0xcc,0x93,0x2a,0x39,0x05, - 0x38,0x25,0xc3,0xe7,0x8f,0xe9,0xa9,0x14,0x63,0xcf, - 0xa6,0x9c,0xd5,0x69,0xaf,0xc2,0x9f,0x92,0x35,0x1c, - 0x5b,0x80,0x78,0xd2,0xd0,0x1b,0xf9,0x0a,0x56,0xb8, - 0xeb,0x6b,0x7d,0xdc,0x76,0x21,0xfe,0x14,0xe7,0x2a, - 0x15,0x02,0x9a,0x4c,0xb8,0x68,0xdf,0x17,0xf1,0x15, - 0x4a,0xac,0xe2,0xee,0x5b,0x33,0xee,0x21,0xb9,0xe5, - 0xdb,0x86,0x7c,0xb2,0x18,0x60,0x6f,0x53,0xf0,0x15, - 0x8b,0x4b,0x63,0x6c,0xe0,0xf6,0x43,0x49,0x0e,0xf0, - 0xdc,0x49,0x35,0x53,0xab,0x47,0xe0,0xaf,0x03,0x72, - 0x20,0xd9,0x9d,0x21,0xbd,0x0b,0x3b,0x22,0xe7,0x71, - 0x2e,0xd9,0x7e,0x6e,0x16,0xd5,0x58,0xac,0xce,0x44, - 0xb3,0x2e,0x26,0x5c,0xd3,0xa4,0x4c,0x3a,0xb0,0x0e, - 0x09,0xde,0xcd,0x93,0x71,0xd4,0xb3,0xa3,0x8d,0x88, - 0x88,0x5b,0x3b,0x52,0xd2,0xeb,0x60,0x7f,0xac,0xaf, - 0xa6,0xa7,0x2a,0xed,0x7c,0xc0,0x71,0xd8,0x0e,0xca, - 0xb5,0x58,0x21,0xc1,0x5b,0x80,0x57,0x52,0x3e,0xe7, - 0xe2,0x58,0xba,0xff,0xd6,0xd8,0xa2,0x24,0x4d,0x8d, - 0x81,0x9f,0x03,0x2f,0xa7,0x7c,0xbe,0xbc,0x3c,0x85, - 0x5d,0x70,0x7b,0x16,0xf6,0x1b,0x61,0xad,0xbe,0x7e, - 0x8a,0x15,0x21,0xeb,0x7d,0x91,0xba,0x24,0x76,0xd6, - 0x7d,0x4d,0x6c,0x91,0xe6,0x6d,0xc1,0x17,0xdb,0x9b, - 0x58,0xd1,0xb8,0xbe,0x16,0xe4,0x7d,0x19,0x01,0x5c, - 0x87,0xb5,0x47,0x3b,0x17,0xdb,0xed,0x09,0xf5,0x9b, - 0x5f,0x0e,0xdb,0x41,0xfb,0x16,0x8d,0x33,0x25,0xde, - 0x06,0x0e,0xc7,0x1f,0x8c,0xa8,0x5a,0x00,0xf1,0x02, - 0x60,0xb7,0x84,0xdb,0xe7,0x07,0xbe,0x11,0x78,0x8c, - 0xfb,0xb0,0xd6,0x82,0x62,0x45,0xde,0x6e,0xc3,0x02, - 0x4e,0x7d,0x59,0x32,0x70,0xff,0x7b,0x80,0xe9,0x99, - 0xce,0x68,0x4e,0x1d,0x80,0x46,0x8b,0xfc,0x50,0x2d, - 0x8c,0xaa,0xa6,0xff,0x9f,0x05,0x2c,0xec,0x18,0x77, - 0x19,0xe9,0x32,0x96,0x3c,0x7e,0x84,0xbd,0x37,0x2d, - 0x1e,0x18,0xb7,0x08,0x36,0xcf,0x5d,0x32,0x7e,0xfe, - 0xa2,0xe9,0xc4,0x32,0xf4,0x8e,0x69,0xf2,0xfe,0x55, - 0xab,0xfe,0xbf,0x07,0xe9,0xb2,0x3f,0xde,0xc3,0x3a, - 0x4d,0xe4,0xed,0x42,0xb2,0x69,0x61,0x2a,0x22,0x92, - 0x39,0x05,0x00,0xb2,0xf1,0x38,0xf0,0x03,0x2c,0xed, - 0xcc,0x6b,0x08,0xb6,0xd8,0xe8,0x5e,0x70,0x7c,0x80, - 0x2d,0x1c,0x9e,0xc7,0xd2,0xde,0x3f,0xc2,0x52,0x92, - 0x3b,0xb0,0x2a,0xed,0x43,0xb1,0xe0,0xc1,0x28,0x60, - 0x05,0x6c,0x31,0xd2,0x8c,0xdb,0xb1,0x00,0x40,0x59, - 0xcc,0xc6,0x2e,0xda,0x43,0x2d,0x8f,0xba,0xad,0x86, - 0x5d,0xa4,0xce,0xc2,0x16,0xd6,0x93,0xb0,0xe0,0xc8, - 0x62,0x7c,0xf2,0xa2,0xff,0xef,0x14,0x27,0x00,0x00, - 0xd6,0xee,0x6a,0x57,0xac,0x68,0xa4,0xd7,0x66,0x5d, - 0x5f,0x9d,0x58,0x5f,0xd7,0x17,0x80,0xb7,0xb0,0x9f, - 0x9b,0x59,0xd8,0xcf,0xcd,0x62,0x58,0x81,0xc4,0x45, - 0x02,0x8f,0x35,0x0b,0x0b,0x40,0x4c,0xc4,0x7e,0x36, - 0x3d,0xd2,0xcc,0xb5,0x0c,0x6e,0xc4,0x82,0x20,0x49, - 0xbb,0x8c,0xa1,0x14,0xd4,0xba,0x17,0xff,0xeb,0xed, - 0x06,0x1a,0x07,0x00,0x42,0x62,0xa4,0xda,0x4f,0xc1, - 0x76,0x08,0x37,0x69,0xf2,0xfe,0x55,0x0c,0x00,0xec, - 0x41,0xb8,0xa8,0x1c,0xc0,0xbb,0xc4,0x29,0x44,0xfa, - 0x01,0x70,0x30,0x96,0x09,0x15,0xb2,0x33,0x36,0x5f, - 0x4f,0xcd,0x8e,0x32,0x3b,0x8f,0xe6,0x02,0x00,0x4f, - 0x02,0x0f,0x67,0x3c,0x97,0xbc,0x2d,0x9a,0x72,0xfc, - 0x96,0x51,0x66,0x91,0xde,0x23,0x28,0x00,0x20,0x22, - 0x05,0xa5,0x00,0x40,0x76,0x4e,0xc7,0x16,0x5a,0x07, - 0x37,0x79,0xff,0x61,0xd8,0xd9,0xd3,0xa4,0xf3,0xa7, - 0xad,0x7a,0x04,0xbb,0xd0,0x9b,0x1d,0xf1,0x39,0x62, - 0x18,0x83,0x3f,0x00,0xd0,0xad,0x1f,0xb6,0xa3,0x14, - 0xda,0x55,0x2a,0x8a,0xc7,0x81,0xdf,0x01,0x87,0x34, - 0x71,0xdf,0x0e,0x6c,0x37,0x35,0xb4,0xa3,0x9a,0xe4, - 0x28,0xe6,0x54,0xc2,0xf7,0xb6,0xaf,0xf3,0x9e,0xc7, - 0x2c,0x8b,0x99,0x58,0xf0,0xe8,0xc0,0x26,0xef,0x3f, - 0x1d,0x3b,0xa7,0x2a,0x73,0x84,0xea,0x00,0x24,0x89, - 0x75,0xd6,0xfe,0x0e,0x9a,0x0b,0x00,0x3c,0x0f,0x3c, - 0x93,0xf1,0x5c,0xf2,0xd6,0x7d,0x7c,0xcc,0xe3,0xfb, - 0x84,0x33,0x8d,0x9a,0x75,0x75,0xd7,0x97,0xa7,0xc2, - 0xfb,0x19,0x58,0x9a,0xfc,0x84,0x48,0x73,0x29,0x82, - 0xe7,0xb1,0x22,0x8b,0xa1,0x22,0x99,0xbd,0x55,0x6d, - 0xf7,0x5f,0x44,0x44,0x22,0xa8,0x5a,0x0a,0x6f,0xde, - 0x0e,0xa1,0xb8,0xd5,0x8a,0xef,0xc2,0x16,0xd1,0xef, - 0xe5,0x3d,0x91,0x26,0x5c,0x81,0xed,0xcc,0x56,0xdd, - 0x8f,0xb1,0xbe,0xc5,0xed,0x76,0x2a,0x70,0x72,0x8f, - 0xbf,0x77,0xe2,0x2b,0x10,0xe9,0x39,0xf2,0x52,0x36, - 0xad,0xec,0x2c,0x5e,0x47,0x39,0x7f,0xbf,0x62,0x7a, - 0x09,0x78,0xba,0x89,0xfb,0x4d,0xc2,0x8e,0x55,0xc5, - 0x30,0xb6,0xc9,0xfb,0x55,0xb1,0xfd,0xdf,0xb9,0x58, - 0x81,0xb5,0x90,0x9b,0xf1,0x15,0xa7,0x6b,0xc5,0xc1, - 0xf8,0x6a,0x0b,0xcc,0x8f,0xf5,0x82,0xaf,0xba,0x31, - 0x29,0xc7,0x77,0x52,0xfd,0xcc,0x08,0x11,0x11,0xc9, - 0x80,0x02,0x00,0xd9,0xea,0xc4,0xaa,0xaa,0xef,0x43, - 0x71,0x5a,0xa9,0xcd,0xc6,0x16,0x78,0x5f,0x04,0xde, - 0xc9,0x79,0x2e,0xcd,0x9a,0x86,0xbf,0x32,0x7d,0x99, - 0x4d,0xc1,0xce,0x3a,0x7a,0x5a,0x63,0x65,0xe5,0x67, - 0xd8,0xce,0x5e,0x6f,0x49,0xc5,0xdb,0xba,0x85,0xaa, - 0xe1,0x97,0xd1,0xbd,0x58,0x1b,0xbf,0x66,0x28,0xfd, - 0xbf,0x6f,0xcd,0x64,0x01,0xdc,0x49,0xbc,0x42,0x66, - 0xf7,0xd2,0x5c,0x6d,0x81,0xaa,0xa5,0xff,0xef,0x83, - 0xd5,0x90,0x09,0xf9,0x18,0xf8,0x4e,0xe4,0xb9,0x00, - 0xbc,0x86,0xd5,0x03,0xf0,0xf8,0x12,0x70,0x40,0xc4, - 0xb9,0x14,0xc1,0xe5,0x84,0x3b,0x93,0xf4,0x74,0x07, - 0xe9,0x6b,0x09,0x89,0x88,0x48,0x0d,0x29,0x00,0x10, - 0xc7,0x1f,0xb1,0x42,0x6b,0xd7,0xe4,0x3c,0x8f,0xfb, - 0x81,0xcf,0x61,0x0b,0xbc,0x19,0x39,0xcf,0xa5,0x55, - 0x17,0x51,0x8f,0xf4,0xc6,0xd7,0xb0,0x3e,0xf3,0x37, - 0x47,0x7e,0x9e,0x77,0xb1,0x9a,0x03,0x47,0x37,0xb8, - 0xdd,0xb3,0x13,0x37,0x77,0x76,0xd3,0x29,0x94,0x8b, - 0x9a,0xb8,0xcf,0x3b,0x54,0x6f,0x81,0x98,0x95,0x66, - 0x02,0x00,0x31,0x5b,0xed,0x4d,0x01,0x1e,0x6c,0xe2, - 0x3e,0x63,0xb3,0x9f,0x4a,0x6e,0x96,0xc1,0x02,0xc3, - 0x1e,0xc7,0xd0,0x7c,0x50,0x2c,0xad,0x73,0xb0,0xd4, - 0x77,0x8f,0x53,0x80,0xe5,0x23,0xce,0x25,0x6f,0x93, - 0xb0,0x63,0x11,0x5e,0xea,0x3e,0x22,0x22,0x22,0x2e, - 0x0a,0x00,0xc4,0xf3,0x22,0x76,0x9e,0x71,0x03,0xac, - 0x2d,0x4f,0xbb,0x16,0xe0,0xb3,0xb1,0x62,0x66,0x5b, - 0x63,0x55,0xf1,0x1f,0x68,0xd3,0xf3,0xb6,0xc3,0x5e, - 0xd8,0x05,0x62,0xd5,0xbd,0x85,0x15,0x32,0xda,0x1f, - 0x2b,0x64,0x98,0xa5,0x99,0x58,0x20,0x65,0x75,0x6c, - 0x87,0xa9,0x11,0x4f,0x06,0x8b,0xa7,0xe5,0x64,0x19, - 0x35,0x93,0x46,0x7b,0x09,0xe5,0x0f,0xb2,0xc5,0x72, - 0x07,0xfe,0xba,0x12,0xdd,0x62,0x06,0x00,0x20,0xfd, - 0x62,0x7e,0x2c,0xbe,0x63,0x31,0x65,0xd0,0x01,0xfc, - 0x19,0xdf,0xef,0xef,0x83,0xc0,0x6f,0xe2,0x4e,0xe7, - 0x13,0x3a,0x81,0x7d,0xb1,0xac,0xaf,0x90,0xa1,0x58, - 0xb1,0xbc,0x2a,0x5f,0xc7,0x9c,0xe7,0x1c,0x37,0x15, - 0x3b,0x2a,0x27,0x22,0x22,0x12,0x54,0xe5,0x0f,0xce, - 0xa2,0x18,0x07,0xec,0x8e,0x55,0x61,0xff,0x36,0x16, - 0xd1,0xcf,0x3a,0x15,0x7f,0x2a,0xd6,0x0a,0xee,0x70, - 0x60,0x59,0x60,0x2b,0xaa,0x79,0x5e,0x75,0x16,0xb6, - 0x28,0xde,0x05,0x6b,0x0f,0xd8,0xac,0x67,0xf0,0xa5, - 0xb8,0xe7,0xa9,0x13,0x0b,0x76,0x2c,0x87,0xa5,0xdf, - 0x3e,0xd0,0xf5,0x6f,0xcd,0x7a,0x05,0xeb,0x52,0xb1, - 0x22,0xd6,0xca,0xee,0xb5,0xc0,0xf8,0xf7,0x1d,0x8f, - 0x39,0xa2,0x85,0xf9,0x14,0xd9,0x53,0xa4,0xaf,0xa4, - 0xad,0xf4,0xff,0xc6,0xa6,0x60,0x41,0x00,0xaf,0xb7, - 0x81,0xc7,0x22,0xcd,0xa5,0xdb,0xd8,0x94,0xe3,0xab, - 0x94,0xdd,0x71,0x30,0xd6,0x3d,0x24,0x64,0x26,0x76, - 0x4c,0xa0,0xdd,0x3d,0xe5,0xc7,0xe3,0xef,0x54,0xf3, - 0x39,0xe0,0x87,0x11,0xe7,0x92,0xb7,0x5b,0xb1,0x80, - 0x70,0xc8,0xdf,0xf0,0x65,0x6d,0x89,0x88,0x88,0xd0, - 0xd1,0xd9,0xd9,0xca,0x9a,0x42,0x9a,0xd4,0x81,0x2d, - 0xc4,0xd6,0x00,0x56,0x05,0x46,0x02,0x4b,0x61,0x7d, - 0x98,0x17,0xc0,0x76,0x66,0x06,0x61,0x55,0xd6,0x3b, - 0xb1,0xdd,0x90,0xa9,0xd8,0xa2,0xec,0x2d,0xac,0x7d, - 0xdd,0x73,0xd8,0x42,0xf6,0x61,0xac,0xba,0x7f,0xdd, - 0x76,0x1f,0xe7,0xc2,0x2e,0x62,0xb7,0xc0,0x2a,0x7a, - 0x2f,0x06,0x2c,0x08,0xcc,0x83,0x7d,0xbf,0xa6,0x60, - 0x0b,0x89,0xd7,0x81,0xff,0x60,0x8b,0xba,0x27,0xb0, - 0x85,0xb4,0xe7,0x82,0xaa,0x88,0x16,0x06,0x36,0x07, - 0xd6,0xc6,0x7e,0x6e,0x96,0xc4,0xfe,0xbf,0x87,0x62, - 0x3f,0x2f,0x33,0xb1,0x9d,0xfb,0x0f,0xb1,0x0a,0xd9, - 0xff,0xc6,0xda,0x42,0xdd,0x49,0xf5,0x5a,0x43,0x89, - 0x88,0x54,0xdd,0x92,0xd8,0xe7,0x57,0x68,0xb3,0x66, - 0x1b,0xaa,0x15,0xa4,0x92,0xfc,0x9c,0x44,0xb8,0x16, - 0xc7,0xa5,0xcc,0x69,0x61,0x5d,0x36,0x7b,0x61,0x19, - 0x50,0x49,0xae,0x07,0xb6,0x8d,0x3f,0x95,0x28,0x1e, - 0xc1,0xd6,0x16,0x49,0xb6,0x60,0x4e,0xd7,0x27,0xa9, - 0x29,0xb5,0x01,0xcc,0x47,0x27,0x56,0x19,0xbb,0x99, - 0xea,0xd8,0x62,0x66,0x63,0xbb,0x23,0xb7,0xe6,0x3d, - 0x91,0x36,0x9a,0x88,0xa5,0x9a,0x5f,0x92,0xf7,0x44, - 0x44,0x44,0x24,0xba,0x3d,0x09,0x2f,0xfe,0x27,0x60, - 0xc7,0xfe,0x44,0x44,0x44,0x5c,0x74,0x04,0x40,0x44, - 0x44,0x44,0xa4,0x58,0x3a,0x80,0xbd,0x1d,0xe3,0xc6, - 0xd0,0xfe,0x63,0x1a,0x22,0x22,0x52,0x62,0x0a,0x00, - 0x88,0x88,0x88,0x88,0x14,0xcb,0x97,0xb1,0x1a,0x30, - 0x49,0x66,0x03,0xe7,0xb6,0x61,0x2e,0x22,0x22,0x52, - 0x21,0x0a,0x00,0x88,0x88,0x88,0x88,0x14,0xcb,0x41, - 0x8e,0x31,0x37,0x60,0x35,0x02,0x44,0xda,0x49,0x6b, - 0x87,0xe2,0xd2,0x6b,0x23,0x2e,0xfa,0x41,0x11,0x11, - 0x11,0x11,0x29,0x8e,0xd5,0xb0,0x6e,0x3e,0x21,0xa7, - 0xc7,0x9e,0x88,0x48,0x1f,0x86,0xe6,0x3d,0x01,0x69, - 0xa8,0xaa,0xed,0x99,0x25,0x63,0x0a,0x00,0x88,0x88, - 0x88,0x88,0x14,0xc7,0x09,0x84,0xaf,0xcf,0x9e,0x46, - 0xc5,0xff,0x24,0x1f,0x5a,0x64,0x16,0xd7,0x3c,0x79, - 0x4f,0x40,0xca,0x41,0x01,0x00,0x11,0x11,0x11,0x91, - 0x62,0xd8,0x00,0xf8,0x8a,0x63,0xdc,0xa9,0x58,0x47, - 0x21,0x91,0x2c,0x4d,0x77,0x8c,0x59,0x3c,0xfa,0x2c, - 0xa4,0x19,0x43,0x80,0xe1,0x8e,0x71,0x9e,0xd7,0x58, - 0x2a,0x4e,0x01,0x00,0x11,0x11,0x11,0x91,0xfc,0x0d, - 0x00,0xce,0x76,0x8c,0x7b,0x03,0x38,0x3f,0xf2,0x5c, - 0xa4,0x9e,0x3e,0x70,0x8c,0x59,0x16,0x5b,0x6c,0x4a, - 0xb1,0xac,0x82,0x6f,0x5d,0xf7,0x5e,0xec,0x89,0x48, - 0xf1,0x29,0x00,0x20,0x22,0x22,0x22,0x92,0xbf,0xa3, - 0x80,0x35,0x1d,0xe3,0x4e,0x01,0xa6,0x46,0x9e,0x8b, - 0xd4,0x93,0x67,0x71,0x38,0x17,0xbe,0x9f,0x53,0x69, - 0xaf,0x75,0x9d,0xe3,0x14,0x00,0x10,0x05,0x00,0x44, - 0x44,0x44,0x44,0x72,0xf6,0x45,0xe0,0x48,0xc7,0xb8, - 0xd7,0x81,0xb3,0x22,0xcf,0x45,0xea,0xeb,0x5d,0xe7, - 0xb8,0x1d,0xa2,0xce,0x42,0x9a,0xf1,0x55,0xe7,0x38, - 0xef,0x6b,0x2c,0x15,0xa6,0x00,0x80,0x88,0x88,0x88, - 0x48,0x7e,0x56,0x03,0xae,0xc4,0x8e,0x00,0x84,0xfc, - 0x14,0x98,0x12,0x77,0x3a,0x52,0x63,0x8f,0x39,0xc7, - 0xed,0x06,0x0c,0x8c,0x39,0x11,0x49,0x65,0x19,0x60, - 0x73,0xc7,0xb8,0xe7,0x80,0x8f,0x23,0xcf,0x45,0x4a, - 0x40,0x01,0x00,0x11,0x11,0x11,0x91,0x7c,0x6c,0x0c, - 0xdc,0x06,0x0c,0x73,0x8c,0x7d,0x02,0x38,0x37,0xee, - 0x74,0xa4,0xe6,0x5e,0x00,0x26,0x3a,0xc6,0x2d,0x0d, - 0x1c,0x14,0x79,0x2e,0xe2,0x77,0x12,0xd0,0xdf,0x31, - 0xee,0xbe,0xd8,0x13,0x91,0x72,0x50,0x00,0x40,0x44, - 0x44,0x44,0xa4,0xbd,0x06,0x00,0x87,0x01,0xb7,0x02, - 0x23,0x1c,0xe3,0x3b,0x81,0xfd,0x81,0x59,0x31,0x27, - 0x25,0x02,0xdc,0xeb,0x1c,0x77,0x02,0xf0,0xb9,0x98, - 0x13,0x11,0x97,0x83,0xb0,0x8c,0x0c,0x0f,0xef,0x6b, - 0x2b,0x15,0xa7,0x00,0x80,0x88,0x88,0x88,0x48,0x7b, - 0x8c,0x00,0xf6,0xc1,0x76,0xf3,0x4f,0xc5,0x9f,0x46, - 0xfd,0x2b,0xe0,0x9e,0x58,0x93,0x12,0xe9,0xe1,0x62, - 0xe7,0xb8,0xb9,0x81,0xbf,0x03,0x7b,0x01,0x1d,0xd1, - 0x66,0x23,0x8d,0x0c,0x05,0x7e,0x0e,0x9c,0xee,0x1c, - 0x3f,0x0d,0x3b,0x6a,0x24,0xe2,0x4a,0x17,0x11,0x11, - 0x11,0x11,0x11,0x9f,0xe3,0x80,0xdd,0x81,0x57,0x81, - 0xc9,0x58,0xc5,0xfe,0x61,0x58,0xff,0x74,0x6f,0xab, - 0xae,0x9e,0xfe,0x85,0x75,0x08,0x10,0x69,0x87,0xab, - 0x80,0x09,0xc0,0x12,0x8e,0xb1,0xc3,0x80,0x3f,0x03, - 0x87,0x03,0x57,0x03,0xb7,0x63,0x85,0x2a,0xdf,0x01, - 0x66,0xf6,0x18,0xf7,0x7e,0xc6,0x73,0xac,0x83,0xb9, - 0x80,0xf9,0x7a,0xfc,0x7d,0x30,0x16,0x40,0x1c,0x09, - 0x6c,0x89,0x15,0xfd,0x5b,0x34,0xc5,0xe3,0x5d,0x0c, - 0xbc,0x95,0xd5,0xe4,0xa4,0xdc,0x14,0x00,0x10,0x11, - 0x11,0x11,0xc9,0xce,0x20,0x60,0xf9,0xae,0xaf,0x56, - 0xbd,0x01,0xec,0x0c,0x4c,0xcf,0xe0,0xb1,0x44,0x3c, - 0x66,0x02,0xa7,0x61,0xed,0x26,0xbd,0x56,0xef,0xfa, - 0x3a,0xb6,0xc1,0xed,0xf3,0x62,0xc1,0x30,0xf1,0x5b, - 0x11,0x78,0x2a,0xa3,0xc7,0x9a,0x89,0x65,0x1c,0x89, - 0x00,0x3a,0x02,0x20,0x22,0x22,0x22,0x52,0x44,0x93, - 0x81,0x6d,0x80,0x97,0x72,0x9e,0x87,0xd4,0xcf,0x69, - 0xc0,0xfd,0x79,0x4f,0x42,0x32,0x73,0x02,0xf0,0x78, - 0xde,0x93,0x90,0xe2,0x50,0x00,0x40,0x44,0x44,0x44, - 0xa4,0x58,0xde,0x01,0xb6,0x00,0x1e,0xca,0x7b,0x22, - 0x52,0x4b,0x33,0x81,0xaf,0x03,0x1f,0xe6,0x3d,0x11, - 0x69,0xd9,0x7d,0x58,0x00,0x40,0xe4,0xbf,0x14,0x00, - 0x10,0x11,0x11,0x11,0x29,0x8e,0xa7,0x81,0x4d,0xd0, - 0x0e,0xac,0xe4,0xeb,0x79,0x60,0x6b,0x14,0x04,0x28, - 0xb3,0x47,0x80,0xed,0x50,0xf7,0x10,0xe9,0x45,0x01, - 0x00,0x11,0x11,0x11,0x91,0xfc,0xcd,0x06,0xce,0x04, - 0xd6,0x26,0xbb,0xb3,0xbf,0x22,0xad,0xb8,0x1b,0xd8, - 0x00,0xa5,0x8f,0x97,0xd1,0x85,0xc0,0xc6,0x58,0x36, - 0x91,0xc8,0x27,0x28,0x00,0x20,0x22,0x22,0x22,0x92, - 0x9f,0xe9,0xc0,0xa5,0x58,0x11,0xb5,0x83,0x80,0x8f, - 0xf3,0x9d,0x8e,0xc8,0x27,0x3c,0x85,0x05,0xa5,0xbe, - 0x8b,0xea,0x51,0x94,0xc1,0x5d,0xd8,0xf1,0xa1,0xaf, - 0x03,0x1f,0xe5,0x3c,0x17,0x29,0x28,0x75,0x01,0x10, - 0x11,0x11,0x11,0xc9,0xce,0x75,0x58,0x7b,0xb4,0x15, - 0x81,0xa5,0x80,0x05,0x81,0x79,0x80,0x01,0xd8,0x62, - 0xff,0x7d,0xac,0xcd,0xda,0x43,0xc0,0x3d,0xc0,0x35, - 0xa8,0x4d,0x9a,0x14,0xdb,0x4c,0xe0,0x0c,0x2c,0x43, - 0x65,0x63,0xac,0x0d,0xdd,0x7a,0x58,0xa7,0x8b,0x85, - 0x81,0x21,0x68,0x53,0xb1,0xdd,0x66,0x62,0x0b,0xfc, - 0x09,0xd8,0xb1,0xa1,0x7b,0x81,0x6b,0x81,0x67,0xf3, - 0x9c,0x94,0x94,0x83,0x02,0x00,0x22,0x22,0x22,0x22, - 0xd9,0xb9,0xbb,0xeb,0x4b,0xa4,0x6a,0x66,0x03,0x77, - 0x76,0x7d,0x49,0x5c,0xe3,0x81,0x8e,0xbc,0x27,0x21, - 0xd5,0xd4,0xd1,0xd9,0xd9,0x99,0xf7,0x1c,0x44,0x44, - 0x44,0x44,0x44,0x44,0x44,0x24,0x32,0xa5,0xeb,0x88, - 0x88,0x88,0x88,0x88,0x88,0x88,0xd4,0x80,0x02,0x00, - 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x35,0xa0,0x00, - 0x80,0x88,0x88,0x88,0x88,0x88,0x88,0x48,0x0d,0x28, - 0x00,0x20,0x22,0x22,0x22,0x22,0x22,0x22,0x52,0x03, - 0x0a,0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0xd4, - 0x80,0x02,0x00,0x22,0x22,0x22,0x22,0x22,0x22,0x22, - 0x35,0xa0,0x00,0x80,0x88,0x88,0x88,0x88,0x88,0x88, - 0x48,0x0d,0x28,0x00,0x20,0x22,0x22,0x22,0x22,0x22, - 0x22,0x52,0x03,0x0a,0x00,0x88,0x88,0x88,0x88,0x88, - 0x88,0x88,0xd4,0x80,0x02,0x00,0x22,0x22,0x22,0x22, - 0x22,0x22,0x22,0x35,0xa0,0x00,0x80,0x88,0x88,0x88, - 0x88,0x88,0x88,0x48,0x0d,0x28,0x00,0x20,0x22,0x22, - 0x22,0x22,0x22,0x22,0x52,0x03,0x0a,0x00,0x88,0x88, - 0x88,0x88,0x88,0x88,0x88,0xd4,0x80,0x02,0x00,0x22, - 0x22,0x22,0x22,0x22,0x22,0x22,0x35,0xa0,0x00,0x80, - 0x88,0x88,0x88,0x88,0x88,0x88,0x48,0x0d,0x28,0x00, - 0x20,0x22,0x22,0x22,0x22,0x22,0x22,0x52,0x03,0x0a, - 0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0xd4,0x80, - 0x02,0x00,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x35, - 0xa0,0x00,0x80,0x88,0x88,0x88,0x88,0x88,0x88,0x48, - 0x0d,0x28,0x00,0x20,0x22,0x22,0x22,0x22,0x22,0x22, - 0x52,0x03,0x0a,0x00,0x88,0x88,0x88,0x88,0x88,0x88, - 0x88,0xd4,0x80,0x02,0x00,0x22,0x22,0x22,0x22,0x22, - 0x22,0x22,0x35,0xa0,0x00,0x80,0x88,0x88,0x88,0x88, - 0x88,0x88,0x48,0x0d,0x28,0x00,0x20,0x22,0x22,0x22, - 0x22,0x22,0x22,0x52,0x03,0x0a,0x00,0x88,0x88,0x88, - 0x88,0x88,0x88,0x88,0xd4,0x80,0x02,0x00,0x22,0x22, - 0x22,0x22,0x22,0x22,0x22,0x35,0xa0,0x00,0x80,0x88, - 0x88,0x88,0x88,0x88,0x88,0x48,0x0d,0x28,0x00,0x20, - 0x22,0x22,0x22,0x22,0x22,0x22,0x52,0x03,0xff,0x1f, - 0xea,0xa1,0x1e,0x4b,0xa7,0x92,0x5a,0xfd,0x00,0x00, - 0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x06, 0x00, 0x00, 0x00, 0x7f, 0x1d, 0x2b, + 0x83, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64, + 0x88, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, 0x00, 0x00, 0x0e, + 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x20, 0x00, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, + 0xec, 0xdd, 0x75, 0x98, 0x64, 0xd5, 0xb5, 0xf7, 0xf1, 0x6f, 0xcf, 0x0c, 0xe3, 0x0c, 0x0c, 0xee, + 0xee, 0x36, 0x78, 0x70, 0x4f, 0x08, 0x71, 0x1c, 0x82, 0x5c, 0x9c, 0x10, 0x1c, 0x12, 0x08, 0xee, + 0x12, 0x1c, 0x42, 0x20, 0x78, 0x90, 0x10, 0x08, 0x1a, 0x20, 0x09, 0x10, 0xdc, 0x5d, 0x07, 0x08, + 0x0e, 0x83, 0x3b, 0x0c, 0x33, 0x8c, 0x4f, 0xbf, 0x7f, 0xac, 0xee, 0x97, 0xa1, 0xa9, 0x3a, 0x7b, + 0x9d, 0xaa, 0xe3, 0xe7, 0xf7, 0x79, 0x9e, 0x7e, 0xee, 0x0d, 0xb5, 0xbb, 0xce, 0x9e, 0xea, 0xee, + 0xaa, 0xb3, 0xd7, 0x5e, 0x7b, 0xad, 0x8e, 0xce, 0xce, 0x4e, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, + 0x44, 0xa4, 0xda, 0x7a, 0xe5, 0x3d, 0x01, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x49, 0x9f, + 0x02, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, 0xa0, 0x00, 0x80, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x48, 0x0d, 0x28, 0x00, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x03, + 0x0a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, 0x80, 0x02, 0x00, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x35, 0xa0, 0x00, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x0d, + 0x28, 0x00, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x03, 0x0a, 0x00, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0xd4, 0x80, 0x02, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, + 0xa0, 0x00, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x0d, 0x28, 0x00, 0x20, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x52, 0x03, 0x0a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, + 0x80, 0x02, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, 0xa0, 0x00, 0x80, 0x88, 0x64, + 0xe1, 0x09, 0xa0, 0xb3, 0xc1, 0xd7, 0xc4, 0x3c, 0x27, 0x25, 0x22, 0x22, 0x22, 0x22, 0x52, 0x27, + 0x0a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, 0x80, 0x02, 0x00, 0x22, 0x22, 0x22, + 0x22, 0xf5, 0x74, 0x21, 0x8d, 0xb3, 0xb3, 0xa6, 0xfc, 0xfa, 0x1f, 0x30, 0x34, 0xaf, 0x09, 0xf6, + 0x30, 0x14, 0x78, 0x99, 0xf0, 0x9c, 0x2f, 0xc8, 0x6b, 0x82, 0x22, 0x22, 0x45, 0xa7, 0x00, 0x80, + 0x88, 0x88, 0x88, 0x48, 0xfd, 0x1c, 0x01, 0xec, 0x18, 0x18, 0xf3, 0x29, 0xf0, 0x53, 0xe0, 0x8b, + 0xf4, 0xa7, 0xe3, 0xf2, 0x05, 0xf0, 0x33, 0xe0, 0xf3, 0xc0, 0xb8, 0x9d, 0x80, 0xc3, 0xd2, 0x9f, + 0x8e, 0x88, 0x48, 0xf9, 0x28, 0x00, 0x20, 0x22, 0x22, 0x22, 0x52, 0x2f, 0xdb, 0x01, 0x47, 0x06, + 0xc6, 0x8c, 0x03, 0x36, 0x04, 0x5e, 0x4f, 0x7b, 0x32, 0x31, 0xbd, 0x0a, 0x6c, 0x04, 0x8c, 0x0f, + 0x8c, 0x3b, 0x1a, 0xf8, 0xbf, 0xf4, 0xa7, 0x23, 0x22, 0x52, 0x2e, 0x1d, 0x9d, 0x9d, 0x9d, 0x79, + 0xcf, 0x41, 0x44, 0xaa, 0xef, 0x09, 0x60, 0xb9, 0x06, 0xff, 0x7d, 0x12, 0xd0, 0x27, 0xe3, 0xb9, + 0x94, 0xc5, 0xfc, 0xc0, 0xba, 0xc0, 0x2a, 0xc0, 0x42, 0xc0, 0xdc, 0xc0, 0xd4, 0xc0, 0x40, 0xec, + 0xc6, 0xfc, 0x6b, 0x60, 0x04, 0xf0, 0x0a, 0xf0, 0x20, 0x70, 0x3b, 0xc5, 0xbb, 0x51, 0x97, 0x6c, + 0x2d, 0x08, 0xac, 0x09, 0x0c, 0x03, 0x16, 0x01, 0x66, 0x07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0x9d, 0x63, 0xbf, + 0xc0, 0xba, 0x02, 0x0c, 0xc3, 0x82, 0x45, 0xab, 0x62, 0x99, 0x26, 0x5b, 0x63, 0xe9, 0xcf, 0xab, + 0x62, 0x9d, 0x00, 0x96, 0xc7, 0xba, 0x4c, 0x8c, 0x71, 0x3c, 0xe7, 0x54, 0xc0, 0xa5, 0x94, 0xf3, + 0xef, 0x2c, 0xa4, 0xea, 0x19, 0x00, 0x3b, 0x62, 0xc7, 0xa8, 0x42, 0xf6, 0xc6, 0x82, 0x00, 0x65, + 0xf6, 0x01, 0xe1, 0xf7, 0x19, 0xb0, 0x63, 0x51, 0x3b, 0xa6, 0x3c, 0x97, 0x22, 0x53, 0x06, 0x80, + 0x48, 0xcd, 0x29, 0x00, 0x90, 0xbf, 0xa4, 0x17, 0xec, 0x3a, 0x02, 0xa0, 0x02, 0x80, 0x49, 0x39, + 0x16, 0x5b, 0x78, 0xa6, 0x75, 0xbe, 0x3f, 0x29, 0xbf, 0xc0, 0x76, 0x36, 0xa3, 0x0a, 0x40, 0x15, + 0xcd, 0x02, 0xc0, 0xb6, 0x81, 0x31, 0xfb, 0x62, 0x0b, 0xb9, 0x49, 0x81, 0x71, 0x9d, 0x5d, 0xe3, + 0x0e, 0x0d, 0x8c, 0x3b, 0x04, 0xcb, 0x20, 0xc8, 0xda, 0x54, 0x58, 0xda, 0x6d, 0x54, 0xd1, 0xd9, + 0x3b, 0x81, 0xf3, 0xb3, 0x99, 0x4e, 0x29, 0x9d, 0x86, 0x1d, 0xa1, 0x08, 0xb9, 0x0c, 0x98, 0x1b, + 0x0b, 0x08, 0x3d, 0x47, 0xf3, 0x23, 0x66, 0x93, 0xb0, 0x4a, 0xef, 0xbf, 0xc1, 0x8e, 0x87, 0x3c, + 0xe0, 0x78, 0xee, 0xf9, 0xf0, 0x9d, 0x21, 0x2f, 0x9b, 0x2a, 0x07, 0x00, 0x66, 0xc3, 0x7e, 0x77, + 0x42, 0xfe, 0x05, 0x5c, 0x99, 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0xcd, 0x22, 0x28, 0x7b, 0x00, 0x60, 0x71, 0xac, 0xf0, + 0x69, 0xc8, 0x5d, 0xd4, 0xb7, 0xf5, 0xe6, 0x70, 0xe0, 0x21, 0x60, 0x95, 0xc0, 0xb8, 0x35, 0xb1, + 0xd7, 0xb3, 0xe8, 0xc1, 0xca, 0x31, 0xc0, 0x9d, 0x5d, 0x5f, 0x60, 0x99, 0x01, 0xab, 0x63, 0x19, + 0x3c, 0x6b, 0x03, 0xcb, 0x90, 0xfc, 0x26, 0xdf, 0x64, 0xec, 0xbd, 0xfc, 0xee, 0xae, 0xaf, 0xfb, + 0x29, 0xfe, 0xdf, 0x86, 0x88, 0x34, 0x50, 0xa5, 0x00, 0x40, 0x27, 0x16, 0x8d, 0x0c, 0xfd, 0x9b, + 0x8a, 0x16, 0x00, 0x48, 0xba, 0xfa, 0xf0, 0x04, 0xec, 0xdf, 0xd8, 0x37, 0xc1, 0xe7, 0x2c, 0x83, + 0x2c, 0xd2, 0xff, 0xa1, 0xba, 0x1d, 0x00, 0xbc, 0xbb, 0x07, 0x51, 0xe7, 0xbb, 0xb3, 0xf4, 0x08, + 0xf6, 0x33, 0x7f, 0x8e, 0x72, 0xa5, 0xb3, 0x86, 0x32, 0x2d, 0x92, 0x4a, 0x35, 0x0e, 0x05, 0x02, + 0x93, 0xdc, 0x39, 0xde, 0x05, 0x58, 0x37, 0xe2, 0xf1, 0x09, 0x58, 0xea, 0x7f, 0xd5, 0x5b, 0x8e, + 0xa5, 0x21, 0x54, 0x13, 0x62, 0x30, 0xb0, 0x00, 0xc9, 0x2c, 0xea, 0x36, 0x23, 0x7c, 0x7e, 0x77, + 0x04, 0x76, 0xe3, 0x5f, 0x35, 0x65, 0xef, 0x02, 0xb0, 0x9d, 0x73, 0xdc, 0x5f, 0x53, 0x9c, 0x43, + 0x19, 0x5c, 0x42, 0x38, 0x00, 0x00, 0xb0, 0x2d, 0x70, 0x60, 0xca, 0x73, 0x49, 0xda, 0x28, 0xac, + 0xd0, 0xdf, 0x7f, 0xba, 0xfe, 0xf7, 0xb4, 0x58, 0x30, 0xa3, 0x3b, 0x20, 0xb0, 0x04, 0xf1, 0xd3, + 0xfe, 0x3b, 0xb1, 0xcf, 0xd8, 0xee, 0x05, 0xff, 0x7d, 0x84, 0xb3, 0x92, 0x44, 0xa4, 0x04, 0xaa, + 0x74, 0x04, 0x00, 0x7c, 0x8b, 0xfb, 0xa2, 0x05, 0x00, 0xd2, 0xd8, 0x79, 0x28, 0xfb, 0x6e, 0x46, + 0x2b, 0xb2, 0x28, 0x00, 0xd8, 0x41, 0xf3, 0x33, 0xe5, 0x65, 0x0f, 0x00, 0x78, 0x17, 0xd1, 0x9e, + 0x33, 0xa6, 0x59, 0x98, 0x84, 0xfd, 0x6c, 0xcb, 0xb4, 0xf8, 0x87, 0xf0, 0x91, 0x84, 0xa4, 0xb2, + 0x55, 0x42, 0x67, 0xc7, 0x93, 0x3a, 0x1a, 0x31, 0x07, 0x70, 0x72, 0x60, 0xcc, 0x09, 0xc0, 0xb3, + 0x09, 0x5d, 0xaf, 0x6e, 0x9e, 0x73, 0x8c, 0x59, 0x21, 0x81, 0xeb, 0xac, 0x8a, 0xaf, 0x30, 0xdc, + 0xc9, 0x54, 0xb3, 0x7d, 0x63, 0x99, 0x3f, 0x33, 0x7b, 0xe1, 0x2b, 0xbc, 0x36, 0x06, 0xf8, 0x67, + 0xca, 0x73, 0x29, 0xba, 0xeb, 0xb1, 0x80, 0x64, 0xc8, 0x96, 0xa4, 0x73, 0x46, 0x3e, 0x4b, 0x5f, + 0x62, 0x3f, 0xef, 0xbd, 0xb1, 0xf6, 0x7c, 0x33, 0x63, 0xdd, 0x03, 0x3c, 0x59, 0x66, 0x9f, 0x00, + 0x1b, 0x63, 0x19, 0x46, 0x4b, 0x63, 0x2d, 0x12, 0x6f, 0x42, 0x8b, 0x7f, 0x91, 0xca, 0x50, 0x00, + 0x20, 0x7f, 0x69, 0xdc, 0x78, 0x84, 0x76, 0xff, 0x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 0xea, 0x67, + 0x10, 0xa5, 0x03, 0xd8, 0x07, 0xb8, 0x15, 0x98, 0x3a, 0x30, 0x76, 0x32, 0xb0, 0x33, 0xc5, 0x2b, + 0xa2, 0x9b, 0x94, 0x32, 0x77, 0x01, 0xd8, 0xd8, 0x39, 0xee, 0x9a, 0x54, 0x67, 0x51, 0x1e, 0xff, + 0x70, 0x8e, 0xf3, 0xbe, 0xae, 0x65, 0xb1, 0x0e, 0xfe, 0x16, 0xba, 0x00, 0x67, 0x02, 0xc3, 0x52, + 0x9a, 0x8b, 0x88, 0xe4, 0x4c, 0x01, 0x80, 0xfc, 0x7d, 0x8c, 0xdd, 0x88, 0x35, 0xfb, 0xda, 0xac, + 0x85, 0xe7, 0x5c, 0x2c, 0xe2, 0xf9, 0x42, 0x3b, 0x90, 0x52, 0x4f, 0xdf, 0x60, 0x3b, 0x7c, 0x21, + 0x6b, 0x62, 0xc5, 0x85, 0xa4, 0x35, 0xa1, 0x1d, 0xfe, 0x66, 0xbd, 0x99, 0xe3, 0x4a, 0xbb, 0x16, + 0xca, 0xac, 0xc0, 0xe9, 0x81, 0x31, 0x27, 0x63, 0x59, 0x3d, 0xd2, 0x9e, 0xd0, 0x99, 0xfb, 0x45, + 0xb1, 0xa2, 0x65, 0x71, 0xcc, 0x8d, 0x15, 0xd2, 0x3c, 0x1d, 0x5f, 0x30, 0xe8, 0x48, 0xe0, 0xde, + 0x98, 0xd7, 0x28, 0x93, 0x7f, 0x13, 0xfd, 0x39, 0x7c, 0x52, 0x7e, 0x53, 0x0b, 0xfa, 0x99, 0x63, + 0xcc, 0x44, 0xec, 0xe7, 0x2d, 0x96, 0xed, 0xe2, 0xe9, 0xd8, 0xf3, 0xf3, 0xb4, 0x27, 0x92, 0xa1, + 0xd9, 0x81, 0xab, 0x88, 0xf7, 0xf9, 0xd2, 0x1f, 0x0b, 0x96, 0x84, 0x82, 0x83, 0x22, 0x52, 0x42, + 0x0a, 0x00, 0x88, 0x48, 0xb7, 0xfb,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dd, 0x95, 0x62, 0x0e, 0x2c, 0x35, 0xbd, 0x0c, 0x16, 0xc6, 0x7e, 0x76, 0x9e, 0x96, 0x6e, 0xdd, + 0x26, 0x60, 0xe7, 0x7d, 0x17, 0xc1, 0x0a, 0x7b, 0x85, 0xec, 0x86, 0xa5, 0xed, 0x26, 0x6d, 0x0e, + 0x60, 0x58, 0x60, 0x4c, 0xa8, 0x46, 0x84, 0xb4, 0x66, 0x66, 0xe7, 0xb8, 0x0f, 0x52, 0x9d, 0x45, + 0xf9, 0x79, 0x33, 0x00, 0xbc, 0xaf, 0xb7, 0x88, 0x48, 0x29, 0x28, 0x00, 0x20, 0x65, 0x95, 0x45, + 0x00, 0x60, 0x10, 0x8d, 0x17, 0x5f, 0x93, 0xb0, 0x4c, 0x03, 0x89, 0xd6, 0x89, 0xb5, 0x64, 0x3c, + 0x8b, 0x6c, 0xaa, 0x05, 0x6f, 0x86, 0xf5, 0xa3, 0x9f, 0x31, 0x83, 0x6b, 0x25, 0xe1, 0x2a, 0xc2, + 0x1d, 0x01, 0x7e, 0x80, 0x75, 0x61, 0xf8, 0x27, 0x96, 0x96, 0xbf, 0x16, 0x76, 0x2c, 0x65, 0x2d, + 0xec, 0xac, 0xe7, 0x9d, 0x58, 0x90, 0x20, 0x74, 0x26, 0xf8, 0x44, 0x2c, 0x53, 0x22, 0xca, 0x2a, + 0xd8, 0x19, 0xfa, 0x28, 0xbf, 0xc5, 0xba, 0x33, 0x84, 0xfc, 0x38, 0xf0, 0xf8, 0xd5, 0xb4, 0x97, + 0xa9, 0x73, 0x75, 0xe0, 0xf1, 0x9f, 0xb6, 0xf1, 0xdc, 0x59, 0x99, 0x1f, 0xfb, 0x7d, 0xf5, 0xee, + 0xe6, 0x82, 0x05, 0x4d, 0x16, 0xc0, 0x32, 0x5e, 0x5e, 0xc5, 0xda, 0x34, 0x86, 0xea, 0x27, 0xf4, + 0xc6, 0x8a, 0xf4, 0x25, 0xcd, 0xf3, 0x1a, 0x87, 0x7e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f, 0x5a, + 0x74, 0xa4, 0x42, 0x44, 0x6a, 0x47, 0x01, 0x00, 0x11, 0x29, 0xab, 0x83, 0xf1, 0x9d, 0x33, 0xfe, + 0x41, 0xda, 0x13, 0x29, 0x99, 0xc5, 0x80, 0xc3, 0x03, 0x63, 0xf6, 0xc3, 0x32, 0x10, 0x5a, 0x11, + 0x6a, 0x7b, 0x93, 0x54, 0x75, 0xf2, 0xd1, 0x81, 0xc7, 0x87, 0x26, 0x74, 0x9d, 0x24, 0xac, 0x8c, + 0xd5, 0xa4, 0x08, 0x39, 0x23, 0x81, 0x6b, 0x7d, 0x84, 0x65, 0x1b, 0x84, 0xf4, 0xc2, 0xce, 0xea, + 0xcf, 0x1e, 0xe3, 0xb9, 0xf7, 0x0b, 0x3c, 0xfe, 0x21, 0x96, 0x81, 0x20, 0xe9, 0x51, 0xca, 0x7a, + 0xb2, 0x14, 0x00, 0x10, 0x91, 0xda, 0xa9, 0x5a, 0x84, 0x58, 0x01, 0x00, 0x91, 0xfa, 0x78, 0x09, + 0x3b, 0x1b, 0xbf, 0x52, 0x60, 0x5c, 0x11, 0xab, 0xc1, 0xe7, 0xa5, 0x37, 0x96, 0xfa, 0x1f, 0xd5, + 0xc2, 0xed, 0x36, 0xda, 0x3b, 0x76, 0x10, 0x6a, 0x97, 0x95, 0x54, 0x0d, 0x8d, 0x6f, 0xda, 0x9c, + 0x47, 0x96, 0xd6, 0x76, 0x8c, 0x79, 0x07, 0xb8, 0x33, 0xa1, 0xeb, 0x5d, 0x0b, 0x5c, 0x49, 0xb8, + 0xe6, 0xc0, 0x8c, 0xc0, 0x55, 0xd8, 0xfc, 0x42, 0x67, 0xc6, 0x57, 0xc3, 0x02, 0x19, 0x51, 0xce, + 0x43, 0x0b, 0xa5, 0xb4, 0x79, 0x5f, 0xdf, 0x50, 0x9b, 0x46, 0x31, 0x0a, 0x00, 0x88, 0xd4, 0xc7, + 0x44, 0xe0, 0xde, 0x8c, 0xaf, 0x57, 0x48, 0x75, 0x0b, 0x00, 0x74, 0xa2, 0x37, 0x71, 0x91, 0x2a, + 0xb9, 0x9d, 0x70, 0x00, 0x60, 0x7a, 0xac, 0x6e, 0x44, 0x68, 0xc7, 0xb8, 0x0e, 0xf6, 0x03, 0x56, + 0x8c, 0x78, 0x7c, 0x24, 0xb0, 0x73, 0x9b, 0xd7, 0x08, 0xdd, 0x50, 0x27, 0xf5, 0x81, 0x18, 0x2a, + 0x04, 0x59, 0xa4, 0x05, 0x50, 0xb3, 0xce, 0x25, 0x53, 0xba, 0x2f, 0xe1, 0x6b, 0xee, 0x01, 0xac, + 0x01, 0xcc, 0x11, 0x18, 0xb7, 0x1a, 0x76, 0x14, 0x2b, 0x54, 0x10, 0xf2, 0xc8, 0xc0, 0x69, 0x86, + 0xf4, 0x51, 0x00, 0x00, 0x20, 0x00, 0x49, 0x44, 0x41, 0x54, 0xe3, 0xdf, 0xe0, 0x6b, 0x45, 0x28, + 0xed, 0x19, 0x83, 0xdd, 0xcb, 0x74, 0x04, 0xc6, 0x0d, 0xce, 0x60, 0x2e, 0x55, 0x30, 0xb5, 0x63, + 0x4c, 0x27, 0xad, 0xd7, 0xe5, 0x10, 0x91, 0xe2, 0x18, 0x85, 0xb5, 0x48, 0xae, 0xbd, 0xba, 0x1d, + 0x01, 0xd0, 0xe2, 0x5f, 0xa4, 0x5a, 0x9a, 0xd5, 0x84, 0xe8, 0x29, 0x54, 0x98, 0xae, 0x0e, 0x16, + 0x02, 0x8e, 0x0a, 0x8c, 0x39, 0x00, 0xdb, 0x89, 0x6e, 0x47, 0x28, 0xb0, 0x1c, 0xb7, 0xbd, 0x61, + 0x33, 0xa1, 0x40, 0x42, 0x91, 0x52, 0xa0, 0x17, 0x76, 0x8c, 0x49, 0xba, 0x50, 0xe5, 0x17, 0x58, + 0xdd, 0x81, 0xc9, 0x8e, 0xb1, 0x07, 0x60, 0x9d, 0x24, 0x9a, 0x59, 0x15, 0x58, 0x37, 0xf0, 0x1c, + 0x17, 0x12, 0x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33, 0x1a, 0xf8, 0x38, 0xed, 0x89, 0x14, 0xd4, 0xae, 0x44, 0xb7, + 0xa0, 0x1b, 0x03, 0xec, 0x48, 0xb2, 0xc1, 0xad, 0x50, 0x2a, 0x7b, 0x52, 0x69, 0xc9, 0xd3, 0x07, + 0x1e, 0xff, 0x34, 0xa1, 0xeb, 0xb4, 0x6b, 0x32, 0xbe, 0x20, 0xc0, 0x8c, 0x29, 0xcf, 0xe3, 0x5f, + 0x84, 0x77, 0xf3, 0xbb, 0x6d, 0x88, 0xb5, 0x07, 0xdc, 0x33, 0x30, 0xee, 0x53, 0x7c, 0x35, 0x06, + 0x24, 0x59, 0xef, 0x39, 0xc7, 0x29, 0x00, 0x10, 0xcd, 0xfb, 0xfa, 0x78, 0x5f, 0x6f, 0x11, 0x91, + 0x52, 0x50, 0x00, 0x40, 0xca, 0x22, 0xab, 0x00, 0x40, 0xb3, 0x0c, 0x00, 0xcf, 0x19, 0xda, 0xb2, + 0xb9, 0x17, 0xdf, 0x59, 0xd2, 0xf9, 0x88, 0xae, 0x10, 0x9e, 0xa7, 0x9f, 0x38, 0xc6, 0x54, 0xed, + 0xe8, 0x86, 0xd7, 0x9c, 0xc0, 0x49, 0x81, 0x31, 0x87, 0x62, 0x47, 0x40, 0x92, 0x14, 0x4a, 0x4f, + 0x9e, 0x29, 0xa1, 0xeb, 0x84, 0x3a, 0x3b, 0x14, 0x69, 0xd7, 0xce, 0x53, 0xac, 0x72, 0x81, 0xd4, + 0x67, 0x61, 0x3f, 0xef, 0xff, 0x3a, 0xc7, 0x6e, 0x46, 0x38, 0xf0, 0x77, 0x08, 0x2a, 0x90, 0x96, + 0x07, 0x6f, 0xa7, 0x8e, 0x79, 0xd2, 0x9c, 0x44, 0x05, 0xcc, 0xed, 0x1c, 0xf7, 0x6e, 0xaa, 0xb3, + 0x10, 0x11, 0xc9, 0x98, 0x02, 0x00, 0x52, 0x16, 0x59, 0x04, 0x00, 0x06, 0x61, 0x35, 0x00, 0x1a, + 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xe6, + 0x35, 0x92, 0x74, 0xaf, 0x73, 0xdc, 0x1f, 0x52, 0x9d, 0xc5, 0x77, 0xfd, 0x03, 0x0b, 0xa4, 0xc5, + 0xf5, 0x0e, 0x70, 0x50, 0xc2, 0x73, 0x91, 0x78, 0x3a, 0x81, 0x17, 0x1d, 0xe3, 0x06, 0x93, 0x5c, + 0xc6, 0x4d, 0xd5, 0x2c, 0x88, 0xef, 0x7d, 0xe8, 0x45, 0xaa, 0xd7, 0x01, 0x48, 0x44, 0x6a, 0x4e, + 0x01, 0x00, 0x29, 0x03, 0x75, 0x00, 0x48, 0xd7, 0xed, 0xc0, 0xad, 0x31, 0xc6, 0x1f, 0x09, 0x5c, + 0x4b, 0xf6, 0x15, 0xa6, 0x87, 0x02, 0x17, 0x11, 0xde, 0xdd, 0xee, 0x36, 0x0a, 0x38, 0x39, 0xbd, + 0xe9, 0x14, 0xd2, 0xaf, 0x81, 0x5f, 0x44, 0x3c, 0x3e, 0x1e, 0x3b, 0x1e, 0x30, 0x29, 0xe5, 0x79, + 0x44, 0xed, 0x0e, 0xf7, 0x01, 0x56, 0x69, 0xf3, 0xf9, 0xd7, 0x20, 0xfa, 0xf3, 0xeb, 0x41, 0x60, + 0x62, 0x9b, 0xd7, 0x48, 0xd2, 0xdb, 0xf8, 0x32, 0x6d, 0xd6, 0x01, 0x36, 0x4e, 0x79, 0x2e, 0x53, + 0x3a, 0x0a, 0xb8, 0x3e, 0xe6, 0xf7, 0x3c, 0x88, 0xfd, 0x6d, 0x49, 0xbe, 0x9e, 0x72, 0x8e, 0x5b, + 0x3a, 0xd5, 0x59, 0x94, 0x97, 0xa7, 0x83, 0x0c, 0xc0, 0x93, 0xa9, 0xce, 0x42, 0x44, 0x24, 0x07, + 0x0a, 0x00, 0x48, 0x19, 0x64, 0x11, 0x00, 0x98, 0x99, 0xc6, 0x45, 0xc5, 0xc6, 0x00, 0xcf, 0x26, + 0x78, 0x9d, 0xa2, 0xda, 0x15, 0x18, 0x19, 0x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 0xcf, 0xf6, 0x7f, 0x05, 0x1e, + 0xdf, 0x8c, 0xd6, 0x6f, 0x08, 0x06, 0x02, 0x9b, 0x44, 0x3c, 0xde, 0x89, 0xbf, 0xbb, 0x45, 0x96, + 0x2e, 0xc1, 0x0a, 0xf0, 0x85, 0x4c, 0x8f, 0x05, 0x50, 0x66, 0x49, 0x77, 0x3a, 0xfc, 0x02, 0xab, + 0x4d, 0x30, 0x4f, 0x0b, 0xdf, 0x7b, 0x10, 0x76, 0xd4, 0x24, 0xd4, 0x26, 0x50, 0xd2, 0xe3, 0x0d, + 0x80, 0xaf, 0x94, 0xea, 0x2c, 0xca, 0xab, 0x59, 0xc6, 0x5f, 0x4f, 0x49, 0xde, 0x67, 0x88, 0x88, + 0x14, 0x82, 0x22, 0x32, 0x52, 0x74, 0x8b, 0x61, 0xe7, 0x18, 0x7b, 0x7a, 0x99, 0x78, 0x3b, 0xd6, + 0x21, 0xcd, 0x6e, 0x06, 0xaa, 0x7e, 0xfe, 0x7f, 0x4a, 0x57, 0x62, 0x8b, 0x6e, 0xef, 0xf9, 0xfa, + 0x6e, 0x03, 0xb1, 0x82, 0x62, 0xdb, 0x61, 0x29, 0xe6, 0x8f, 0x63, 0x0b, 0x8b, 0xd7, 0xb1, 0xc5, + 0xfb, 0x08, 0x6c, 0x17, 0xbf, 0x99, 0xd9, 0xb1, 0xd6, 0x70, 0x73, 0x61, 0x8b, 0x91, 0x95, 0x80, + 0xd5, 0x81, 0x19, 0x62, 0xce, 0xa3, 0xdb, 0xfb, 0xd8, 0x02, 0x31, 0xed, 0x34, 0xf7, 0x22, 0xd9, + 0x84, 0xe8, 0x45, 0xf1, 0x44, 0x2c, 0xf5, 0x3f, 0xab, 0x7a, 0x08, 0xaf, 0x63, 0xbf, 0x03, 0xcd, + 0x52, 0xfd, 0x67, 0x03, 0x36, 0x05, 0xfe, 0xde, 0xc2, 0x73, 0xef, 0x44, 0x74, 0x8d, 0x83, 0x7b, + 0x80, 0x37, 0x5b, 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0x63, 0x73, 0xbe, 0xbf, 0xf8, 0x07, 0xb8, 0x13, 0x2d, 0xfe, 0x0b, 0x49, 0x19, 0x00, 0x22, 0x22, + 0x22, 0x22, 0xd5, 0xd1, 0x07, 0x6b, 0x1b, 0xb9, 0x50, 0x60, 0xdc, 0x7b, 0x58, 0xe1, 0xae, 0xd1, + 0xa9, 0xcf, 0x28, 0x7b, 0x53, 0x63, 0xbb, 0xff, 0xb3, 0x04, 0xc6, 0xbd, 0x04, 0x2c, 0x89, 0x65, + 0xa3, 0x89, 0x48, 0x6b, 0x9a, 0x65, 0x79, 0xee, 0x08, 0x5c, 0x9c, 0xf1, 0x5c, 0xc4, 0x41, 0x19, + 0x00, 0x22, 0x22, 0x22, 0x22, 0xd5, 0x31, 0x11, 0xd8, 0xc3, 0x31, 0x6e, 0x76, 0xe0, 0xa0, 0x94, + 0xe7, 0x92, 0x97, 0xc3, 0x08, 0x2f, 0xfe, 0xc1, 0x5e, 0x27, 0x2d, 0xfe, 0x45, 0x5a, 0xf7, 0x63, + 0x1a, 0x2f, 0xfe, 0x47, 0x03, 0xd7, 0x64, 0x3c, 0x17, 0x71, 0x52, 0x06, 0x80, 0x88, 0x88, 0x88, + 0x48, 0xf5, 0xfc, 0x03, 0xd8, 0x34, 0x30, 0x66, 0x2c, 0xb0, 0x18, 0xf0, 0x66, 0xfa, 0xd3, 0xc9, + 0xcc, 0x82, 0xc0, 0x70, 0xac, 0x06, 0x40, 0x94, 0xab, 0xa9, 0x4f, 0x31, 0x44, 0x91, 0x34, 0x74, + 0x00, 0x8f, 0x00, 0x2b, 0x36, 0x78, 0xec, 0x7c, 0x60, 0xd7, 0x6c, 0xa7, 0x23, 0x5e, 0x0a, 0x00, + 0x88, 0x88, 0x88, 0x88, 0x54, 0xcf, 0xec, 0xc0, 0x8b, 0xc0, 0x90, 0xc0, 0xb8, 0x7f, 0x01, 0x3f, + 0x4b, 0x7f, 0x3a, 0x99, 0xb9, 0x15, 0x58, 0x3f, 0x30, 0x66, 0x24, 0x56, 0x04, 0xf1, 0xfd, 0xf4, + 0xa7, 0x23, 0x52, 0x59, 0xdb, 0x00, 0x97, 0x35, 0xf8, 0xef, 0x93, 0xb0, 0xe3, 0x45, 0xaf, 0x67, + 0x3b, 0x1d, 0xf1, 0xd2, 0x11, 0x00, 0x11, 0x11, 0x11, 0x91, 0xea, 0x79, 0x0f, 0xf8, 0x9d, 0x63, + 0xdc, 0x4f, 0x81, 0x2d, 0x53, 0x9e, 0x4b, 0x56, 0xfe, 0x8f, 0xf0, 0xe2, 0x1f, 0x60, 0x3f, 0xb4, + 0xf8, 0x17, 0x69, 0xc7, 0x50, 0xe0, 0xa4, 0x26, 0x8f, 0x5d, 0x8a, 0x16, 0xff, 0x85, 0xa6, 0x0c, + 0x00, 0x11, 0x11, 0x11, 0x91, 0xea, 0xba, 0x0d, 0xf8, 0x51, 0x60, 0xcc, 0x27, 0xd8, 0x51, 0x80, + 0x4f, 0xd3, 0x9f, 0x4e, 0x6a, 0x66, 0xc6, 0x32, 0x1e, 0xa6, 0x0b, 0x8c, 0xfb, 0x0f, 0xf0, 0x93, + 0xf4, 0xa7, 0x23, 0x52, 0x69, 0x97, 0x03, 0x5b, 0x37, 0xf8, 0xef, 0xa3, 0xb0, 0x02, 0xa4, 0x1f, + 0x64, 0x3b, 0x1d, 0x89, 0x43, 0x01, 0x00, 0x11, 0x11, 0x11, 0x91, 0xea, 0x9a, 0x13, 0x78, 0x16, + 0xdb, 0xb1, 0x8b, 0x72, 0x0d, 0xb0, 0x59, 0xfa, 0xd3, 0x49, 0xcd, 0x0d, 0xc0, 0xaf, 0x02, 0x63, + 0xbe, 0xc0, 0xaa, 0xfe, 0xbf, 0x97, 0xfe, 0x74, 0x44, 0x44, 0x8a, 0x49, 0x47, 0x00, 0x44, 0x44, + 0x44, 0x44, 0xaa, 0xeb, 0x1d, 0x60, 0x27, 0xc7, 0xb8, 0x4d, 0x81, 0xed, 0xd2, 0x9d, 0x4a, 0x6a, + 0x76, 0x21, 0xbc, 0xf8, 0x07, 0xd8, 0x1e, 0x2d, 0xfe, 0x45, 0xa4, 0xe6, 0x94, 0x01, 0x20, 0x22, + 0x22, 0x22, 0x52, 0x7d, 0x67, 0x03, 0xbb, 0x07, 0xc6, 0x8c, 0x02, 0x96, 0xa6, 0x5c, 0xe7, 0x77, + 0x17, 0x06, 0x9e, 0x02, 0x06, 0x06, 0xc6, 0x9d, 0x05, 0xec, 0x9d, 0xfe, 0x74, 0x44, 0x44, 0x8a, + 0x4d, 0x01, 0x00, 0x11, 0x11, 0x11, 0x91, 0xea, 0xeb, 0x07, 0x3c, 0x00, 0x2c, 0x1f, 0x18, 0xf7, + 0x24, 0xb0, 0x1a, 0xd6, 0x22, 0xb0, 0xe8, 0x06, 0x00, 0x0f, 0x61, 0x41, 0x8b, 0x28, 0x8f, 0x01, + 0xab, 0x03, 0xe3, 0x53, 0x9f, 0x91, 0x88, 0x48, 0xc1, 0xe9, 0x08, 0x80, 0x88, 0x88, 0x88, 0x48, + 0xf5, 0x8d, 0x03, 0x36, 0x04, 0x3e, 0x0a, 0x8c, 0x5b, 0x0e, 0xcb, 0x16, 0x28, 0x83, 0x73, 0x09, + 0x2f, 0xfe, 0x3f, 0x04, 0x36, 0x42, 0x8b, 0x7f, 0x11, 0x11, 0x40, 0x01, 0x00, 0x11, 0x11, 0x11, + 0x91, 0xba, 0x78, 0x17, 0xd8, 0x04, 0x98, 0x10, 0x18, 0xb7, 0x23, 0xb0, 0x73, 0xfa, 0xd3, 0x69, + 0xcb, 0x6f, 0xb0, 0xb6, 0x7f, 0x51, 0xc6, 0x03, 0x1b, 0xa3, 0x73, 0xff, 0x22, 0x22, 0xff, 0x9f, + 0x8e, 0x00, 0x88, 0x88, 0x88, 0x88, 0xd4, 0xcb, 0xf6, 0xc0, 0xc5, 0x81, 0x31, 0xe3, 0x80, 0xf5, + 0xb0, 0x63, 0x03, 0x45, 0xb3, 0x3a, 0x70, 0x07, 0xd0, 0x37, 0x30, 0x6e, 0x3b, 0xac, 0x27, 0xb9, + 0x88, 0x88, 0x74, 0x51, 0x06, 0x80, 0x88, 0x88, 0x88, 0x48, 0xbd, 0x5c, 0x02, 0x1c, 0x15, 0x18, + 0xd3, 0x0f, 0x6b, 0xad, 0x37, 0x7f, 0xfa, 0xd3, 0x89, 0x65, 0x01, 0x6c, 0x5e, 0xa1, 0xc5, 0xff, + 0xe1, 0x68, 0xf1, 0x2f, 0x22, 0xf2, 0x3d, 0xca, 0x00, 0x10, 0x11, 0x11, 0x11, 0xa9, 0xa7, 0x8b, + 0x80, 0x1d, 0x02, 0x63, 0x5e, 0x06, 0x56, 0x06, 0xbe, 0x48, 0x7f, 0x3a, 0x41, 0x43, 0x81, 0x47, + 0x80, 0x85, 0x02, 0xe3, 0x2e, 0xc2, 0xd7, 0xfa, 0x50, 0x44, 0xa4, 0x76, 0x14, 0x00, 0x10, 0x11, + 0x11, 0x11, 0x11, 0x11, 0x11, 0xa9, 0x01, 0x1d, 0x01, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, + 0xa9, 0x01, 0x05, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x6a, 0x40, 0x01, 0x00, 0x11, + 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x1a, 0x50, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, + 0xa4, 0x06, 0x14, 0x00, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0xa9, 0x01, 0x05, 0x00, 0x44, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x6a, 0x40, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, + 0x91, 0x1a, 0x50, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0x06, 0x14, 0x00, 0x10, + 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0xa9, 0x01, 0x05, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, + 0x44, 0x6a, 0x40, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x1a, 0x50, 0x00, 0x40, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0x06, 0x14, 0x00, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, + 0x11, 0xa9, 0x01, 0x05, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x6a, 0x40, 0x01, 0x00, + 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x1a, 0x50, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, + 0x44, 0xa4, 0x06, 0x14, 0x00, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0xa9, 0x01, 0x05, 0x00, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x6a, 0x40, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, + 0x11, 0x91, 0x1a, 0x50, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0x06, 0x14, 0x00, + 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0xa9, 0x01, 0x05, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x6a, 0x40, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x1a, 0x50, 0x00, + 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0x06, 0x14, 0x00, 0x10, 0x11, 0x11, 0x11, 0x11, + 0x11, 0x11, 0xa9, 0x01, 0x05, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x6a, 0x40, 0x01, + 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x1a, 0x50, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, + 0x44, 0x44, 0xa4, 0x06, 0x14, 0x00, 0x48, 0xd6, 0xdd, 0x40, 0x67, 0xc4, 0xd7, 0xeb, 0xf9, 0x4d, + 0x4d, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xea, 0x4c, 0x01, 0x80, 0xe4, 0x0c, 0x02, 0x56, 0x09, + 0x8c, 0xb9, 0x3d, 0x8b, 0x89, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xf4, 0xa4, 0x00, 0x40, + 0x72, 0xd6, 0x02, 0xfa, 0x06, 0xc6, 0xfc, 0x37, 0x83, 0x79, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x7c, 0x4f, 0x9f, 0xbc, 0x27, 0x50, 0x21, 0x3f, 0x0a, 0x3c, 0x3e, 0x09, 0xb8, 0x2b, 0x8b, + 0x89, 0x64, 0x6c, 0x3a, 0x60, 0x6d, 0x60, 0x49, 0x60, 0x21, 0x60, 0x41, 0x60, 0x46, 0x2c, 0x23, + 0x62, 0x30, 0xf6, 0x3b, 0x36, 0xaa, 0xeb, 0xeb, 0x4b, 0xe0, 0x55, 0xe0, 0x65, 0xe0, 0x05, 0xec, + 0xf5, 0x78, 0x3f, 0xfb, 0x29, 0x4b, 0x8d, 0x2c, 0x0c, 0xac, 0x00, 0x0c, 0xeb, 0xfa, 0xff, 0x67, + 0x07, 0x66, 0xc5, 0x7e, 0x3f, 0x07, 0x60, 0x41, 0xd0, 0x71, 0xc0, 0x58, 0xe0, 0x73, 0xe0, 0x03, + 0xec, 0x77, 0xf2, 0x25, 0x60, 0x38, 0xf0, 0x38, 0x30, 0x22, 0xf3, 0x59, 0x17, 0xdb, 0xb4, 0xc0, + 0xca, 0xd8, 0x6b, 0xba, 0x04, 0x30, 0x27, 0x30, 0x1b, 0xf6, 0x5e, 0x30, 0x00, 0xe8, 0x07, 0x4c, + 0xc4, 0x5e, 0xd3, 0xd1, 0xc0, 0x47, 0xc0, 0x87, 0xc0, 0x9b, 0xd8, 0xdf, 0xfd, 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, 0x1e, 0xdf, 0x5f, 0x63, 0x0b, 0xe7, 0x90, 0x34, 0x7b, 0x0e, + 0xb7, 0x62, 0x0c, 0x76, 0x5e, 0x36, 0xed, 0xaa, 0xbd, 0xad, 0xf0, 0x1c, 0xfb, 0x81, 0x74, 0xab, + 0x8d, 0x17, 0xc9, 0x12, 0x84, 0xcf, 0x57, 0x7f, 0x03, 0x6c, 0x4f, 0x39, 0x02, 0xce, 0x49, 0xeb, + 0x85, 0xfd, 0xfd, 0x87, 0xe8, 0x08, 0x40, 0x3c, 0x53, 0xe1, 0xcb, 0xac, 0xcb, 0xaa, 0xaa, 0xba, + 0xb4, 0x6f, 0x28, 0xf0, 0x47, 0xc7, 0xb8, 0x13, 0x29, 0x57, 0x26, 0x91, 0xf7, 0x33, 0x23, 0xeb, + 0x4c, 0x3c, 0xcf, 0xfb, 0x52, 0xb7, 0xac, 0xb3, 0x13, 0x42, 0xe6, 0x72, 0x8e, 0xcb, 0x23, 0xcb, + 0x79, 0x2c, 0x16, 0x78, 0x58, 0x2d, 0x30, 0x6e, 0x11, 0x6c, 0x93, 0xe8, 0xc3, 0xd4, 0x67, 0x54, + 0x62, 0x3a, 0x02, 0x10, 0x9f, 0x27, 0xb2, 0xe4, 0xa9, 0x62, 0x9f, 0xb7, 0x19, 0x81, 0x85, 0x1c, + 0xe3, 0x9e, 0x24, 0xbb, 0x4a, 0xe0, 0x53, 0xfa, 0x18, 0x78, 0xd9, 0x31, 0x6e, 0x18, 0xc5, 0x4b, + 0xb3, 0x06, 0x8b, 0x00, 0xef, 0x00, 0x6c, 0x89, 0x16, 0xff, 0x69, 0x1a, 0x09, 0x4c, 0xca, 0xe1, + 0xba, 0x53, 0x3b, 0xc7, 0xa9, 0x07, 0xb9, 0x5f, 0x28, 0xaa, 0xdf, 0xed, 0xeb, 0x54, 0x67, 0x51, + 0x0c, 0x7d, 0x80, 0x4b, 0x09, 0x67, 0x99, 0xfc, 0x81, 0x62, 0x06, 0x73, 0xb2, 0x30,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88, 0x67, 0x6e, 0xc2, 0xbb, 0xe6, 0x65, 0x49, 0xff, 0xf7, 0x06, 0x00, 0xf2, + 0x28, 0x06, 0xd6, 0xcd, 0x1b, 0x7c, 0x28, 0x62, 0x00, 0x40, 0xaa, 0x6b, 0x51, 0xe7, 0xb8, 0x37, + 0xf1, 0x9f, 0x51, 0x14, 0xab, 0x50, 0xed, 0x91, 0x65, 0x3b, 0xa7, 0x3c, 0x2c, 0x4d, 0xb8, 0x52, + 0xf7, 0x68, 0xea, 0x9b, 0xfa, 0xdf, 0xcd, 0x9b, 0xf9, 0xa5, 0x23, 0x00, 0xf1, 0xac, 0xe4, 0x18, + 0x93, 0xc7, 0xf9, 0x5f, 0x89, 0xaf, 0x03, 0x38, 0x87, 0xf0, 0xbd, 0xfe, 0x7f, 0x28, 0x67, 0x46, + 0xc7, 0x37, 0xf8, 0xee, 0x51, 0x87, 0xe0, 0x3f, 0xdb, 0x9e, 0x04, 0xef, 0xe2, 0xf3, 0xa1, 0x54, + 0x67, 0xd1, 0x1a, 0x6f, 0xdd, 0xa2, 0xbc, 0xde, 0x57, 0xbd, 0x9f, 0xff, 0xa1, 0x00, 0x7a, 0xed, + 0x29, 0x00, 0x10, 0x8f, 0x27, 0xfd, 0xff, 0xf6, 0xd4, 0x67, 0x91, 0x0c, 0x6f, 0x9b, 0x8f, 0x17, + 0x52, 0x9d, 0x45, 0xb4, 0xe1, 0xce, 0x71, 0xde, 0x60, 0x86, 0x48, 0x12, 0xbc, 0x7f, 0x3b, 0x79, + 0x06, 0xcf, 0xca, 0x28, 0x54, 0xa0, 0xaa, 0xdb, 0x93, 0xa9, 0xce, 0x22, 0x5f, 0x7d, 0xb1, 0xd4, + 0xff, 0x50, 0x9d, 0x99, 0x03, 0xb0, 0x00, 0x53, 0x9d, 0x29, 0x03, 0x20, 0x1d, 0x9e, 0x1b, 0xe7, + 0x47, 0x52, 0x9f, 0x85, 0x24, 0x61, 0x3b, 0x60, 0x85, 0xc0, 0x98, 0x09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, 0x33, 0xf5, 0xee, 0xf9, + 0xed, 0xd9, 0xfd, 0xbf, 0x99, 0x7a, 0x1e, 0x51, 0x9b, 0x80, 0xd5, 0xf1, 0x99, 0x1f, 0x58, 0x16, + 0xcb, 0xea, 0x1b, 0x93, 0xc2, 0x75, 0xde, 0x05, 0xb6, 0xc7, 0xde, 0x3f, 0x56, 0x01, 0x6e, 0xc0, + 0x82, 0x2e, 0x65, 0x74, 0x1f, 0x56, 0x7c, 0xd7, 0xe3, 0x10, 0xec, 0x38, 0x50, 0xda, 0xfe, 0x08, + 0xcc, 0x14, 0xf3, 0x7b, 0x14, 0x00, 0x88, 0xa0, 0x23, 0x00, 0xd1, 0x7a, 0x61, 0x55, 0x55, 0xa3, + 0x3c, 0xce, 0x77, 0x8b, 0xe2, 0x94, 0x81, 0x77, 0xb1, 0x5c, 0x84, 0x1d, 0x38, 0xef, 0x1c, 0xf4, + 0x87, 0x2e, 0x49, 0x38, 0x14, 0xff, 0x2e, 0xc9, 0x64, 0x6c, 0x87, 0xab, 0xaa, 0x05, 0x95, 0xd2, + 0xd2, 0x89, 0xbd, 0x66, 0xb7, 0x61, 0x85, 0x97, 0x1e, 0xa5, 0x18, 0xef, 0x35, 0x59, 0x38, 0x15, + 0x4b, 0x7b, 0x8e, 0x72, 0x33, 0x70, 0x69, 0x06, 0x73, 0x29, 0xb3, 0xc1, 0xb4, 0x7e, 0xff, 0xf2, + 0x0d, 0xb6, 0x30, 0xbd, 0x00, 0x2b, 0xd4, 0xd7, 0xcc, 0x48, 0xac, 0x15, 0xee, 0xeb, 0x58, 0x90, + 0xff, 0x2f, 0x58, 0xe0, 0x66, 0x55, 0xac, 0xa0, 0xe5, 0x26, 0xc4, 0xdb, 0x44, 0xe9, 0xdd, 0x75, + 0xdd, 0x61, 0x14, 0xb3, 0xa8, 0xa5, 0xf7, 0x33, 0xf4, 0xff, 0x68, 0xfc, 0xef, 0x7e, 0x17, 0x7b, + 0x4d, 0x1e, 0x6d, 0x63, 0x0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, 0x79, 0x65, 0x45, 0x3d, 0xe7, 0x1c, 0x37, 0x57, 0xaa, 0xb3, 0xc8, 0xd7, 0x56, + 0xf8, 0x7e, 0x67, 0xea, 0x10, 0x5c, 0xdc, 0x0f, 0x5f, 0x21, 0xdf, 0x9b, 0xc9, 0x36, 0x1b, 0xe2, + 0x25, 0xac, 0x46, 0x86, 0xc7, 0xfe, 0x69, 0x4e, 0x24, 0x05, 0x9f, 0x63, 0x47, 0xa4, 0xff, 0x80, + 0xff, 0x33, 0xbb, 0x15, 0x23, 0x81, 0x9d, 0xbb, 0xae, 0xd5, 0x33, 0x4b, 0x2e, 0xd4, 0x52, 0xb7, + 0x5b, 0x5d, 0xda, 0x81, 0xb6, 0x44, 0x01, 0x80, 0xef, 0xeb, 0x8d, 0xa5, 0xb9, 0x44, 0x79, 0x9a, + 0x72, 0x2f, 0x38, 0xbd, 0x29, 0x50, 0xde, 0x42, 0x1b, 0x69, 0xf2, 0xce, 0x21, 0x8b, 0xc8, 0xae, + 0x94, 0x47, 0x07, 0xd6, 0x6b, 0xfb, 0x1c, 0x1a, 0xf7, 0x91, 0x6d, 0x64, 0x0c, 0xb0, 0x39, 0x76, + 0x56, 0x5d, 0xb2, 0x75, 0x27, 0xfe, 0x05, 0xf1, 0x34, 0xd8, 0x8d, 0x5f, 0x11, 0xcd, 0x8c, 0x15, + 0xfe, 0x8b, 0x32, 0x19, 0x0b, 0x30, 0xfd, 0x3f, 0xf6, 0xee, 0x3b, 0xcc, 0xae, 0xaa, 0x7c, 0xfb, + 0xf8, 0x77, 0xd2, 0x49, 0x02, 0xa1, 0x97, 0x50, 0x12, 0x90, 0x2e, 0x55, 0x04, 0x04, 0xa9, 0x82, + 0x54, 0x05, 0xa9, 0x36, 0x3a, 0xd2, 0x8b, 0xa2, 0x60, 0x43, 0x11, 0x05, 0x7f, 0x08, 0x0a, 0x16, + 0x90, 0xa6, 0x34, 0x51, 0x29, 0x82, 0xa8, 0x34, 0x45, 0x40, 0x41, 0x3a, 0x21, 0x14, 0xe9, 0x90, + 0x00, 0x81, 0x50, 0x13, 0x20, 0x09, 0x90, 0x9e, 0x79, 0xff, 0xb8, 0x67, 0xde, 0x84, 0x31, 0x73, + 0xf6, 0xda, 0xed, 0xec, 0x76, 0x7f, 0xae, 0xeb, 0x5c, 0x51, 0x66, 0x9d, 0x7d, 0x56, 0x26, 0x33, + 0xe7, 0xec, 0xf5, 0xac, 0x67, 0x3d, 0x8f, 0xb3, 0x96, 0xea, 0xeb, 0xbe, 0xc0, 0x71, 0x83, 0x28, + 0x47, 0xa0, 0x1d, 0x74, 0x33, 0x1f, 0x5a, 0x97, 0xa3, 0xa8, 0xfb, 0x9f, 0xd0, 0xba, 0x4b, 0xa1, + 0x0b, 0x84, 0x2a, 0xfa, 0x72, 0xc0, 0x98, 0x71, 0xc0, 0x03, 0x79, 0x4f, 0xa4, 0x60, 0x03, 0x81, + 0xfd, 0x02, 0xc7, 0xfe, 0x38, 0xcf, 0x89, 0xf4, 0xe2, 0x2c, 0xb4, 0xa1, 0x10, 0xe5, 0xb3, 0x84, + 0xef, 0x68, 0x97, 0xc5, 0x6c, 0xd4, 0x09, 0x68, 0x6d, 0x14, 0xc0, 0x0f, 0x3d, 0xf2, 0x14, 0x62, + 0x32, 0xea, 0xce, 0xb0, 0x32, 0xbd, 0xd7, 0xb0, 0x08, 0xc9, 0xe6, 0x9c, 0x0a, 0xbc, 0x96, 0xd5, + 0xa4, 0xea, 0xc8, 0x01, 0x80, 0xff, 0xb5, 0x21, 0xd1, 0xa9, 0xef, 0x55, 0x4e, 0xff, 0x07, 0xed, + 0x3e, 0x85, 0xb4, 0xd4, 0x4a, 0xda, 0xbe, 0x2b, 0x2b, 0x1d, 0x81, 0x73, 0x78, 0x1f, 0xa7, 0xfa, + 0xd8, 0x5c, 0x83, 0x50, 0xcf, 0xe8, 0x13, 0x62, 0x3c, 0x67, 0x3c, 0x3a, 0x8f, 0xdb, 0xee, 0xc2, + 0x56, 0x36, 0xd7, 0x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eb, 0x1a, 0xac, 0x1b, 0x38, 0xce, 0x19, 0x9d, + 0x11, 0x1c, 0x00, 0xf8, 0xb0, 0x4f, 0x11, 0x9d, 0x15, 0x51, 0xf5, 0xf4, 0xff, 0x6e, 0xa1, 0xd1, + 0xb1, 0xd0, 0x5f, 0xb6, 0x3c, 0x7c, 0x2c, 0x70, 0x5c, 0x51, 0x2d, 0x89, 0xac, 0x1c, 0x16, 0x41, + 0xe9, 0x64, 0xa1, 0x2d, 0xb5, 0x3e, 0x40, 0x0b, 0xb6, 0xff, 0xcb, 0x6d, 0x46, 0x96, 0x46, 0x48, + 0x0f, 0x65, 0x08, 0xcf, 0x10, 0x6a, 0x87, 0xb2, 0x54, 0x72, 0xb7, 0xf2, 0x08, 0x39, 0xbe, 0x06, + 0x7a, 0x3f, 0x2a, 0x8b, 0xd0, 0x60, 0x7a, 0x51, 0xf5, 0x81, 0xfa, 0xa1, 0xf3, 0xfd, 0x21, 0x8a, + 0xaa, 0x53, 0x90, 0x97, 0x90, 0xdd, 0x7f, 0x50, 0x20, 0xbc, 0xee, 0x86, 0x12, 0x1d, 0x70, 0xed, + 0xf6, 0x6a, 0x9e, 0x13, 0x89, 0x10, 0xda, 0x59, 0x63, 0x28, 0xda, 0xc4, 0xb0, 0x68, 0x9f, 0x0c, + 0x1c, 0xe7, 0x00, 0x40, 0x04, 0x07, 0x00, 0x3e, 0xac, 0x09, 0xe7, 0xff, 0xbb, 0x85, 0x06, 0x00, + 0x42, 0x17, 0xe1, 0x79, 0xd8, 0x20, 0x70, 0x9c, 0x53, 0x7d, 0x9a, 0x6b, 0x08, 0xba, 0xe1, 0xf9, + 0x78, 0xe0, 0xf8, 0x09, 0x28, 0xd0, 0x77, 0x6d, 0x6e, 0x33, 0xb2, 0xb4, 0xc6, 0x05, 0x8e, 0x5b, + 0x94, 0xb0, 0x16, 0x50, 0x66, 0xed, 0x36, 0x88, 0xf0, 0x9f, 0xcd, 0x32, 0x05, 0x00, 0x1e, 0x22, + 0x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+ 0x52, 0x77, 0x03, 0xcf, 0x15, 0x3d, 0x89, 0x1e, 0xee, 0x00, 0xce, 0x21, 0x5e, 0x26, 0xcf, 0xb2, + 0x28, 0x2a, 0xff, 0x08, 0x8a, 0xf6, 0xe6, 0xbd, 0xad, 0xcd, 0x00, 0x00, 0x20, 0x00, 0x49, 0x44, + 0x41, 0x54, 0xff, 0x81, 0xf8, 0x2d, 0x77, 0x86, 0x02, 0x5f, 0x42, 0x67, 0xb3, 0xd7, 0x8d, 0xf9, + 0x5c, 0x50, 0x26, 0xc2, 0x4d, 0x09, 0x9e, 0x67, 0xf5, 0xf3, 0x4d, 0x60, 0x47, 0xc2, 0xda, 0x43, + 0x81, 0xde, 0x4b, 0x8f, 0x41, 0xdd, 0x44, 0xce, 0x06, 0x2e, 0x07, 0x5e, 0x88, 0xf9, 0x9a, 0x03, + 0xd0, 0x51, 0x95, 0xaf, 0x93, 0x6c, 0x11, 0x71, 0x30, 0xe5, 0xff, 0x0c, 0xeb, 0xe9, 0x75, 0xf4, + 0x7d, 0xbb, 0x3c, 0x70, 0xfc, 0x3a, 0xa8, 0x18, 0xd7, 0x59, 0x5d, 0x8f, 0x09, 0x31, 0x5e, 0x6b, + 0x4b, 0xe0, 0x47, 0xc0, 0x16, 0x71, 0x26, 0x88, 0x82, 0x82, 0x75, 0xdc, 0x05, 0x0f, 0x3d, 0xff, + 0xff, 0x46, 0xae, 0xb3, 0x28, 0xb7, 0xbb, 0x51, 0xaa, 0x78, 0xe8, 0x67, 0xd9, 0xb2, 0x28, 0x03, + 0xe7, 0x4c, 0xe0, 0x97, 0xa4, 0xef, 0x26, 0xd5, 0x17, 0x65, 0xc9, 0x9d, 0x0e, 0x2c, 0x15, 0xe3, + 0x79, 0xbf, 0x06, 0x1e, 0x48, 0xf9, 0xda, 0x79, 0x7b, 0x0d, 0x15, 0x36, 0x0d, 0xed, 0xf4, 0xb1, + 0x0b, 0xea, 0x46, 0xf1, 0x6d, 0x74, 0x7f, 0x30, 0x23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, 0xf3, 0x9c, 0x48, 0xc5, 0xbc, 0x85, 0xee, 0xef, 0xbf, 0x47, 0x39, 0xd2, 0xec, 0x67, + 0xa3, 0x42, 0x7a, 0x5b, 0xa2, 0x60, 0x7b, 0x95, 0x9d, 0x81, 0xaa, 0xfd, 0x17, 0xf1, 0x7d, 0xfd, + 0x1d, 0xda, 0x0c, 0xf0, 0xce, 0x7f, 0x46, 0x9a, 0x1a, 0x00, 0x18, 0x46, 0x74, 0xe1, 0xab, 0x07, + 0x08, 0x2f, 0x08, 0x52, 0x67, 0x13, 0xd1, 0x59, 0x9b, 0x63, 0x68, 0xcf, 0xee, 0xca, 0xd3, 0xe8, + 0xcd, 0xfb, 0x1b, 0x14, 0x73, 0x73, 0x61, 0xd6, 0x64, 0xe7, 0xa3, 0x33, 0x8e, 0x17, 0x53, 0xdc, + 0xae, 0xe5, 0x28, 0xf4, 0x41, 0xff, 0x15, 0xca, 0x11, 0x8c, 0xb0, 0xea, 0x18, 0x83, 0x76, 0x86, + 0x0f, 0xa1, 0x98, 0x9b, 0xed, 0xb7, 0x80, 0xaf, 0x01, 0x1b, 0x02, 0x8f, 0x16, 0xf0, 0xfa, 0xed, + 0xd2, 0x89, 0x8a, 0x1a, 0x6e, 0x86, 0x8e, 0xe9, 0xb5, 0xc3, 0x53, 0xe8, 0xb8, 0xd2, 0x57, 0x99, + 0x5b, 0x48, 0xb0, 0xce, 0x42, 0x17, 0xff, 0xe0, 0x00, 0x40, 0x4f, 0x73, 0x80, 0x1f, 0xa3, 0xe2, + 0x9d, 0xd7, 0x51, 0x5c, 0x8d, 0x88, 0x3b, 0x50, 0x41, 0xed, 0x13, 0xa8, 0xcf, 0xcf, 0xec, 0x25, + 0x68, 0xfd, 0xd4, 0xae, 0x0d, 0xd2, 0xb1, 0x28, 0xeb, 0x68, 0x7f, 0xca, 0x11, 0xd0, 0xa9, 0x8d, + 0xa6, 0x06, 0x00, 0xb6, 0x21, 0xba, 0xbd, 0x5a, 0x93, 0xd3,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0x24, 0x3a, 0x4a, 0x74, 0x17, 0xbe, + 0x27, 0x68, 0x9b, 0xa6, 0x06, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x1a, 0xa5, 0xa9, + 0x47, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x1a, 0xc5, 0x01, 0x00, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x33, 0xb3, 0x06, 0x70, 0x00, 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xac, 0x01, + 0x1c, 0x00, 0x30, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6b, 0x00, 0x07, 0x00, 0xcc, 0xcc, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0x1a, 0xc0, 0x01, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xb3, 0x06, + 0x70, 0x00, 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xac, 0x01, 0x1c, 0x00, 0x30, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33, 0x6b, 0x00, 0x07, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x1a, + 0xc0, 0x01, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xb3, 0x06, 0x70, 0x00, 0xc0, 0xcc, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0xac, 0x01, 0x1c, 0x00, 0x30, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6b, + 0x00, 0x07, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x1a, 0xc0, 0x01, 0x00, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33, 0xb3, 0x06, 0x70, 0x00, 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xac, + 0x01, 0x1c, 0x00, 0x30, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6b, 0x00, 0x07, 0x00, 0xcc, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x1a, 0xc0, 0x01, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xb3, + 0x06, 0x70, 0x00, 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xac, 0x01, 0x1c, 0x00, 0x30, 0x33, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x6b, 0x00, 0x07, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, + 0x1a, 0xc0, 0x01, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xb3, 0x06, 0x70, 0x00, 0xc0, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xac, 0x01, 0x1c, 0x00, 0x30, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, + 0x6b, 0x00, 0x07, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x1a, 0xc0, 0x01, 0x00, 0x33, + 0x33, 0x33, 0x33, 0x33, 0x33, 0xb3, 0x06, 0x70, 0x00, 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, + 0xac, 0x01, 0x1c, 0x00, 0x30, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6b, 0x80, 0x7e, 0x45, 0x4f, + 0xc0, 0xcc, 0xcc, 0xac, 0x84, 0x3a, 0x80, 0xe5, 0x80, 0xd5, 0x81, 0xd5, 0x80, 0x55, 0x80, 0xa5, + 0x81, 0xa5, 0xba, 0x1e, 0x0b, 0x03, 0x03, 0x81, 0x41, 0x5d, 0x7f, 0xce, 0x01, 0x66, 0x00, 0xd3, + 0x81, 0xf7, 0x80, 0x89, 0x5d, 0x8f, 0xd7, 0x81, 0x17, 0xba, 0x1e, 0xcf, 0x02, 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0xad, 0xe0, 0xb9, 0x94, 0xc9, 0x92, 0x28, 0x40, 0x7d, 0x24, 0xea, 0x64, 0x52, 0xb4, 0x71, 0x28, + 0x88, 0x7d, 0x2e, 0xd5, 0xfe, 0xfc, 0x2a, 0x63, 0x00, 0xa0, 0xa7, 0xf7, 0x51, 0x16, 0xc6, 0x75, + 0xc0, 0xd5, 0xc0, 0x94, 0x42, 0x67, 0x63, 0x85, 0x73, 0x00, 0xc0, 0xcc, 0x2c, 0xb9, 0x4f, 0x03, + 0xbf, 0x41, 0x67, 0x24, 0x8b, 0xf4, 0x1a, 0x70, 0x18, 0xda, 0x51, 0x69, 0xba, 0x0e, 0xe0, 0x20, + 0xe0, 0x74, 0x60, 0xb1, 0x94, 0xd7, 0x7a, 0x05, 0xed, 0x26, 0x3e, 0xdb, 0xf5, 0x78, 0x1e, 0x78, + 0xb3, 0xeb, 0x31, 0x91, 0xf9, 0xa7, 0x84, 0x77, 0x07, 0x02, 0x16, 0x44, 0x99, 0x20, 0x6b, 0x74, + 0x3d, 0x56, 0xef, 0x7a, 0xac, 0xdc, 0x35, 0xc7, 0xa4, 0x6e, 0x01, 0x0e, 0xee, 0x9a, 0x9b, 0xc5, + 0x77, 0x29, 0xb0, 0x7f, 0x82, 0xe7, 0xcd, 0x42, 0xe7, 0xa1, 0x9b, 0xba, 0xa0, 0xac, 0x52, 0x00, + 0xa0, 0xdb, 0x74, 0xf4, 0xef, 0xfd, 0x23, 0x9a, 0x9d, 0x12, 0x3d, 0x04, 0x05, 0x43, 0x8f, 0xa7, + 0xbd, 0xbb, 0xfd, 0xa1, 0x26, 0x00, 0xa7, 0x01, 0xe7, 0x50, 0xcd, 0x5d, 0xea, 0x2a, 0x04, 0x00, + 0xe6, 0xf5, 0x01, 0x3a, 0x4a, 0x78, 0x11, 0x70, 0x67, 0xc1, 0x73, 0xb1, 0x82, 0x38, 0x00, 0x60, + 0x66, 0x16, 0x5f, 0x5f, 0xb4, 0xeb, 0xfe, 0x6d, 0xd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, 0x2f, 0xfe, 0x7f, 0x84, + 0xfa, 0xde, 0x97, 0xd9, 0xc7, 0x69, 0xbd, 0x1b, 0xfd, 0x0f, 0x92, 0x05, 0x85, 0x56, 0x05, 0xb6, + 0x0f, 0x18, 0xf7, 0x6d, 0xd4, 0x11, 0xa3, 0x5d, 0x5e, 0x0a, 0x1c, 0xf7, 0x0e, 0xe9, 0x52, 0x79, + 0xa3, 0xbe, 0x67, 0x69, 0x8e, 0xf3, 0x94, 0xcd, 0xee, 0xc0, 0x92, 0x01, 0xe3, 0xae, 0x27, 0xdb, + 0x63, 0x47, 0x17, 0x06, 0x8e, 0x73, 0x4b, 0xc0, 0x62, 0x4d, 0x05, 0xce, 0x45, 0x45, 0x9c, 0xab, + 0xb8, 0xf8, 0x07, 0x1d, 0x27, 0x09, 0xe5, 0x00, 0x80, 0x65, 0xed, 0x1d, 0xc2, 0xef, 0xf3, 0xea, + 0x14, 0x5c, 0xae, 0xbd, 0x26, 0x07, 0x00, 0x8e, 0x46, 0xbb, 0x69, 0xa1, 0xa9, 0x55, 0xbd, 0x99, + 0x80, 0x16, 0x2e, 0x23, 0x81, 0xcf, 0x93, 0x2e, 0x75, 0xd3, 0xac, 0x2a, 0x46, 0xa1, 0x74, 0xcc, + 0x15, 0xd0, 0xce, 0x74, 0xda, 0x9b, 0xeb, 0xc5, 0xd1, 0x82, 0xec, 0xf8, 0x94, 0xd7, 0xa9, 0x9b, + 0xad, 0x50, 0x55, 0xe7, 0x5d, 0x63, 0x3c, 0xe7, 0x74, 0xd4, 0x61, 0xa4, 0xec, 0xb6, 0x8d, 0xf8, + 0x7a, 0xd2, 0x7e, 0xd6, 0x87, 0x04, 0x8c, 0x79, 0x18, 0x05, 0x18, 0xda, 0x69, 0x32, 0x61, 0x5d, + 0x06, 0xee, 0x21, 0xdd, 0x0e, 0x6a, 0x54, 0x00, 0x60, 0x40, 0x8a, 0x6b, 0x97, 0x4d, 0xe8, 0x59, + 0xee, 0xac, 0xcf, 0xe2, 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 0x56, 0x45, 0x23, 0xa7, 0x53, 0xfd, 0x23, 0x39, 0x1b, 0xa3, 0x1a, 0x3c, 0x51, 0x5e, 0x43, 0x45, + 0xe1, 0xf2, 0x34, 0x11, 0x9d, 0x35, 0xff, 0x42, 0xc4, 0xb8, 0x41, 0xa8, 0x38, 0xe5, 0x2f, 0x72, + 0x9e, 0x4f, 0x19, 0xdc, 0x82, 0xde, 0xeb, 0xb3, 0xd2, 0x81, 0x52, 0x90, 0x07, 0xa0, 0x20, 0xca, + 0xa2, 0x28, 0xd0, 0xb7, 0x22, 0xb0, 0x36, 0x0a, 0xac, 0xc5, 0x6d, 0x3f, 0xb6, 0x34, 0x70, 0x0d, + 0x70, 0x1e, 0x70, 0x2c, 0x6a, 0xe3, 0x5c, 0x56, 0x71, 0x8e, 0xec, 0xb8, 0x08, 0x9b, 0x65, 0x6d, + 0x08, 0xe1, 0x9b, 0xc5, 0xef, 0xe4, 0x39, 0x11, 0xcb, 0x96, 0x03, 0x00, 0xad, 0xad, 0x8d, 0x76, + 0x10, 0x7e, 0xd2, 0xf5, 0xe7, 0xb9, 0xc0, 0xcb, 0x85, 0xce, 0xc8, 0xac, 0x3a, 0x96, 0x46, 0x3b, + 0x75, 0x87, 0x91, 0xbe, 0xdd, 0x66, 0x1d, 0xad, 0x06, 0xfc, 0x9b, 0xe8, 0x1d, 0xdb, 0x79, 0x5d, + 0x0e, 0x1c, 0x49, 0xf5, 0x77, 0x71, 0x5b, 0x05, 0x3c, 0x66, 0x03, 0x63, 0x13, 0x5c, 0x33, 0xea, + 0x58, 0x01, 0xa8, 0xb8, 0x62, 0x51, 0x3e, 0x19, 0x30, 0xe6, 0x9e, 0x0c, 0x5e, 0x67, 0xd9, 0x16, + 0x5f, 0x1b, 0x47, 0xf5, 0x33, 0x70, 0x42, 0x77, 0xff, 0x2f, 0xa1, 0x3d, 0x0b, 0xbb, 0xdf, 0x10, + 0x1d, 0x00, 0x00, 0x38, 0x94, 0x66, 0x04, 0x00, 0x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, 0x17, 0x46, 0x59, 0x15, 0xad, 0xcc, 0xa0, 0xb8, 0x23, 0x5c, + 0x21, 0x05, 0xc7, 0xb2, 0x28, 0x00, 0xb8, 0x04, 0x30, 0xbc, 0xc5, 0xd7, 0xdb, 0x99, 0x9a, 0x9d, + 0xb5, 0x0e, 0xc2, 0x17, 0xd0, 0x79, 0x17, 0xff, 0xeb, 0xe9, 0x52, 0xc2, 0x8e, 0x1b, 0xec, 0x0e, + 0x2c, 0x9e, 0xef, 0x54, 0x0c, 0x05, 0x02, 0xce, 0x07, 0x36, 0x07, 0x26, 0x04, 0x3e, 0xe7, 0x1b, + 0xc0, 0x36, 0xb9, 0xcd, 0x28, 0xb9, 0x4e, 0xc2, 0x3b, 0x50, 0x85, 0x64, 0x41, 0x99, 0xc5, 0x11, + 0x27, 0x03, 0xa0, 0x5d, 0x41, 0x57, 0xcb, 0x40, 0x93, 0x03, 0x00, 0x17, 0x02, 0x3f, 0x07, 0xde, + 0x4d, 0x79, 0x9d, 0x25, 0x51, 0x9a, 0xf3, 0x4b, 0xa8, 0x58, 0xe0, 0x46, 0x29, 0xaf, 0x67, 0x56, + 0x05, 0xeb, 0xa1, 0x1d, 0xe9, 0x97, 0x81, 0x53, 0x69, 0xbd, 0xe8, 0x08, 0x31, 0x05, 0x38, 0x07, + 0x38, 0x3b, 0xe5, 0x75, 0xca, 0x6e, 0x75, 0xd4, 0x1a, 0x31, 0xc4, 0xb3, 0xc0, 0x96, 0x28, 0x25, + 0xbe, 0x4e, 0x16, 0xa6, 0x75, 0xb7, 0x83, 0x24, 0x01, 0x80, 0x25, 0x02, 0xc6, 0xbc, 0x44, 0x31, + 0x05, 0x00, 0x07, 0x02, 0x9f, 0x09, 0x18, 0x77, 0x6f, 0x06, 0xaf, 0x15, 0x55, 0x68, 0xf0, 0xbe, + 0x0c, 0x5e, 0xa3, 0x28, 0xdb, 0x00, 0xab, 0x04, 0x8e, 0xbd, 0x0a, 0x2d, 0x9c, 0xda, 0xf5, 0x78, + 0x8d, 0xb0, 0x9a, 0x4a, 0x03, 0x51, 0x4b, 0x54, 0x6b, 0x8f, 0x87, 0x80, 0xed, 0x08, 0xcb, 0x04, + 0xe8, 0x40, 0x9f, 0x41, 0xfd, 0x73, 0x9d, 0x51, 0x32, 0x2f, 0x05, 0x8e, 0x5b, 0x0e, 0x1d, 0x59, + 0x35, 0xcb, 0x4a, 0x48, 0x66, 0x1d, 0xa8, 0x00, 0x60, 0x68, 0xb0, 0xcd, 0x4a, 0xa0, 0xc9, 0x01, + 0x80, 0x71, 0xc0, 0xd7, 0xd1, 0x1b, 0xe6, 0xe1, 0xc0, 0x7f, 0x53, 0x5e, 0xaf, 0x3f, 0x2a, 0x40, + 0x73, 0x3f, 0xba, 0xc9, 0xfa, 0x22, 0xe5, 0xfc, 0x20, 0x31, 0x4b, 0xaa, 0x2f, 0xda, 0xc9, 0xbc, + 0x13, 0xed, 0x48, 0x1f, 0x40, 0xfa, 0x23, 0x30, 0x4f, 0xa3, 0x76, 0x76, 0xcb, 0x76, 0xfd, 0x19, + 0x72, 0x96, 0xb6, 0xca, 0x7e, 0x40, 0xd8, 0xf7, 0x6c, 0x02, 0xb0, 0x03, 0xf5, 0xfc, 0x40, 0x8d, + 0xfa, 0xfb, 0x27, 0x29, 0xc6, 0xb5, 0x60, 0xc0, 0x98, 0x49, 0x09, 0xae, 0x9b, 0x85, 0x4f, 0x13, + 0x3d, 0xbf, 0x49, 0xc0, 0x53, 0x19, 0xbc, 0x56, 0xab, 0x33, 0xe6, 0x33, 0x81, 0xd1, 0x19, 0xbc, + 0x46, 0x51, 0x42, 0x8b, 0xff, 0x95, 0xdd, 0xa1, 0x84, 0xb7, 0xfb, 0xb4, 0xf4, 0x1e, 0x46, 0xf7, + 0x7a, 0x21, 0x56, 0x47, 0xf7, 0x71, 0x65, 0x13, 0x27, 0x73, 0x27, 0xa4, 0xdb, 0x88, 0x59, 0x88, + 0xfe, 0x84, 0xd7, 0x3c, 0xab, 0x53, 0x96, 0x62, 0x23, 0x34, 0x39, 0x00, 0xd0, 0xed, 0x7d, 0xe0, + 0x02, 0x54, 0x41, 0x7a, 0x6b, 0xe0, 0x5a, 0xd2, 0x57, 0x0e, 0xde, 0x18, 0xf8, 0x23, 0x4a, 0x8b, + 0xfe, 0x1e, 0x61, 0xbb, 0x53, 0x66, 0x65, 0xb5, 0x28, 0xea, 0x51, 0x3f, 0x16, 0xb5, 0x4e, 0xda, + 0x3c, 0xe5, 0xf5, 0xe6, 0x00, 0x7f, 0x43, 0x0b, 0xa3, 0x35, 0xd0, 0xae, 0xcb, 0x94, 0x94, 0xd7, + 0xac, 0x82, 0x91, 0xa8, 0x86, 0x48, 0x88, 0x83, 0x81, 0x17, 0xf2, 0x9b, 0x4a, 0xa1, 0xa2, 0xce, + 0x70, 0x87, 0xf4, 0x55, 0xef, 0x29, 0x24, 0x00, 0xf0, 0x7e, 0x82, 0xeb, 0x66, 0xe1, 0xa0, 0x80, + 0x31, 0x0f, 0x91, 0x4d, 0x75, 0xfe, 0xed, 0x5b, 0x7c, 0xed, 0x61, 0xaa, 0xdb, 0xa7, 0x79, 0x38, + 0x3a, 0xa7, 0x5d, 0x07, 0x2b, 0x53, 0xce, 0x54, 0xf3, 0x3a, 0xbb, 0x10, 0x78, 0x2c, 0x70, 0xec, + 0x71, 0x79, 0x4e, 0x24, 0xa1, 0x47, 0x63, 0x8c, 0xdd, 0x2c, 0xb7, 0x59, 0x58, 0xd3, 0x6c, 0x0a, + 0x0c, 0x0d, 0x1c, 0xeb, 0x00, 0x40, 0xc5, 0x38, 0x00, 0xf0, 0x61, 0xff, 0x46, 0xed, 0x60, 0x56, + 0x04, 0xfe, 0x8f, 0xf4, 0x15, 0x2d, 0x87, 0x03, 0xa7, 0xa0, 0x34, 0xe9, 0x4b, 0x08, 0xeb, 0x5d, + 0x6c, 0x56, 0x16, 0x1f, 0x45, 0xc1, 0xb1, 0x97, 0x81, 0xd3, 0x51, 0xef, 0xe5, 0x34, 0x26, 0x02, + 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0x33, + 0x33, 0x33, 0x33, 0x33, 0x33, 0xb3, 0x06, 0x70, 0x00, 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, + 0xac, 0x01, 0x1c, 0x00, 0x30, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6b, 0x00, 0x07, 0x00, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x1a, 0xc0, 0x01, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, + 0xb3, 0x06, 0x70, 0x00, 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xac, 0x01, 0x1c, 0x00, 0x30, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6b, 0x00, 0x07, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, + 0xcc, 0x1a, 0xc0, 0x01, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xb3, 0x06, 0x70, 0x00, 0xc0, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xac, 0x01, 0x1c, 0x00, 0x30, 0x33, 0x33, 0x33, 0x33, 0x33, + 0x33, 0x6b, 0x00, 0x07, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x1a, 0xc0, 0x01, 0x00, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xb3, 0x06, 0x70, 0x00, 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, + 0xcc, 0xac, 0x01, 0x1c, 0x00, 0x30, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6b, 0x00, 0x07, 0x00, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x1a, 0xc0, 0x01, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, + 0x33, 0xb3, 0x06, 0x70, 0x00, 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xac, 0x01, 0x1c, 0x00, + 0x30, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6b, 0x00, 0x07, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, + 0xcc, 0xcc, 0x1a, 0xc0, 0x01, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xb3, 0x06, 0x70, 0x00, + 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xac, 0x01, 0x1c, 0x00, 0x30, 0x33, 0x33, 0x33, 0x33, + 0x33, 0x33, 0x6b, 0x00, 0x07, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x1a, 0xc0, 0x01, + 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xb3, 0x06, 0x70, 0x00, 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, + 0xcc, 0xcc, 0xac, 0x01, 0x1c, 0x00, 0x30, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6b, 0x80, 0x7e, + 0x45, 0x4f, 0xc0, 0xcc, 0x3e, 0xa4, 0x1f, 0xb0, 0x16, 0xb0, 0x1e, 0xb0, 0x42, 0xd7, 0x63, 0x79, + 0x60, 0x59, 0x60, 0x28, 0xb0, 0xc0, 0x3c, 0x8f, 0x0e, 0x60, 0x46, 0xd7, 0xe3, 0x7d, 0xe0, 0x9d, + 0xae, 0xc7, 0x6b, 0xc0, 0x38, 0xe0, 0x25, 0xe0, 0x69, 0xe0, 0xbf, 0xc0, 0xeb, 0xed, 0xfc, 0x4b, + 0x98, 0x99, 0x99, 0x99, 0x99, 0x65, 0x64, 0x08, 0xb0, 0x01, 0xb0, 0x26, 0x73, 0xef, 0x8f, 0x57, + 0x00, 0x96, 0x42, 0xf7, 0xc4, 0x83, 0xbb, 0x1e, 0x03, 0x81, 0x59, 0xc0, 0x74, 0x60, 0x2a, 0x30, + 0x11, 0x98, 0x80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, 0xfc, + 0x91, 0x94, 0x77, 0xf1, 0xdf, 0xed, 0x6c, 0x74, 0x3c, 0x24, 0x54, 0x7f, 0xe2, 0x7f, 0x1f, 0xda, + 0xce, 0x3f, 0xe0, 0x66, 0xf1, 0xac, 0x0c, 0x7c, 0x25, 0xc6, 0xf8, 0x7f, 0x53, 0xee, 0x9e, 0xc0, + 0xf3, 0x7a, 0x00, 0x38, 0x35, 0x62, 0x4c, 0x67, 0xd7, 0xb8, 0x1f, 0x10, 0x1e, 0x51, 0x37, 0x33, + 0xcb, 0xca, 0x12, 0xe8, 0xcc, 0x7f, 0xe8, 0x0e, 0xcb, 0x44, 0xb4, 0xf8, 0x7f, 0x3c, 0xb7, 0x19, + 0x59, 0x93, 0xf4, 0xef, 0xfa, 0x33, 0x24, 0xa3, 0xef, 0xa0, 0x3c, 0x27, 0xf2, 0xff, 0xd8, 0xbb, + 0xef, 0x30, 0xbb, 0xaa, 0xea, 0xff, 0xe3, 0xef, 0x54, 0x42, 0x02, 0x84, 0x40, 0xe8, 0x25, 0xf4, + 0xde, 0xab, 0x28, 0x25, 0x48, 0x91, 0xfa, 0xa5, 0x0b, 0x02, 0x42, 0x28, 0xd2, 0xa4, 0xaa, 0x08, + 0x2a, 0x88, 0x80, 0xa0, 0x08, 0x76, 0xa4, 0x48, 0x31, 0x54, 0x05, 0x04, 0x14, 0x41, 0xe9, 0x42, + 0x00, 0x11, 0xe9, 0x35, 0xb4, 0xd0, 0x7b, 0x4b, 0x08, 0x09, 0xe9, 0x99, 0xdf, 0x1f, 0x6b, 0xe6, + 0x97, 0xc9, 0x30, 0x73, 0xcf, 0xda, 0xf7, 0x9e, 0x7d, 0xea, 0xe7, 0xf5, 0x3c, 0xf3, 0x28, 0xc9, + 0xbe, 0xf7, 0xae, 0x49, 0x32, 0xf7, 0x9e, 0xb3, 0xf6, 0xda, 0x6b, 0x05, 0x58, 0x92, 0xe4, 0x06, + 0x77, 0x37, 0xb5, 0xff, 0xef, 0x9c, 0x91,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0xfa, 0x0d, 0x76, + 0xf1, 0x3c, 0x14, 0xd8, 0x1d, 0xf8, 0x13, 0x76, 0x8e, 0x56, 0x44, 0x24, 0x6b, 0x83, 0x81, 0xdb, + 0x80, 0x35, 0x9d, 0xeb, 0xc7, 0x01, 0x5b, 0x01, 0x4f, 0x44, 0x8b, 0x48, 0xea, 0xa8, 0xa3, 0xc3, + 0xf7, 0x47, 0x24, 0x97, 0x2e, 0x0f, 0xc1, 0xe6, 0x8a, 0xe7, 0x2d, 0xe9, 0x4c, 0xf6, 0xbb, 0xd8, + 0x1c, 0x74, 0xb0, 0xd1, 0x79, 0x55, 0xd2, 0xb5, 0xab, 0xff, 0x89, 0x58, 0x33, 0xd0, 0x24, 0xf3, + 0x00, 0xe7, 0xa6, 0x1f, 0x4e, 0x65, 0x0d, 0xc7, 0x9f, 0x98, 0x05, 0x2b, 0xfd, 0x9f, 0x18, 0x27, + 0x94, 0x68, 0x5e, 0xc0, 0x12, 0x43, 0x5e, 0x3b, 0x01, 0x2b, 0x44, 0x8a, 0xa5, 0x65, 0x4a, 0x00, + 0x88, 0xf8, 0xed, 0x87, 0xff, 0xec, 0xff, 0x7b, 0xc0, 0x39, 0x11, 0x63, 0x89, 0xe9, 0x66, 0xec, + 0x4d, 0xeb, 0x38, 0xac, 0xd4, 0x36, 0xa9, 0xd9, 0x91, 0x88, 0x48, 0x4c, 0x73, 0x01, 0xff, 0x02, + 0xd6, 0x73, 0xae, 0xff, 0x14, 0xd8, 0x9a, 0xf0, 0x11, 0xa7, 0x22, 0x49, 0x3a, 0xef, 0x90, 0x97, + 0xe1, 0x18, 0xc0, 0x26, 0xc0, 0xb2, 0x09, 0x6b, 0xae, 0x67, 0x56, 0x69, 0x7c, 0xd5, 0x12, 0x00, + 0x5d, 0x2b, 0x30, 0xc6, 0x01, 0xc7, 0x38, 0x1f, 0xbb, 0x33, 0x56, 0xca, 0x2d, 0xc9, 0x42, 0x8e, + 0x4c, 0xdc, 0x86, 0xbd, 0x9f,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e, 0xed, 0x8c, 0xff, 0x26, + 0xf7, 0x5e, 0xac, 0x17, 0x43, 0x99, 0x5d, 0x8c, 0xfd, 0xec, 0x7b, 0x2c, 0x80, 0x8d, 0x9f, 0x2d, + 0x1c, 0x25, 0x00, 0x44, 0x7c, 0xb6, 0x0f, 0x58, 0xfb, 0x57, 0xec, 0x42, 0x54, 0x44, 0x44, 0x9a, + 0xd3, 0x0f, 0x7b, 0x2f, 0xdd, 0xca, 0xb9, 0x7e, 0x22, 0xb0, 0x1d, 0xf0, 0x9f, 0x68, 0x11, 0x89, + 0xcc, 0x5e, 0x01, 0x00, 0xbe, 0x63, 0x00, 0x23, 0x48, 0x6e, 0xc2, 0x17, 0xc3, 0xee, 0xcc, 0x1a, + 0x83, 0xd7, 0x93, 0xab, 0x99, 0xbd, 0x33, 0x7e, 0x1d, 0x2a, 0x00, 0x00, 0x5e, 0xc7, 0x46, 0x3a, + 0x7b, 0x1c, 0x06, 0x7c, 0x29, 0x9d, 0x70, 0x2a, 0x69, 0x87, 0x80, 0xb5, 0x17, 0x47, 0x8b, 0x22, + 0x3b, 0x93, 0x81, 0xcb, 0x03, 0xd6, 0x17, 0xf2, 0x18, 0x89, 0x12, 0x00, 0x22, 0x3e, 0x21, 0x09, + 0x80, 0x2b, 0xa2, 0x45, 0x21, 0x22, 0x52, 0x7d, 0x7d, 0x81, 0xbf, 0xe0, 0xbf, 0xb0, 0xfc, 0x1c, + 0x7b, 0x8f, 0x4e, 0xda, 0x8d, 0x15, 0x69, 0x55, 0xd7, 0x9d, 0xce, 0xeb, 0x49, 0x3e, 0x06, 0xb0, + 0x0c, 0xd6, 0x24, 0x2d, 0x6b, 0x23, 0x1c, 0x6b, 0x46, 0x76, 0xf9, 0xef, 0xaa, 0x25, 0x00, 0x1a, + 0x4d, 0x61, 0xf8, 0x2d, 0xbe, 0x3e, 0x21, 0xbd, 0x81, 0x8b, 0x28, 0x68, 0x29, 0x77, 0xce, 0x06, + 0x60, 0x63, 0x56, 0x3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c, 0x6b, 0xe1, 0x54, 0xce, 0x06, 0x01, 0x6b, + 0x3d, 0x89, 0xb2, 0x32, 0xb9, 0x2d, 0x60, 0xed, 0xe6, 0xd1, 0xa2, 0x68, 0x92, 0x12, 0x00, 0x22, + 0xc9, 0xd6, 0x09, 0x58, 0x7b, 0x57, 0xb4, 0x28, 0x44, 0x44, 0xaa, 0xed, 0x7c, 0xfc, 0x0d, 0xd3, + 0xa6, 0x60, 0x67, 0x2b, 0xef, 0x88, 0x16, 0x8d, 0x88, 0xcf, 0xdf, 0x81, 0x8f, 0x13, 0xd6, 0x0c, + 0x04, 0xf6, 0xca, 0x20, 0x16, 0xb0, 0x9b, 0xf8, 0xfd, 0x12, 0xd6, 0x4c, 0x02, 0xae, 0xc9, 0x20, + 0x96, 0x32, 0x38, 0x19, 0xeb, 0x09, 0x90, 0x64, 0x00, 0x70, 0x61, 0xe4, 0x58, 0xca, 0x66, 0xdd, + 0x80, 0xb5, 0x77, 0x46, 0x8b, 0x22, 0x1f, 0x21, 0x9f, 0x3d, 0x21, 0x89, 0x92, 0x4c, 0x28, 0x01, + 0x20, 0x92, 0x2c, 0x24, 0x01, 0x70, 0x7f, 0xf2, 0x12, 0x11, 0x11, 0xe9, 0xe2, 0xb7, 0xc0, 0xa1, + 0xce, 0xb5, 0x53, 0xb1, 0x1d, 0xd5, 0x5b, 0xe3, 0x85, 0x23, 0xe2, 0x36, 0x15, 0xb8, 0xca, 0xb1, + 0xee, 0xc0, 0xd8, 0x81, 0xb4, 0xdb, 0x04, 0x58, 0x36, 0x61, 0xcd, 0x8d, 0xc0, 0xa7, 0x19, 0xc4, + 0x52, 0x06, 0x13, 0xb1, 0xa9, 0x00, 0x1e, 0x9b, 0x93, 0xfd, 0x71, 0x8e, 0x22, 0xf3, 0x26, 0x00, + 0x5e, 0x06, 0xde, 0x89, 0x19, 0x48, 0x0e, 0x1e, 0x00, 0xa6, 0x3b, 0xd7, 0xae, 0x19, 0x33, 0x90, + 0x66, 0x28, 0x01, 0x20, 0x92, 0x6c, 0x75, 0xe7, 0xba, 0xc9, 0xc0, 0x4b, 0x31, 0x03, 0x11, 0x11, + 0xa9, 0xa0, 0xb3, 0x80, 0xa3, 0x9d, 0x6b, 0xa7, 0x61, 0xa3, 0xcd, 0xbc, 0x73, 0xbc, 0x45, 0xb2, + 0xe0, 0x39, 0x06, 0xb0, 0x21, 0xb0, 0x4a, 0xec, 0x40, 0xf0, 0x55, 0xd1, 0x74, 0x57, 0xfe, 0x5f, + 0x67, 0xb7, 0x00, 0xd7, 0x3a, 0xd7, 0x9e, 0x83, 0x8d, 0x77, 0xab, 0xbb, 0x21, 0xc0, 0x12, 0xce, + 0xb5, 0x4f, 0xc5, 0x0c, 0x24, 0x27, 0x93, 0x81, 0x17, 0x9c, 0x6b, 0x57, 0xa5, 0x60, 0xf7, 0xdc, + 0x85, 0x0a, 0x46, 0xa4, 0xa0, 0x96, 0x74, 0xae, 0x1b, 0x8d, 0xaf, 0x99, 0x8c, 0x88, 0x88, 0x98, + 0xd3, 0xf0, 0x37, 0xd7, 0x9a, 0x0e, 0xec, 0x89, 0x35, 0x93, 0x12, 0x29, 0x92, 0x27, 0xf1, 0x75, + 0x94, 0x8f, 0x5d, 0x05, 0x30, 0x10, 0x1b, 0xff, 0xd7, 0xc8, 0x1b, 0xa8, 0x6f, 0x46, 0x77, 0x8e, + 0x01, 0xc6, 0x39, 0xd6, 0xcd, 0x07, 0xfc, 0x26, 0x72, 0x2c, 0x65, 0xb0, 0x54, 0xc0, 0xda, 0xa7, + 0x63, 0x05, 0x91, 0xb3, 0x27, 0x9d, 0xeb, 0x06, 0x00, 0x8b, 0xc5, 0x0c, 0x24, 0x94, 0x12, 0x00, + 0x22, 0x8d, 0xf5, 0xc6, 0x3a, 0x78, 0x7a, 0x78, 0x33, 0x81, 0x22, 0x22, 0x02, 0x3f, 0xc0, 0xce, + 0xdf, 0x7a, 0x4c, 0xc7, 0x9a, 0x03, 0xde, 0x18, 0x2f, 0x1c, 0x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, 0xd1, 0x98, 0xb2, 0x9a, 0x10, 0xb0, 0x76, 0x70, + 0xb4, 0x28, 0x9a, 0xa0, 0x04, 0x80, 0x48, 0x63, 0x03, 0x02, 0xd6, 0x56, 0xf5, 0x0d, 0x4e, 0x44, + 0xa4, 0x55, 0xbb, 0x63, 0xcd, 0xc7, 0x9a, 0xbd, 0xee, 0x98, 0x13, 0xf8, 0x07, 0x56, 0xe6, 0x2c, + 0x52, 0x54, 0xde, 0xa3, 0xa3, 0x69, 0xcf, 0x92, 0xdf, 0x04, 0x58, 0x36, 0x61, 0xcd, 0x75, 0x68, + 0xa3, 0xc2, 0x6b, 0x0a, 0x70, 0x98, 0x73, 0xed, 0x7a, 0xf8, 0xc7, 0x98, 0x56, 0x89, 0x37, 0x01, + 0x30, 0x25, 0x6a, 0x14, 0xf9, 0x9a, 0x14, 0xb0, 0x76, 0x8e, 0x68, 0x51, 0x34, 0x41, 0x09, 0x80, + 0xfa, 0xf8, 0x36, 0xf9, 0x9f, 0x69, 0xf6, 0x7e, 0x6d, 0x1c, 0xe9, 0xcf, 0xa0, 0x19, 0x21, 0x15, + 0x00, 0x4a, 0x00, 0x88, 0x88, 0x7c, 0xd1, 0xff, 0x61, 0xe7, 0xf8, 0x5b, 0xdd, 0x25, 0x5b, 0x08, + 0xb8, 0x99, 0xb0, 0xd2, 0x53, 0x91, 0xac, 0xfd, 0x09, 0xbb, 0x96, 0x69, 0x64, 0x65, 0x60, 0xa3, + 0x14, 0x5f, 0x73, 0x84, 0x63, 0xcd, 0xc8, 0x14, 0x5f, 0xaf, 0x0e, 0xfe, 0x8d, 0xff, 0xc8, 0xc4, + 0xe9, 0x14, 0xac, 0xc9, 0x5b, 0x06, 0xbc, 0xd7, 0xc7, 0x55, 0xbe, 0x36, 0x0e, 0xf9, 0xde, 0xfa, + 0x47, 0x8b, 0xa2, 0x09, 0x4a, 0x00, 0x88, 0x34, 0x16, 0x32, 0xae, 0x67, 0x46, 0xb4, 0x28, 0x1a, + 0x9b, 0x40, 0xbe, 0x09, 0x9b, 0x2b, 0xe3, 0x7f, 0x8b, 0x22, 0x52, 0x52, 0x6b, 0x03, 0xd7, 0xe2, + 0x9f, 0xa6, 0x92, 0x64, 0x35, 0x6c, 0x27, 0x33, 0xe6, 0x28, 0x35, 0x91, 0x56, 0xbc, 0x0e, 0xdc, + 0xed, 0x58, 0x97, 0x56, 0x15, 0xc0, 0x40, 0xac, 0xc2, 0xa6, 0x91, 0x31, 0x58, 0x03, 0x40, 0x09, + 0x73, 0x3c, 0xf0, 0xa1, 0x63, 0xdd, 0x20, 0xe0, 0xbc, 0xc8, 0xb1, 0x14, 0x8d, 0x37, 0xa1, 0x9b, + 0xd7, 0xb5, 0x71, 0x16, 0x42, 0xbe, 0xb7, 0x42, 0xdd, 0x73, 0x17, 0x2a, 0x18, 0x91, 0x02, 0xf2, + 0x74, 0x82, 0xed, 0x10, 0x72, 0x5c, 0x40, 0x44, 0xa4, 0x0e, 0x96, 0xc1, 0x57, 0xfa, 0x38, 0x35, + 0xe0, 0x39, 0xb7, 0x06, 0xfe, 0xd0, 0x5c, 0x38, 0x22, 0x99, 0xf0, 0x34, 0x03, 0xdc, 0x93, 0x74, + 0xc6, 0xc8, 0xed, 0x4e, 0x72, 0xc3, 0xe2, 0x91, 0x24, 0x57, 0x25, 0xc8, 0x17, 0x7d, 0x0c, 0x7c, + 0xc7, 0xb9, 0x76, 0x7b, 0xec, 0xef, 0xb4, 0x2e, 0xbc, 0xd7, 0xc7, 0x55, 0xbe, 0x36, 0x0e, 0xf9, + 0xde, 0x42, 0x3e, 0xe3, 0xa2, 0x53, 0x02, 0x40, 0xa4, 0xb1, 0x90, 0x1f, 0xd8, 0x2a, 0xbf, 0xc9, + 0x89, 0x88, 0xc4, 0xf2, 0x08, 0x56, 0x12, 0xfd, 0x97, 0x80, 0xc7, 0x1c, 0x02, 0x7c, 0x2f, 0x4e, + 0x38, 0x22, 0x2d, 0xbb, 0x01, 0x18, 0x97, 0xb0, 0x66, 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0x91, 0xd2, 0xcd, 0x48, 0x1e, 0xc1, 0xd9, 0xe1, + 0xd1, 0x98, 0x81, 0x34, 0x43, 0x09, 0x00, 0x91, 0x64, 0x8f, 0xe0, 0x2f, 0xdd, 0xd9, 0x1a, 0xff, + 0x1b, 0x82, 0x88, 0x88, 0xf8, 0x84, 0x4e, 0x06, 0xe8, 0x18, 0x0f, 0x18, 0xd2, 0xa4, 0x49, 0x24, + 0x16, 0x4f, 0x33, 0xbe, 0xb5, 0x80, 0xb5, 0x1d, 0xeb, 0xf6, 0x27, 0xf9, 0x3a, 0x63, 0xa4, 0xe3, + 0x79, 0xa4, 0x35, 0x6f, 0x61, 0xfd, 0x00, 0x3c, 0x76, 0x07, 0x76, 0x88, 0x18, 0x4b, 0x5e, 0xee, + 0x0f, 0x58, 0xbb, 0x55, 0xb4, 0x28, 0xf2, 0xb1, 0x45, 0xc0, 0xda, 0x51, 0xd1, 0xa2, 0x68, 0x92, + 0x12, 0x00, 0x22, 0xc9, 0xa6, 0x00, 0xff, 0x75, 0xae, 0x5d, 0x08, 0x1b, 0x71, 0x25, 0x22, 0x22, + 0xe9, 0xea, 0x98, 0x0c, 0xe0, 0xb5, 0x30, 0x70, 0x0b, 0x1a, 0x0f, 0x28, 0xf9, 0x7b, 0x19, 0xdf, + 0x4d, 0xc0, 0x01, 0x09, 0xbf, 0xdf, 0x0b, 0xd8, 0x2f, 0x61, 0xcd, 0xc7, 0x58, 0xf2, 0x4b, 0xe2, + 0xfb, 0x03, 0xf0, 0x3f, 0xe7, 0xda, 0xf3, 0x48, 0xee, 0xdb, 0x90, 0x75, 0x13, 0xe9, 0x56, 0x85, + 0xdc, 0xd8, 0xee, 0x44, 0xb5, 0x36, 0xc8, 0xbc, 0x09, 0x8d, 0x89, 0x14, 0x70, 0x0a, 0x9b, 0x12, + 0x00, 0x22, 0x3e, 0x77, 0x04, 0xac, 0x1d, 0x11, 0x2b, 0x08, 0x11, 0x91, 0x9a, 0x3b, 0x1d, 0x1b, +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c, 0x2f, 0x4e, 0x38, 0x22, 0x2e, 0x9f, 0x03, 0xd7, 0x38, + 0xd6, 0xed, 0xde, 0xc3, 0xaf, 0x0f, 0x04, 0xf6, 0x48, 0x78, 0xec, 0x93, 0x84, 0x4d, 0x2e, 0x92, + 0x74, 0x9c, 0x0a, 0xbc, 0xe2, 0x58, 0xd7, 0x1b, 0xb8, 0x88, 0x9e, 0x2b, 0x92, 0x0a, 0x35, 0x2a, + 0xce, 0x29, 0xe4, 0x06, 0x77, 0x6f, 0x60, 0x81, 0x58, 0x81, 0x64, 0x64, 0x00, 0xfe, 0x89, 0x1d, + 0x53, 0x81, 0x7f, 0x44, 0x8c, 0xa5, 0x69, 0x4a, 0x00, 0x88, 0xf8, 0x79, 0xba, 0xf8, 0x76, 0x38, + 0x11, 0x1b, 0xeb, 0x23, 0x22, 0xe2, 0x31, 0xd8, 0xb9, 0xae, 0x95, 0x91, 0x7a, 0x55, 0x12, 0x3a, + 0x19, 0x00, 0x34, 0x1e, 0x50, 0xf2, 0xe7, 0x39, 0x06, 0xb0, 0x1d, 0xdd, 0x5f, 0x3f, 0x6c, 0x4f, + 0xf2, 0x28, 0xb5, 0x91, 0xa1, 0x01, 0x49, 0x2a, 0x26, 0x01, 0x87, 0x3b, 0xd7, 0xae, 0x09, 0x7c, + 0xb7, 0xc1, 0xf3, 0x94, 0xcd, 0x13, 0xf8, 0x8f, 0x01, 0x0c, 0xa4, 0xe7, 0xef, 0xbd, 0x2c, 0x0e, + 0x02, 0x16, 0x74, 0xae, 0xbd, 0x09, 0xf8, 0x24, 0x62, 0x2c, 0x4d, 0x53, 0x02, 0x40, 0xc4, 0x6f, + 0x24, 0xfe, 0x73, 0x3c, 0x8b, 0x01, 0x87, 0xc5, 0x0b, 0x45, 0x44, 0x22, 0x58, 0x10, 0x18, 0x0e, + 0x7c, 0x1b, 0x6b, 0xee, 0x74, 0x0f, 0xf0, 0x21, 0xd6, 0xdc, 0x33, 0x36, 0x6f, 0x02, 0x20, 0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xfa, 0xcb, 0x28, 0x4f, + 0x43, 0xc0, 0xde, 0x58, 0x82, 0x23, 0xa9, 0x07, 0x47, 0x87, 0x31, 0xd8, 0x38, 0xce, 0xc2, 0x52, + 0x02, 0x40, 0x24, 0xdc, 0x09, 0xc0, 0x8c, 0x80, 0xf5, 0xbf, 0xa1, 0x9c, 0xb3, 0x4f, 0xf5, 0xfe, + 0x20, 0x55, 0x77, 0x9f, 0x73, 0xdd, 0x3a, 0xcc, 0x7e, 0x31, 0x9e, 0xb6, 0x90, 0x33, 0xe9, 0xea, + 0xf0, 0xdd, 0xbd, 0x8e, 0xc9, 0x00, 0x6f, 0x05, 0x3c, 0xe6, 0x6b, 0xc0, 0xef, 0xe3, 0x84, 0x23, + 0xd2, 0x90, 0xa7, 0x19, 0xe0, 0x36, 0xed, 0xff, 0xdb, 0x1b, 0x6b, 0x00, 0xd8, 0xc8, 0x95, 0x14, + 0x70, 0xd6, 0x78, 0x8d, 0x1d, 0x8a, 0xef, 0x66, 0x78, 0x28, 0x96, 0x04, 0xe8, 0x90, 0x34, 0x26, + 0xb2, 0xc8, 0xde, 0x24, 0xec, 0xfd, 0x74, 0x31, 0xe0, 0xcf, 0x40, 0x9f, 0x38, 0xe1, 0xa4, 0xea, + 0x34, 0x60, 0xcb, 0x80, 0xf5, 0x27, 0x52, 0xf0, 0x89, 0x3d, 0xba, 0xc0, 0x17, 0x09, 0xf7, 0x1c, + 0x70, 0x61, 0xc0, 0xfa, 0x7e, 0xc0, 0x8d, 0xd8, 0x8e, 0x53, 0x59, 0xcc, 0x09, 0x5c, 0x4f, 0x39, + 0xde, 0x98, 0x45, 0x9a, 0x75, 0x5b, 0xc0, 0xda, 0x98, 0xf3, 0x8b, 0x93, 0x9a, 0x7b, 0x75, 0x78, + 0x05, 0x18, 0x17, 0x31, 0x8e, 0xb2, 0x7b, 0x17, 0xd8, 0x89, 0xb0, 0x73, 0xb4, 0x87, 0x51, 0xfe, + 0xae, 0xd4, 0x52, 0x3e, 0xb7, 0x90, 0xdc, 0xcf, 0x63, 0xab, 0xf6, 0xff, 0x5d, 0x8f, 0xe4, 0xa6, + 0x69, 0x2a, 0xff, 0x2f, 0x96, 0x17, 0x81, 0x33, 0x9c, 0x6b, 0xf7, 0x63, 0x56, 0x39, 0xfc, 0xf8, + 0x38, 0xe1, 0x64, 0xe6, 0x4c, 0xe0, 0xe3, 0x80, 0xf5, 0x5b, 0x00, 0xe7, 0x03, 0xbd, 0xe2, 0x84, + 0x93, 0x8a, 0x3d, 0x81, 0x1f, 0x06, 0xac, 0xbf, 0x8f, 0xb0, 0x7e, 0x61, 0xb9, 0x50, 0x02, 0x40, + 0xa4, 0x39, 0x3f, 0x20, 0x6c, 0xa7, 0x69, 0x28, 0x70, 0x17, 0xb0, 0x6a, 0x9c, 0x70, 0x52, 0xb5, + 0x08, 0x56, 0xbe, 0x96, 0x54, 0x72, 0x28, 0x52, 0x76, 0xb7, 0xe2, 0xaf, 0xe6, 0xf9, 0x36, 0x71, + 0xca, 0x15, 0xd7, 0xc0, 0x5f, 0x01, 0x70, 0x47, 0x84, 0xd7, 0xaf, 0x9a, 0xd0, 0xc9, 0x00, 0x00, + 0xbf, 0x40, 0xef, 0x77, 0x92, 0xad, 0xe9, 0x58, 0x2f, 0x80, 0x46, 0x36, 0xc5, 0x36, 0x10, 0x92, + 0x9a, 0xff, 0x3d, 0x0c, 0x3c, 0x9b, 0x46, 0x50, 0x92, 0xaa, 0xb3, 0x48, 0x9e, 0xf8, 0xd0, 0xe1, + 0x02, 0xac, 0xd1, 0x63, 0xd9, 0x13, 0x00, 0x63, 0xb1, 0x46, 0x79, 0x21, 0xbe, 0x85, 0x55, 0xca, + 0x16, 0xd1, 0xae, 0x58, 0x75, 0x8d, 0x37, 0x41, 0x31, 0x19, 0xfb, 0x7e, 0x0a, 0x4f, 0x09, 0x00, + 0x91, 0xe6, 0x8c, 0x07, 0x0e, 0x21, 0xec, 0x22, 0x73, 0x41, 0xe0, 0x5e, 0xe0, 0xab,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0x85, 0x62, 0x7b, 0x01, 0xfb, 0xf9, 0x3b, 0x0d, 0xfd, 0xfc, 0x65, 0xa1, + 0x63, 0x32, 0x40, 0xc8, 0x9f, 0xf5, 0x36, 0x68, 0x3c, 0xa0, 0xc4, 0x73, 0x13, 0x36, 0x05, 0x28, + 0x89, 0xca, 0xff, 0xcb, 0x6f, 0x22, 0xf0, 0xed, 0xbc, 0x83, 0x28, 0x80, 0x89, 0x58, 0x6f, 0x96, + 0xa5, 0x81, 0x1f, 0x51, 0x9c, 0x8a, 0x80, 0x51, 0xc0, 0xae, 0xd8, 0x11, 0xd8, 0x9b, 0x73, 0x8e, + 0x25, 0x0a, 0x25, 0x00, 0x44, 0xb2, 0xf5, 0x0c, 0x70, 0x10, 0xd6, 0x00, 0xe5, 0xdb, 0xd8, 0x9b, + 0x4c, 0x1e, 0x63, 0x7c, 0x3e, 0x06, 0x2e, 0xc1, 0x2e, 0x68, 0x17, 0xc2, 0xce, 0xa4, 0x3d, 0x99, + 0x43, 0x1c, 0x22, 0x45, 0x36, 0x0d, 0xeb, 0x1a, 0xbf, 0x0a, 0xd6, 0x71, 0x3b, 0xc6, 0x51, 0x9e, + 0x77, 0xb0, 0x86, 0xa1, 0xab, 0x63, 0xe3, 0x8d, 0x24, 0x3b, 0x1d, 0x93, 0x01, 0x42, 0x1c, 0x8e, + 0x55, 0x75, 0x89, 0xa4, 0x6d, 0x2a, 0xd6, 0x74, 0xb2, 0x91, 0xd7, 0xb0, 0xde, 0x3c, 0x52, 0x7e, + 0x37, 0x63, 0x95, 0xa1, 0x62, 0x15, 0x00, 0x67, 0x62, 0x89, 0x80, 0x9d, 0xb1, 0x3f, 0x97, 0x90, + 0x0a, 0xad, 0x34, 0xbc, 0x89, 0x4d, 0x68, 0x58, 0x03, 0x4b, 0xfe, 0xdf, 0x48, 0x85, 0x93, 0xf1, + 0x9a, 0x02, 0x20, 0x92, 0x8f, 0xb1, 0xd8, 0x4c, 0xd3, 0xf3, 0x80, 0x85, 0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da, 0xdc, 0xd8, 0xcf, 0x68, 0x1b, 0xf6, 0xf3, 0xf9, 0x19, 0x96, 0x80, 0x7b, + 0x15, 0x78, 0x16, 0xf8, 0x2f, 0xd6, 0x5b, 0x40, 0x67, 0x78, 0x45, 0x44, 0x44, 0x7c, 0x06, 0x62, + 0xe3, 0x13, 0x57, 0xc3, 0xae, 0x8d, 0x97, 0xc1, 0x3e, 0x73, 0x87, 0x02, 0xf3, 0x01, 0x73, 0x62, + 0xd7, 0xc6, 0x7d, 0xb1, 0xa4, 0xfa, 0x54, 0xec, 0xba, 0xf8, 0x23, 0xe0, 0x43, 0xec, 0x73, 0x78, + 0x0c, 0xf0, 0x12, 0x56, 0xf1, 0xfa, 0x1c, 0x35, 0xee, 0xb5, 0xa3, 0x04, 0x80, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x48, 0x0d, 0xa8, 0x07, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x0d, + 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x03, 0x4a, 0x00, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0xd4, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, + 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x0d, 0x28, 0x01, 0x20, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x52, 0x03, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, + 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, 0xa0, 0x04, 0x80, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x48, 0x0d, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, + 0x03, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, 0x80, 0x12, 0x00, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, + 0x0d, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x03, 0x4a, 0x00, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x35, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x0d, 0x28, 0x01, 0x20, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x03, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0xd4, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, 0xa0, 0x04, 0x80, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x0d, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x52, 0x03, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, 0x80, 0x12, 0x00, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x48, 0x0d, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x03, 0x4a, 0x00, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x35, 0xd0, 0x37, 0xef, 0x00, 0xa4, 0x54, 0x06, 0x01, 0xeb, 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, 0x0f, 0xca, 0xbf, 0x01, + 0xc3, 0xf3, 0x0c, 0xa8, 0x40, 0x96, 0xc2, 0x32, 0xa2, 0x6f, 0x61, 0x37, 0x12, 0xdb, 0x10, 0xf7, + 0xe6, 0xbf, 0x3b, 0x03, 0xb1, 0x37, 0xb6, 0x1b, 0x81, 0xd7, 0x80, 0x1f, 0x03, 0x43, 0x32, 0x8e, + 0x41, 0x7a, 0xb6, 0x20, 0xb0, 0x3b, 0x70, 0x09, 0xf0, 0x3e, 0xf6, 0xf7, 0xb4, 0x59, 0xae, 0x11, + 0xe5, 0x67, 0x1e, 0xe0, 0x87, 0xc0, 0x9b, 0xc0, 0x55, 0xc0, 0x16, 0xe4, 0xf7, 0x7e, 0x3a, 0x00, + 0x4b, 0x42, 0xfc, 0x13, 0x78, 0x01, 0xf8, 0x26, 0xe9, 0x56, 0xea, 0x88, 0x48, 0xf6, 0x66, 0x62, + 0xd7, 0x2a, 0x1e, 0x7d, 0x81, 0x11, 0xf1, 0x42, 0xc9, 0xd4, 0x01, 0xf8, 0xdf, 0xbf, 0x2e, 0xa4, + 0x38, 0x09, 0xcf, 0x71, 0x58, 0x55, 0x96, 0xc7, 0x5a, 0x58, 0xa2, 0xa3, 0x48, 0x42, 0x6e, 0xa0, + 0xb7, 0x8d, 0x16, 0x45, 0x73, 0x06, 0x60, 0x09, 0x78, 0x8f, 0x67, 0x45, 0x27, 0x07, 0x00, 0x00, + 0x20, 0x00, 0x49, 0x44, 0x41, 0x54, 0x17, 0xb1, 0xcf, 0xc9, 0xa2, 0x79, 0x1e, 0x38, 0x2a, 0x60, + 0xfd, 0xef, 0xb0, 0x2a, 0xc3, 0x22, 0x9a, 0x13, 0xb8, 0x12, 0x7f, 0x42, 0xe9, 0x0f, 0x14, 0x2f, + 0x29, 0x53, 0x79, 0x75, 0x4b, 0x00, 0x74, 0xd6, 0x0f, 0xd8, 0x09, 0x2b, 0x3f, 0x7f, 0x88, 0xfa, + 0x26, 0x02, 0x16, 0x04,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x68, 0x9d, 0xb7, 0x2a, 0xa6, 0x17, 0x61, 0x15, 0x37, 0x22, 0x22, 0x69, + 0x7a, 0x1b, 0xff, 0x0d, 0xce, 0xde, 0x58, 0x3f, 0x80, 0x22, 0x18, 0x80, 0x7f, 0xa4, 0xf2, 0x4d, + 0xf8, 0x4b, 0xe8, 0x8b, 0xea, 0x6e, 0xfc, 0x95, 0x58, 0x59, 0x1c, 0x03, 0x18, 0x06, 0xac, 0x9c, + 0xb0, 0xe6, 0x79, 0xe0, 0xe3, 0x2e, 0xbf, 0x76, 0x5f, 0xc2, 0x63, 0xe6, 0x04, 0x86, 0x37, 0x19, + 0x53, 0x08, 0xef, 0x51, 0x83, 0x36, 0xfc, 0xd5, 0x17, 0x65, 0xf6, 0x38, 0xf0, 0x7d, 0xe7, 0xda, + 0x25, 0xb0, 0x9d, 0xfc, 0x10, 0x4b, 0xe2, 0x1f, 0x3d, 0xf8, 0x54, 0x40, 0x2c, 0x92, 0x33, 0x25, + 0x00, 0x66, 0xf1, 0x5e, 0xf8, 0xf7, 0xc1, 0xba, 0xcc, 0x17, 0xc9, 0xff, 0xe1, 0x8f, 0xe9, 0xbf, + 0x14, 0xb3, 0x7b, 0x79, 0x88, 0x0b, 0xf0, 0xcf, 0x3b, 0x5f, 0x84, 0x7c, 0x66, 0xd4, 0xd6, 0xcd, + 0x54, 0xe7, 0xba, 0xa2, 0x27, 0x63, 0xbc, 0x95, 0x0c, 0x90, 0x7d, 0xe7, 0x63, 0x11, 0x91, 0xce, + 0xbc, 0xcd, 0xf1, 0xe6, 0xc6, 0x76, 0x0a, 0x8b, 0x60, 0x37, 0x60, 0x88, 0x73, 0x6d, 0x59, 0x9b, + 0xff, 0x75, 0x36, 0x19, 0xff, 0x39, 0xf4, 0xad, 0x49, 0xa7, 0x59, 0x5b, 0x23, 0x9e, 0xcf, 0xad, + 0x51, 0xce, 0x5f, 0x6b, 0xe6, 0xb9, 0x5b, 0xe5, 0xad, 0x92, 0x78, 0x04, 0x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3d, 0x22, 0xe7, 0x4d, 0x28, 0x78, 0x7b, 0x15, 0x54, 0xd1, 0x83, 0xd8, 0x31, 0x53, + 0x8f, 0x66, 0x8f, 0x01, 0x78, 0x6e, 0xbe, 0xbd, 0x47, 0x45, 0xba, 0xe3, 0xe9, 0x03, 0xb0, 0x31, + 0x30, 0x77, 0x13, 0xcf, 0xbd, 0x1e, 0xb0, 0x80, 0x63, 0xdd, 0x34, 0x67, 0x1c, 0x75, 0xb6, 0x0f, + 0xd6, 0xf0, 0xb3, 0x55, 0x3b, 0x03, 0x87, 0xa4, 0xf0, 0x3c, 0x52, 0x00, 0x55, 0xbd, 0x29, 0x6c, + 0xd6, 0x55, 0x58, 0xc3, 0x91, 0xb2, 0x8c, 0x12, 0x19, 0x1b, 0xb0, 0x76, 0x68, 0xb4, 0x28, 0xf2, + 0x15, 0x72, 0xc4, 0x23, 0x64, 0x64, 0xa0, 0x34, 0xf6, 0x32, 0x70, 0x12, 0x56, 0x3a, 0x7a, 0x2c, + 0xf0, 0x71, 0xbe, 0xe1, 0x94, 0xca, 0x74, 0x6c, 0x57, 0xfe, 0xf7, 0xc0, 0x5e, 0xc0, 0x12, 0xd8, + 0x91, 0x81, 0x6f, 0x60, 0x59, 0xfa, 0x27, 0x88, 0x73, 0x51, 0xbc, 0x1d, 0xb6, 0x63, 0x13, 0x3a, + 0xca, 0x51, 0x44, 0xca, 0xc9, 0xdb, 0x5d, 0x7f, 0x31, 0x5a, 0x2b, 0xd5, 0xee, 0x6c, 0x23, 0x60, + 0x55, 0xc7, 0xba, 0x69, 0xf8, 0xa7, 0x15, 0x54, 0xd1, 0x4c, 0xe0, 0x16, 0xe7, 0xda, 0x66, 0x12, + 0x00, 0xcb, 0x02, 0xcb, 0x39, 0x62, 0xb8, 0xbd, 0x89, 0xe7, 0xee, 0x30, 0x9a, 0xe4, 0x2a, 0x93, + 0xfe, 0x58, 0xe2, 0x3b, 0x94, 0xb7, 0x72, 0xe0, 0x5e, 0x74, 0x6d,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x92, 0xc6, 0x57, 0xaf, 0x03, 0x2c, 0xe8, 0x78, + 0xcd, 0xf7, 0x49, 0xa7, 0x82, 0xa1, 0x6a, 0x4e, 0x21, 0x39, 0x19, 0x03, 0x36, 0x8d, 0x68, 0x5f, + 0xba, 0xff, 0xfb, 0xf8, 0x07, 0x36, 0xa1, 0xe3, 0x20, 0xc7, 0xf3, 0x7c, 0x1d, 0xeb, 0xa1, 0x36, + 0xd2, 0x19, 0x9f, 0x14, 0x44, 0xdd, 0x9b, 0x00, 0x56, 0x81, 0x77, 0x37, 0x76, 0x20, 0x36, 0x9e, + 0xa7, 0x4a, 0x36, 0xc6, 0x7f, 0x01, 0xfa, 0x64, 0xcc, 0x40, 0x4a, 0x6e, 0x14, 0x76, 0xc6, 0xdf, + 0x63, 0x0d, 0xac, 0x31, 0x9d, 0x14, 0xcf, 0x04, 0x60, 0x07, 0xec, 0xef, 0xd3, 0x6b, 0x7b, 0x92, + 0x4b, 0x45, 0xa5, 0x5e, 0x42, 0x6e, 0x80, 0x07, 0x44, 0x8b, 0x22, 0x5d, 0x21, 0x09, 0x80, 0xaa, + 0x56, 0x8a, 0x79, 0x9b, 0xee, 0xed, 0x48, 0x72, 0xf9, 0x6f, 0x57, 0x03, 0xb1, 0xf3, 0xff, 0x69, + 0xc6, 0x51, 0x27, 0xde, 0x9d, 0x6c, 0xcf, 0x91, 0xad, 0xc5, 0x48, 0xae, 0x8c, 0x6c, 0x23, 0xdd, + 0x04, 0xc0, 0x13, 0x24, 0x4f, 0x74, 0xe8, 0x87, 0x55, 0x30, 0x24, 0xf1, 0x96, 0xff, 0xdf, 0x4c, + 0x35, 0xab, 0x75, 0x5a, 0x31, 0x1c, 0x7f, 0x83, 0xdf, 0x9f, 0xd0, 0xb8, 0xfa, 0xef, 0x38, 0xfc, + 0xc7, 0x66, 0x7f, 0x07, 0x2c, 0xe3, 0x5c, 0x2b, 0x05, 0xa1, 0x04, 0x40, 0xf9, 0xfd, 0x27, 0x60, + 0x6d,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f, 0x64, 0x3b, 0xe1, 0xe2, 0x3e, 0xac, 0x87, 0x50, 0x23, 0x1d, 0x09, + 0x80, 0xa1, 0x58, 0x05, 0x51, 0x92, 0x3a, 0x97, 0xff, 0x9f, 0x01, 0x6c, 0xe8, 0x5c, 0x7b, 0x11, + 0xd9, 0x4d, 0xdd, 0x18, 0x8f, 0x1d, 0xcf, 0xf5, 0x5e, 0x3b, 0x5d, 0x48, 0xf7, 0x23, 0x20, 0x25, + 0x07, 0x4a, 0x00, 0x54, 0xd3, 0x64, 0xec, 0xac, 0xd0, 0x84, 0x80, 0xc7, 0xf4, 0xc6, 0x2e, 0xf6, + 0x2e, 0xa4, 0x18, 0x9d, 0xce, 0x47, 0x00, 0xa3, 0xb0, 0x0f, 0x07, 0xaf, 0xa7, 0x81, 0x1f, 0x44, + 0x89, 0x46, 0xda, 0xb0, 0x33, 0x5f, 0xde, 0x0c, 0xfc, 0xba, 0xc0, 0x09, 0xf1, 0xc2, 0x49, 0xdd, + 0x68, 0xec, 0x46, 0xc0, 0x6b, 0x19, 0xec, 0x82, 0xaa, 0xa7, 0x11, 0x59, 0x79, 0xe8, 0x83, 0x75, + 0xe8, 0xf5, 0x8e, 0x53, 0xfa, 0x1c, 0x4b, 0xec, 0x88, 0xf4, 0x64, 0x3c, 0x70, 0x76, 0xc0, 0xfa, + 0x61, 0xd8, 0xae, 0xf2, 0x12, 0x71, 0xc2, 0x69, 0xa8, 0x17, 0x36, 0xae, 0xf3, 0xb4, 0x80, 0xc7, + 0x4c, 0x40, 0x9f, 0x19, 0x23, 0x49, 0x9e, 0xf8, 0xd0, 0x1b, 0xbb, 0xa6, 0x00, 0xd8, 0x96, 0xe4, + 0x11, 0xa3, 0x53, 0xb0, 0x44, 0xa4, 0x34, 0x67, 0x14, 0xbe, 0x63, 0x69, 0x1d, 0x37, 0xfe, 0x5f, + 0x49, 0x58, 0xf7, 0x02, 0xbe, 0x63, 0x05, 0x69, 0x99, 0x4a, 0x72, 0xb9, 0xfe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 0x93, 0x7b, 0x39, 0xd6, 0xbe, 0x8c, 0x95, 0x7f, 0xaa, 0xfc, 0x5f, 0x44, 0x44, + 0x44, 0x44, 0x44, 0x24, 0x23, 0xaa, 0x00, 0x90, 0xb4, 0xbc, 0x8a, 0x75, 0x9d, 0xf5, 0x58, 0x0e, + 0xd8, 0x3b, 0x62, 0x2c, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0xd2, 0x85, 0x12, 0x00, 0x92, 0xa6, + 0x8b, 0x03, 0xd6, 0x9e, 0x82, 0x35, 0x85, 0x12, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x0c, 0x28, + 0x01, 0x20, 0x69, 0xfa, 0x2b, 0xf0, 0xbe, 0x73, 0xed, 0x72, 0xc0, 0xd1, 0x11, 0x63, 0x11, 0x11, + 0x11, 0x11, 0x11, 0x11, 0x91, 0x4e, 0x94, 0x00, 0x90, 0x34, 0x4d, 0x01, 0xce, 0x0d, 0x58, 0x7f, + 0x26, 0x36, 0x16, 0x4a, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x22, 0x53, 0x13, 0x40, 0x49, 0xdb, + 0x7c, 0x58, 0x3f, 0x80, 0x79, 0x9c, 0xeb, 0x9f, 0x01, 0x36, 0x01, 0xc6, 0x45, 0x8b, 0x48, 0x44, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x54, 0x01, 0x20, 0xa9, 0xfb, 0x04, 0x38, 0x27, 0x60, 0xfd, 0x6a, + 0xc0, 0x1d, 0xc0, 0xbc, 0x71, 0xc2, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x50, 0x05, 0x80, + 0xc4, 0x31, 0x08, 0x78, 0x01, 0x58, 0x2c, 0xe0, 0x31, 0xcf, 0x00, 0xdf, 0x04, 0x9e, 0x88, 0x12, + 0x91, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0xcd, 0xa9, 0x02, 0x40, 0x62, 0x98, 0x08, 0x1c, 0x17, + 0xf8, 0x98, 0xd5, 0x80, 0xff, 0x61, 0x7d, 0x01, 0x16, 0x4a, 0x3d, 0x22, 0x11, 0x11, 0x11, 0x11, + 0x11, 0x91, 0x9a, 0x53, 0x05, 0x80, 0xc4, 0xf4, 0x57, 0x60, 0xb7, 0x26, 0x1e, 0x37, 0x15, 0xb8, + 0x01, 0xb8, 0x1d, 0xb8, 0x1f, 0x78, 0xa9, 0x87, 0x75, 0x4b, 0x00, 0xab, 0xb4, 0x7f, 0xfd, 0x1e, + 0x98, 0xde, 0xc4, 0x6b, 0x89, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, 0x82, 0x12, 0x00, 0x12, 0xd3, + 0x10, 0xe0, 0x71, 0x60, 0x58, 0x8b, 0xcf, 0x33, 0x0d, 0x18, 0x8b, 0x35, 0x0a, 0xec, 0x07, 0x0c, + 0xc6, 0x9a, 0x0c, 0xf6, 0xed, 0xb4, 0x66, 0x4e, 0x60, 0x72, 0x8b, 0xaf, 0x23, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x52, 0x59, 0x4a, 0x00, 0x48, 0x6c, 0xab, 0x63, 0xbb, 0xf8, 0xde, 0xa9, 0x00, 0xcd, + 0x52, 0x02, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0x01, 0xf5, 0x00, 0x90, 0xd8, 0x9e, 0x06, + 0x76, 0x04, 0x26, 0xe4, 0x1d, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x9d, 0x29, 0x01, 0x20, + 0x59, 0x18, 0x05, 0x6c, 0x01, 0xbc, 0x9b, 0x77, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x75, + 0xa5, 0x04, 0x80, 0x64, 0xe5, 0x7f, 0xc0, 0x3a, 0xc0, 0x6d, 0x79, 0x07, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x52, 0x47, 0x4a, 0x00, 0x48, 0x96, 0xde, 0x03, 0xb6, 0x01, 0xf6, 0x06, 0x5e, 0xc9, + 0x39, 0x16, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x5a, 0x51, 0x02, 0x40, 0xf2, 0xf0, 0x67, 0x60, + 0x45, 0xe0, 0x1b, 0xc0, 0x9d, 0xc0, 0x8c, 0x16, 0x9f, 0xef, 0x7d, 0x60, 0x66, 0xab, 0x41, 0x89, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x54, 0x99, 0xa6, 0x00, 0x48, 0x11, 0x0c, 0x01, 0xb6, 0x02, 0x36, + 0xc0, 0xa6, 0x06, 0x0c, 0x03, 0x16, 0x02, 0x06, 0x62, 0xa3, 0xfe, 0xa6, 0x02, 0x9f, 0x03, 0x1f, + 0x61, 0x55, 0x04, 0xaf, 0x03, 0x2f, 0x00, 0xa3, 0x81, 0x47, 0xdb, 0xff, 0x5b, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x44, 0x1a, 0x50, 0x02, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0x06, 0x74, + 0x04, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0x06, 0x94, 0x00, 0x10, 0x11, 0x11, 0x11, + 0x11, 0x11, 0x11, 0xa9, 0x01, 0x25, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x6a, 0x40, + 0x09, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x1a, 0x50, 0x02, 0x40, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x44, 0xa4, 0x06, 0x94, 0x00, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0xa9, 0x01, + 0x25, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x6a, 0x40, 0x09, 0x00, 0x11, 0x11, 0x11, + 0x11, 0x11, 0x11, 0x91, 0x1a, 0x50, 0x02, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0x06, + 0x94, 0x00, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0xa9, 0x01, 0x25, 0x00, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x44, 0x44, 0x6a, 0x40, 0x09, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x1a, + 0x50, 0x02, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0x06, 0x94, 0x00, 0x10, 0x11, 0x11, + 0x11, 0x11, 0x11, 0x11, 0xa9, 0x01, 0x25, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x6a, + 0x40, 0x09, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x1a, 0x50, 0x02, 0x40, 0x44, 0x44, + 0x44, 0x44, 0x44, 0x44, 0xa4, 0x06, 0x94, 0x00, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0xa9, + 0x01, 0x25, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x6a, 0x40, 0x09, 0x00, 0x11, 0x11, + 0x11, 0x11, 0x11, 0x11, 0x91, 0x1a, 0x50, 0x02, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, + 0x06, 0x94, 0x00, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0xa9, 0x01, 0x25, 0x00, 0x44, 0x44, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x6a, 0x40, 0x09, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, + 0x1a, 0x50, 0x02, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0x06, 0x94, 0x00, 0x10, 0x11, + 0x11, 0x11, 0x11, 0x11, 0x11, 0xa9, 0x01, 0x25, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, + 0x6a, 0x40, 0x09, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x1a, 0x50, 0x02, 0x40, 0x44, + 0x44, 0x44, 0xea, 0x64, 0x38, 0xd0, 0x16, 0xf0, 0xf5, 0x9d, 0x5c, 0xa2, 0x14, 0x11, 0x11, 0x89, + 0x40, 0x09, 0x00, 0x11, 0x11, 0x11, 0xa9, 0x93, 0x8f, 0x81, 0xe9, 0x01, 0xeb, 0x7f, 0x06, 0xac, + 0x1b, 0x29, 0x16, 0x11, 0x11, 0x91, 0x4c, 0x29, 0x01, 0x20, 0x12, 0xc7, 0x5c, 0x84, 0xed, 0x30, + 0x85, 0x7c, 0x2d, 0x95, 0xdd, 0xb7, 0xd1, 0xd0, 0x18, 0x1a, 0xc7, 0x79, 0x77, 0x7e, 0xa1, 0x65, + 0x62, 0x29, 0xe2, 0xfd, 0x1d, 0xcf, 0x95, 0xdd, 0xb7, 0x21, 0x52, 0x3b, 0x4f, 0x03, 0xdb, 0x02, + 0x9f, 0x3a, 0xd7, 0xf7, 0x07, 0xae, 0x01, 0xe6, 0x8e, 0x16, 0x91, 0x94, 0xd9, 0x49, 0xf8, 0xde, + 0xd7, 0xf7, 0xcd, 0x2b, 0x40, 0x91, 0x82, 0xda, 0x17, 0xdf, 0xcf, 0xce, 0x49, 0x79, 0x05, 0x58, + 0x55, 0x4a, 0x00, 0x88, 0x48, 0xb3, 0xee, 0x48, 0xf8, 0xfd, 0xaf, 0x00, 0x03, 0xb3, 0x08, 0x44, + 0x44, 0x24, 0xd0, 0x9d, 0xc0, 0x46, 0xc0, 0xab, 0xce, 0xf5, 0xcb, 0x02, 0x17, 0xc4, 0x0b, 0x47, + 0x44, 0x44, 0x24, 0x1b, 0x4a, 0x00, 0x88, 0x48, 0xb3, 0x92, 0x12, 0x00, 0xfd, 0xb1, 0xb3, 0xb6, + 0x22, 0x22, 0x45, 0x34, 0x1a, 0xd8, 0x10, 0xf8, 0x8f, 0x73, 0xfd, 0xde, 0xc0, 0x81, 0xf1, 0xc2, + 0x11, 0x11, 0x11, 0x89, 0x4f, 0x09, 0x00, 0x11, 0x69, 0xd6, 0xdd, 0xc0, 0xcc, 0x84, 0x35, 0x5b, + 0x67, 0x11, 0x88, 0x88, 0x48, 0x93, 0x3e, 0x04, 0xbe, 0x0a, 0x5c, 0xed, 0x5c, 0xff, 0x7b, 0x60, + 0xa5, 0x78, 0xe1, 0x88, 0x88, 0x88, 0xc4, 0x95, 0x56, 0x02, 0x60, 0x6b, 0xfc, 0x67, 0x5b, 0x67, + 0x00, 0xeb, 0xa7, 0xf4, 0xba, 0x59, 0x59, 0x0f, 0x8b, 0xdb, 0xfb, 0x3d, 0x16, 0xf5, 0xa6, 0xe7, + 0x27, 0xc4, 0x3b, 0xb3, 0x9c, 0xe7, 0xd7, 0xe4, 0x14, 0xff, 0x8c, 0xc4, 0x6f, 0x2c, 0xf0, 0x48, + 0xc2, 0x9a, 0xa2, 0xfe, 0x2c, 0x48, 0xb6, 0x7a, 0x61, 0xe7, 0xae, 0xbd, 0x3f, 0xd3, 0xf7, 0xe4, + 0x12, 0xa5, 0xd4, 0xd5, 0x14, 0x60, 0x1f, 0xe0, 0x34, 0xc7, 0xda, 0x81, 0x58, 0x3f, 0x80, 0x01, + 0x51, 0x23, 0x12, 0x11, 0x11, 0x89, 0x24, 0xad, 0x04, 0xc0, 0xed, 0xc0, 0xe5, 0x01, 0xaf, 0x79, + 0x21, 0xd0, 0x27, 0xa5, 0xd7, 0x8e, 0xad, 0x37, 0x76, 0xee, 0xcf, 0xfb, 0x67, 0x75, 0x05, 0xf6, + 0xe7, 0x21, 0x52, 0x07, 0x49, 0xff, 0xd6, 0x57, 0x06, 0x16, 0xcf, 0x22, 0x10, 0x29, 0xb4, 0x1d, + 0x80, 0xd5, 0x02, 0xd6, 0x6f, 0x86, 0x9d, 0xcf, 0x16, 0xc9, 0xd2, 0x29, 0x58, 0x53, 0xaa, 0x29, + 0x09, 0xeb, 0xd6, 0x00, 0x7e, 0x15, 0x3f, 0x1c, 0x11, 0x11, 0x91,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, 0x03, 0xee, 0x4d, 0x58, 0xb3, 0x05, 0xd5, 0x6c, 0x38, 0x3a, 0x93, 0xf0, 0xbf, 0xbb, + 0x3a, 0xf6, 0xab, 0x68, 0x66, 0xf7, 0x1f, 0xac, 0x6f, 0x40, 0xb3, 0x8f, 0x15, 0x69, 0xd5, 0x2b, + 0x58, 0xe2, 0xea, 0xae, 0x06, 0x6b, 0x86, 0x60, 0x9f, 0xfb, 0x7d, 0x33, 0x89, 0x48, 0x44, 0x44, + 0x24, 0x05, 0x31, 0x2e, 0xca, 0x0f, 0x07, 0x3e, 0x73, 0xae, 0xdd, 0xa9, 0xfd, 0xab, 0x88, 0x36, + 0xc7, 0x46, 0xfe, 0x78, 0x4c, 0x00, 0x0e, 0x8b, 0x18, 0x8b, 0x48, 0x91, 0x25, 0x1d, 0x03, 0x18, + 0x0a, 0xac, 0x93, 0x45, 0x20, 0x52, 0x38, 0x6b, 0x03, 0x5f, 0x6b, 0xf0, 0xfb, 0x9f, 0x24, 0x3c, + 0xfe, 0xeb, 0xc0, 0x32, 0xe9, 0x85, 0x23, 0x12, 0x64, 0x1c, 0xb0, 0x0d, 0x70, 0x51, 0x83, 0x35, + 0x5f, 0xc6, 0xd7, 0x3c, 0x50, 0x44, 0x44, 0xa4, 0x10, 0x62, 0x24, 0x00, 0xde, 0x24, 0x6c, 0xd7, + 0xe6, 0xf7, 0xc0, 0xa0, 0x08, 0x71, 0xb4, 0xa2, 0x3f, 0x70, 0x5e, 0xc0, 0xfa, 0x93, 0x80, 0xd7, + 0x23, 0xc5, 0x22, 0x52, 0x74, 0x9e, 0xa6, 0x97, 0x5b, 0x45, 0x8f, 0x42, 0x8a, 0x28, 0xe9, 0xb3, + 0xe0, 0x17, 0x58, 0xf5, 0x54, 0x4f, 0xfa, 0x00, 0xdf, 0x4f, 0x2f, 0x1c, 0x91, 0x60, 0xd3, 0x81, + 0x43, 0xb0, 0x7f, 0x87, 0x3d, 0x55, 0x5f, 0x9d, 0x80, 0x55, 0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 0xdf, 0x80, 0x4d, 0x80, 0x7f, 0xc0, 0xff, 0x63, 0xef, 0xbe, 0xc3, 0x24, 0xa9, 0xaa, 0xff, 0x8f, + 0xbf, 0x87, 0x9d, 0xcd, 0x79, 0x59, 0xb2, 0xe4, 0x25, 0x67, 0x24, 0x49, 0x12, 0x90, 0x20, 0x08, + 0xfc, 0xc8, 0x22, 0x82, 0x64, 0x10, 0x05, 0x51, 0x92, 0x80, 0x28, 0x19, 0x24, 0x29, 0x02, 0x22, + 0x51, 0x50, 0x01, 0x41, 0x40, 0x04, 0x41, 0x71, 0x09, 0x92, 0x11, 0x45, 0x72, 0x66, 0x85, 0x25, + 0xa7, 0x5d, 0x60, 0x97, 0xcd, 0xa9, 0x7e, 0x7f, 0x9c, 0x9e, 0x2f, 0xc3, 0x6c, 0x77, 0xd7, 0xa9, + 0xee, 0xba, 0x55, 0xd5, 0x5d, 0x9f, 0xd7, 0xf3, 0xf4, 0xc3, 0xc3, 0xce, 0x9d, 0xaa, 0x33, 0x1d, + 0xaa, 0xeb, 0x9e, 0x7b, 0xef, 0xb9, 0x2c, 0xdc, 0xe3, 0x67, 0x0b, 0x62, 0xdb, 0x21, 0x6f, 0x8d, + 0x7d, 0x2f, 0x89, 0x88, 0x88, 0x14, 0x52, 0xc8, 0xc2, 0x35, 0x2f, 0x62, 0x15, 0xf4, 0x3d, 0xa3, + 0xfb, 0xbd, 0xb0, 0x91, 0xa0, 0xaf, 0x90, 0x7f, 0x67, 0xfa, 0x02, 0xa0, 0xbf, 0xb3, 0xed, 0xd9, + 0xc0, 0xb3, 0x01, 0x63, 0x49, 0xdb, 0xdd, 0x95, 0x47, 0xd1, 0xfd, 0x1e, 0xff, 0xec, 0x94, 0x33, + 0x81, 0xbf, 0x05, 0x8c, 0x45, 0x7c, 0xe2, 0x12, 0x00, 0x7d, 0x80, 0x4d, 0xf0, 0x17, 0x09, 0x95, + 0xd6, 0xb6, 0x08, 0xb0, 0x57, 0x9d, 0x9f, 0xcf, 0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 0xff, + 0x9f, 0xc5, 0x17, 0x67, 0x04, 0x54, 0xf3, 0x03, 0x8a, 0x57, 0x30, 0x56, 0xca, 0x6b, 0x12, 0xb0, + 0x3d, 0xb6, 0x5d, 0x65, 0xf7, 0xc7, 0x26, 0x39, 0xc6, 0x24, 0x22, 0x22, 0x12, 0x2b, 0x8b, 0xbd, + 0xb9, 0x1f, 0xc3, 0x5f, 0x24, 0x6f, 0x28, 0xf1, 0x37, 0x81, 0xa1, 0x9c, 0x08, 0x2c, 0xe6, 0x6c, + 0x7b, 0x39, 0xf0, 0x40, 0xc0, 0x58, 0xca, 0x68, 0x38, 0x70, 0x13, 0xb6, 0xde, 0x37, 0xce, 0x2c, + 0xe0, 0x9b, 0xc0, 0x07, 0x41, 0x23, 0x92, 0xa4, 0xe2, 0xb6, 0x03, 0x5c, 0x1e, 0x2b, 0xfa, 0x29, + 0xed, 0xed, 0x30, 0x6c, 0xc4, 0xbe, 0x96, 0x87, 0xb0, 0xe2, 0xa9, 0x3d, 0x5d, 0x01, 0x4c, 0xa8, + 0xf3, 0x7b, 0xf3, 0x12, 0x9f, 0x58, 0x10, 0x11, 0x11, 0x11, 0x91, 0x3a, 0xb2, 0x48, 0x00, 0x80, + 0x15, 0xd5, 0xf3, 0x6e, 0x93, 0xb7, 0x1b, 0xb6, 0xef, 0x6e, 0x96, 0x56, 0x02, 0x7e, 0xe8, 0x6c, + 0xfb, 0x2e, 0xda, 0x96, 0x2a, 0x6d, 0x1d, 0xd8, 0xba, 0xff, 0x25, 0x9c, 0xed, 0x8f, 0x07, 0x1e, + 0x0c, 0x16, 0x8d, 0x34, 0x2a, 0x2e, 0x01, 0x00, 0x9a, 0x05, 0xd0, 0xee, 0x06, 0x12, 0x3f, 0x55, + 0xff, 0xdc, 0x1a, 0xff, 0xfe, 0x19, 0x70, 0x49, 0xcc, 0xef, 0x1e, 0x89, 0xaf, 0xb0, 0xac, 0x88, + 0x88, 0x88, 0x88, 0x54, 0x91, 0x55, 0x02, 0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0x45, 0xb0, 0x40, 0x82, 0xb6, 0x13, + 0x82, 0x45, 0xd1, 0x1e, 0xe6, 0x4d, 0xd0, 0x36, 0x8f, 0xe7, 0x32, 0x8f, 0xcf, 0x84, 0xd0, 0x5a, + 0x35, 0x00, 0xba, 0xfb, 0x21, 0x36, 0xbd, 0xdc, 0x63, 0x06, 0x70, 0x20, 0xd9, 0xaf, 0xbb, 0x6a, + 0x37, 0xa7, 0x60, 0x5b, 0xb5, 0x79, 0x8c, 0xae, 0xb4, 0x17, 0xe9, 0xee, 0x25, 0xe2, 0x47, 0x40, + 0x54, 0x07, 0x40, 0x44, 0x24, 0x1b, 0xbb, 0x60, 0xdb, 0xa8, 0xfd, 0x13, 0x1b, 0x54, 0x51, 0xe7, + 0x3f, 0xac, 0x3c, 0x0a, 0x50, 0x27, 0x49, 0x00, 0xf4, 0x0b, 0x16, 0x45, 0x32, 0x83, 0x13, 0xb4, + 0xd5, 0x92, 0xc1, 0xfa, 0x06, 0x25, 0x68, 0x9b, 0xc7, 0x73, 0xa9, 0x5d, 0x00, 0x72, 0xd2, 0xaa, + 0x09, 0x80, 0x71, 0xc0, 0x1d, 0xce, 0xb6, 0xff, 0x01, 0x5e, 0x0c, 0x18, 0x4b, 0x19, 0x6c, 0x83, + 0x7f, 0x3b, 0xad, 0xb7, 0xb1, 0x1b, 0x89, 0x32, 0x6f, 0xf3, 0x23, 0xb5, 0xc5, 0xcd, 0x02, 0x58, + 0x86, 0xe2, 0x55, 0x23, 0x16, 0x11, 0x69, 0x27, 0xa3, 0x80, 0x87, 0xb0, 0xa2, 0xc8, 0xde, 0xed, + 0xd6, 0xa4, 0x79, 0x79, 0x74, 0xb0, 0x66, 0x24, 0x68, 0xdb, 0x3b, 0x58, 0x14, 0xc9, 0xf4, 0x4d, + 0xd0, 0x36, 0xc9, 0xdf, 0x57, 0x46, 0x49, 0x9e, 0xcb, 0x3c, 0xea, 0x75, 0xa9, 0x46, 0x58, 0x4e, + 0x5a, 0x35, 0x01,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0x2c, 0x02, 0x11, 0x11, 0x69, 0x53, 0x2b, 0x00, 0xeb, 0x38, + 0xdb, 0x3e, 0x42, 0x76, 0xdf, 0xe9, 0x65, 0x9d, 0xf6, 0x3b, 0x6f, 0x0e, 0xe7, 0x1c, 0x96, 0xa0, + 0xed, 0xf8, 0x60, 0x51, 0x24, 0x33, 0x03, 0x7f, 0xc7, 0x75, 0x91, 0x90, 0x81, 0xb4, 0x81, 0x24, + 0x49, 0x9d, 0x3c, 0x3a, 0xe3, 0x8b, 0xe6, 0x70, 0x4e, 0x41, 0x09, 0x00, 0xf9, 0xdc, 0x7a, 0xc0, + 0x39, 0xce, 0xb6, 0x13, 0xb0, 0x75, 0xff, 0x1a, 0x25, 0x90, 0x46, 0xa9, 0x0e, 0x80, 0x88, 0x48, + 0x58, 0x3b, 0x3b, 0xdb, 0xcd, 0xc1, 0x3a, 0xff, 0x59, 0xed, 0xa9, 0x5e, 0xd6, 0x69, 0xbf, 0x5f, + 0xca, 0xe1, 0x9c, 0xde, 0x0e, 0x72, 0xd7, 0x4e, 0x0e, 0x45, 0xf1, 0x9e, 0xb3, 0xdd, 0x62, 0x41, + 0xa3, 0x68, 0x7d, 0x49, 0x12, 0x00, 0x0b, 0x07, 0x8b, 0xa2, 0x36, 0x25, 0x00, 0x72, 0xa2, 0x04, + 0x80, 0x00, 0x8c, 0x04, 0x6e, 0xc4, 0x5f, 0xa0, 0x66, 0x5f, 0x54, 0x14, 0x48, 0x9a, 0xf3, 0x0c, + 0xb6, 0x85, 0x54, 0x3d, 0x4a, 0x00, 0x88, 0x88, 0x34, 0x6e, 0x63, 0x67, 0xbb, 0xbb, 0x81, 0x27, + 0x43, 0x06, 0xd2, 0xc3, 0xa8, 0x0c, 0xcf, 0x55, 0x24, 0x79, 0x74, 0x56, 0x17, 0x72, 0xb6, 0x1b, + 0x1b, 0x32, 0x88, 0x06, 0xbc, 0xec, 0x6c, 0x57, 0xd6, 0xf7, 0x92, 0xd7, 0x4c, 0x6c, 0xfb, 0x65, + 0x8f, 0xac, 0x13, 0x00, 0xbd, 0x80, 0xa5, 0x32, 0x3e, 0xa7, 0x54, 0x28, 0x01, 0x20, 0xf3, 0x60, + 0x45, 0x7f, 0xbc, 0x99, 0xe9, 0xf3, 0x80, 0x5b, 0xc2, 0x85, 0x23, 0x25, 0x11, 0x61, 0x37, 0x9d, + 0xf5, 0x8c, 0x02, 0x96, 0x08, 0x1f, 0x8a, 0x88, 0x48, 0x5b, 0x5a, 0xcb, 0xd9, 0xee, 0xfa, 0xa0, + 0x51, 0x7c, 0xd1, 0x12, 0xd8, 0xa0, 0x43, 0x19, 0x8d, 0x22, 0xfb, 0xfb, 0x6e, 0x6f, 0x07, 0xf9, + 0xb5, 0xa0, 0x51, 0x24, 0xf7, 0xa2, 0xb3, 0xdd, 0xaa, 0x41, 0xa3, 0x68, 0x0f, 0xaf, 0x3b, 0xdb, + 0x65, 0x9d, 0x4c, 0x59, 0x06, 0xe8, 0x97, 0xf1, 0x39, 0xa5, 0x42, 0x09, 0x00, 0x39, 0x11, 0xff, + 0x48, 0xeb, 0xc3, 0xc0, 0xb1, 0x01, 0x63, 0x91, 0x72, 0xd1, 0x32, 0x00, 0x11, 0x91, 0x30, 0x46, + 0xe0, 0x9f, 0x6a, 0xff, 0x48, 0xc8, 0x40, 0x7a, 0xd8, 0x34, 0xc3, 0x73, 0x15, 0xcd, 0x00, 0xac, + 0xd3, 0x93, 0x25, 0x6f, 0x51, 0xe7, 0xa2, 0x25, 0x00, 0x5e, 0x70, 0xb6, 0x5b, 0x19, 0xed, 0x25, + 0x1f, 0xc7, 0x9b, 0x00, 0xf0, 0xbe, 0x57, 0xd2, 0xb2, 0x46, 0xc6, 0xe7, 0x93, 0x6e, 0x94, 0x00, + 0x28, 0xb7, 0xad, 0x80, 0x13, 0x9c, 0x6d, 0x3f, 0x02, 0xbe, 0x49, 0x76, 0x6b, 0x04, 0xa5, 0xfd, + 0xc5, 0xcd, 0x00, 0x00, 0x25, 0x00, 0x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4a, 0x00, 0x94, 0xc7, 0x40, 0xec, 0x42, 0xea, + 0x9d, 0xee, 0x77, 0x14, 0xf0, 0x58, 0xb8, 0x70, 0x44, 0xfe, 0x4f, 0xdc, 0x32, 0x80, 0x4e, 0x54, + 0x2c, 0x46, 0x44, 0x24, 0x89, 0xae, 0x62, 0x65, 0x1e, 0x21, 0xab, 0x71, 0x6f, 0x09, 0xfc, 0xb2, + 0xc1, 0xdf, 0x1d, 0x98, 0x66, 0x20, 0x05, 0xd2, 0x17, 0x38, 0x3d, 0xf0, 0xf1, 0x8f, 0x72, 0xb6, + 0x7d, 0x8a, 0x62, 0xae, 0xff, 0xef, 0xe2, 0x7d, 0xef, 0xf4, 0x01, 0x7e, 0x15, 0x28, 0x86, 0x0e, + 0xe0, 0x0c, 0x67, 0xdb, 0xe7, 0x80, 0x67, 0x03, 0xc5, 0xd1, 0x8c, 0x3b, 0x80, 0xa9, 0xce, 0xb6, + 0x47, 0x02, 0x83, 0x03, 0xc5, 0xb1, 0x10, 0xfe, 0xdd, 0xc7, 0x24, 0x20, 0x25, 0x00, 0xca, 0xe3, + 0x72, 0x6c, 0x06, 0x80, 0xc7, 0x0d, 0xc0, 0x85, 0x01, 0x63, 0x11, 0xe9, 0xce, 0x93, 0x99, 0xd6, + 0x32, 0x00, 0x11, 0x11, 0xbf, 0x08, 0xff, 0x5a, 0xe4, 0xfd, 0x02, 0xc5, 0xb0, 0x31, 0x70, 0x23, + 0x73, 0x17, 0x9c, 0x7e, 0xd9, 0xf9, 0xfb, 0xde, 0xad, 0x0c, 0xf3, 0xd6, 0xd1, 0xc0, 0xef, 0xec, + 0x03, 0x6c, 0x91, 0x72, 0x1c, 0x5d, 0x8e, 0xc2, 0x6a, 0x0d, 0x78, 0xfc, 0x3e, 0x50, 0x0c, 0x69, + 0x79, 0x1a, 0x7f, 0x11, 0xea, 0x6f, 0x00, 0x87, 0x05, 0x88, 0xe1, 0x40, 0x6c, 0xf7, 0x06, 0x8f, + 0x2b, 0x03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b, 0x75, 0xaa, 0xcf, 0x6a, 0x69, 0x45, 0x57, 0x62, 0xb3, 0x69, 0xc6, 0x06, 0x3e, 0xcf, 0x73, + 0xc0, 0x46, 0x54, 0x9f, 0xe9, 0xf9, 0xb1, 0xe3, 0xf7, 0x3d, 0x9f, 0x31, 0x49, 0x40, 0x09, 0x00, + 0x11, 0x29, 0x92, 0xb8, 0x65, 0x00, 0x9d, 0x58, 0x31, 0x40, 0x11, 0x11, 0x49, 0xee, 0x44, 0x6c, + 0xf4, 0xf2, 0xe9, 0x00, 0xc7, 0x1e, 0x8d, 0x75, 0x26, 0x0e, 0xc6, 0x8a, 0x83, 0xc5, 0x99, 0x81, + 0x8d, 0x08, 0x8e, 0x09, 0x10, 0x4b, 0x96, 0x3c, 0x5b, 0xef, 0xd5, 0x9a, 0x76, 0xff, 0x08, 0x56, + 0x4c, 0xf1, 0x4c, 0xbe, 0x38, 0x43, 0x20, 0x0d, 0x63, 0xb0, 0xe5, 0x12, 0x3b, 0x61, 0x09, 0x88, + 0x76, 0x34, 0x1e, 0x9b, 0x8a, 0xff, 0x65, 0x2c, 0xa1, 0x12, 0x22, 0xb9, 0x15, 0x01, 0x7f, 0xae, + 0x9c, 0xe3, 0x60, 0x8a, 0x5b, 0x8c, 0xb2, 0x51, 0x8f, 0x62, 0x09, 0xbb, 0x53, 0xf9, 0xbc, 0xd8, + 0x64, 0x5a, 0x3e, 0xc5, 0x96, 0x6c, 0x7c, 0x19, 0x2b, 0x6c, 0x59, 0x8d, 0x67, 0x16, 0x87, 0x77, + 0x7b, 0x4b, 0x71, 0x52, 0x02, 0x40, 0x44, 0x8a, 0x44, 0x75, 0x00, 0x44, 0x44, 0xc2, 0x7a, 0x10, + 0x2b, 0xee, 0xb7, 0x33, 0xd6, 0x69, 0x6f, 0x66, 0x2d, 0xf5, 0x1b, 0xd8, 0x54, 0xe2, 0x35, 0xb1, + 0x7d, 0xda, 0x1f, 0x4c, 0xf8, 0xfb, 0xaf, 0x63, 0xdb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 0x5f, 0xb6, + 0x12, 0x57, 0xd7, 0xb5, 0x70, 0x22, 0xb6, 0x4c, 0xec, 0x03, 0x6c, 0x3a, 0xf1, 0xb3, 0x95, 0x47, + 0xdc, 0xb2, 0xb1, 0x56, 0xb5, 0x10, 0xb0, 0x05, 0x36, 0x32, 0xbb, 0x3c, 0xf6, 0x9d, 0x37, 0x0c, + 0xbb, 0xb7, 0x18, 0x80, 0x75, 0xa8, 0x26, 0x61, 0xdf, 0x97, 0x63, 0xb0, 0xce, 0xea, 0xc3, 0xd8, + 0x56, 0x79, 0xed, 0x36, 0x42, 0xdd, 0xa8, 0xf9, 0x80, 0xf5, 0xb1, 0xf7, 0xf5, 0xd2, 0x58, 0xe7, + 0x76, 0x61, 0x3e, 0x7f, 0x0e, 0x3b, 0xb1, 0xa2, 0x74, 0x93, 0xb1, 0x02, 0x89, 0x6f, 0x61, 0x35, + 0x12, 0x9e, 0xc4, 0x76, 0x69, 0x78, 0x2b, 0xfb, 0x90, 0x0b, 0x65, 0x09, 0xec, 0xb3, 0xb8, 0x16, + 0xf6, 0xd9, 0x5c, 0x0a, 0x7b, 0x0f, 0x0e, 0xe4, 0x8b, 0xd7, 0x85, 0x4f, 0xb1, 0x65, 0x2c, 0x2f, + 0x61, 0xd7, 0x83, 0xd1, 0xe4, 0x53, 0x9b, 0x41, 0x12, 0x50, 0x02, 0x40, 0x24, 0x0c, 0x25, 0x00, + 0xa4, 0x1a, 0x25, 0x00, 0x44, 0x44, 0x44, 0x44, 0x24, 0x37, 0x5a, 0x02, 0x20, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x52, 0x02, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, + 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x25, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x48, 0x09, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, + 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x25, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x09, + 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, 0x4a, 0x00, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x25, + 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x09, 0x28, 0x01, 0x20, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, 0x9d, 0x79, 0x07, 0x20, 0x52, 0x72, 0xfd, 0x80, 0x61, 0x09, + 0x7f, 0x67, 0x22, 0x30, 0x27, 0x40, 0x2c, 0x92, 0xcc, 0x3c, 0xc0, 0x90, 0x84, 0xbf, 0xd3, 0x2f, + 0x44, 0x20, 0xd2, 0x12, 0x6e, 0x07, 0xbe, 0x91, 0x77, 0x10, 0x39, 0xdb, 0x14, 0xb8, 0x2f, 0xef, + 0x20, 0x44, 0x44, 0x44, 0xca, 0x4c, 0x09, 0x00, 0x91, 0x7c, 0x9d, 0x58, 0x79, 0x24, 0xb1, 0x24, + 0x30, 0x36, 0xfd, 0x50, 0x24, 0xa1, 0xc5, 0x80, 0xd7, 0xf3, 0x0e, 0x42, 0x44, 0x44, 0x44, 0x44, + 0xc4, 0x4b, 0x4b, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x4a, 0x40, 0x09, 0x00, 0x11, + 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x12, 0x50, 0x02, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, + 0xa4, 0x04, 0x94, 0x00, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x29, 0x01, 0x25, 0x00, 0x44, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x4a, 0x40, 0xbb, 0x00, 0x88, 0x88, 0x88, 0x84, 0xb7, 0x37, + 0xd0, 0x3f, 0xef, 0x20, 0x72, 0xf6, 0x51, 0xde, 0x01, 0x88, 0x88, 0x88, 0x94, 0x5d, 0x47, 0x14, + 0x45, 0x79, 0xc7, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x81, 0x69, 0x09, 0x80, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x09, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x52, 0x02, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x25, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x48, 0x09, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, 0x4a, 0x00, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x25, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x09, 0x28, 0x01, 0x20, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x25, 0xa0, 0x04, 0x80, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x09, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x52, 0x02, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x25, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x48, 0x09, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, 0x4a, 0x00, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x25, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x09, 0x28, 0x01, + 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x25, 0xa0, 0x04, + 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x09, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x52, 0x02, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, 0x12, + 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x25, 0xa0, 0x04, 0x40, 0xfb, 0xeb, 0x03, 0x7c, + 0x15, 0x38, 0x0e, 0xb8, 0x0d, 0x78, 0x1a, 0x78, 0x13, 0xf8, 0x0c, 0x98, 0x0d, 0x4c, 0x03, 0x3e, + 0x01, 0x5e, 0x03, 0x1e, 0x01, 0xae, 0x05, 0x7e, 0x0c, 0x0c, 0xc9, 0x23, 0x58, 0x09, 0x6e, 0x73, + 0x20, 0x72, 0x3c, 0x2e, 0xca, 0x2b, 0xc0, 0x16, 0x70, 0x2c, 0xbe, 0xe7, 0x70, 0x9f, 0x9c, 0xe2, + 0x6b, 0x54, 0xab, 0xfd, 0x5d, 0x47, 0xe1, 0x8b, 0xf7, 0x80, 0xbc, 0x02, 0x6c, 0x21, 0x87, 0xe2, + 0x7b, 0x2e, 0x0f, 0xcd, 0x2b, 0x40, 0x11, 0x11, 0x11, 0x49, 0x47, 0x67, 0xde, 0x01, 0x48, 0x30, + 0x23, 0x80, 0x43, 0xb0, 0x1b, 0xb6, 0x05, 0xeb, 0xb4, 0xeb, 0x5b, 0x79, 0x0c, 0x03, 0x96, 0x04, + 0xbe, 0x02, 0xec, 0x01, 0xdc, 0x0a, 0x4c, 0x0c, 0x1c, 0xa3, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x64, 0x44, 0x09, 0x80, 0xf6, 0xb4, 0x0d, 0x70, 0x0d, 0x30, 0x3c, 0xef, 0x40, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x44, 0xa4, 0x18, 0xb4, 0x04, 0xa0, 0xfd, 0x1c, 0x0f, 0xdc, 0x8e, 0x3a, 0xff, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0xd2, 0x8d, 0x66, 0x00, 0xb4, 0x97, 0x7d, 0x80, 0xd3, 0xf3, 0x0e, + 0x42, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x8a, 0x47, 0x33, 0x00, 0xda, 0xc7, 0xc2, 0xc0, 0xaf, + 0xf2, 0x0e, 0x42, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x8a, 0x49, 0x09, 0x80, 0xf6, 0xa1, 0xca, + 0xfd, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x93, 0x96, 0x00, 0xb4, 0x87, 0x7e, 0x34, 0xb6, + 0x35, 0xd7, 0x14, 0xe0, 0x15, 0x6c, 0x1b, 0xc0, 0x4e, 0x60, 0x30, 0xb0, 0x28, 0x30, 0x6f, 0x6a, + 0x91, 0x89, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x21, 0x28, 0x01, 0xd0, 0x1e, 0xb6, 0x24, 0xd9, + 0xe8, 0xff, 0x7d, 0xc0, 0x69, 0xc0, 0x03, 0xc0, 0xcc, 0x2a, 0x3f, 0x1f, 0x06, 0x4c, 0x6e, 0x3e, + 0x2c, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x29, 0x0a, 0x25, 0x00, 0xda, 0xc3, 0x66, 0x09, 0xda, + 0x5e, 0x04, 0xfc, 0x00, 0x88, 0xea, 0xb4, 0xf9, 0xb4, 0xb9, 0x70, 0x44, 0xda, 0xda, 0x9d, 0xf8, + 0x3e, 0x23, 0x8f, 0x86, 0x0e, 0x24, 0x65, 0xed, 0xfa, 0x77, 0x89, 0x88, 0x88, 0x88, 0x48, 0x85, + 0x12, 0x00, 0xed, 0x61, 0x4d, 0x67, 0xbb, 0xe7, 0x80, 0x23, 0xa8, 0xdf, 0xf9, 0x17, 0x91, 0xfa, + 0x9e, 0xaa, 0x3c, 0xda, 0x4d, 0xbb, 0xfe, 0x5d, 0x22, 0x22, 0x22, 0x22, 0x52, 0xa1, 0x22, 0x80, + 0xed, 0x61, 0x39, 0x67, 0xbb, 0x8b, 0xa9, 0x3e, 0xe5, 0x5f, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, + 0xda, 0x9c, 0x12, 0x00, 0xad, 0xaf, 0x13, 0x98, 0xcf, 0xd9, 0xf6, 0xaf, 0x21, 0x03, 0x11, 0x11, + 0x11, 0x11, 0x11, 0x11, 0x91, 0xe2, 0x52, 0x02, 0xa0, 0xf5, 0x8d, 0x00, 0x3a, 0x1c, 0xed, 0x3e, + 0x05, 0xde, 0x0e, 0x1c, 0x8b, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x14, 0x94, 0x12, 0x00, 0xad, + 0xaf, 0x9f, 0xb3, 0xdd, 0x6b, 0x41, 0xa3, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x42, 0x53, + 0x02, 0xa0, 0xf5, 0xf5, 0x76, 0xb6, 0xfb, 0x2c, 0x68, 0x14, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x52, 0x68, 0x4a, 0x00, 0xb4, 0x3e, 0xcf, 0xf4, 0x7f, 0x80, 0x29, 0x41, 0xa3, 0x10, 0x11, 0x11, + 0x11, 0x11, 0x11, 0x91, 0x42, 0x53, 0x02, 0xa0, 0x3c, 0xe6, 0xe4, 0x1d, 0x80, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0xe4, 0x47, 0x09, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x91, 0x12, 0x50, + 0x02, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0x04, 0x94, 0x00, 0x10, 0x11, 0x11, 0x11, + 0x11, 0x11, 0x11, 0x29, 0x81, 0xce, 0xbc, 0x03, 0xa8, 0x62, 0x59, 0x60, 0x7d, 0x60, 0x35, 0x60, + 0x09, 0x60, 0x49, 0x60, 0x3e, 0x60, 0x40, 0xe5, 0x31, 0x0f, 0x56, 0xd0, 0x6e, 0x0a, 0xf0, 0x09, + 0xf0, 0x06, 0x30, 0x16, 0x78, 0x11, 0x78, 0x14, 0x78, 0x0a, 0x98, 0x99, 0x71, 0xcc, 0x52, 0x4c, + 0x03, 0xb0, 0xf7, 0xd2, 0x46, 0xc0, 0xf2, 0xc0, 0x28, 0x60, 0x41, 0x60, 0x10, 0x30, 0x10, 0x98, + 0x06, 0x7c, 0x8a, 0xbd, 0x8f, 0x5e, 0x06, 0x9e, 0x04, 0x1e, 0x07, 0xfe, 0x09, 0xcc, 0xc8, 0x21, + 0xde, 0x22, 0x99, 0x9d, 0xb0, 0xfd, 0xea, 0xc0, 0x86, 0xc0, 0x4a, 0xc0, 0xca, 0xc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, 0x74, 0x7f, + 0xde, 0x81, 0xb4, 0xb9, 0x0f, 0xf0, 0x27, 0x0b, 0xe4, 0x73, 0xaf, 0x57, 0x1e, 0xbf, 0xcd, 0x3b, + 0x90, 0x76, 0x91, 0xe7, 0x12, 0x00, 0x91, 0x76, 0xb0, 0xa0, 0xb3, 0x9d, 0xb7, 0x4a, 0xb8, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x48, 0x10, 0x4a, 0x00, 0x88, 0x34, 0x67, 0x19, 0x67, 0x3b, 0x25, 0x00, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x24, 0x57, 0x4a, 0x00, 0x88, 0x34, 0x67, 0x15, 0x47, 0x9b, 0x99, + 0xc0, 0xd8, 0xc0, 0x71, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, 0xa5, 0x04, 0x80, 0x48, 0xe3, + 0x16, 0xc0, 0x37, 0x03, 0xe0, 0x45, 0x6a, 0x57, 0x1d, 0x15, 0x11, 0x11, 0x11, 0x11, 0x11, 0xc9, + 0x84, 0x12, 0x00, 0x22, 0x8d, 0xfb, 0xba, 0xb3, 0xdd, 0x53, 0x41, 0xa3, 0x10, 0x49, 0x47, 0xbf, + 0xbc, 0x03, 0x10, 0x11, 0x11, 0x11, 0x91, 0xb0, 0x8a, 0xb8, 0x0b, 0x80, 0x88, 0x47, 0xd7, 0xe8, + 0x7b, 0xf7, 0xc7, 0xa8, 0xca, 0x7f, 0x37, 0x24, 0x9b, 0x4e, 0xf7, 0x1e, 0xce, 0x76, 0xf7, 0x04, + 0x8d, 0x42, 0x24, 0x1d, 0x03, 0x9c, 0xed, 0x66, 0x07, 0x8d, 0x42, 0x44, 0x44, 0x44, 0x44, 0x82, + 0x51, 0x02, 0x40, 0x5a, 0xc9, 0x59, 0xd8, 0xfe, 0xa9, 0xa3, 0x80, 0xc1, 0x75, 0xda, 0xed, 0x4a, + 0xf8, 0x04, 0xc0, 0x8a, 0x95, 0x58, 0xe2, 0x44, 0xc0, 0xe8, 0xc0, 0xb1, 0x88, 0xa4, 0x61, 0x98, + 0xb3, 0xdd, 0xf4, 0xa0, 0x51, 0x88, 0x88, 0x88, 0x88, 0x48, 0x30, 0x5a, 0x02, 0x20, 0xad, 0xa4, + 0x1f, 0xb0, 0x06, 0xf5, 0x3b, 0xff, 0x00, 0x07, 0x01, 0x43, 0x03, 0xc7, 0xf2, 0x73, 0xa0, 0xc3, + 0xd1, 0xee, 0x61, 0xe0, 0xfd, 0xc0, 0xb1, 0x88, 0xa4, 0x61, 0x29, 0x67, 0xbb, 0x49, 0x41, 0xa3, + 0x10, 0x11, 0x11, 0x11, 0x91, 0x60, 0x94, 0x00, 0x90, 0x56, 0xf2, 0x67, 0x67, 0xbb, 0x91, 0xc0, + 0x89, 0x01, 0xe3, 0xd8, 0x1d, 0xd8, 0xce, 0xd9, 0xf6, 0x8a, 0x80, 0x71, 0x88, 0xa4, 0x69, 0x05, + 0x67, 0xbb, 0x8f, 0x82, 0x46, 0x21, 0x22, 0x22, 0x22, 0x22, 0xc1, 0x28, 0x01, 0x20, 0xad, 0xe4, + 0x01, 0xe0, 0x35, 0x67, 0xdb, 0x1f, 0x61, 0x1d, 0xf5, 0xb4, 0xad, 0x0d, 0x5c, 0xee, 0x6c, 0xfb, + 0x21, 0x70, 0x63, 0x80, 0x18, 0x44, 0xd2, 0xb6, 0x2a, 0xb0, 0xb0, 0xb3, 0xed, 0x5b, 0x21, 0x03, + 0x11, 0x11, 0x11, 0x11, 0x91, 0x70, 0x94, 0x00, 0x90, 0x56, 0x12, 0x01, 0xe7, 0x26, 0x68, 0xff, + 0x3b, 0x60, 0xbf, 0x14, 0xcf, 0xbf, 0x05, 0xb6, 0x9e, 0x7f, 0x90, 0xb3, 0xfd, 0x19, 0xc0, 0x94, + 0x14, 0xcf, 0x2f, 0x12, 0xca, 0x41, 0xce, 0x76, 0x13, 0xd1, 0x92, 0x16, 0x11, 0x11, 0x11, 0x91, + 0x96, 0xa5, 0x04, 0x80, 0xb4, 0x9a, 0xdf, 0x02, 0x63, 0x9c, 0x6d, 0xfb, 0x00, 0x57, 0x02, 0x7f, + 0x00, 0x16, 0x6d, 0xe2, 0x9c, 0x43, 0x81, 0xf3, 0x81, 0x3b, 0xf1, 0x17, 0x4a, 0x7b, 0x19, 0xb8, + 0xa4, 0x89, 0x73, 0x8a, 0x64, 0x65, 0x6b, 0xe0, 0x60, 0x67, 0xdb, 0xc7, 0x43, 0x06, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x61, 0x29, 0x01, 0x20, 0xad, 0x66, 0x3a, 0xf0, 0x3d, 0x6c, 0x36, 0x80, 0xd7, + 0x9e, 0xc0, 0x2b, 0xc0, 0x55, 0x58, 0x67, 0xa7, 0x8f, 0xe3, 0x77, 0x7a, 0x01, 0xeb, 0x03, 0x17, + 0x60, 0x53, 0x9e, 0x0f, 0xc7, 0xff, 0x79, 0x99, 0x0d, 0xec, 0x8d, 0xaa, 0xa5, 0x4b, 0x31, 0xd4, + 0xda, 0xde, 0x6f, 0x79, 0x2c, 0xb1, 0x75, 0x2b, 0xfe, 0x1d, 0x61, 0xee, 0x4f, 0x25, 0x22, 0x11, + 0x11, 0x11, 0x11, 0xc9, 0x85, 0xb6, 0x01, 0x94, 0x56, 0x74, 0x17, 0x70, 0x0e, 0x70, 0x4c, 0x82, + 0xdf, 0xe9, 0x07, 0xec, 0x53, 0x79, 0xcc, 0x00, 0x5e, 0x02, 0x5e, 0x00, 0x3e, 0xc6, 0xa6, 0x35, + 0xcf, 0x02, 0xfa, 0x03, 0x0b, 0x60, 0xd5, 0xd0, 0x57, 0x03, 0x06, 0x36, 0x18, 0xdf, 0xb1, 0xc0, + 0x63, 0x0d, 0xfe, 0xae, 0x48, 0xda, 0x6e, 0x03, 0x36, 0xc4, 0xa6, 0xee, 0x7f, 0x88, 0x7d, 0x16, + 0x16, 0xc2, 0x8a, 0x65, 0x26, 0x75, 0x4b, 0x8a, 0x71, 0x89, 0x88, 0x88, 0x88, 0x48, 0xc6, 0x94, + 0x00, 0x90, 0x56, 0x75, 0x1c, 0xb0, 0x34, 0xb0, 0x73, 0x03, 0xbf, 0xdb, 0x07, 0x2b, 0x7a, 0xb6, + 0x6a, 0xaa, 0x11, 0x99, 0x8b, 0x48, 0x56, 0xa7, 0x40, 0x24, 0x0b, 0x7d, 0x81, 0xc5, 0x2b, 0x8f, + 0x46, 0x3d, 0x0a, 0x3c, 0x9b, 0x4e, 0x38, 0x22, 0x22, 0x22, 0x22, 0x92, 0x07, 0x2d, 0x01, 0x90, + 0x56, 0x35, 0x07, 0xd8, 0x03, 0xb8, 0x21, 0xef, 0x40, 0xba, 0x39, 0x13, 0x38, 0x2c, 0xef, 0x20, + 0x44, 0x02, 0x39, 0x39, 0xef, 0x00, 0x44, 0x44, 0x44, 0x44, 0xa4, 0x39, 0x4a, 0x00, 0x48, 0x2b, + 0x9b, 0x01, 0x7c, 0x0b, 0x38, 0x11, 0x5b, 0x77, 0x9f, 0x97, 0x89, 0xd8, 0x9a, 0xff, 0xe3, 0x73, + 0x8c, 0x41, 0x24, 0xa4, 0x6b, 0x81, 0x7f, 0xe4, 0x1d, 0x84, 0x88, 0x88, 0x88, 0x88, 0x34, 0x47, + 0x09, 0x00, 0x69, 0x75, 0x11, 0x70, 0x0a, 0x56, 0xb0, 0xef, 0xc1, 0x1c, 0xce, 0xff, 0x57, 0x6c, + 0x29, 0xc1, 0xef, 0x73, 0x38, 0xb7, 0x48, 0x16, 0xee, 0xc5, 0xbf, 0x4b, 0x80, 0x88, 0x88, 0x88, + 0x88, 0x14, 0x98, 0x12, 0x00, 0xd2, 0x2e, 0xfe, 0x0d, 0x6c, 0x0c, 0x6c, 0x0b, 0x3c, 0x15, 0xf8, + 0x5c, 0x73, 0x80, 0x3b, 0xb0, 0xa4, 0xc3, 0xf6, 0xc0, 0x1b, 0x81, 0xcf, 0x27, 0x92, 0x97, 0x6b, + 0xb1, 0x9d, 0x33, 0x26, 0xe7, 0x1d, 0x88, 0x88, 0x88, 0x88, 0x88, 0x34, 0x4f, 0x45, 0x00, 0xa5, + 0xdd, 0xdc, 0x51, 0x79, 0xac, 0x02, 0xec, 0x52, 0x79, 0xac, 0x98, 0xc2, 0x71, 0x67, 0x03, 0xff, + 0xaa, 0x1c, 0xfb, 0x1a, 0x6c, 0x6b, 0x40, 0x91, 0x76, 0xf5, 0x6f, 0xe0, 0x04, 0x6c, 0xc7, 0x0d, + 0x11, 0x11, 0x11, 0x11, 0x69, 0x13, 0x4a, 0x00, 0x48, 0xbb, 0x7a, 0xb6, 0xf2, 0x38, 0x11, 0x58, + 0x04, 0x9b, 0xa6, 0xbf, 0x0a, 0xb0, 0x32, 0x30, 0x0a, 0x18, 0x52, 0x79, 0x0c, 0x06, 0x06, 0x55, + 0x7e, 0x67, 0x1a, 0x30, 0x15, 0x18, 0x07, 0xbc, 0x83, 0x75, 0xf2, 0x9f, 0xc7, 0x66, 0x14, 0x3c, + 0x0e, 0x4c, 0xc8, 0x2e, 0x7c, 0x91, 0xd4, 0xdc, 0x04, 0x7c, 0x06, 0x7c, 0x09, 0x98, 0x1f, 0x7b, + 0xdf, 0x0f, 0x00, 0x7a, 0x63, 0xdb, 0x5f, 0x8e, 0xaf, 0x3c, 0xc6, 0x02, 0xff, 0x04, 0xee, 0x21, + 0xfc, 0x2c, 0x1a, 0x11, 0x11, 0x11, 0x11, 0xc9, 0x41, 0x47, 0x14, 0x45, 0x79, 0xc7, 0x20, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x81, 0xa9, 0x06, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x48, 0x09, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, 0x4a, 0x00, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x25, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x09, 0x28, 0x01, 0x20, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x25, 0xa0, 0x04, 0x80, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x09, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x52, 0x02, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x25, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x48, 0x09, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, 0x4a, 0x00, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x25, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x09, 0x28, 0x01, + 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x72, 0x63, 0x1b, 0xf0, 0x00, 0x00, + 0x20, 0x00, 0x49, 0x44, 0x41, 0x54, 0x22, 0x22, 0x22, 0x25, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x48, 0x09, 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, + 0x4a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x25, 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x09, + 0x28, 0x01, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x02, 0x4a, 0x00, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x94, 0x80, 0x12, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x25, + 0xa0, 0x04, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0xc4, 0xe9, 0x04, 0xb6, 0x00, 0xce, 0x02, 0xee, + 0x06, 0x5e, 0x03, 0x3e, 0x03, 0x66, 0x03, 0x51, 0x9d, 0xc7, 0xa0, 0x3c, 0x82, 0xad, 0x62, 0x1f, + 0xea, 0xc7, 0x19, 0x01, 0xb7, 0xe7, 0x15, 0x5c, 0x0f, 0xcb, 0x53, 0x3f, 0xce, 0x19, 0xc0, 0x27, + 0xc0, 0xf3, 0xc0, 0xad, 0xc0, 0x71, 0xc0, 0xaa, 0xb9, 0x44, 0x2a, 0x2d, 0xa7, 0x33, 0xef, 0x00, + 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0xb0, 0xfa, 0x03, 0x3f, 0x04, 0x0e, 0x07, 0x16, 0xc8, 0x39, + 0x16, 0x31, 0xbd, 0x81, 0x61, 0x95, 0xc7, 0x8a, 0xc0, 0xf6, 0xc0, 0x19, 0xc0, 0xd3, 0xc0, 0xe9, + 0xc0, 0x8d, 0xf9, 0x85, 0x26, 0x45, 0xa7, 0x19, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0xcd, + 0xda, 0xc0, 0x73, 0x58, 0xe7, 0x52, 0x9d, 0xff, 0xe2, 0x5b, 0x0d, 0xf8, 0x13, 0x30, 0x1a, 0x98, + 0x2f, 0xe7, 0x58, 0xa4, 0xa0, 0x94, 0x00, 0x10, 0x11, 0x11, 0x11, 0x11, 0x91, 0x9e, 0xbe, 0x01, + 0x3c, 0xf8, 0xff, 0xdb, 0xbb, 0xef, 0x38, 0xb9, 0xab, 0xea, 0xff, 0xe3, 0xaf, 0x25, 0x9d, 0x00, + 0x81, 0x40, 0xe8, 0x25, 0x84, 0x2e, 0x20, 0xbd, 0x29, 0x48, 0xc0, 0x2f, 0x82, 0x34, 0x01, 0x81, + 0x2f, 0x82, 0x22, 0x22, 0x20, 0x4d, 0x10, 0x14, 0xf5, 0x47, 0xf3, 0x8b, 0xa0, 0x80, 0x28, 0xa2, + 0x20, 0x45, 0x2c, 0x01, 0xe9, 0x1d, 0x05, 0xa5, 0x13, 0x3a, 0x04, 0xa5, 0x23, 0xa1, 0x23, 0x10, + 0x4a, 0xe8, 0x21, 0x90, 0x9e, 0xfd, 0xfd, 0x71, 0x76, 0xcd, 0xb2, 0xec, 0x7c, 0xee, 0xf9, 0xcc, + 0x7c, 0xee, 0x7c, 0xda, 0xfb, 0xf9, 0x78, 0xec, 0x83, 0x24, 0x73, 0x67, 0xe6, 0xb2, 0xb3, 0x3b, + 0xf3, 0xb9, 0xe7, 0x9e, 0x7b, 0x0e, 0x30, 0x2a, 0xef, 0x89, 0x48, 0x6a, 0x5b, 0x00, 0xe3, 0x80, + 0x65, 0xf2, 0x9e, 0x88, 0x14, 0x8f, 0x02, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0xd2, 0xd3, 0xea, + 0xc0, 0x15, 0xc0, 0xa0, 0xbc, 0x27, 0x22, 0x4d, 0x1b, 0x09, 0xdc, 0x80, 0x1d, 0xe1, 0x10, 0xf9, + 0x2f, 0x05, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0xdb, 0x00, 0xe0, 0x7c, 0x60, 0x70, 0xde, + 0x13, 0x91, 0x96, 0xad, 0x0c, 0x9c, 0x98, 0xf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 0x87, + 0x39, 0xc7, 0x0f, 0xc4, 0xae, 0xa3, 0x45, 0x14, 0x00, 0x90, 0x52, 0xd9, 0x28, 0xef, 0x09, 0x88, + 0x88, 0x88, 0x88, 0x54, 0xd8, 0x86, 0xce, 0x71, 0xc7, 0x62, 0x2d, 0x02, 0x25, 0x5f, 0xbf, 0x01, + 0x2e, 0x77, 0x8e, 0x55, 0x1d, 0x00, 0x01, 0x14, 0x00, 0x90, 0x72, 0x51, 0x00, 0x40, 0x44, 0x44, + 0x44, 0x24, 0x8e, 0x25, 0x81, 0xc5, 0x1d, 0xe3, 0x26, 0x00, 0xa7, 0x47, 0x9e, 0x8b, 0xf8, 0xfd, + 0x08, 0x98, 0xe5, 0x18, 0xb7, 0x7e, 0xec, 0x89, 0x48, 0x39, 0x28, 0x00, 0x20, 0x65, 0x31, 0x10, + 0x58, 0x3b, 0xef, 0x49, 0x88, 0x88, 0x88, 0x88, 0x54, 0xd4, 0x1a, 0xce, 0x71, 0x97, 0x02, 0xd3, + 0x62, 0x4e, 0x44, 0x52, 0x79, 0x11, 0xb8, 0xc3, 0x31, 0x6e, 0x25, 0xd4, 0xda, 0x51, 0x50, 0x00, + 0x40, 0xca, 0x63, 0x6d, 0x60, 0x50, 0xde, 0x93, 0x10, 0x11, 0x11, 0x11, 0xa9, 0xa8, 0x11, 0xce, + 0x71, 0xd7, 0x46, 0x9d, 0x85, 0x34, 0xe3, 0x4a, 0xc7, 0x98, 0xb9, 0x80, 0xe1, 0xb1, 0x27, 0x22, + 0xc5, 0xa7, 0x00, 0x80, 0x94, 0x85, 0xd2, 0xff, 0x45, 0x44, 0x44, 0x44, 0xe2, 0x19, 0xe6, 0x18, + 0xd3, 0x09, 0xfc, 0x2b, 0xf6, 0x44, 0x24, 0x35, 0xef, 0x6b, 0x32, 0x7f, 0xd4, 0x59, 0x48, 0x29, + 0x28, 0x00, 0x20, 0x65, 0xa1, 0x00, 0x80, 0x88, 0x88, 0x88, 0x48, 0x3c, 0x9e, 0xc5, 0xe1, 0x2b, + 0xc0, 0x47, 0xb1, 0x27, 0x22, 0xa9, 0xfd, 0xdb, 0x39, 0x4e, 0x01, 0x00, 0x51, 0x00, 0x40, 0x4a, + 0x43, 0x01, 0x00, 0x11, 0x11, 0x11, 0x91, 0x78, 0x3c, 0xe7, 0xc3, 0x5f, 0x89, 0x3e, 0x0b, 0x69, + 0xc6, 0x87, 0xc0, 0xbb, 0x8e, 0x71, 0x43, 0x62, 0x4f, 0x44, 0x8a, 0x4f, 0x01, 0x00, 0x29, 0x83, + 0x25, 0xbb, 0xbe, 0x44, 0x44, 0x44, 0x44, 0x24, 0x8e, 0x0e, 0xc7, 0x98, 0xc9, 0xd1, 0x67, 0x21, + 0xcd, 0xf2, 0xbc, 0x36, 0x9e, 0xd7, 0x58, 0x2a, 0x4e, 0x01, 0x00, 0x29, 0x03, 0xed, 0xfe, 0x8b, + 0x88, 0x88, 0x88, 0xe4, 0x4f, 0x01, 0x80, 0xe2, 0xfa, 0x30, 0xef, 0x09, 0x48, 0x39, 0x28, 0x00, + 0x20, 0x65, 0xa0, 0x00, 0x80, 0x88, 0x88, 0x88, 0x48, 0xfe, 0x66, 0xe6, 0x3d, 0x01, 0x69, 0x48, + 0xaf, 0x8d, 0xb8, 0x28, 0x00, 0x20, 0x65, 0xa0, 0x00, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, + 0x8b, 0xfa, 0xe7, 0x3d, 0x81, 0x5e, 0x06, 0x01, 0xdb, 0x01, 0x9b, 0x00, 0x1b, 0x02, 0x8b, 0x62, + 0xfd, 0x2a, 0x07, 0x01, 0xef, 0x01, 0x2f, 0x03, 0x0f, 0x02, 0x47, 0xe3, 0x2b, 0x74, 0x51, 0x64, + 0xfd, 0x81, 0xd5, 0x80, 0x75, 0x81, 0x15, 0x81, 0x15, 0x80, 0xc5, 0x81, 0x85, 0x80, 0x05, 0xb0, + 0x42, 0x2c, 0x03, 0x81, 0xd9, 0x58, 0xba, 0x55, 0xf7, 0xd7, 0x24, 0xe0, 0x45, 0x60, 0x3c, 0xf0, + 0x34, 0xf0, 0x14, 0xf0, 0x04, 0x30, 0xab, 0xbd, 0xd3, 0x6f, 0x9b, 0x41, 0xc0, 0xda, 0x79, 0x4f, + 0x42, 0x44, 0x44, 0x44, 0x44, 0x44, 0xa4, 0xec, 0xb2, 0xca, 0x00, 0x38, 0x17, 0xeb, 0x0b, 0x9a, + 0xf4, 0x75, 0x6d, 0xc2, 0xfd, 0x07, 0x00, 0x47, 0x02, 0xff, 0x01, 0x2e, 0x07, 0x0e, 0x01, 0xd6, + 0x07, 0x96, 0x06, 0xe6, 0xe9, 0xba, 0x7d, 0x61, 0x6c, 0xb1, 0x7c, 0x40, 0xd7, 0x9f, 0xcb, 0x68, + 0x7e, 0x60, 0x5f, 0xe0, 0xaf, 0xc0, 0x07, 0xc0, 0xc3, 0xd8, 0xf7, 0xee, 0x08, 0x60, 0x07, 0xec, + 0xff, 0x79, 0x14, 0x16, 0x00, 0x18, 0x02, 0xf4, 0xc3, 0xfe, 0xdf, 0x17, 0x00, 0x96, 0x02, 0x56, + 0x01, 0x36, 0x00, 0x76, 0x03, 0xfe, 0x0f, 0xb8, 0x18, 0x78, 0x04, 0x78, 0x13, 0xb8, 0x00, 0xf8, + 0x5f, 0x7c, 0x3d, 0x5c, 0x8b, 0x66, 0x67, 0x1a, 0xff, 0xdc, 0x4c, 0xc5, 0x02, 0x21, 0x21, 0x17, + 0x27, 0x3c, 0x46, 0xef, 0xaf, 0x35, 0xb3, 0x9d, 0x7e, 0x4b, 0xee, 0xc6, 0x37, 0xe7, 0x91, 0x6d, + 0x9c, 0xd3, 0x19, 0xce, 0x39, 0xfd, 0x4f, 0x1b, 0xe7, 0x94, 0xe4, 0x70, 0x7c, 0xf3, 0x9d, 0x46, + 0xfe, 0xed, 0x6f, 0xe6, 0xc6, 0x02, 0x79, 0x9e, 0xf9, 0x1e, 0x96, 0xd3, 0x1c, 0x7b, 0x9b, 0x17, + 0x98, 0x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0xc5, 0xb3, 0x66, 0x1f, 0xe1, 0x3f, 0xf3, 0x39, 0x3f, 0x76, 0x66, 0xe5, 0x28, + 0xca, 0xf7, 0x0b, 0x28, 0x52, 0x36, 0x79, 0x75, 0x03, 0xf0, 0xa4, 0xff, 0x77, 0x52, 0xee, 0xf4, + 0xdb, 0xd8, 0x75, 0x00, 0x56, 0x06, 0x96, 0x4c, 0xb8, 0x7d, 0x6c, 0x1f, 0xff, 0x36, 0x13, 0xcb, + 0x4e, 0x68, 0x64, 0x75, 0xc2, 0xe7, 0xd0, 0x93, 0x78, 0x0a, 0x00, 0x56, 0x29, 0xfd, 0xbf, 0xa7, + 0x53, 0x48, 0x3e, 0x62, 0x01, 0x73, 0xda, 0xfc, 0x75, 0x7f, 0xb6, 0x2d, 0x8b, 0xa5, 0x57, 0x86, + 0x9c, 0x48, 0x72, 0xfd, 0x86, 0xb2, 0xfb, 0x0b, 0xbe, 0xb3, 0xb9, 0xbb, 0x90, 0x4d, 0xfb, 0xcc, + 0x05, 0xf1, 0xed, 0x2e, 0x95, 0xf9, 0xfd, 0x27, 0x0b, 0x2b, 0x00, 0x7f, 0x48, 0x31, 0xfe, 0x28, + 0xac, 0x28, 0x66, 0x55, 0xed, 0xe9, 0x1c, 0x57, 0xe5, 0xef, 0x41, 0xd9, 0x25, 0x7d, 0xfe, 0x75, + 0x9b, 0x17, 0x7f, 0x81, 0xd0, 0xa2, 0x38, 0x9c, 0x6c, 0x8f, 0x48, 0xa5, 0xb1, 0x12, 0xf0, 0x53, + 0xac, 0x5e, 0xca, 0x33, 0x58, 0x66, 0xc0, 0xb6, 0x58, 0x61, 0xdb, 0x90, 0x55, 0xb1, 0xcf, 0xc0, + 0xf1, 0xc0, 0xb5, 0xf8, 0x33, 0x8d, 0xa2, 0x6b, 0x77, 0x00, 0x60, 0x16, 0x56, 0x81, 0xb1, 0x8a, + 0x3c, 0x29, 0x8e, 0xdd, 0x06, 0x02, 0x27, 0x00, 0xcf, 0x61, 0x11, 0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c2, 0x32, 0x2f, 0x26, 0x60, 0xef, + 0x1f, 0x97, 0x61, 0xc7, 0xb7, 0x37, 0xc3, 0x3a, 0x02, 0xec, 0x8f, 0x05, 0xe2, 0x0a, 0x41, 0x29, + 0xe3, 0xed, 0xf1, 0x20, 0x96, 0xd2, 0xb7, 0x1a, 0x96, 0x82, 0xd6, 0x4c, 0xa7, 0x80, 0x34, 0xfa, + 0x61, 0x15, 0x30, 0x9f, 0xc4, 0xce, 0x77, 0x15, 0x29, 0x85, 0x47, 0x24, 0x2f, 0x17, 0x39, 0xc7, + 0x35, 0x7b, 0x0c, 0xc0, 0x93, 0xfe, 0xff, 0x04, 0x96, 0x8d, 0x50, 0x25, 0xe3, 0x09, 0x1f, 0x77, + 0x4a, 0x53, 0x07, 0xa0, 0xd5, 0xf4, 0xff, 0x6e, 0x63, 0x03, 0xb7, 0x7b, 0xb3, 0x00, 0x86, 0x62, + 0x41, 0xdc, 0x24, 0x0f, 0x50, 0xed, 0x2a, 0xe1, 0x8d, 0x74, 0x90, 0xfe, 0xbc, 0xfa, 0x0f, 0x62, + 0x4c, 0xa4, 0x44, 0x26, 0x10, 0xee, 0xa2, 0x00, 0x16, 0x74, 0x5a, 0x38, 0xc5, 0xe3, 0x76, 0x60, + 0x3b, 0xb5, 0x21, 0x75, 0x4b, 0xff, 0x9f, 0x1b, 0x3b, 0xf7, 0xef, 0x69, 0x71, 0x47, 0xd7, 0x58, + 0x4f, 0x01, 0xb5, 0xaa, 0x7a, 0x09, 0x3b, 0x63, 0x3d, 0x8a, 0x7a, 0x7f, 0x1f, 0xaa, 0x64, 0x2a, + 0x56, 0xb3, 0x65, 0x25, 0x2c, 0xfb, 0xaa, 0x0e, 0xf5, 0xd8, 0x62, 0x79, 0x16, 0xab, 0x97, 0x70, + 0x20, 0xb6, 0xb0, 0x1f, 0x85, 0xad, 0xb1, 0xfa, 0x77, 0x7d, 0xcd, 0x83, 0x15, 0x26, 0x5c, 0x0f, + 0xbb, 0x26, 0xfc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, 0x2d, 0x8e, 0x67, 0xf7, 0x7f, 0x36, 0xd5, + 0xdd, 0x7d, 0xcb, 0xea, 0x18, 0xc0, 0x70, 0x92, 0x03, 0x05, 0x2f, 0xe2, 0x2f, 0xca, 0x33, 0x8e, + 0xe4, 0x94, 0x41, 0x6f, 0x00, 0xc0, 0x93, 0x29, 0x50, 0x87, 0xf6, 0x7f, 0xbd, 0x2d, 0x07, 0x9c, + 0xdc, 0xe4, 0x7d, 0xff, 0x80, 0xbd, 0xd6, 0x75, 0x75, 0x0d, 0xbe, 0x36, 0x8a, 0x69, 0x8e, 0x01, + 0x78, 0xd2, 0xff, 0xab, 0x1a, 0x80, 0x6c, 0xe4, 0x5b, 0xc0, 0x37, 0x9d, 0x63, 0xa7, 0x62, 0xe9, + 0xee, 0x45, 0x39, 0xf3, 0x9c, 0x87, 0x7d, 0x98, 0x93, 0xa1, 0x52, 0xc6, 0xd6, 0x70, 0xd2, 0x58, + 0x7f, 0xac, 0x90, 0xe3, 0x78, 0x6c, 0xad, 0xd1, 0xec, 0x51, 0x47, 0xa9, 0x08, 0x05, 0x00, 0xf2, + 0x37, 0x13, 0xdb, 0xa9, 0xfa, 0x11, 0xd6, 0x3f, 0x7c, 0x11, 0x2c, 0x7d, 0xff, 0x0f, 0x64, 0x5b, + 0x25, 0x79, 0x10, 0xd6, 0xc6, 0x65, 0x74, 0x86, 0x8f, 0x29, 0x52, 0x36, 0x97, 0xe1, 0x3b, 0x07, + 0x97, 0xf6, 0x18, 0x80, 0x67, 0xa7, 0xee, 0x56, 0xe0, 0xb5, 0x94, 0x8f, 0x5b, 0x16, 0xb7, 0x12, + 0x4e, 0x71, 0x1b, 0xed, 0x78, 0x9c, 0xcd, 0x49, 0xfe, 0x5c, 0xf2, 0xee, 0xfe, 0x83, 0x05, 0x5a, + 0x93, 0xea, 0x00, 0x2c, 0x85, 0xb5, 0xfe, 0x09, 0x09, 0xed, 0x70, 0xbf, 0x41, 0xf5, 0x8e, 0x75, + 0x84, 0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0x2a, 0xed, 0x43, 0xb1, 0xe0, 0xc1, 0x28, 0x60, 0x05, 0x6c, 0x31, 0xd2, 0x8c, 0xdb, 0xb1, 0x00, + 0x40, 0x59, 0xcc, 0xc6, 0x2e, 0xda, 0x43, 0x2d, 0x8f, 0xba, 0xad, 0x86, 0x5d, 0xa4, 0xce, 0xc2, + 0x16, 0xd6, 0x93, 0xb0, 0xe0, 0xc8, 0x62, 0x7c, 0xf2, 0xa2, 0xff, 0xef, 0x14, 0x27, 0x00, 0x00, + 0xd6, 0xee, 0x6a, 0x57, 0xac, 0x68, 0xa4, 0xd7, 0x66, 0x5d, 0x5f, 0x9d, 0x58, 0x5f, 0xd7, 0x17, + 0x80, 0xb7, 0xb0, 0x9f, 0x9b, 0x59, 0xd8, 0xcf, 0xcd, 0x62, 0x58, 0x81, 0xc4, 0x45, 0x02, 0x8f, + 0x35, 0x0b, 0x0b, 0x40, 0x4c, 0xc4, 0x7e, 0x36, 0x3d, 0xd2, 0xcc, 0xb5, 0x0c, 0x6e, 0xc4, 0x82, + 0x20, 0x49, 0xbb, 0x8c, 0xa1, 0x14, 0xd4, 0xba, 0x17, 0xff, 0xeb, 0xed, 0x06, 0x1a, 0x07, 0x00, + 0x42, 0x62, 0xa4, 0xda, 0x4f, 0xc1, 0x76, 0x08, 0x37, 0x69, 0xf2, 0xfe, 0x55, 0x0c, 0x00, 0xec, + 0x41, 0xb8, 0xa8, 0x1c, 0xc0, 0xbb, 0xc4, 0x29, 0x44, 0xfa, 0x01, 0x70, 0x30, 0x96, 0x09, 0x15, + 0xb2, 0x33, 0x36, 0x5f, 0x4f, 0xcd, 0x8e, 0x32, 0x3b, 0x8f, 0xe6, 0x02, 0x00, 0x4f, 0x02, 0x0f, + 0x67, 0x3c, 0x97, 0xbc, 0x2d, 0x9a, 0x72, 0xfc, 0x96, 0x51, 0x66, 0x91, 0xde, 0x23, 0x28, 0x00, + 0x20, 0x22, 0x05, 0xa5, 0x00, 0x40, 0x76, 0x4e, 0xc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 0xa9, 0x29, 0xb5, 0x01, 0xcc, 0x47, 0x27, + 0x56, 0x19, 0xbb, 0x99, 0xea, 0xd8, 0x62, 0x66, 0x63, 0xbb, 0x23, 0xb7, 0xe6, 0x3d, 0x91, 0x36, + 0x9a, 0x88, 0xa5, 0x9a, 0x5f, 0x92, 0xf7, 0x44, 0x44, 0x44, 0x24, 0xba, 0x3d, 0x09, 0x2f, 0xfe, + 0x27, 0x60, 0xc7, 0xfe, 0x44, 0x44, 0x44, 0x5c, 0x74, 0x04, 0x40, 0x44, 0x44, 0x44, 0xa4, 0x58, + 0x3a, 0x80, 0xbd, 0x1d, 0xe3, 0xc6, 0xd0, 0xfe, 0x63, 0x1a, 0x22, 0x22, 0x52, 0x62, 0x0a, 0x00, + 0x88, 0x88, 0x88, 0x88, 0x14, 0xcb, 0x97, 0xb1, 0x1a, 0x30, 0x49, 0x66, 0x03, 0xe7, 0xb6, 0x61, + 0x2e, 0x22, 0x22, 0x52, 0x21, 0x0a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x14, 0xcb, 0x41, 0x8e, 0x31, + 0x37, 0x60, 0x35, 0x02, 0x44, 0xda, 0x49, 0x6b, 0x87, 0xe2, 0xd2, 0x6b, 0x23, 0x2e, 0xfa, 0x41, + 0x11, 0x11, 0x11, 0x11, 0x29, 0x8e, 0xd5, 0xb0, 0x6e, 0x3e, 0x21, 0xa7, 0xc7, 0x9e, 0x88, 0x48, + 0x1f, 0x86, 0xe6, 0x3d, 0x01, 0x69, 0xa8, 0xaa, 0xed, 0x99, 0x25, 0x63, 0x0a, 0x00, 0x88, 0x88, + 0x88, 0x88, 0x14, 0xc7, 0x09, 0x84, 0xaf, 0xcf, 0x9e, 0x46, 0xc5, 0xff, 0x24, 0x1f, 0x5a, 0x64, + 0x16, 0xd7, 0x3c, 0x79, 0x4f, 0x40, 0xca, 0x41, 0x01, 0x00, 0x11, 0x11, 0x11, 0x91, 0x62, 0xd8, + 0x00, 0xf8, 0x8a, 0x63, 0xdc, 0xa9, 0x58, 0x47, 0x21, 0x91, 0x2c, 0x4d, 0x77, 0x8c, 0x59, 0x3c, + 0xfa, 0x2c, 0xa4, 0x19, 0x43, 0x80, 0xe1, 0x8e, 0x71, 0x9e, 0xd7, 0x58, 0x2a, 0x4e, 0x01, 0x00, + 0x11, 0x11, 0x11, 0x91, 0xfc, 0x0d, 0x00, 0xce, 0x76, 0x8c, 0x7b, 0x03, 0x38, 0x3f, 0xf2, 0x5c, + 0xa4, 0x9e, 0x3e, 0x70, 0x8c, 0x59, 0x16, 0x5b, 0x6c, 0x4a, 0xb1, 0xac, 0x82, 0x6f, 0x5d, 0xf7, + 0x5e, 0xec, 0x89, 0x48, 0xf1, 0x29, 0x00, 0x20, 0x22, 0x22, 0x22, 0x92, 0xbf, 0xa3, 0x80, 0x35, + 0x1d, 0xe3, 0x4e, 0x01, 0xa6, 0x46, 0x9e, 0x8b, 0xd4, 0x93, 0x67, 0x71, 0x38, 0x17, 0xbe, 0x9f, + 0x53, 0x69, 0xaf, 0x75, 0x9d, 0xe3, 0x14, 0x00, 0x10, 0x05, 0x00, 0x44, 0x44, 0x44, 0x44, 0x72, + 0xf6, 0x45, 0xe0, 0x48, 0xc7, 0xb8, 0xd7, 0x81, 0xb3, 0x22, 0xcf, 0x45, 0xea, 0xeb, 0x5d, 0xe7, + 0xb8, 0x1d, 0xa2, 0xce, 0x42, 0x9a, 0xf1, 0x55, 0xe7, 0x38, 0xef, 0x6b, 0x2c, 0x15, 0xa6, 0x00, + 0x80, 0x88, 0x88, 0x88, 0x48, 0x7e, 0x56, 0x03, 0xae, 0xc4, 0x8e, 0x00, 0x84, 0xfc, 0x14, 0x98, + 0x12, 0x77, 0x3a, 0x52, 0x63, 0x8f, 0x39, 0xc7, 0xed, 0x06, 0x0c, 0x8c, 0x39, 0x11, 0x49, 0x65, + 0x19, 0x60, 0x73, 0xc7, 0xb8, 0xe7, 0x80, 0x8f, 0x23, 0xcf, 0x45, 0x4a, 0x40, 0x01, 0x00, 0x11, + 0x11, 0x11, 0x91, 0x7c, 0x6c, 0x0c, 0xdc, 0x06, 0x0c, 0x73, 0x8c, 0x7d, 0x02, 0x38, 0x37, 0xee, + 0x74, 0xa4, 0xe6, 0x5e, 0x00, 0x26, 0x3a, 0xc6, 0x2d, 0x0d, 0x1c, 0x14, 0x79, 0x2e, 0xe2, 0x77, + 0x12, 0xd0, 0xdf, 0x31, 0xee, 0xbe, 0xd8, 0x13, 0x91, 0x72, 0x50, 0x00, 0x40, 0x44, 0x44, 0x44, + 0xa4, 0xbd, 0x06, 0x00, 0x87, 0x01, 0xb7, 0x02, 0x23, 0x1c, 0xe3, 0x3b, 0x81, 0xfd, 0x81, 0x59, + 0x31, 0x27, 0x25, 0x02, 0xdc, 0xeb, 0x1c, 0x77, 0x02, 0xf0, 0xb9, 0x98, 0x13, 0x11, 0x97, 0x83, + 0xb0, 0x8c, 0x0c, 0x0f, 0xef, 0x6b, 0x2b, 0x15, 0xa7, 0x00, 0x80, 0x88, 0x88, 0x88, 0x48, 0x7b, + 0x8c, 0x00, 0xf6, 0xc1, 0x76, 0xf3, 0x4f, 0xc5, 0x9f, 0x46, 0xfd, 0x2b, 0xe0, 0x9e, 0x58, 0x93, + 0x12, 0xe9, 0xe1, 0x62, 0xe7, 0xb8, 0xb9, 0x81, 0xbf, 0x03, 0x7b, 0x01, 0x1d, 0xd1, 0x66, 0x23, + 0x8d, 0x0c, 0x05, 0x7e, 0x0e, 0x9c, 0xee, 0x1c, 0x3f, 0x0d, 0x3b, 0x6a, 0x24, 0xe2, 0x4a, 0x17, + 0x11, 0x11, 0x11, 0x11, 0x11, 0x9f, 0xe3, 0x80, 0xdd, 0x81, 0x57, 0x81, 0xc9, 0x58, 0xc5, 0xfe, + 0x61, 0x58, 0xff, 0x74, 0x6f, 0xab, 0xae, 0x9e, 0xfe, 0x85, 0x75, 0x08, 0x10, 0x69, 0x87, 0xab, + 0x80, 0x09, 0xc0, 0x12, 0x8e, 0xb1, 0xc3, 0x80, 0x3f, 0x03, 0x87, 0x03, 0x57, 0x03, 0xb7, 0x63, + 0x85, 0x2a, 0xdf, 0x01, 0x66, 0xf6, 0x18, 0xf7, 0x7e, 0xc6, 0x73, 0xac, 0x83, 0xb9, 0x80, 0xf9, + 0x7a, 0xfc, 0x7d, 0x30, 0x16, 0x40, 0x1c, 0x09, 0x6c, 0x89, 0x15, 0xfd, 0x5b, 0x34, 0xc5, 0xe3, + 0x5d, 0x0c, 0xbc, 0x95, 0xd5, 0xe4, 0xa4, 0xdc, 0x14, 0x00, 0x10, 0x11, 0x11, 0x11, 0xc9, 0xce, + 0x20, 0x60, 0xf9, 0xae, 0xaf, 0x56, 0xbd, 0x01, 0xec, 0x0c, 0x4c, 0xcf, 0xe0, 0xb1, 0x44, 0x3c, + 0x66, 0x02, 0xa7, 0x61, 0xed, 0x26, 0xbd, 0x56, 0xef, 0xfa, 0x3a, 0xb6, 0xc1, 0xed, 0xf3, 0x62, + 0xc1, 0x30, 0xf1, 0x5b, 0x11, 0x78, 0x2a, 0xa3, 0xc7, 0x9a, 0x89, 0x65, 0x1c, 0x89, 0x00, 0x3a, + 0x02, 0x20, 0x22, 0x22, 0x22, 0x52, 0x44, 0x93, 0x81, 0x6d, 0x80, 0x97, 0x72, 0x9e, 0x87, 0xd4, + 0xcf, 0x69, 0xc0, 0xfd, 0x79, 0x4f, 0x42, 0x32, 0x73, 0x02, 0xf0, 0x78, 0xde, 0x93, 0x90, 0xe2, + 0x50, 0x00, 0x40, 0x44, 0x44, 0x44, 0xa4, 0x58, 0xde, 0x01, 0xb6, 0x00, 0x1e, 0xca, 0x7b, 0x22, + 0x52, 0x4b, 0x33, 0x81, 0xaf, 0x03, 0x1f, 0xe6, 0x3d, 0x11, 0x69, 0xd9, 0x7d, 0x58, 0x00, 0x40, + 0xe4, 0xbf, 0x14, 0x00, 0x10, 0x11, 0x11, 0x11, 0x29, 0x8e, 0xa7, 0x81, 0x4d, 0xd0, 0x0e, 0xac, + 0xe4, 0xeb, 0x79, 0x60, 0x6b, 0x14, 0x04, 0x28, 0xb3, 0x47, 0x80, 0xed, 0x50, 0xf7, 0x10, 0xe9, + 0x45, 0x01, 0x00, 0x11, 0x11, 0x11, 0x91, 0xfc, 0xcd, 0x06, 0xce, 0x04, 0xd6, 0x26, 0xbb, 0xb3, + 0xbf, 0x22, 0xad, 0xb8, 0x1b, 0xd8, 0x00, 0xa5, 0x8f, 0x97, 0xd1, 0x85, 0xc0, 0xc6, 0x58, 0x36, + 0x91, 0xc8, 0x27, 0x28, 0x00, 0x20, 0x22, 0x22, 0x22, 0x92, 0x9f, 0xe9, 0xc0, 0xa5, 0x58, 0x11, + 0xb5, 0x83, 0x80, 0x8f, 0xf3, 0x9d, 0x8e, 0xc8, 0x27, 0x3c, 0x85, 0x05, 0xa5, 0xbe, 0x8b, 0xea, + 0x51, 0x94, 0xc1, 0x5d, 0xd8, 0xf1, 0xa1, 0xaf, 0x03, 0x1f, 0xe5, 0x3c, 0x17, 0x29, 0x28, 0x75, + 0x01, 0x10, 0x11, 0x11, 0x11, 0xc9, 0xce, 0x75, 0x58, 0x7b, 0xb4, 0x15, 0x81, 0xa5, 0x80, 0x05, + 0x81, 0x79, 0x80, 0x01, 0xd8, 0x62, 0xff, 0x7d, 0xac, 0xcd, 0xda, 0x43, 0xc0, 0x3d, 0xc0, 0x35, + 0xa8, 0x4d, 0x9a, 0x14, 0xdb, 0x4c, 0xe0, 0x0c, 0x2c, 0x43, 0x65, 0x63, 0xac, 0x0d, 0xdd, 0x7a, + 0x58, 0xa7, 0x8b, 0x85, 0x81, 0x21, 0x68, 0x53, 0xb1, 0xdd, 0x66, 0x62, 0x0b, 0xfc, 0x09, 0xd8, + 0xb1, 0xa1, 0x7b, 0x81, 0x6b, 0x81, 0x67, 0xf3, 0x9c, 0x94, 0x94, 0x83, 0x02, 0x00, 0x22, 0x22, + 0x22, 0x22, 0xd9, 0xb9, 0xbb, 0xeb, 0x4b, 0xa4, 0x6a, 0x66, 0x03, 0x77, 0x76, 0x7d, 0x49, 0x5c, + 0xe3, 0x81, 0x8e, 0xbc, 0x27, 0x21, 0xd5, 0xd4, 0xd1, 0xd9, 0xd9, 0x99, 0xf7, 0x1c, 0x44, 0x44, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x24, 0x32, 0xa5, 0xeb, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0xd4, 0x80, 0x02, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, 0xa0, 0x00, 0x80, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x0d, 0x28, 0x00, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x52, 0x03, 0x0a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, 0x80, 0x02, 0x00, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, 0xa0, 0x00, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x48, 0x0d, 0x28, 0x00, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x03, 0x0a, 0x00, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, 0x80, 0x02, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x35, 0xa0, 0x00, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x0d, 0x28, 0x00, 0x20, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x03, 0x0a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0xd4, 0x80, 0x02, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, 0xa0, 0x00, 0x80, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x0d, 0x28, 0x00, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x52, 0x03, 0x0a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, 0x80, 0x02, 0x00, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, 0xa0, 0x00, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x48, 0x0d, 0x28, 0x00, 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x03, 0x0a, 0x00, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xd4, 0x80, 0x02, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x35, 0xa0, 0x00, 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x0d, 0x28, 0x00, + 0x20, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x52, 0x03, 0x0a, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0xd4, 0x80, 0x02, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x35, 0xa0, 0x00, + 0x80, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x48, 0x0d, 0x28, 0x00, 0x20, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x52, 0x03, 0xff, 0x1f, 0xea, 0xa1, 0x1e, 0x4b, 0xa7, 0x92, 0x5a, 0xfd, 0x00, 0x00, + 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 }; //---------------------------------------------------------------------------- -vtkm::rendering::BitmapFont -BitmapFontFactory::CreateLiberation2Sans() +vtkm::rendering::BitmapFont BitmapFontFactory::CreateLiberation2Sans() { // This bitmap font was generated from Liberation Sans 2.0 // available under the OFL (SIL Open Font License). @@ -9555,24 +5979,22 @@ BitmapFontFactory::CreateLiberation2Sans() const int Liberation2Sans_imagelength = 94010; BitmapFont font; - font.Name = "Liberation 2 Sans"; - font.Height = 129; - font.Ascender = 102; + font.Name = "Liberation 2 Sans"; + font.Height = 129; + font.Ascender = 102; font.Descender = -24; - font.ImgW = 1024; - font.ImgH = 1024; - font.PadL = 16; - font.PadR = 16; - font.PadT = 14; - font.PadB = 14; - font.RawImageFileData.insert( - font.RawImageFileData.begin(), - Liberation2Sans_rawimage, - Liberation2Sans_rawimage + Liberation2Sans_imagelength); - for (int i=0; i<95; i++) + font.ImgW = 1024; + font.ImgH = 1024; + font.PadL = 16; + font.PadR = 16; + font.PadT = 14; + font.PadB = 14; + font.RawImageFileData.insert(font.RawImageFileData.begin(), Liberation2Sans_rawimage, + Liberation2Sans_rawimage + Liberation2Sans_imagelength); + for (int i = 0; i < 95; i++) { - font.Chars.push_back(BitmapFont::Character(Liberation2Sans_charids[i], - Liberation2Sans_charmetrics[i])); + font.Chars.push_back( + BitmapFont::Character(Liberation2Sans_charids[i], Liberation2Sans_charmetrics[i])); font.ShortMap[Liberation2Sans_charmetrics[i][0]] = i; } @@ -9686,6 +6108,5 @@ BitmapFontFactory::CreateLiberation2Sans() font.Chars[89].kern[46] = -8; return font; } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/BitmapFontFactory.h b/vtkm/rendering/BitmapFontFactory.h index fe4029081..67290f4bd 100644 --- a/vtkm/rendering/BitmapFontFactory.h +++ b/vtkm/rendering/BitmapFontFactory.h @@ -24,15 +24,17 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT BitmapFontFactory { public: static vtkm::rendering::BitmapFont CreateLiberation2Sans(); }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif diff --git a/vtkm/rendering/BoundingBoxAnnotation.cxx b/vtkm/rendering/BoundingBoxAnnotation.cxx index 965bc7772..3eaf9738e 100644 --- a/vtkm/rendering/BoundingBoxAnnotation.cxx +++ b/vtkm/rendering/BoundingBoxAnnotation.cxx @@ -20,11 +20,14 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ BoundingBoxAnnotation::BoundingBoxAnnotation() - : Color(0.5, 0.5, 0.5), Extents(-1, 1, -1, 1, -1, 1) + : Color(0.5, 0.5, 0.5) + , Extents(-1, 1, -1, 1, -1, 1) { } @@ -32,52 +35,50 @@ BoundingBoxAnnotation::~BoundingBoxAnnotation() { } -void BoundingBoxAnnotation::Render(const vtkm::rendering::Camera &, - const WorldAnnotator &annotator) +void BoundingBoxAnnotation::Render(const vtkm::rendering::Camera&, const WorldAnnotator& annotator) { //win->SetupForWorldSpace(); vtkm::Float32 linewidth = 1.0; - annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Min,this->Extents.Z.Min, - this->Extents.X.Min,this->Extents.Y.Min,this->Extents.Z.Max, - linewidth, this->Color); - annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Max,this->Extents.Z.Min, - this->Extents.X.Min,this->Extents.Y.Max,this->Extents.Z.Max, - linewidth, this->Color); - annotator.AddLine(this->Extents.X.Max,this->Extents.Y.Min,this->Extents.Z.Min, - this->Extents.X.Max,this->Extents.Y.Min,this->Extents.Z.Max, - linewidth, this->Color); - annotator.AddLine(this->Extents.X.Max,this->Extents.Y.Max,this->Extents.Z.Min, - this->Extents.X.Max,this->Extents.Y.Max,this->Extents.Z.Max, - linewidth, this->Color); + annotator.AddLine(this->Extents.X.Min, this->Extents.Y.Min, this->Extents.Z.Min, + this->Extents.X.Min, this->Extents.Y.Min, this->Extents.Z.Max, linewidth, + this->Color); + annotator.AddLine(this->Extents.X.Min, this->Extents.Y.Max, this->Extents.Z.Min, + this->Extents.X.Min, this->Extents.Y.Max, this->Extents.Z.Max, linewidth, + this->Color); + annotator.AddLine(this->Extents.X.Max, this->Extents.Y.Min, this->Extents.Z.Min, + this->Extents.X.Max, this->Extents.Y.Min, this->Extents.Z.Max, linewidth, + this->Color); + annotator.AddLine(this->Extents.X.Max, this->Extents.Y.Max, this->Extents.Z.Min, + this->Extents.X.Max, this->Extents.Y.Max, this->Extents.Z.Max, linewidth, + this->Color); - annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Min,this->Extents.Z.Min, - this->Extents.X.Min,this->Extents.Y.Max,this->Extents.Z.Min, - linewidth, this->Color); - annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Min,this->Extents.Z.Max, - this->Extents.X.Min,this->Extents.Y.Max,this->Extents.Z.Max, - linewidth, this->Color); - annotator.AddLine(this->Extents.X.Max,this->Extents.Y.Min,this->Extents.Z.Min, - this->Extents.X.Max,this->Extents.Y.Max,this->Extents.Z.Min, - linewidth, this->Color); - annotator.AddLine(this->Extents.X.Max,this->Extents.Y.Min,this->Extents.Z.Max, - this->Extents.X.Max,this->Extents.Y.Max,this->Extents.Z.Max, - linewidth, this->Color); + annotator.AddLine(this->Extents.X.Min, this->Extents.Y.Min, this->Extents.Z.Min, + this->Extents.X.Min, this->Extents.Y.Max, this->Extents.Z.Min, linewidth, + this->Color); + annotator.AddLine(this->Extents.X.Min, this->Extents.Y.Min, this->Extents.Z.Max, + this->Extents.X.Min, this->Extents.Y.Max, this->Extents.Z.Max, linewidth, + this->Color); + annotator.AddLine(this->Extents.X.Max, this->Extents.Y.Min, this->Extents.Z.Min, + this->Extents.X.Max, this->Extents.Y.Max, this->Extents.Z.Min, linewidth, + this->Color); + annotator.AddLine(this->Extents.X.Max, this->Extents.Y.Min, this->Extents.Z.Max, + this->Extents.X.Max, this->Extents.Y.Max, this->Extents.Z.Max, linewidth, + this->Color); - annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Min,this->Extents.Z.Min, - this->Extents.X.Max,this->Extents.Y.Min,this->Extents.Z.Min, - linewidth, this->Color); - annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Min,this->Extents.Z.Max, - this->Extents.X.Max,this->Extents.Y.Min,this->Extents.Z.Max, - linewidth, this->Color); - annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Max,this->Extents.Z.Min, - this->Extents.X.Max,this->Extents.Y.Max,this->Extents.Z.Min, - linewidth, this->Color); - annotator.AddLine(this->Extents.X.Min,this->Extents.Y.Max,this->Extents.Z.Max, - this->Extents.X.Max,this->Extents.Y.Max,this->Extents.Z.Max, - linewidth, this->Color); + annotator.AddLine(this->Extents.X.Min, this->Extents.Y.Min, this->Extents.Z.Min, + this->Extents.X.Max, this->Extents.Y.Min, this->Extents.Z.Min, linewidth, + this->Color); + annotator.AddLine(this->Extents.X.Min, this->Extents.Y.Min, this->Extents.Z.Max, + this->Extents.X.Max, this->Extents.Y.Min, this->Extents.Z.Max, linewidth, + this->Color); + annotator.AddLine(this->Extents.X.Min, this->Extents.Y.Max, this->Extents.Z.Min, + this->Extents.X.Max, this->Extents.Y.Max, this->Extents.Z.Min, linewidth, + this->Color); + annotator.AddLine(this->Extents.X.Min, this->Extents.Y.Max, this->Extents.Z.Max, + this->Extents.X.Max, this->Extents.Y.Max, this->Extents.Z.Max, linewidth, + this->Color); } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/BoundingBoxAnnotation.h b/vtkm/rendering/BoundingBoxAnnotation.h index c2b9f2e3f..8d53cb4db 100644 --- a/vtkm/rendering/BoundingBoxAnnotation.h +++ b/vtkm/rendering/BoundingBoxAnnotation.h @@ -25,8 +25,10 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT BoundingBoxAnnotation { @@ -40,35 +42,20 @@ public: virtual ~BoundingBoxAnnotation(); VTKM_CONT - const vtkm::Bounds &GetExtents() const - { - return this->Extents; - } + const vtkm::Bounds& GetExtents() const { return this->Extents; } VTKM_CONT - void SetExtents(const vtkm::Bounds &extents) - { - this->Extents = extents; - } + void SetExtents(const vtkm::Bounds& extents) { this->Extents = extents; } VTKM_CONT - const vtkm::rendering::Color &GetColor() const - { - return this->Color; - } + const vtkm::rendering::Color& GetColor() const { return this->Color; } VTKM_CONT - void SetColor(vtkm::rendering::Color c) - { - this->Color = c; - } + void SetColor(vtkm::rendering::Color c) { this->Color = c; } - virtual void Render(const vtkm::rendering::Camera &, - const WorldAnnotator &annotator); + virtual void Render(const vtkm::rendering::Camera&, const WorldAnnotator& annotator); }; - - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif // vtk_m_rendering_BoundingBoxAnnotation_h - diff --git a/vtkm/rendering/Camera.cxx b/vtkm/rendering/Camera.cxx index bf912945c..e7eb7a38c 100644 --- a/vtkm/rendering/Camera.cxx +++ b/vtkm/rendering/Camera.cxx @@ -20,43 +20,41 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -vtkm::Matrix -Camera::Camera3DStruct::CreateViewMatrix() const +vtkm::Matrix Camera::Camera3DStruct::CreateViewMatrix() const { return MatrixHelpers::ViewMatrix(this->Position, this->LookAt, this->ViewUp); } -vtkm::Matrix -Camera::Camera3DStruct::CreateProjectionMatrix(vtkm::Id width, - vtkm::Id height, - vtkm::Float32 nearPlane, - vtkm::Float32 farPlane) const +vtkm::Matrix Camera::Camera3DStruct::CreateProjectionMatrix( + vtkm::Id width, vtkm::Id height, vtkm::Float32 nearPlane, vtkm::Float32 farPlane) const { - vtkm::Matrix matrix; + vtkm::Matrix matrix; vtkm::MatrixIdentity(matrix); vtkm::Float32 AspectRatio = vtkm::Float32(width) / vtkm::Float32(height); - vtkm::Float32 fovRad = (this->FieldOfView * 3.1415926f)/180.f; - fovRad = vtkm::Tan( fovRad * 0.5f); + vtkm::Float32 fovRad = (this->FieldOfView * 3.1415926f) / 180.f; + fovRad = vtkm::Tan(fovRad * 0.5f); vtkm::Float32 size = nearPlane * fovRad; vtkm::Float32 left = -size * AspectRatio; vtkm::Float32 right = size * AspectRatio; vtkm::Float32 bottom = -size; vtkm::Float32 top = size; - matrix(0,0) = 2.f * nearPlane / (right - left); - matrix(1,1) = 2.f * nearPlane / (top - bottom); - matrix(0,2) = (right + left) / (right - left); - matrix(1,2) = (top + bottom) / (top - bottom); - matrix(2,2) = -(farPlane + nearPlane) / (farPlane - nearPlane); - matrix(3,2) = -1.f; - matrix(2,3) = -(2.f * farPlane * nearPlane) / (farPlane - nearPlane); - matrix(3,3) = 0.f; + matrix(0, 0) = 2.f * nearPlane / (right - left); + matrix(1, 1) = 2.f * nearPlane / (top - bottom); + matrix(0, 2) = (right + left) / (right - left); + matrix(1, 2) = (top + bottom) / (top - bottom); + matrix(2, 2) = -(farPlane + nearPlane) / (farPlane - nearPlane); + matrix(3, 2) = -1.f; + matrix(2, 3) = -(2.f * farPlane * nearPlane) / (farPlane - nearPlane); + matrix(3, 3) = 0.f; - vtkm::Matrix T, Z; + vtkm::Matrix T, Z; T = vtkm::Transform3DTranslate(this->XPan, this->YPan, 0.f); Z = vtkm::Transform3DScale(this->Zoom, this->Zoom, 1.f); matrix = vtkm::MatrixMultiply(Z, vtkm::MatrixMultiply(T, matrix)); @@ -65,39 +63,34 @@ Camera::Camera3DStruct::CreateProjectionMatrix(vtkm::Id width, //--------------------------------------------------------------------------- -vtkm::Matrix -Camera::Camera2DStruct::CreateViewMatrix() const +vtkm::Matrix Camera::Camera2DStruct::CreateViewMatrix() const { - vtkm::Vec lookAt((this->Left + this->Right)/2.f, - (this->Top + this->Bottom)/2.f, - 0.f); - vtkm::Vec position = lookAt; + vtkm::Vec lookAt((this->Left + this->Right) / 2.f, + (this->Top + this->Bottom) / 2.f, 0.f); + vtkm::Vec position = lookAt; position[2] = 1.f; - vtkm::Vec up(0,1,0); + vtkm::Vec up(0, 1, 0); return MatrixHelpers::ViewMatrix(position, lookAt, up); } -vtkm::Matrix -Camera::Camera2DStruct::CreateProjectionMatrix(vtkm::Float32 size, - vtkm::Float32 znear, - vtkm::Float32 zfar, - vtkm::Float32 aspect) const +vtkm::Matrix Camera::Camera2DStruct::CreateProjectionMatrix( + vtkm::Float32 size, vtkm::Float32 znear, vtkm::Float32 zfar, vtkm::Float32 aspect) const { - vtkm::Matrix matrix(0.f); - vtkm::Float32 left = -size/2.f * aspect; - vtkm::Float32 right = size/2.f * aspect; - vtkm::Float32 bottom = -size/2.f; - vtkm::Float32 top = size/2.f; + vtkm::Matrix matrix(0.f); + vtkm::Float32 left = -size / 2.f * aspect; + vtkm::Float32 right = size / 2.f * aspect; + vtkm::Float32 bottom = -size / 2.f; + vtkm::Float32 top = size / 2.f; - matrix(0,0) = 2.f/(right-left); - matrix(1,1) = 2.f/(top-bottom); - matrix(2,2) = -2.f/(zfar-znear); - matrix(0,3) = -(right+left)/(right-left); - matrix(1,3) = -(top+bottom)/(top-bottom); - matrix(2,3) = -(zfar+znear)/(zfar-znear); - matrix(3,3) = 1.f; + matrix(0, 0) = 2.f / (right - left); + matrix(1, 1) = 2.f / (top - bottom); + matrix(2, 2) = -2.f / (zfar - znear); + matrix(0, 3) = -(right + left) / (right - left); + matrix(1, 3) = -(top + bottom) / (top - bottom); + matrix(2, 3) = -(zfar + znear) / (zfar - znear); + matrix(3, 3) = 1.f; - vtkm::Matrix T, Z; + vtkm::Matrix T, Z; T = vtkm::Transform3DTranslate(this->XPan, this->YPan, 0.f); Z = vtkm::Transform3DScale(this->Zoom, this->Zoom, 1.f); matrix = vtkm::MatrixMultiply(Z, vtkm::MatrixMultiply(T, matrix)); @@ -106,8 +99,7 @@ Camera::Camera2DStruct::CreateProjectionMatrix(vtkm::Float32 size, //--------------------------------------------------------------------------- -vtkm::Matrix -Camera::CreateViewMatrix() const +vtkm::Matrix Camera::CreateViewMatrix() const { if (this->Mode == Camera::MODE_3D) { @@ -119,35 +111,28 @@ Camera::CreateViewMatrix() const } } -vtkm::Matrix -Camera::CreateProjectionMatrix(vtkm::Id screenWidth, - vtkm::Id screenHeight) const +vtkm::Matrix Camera::CreateProjectionMatrix(vtkm::Id screenWidth, + vtkm::Id screenHeight) const { if (this->Mode == Camera::MODE_3D) { - return this->Camera3D.CreateProjectionMatrix( - screenWidth, screenHeight, this->NearPlane, this->FarPlane); + return this->Camera3D.CreateProjectionMatrix(screenWidth, screenHeight, this->NearPlane, + this->FarPlane); } else { vtkm::Float32 size = vtkm::Abs(this->Camera2D.Top - this->Camera2D.Bottom); - vtkm::Float32 left,right,bottom,top; - this->GetRealViewport(screenWidth,screenHeight,left,right,bottom,top); - vtkm::Float32 aspect = - (static_cast(screenWidth)*(right-left)) / - (static_cast(screenHeight)*(top-bottom)); + vtkm::Float32 left, right, bottom, top; + this->GetRealViewport(screenWidth, screenHeight, left, right, bottom, top); + vtkm::Float32 aspect = (static_cast(screenWidth) * (right - left)) / + (static_cast(screenHeight) * (top - bottom)); - return this->Camera2D.CreateProjectionMatrix( - size, this->NearPlane, this->FarPlane, aspect); + return this->Camera2D.CreateProjectionMatrix(size, this->NearPlane, this->FarPlane, aspect); } } -void Camera::GetRealViewport(vtkm::Id screenWidth, - vtkm::Id screenHeight, - vtkm::Float32 &left, - vtkm::Float32 &right, - vtkm::Float32 &bottom, - vtkm::Float32 &top) const +void Camera::GetRealViewport(vtkm::Id screenWidth, vtkm::Id screenHeight, vtkm::Float32& left, + vtkm::Float32& right, vtkm::Float32& bottom, vtkm::Float32& top) const { if (this->Mode == Camera::MODE_3D) { @@ -158,20 +143,23 @@ void Camera::GetRealViewport(vtkm::Id screenWidth, } else { - vtkm::Float32 maxvw = (this->ViewportRight-this->ViewportLeft) * static_cast(screenWidth); - vtkm::Float32 maxvh = (this->ViewportTop-this->ViewportBottom) * static_cast(screenHeight); + vtkm::Float32 maxvw = + (this->ViewportRight - this->ViewportLeft) * static_cast(screenWidth); + vtkm::Float32 maxvh = + (this->ViewportTop - this->ViewportBottom) * static_cast(screenHeight); vtkm::Float32 waspect = maxvw / maxvh; - vtkm::Float32 daspect = (this->Camera2D.Right - this->Camera2D.Left) / (this->Camera2D.Top - this->Camera2D.Bottom); + vtkm::Float32 daspect = + (this->Camera2D.Right - this->Camera2D.Left) / (this->Camera2D.Top - this->Camera2D.Bottom); daspect *= this->Camera2D.XScale; //cerr << "waspect="< pm, vm; - pm = CreateProjectionMatrix(512,512); + std::cout << "Camera: 2D" << std::endl; + std::cout << " LRBT: " << Camera2D.Left << " " << Camera2D.Right << " " << Camera2D.Bottom + << " " << Camera2D.Top << std::endl; + std::cout << " XY : " << Camera2D.XPan << " " << Camera2D.YPan << std::endl; + std::cout << " SZ : " << Camera2D.XScale << " " << Camera2D.Zoom << std::endl; + vtkm::Matrix pm, vm; + pm = CreateProjectionMatrix(512, 512); vm = CreateViewMatrix(); - std::cout<<" PM: "< #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT Camera { @@ -40,28 +42,25 @@ class VTKM_RENDERING_EXPORT Camera public: VTKM_CONT Camera3DStruct() - : LookAt(0.0f, 0.0f, 0.0f), - Position(0.0f, 0.0f, 1.0f), - ViewUp(0.0f, 1.0f, 0.0f), - FieldOfView(60.0f), - XPan(0.0f), - YPan(0.0f), - Zoom(1.0f) - {} + : LookAt(0.0f, 0.0f, 0.0f) + , Position(0.0f, 0.0f, 1.0f) + , ViewUp(0.0f, 1.0f, 0.0f) + , FieldOfView(60.0f) + , XPan(0.0f) + , YPan(0.0f) + , Zoom(1.0f) + { + } - vtkm::Matrix - CreateViewMatrix() const; + vtkm::Matrix CreateViewMatrix() const; - vtkm::Matrix - CreateProjectionMatrix(vtkm::Id width, - vtkm::Id height, - vtkm::Float32 nearPlane, - vtkm::Float32 farPlane) const; + vtkm::Matrix CreateProjectionMatrix(vtkm::Id width, vtkm::Id height, + vtkm::Float32 nearPlane, + vtkm::Float32 farPlane) const; - - vtkm::Vec LookAt; - vtkm::Vec Position; - vtkm::Vec ViewUp; + vtkm::Vec LookAt; + vtkm::Vec Position; + vtkm::Vec ViewUp; vtkm::Float32 FieldOfView; vtkm::Float32 XPan; vtkm::Float32 YPan; @@ -73,24 +72,23 @@ class VTKM_RENDERING_EXPORT Camera public: VTKM_CONT Camera2DStruct() - : Left(-1.0f), - Right(1.0f), - Bottom(-1.0f), - Top(1.0f), - XScale(1.0f), - XPan(0.0f), - YPan(0.0f), - Zoom(1.0f) - {} + : Left(-1.0f) + , Right(1.0f) + , Bottom(-1.0f) + , Top(1.0f) + , XScale(1.0f) + , XPan(0.0f) + , YPan(0.0f) + , Zoom(1.0f) + { + } - vtkm::Matrix - CreateViewMatrix() const; + vtkm::Matrix CreateViewMatrix() const; - vtkm::Matrix - CreateProjectionMatrix(vtkm::Float32 size, - vtkm::Float32 znear, - vtkm::Float32 zfar, - vtkm::Float32 aspect) const; + vtkm::Matrix CreateProjectionMatrix(vtkm::Float32 size, + vtkm::Float32 znear, + vtkm::Float32 zfar, + vtkm::Float32 aspect) const; vtkm::Float32 Left; vtkm::Float32 Right; @@ -103,27 +101,30 @@ class VTKM_RENDERING_EXPORT Camera }; public: - enum ModeEnum {MODE_2D, MODE_3D }; + enum ModeEnum + { + MODE_2D, + MODE_3D + }; VTKM_CONT - Camera(ModeEnum vtype=Camera::MODE_3D) - : Mode(vtype), - NearPlane(0.01f), - FarPlane(1000.0f), - ViewportLeft(-1.0f), - ViewportRight(1.0f), - ViewportBottom(-1.0f), - ViewportTop(1.0f) - {} + Camera(ModeEnum vtype = Camera::MODE_3D) + : Mode(vtype) + , NearPlane(0.01f) + , FarPlane(1000.0f) + , ViewportLeft(-1.0f) + , ViewportRight(1.0f) + , ViewportBottom(-1.0f) + , ViewportTop(1.0f) + { + } - vtkm::Matrix - CreateViewMatrix() const; + vtkm::Matrix CreateViewMatrix() const; - vtkm::Matrix - CreateProjectionMatrix(vtkm::Id screenWidth, vtkm::Id screenHeight) const; + vtkm::Matrix CreateProjectionMatrix(vtkm::Id screenWidth, + vtkm::Id screenHeight) const; - void GetRealViewport(vtkm::Id screenWidth, vtkm::Id screenHeight, - vtkm::Float32 &left, vtkm::Float32 &right, - vtkm::Float32 &bottom, vtkm::Float32 &top) const; + void GetRealViewport(vtkm::Id screenWidth, vtkm::Id screenHeight, vtkm::Float32& left, + vtkm::Float32& right, vtkm::Float32& bottom, vtkm::Float32& top) const; /// \brief The mode of the camera (2D or 3D). /// @@ -132,25 +133,13 @@ public: /// positioned anywhere and pointing at any place in 3D. /// VTKM_CONT - vtkm::rendering::Camera::ModeEnum GetMode() const - { - return this->Mode; - } + vtkm::rendering::Camera::ModeEnum GetMode() const { return this->Mode; } VTKM_CONT - void SetMode(vtkm::rendering::Camera::ModeEnum mode) - { - this->Mode = mode; - } + void SetMode(vtkm::rendering::Camera::ModeEnum mode) { this->Mode = mode; } VTKM_CONT - void SetModeTo3D() - { - this->SetMode(vtkm::rendering::Camera::MODE_3D); - } + void SetModeTo3D() { this->SetMode(vtkm::rendering::Camera::MODE_3D); } VTKM_CONT - void SetModeTo2D() - { - this->SetMode(vtkm::rendering::Camera::MODE_2D); - } + void SetModeTo2D() { this->SetMode(vtkm::rendering::Camera::MODE_2D); } /// \brief The clipping range of the camera. /// @@ -166,10 +155,7 @@ public: /// behind the geometry. /// VTKM_CONT - vtkm::Range GetClippingRange() const - { - return vtkm::Range(this->NearPlane, this->FarPlane); - } + vtkm::Range GetClippingRange() const { return vtkm::Range(this->NearPlane, this->FarPlane); } VTKM_CONT void SetClippingRange(vtkm::Float32 nearPlane, vtkm::Float32 farPlane) { @@ -183,7 +169,7 @@ public: static_cast(farPlane)); } VTKM_CONT - void SetClippingRange(const vtkm::Range &nearFarRange) + void SetClippingRange(const vtkm::Range& nearFarRange) { this->SetClippingRange(nearFarRange.Min, nearFarRange.Max); } @@ -197,10 +183,8 @@ public: /// bottom of the image are at -1 and the right and top are at 1. /// VTKM_CONT - void GetViewport(vtkm::Float32 &left, - vtkm::Float32 &right, - vtkm::Float32 &bottom, - vtkm::Float32 &top) const + void GetViewport(vtkm::Float32& left, vtkm::Float32& right, vtkm::Float32& bottom, + vtkm::Float32& top) const { left = this->ViewportLeft; right = this->ViewportRight; @@ -208,10 +192,8 @@ public: top = this->ViewportTop; } VTKM_CONT - void GetViewport(vtkm::Float64 &left, - vtkm::Float64 &right, - vtkm::Float64 &bottom, - vtkm::Float64 &top) const + void GetViewport(vtkm::Float64& left, vtkm::Float64& right, vtkm::Float64& bottom, + vtkm::Float64& top) const { left = this->ViewportLeft; right = this->ViewportRight; @@ -221,18 +203,11 @@ public: VTKM_CONT vtkm::Bounds GetViewport() const { - return vtkm::Bounds(this->ViewportLeft, - this->ViewportRight, - this->ViewportBottom, - this->ViewportTop, - 0.0, - 0.0); + return vtkm::Bounds(this->ViewportLeft, this->ViewportRight, this->ViewportBottom, + this->ViewportTop, 0.0, 0.0); } VTKM_CONT - void SetViewport(vtkm::Float32 left, - vtkm::Float32 right, - vtkm::Float32 bottom, - vtkm::Float32 top) + void SetViewport(vtkm::Float32 left, vtkm::Float32 right, vtkm::Float32 bottom, vtkm::Float32 top) { this->ViewportLeft = left; this->ViewportRight = right; @@ -240,22 +215,15 @@ public: this->ViewportTop = top; } VTKM_CONT - void SetViewport(vtkm::Float64 left, - vtkm::Float64 right, - vtkm::Float64 bottom, - vtkm::Float64 top) + void SetViewport(vtkm::Float64 left, vtkm::Float64 right, vtkm::Float64 bottom, vtkm::Float64 top) { - this->SetViewport(static_cast(left), - static_cast(right), - static_cast(bottom), - static_cast(top)); + this->SetViewport(static_cast(left), static_cast(right), + static_cast(bottom), static_cast(top)); } VTKM_CONT - void SetViewport(const vtkm::Bounds &viewportBounds) + void SetViewport(const vtkm::Bounds& viewportBounds) { - this->SetViewport(viewportBounds.X.Min, - viewportBounds.X.Max, - viewportBounds.Y.Min, + this->SetViewport(viewportBounds.X.Min, viewportBounds.X.Max, viewportBounds.Y.Min, viewportBounds.Y.Max); } @@ -265,20 +233,17 @@ public: /// position. If \c LookAt is set, the mode is changed to 3D mode. /// VTKM_CONT - const vtkm::Vec &GetLookAt() const - { - return this->Camera3D.LookAt; - } + const vtkm::Vec& GetLookAt() const { return this->Camera3D.LookAt; } VTKM_CONT - void SetLookAt(const vtkm::Vec &lookAt) + void SetLookAt(const vtkm::Vec& lookAt) { this->SetModeTo3D(); this->Camera3D.LookAt = lookAt; } VTKM_CONT - void SetLookAt(const vtkm::Vec &lookAt) + void SetLookAt(const vtkm::Vec& lookAt) { - this->SetLookAt(vtkm::Vec(lookAt)); + this->SetLookAt(vtkm::Vec(lookAt)); } /// \brief The spatial position of the camera in 3D mode @@ -287,20 +252,17 @@ public: /// \c Position is set, the mode is changed to 3D mode. /// VTKM_CONT - const vtkm::Vec &GetPosition() const - { - return this->Camera3D.Position; - } + const vtkm::Vec& GetPosition() const { return this->Camera3D.Position; } VTKM_CONT - void SetPosition(const vtkm::Vec &position) + void SetPosition(const vtkm::Vec& position) { this->SetModeTo3D(); this->Camera3D.Position = position; } VTKM_CONT - void SetPosition(const vtkm::Vec &position) + void SetPosition(const vtkm::Vec& position) { - this->SetPosition(vtkm::Vec(position)); + this->SetPosition(vtkm::Vec(position)); } /// \brief The up orientation of the camera in 3D mode @@ -311,20 +273,17 @@ public: /// view up. If \c ViewUp is set, the mode is changed to 3D mode. /// VTKM_CONT - const vtkm::Vec &GetViewUp() const - { - return this->Camera3D.ViewUp; - } + const vtkm::Vec& GetViewUp() const { return this->Camera3D.ViewUp; } VTKM_CONT - void SetViewUp(const vtkm::Vec &viewUp) + void SetViewUp(const vtkm::Vec& viewUp) { this->SetModeTo3D(); this->Camera3D.ViewUp = viewUp; } VTKM_CONT - void SetViewUp(const vtkm::Vec &viewUp) + void SetViewUp(const vtkm::Vec& viewUp) { - this->SetViewUp(vtkm::Vec(viewUp)); + this->SetViewUp(vtkm::Vec(viewUp)); } /// \brief The field of view angle @@ -335,10 +294,7 @@ public: /// Setting the field of view changes the mode to 3D. /// VTKM_CONT - vtkm::Float32 GetFieldOfView() const - { - return this->Camera3D.FieldOfView; - } + vtkm::Float32 GetFieldOfView() const { return this->Camera3D.FieldOfView; } VTKM_CONT void SetFieldOfView(vtkm::Float32 fov) { @@ -346,10 +302,7 @@ public: this->Camera3D.FieldOfView = fov; } VTKM_CONT - void SetFieldOfView(vtkm::Float64 fov) - { - this->SetFieldOfView(static_cast(fov)); - } + void SetFieldOfView(vtkm::Float64 fov) { this->SetFieldOfView(static_cast(fov)); } /// \brief Pans the camera /// @@ -363,15 +316,9 @@ public: this->Pan(static_cast(dx), static_cast(dy)); } VTKM_CONT - void Pan(vtkm::Vec direction) - { - this->Pan(direction[0], direction[1]); - } + void Pan(vtkm::Vec direction) { this->Pan(direction[0], direction[1]); } VTKM_CONT - void Pan(vtkm::Vec direction) - { - this->Pan(direction[0], direction[1]); - } + void Pan(vtkm::Vec direction) { this->Pan(direction[0], direction[1]); } /// \brief Zooms the camera in or out /// @@ -382,10 +329,7 @@ public: void Zoom(vtkm::Float32 zoom); VTKM_CONT - void Zoom(vtkm::Float64 zoom) - { - this->Zoom(static_cast(zoom)); - } + void Zoom(vtkm::Float64 zoom) { this->Zoom(static_cast(zoom)); } /// \brief Moves the camera as if a point was dragged along a sphere. /// @@ -397,21 +341,15 @@ public: /// /// \c TrackballRotate changes the mode to 3D. /// - void TrackballRotate(vtkm::Float32 startX, - vtkm::Float32 startY, - vtkm::Float32 endX, + void TrackballRotate(vtkm::Float32 startX, vtkm::Float32 startY, vtkm::Float32 endX, vtkm::Float32 endY); VTKM_CONT - void TrackballRotate(vtkm::Float64 startX, - vtkm::Float64 startY, - vtkm::Float64 endX, + void TrackballRotate(vtkm::Float64 startX, vtkm::Float64 startY, vtkm::Float64 endX, vtkm::Float64 endY) { - this->TrackballRotate(static_cast(startX), - static_cast(startY), - static_cast(endX), - static_cast(endY)); + this->TrackballRotate(static_cast(startX), static_cast(startY), + static_cast(endX), static_cast(endY)); } /// \brief Set up the camera to look at geometry @@ -421,7 +359,7 @@ public: /// the camera so that it is looking at this region in space. The view /// direction is preserved. /// - void ResetToBounds(const vtkm::Bounds &dataBounds); + void ResetToBounds(const vtkm::Bounds& dataBounds); /// \brief Roll the camera /// @@ -433,10 +371,7 @@ public: void Roll(vtkm::Float32 angleDegrees); VTKM_CONT - void Roll(vtkm::Float64 angleDegrees) - { - this->Roll(static_cast(angleDegrees)); - } + void Roll(vtkm::Float64 angleDegrees) { this->Roll(static_cast(angleDegrees)); } /// \brief Rotate the camera about the view up vector centered at the focal point. /// @@ -486,10 +421,7 @@ public: void Dolly(vtkm::Float32 value); VTKM_CONT - void Dolly(vtkm::Float64 value) - { - this->Dolly(static_cast(value)); - } + void Dolly(vtkm::Float64 value) { this->Dolly(static_cast(value)); } /// \brief The viewable region in the x-y plane /// @@ -501,10 +433,8 @@ public: /// \c SetViewRange2D changes the camera mode to 2D. /// VTKM_CONT - void GetViewRange2D(vtkm::Float32 &left, - vtkm::Float32 &right, - vtkm::Float32 &bottom, - vtkm::Float32 &top) const + void GetViewRange2D(vtkm::Float32& left, vtkm::Float32& right, vtkm::Float32& bottom, + vtkm::Float32& top) const { left = this->Camera2D.Left; right = this->Camera2D.Right; @@ -514,17 +444,11 @@ public: VTKM_CONT vtkm::Bounds GetViewRange2D() const { - return vtkm::Bounds(this->Camera2D.Left, - this->Camera2D.Right, - this->Camera2D.Bottom, - this->Camera2D.Top, - 0.0, - 0.0); + return vtkm::Bounds(this->Camera2D.Left, this->Camera2D.Right, this->Camera2D.Bottom, + this->Camera2D.Top, 0.0, 0.0); } VTKM_CONT - void SetViewRange2D(vtkm::Float32 left, - vtkm::Float32 right, - vtkm::Float32 bottom, + void SetViewRange2D(vtkm::Float32 left, vtkm::Float32 right, vtkm::Float32 bottom, vtkm::Float32 top) { this->SetModeTo2D(); @@ -538,24 +462,19 @@ public: this->Camera2D.Zoom = 1; } VTKM_CONT - void SetViewRange2D(vtkm::Float64 left, - vtkm::Float64 right, - vtkm::Float64 bottom, + void SetViewRange2D(vtkm::Float64 left, vtkm::Float64 right, vtkm::Float64 bottom, vtkm::Float64 top) { - this->SetViewRange2D(static_cast(left), - static_cast(right), - static_cast(bottom), - static_cast(top)); + this->SetViewRange2D(static_cast(left), static_cast(right), + static_cast(bottom), static_cast(top)); } VTKM_CONT - void SetViewRange2D(const vtkm::Range &xRange, - const vtkm::Range &yRange) + void SetViewRange2D(const vtkm::Range& xRange, const vtkm::Range& yRange) { this->SetViewRange2D(xRange.Min, xRange.Max, yRange.Min, yRange.Max); } VTKM_CONT - void SetViewRange2D(const vtkm::Bounds &viewRange) + void SetViewRange2D(const vtkm::Bounds& viewRange) { this->SetViewRange2D(viewRange.X, viewRange.Y); } @@ -576,7 +495,7 @@ private: vtkm::Float32 ViewportBottom; vtkm::Float32 ViewportTop; }; - -}} // namespace vtkm::rendering +} +} // namespace vtkm::rendering #endif // vtk_m_rendering_Camera_h diff --git a/vtkm/rendering/Canvas.cxx b/vtkm/rendering/Canvas.cxx index ddfde9b87..50e30461d 100644 --- a/vtkm/rendering/Canvas.cxx +++ b/vtkm/rendering/Canvas.cxx @@ -23,44 +23,44 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ Canvas::Canvas(vtkm::Id width, vtkm::Id height) - : Width(0), Height(0) + : Width(0) + , Height(0) { this->ResizeBuffers(width, height); } Canvas::~Canvas() -{ } +{ +} -void Canvas::SaveAs(const std::string &fileName) const +void Canvas::SaveAs(const std::string& fileName) const { this->RefreshColorBuffer(); std::ofstream of(fileName.c_str()); - of<<"P6"<Width<<" "<Height<ColorBuffer.GetPortalConstControl(); - for (vtkm::Id yIndex=this->Height-1; yIndex>=0; yIndex--) + of << "P6" << std::endl << this->Width << " " << this->Height << std::endl << 255 << std::endl; + ColorBufferType::PortalConstControl colorPortal = this->ColorBuffer.GetPortalConstControl(); + for (vtkm::Id yIndex = this->Height - 1; yIndex >= 0; yIndex--) { - for (vtkm::Id xIndex=0; xIndex < this->Width; xIndex++) + for (vtkm::Id xIndex = 0; xIndex < this->Width; xIndex++) { - vtkm::Vec tuple = - colorPortal.Get(yIndex*this->Width + xIndex); - of<<(unsigned char)(tuple[0]*255); - of<<(unsigned char)(tuple[1]*255); - of<<(unsigned char)(tuple[2]*255); + vtkm::Vec tuple = colorPortal.Get(yIndex * this->Width + xIndex); + of << (unsigned char)(tuple[0] * 255); + of << (unsigned char)(tuple[1] * 255); + of << (unsigned char)(tuple[2] * 255); } } of.close(); } -vtkm::rendering::WorldAnnotator * -Canvas::CreateWorldAnnotator() const +vtkm::rendering::WorldAnnotator* Canvas::CreateWorldAnnotator() const { return new vtkm::rendering::WorldAnnotator; } - } } // vtkm::rendering diff --git a/vtkm/rendering/Canvas.h b/vtkm/rendering/Canvas.h index d0d93a7d1..4882b8659 100644 --- a/vtkm/rendering/Canvas.h +++ b/vtkm/rendering/Canvas.h @@ -28,14 +28,15 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT Canvas { public: - Canvas(vtkm::Id width=1024, - vtkm::Id height=1024); + Canvas(vtkm::Id width = 1024, vtkm::Id height = 1024); virtual ~Canvas(); @@ -47,9 +48,9 @@ public: virtual void Finish() = 0; - virtual vtkm::rendering::Canvas *NewCopy() const = 0; + virtual vtkm::rendering::Canvas* NewCopy() const = 0; - typedef vtkm::cont::ArrayHandle > ColorBufferType; + typedef vtkm::cont::ArrayHandle> ColorBufferType; typedef vtkm::cont::ArrayHandle DepthBufferType; VTKM_CONT @@ -59,16 +60,16 @@ public: vtkm::Id GetHeight() const { return this->Height; } VTKM_CONT - const ColorBufferType &GetColorBuffer() const { return this->ColorBuffer; } + const ColorBufferType& GetColorBuffer() const { return this->ColorBuffer; } VTKM_CONT - ColorBufferType &GetColorBuffer() { return this->ColorBuffer; } + ColorBufferType& GetColorBuffer() { return this->ColorBuffer; } VTKM_CONT - const DepthBufferType &GetDepthBuffer() const { return this->DepthBuffer; } + const DepthBufferType& GetDepthBuffer() const { return this->DepthBuffer; } VTKM_CONT - DepthBufferType &GetDepthBuffer() { return this->DepthBuffer; } + DepthBufferType& GetDepthBuffer() { return this->DepthBuffer; } VTKM_CONT void ResizeBuffers(vtkm::Id width, vtkm::Id height) @@ -76,7 +77,7 @@ public: VTKM_ASSERT(width >= 0); VTKM_ASSERT(height >= 0); - vtkm::Id numPixels = width*height; + vtkm::Id numPixels = width * height; if (this->ColorBuffer.GetNumberOfValues() != numPixels) { this->ColorBuffer.Allocate(numPixels); @@ -91,86 +92,58 @@ public: } VTKM_CONT - const vtkm::rendering::Color &GetBackgroundColor() const - { - return this->BackgroundColor; - } + const vtkm::rendering::Color& GetBackgroundColor() const { return this->BackgroundColor; } VTKM_CONT - void SetBackgroundColor(const vtkm::rendering::Color &color) - { - this->BackgroundColor = color; - } + void SetBackgroundColor(const vtkm::rendering::Color& color) { this->BackgroundColor = color; } // If a subclass uses a system that renderers to different buffers, then // these should be overridden to copy the data to the buffers. - virtual void RefreshColorBuffer() const { } - virtual void RefreshDepthBuffer() const { } + virtual void RefreshColorBuffer() const {} + virtual void RefreshDepthBuffer() const {} - virtual void SetViewToWorldSpace(const vtkm::rendering::Camera &, bool) {} - virtual void SetViewToScreenSpace(const vtkm::rendering::Camera &, bool) {} - virtual void SetViewportClipping(const vtkm::rendering::Camera &, bool) {} + virtual void SetViewToWorldSpace(const vtkm::rendering::Camera&, bool) {} + virtual void SetViewToScreenSpace(const vtkm::rendering::Camera&, bool) {} + virtual void SetViewportClipping(const vtkm::rendering::Camera&, bool) {} - virtual void SaveAs(const std::string &fileName) const; + virtual void SaveAs(const std::string& fileName) const; - virtual void AddLine(const vtkm::Vec &point0, - const vtkm::Vec &point1, - vtkm::Float32 linewidth, - const vtkm::rendering::Color &color) const = 0; + virtual void AddLine(const vtkm::Vec& point0, + const vtkm::Vec& point1, vtkm::Float32 linewidth, + const vtkm::rendering::Color& color) const = 0; VTKM_CONT - void AddLine(vtkm::Float64 x0, vtkm::Float64 y0, - vtkm::Float64 x1, vtkm::Float64 y1, - vtkm::Float32 linewidth, - const vtkm::rendering::Color &color) const + void AddLine(vtkm::Float64 x0, vtkm::Float64 y0, vtkm::Float64 x1, vtkm::Float64 y1, + vtkm::Float32 linewidth, const vtkm::rendering::Color& color) const { - this->AddLine(vtkm::make_Vec(x0, y0), - vtkm::make_Vec(x1, y1), - linewidth, - color); + this->AddLine(vtkm::make_Vec(x0, y0), vtkm::make_Vec(x1, y1), linewidth, color); } - virtual void AddColorBar(const vtkm::Bounds &bounds, - const vtkm::rendering::ColorTable &colorTable, + virtual void AddColorBar(const vtkm::Bounds& bounds, + const vtkm::rendering::ColorTable& colorTable, bool horizontal) const = 0; VTKM_CONT - void AddColorBar(vtkm::Float32 x, vtkm::Float32 y, - vtkm::Float32 width, vtkm::Float32 height, - const vtkm::rendering::ColorTable &colorTable, - bool horizontal) const + void AddColorBar(vtkm::Float32 x, vtkm::Float32 y, vtkm::Float32 width, vtkm::Float32 height, + const vtkm::rendering::ColorTable& colorTable, bool horizontal) const { - this->AddColorBar(vtkm::Bounds(vtkm::Range(x, x+width), - vtkm::Range(y,y+height), - vtkm::Range(0,0)), - colorTable, - horizontal); + this->AddColorBar( + vtkm::Bounds(vtkm::Range(x, x + width), vtkm::Range(y, y + height), vtkm::Range(0, 0)), + colorTable, horizontal); } - virtual void AddText(const vtkm::Vec &position, - vtkm::Float32 scale, - vtkm::Float32 angle, - vtkm::Float32 windowAspect, - const vtkm::Vec &anchor, - const vtkm::rendering::Color & color, - const std::string &text) const = 0; + virtual void AddText(const vtkm::Vec& position, vtkm::Float32 scale, + vtkm::Float32 angle, vtkm::Float32 windowAspect, + const vtkm::Vec& anchor, + const vtkm::rendering::Color& color, const std::string& text) const = 0; VTKM_CONT - void AddText(vtkm::Float32 x, vtkm::Float32 y, - vtkm::Float32 scale, - vtkm::Float32 angle, - vtkm::Float32 windowAspect, - vtkm::Float32 anchorX, vtkm::Float32 anchorY, - const vtkm::rendering::Color & color, - const std::string &text) const + void AddText(vtkm::Float32 x, vtkm::Float32 y, vtkm::Float32 scale, vtkm::Float32 angle, + vtkm::Float32 windowAspect, vtkm::Float32 anchorX, vtkm::Float32 anchorY, + const vtkm::rendering::Color& color, const std::string& text) const { - this->AddText(vtkm::make_Vec(x, y), - scale, - angle, - windowAspect, - vtkm::make_Vec(anchorX, anchorY), - color, - text); + this->AddText(vtkm::make_Vec(x, y), scale, angle, windowAspect, + vtkm::make_Vec(anchorX, anchorY), color, text); } /// Creates a WorldAnnotator of a type that is paired with this Canvas. Other @@ -180,7 +153,7 @@ public: /// deleted with delete later). A pointer to the created WorldAnnotator is /// returned. /// - virtual vtkm::rendering::WorldAnnotator *CreateWorldAnnotator() const; + virtual vtkm::rendering::WorldAnnotator* CreateWorldAnnotator() const; private: vtkm::Id Width; @@ -189,7 +162,7 @@ private: ColorBufferType ColorBuffer; DepthBufferType DepthBuffer; }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif //vtk_m_rendering_Canvas_h diff --git a/vtkm/rendering/CanvasEGL.cxx b/vtkm/rendering/CanvasEGL.cxx index 94d572670..136f31466 100644 --- a/vtkm/rendering/CanvasEGL.cxx +++ b/vtkm/rendering/CanvasEGL.cxx @@ -29,10 +29,13 @@ #include //#include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -namespace detail { +namespace detail +{ struct CanvasEGLInternals { @@ -44,8 +47,8 @@ struct CanvasEGLInternals } // namespace detail CanvasEGL::CanvasEGL(vtkm::Id width, vtkm::Id height) - : CanvasGL(width, height), - Internals(new detail::CanvasEGLInternals) + : CanvasGL(width, height) + , Internals(new detail::CanvasEGLInternals) { this->Internals->Context = nullptr; this->ResizeBuffers(width, height); @@ -68,48 +71,46 @@ void CanvasEGL::Initialize() throw vtkm::cont::ErrorBadValue("Failed to initialize EGL display"); } - const EGLint cfgAttrs[] = - { - EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, - EGL_BLUE_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_RED_SIZE, 8, - EGL_DEPTH_SIZE, 8, - EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT, - EGL_NONE - }; + const EGLint cfgAttrs[] = { EGL_SURFACE_TYPE, + EGL_PBUFFER_BIT, + EGL_BLUE_SIZE, + 8, + EGL_GREEN_SIZE, + 8, + EGL_RED_SIZE, + 8, + EGL_DEPTH_SIZE, + 8, + EGL_RENDERABLE_TYPE, + EGL_OPENGL_BIT, + EGL_NONE }; EGLint nCfgs; EGLConfig cfg; - if (!(eglChooseConfig(this->Internals->Display, cfgAttrs, &cfg, 1, &nCfgs)) || - (nCfgs == 0)) + if (!(eglChooseConfig(this->Internals->Display, cfgAttrs, &cfg, 1, &nCfgs)) || (nCfgs == 0)) { throw vtkm::cont::ErrorBadValue("Failed to get EGL config"); } - const EGLint pbAttrs[] = - { - EGL_WIDTH, static_cast(this->GetWidth()), + const EGLint pbAttrs[] = { + EGL_WIDTH, static_cast(this->GetWidth()), EGL_HEIGHT, static_cast(this->GetHeight()), EGL_NONE, }; - this->Internals->Surface = - eglCreatePbufferSurface(this->Internals->Display, cfg, pbAttrs); + this->Internals->Surface = eglCreatePbufferSurface(this->Internals->Display, cfg, pbAttrs); if (!this->Internals->Surface) { throw vtkm::cont::ErrorBadValue("Failed to create EGL PBuffer surface"); } eglBindAPI(EGL_OPENGL_API); this->Internals->Context = - eglCreateContext(this->Internals->Display, cfg, EGL_NO_CONTEXT, nullptr); + eglCreateContext(this->Internals->Display, cfg, EGL_NO_CONTEXT, nullptr); if (!this->Internals->Context) { throw vtkm::cont::ErrorBadValue("Failed to create EGL context"); } - if (!(eglMakeCurrent(this->Internals->Display, - this->Internals->Surface, - this->Internals->Surface, + if (!(eglMakeCurrent(this->Internals->Display, this->Internals->Surface, this->Internals->Surface, this->Internals->Context))) { throw vtkm::cont::ErrorBadValue("Failed to create EGL context current"); @@ -121,10 +122,9 @@ void CanvasEGL::Activate() glEnable(GL_DEPTH_TEST); } -vtkm::rendering::Canvas *CanvasEGL::NewCopy() const +vtkm::rendering::Canvas* CanvasEGL::NewCopy() const { return new vtkm::rendering::CanvasEGL(*this); } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/CanvasEGL.h b/vtkm/rendering/CanvasEGL.h index 4f94fda35..b8e60c93d 100644 --- a/vtkm/rendering/CanvasEGL.h +++ b/vtkm/rendering/CanvasEGL.h @@ -26,20 +26,21 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -namespace detail { +namespace detail +{ struct CanvasEGLInternals; - } class VTKM_RENDERING_EXPORT CanvasEGL : public CanvasGL { public: - CanvasEGL(vtkm::Id width=1024, - vtkm::Id height=1024); + CanvasEGL(vtkm::Id width = 1024, vtkm::Id height = 1024); ~CanvasEGL(); @@ -47,12 +48,12 @@ public: virtual void Activate() VTKM_OVERRIDE; - vtkm::rendering::Canvas *NewCopy() const VTKM_OVERRIDE; + vtkm::rendering::Canvas* NewCopy() const VTKM_OVERRIDE; private: std::shared_ptr Internals; }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif //vtk_m_rendering_CanvasEGL_h diff --git a/vtkm/rendering/CanvasGL.cxx b/vtkm/rendering/CanvasGL.cxx index ceba7d971..766361f86 100644 --- a/vtkm/rendering/CanvasGL.cxx +++ b/vtkm/rendering/CanvasGL.cxx @@ -29,11 +29,13 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ CanvasGL::CanvasGL(vtkm::Id width, vtkm::Id height) - : Canvas(width,height) + : Canvas(width, height) { } @@ -58,10 +60,8 @@ void CanvasGL::Activate() void CanvasGL::Clear() { vtkm::rendering::Color backgroundColor = this->GetBackgroundColor(); - glClearColor(backgroundColor.Components[0], - backgroundColor.Components[1], - backgroundColor.Components[2], - 1.0f); + glClearColor(backgroundColor.Components[0], backgroundColor.Components[1], + backgroundColor.Components[2], 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); } @@ -70,20 +70,17 @@ void CanvasGL::Finish() glFinish(); } -vtkm::rendering::Canvas *CanvasGL::NewCopy() const +vtkm::rendering::Canvas* CanvasGL::NewCopy() const { return new vtkm::rendering::CanvasGL(*this); } -void CanvasGL::SetViewToWorldSpace(const vtkm::rendering::Camera &camera, - bool clip) +void CanvasGL::SetViewToWorldSpace(const vtkm::rendering::Camera& camera, bool clip) { vtkm::Float32 oglP[16], oglM[16]; - MatrixHelpers::CreateOGLMatrix( - camera.CreateProjectionMatrix(this->GetWidth(), - this->GetHeight()), - oglP); + MatrixHelpers::CreateOGLMatrix(camera.CreateProjectionMatrix(this->GetWidth(), this->GetHeight()), + oglP); glMatrixMode(GL_PROJECTION); glLoadMatrixf(oglP); MatrixHelpers::CreateOGLMatrix(camera.CreateViewMatrix(), oglM); @@ -93,24 +90,23 @@ void CanvasGL::SetViewToWorldSpace(const vtkm::rendering::Camera &camera, this->SetViewportClipping(camera, clip); } -void CanvasGL::SetViewToScreenSpace(const vtkm::rendering::Camera &camera, - bool clip) +void CanvasGL::SetViewToScreenSpace(const vtkm::rendering::Camera& camera, bool clip) { - vtkm::Float32 oglP[16] = {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0}; - vtkm::Float32 oglM[16] = {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0}; + vtkm::Float32 oglP[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + vtkm::Float32 oglM[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - oglP[0*4+0] = 1.; - oglP[1*4+1] = 1.; - oglP[2*4+2] = -1.; - oglP[3*4+3] = 1.; + oglP[0 * 4 + 0] = 1.; + oglP[1 * 4 + 1] = 1.; + oglP[2 * 4 + 2] = -1.; + oglP[3 * 4 + 3] = 1.; glMatrixMode(GL_PROJECTION); glLoadMatrixf(oglP); - oglM[0*4+0] = 1.; - oglM[1*4+1] = 1.; - oglM[2*4+2] = 1.; - oglM[3*4+3] = 1.; + oglM[0 * 4 + 0] = 1.; + oglM[1 * 4 + 1] = 1.; + oglM[2 * 4 + 2] = 1.; + oglM[3 * 4 + 3] = 1.; glMatrixMode(GL_MODELVIEW); glLoadMatrixf(oglM); @@ -118,27 +114,23 @@ void CanvasGL::SetViewToScreenSpace(const vtkm::rendering::Camera &camera, this->SetViewportClipping(camera, clip); } -void CanvasGL::SetViewportClipping(const vtkm::rendering::Camera &camera, - bool clip) +void CanvasGL::SetViewportClipping(const vtkm::rendering::Camera& camera, bool clip) { if (clip) { vtkm::Float32 vl, vr, vb, vt; - camera.GetRealViewport(this->GetWidth(), this->GetHeight(), - vl,vr,vb,vt); - vtkm::Float32 _x = static_cast(this->GetWidth())*(1.f+vl)/2.f; - vtkm::Float32 _y = static_cast(this->GetHeight())*(1.f+vb)/2.f; - vtkm::Float32 _w = static_cast(this->GetWidth())*(vr-vl)/2.f; - vtkm::Float32 _h = static_cast(this->GetHeight())*(vt-vb)/2.f; + camera.GetRealViewport(this->GetWidth(), this->GetHeight(), vl, vr, vb, vt); + vtkm::Float32 _x = static_cast(this->GetWidth()) * (1.f + vl) / 2.f; + vtkm::Float32 _y = static_cast(this->GetHeight()) * (1.f + vb) / 2.f; + vtkm::Float32 _w = static_cast(this->GetWidth()) * (vr - vl) / 2.f; + vtkm::Float32 _h = static_cast(this->GetHeight()) * (vt - vb) / 2.f; - glViewport(static_cast(_x), static_cast(_y), - static_cast(_w), static_cast(_h)); + glViewport(static_cast(_x), static_cast(_y), static_cast(_w), + static_cast(_h)); } else { - glViewport(0, - 0, - static_cast(this->GetWidth()), + glViewport(0, 0, static_cast(this->GetWidth()), static_cast(this->GetHeight())); } } @@ -150,10 +142,8 @@ void CanvasGL::RefreshColorBuffer() const VTKM_ASSERT(viewport[2] == this->GetWidth()); VTKM_ASSERT(viewport[3] == this->GetHeight()); - glReadPixels(viewport[0], viewport[1], viewport[2], viewport[3], - GL_RGBA, GL_FLOAT, - const_cast *>( - this->GetColorBuffer().GetStorage().GetArray())); + glReadPixels(viewport[0], viewport[1], viewport[2], viewport[3], GL_RGBA, GL_FLOAT, + const_cast*>(this->GetColorBuffer().GetStorage().GetArray())); } void CanvasGL::RefreshDepthBuffer() const @@ -163,16 +153,13 @@ void CanvasGL::RefreshDepthBuffer() const VTKM_ASSERT(viewport[2] == this->GetWidth()); VTKM_ASSERT(viewport[3] == this->GetHeight()); - glReadPixels(viewport[0], viewport[1], viewport[2], viewport[3], - GL_DEPTH_COMPONENT, GL_FLOAT, - const_cast( - this->GetDepthBuffer().GetStorage().GetArray())); + glReadPixels(viewport[0], viewport[1], viewport[2], viewport[3], GL_DEPTH_COMPONENT, GL_FLOAT, + const_cast(this->GetDepthBuffer().GetStorage().GetArray())); } -void CanvasGL::AddLine(const vtkm::Vec &point0, - const vtkm::Vec &point1, - vtkm::Float32 linewidth, - const vtkm::rendering::Color &color) const +void CanvasGL::AddLine(const vtkm::Vec& point0, + const vtkm::Vec& point1, vtkm::Float32 linewidth, + const vtkm::rendering::Color& color) const { glDisable(GL_DEPTH_TEST); glDisable(GL_LIGHTING); @@ -181,14 +168,13 @@ void CanvasGL::AddLine(const vtkm::Vec &point0, glLineWidth(linewidth); glBegin(GL_LINES); - glVertex2f(float(point0[0]),float(point0[1])); - glVertex2f(float(point1[0]),float(point1[1])); + glVertex2f(float(point0[0]), float(point0[1])); + glVertex2f(float(point1[0]), float(point1[1])); glEnd(); } -void CanvasGL::AddColorBar(const vtkm::Bounds &bounds, - const vtkm::rendering::ColorTable &colorTable, - bool horizontal) const +void CanvasGL::AddColorBar(const vtkm::Bounds& bounds, + const vtkm::rendering::ColorTable& colorTable, bool horizontal) const { const int n = 256; vtkm::Float32 startX = static_cast(bounds.X.Min); @@ -198,68 +184,63 @@ void CanvasGL::AddColorBar(const vtkm::Bounds &bounds, glDisable(GL_DEPTH_TEST); glDisable(GL_LIGHTING); glBegin(GL_QUADS); - for (int i=0; i(i)/static_cast(n); - vtkm::Float32 v1 = static_cast(i+1)/static_cast(n); + vtkm::Float32 v0 = static_cast(i) / static_cast(n); + vtkm::Float32 v1 = static_cast(i + 1) / static_cast(n); vtkm::rendering::Color c0 = colorTable.MapRGB(v0); vtkm::rendering::Color c1 = colorTable.MapRGB(v1); if (horizontal) { - vtkm::Float32 x0 = startX + width*v0; - vtkm::Float32 x1 = startX + width*v1; + vtkm::Float32 x0 = startX + width * v0; + vtkm::Float32 x1 = startX + width * v1; vtkm::Float32 y0 = startY; vtkm::Float32 y1 = startY + height; glColor3f(c0.Components[0], c0.Components[1], c0.Components[2]); - glVertex2f(x0,y0); - glVertex2f(x0,y1); + glVertex2f(x0, y0); + glVertex2f(x0, y1); glColor3f(c1.Components[0], c1.Components[1], c1.Components[2]); - glVertex2f(x1,y1); - glVertex2f(x1,y0); + glVertex2f(x1, y1); + glVertex2f(x1, y0); } else // vertical { vtkm::Float32 x0 = startX; vtkm::Float32 x1 = startX + width; - vtkm::Float32 y0 = startY + height*v0; - vtkm::Float32 y1 = startY + height*v1; + vtkm::Float32 y0 = startY + height * v0; + vtkm::Float32 y1 = startY + height * v1; glColor3f(c0.Components[0], c0.Components[1], c0.Components[2]); - glVertex2f(x0,y1); - glVertex2f(x1,y1); + glVertex2f(x0, y1); + glVertex2f(x1, y1); glColor3f(c1.Components[0], c1.Components[1], c1.Components[2]); - glVertex2f(x1,y0); - glVertex2f(x0,y0); + glVertex2f(x1, y0); + glVertex2f(x0, y0); } } glEnd(); } -void CanvasGL::AddText(const vtkm::Vec &position, - vtkm::Float32 scale, - vtkm::Float32 angle, - vtkm::Float32 windowAspect, - const vtkm::Vec &anchor, - const vtkm::rendering::Color & color, - const std::string &text) const +void CanvasGL::AddText(const vtkm::Vec& position, vtkm::Float32 scale, + vtkm::Float32 angle, vtkm::Float32 windowAspect, + const vtkm::Vec& anchor, + const vtkm::rendering::Color& color, const std::string& text) const { glPushMatrix(); - glTranslatef(position[0],position[1],0); - glScalef(1.f/windowAspect, 1, 1); - glRotatef(angle, 0,0,1); + glTranslatef(position[0], position[1], 0); + glScalef(1.f / windowAspect, 1, 1); + glRotatef(angle, 0, 0, 1); glColor3f(color.Components[0], color.Components[1], color.Components[2]); this->RenderText(scale, anchor, text); glPopMatrix(); } -vtkm::rendering::WorldAnnotator * -CanvasGL::CreateWorldAnnotator() const +vtkm::rendering::WorldAnnotator* CanvasGL::CreateWorldAnnotator() const { return new vtkm::rendering::WorldAnnotatorGL; } -void CanvasGL::RenderText(vtkm::Float32 scale, - const vtkm::Vec &anchor, - const std::string &text) const +void CanvasGL::RenderText(vtkm::Float32 scale, const vtkm::Vec& anchor, + const std::string& text) const { if (!this->FontTexture.Valid()) { @@ -267,25 +248,21 @@ void CanvasGL::RenderText(vtkm::Float32 scale, // use it. Although technically we are changing the state, the logical // state does not change, so we go ahead and do it in this const // function. - vtkm::rendering::CanvasGL *self = - const_cast(this); + vtkm::rendering::CanvasGL* self = const_cast(this); self->Font = BitmapFontFactory::CreateLiberation2Sans(); - const std::vector &rawpngdata = - this->Font.GetRawImageData(); + const std::vector& rawpngdata = this->Font.GetRawImageData(); std::vector rgba; unsigned long width, height; - int error = vtkm::rendering::DecodePNG(rgba, width, height, - &rawpngdata[0], rawpngdata.size()); + int error = vtkm::rendering::DecodePNG(rgba, width, height, &rawpngdata[0], rawpngdata.size()); if (error != 0) { return; } - self->FontTexture.CreateAlphaFromRGBA(int(width),int(height),rgba); + self->FontTexture.CreateAlphaFromRGBA(int(width), int(height), rgba); } - this->FontTexture.Enable(); glDepthMask(GL_FALSE); @@ -299,31 +276,29 @@ void CanvasGL::RenderText(vtkm::Float32 scale, vtkm::Float32 textwidth = this->Font.GetTextWidth(text); - vtkm::Float32 fx = -(.5f + .5f*anchor[0]) * textwidth; - vtkm::Float32 fy = -(.5f + .5f*anchor[1]); + vtkm::Float32 fx = -(.5f + .5f * anchor[0]) * textwidth; + vtkm::Float32 fy = -(.5f + .5f * anchor[1]); vtkm::Float32 fz = 0; - for (unsigned int i=0; iFont.GetCharPolygon(c, fx, fy, - vl, vr, vt, vb, - tl, tr, tt, tb, nextchar); + vtkm::Float32 vl, vr, vt, vb; + vtkm::Float32 tl, tr, tt, tb; + this->Font.GetCharPolygon(c, fx, fy, vl, vr, vt, vb, tl, tr, tt, tb, nextchar); - glTexCoord2f(tl, 1.f-tt); - glVertex3f(scale*vl, scale*vt, fz); + glTexCoord2f(tl, 1.f - tt); + glVertex3f(scale * vl, scale * vt, fz); - glTexCoord2f(tl, 1.f-tb); - glVertex3f(scale*vl, scale*vb, fz); + glTexCoord2f(tl, 1.f - tb); + glVertex3f(scale * vl, scale * vb, fz); - glTexCoord2f(tr, 1.f-tb); - glVertex3f(scale*vr, scale*vb, fz); + glTexCoord2f(tr, 1.f - tb); + glVertex3f(scale * vr, scale * vb, fz); - glTexCoord2f(tr, 1.f-tt); - glVertex3f(scale*vr, scale*vt, fz); + glTexCoord2f(tr, 1.f - tt); + glVertex3f(scale * vr, scale * vt, fz); } glEnd(); @@ -334,6 +309,5 @@ void CanvasGL::RenderText(vtkm::Float32 scale, glDepthMask(GL_TRUE); glDisable(GL_ALPHA_TEST); } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/CanvasGL.h b/vtkm/rendering/CanvasGL.h index 5a36b28ec..e3db9911e 100644 --- a/vtkm/rendering/CanvasGL.h +++ b/vtkm/rendering/CanvasGL.h @@ -26,14 +26,15 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT CanvasGL : public Canvas { public: - CanvasGL(vtkm::Id width=1024, - vtkm::Id height=1024); + CanvasGL(vtkm::Id width = 1024, vtkm::Id height = 1024); ~CanvasGL(); @@ -45,51 +46,39 @@ public: void Finish() VTKM_OVERRIDE; - vtkm::rendering::Canvas *NewCopy() const VTKM_OVERRIDE; + vtkm::rendering::Canvas* NewCopy() const VTKM_OVERRIDE; - void SetViewToWorldSpace(const vtkm::rendering::Camera &camera, - bool clip) VTKM_OVERRIDE; + void SetViewToWorldSpace(const vtkm::rendering::Camera& camera, bool clip) VTKM_OVERRIDE; - void SetViewToScreenSpace(const vtkm::rendering::Camera &camera, - bool clip) VTKM_OVERRIDE; + void SetViewToScreenSpace(const vtkm::rendering::Camera& camera, bool clip) VTKM_OVERRIDE; - void SetViewportClipping(const vtkm::rendering::Camera &camera, - bool clip) VTKM_OVERRIDE; + void SetViewportClipping(const vtkm::rendering::Camera& camera, bool clip) VTKM_OVERRIDE; void RefreshColorBuffer() const VTKM_OVERRIDE; virtual void RefreshDepthBuffer() const VTKM_OVERRIDE; - void AddLine(const vtkm::Vec &point0, - const vtkm::Vec &point1, - vtkm::Float32 linewidth, - const vtkm::rendering::Color &color) const VTKM_OVERRIDE; + void AddLine(const vtkm::Vec& point0, const vtkm::Vec& point1, + vtkm::Float32 linewidth, const vtkm::rendering::Color& color) const VTKM_OVERRIDE; - void AddColorBar(const vtkm::Bounds &bounds, - const vtkm::rendering::ColorTable &colorTable, + void AddColorBar(const vtkm::Bounds& bounds, const vtkm::rendering::ColorTable& colorTable, bool horizontal) const VTKM_OVERRIDE; + void AddText(const vtkm::Vec& position, vtkm::Float32 scale, + vtkm::Float32 angle, vtkm::Float32 windowAspect, + const vtkm::Vec& anchor, const vtkm::rendering::Color& color, + const std::string& text) const VTKM_OVERRIDE; - void AddText(const vtkm::Vec &position, - vtkm::Float32 scale, - vtkm::Float32 angle, - vtkm::Float32 windowAspect, - const vtkm::Vec &anchor, - const vtkm::rendering::Color & color, - const std::string &text) const VTKM_OVERRIDE; - - - vtkm::rendering::WorldAnnotator *CreateWorldAnnotator() const VTKM_OVERRIDE; + vtkm::rendering::WorldAnnotator* CreateWorldAnnotator() const VTKM_OVERRIDE; private: vtkm::rendering::BitmapFont Font; vtkm::rendering::TextureGL FontTexture; - void RenderText(vtkm::Float32 scale, - const vtkm::Vec &anchor, - const std::string &text) const; + void RenderText(vtkm::Float32 scale, const vtkm::Vec& anchor, + const std::string& text) const; }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif //vtk_m_rendering_CanvasGL_h diff --git a/vtkm/rendering/CanvasOSMesa.cxx b/vtkm/rendering/CanvasOSMesa.cxx index e448c388e..6c5a17213 100644 --- a/vtkm/rendering/CanvasOSMesa.cxx +++ b/vtkm/rendering/CanvasOSMesa.cxx @@ -37,10 +37,13 @@ #endif #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -namespace detail { +namespace detail +{ struct CanvasOSMesaInternals { @@ -50,8 +53,8 @@ struct CanvasOSMesaInternals } // namespace detail CanvasOSMesa::CanvasOSMesa(vtkm::Id width, vtkm::Id height) - : CanvasGL(width,height), - Internals(new detail::CanvasOSMesaInternals) + : CanvasGL(width, height) + , Internals(new detail::CanvasOSMesaInternals) { this->Internals->Context = nullptr; this->ResizeBuffers(width, height); @@ -63,25 +66,19 @@ CanvasOSMesa::~CanvasOSMesa() void CanvasOSMesa::Initialize() { - this->Internals->Context = - OSMesaCreateContextExt(OSMESA_RGBA, 32, 0, 0, nullptr); + this->Internals->Context = OSMesaCreateContextExt(OSMESA_RGBA, 32, 0, 0, nullptr); if (!this->Internals->Context) { throw vtkm::cont::ErrorBadValue("OSMesa context creation failed."); } - vtkm::Vec *colorBuffer = - this->GetColorBuffer().GetStorage().GetArray(); - if (!OSMesaMakeCurrent(this->Internals->Context, - reinterpret_cast(colorBuffer), - GL_FLOAT, - static_cast(this->GetWidth()), + vtkm::Vec* colorBuffer = this->GetColorBuffer().GetStorage().GetArray(); + if (!OSMesaMakeCurrent(this->Internals->Context, reinterpret_cast(colorBuffer), + GL_FLOAT, static_cast(this->GetWidth()), static_cast(this->GetHeight()))) { throw vtkm::cont::ErrorBadValue("OSMesa context activation failed."); } - - } void CanvasOSMesa::RefreshColorBuffer() const @@ -99,7 +96,7 @@ void CanvasOSMesa::Finish() { this->CanvasGL::Finish(); - // This is disabled because it is handled in RefreshDepthBuffer +// This is disabled because it is handled in RefreshDepthBuffer #if 0 //Copy zbuff into floating point array. unsigned int *raw_zbuff; @@ -123,10 +120,9 @@ void CanvasOSMesa::Finish() #endif } -vtkm::rendering::Canvas *CanvasOSMesa::NewCopy() const +vtkm::rendering::Canvas* CanvasOSMesa::NewCopy() const { return new vtkm::rendering::CanvasOSMesa(*this); } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/CanvasOSMesa.h b/vtkm/rendering/CanvasOSMesa.h index 8c58bf16e..9c07f3733 100644 --- a/vtkm/rendering/CanvasOSMesa.h +++ b/vtkm/rendering/CanvasOSMesa.h @@ -26,10 +26,13 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -namespace detail { +namespace detail +{ struct CanvasOSMesaInternals; @@ -38,8 +41,7 @@ struct CanvasOSMesaInternals; class VTKM_RENDERING_EXPORT CanvasOSMesa : public CanvasGL { public: - CanvasOSMesa(vtkm::Id width=1024, - vtkm::Id height=1024); + CanvasOSMesa(vtkm::Id width = 1024, vtkm::Id height = 1024); ~CanvasOSMesa(); @@ -51,12 +53,12 @@ public: virtual void Finish() VTKM_OVERRIDE; - vtkm::rendering::Canvas *NewCopy() const VTKM_OVERRIDE; + vtkm::rendering::Canvas* NewCopy() const VTKM_OVERRIDE; private: std::shared_ptr Internals; }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif //vtk_m_rendering_CanvasOSMesa_h diff --git a/vtkm/rendering/CanvasRayTracer.cxx b/vtkm/rendering/CanvasRayTracer.cxx index 24abbca07..24fdfdb78 100644 --- a/vtkm/rendering/CanvasRayTracer.cxx +++ b/vtkm/rendering/CanvasRayTracer.cxx @@ -27,24 +27,28 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -namespace internal { +namespace internal +{ class ClearBuffers : public vtkm::worklet::WorkletMapField { vtkm::rendering::Color ClearColor; + public: VTKM_CONT - ClearBuffers(const vtkm::rendering::Color &clearColor) + ClearBuffers(const vtkm::rendering::Color& clearColor) : ClearColor(clearColor) - {} + { + } typedef void ControlSignature(FieldOut<>, FieldOut<>); typedef void ExecutionSignature(_1, _2); VTKM_EXEC - void operator()(vtkm::Vec &color, - vtkm::Float32 &depth) const + void operator()(vtkm::Vec& color, vtkm::Float32& depth) const { color = this->ClearColor.Components; depth = 1.001f; @@ -61,23 +65,21 @@ struct ClearBuffersInvokeFunctor DepthBufferType DepthBuffer; VTKM_CONT - ClearBuffersInvokeFunctor(const vtkm::rendering::Color &backgroundColor, - const ColorBufferType &colorBuffer, - const DepthBufferType &depthBuffer) - : Worklet(backgroundColor), - ColorBuffer(colorBuffer), - DepthBuffer(depthBuffer) - { } + ClearBuffersInvokeFunctor(const vtkm::rendering::Color& backgroundColor, + const ColorBufferType& colorBuffer, const DepthBufferType& depthBuffer) + : Worklet(backgroundColor) + , ColorBuffer(colorBuffer) + , DepthBuffer(depthBuffer) + { + } - template - VTKM_CONT - bool operator()(Device) const + template + VTKM_CONT bool operator()(Device) const { VTKM_IS_DEVICE_ADAPTER_TAG(Device); - vtkm::worklet::DispatcherMapField - dispatcher(this->Worklet); - dispatcher.Invoke( this->ColorBuffer, this->DepthBuffer); + vtkm::worklet::DispatcherMapField dispatcher(this->Worklet); + dispatcher.Invoke(this->ColorBuffer, this->DepthBuffer); return true; } }; @@ -86,10 +88,12 @@ struct ClearBuffersInvokeFunctor CanvasRayTracer::CanvasRayTracer(vtkm::Id width, vtkm::Id height) : Canvas(width, height) -{ } +{ +} CanvasRayTracer::~CanvasRayTracer() -{ } +{ +} void CanvasRayTracer::Initialize() { @@ -110,42 +114,33 @@ void CanvasRayTracer::Clear() { // TODO: Should the rendering library support policies or some other way to // configure with custom devices? - vtkm::cont::TryExecute( - internal::ClearBuffersInvokeFunctor(this->GetBackgroundColor(), - this->GetColorBuffer(), - this->GetDepthBuffer())); + vtkm::cont::TryExecute(internal::ClearBuffersInvokeFunctor( + this->GetBackgroundColor(), this->GetColorBuffer(), this->GetDepthBuffer())); } -vtkm::rendering::Canvas *CanvasRayTracer::NewCopy() const +vtkm::rendering::Canvas* CanvasRayTracer::NewCopy() const { return new vtkm::rendering::CanvasRayTracer(*this); } -void CanvasRayTracer::AddLine(const vtkm::Vec &, - const vtkm::Vec &, - vtkm::Float32, - const vtkm::rendering::Color &) const +void CanvasRayTracer::AddLine(const vtkm::Vec&, + const vtkm::Vec&, vtkm::Float32, + const vtkm::rendering::Color&) const { // Not implemented } -void CanvasRayTracer::AddColorBar(const vtkm::Bounds &, - const vtkm::rendering::ColorTable &, - bool ) const +void CanvasRayTracer::AddColorBar(const vtkm::Bounds&, const vtkm::rendering::ColorTable&, + bool) const { // Not implemented } -void CanvasRayTracer::AddText(const vtkm::Vec &, - vtkm::Float32, - vtkm::Float32, - vtkm::Float32, - const vtkm::Vec &, - const vtkm::rendering::Color &, - const std::string &) const +void CanvasRayTracer::AddText(const vtkm::Vec&, vtkm::Float32, vtkm::Float32, + vtkm::Float32, const vtkm::Vec&, + const vtkm::rendering::Color&, const std::string&) const { // Not implemented } - } } diff --git a/vtkm/rendering/CanvasRayTracer.h b/vtkm/rendering/CanvasRayTracer.h index d21adef72..2933c4a7f 100644 --- a/vtkm/rendering/CanvasRayTracer.h +++ b/vtkm/rendering/CanvasRayTracer.h @@ -24,14 +24,15 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT CanvasRayTracer : public Canvas { public: - CanvasRayTracer(vtkm::Id width=1024, - vtkm::Id height=1024); + CanvasRayTracer(vtkm::Id width = 1024, vtkm::Id height = 1024); ~CanvasRayTracer(); @@ -43,27 +44,20 @@ public: void Clear() VTKM_OVERRIDE; - vtkm::rendering::Canvas *NewCopy() const VTKM_OVERRIDE; + vtkm::rendering::Canvas* NewCopy() const VTKM_OVERRIDE; - void AddLine(const vtkm::Vec &point0, - const vtkm::Vec &point1, - vtkm::Float32 linewidth, - const vtkm::rendering::Color &color) const VTKM_OVERRIDE; + void AddLine(const vtkm::Vec& point0, const vtkm::Vec& point1, + vtkm::Float32 linewidth, const vtkm::rendering::Color& color) const VTKM_OVERRIDE; - void AddColorBar(const vtkm::Bounds &bounds, - const vtkm::rendering::ColorTable &colorTable, + void AddColorBar(const vtkm::Bounds& bounds, const vtkm::rendering::ColorTable& colorTable, bool horizontal) const VTKM_OVERRIDE; - - void AddText(const vtkm::Vec &position, - vtkm::Float32 scale, - vtkm::Float32 angle, - vtkm::Float32 windowAspect, - const vtkm::Vec &anchor, - const vtkm::rendering::Color & color, - const std::string &text) const VTKM_OVERRIDE; + void AddText(const vtkm::Vec& position, vtkm::Float32 scale, + vtkm::Float32 angle, vtkm::Float32 windowAspect, + const vtkm::Vec& anchor, const vtkm::rendering::Color& color, + const std::string& text) const VTKM_OVERRIDE; }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif //vtk_m_rendering_CanvasRayTracer_h diff --git a/vtkm/rendering/Color.cxx b/vtkm/rendering/Color.cxx index 08a0b2dc7..39e673049 100644 --- a/vtkm/rendering/Color.cxx +++ b/vtkm/rendering/Color.cxx @@ -20,29 +20,30 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -vtkm::rendering::Color vtkm::rendering::Color::black(0,0,0,1); -vtkm::rendering::Color vtkm::rendering::Color::white(1,1,1,1); +vtkm::rendering::Color vtkm::rendering::Color::black(0, 0, 0, 1); +vtkm::rendering::Color vtkm::rendering::Color::white(1, 1, 1, 1); -vtkm::rendering::Color vtkm::rendering::Color::red(1,0,0,1); -vtkm::rendering::Color vtkm::rendering::Color::green(0,1,0,1); -vtkm::rendering::Color vtkm::rendering::Color::blue(0,0,1,1); +vtkm::rendering::Color vtkm::rendering::Color::red(1, 0, 0, 1); +vtkm::rendering::Color vtkm::rendering::Color::green(0, 1, 0, 1); +vtkm::rendering::Color vtkm::rendering::Color::blue(0, 0, 1, 1); -vtkm::rendering::Color vtkm::rendering::Color::cyan(0,1,1,1); -vtkm::rendering::Color vtkm::rendering::Color::magenta(1,0,1,1); -vtkm::rendering::Color vtkm::rendering::Color::yellow(1,1,0,1); - -vtkm::rendering::Color vtkm::rendering::Color::gray10(.1f,.1f,.1f,1); -vtkm::rendering::Color vtkm::rendering::Color::gray20(.2f,.2f,.2f,1); -vtkm::rendering::Color vtkm::rendering::Color::gray30(.3f,.3f,.3f,1); -vtkm::rendering::Color vtkm::rendering::Color::gray40(.4f,.4f,.4f,1); -vtkm::rendering::Color vtkm::rendering::Color::gray50(.5f,.5f,.5f,1); -vtkm::rendering::Color vtkm::rendering::Color::gray60(.6f,.6f,.6f,1); -vtkm::rendering::Color vtkm::rendering::Color::gray70(.7f,.7f,.7f,1); -vtkm::rendering::Color vtkm::rendering::Color::gray80(.8f,.8f,.8f,1); -vtkm::rendering::Color vtkm::rendering::Color::gray90(.9f,.9f,.9f,1); +vtkm::rendering::Color vtkm::rendering::Color::cyan(0, 1, 1, 1); +vtkm::rendering::Color vtkm::rendering::Color::magenta(1, 0, 1, 1); +vtkm::rendering::Color vtkm::rendering::Color::yellow(1, 1, 0, 1); +vtkm::rendering::Color vtkm::rendering::Color::gray10(.1f, .1f, .1f, 1); +vtkm::rendering::Color vtkm::rendering::Color::gray20(.2f, .2f, .2f, 1); +vtkm::rendering::Color vtkm::rendering::Color::gray30(.3f, .3f, .3f, 1); +vtkm::rendering::Color vtkm::rendering::Color::gray40(.4f, .4f, .4f, 1); +vtkm::rendering::Color vtkm::rendering::Color::gray50(.5f, .5f, .5f, 1); +vtkm::rendering::Color vtkm::rendering::Color::gray60(.6f, .6f, .6f, 1); +vtkm::rendering::Color vtkm::rendering::Color::gray70(.7f, .7f, .7f, 1); +vtkm::rendering::Color vtkm::rendering::Color::gray80(.8f, .8f, .8f, 1); +vtkm::rendering::Color vtkm::rendering::Color::gray90(.9f, .9f, .9f, 1); } } // namespace vtkm::rendering diff --git a/vtkm/rendering/Color.h b/vtkm/rendering/Color.h index 0f43c0bd2..72c16b9ab 100644 --- a/vtkm/rendering/Color.h +++ b/vtkm/rendering/Color.h @@ -22,8 +22,10 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ /// \brief It's a color! /// @@ -33,111 +35,111 @@ namespace rendering { /// class Color { - public: - vtkm::Vec Components; +public: + vtkm::Vec Components; - VTKM_EXEC_CONT - Color() - : Components(0, 0, 0, 1) - { } + VTKM_EXEC_CONT + Color() + : Components(0, 0, 0, 1) + { + } - VTKM_EXEC_CONT - Color(vtkm::Float32 r_, - vtkm::Float32 g_, - vtkm::Float32 b_, - vtkm::Float32 a_ = 1.f) - : Components(r_, g_, b_, a_) - { } + VTKM_EXEC_CONT + Color(vtkm::Float32 r_, vtkm::Float32 g_, vtkm::Float32 b_, vtkm::Float32 a_ = 1.f) + : Components(r_, g_, b_, a_) + { + } - VTKM_EXEC_CONT - Color(const vtkm::Vec &components) - : Components(components) - { } + VTKM_EXEC_CONT + Color(const vtkm::Vec& components) + : Components(components) + { + } - VTKM_EXEC_CONT - void SetComponentFromByte(vtkm::Int32 i, vtkm::UInt8 v) - { - // Note that though GetComponentAsByte below - // multiplies by 256, we're dividing by 255. here. - // This is, believe it or not, still correct. - // That's partly because we always round down in - // that method. For example, if we set the float - // here using byte(1), /255 gives us .00392, which - // *256 gives us 1.0035, which is then rounded back - // down to byte(1) below. Or, if we set the float - // here using byte(254), /255 gives us .99608, which - // *256 gives us 254.996, which is then rounded - // back down to 254 below. So it actually reverses - // correctly, even though the mutliplier and - // divider don't match between these two methods. - // - // Of course, converting in GetComponentAsByte from - // 1.0 gives 256, so we need to still clamp to 255 - // anyway. Again, this is not a problem, because it - // doesn't really extend the range of floating point - // values which map to 255. - Components[i] = static_cast(v) / 255.f; - // clamp? - if (Components[i]<0) Components[i] = 0; - if (Components[i]>1) Components[i] = 1; - } + VTKM_EXEC_CONT + void SetComponentFromByte(vtkm::Int32 i, vtkm::UInt8 v) + { + // Note that though GetComponentAsByte below + // multiplies by 256, we're dividing by 255. here. + // This is, believe it or not, still correct. + // That's partly because we always round down in + // that method. For example, if we set the float + // here using byte(1), /255 gives us .00392, which + // *256 gives us 1.0035, which is then rounded back + // down to byte(1) below. Or, if we set the float + // here using byte(254), /255 gives us .99608, which + // *256 gives us 254.996, which is then rounded + // back down to 254 below. So it actually reverses + // correctly, even though the mutliplier and + // divider don't match between these two methods. + // + // Of course, converting in GetComponentAsByte from + // 1.0 gives 256, so we need to still clamp to 255 + // anyway. Again, this is not a problem, because it + // doesn't really extend the range of floating point + // values which map to 255. + Components[i] = static_cast(v) / 255.f; + // clamp? + if (Components[i] < 0) + Components[i] = 0; + if (Components[i] > 1) + Components[i] = 1; + } - VTKM_EXEC_CONT - vtkm::UInt8 GetComponentAsByte(int i) - { - // We need this to match what OpenGL/Mesa do. - // Why? Well, we need to set glClearColor - // using floats, but the frame buffer comes - // back as bytes (and is internally such) in - // most cases. In one example -- parallel - // compositing -- we need the byte values - // returned from here to match the byte values - // returned in the frame buffer. Though - // a quick source code inspection of Mesa - // led me to believe I should do *255., in - // fact this led to a mismatch. *256. was - // actually closer. (And arguably more correct - // if you think the byte value 255 should share - // approximately the same range in the float [0,1] - // space as the other byte values.) Note in the - // inverse method above, though, we still use 255; - // see SetComponentFromByte for an explanation of - // why that is correct, if non-obvious. + VTKM_EXEC_CONT + vtkm::UInt8 GetComponentAsByte(int i) + { + // We need this to match what OpenGL/Mesa do. + // Why? Well, we need to set glClearColor + // using floats, but the frame buffer comes + // back as bytes (and is internally such) in + // most cases. In one example -- parallel + // compositing -- we need the byte values + // returned from here to match the byte values + // returned in the frame buffer. Though + // a quick source code inspection of Mesa + // led me to believe I should do *255., in + // fact this led to a mismatch. *256. was + // actually closer. (And arguably more correct + // if you think the byte value 255 should share + // approximately the same range in the float [0,1] + // space as the other byte values.) Note in the + // inverse method above, though, we still use 255; + // see SetComponentFromByte for an explanation of + // why that is correct, if non-obvious. - int tv = vtkm::Int32(Components[i] * 256.f); - // Converting even from valid values (i.e 1.0) - // can give a result outside the range (i.e. 256), - // but we have to clamp anyway. - return vtkm::UInt8((tv < 0) ? 0 : (tv > 255) ? 255 : tv); - } + int tv = vtkm::Int32(Components[i] * 256.f); + // Converting even from valid values (i.e 1.0) + // can give a result outside the range (i.e. 256), + // but we have to clamp anyway. + return vtkm::UInt8((tv < 0) ? 0 : (tv > 255) ? 255 : tv); + } - VTKM_EXEC_CONT - void GetRGBA(vtkm::UInt8 &r, vtkm::UInt8 &g, - vtkm::UInt8 &b, vtkm::UInt8 &a) - { - r = GetComponentAsByte(0); - g = GetComponentAsByte(1); - b = GetComponentAsByte(2); - a = GetComponentAsByte(3); - } + VTKM_EXEC_CONT + void GetRGBA(vtkm::UInt8& r, vtkm::UInt8& g, vtkm::UInt8& b, vtkm::UInt8& a) + { + r = GetComponentAsByte(0); + g = GetComponentAsByte(1); + b = GetComponentAsByte(2); + a = GetComponentAsByte(3); + } - VTKM_EXEC_CONT - vtkm::Float64 RawBrightness() - { - return (Components[0]+Components[1]+Components[2])/3.; - } + VTKM_EXEC_CONT + vtkm::Float64 RawBrightness() { return (Components[0] + Components[1] + Components[2]) / 3.; } - VTKM_CONT - friend std::ostream &operator<<(std::ostream &out, const Color &c) - { - out << "["< -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ ColorBarAnnotation::ColorBarAnnotation() -{ } +{ +} ColorBarAnnotation::~ColorBarAnnotation() -{ } +{ +} -void ColorBarAnnotation::SetRange(const vtkm::Range &range, - vtkm::IdComponent numTicks) +void ColorBarAnnotation::SetRange(const vtkm::Range& range, vtkm::IdComponent numTicks) { std::vector positions, proportions; this->Axis.SetMinorTicks(positions, proportions); // clear any minor ticks - for (vtkm::IdComponent i=0; i(i) / static_cast(numTicks-1); - vtkm::Float64 pos = range.Min + prop*range.Length(); + vtkm::Float64 prop = static_cast(i) / static_cast(numTicks - 1); + vtkm::Float64 pos = range.Min + prop * range.Length(); positions.push_back(pos); proportions.push_back(prop); } this->Axis.SetMajorTicks(positions, proportions); } -void ColorBarAnnotation::Render( - const vtkm::rendering::Camera &camera, - const vtkm::rendering::WorldAnnotator &worldAnnotator, - vtkm::rendering::Canvas &canvas) +void ColorBarAnnotation::Render(const vtkm::rendering::Camera& camera, + const vtkm::rendering::WorldAnnotator& worldAnnotator, + vtkm::rendering::Canvas& canvas) { - vtkm::Bounds bounds(vtkm::Range(-0.88, +0.88), - vtkm::Range(+0.87, +0.92), - vtkm::Range(0, 0)); + vtkm::Bounds bounds(vtkm::Range(-0.88, +0.88), vtkm::Range(+0.87, +0.92), vtkm::Range(0, 0)); canvas.AddColorBar(bounds, this->ColorTable, true); - this->Axis.SetColor(vtkm::rendering::Color(1,1,1)); + this->Axis.SetColor(vtkm::rendering::Color(1, 1, 1)); this->Axis.SetLineWidth(1); - this->Axis.SetScreenPosition(bounds.X.Min, bounds.Y.Min, - bounds.X.Max, bounds.Y.Min); + this->Axis.SetScreenPosition(bounds.X.Min, bounds.Y.Min, bounds.X.Max, bounds.Y.Min); this->Axis.SetMajorTickSize(0, .02, 1.0); - this->Axis.SetMinorTickSize(0,0,0); // no minor ticks - this->Axis.SetLabelAlignment(TextAnnotation::HCenter, - TextAnnotation::Top); + this->Axis.SetMinorTickSize(0, 0, 0); // no minor ticks + this->Axis.SetLabelAlignment(TextAnnotation::HCenter, TextAnnotation::Top); this->Axis.Render(camera, worldAnnotator, canvas); } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/ColorBarAnnotation.h b/vtkm/rendering/ColorBarAnnotation.h index e6b4cc138..318b3a8b7 100644 --- a/vtkm/rendering/ColorBarAnnotation.h +++ b/vtkm/rendering/ColorBarAnnotation.h @@ -28,9 +28,10 @@ #include #include - -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT ColorBarAnnotation { @@ -44,24 +45,24 @@ public: virtual ~ColorBarAnnotation(); VTKM_CONT - void SetColorTable(const vtkm::rendering::ColorTable &colorTable) + void SetColorTable(const vtkm::rendering::ColorTable& colorTable) { this->ColorTable = colorTable; } - void SetRange(const vtkm::Range &range, vtkm::IdComponent numTicks); + void SetRange(const vtkm::Range& range, vtkm::IdComponent numTicks); VTKM_CONT void SetRange(vtkm::Float64 l, vtkm::Float64 h, vtkm::IdComponent numTicks) { - this->SetRange(vtkm::Range(l,h), numTicks); + this->SetRange(vtkm::Range(l, h), numTicks); } - virtual void Render(const vtkm::rendering::Camera &camera, - const vtkm::rendering::WorldAnnotator &worldAnnotator, - vtkm::rendering::Canvas &canvas); + virtual void Render(const vtkm::rendering::Camera& camera, + const vtkm::rendering::WorldAnnotator& worldAnnotator, + vtkm::rendering::Canvas& canvas); }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif // vtk_m_rendering_ColorBarAnnotation_h diff --git a/vtkm/rendering/ColorTable.cxx b/vtkm/rendering/ColorTable.cxx index a915149e0..9706e54c8 100644 --- a/vtkm/rendering/ColorTable.cxx +++ b/vtkm/rendering/ColorTable.cxx @@ -23,29 +23,34 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -namespace detail { +namespace detail +{ struct ColorControlPoint { vtkm::Float32 Position; vtkm::rendering::Color RGBA; - ColorControlPoint(vtkm::Float32 position, - const vtkm::rendering::Color &rgba) - : Position(position), RGBA(rgba) - { } + ColorControlPoint(vtkm::Float32 position, const vtkm::rendering::Color& rgba) + : Position(position) + , RGBA(rgba) + { + } }; struct AlphaControlPoint { vtkm::Float32 Position; vtkm::Float32 AlphaValue; - AlphaControlPoint(vtkm::Float32 position, - const vtkm::Float32 &alphaValue) - : Position(position), AlphaValue(alphaValue) - { } + AlphaControlPoint(vtkm::Float32 position, const vtkm::Float32& alphaValue) + : Position(position) + , AlphaValue(alphaValue) + { + } }; struct ColorTableInternals @@ -65,7 +70,7 @@ ColorTable::ColorTable() this->Internals->Smooth = false; } -const std::string &ColorTable::GetName() const +const std::string& ColorTable::GetName() const { return this->Internals->UniqueName; } @@ -75,21 +80,20 @@ bool ColorTable::GetSmooth() const return this->Internals->Smooth; } -void ColorTable::Sample( - int numSamples, - vtkm::cont::ArrayHandle > &colors) const +void ColorTable::Sample(int numSamples, + vtkm::cont::ArrayHandle>& colors) const { colors.Allocate(numSamples); - for (vtkm::Id i=0; i color; - Color c = MapRGB(static_cast(i)/static_cast(numSamples-1)); + vtkm::Vec color; + Color c = MapRGB(static_cast(i) / static_cast(numSamples - 1)); color[0] = c.Components[0]; color[1] = c.Components[1]; color[2] = c.Components[2]; - color[3] = MapAlpha(static_cast(i)/static_cast(numSamples-1)); - colors.GetPortalControl().Set(i,color); + color[3] = MapAlpha(static_cast(i) / static_cast(numSamples - 1)); + colors.GetPortalControl().Set(i, color); } } @@ -100,8 +104,7 @@ vtkm::rendering::Color ColorTable::MapRGB(vtkm::Float32 scalar) const { return Color(0.5f, 0.5f, 0.5f); } - if ((numControlPoints == 1) || - (scalar <= this->Internals->RGBPoints[0].Position)) + if ((numControlPoints == 1) || (scalar <= this->Internals->RGBPoints[0].Position)) { return this->Internals->RGBPoints[0].RGBA; } @@ -111,9 +114,7 @@ vtkm::rendering::Color ColorTable::MapRGB(vtkm::Float32 scalar) const } std::size_t secondColorIndex; - for (secondColorIndex = 1; - secondColorIndex < numControlPoints - 1; - secondColorIndex++) + for (secondColorIndex = 1; secondColorIndex < numControlPoints - 1; secondColorIndex++) { if (scalar < this->Internals->RGBPoints[secondColorIndex].Position) { @@ -122,9 +123,8 @@ vtkm::rendering::Color ColorTable::MapRGB(vtkm::Float32 scalar) const } std::size_t firstColorIndex = secondColorIndex - 1; - vtkm::Float32 seg = - this->Internals->RGBPoints[secondColorIndex].Position - - this->Internals->RGBPoints[firstColorIndex].Position; + vtkm::Float32 seg = this->Internals->RGBPoints[secondColorIndex].Position - + this->Internals->RGBPoints[firstColorIndex].Position; vtkm::Float32 alpha; if (seg == 0.f) { @@ -132,17 +132,15 @@ vtkm::rendering::Color ColorTable::MapRGB(vtkm::Float32 scalar) const } else { - alpha = (scalar - this->Internals->RGBPoints[firstColorIndex].Position)/seg; + alpha = (scalar - this->Internals->RGBPoints[firstColorIndex].Position) / seg; } - const vtkm::rendering::Color &firstColor = - this->Internals->RGBPoints[firstColorIndex].RGBA; - const vtkm::rendering::Color &secondColor = - this->Internals->RGBPoints[secondColorIndex].RGBA; + const vtkm::rendering::Color& firstColor = this->Internals->RGBPoints[firstColorIndex].RGBA; + const vtkm::rendering::Color& secondColor = this->Internals->RGBPoints[secondColorIndex].RGBA; if (this->Internals->Smooth) { - return vtkm::rendering::Color( - firstColor.Components*(1.0f-alpha) + secondColor.Components*alpha); + return vtkm::rendering::Color(firstColor.Components * (1.0f - alpha) + + secondColor.Components * alpha); } else { @@ -165,20 +163,17 @@ vtkm::Float32 ColorTable::MapAlpha(vtkm::Float32 scalar) const { return 1.f; } - if ((numControlPoints == 1) || - (scalar <= this->Internals->AlphaPoints[0].Position)) + if ((numControlPoints == 1) || (scalar <= this->Internals->AlphaPoints[0].Position)) { return this->Internals->AlphaPoints[0].AlphaValue; } - if (scalar >= this->Internals->AlphaPoints[numControlPoints-1].Position) + if (scalar >= this->Internals->AlphaPoints[numControlPoints - 1].Position) { - return this->Internals->AlphaPoints[numControlPoints-1].AlphaValue; + return this->Internals->AlphaPoints[numControlPoints - 1].AlphaValue; } std::size_t secondColorIndex; - for (secondColorIndex=1; - secondColorIndexInternals->AlphaPoints[secondColorIndex].Position) { @@ -187,7 +182,8 @@ vtkm::Float32 ColorTable::MapAlpha(vtkm::Float32 scalar) const } std::size_t firstColorIndex = secondColorIndex - 1; - vtkm::Float32 seg = this->Internals->AlphaPoints[secondColorIndex].Position-this->Internals->AlphaPoints[firstColorIndex].Position; + vtkm::Float32 seg = this->Internals->AlphaPoints[secondColorIndex].Position - + this->Internals->AlphaPoints[firstColorIndex].Position; vtkm::Float32 alpha; if (seg == 0.f) { @@ -195,16 +191,14 @@ vtkm::Float32 ColorTable::MapAlpha(vtkm::Float32 scalar) const } else { - alpha = (scalar - this->Internals->AlphaPoints[firstColorIndex].Position)/seg; + alpha = (scalar - this->Internals->AlphaPoints[firstColorIndex].Position) / seg; } - vtkm::Float32 firstAlpha = - this->Internals->AlphaPoints[firstColorIndex].AlphaValue; - vtkm::Float32 secondAlpha = - this->Internals->AlphaPoints[secondColorIndex].AlphaValue; + vtkm::Float32 firstAlpha = this->Internals->AlphaPoints[firstColorIndex].AlphaValue; + vtkm::Float32 secondAlpha = this->Internals->AlphaPoints[secondColorIndex].AlphaValue; if (this->Internals->Smooth) { - return (firstAlpha * (1.f-alpha) + secondAlpha * alpha); + return (firstAlpha * (1.f - alpha) + secondAlpha * alpha); } else { @@ -260,31 +254,24 @@ void ColorTable::Reverse() } } -void ColorTable::AddControlPoint(vtkm::Float32 position, - const vtkm::rendering::Color &color) +void ColorTable::AddControlPoint(vtkm::Float32 position, const vtkm::rendering::Color& color) { - this->Internals->RGBPoints.push_back( - detail::ColorControlPoint(position, color)); + this->Internals->RGBPoints.push_back(detail::ColorControlPoint(position, color)); } -void ColorTable::AddControlPoint(vtkm::Float32 position, - const vtkm::rendering::Color &color, +void ColorTable::AddControlPoint(vtkm::Float32 position, const vtkm::rendering::Color& color, vtkm::Float32 alpha) { - this->Internals->RGBPoints.push_back( - detail::ColorControlPoint(position, color)); - this->Internals->AlphaPoints.push_back( - detail::AlphaControlPoint(position, alpha)); + this->Internals->RGBPoints.push_back(detail::ColorControlPoint(position, color)); + this->Internals->AlphaPoints.push_back(detail::AlphaControlPoint(position, alpha)); } -void ColorTable::AddAlphaControlPoint(vtkm::Float32 position, - vtkm::Float32 alpha) +void ColorTable::AddAlphaControlPoint(vtkm::Float32 position, vtkm::Float32 alpha) { - this->Internals->AlphaPoints.push_back( - detail::AlphaControlPoint(position, alpha)); + this->Internals->AlphaPoints.push_back(detail::AlphaControlPoint(position, alpha)); } -ColorTable::ColorTable(const std::string &name_) +ColorTable::ColorTable(const std::string& name_) : Internals(new detail::ColorTableInternals) { std::string name = name_; @@ -296,22 +283,22 @@ ColorTable::ColorTable(const std::string &name_) this->Internals->Smooth = true; if (name == "grey" || name == "gray") { - AddControlPoint(0.0f, Color( 0.f, 0.f, 0.f)); - AddControlPoint(1.0f, Color( 1.f, 1.f, 1.f)); + AddControlPoint(0.0f, Color(0.f, 0.f, 0.f)); + AddControlPoint(1.0f, Color(1.f, 1.f, 1.f)); } else if (name == "blue") { - AddControlPoint(0.00f, Color( 0.f, 0.f, 0.f)); - AddControlPoint(0.33f, Color( 0.f, 0.f, .5f)); - AddControlPoint(0.66f, Color( 0.f, .5f, 1.f)); - AddControlPoint(1.00f, Color( 1.f, 1.f, 1.f)); + AddControlPoint(0.00f, Color(0.f, 0.f, 0.f)); + AddControlPoint(0.33f, Color(0.f, 0.f, .5f)); + AddControlPoint(0.66f, Color(0.f, .5f, 1.f)); + AddControlPoint(1.00f, Color(1.f, 1.f, 1.f)); } else if (name == "orange") { - AddControlPoint(0.00f, Color( 0.f, 0.f, 0.f)); - AddControlPoint(0.33f, Color( .5f, 0.f, 0.f)); - AddControlPoint(0.66f, Color( 1.f, .5f, 0.f)); - AddControlPoint(1.00f, Color( 1.f, 1.f, 1.f)); + AddControlPoint(0.00f, Color(0.f, 0.f, 0.f)); + AddControlPoint(0.33f, Color(.5f, 0.f, 0.f)); + AddControlPoint(0.66f, Color(1.f, .5f, 0.f)); + AddControlPoint(1.00f, Color(1.f, 1.f, 1.f)); } else if (name == "cool2warm") { @@ -574,38 +561,38 @@ ColorTable::ColorTable(const std::string &name_) } else if (name == "temperature") { - AddControlPoint(0.05f, Color( 0.f, 0.f, 1.f)); - AddControlPoint(0.35f, Color( 0.f, 1.f, 1.f)); - AddControlPoint(0.50f, Color( 1.f, 1.f, 1.f)); - AddControlPoint(0.65f, Color( 1.f, 1.f, 0.f)); - AddControlPoint(0.95f, Color( 1.f, 0.f, 0.f)); + AddControlPoint(0.05f, Color(0.f, 0.f, 1.f)); + AddControlPoint(0.35f, Color(0.f, 1.f, 1.f)); + AddControlPoint(0.50f, Color(1.f, 1.f, 1.f)); + AddControlPoint(0.65f, Color(1.f, 1.f, 0.f)); + AddControlPoint(0.95f, Color(1.f, 0.f, 0.f)); } else if (name == "rainbow") { // I really want to delete this. If users want to make a crap // color map, let them build it themselves. - AddControlPoint(0.00f, Color( 0.f, 0.f, 1.f)); - AddControlPoint(0.20f, Color( 0.f, 1.f, 1.f)); - AddControlPoint(0.45f, Color( 0.f, 1.f, 0.f)); - AddControlPoint(0.55f, Color( .7f, 1.f, 0.f)); - AddControlPoint(0.6f, Color( 1.f, 1.f, 0.f)); - AddControlPoint(0.75f, Color( 1.f, .5f, 0.f)); - AddControlPoint(0.9f, Color( 1.f, 0.f, 0.f)); - AddControlPoint(0.98f, Color( 1.f, 0.f, .5F)); - AddControlPoint(1.0f, Color( 1.f, 0.f, 1.f)); + AddControlPoint(0.00f, Color(0.f, 0.f, 1.f)); + AddControlPoint(0.20f, Color(0.f, 1.f, 1.f)); + AddControlPoint(0.45f, Color(0.f, 1.f, 0.f)); + AddControlPoint(0.55f, Color(.7f, 1.f, 0.f)); + AddControlPoint(0.6f, Color(1.f, 1.f, 0.f)); + AddControlPoint(0.75f, Color(1.f, .5f, 0.f)); + AddControlPoint(0.9f, Color(1.f, 0.f, 0.f)); + AddControlPoint(0.98f, Color(1.f, 0.f, .5F)); + AddControlPoint(1.0f, Color(1.f, 0.f, 1.f)); } else if (name == "levels") { - AddControlPoint(0.0f, Color( 0.f, 0.f, 1.f)); - AddControlPoint(0.2f, Color( 0.f, 0.f, 1.f)); - AddControlPoint(0.2f, Color( 0.f, 1.f, 1.f)); - AddControlPoint(0.4f, Color( 0.f, 1.f, 1.f)); - AddControlPoint(0.4f, Color( 0.f, 1.f, 0.f)); - AddControlPoint(0.6f, Color( 0.f, 1.f, 0.f)); - AddControlPoint(0.6f, Color( 1.f, 1.f, 0.f)); - AddControlPoint(0.8f, Color( 1.f, 1.f, 0.f)); - AddControlPoint(0.8f, Color( 1.f, 0.f, 0.f)); - AddControlPoint(1.0f, Color( 1.f, 0.f, 0.f)); + AddControlPoint(0.0f, Color(0.f, 0.f, 1.f)); + AddControlPoint(0.2f, Color(0.f, 0.f, 1.f)); + AddControlPoint(0.2f, Color(0.f, 1.f, 1.f)); + AddControlPoint(0.4f, Color(0.f, 1.f, 1.f)); + AddControlPoint(0.4f, Color(0.f, 1.f, 0.f)); + AddControlPoint(0.6f, Color(0.f, 1.f, 0.f)); + AddControlPoint(0.6f, Color(1.f, 1.f, 0.f)); + AddControlPoint(0.8f, Color(1.f, 1.f, 0.f)); + AddControlPoint(0.8f, Color(1.f, 0.f, 0.f)); + AddControlPoint(1.0f, Color(1.f, 0.f, 0.f)); } else if (name == "dense" || name == "sharp") { @@ -626,13 +613,13 @@ ColorTable::ColorTable(const std::string &name_) else if (name == "thermal") { AddControlPoint(0.0f, Color(0.30f, 0.00f, 0.00f)); - AddControlPoint(0.25f,Color(1.00f, 0.00f, 0.00f)); - AddControlPoint(0.50f,Color(1.00f, 1.00f, 0.00f)); - AddControlPoint(0.55f,Color(0.80f, 0.55f, 0.20f)); - AddControlPoint(0.60f,Color(0.60f, 0.37f, 0.40f)); - AddControlPoint(0.65f,Color(0.40f, 0.22f, 0.60f)); - AddControlPoint(0.75f,Color(0.00f, 0.00f, 1.00f)); - AddControlPoint(1.00f,Color(1.00f, 1.00f, 1.00f)); + AddControlPoint(0.25f, Color(1.00f, 0.00f, 0.00f)); + AddControlPoint(0.50f, Color(1.00f, 1.00f, 0.00f)); + AddControlPoint(0.55f, Color(0.80f, 0.55f, 0.20f)); + AddControlPoint(0.60f, Color(0.60f, 0.37f, 0.40f)); + AddControlPoint(0.65f, Color(0.40f, 0.22f, 0.60f)); + AddControlPoint(0.75f, Color(0.00f, 0.00f, 1.00f)); + AddControlPoint(1.00f, Color(1.00f, 1.00f, 1.00f)); } // The following five tables are perceeptually linearized colortables // (4 rainbow, one heatmap) from BSD-licensed code by Matteo Niccoli. @@ -640,92 +627,92 @@ ColorTable::ColorTable(const std::string &name_) else if (name == "IsoL") { vtkm::Float32 n = 5; - AddControlPoint(0.f/n, Color(0.9102f, 0.2236f, 0.8997f)); - AddControlPoint(1.f/n, Color(0.4027f, 0.3711f, 1.0000f)); - AddControlPoint(2.f/n, Color(0.0422f, 0.5904f, 0.5899f)); - AddControlPoint(3.f/n, Color(0.0386f, 0.6206f, 0.0201f)); - AddControlPoint(4.f/n, Color(0.5441f, 0.5428f, 0.0110f)); - AddControlPoint(5.f/n, Color(1.0000f, 0.2288f, 0.1631f)); + AddControlPoint(0.f / n, Color(0.9102f, 0.2236f, 0.8997f)); + AddControlPoint(1.f / n, Color(0.4027f, 0.3711f, 1.0000f)); + AddControlPoint(2.f / n, Color(0.0422f, 0.5904f, 0.5899f)); + AddControlPoint(3.f / n, Color(0.0386f, 0.6206f, 0.0201f)); + AddControlPoint(4.f / n, Color(0.5441f, 0.5428f, 0.0110f)); + AddControlPoint(5.f / n, Color(1.0000f, 0.2288f, 0.1631f)); } else if (name == "CubicL") { vtkm::Float32 n = 15; - AddControlPoint(0.f/n, Color(0.4706f, 0.0000f, 0.5216f)); - AddControlPoint(1.f/n, Color(0.5137f, 0.0527f, 0.7096f)); - AddControlPoint(2.f/n, Color(0.4942f, 0.2507f, 0.8781f)); - AddControlPoint(3.f/n, Color(0.4296f, 0.3858f, 0.9922f)); - AddControlPoint(4.f/n, Color(0.3691f, 0.5172f, 0.9495f)); - AddControlPoint(5.f/n, Color(0.2963f, 0.6191f, 0.8515f)); - AddControlPoint(6.f/n, Color(0.2199f, 0.7134f, 0.7225f)); - AddControlPoint(7.f/n, Color(0.2643f, 0.7836f, 0.5756f)); - AddControlPoint(8.f/n, Color(0.3094f, 0.8388f, 0.4248f)); - AddControlPoint(9.f/n, Color(0.3623f, 0.8917f, 0.2858f)); - AddControlPoint(10.f/n, Color(0.5200f, 0.9210f, 0.3137f)); - AddControlPoint(11.f/n, Color(0.6800f, 0.9255f, 0.3386f)); - AddControlPoint(12.f/n, Color(0.8000f, 0.9255f, 0.3529f)); - AddControlPoint(13.f/n, Color(0.8706f, 0.8549f, 0.3608f)); - AddControlPoint(14.f/n, Color(0.9514f, 0.7466f, 0.3686f)); - AddControlPoint(15.f/n, Color(0.9765f, 0.5887f, 0.3569f)); + AddControlPoint(0.f / n, Color(0.4706f, 0.0000f, 0.5216f)); + AddControlPoint(1.f / n, Color(0.5137f, 0.0527f, 0.7096f)); + AddControlPoint(2.f / n, Color(0.4942f, 0.2507f, 0.8781f)); + AddControlPoint(3.f / n, Color(0.4296f, 0.3858f, 0.9922f)); + AddControlPoint(4.f / n, Color(0.3691f, 0.5172f, 0.9495f)); + AddControlPoint(5.f / n, Color(0.2963f, 0.6191f, 0.8515f)); + AddControlPoint(6.f / n, Color(0.2199f, 0.7134f, 0.7225f)); + AddControlPoint(7.f / n, Color(0.2643f, 0.7836f, 0.5756f)); + AddControlPoint(8.f / n, Color(0.3094f, 0.8388f, 0.4248f)); + AddControlPoint(9.f / n, Color(0.3623f, 0.8917f, 0.2858f)); + AddControlPoint(10.f / n, Color(0.5200f, 0.9210f, 0.3137f)); + AddControlPoint(11.f / n, Color(0.6800f, 0.9255f, 0.3386f)); + AddControlPoint(12.f / n, Color(0.8000f, 0.9255f, 0.3529f)); + AddControlPoint(13.f / n, Color(0.8706f, 0.8549f, 0.3608f)); + AddControlPoint(14.f / n, Color(0.9514f, 0.7466f, 0.3686f)); + AddControlPoint(15.f / n, Color(0.9765f, 0.5887f, 0.3569f)); } else if (name == "CubicYF") { vtkm::Float32 n = 15; - AddControlPoint(0.f/n, Color(0.5151f, 0.0482f, 0.6697f)); - AddControlPoint(1.f/n, Color(0.5199f, 0.1762f, 0.8083f)); - AddControlPoint(2.f/n, Color(0.4884f, 0.2912f, 0.9234f)); - AddControlPoint(3.f/n, Color(0.4297f, 0.3855f, 0.9921f)); - AddControlPoint(4.f/n, Color(0.3893f, 0.4792f, 0.9775f)); - AddControlPoint(5.f/n, Color(0.3337f, 0.5650f, 0.9056f)); - AddControlPoint(6.f/n, Color(0.2795f, 0.6419f, 0.8287f)); - AddControlPoint(7.f/n, Color(0.2210f, 0.7123f, 0.7258f)); - AddControlPoint(8.f/n, Color(0.2468f, 0.7612f, 0.6248f)); - AddControlPoint(9.f/n, Color(0.2833f, 0.8125f, 0.5069f)); - AddControlPoint(10.f/n, Color(0.3198f, 0.8492f, 0.3956f)); - AddControlPoint(11.f/n, Color(0.3602f, 0.8896f, 0.2919f)); - AddControlPoint(12.f/n, Color(0.4568f, 0.9136f, 0.3018f)); - AddControlPoint(13.f/n, Color(0.6033f, 0.9255f, 0.3295f)); - AddControlPoint(14.f/n, Color(0.7066f, 0.9255f, 0.3414f)); - AddControlPoint(15.f/n, Color(0.8000f, 0.9255f, 0.3529f)); + AddControlPoint(0.f / n, Color(0.5151f, 0.0482f, 0.6697f)); + AddControlPoint(1.f / n, Color(0.5199f, 0.1762f, 0.8083f)); + AddControlPoint(2.f / n, Color(0.4884f, 0.2912f, 0.9234f)); + AddControlPoint(3.f / n, Color(0.4297f, 0.3855f, 0.9921f)); + AddControlPoint(4.f / n, Color(0.3893f, 0.4792f, 0.9775f)); + AddControlPoint(5.f / n, Color(0.3337f, 0.5650f, 0.9056f)); + AddControlPoint(6.f / n, Color(0.2795f, 0.6419f, 0.8287f)); + AddControlPoint(7.f / n, Color(0.2210f, 0.7123f, 0.7258f)); + AddControlPoint(8.f / n, Color(0.2468f, 0.7612f, 0.6248f)); + AddControlPoint(9.f / n, Color(0.2833f, 0.8125f, 0.5069f)); + AddControlPoint(10.f / n, Color(0.3198f, 0.8492f, 0.3956f)); + AddControlPoint(11.f / n, Color(0.3602f, 0.8896f, 0.2919f)); + AddControlPoint(12.f / n, Color(0.4568f, 0.9136f, 0.3018f)); + AddControlPoint(13.f / n, Color(0.6033f, 0.9255f, 0.3295f)); + AddControlPoint(14.f / n, Color(0.7066f, 0.9255f, 0.3414f)); + AddControlPoint(15.f / n, Color(0.8000f, 0.9255f, 0.3529f)); } else if (name == "LinearL") { vtkm::Float32 n = 15; - AddControlPoint(0.f/n, Color(0.0143f, 0.0143f, 0.0143f)); - AddControlPoint(1.f/n, Color(0.1413f, 0.0555f, 0.1256f)); - AddControlPoint(2.f/n, Color(0.1761f, 0.0911f, 0.2782f)); - AddControlPoint(3.f/n, Color(0.1710f, 0.1314f, 0.4540f)); - AddControlPoint(4.f/n, Color(0.1074f, 0.2234f, 0.4984f)); - AddControlPoint(5.f/n, Color(0.0686f, 0.3044f, 0.5068f)); - AddControlPoint(6.f/n, Color(0.0008f, 0.3927f, 0.4267f)); - AddControlPoint(7.f/n, Color(0.0000f, 0.4763f, 0.3464f)); - AddControlPoint(8.f/n, Color(0.0000f, 0.5565f, 0.2469f)); - AddControlPoint(9.f/n, Color(0.0000f, 0.6381f, 0.1638f)); - AddControlPoint(10.f/n, Color(0.2167f, 0.6966f, 0.0000f)); - AddControlPoint(11.f/n, Color(0.3898f, 0.7563f, 0.0000f)); - AddControlPoint(12.f/n, Color(0.6912f, 0.7795f, 0.0000f)); - AddControlPoint(13.f/n, Color(0.8548f, 0.8041f, 0.4555f)); - AddControlPoint(14.f/n, Color(0.9712f, 0.8429f, 0.7287f)); - AddControlPoint(15.f/n, Color(0.9692f, 0.9273f, 0.8961f)); + AddControlPoint(0.f / n, Color(0.0143f, 0.0143f, 0.0143f)); + AddControlPoint(1.f / n, Color(0.1413f, 0.0555f, 0.1256f)); + AddControlPoint(2.f / n, Color(0.1761f, 0.0911f, 0.2782f)); + AddControlPoint(3.f / n, Color(0.1710f, 0.1314f, 0.4540f)); + AddControlPoint(4.f / n, Color(0.1074f, 0.2234f, 0.4984f)); + AddControlPoint(5.f / n, Color(0.0686f, 0.3044f, 0.5068f)); + AddControlPoint(6.f / n, Color(0.0008f, 0.3927f, 0.4267f)); + AddControlPoint(7.f / n, Color(0.0000f, 0.4763f, 0.3464f)); + AddControlPoint(8.f / n, Color(0.0000f, 0.5565f, 0.2469f)); + AddControlPoint(9.f / n, Color(0.0000f, 0.6381f, 0.1638f)); + AddControlPoint(10.f / n, Color(0.2167f, 0.6966f, 0.0000f)); + AddControlPoint(11.f / n, Color(0.3898f, 0.7563f, 0.0000f)); + AddControlPoint(12.f / n, Color(0.6912f, 0.7795f, 0.0000f)); + AddControlPoint(13.f / n, Color(0.8548f, 0.8041f, 0.4555f)); + AddControlPoint(14.f / n, Color(0.9712f, 0.8429f, 0.7287f)); + AddControlPoint(15.f / n, Color(0.9692f, 0.9273f, 0.8961f)); } else if (name == "LinLhot") { vtkm::Float32 n = 15; - AddControlPoint(0.f/n, Color(0.0225f, 0.0121f, 0.0121f)); - AddControlPoint(1.f/n, Color(0.1927f, 0.0225f, 0.0311f)); - AddControlPoint(2.f/n, Color(0.3243f, 0.0106f, 0.0000f)); - AddControlPoint(3.f/n, Color(0.4463f, 0.0000f, 0.0091f)); - AddControlPoint(4.f/n, Color(0.5706f, 0.0000f, 0.0737f)); - AddControlPoint(5.f/n, Color(0.6969f, 0.0000f, 0.1337f)); - AddControlPoint(6.f/n, Color(0.8213f, 0.0000f, 0.1792f)); - AddControlPoint(7.f/n, Color(0.8636f, 0.0000f, 0.0565f)); - AddControlPoint(8.f/n, Color(0.8821f, 0.2555f, 0.0000f)); - AddControlPoint(9.f/n, Color(0.8720f, 0.4182f, 0.0000f)); - AddControlPoint(10.f/n, Color(0.8424f, 0.5552f, 0.0000f)); - AddControlPoint(11.f/n, Color(0.8031f, 0.6776f, 0.0000f)); - AddControlPoint(12.f/n, Color(0.7659f, 0.7870f, 0.0000f)); - AddControlPoint(13.f/n, Color(0.8170f, 0.8296f, 0.0000f)); - AddControlPoint(14.f/n, Color(0.8853f, 0.8896f, 0.4113f)); - AddControlPoint(15.f/n, Color(0.9481f, 0.9486f, 0.7165f)); + AddControlPoint(0.f / n, Color(0.0225f, 0.0121f, 0.0121f)); + AddControlPoint(1.f / n, Color(0.1927f, 0.0225f, 0.0311f)); + AddControlPoint(2.f / n, Color(0.3243f, 0.0106f, 0.0000f)); + AddControlPoint(3.f / n, Color(0.4463f, 0.0000f, 0.0091f)); + AddControlPoint(4.f / n, Color(0.5706f, 0.0000f, 0.0737f)); + AddControlPoint(5.f / n, Color(0.6969f, 0.0000f, 0.1337f)); + AddControlPoint(6.f / n, Color(0.8213f, 0.0000f, 0.1792f)); + AddControlPoint(7.f / n, Color(0.8636f, 0.0000f, 0.0565f)); + AddControlPoint(8.f / n, Color(0.8821f, 0.2555f, 0.0000f)); + AddControlPoint(9.f / n, Color(0.8720f, 0.4182f, 0.0000f)); + AddControlPoint(10.f / n, Color(0.8424f, 0.5552f, 0.0000f)); + AddControlPoint(11.f / n, Color(0.8031f, 0.6776f, 0.0000f)); + AddControlPoint(12.f / n, Color(0.7659f, 0.7870f, 0.0000f)); + AddControlPoint(13.f / n, Color(0.8170f, 0.8296f, 0.0000f)); + AddControlPoint(14.f / n, Color(0.8853f, 0.8896f, 0.4113f)); + AddControlPoint(15.f / n, Color(0.9481f, 0.9486f, 0.7165f)); } // ColorBrewer tables here. (See LICENSE.txt) else if (name == "PuRd") @@ -1182,7 +1169,7 @@ ColorTable::ColorTable(const std::string &name_) } else { - std::cout<<"Unknown Color Table"<Internals->UniqueName = ""; this->Internals->Smooth = false; - + AddControlPoint(0, color); AddControlPoint(1, color); } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/ColorTable.h b/vtkm/rendering/ColorTable.h index 70a5387aa..df2a7fe30 100644 --- a/vtkm/rendering/ColorTable.h +++ b/vtkm/rendering/ColorTable.h @@ -26,13 +26,15 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -namespace detail { +namespace detail +{ struct ColorTableInternals; - } /// \brief It's a color table! @@ -51,17 +53,16 @@ public: ColorTable(); /// Constructs a \c ColorTable using the name of a pre-defined color set. - ColorTable(const std::string &name); - - // Make a single color ColorTable. - ColorTable(const vtkm::rendering::Color &color); + ColorTable(const std::string& name); - const std::string &GetName() const; + // Make a single color ColorTable. + ColorTable(const vtkm::rendering::Color& color); + + const std::string& GetName() const; bool GetSmooth() const; - void Sample(int numSamples, - vtkm::cont::ArrayHandle > &colors) const; + void Sample(int numSamples, vtkm::cont::ArrayHandle>& colors) const; vtkm::rendering::Color MapRGB(vtkm::Float32 scalar) const; @@ -71,16 +72,13 @@ public: void Reverse(); - void AddControlPoint(vtkm::Float32 position, - const vtkm::rendering::Color &color); + void AddControlPoint(vtkm::Float32 position, const vtkm::rendering::Color& color); - void AddControlPoint(vtkm::Float32 position, - const vtkm::rendering::Color &color, + void AddControlPoint(vtkm::Float32 position, const vtkm::rendering::Color& color, vtkm::Float32 alpha); void AddAlphaControlPoint(vtkm::Float32 position, vtkm::Float32 alpha); }; -}}//namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif //vtk_m_rendering_ColorTable_h - - diff --git a/vtkm/rendering/DecodePNG.cxx b/vtkm/rendering/DecodePNG.cxx index 44a9b945d..173b83fd9 100644 --- a/vtkm/rendering/DecodePNG.cxx +++ b/vtkm/rendering/DecodePNG.cxx @@ -22,8 +22,10 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- @@ -65,7 +67,9 @@ convert_to_rgba32: optional parameter, true by default. works for trusted PNG files. Use LodePNG instead of picoPNG if you need this information. return: 0 if success, not 0 if some error occured. */ -int DecodePNG(std::vector& out_image, unsigned long& image_width, unsigned long& image_height, const unsigned char* in_png, std::size_t in_size, bool convert_to_rgba32) +int DecodePNG(std::vector& out_image, unsigned long& image_width, + unsigned long& image_height, const unsigned char* in_png, std::size_t in_size, + bool convert_to_rgba32) { // picoPNG version 20101224 // Copyright (c) 2005-2010 Lode Vandevenne @@ -93,18 +97,35 @@ int DecodePNG(std::vector& out_image, unsigned long& image_width, // is available: LodePNG (lodepng.c(pp)), which is a single source and header file. // Apologies for the compact code style, it's to make this tiny. - static const unsigned long LENBASE[29] = {3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258}; - static const unsigned long LENEXTRA[29] = {0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0}; - static const unsigned long DISTBASE[30] = {1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577}; - static const unsigned long DISTEXTRA[30] = {0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; - static const unsigned long CLCL[19] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; //code length code lengths + static const unsigned long LENBASE[29] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, + 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, + 67, 83, 99, 115, 131, 163, 195, 227, 258 }; + static const unsigned long LENEXTRA[29] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, + 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 }; + static const unsigned long DISTBASE[30] = { 1, 2, 3, 4, 5, 7, 9, 13, + 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, + 4097, 6145, 8193, 12289, 16385, 24577 }; + static const unsigned long DISTEXTRA[30] = { + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 + }; + static const unsigned long CLCL[19] = { + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 + }; //code length code lengths struct Zlib //nested functions for zlib decompression { - static unsigned long readBitFromStream(std::size_t& bitp, const unsigned char* bits) { unsigned long result = (bits[bitp >> 3] >> (bitp & 0x7)) & 1; bitp++; return result;} - static unsigned long readBitsFromStream(std::size_t& bitp, const unsigned char* bits, std::size_t nbits) + static unsigned long readBitFromStream(std::size_t& bitp, const unsigned char* bits) + { + unsigned long result = (bits[bitp >> 3] >> (bitp & 0x7)) & 1; + bitp++; + return result; + } + static unsigned long readBitsFromStream(std::size_t& bitp, const unsigned char* bits, + std::size_t nbits) { unsigned long result = 0; - for(std::size_t i = 0; i < nbits; i++) result += (readBitFromStream(bitp, bits)) << i; + for (std::size_t i = 0; i < nbits; i++) + result += (readBitFromStream(bitp, bits)) << i; return result; } struct HuffmanTree @@ -112,178 +133,354 @@ int DecodePNG(std::vector& out_image, unsigned long& image_width, int makeFromLengths(const std::vector& bitlen, unsigned long maxbitlen) { //make tree given the lengths unsigned long numcodes = (unsigned long)(bitlen.size()), treepos = 0, nodefilled = 0; - std::vector tree1d(numcodes), blcount(maxbitlen + 1, 0), nextcode(maxbitlen + 1, 0); - for(unsigned long bits = 0; bits < numcodes; bits++) blcount[bitlen[bits]]++; //count number of instances of each code length - for(unsigned long bits = 1; bits <= maxbitlen; bits++) nextcode[bits] = (nextcode[bits - 1] + blcount[bits - 1]) << 1; - for(unsigned long n = 0; n < numcodes; n++) if(bitlen[n] != 0) tree1d[n] = nextcode[bitlen[n]]++; //generate all the codes - tree2d.clear(); tree2d.resize(numcodes * 2, 32767); //32767 here means the tree2d isn't filled there yet - for(unsigned long n = 0; n < numcodes; n++) //the codes - for(unsigned long i = 0; i < bitlen[n]; i++) //the bits for this code - { - unsigned long bit = (tree1d[n] >> (bitlen[n] - i - 1)) & 1; - if(treepos > numcodes - 2) return 55; - if(tree2d[2 * treepos + bit] == 32767) //not yet filled in + std::vector tree1d(numcodes), blcount(maxbitlen + 1, 0), + nextcode(maxbitlen + 1, 0); + for (unsigned long bits = 0; bits < numcodes; bits++) + blcount[bitlen[bits]]++; //count number of instances of each code length + for (unsigned long bits = 1; bits <= maxbitlen; bits++) + nextcode[bits] = (nextcode[bits - 1] + blcount[bits - 1]) << 1; + for (unsigned long n = 0; n < numcodes; n++) + if (bitlen[n] != 0) + tree1d[n] = nextcode[bitlen[n]]++; //generate all the codes + tree2d.clear(); + tree2d.resize(numcodes * 2, 32767); //32767 here means the tree2d isn't filled there yet + for (unsigned long n = 0; n < numcodes; n++) //the codes + for (unsigned long i = 0; i < bitlen[n]; i++) //the bits for this code { - if(i + 1 == bitlen[n]) { tree2d[2 * treepos + bit] = n; treepos = 0; } //last bit - else { tree2d[2 * treepos + bit] = ++nodefilled + numcodes; treepos = nodefilled; } //addresses are encoded as values > numcodes + unsigned long bit = (tree1d[n] >> (bitlen[n] - i - 1)) & 1; + if (treepos > numcodes - 2) + return 55; + if (tree2d[2 * treepos + bit] == 32767) //not yet filled in + { + if (i + 1 == bitlen[n]) + { + tree2d[2 * treepos + bit] = n; + treepos = 0; + } //last bit + else + { + tree2d[2 * treepos + bit] = ++nodefilled + numcodes; + treepos = nodefilled; + } //addresses are encoded as values > numcodes + } + else + treepos = tree2d[2 * treepos + bit] - + numcodes; //subtract numcodes from address to get address value } - else treepos = tree2d[2 * treepos + bit] - numcodes; //subtract numcodes from address to get address value - } return 0; } - int decode(bool& decoded, unsigned long& result, std::size_t& treepos, unsigned long bit) const + int decode(bool& decoded, unsigned long& result, std::size_t& treepos, + unsigned long bit) const { //Decodes a symbol from the tree unsigned long numcodes = (unsigned long)tree2d.size() / 2; - if(treepos >= numcodes) return 11; //error: you appeared outside the codetree + if (treepos >= numcodes) + return 11; //error: you appeared outside the codetree result = tree2d[2 * treepos + bit]; decoded = (result < numcodes); treepos = decoded ? 0 : result - numcodes; return 0; } - std::vector tree2d; //2D representation of a huffman tree: The one dimension is "0" or "1", the other contains all nodes and leaves of the tree. + std::vector + tree2d; //2D representation of a huffman tree: The one dimension is "0" or "1", the other contains all nodes and leaves of the tree. }; struct Inflator { int error; - void inflate(std::vector& out, const std::vector& in, std::size_t inpos = 0) + void inflate(std::vector& out, const std::vector& in, + std::size_t inpos = 0) { std::size_t bp = 0, pos = 0; //bit pointer and byte pointer error = 0; unsigned long BFINAL = 0; - while(!BFINAL && !error) + while (!BFINAL && !error) { - if(bp >> 3 >= in.size()) { error = 52; return; } //error, bit pointer will jump past memory + if (bp >> 3 >= in.size()) + { + error = 52; + return; + } //error, bit pointer will jump past memory BFINAL = readBitFromStream(bp, &in[inpos]); - unsigned long BTYPE = readBitFromStream(bp, &in[inpos]); BTYPE += 2 * readBitFromStream(bp, &in[inpos]); - if(BTYPE == 3) { error = 20; return; } //error: invalid BTYPE - else if(BTYPE == 0) inflateNoCompression(out, &in[inpos], bp, pos, in.size()); - else inflateHuffmanBlock(out, &in[inpos], bp, pos, in.size(), BTYPE); + unsigned long BTYPE = readBitFromStream(bp, &in[inpos]); + BTYPE += 2 * readBitFromStream(bp, &in[inpos]); + if (BTYPE == 3) + { + error = 20; + return; + } //error: invalid BTYPE + else if (BTYPE == 0) + inflateNoCompression(out, &in[inpos], bp, pos, in.size()); + else + inflateHuffmanBlock(out, &in[inpos], bp, pos, in.size(), BTYPE); } - if(!error) out.resize(pos); //Only now we know the true size of out, resize it to that + if (!error) + out.resize(pos); //Only now we know the true size of out, resize it to that } - void generateFixedTrees(HuffmanTree& tree, HuffmanTree& treeD) //get the tree of a deflated block with fixed tree + void generateFixedTrees(HuffmanTree& tree, + HuffmanTree& treeD) //get the tree of a deflated block with fixed tree { - std::vector bitlen(288, 8), bitlenD(32, 5);; - for(std::size_t i = 144; i <= 255; i++) bitlen[i] = 9; - for(std::size_t i = 256; i <= 279; i++) bitlen[i] = 7; + std::vector bitlen(288, 8), bitlenD(32, 5); + ; + for (std::size_t i = 144; i <= 255; i++) + bitlen[i] = 9; + for (std::size_t i = 256; i <= 279; i++) + bitlen[i] = 7; tree.makeFromLengths(bitlen, 15); treeD.makeFromLengths(bitlenD, 15); } - HuffmanTree codetree, codetreeD, codelengthcodetree; //the code tree for Huffman codes, dist codes, and code length codes - unsigned long huffmanDecodeSymbol(const unsigned char* in, std::size_t& bp, const HuffmanTree& lcodetree, std::size_t inlength) + HuffmanTree codetree, codetreeD, + codelengthcodetree; //the code tree for Huffman codes, dist codes, and code length codes + unsigned long huffmanDecodeSymbol(const unsigned char* in, std::size_t& bp, + const HuffmanTree& lcodetree, std::size_t inlength) { //decode a single symbol from given list of bits with given code tree. return value is the symbol - bool decoded; unsigned long ct; - for(std::size_t treepos = 0;;) + bool decoded; + unsigned long ct; + for (std::size_t treepos = 0;;) { - if((bp & 0x07) == 0 && (bp >> 3) > inlength) { error = 10; return 0; } //error: end reached without endcode - error = lcodetree.decode(decoded, ct, treepos, readBitFromStream(bp, in)); if(error) return 0; //stop, an error happened - if(decoded) return ct; + if ((bp & 0x07) == 0 && (bp >> 3) > inlength) + { + error = 10; + return 0; + } //error: end reached without endcode + error = lcodetree.decode(decoded, ct, treepos, readBitFromStream(bp, in)); + if (error) + return 0; //stop, an error happened + if (decoded) + return ct; } } - void getTreeInflateDynamic(HuffmanTree& tree, HuffmanTree& treeD, const unsigned char* in, std::size_t& bp, std::size_t inlength) + void getTreeInflateDynamic(HuffmanTree& tree, HuffmanTree& treeD, const unsigned char* in, + std::size_t& bp, std::size_t inlength) { //get the tree of a deflated block with dynamic tree, the tree itself is also Huffman compressed with a known tree std::vector bitlen(288, 0), bitlenD(32, 0); - if(bp >> 3 >= inlength - 2) { error = 49; return; } //the bit pointer is or will go past the memory - std::size_t HLIT = readBitsFromStream(bp, in, 5) + 257; //number of literal/length codes + 257 + if (bp >> 3 >= inlength - 2) + { + error = 49; + return; + } //the bit pointer is or will go past the memory + std::size_t HLIT = + readBitsFromStream(bp, in, 5) + 257; //number of literal/length codes + 257 std::size_t HDIST = readBitsFromStream(bp, in, 5) + 1; //number of dist codes + 1 std::size_t HCLEN = readBitsFromStream(bp, in, 4) + 4; //number of code length codes + 4 - std::vector codelengthcode(19); //lengths of tree to decode the lengths of the dynamic tree - for(std::size_t i = 0; i < 19; i++) codelengthcode[CLCL[i]] = (i < HCLEN) ? readBitsFromStream(bp, in, 3) : 0; - error = codelengthcodetree.makeFromLengths(codelengthcode, 7); if(error) return; + std::vector codelengthcode( + 19); //lengths of tree to decode the lengths of the dynamic tree + for (std::size_t i = 0; i < 19; i++) + codelengthcode[CLCL[i]] = (i < HCLEN) ? readBitsFromStream(bp, in, 3) : 0; + error = codelengthcodetree.makeFromLengths(codelengthcode, 7); + if (error) + return; std::size_t i = 0, replength; - while(i < HLIT + HDIST) + while (i < HLIT + HDIST) { - unsigned long code = huffmanDecodeSymbol(in, bp, codelengthcodetree, inlength); if(error) return; - if(code <= 15) { if(i < HLIT) bitlen[i++] = code; else bitlenD[i++ - HLIT] = code; } //a length code - else if(code == 16) //repeat previous + unsigned long code = huffmanDecodeSymbol(in, bp, codelengthcodetree, inlength); + if (error) + return; + if (code <= 15) { - if(bp >> 3 >= inlength) { error = 50; return; } //error, bit pointer jumps past memory + if (i < HLIT) + bitlen[i++] = code; + else + bitlenD[i++ - HLIT] = code; + } //a length code + else if (code == 16) //repeat previous + { + if (bp >> 3 >= inlength) + { + error = 50; + return; + } //error, bit pointer jumps past memory replength = 3 + readBitsFromStream(bp, in, 2); unsigned long value; //set value to the previous code - if((i - 1) < HLIT) value = bitlen[i - 1]; - else value = bitlenD[i - HLIT - 1]; - for(std::size_t n = 0; n < replength; n++) //repeat this value in the next lengths + if ((i - 1) < HLIT) + value = bitlen[i - 1]; + else + value = bitlenD[i - HLIT - 1]; + for (std::size_t n = 0; n < replength; n++) //repeat this value in the next lengths { - if(i >= HLIT + HDIST) { error = 13; return; } //error: i is larger than the amount of codes - if(i < HLIT) bitlen[i++] = value; else bitlenD[i++ - HLIT] = value; + if (i >= HLIT + HDIST) + { + error = 13; + return; + } //error: i is larger than the amount of codes + if (i < HLIT) + bitlen[i++] = value; + else + bitlenD[i++ - HLIT] = value; } } - else if(code == 17) //repeat "0" 3-10 times + else if (code == 17) //repeat "0" 3-10 times { - if(bp >> 3 >= inlength) { error = 50; return; } //error, bit pointer jumps past memory + if (bp >> 3 >= inlength) + { + error = 50; + return; + } //error, bit pointer jumps past memory replength = 3 + readBitsFromStream(bp, in, 3); - for(std::size_t n = 0; n < replength; n++) //repeat this value in the next lengths + for (std::size_t n = 0; n < replength; n++) //repeat this value in the next lengths { - if(i >= HLIT + HDIST) { error = 14; return; } //error: i is larger than the amount of codes - if(i < HLIT) bitlen[i++] = 0; else bitlenD[i++ - HLIT] = 0; + if (i >= HLIT + HDIST) + { + error = 14; + return; + } //error: i is larger than the amount of codes + if (i < HLIT) + bitlen[i++] = 0; + else + bitlenD[i++ - HLIT] = 0; } } - else if(code == 18) //repeat "0" 11-138 times + else if (code == 18) //repeat "0" 11-138 times { - if(bp >> 3 >= inlength) { error = 50; return; } //error, bit pointer jumps past memory + if (bp >> 3 >= inlength) + { + error = 50; + return; + } //error, bit pointer jumps past memory replength = 11 + readBitsFromStream(bp, in, 7); - for(std::size_t n = 0; n < replength; n++) //repeat this value in the next lengths + for (std::size_t n = 0; n < replength; n++) //repeat this value in the next lengths { - if(i >= HLIT + HDIST) { error = 15; return; } //error: i is larger than the amount of codes - if(i < HLIT) bitlen[i++] = 0; else bitlenD[i++ - HLIT] = 0; + if (i >= HLIT + HDIST) + { + error = 15; + return; + } //error: i is larger than the amount of codes + if (i < HLIT) + bitlen[i++] = 0; + else + bitlenD[i++ - HLIT] = 0; } } - else { error = 16; return; } //error: somehow an unexisting code appeared. This can never happen. - } - if(bitlen[256] == 0) { error = 64; return; } //the length of the end code 256 must be larger than 0 - error = tree.makeFromLengths(bitlen, 15); if(error) return; //now we've finally got HLIT and HDIST, so generate the code trees, and the function is done - error = treeD.makeFromLengths(bitlenD, 15); if(error) return; - } - void inflateHuffmanBlock(std::vector& out, const unsigned char* in, std::size_t& bp, std::size_t& pos, std::size_t inlength, unsigned long btype) - { - if(btype == 1) { generateFixedTrees(codetree, codetreeD); } - else if(btype == 2) { getTreeInflateDynamic(codetree, codetreeD, in, bp, inlength); if(error) return; } - for(;;) - { - unsigned long code = huffmanDecodeSymbol(in, bp, codetree, inlength); if(error) return; - if(code == 256) return; //end code - else if(code <= 255) //literal symbol + else { - if(pos >= out.size()) out.resize((pos + 1) * 2); //reserve more room + error = 16; + return; + } //error: somehow an unexisting code appeared. This can never happen. + } + if (bitlen[256] == 0) + { + error = 64; + return; + } //the length of the end code 256 must be larger than 0 + error = tree.makeFromLengths(bitlen, 15); + if (error) + return; //now we've finally got HLIT and HDIST, so generate the code trees, and the function is done + error = treeD.makeFromLengths(bitlenD, 15); + if (error) + return; + } + void inflateHuffmanBlock(std::vector& out, const unsigned char* in, + std::size_t& bp, std::size_t& pos, std::size_t inlength, + unsigned long btype) + { + if (btype == 1) + { + generateFixedTrees(codetree, codetreeD); + } + else if (btype == 2) + { + getTreeInflateDynamic(codetree, codetreeD, in, bp, inlength); + if (error) + return; + } + for (;;) + { + unsigned long code = huffmanDecodeSymbol(in, bp, codetree, inlength); + if (error) + return; + if (code == 256) + return; //end code + else if (code <= 255) //literal symbol + { + if (pos >= out.size()) + out.resize((pos + 1) * 2); //reserve more room out[pos++] = (unsigned char)(code); } - else if(code >= 257 && code <= 285) //length code + else if (code >= 257 && code <= 285) //length code { std::size_t length = LENBASE[code - 257], numextrabits = LENEXTRA[code - 257]; - if((bp >> 3) >= inlength) { error = 51; return; } //error, bit pointer will jump past memory + if ((bp >> 3) >= inlength) + { + error = 51; + return; + } //error, bit pointer will jump past memory length += readBitsFromStream(bp, in, numextrabits); - unsigned long codeD = huffmanDecodeSymbol(in, bp, codetreeD, inlength); if(error) return; - if(codeD > 29) { error = 18; return; } //error: invalid dist code (30-31 are never used) + unsigned long codeD = huffmanDecodeSymbol(in, bp, codetreeD, inlength); + if (error) + return; + if (codeD > 29) + { + error = 18; + return; + } //error: invalid dist code (30-31 are never used) unsigned long dist = DISTBASE[codeD], numextrabitsD = DISTEXTRA[codeD]; - if((bp >> 3) >= inlength) { error = 51; return; } //error, bit pointer will jump past memory + if ((bp >> 3) >= inlength) + { + error = 51; + return; + } //error, bit pointer will jump past memory dist += readBitsFromStream(bp, in, numextrabitsD); std::size_t start = pos, back = start - dist; //backwards - if(pos + length >= out.size()) out.resize((pos + length) * 2); //reserve more room - for(std::size_t i = 0; i < length; i++) { out[pos++] = out[back++]; if(back >= start) back = start - dist; } + if (pos + length >= out.size()) + out.resize((pos + length) * 2); //reserve more room + for (std::size_t i = 0; i < length; i++) + { + out[pos++] = out[back++]; + if (back >= start) + back = start - dist; + } } } } - void inflateNoCompression(std::vector& out, const unsigned char* in, std::size_t& bp, std::size_t& pos, std::size_t inlength) + void inflateNoCompression(std::vector& out, const unsigned char* in, + std::size_t& bp, std::size_t& pos, std::size_t inlength) { - while((bp & 0x7) != 0) bp++; //go to first boundary of byte + while ((bp & 0x7) != 0) + bp++; //go to first boundary of byte std::size_t p = bp / 8; - if(p >= inlength - 4) { error = 52; return; } //error, bit pointer will jump past memory - unsigned long LEN = in[p] + 256 * in[p + 1], NLEN = in[p + 2] + 256 * in[p + 3]; p += 4; - if(LEN + NLEN != 65535) { error = 21; return; } //error: NLEN is not one's complement of LEN - if(pos + LEN >= out.size()) out.resize(pos + LEN); - if(p + LEN > inlength) { error = 23; return; } //error: reading outside of in buffer - for(unsigned long n = 0; n < LEN; n++) out[pos++] = in[p++]; //read LEN bytes of literal data + if (p >= inlength - 4) + { + error = 52; + return; + } //error, bit pointer will jump past memory + unsigned long LEN = in[p] + 256 * in[p + 1], NLEN = in[p + 2] + 256 * in[p + 3]; + p += 4; + if (LEN + NLEN != 65535) + { + error = 21; + return; + } //error: NLEN is not one's complement of LEN + if (pos + LEN >= out.size()) + out.resize(pos + LEN); + if (p + LEN > inlength) + { + error = 23; + return; + } //error: reading outside of in buffer + for (unsigned long n = 0; n < LEN; n++) + out[pos++] = in[p++]; //read LEN bytes of literal data bp = p * 8; } }; - int decompress(std::vector& out, const std::vector& in) //returns error value + int decompress(std::vector& out, + const std::vector& in) //returns error value { Inflator inflator; - if(in.size() < 2) { return 53; } //error, size of zlib data too small - if((in[0] * 256 + in[1]) % 31 != 0) { return 24; } //error: 256 * in[0] + in[1] must be a multiple of 31, the FCHECK value is supposed to be made that way + if (in.size() < 2) + { + return 53; + } //error, size of zlib data too small + if ((in[0] * 256 + in[1]) % 31 != 0) + { + return 24; + } //error: 256 * in[0] + in[1] must be a multiple of 31, the FCHECK value is supposed to be made that way unsigned long CM = in[0] & 15, CINFO = (in[0] >> 4) & 15, FDICT = (in[1] >> 5) & 1; - if(CM != 8 || CINFO > 7) { return 25; } //error: only compression method 8: inflate with sliding window of 32k is supported by the PNG spec - if(FDICT != 0) { return 26; } //error: the specification of PNG says about the zlib stream: "The additional flags shall not specify a preset dictionary." + if (CM != 8 || CINFO > 7) + { + return 25; + } //error: only compression method 8: inflate with sliding window of 32k is supported by the PNG spec + if (FDICT != 0) + { + return 26; + } //error: the specification of PNG says about the zlib stream: "The additional flags shall not specify a preset dictionary." inflator.inflate(out, in, 2); return inflator.error; //note: adler32 checksum was skipped and ignored } @@ -292,290 +489,515 @@ int DecodePNG(std::vector& out_image, unsigned long& image_width, { struct Info { - unsigned long width, height, colorType, bitDepth, compressionMethod, filterMethod, interlaceMethod, key_r, key_g, key_b; + unsigned long width, height, colorType, bitDepth, compressionMethod, filterMethod, + interlaceMethod, key_r, key_g, key_b; bool key_defined; //is a transparent color key given? std::vector palette; } info; int error; - void decode(std::vector& out, const unsigned char* in, std::size_t size, bool convert_to_rgba32_flag) + void decode(std::vector& out, const unsigned char* in, std::size_t size, + bool convert_to_rgba32_flag) { error = 0; - info.width = 0; info.height = 0; //changed if header read successfully + info.width = 0; + info.height = 0; //changed if header read successfully info.key_r = info.key_g = info.key_b = 0; - if(size == 0 || in == 0) { error = 48; return; } //the given data is empty - readPngHeader(&in[0], size); if(error) return; - std::size_t pos = 33; //first byte of the first chunk after the header + if (size == 0 || in == 0) + { + error = 48; + return; + } //the given data is empty + readPngHeader(&in[0], size); + if (error) + return; + std::size_t pos = 33; //first byte of the first chunk after the header std::vector idat; //the data from idat chunks bool IEND = false; info.key_defined = false; - while(!IEND) //loop through the chunks, ignoring unknown chunks and stopping at IEND chunk. IDAT data is put at the start of the in buffer + while ( + !IEND) //loop through the chunks, ignoring unknown chunks and stopping at IEND chunk. IDAT data is put at the start of the in buffer { - if(pos + 8 >= size) { error = 30; return; } //error: size of the in buffer too small to contain next chunk - std::size_t chunkLength = read32bitInt(&in[pos]); pos += 4; - if(chunkLength > 2147483647) { error = 63; return; } - if(pos + chunkLength >= size) { error = 35; return; } //error: size of the in buffer too small to contain next chunk - if(in[pos + 0] == 'I' && in[pos + 1] == 'D' && in[pos + 2] == 'A' && in[pos + 3] == 'T') //IDAT chunk, containing compressed image data + if (pos + 8 >= size) + { + error = 30; + return; + } //error: size of the in buffer too small to contain next chunk + std::size_t chunkLength = read32bitInt(&in[pos]); + pos += 4; + if (chunkLength > 2147483647) + { + error = 63; + return; + } + if (pos + chunkLength >= size) + { + error = 35; + return; + } //error: size of the in buffer too small to contain next chunk + if (in[pos + 0] == 'I' && in[pos + 1] == 'D' && in[pos + 2] == 'A' && + in[pos + 3] == 'T') //IDAT chunk, containing compressed image data { idat.insert(idat.end(), &in[pos + 4], &in[pos + 4 + chunkLength]); pos += (4 + chunkLength); } - else if(in[pos + 0] == 'I' && in[pos + 1] == 'E' && in[pos + 2] == 'N' && in[pos + 3] == 'D') { pos += 4; IEND = true; } - else if(in[pos + 0] == 'P' && in[pos + 1] == 'L' && in[pos + 2] == 'T' && in[pos + 3] == 'E') //palette chunk (PLTE) + else if (in[pos + 0] == 'I' && in[pos + 1] == 'E' && in[pos + 2] == 'N' && + in[pos + 3] == 'D') + { + pos += 4; + IEND = true; + } + else if (in[pos + 0] == 'P' && in[pos + 1] == 'L' && in[pos + 2] == 'T' && + in[pos + 3] == 'E') //palette chunk (PLTE) { pos += 4; //go after the 4 letters info.palette.resize(4 * (chunkLength / 3)); - if(info.palette.size() > (4 * 256)) { error = 38; return; } //error: palette too big - for(std::size_t i = 0; i < info.palette.size(); i += 4) + if (info.palette.size() > (4 * 256)) { - for(std::size_t j = 0; j < 3; j++) info.palette[i + j] = in[pos++]; //RGB - info.palette[i + 3] = 255; //alpha + error = 38; + return; + } //error: palette too big + for (std::size_t i = 0; i < info.palette.size(); i += 4) + { + for (std::size_t j = 0; j < 3; j++) + info.palette[i + j] = in[pos++]; //RGB + info.palette[i + 3] = 255; //alpha } } - else if(in[pos + 0] == 't' && in[pos + 1] == 'R' && in[pos + 2] == 'N' && in[pos + 3] == 'S') //palette transparency chunk (tRNS) + else if (in[pos + 0] == 't' && in[pos + 1] == 'R' && in[pos + 2] == 'N' && + in[pos + 3] == 'S') //palette transparency chunk (tRNS) { pos += 4; //go after the 4 letters - if(info.colorType == 3) + if (info.colorType == 3) { - if(4 * chunkLength > info.palette.size()) { error = 39; return; } //error: more alpha values given than there are palette entries - for(std::size_t i = 0; i < chunkLength; i++) info.palette[4 * i + 3] = in[pos++]; + if (4 * chunkLength > info.palette.size()) + { + error = 39; + return; + } //error: more alpha values given than there are palette entries + for (std::size_t i = 0; i < chunkLength; i++) + info.palette[4 * i + 3] = in[pos++]; } - else if(info.colorType == 0) + else if (info.colorType == 0) { - if(chunkLength != 2) { error = 40; return; } //error: this chunk must be 2 bytes for greyscale image - info.key_defined = 1; info.key_r = info.key_g = info.key_b = 256 * in[pos] + in[pos + 1]; pos += 2; - } - else if(info.colorType == 2) - { - if(chunkLength != 6) { error = 41; return; } //error: this chunk must be 6 bytes for RGB image + if (chunkLength != 2) + { + error = 40; + return; + } //error: this chunk must be 2 bytes for greyscale image info.key_defined = 1; - info.key_r = 256 * in[pos] + in[pos + 1]; pos += 2; - info.key_g = 256 * in[pos] + in[pos + 1]; pos += 2; - info.key_b = 256 * in[pos] + in[pos + 1]; pos += 2; + info.key_r = info.key_g = info.key_b = 256 * in[pos] + in[pos + 1]; + pos += 2; } - else { error = 42; return; } //error: tRNS chunk not allowed for other color models + else if (info.colorType == 2) + { + if (chunkLength != 6) + { + error = 41; + return; + } //error: this chunk must be 6 bytes for RGB image + info.key_defined = 1; + info.key_r = 256 * in[pos] + in[pos + 1]; + pos += 2; + info.key_g = 256 * in[pos] + in[pos + 1]; + pos += 2; + info.key_b = 256 * in[pos] + in[pos + 1]; + pos += 2; + } + else + { + error = 42; + return; + } //error: tRNS chunk not allowed for other color models } else //it's not an implemented chunk type, so ignore it: skip over the data { - if(!(in[pos + 0] & 32)) { error = 69; return; } //error: unknown critical chunk (5th bit of first byte of chunk type is 0) + if (!(in[pos + 0] & 32)) + { + error = 69; + return; + } //error: unknown critical chunk (5th bit of first byte of chunk type is 0) pos += (chunkLength + 4); //skip 4 letters and uninterpreted data of unimplemented chunk } pos += 4; //step over CRC (which is ignored) } unsigned long bpp = getBpp(info); - std::vector scanlines(((info.width * (info.height * bpp + 7)) / 8) + info.height); //now the out buffer will be filled - Zlib zlib; //decompress with the Zlib decompressor - error = zlib.decompress(scanlines, idat); if(error) return; //stop if the zlib decompressor returned an error + std::vector scanlines(((info.width * (info.height * bpp + 7)) / 8) + + info.height); //now the out buffer will be filled + Zlib zlib; //decompress with the Zlib decompressor + error = zlib.decompress(scanlines, idat); + if (error) + return; //stop if the zlib decompressor returned an error std::size_t bytewidth = (bpp + 7) / 8, outlength = (info.height * info.width * bpp + 7) / 8; out.resize(outlength); //time to fill the out buffer - unsigned char* out_ = outlength ? &out[0] : 0; //use a regular pointer to the std::vector for faster code if compiled without optimization - if(info.interlaceMethod == 0) //no interlace, just filter + unsigned char* out_ = outlength + ? &out[0] + : 0; //use a regular pointer to the std::vector for faster code if compiled without optimization + if (info.interlaceMethod == 0) //no interlace, just filter { - std::size_t linestart = 0, linelength = (info.width * bpp + 7) / 8; //length in bytes of a scanline, excluding the filtertype byte - if(bpp >= 8) //byte per byte - for(unsigned long y = 0; y < info.height; y++) - { - unsigned long filterType = scanlines[linestart]; - const unsigned char* prevline = (y == 0) ? 0 : &out_[(y - 1) * info.width * bytewidth]; - unFilterScanline(&out_[linestart - y], &scanlines[linestart + 1], prevline, bytewidth, filterType, linelength); if(error) return; - linestart += (1 + linelength); //go to start of next scanline - } - else //less than 8 bits per pixel, so fill it up bit per bit - { - std::vector templine((info.width * bpp + 7) >> 3); //only used if bpp < 8 - for(std::size_t y = 0, obp = 0; y < info.height; y++) + std::size_t linestart = 0, linelength = (info.width * bpp + 7) / + 8; //length in bytes of a scanline, excluding the filtertype byte + if (bpp >= 8) //byte per byte + for (unsigned long y = 0; y < info.height; y++) { unsigned long filterType = scanlines[linestart]; const unsigned char* prevline = (y == 0) ? 0 : &out_[(y - 1) * info.width * bytewidth]; - unFilterScanline(&templine[0], &scanlines[linestart + 1], prevline, bytewidth, filterType, linelength); if(error) return; - for(std::size_t bp = 0; bp < info.width * bpp;) setBitOfReversedStream(obp, out_, readBitFromReversedStream(bp, &templine[0])); + unFilterScanline(&out_[linestart - y], &scanlines[linestart + 1], prevline, bytewidth, + filterType, linelength); + if (error) + return; + linestart += (1 + linelength); //go to start of next scanline + } + else //less than 8 bits per pixel, so fill it up bit per bit + { + std::vector templine((info.width * bpp + 7) >> 3); //only used if bpp < 8 + for (std::size_t y = 0, obp = 0; y < info.height; y++) + { + unsigned long filterType = scanlines[linestart]; + const unsigned char* prevline = (y == 0) ? 0 : &out_[(y - 1) * info.width * bytewidth]; + unFilterScanline(&templine[0], &scanlines[linestart + 1], prevline, bytewidth, + filterType, linelength); + if (error) + return; + for (std::size_t bp = 0; bp < info.width * bpp;) + setBitOfReversedStream(obp, out_, readBitFromReversedStream(bp, &templine[0])); linestart += (1 + linelength); //go to start of next scanline } } } else //interlaceMethod is 1 (Adam7) { - std::size_t passw[7] = { (info.width + 7) / 8, (info.width + 3) / 8, (info.width + 3) / 4, (info.width + 1) / 4, (info.width + 1) / 2, (info.width + 0) / 2, (info.width + 0) / 1 }; - std::size_t passh[7] = { (info.height + 7) / 8, (info.height + 7) / 8, (info.height + 3) / 8, (info.height + 3) / 4, (info.height + 1) / 4, (info.height + 1) / 2, (info.height + 0) / 2 }; - std::size_t passstart[7] = {0}; - std::size_t pattern[28] = {0,4,0,2,0,1,0,0,0,4,0,2,0,1,8,8,4,4,2,2,1,8,8,8,4,4,2,2}; //values for the adam7 passes - for(int i = 0; i < 6; i++) passstart[i + 1] = passstart[i] + passh[i] * ((passw[i] ? 1 : 0) + (passw[i] * bpp + 7) / 8); - std::vector scanlineo((info.width * bpp + 7) / 8), scanlinen((info.width * bpp + 7) / 8); //"old" and "new" scanline - for(int i = 0; i < 7; i++) - adam7Pass(&out_[0], &scanlinen[0], &scanlineo[0], &scanlines[passstart[i]], info.width, pattern[i], pattern[i + 7], pattern[i + 14], pattern[i + 21], passw[i], passh[i], bpp); + std::size_t passw[7] = { (info.width + 7) / 8, (info.width + 3) / 8, (info.width + 3) / 4, + (info.width + 1) / 4, (info.width + 1) / 2, (info.width + 0) / 2, + (info.width + 0) / 1 }; + std::size_t passh[7] = { (info.height + 7) / 8, (info.height + 7) / 8, + (info.height + 3) / 8, (info.height + 3) / 4, + (info.height + 1) / 4, (info.height + 1) / 2, + (info.height + 0) / 2 }; + std::size_t passstart[7] = { 0 }; + std::size_t pattern[28] = { + 0, 4, 0, 2, 0, 1, 0, 0, 0, 4, 0, 2, 0, 1, 8, 8, 4, 4, 2, 2, 1, 8, 8, 8, 4, 4, 2, 2 + }; //values for the adam7 passes + for (int i = 0; i < 6; i++) + passstart[i + 1] = + passstart[i] + passh[i] * ((passw[i] ? 1 : 0) + (passw[i] * bpp + 7) / 8); + std::vector scanlineo((info.width * bpp + 7) / 8), + scanlinen((info.width * bpp + 7) / 8); //"old" and "new" scanline + for (int i = 0; i < 7; i++) + adam7Pass(&out_[0], &scanlinen[0], &scanlineo[0], &scanlines[passstart[i]], info.width, + pattern[i], pattern[i + 7], pattern[i + 14], pattern[i + 21], passw[i], + passh[i], bpp); } - if(convert_to_rgba32_flag && (info.colorType != 6 || info.bitDepth != 8)) //conversion needed + if (convert_to_rgba32_flag && (info.colorType != 6 || info.bitDepth != 8)) //conversion needed { std::vector data = out; error = convert(out, &data[0], info, info.width, info.height); } } - void readPngHeader(const unsigned char* in, std::size_t inlength) //read the information from the header and store it in the Info + void readPngHeader( + const unsigned char* in, + std::size_t inlength) //read the information from the header and store it in the Info { - if(inlength < 29) { error = 27; return; } //error: the data length is smaller than the length of the header - if(in[0] != 137 || in[1] != 80 || in[2] != 78 || in[3] != 71 || in[4] != 13 || in[5] != 10 || in[6] != 26 || in[7] != 10) { error = 28; return; } //no PNG signature - if(in[12] != 'I' || in[13] != 'H' || in[14] != 'D' || in[15] != 'R') { error = 29; return; } //error: it doesn't start with a IHDR chunk! - info.width = read32bitInt(&in[16]); info.height = read32bitInt(&in[20]); - info.bitDepth = in[24]; info.colorType = in[25]; - info.compressionMethod = in[26]; if(in[26] != 0) { error = 32; return; } //error: only compression method 0 is allowed in the specification - info.filterMethod = in[27]; if(in[27] != 0) { error = 33; return; } //error: only filter method 0 is allowed in the specification - info.interlaceMethod = in[28]; if(in[28] > 1) { error = 34; return; } //error: only interlace methods 0 and 1 exist in the specification + if (inlength < 29) + { + error = 27; + return; + } //error: the data length is smaller than the length of the header + if (in[0] != 137 || in[1] != 80 || in[2] != 78 || in[3] != 71 || in[4] != 13 || in[5] != 10 || + in[6] != 26 || in[7] != 10) + { + error = 28; + return; + } //no PNG signature + if (in[12] != 'I' || in[13] != 'H' || in[14] != 'D' || in[15] != 'R') + { + error = 29; + return; + } //error: it doesn't start with a IHDR chunk! + info.width = read32bitInt(&in[16]); + info.height = read32bitInt(&in[20]); + info.bitDepth = in[24]; + info.colorType = in[25]; + info.compressionMethod = in[26]; + if (in[26] != 0) + { + error = 32; + return; + } //error: only compression method 0 is allowed in the specification + info.filterMethod = in[27]; + if (in[27] != 0) + { + error = 33; + return; + } //error: only filter method 0 is allowed in the specification + info.interlaceMethod = in[28]; + if (in[28] > 1) + { + error = 34; + return; + } //error: only interlace methods 0 and 1 exist in the specification error = checkColorValidity(info.colorType, info.bitDepth); } - void unFilterScanline(unsigned char* recon, const unsigned char* scanline, const unsigned char* precon, std::size_t bytewidth, unsigned long filterType, std::size_t length) + void unFilterScanline(unsigned char* recon, const unsigned char* scanline, + const unsigned char* precon, std::size_t bytewidth, + unsigned long filterType, std::size_t length) { - switch(filterType) + switch (filterType) { - case 0: for(std::size_t i = 0; i < length; i++) recon[i] = scanline[i]; break; + case 0: + for (std::size_t i = 0; i < length; i++) + recon[i] = scanline[i]; + break; case 1: - for(std::size_t i = 0; i < bytewidth; i++) recon[i] = (unsigned char)(scanline[i]); - for(std::size_t i = bytewidth; i < length; i++) recon[i] = (unsigned char)(scanline[i] + recon[i - bytewidth]); + for (std::size_t i = 0; i < bytewidth; i++) + recon[i] = (unsigned char)(scanline[i]); + for (std::size_t i = bytewidth; i < length; i++) + recon[i] = (unsigned char)(scanline[i] + recon[i - bytewidth]); break; case 2: - if(precon) for(std::size_t i = 0; i < length; i++) recon[i] = (unsigned char)(scanline[i] + precon[i]); - else for(std::size_t i = 0; i < length; i++) recon[i] = (unsigned char)(scanline[i]); + if (precon) + for (std::size_t i = 0; i < length; i++) + recon[i] = (unsigned char)(scanline[i] + precon[i]); + else + for (std::size_t i = 0; i < length; i++) + recon[i] = (unsigned char)(scanline[i]); break; case 3: - if(precon) + if (precon) { - for(std::size_t i = 0; i < bytewidth; i++) recon[i] = (unsigned char)(scanline[i] + precon[i] / 2); - for(std::size_t i = bytewidth; i < length; i++) recon[i] = (unsigned char)(scanline[i] + ((recon[i - bytewidth] + precon[i]) / 2)); + for (std::size_t i = 0; i < bytewidth; i++) + recon[i] = (unsigned char)(scanline[i] + precon[i] / 2); + for (std::size_t i = bytewidth; i < length; i++) + recon[i] = (unsigned char)(scanline[i] + ((recon[i - bytewidth] + precon[i]) / 2)); } else { - for(std::size_t i = 0; i < bytewidth; i++) recon[i] = (unsigned char)(scanline[i]); - for(std::size_t i = bytewidth; i < length; i++) recon[i] = (unsigned char)(scanline[i] + recon[i - bytewidth] / 2); + for (std::size_t i = 0; i < bytewidth; i++) + recon[i] = (unsigned char)(scanline[i]); + for (std::size_t i = bytewidth; i < length; i++) + recon[i] = (unsigned char)(scanline[i] + recon[i - bytewidth] / 2); } break; case 4: - if(precon) + if (precon) { - for(std::size_t i = 0; i < bytewidth; i++) recon[i] = (unsigned char)(scanline[i] + paethPredictor(0, precon[i], 0)); - for(std::size_t i = bytewidth; i < length; i++) recon[i] = (unsigned char)(scanline[i] + paethPredictor(recon[i - bytewidth], precon[i], precon[i - bytewidth])); + for (std::size_t i = 0; i < bytewidth; i++) + recon[i] = (unsigned char)(scanline[i] + paethPredictor(0, precon[i], 0)); + for (std::size_t i = bytewidth; i < length; i++) + recon[i] = + (unsigned char)(scanline[i] + paethPredictor(recon[i - bytewidth], precon[i], + precon[i - bytewidth])); } else { - for(std::size_t i = 0; i < bytewidth; i++) recon[i] = (unsigned char)(scanline[i]); - for(std::size_t i = bytewidth; i < length; i++) recon[i] = (unsigned char)(scanline[i] + paethPredictor(recon[i - bytewidth], 0, 0)); + for (std::size_t i = 0; i < bytewidth; i++) + recon[i] = (unsigned char)(scanline[i]); + for (std::size_t i = bytewidth; i < length; i++) + recon[i] = (unsigned char)(scanline[i] + paethPredictor(recon[i - bytewidth], 0, 0)); } break; - default: error = 36; return; //error: unexisting filter type given + default: + error = 36; + return; //error: unexisting filter type given } } - void adam7Pass(unsigned char* out, unsigned char* linen, unsigned char* lineo, const unsigned char* in, unsigned long w, std::size_t passleft, std::size_t passtop, std::size_t spacex, std::size_t spacey, std::size_t passw, std::size_t passh, unsigned long bpp) + void adam7Pass(unsigned char* out, unsigned char* linen, unsigned char* lineo, + const unsigned char* in, unsigned long w, std::size_t passleft, + std::size_t passtop, std::size_t spacex, std::size_t spacey, std::size_t passw, + std::size_t passh, unsigned long bpp) { //filter and reposition the pixels into the output when the image is Adam7 interlaced. This function can only do it after the full image is already decoded. The out buffer must have the correct allocated memory size already. - if(passw == 0) return; + if (passw == 0) + return; std::size_t bytewidth = (bpp + 7) / 8, linelength = 1 + ((bpp * passw + 7) / 8); - for(unsigned long y = 0; y < passh; y++) + for (unsigned long y = 0; y < passh; y++) { unsigned char filterType = in[y * linelength], *prevline = (y == 0) ? 0 : lineo; - unFilterScanline(linen, &in[y * linelength + 1], prevline, bytewidth, filterType, (w * bpp + 7) / 8); if(error) return; - if(bpp >= 8) for(std::size_t i = 0; i < passw; i++) for(std::size_t b = 0; b < bytewidth; b++) //b = current byte of this pixel - out[bytewidth * w * (passtop + spacey * y) + bytewidth * (passleft + spacex * i) + b] = linen[bytewidth * i + b]; - else for(std::size_t i = 0; i < passw; i++) - { - std::size_t obp = bpp * w * (passtop + spacey * y) + bpp * (passleft + spacex * i), bp = i * bpp; - for(std::size_t b = 0; b < bpp; b++) setBitOfReversedStream(obp, out, readBitFromReversedStream(bp, &linen[0])); - } - unsigned char* temp = linen; linen = lineo; lineo = temp; //swap the two buffer pointers "line old" and "line new" + unFilterScanline(linen, &in[y * linelength + 1], prevline, bytewidth, filterType, + (w * bpp + 7) / 8); + if (error) + return; + if (bpp >= 8) + for (std::size_t i = 0; i < passw; i++) + for (std::size_t b = 0; b < bytewidth; b++) //b = current byte of this pixel + out[bytewidth * w * (passtop + spacey * y) + bytewidth * (passleft + spacex * i) + + b] = linen[bytewidth * i + b]; + else + for (std::size_t i = 0; i < passw; i++) + { + std::size_t obp = bpp * w * (passtop + spacey * y) + bpp * (passleft + spacex * i), + bp = i * bpp; + for (std::size_t b = 0; b < bpp; b++) + setBitOfReversedStream(obp, out, readBitFromReversedStream(bp, &linen[0])); + } + unsigned char* temp = linen; + linen = lineo; + lineo = temp; //swap the two buffer pointers "line old" and "line new" } } - static unsigned long readBitFromReversedStream(std::size_t& bitp, const unsigned char* bits) { unsigned long result = (bits[bitp >> 3] >> (7 - (bitp & 0x7))) & 1; bitp++; return result;} - static unsigned long readBitsFromReversedStream(std::size_t& bitp, const unsigned char* bits, unsigned long nbits) + static unsigned long readBitFromReversedStream(std::size_t& bitp, const unsigned char* bits) { - unsigned long result = 0; - for(std::size_t i = nbits - 1; i < nbits; i--) result += ((readBitFromReversedStream(bitp, bits)) << i); + unsigned long result = (bits[bitp >> 3] >> (7 - (bitp & 0x7))) & 1; + bitp++; return result; } - void setBitOfReversedStream(std::size_t& bitp, unsigned char* bits, unsigned long bit) { bits[bitp >> 3] |= (unsigned char)( (bit << (7 - (bitp & 0x7))) ); bitp++; } - unsigned long read32bitInt(const unsigned char* buffer) { return ((unsigned long)buffer[0] << 24) | ((unsigned long)buffer[1] << 16) | ((unsigned long)buffer[2] << 8) | (unsigned long)buffer[3]; } - int checkColorValidity(unsigned long colorType, unsigned long bd) //return type is a LodePNG error code + static unsigned long readBitsFromReversedStream(std::size_t& bitp, const unsigned char* bits, + unsigned long nbits) { - if((colorType == 2 || colorType == 4 || colorType == 6)) { if(!(bd == 8 || bd == 16)) return 37; else return 0; } - else if(colorType == 0) { if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) return 37; else return 0; } - else if(colorType == 3) { if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 )) return 37; else return 0; } - else return 31; //unexisting color type + unsigned long result = 0; + for (std::size_t i = nbits - 1; i < nbits; i--) + result += ((readBitFromReversedStream(bitp, bits)) << i); + return result; + } + void setBitOfReversedStream(std::size_t& bitp, unsigned char* bits, unsigned long bit) + { + bits[bitp >> 3] |= (unsigned char)((bit << (7 - (bitp & 0x7)))); + bitp++; + } + unsigned long read32bitInt(const unsigned char* buffer) + { + return ((unsigned long)buffer[0] << 24) | ((unsigned long)buffer[1] << 16) | + ((unsigned long)buffer[2] << 8) | (unsigned long)buffer[3]; + } + int checkColorValidity(unsigned long colorType, + unsigned long bd) //return type is a LodePNG error code + { + if ((colorType == 2 || colorType == 4 || colorType == 6)) + { + if (!(bd == 8 || bd == 16)) + return 37; + else + return 0; + } + else if (colorType == 0) + { + if (!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) + return 37; + else + return 0; + } + else if (colorType == 3) + { + if (!(bd == 1 || bd == 2 || bd == 4 || bd == 8)) + return 37; + else + return 0; + } + else + return 31; //unexisting color type } unsigned long getBpp(const Info& linfo) { - if(linfo.colorType == 2) return (3 * linfo.bitDepth); - else if(linfo.colorType >= 4) return (linfo.colorType - 2) * linfo.bitDepth; - else return linfo.bitDepth; + if (linfo.colorType == 2) + return (3 * linfo.bitDepth); + else if (linfo.colorType >= 4) + return (linfo.colorType - 2) * linfo.bitDepth; + else + return linfo.bitDepth; } - int convert(std::vector& out, const unsigned char* in, Info& infoIn, unsigned long w, unsigned long h) + int convert(std::vector& out, const unsigned char* in, Info& infoIn, + unsigned long w, unsigned long h) { //converts from any color type to 32-bit. return value = LodePNG error code std::size_t numpixels = w * h, bp = 0; out.resize(numpixels * 4); - unsigned char* out_ = out.empty() ? 0 : &out[0]; //faster if compiled without optimization - if(infoIn.bitDepth == 8 && infoIn.colorType == 0) //greyscale - for(std::size_t i = 0; i < numpixels; i++) - { - out_[4 * i + 0] = out_[4 * i + 1] = out_[4 * i + 2] = in[i]; - out_[4 * i + 3] = (infoIn.key_defined && in[i] == infoIn.key_r) ? 0 : 255; - } - else if(infoIn.bitDepth == 8 && infoIn.colorType == 2) //RGB color - for(std::size_t i = 0; i < numpixels; i++) - { - for(std::size_t c = 0; c < 3; c++) out_[4 * i + c] = in[3 * i + c]; - out_[4 * i + 3] = (infoIn.key_defined == 1 && in[3 * i + 0] == infoIn.key_r && in[3 * i + 1] == infoIn.key_g && in[3 * i + 2] == infoIn.key_b) ? 0 : 255; - } - else if(infoIn.bitDepth == 8 && infoIn.colorType == 3) //indexed color (palette) - for(std::size_t i = 0; i < numpixels; i++) - { - if(4U * in[i] >= infoIn.palette.size()) return 46; - for(std::size_t c = 0; c < 4; c++) out_[4 * i + c] = infoIn.palette[4 * in[i] + c]; //get rgb colors from the palette - } - else if(infoIn.bitDepth == 8 && infoIn.colorType == 4) //greyscale with alpha - for(std::size_t i = 0; i < numpixels; i++) - { - out_[4 * i + 0] = out_[4 * i + 1] = out_[4 * i + 2] = in[2 * i + 0]; - out_[4 * i + 3] = in[2 * i + 1]; - } - else if(infoIn.bitDepth == 8 && infoIn.colorType == 6) for(std::size_t i = 0; i < numpixels; i++) for(std::size_t c = 0; c < 4; c++) out_[4 * i + c] = in[4 * i + c]; //RGB with alpha - else if(infoIn.bitDepth == 16 && infoIn.colorType == 0) //greyscale - for(std::size_t i = 0; i < numpixels; i++) - { - out_[4 * i + 0] = out_[4 * i + 1] = out_[4 * i + 2] = in[2 * i]; - out_[4 * i + 3] = (infoIn.key_defined && 256U * in[i] + in[i + 1] == infoIn.key_r) ? 0 : 255; - } - else if(infoIn.bitDepth == 16 && infoIn.colorType == 2) //RGB color - for(std::size_t i = 0; i < numpixels; i++) - { - for(std::size_t c = 0; c < 3; c++) out_[4 * i + c] = in[6 * i + 2 * c]; - out_[4 * i + 3] = (infoIn.key_defined && 256U*in[6*i+0]+in[6*i+1] == infoIn.key_r && 256U*in[6*i+2]+in[6*i+3] == infoIn.key_g && 256U*in[6*i+4]+in[6*i+5] == infoIn.key_b) ? 0 : 255; - } - else if(infoIn.bitDepth == 16 && infoIn.colorType == 4) //greyscale with alpha - for(std::size_t i = 0; i < numpixels; i++) - { - out_[4 * i + 0] = out_[4 * i + 1] = out_[4 * i + 2] = in[4 * i]; //most significant byte - out_[4 * i + 3] = in[4 * i + 2]; - } - else if(infoIn.bitDepth == 16 && infoIn.colorType == 6) for(std::size_t i = 0; i < numpixels; i++) for(std::size_t c = 0; c < 4; c++) out_[4 * i + c] = in[8 * i + 2 * c]; //RGB with alpha - else if(infoIn.bitDepth < 8 && infoIn.colorType == 0) //greyscale - for(std::size_t i = 0; i < numpixels; i++) - { - unsigned long value = (readBitsFromReversedStream(bp, in, infoIn.bitDepth) * 255) / ((1 << infoIn.bitDepth) - 1); //scale value from 0 to 255 - out_[4 * i + 0] = out_[4 * i + 1] = out_[4 * i + 2] = (unsigned char)(value); - out_[4 * i + 3] = (infoIn.key_defined && value && ((1U << infoIn.bitDepth) - 1U) == infoIn.key_r && ((1U << infoIn.bitDepth) - 1U)) ? 0 : 255; - } - else if(infoIn.bitDepth < 8 && infoIn.colorType == 3) //palette - for(std::size_t i = 0; i < numpixels; i++) - { - unsigned long value = readBitsFromReversedStream(bp, in, infoIn.bitDepth); - if(4 * value >= infoIn.palette.size()) return 47; - for(std::size_t c = 0; c < 4; c++) out_[4 * i + c] = infoIn.palette[4 * value + c]; //get rgb colors from the palette - } + unsigned char* out_ = out.empty() ? 0 : &out[0]; //faster if compiled without optimization + if (infoIn.bitDepth == 8 && infoIn.colorType == 0) //greyscale + for (std::size_t i = 0; i < numpixels; i++) + { + out_[4 * i + 0] = out_[4 * i + 1] = out_[4 * i + 2] = in[i]; + out_[4 * i + 3] = (infoIn.key_defined && in[i] == infoIn.key_r) ? 0 : 255; + } + else if (infoIn.bitDepth == 8 && infoIn.colorType == 2) //RGB color + for (std::size_t i = 0; i < numpixels; i++) + { + for (std::size_t c = 0; c < 3; c++) + out_[4 * i + c] = in[3 * i + c]; + out_[4 * i + 3] = (infoIn.key_defined == 1 && in[3 * i + 0] == infoIn.key_r && + in[3 * i + 1] == infoIn.key_g && in[3 * i + 2] == infoIn.key_b) + ? 0 + : 255; + } + else if (infoIn.bitDepth == 8 && infoIn.colorType == 3) //indexed color (palette) + for (std::size_t i = 0; i < numpixels; i++) + { + if (4U * in[i] >= infoIn.palette.size()) + return 46; + for (std::size_t c = 0; c < 4; c++) + out_[4 * i + c] = infoIn.palette[4 * in[i] + c]; //get rgb colors from the palette + } + else if (infoIn.bitDepth == 8 && infoIn.colorType == 4) //greyscale with alpha + for (std::size_t i = 0; i < numpixels; i++) + { + out_[4 * i + 0] = out_[4 * i + 1] = out_[4 * i + 2] = in[2 * i + 0]; + out_[4 * i + 3] = in[2 * i + 1]; + } + else if (infoIn.bitDepth == 8 && infoIn.colorType == 6) + for (std::size_t i = 0; i < numpixels; i++) + for (std::size_t c = 0; c < 4; c++) + out_[4 * i + c] = in[4 * i + c]; //RGB with alpha + else if (infoIn.bitDepth == 16 && infoIn.colorType == 0) //greyscale + for (std::size_t i = 0; i < numpixels; i++) + { + out_[4 * i + 0] = out_[4 * i + 1] = out_[4 * i + 2] = in[2 * i]; + out_[4 * i + 3] = + (infoIn.key_defined && 256U * in[i] + in[i + 1] == infoIn.key_r) ? 0 : 255; + } + else if (infoIn.bitDepth == 16 && infoIn.colorType == 2) //RGB color + for (std::size_t i = 0; i < numpixels; i++) + { + for (std::size_t c = 0; c < 3; c++) + out_[4 * i + c] = in[6 * i + 2 * c]; + out_[4 * i + 3] = + (infoIn.key_defined && 256U * in[6 * i + 0] + in[6 * i + 1] == infoIn.key_r && + 256U * in[6 * i + 2] + in[6 * i + 3] == infoIn.key_g && + 256U * in[6 * i + 4] + in[6 * i + 5] == infoIn.key_b) + ? 0 + : 255; + } + else if (infoIn.bitDepth == 16 && infoIn.colorType == 4) //greyscale with alpha + for (std::size_t i = 0; i < numpixels; i++) + { + out_[4 * i + 0] = out_[4 * i + 1] = out_[4 * i + 2] = in[4 * i]; //most significant byte + out_[4 * i + 3] = in[4 * i + 2]; + } + else if (infoIn.bitDepth == 16 && infoIn.colorType == 6) + for (std::size_t i = 0; i < numpixels; i++) + for (std::size_t c = 0; c < 4; c++) + out_[4 * i + c] = in[8 * i + 2 * c]; //RGB with alpha + else if (infoIn.bitDepth < 8 && infoIn.colorType == 0) //greyscale + for (std::size_t i = 0; i < numpixels; i++) + { + unsigned long value = (readBitsFromReversedStream(bp, in, infoIn.bitDepth) * 255) / + ((1 << infoIn.bitDepth) - 1); //scale value from 0 to 255 + out_[4 * i + 0] = out_[4 * i + 1] = out_[4 * i + 2] = (unsigned char)(value); + out_[4 * i + 3] = + (infoIn.key_defined && value && ((1U << infoIn.bitDepth) - 1U) == infoIn.key_r && + ((1U << infoIn.bitDepth) - 1U)) + ? 0 + : 255; + } + else if (infoIn.bitDepth < 8 && infoIn.colorType == 3) //palette + for (std::size_t i = 0; i < numpixels; i++) + { + unsigned long value = readBitsFromReversedStream(bp, in, infoIn.bitDepth); + if (4 * value >= infoIn.palette.size()) + return 47; + for (std::size_t c = 0; c < 4; c++) + out_[4 * i + c] = infoIn.palette[4 * value + c]; //get rgb colors from the palette + } return 0; } - unsigned char paethPredictor(short a, short b, short c) //Paeth predicter, used by PNG filter type 4 + unsigned char paethPredictor(short a, short b, + short c) //Paeth predicter, used by PNG filter type 4 { - short p = short(a + b - c), pa = short(p > a ? (p - a) : (a - p)), pb = short(p > b ? (p - b) : (b - p)), pc = short(p > c ? (p - c) : (c - p)); + short p = short(a + b - c), pa = short(p > a ? (p - a) : (a - p)), + pb = short(p > b ? (p - b) : (b - p)), pc = short(p > c ? (p - c) : (c - p)); return (unsigned char)((pa <= pb && pa <= pc) ? a : pb <= pc ? b : c); } }; - PNG decoder; decoder.decode(out_image, in_png, in_size, convert_to_rgba32); - image_width = decoder.info.width; image_height = decoder.info.height; + PNG decoder; + decoder.decode(out_image, in_png, in_size, convert_to_rgba32); + image_width = decoder.info.width; + image_height = decoder.info.height; return decoder.error; } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/DecodePNG.h b/vtkm/rendering/DecodePNG.h index c05428d52..369e8cce8 100644 --- a/vtkm/rendering/DecodePNG.h +++ b/vtkm/rendering/DecodePNG.h @@ -26,17 +26,15 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ VTKM_RENDERING_EXPORT -int DecodePNG(std::vector& out_image, - unsigned long& image_width, - unsigned long& image_height, - const unsigned char* in_png, - std::size_t in_size, - bool convert_to_rgba32=true); - +int DecodePNG(std::vector& out_image, unsigned long& image_width, + unsigned long& image_height, const unsigned char* in_png, std::size_t in_size, + bool convert_to_rgba32 = true); } } // vtkm::rendering diff --git a/vtkm/rendering/Mapper.cxx b/vtkm/rendering/Mapper.cxx index f11960f2d..de9215dc1 100644 --- a/vtkm/rendering/Mapper.cxx +++ b/vtkm/rendering/Mapper.cxx @@ -20,15 +20,18 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -Mapper::~Mapper() { } +Mapper::~Mapper() +{ +} -void Mapper::SetActiveColorTable(const vtkm::rendering::ColorTable &colorTable) +void Mapper::SetActiveColorTable(const vtkm::rendering::ColorTable& colorTable) { colorTable.Sample(1024, this->ColorMap); } - } } diff --git a/vtkm/rendering/Mapper.h b/vtkm/rendering/Mapper.h index cffa7057c..6caa880aa 100644 --- a/vtkm/rendering/Mapper.h +++ b/vtkm/rendering/Mapper.h @@ -26,38 +26,38 @@ #include #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT Mapper { public: VTKM_CONT - Mapper() - { - } + Mapper() {} virtual ~Mapper(); + virtual void RenderCells(const vtkm::cont::DynamicCellSet& cellset, + const vtkm::cont::CoordinateSystem& coords, + const vtkm::cont::Field& scalarField, + const vtkm::rendering::ColorTable& colorTable, + const vtkm::rendering::Camera& camera, + const vtkm::Range& scalarRange) = 0; - virtual void RenderCells(const vtkm::cont::DynamicCellSet &cellset, - const vtkm::cont::CoordinateSystem &coords, - const vtkm::cont::Field &scalarField, - const vtkm::rendering::ColorTable &colorTable, - const vtkm::rendering::Camera &camera, - const vtkm::Range &scalarRange) = 0; - - virtual void SetActiveColorTable(const ColorTable &ct); + virtual void SetActiveColorTable(const ColorTable& ct); virtual void StartScene() = 0; virtual void EndScene() = 0; - virtual void SetCanvas(vtkm::rendering::Canvas *canvas) = 0; + virtual void SetCanvas(vtkm::rendering::Canvas* canvas) = 0; virtual vtkm::rendering::Canvas* GetCanvas() const = 0; - virtual vtkm::rendering::Mapper *NewCopy() const = 0; + virtual vtkm::rendering::Mapper* NewCopy() const = 0; protected: - vtkm::cont::ArrayHandle > ColorMap; + vtkm::cont::ArrayHandle> ColorMap; }; -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif //vtk_m_rendering_Mapper_h diff --git a/vtkm/rendering/MapperGL.cxx b/vtkm/rendering/MapperGL.cxx index f614f0576..179e9b055 100644 --- a/vtkm/rendering/MapperGL.cxx +++ b/vtkm/rendering/MapperGL.cxx @@ -29,12 +29,17 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -namespace { +namespace +{ -struct TypeListTagId4 : vtkm::ListTagBase > { }; +struct TypeListTagId4 : vtkm::ListTagBase> +{ +}; typedef TypeListTagId4 Id4Type; class MapColorAndVertices : public vtkm::worklet::WorkletMapField @@ -44,31 +49,24 @@ public: const vtkm::Float32 SMin, SDiff; VTKM_CONT - MapColorAndVertices(const vtkm::rendering::ColorTable &colorTable, - vtkm::Float32 sMin, vtkm::Float32 sDiff) - : ColorTable(colorTable), - SMin(sMin), - SDiff(sDiff) - {} - typedef void ControlSignature(FieldIn vertexId, - WholeArrayIn indices, - WholeArrayIn scalar, - WholeArrayIn verts, + MapColorAndVertices(const vtkm::rendering::ColorTable& colorTable, vtkm::Float32 sMin, + vtkm::Float32 sDiff) + : ColorTable(colorTable) + , SMin(sMin) + , SDiff(sDiff) + { + } + typedef void ControlSignature(FieldIn vertexId, WholeArrayIn indices, + WholeArrayIn scalar, WholeArrayIn verts, WholeArrayOut out_color, WholeArrayOut out_vertices); typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - template - VTKM_EXEC - void operator()(const vtkm::Id &i, - InputArrayIndexPortalType &indices, - const InputArrayPortalType &scalar, - const InputArrayV3PortalType &verts, - OutputArrayPortalType &c_array, - OutputArrayPortalType &v_array) const + template + VTKM_EXEC void operator()(const vtkm::Id& i, InputArrayIndexPortalType& indices, + const InputArrayPortalType& scalar, const InputArrayV3PortalType& verts, + OutputArrayPortalType& c_array, OutputArrayPortalType& v_array) const { vtkm::Vec idx = indices.Get(i); vtkm::Id i1 = idx[1]; @@ -85,41 +83,41 @@ public: const vtkm::Id offset = 9; s = scalar.Get(i1); - s = (s-SMin)/SDiff; + s = (s - SMin) / SDiff; color = ColorTable.MapRGB(s); - v_array.Set(i*offset, p1[0]); - v_array.Set(i*offset+1, p1[1]); - v_array.Set(i*offset+2, p1[2]); - c_array.Set(i*offset, color.Components[0]); - c_array.Set(i*offset+1, color.Components[1]); - c_array.Set(i*offset+2, color.Components[2]); + v_array.Set(i * offset, p1[0]); + v_array.Set(i * offset + 1, p1[1]); + v_array.Set(i * offset + 2, p1[2]); + c_array.Set(i * offset, color.Components[0]); + c_array.Set(i * offset + 1, color.Components[1]); + c_array.Set(i * offset + 2, color.Components[2]); s = scalar.Get(i2); - s = (s-SMin)/SDiff; + s = (s - SMin) / SDiff; color = ColorTable.MapRGB(s); - v_array.Set(i*offset+3, p2[0]); - v_array.Set(i*offset+4, p2[1]); - v_array.Set(i*offset+5, p2[2]); - c_array.Set(i*offset+3, color.Components[0]); - c_array.Set(i*offset+4, color.Components[1]); - c_array.Set(i*offset+5, color.Components[2]); + v_array.Set(i * offset + 3, p2[0]); + v_array.Set(i * offset + 4, p2[1]); + v_array.Set(i * offset + 5, p2[2]); + c_array.Set(i * offset + 3, color.Components[0]); + c_array.Set(i * offset + 4, color.Components[1]); + c_array.Set(i * offset + 5, color.Components[2]); s = scalar.Get(i3); - s = (s-SMin)/SDiff; + s = (s - SMin) / SDiff; color = ColorTable.MapRGB(s); - v_array.Set(i*offset+6, p3[0]); - v_array.Set(i*offset+7, p3[1]); - v_array.Set(i*offset+8, p3[2]); - c_array.Set(i*offset+6, color.Components[0]); - c_array.Set(i*offset+7, color.Components[1]); - c_array.Set(i*offset+8, color.Components[2]); + v_array.Set(i * offset + 6, p3[0]); + v_array.Set(i * offset + 7, p3[1]); + v_array.Set(i * offset + 8, p3[2]); + c_array.Set(i * offset + 6, color.Components[0]); + c_array.Set(i * offset + 7, color.Components[1]); + c_array.Set(i * offset + 8, color.Components[2]); } }; -template +template struct MapColorAndVerticesInvokeFunctor { - vtkm::cont::ArrayHandle > TriangleIndices; + vtkm::cont::ArrayHandle> TriangleIndices; vtkm::rendering::ColorTable ColorTable; const vtkm::cont::ArrayHandle Scalar; const vtkm::Range ScalarRange; @@ -129,48 +127,43 @@ struct MapColorAndVerticesInvokeFunctor vtkm::cont::ArrayHandle OutVertices; VTKM_CONT - MapColorAndVerticesInvokeFunctor( - const vtkm::cont::ArrayHandle< vtkm::Vec > &indices, - const vtkm::rendering::ColorTable &colorTable, - const vtkm::cont::ArrayHandle &scalar, - const vtkm::Range &scalarRange, - const PtType &vertices, - vtkm::Float32 s_min, - vtkm::Float32 s_max, - vtkm::cont::ArrayHandle &out_color, - vtkm::cont::ArrayHandle &out_vertices): - TriangleIndices(indices), - ColorTable(colorTable), - Scalar(scalar), - ScalarRange(scalarRange), - Vertices(vertices), - Worklet(colorTable, s_min, s_max - s_min), + MapColorAndVerticesInvokeFunctor(const vtkm::cont::ArrayHandle>& indices, + const vtkm::rendering::ColorTable& colorTable, + const vtkm::cont::ArrayHandle& scalar, + const vtkm::Range& scalarRange, const PtType& vertices, + vtkm::Float32 s_min, vtkm::Float32 s_max, + vtkm::cont::ArrayHandle& out_color, + vtkm::cont::ArrayHandle& out_vertices) + : TriangleIndices(indices) + , ColorTable(colorTable) + , Scalar(scalar) + , ScalarRange(scalarRange) + , Vertices(vertices) + , Worklet(colorTable, s_min, s_max - s_min) + , - OutColor(out_color), - OutVertices(out_vertices) - {} + OutColor(out_color) + , OutVertices(out_vertices) + { + } - template - VTKM_CONT - bool operator()(Device) const + template + VTKM_CONT bool operator()(Device) const { VTKM_IS_DEVICE_ADAPTER_TAG(Device); - vtkm::worklet::DispatcherMapField - dispatcher(this->Worklet); + vtkm::worklet::DispatcherMapField dispatcher(this->Worklet); - vtkm::cont:: ArrayHandleIndex indexArray (this->TriangleIndices.GetNumberOfValues()); - dispatcher.Invoke(indexArray, this->TriangleIndices, this->Scalar, - this->Vertices, this->OutColor, this->OutVertices); + vtkm::cont::ArrayHandleIndex indexArray(this->TriangleIndices.GetNumberOfValues()); + dispatcher.Invoke(indexArray, this->TriangleIndices, this->Scalar, this->Vertices, + this->OutColor, this->OutVertices); return true; } }; -template -VTKM_CONT -void RenderStructuredLineSegments(vtkm::Id numVerts, - const PtType &verts, - const vtkm::cont::ArrayHandle &scalar) +template +VTKM_CONT void RenderStructuredLineSegments(vtkm::Id numVerts, const PtType& verts, + const vtkm::cont::ArrayHandle& scalar) { glDisable(GL_DEPTH_TEST); glDisable(GL_LIGHTING); @@ -187,11 +180,9 @@ void RenderStructuredLineSegments(vtkm::Id numVerts, glEnd(); } -template -VTKM_CONT -void RenderExplicitLineSegments(vtkm::Id numVerts, - const PtType &verts, - const vtkm::cont::ArrayHandle &scalar) +template +VTKM_CONT void RenderExplicitLineSegments(vtkm::Id numVerts, const PtType& verts, + const vtkm::cont::ArrayHandle& scalar) { glDisable(GL_DEPTH_TEST); glDisable(GL_LIGHTING); @@ -208,15 +199,13 @@ void RenderExplicitLineSegments(vtkm::Id numVerts, glEnd(); } -template -VTKM_CONT -void RenderTriangles(MapperGL &mapper, - vtkm::Id numTri, const PtType &verts, - const vtkm::cont::ArrayHandle< vtkm::Vec > &indices, - const vtkm::cont::ArrayHandle &scalar, - const vtkm::rendering::ColorTable &ct, - const vtkm::Range &scalarRange, - const vtkm::rendering::Camera &camera) +template +VTKM_CONT void RenderTriangles(MapperGL& mapper, vtkm::Id numTri, const PtType& verts, + const vtkm::cont::ArrayHandle>& indices, + const vtkm::cont::ArrayHandle& scalar, + const vtkm::rendering::ColorTable& ct, + const vtkm::Range& scalarRange, + const vtkm::rendering::Camera& camera) { if (!mapper.loaded) { @@ -229,32 +218,24 @@ void RenderTriangles(MapperGL &mapper, glewExperimental = GL_TRUE; GLenum GlewInitResult = glewInit(); if (GlewInitResult) - std::cerr << "ERROR: " << glewGetErrorString(GlewInitResult) << std::endl; + std::cerr << "ERROR: " << glewGetErrorString(GlewInitResult) << std::endl; mapper.loaded = true; vtkm::Float32 sMin = vtkm::Float32(scalarRange.Min); vtkm::Float32 sMax = vtkm::Float32(scalarRange.Max); vtkm::cont::ArrayHandle out_vertices, out_color; - out_vertices.Allocate(9*indices.GetNumberOfValues()); - out_color.Allocate(9*indices.GetNumberOfValues()); + out_vertices.Allocate(9 * indices.GetNumberOfValues()); + out_color.Allocate(9 * indices.GetNumberOfValues()); - vtkm::cont::TryExecute( - MapColorAndVerticesInvokeFunctor(indices, - ct, - scalar, - scalarRange, - verts, - sMin, - sMax, - out_color, - out_vertices)); + vtkm::cont::TryExecute(MapColorAndVerticesInvokeFunctor( + indices, ct, scalar, scalarRange, verts, sMin, sMax, out_color, out_vertices)); vtkm::Id vtx_cnt = out_vertices.GetNumberOfValues(); - vtkm::Float32 *v_ptr = out_vertices.GetStorage().StealArray(); - vtkm::Float32 *c_ptr = out_color.GetStorage().StealArray(); + vtkm::Float32* v_ptr = out_vertices.GetStorage().StealArray(); + vtkm::Float32* c_ptr = out_color.GetStorage().StealArray(); vtkm::Id floatSz = static_cast(sizeof(vtkm::Float32)); - GLsizeiptr sz = static_cast(vtx_cnt*floatSz); + GLsizeiptr sz = static_cast(vtx_cnt * floatSz); GLuint points_vbo = 0; glGenBuffers(1, &points_vbo); @@ -277,31 +258,29 @@ void RenderTriangles(MapperGL &mapper, glEnableVertexAttribArray(0); glEnableVertexAttribArray(1); - const char *vertex_shader = - "#version 120\n" - "attribute vec3 vertex_position;" - "attribute vec3 vertex_color;" - "varying vec3 ourColor;" - "uniform mat4 mv_matrix;" - "uniform mat4 p_matrix;" + const char* vertex_shader = "#version 120\n" + "attribute vec3 vertex_position;" + "attribute vec3 vertex_color;" + "varying vec3 ourColor;" + "uniform mat4 mv_matrix;" + "uniform mat4 p_matrix;" - "void main() {" - " gl_Position = p_matrix*mv_matrix * vec4(vertex_position, 1.0);" - " ourColor = vertex_color;" - "}"; - const char *fragment_shader = - "#version 120\n" - "varying vec3 ourColor;" - "void main() {" - " gl_FragColor = vec4 (ourColor, 1.0);" - "}"; + "void main() {" + " gl_Position = p_matrix*mv_matrix * vec4(vertex_position, 1.0);" + " ourColor = vertex_color;" + "}"; + const char* fragment_shader = "#version 120\n" + "varying vec3 ourColor;" + "void main() {" + " gl_FragColor = vec4 (ourColor, 1.0);" + "}"; GLuint vs = glCreateShader(GL_VERTEX_SHADER); glShaderSource(vs, 1, &vertex_shader, nullptr); glCompileShader(vs); GLint isCompiled = 0; glGetShaderiv(vs, GL_COMPILE_STATUS, &isCompiled); - if(isCompiled == GL_FALSE) + if (isCompiled == GL_FALSE) { GLint maxLength = 0; glGetShaderiv(vs, GL_INFO_LOG_LENGTH, &maxLength); @@ -312,35 +291,35 @@ void RenderTriangles(MapperGL &mapper, else { // The maxLength includes the nullptr character - GLchar *strInfoLog = new GLchar[maxLength + 1]; + GLchar* strInfoLog = new GLchar[maxLength + 1]; glGetShaderInfoLog(vs, maxLength, &maxLength, strInfoLog); msg = std::string(strInfoLog); - delete [] strInfoLog; + delete[] strInfoLog; } - throw vtkm::cont::ErrorBadValue("Shader compile error:"+msg); + throw vtkm::cont::ErrorBadValue("Shader compile error:" + msg); } GLuint fs = glCreateShader(GL_FRAGMENT_SHADER); glShaderSource(fs, 1, &fragment_shader, nullptr); glCompileShader(fs); glGetShaderiv(fs, GL_COMPILE_STATUS, &isCompiled); - if(isCompiled == GL_FALSE) + if (isCompiled == GL_FALSE) { GLint maxLength = 0; glGetShaderiv(fs, GL_INFO_LOG_LENGTH, &maxLength); std::string msg; if (maxLength <= 0) - msg = "No error message"; + msg = "No error message"; else { // The maxLength includes the nullptr character - GLchar *strInfoLog = new GLchar[maxLength + 1]; + GLchar* strInfoLog = new GLchar[maxLength + 1]; glGetShaderInfoLog(vs, maxLength, &maxLength, strInfoLog); msg = std::string(strInfoLog); - delete [] strInfoLog; + delete[] strInfoLog; } - throw vtkm::cont::ErrorBadValue("Shader compile error:"+msg); + throw vtkm::cont::ErrorBadValue("Shader compile error:" + msg); } mapper.shader_programme = glCreateProgram(); @@ -348,10 +327,10 @@ void RenderTriangles(MapperGL &mapper, { glAttachShader(mapper.shader_programme, fs); glAttachShader(mapper.shader_programme, vs); - glBindAttribLocation (mapper.shader_programme, 0, "vertex_position"); - glBindAttribLocation (mapper.shader_programme, 1, "vertex_color"); + glBindAttribLocation(mapper.shader_programme, 0, "vertex_position"); + glBindAttribLocation(mapper.shader_programme, 1, "vertex_color"); - glLinkProgram (mapper.shader_programme); + glLinkProgram(mapper.shader_programme); GLint linkStatus; glGetProgramiv(mapper.shader_programme, GL_LINK_STATUS, &linkStatus); if (!linkStatus) @@ -359,7 +338,7 @@ void RenderTriangles(MapperGL &mapper, char log[2048]; GLsizei len; glGetProgramInfoLog(mapper.shader_programme, 2048, &len, log); - std::string msg = std::string("Shader program link failed: ")+std::string(log); + std::string msg = std::string("Shader program link failed: ") + std::string(log); throw vtkm::cont::ErrorBadValue(msg); } } @@ -369,8 +348,8 @@ void RenderTriangles(MapperGL &mapper, { vtkm::Id width = mapper.GetCanvas()->GetWidth(); vtkm::Id height = mapper.GetCanvas()->GetWidth(); - vtkm::Matrix viewM = camera.CreateViewMatrix(); - vtkm::Matrix projM = camera.CreateProjectionMatrix(width,height); + vtkm::Matrix viewM = camera.CreateViewMatrix(); + vtkm::Matrix projM = camera.CreateProjectionMatrix(width, height); MatrixHelpers::CreateOGLMatrix(viewM, mapper.mvMat); MatrixHelpers::CreateOGLMatrix(projM, mapper.pMat); @@ -381,14 +360,16 @@ void RenderTriangles(MapperGL &mapper, GLint pID = glGetUniformLocation(mapper.shader_programme, "p_matrix"); glUniformMatrix4fv(pID, 1, GL_FALSE, mapper.pMat); glBindVertexArray(mapper.vao); - glDrawArrays(GL_TRIANGLES, 0, static_cast(numTri*3)); + glDrawArrays(GL_TRIANGLES, 0, static_cast(numTri * 3)); glUseProgram(0); } } } // anonymous namespace -MapperGL::MapperGL() : Canvas(nullptr), loaded(false) +MapperGL::MapperGL() + : Canvas(nullptr) + , loaded(false) { } @@ -396,15 +377,14 @@ MapperGL::~MapperGL() { } -void MapperGL::RenderCells(const vtkm::cont::DynamicCellSet &cellset, - const vtkm::cont::CoordinateSystem &coords, - const vtkm::cont::Field &scalarField, - const vtkm::rendering::ColorTable &colorTable, - const vtkm::rendering::Camera &camera, - const vtkm::Range &scalarRange) +void MapperGL::RenderCells(const vtkm::cont::DynamicCellSet& cellset, + const vtkm::cont::CoordinateSystem& coords, + const vtkm::cont::Field& scalarField, + const vtkm::rendering::ColorTable& colorTable, + const vtkm::rendering::Camera& camera, const vtkm::Range& scalarRange) { vtkm::cont::ArrayHandle sf; - sf = scalarField.GetData().Cast >(); + sf = scalarField.GetData().Cast>(); vtkm::cont::DynamicArrayHandleCoordinateSystem dcoords = coords.GetData(); vtkm::Id numVerts = coords.GetData().GetNumberOfValues(); @@ -416,45 +396,44 @@ void MapperGL::RenderCells(const vtkm::cont::DynamicCellSet &cellset, RenderStructuredLineSegments(numVerts, verts, sf); } else if (cellset.IsSameType(vtkm::cont::CellSetSingleType<>()) && - cellset.Cast >().GetCellShapeAsId() == - vtkm::CELL_SHAPE_LINE) + cellset.Cast>().GetCellShapeAsId() == + vtkm::CELL_SHAPE_LINE) { - vtkm::cont::ArrayHandle< vtkm::Vec > verts; - verts = dcoords.Cast > > (); + vtkm::cont::ArrayHandle> verts; + verts = dcoords.Cast>>(); RenderExplicitLineSegments(numVerts, verts, sf); } else { - vtkm::cont::ArrayHandle< vtkm::Vec > indices; + vtkm::cont::ArrayHandle> indices; vtkm::Id numTri; vtkm::rendering::internal::RunTriangulator(cellset, indices, numTri); vtkm::cont::ArrayHandleUniformPointCoordinates uVerts; - vtkm::cont::ArrayHandle< vtkm::Vec > eVerts; + vtkm::cont::ArrayHandle> eVerts; - if(dcoords.IsSameType(vtkm::cont::ArrayHandleUniformPointCoordinates())) + if (dcoords.IsSameType(vtkm::cont::ArrayHandleUniformPointCoordinates())) { uVerts = dcoords.Cast(); RenderTriangles(*this, numTri, uVerts, indices, sf, colorTable, scalarRange, camera); } - else if(dcoords.IsSameType(vtkm::cont::ArrayHandle< vtkm::Vec >())) + else if (dcoords.IsSameType(vtkm::cont::ArrayHandle>())) { - eVerts = dcoords.Cast > > (); + eVerts = dcoords.Cast>>(); RenderTriangles(*this, numTri, eVerts, indices, sf, colorTable, scalarRange, camera); } - else if(dcoords.IsSameType(vtkm::cont::ArrayHandleCartesianProduct< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle >())) + else if (dcoords.IsSameType(vtkm::cont::ArrayHandleCartesianProduct< + vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle>())) { - vtkm::cont::ArrayHandleCartesianProduct< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > rVerts; + vtkm::cont::ArrayHandleCartesianProduct, + vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle> + rVerts; rVerts = dcoords.Cast, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > > (); + vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle>>(); RenderTriangles(*this, numTri, rVerts, indices, sf, colorTable, scalarRange, camera); } } @@ -472,7 +451,7 @@ void MapperGL::EndScene() // Nothing needs to be done. } -void MapperGL::SetCanvas(vtkm::rendering::Canvas *c) +void MapperGL::SetCanvas(vtkm::rendering::Canvas* c) { if (c != nullptr) { @@ -482,16 +461,14 @@ void MapperGL::SetCanvas(vtkm::rendering::Canvas *c) } } -vtkm::rendering::Canvas * -MapperGL::GetCanvas() const +vtkm::rendering::Canvas* MapperGL::GetCanvas() const { return this->Canvas; } -vtkm::rendering::Mapper *MapperGL::NewCopy() const +vtkm::rendering::Mapper* MapperGL::NewCopy() const { return new vtkm::rendering::MapperGL(*this); } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/MapperGL.h b/vtkm/rendering/MapperGL.h index 33f2ecaec..0e2562a81 100644 --- a/vtkm/rendering/MapperGL.h +++ b/vtkm/rendering/MapperGL.h @@ -28,8 +28,10 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT MapperGL : public Mapper { @@ -38,27 +40,25 @@ public: ~MapperGL(); - void RenderCells(const vtkm::cont::DynamicCellSet &cellset, - const vtkm::cont::CoordinateSystem &coords, - const vtkm::cont::Field &scalarField, - const vtkm::rendering::ColorTable &colorTable, - const vtkm::rendering::Camera &, - const vtkm::Range &scalarRange) VTKM_OVERRIDE; + void RenderCells(const vtkm::cont::DynamicCellSet& cellset, + const vtkm::cont::CoordinateSystem& coords, const vtkm::cont::Field& scalarField, + const vtkm::rendering::ColorTable& colorTable, const vtkm::rendering::Camera&, + const vtkm::Range& scalarRange) VTKM_OVERRIDE; void StartScene() VTKM_OVERRIDE; void EndScene() VTKM_OVERRIDE; - void SetCanvas(vtkm::rendering::Canvas *canvas) VTKM_OVERRIDE; + void SetCanvas(vtkm::rendering::Canvas* canvas) VTKM_OVERRIDE; virtual vtkm::rendering::Canvas* GetCanvas() const VTKM_OVERRIDE; - vtkm::rendering::Mapper *NewCopy() const VTKM_OVERRIDE; + vtkm::rendering::Mapper* NewCopy() const VTKM_OVERRIDE; - vtkm::rendering::CanvasGL *Canvas; + vtkm::rendering::CanvasGL* Canvas; GLuint shader_programme; GLfloat mvMat[16], pMat[16]; bool loaded; GLuint vao; }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif //vtk_m_rendering_MapperGL_h diff --git a/vtkm/rendering/MapperRayTracer.cxx b/vtkm/rendering/MapperRayTracer.cxx index 38610577d..85ac47366 100644 --- a/vtkm/rendering/MapperRayTracer.cxx +++ b/vtkm/rendering/MapperRayTracer.cxx @@ -28,34 +28,33 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ struct MapperRayTracer::InternalsType { - vtkm::rendering::CanvasRayTracer *Canvas; - std::shared_ptr - RayTracerContainer; + vtkm::rendering::CanvasRayTracer* Canvas; + std::shared_ptr RayTracerContainer; VTKM_CONT InternalsType() : Canvas(nullptr) - { } + { + } - template - VTKM_CONT - vtkm::rendering::raytracing::RayTracer *GetRayTracer(Device) + template + VTKM_CONT vtkm::rendering::raytracing::RayTracer* GetRayTracer(Device) { VTKM_IS_DEVICE_ADAPTER_TAG(Device); typedef vtkm::rendering::raytracing::RayTracer RayTracerType; - typedef vtkm::cont::internal::SimplePolymorphicContainer - ContainerType; - RayTracerType *tracer = nullptr; + typedef vtkm::cont::internal::SimplePolymorphicContainer ContainerType; + RayTracerType* tracer = nullptr; if (this->RayTracerContainer) { - ContainerType *container = - dynamic_cast(this->RayTracerContainer.get()); + ContainerType* container = dynamic_cast(this->RayTracerContainer.get()); if (container) { tracer = &container->Item; @@ -64,8 +63,8 @@ struct MapperRayTracer::InternalsType if (tracer == nullptr) { - ContainerType *container - = new vtkm::cont::internal::SimplePolymorphicContainer; + ContainerType* container = + new vtkm::cont::internal::SimplePolymorphicContainer; tracer = &container->Item; this->RayTracerContainer.reset(container); } @@ -76,20 +75,21 @@ struct MapperRayTracer::InternalsType MapperRayTracer::MapperRayTracer() : Internals(new InternalsType) -{ } +{ +} MapperRayTracer::~MapperRayTracer() -{ } - -void MapperRayTracer::SetCanvas(vtkm::rendering::Canvas *canvas) { - if(canvas != nullptr) +} + +void MapperRayTracer::SetCanvas(vtkm::rendering::Canvas* canvas) +{ + if (canvas != nullptr) { this->Internals->Canvas = dynamic_cast(canvas); - if(this->Internals->Canvas == nullptr) + if (this->Internals->Canvas == nullptr) { - throw vtkm::cont::ErrorBadValue( - "Ray Tracer: bad canvas type. Must be CanvasRayTracer"); + throw vtkm::cont::ErrorBadValue("Ray Tracer: bad canvas type. Must be CanvasRayTracer"); } } else @@ -98,16 +98,15 @@ void MapperRayTracer::SetCanvas(vtkm::rendering::Canvas *canvas) } } -vtkm::rendering::Canvas * -MapperRayTracer::GetCanvas() const +vtkm::rendering::Canvas* MapperRayTracer::GetCanvas() const { return this->Internals->Canvas; } struct MapperRayTracer::RenderFunctor { - vtkm::rendering::MapperRayTracer *Self; - vtkm::cont::ArrayHandle > TriangleIndices; + vtkm::rendering::MapperRayTracer* Self; + vtkm::cont::ArrayHandle> TriangleIndices; vtkm::Id NumberOfTriangles; vtkm::cont::CoordinateSystem Coordinates; vtkm::cont::Field ScalarField; @@ -115,70 +114,55 @@ struct MapperRayTracer::RenderFunctor vtkm::Range ScalarRange; VTKM_CONT - RenderFunctor(vtkm::rendering::MapperRayTracer *self, - const vtkm::cont::ArrayHandle > &indices, - vtkm::Id numberOfTriangles, - const vtkm::cont::CoordinateSystem &coordinates, - const vtkm::cont::Field &scalarField, - const vtkm::rendering::Camera &camera, - const vtkm::Range &scalarRange) - : Self(self), - TriangleIndices(indices), - NumberOfTriangles(numberOfTriangles), - Coordinates(coordinates), - ScalarField(scalarField), - Camera(camera), - ScalarRange(scalarRange) - { } + RenderFunctor(vtkm::rendering::MapperRayTracer* self, + const vtkm::cont::ArrayHandle>& indices, + vtkm::Id numberOfTriangles, const vtkm::cont::CoordinateSystem& coordinates, + const vtkm::cont::Field& scalarField, const vtkm::rendering::Camera& camera, + const vtkm::Range& scalarRange) + : Self(self) + , TriangleIndices(indices) + , NumberOfTriangles(numberOfTriangles) + , Coordinates(coordinates) + , ScalarField(scalarField) + , Camera(camera) + , ScalarRange(scalarRange) + { + } - template + template bool operator()(Device) { VTKM_IS_DEVICE_ADAPTER_TAG(Device); - vtkm::rendering::raytracing::RayTracer *tracer = - this->Self->Internals->GetRayTracer(Device()); + vtkm::rendering::raytracing::RayTracer* tracer = + this->Self->Internals->GetRayTracer(Device()); - tracer->GetCamera().SetParameters(this->Camera, - *this->Self->Internals->Canvas); + tracer->GetCamera().SetParameters(this->Camera, *this->Self->Internals->Canvas); vtkm::Bounds dataBounds = this->Coordinates.GetBounds(); - tracer->SetData(this->Coordinates.GetData(), - this->TriangleIndices, - this->ScalarField, - this->NumberOfTriangles, - this->ScalarRange, - dataBounds); + tracer->SetData(this->Coordinates.GetData(), this->TriangleIndices, this->ScalarField, + this->NumberOfTriangles, this->ScalarRange, dataBounds); tracer->SetColorMap(this->Self->ColorMap); - tracer->SetBackgroundColor( - this->Self->Internals->Canvas->GetBackgroundColor().Components); + tracer->SetBackgroundColor(this->Self->Internals->Canvas->GetBackgroundColor().Components); tracer->Render(this->Self->Internals->Canvas); return true; } }; -void MapperRayTracer::RenderCells( - const vtkm::cont::DynamicCellSet &cellset, - const vtkm::cont::CoordinateSystem &coords, - const vtkm::cont::Field &scalarField, - const vtkm::rendering::ColorTable &vtkmNotUsed(colorTable), - const vtkm::rendering::Camera &camera, - const vtkm::Range &scalarRange) +void MapperRayTracer::RenderCells(const vtkm::cont::DynamicCellSet& cellset, + const vtkm::cont::CoordinateSystem& coords, + const vtkm::cont::Field& scalarField, + const vtkm::rendering::ColorTable& vtkmNotUsed(colorTable), + const vtkm::rendering::Camera& camera, + const vtkm::Range& scalarRange) { - vtkm::cont::ArrayHandle< vtkm::Vec > indices; + vtkm::cont::ArrayHandle> indices; vtkm::Id numberOfTriangles; - vtkm::rendering::internal::RunTriangulator( - cellset, indices, numberOfTriangles); + vtkm::rendering::internal::RunTriangulator(cellset, indices, numberOfTriangles); - RenderFunctor functor(this, - indices, - numberOfTriangles, - coords, - scalarField, - camera, - scalarRange); + RenderFunctor functor(this, indices, numberOfTriangles, coords, scalarField, camera, scalarRange); vtkm::cont::TryExecute(functor); } @@ -192,11 +176,9 @@ void MapperRayTracer::EndScene() // Nothing needs to be done. } -vtkm::rendering::Mapper *MapperRayTracer::NewCopy() const +vtkm::rendering::Mapper* MapperRayTracer::NewCopy() const { return new vtkm::rendering::MapperRayTracer(*this); } - - } } // vtkm::rendering diff --git a/vtkm/rendering/MapperRayTracer.h b/vtkm/rendering/MapperRayTracer.h index b7bf8d219..f1fa1eafb 100644 --- a/vtkm/rendering/MapperRayTracer.h +++ b/vtkm/rendering/MapperRayTracer.h @@ -26,8 +26,10 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT MapperRayTracer : public Mapper { @@ -36,20 +38,19 @@ public: ~MapperRayTracer(); - void SetCanvas(vtkm::rendering::Canvas *canvas) VTKM_OVERRIDE; + void SetCanvas(vtkm::rendering::Canvas* canvas) VTKM_OVERRIDE; virtual vtkm::rendering::Canvas* GetCanvas() const VTKM_OVERRIDE; - void RenderCells(const vtkm::cont::DynamicCellSet &cellset, - const vtkm::cont::CoordinateSystem &coords, - const vtkm::cont::Field &scalarField, - const vtkm::rendering::ColorTable &colorTable, - const vtkm::rendering::Camera &camera, - const vtkm::Range &scalarRange) VTKM_OVERRIDE; + void RenderCells(const vtkm::cont::DynamicCellSet& cellset, + const vtkm::cont::CoordinateSystem& coords, const vtkm::cont::Field& scalarField, + const vtkm::rendering::ColorTable& colorTable, + const vtkm::rendering::Camera& camera, + const vtkm::Range& scalarRange) VTKM_OVERRIDE; virtual void StartScene() VTKM_OVERRIDE; virtual void EndScene() VTKM_OVERRIDE; - vtkm::rendering::Mapper *NewCopy() const VTKM_OVERRIDE; + vtkm::rendering::Mapper* NewCopy() const VTKM_OVERRIDE; private: struct InternalsType; @@ -57,7 +58,6 @@ private: struct RenderFunctor; }; - } } //namespace vtkm::rendering diff --git a/vtkm/rendering/MapperVolume.cxx b/vtkm/rendering/MapperVolume.cxx index be9194564..c2d73fe4d 100644 --- a/vtkm/rendering/MapperVolume.cxx +++ b/vtkm/rendering/MapperVolume.cxx @@ -35,41 +35,38 @@ #define DEFAULT_SAMPLE_DISTANCE -1.f -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ struct MapperVolume::InternalsType { - vtkm::rendering::CanvasRayTracer *Canvas; + vtkm::rendering::CanvasRayTracer* Canvas; vtkm::Float32 SampleDistance; bool CompositeBackground; vtkm::cont::RuntimeDeviceTracker DeviceTracker; - std::shared_ptr - RayTracerContainer; + std::shared_ptr RayTracerContainer; VTKM_CONT InternalsType() - : Canvas(nullptr), - SampleDistance(DEFAULT_SAMPLE_DISTANCE), - CompositeBackground(true) - { } + : Canvas(nullptr) + , SampleDistance(DEFAULT_SAMPLE_DISTANCE) + , CompositeBackground(true) + { + } - template - VTKM_CONT - vtkm::rendering::raytracing::VolumeRendererStructured * - GetRayTracer(Device) + template + VTKM_CONT vtkm::rendering::raytracing::VolumeRendererStructured* GetRayTracer(Device) { VTKM_IS_DEVICE_ADAPTER_TAG(Device); - typedef vtkm::rendering::raytracing::VolumeRendererStructured - RayTracerType; - typedef vtkm::cont::internal::SimplePolymorphicContainer - ContainerType; - RayTracerType *tracer = nullptr; + typedef vtkm::rendering::raytracing::VolumeRendererStructured RayTracerType; + typedef vtkm::cont::internal::SimplePolymorphicContainer ContainerType; + RayTracerType* tracer = nullptr; if (this->RayTracerContainer) { - ContainerType *container = - dynamic_cast(this->RayTracerContainer.get()); + ContainerType* container = dynamic_cast(this->RayTracerContainer.get()); if (container) { tracer = &container->Item; @@ -78,8 +75,8 @@ struct MapperVolume::InternalsType if (tracer == nullptr) { - ContainerType *container - = new vtkm::cont::internal::SimplePolymorphicContainer; + ContainerType* container = + new vtkm::cont::internal::SimplePolymorphicContainer; tracer = &container->Item; this->RayTracerContainer.reset(container); } @@ -90,20 +87,21 @@ struct MapperVolume::InternalsType MapperVolume::MapperVolume() : Internals(new InternalsType) -{ } +{ +} MapperVolume::~MapperVolume() -{ } - -void MapperVolume::SetCanvas(vtkm::rendering::Canvas *canvas) { - if(canvas != nullptr) +} + +void MapperVolume::SetCanvas(vtkm::rendering::Canvas* canvas) +{ + if (canvas != nullptr) { this->Internals->Canvas = dynamic_cast(canvas); - if(this->Internals->Canvas == nullptr) + if (this->Internals->Canvas == nullptr) { - throw vtkm::cont::ErrorBadValue( - "Ray Tracer: bad canvas type. Must be CanvasRayTracer"); + throw vtkm::cont::ErrorBadValue("Ray Tracer: bad canvas type. Must be CanvasRayTracer"); } } else @@ -112,15 +110,14 @@ void MapperVolume::SetCanvas(vtkm::rendering::Canvas *canvas) } } -vtkm::rendering::Canvas * -MapperVolume::GetCanvas() const +vtkm::rendering::Canvas* MapperVolume::GetCanvas() const { return this->Internals->Canvas; } struct MapperVolume::RenderFunctor { - vtkm::rendering::MapperVolume *Self; + vtkm::rendering::MapperVolume* Self; vtkm::cont::CellSetStructured<3> CellSet; vtkm::cont::CoordinateSystem Coordinates; vtkm::cont::Field ScalarField; @@ -128,32 +125,30 @@ struct MapperVolume::RenderFunctor vtkm::Range ScalarRange; VTKM_CONT - RenderFunctor(vtkm::rendering::MapperVolume *self, - const vtkm::cont::CellSetStructured<3> cellSet, - const vtkm::cont::CoordinateSystem &coordinates, - const vtkm::cont::Field &scalarField, - const vtkm::rendering::Camera &camera, - const vtkm::Range &scalarRange) - : Self(self), - CellSet(cellSet), - Coordinates(coordinates), - ScalarField(scalarField), - Camera(camera), - ScalarRange(scalarRange) - { } + RenderFunctor(vtkm::rendering::MapperVolume* self, const vtkm::cont::CellSetStructured<3> cellSet, + const vtkm::cont::CoordinateSystem& coordinates, + const vtkm::cont::Field& scalarField, const vtkm::rendering::Camera& camera, + const vtkm::Range& scalarRange) + : Self(self) + , CellSet(cellSet) + , Coordinates(coordinates) + , ScalarField(scalarField) + , Camera(camera) + , ScalarRange(scalarRange) + { + } - template + template bool operator()(Device) { VTKM_IS_DEVICE_ADAPTER_TAG(Device); - vtkm::rendering::raytracing::VolumeRendererStructured *tracer = - this->Self->Internals->GetRayTracer(Device()); + vtkm::rendering::raytracing::VolumeRendererStructured* tracer = + this->Self->Internals->GetRayTracer(Device()); - tracer->GetCamera().SetParameters(this->Camera, - *this->Self->Internals->Canvas); + tracer->GetCamera().SetParameters(this->Camera, *this->Self->Internals->Canvas); // Check to see of the sample distance was set - if(this->Self->Internals->SampleDistance != DEFAULT_SAMPLE_DISTANCE) + if (this->Self->Internals->SampleDistance != DEFAULT_SAMPLE_DISTANCE) { tracer->SetSampleDistance(this->Self->Internals->SampleDistance); } @@ -161,44 +156,34 @@ struct MapperVolume::RenderFunctor tracer->SetCompositeBackground(this->Self->Internals->CompositeBackground); vtkm::Bounds dataBounds = this->Coordinates.GetBounds(); - tracer->SetData(this->Coordinates, - this->ScalarField, - dataBounds, - this->CellSet, + tracer->SetData(this->Coordinates, this->ScalarField, dataBounds, this->CellSet, this->ScalarRange); tracer->SetColorMap(this->Self->ColorMap); - tracer->SetBackgroundColor( - this->Self->Internals->Canvas->GetBackgroundColor().Components); + tracer->SetBackgroundColor(this->Self->Internals->Canvas->GetBackgroundColor().Components); tracer->Render(this->Self->Internals->Canvas); return true; } }; -void MapperVolume::RenderCells( - const vtkm::cont::DynamicCellSet &cellset, - const vtkm::cont::CoordinateSystem &coords, - const vtkm::cont::Field &scalarField, - const vtkm::rendering::ColorTable &vtkmNotUsed(colorTable), - const vtkm::rendering::Camera &camera, - const vtkm::Range &scalarRange) +void MapperVolume::RenderCells(const vtkm::cont::DynamicCellSet& cellset, + const vtkm::cont::CoordinateSystem& coords, + const vtkm::cont::Field& scalarField, + const vtkm::rendering::ColorTable& vtkmNotUsed(colorTable), + const vtkm::rendering::Camera& camera, + const vtkm::Range& scalarRange) { - if(!cellset.IsSameType(vtkm::cont::CellSetStructured<3>())) + if (!cellset.IsSameType(vtkm::cont::CellSetStructured<3>())) { - std::cerr<<"ERROR cell set type not currently supported\n"; + std::cerr << "ERROR cell set type not currently supported\n"; std::string theType = typeid(cellset).name(); - std::cerr<<"Type : "< >(), - coords, - scalarField, - camera, - scalarRange); - vtkm::cont::TryExecute(functor, - this->Internals->DeviceTracker, + RenderFunctor functor(this, cellset.Cast>(), coords, + scalarField, camera, scalarRange); + vtkm::cont::TryExecute(functor, this->Internals->DeviceTracker, VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG()); } } @@ -213,7 +198,7 @@ void MapperVolume::EndScene() // Nothing needs to be done. } -vtkm::rendering::Mapper *MapperVolume::NewCopy() const +vtkm::rendering::Mapper* MapperVolume::NewCopy() const { return new vtkm::rendering::MapperVolume(*this); } @@ -227,6 +212,5 @@ void MapperVolume::SetCompositeBackground(const bool compositeBackground) { this->Internals->CompositeBackground = compositeBackground; } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/MapperVolume.h b/vtkm/rendering/MapperVolume.h index c76e6c345..8989503fe 100644 --- a/vtkm/rendering/MapperVolume.h +++ b/vtkm/rendering/MapperVolume.h @@ -24,8 +24,10 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT MapperVolume : public Mapper { @@ -34,29 +36,29 @@ public: ~MapperVolume(); - void SetCanvas(vtkm::rendering::Canvas *canvas) VTKM_OVERRIDE; - virtual vtkm::rendering::Canvas* GetCanvas() const VTKM_OVERRIDE; + void SetCanvas(vtkm::rendering::Canvas* canvas) VTKM_OVERRIDE; + virtual vtkm::rendering::Canvas* GetCanvas() const VTKM_OVERRIDE; - virtual void RenderCells(const vtkm::cont::DynamicCellSet &cellset, - const vtkm::cont::CoordinateSystem &coords, - const vtkm::cont::Field &scalarField, - const vtkm::rendering::ColorTable &, //colorTable - const vtkm::rendering::Camera &camera, - const vtkm::Range &scalarRange) VTKM_OVERRIDE; + virtual void RenderCells(const vtkm::cont::DynamicCellSet& cellset, + const vtkm::cont::CoordinateSystem& coords, + const vtkm::cont::Field& scalarField, + const vtkm::rendering::ColorTable&, //colorTable + const vtkm::rendering::Camera& camera, + const vtkm::Range& scalarRange) VTKM_OVERRIDE; virtual void StartScene() VTKM_OVERRIDE; virtual void EndScene() VTKM_OVERRIDE; - vtkm::rendering::Mapper *NewCopy() const VTKM_OVERRIDE; + vtkm::rendering::Mapper* NewCopy() const VTKM_OVERRIDE; void SetSampleDistance(const vtkm::Float32 distance); void SetCompositeBackground(const bool compositeBackground); + private: struct InternalsType; std::shared_ptr Internals; struct RenderFunctor; }; - } } //namespace vtkm::rendering diff --git a/vtkm/rendering/MatrixHelpers.h b/vtkm/rendering/MatrixHelpers.h index 0f939b857..d02097e6b 100644 --- a/vtkm/rendering/MatrixHelpers.h +++ b/vtkm/rendering/MatrixHelpers.h @@ -23,25 +23,26 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ struct MatrixHelpers { - static VTKM_CONT - void CreateOGLMatrix(const vtkm::Matrix &mtx, - vtkm::Float32 *oglM) + static VTKM_CONT void CreateOGLMatrix(const vtkm::Matrix& mtx, + vtkm::Float32* oglM) { - oglM[ 0] = mtx[0][0]; - oglM[ 1] = mtx[1][0]; - oglM[ 2] = mtx[2][0]; - oglM[ 3] = mtx[3][0]; - oglM[ 4] = mtx[0][1]; - oglM[ 5] = mtx[1][1]; - oglM[ 6] = mtx[2][1]; - oglM[ 7] = mtx[3][1]; - oglM[ 8] = mtx[0][2]; - oglM[ 9] = mtx[1][2]; + oglM[0] = mtx[0][0]; + oglM[1] = mtx[1][0]; + oglM[2] = mtx[2][0]; + oglM[3] = mtx[3][0]; + oglM[4] = mtx[0][1]; + oglM[5] = mtx[1][1]; + oglM[6] = mtx[2][1]; + oglM[7] = mtx[3][1]; + oglM[8] = mtx[0][2]; + oglM[9] = mtx[1][2]; oglM[10] = mtx[2][2]; oglM[11] = mtx[3][2]; oglM[12] = mtx[0][3]; @@ -50,120 +51,119 @@ struct MatrixHelpers oglM[15] = mtx[3][3]; } - static VTKM_CONT - vtkm::Matrix ViewMatrix(const vtkm::Vec &position, - const vtkm::Vec &lookAt, - const vtkm::Vec &up) + static VTKM_CONT vtkm::Matrix ViewMatrix( + const vtkm::Vec& position, const vtkm::Vec& lookAt, + const vtkm::Vec& up) { - vtkm::Vec viewDir = position-lookAt; - vtkm::Vec right = vtkm::Cross(up,viewDir); - vtkm::Vec ru = vtkm::Cross(viewDir,right); + vtkm::Vec viewDir = position - lookAt; + vtkm::Vec right = vtkm::Cross(up, viewDir); + vtkm::Vec ru = vtkm::Cross(viewDir, right); vtkm::Normalize(viewDir); vtkm::Normalize(right); vtkm::Normalize(ru); - vtkm::Matrix matrix; + vtkm::Matrix matrix; vtkm::MatrixIdentity(matrix); - matrix(0,0) = right[0]; - matrix(0,1) = right[1]; - matrix(0,2) = right[2]; - matrix(1,0) = ru[0]; - matrix(1,1) = ru[1]; - matrix(1,2) = ru[2]; - matrix(2,0) = viewDir[0]; - matrix(2,1) = viewDir[1]; - matrix(2,2) = viewDir[2]; + matrix(0, 0) = right[0]; + matrix(0, 1) = right[1]; + matrix(0, 2) = right[2]; + matrix(1, 0) = ru[0]; + matrix(1, 1) = ru[1]; + matrix(1, 2) = ru[2]; + matrix(2, 0) = viewDir[0]; + matrix(2, 1) = viewDir[1]; + matrix(2, 2) = viewDir[2]; - matrix(0,3) = -vtkm::dot(right,position); - matrix(1,3) = -vtkm::dot(ru,position); - matrix(2,3) = -vtkm::dot(viewDir,position); + matrix(0, 3) = -vtkm::dot(right, position); + matrix(1, 3) = -vtkm::dot(ru, position); + matrix(2, 3) = -vtkm::dot(viewDir, position); return matrix; } - static VTKM_CONT - vtkm::Matrix WorldMatrix(const vtkm::Vec &neworigin, - const vtkm::Vec &newx, - const vtkm::Vec &newy, - const vtkm::Vec &newz) + static VTKM_CONT vtkm::Matrix WorldMatrix( + const vtkm::Vec& neworigin, const vtkm::Vec& newx, + const vtkm::Vec& newy, const vtkm::Vec& newz) { - vtkm::Matrix matrix; + vtkm::Matrix matrix; vtkm::MatrixIdentity(matrix); - matrix(0,0) = newx[0]; - matrix(0,1) = newy[0]; - matrix(0,2) = newz[0]; - matrix(1,0) = newx[1]; - matrix(1,1) = newy[1]; - matrix(1,2) = newz[1]; - matrix(2,0) = newx[2]; - matrix(2,1) = newy[2]; - matrix(2,2) = newz[2]; + matrix(0, 0) = newx[0]; + matrix(0, 1) = newy[0]; + matrix(0, 2) = newz[0]; + matrix(1, 0) = newx[1]; + matrix(1, 1) = newy[1]; + matrix(1, 2) = newz[1]; + matrix(2, 0) = newx[2]; + matrix(2, 1) = newy[2]; + matrix(2, 2) = newz[2]; - matrix(0,3) = neworigin[0]; - matrix(1,3) = neworigin[1]; - matrix(2,3) = neworigin[2]; + matrix(0, 3) = neworigin[0]; + matrix(1, 3) = neworigin[1]; + matrix(2, 3) = neworigin[2]; return matrix; } - static VTKM_CONT - vtkm::Matrix TrackballMatrix(vtkm::Float32 p1x, - vtkm::Float32 p1y, - vtkm::Float32 p2x, - vtkm::Float32 p2y) + static VTKM_CONT vtkm::Matrix TrackballMatrix(vtkm::Float32 p1x, + vtkm::Float32 p1y, + vtkm::Float32 p2x, + vtkm::Float32 p2y) { - const vtkm::Float32 RADIUS = 0.80f; //z value lookAt x = y = 0.0 + const vtkm::Float32 RADIUS = 0.80f; //z value lookAt x = y = 0.0 const vtkm::Float32 COMPRESSION = 3.5f; // multipliers for x and y. - const vtkm::Float32 AR3 = RADIUS*RADIUS*RADIUS; + const vtkm::Float32 AR3 = RADIUS * RADIUS * RADIUS; - vtkm::Matrix matrix; + vtkm::Matrix matrix; vtkm::MatrixIdentity(matrix); - if (p1x==p2x && p1y==p2y) { return matrix; } + if (p1x == p2x && p1y == p2y) + { + return matrix; + } - vtkm::Vec p1(p1x,p1y, AR3/((p1x*p1x+p1y*p1y)*COMPRESSION+AR3)); - vtkm::Vec p2(p2x,p2y, AR3/((p2x*p2x+p2y*p2y)*COMPRESSION+AR3)); - vtkm::Vec axis = vtkm::Normal(vtkm::Cross(p2,p1)); + vtkm::Vec p1(p1x, p1y, AR3 / ((p1x * p1x + p1y * p1y) * COMPRESSION + AR3)); + vtkm::Vec p2(p2x, p2y, AR3 / ((p2x * p2x + p2y * p2y) * COMPRESSION + AR3)); + vtkm::Vec axis = vtkm::Normal(vtkm::Cross(p2, p1)); - vtkm::Vec p2_p1(p2[0]-p1[0], p2[1]-p1[1], p2[2]-p1[2]); + vtkm::Vec p2_p1(p2[0] - p1[0], p2[1] - p1[1], p2[2] - p1[2]); vtkm::Float32 t = vtkm::Magnitude(p2_p1); t = vtkm::Min(vtkm::Max(t, -1.0f), 1.0f); - vtkm::Float32 phi = static_cast(-2.0f*asin(t/(2.0f*RADIUS))); - vtkm::Float32 val = static_cast(sin(phi/2.0f)); + vtkm::Float32 phi = static_cast(-2.0f * asin(t / (2.0f * RADIUS))); + vtkm::Float32 val = static_cast(sin(phi / 2.0f)); axis[0] *= val; axis[1] *= val; axis[2] *= val; //quaternion - vtkm::Float32 q[4] = {axis[0], axis[1], axis[2], static_cast(cos(phi/2.0f))}; + vtkm::Float32 q[4] = { axis[0], axis[1], axis[2], static_cast(cos(phi / 2.0f)) }; // normalize quaternion to unit magnitude - t = 1.0f / static_cast(sqrt(q[0]*q[0] + q[1]*q[1] + q[2]*q[2] + q[3]*q[3])); + t = 1.0f / + static_cast(sqrt(q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3])); q[0] *= t; q[1] *= t; q[2] *= t; q[3] *= t; - matrix(0,0) = 1 - 2 * (q[1]*q[1] + q[2]*q[2]); - matrix(0,1) = 2 * (q[0]*q[1] + q[2]*q[3]); - matrix(0,2) = (2 * (q[2]*q[0] - q[1]*q[3]) ); + matrix(0, 0) = 1 - 2 * (q[1] * q[1] + q[2] * q[2]); + matrix(0, 1) = 2 * (q[0] * q[1] + q[2] * q[3]); + matrix(0, 2) = (2 * (q[2] * q[0] - q[1] * q[3])); - matrix(1,0) = 2 * (q[0]*q[1] - q[2]*q[3]); - matrix(1,1) = 1 - 2 * (q[2]*q[2] + q[0]*q[0]); - matrix(1,2) = (2 * (q[1]*q[2] + q[0]*q[3]) ); + matrix(1, 0) = 2 * (q[0] * q[1] - q[2] * q[3]); + matrix(1, 1) = 1 - 2 * (q[2] * q[2] + q[0] * q[0]); + matrix(1, 2) = (2 * (q[1] * q[2] + q[0] * q[3])); - matrix(2,0) = (2 * (q[2]*q[0] + q[1]*q[3]) ); - matrix(2,1) = (2 * (q[1]*q[2] - q[0]*q[3]) ); - matrix(2,2) = (1 - 2 * (q[1]*q[1] + q[0]*q[0]) ); + matrix(2, 0) = (2 * (q[2] * q[0] + q[1] * q[3])); + matrix(2, 1) = (2 * (q[1] * q[2] - q[0] * q[3])); + matrix(2, 2) = (1 - 2 * (q[1] * q[1] + q[0] * q[0])); return matrix; } - }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif // vtk_m_rendering_MatrixHelpers_h diff --git a/vtkm/rendering/Scene.cxx b/vtkm/rendering/Scene.cxx index a9d2cb03f..32e422a9a 100644 --- a/vtkm/rendering/Scene.cxx +++ b/vtkm/rendering/Scene.cxx @@ -22,8 +22,10 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ struct Scene::InternalsType { @@ -32,14 +34,15 @@ struct Scene::InternalsType Scene::Scene() : Internals(new InternalsType) -{ } +{ +} -void Scene::AddActor(const vtkm::rendering::Actor &actor) +void Scene::AddActor(const vtkm::rendering::Actor& actor) { this->Internals->Actors.push_back(actor); } -const vtkm::rendering::Actor &Scene::GetActor(vtkm::IdComponent index) const +const vtkm::rendering::Actor& Scene::GetActor(vtkm::IdComponent index) const { return this->Internals->Actors[static_cast(index)]; } @@ -49,16 +52,13 @@ vtkm::IdComponent Scene::GetNumberOfActors() const return static_cast(this->Internals->Actors.size()); } -void Scene::Render(vtkm::rendering::Mapper &mapper, - vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Camera &camera) const +void Scene::Render(vtkm::rendering::Mapper& mapper, vtkm::rendering::Canvas& canvas, + const vtkm::rendering::Camera& camera) const { mapper.StartScene(); - for (vtkm::IdComponent actorIndex = 0; - actorIndex < this->GetNumberOfActors(); - actorIndex++) + for (vtkm::IdComponent actorIndex = 0; actorIndex < this->GetNumberOfActors(); actorIndex++) { - const vtkm::rendering::Actor &actor = this->GetActor(actorIndex); + const vtkm::rendering::Actor& actor = this->GetActor(actorIndex); actor.Render(mapper, canvas, camera); } mapper.EndScene(); @@ -67,9 +67,7 @@ void Scene::Render(vtkm::rendering::Mapper &mapper, vtkm::Bounds Scene::GetSpatialBounds() const { vtkm::Bounds bounds; - for (vtkm::IdComponent actorIndex = 0; - actorIndex < this->GetNumberOfActors(); - actorIndex++) + for (vtkm::IdComponent actorIndex = 0; actorIndex < this->GetNumberOfActors(); actorIndex++) { // accumulate all Actors' spatial bounds into the scene spatial bounds bounds.Include(this->GetActor(actorIndex).GetSpatialBounds()); @@ -77,6 +75,5 @@ vtkm::Bounds Scene::GetSpatialBounds() const return bounds; } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/Scene.h b/vtkm/rendering/Scene.h index 75878cbcb..a7d4d7863 100644 --- a/vtkm/rendering/Scene.h +++ b/vtkm/rendering/Scene.h @@ -29,23 +29,24 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT Scene { public: Scene(); - void AddActor(const vtkm::rendering::Actor &actor); + void AddActor(const vtkm::rendering::Actor& actor); - const vtkm::rendering::Actor &GetActor(vtkm::IdComponent index) const; + const vtkm::rendering::Actor& GetActor(vtkm::IdComponent index) const; vtkm::IdComponent GetNumberOfActors() const; - void Render(vtkm::rendering::Mapper &mapper, - vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Camera &camera) const; + void Render(vtkm::rendering::Mapper& mapper, vtkm::rendering::Canvas& canvas, + const vtkm::rendering::Camera& camera) const; vtkm::Bounds GetSpatialBounds() const; @@ -53,6 +54,7 @@ private: struct InternalsType; std::shared_ptr Internals; }; -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif //vtk_m_rendering_Scene_h diff --git a/vtkm/rendering/TextAnnotation.cxx b/vtkm/rendering/TextAnnotation.cxx index a78b0712a..07622df6d 100644 --- a/vtkm/rendering/TextAnnotation.cxx +++ b/vtkm/rendering/TextAnnotation.cxx @@ -20,13 +20,17 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -TextAnnotation::TextAnnotation(const std::string &text, - const vtkm::rendering::Color &color, +TextAnnotation::TextAnnotation(const std::string& text, const vtkm::rendering::Color& color, vtkm::Float32 scale) - : Text(text), TextColor(color), Scale(scale), Anchor(-1,-1) + : Text(text) + , TextColor(color) + , Scale(scale) + , Anchor(-1, -1) { } @@ -34,33 +38,39 @@ TextAnnotation::~TextAnnotation() { } -void TextAnnotation::SetText(const std::string &text) +void TextAnnotation::SetText(const std::string& text) { this->Text = text; } -const std::string &TextAnnotation::GetText() const +const std::string& TextAnnotation::GetText() const { return this->Text; } -void TextAnnotation::SetRawAnchor(const vtkm::Vec &anchor) +void TextAnnotation::SetRawAnchor(const vtkm::Vec& anchor) { this->Anchor = anchor; } void TextAnnotation::SetRawAnchor(vtkm::Float32 h, vtkm::Float32 v) { - this->SetRawAnchor(vtkm::make_Vec(h,v)); + this->SetRawAnchor(vtkm::make_Vec(h, v)); } void TextAnnotation::SetAlignment(HorizontalAlignment h, VerticalAlignment v) { switch (h) { - case Left: this->Anchor[0] = -1.0f; break; - case HCenter: this->Anchor[0] = 0.0f; break; - case Right: this->Anchor[0] = +1.0f; break; + case Left: + this->Anchor[0] = -1.0f; + break; + case HCenter: + this->Anchor[0] = 0.0f; + break; + case Right: + this->Anchor[0] = +1.0f; + break; } // For vertical alignment, "center" is generally the center @@ -74,9 +84,15 @@ void TextAnnotation::SetAlignment(HorizontalAlignment h, VerticalAlignment v) // the bottom of the window. switch (v) { - case Bottom: this->Anchor[1] = -1.0f; break; - case VCenter: this->Anchor[1] = -0.06f; break; - case Top: this->Anchor[1] = +1.0f; break; + case Bottom: + this->Anchor[1] = -1.0f; + break; + case VCenter: + this->Anchor[1] = -0.06f; + break; + case Top: + this->Anchor[1] = +1.0f; + break; } } @@ -84,6 +100,5 @@ void TextAnnotation::SetScale(vtkm::Float32 scale) { this->Scale = scale; } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/TextAnnotation.h b/vtkm/rendering/TextAnnotation.h index bbdd4be7a..c640616be 100644 --- a/vtkm/rendering/TextAnnotation.h +++ b/vtkm/rendering/TextAnnotation.h @@ -26,47 +26,48 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT TextAnnotation { public: enum HorizontalAlignment - { - Left, - HCenter, - Right - }; + { + Left, + HCenter, + Right + }; enum VerticalAlignment - { - Bottom, - VCenter, - Top - }; + { + Bottom, + VCenter, + Top + }; protected: - std::string Text; - Color TextColor; - vtkm::Float32 Scale; - vtkm::Vec Anchor; + std::string Text; + Color TextColor; + vtkm::Float32 Scale; + vtkm::Vec Anchor; public: - TextAnnotation(const std::string &text, - const vtkm::rendering::Color &color, + TextAnnotation(const std::string& text, const vtkm::rendering::Color& color, vtkm::Float32 scalar); virtual ~TextAnnotation(); - void SetText(const std::string &text); + void SetText(const std::string& text); - const std::string &GetText() const; + const std::string& GetText() const; /// Set the anchor point relative to the box containing the text. The anchor /// is scaled in both directions to the range [-1,1] with -1 at the lower /// left and 1 at the upper right. /// - void SetRawAnchor(const vtkm::Vec &anchor); + void SetRawAnchor(const vtkm::Vec& anchor); void SetRawAnchor(vtkm::Float32 h, vtkm::Float32 v); @@ -74,12 +75,10 @@ public: void SetScale(vtkm::Float32 scale); - virtual void Render(const vtkm::rendering::Camera &camera, - const vtkm::rendering::WorldAnnotator &worldAnnotator, - vtkm::rendering::Canvas &canvas) const = 0; + virtual void Render(const vtkm::rendering::Camera& camera, + const vtkm::rendering::WorldAnnotator& worldAnnotator, + vtkm::rendering::Canvas& canvas) const = 0; }; - - } } //namespace vtkm::rendering diff --git a/vtkm/rendering/TextAnnotationBillboard.cxx b/vtkm/rendering/TextAnnotationBillboard.cxx index 4914cf59c..291bb63dc 100644 --- a/vtkm/rendering/TextAnnotationBillboard.cxx +++ b/vtkm/rendering/TextAnnotationBillboard.cxx @@ -22,100 +22,84 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -TextAnnotationBillboard::TextAnnotationBillboard( - const std::string &text, - const vtkm::rendering::Color &color, - vtkm::Float32 scalar, - const vtkm::Vec &position, - vtkm::Float32 angleDegrees) - : TextAnnotation(text, color, scalar), - Position(position), - Angle(angleDegrees) -{ } +TextAnnotationBillboard::TextAnnotationBillboard(const std::string& text, + const vtkm::rendering::Color& color, + vtkm::Float32 scalar, + const vtkm::Vec& position, + vtkm::Float32 angleDegrees) + : TextAnnotation(text, color, scalar) + , Position(position) + , Angle(angleDegrees) +{ +} TextAnnotationBillboard::~TextAnnotationBillboard() -{ } +{ +} -void TextAnnotationBillboard::SetPosition( - const vtkm::Vec &position) +void TextAnnotationBillboard::SetPosition(const vtkm::Vec& position) { this->Position = position; } -void TextAnnotationBillboard::SetPosition( - vtkm::Float32 xpos, vtkm::Float32 ypos, vtkm::Float32 zpos) +void TextAnnotationBillboard::SetPosition(vtkm::Float32 xpos, vtkm::Float32 ypos, + vtkm::Float32 zpos) { this->SetPosition(vtkm::make_Vec(xpos, ypos, zpos)); } -void TextAnnotationBillboard::Render( - const vtkm::rendering::Camera &camera, - const vtkm::rendering::WorldAnnotator &worldAnnotator, - vtkm::rendering::Canvas &canvas) const +void TextAnnotationBillboard::Render(const vtkm::rendering::Camera& camera, + const vtkm::rendering::WorldAnnotator& worldAnnotator, + vtkm::rendering::Canvas& canvas) const { - using MatrixType = vtkm::Matrix; - using VectorType = vtkm::Vec; + using MatrixType = vtkm::Matrix; + using VectorType = vtkm::Vec; MatrixType viewMatrix = camera.CreateViewMatrix(); - MatrixType projectionMatrix - = camera.CreateProjectionMatrix(canvas.GetWidth(), canvas.GetHeight()); + MatrixType projectionMatrix = + camera.CreateProjectionMatrix(canvas.GetWidth(), canvas.GetHeight()); - VectorType screenPos = - vtkm::Transform3DPointPerspective( - vtkm::MatrixMultiply(projectionMatrix,viewMatrix), - this->Position); - - canvas.SetViewToScreenSpace(camera,true); + VectorType screenPos = vtkm::Transform3DPointPerspective( + vtkm::MatrixMultiply(projectionMatrix, viewMatrix), this->Position); + canvas.SetViewToScreenSpace(camera, true); MatrixType translateMatrix = - vtkm::Transform3DTranslate(screenPos[0], screenPos[1], -screenPos[2]); + vtkm::Transform3DTranslate(screenPos[0], screenPos[1], -screenPos[2]); - vtkm::Float32 windowAspect = - vtkm::Float32(canvas.GetWidth()) / vtkm::Float32(canvas.GetHeight()); + vtkm::Float32 windowAspect = vtkm::Float32(canvas.GetWidth()) / vtkm::Float32(canvas.GetHeight()); - MatrixType scaleMatrix = vtkm::Transform3DScale(1.f/windowAspect, 1.f, 1.f); + MatrixType scaleMatrix = vtkm::Transform3DScale(1.f / windowAspect, 1.f, 1.f); MatrixType viewportMatrix; vtkm::MatrixIdentity(viewportMatrix); //if view type == 2D? { vtkm::Float32 vl, vr, vb, vt; - camera.GetRealViewport(canvas.GetWidth(),canvas.GetHeight(),vl,vr,vb,vt); - vtkm::Float32 xs = (vr-vl); - vtkm::Float32 ys = (vt-vb); - viewportMatrix = vtkm::Transform3DScale(2.f/xs, 2.f/ys, 1.f); + camera.GetRealViewport(canvas.GetWidth(), canvas.GetHeight(), vl, vr, vb, vt); + vtkm::Float32 xs = (vr - vl); + vtkm::Float32 ys = (vt - vb); + viewportMatrix = vtkm::Transform3DScale(2.f / xs, 2.f / ys, 1.f); } - MatrixType rotateMatrix = - vtkm::Transform3DRotateZ(this->Angle * 3.14159265f / 180.f); + MatrixType rotateMatrix = vtkm::Transform3DRotateZ(this->Angle * 3.14159265f / 180.f); - vtkm::Matrix fullTransformMatrix = - vtkm::MatrixMultiply(translateMatrix, - vtkm::MatrixMultiply(scaleMatrix, - vtkm::MatrixMultiply(viewportMatrix, - rotateMatrix))); + vtkm::Matrix fullTransformMatrix = vtkm::MatrixMultiply( + translateMatrix, + vtkm::MatrixMultiply(scaleMatrix, vtkm::MatrixMultiply(viewportMatrix, rotateMatrix))); - VectorType origin = - vtkm::Transform3DPointPerspective(fullTransformMatrix, VectorType(0,0,0)); - VectorType right = - vtkm::Transform3DVector(fullTransformMatrix, VectorType(1,0,0)); - VectorType up = - vtkm::Transform3DVector(fullTransformMatrix, VectorType(0,1,0)); + VectorType origin = vtkm::Transform3DPointPerspective(fullTransformMatrix, VectorType(0, 0, 0)); + VectorType right = vtkm::Transform3DVector(fullTransformMatrix, VectorType(1, 0, 0)); + VectorType up = vtkm::Transform3DVector(fullTransformMatrix, VectorType(0, 1, 0)); - worldAnnotator.AddText(origin, - right, - up, - this->Scale, - this->Anchor, - this->TextColor, - this->Text); + worldAnnotator.AddText(origin, right, up, this->Scale, this->Anchor, this->TextColor, this->Text); - canvas.SetViewToWorldSpace(camera,true); + canvas.SetViewToWorldSpace(camera, true); } - } } // vtkm::rendering diff --git a/vtkm/rendering/TextAnnotationBillboard.h b/vtkm/rendering/TextAnnotationBillboard.h index 1d940fc42..418c8c41b 100644 --- a/vtkm/rendering/TextAnnotationBillboard.h +++ b/vtkm/rendering/TextAnnotationBillboard.h @@ -22,33 +22,32 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT TextAnnotationBillboard : public TextAnnotation { protected: - vtkm::Vec Position; + vtkm::Vec Position; vtkm::Float32 Angle; public: - TextAnnotationBillboard(const std::string &text, - const vtkm::rendering::Color &color, - vtkm::Float32 scalar, - const vtkm::Vec &position, + TextAnnotationBillboard(const std::string& text, const vtkm::rendering::Color& color, + vtkm::Float32 scalar, const vtkm::Vec& position, vtkm::Float32 angleDegrees = 0); ~TextAnnotationBillboard(); - void SetPosition(const vtkm::Vec &position); + void SetPosition(const vtkm::Vec& position); void SetPosition(vtkm::Float32 posx, vtkm::Float32 posy, vtkm::Float32 posz); - void Render(const vtkm::rendering::Camera &camera, - const vtkm::rendering::WorldAnnotator &worldAnnotator, - vtkm::rendering::Canvas &canvas) const VTKM_OVERRIDE; + void Render(const vtkm::rendering::Camera& camera, + const vtkm::rendering::WorldAnnotator& worldAnnotator, + vtkm::rendering::Canvas& canvas) const VTKM_OVERRIDE; }; - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/TextAnnotationScreen.cxx b/vtkm/rendering/TextAnnotationScreen.cxx index a955e9b31..6c7e18d94 100644 --- a/vtkm/rendering/TextAnnotationScreen.cxx +++ b/vtkm/rendering/TextAnnotationScreen.cxx @@ -20,25 +20,26 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -TextAnnotationScreen::TextAnnotationScreen( - const std::string &text, - const vtkm::rendering::Color &color, - vtkm::Float32 scale, - const vtkm::Vec &position, - vtkm::Float32 angleDegrees) - : TextAnnotation(text,color,scale), - Position(position), - Angle(angleDegrees) -{ } +TextAnnotationScreen::TextAnnotationScreen(const std::string& text, + const vtkm::rendering::Color& color, vtkm::Float32 scale, + const vtkm::Vec& position, + vtkm::Float32 angleDegrees) + : TextAnnotation(text, color, scale) + , Position(position) + , Angle(angleDegrees) +{ +} TextAnnotationScreen::~TextAnnotationScreen() -{ } +{ +} -void TextAnnotationScreen::SetPosition( - const vtkm::Vec &position) +void TextAnnotationScreen::SetPosition(const vtkm::Vec& position) { this->Position = position; } @@ -48,22 +49,14 @@ void TextAnnotationScreen::SetPosition(vtkm::Float32 xpos, vtkm::Float32 ypos) this->SetPosition(vtkm::make_Vec(xpos, ypos)); } -void TextAnnotationScreen::Render( - const vtkm::rendering::Camera &vtkmNotUsed(camera), - const vtkm::rendering::WorldAnnotator &vtkmNotUsed(annotator), - vtkm::rendering::Canvas &canvas) const +void TextAnnotationScreen::Render(const vtkm::rendering::Camera& vtkmNotUsed(camera), + const vtkm::rendering::WorldAnnotator& vtkmNotUsed(annotator), + vtkm::rendering::Canvas& canvas) const { - vtkm::Float32 windowAspect = vtkm::Float32(canvas.GetWidth()) / - vtkm::Float32(canvas.GetHeight()); + vtkm::Float32 windowAspect = vtkm::Float32(canvas.GetWidth()) / vtkm::Float32(canvas.GetHeight()); - canvas.AddText(this->Position, - this->Scale, - this->Angle, - windowAspect, - this->Anchor, - this->TextColor, - this->Text); + canvas.AddText(this->Position, this->Scale, this->Angle, windowAspect, this->Anchor, + this->TextColor, this->Text); } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/TextAnnotationScreen.h b/vtkm/rendering/TextAnnotationScreen.h index fa4819405..90c9a4c8d 100644 --- a/vtkm/rendering/TextAnnotationScreen.h +++ b/vtkm/rendering/TextAnnotationScreen.h @@ -22,33 +22,32 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT TextAnnotationScreen : public TextAnnotation { protected: - vtkm::Vec Position; + vtkm::Vec Position; vtkm::Float32 Angle; public: - TextAnnotationScreen(const std::string &text, - const vtkm::rendering::Color &color, - vtkm::Float32 scale, - const vtkm::Vec &position, + TextAnnotationScreen(const std::string& text, const vtkm::rendering::Color& color, + vtkm::Float32 scale, const vtkm::Vec& position, vtkm::Float32 angleDegrees = 0); ~TextAnnotationScreen(); - void SetPosition(const vtkm::Vec &position); + void SetPosition(const vtkm::Vec& position); void SetPosition(vtkm::Float32 posx, vtkm::Float32 posy); - void Render(const vtkm::rendering::Camera &camera, - const vtkm::rendering::WorldAnnotator &annotator, - vtkm::rendering::Canvas &canvas) const VTKM_OVERRIDE; + void Render(const vtkm::rendering::Camera& camera, + const vtkm::rendering::WorldAnnotator& annotator, + vtkm::rendering::Canvas& canvas) const VTKM_OVERRIDE; }; - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/TextureGL.cxx b/vtkm/rendering/TextureGL.cxx index 08ba5cb15..3b6cb3a5d 100644 --- a/vtkm/rendering/TextureGL.cxx +++ b/vtkm/rendering/TextureGL.cxx @@ -24,21 +24,28 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ struct TextureGL::InternalsType { GLuint Id; - int Dimension; - bool MIPMap; - bool Linear2D; - bool LinearMIP; + int Dimension; + bool MIPMap; + bool Linear2D; + bool LinearMIP; VTKM_CONT InternalsType() - : Id(0), Dimension(0), MIPMap(false), Linear2D(true), LinearMIP(true) - { } + : Id(0) + , Dimension(0) + , MIPMap(false) + , Linear2D(true) + , LinearMIP(true) + { + } VTKM_CONT ~InternalsType() @@ -52,10 +59,12 @@ struct TextureGL::InternalsType TextureGL::TextureGL() : Internals(new InternalsType) -{ } +{ +} TextureGL::~TextureGL() -{ } +{ +} bool TextureGL::Valid() const { @@ -135,16 +144,15 @@ void TextureGL::Disable() const } } -void TextureGL::CreateAlphaFromRGBA(vtkm::Id width, - vtkm::Id height, - const std::vector &rgba) +void TextureGL::CreateAlphaFromRGBA(vtkm::Id width, vtkm::Id height, + const std::vector& rgba) { this->Internals->Dimension = 2; - std::vector alpha(rgba.size()/4); - VTKM_ASSERT(width*height == static_cast(alpha.size())); - for (std::size_t i=0; i alpha(rgba.size() / 4); + VTKM_ASSERT(width * height == static_cast(alpha.size())); + for (std::size_t i = 0; i < alpha.size(); i++) { - alpha[i] = rgba[i*4+3]; + alpha[i] = rgba[i * 4 + 3]; } if (this->Internals->Id == 0) @@ -164,15 +172,9 @@ void TextureGL::CreateAlphaFromRGBA(vtkm::Id width, mpimap = true; glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE); #endif - glTexImage2D(GL_TEXTURE_2D, 0, - GL_ALPHA, - static_cast(width), static_cast(height), - 0, - GL_ALPHA, - GL_UNSIGNED_BYTE, - (void*)(&(alpha[0]))); + glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, static_cast(width), + static_cast(height), 0, GL_ALPHA, GL_UNSIGNED_BYTE, (void*)(&(alpha[0]))); } } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/TextureGL.h b/vtkm/rendering/TextureGL.h index 1371044ad..1bdda7b8b 100644 --- a/vtkm/rendering/TextureGL.h +++ b/vtkm/rendering/TextureGL.h @@ -29,8 +29,10 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT TextureGL { @@ -45,16 +47,13 @@ public: void Disable() const; - void CreateAlphaFromRGBA(vtkm::Id width, - vtkm::Id height, - const std::vector &rgba); + void CreateAlphaFromRGBA(vtkm::Id width, vtkm::Id height, const std::vector& rgba); private: struct InternalsType; std::shared_ptr Internals; }; - - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif //vtk_m_rendering_TextureGL_h diff --git a/vtkm/rendering/Triangulator.h b/vtkm/rendering/Triangulator.h index 5a6709d29..5f194edce 100644 --- a/vtkm/rendering/Triangulator.h +++ b/vtkm/rendering/Triangulator.h @@ -28,87 +28,91 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ /// \brief Triangulator creates a minimal set of triangles from a cell set. /// /// This class creates a array of triangle indices from both 3D and 2D /// explicit cell sets. This list can serve as input to opengl and the /// ray tracer scene renderers. TODO: Add regular grid support /// -template +template class Triangulator { private: typedef typename vtkm::cont::ArrayHandle IdArrayHandle; - typedef typename vtkm::cont::ArrayHandle< vtkm::Vec > Vec4ArrayHandle; + typedef typename vtkm::cont::ArrayHandle> Vec4ArrayHandle; typedef typename Vec4ArrayHandle::ExecutionTypes::Portal Vec4ArrayPortalType; typedef typename IdArrayHandle::ExecutionTypes::PortalConst IdPortalConstType; + public: - template + template class MemSet : public vtkm::worklet::WorkletMapField { T Value; + public: VTKM_CONT MemSet(T value) : Value(value) - {} + { + } typedef void ControlSignature(FieldOut<>); typedef void ExecutionSignature(_1); VTKM_EXEC - void operator()(T &outValue) const - { - outValue = Value; - } + void operator()(T& outValue) const { outValue = Value; } }; //class MemSet class CountTriangles : public vtkm::worklet::WorkletMapField { public: VTKM_CONT - CountTriangles(){} - typedef void ControlSignature(FieldIn<>, - FieldOut<>); - typedef void ExecutionSignature(_1, - _2); + CountTriangles() {} + typedef void ControlSignature(FieldIn<>, FieldOut<>); + typedef void ExecutionSignature(_1, _2); VTKM_EXEC - void operator()(const vtkm::Id &shapeType, - vtkm::Id &triangles) const + void operator()(const vtkm::Id& shapeType, vtkm::Id& triangles) const { - if( shapeType == vtkm::CELL_SHAPE_TRIANGLE ) triangles = 1; - else if( shapeType == vtkm::CELL_SHAPE_QUAD ) triangles = 2; - else if( shapeType == vtkm::CELL_SHAPE_TETRA ) triangles = 4; - else if( shapeType == vtkm::CELL_SHAPE_HEXAHEDRON ) triangles = 12; - else if( shapeType == vtkm::CELL_SHAPE_WEDGE ) triangles = 8; - else if( shapeType == vtkm::CELL_SHAPE_PYRAMID ) triangles = 6; - else triangles = 0; + if (shapeType == vtkm::CELL_SHAPE_TRIANGLE) + triangles = 1; + else if (shapeType == vtkm::CELL_SHAPE_QUAD) + triangles = 2; + else if (shapeType == vtkm::CELL_SHAPE_TETRA) + triangles = 4; + else if (shapeType == vtkm::CELL_SHAPE_HEXAHEDRON) + triangles = 12; + else if (shapeType == vtkm::CELL_SHAPE_WEDGE) + triangles = 8; + else if (shapeType == vtkm::CELL_SHAPE_PYRAMID) + triangles = 6; + else + triangles = 0; } }; //class CountTriangles template - class TrianglulateStructured : - public vtkm::worklet::WorkletMapPointToCell + class TrianglulateStructured : public vtkm::worklet::WorkletMapPointToCell { private: Vec4ArrayPortalType OutputIndices; + public: - typedef void ControlSignature(CellSetIn cellset, - FieldInTo<>); + typedef void ControlSignature(CellSetIn cellset, FieldInTo<>); typedef void ExecutionSignature(FromIndices, _2); //typedef _1 InputDomain; VTKM_CONT - TrianglulateStructured(vtkm::cont::ArrayHandle< vtkm::Vec > &outputIndices) + TrianglulateStructured(vtkm::cont::ArrayHandle>& outputIndices) { - this->OutputIndices = outputIndices.PrepareForOutput(outputIndices.GetNumberOfValues(), DeviceAdapter() ); + this->OutputIndices = + outputIndices.PrepareForOutput(outputIndices.GetNumberOfValues(), DeviceAdapter()); } //TODO: Remove the if/then with templates. - template - VTKM_EXEC - void operator()(const CellNodeVecType &cellIndices, - const vtkm::Id &cellIndex) const + template + VTKM_EXEC void operator()(const CellNodeVecType& cellIndices, const vtkm::Id& cellIndex) const { - vtkm::Vec triangle; + vtkm::Vec triangle; if (DIM == 2) { const vtkm::Id triangleOffset = cellIndex * 2; @@ -120,7 +124,7 @@ public: OutputIndices.Set(triangleOffset, triangle); // 0-3-2 triangle[2] = cellIndices[3]; - OutputIndices.Set(triangleOffset+1, triangle); + OutputIndices.Set(triangleOffset + 1, triangle); } else if (DIM == 3) { @@ -133,72 +137,71 @@ public: OutputIndices.Set(triangleOffset, triangle); // 0-3-2 triangle[2] = cellIndices[3]; - OutputIndices.Set(triangleOffset+1, triangle); + OutputIndices.Set(triangleOffset + 1, triangle); // 0-3-7 triangle[3] = cellIndices[7]; - OutputIndices.Set(triangleOffset+2, triangle); + OutputIndices.Set(triangleOffset + 2, triangle); // 0-4-7 triangle[2] = cellIndices[4]; - OutputIndices.Set(triangleOffset+3, triangle); + OutputIndices.Set(triangleOffset + 3, triangle); // 5-4-7 triangle[1] = cellIndices[5]; - OutputIndices.Set(triangleOffset+4, triangle); + OutputIndices.Set(triangleOffset + 4, triangle); // 5-6-7 triangle[2] = cellIndices[6]; - OutputIndices.Set(triangleOffset+5, triangle); + OutputIndices.Set(triangleOffset + 5, triangle); // 3-6-7 triangle[1] = cellIndices[3]; - OutputIndices.Set(triangleOffset+6, triangle); + OutputIndices.Set(triangleOffset + 6, triangle); // 3-6-2 triangle[3] = cellIndices[2]; - OutputIndices.Set(triangleOffset+7, triangle); + OutputIndices.Set(triangleOffset + 7, triangle); // 1-6-2 triangle[1] = cellIndices[1]; - OutputIndices.Set(triangleOffset+8, triangle); + OutputIndices.Set(triangleOffset + 8, triangle); // 1-6-5 triangle[3] = cellIndices[5]; - OutputIndices.Set(triangleOffset+9, triangle); + OutputIndices.Set(triangleOffset + 9, triangle); // 1-4-5 triangle[2] = cellIndices[4]; - OutputIndices.Set(triangleOffset+10, triangle); + OutputIndices.Set(triangleOffset + 10, triangle); // 1-4-0 triangle[3] = cellIndices[0]; - OutputIndices.Set(triangleOffset+11, triangle); + OutputIndices.Set(triangleOffset + 11, triangle); } } - }; class IndicesSort : public vtkm::worklet::WorkletMapField { public: VTKM_CONT - IndicesSort(){} + IndicesSort() {} typedef void ControlSignature(FieldInOut<>); typedef void ExecutionSignature(_1); VTKM_EXEC - void operator()( vtkm::Vec &triangleIndices) const + void operator()(vtkm::Vec& triangleIndices) const { // first field contains the id of the cell the // trianlge belongs to vtkm::Id temp; if (triangleIndices[1] > triangleIndices[3]) { - temp = triangleIndices[1]; - triangleIndices[1] = triangleIndices[3]; - triangleIndices[3] = temp; + temp = triangleIndices[1]; + triangleIndices[1] = triangleIndices[3]; + triangleIndices[3] = temp; } if (triangleIndices[1] > triangleIndices[2]) { - temp = triangleIndices[1]; - triangleIndices[1] = triangleIndices[2]; - triangleIndices[2] = temp; + temp = triangleIndices[1]; + triangleIndices[1] = triangleIndices[2]; + triangleIndices[2] = temp; } if (triangleIndices[2] > triangleIndices[3]) { - temp = triangleIndices[2]; - triangleIndices[2] = triangleIndices[3]; - triangleIndices[3] = temp; + temp = triangleIndices[2]; + triangleIndices[2] = triangleIndices[3]; + triangleIndices[3] = temp; } } }; //class IndicesSort @@ -206,14 +209,18 @@ public: struct IndicesLessThan { VTKM_EXEC_CONT - bool operator()(const vtkm::Vec &a, - const vtkm::Vec &b) const + bool operator()(const vtkm::Vec& a, const vtkm::Vec& b) const { - if(a[1] < b[1]) return true; - if(a[1] > b[1]) return false; - if(a[2] < b[2]) return true; - if(a[2] > b[2]) return false; - if(a[3] < b[3]) return true; + if (a[1] < b[1]) + return true; + if (a[1] > b[1]) + return false; + if (a[2] < b[2]) + return true; + if (a[2] > b[2]) + return false; + if (a[3] < b[3]) + return true; return false; } }; @@ -222,23 +229,23 @@ public: { public: VTKM_CONT - UniqueTriangles(){} - typedef void ControlSignature(ExecObject, - ExecObject); - typedef void ExecutionSignature(_1,_2,WorkIndex); + UniqueTriangles() {} + typedef void ControlSignature(ExecObject, ExecObject); + typedef void ExecutionSignature(_1, _2, WorkIndex); VTKM_EXEC - bool IsTwin(const vtkm::Vec &a, const vtkm::Vec &b) const + bool IsTwin(const vtkm::Vec& a, const vtkm::Vec& b) const { return (a[1] == b[1] && a[2] == b[2] && a[3] == b[3]); } VTKM_EXEC - void operator()(vtkm::exec::ExecutionWholeArrayConst > &indices, - vtkm::exec::ExecutionWholeArray &outputFlags, - const vtkm::Id &index) const + void operator()(vtkm::exec::ExecutionWholeArrayConst>& indices, + vtkm::exec::ExecutionWholeArray& outputFlags, + const vtkm::Id& index) const { - if (index == 0) return; + if (index == 0) + return; //if we are a shared face, mark ourself and neighbor for desctruction - if(IsTwin(indices.Get(index), indices.Get(index-1) )) + if (IsTwin(indices.Get(index), indices.Get(index - 1))) { outputFlags.Set(index, 0); outputFlags.Set(index - 1, 0); @@ -246,7 +253,6 @@ public: } }; //class UniqueTriangles - class Trianglulate : public vtkm::worklet::WorkletMapField { private: @@ -259,14 +265,14 @@ public: vtkm::Int32 HEX_INDICES; vtkm::Int32 WEDGE_INDICES; vtkm::Int32 PYRAMID_INDICES; + public: VTKM_CONT - Trianglulate(vtkm::cont::ArrayHandle< vtkm::Vec > &outputIndices, - const vtkm::cont::ArrayHandle &indices, - const vtkm::Id &size) - : Indices(indices.PrepareForInput(DeviceAdapter())) + Trianglulate(vtkm::cont::ArrayHandle>& outputIndices, + const vtkm::cont::ArrayHandle& indices, const vtkm::Id& size) + : Indices(indices.PrepareForInput(DeviceAdapter())) { - this->OutputIndices = outputIndices.PrepareForOutput(size, DeviceAdapter() ); + this->OutputIndices = outputIndices.PrepareForOutput(size, DeviceAdapter()); TRIANGLE_INDICES = 3; QUAD_INDICES = 4; TETRA_INDICES = 4; @@ -274,155 +280,148 @@ public: WEDGE_INDICES = 6; PYRAMID_INDICES = 5; } - typedef void ControlSignature(FieldIn<>, - FieldIn<>, - FieldIn<>); - typedef void ExecutionSignature(_1, - _2, - _3, - WorkIndex); + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldIn<>); + typedef void ExecutionSignature(_1, _2, _3, WorkIndex); VTKM_EXEC - void operator()(const vtkm::Id &shapeType, - const vtkm::Id &indexOffset, - const vtkm::Id &triangleOffset, - const vtkm::Id &cellId) const + void operator()(const vtkm::Id& shapeType, const vtkm::Id& indexOffset, + const vtkm::Id& triangleOffset, const vtkm::Id& cellId) const { - vtkm::Vec triangle; - if( shapeType == vtkm::CELL_SHAPE_TRIANGLE ) + vtkm::Vec triangle; + if (shapeType == vtkm::CELL_SHAPE_TRIANGLE) { - triangle[1] = Indices.Get(indexOffset+0); - triangle[2] = Indices.Get(indexOffset+1); - triangle[3] = Indices.Get(indexOffset+2); - triangle[0] = cellId; - OutputIndices.Set(triangleOffset, triangle); + triangle[1] = Indices.Get(indexOffset + 0); + triangle[2] = Indices.Get(indexOffset + 1); + triangle[3] = Indices.Get(indexOffset + 2); + triangle[0] = cellId; + OutputIndices.Set(triangleOffset, triangle); } - if( shapeType == vtkm::CELL_SHAPE_QUAD ) + if (shapeType == vtkm::CELL_SHAPE_QUAD) { - triangle[1] = Indices.Get(indexOffset+0); - triangle[2] = Indices.Get(indexOffset+1); - triangle[3] = Indices.Get(indexOffset+2); + triangle[1] = Indices.Get(indexOffset + 0); + triangle[2] = Indices.Get(indexOffset + 1); + triangle[3] = Indices.Get(indexOffset + 2); triangle[0] = cellId; OutputIndices.Set(triangleOffset, triangle); - triangle[2] = Indices.Get(indexOffset+3); - OutputIndices.Set(triangleOffset+1, triangle); + triangle[2] = Indices.Get(indexOffset + 3); + OutputIndices.Set(triangleOffset + 1, triangle); } - if( shapeType == vtkm::CELL_SHAPE_TETRA ) + if (shapeType == vtkm::CELL_SHAPE_TETRA) { // 0-1-2 - triangle[1] = Indices.Get(indexOffset+1); - triangle[2] = Indices.Get(indexOffset+0); - triangle[3] = Indices.Get(indexOffset+2); + triangle[1] = Indices.Get(indexOffset + 1); + triangle[2] = Indices.Get(indexOffset + 0); + triangle[3] = Indices.Get(indexOffset + 2); triangle[0] = cellId; OutputIndices.Set(triangleOffset, triangle); // 0-1-3 - triangle[1] = Indices.Get(indexOffset+1); - triangle[2] = Indices.Get(indexOffset+0); - triangle[3] = Indices.Get(indexOffset+3); + triangle[1] = Indices.Get(indexOffset + 1); + triangle[2] = Indices.Get(indexOffset + 0); + triangle[3] = Indices.Get(indexOffset + 3); - OutputIndices.Set(triangleOffset+1, triangle); + OutputIndices.Set(triangleOffset + 1, triangle); // 2-1-3 - triangle[1] = Indices.Get(indexOffset+1); - triangle[2] = Indices.Get(indexOffset+2); - triangle[3] = Indices.Get(indexOffset+3); - OutputIndices.Set(triangleOffset+2, triangle); + triangle[1] = Indices.Get(indexOffset + 1); + triangle[2] = Indices.Get(indexOffset + 2); + triangle[3] = Indices.Get(indexOffset + 3); + OutputIndices.Set(triangleOffset + 2, triangle); // 2-0-3 - triangle[1] = Indices.Get(indexOffset+2); - triangle[2] = Indices.Get(indexOffset+0); - triangle[3] = Indices.Get(indexOffset+3); - OutputIndices.Set(triangleOffset+3, triangle); + triangle[1] = Indices.Get(indexOffset + 2); + triangle[2] = Indices.Get(indexOffset + 0); + triangle[3] = Indices.Get(indexOffset + 3); + OutputIndices.Set(triangleOffset + 3, triangle); } - if( shapeType == vtkm::CELL_SHAPE_HEXAHEDRON ) + if (shapeType == vtkm::CELL_SHAPE_HEXAHEDRON) { // 0-1-2 - triangle[1] = Indices.Get(indexOffset+0); - triangle[2] = Indices.Get(indexOffset+1); - triangle[3] = Indices.Get(indexOffset+2); + triangle[1] = Indices.Get(indexOffset + 0); + triangle[2] = Indices.Get(indexOffset + 1); + triangle[3] = Indices.Get(indexOffset + 2); triangle[0] = cellId; OutputIndices.Set(triangleOffset, triangle); // 0-3-2 - triangle[2] = Indices.Get(indexOffset+3); - OutputIndices.Set(triangleOffset+1, triangle); + triangle[2] = Indices.Get(indexOffset + 3); + OutputIndices.Set(triangleOffset + 1, triangle); // 0-3-7 - triangle[3] = Indices.Get(indexOffset+7); - OutputIndices.Set(triangleOffset+2, triangle); + triangle[3] = Indices.Get(indexOffset + 7); + OutputIndices.Set(triangleOffset + 2, triangle); // 0-4-7 - triangle[2] = Indices.Get(indexOffset+4); - OutputIndices.Set(triangleOffset+3, triangle); + triangle[2] = Indices.Get(indexOffset + 4); + OutputIndices.Set(triangleOffset + 3, triangle); // 5-4-7 - triangle[1] = Indices.Get(indexOffset+5); - OutputIndices.Set(triangleOffset+4, triangle); + triangle[1] = Indices.Get(indexOffset + 5); + OutputIndices.Set(triangleOffset + 4, triangle); // 5-6-7 - triangle[2] = Indices.Get(indexOffset+6); - OutputIndices.Set(triangleOffset+5, triangle); + triangle[2] = Indices.Get(indexOffset + 6); + OutputIndices.Set(triangleOffset + 5, triangle); // 3-6-7 - triangle[1] = Indices.Get(indexOffset+3); - OutputIndices.Set(triangleOffset+6, triangle); + triangle[1] = Indices.Get(indexOffset + 3); + OutputIndices.Set(triangleOffset + 6, triangle); // 3-6-2 - triangle[3] = Indices.Get(indexOffset+2); - OutputIndices.Set(triangleOffset+7, triangle); + triangle[3] = Indices.Get(indexOffset + 2); + OutputIndices.Set(triangleOffset + 7, triangle); // 1-6-2 - triangle[1] = Indices.Get(indexOffset+1); - OutputIndices.Set(triangleOffset+8, triangle); + triangle[1] = Indices.Get(indexOffset + 1); + OutputIndices.Set(triangleOffset + 8, triangle); // 1-6-5 - triangle[3] = Indices.Get(indexOffset+5); - OutputIndices.Set(triangleOffset+9, triangle); + triangle[3] = Indices.Get(indexOffset + 5); + OutputIndices.Set(triangleOffset + 9, triangle); // 1-4-5 - triangle[2] = Indices.Get(indexOffset+4); - OutputIndices.Set(triangleOffset+10, triangle); + triangle[2] = Indices.Get(indexOffset + 4); + OutputIndices.Set(triangleOffset + 10, triangle); // 1-4-0 - triangle[3] = Indices.Get(indexOffset+0); - OutputIndices.Set(triangleOffset+11, triangle); + triangle[3] = Indices.Get(indexOffset + 0); + OutputIndices.Set(triangleOffset + 11, triangle); } - if( shapeType == vtkm::CELL_SHAPE_WEDGE ) + if (shapeType == vtkm::CELL_SHAPE_WEDGE) { // 0-1-2 - triangle[1] = Indices.Get(indexOffset+0); - triangle[2] = Indices.Get(indexOffset+1); - triangle[3] = Indices.Get(indexOffset+2); + triangle[1] = Indices.Get(indexOffset + 0); + triangle[2] = Indices.Get(indexOffset + 1); + triangle[3] = Indices.Get(indexOffset + 2); triangle[0] = cellId; OutputIndices.Set(triangleOffset, triangle); // 0-3-2 - triangle[2] = Indices.Get(indexOffset+3); - OutputIndices.Set(triangleOffset+1, triangle); + triangle[2] = Indices.Get(indexOffset + 3); + OutputIndices.Set(triangleOffset + 1, triangle); // 5-3-2 - triangle[1] = Indices.Get(indexOffset+5); - OutputIndices.Set(triangleOffset+2, triangle); + triangle[1] = Indices.Get(indexOffset + 5); + OutputIndices.Set(triangleOffset + 2, triangle); // 5-3-4 - triangle[3] = Indices.Get(indexOffset+4); - OutputIndices.Set(triangleOffset+3, triangle); + triangle[3] = Indices.Get(indexOffset + 4); + OutputIndices.Set(triangleOffset + 3, triangle); // 5-2-4 - triangle[2] = Indices.Get(indexOffset+2); - OutputIndices.Set(triangleOffset+4, triangle); + triangle[2] = Indices.Get(indexOffset + 2); + OutputIndices.Set(triangleOffset + 4, triangle); // 5-1-4 - triangle[2] = Indices.Get(indexOffset+1); - OutputIndices.Set(triangleOffset+5, triangle); + triangle[2] = Indices.Get(indexOffset + 1); + OutputIndices.Set(triangleOffset + 5, triangle); } - if( shapeType == vtkm::CELL_SHAPE_PYRAMID ) + if (shapeType == vtkm::CELL_SHAPE_PYRAMID) { // 0-1-2 - triangle[1] = Indices.Get(indexOffset+0); - triangle[2] = Indices.Get(indexOffset+1); - triangle[3] = Indices.Get(indexOffset+2); + triangle[1] = Indices.Get(indexOffset + 0); + triangle[2] = Indices.Get(indexOffset + 1); + triangle[3] = Indices.Get(indexOffset + 2); triangle[0] = cellId; OutputIndices.Set(triangleOffset, triangle); // 0-3-2 - triangle[2] = Indices.Get(indexOffset+3); - OutputIndices.Set(triangleOffset+1, triangle); + triangle[2] = Indices.Get(indexOffset + 3); + OutputIndices.Set(triangleOffset + 1, triangle); // 0-3-4 - triangle[3] = Indices.Get(indexOffset+4); - OutputIndices.Set(triangleOffset+2, triangle); + triangle[3] = Indices.Get(indexOffset + 4); + OutputIndices.Set(triangleOffset + 2, triangle); // 2-3-4 - triangle[1] = Indices.Get(indexOffset+2); - OutputIndices.Set(triangleOffset+3, triangle); + triangle[1] = Indices.Get(indexOffset + 2); + OutputIndices.Set(triangleOffset + 3, triangle); // 2-1-4 - triangle[2] = Indices.Get(indexOffset+1); - OutputIndices.Set(triangleOffset+4, triangle); + triangle[2] = Indices.Get(indexOffset + 1); + OutputIndices.Set(triangleOffset + 4, triangle); // 0-3-4 - triangle[1] = Indices.Get(indexOffset+0); - OutputIndices.Set(triangleOffset+5, triangle); + triangle[1] = Indices.Get(indexOffset + 0); + OutputIndices.Set(triangleOffset + 5, triangle); } } }; //class Trianglulate @@ -432,128 +431,126 @@ public: Triangulator() {} VTKM_CONT - void ExternalTrianlges(vtkm::cont::ArrayHandle< vtkm::Vec > &outputIndices, - vtkm::Id &outputTriangles) + void ExternalTrianlges(vtkm::cont::ArrayHandle>& outputIndices, + vtkm::Id& outputTriangles) { //Eliminate unseen triangles - vtkm::worklet::DispatcherMapField() - .Invoke(outputIndices); + vtkm::worklet::DispatcherMapField().Invoke(outputIndices); vtkm::cont::DeviceAdapterAlgorithm::Sort(outputIndices, IndicesLessThan()); vtkm::cont::ArrayHandle flags; flags.Allocate(outputTriangles); - vtkm::worklet::DispatcherMapField< MemSet< vtkm::UInt8 > >( MemSet< vtkm::UInt8>( 1 ) ) - .Invoke( flags ); + vtkm::worklet::DispatcherMapField>(MemSet(1)).Invoke(flags); //Unique triangles will have a flag = 1 - vtkm::worklet::DispatcherMapField< UniqueTriangles >() - .Invoke( vtkm::exec::ExecutionWholeArrayConst< vtkm::Vec >(outputIndices), - vtkm::exec::ExecutionWholeArray< vtkm::UInt8 >(flags)); + vtkm::worklet::DispatcherMapField().Invoke( + vtkm::exec::ExecutionWholeArrayConst>(outputIndices), + vtkm::exec::ExecutionWholeArray(flags)); - vtkm::cont::ArrayHandle > subset; - vtkm::cont::DeviceAdapterAlgorithm::CopyIf(outputIndices, - flags, - subset); + vtkm::cont::ArrayHandle> subset; + vtkm::cont::DeviceAdapterAlgorithm::CopyIf(outputIndices, flags, subset); outputIndices = subset; outputTriangles = subset.GetNumberOfValues(); } VTKM_CONT - void Run(const vtkm::cont::DynamicCellSet &cellset, - vtkm::cont::ArrayHandle< vtkm::Vec > &outputIndices, - vtkm::Id &outputTriangles) + void Run(const vtkm::cont::DynamicCellSet& cellset, + vtkm::cont::ArrayHandle>& outputIndices, + vtkm::Id& outputTriangles) { - if(cellset.IsSameType(vtkm::cont::CellSetStructured<3>())) + if (cellset.IsSameType(vtkm::cont::CellSetStructured<3>())) { - vtkm::cont::CellSetStructured<3> cellSetStructured3D = cellset.Cast >(); + vtkm::cont::CellSetStructured<3> cellSetStructured3D = + cellset.Cast>(); const vtkm::Id numCells = cellSetStructured3D.GetNumberOfCells(); - vtkm::cont::ArrayHandleCounting cellIdxs(0,1,numCells); + vtkm::cont::ArrayHandleCounting cellIdxs(0, 1, numCells); outputIndices.Allocate(numCells * 12); - vtkm::worklet::DispatcherMapTopology >(TrianglulateStructured<3> (outputIndices)) - .Invoke(cellSetStructured3D, - cellIdxs); + vtkm::worklet::DispatcherMapTopology>( + TrianglulateStructured<3>(outputIndices)) + .Invoke(cellSetStructured3D, cellIdxs); outputTriangles = numCells * 12; } - else if(cellset.IsSameType(vtkm::cont::CellSetStructured<2>())) + else if (cellset.IsSameType(vtkm::cont::CellSetStructured<2>())) { - vtkm::cont::CellSetStructured<2> cellSetStructured2D = cellset.Cast >(); - const vtkm::Id numCells = cellSetStructured2D.GetNumberOfCells(); + vtkm::cont::CellSetStructured<2> cellSetStructured2D = + cellset.Cast>(); + const vtkm::Id numCells = cellSetStructured2D.GetNumberOfCells(); - vtkm::cont::ArrayHandleCounting cellIdxs(0,1,numCells); - outputIndices.Allocate(numCells * 2); - vtkm::worklet::DispatcherMapTopology >(TrianglulateStructured<2> (outputIndices)) - .Invoke(cellSetStructured2D, - cellIdxs); + vtkm::cont::ArrayHandleCounting cellIdxs(0, 1, numCells); + outputIndices.Allocate(numCells * 2); + vtkm::worklet::DispatcherMapTopology>( + TrianglulateStructured<2>(outputIndices)) + .Invoke(cellSetStructured2D, cellIdxs); - outputTriangles = numCells * 2; + outputTriangles = numCells * 2; } - else if(cellset.IsSameType(vtkm::cont::CellSetExplicit<>())) + else if (cellset.IsSameType(vtkm::cont::CellSetExplicit<>())) { - vtkm::cont::CellSetExplicit<> cellSetExplicit = cellset.Cast >(); - const vtkm::cont::ArrayHandle shapes = cellSetExplicit.GetShapesArray( vtkm::TopologyElementTagPoint(),vtkm::TopologyElementTagCell()); - const vtkm::cont::ArrayHandle indices = cellSetExplicit.GetNumIndicesArray( vtkm::TopologyElementTagPoint(),vtkm::TopologyElementTagCell()); - vtkm::cont::ArrayHandle conn = cellSetExplicit.GetConnectivityArray( vtkm::TopologyElementTagPoint(),vtkm::TopologyElementTagCell()); - vtkm::cont::ArrayHandle offsets = cellSetExplicit.GetIndexOffsetArray( vtkm::TopologyElementTagPoint(),vtkm::TopologyElementTagCell()); + vtkm::cont::CellSetExplicit<> cellSetExplicit = cellset.Cast>(); + const vtkm::cont::ArrayHandle shapes = cellSetExplicit.GetShapesArray( + vtkm::TopologyElementTagPoint(), vtkm::TopologyElementTagCell()); + const vtkm::cont::ArrayHandle indices = cellSetExplicit.GetNumIndicesArray( + vtkm::TopologyElementTagPoint(), vtkm::TopologyElementTagCell()); + vtkm::cont::ArrayHandle conn = cellSetExplicit.GetConnectivityArray( + vtkm::TopologyElementTagPoint(), vtkm::TopologyElementTagCell()); + vtkm::cont::ArrayHandle offsets = cellSetExplicit.GetIndexOffsetArray( + vtkm::TopologyElementTagPoint(), vtkm::TopologyElementTagCell()); // We need to somehow force the data set to build the index offsets //vtkm::IdComponent c = indices.GetPortalControl().Get(0); - vtkm::Vec< vtkm::Id, 3> forceBuildIndices; - cellSetExplicit.GetIndices(0, forceBuildIndices ); - + vtkm::Vec forceBuildIndices; + cellSetExplicit.GetIndices(0, forceBuildIndices); vtkm::cont::ArrayHandle trianglesPerCell; - vtkm::worklet::DispatcherMapField( CountTriangles() ) - .Invoke(shapes, - trianglesPerCell); + vtkm::worklet::DispatcherMapField(CountTriangles()) + .Invoke(shapes, trianglesPerCell); vtkm::Id totalTriangles = 0; - totalTriangles = vtkm::cont::DeviceAdapterAlgorithm::Reduce(trianglesPerCell, - vtkm::Id(0)); + totalTriangles = + vtkm::cont::DeviceAdapterAlgorithm::Reduce(trianglesPerCell, vtkm::Id(0)); vtkm::cont::ArrayHandle cellOffsets; vtkm::cont::DeviceAdapterAlgorithm::ScanExclusive(trianglesPerCell, cellOffsets); outputIndices.Allocate(totalTriangles); - vtkm::worklet::DispatcherMapField( Trianglulate(outputIndices, - conn, - totalTriangles) ) - .Invoke(shapes, - offsets, - cellOffsets); + vtkm::worklet::DispatcherMapField( + Trianglulate(outputIndices, conn, totalTriangles)) + .Invoke(shapes, offsets, cellOffsets); outputTriangles = totalTriangles; } - else if(cellset.IsSameType(vtkm::cont::CellSetSingleType<>())) + else if (cellset.IsSameType(vtkm::cont::CellSetSingleType<>())) { typedef vtkm::TopologyElementTagPoint PointTag; typedef vtkm::TopologyElementTagCell CellTag; - vtkm::cont::CellSetSingleType<> cellSetSingleType = cellset.Cast >(); + vtkm::cont::CellSetSingleType<> cellSetSingleType = + cellset.Cast>(); //fetch and see if we are all triangles, that currently is the only //cell set single type we support. vtkm::Id shapeTypeAsId = cellSetSingleType.GetCellShape(0); - if(shapeTypeAsId == vtkm::CellShapeTagTriangle::Id) + if (shapeTypeAsId == vtkm::CellShapeTagTriangle::Id) { //generate the outputIndices vtkm::Id totalTriangles = cellSetSingleType.GetNumberOfCells(); - vtkm::cont::ArrayHandleCounting cellIdxs(0,1,totalTriangles); + vtkm::cont::ArrayHandleCounting cellIdxs(0, 1, totalTriangles); outputIndices.Allocate(totalTriangles); - vtkm::worklet::DispatcherMapField( Trianglulate(outputIndices, - cellSetSingleType.GetConnectivityArray( PointTag(), CellTag() ), - totalTriangles) ) - .Invoke(cellSetSingleType.GetShapesArray( PointTag(), CellTag() ), - cellSetSingleType.GetIndexOffsetArray( PointTag(), CellTag()), - cellIdxs ); + vtkm::worklet::DispatcherMapField( + Trianglulate(outputIndices, cellSetSingleType.GetConnectivityArray(PointTag(), CellTag()), + totalTriangles)) + .Invoke(cellSetSingleType.GetShapesArray(PointTag(), CellTag()), + cellSetSingleType.GetIndexOffsetArray(PointTag(), CellTag()), cellIdxs); outputTriangles = totalTriangles; } else { - throw vtkm::cont::ErrorBadType("Unsupported cell type for trianglulation with CellSetSingleType"); + throw vtkm::cont::ErrorBadType( + "Unsupported cell type for trianglulation with CellSetSingleType"); } } else @@ -565,5 +562,6 @@ public: ExternalTrianlges(outputIndices, outputTriangles); } }; // class Triangulator -}}//namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif //vtk_m_rendering_Triangulator_h diff --git a/vtkm/rendering/View.cxx b/vtkm/rendering/View.cxx index c311439f2..3c1f2604c 100644 --- a/vtkm/rendering/View.cxx +++ b/vtkm/rendering/View.cxx @@ -20,17 +20,17 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -View::View(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Color &backgroundColor) - : Scene(scene), - MapperPointer(mapper.NewCopy()), - CanvasPointer(canvas.NewCopy()), - WorldAnnotatorPointer(canvas.CreateWorldAnnotator()) +View::View(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, const vtkm::rendering::Color& backgroundColor) + : Scene(scene) + , MapperPointer(mapper.NewCopy()) + , CanvasPointer(canvas.NewCopy()) + , WorldAnnotatorPointer(canvas.CreateWorldAnnotator()) { this->CanvasPointer->SetBackgroundColor(backgroundColor); @@ -46,29 +46,28 @@ View::View(const vtkm::rendering::Scene &scene, } } -View::View(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Camera &camera, - const vtkm::rendering::Color &backgroundColor) - : Scene(scene), - MapperPointer(mapper.NewCopy()), - CanvasPointer(canvas.NewCopy()), - WorldAnnotatorPointer(canvas.CreateWorldAnnotator()), - Camera(camera) +View::View(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, const vtkm::rendering::Camera& camera, + const vtkm::rendering::Color& backgroundColor) + : Scene(scene) + , MapperPointer(mapper.NewCopy()) + , CanvasPointer(canvas.NewCopy()) + , WorldAnnotatorPointer(canvas.CreateWorldAnnotator()) + , Camera(camera) { this->CanvasPointer->SetBackgroundColor(backgroundColor); } View::~View() -{ } +{ +} void View::Initialize() { this->GetCanvas().Initialize(); } -void View::SaveAs(const std::string &fileName) const +void View::SaveAs(const std::string& fileName) const { this->GetCanvas().SaveAs(fileName); } @@ -76,14 +75,13 @@ void View::SaveAs(const std::string &fileName) const void View::SetupForWorldSpace(bool viewportClip) { //this->Camera.SetupMatrices(); - this->GetCanvas().SetViewToWorldSpace(this->Camera ,viewportClip); + this->GetCanvas().SetViewToWorldSpace(this->Camera, viewportClip); } void View::SetupForScreenSpace(bool viewportClip) { //this->Camera.SetupMatrices(); - this->GetCanvas().SetViewToScreenSpace(this->Camera,viewportClip); + this->GetCanvas().SetViewToScreenSpace(this->Camera, viewportClip); } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/View.h b/vtkm/rendering/View.h index deec78c7d..db0e07613 100644 --- a/vtkm/rendering/View.h +++ b/vtkm/rendering/View.h @@ -30,86 +30,62 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT View { public: - View(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Color &backgroundColor = - vtkm::rendering::Color(0,0,0,1)); + View(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, + const vtkm::rendering::Color& backgroundColor = vtkm::rendering::Color(0, 0, 0, 1)); - View(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Camera &camera, - const vtkm::rendering::Color &backgroundColor = - vtkm::rendering::Color(0,0,0,1)); + View(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, const vtkm::rendering::Camera& camera, + const vtkm::rendering::Color& backgroundColor = vtkm::rendering::Color(0, 0, 0, 1)); virtual ~View(); VTKM_CONT - const vtkm::rendering::Scene &GetScene() const { return this->Scene; } + const vtkm::rendering::Scene& GetScene() const { return this->Scene; } VTKM_CONT - vtkm::rendering::Scene &GetScene() { return this->Scene; } + vtkm::rendering::Scene& GetScene() { return this->Scene; } VTKM_CONT - void SetScene(const vtkm::rendering::Scene &scene) { this->Scene = scene; } + void SetScene(const vtkm::rendering::Scene& scene) { this->Scene = scene; } VTKM_CONT - const vtkm::rendering::Mapper &GetMapper() const - { - return *this->MapperPointer; - } + const vtkm::rendering::Mapper& GetMapper() const { return *this->MapperPointer; } VTKM_CONT - vtkm::rendering::Mapper &GetMapper() - { - return *this->MapperPointer; - } + vtkm::rendering::Mapper& GetMapper() { return *this->MapperPointer; } VTKM_CONT - const vtkm::rendering::Canvas &GetCanvas() const - { - return *this->CanvasPointer; - } + const vtkm::rendering::Canvas& GetCanvas() const { return *this->CanvasPointer; } VTKM_CONT - vtkm::rendering::Canvas &GetCanvas() - { - return *this->CanvasPointer; - } + vtkm::rendering::Canvas& GetCanvas() { return *this->CanvasPointer; } VTKM_CONT - const vtkm::rendering::WorldAnnotator &GetWorldAnnotator() const + const vtkm::rendering::WorldAnnotator& GetWorldAnnotator() const { return *this->WorldAnnotatorPointer; } VTKM_CONT - const vtkm::rendering::Camera &GetCamera() const - { - return this->Camera; - } + const vtkm::rendering::Camera& GetCamera() const { return this->Camera; } VTKM_CONT - vtkm::rendering::Camera &GetCamera() - { - return this->Camera; - } + vtkm::rendering::Camera& GetCamera() { return this->Camera; } VTKM_CONT - void SetCamera(const vtkm::rendering::Camera &camera) - { - this->Camera = camera; - } + void SetCamera(const vtkm::rendering::Camera& camera) { this->Camera = camera; } VTKM_CONT - const vtkm::rendering::Color &GetBackgroundColor() const + const vtkm::rendering::Color& GetBackgroundColor() const { return this->CanvasPointer->GetBackgroundColor(); } VTKM_CONT - void SetBackgroundColor(const vtkm::rendering::Color &color) + void SetBackgroundColor(const vtkm::rendering::Color& color) { this->CanvasPointer->SetBackgroundColor(color); } @@ -120,12 +96,12 @@ public: virtual void RenderScreenAnnotations() = 0; virtual void RenderWorldAnnotations() = 0; - void SaveAs(const std::string &fileName) const; + void SaveAs(const std::string& fileName) const; protected: - void SetupForWorldSpace(bool viewportClip=true); + void SetupForWorldSpace(bool viewportClip = true); - void SetupForScreenSpace(bool viewportClip=false); + void SetupForScreenSpace(bool viewportClip = false); private: vtkm::rendering::Scene Scene; @@ -134,7 +110,6 @@ private: std::shared_ptr WorldAnnotatorPointer; vtkm::rendering::Camera Camera; }; - } } //namespace vtkm::rendering diff --git a/vtkm/rendering/View1D.cxx b/vtkm/rendering/View1D.cxx index 6a7dc5f68..2ed3b1df7 100644 --- a/vtkm/rendering/View1D.cxx +++ b/vtkm/rendering/View1D.cxx @@ -22,22 +22,20 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -View1D::View1D(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Color &backgroundColor) +View1D::View1D(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, const vtkm::rendering::Color& backgroundColor) : View(scene, mapper, canvas, backgroundColor) { } -View1D::View1D(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Camera &camera, - const vtkm::rendering::Color &backgroundColor) +View1D::View1D(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, const vtkm::rendering::Camera& camera, + const vtkm::rendering::Color& backgroundColor) : View(scene, mapper, canvas, camera, backgroundColor) { } @@ -52,8 +50,7 @@ void View1D::Paint() this->GetCanvas().Clear(); this->SetupForWorldSpace(); - this->GetScene().Render( - this->GetMapper(), this->GetCanvas(), this->GetCamera()); + this->GetScene().Render(this->GetMapper(), this->GetCanvas(), this->GetCamera()); this->RenderWorldAnnotations(); this->SetupForScreenSpace(); @@ -68,45 +65,40 @@ void View1D::RenderScreenAnnotations() vtkm::Float32 viewportRight; vtkm::Float32 viewportTop; vtkm::Float32 viewportBottom; - this->GetCamera().GetRealViewport( - this->GetCanvas().GetWidth(), this->GetCanvas().GetHeight(), - viewportLeft, viewportRight, viewportBottom, viewportTop); + this->GetCamera().GetRealViewport(this->GetCanvas().GetWidth(), this->GetCanvas().GetHeight(), + viewportLeft, viewportRight, viewportBottom, viewportTop); - this->HorizontalAxisAnnotation.SetColor(vtkm::rendering::Color(1,1,1)); - this->HorizontalAxisAnnotation.SetScreenPosition( - viewportLeft, viewportBottom, viewportRight, viewportBottom); + this->HorizontalAxisAnnotation.SetColor(vtkm::rendering::Color(1, 1, 1)); + this->HorizontalAxisAnnotation.SetScreenPosition(viewportLeft, viewportBottom, viewportRight, + viewportBottom); vtkm::Bounds viewRange = this->GetCamera().GetViewRange2D(); - - this->HorizontalAxisAnnotation.SetRangeForAutoTicks(viewRange.X.Min, - viewRange.X.Max); + + this->HorizontalAxisAnnotation.SetRangeForAutoTicks(viewRange.X.Min, viewRange.X.Max); this->HorizontalAxisAnnotation.SetMajorTickSize(0, .05, 1.0); this->HorizontalAxisAnnotation.SetMinorTickSize(0, .02, 1.0); this->HorizontalAxisAnnotation.SetLabelAlignment(vtkm::rendering::TextAnnotation::HCenter, vtkm::rendering::TextAnnotation::Top); - this->HorizontalAxisAnnotation.Render( - this->GetCamera(), this->GetWorldAnnotator(), this->GetCanvas()); + this->HorizontalAxisAnnotation.Render(this->GetCamera(), this->GetWorldAnnotator(), + this->GetCanvas()); vtkm::Float32 windowaspect = - vtkm::Float32(this->GetCanvas().GetWidth()) / - vtkm::Float32(this->GetCanvas().GetHeight()); - - this->VerticalAxisAnnotation.SetColor(vtkm::rendering::Color(1,1,1)); - this->VerticalAxisAnnotation.SetScreenPosition( - viewportLeft, viewportBottom, viewportLeft, viewportTop); - this->VerticalAxisAnnotation.SetRangeForAutoTicks(viewRange.Y.Min, - viewRange.Y.Max); + vtkm::Float32(this->GetCanvas().GetWidth()) / vtkm::Float32(this->GetCanvas().GetHeight()); + + this->VerticalAxisAnnotation.SetColor(vtkm::rendering::Color(1, 1, 1)); + this->VerticalAxisAnnotation.SetScreenPosition(viewportLeft, viewportBottom, viewportLeft, + viewportTop); + this->VerticalAxisAnnotation.SetRangeForAutoTicks(viewRange.Y.Min, viewRange.Y.Max); this->VerticalAxisAnnotation.SetMajorTickSize(.05 / windowaspect, 0, 1.0); this->VerticalAxisAnnotation.SetMinorTickSize(.02 / windowaspect, 0, 1.0); this->VerticalAxisAnnotation.SetLabelAlignment(vtkm::rendering::TextAnnotation::Right, vtkm::rendering::TextAnnotation::VCenter); - this->VerticalAxisAnnotation.Render( - this->GetCamera(), this->GetWorldAnnotator(), this->GetCanvas()); + this->VerticalAxisAnnotation.Render(this->GetCamera(), this->GetWorldAnnotator(), + this->GetCanvas()); } void View1D::RenderWorldAnnotations() { // 1D views don't have world annotations. -} - +} } } // namespace vtkm::rendering diff --git a/vtkm/rendering/View1D.h b/vtkm/rendering/View1D.h index 1e6fd939b..549c67995 100644 --- a/vtkm/rendering/View1D.h +++ b/vtkm/rendering/View1D.h @@ -23,24 +23,21 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT View1D : public vtkm::rendering::View { public: - View1D(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Color &backgroundColor = - vtkm::rendering::Color(0,0,0,1)); + View1D(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, + const vtkm::rendering::Color& backgroundColor = vtkm::rendering::Color(0, 0, 0, 1)); - View1D(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Camera &camera, - const vtkm::rendering::Color &backgroundColor = - vtkm::rendering::Color(0,0,0,1)); + View1D(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, const vtkm::rendering::Camera& camera, + const vtkm::rendering::Color& backgroundColor = vtkm::rendering::Color(0, 0, 0, 1)); ~View1D(); @@ -53,7 +50,6 @@ private: vtkm::rendering::AxisAnnotation2D HorizontalAxisAnnotation; vtkm::rendering::AxisAnnotation2D VerticalAxisAnnotation; }; - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/View2D.cxx b/vtkm/rendering/View2D.cxx index dfeeeaa41..4a2bc13fe 100644 --- a/vtkm/rendering/View2D.cxx +++ b/vtkm/rendering/View2D.cxx @@ -20,22 +20,20 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -View2D::View2D(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Color &backgroundColor) +View2D::View2D(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, const vtkm::rendering::Color& backgroundColor) : View(scene, mapper, canvas, backgroundColor) { } -View2D::View2D(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Camera &camera, - const vtkm::rendering::Color &backgroundColor) +View2D::View2D(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, const vtkm::rendering::Camera& camera, + const vtkm::rendering::Color& backgroundColor) : View(scene, mapper, canvas, camera, backgroundColor) { } @@ -50,8 +48,7 @@ void View2D::Paint() this->GetCanvas().Clear(); this->SetupForWorldSpace(); - this->GetScene().Render( - this->GetMapper(), this->GetCanvas(), this->GetCamera()); + this->GetScene().Render(this->GetMapper(), this->GetCanvas(), this->GetCamera()); this->RenderWorldAnnotations(); this->SetupForScreenSpace(); @@ -66,50 +63,43 @@ void View2D::RenderScreenAnnotations() vtkm::Float32 viewportRight; vtkm::Float32 viewportTop; vtkm::Float32 viewportBottom; - this->GetCamera().GetRealViewport( - this->GetCanvas().GetWidth(), this->GetCanvas().GetHeight(), - viewportLeft, viewportRight, viewportBottom, viewportTop); + this->GetCamera().GetRealViewport(this->GetCanvas().GetWidth(), this->GetCanvas().GetHeight(), + viewportLeft, viewportRight, viewportBottom, viewportTop); - this->HorizontalAxisAnnotation.SetColor(vtkm::rendering::Color(1,1,1)); - this->HorizontalAxisAnnotation.SetScreenPosition( - viewportLeft, viewportBottom, viewportRight, viewportBottom); + this->HorizontalAxisAnnotation.SetColor(vtkm::rendering::Color(1, 1, 1)); + this->HorizontalAxisAnnotation.SetScreenPosition(viewportLeft, viewportBottom, viewportRight, + viewportBottom); vtkm::Bounds viewRange = this->GetCamera().GetViewRange2D(); - - this->HorizontalAxisAnnotation.SetRangeForAutoTicks(viewRange.X.Min, - viewRange.X.Max); + + this->HorizontalAxisAnnotation.SetRangeForAutoTicks(viewRange.X.Min, viewRange.X.Max); this->HorizontalAxisAnnotation.SetMajorTickSize(0, .05, 1.0); this->HorizontalAxisAnnotation.SetMinorTickSize(0, .02, 1.0); - this->HorizontalAxisAnnotation.SetLabelAlignment(TextAnnotation::HCenter, - TextAnnotation::Top); - this->HorizontalAxisAnnotation.Render( - this->GetCamera(), this->GetWorldAnnotator(), this->GetCanvas()); + this->HorizontalAxisAnnotation.SetLabelAlignment(TextAnnotation::HCenter, TextAnnotation::Top); + this->HorizontalAxisAnnotation.Render(this->GetCamera(), this->GetWorldAnnotator(), + this->GetCanvas()); vtkm::Float32 windowaspect = - vtkm::Float32(this->GetCanvas().GetWidth()) / - vtkm::Float32(this->GetCanvas().GetHeight()); - - this->VerticalAxisAnnotation.SetColor(Color(1,1,1)); - this->VerticalAxisAnnotation.SetScreenPosition( - viewportLeft, viewportBottom, viewportLeft, viewportTop); - this->VerticalAxisAnnotation.SetRangeForAutoTicks(viewRange.Y.Min, - viewRange.Y.Max); + vtkm::Float32(this->GetCanvas().GetWidth()) / vtkm::Float32(this->GetCanvas().GetHeight()); + + this->VerticalAxisAnnotation.SetColor(Color(1, 1, 1)); + this->VerticalAxisAnnotation.SetScreenPosition(viewportLeft, viewportBottom, viewportLeft, + viewportTop); + this->VerticalAxisAnnotation.SetRangeForAutoTicks(viewRange.Y.Min, viewRange.Y.Max); this->VerticalAxisAnnotation.SetMajorTickSize(.05 / windowaspect, 0, 1.0); this->VerticalAxisAnnotation.SetMinorTickSize(.02 / windowaspect, 0, 1.0); - this->VerticalAxisAnnotation.SetLabelAlignment(TextAnnotation::Right, - TextAnnotation::VCenter); - this->VerticalAxisAnnotation.Render( - this->GetCamera(), this->GetWorldAnnotator(), this->GetCanvas()); + this->VerticalAxisAnnotation.SetLabelAlignment(TextAnnotation::Right, TextAnnotation::VCenter); + this->VerticalAxisAnnotation.Render(this->GetCamera(), this->GetWorldAnnotator(), + this->GetCanvas()); - const vtkm::rendering::Scene &scene = this->GetScene(); + const vtkm::rendering::Scene& scene = this->GetScene(); if (scene.GetNumberOfActors() > 0) { //this->ColorBarAnnotation.SetAxisColor(vtkm::rendering::Color(1,1,1)); this->ColorBarAnnotation.SetRange(scene.GetActor(0).GetScalarRange().Min, - scene.GetActor(0).GetScalarRange().Max, - 5); + scene.GetActor(0).GetScalarRange().Max, 5); this->ColorBarAnnotation.SetColorTable(scene.GetActor(0).GetColorTable()); - this->ColorBarAnnotation.Render( - this->GetCamera(), this->GetWorldAnnotator(), this->GetCanvas()); + this->ColorBarAnnotation.Render(this->GetCamera(), this->GetWorldAnnotator(), + this->GetCanvas()); } } @@ -117,6 +107,5 @@ void View2D::RenderWorldAnnotations() { // 2D views don't have world annotations. } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/View2D.h b/vtkm/rendering/View2D.h index 9467d01d0..affbaab4c 100644 --- a/vtkm/rendering/View2D.h +++ b/vtkm/rendering/View2D.h @@ -25,24 +25,21 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT View2D : public vtkm::rendering::View { public: - View2D(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Color &backgroundColor = - vtkm::rendering::Color(0,0,0,1)); + View2D(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, + const vtkm::rendering::Color& backgroundColor = vtkm::rendering::Color(0, 0, 0, 1)); - View2D(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Camera &camera, - const vtkm::rendering::Color &backgroundColor = - vtkm::rendering::Color(0,0,0,1)); + View2D(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, const vtkm::rendering::Camera& camera, + const vtkm::rendering::Color& backgroundColor = vtkm::rendering::Color(0, 0, 0, 1)); ~View2D(); @@ -58,7 +55,6 @@ private: vtkm::rendering::AxisAnnotation2D VerticalAxisAnnotation; vtkm::rendering::ColorBarAnnotation ColorBarAnnotation; }; - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/View3D.cxx b/vtkm/rendering/View3D.cxx index 8c164e020..a1a34a5c0 100644 --- a/vtkm/rendering/View3D.cxx +++ b/vtkm/rendering/View3D.cxx @@ -20,22 +20,20 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ -View3D::View3D(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Color &backgroundColor) +View3D::View3D(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, const vtkm::rendering::Color& backgroundColor) : View(scene, mapper, canvas, backgroundColor) { } -View3D::View3D(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Camera &camera, - const vtkm::rendering::Color &backgroundColor) +View3D::View3D(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, const vtkm::rendering::Camera& camera, + const vtkm::rendering::Color& backgroundColor) : View(scene, mapper, canvas, camera, backgroundColor) { } @@ -49,8 +47,7 @@ void View3D::Paint() this->GetCanvas().Activate(); this->GetCanvas().Clear(); this->SetupForWorldSpace(); - this->GetScene().Render( - this->GetMapper(), this->GetCanvas(), this->GetCamera()); + this->GetScene().Render(this->GetMapper(), this->GetCanvas(), this->GetCamera()); this->RenderWorldAnnotations(); this->SetupForScreenSpace(); @@ -64,12 +61,10 @@ void View3D::RenderScreenAnnotations() if (this->GetScene().GetNumberOfActors() > 0) { //this->ColorBarAnnotation.SetAxisColor(vtkm::rendering::Color(1,1,1)); - this->ColorBarAnnotation.SetRange( - this->GetScene().GetActor(0).GetScalarRange(), 5); - this->ColorBarAnnotation.SetColorTable( - this->GetScene().GetActor(0).GetColorTable()); - this->ColorBarAnnotation.Render( - this->GetCamera(), this->GetWorldAnnotator(), this->GetCanvas()); + this->ColorBarAnnotation.SetRange(this->GetScene().GetActor(0).GetScalarRange(), 5); + this->ColorBarAnnotation.SetColorTable(this->GetScene().GetActor(0).GetColorTable()); + this->ColorBarAnnotation.Render(this->GetCamera(), this->GetWorldAnnotator(), + this->GetCanvas()); } } @@ -79,15 +74,15 @@ void View3D::RenderWorldAnnotations() vtkm::Float64 xmin = bounds.X.Min, xmax = bounds.X.Max; vtkm::Float64 ymin = bounds.Y.Min, ymax = bounds.Y.Max; vtkm::Float64 zmin = bounds.Z.Min, zmax = bounds.Z.Max; - vtkm::Float64 dx = xmax-xmin, dy = ymax-ymin, dz = zmax-zmin; - vtkm::Float64 size = vtkm::Sqrt(dx*dx + dy*dy + dz*dz); + vtkm::Float64 dx = xmax - xmin, dy = ymax - ymin, dz = zmax - zmin; + vtkm::Float64 size = vtkm::Sqrt(dx * dx + dy * dy + dz * dz); - this->BoxAnnotation.SetColor(Color(.5f,.5f,.5f)); + this->BoxAnnotation.SetColor(Color(.5f, .5f, .5f)); this->BoxAnnotation.SetExtents(this->GetScene().GetSpatialBounds()); this->BoxAnnotation.Render(this->GetCamera(), this->GetWorldAnnotator()); - vtkm::Vec lookAt = this->GetCamera().GetLookAt(); - vtkm::Vec position = this->GetCamera().GetPosition(); + vtkm::Vec lookAt = this->GetCamera().GetLookAt(); + vtkm::Vec position = this->GetCamera().GetPosition(); bool xtest = lookAt[0] > position[0]; bool ytest = lookAt[1] > position[1]; bool ztest = lookAt[2] > position[2]; @@ -104,56 +99,40 @@ void View3D::RenderWorldAnnotations() vtkm::Float64 zrel = vtkm::Abs(dz) / size; this->XAxisAnnotation.SetAxis(0); - this->XAxisAnnotation.SetColor(Color(1,1,1)); - this->XAxisAnnotation.SetTickInvert(xtest,ytest,ztest); - this->XAxisAnnotation.SetWorldPosition(xmin, - ytest ? ymin : ymax, - ztest ? zmin : zmax, - xmax, - ytest ? ymin : ymax, - ztest ? zmin : zmax); + this->XAxisAnnotation.SetColor(Color(1, 1, 1)); + this->XAxisAnnotation.SetTickInvert(xtest, ytest, ztest); + this->XAxisAnnotation.SetWorldPosition(xmin, ytest ? ymin : ymax, ztest ? zmin : zmax, xmax, + ytest ? ymin : ymax, ztest ? zmin : zmax); this->XAxisAnnotation.SetRange(xmin, xmax); this->XAxisAnnotation.SetMajorTickSize(size / 40.f, 0); this->XAxisAnnotation.SetMinorTickSize(size / 80.f, 0); this->XAxisAnnotation.SetLabelFontOffset(vtkm::Float32(size / 15.f)); this->XAxisAnnotation.SetMoreOrLessTickAdjustment(xrel < .3 ? -1 : 0); - this->XAxisAnnotation.Render( - this->GetCamera(), this->GetWorldAnnotator(), this->GetCanvas()); + this->XAxisAnnotation.Render(this->GetCamera(), this->GetWorldAnnotator(), this->GetCanvas()); this->YAxisAnnotation.SetAxis(1); - this->YAxisAnnotation.SetColor(Color(1,1,1)); - this->YAxisAnnotation.SetTickInvert(xtest,ytest,ztest); - this->YAxisAnnotation.SetWorldPosition(xtest ? xmin : xmax, - ymin, - ztest ? zmin : zmax, - xtest ? xmin : xmax, - ymax, - ztest ? zmin : zmax); + this->YAxisAnnotation.SetColor(Color(1, 1, 1)); + this->YAxisAnnotation.SetTickInvert(xtest, ytest, ztest); + this->YAxisAnnotation.SetWorldPosition(xtest ? xmin : xmax, ymin, ztest ? zmin : zmax, + xtest ? xmin : xmax, ymax, ztest ? zmin : zmax); this->YAxisAnnotation.SetRange(ymin, ymax); this->YAxisAnnotation.SetMajorTickSize(size / 40.f, 0); this->YAxisAnnotation.SetMinorTickSize(size / 80.f, 0); this->YAxisAnnotation.SetLabelFontOffset(vtkm::Float32(size / 15.f)); this->YAxisAnnotation.SetMoreOrLessTickAdjustment(yrel < .3 ? -1 : 0); - this->YAxisAnnotation.Render( - this->GetCamera(), this->GetWorldAnnotator(), this->GetCanvas()); + this->YAxisAnnotation.Render(this->GetCamera(), this->GetWorldAnnotator(), this->GetCanvas()); this->ZAxisAnnotation.SetAxis(2); - this->ZAxisAnnotation.SetColor(Color(1,1,1)); - this->ZAxisAnnotation.SetTickInvert(xtest,ytest,ztest); - this->ZAxisAnnotation.SetWorldPosition(xtest ? xmin : xmax, - ytest ? ymin : ymax, - zmin, - xtest ? xmin : xmax, - ytest ? ymin : ymax, - zmax); + this->ZAxisAnnotation.SetColor(Color(1, 1, 1)); + this->ZAxisAnnotation.SetTickInvert(xtest, ytest, ztest); + this->ZAxisAnnotation.SetWorldPosition(xtest ? xmin : xmax, ytest ? ymin : ymax, zmin, + xtest ? xmin : xmax, ytest ? ymin : ymax, zmax); this->ZAxisAnnotation.SetRange(zmin, zmax); this->ZAxisAnnotation.SetMajorTickSize(size / 40.f, 0); this->ZAxisAnnotation.SetMinorTickSize(size / 80.f, 0); this->ZAxisAnnotation.SetLabelFontOffset(vtkm::Float32(size / 15.f)); this->ZAxisAnnotation.SetMoreOrLessTickAdjustment(zrel < .3 ? -1 : 0); - this->ZAxisAnnotation.Render( - this->GetCamera(), this->GetWorldAnnotator(), this->GetCanvas()); + this->ZAxisAnnotation.Render(this->GetCamera(), this->GetWorldAnnotator(), this->GetCanvas()); } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/View3D.h b/vtkm/rendering/View3D.h index 324671119..103f8f674 100644 --- a/vtkm/rendering/View3D.h +++ b/vtkm/rendering/View3D.h @@ -26,24 +26,21 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT View3D : public vtkm::rendering::View { public: - View3D(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Color &backgroundColor = - vtkm::rendering::Color(0,0,0,1)); + View3D(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, + const vtkm::rendering::Color& backgroundColor = vtkm::rendering::Color(0, 0, 0, 1)); - View3D(const vtkm::rendering::Scene &scene, - const vtkm::rendering::Mapper &mapper, - const vtkm::rendering::Canvas &canvas, - const vtkm::rendering::Camera &camera, - const vtkm::rendering::Color &backgroundColor = - vtkm::rendering::Color(0,0,0,1)); + View3D(const vtkm::rendering::Scene& scene, const vtkm::rendering::Mapper& mapper, + const vtkm::rendering::Canvas& canvas, const vtkm::rendering::Camera& camera, + const vtkm::rendering::Color& backgroundColor = vtkm::rendering::Color(0, 0, 0, 1)); ~View3D(); @@ -61,7 +58,6 @@ private: vtkm::rendering::AxisAnnotation3D ZAxisAnnotation; vtkm::rendering::ColorBarAnnotation ColorBarAnnotation; }; - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/WorldAnnotator.cxx b/vtkm/rendering/WorldAnnotator.cxx index c42911f3e..1c294612a 100644 --- a/vtkm/rendering/WorldAnnotator.cxx +++ b/vtkm/rendering/WorldAnnotator.cxx @@ -20,37 +20,37 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ WorldAnnotator::~WorldAnnotator() -{ } +{ +} -void WorldAnnotator::AddLine( - const vtkm::Vec &vtkmNotUsed(point0), - const vtkm::Vec &vtkmNotUsed(point1), - vtkm::Float32 vtkmNotUsed(lineWidth), - const vtkm::rendering::Color &vtkmNotUsed(color), - bool vtkmNotUsed(inFront)) const +void WorldAnnotator::AddLine(const vtkm::Vec& vtkmNotUsed(point0), + const vtkm::Vec& vtkmNotUsed(point1), + vtkm::Float32 vtkmNotUsed(lineWidth), + const vtkm::rendering::Color& vtkmNotUsed(color), + bool vtkmNotUsed(inFront)) const { // Default implementation does nothing. Should this be pure virtual and force // all subclasses to implement this? We would have to implement a // WorldAnnotator for ray tracing first. } -void WorldAnnotator::AddText( - const vtkm::Vec &vtkmNotUsed(origin), - const vtkm::Vec &vtkmNotUsed(right), - const vtkm::Vec &vtkmNotUsed(up), - vtkm::Float32 vtkmNotUsed(scale), - const vtkm::Vec &vtkmNotUsed(anchor), - const vtkm::rendering::Color &vtkmNotUsed(color), - const std::string &vtkmNotUsed(text)) const +void WorldAnnotator::AddText(const vtkm::Vec& vtkmNotUsed(origin), + const vtkm::Vec& vtkmNotUsed(right), + const vtkm::Vec& vtkmNotUsed(up), + vtkm::Float32 vtkmNotUsed(scale), + const vtkm::Vec& vtkmNotUsed(anchor), + const vtkm::rendering::Color& vtkmNotUsed(color), + const std::string& vtkmNotUsed(text)) const { // Default implementation does nothing. Should this be pure virtual and force // all subclasses to implement this? We would have to implement a // WorldAnnotator for ray tracing first. } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/WorldAnnotator.h b/vtkm/rendering/WorldAnnotator.h index f4be9269d..675b1dc27 100644 --- a/vtkm/rendering/WorldAnnotator.h +++ b/vtkm/rendering/WorldAnnotator.h @@ -25,68 +25,48 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT WorldAnnotator { public: virtual ~WorldAnnotator(); - virtual void AddLine(const vtkm::Vec &point0, - const vtkm::Vec &point1, - vtkm::Float32 lineWidth, - const vtkm::rendering::Color &color, - bool inFront = false) const; + virtual void AddLine(const vtkm::Vec& point0, + const vtkm::Vec& point1, vtkm::Float32 lineWidth, + const vtkm::rendering::Color& color, bool inFront = false) const; VTKM_CONT - void AddLine(vtkm::Float64 x0, vtkm::Float64 y0, vtkm::Float64 z0, - vtkm::Float64 x1, vtkm::Float64 y1, vtkm::Float64 z1, - vtkm::Float32 lineWidth, - const vtkm::rendering::Color &color, - bool inFront = false) const + void AddLine(vtkm::Float64 x0, vtkm::Float64 y0, vtkm::Float64 z0, vtkm::Float64 x1, + vtkm::Float64 y1, vtkm::Float64 z1, vtkm::Float32 lineWidth, + const vtkm::rendering::Color& color, bool inFront = false) const { - this->AddLine(vtkm::make_Vec(x0,y0,z0), - vtkm::make_Vec(x1,y1,z1), - lineWidth, - color, + this->AddLine(vtkm::make_Vec(x0, y0, z0), vtkm::make_Vec(x1, y1, z1), lineWidth, color, inFront); } - virtual void AddText(const vtkm::Vec &origin, - const vtkm::Vec &right, - const vtkm::Vec &up, - vtkm::Float32 scale, - const vtkm::Vec &anchor, - const vtkm::rendering::Color &color, - const std::string &text) const; + virtual void AddText(const vtkm::Vec& origin, + const vtkm::Vec& right, + const vtkm::Vec& up, vtkm::Float32 scale, + const vtkm::Vec& anchor, + const vtkm::rendering::Color& color, const std::string& text) const; VTKM_CONT - void AddText(vtkm::Float32 originX, - vtkm::Float32 originY, - vtkm::Float32 originZ, - vtkm::Float32 rightX, - vtkm::Float32 rightY, - vtkm::Float32 rightZ, - vtkm::Float32 upX, - vtkm::Float32 upY, - vtkm::Float32 upZ, - vtkm::Float32 scale, - vtkm::Float32 anchorX, - vtkm::Float32 anchorY, - const vtkm::rendering::Color &color, - const std::string &text) const + void AddText(vtkm::Float32 originX, vtkm::Float32 originY, vtkm::Float32 originZ, + vtkm::Float32 rightX, vtkm::Float32 rightY, vtkm::Float32 rightZ, vtkm::Float32 upX, + vtkm::Float32 upY, vtkm::Float32 upZ, vtkm::Float32 scale, vtkm::Float32 anchorX, + vtkm::Float32 anchorY, const vtkm::rendering::Color& color, + const std::string& text) const { - this->AddText(vtkm::make_Vec(originX, originY, originZ), - vtkm::make_Vec(rightX, rightY, rightZ), - vtkm::make_Vec(upX, upY, upZ), - scale, - vtkm::make_Vec(anchorX, anchorY), - color, + this->AddText(vtkm::make_Vec(originX, originY, originZ), vtkm::make_Vec(rightX, rightY, rightZ), + vtkm::make_Vec(upX, upY, upZ), scale, vtkm::make_Vec(anchorX, anchorY), color, text); } }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif // vtk_m_rendering_WorldAnnotator_h diff --git a/vtkm/rendering/WorldAnnotatorGL.cxx b/vtkm/rendering/WorldAnnotatorGL.cxx index ff2621cfa..a04aa0bd3 100644 --- a/vtkm/rendering/WorldAnnotatorGL.cxx +++ b/vtkm/rendering/WorldAnnotatorGL.cxx @@ -29,21 +29,22 @@ #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ WorldAnnotatorGL::~WorldAnnotatorGL() -{ } +{ +} -void WorldAnnotatorGL::AddLine(const vtkm::Vec &point0, - const vtkm::Vec &point1, - vtkm::Float32 lineWidth, - const vtkm::rendering::Color &color, - bool inFront) const +void WorldAnnotatorGL::AddLine(const vtkm::Vec& point0, + const vtkm::Vec& point1, vtkm::Float32 lineWidth, + const vtkm::rendering::Color& color, bool inFront) const { if (inFront) { - glDepthRange(-.0001,.9999); + glDepthRange(-.0001, .9999); } glDisable(GL_LIGHTING); @@ -60,23 +61,21 @@ void WorldAnnotatorGL::AddLine(const vtkm::Vec &point0, if (inFront) { - glDepthRange(0,1); + glDepthRange(0, 1); } } -void WorldAnnotatorGL::AddText(const vtkm::Vec &origin, - const vtkm::Vec &right, - const vtkm::Vec &up, - vtkm::Float32 scale, - const vtkm::Vec &anchor, - const vtkm::rendering::Color &color, - const std::string &text) const +void WorldAnnotatorGL::AddText(const vtkm::Vec& origin, + const vtkm::Vec& right, + const vtkm::Vec& up, vtkm::Float32 scale, + const vtkm::Vec& anchor, + const vtkm::rendering::Color& color, const std::string& text) const { - vtkm::Vec n = vtkm::Cross(right,up); + vtkm::Vec n = vtkm::Cross(right, up); vtkm::Normalize(n); - vtkm::Matrix m; + vtkm::Matrix m; m = MatrixHelpers::WorldMatrix(origin, right, up, n); vtkm::Float32 ogl[16]; @@ -88,8 +87,7 @@ void WorldAnnotatorGL::AddText(const vtkm::Vec &origin, glPopMatrix(); } -void WorldAnnotatorGL::RenderText(vtkm::Float32 scale, - vtkm::Float32 anchorx, vtkm::Float32 anchory, +void WorldAnnotatorGL::RenderText(vtkm::Float32 scale, vtkm::Float32 anchorx, vtkm::Float32 anchory, std::string text) const { if (!this->FontTexture.Valid()) @@ -98,25 +96,21 @@ void WorldAnnotatorGL::RenderText(vtkm::Float32 scale, // use it. Although technically we are changing the state, the logical // state does not change, so we go ahead and do it in this const // function. - vtkm::rendering::WorldAnnotatorGL *self = - const_cast(this); + vtkm::rendering::WorldAnnotatorGL* self = const_cast(this); self->Font = BitmapFontFactory::CreateLiberation2Sans(); - const std::vector &rawpngdata = - this->Font.GetRawImageData(); + const std::vector& rawpngdata = this->Font.GetRawImageData(); std::vector rgba; unsigned long width, height; - int error = vtkm::rendering::DecodePNG(rgba, width, height, - &rawpngdata[0], rawpngdata.size()); + int error = vtkm::rendering::DecodePNG(rgba, width, height, &rawpngdata[0], rawpngdata.size()); if (error != 0) { return; } - self->FontTexture.CreateAlphaFromRGBA(int(width),int(height),rgba); + self->FontTexture.CreateAlphaFromRGBA(int(width), int(height), rgba); } - this->FontTexture.Enable(); glDepthMask(GL_FALSE); @@ -130,31 +124,29 @@ void WorldAnnotatorGL::RenderText(vtkm::Float32 scale, vtkm::Float32 textwidth = this->Font.GetTextWidth(text); - vtkm::Float32 fx = -(.5f + .5f*anchorx) * textwidth; - vtkm::Float32 fy = -(.5f + .5f*anchory); + vtkm::Float32 fx = -(.5f + .5f * anchorx) * textwidth; + vtkm::Float32 fy = -(.5f + .5f * anchory); vtkm::Float32 fz = 0; - for (unsigned int i=0; iFont.GetCharPolygon(c, fx, fy, - vl, vr, vt, vb, - tl, tr, tt, tb, nextchar); + vtkm::Float32 vl, vr, vt, vb; + vtkm::Float32 tl, tr, tt, tb; + this->Font.GetCharPolygon(c, fx, fy, vl, vr, vt, vb, tl, tr, tt, tb, nextchar); - glTexCoord2f(tl, 1.f-tt); - glVertex3f(scale*vl, scale*vt, fz); + glTexCoord2f(tl, 1.f - tt); + glVertex3f(scale * vl, scale * vt, fz); - glTexCoord2f(tl, 1.f-tb); - glVertex3f(scale*vl, scale*vb, fz); + glTexCoord2f(tl, 1.f - tb); + glVertex3f(scale * vl, scale * vb, fz); - glTexCoord2f(tr, 1.f-tb); - glVertex3f(scale*vr, scale*vb, fz); + glTexCoord2f(tr, 1.f - tb); + glVertex3f(scale * vr, scale * vb, fz); - glTexCoord2f(tr, 1.f-tt); - glVertex3f(scale*vr, scale*vt, fz); + glTexCoord2f(tr, 1.f - tt); + glVertex3f(scale * vr, scale * vt, fz); } glEnd(); @@ -165,6 +157,5 @@ void WorldAnnotatorGL::RenderText(vtkm::Float32 scale, glDepthMask(GL_TRUE); glDisable(GL_ALPHA_TEST); } - } } // namespace vtkm::rendering diff --git a/vtkm/rendering/WorldAnnotatorGL.h b/vtkm/rendering/WorldAnnotatorGL.h index e53ec2736..df77c04aa 100644 --- a/vtkm/rendering/WorldAnnotatorGL.h +++ b/vtkm/rendering/WorldAnnotatorGL.h @@ -25,37 +25,33 @@ #include #include -namespace vtkm { -namespace rendering { +namespace vtkm +{ +namespace rendering +{ class VTKM_RENDERING_EXPORT WorldAnnotatorGL : public WorldAnnotator { public: ~WorldAnnotatorGL(); - void AddLine(const vtkm::Vec &point0, - const vtkm::Vec &point1, - vtkm::Float32 lineWidth, - const vtkm::rendering::Color &color, + void AddLine(const vtkm::Vec& point0, const vtkm::Vec& point1, + vtkm::Float32 lineWidth, const vtkm::rendering::Color& color, bool inFront) const VTKM_OVERRIDE; - void AddText(const vtkm::Vec &origin, - const vtkm::Vec &right, - const vtkm::Vec &up, - vtkm::Float32 scale, - const vtkm::Vec &anchor, - const vtkm::rendering::Color &color, - const std::string &text) const VTKM_OVERRIDE; + void AddText(const vtkm::Vec& origin, const vtkm::Vec& right, + const vtkm::Vec& up, vtkm::Float32 scale, + const vtkm::Vec& anchor, const vtkm::rendering::Color& color, + const std::string& text) const VTKM_OVERRIDE; private: BitmapFont Font; TextureGL FontTexture; - void RenderText(vtkm::Float32 scale, - vtkm::Float32 anchorx, vtkm::Float32 anchory, + void RenderText(vtkm::Float32 scale, vtkm::Float32 anchorx, vtkm::Float32 anchory, std::string text) const; }; - -}} //namespace vtkm::rendering +} +} //namespace vtkm::rendering #endif // vtk_m_rendering_WorldAnnotatorGL_h diff --git a/vtkm/rendering/internal/OpenGLHeaders.h b/vtkm/rendering/internal/OpenGLHeaders.h index d60684a0d..8c44a1b80 100644 --- a/vtkm/rendering/internal/OpenGLHeaders.h +++ b/vtkm/rendering/internal/OpenGLHeaders.h @@ -26,9 +26,9 @@ #include #if defined(__APPLE__) -# include +#include #else -# include +#include #endif #endif //vtk_m_rendering_internal_OpenGLHeaders_h diff --git a/vtkm/rendering/internal/RunTriangulator.cxx b/vtkm/rendering/internal/RunTriangulator.cxx index c791a44c1..00073b97b 100644 --- a/vtkm/rendering/internal/RunTriangulator.cxx +++ b/vtkm/rendering/internal/RunTriangulator.cxx @@ -23,26 +23,30 @@ #include #include -namespace vtkm { -namespace rendering { -namespace internal { +namespace vtkm +{ +namespace rendering +{ +namespace internal +{ -namespace { +namespace +{ struct TriangulatorFunctor { vtkm::cont::DynamicCellSet CellSet; - vtkm::cont::ArrayHandle > Indices; + vtkm::cont::ArrayHandle> Indices; vtkm::Id NumberOfTriangles; VTKM_CONT TriangulatorFunctor(vtkm::cont::DynamicCellSet cellSet) : CellSet(cellSet) - { } + { + } - template - VTKM_CONT - bool operator()(Device) + template + VTKM_CONT bool operator()(Device) { vtkm::rendering::Triangulator triangulator; triangulator.Run(this->CellSet, this->Indices, this->NumberOfTriangles); @@ -52,10 +56,9 @@ struct TriangulatorFunctor } // anonymous namespace -void RunTriangulator(const vtkm::cont::DynamicCellSet &cellSet, - vtkm::cont::ArrayHandle > &indices, - vtkm::Id &numberOfTriangles, - const vtkm::cont::RuntimeDeviceTracker &tracker) +void RunTriangulator(const vtkm::cont::DynamicCellSet& cellSet, + vtkm::cont::ArrayHandle>& indices, + vtkm::Id& numberOfTriangles, const vtkm::cont::RuntimeDeviceTracker& tracker) { // TODO: Should the rendering library support policies or some other way to // configure with custom devices? @@ -68,7 +71,6 @@ void RunTriangulator(const vtkm::cont::DynamicCellSet &cellSet, indices = triangulatorFunctor.Indices; numberOfTriangles = triangulatorFunctor.NumberOfTriangles; } - } } } // namespace vtkm::rendering::internal diff --git a/vtkm/rendering/internal/RunTriangulator.h b/vtkm/rendering/internal/RunTriangulator.h index 39fd8b628..3de8df6f2 100644 --- a/vtkm/rendering/internal/RunTriangulator.h +++ b/vtkm/rendering/internal/RunTriangulator.h @@ -26,9 +26,12 @@ #include #include -namespace vtkm { -namespace rendering { -namespace internal { +namespace vtkm +{ +namespace rendering +{ +namespace internal +{ /// This is a wrapper around the Triangulator worklet so that the /// implementation of the triangulator only gets compiled once. This function @@ -36,12 +39,10 @@ namespace internal { /// filters, and filters should be compiled in a library (for the same reason). /// VTKM_RENDERING_EXPORT -void RunTriangulator(const vtkm::cont::DynamicCellSet &cellSet, - vtkm::cont::ArrayHandle > &indices, - vtkm::Id &numberOfTriangles, - const vtkm::cont::RuntimeDeviceTracker &tracker = - vtkm::cont::GetGlobalRuntimeDeviceTracker()); - +void RunTriangulator( + const vtkm::cont::DynamicCellSet& cellSet, + vtkm::cont::ArrayHandle>& indices, vtkm::Id& numberOfTriangles, + const vtkm::cont::RuntimeDeviceTracker& tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker()); } } } // namespace vtkm::rendering::internal diff --git a/vtkm/rendering/raytracing/BoundingVolumeHierarchy.h b/vtkm/rendering/raytracing/BoundingVolumeHierarchy.h index e8a09030e..daa85dff2 100644 --- a/vtkm/rendering/raytracing/BoundingVolumeHierarchy.h +++ b/vtkm/rendering/raytracing/BoundingVolumeHierarchy.h @@ -39,9 +39,12 @@ #include #include -namespace vtkm { -namespace rendering { -namespace raytracing { +namespace vtkm +{ +namespace rendering +{ +namespace raytracing +{ // // This is the data structure that is passed to the ray tracer. // @@ -50,48 +53,44 @@ class LinearBVH { public: - vtkm::cont::ArrayHandle< vtkm::Vec > FlatBVH; - vtkm::cont::ArrayHandle< vtkm::Vec > LeafNodes; + vtkm::cont::ArrayHandle> FlatBVH; + vtkm::cont::ArrayHandle> LeafNodes; vtkm::Vec ExtentMin; vtkm::Vec ExtentMax; vtkm::Id LeafCount; VTKM_CONT - LinearBVH() - {} - template - VTKM_CONT - void Allocate(const vtkm::Id &leafCount, - DeviceAdapter deviceAdapter) + LinearBVH() {} + template + VTKM_CONT void Allocate(const vtkm::Id& leafCount, DeviceAdapter deviceAdapter) { LeafCount = leafCount; LeafNodes.PrepareForOutput(leafCount, deviceAdapter); - FlatBVH.PrepareForOutput((leafCount-1)*4, deviceAdapter); + FlatBVH.PrepareForOutput((leafCount - 1) * 4, deviceAdapter); } - }; // class LinearBVH -template +template class LinearBVHBuilder { private: - typedef typename vtkm::cont::ArrayHandle< vtkm::Vec > Vec3DoubleArrayHandle; - typedef typename vtkm::cont::ArrayHandle< vtkm::Vec > Vec3FloatArrayHandle; - typedef typename Vec3DoubleArrayHandle::ExecutionTypes::PortalConst Point64PortalConst; - typedef typename Vec3FloatArrayHandle::ExecutionTypes::PortalConst Point32PortalConst; + typedef typename vtkm::cont::ArrayHandle> Vec3DoubleArrayHandle; + typedef typename vtkm::cont::ArrayHandle> Vec3FloatArrayHandle; + typedef + typename Vec3DoubleArrayHandle::ExecutionTypes::PortalConst Point64PortalConst; + typedef + typename Vec3FloatArrayHandle::ExecutionTypes::PortalConst Point32PortalConst; + public: class CountingIterator : public vtkm::worklet::WorkletMapField { public: VTKM_CONT - CountingIterator(){} + CountingIterator() {} typedef void ControlSignature(FieldOut<>); typedef void ExecutionSignature(WorkIndex, _1); VTKM_EXEC - void operator()(const vtkm::Id &index, vtkm::Id &outId) const - { - outId = index; - } + void operator()(const vtkm::Id& index, vtkm::Id& outId) const { outId = index; } }; //class countingIterator class FindAABBs : public vtkm::worklet::WorkletMapField @@ -99,82 +98,64 @@ public: public: VTKM_CONT FindAABBs() {} - typedef void ControlSignature(FieldIn<>, - FieldOut<>, - FieldOut<>, - FieldOut<>, - FieldOut<>, - FieldOut<>, - FieldOut<>, - WholeArrayIn); - typedef void ExecutionSignature(_1, - _2, - _3, - _4, - _5, - _6, - _7, - _8); - template - VTKM_EXEC - void operator()(const vtkm::Vec indices, - vtkm::Float32 &xmin, - vtkm::Float32 &ymin, - vtkm::Float32 &zmin, - vtkm::Float32 &xmax, - vtkm::Float32 &ymax, - vtkm::Float32 &zmax, - const PointPortalType &points) const + typedef void ControlSignature(FieldIn<>, FieldOut<>, FieldOut<>, FieldOut<>, FieldOut<>, + FieldOut<>, FieldOut<>, WholeArrayIn); + typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8); + template + VTKM_EXEC void operator()(const vtkm::Vec indices, vtkm::Float32& xmin, + vtkm::Float32& ymin, vtkm::Float32& zmin, vtkm::Float32& xmax, + vtkm::Float32& ymax, vtkm::Float32& zmax, + const PointPortalType& points) const { - // cast to Float32 - vtkm::Vec point; - point = static_cast< vtkm::Vec >(points.Get(indices[1])); + // cast to Float32 + vtkm::Vec point; + point = static_cast>(points.Get(indices[1])); xmin = point[0]; ymin = point[1]; zmin = point[2]; xmax = xmin; ymax = ymin; zmax = zmin; - point = static_cast< vtkm::Vec >(points.Get(indices[2])); - xmin = vtkm::Min(xmin,point[0]); - ymin = vtkm::Min(ymin,point[1]); - zmin = vtkm::Min(zmin,point[2]); - xmax = vtkm::Max(xmax,point[0]); - ymax = vtkm::Max(ymax,point[1]); - zmax = vtkm::Max(zmax,point[2]); - point = static_cast< vtkm::Vec >(points.Get(indices[3])); - xmin = vtkm::Min(xmin,point[0]); - ymin = vtkm::Min(ymin,point[1]); - zmin = vtkm::Min(zmin,point[2]); - xmax = vtkm::Max(xmax,point[0]); - ymax = vtkm::Max(ymax,point[1]); - zmax = vtkm::Max(zmax,point[2]); + point = static_cast>(points.Get(indices[2])); + xmin = vtkm::Min(xmin, point[0]); + ymin = vtkm::Min(ymin, point[1]); + zmin = vtkm::Min(zmin, point[2]); + xmax = vtkm::Max(xmax, point[0]); + ymax = vtkm::Max(ymax, point[1]); + zmax = vtkm::Max(zmax, point[2]); + point = static_cast>(points.Get(indices[3])); + xmin = vtkm::Min(xmin, point[0]); + ymin = vtkm::Min(ymin, point[1]); + zmin = vtkm::Min(zmin, point[2]); + xmax = vtkm::Max(xmax, point[0]); + ymax = vtkm::Max(ymax, point[1]); + zmax = vtkm::Max(zmax, point[2]); } }; //class FindAABBs - class GatherFloat32 : public vtkm::worklet::WorkletMapField { private: - typedef typename vtkm::cont::ArrayHandle FloatArrayHandle; + typedef typename vtkm::cont::ArrayHandle FloatArrayHandle; typedef typename FloatArrayHandle::ExecutionTypes::PortalConst PortalConst; - typedef typename FloatArrayHandle::ExecutionTypes::Portal Portal; + typedef typename FloatArrayHandle::ExecutionTypes::Portal Portal; + private: PortalConst InputPortal; - Portal OutputPortal; + Portal OutputPortal; + public: VTKM_CONT - GatherFloat32(const FloatArrayHandle &inputPortal, - FloatArrayHandle &outputPortal, - const vtkm::Id &size) - : InputPortal(inputPortal.PrepareForInput( DeviceAdapter() )) + GatherFloat32(const FloatArrayHandle& inputPortal, FloatArrayHandle& outputPortal, + const vtkm::Id& size) + : InputPortal(inputPortal.PrepareForInput(DeviceAdapter())) { - this->OutputPortal = outputPortal.PrepareForOutput(size, DeviceAdapter() ); + this->OutputPortal = outputPortal.PrepareForOutput(size, DeviceAdapter()); } typedef void ControlSignature(FieldIn<>); typedef void ExecutionSignature(WorkIndex, _1); VTKM_EXEC - void operator()(const vtkm::Id &outIndex, const vtkm::Id &inIndex) const + void operator()(const vtkm::Id& outIndex, const vtkm::Id& inIndex) const { OutputPortal.Set(outIndex, InputPortal.Get(inIndex)); } @@ -183,26 +164,27 @@ public: class GatherVecCast : public vtkm::worklet::WorkletMapField { private: - typedef typename vtkm::cont::ArrayHandle > Vec4IdArrayHandle; - typedef typename vtkm::cont::ArrayHandle > Vec4IntArrayHandle; + typedef typename vtkm::cont::ArrayHandle> Vec4IdArrayHandle; + typedef typename vtkm::cont::ArrayHandle> Vec4IntArrayHandle; typedef typename Vec4IdArrayHandle::ExecutionTypes::PortalConst PortalConst; - typedef typename Vec4IntArrayHandle::ExecutionTypes::Portal Portal; + typedef typename Vec4IntArrayHandle::ExecutionTypes::Portal Portal; + private: PortalConst InputPortal; - Portal OutputPortal; + Portal OutputPortal; + public: VTKM_CONT - GatherVecCast(const Vec4IdArrayHandle &inputPortal, - Vec4IntArrayHandle &outputPortal, - const vtkm::Id &size) - : InputPortal(inputPortal.PrepareForInput( DeviceAdapter() )) + GatherVecCast(const Vec4IdArrayHandle& inputPortal, Vec4IntArrayHandle& outputPortal, + const vtkm::Id& size) + : InputPortal(inputPortal.PrepareForInput(DeviceAdapter())) { - this->OutputPortal = outputPortal.PrepareForOutput(size, DeviceAdapter() ); + this->OutputPortal = outputPortal.PrepareForOutput(size, DeviceAdapter()); } typedef void ControlSignature(FieldIn<>); typedef void ExecutionSignature(WorkIndex, _1); VTKM_EXEC - void operator()(const vtkm::Id &outIndex, const vtkm::Id &inIndex) const + void operator()(const vtkm::Id& outIndex, const vtkm::Id& inIndex) const { OutputPortal.Set(outIndex, InputPortal.Get(inIndex)); } @@ -211,19 +193,18 @@ public: class BVHData { public: - //TODO: make private - vtkm::cont::ArrayHandle *xmins; - vtkm::cont::ArrayHandle *ymins; - vtkm::cont::ArrayHandle *zmins; - vtkm::cont::ArrayHandle *xmaxs; - vtkm::cont::ArrayHandle *ymaxs; - vtkm::cont::ArrayHandle *zmaxs; + vtkm::cont::ArrayHandle* xmins; + vtkm::cont::ArrayHandle* ymins; + vtkm::cont::ArrayHandle* zmins; + vtkm::cont::ArrayHandle* xmaxs; + vtkm::cont::ArrayHandle* ymaxs; + vtkm::cont::ArrayHandle* zmaxs; - vtkm::cont::ArrayHandle mortonCodes; - vtkm::cont::ArrayHandle parent; - vtkm::cont::ArrayHandle leftChild; - vtkm::cont::ArrayHandle rightChild; + vtkm::cont::ArrayHandle mortonCodes; + vtkm::cont::ArrayHandle parent; + vtkm::cont::ArrayHandle leftChild; + vtkm::cont::ArrayHandle rightChild; VTKM_CONT BVHData(vtkm::Id numPrimitives) @@ -242,7 +223,6 @@ public: leftChild.PrepareForOutput(InnerNodeCount, DeviceAdapter()); rightChild.PrepareForOutput(InnerNodeCount, DeviceAdapter()); mortonCodes.PrepareForOutput(NumPrimitives, DeviceAdapter()); - } VTKM_CONT @@ -255,19 +235,12 @@ public: delete xmaxs; delete ymaxs; delete zmaxs; - } VTKM_CONT - vtkm::Id GetNumberOfPrimitives() const - { - return NumPrimitives; - } + vtkm::Id GetNumberOfPrimitives() const { return NumPrimitives; } VTKM_CONT - vtkm::Id GetNumberOfInnerNodes() const - { - return InnerNodeCount; - } - private: + vtkm::Id GetNumberOfInnerNodes() const { return InnerNodeCount; } + private: vtkm::Id NumPrimitives; vtkm::Id InnerNodeCount; @@ -278,9 +251,9 @@ public: private: typedef typename vtkm::cont::ArrayHandle IdArrayHandle; typedef typename vtkm::cont::ArrayHandle Int8Handle; - typedef typename vtkm::cont::ArrayHandle > Float2ArrayHandle; - typedef typename vtkm::cont::ArrayHandle > VecInt2Handle; - typedef typename vtkm::cont::ArrayHandle > Float4ArrayHandle; + typedef typename vtkm::cont::ArrayHandle> Float2ArrayHandle; + typedef typename vtkm::cont::ArrayHandle> VecInt2Handle; + typedef typename vtkm::cont::ArrayHandle> Float4ArrayHandle; typedef typename IdArrayHandle::ExecutionTypes::PortalConst IdConstPortal; typedef typename Float2ArrayHandle::ExecutionTypes::Portal Float2ArrayPortal; @@ -295,64 +268,54 @@ public: vtkm::Int32 LeafCount; //Int8Handle Counters; //Int8ArrayPortal CountersPortal; - vtkm::exec::AtomicArray Counters; + vtkm::exec::AtomicArray Counters; + public: VTKM_CONT - PropagateAABBs(IdArrayHandle &parents, - IdArrayHandle &leftChildren, - IdArrayHandle &rightChildren, - vtkm::Int32 leafCount, - Float4ArrayHandle flatBVH, - const vtkm::exec::AtomicArray &counters) - : Parents(parents.PrepareForInput( DeviceAdapter() )), - LeftChildren(leftChildren.PrepareForInput( DeviceAdapter() )), - RightChildren(rightChildren.PrepareForInput( DeviceAdapter() )), - LeafCount(leafCount), - Counters(counters) + PropagateAABBs(IdArrayHandle& parents, IdArrayHandle& leftChildren, + IdArrayHandle& rightChildren, vtkm::Int32 leafCount, Float4ArrayHandle flatBVH, + const vtkm::exec::AtomicArray& counters) + : Parents(parents.PrepareForInput(DeviceAdapter())) + , LeftChildren(leftChildren.PrepareForInput(DeviceAdapter())) + , RightChildren(rightChildren.PrepareForInput(DeviceAdapter())) + , LeafCount(leafCount) + , Counters(counters) { - this->FlatBVH = flatBVH.PrepareForOutput((LeafCount - 1) * 4, DeviceAdapter() ); + this->FlatBVH = flatBVH.PrepareForOutput((LeafCount - 1) * 4, DeviceAdapter()); } - typedef void ControlSignature(ExecObject, - ExecObject, - ExecObject, - ExecObject, - ExecObject, + typedef void ControlSignature(ExecObject, ExecObject, ExecObject, ExecObject, ExecObject, ExecObject); - typedef void ExecutionSignature(WorkIndex, - _1, - _2, - _3, - _4, - _5, - _6); - template - VTKM_EXEC_CONT - void operator()(const vtkm::Id workIndex, - const vtkm::exec::ExecutionWholeArrayConst &xmin, - const vtkm::exec::ExecutionWholeArrayConst &ymin, - const vtkm::exec::ExecutionWholeArrayConst &zmin, - const vtkm::exec::ExecutionWholeArrayConst &xmax, - const vtkm::exec::ExecutionWholeArrayConst &ymax, - const vtkm::exec::ExecutionWholeArrayConst &zmax) const + typedef void ExecutionSignature(WorkIndex, _1, _2, _3, _4, _5, _6); + template + VTKM_EXEC_CONT void operator()( + const vtkm::Id workIndex, + const vtkm::exec::ExecutionWholeArrayConst& xmin, + const vtkm::exec::ExecutionWholeArrayConst& ymin, + const vtkm::exec::ExecutionWholeArrayConst& zmin, + const vtkm::exec::ExecutionWholeArrayConst& xmax, + const vtkm::exec::ExecutionWholeArrayConst& ymax, + const vtkm::exec::ExecutionWholeArrayConst& zmax) const { //move up into the inner nodes vtkm::Id currentNode = LeafCount - 1 + workIndex; - vtkm::Vec childVector; - while(currentNode != 0) + vtkm::Vec childVector; + while (currentNode != 0) { currentNode = Parents.Get(currentNode); - vtkm::Int32 oldCount = Counters.Add(currentNode,1); - if(oldCount == 0) return; + vtkm::Int32 oldCount = Counters.Add(currentNode, 1); + if (oldCount == 0) + return; vtkm::Id currentNodeOffset = currentNode * 4; childVector[0] = LeftChildren.Get(currentNode); childVector[1] = RightChildren.Get(currentNode); - if(childVector[0] > (LeafCount - 2)) + if (childVector[0] > (LeafCount - 2)) { childVector[0] = childVector[0] - LeafCount + 1; - vtkm::Vec first4Vec;// = FlatBVH.Get(currentNode); only this one needs effects this + vtkm::Vec + first4Vec; // = FlatBVH.Get(currentNode); only this one needs effects this first4Vec[0] = xmin.Get(childVector[0]); first4Vec[1] = ymin.Get(childVector[0]); @@ -360,10 +323,10 @@ public: first4Vec[3] = xmax.Get(childVector[0]); FlatBVH.Set(currentNodeOffset, first4Vec); - vtkm::Vec second4Vec = FlatBVH.Get(currentNodeOffset+1); + vtkm::Vec second4Vec = FlatBVH.Get(currentNodeOffset + 1); second4Vec[0] = ymax.Get(childVector[0]); second4Vec[1] = zmax.Get(childVector[0]); - FlatBVH.Set(currentNodeOffset+1, second4Vec); + FlatBVH.Set(currentNodeOffset + 1, second4Vec); childVector[0] = -(childVector[0] + 1); } @@ -371,40 +334,39 @@ public: { vtkm::Id child = childVector[0] * 4; - vtkm::Vec cFirst4Vec = FlatBVH.Get(child); - vtkm::Vec cSecond4Vec = FlatBVH.Get(child+1); - vtkm::Vec cThird4Vec = FlatBVH.Get(child+2); + vtkm::Vec cFirst4Vec = FlatBVH.Get(child); + vtkm::Vec cSecond4Vec = FlatBVH.Get(child + 1); + vtkm::Vec cThird4Vec = FlatBVH.Get(child + 2); cFirst4Vec[0] = vtkm::Min(cFirst4Vec[0], cSecond4Vec[2]); cFirst4Vec[1] = vtkm::Min(cFirst4Vec[1], cSecond4Vec[3]); cFirst4Vec[2] = vtkm::Min(cFirst4Vec[2], cThird4Vec[0]); cFirst4Vec[3] = vtkm::Max(cFirst4Vec[3], cThird4Vec[1]); - FlatBVH.Set(currentNodeOffset,cFirst4Vec); + FlatBVH.Set(currentNodeOffset, cFirst4Vec); - vtkm::Vec second4Vec = FlatBVH.Get(currentNodeOffset+1); + vtkm::Vec second4Vec = FlatBVH.Get(currentNodeOffset + 1); second4Vec[0] = vtkm::Max(cSecond4Vec[0], cThird4Vec[2]); second4Vec[1] = vtkm::Max(cSecond4Vec[1], cThird4Vec[3]); - FlatBVH.Set(currentNodeOffset+1, second4Vec); + FlatBVH.Set(currentNodeOffset + 1, second4Vec); } - if(childVector[1] > (LeafCount - 2)) + if (childVector[1] > (LeafCount - 2)) { childVector[1] = childVector[1] - LeafCount + 1; - - vtkm::Vec second4Vec = FlatBVH.Get(currentNodeOffset+1); + vtkm::Vec second4Vec = FlatBVH.Get(currentNodeOffset + 1); second4Vec[2] = xmin.Get(childVector[1]); second4Vec[3] = ymin.Get(childVector[1]); - FlatBVH.Set(currentNodeOffset+1, second4Vec); + FlatBVH.Set(currentNodeOffset + 1, second4Vec); - vtkm::Vec third4Vec; + vtkm::Vec third4Vec; third4Vec[0] = zmin.Get(childVector[1]); third4Vec[1] = xmax.Get(childVector[1]); third4Vec[2] = ymax.Get(childVector[1]); third4Vec[3] = zmax.Get(childVector[1]); - FlatBVH.Set(currentNodeOffset+2, third4Vec); + FlatBVH.Set(currentNodeOffset + 2, third4Vec); childVector[1] = -(childVector[1] + 1); } else @@ -412,28 +374,29 @@ public: vtkm::Id child = childVector[1] * 4; - vtkm::Vec cFirst4Vec = FlatBVH.Get(child); - vtkm::Vec cSecond4Vec = FlatBVH.Get(child+1); - vtkm::Vec cThird4Vec = FlatBVH.Get(child+2); + vtkm::Vec cFirst4Vec = FlatBVH.Get(child); + vtkm::Vec cSecond4Vec = FlatBVH.Get(child + 1); + vtkm::Vec cThird4Vec = FlatBVH.Get(child + 2); - vtkm::Vec second4Vec = FlatBVH.Get(currentNodeOffset+1); + vtkm::Vec second4Vec = FlatBVH.Get(currentNodeOffset + 1); second4Vec[2] = vtkm::Min(cFirst4Vec[0], cSecond4Vec[2]); second4Vec[3] = vtkm::Min(cFirst4Vec[1], cSecond4Vec[3]); - FlatBVH.Set(currentNodeOffset+1, second4Vec); + FlatBVH.Set(currentNodeOffset + 1, second4Vec); cThird4Vec[0] = vtkm::Min(cFirst4Vec[2], cThird4Vec[0]); cThird4Vec[1] = vtkm::Max(cFirst4Vec[3], cThird4Vec[1]); cThird4Vec[2] = vtkm::Max(cSecond4Vec[0], cThird4Vec[2]); cThird4Vec[3] = vtkm::Max(cSecond4Vec[1], cThird4Vec[3]); - FlatBVH.Set(currentNodeOffset+2,cThird4Vec); - + FlatBVH.Set(currentNodeOffset + 2, cThird4Vec); } - vtkm::Vec fourth4Vec; - vtkm::Int32 leftChild = static_cast((childVector[0] >= 0) ? childVector[0] * 4 : childVector[0]); - memcpy(&fourth4Vec[0],&leftChild,4); - vtkm::Int32 rightChild = static_cast((childVector[1] >= 0) ? childVector[1] * 4 : childVector[1]); - memcpy(&fourth4Vec[1],&rightChild,4); - FlatBVH.Set(currentNodeOffset+3,fourth4Vec); + vtkm::Vec fourth4Vec; + vtkm::Int32 leftChild = + static_cast((childVector[0] >= 0) ? childVector[0] * 4 : childVector[0]); + memcpy(&fourth4Vec[0], &leftChild, 4); + vtkm::Int32 rightChild = + static_cast((childVector[1] >= 0) ? childVector[1] * 4 : childVector[1]); + memcpy(&fourth4Vec[1], &rightChild, 4); + FlatBVH.Set(currentNodeOffset + 3, fourth4Vec); } } }; //class PropagateAABBs @@ -441,9 +404,9 @@ public: class MortonCodeAABB : public vtkm::worklet::WorkletMapField { private: - // (1.f / dx),(1.f / dy), (1.f, / dz) - vtkm::Vec InverseExtent; - vtkm::Vec MinCoordinate; + // (1.f / dx),(1.f / dy), (1.f, / dz) + vtkm::Vec InverseExtent; + vtkm::Vec MinCoordinate; //expands 10-bit unsigned int into 30 bits VTKM_EXEC @@ -458,9 +421,7 @@ public: //Returns 30 bit morton code for coordinates for //coordinates in the unit cude VTKM_EXEC - vtkm::UInt32 Morton3D(vtkm::Float32 &x, - vtkm::Float32 &y, - vtkm::Float32 &z) const + vtkm::UInt32 Morton3D(vtkm::Float32& x, vtkm::Float32& y, vtkm::Float32& z) const { //take the first 10 bits x = fminf(fmaxf(x * 1024.0f, 0.0f), 1023.0f); @@ -476,40 +437,25 @@ public: public: VTKM_CONT - MortonCodeAABB(const vtkm::Vec &inverseExtent, - const vtkm::Vec &minCoordinate) - : InverseExtent(inverseExtent), - MinCoordinate( minCoordinate) {} + MortonCodeAABB(const vtkm::Vec& inverseExtent, + const vtkm::Vec& minCoordinate) + : InverseExtent(inverseExtent) + , MinCoordinate(minCoordinate) + { + } - typedef void ControlSignature(FieldIn<>, - FieldIn<>, - FieldIn<>, - FieldIn<>, - FieldIn<>, - FieldIn<>, + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldIn<>, FieldIn<>, FieldIn<>, FieldIn<>, FieldOut<>); - typedef void ExecutionSignature(_1, - _2, - _3, - _4, - _5, - _6, - _7); + typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7); typedef _7 InputDomain; VTKM_EXEC - void operator()(const vtkm::Float32 &xmin, - const vtkm::Float32 &ymin, - const vtkm::Float32 &zmin, - const vtkm::Float32 &xmax, - const vtkm::Float32 &ymax, - const vtkm::Float32 &zmax, - vtkm::UInt32 &mortonCode) const + void operator()(const vtkm::Float32& xmin, const vtkm::Float32& ymin, const vtkm::Float32& zmin, + const vtkm::Float32& xmax, const vtkm::Float32& ymax, const vtkm::Float32& zmax, + vtkm::UInt32& mortonCode) const { - vtkm::Vec direction(xmax - xmin, - ymax - ymin, - zmax - zmin); - vtkm::Float32 halfDistance = sqrtf(vtkm::dot(direction,direction)) * 0.5f; + vtkm::Vec direction(xmax - xmin, ymax - ymin, zmax - zmin); + vtkm::Float32 halfDistance = sqrtf(vtkm::dot(direction, direction)) * 0.5f; vtkm::Normalize(direction); vtkm::Float32 centroidx = xmin + halfDistance * direction[0] - MinCoordinate[0]; vtkm::Float32 centroidy = ymin + halfDistance * direction[1] - MinCoordinate[1]; @@ -525,26 +471,49 @@ public: class TreeBuilder : public vtkm::worklet::WorkletMapField { public: - typedef typename vtkm::cont::ArrayHandle UIntArrayHandle; - typedef typename vtkm::cont::ArrayHandle IdArrayHandle; + typedef typename vtkm::cont::ArrayHandle UIntArrayHandle; + typedef typename vtkm::cont::ArrayHandle IdArrayHandle; typedef typename UIntArrayHandle::ExecutionTypes::PortalConst UIntPortalType; - typedef typename IdArrayHandle::ExecutionTypes::Portal IdPortalType; + typedef typename IdArrayHandle::ExecutionTypes::Portal IdPortalType; + private: UIntPortalType MortonCodePortal; - IdPortalType ParentPortal; + IdPortalType ParentPortal; vtkm::Id LeafCount; vtkm::Id InnerCount; //TODO: get instrinsic support VTKM_EXEC - vtkm::Int32 CountLeadingZeros(vtkm::UInt32 &x) const + vtkm::Int32 CountLeadingZeros(vtkm::UInt32& x) const { vtkm::UInt32 y; vtkm::UInt32 n = 32; - y = x >>16; if (y != 0) { n = n -16; x = y; } - y = x >> 8; if (y != 0) { n = n - 8; x = y; } - y = x >> 4; if (y != 0) { n = n - 4; x = y; } - y = x >> 2; if (y != 0) { n = n - 2; x = y; } - y = x >> 1; if (y != 0) return vtkm::Int32(n - 2); + y = x >> 16; + if (y != 0) + { + n = n - 16; + x = y; + } + y = x >> 8; + if (y != 0) + { + n = n - 8; + x = y; + } + y = x >> 4; + if (y != 0) + { + n = n - 4; + x = y; + } + y = x >> 2; + if (y != 0) + { + n = n - 2; + x = y; + } + y = x >> 1; + if (y != 0) + return vtkm::Int32(n - 2); return vtkm::Int32(n - x); } @@ -555,84 +524,83 @@ public: // returns count of the largest binary prefix VTKM_EXEC - vtkm::Int32 delta(const vtkm::Int32 &a, - const vtkm::Int32 &b) const + vtkm::Int32 delta(const vtkm::Int32& a, const vtkm::Int32& b) const { bool tie = false; - bool outOfRange = (b < 0 || b > LeafCount -1); + bool outOfRange = (b < 0 || b > LeafCount - 1); //still make the call but with a valid adderss vtkm::Int32 bb = (outOfRange) ? 0 : b; - vtkm::UInt32 aCode = MortonCodePortal.Get(a); - vtkm::UInt32 bCode = MortonCodePortal.Get(bb); + vtkm::UInt32 aCode = MortonCodePortal.Get(a); + vtkm::UInt32 bCode = MortonCodePortal.Get(bb); //use xor to find where they differ vtkm::UInt32 exOr = aCode ^ bCode; tie = (exOr == 0); //break the tie, a and b must always differ - exOr = tie ? vtkm::UInt32(a) ^ vtkm::UInt32(bb) : exOr; + exOr = tie ? vtkm::UInt32(a) ^ vtkm::UInt32(bb) : exOr; vtkm::Int32 count = CountLeadingZeros(exOr); - if(tie) count += 32; + if (tie) + count += 32; count = (outOfRange) ? -1 : count; return count; } + public: VTKM_CONT - TreeBuilder(const UIntArrayHandle &mortonCodesHandle, - IdArrayHandle &parentHandle, - const vtkm::Id &leafCount) - : MortonCodePortal(mortonCodesHandle.PrepareForInput(DeviceAdapter())), - LeafCount(leafCount) + TreeBuilder(const UIntArrayHandle& mortonCodesHandle, IdArrayHandle& parentHandle, + const vtkm::Id& leafCount) + : MortonCodePortal(mortonCodesHandle.PrepareForInput(DeviceAdapter())) + , LeafCount(leafCount) { InnerCount = LeafCount - 1; - this->ParentPortal = parentHandle.PrepareForOutput(InnerCount + LeafCount, DeviceAdapter() ); + this->ParentPortal = parentHandle.PrepareForOutput(InnerCount + LeafCount, DeviceAdapter()); } - typedef void ControlSignature(FieldOut<>, - FieldOut<>); - typedef void ExecutionSignature(WorkIndex, - _1, - _2); + typedef void ControlSignature(FieldOut<>, FieldOut<>); + typedef void ExecutionSignature(WorkIndex, _1, _2); VTKM_EXEC - void operator()(const vtkm::Id &index, - vtkm::Id &leftChild, - vtkm::Id &rightChild) const + void operator()(const vtkm::Id& index, vtkm::Id& leftChild, vtkm::Id& rightChild) const { vtkm::Int32 idx = vtkm::Int32(index); //something = MortonCodePortal.Get(index) + 1; //determine range direction - vtkm::Int32 d = 0 > (delta(idx, idx + 1) - delta(idx, idx - 1)) ? -1 : 1; + vtkm::Int32 d = 0 > (delta(idx, idx + 1) - delta(idx, idx - 1)) ? -1 : 1; //find upper bound for the length of the range vtkm::Int32 minDelta = delta(idx, idx - d); vtkm::Int32 lMax = 2; - while( delta(idx, idx + lMax * d) > minDelta ) lMax *= 2; + while (delta(idx, idx + lMax * d) > minDelta) + lMax *= 2; //binary search to find the lower bound vtkm::Int32 l = 0; - for(int t = lMax / 2; t >= 1; t/=2) + for (int t = lMax / 2; t >= 1; t /= 2) { - if(delta(idx, idx + (l + t)*d ) > minDelta) l += t; + if (delta(idx, idx + (l + t) * d) > minDelta) + l += t; } vtkm::Int32 j = idx + l * d; - vtkm::Int32 deltaNode = delta(idx,j); + vtkm::Int32 deltaNode = delta(idx, j); vtkm::Int32 s = 0; vtkm::Float32 divFactor = 2.f; //find the split postition using a binary search - for(vtkm::Int32 t = (vtkm::Int32) ceil(vtkm::Float32(l) / divFactor);; divFactor*=2, t = (vtkm::Int32) ceil(vtkm::Float32(l) / divFactor) ) + for (vtkm::Int32 t = (vtkm::Int32)ceil(vtkm::Float32(l) / divFactor);; + divFactor *= 2, t = (vtkm::Int32)ceil(vtkm::Float32(l) / divFactor)) { - if(delta(idx, idx + (s + t) * d) > deltaNode) + if (delta(idx, idx + (s + t) * d) > deltaNode) { s += t; } - if(t == 1) break; + if (t == 1) + break; } - vtkm::Int32 split = idx + s * d + vtkm::Min(d,0); + vtkm::Int32 split = idx + s * d + vtkm::Min(d, 0); //assign parent/child pointers - if(vtkm::Min(idx, j) == split) + if (vtkm::Min(idx, j) == split) { //leaf - ParentPortal.Set(split + InnerCount,idx); + ParentPortal.Set(split + InnerCount, idx); leftChild = split + InnerCount; } else @@ -642,8 +610,7 @@ public: leftChild = split; } - - if(vtkm::Max(idx, j) == split + 1) + if (vtkm::Max(idx, j) == split + 1) { //leaf ParentPortal.Set(split + InnerCount + 1, idx); @@ -654,22 +621,20 @@ public: ParentPortal.Set(split + 1, idx); rightChild = split + 1; } - } + } }; // class TreeBuilder - public: VTKM_CONT LinearBVHBuilder() {} VTKM_CONT - void SortAABBS(BVHData &bvh, - vtkm::cont::ArrayHandle< vtkm::Vec > &triangleIndices, - vtkm::cont::ArrayHandle< vtkm::Vec > &outputTriangleIndices) + void SortAABBS(BVHData& bvh, vtkm::cont::ArrayHandle>& triangleIndices, + vtkm::cont::ArrayHandle>& outputTriangleIndices) { - //create array of indexes to be sorted with morton codes - vtkm::cont::ArrayHandle iterator; - iterator.PrepareForOutput( bvh.GetNumberOfPrimitives(), DeviceAdapter() ); + //create array of indexes to be sorted with morton codes + vtkm::cont::ArrayHandle iterator; + iterator.PrepareForOutput(bvh.GetNumberOfPrimitives(), DeviceAdapter()); vtkm::worklet::DispatcherMapField iteratorDispatcher; iteratorDispatcher.Invoke(iterator); @@ -691,13 +656,11 @@ public: //std::cout<<"\n\n\n"; //sort the morton codes - vtkm::cont::DeviceAdapterAlgorithm::SortByKey(bvh.mortonCodes, - iterator); + vtkm::cont::DeviceAdapterAlgorithm::SortByKey(bvh.mortonCodes, iterator); vtkm::Id arraySize = bvh.GetNumberOfPrimitives(); - vtkm::cont::ArrayHandle *tempStorage; - vtkm::cont::ArrayHandle *tempPtr; - + vtkm::cont::ArrayHandle* tempStorage; + vtkm::cont::ArrayHandle* tempPtr; //outputTriangleIndices.Allocate( bvh.GetNumberOfPrimitives() ); @@ -708,155 +671,122 @@ public: // //std::cout<GetPortalControl().Get(i)<<" "; // }//std::cout<<"\n"; //xmins - vtkm::worklet::DispatcherMapField( GatherFloat32(*bvh.xmins, - *tempStorage, - arraySize) ) + vtkm::worklet::DispatcherMapField( + GatherFloat32(*bvh.xmins, *tempStorage, arraySize)) .Invoke(iterator); - tempPtr = bvh.xmins; - bvh.xmins = tempStorage; + tempPtr = bvh.xmins; + bvh.xmins = tempStorage; tempStorage = tempPtr; - vtkm::worklet::DispatcherMapField( GatherFloat32(*bvh.ymins, - *tempStorage, - arraySize) ) + vtkm::worklet::DispatcherMapField( + GatherFloat32(*bvh.ymins, *tempStorage, arraySize)) .Invoke(iterator); - tempPtr = bvh.ymins; - bvh.ymins = tempStorage; + tempPtr = bvh.ymins; + bvh.ymins = tempStorage; tempStorage = tempPtr; //zmins - vtkm::worklet::DispatcherMapField( GatherFloat32(*bvh.zmins, - *tempStorage, - arraySize) ) + vtkm::worklet::DispatcherMapField( + GatherFloat32(*bvh.zmins, *tempStorage, arraySize)) .Invoke(iterator); - tempPtr = bvh.zmins; - bvh.zmins = tempStorage; + tempPtr = bvh.zmins; + bvh.zmins = tempStorage; tempStorage = tempPtr; //xmaxs - vtkm::worklet::DispatcherMapField( GatherFloat32(*bvh.xmaxs, - *tempStorage, - arraySize) ) + vtkm::worklet::DispatcherMapField( + GatherFloat32(*bvh.xmaxs, *tempStorage, arraySize)) .Invoke(iterator); - tempPtr = bvh.xmaxs; - bvh.xmaxs = tempStorage; + tempPtr = bvh.xmaxs; + bvh.xmaxs = tempStorage; tempStorage = tempPtr; //ymaxs - vtkm::worklet::DispatcherMapField( GatherFloat32(*bvh.ymaxs, - *tempStorage, - arraySize) ) + vtkm::worklet::DispatcherMapField( + GatherFloat32(*bvh.ymaxs, *tempStorage, arraySize)) .Invoke(iterator); - tempPtr = bvh.ymaxs; - bvh.ymaxs = tempStorage; + tempPtr = bvh.ymaxs; + bvh.ymaxs = tempStorage; tempStorage = tempPtr; //zmaxs - vtkm::worklet::DispatcherMapField( GatherFloat32(*bvh.zmaxs, - *tempStorage, - arraySize) ) + vtkm::worklet::DispatcherMapField( + GatherFloat32(*bvh.zmaxs, *tempStorage, arraySize)) .Invoke(iterator); - tempPtr = bvh.zmaxs; - bvh.zmaxs = tempStorage; + tempPtr = bvh.zmaxs; + bvh.zmaxs = tempStorage; tempStorage = tempPtr; - vtkm::worklet::DispatcherMapField( GatherVecCast(triangleIndices, - outputTriangleIndices, - arraySize) ) + vtkm::worklet::DispatcherMapField( + GatherVecCast(triangleIndices, outputTriangleIndices, arraySize)) .Invoke(iterator); delete tempStorage; } // method SortAABBs - VTKM_CONT - void run(vtkm::cont::DynamicArrayHandleCoordinateSystem &coordsHandle, - vtkm::cont::ArrayHandle< vtkm::Vec > &triangleIndices, - const vtkm::Id &numberOfTriangles, - LinearBVH &linearBVH) + void run(vtkm::cont::DynamicArrayHandleCoordinateSystem& coordsHandle, + vtkm::cont::ArrayHandle>& triangleIndices, + const vtkm::Id& numberOfTriangles, LinearBVH& linearBVH) { const vtkm::Id numBBoxes = numberOfTriangles; BVHData bvh(numBBoxes); - vtkm::worklet::DispatcherMapField( FindAABBs() ) - .Invoke(triangleIndices, - *bvh.xmins, - *bvh.ymins, - *bvh.zmins, - *bvh.xmaxs, - *bvh.ymaxs, - *bvh.zmaxs, - coordsHandle); + vtkm::worklet::DispatcherMapField(FindAABBs()) + .Invoke(triangleIndices, *bvh.xmins, *bvh.ymins, *bvh.zmins, *bvh.xmaxs, *bvh.ymaxs, + *bvh.zmaxs, coordsHandle); // Find the extent of all bounding boxes to generate normalization for morton codes - vtkm::Vec minExtent(vtkm::Infinity32(), - vtkm::Infinity32(), - vtkm::Infinity32()); - vtkm::Vec maxExtent(vtkm::NegativeInfinity32(), - vtkm::NegativeInfinity32(), - vtkm::NegativeInfinity32()); - maxExtent[0] = vtkm::cont::DeviceAdapterAlgorithm::Reduce(*bvh.xmaxs, - maxExtent[0], - MaxValue()); - maxExtent[1] = vtkm::cont::DeviceAdapterAlgorithm::Reduce(*bvh.ymaxs, - maxExtent[1], - MaxValue()); - maxExtent[2] = vtkm::cont::DeviceAdapterAlgorithm::Reduce(*bvh.zmaxs, - maxExtent[2], - MaxValue()); - minExtent[0] = vtkm::cont::DeviceAdapterAlgorithm::Reduce(*bvh.xmins, - minExtent[0], - MinValue()); - minExtent[1] = vtkm::cont::DeviceAdapterAlgorithm::Reduce(*bvh.ymins, - minExtent[1], - MinValue()); - minExtent[2] = vtkm::cont::DeviceAdapterAlgorithm::Reduce(*bvh.zmins, - minExtent[2], - MinValue()); + vtkm::Vec minExtent(vtkm::Infinity32(), vtkm::Infinity32(), + vtkm::Infinity32()); + vtkm::Vec maxExtent(vtkm::NegativeInfinity32(), vtkm::NegativeInfinity32(), + vtkm::NegativeInfinity32()); + maxExtent[0] = vtkm::cont::DeviceAdapterAlgorithm::Reduce( + *bvh.xmaxs, maxExtent[0], MaxValue()); + maxExtent[1] = vtkm::cont::DeviceAdapterAlgorithm::Reduce( + *bvh.ymaxs, maxExtent[1], MaxValue()); + maxExtent[2] = vtkm::cont::DeviceAdapterAlgorithm::Reduce( + *bvh.zmaxs, maxExtent[2], MaxValue()); + minExtent[0] = vtkm::cont::DeviceAdapterAlgorithm::Reduce( + *bvh.xmins, minExtent[0], MinValue()); + minExtent[1] = vtkm::cont::DeviceAdapterAlgorithm::Reduce( + *bvh.ymins, minExtent[1], MinValue()); + minExtent[2] = vtkm::cont::DeviceAdapterAlgorithm::Reduce( + *bvh.zmins, minExtent[2], MinValue()); - vtkm::Vec deltaExtent = maxExtent - minExtent; - vtkm::Vec inverseExtent; + vtkm::Vec deltaExtent = maxExtent - minExtent; + vtkm::Vec inverseExtent; for (int i = 0; i < 3; ++i) { inverseExtent[i] = (deltaExtent[i] == 0.f) ? 0 : 1.f / deltaExtent[i]; } //Generate the morton codes - vtkm::worklet::DispatcherMapField( MortonCodeAABB(inverseExtent,minExtent) ) - .Invoke(*bvh.xmins, - *bvh.ymins, - *bvh.zmins, - *bvh.xmaxs, - *bvh.ymaxs, - *bvh.zmaxs, + vtkm::worklet::DispatcherMapField(MortonCodeAABB(inverseExtent, minExtent)) + .Invoke(*bvh.xmins, *bvh.ymins, *bvh.zmins, *bvh.xmaxs, *bvh.ymaxs, *bvh.zmaxs, bvh.mortonCodes); - linearBVH.Allocate( bvh.GetNumberOfPrimitives(), DeviceAdapter() ); + linearBVH.Allocate(bvh.GetNumberOfPrimitives(), DeviceAdapter()); SortAABBS(bvh, triangleIndices, linearBVH.LeafNodes); - - vtkm::worklet::DispatcherMapField( TreeBuilder(bvh.mortonCodes, - bvh.parent, - bvh.GetNumberOfPrimitives()) ) - .Invoke(bvh.leftChild, - bvh.rightChild); + vtkm::worklet::DispatcherMapField( + TreeBuilder(bvh.mortonCodes, bvh.parent, bvh.GetNumberOfPrimitives())) + .Invoke(bvh.leftChild, bvh.rightChild); const vtkm::Int32 primitiveCount = vtkm::Int32(bvh.GetNumberOfPrimitives()); vtkm::cont::ArrayHandle counters; counters.PrepareForOutput(bvh.GetNumberOfPrimitives() - 1, DeviceAdapter()); - vtkm::Int32 zero= 0; - vtkm::worklet::DispatcherMapField< MemSet >( MemSet(zero) ) + vtkm::Int32 zero = 0; + vtkm::worklet::DispatcherMapField>(MemSet(zero)) .Invoke(counters); vtkm::exec::AtomicArray atomicCounters(counters); - vtkm::worklet::DispatcherMapField( PropagateAABBs(bvh.parent, - bvh.leftChild, - bvh.rightChild, - primitiveCount, - linearBVH.FlatBVH, - atomicCounters )) + vtkm::worklet::DispatcherMapField( + PropagateAABBs(bvh.parent, bvh.leftChild, bvh.rightChild, primitiveCount, linearBVH.FlatBVH, + atomicCounters)) .Invoke(vtkm::exec::ExecutionWholeArrayConst(*bvh.xmins), vtkm::exec::ExecutionWholeArrayConst(*bvh.ymins), vtkm::exec::ExecutionWholeArrayConst(*bvh.zmins), vtkm::exec::ExecutionWholeArrayConst(*bvh.xmaxs), vtkm::exec::ExecutionWholeArrayConst(*bvh.ymaxs), vtkm::exec::ExecutionWholeArrayConst(*bvh.zmaxs)); - } -};// class LinearBVHBuilder -}}}// namespace vtkm::rendering::raytracing +}; // class LinearBVHBuilder +} +} +} // namespace vtkm::rendering::raytracing #endif //vtk_m_worklet_BoundingVolumeHierachy_h diff --git a/vtkm/rendering/raytracing/Camera.h b/vtkm/rendering/raytracing/Camera.h index 1635f6e49..15e70cabf 100644 --- a/vtkm/rendering/raytracing/Camera.h +++ b/vtkm/rendering/raytracing/Camera.h @@ -32,14 +32,16 @@ #include -namespace vtkm { -namespace rendering { -namespace raytracing { -template< typename DeviceAdapter > +namespace vtkm +{ +namespace rendering +{ +namespace raytracing +{ +template class Camera { public: - class SurfaceConverter : public vtkm::worklet::WorkletMapField { vtkm::Float32 Proj22; @@ -53,12 +55,9 @@ public: public: VTKM_CONT - SurfaceConverter(const vtkm::Int32 &width, - const vtkm::Int32 &subsetWidth, - const vtkm::Int32 &xmin, - const vtkm::Int32 &ymin, - const vtkm::Matrix projMat, - const vtkm::Int32 &numPixels) + SurfaceConverter(const vtkm::Int32& width, const vtkm::Int32& subsetWidth, + const vtkm::Int32& xmin, const vtkm::Int32& ymin, + const vtkm::Matrix projMat, const vtkm::Int32& numPixels) { Width = width; SubsetWidth = subsetWidth; @@ -69,24 +68,16 @@ public: Proj32 = projMat[3][2]; NumPixels = numPixels; } - typedef void ControlSignature(FieldIn<>, - FieldIn<>, - ExecObject, - ExecObject); - typedef void ExecutionSignature(_1, - _2, - _3, - _4, - WorkIndex); + typedef void ControlSignature(FieldIn<>, FieldIn<>, ExecObject, ExecObject); + typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); VTKM_EXEC - void operator()( - const vtkm::Vec &inColor, - const vtkm::Float32 &inDepth, - vtkm::exec::ExecutionWholeArray &depthBuffer, - vtkm::exec::ExecutionWholeArray > &colorBuffer, - const vtkm::Id &index) const + void operator()(const vtkm::Vec& inColor, const vtkm::Float32& inDepth, + vtkm::exec::ExecutionWholeArray& depthBuffer, + vtkm::exec::ExecutionWholeArray>& colorBuffer, + const vtkm::Id& index) const { - if(index >= NumPixels) return; + if (index >= NumPixels) + return; vtkm::Float32 depth = (Proj22 + Proj23 / (-inDepth)) / Proj32; depth = 0.5f * depth + 0.5f; vtkm::Int32 x = static_cast(index) % SubsetWidth; @@ -108,105 +99,89 @@ public: vtkm::Int32 Minx; vtkm::Int32 Miny; vtkm::Int32 SubsetWidth; - vtkm::Vec< vtkm::Float32, 3> nlook;// normalized look - vtkm::Vec< vtkm::Float32, 3> delta_x; - vtkm::Vec< vtkm::Float32, 3> delta_y; + vtkm::Vec nlook; // normalized look + vtkm::Vec delta_x; + vtkm::Vec delta_y; VTKM_CONT - PerspectiveRayGen(vtkm::Int32 width, - vtkm::Int32 height, - vtkm::Float32 fovX, - vtkm::Float32 fovY, - vtkm::Vec< vtkm::Float32, 3> look, - vtkm::Vec< vtkm::Float32, 3> up, - vtkm::Float32 _zoom, - vtkm::Int32 subsetWidth, - vtkm::Int32 minx, + PerspectiveRayGen(vtkm::Int32 width, vtkm::Int32 height, vtkm::Float32 fovX, vtkm::Float32 fovY, + vtkm::Vec look, vtkm::Vec up, + vtkm::Float32 _zoom, vtkm::Int32 subsetWidth, vtkm::Int32 minx, vtkm::Int32 miny) - : w(width), - h(height), - Minx(minx), - Miny(miny), - SubsetWidth(subsetWidth) + : w(width) + , h(height) + , Minx(minx) + , Miny(miny) + , SubsetWidth(subsetWidth) { - vtkm::Float32 thx = tanf( (fovX*vtkm::Float32(vtkm::Pi())/180.f) *.5f); - vtkm::Float32 thy = tanf( (fovY*vtkm::Float32(vtkm::Pi())/180.f) *.5f); - vtkm::Vec< vtkm::Float32, 3> ru = vtkm::Cross(look,up); + vtkm::Float32 thx = tanf((fovX * vtkm::Float32(vtkm::Pi()) / 180.f) * .5f); + vtkm::Float32 thy = tanf((fovY * vtkm::Float32(vtkm::Pi()) / 180.f) * .5f); + vtkm::Vec ru = vtkm::Cross(look, up); vtkm::Normalize(ru); - vtkm::Vec< vtkm::Float32, 3> rv = vtkm::Cross(ru,look); + vtkm::Vec rv = vtkm::Cross(ru, look); vtkm::Normalize(rv); - delta_x = ru*(2*thx/(float)w); - delta_y = rv*(2*thy/(float)h); + delta_x = ru * (2 * thx / (float)w); + delta_y = rv * (2 * thy / (float)h); - if(_zoom > 0) + if (_zoom > 0) { - delta_x[0] = delta_x[0] / _zoom; - delta_x[1] = delta_x[1] / _zoom; - delta_x[2] = delta_x[2] / _zoom; - delta_y[0] = delta_y[0] / _zoom; - delta_y[1] = delta_y[1] / _zoom; - delta_y[2] = delta_y[2] / _zoom; + delta_x[0] = delta_x[0] / _zoom; + delta_x[1] = delta_x[1] / _zoom; + delta_x[2] = delta_x[2] / _zoom; + delta_y[0] = delta_y[0] / _zoom; + delta_y[1] = delta_y[1] / _zoom; + delta_y[2] = delta_y[2] / _zoom; } nlook = look; vtkm::Normalize(nlook); - } - typedef void ControlSignature(FieldOut<>, - FieldOut<>, - FieldOut<> ); + typedef void ControlSignature(FieldOut<>, FieldOut<>, FieldOut<>); - typedef void ExecutionSignature(WorkIndex, - _1, - _2, - _3); + typedef void ExecutionSignature(WorkIndex, _1, _2, _3); VTKM_EXEC - void operator()(vtkm::Id idx, - vtkm::Float32 &rayDirX, - vtkm::Float32 &rayDirY, - vtkm::Float32 &rayDirZ) const + void operator()(vtkm::Id idx, vtkm::Float32& rayDirX, vtkm::Float32& rayDirY, + vtkm::Float32& rayDirZ) const { - vtkm::Vec ray_dir(rayDirX, rayDirY, rayDirZ); - int i = vtkm::Int32( idx ) % SubsetWidth; - int j = vtkm::Int32( idx ) / SubsetWidth; + vtkm::Vec ray_dir(rayDirX, rayDirY, rayDirZ); + int i = vtkm::Int32(idx) % SubsetWidth; + int j = vtkm::Int32(idx) / SubsetWidth; i += Minx; j += Miny; - ray_dir = nlook + delta_x * ((2.f * vtkm::Float32(i) - vtkm::Float32(w)) / 2.0f) - + delta_y * ((2.f * vtkm::Float32(j) - vtkm::Float32(h)) / 2.0f); + ray_dir = nlook + delta_x * ((2.f * vtkm::Float32(i) - vtkm::Float32(w)) / 2.0f) + + delta_y * ((2.f * vtkm::Float32(j) - vtkm::Float32(h)) / 2.0f); vtkm::Normalize(ray_dir); rayDirX = ray_dir[0]; rayDirY = ray_dir[1]; rayDirZ = ray_dir[2]; } - };// class perspective ray gen + }; // class perspective ray gen private: - vtkm::Int32 Height; - vtkm::Int32 Width; - vtkm::Int32 SubsetWidth; - vtkm::Int32 SubsetHeight; - vtkm::Int32 SubsetMinX; - vtkm::Int32 SubsetMinY; + vtkm::Int32 Height; + vtkm::Int32 Width; + vtkm::Int32 SubsetWidth; + vtkm::Int32 SubsetHeight; + vtkm::Int32 SubsetMinX; + vtkm::Int32 SubsetMinY; vtkm::Float32 FovX; vtkm::Float32 FovY; vtkm::Float32 FOV; vtkm::Float32 Zoom; - bool IsViewDirty; - bool IsResDirty; - bool MortonSort; - bool LookAtSet; + bool IsViewDirty; + bool IsResDirty; + bool MortonSort; + bool LookAtSet; //bool ImageSubsetModeOn; - vtkm::Vec< vtkm::Float32, 3> Look; - vtkm::Vec< vtkm::Float32, 3> Up; - vtkm::Vec< vtkm::Float32, 3> LookAt; - vtkm::Vec< vtkm::Float32, 3> Position; + vtkm::Vec Look; + vtkm::Vec Up; + vtkm::Vec LookAt; + vtkm::Vec Position; vtkm::rendering::Camera CameraView; - vtkm::Matrix ViewProjectionMat; - + vtkm::Matrix ViewProjectionMat; public: - ColorBuffer4f FrameBuffer; VTKM_CONT @@ -241,8 +216,8 @@ public: } VTKM_CONT - void SetParameters(const vtkm::rendering::Camera &camera, - const vtkm::rendering::CanvasRayTracer &canvas) + void SetParameters(const vtkm::rendering::Camera& camera, + const vtkm::rendering::CanvasRayTracer& canvas) { this->SetUp(camera.GetViewUp()); this->SetLookAt(camera.GetLookAt()); @@ -253,16 +228,14 @@ public: this->CameraView = camera; } - VTKM_CONT - void SetHeight(const vtkm::Int32 &height) + void SetHeight(const vtkm::Int32& height) { - if(height <= 0) + if (height <= 0) { - throw vtkm::cont::ErrorBadValue( - "Camera height must be greater than zero."); + throw vtkm::cont::ErrorBadValue("Camera height must be greater than zero."); } - if(Height != height) + if (Height != height) { this->IsResDirty = true; this->Height = height; @@ -271,20 +244,16 @@ public: } VTKM_CONT - vtkm::Int32 GetHeight() const - { - return this->Height; - } + vtkm::Int32 GetHeight() const { return this->Height; } VTKM_CONT - void SetWidth(const vtkm::Int32 &width) + void SetWidth(const vtkm::Int32& width) { - if(width <= 0) + if (width <= 0) { - throw vtkm::cont::ErrorBadValue( - "Camera width must be greater than zero."); + throw vtkm::cont::ErrorBadValue("Camera width must be greater than zero."); } - if(this->Width != width) + if (this->Width != width) { this->IsResDirty = true; this->Width = width; @@ -293,20 +262,16 @@ public: } VTKM_CONT - vtkm::Int32 GetWidth() const - { - return this->Width; - } + vtkm::Int32 GetWidth() const { return this->Width; } VTKM_CONT - void SetZoom(const vtkm::Float32 &zoom) + void SetZoom(const vtkm::Float32& zoom) { - if(zoom <= 0) + if (zoom <= 0) { - throw vtkm::cont::ErrorBadValue( - "Camera zoom must be greater than zero."); + throw vtkm::cont::ErrorBadValue("Camera zoom must be greater than zero."); } - if(this->Zoom != zoom) + if (this->Zoom != zoom) { this->IsViewDirty = true; this->Zoom = zoom; @@ -314,23 +279,18 @@ public: } VTKM_CONT - vtkm::Float32 GetZoom() const - { - return this->Zoom; - } + vtkm::Float32 GetZoom() const { return this->Zoom; } VTKM_CONT - void SetFieldOfView(const vtkm::Float32 °rees) + void SetFieldOfView(const vtkm::Float32& degrees) { - if(degrees <= 0) + if (degrees <= 0) { - throw vtkm::cont::ErrorBadValue( - "Camera feild of view must be greater than zero."); + throw vtkm::cont::ErrorBadValue("Camera feild of view must be greater than zero."); } - if(degrees > 180) + if (degrees > 180) { - throw vtkm::cont::ErrorBadValue( - "Camera feild of view must be less than 180."); + throw vtkm::cont::ErrorBadValue("Camera feild of view must be less than 180."); } // fov is stored as a half angle // float fovx= 2.f*atan(tan(view.view3d.fov/2.f)*view.w/view.h); @@ -338,26 +298,28 @@ public: // camera->setFOVY((view.view3d.fov*(180.f/M_PI))/2.f); // camera->setFOVX( fovx/2.f ); - vtkm::Float32 newFOVY = - (vtkm::Float32(this->Height) / vtkm::Float32(this->Width)) * degrees; + vtkm::Float32 newFOVY = (vtkm::Float32(this->Height) / vtkm::Float32(this->Width)) * degrees; vtkm::Float32 newFOVX = degrees; - if(newFOVX != this->FovX) { this->IsViewDirty = true; } - if(newFOVY != this->FovY) { this->IsViewDirty = true; } + if (newFOVX != this->FovX) + { + this->IsViewDirty = true; + } + if (newFOVY != this->FovY) + { + this->IsViewDirty = true; + } this->FovX = newFOVX; this->FovY = newFOVY; this->CameraView.SetFieldOfView(this->FovX); } VTKM_CONT - vtkm::Float32 GetFieldOfView() const - { - return this->FovX; - } + vtkm::Float32 GetFieldOfView() const { return this->FovX; } VTKM_CONT - void SetUp(const vtkm::Vec &up) + void SetUp(const vtkm::Vec& up) { - if(this->Up != up) + if (this->Up != up) { this->Up = up; vtkm::Normalize(this->Up); @@ -366,15 +328,12 @@ public: } VTKM_CONT - vtkm::Vec GetUp() const - { - return this->Up; - } + vtkm::Vec GetUp() const { return this->Up; } VTKM_CONT - void SetLookAt(const vtkm::Vec &lookAt) + void SetLookAt(const vtkm::Vec& lookAt) { - if(this->LookAt != lookAt) + if (this->LookAt != lookAt) { this->LookAt = lookAt; this->IsViewDirty = true; @@ -382,15 +341,12 @@ public: } VTKM_CONT - vtkm::Vec GetLookAt() const - { - return this->LookAt; - } + vtkm::Vec GetLookAt() const { return this->LookAt; } VTKM_CONT - void SetPosition(const vtkm::Vec &position) + void SetPosition(const vtkm::Vec& position) { - if(this->Position != position) + if (this->Position != position) { this->Position = position; this->IsViewDirty = true; @@ -398,48 +354,36 @@ public: } VTKM_CONT - vtkm::Vec GetPosition() const - { - return this->Position; - } + vtkm::Vec GetPosition() const { return this->Position; } VTKM_CONT - void ResetIsViewDirty() - { - this->IsViewDirty = false; - } + void ResetIsViewDirty() { this->IsViewDirty = false; } VTKM_CONT - bool GetIsViewDirty() const - { - return this->IsViewDirty; - } + bool GetIsViewDirty() const { return this->IsViewDirty; } VTKM_CONT - void WriteToSurface(CanvasRayTracer *canvas, - const vtkm::cont::ArrayHandle &distances) + void WriteToSurface(CanvasRayTracer* canvas, + const vtkm::cont::ArrayHandle& distances) { - if(canvas == nullptr) + if (canvas == nullptr) { - throw vtkm::cont::ErrorBadValue( - "Camera can not write to nullptr canvas"); + throw vtkm::cont::ErrorBadValue("Camera can not write to nullptr canvas"); } - if(this->Height != vtkm::Int32(canvas->GetHeight()) || - this->Width != vtkm::Int32(canvas->GetWidth())) + if (this->Height != vtkm::Int32(canvas->GetHeight()) || + this->Width != vtkm::Int32(canvas->GetWidth())) { throw vtkm::cont::ErrorBadValue("Camera: suface-view mismatched dims"); } - vtkm::worklet::DispatcherMapField< SurfaceConverter >( - SurfaceConverter( this->Width, - this->SubsetWidth, - this->SubsetMinX, - this->SubsetMinY, - this->CameraView.CreateProjectionMatrix(canvas->GetWidth(), canvas->GetHeight()), - this->SubsetWidth * this->SubsetHeight) ) - .Invoke( this->FrameBuffer, - distances, - vtkm::exec::ExecutionWholeArray(canvas->GetDepthBuffer()), - vtkm::exec::ExecutionWholeArray >(canvas->GetColorBuffer()) ); + vtkm::worklet::DispatcherMapField( + SurfaceConverter( + this->Width, this->SubsetWidth, this->SubsetMinX, this->SubsetMinY, + this->CameraView.CreateProjectionMatrix(canvas->GetWidth(), canvas->GetHeight()), + this->SubsetWidth * this->SubsetHeight)) + .Invoke( + this->FrameBuffer, distances, + vtkm::exec::ExecutionWholeArray(canvas->GetDepthBuffer()), + vtkm::exec::ExecutionWholeArray>(canvas->GetColorBuffer())); //Force the transfer so the vectors contain data from device canvas->GetColorBuffer().GetPortalControl().Get(0); @@ -447,51 +391,42 @@ public: } VTKM_CONT - void CreateRays(Ray &rays, - const vtkm::Bounds boundingBox = vtkm::Bounds()) + void CreateRays(Ray& rays, const vtkm::Bounds boundingBox = vtkm::Bounds()) { this->UpdateDimensions(&rays, boundingBox); //Set the origin of the ray back to the camera position - vtkm::worklet::DispatcherMapField< MemSet< vtkm::Float32 > >( MemSet< vtkm::Float32>( this->Position[0] ) ) - .Invoke( rays.OriginX ); + vtkm::worklet::DispatcherMapField>( + MemSet(this->Position[0])) + .Invoke(rays.OriginX); - vtkm::worklet::DispatcherMapField< MemSet< vtkm::Float32 > >( MemSet< vtkm::Float32>( this->Position[1] ) ) - .Invoke( rays.OriginY ); + vtkm::worklet::DispatcherMapField>( + MemSet(this->Position[1])) + .Invoke(rays.OriginY); - vtkm::worklet::DispatcherMapField< MemSet< vtkm::Float32 > >( MemSet< vtkm::Float32>( this->Position[2] ) ) - .Invoke( rays.OriginZ ); + vtkm::worklet::DispatcherMapField>( + MemSet(this->Position[2])) + .Invoke(rays.OriginZ); //Reset the camera look vector this->Look = this->LookAt - this->Position; vtkm::Normalize(this->Look); //Create the ray direction - vtkm::worklet::DispatcherMapField< PerspectiveRayGen >( - PerspectiveRayGen(this->Width, - this->Height, - this->FovX, - this->FovY, - this->Look, - this->Up, - this->Zoom, - this->SubsetWidth, - this->SubsetMinX, - this->SubsetMinY) ) - .Invoke(rays.DirX, - rays.DirY, + vtkm::worklet::DispatcherMapField( + PerspectiveRayGen(this->Width, this->Height, this->FovX, this->FovY, this->Look, this->Up, + this->Zoom, this->SubsetWidth, this->SubsetMinX, this->SubsetMinY)) + .Invoke(rays.DirX, rays.DirY, rays.DirZ); //X Y Z - vtkm::worklet::DispatcherMapField< MemSet< vtkm::Float32 > >( MemSet< vtkm::Float32 >( 1e12f ) ) - .Invoke( rays.Distance ); + vtkm::worklet::DispatcherMapField>(MemSet(1e12f)) + .Invoke(rays.Distance); //Reset the Rays Hit Index to -2 - vtkm::worklet::DispatcherMapField< MemSet< vtkm::Id > >( MemSet< vtkm::Id >( -2 ) ) - .Invoke( rays.HitIdx ); + vtkm::worklet::DispatcherMapField>(MemSet(-2)).Invoke(rays.HitIdx); } //create rays - VTKM_CONT - void CreateRays(VolumeRay &rays, - const vtkm::Bounds &boundingBox = vtkm::Bounds()) + VTKM_CONT + void CreateRays(VolumeRay& rays, const vtkm::Bounds& boundingBox = vtkm::Bounds()) { this->UpdateDimensions(&rays, boundingBox); @@ -500,26 +435,17 @@ public: this->Look = this->LookAt - this->Position; vtkm::Normalize(this->Look); //Create the ray direction - vtkm::worklet::DispatcherMapField< PerspectiveRayGen >( - PerspectiveRayGen(this->Width, - this->Height, - this->FovX, - this->FovY, - this->Look, - this->Up, - this->Zoom, - this->SubsetWidth, - this->SubsetMinX, - this->SubsetMinY) ) - .Invoke(rays.DirX, - rays.DirY, + vtkm::worklet::DispatcherMapField( + PerspectiveRayGen(this->Width, this->Height, this->FovX, this->FovY, this->Look, this->Up, + this->Zoom, this->SubsetWidth, this->SubsetMinX, this->SubsetMinY)) + .Invoke(rays.DirX, rays.DirY, rays.DirZ); //X Y Z } //create rays private: VTKM_CONT - void FindSubset(const vtkm::Bounds &bounds) + void FindSubset(const vtkm::Bounds& bounds) { vtkm::Float32 x[2], y[2], z[2]; x[0] = static_cast(bounds.X.Min); @@ -529,9 +455,8 @@ private: z[0] = static_cast(bounds.Z.Min); z[1] = static_cast(bounds.Z.Max); //Inise the data bounds - if(this->Position[0] >=x[0] && this->Position[0] <=x[1] && - this->Position[1] >=y[0] && this->Position[1] <=y[1] && - this->Position[2] >=z[0] && this->Position[2] <=z[1] ) + if (this->Position[0] >= x[0] && this->Position[0] <= x[1] && this->Position[1] >= y[0] && + this->Position[1] <= y[1] && this->Position[2] >= z[0] && this->Position[2] <= z[1]) { this->SubsetWidth = this->Width; this->SubsetHeight = this->Height; @@ -548,43 +473,46 @@ private: xmax = vtkm::NegativeInfinity32(); ymax = vtkm::NegativeInfinity32(); zmax = vtkm::NegativeInfinity32(); - vtkm::Vec extentPoint; + vtkm::Vec extentPoint; for (vtkm::Int32 i = 0; i < 2; ++i) - for (vtkm::Int32 j = 0; j < 2; ++j) - for (vtkm::Int32 k = 0; k < 2; ++k) - { - extentPoint[0] = x[i]; - extentPoint[1] = y[j]; - extentPoint[2] = z[k]; - extentPoint[3] = 1.f; - vtkm::Vec transformed = - vtkm::MatrixMultiply(this->ViewProjectionMat,extentPoint); - // perform the perspective divide - for (vtkm::Int32 a = 0; a < 3; ++a) - { - transformed[a] = transformed[a] / transformed[3]; - } + for (vtkm::Int32 j = 0; j < 2; ++j) + for (vtkm::Int32 k = 0; k < 2; ++k) + { + extentPoint[0] = x[i]; + extentPoint[1] = y[j]; + extentPoint[2] = z[k]; + extentPoint[3] = 1.f; + vtkm::Vec transformed = + vtkm::MatrixMultiply(this->ViewProjectionMat, extentPoint); + // perform the perspective divide + for (vtkm::Int32 a = 0; a < 3; ++a) + { + transformed[a] = transformed[a] / transformed[3]; + } - transformed[0] = (transformed[0] * 0.5f + 0.5f) * static_cast(Width); - transformed[1] = (transformed[1] * 0.5f + 0.5f) * static_cast(Height); - transformed[2] = (transformed[2] * 0.5f + 0.5f); - zmin = vtkm::Min(zmin, transformed[2]); - zmax = vtkm::Max(zmax, transformed[2]); - if(transformed[2] < 0 || transformed[2] > 1) { continue; } - xmin = vtkm::Min(xmin, transformed[0]); - ymin = vtkm::Min(ymin, transformed[1]); - xmax = vtkm::Max(xmax, transformed[0]); - ymax = vtkm::Max(ymax, transformed[1]); - } + transformed[0] = (transformed[0] * 0.5f + 0.5f) * static_cast(Width); + transformed[1] = (transformed[1] * 0.5f + 0.5f) * static_cast(Height); + transformed[2] = (transformed[2] * 0.5f + 0.5f); + zmin = vtkm::Min(zmin, transformed[2]); + zmax = vtkm::Max(zmax, transformed[2]); + if (transformed[2] < 0 || transformed[2] > 1) + { + continue; + } + xmin = vtkm::Min(xmin, transformed[0]); + ymin = vtkm::Min(ymin, transformed[1]); + xmax = vtkm::Max(xmax, transformed[0]); + ymax = vtkm::Max(ymax, transformed[1]); + } xmin -= .001f; xmax += .001f; ymin -= .001f; ymax += .001f; - xmin = vtkm::Floor(vtkm::Min(vtkm::Max(0.f, xmin),vtkm::Float32(Width) )); - xmax = vtkm::Ceil(vtkm::Min(vtkm::Max(0.f, xmax),vtkm::Float32(Width) )); - ymin = vtkm::Floor(vtkm::Min(vtkm::Max(0.f, ymin),vtkm::Float32(Height) )); - ymax = vtkm::Ceil(vtkm::Min(vtkm::Max(0.f, ymax),vtkm::Float32(Height) )); + xmin = vtkm::Floor(vtkm::Min(vtkm::Max(0.f, xmin), vtkm::Float32(Width))); + xmax = vtkm::Ceil(vtkm::Min(vtkm::Max(0.f, xmax), vtkm::Float32(Width))); + ymin = vtkm::Floor(vtkm::Min(vtkm::Max(0.f, ymin), vtkm::Float32(Height))); + ymax = vtkm::Ceil(vtkm::Min(vtkm::Max(0.f, ymax), vtkm::Float32(Height))); //printf("Pixel range = (%f,%f,%f), (%f,%f,%f)\n", xmin, ymin,zmin, xmax,ymax,zmax); vtkm::Int32 dx = vtkm::Int32(xmax) - vtkm::Int32(xmin); @@ -593,9 +521,7 @@ private: // // scene is behind the camera // - if(zmax < 0 || zmin > 1 || - xmin >= xmax || - ymin >= ymax) + if (zmax < 0 || zmin > 1 || xmin >= xmax || ymin >= ymax) { this->SubsetWidth = 1; this->SubsetHeight = 1; @@ -604,34 +530,32 @@ private: } else { - this->SubsetWidth = dx; + this->SubsetWidth = dx; this->SubsetHeight = dy; this->SubsetMinX = vtkm::Int32(xmin); this->SubsetMinY = vtkm::Int32(ymin); } - } VTKM_CONT - void UpdateDimensions(RayBase *rays, - const vtkm::Bounds &boundingBox = vtkm::Bounds()) + void UpdateDimensions(RayBase* rays, const vtkm::Bounds& boundingBox = vtkm::Bounds()) { - // If bounds have been provided, only cast rays that could hit the data + // If bounds have been provided, only cast rays that could hit the data bool imageSubsetModeOn = boundingBox.IsNonEmpty(); //Update our ViewProjection matrix - this->ViewProjectionMat - = vtkm::MatrixMultiply(this->CameraView.CreateProjectionMatrix(this->Width, this->Height), - this->CameraView.CreateViewMatrix()); + this->ViewProjectionMat = + vtkm::MatrixMultiply(this->CameraView.CreateProjectionMatrix(this->Width, this->Height), + this->CameraView.CreateViewMatrix()); //Find the pixel footprint - if(imageSubsetModeOn) + if (imageSubsetModeOn) { this->FindSubset(boundingBox); } //Update the image dimensions - if(!imageSubsetModeOn) + if (!imageSubsetModeOn) { this->SubsetWidth = this->Width; this->SubsetHeight = this->Height; @@ -640,21 +564,27 @@ private: } else { - if(this->SubsetWidth != this->Width) { this->IsResDirty = true; } - if(this->SubsetHeight != this->Height) { this->IsResDirty = true; } + if (this->SubsetWidth != this->Width) + { + this->IsResDirty = true; + } + if (this->SubsetHeight != this->Height) + { + this->IsResDirty = true; + } } // resize rays and buffers - if(this->IsResDirty) + if (this->IsResDirty) { rays->resize(this->SubsetHeight * this->SubsetWidth); - this->FrameBuffer.PrepareForOutput(this->SubsetHeight * this->SubsetWidth, - DeviceAdapter()); + this->FrameBuffer.PrepareForOutput(this->SubsetHeight * this->SubsetWidth, DeviceAdapter()); } this->IsResDirty = false; - } }; // class camera -}}}//namespace vtkm::rendering::raytracing +} +} +} //namespace vtkm::rendering::raytracing #endif //vtk_m_rendering_raytracing_Camera_h diff --git a/vtkm/rendering/raytracing/Ray.cxx b/vtkm/rendering/raytracing/Ray.cxx index ab67bda45..2aa9ab8cc 100644 --- a/vtkm/rendering/raytracing/Ray.cxx +++ b/vtkm/rendering/raytracing/Ray.cxx @@ -20,17 +20,16 @@ #include -namespace vtkm { -namespace rendering { -namespace raytracing { +namespace vtkm +{ +namespace rendering +{ +namespace raytracing +{ RayBase::~RayBase() { - } - - } } } // namespace vtkm::rendering::raytracing - diff --git a/vtkm/rendering/raytracing/Ray.h b/vtkm/rendering/raytracing/Ray.h index 31c6bfcb4..391a0c5a9 100644 --- a/vtkm/rendering/raytracing/Ray.h +++ b/vtkm/rendering/raytracing/Ray.h @@ -22,9 +22,12 @@ #include #include #include -namespace vtkm { -namespace rendering { -namespace raytracing { +namespace vtkm +{ +namespace rendering +{ +namespace raytracing +{ class RayBase { @@ -33,29 +36,28 @@ public: virtual ~RayBase(); - virtual void resize(const vtkm::Int32 vtkmNotUsed(newSize)){} + virtual void resize(const vtkm::Int32 vtkmNotUsed(newSize)) {} }; -template +template class Ray : public RayBase { public: - // composite vectors to hold array handles - vtkm::cont::ArrayHandleCompositeVectorType, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle >::type Intersection; + vtkm::cont::ArrayHandleCompositeVectorType< + vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle, + vtkm::cont::ArrayHandle>::type Intersection; vtkm::cont::ArrayHandleCompositeVectorType, vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle >::type Normal; + vtkm::cont::ArrayHandle>::type Normal; vtkm::cont::ArrayHandleCompositeVectorType, vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle >::type Origin; + vtkm::cont::ArrayHandle>::type Origin; vtkm::cont::ArrayHandleCompositeVectorType, vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle >::type Dir; + vtkm::cont::ArrayHandle>::type Dir; vtkm::cont::ArrayHandle IntersectionX; //ray Normal vtkm::cont::ArrayHandle IntersectionY; @@ -91,111 +93,103 @@ public: inComp[0] = 0; inComp[1] = 1; inComp[2] = 2; - Intersection = vtkm::cont::make_ArrayHandleCompositeVector( IntersectionX, inComp[0], - IntersectionY, inComp[1], - IntersectionZ, inComp[2]); + Intersection = vtkm::cont::make_ArrayHandleCompositeVector( + IntersectionX, inComp[0], IntersectionY, inComp[1], IntersectionZ, inComp[2]); - Normal = vtkm::cont::make_ArrayHandleCompositeVector( NormalX, inComp[0], - NormalY, inComp[1], - NormalZ, inComp[2]); + Normal = vtkm::cont::make_ArrayHandleCompositeVector(NormalX, inComp[0], NormalY, inComp[1], + NormalZ, inComp[2]); - Origin = vtkm::cont::make_ArrayHandleCompositeVector( OriginX, inComp[0], - OriginY, inComp[1], - OriginZ, inComp[2]); + Origin = vtkm::cont::make_ArrayHandleCompositeVector(OriginX, inComp[0], OriginY, inComp[1], + OriginZ, inComp[2]); - Dir = vtkm::cont::make_ArrayHandleCompositeVector( DirX, inComp[0], - DirY, inComp[1], - DirZ, inComp[2]); + Dir = vtkm::cont::make_ArrayHandleCompositeVector(DirX, inComp[0], DirY, inComp[1], DirZ, + inComp[2]); } VTKM_CONT - Ray( const vtkm::Int32 size) + Ray(const vtkm::Int32 size) { NumRays = size; - IntersectionX.PrepareForOutput( NumRays, DeviceAdapter() ); - IntersectionY.PrepareForOutput( NumRays , DeviceAdapter() ); - IntersectionZ.PrepareForOutput( NumRays , DeviceAdapter() ); + IntersectionX.PrepareForOutput(NumRays, DeviceAdapter()); + IntersectionY.PrepareForOutput(NumRays, DeviceAdapter()); + IntersectionZ.PrepareForOutput(NumRays, DeviceAdapter()); - NormalX.PrepareForOutput( NumRays , DeviceAdapter() ); - NormalY.PrepareForOutput( NumRays , DeviceAdapter() ); - NormalZ.PrepareForOutput( NumRays , DeviceAdapter() ); + NormalX.PrepareForOutput(NumRays, DeviceAdapter()); + NormalY.PrepareForOutput(NumRays, DeviceAdapter()); + NormalZ.PrepareForOutput(NumRays, DeviceAdapter()); - OriginX.PrepareForOutput( NumRays , DeviceAdapter() ); - OriginY.PrepareForOutput( NumRays , DeviceAdapter() ); - OriginZ.PrepareForOutput( NumRays , DeviceAdapter() ); + OriginX.PrepareForOutput(NumRays, DeviceAdapter()); + OriginY.PrepareForOutput(NumRays, DeviceAdapter()); + OriginZ.PrepareForOutput(NumRays, DeviceAdapter()); - DirX.PrepareForOutput( NumRays , DeviceAdapter() ); - DirY.PrepareForOutput( NumRays , DeviceAdapter() ); - DirZ.PrepareForOutput( NumRays , DeviceAdapter() ); + DirX.PrepareForOutput(NumRays, DeviceAdapter()); + DirY.PrepareForOutput(NumRays, DeviceAdapter()); + DirZ.PrepareForOutput(NumRays, DeviceAdapter()); - U.PrepareForOutput( NumRays , DeviceAdapter() ); - V.PrepareForOutput( NumRays , DeviceAdapter() ); - Distance.PrepareForOutput( NumRays , DeviceAdapter() ); - Scalar.PrepareForOutput( NumRays , DeviceAdapter() ); + U.PrepareForOutput(NumRays, DeviceAdapter()); + V.PrepareForOutput(NumRays, DeviceAdapter()); + Distance.PrepareForOutput(NumRays, DeviceAdapter()); + Scalar.PrepareForOutput(NumRays, DeviceAdapter()); - HitIdx.PrepareForOutput( NumRays , DeviceAdapter() ); + HitIdx.PrepareForOutput(NumRays, DeviceAdapter()); vtkm::IdComponent inComp[3]; inComp[0] = 0; inComp[1] = 1; inComp[2] = 2; - Intersection = vtkm::cont::make_ArrayHandleCompositeVector( IntersectionX, inComp[0], - IntersectionY, inComp[1], - IntersectionZ, inComp[2]); + Intersection = vtkm::cont::make_ArrayHandleCompositeVector( + IntersectionX, inComp[0], IntersectionY, inComp[1], IntersectionZ, inComp[2]); - Normal = vtkm::cont::make_ArrayHandleCompositeVector( NormalX, inComp[0], - NormalY, inComp[1], - NormalZ, inComp[2]); + Normal = vtkm::cont::make_ArrayHandleCompositeVector(NormalX, inComp[0], NormalY, inComp[1], + NormalZ, inComp[2]); - Origin = vtkm::cont::make_ArrayHandleCompositeVector( OriginX, inComp[0], - OriginY, inComp[1], - OriginZ, inComp[2]); + Origin = vtkm::cont::make_ArrayHandleCompositeVector(OriginX, inComp[0], OriginY, inComp[1], + OriginZ, inComp[2]); - Dir = vtkm::cont::make_ArrayHandleCompositeVector( DirX, inComp[0], - DirY, inComp[1], - DirZ, inComp[2]); + Dir = vtkm::cont::make_ArrayHandleCompositeVector(DirX, inComp[0], DirY, inComp[1], DirZ, + inComp[2]); } VTKM_CONT - virtual void resize( const vtkm::Int32 newSize) + virtual void resize(const vtkm::Int32 newSize) { - if(newSize == NumRays) return; //nothing to do + if (newSize == NumRays) + return; //nothing to do NumRays = newSize; - IntersectionX.PrepareForOutput( NumRays , DeviceAdapter() ); - IntersectionY.PrepareForOutput( NumRays , DeviceAdapter() ); - IntersectionZ.PrepareForOutput( NumRays , DeviceAdapter() ); + IntersectionX.PrepareForOutput(NumRays, DeviceAdapter()); + IntersectionY.PrepareForOutput(NumRays, DeviceAdapter()); + IntersectionZ.PrepareForOutput(NumRays, DeviceAdapter()); - NormalX.PrepareForOutput( NumRays , DeviceAdapter() ); - NormalY.PrepareForOutput( NumRays , DeviceAdapter() ); - NormalZ.PrepareForOutput( NumRays , DeviceAdapter() ); + NormalX.PrepareForOutput(NumRays, DeviceAdapter()); + NormalY.PrepareForOutput(NumRays, DeviceAdapter()); + NormalZ.PrepareForOutput(NumRays, DeviceAdapter()); - OriginX.PrepareForOutput( NumRays , DeviceAdapter() ); - OriginY.PrepareForOutput( NumRays , DeviceAdapter() ); - OriginZ.PrepareForOutput( NumRays , DeviceAdapter() ); + OriginX.PrepareForOutput(NumRays, DeviceAdapter()); + OriginY.PrepareForOutput(NumRays, DeviceAdapter()); + OriginZ.PrepareForOutput(NumRays, DeviceAdapter()); - DirX.PrepareForOutput( NumRays , DeviceAdapter() ); - DirY.PrepareForOutput( NumRays , DeviceAdapter() ); - DirZ.PrepareForOutput( NumRays , DeviceAdapter() ); + DirX.PrepareForOutput(NumRays, DeviceAdapter()); + DirY.PrepareForOutput(NumRays, DeviceAdapter()); + DirZ.PrepareForOutput(NumRays, DeviceAdapter()); - U.PrepareForOutput( NumRays , DeviceAdapter() ); - V.PrepareForOutput( NumRays , DeviceAdapter() ); - Distance.PrepareForOutput( NumRays , DeviceAdapter() ); - Scalar.PrepareForOutput( NumRays , DeviceAdapter() ); + U.PrepareForOutput(NumRays, DeviceAdapter()); + V.PrepareForOutput(NumRays, DeviceAdapter()); + Distance.PrepareForOutput(NumRays, DeviceAdapter()); + Scalar.PrepareForOutput(NumRays, DeviceAdapter()); - HitIdx.PrepareForOutput( NumRays , DeviceAdapter() ); + HitIdx.PrepareForOutput(NumRays, DeviceAdapter()); } -};// class ray -template +}; // class ray +template class VolumeRay : public RayBase { public: - vtkm::cont::ArrayHandleCompositeVectorType, vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle >::type Dir; + vtkm::cont::ArrayHandle>::type Dir; vtkm::cont::ArrayHandle DirX; //ray Dir vtkm::cont::ArrayHandle DirY; @@ -214,51 +208,49 @@ public: inComp[1] = 1; inComp[2] = 2; - Dir = vtkm::cont::make_ArrayHandleCompositeVector( DirX, inComp[0], - DirY, inComp[1], - DirZ, inComp[2]); + Dir = vtkm::cont::make_ArrayHandleCompositeVector(DirX, inComp[0], DirY, inComp[1], DirZ, + inComp[2]); } VTKM_CONT - VolumeRay( const vtkm::Int32 size) + VolumeRay(const vtkm::Int32 size) { NumRays = size; - DirX.PrepareForOutput( NumRays , DeviceAdapter() ); - DirY.PrepareForOutput( NumRays , DeviceAdapter() ); - DirZ.PrepareForOutput( NumRays , DeviceAdapter() ); + DirX.PrepareForOutput(NumRays, DeviceAdapter()); + DirY.PrepareForOutput(NumRays, DeviceAdapter()); + DirZ.PrepareForOutput(NumRays, DeviceAdapter()); - MinDistance.PrepareForOutput( NumRays , DeviceAdapter() ); - MaxDistance.PrepareForOutput( NumRays , DeviceAdapter() ); - HitIndex.PrepareForOutput( NumRays , DeviceAdapter() ); + MinDistance.PrepareForOutput(NumRays, DeviceAdapter()); + MaxDistance.PrepareForOutput(NumRays, DeviceAdapter()); + HitIndex.PrepareForOutput(NumRays, DeviceAdapter()); vtkm::IdComponent inComp[3]; inComp[0] = 0; inComp[1] = 1; inComp[2] = 2; - - Dir = vtkm::cont::make_ArrayHandleCompositeVector( DirX, inComp[0], - DirY, inComp[1], - DirZ, inComp[2]); + Dir = vtkm::cont::make_ArrayHandleCompositeVector(DirX, inComp[0], DirY, inComp[1], DirZ, + inComp[2]); } VTKM_CONT - virtual void resize( const vtkm::Int32 newSize) + virtual void resize(const vtkm::Int32 newSize) { - if(newSize == NumRays) return; //nothing to do + if (newSize == NumRays) + return; //nothing to do NumRays = newSize; - DirX.PrepareForOutput( NumRays , DeviceAdapter() ); - DirY.PrepareForOutput( NumRays , DeviceAdapter() ); - DirZ.PrepareForOutput( NumRays , DeviceAdapter() ); - - MinDistance.PrepareForOutput( NumRays , DeviceAdapter() ); - MaxDistance.PrepareForOutput( NumRays , DeviceAdapter() ); - HitIndex.PrepareForOutput( NumRays , DeviceAdapter() ); + DirX.PrepareForOutput(NumRays, DeviceAdapter()); + DirY.PrepareForOutput(NumRays, DeviceAdapter()); + DirZ.PrepareForOutput(NumRays, DeviceAdapter()); + MinDistance.PrepareForOutput(NumRays, DeviceAdapter()); + MaxDistance.PrepareForOutput(NumRays, DeviceAdapter()); + HitIndex.PrepareForOutput(NumRays, DeviceAdapter()); } -};// class ray - -}}}//namespace vtkm::rendering::raytracing +}; // class ray +} +} +} //namespace vtkm::rendering::raytracing #endif //vtk_m_rendering_raytracing_Ray_h diff --git a/vtkm/rendering/raytracing/RayTracer.h b/vtkm/rendering/raytracing/RayTracer.h index d377abfe3..1427c5613 100644 --- a/vtkm/rendering/raytracing/RayTracer.h +++ b/vtkm/rendering/raytracing/RayTracer.h @@ -30,40 +30,29 @@ #include #include - -namespace vtkm { -namespace rendering { -namespace raytracing { +namespace vtkm +{ +namespace rendering +{ +namespace raytracing +{ class IntersectionPoint : public vtkm::worklet::WorkletMapField { public: VTKM_CONT IntersectionPoint() {} - typedef void ControlSignature(FieldIn<>, - FieldIn<>, - FieldIn<>, - FieldIn<>, - FieldOut<>, - FieldOut<>, + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldIn<>, FieldIn<>, FieldOut<>, FieldOut<>, FieldOut<>); - typedef void ExecutionSignature(_1, - _2, - _3, - _4, - _5, - _6, - _7); + typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7); VTKM_EXEC - void operator()(const vtkm::Id &hitIndex, - const vtkm::Float32 &distance, - const vtkm::Vec &rayDir, - const vtkm::Vec &rayOrigin, - vtkm::Float32 &intersectionX, - vtkm::Float32 &intersectionY, - vtkm::Float32 &intersectionZ) const + void operator()(const vtkm::Id& hitIndex, const vtkm::Float32& distance, + const vtkm::Vec& rayDir, + const vtkm::Vec& rayOrigin, vtkm::Float32& intersectionX, + vtkm::Float32& intersectionY, vtkm::Float32& intersectionZ) const { - if(hitIndex < 0) return; + if (hitIndex < 0) + return; intersectionX = rayOrigin[0] + rayDir[0] * distance; intersectionY = rayOrigin[1] + rayDir[1] * distance; @@ -71,7 +60,7 @@ public: } }; //class IntersectionPoint -template +template class Reflector { public: @@ -80,47 +69,39 @@ public: class CalculateNormals : public vtkm::worklet::WorkletMapField { private: - typedef typename vtkm::cont::ArrayHandle > Vec4IntArrayHandle; - typedef typename Vec4IntArrayHandle::ExecutionTypes::PortalConst IndicesArrayPortal; + typedef typename vtkm::cont::ArrayHandle> Vec4IntArrayHandle; + typedef + typename Vec4IntArrayHandle::ExecutionTypes::PortalConst IndicesArrayPortal; IndicesArrayPortal IndicesPortal; + public: VTKM_CONT - CalculateNormals(const Vec4IntArrayHandle &indices) - : IndicesPortal( indices.PrepareForInput( DeviceAdapter() ) ) - {} - typedef void ControlSignature(FieldIn<>, - FieldIn<>, - FieldOut<>, - FieldOut<>, - FieldOut<>, - WholeArrayIn); - typedef void ExecutionSignature(_1, - _2, - _3, - _4, - _5, - _6); - template - VTKM_EXEC - void operator()(const vtkm::Id &hitIndex, - const vtkm::Vec &rayDir, - vtkm::Float32 &normalX, - vtkm::Float32 &normalY, - vtkm::Float32 &normalZ, - const PointPortalType &points) const + CalculateNormals(const Vec4IntArrayHandle& indices) + : IndicesPortal(indices.PrepareForInput(DeviceAdapter())) { - if(hitIndex < 0) return; + } + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldOut<>, FieldOut<>, FieldOut<>, + WholeArrayIn); + typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); + template + VTKM_EXEC void operator()(const vtkm::Id& hitIndex, const vtkm::Vec& rayDir, + vtkm::Float32& normalX, vtkm::Float32& normalY, + vtkm::Float32& normalZ, const PointPortalType& points) const + { + if (hitIndex < 0) + return; vtkm::Vec indices = IndicesPortal.Get(hitIndex); vtkm::Vec a = points.Get(indices[1]); vtkm::Vec b = points.Get(indices[2]); vtkm::Vec c = points.Get(indices[3]); - vtkm::Vec normal = vtkm::TriangleNormal(a,b,c); + vtkm::Vec normal = vtkm::TriangleNormal(a, b, c); vtkm::Normalize(normal); //flip the normal if its pointing the wrong way - if(vtkm::dot(normal,rayDir) < 0.f) normal = -normal; + if (vtkm::dot(normal, rayDir) < 0.f) + normal = -normal; normalX = normal[0]; normalY = normal[1]; normalZ = normal[2]; @@ -130,45 +111,38 @@ public: class LerpScalar : public vtkm::worklet::WorkletMapField { private: - typedef typename vtkm::cont::ArrayHandle > Vec4IntArrayHandle; - typedef typename Vec4IntArrayHandle::ExecutionTypes::PortalConst IndicesArrayPortal; + typedef typename vtkm::cont::ArrayHandle> Vec4IntArrayHandle; + typedef + typename Vec4IntArrayHandle::ExecutionTypes::PortalConst IndicesArrayPortal; IndicesArrayPortal IndicesPortal; vtkm::Float32 MinScalar; vtkm::Float32 invDeltaScalar; - public: + public: VTKM_CONT - LerpScalar(const Vec4IntArrayHandle &indices, - const vtkm::Float32 &minScalar, - const vtkm::Float32 &maxScalar) - : IndicesPortal( indices.PrepareForInput( DeviceAdapter() ) ), - MinScalar(minScalar) + LerpScalar(const Vec4IntArrayHandle& indices, const vtkm::Float32& minScalar, + const vtkm::Float32& maxScalar) + : IndicesPortal(indices.PrepareForInput(DeviceAdapter())) + , MinScalar(minScalar) { //Make sure the we don't divide by zero on //something like an iso-surface - if(maxScalar - MinScalar != 0.f) invDeltaScalar = 1.f / (maxScalar - MinScalar); - else invDeltaScalar = 1.f / minScalar; + if (maxScalar - MinScalar != 0.f) + invDeltaScalar = 1.f / (maxScalar - MinScalar); + else + invDeltaScalar = 1.f / minScalar; } - typedef void ControlSignature(FieldIn<>, - FieldIn<>, - FieldIn<>, - FieldOut<>, + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldIn<>, FieldOut<>, WholeArrayIn); - typedef void ExecutionSignature(_1, - _2, - _3, - _4, - _5); - template - VTKM_EXEC - void operator()(const vtkm::Id &hitIndex, - const vtkm::Float32 &u, - const vtkm::Float32 &v, - vtkm::Float32 &lerpedScalar, - const ScalarPortalType &scalars) const + typedef void ExecutionSignature(_1, _2, _3, _4, _5); + template + VTKM_EXEC void operator()(const vtkm::Id& hitIndex, const vtkm::Float32& u, + const vtkm::Float32& v, vtkm::Float32& lerpedScalar, + const ScalarPortalType& scalars) const { - if(hitIndex < 0) return; + if (hitIndex < 0) + return; vtkm::Vec indices = IndicesPortal.Get(hitIndex); @@ -176,49 +150,45 @@ public: vtkm::Float32 aScalar = vtkm::Float32(scalars.Get(indices[1])); vtkm::Float32 bScalar = vtkm::Float32(scalars.Get(indices[2])); vtkm::Float32 cScalar = vtkm::Float32(scalars.Get(indices[3])); - lerpedScalar = aScalar * n + bScalar * u + cScalar * v; + lerpedScalar = aScalar * n + bScalar * u + cScalar * v; //normalize lerpedScalar = (lerpedScalar - MinScalar) * invDeltaScalar; } }; //class LerpScalar - class NodalScalar : public vtkm::worklet::WorkletMapField { private: - typedef typename vtkm::cont::ArrayHandle > Vec4IntArrayHandle; - typedef typename Vec4IntArrayHandle::ExecutionTypes::PortalConst IndicesArrayPortal; + typedef typename vtkm::cont::ArrayHandle> Vec4IntArrayHandle; + typedef + typename Vec4IntArrayHandle::ExecutionTypes::PortalConst IndicesArrayPortal; IndicesArrayPortal IndicesPortal; vtkm::Float32 MinScalar; vtkm::Float32 invDeltaScalar; - public: + public: VTKM_CONT - NodalScalar(const Vec4IntArrayHandle &indices, - const vtkm::Float32 &minScalar, - const vtkm::Float32 &maxScalar) - : IndicesPortal( indices.PrepareForInput( DeviceAdapter() ) ), - MinScalar(minScalar) + NodalScalar(const Vec4IntArrayHandle& indices, const vtkm::Float32& minScalar, + const vtkm::Float32& maxScalar) + : IndicesPortal(indices.PrepareForInput(DeviceAdapter())) + , MinScalar(minScalar) { //Make sure the we don't divide by zero on //something like an iso-surface - if(maxScalar - MinScalar != 0.f) invDeltaScalar = 1.f / (maxScalar - MinScalar); - else invDeltaScalar = 1.f / minScalar; + if (maxScalar - MinScalar != 0.f) + invDeltaScalar = 1.f / (maxScalar - MinScalar); + else + invDeltaScalar = 1.f / minScalar; } - typedef void ControlSignature(FieldIn<>, - FieldOut<>, - WholeArrayIn); - typedef void ExecutionSignature(_1, - _2, - _3); - template - VTKM_EXEC - void operator()(const vtkm::Id &hitIndex, - vtkm::Float32 &scalar, - const ScalarPortalType &scalars) const + typedef void ControlSignature(FieldIn<>, FieldOut<>, WholeArrayIn); + typedef void ExecutionSignature(_1, _2, _3); + template + VTKM_EXEC void operator()(const vtkm::Id& hitIndex, vtkm::Float32& scalar, + const ScalarPortalType& scalars) const { - if(hitIndex < 0) return; + if (hitIndex < 0) + return; vtkm::Vec indices = IndicesPortal.Get(hitIndex); @@ -231,81 +201,66 @@ public: }; //class LerpScalar VTKM_CONT - void run(Ray &rays, - LinearBVH &bvh, - vtkm::cont::DynamicArrayHandleCoordinateSystem &coordsHandle, - const vtkm::cont::Field *scalarField, - const vtkm::Range &scalarRange) + void run(Ray& rays, LinearBVH& bvh, + vtkm::cont::DynamicArrayHandleCoordinateSystem& coordsHandle, + const vtkm::cont::Field* scalarField, const vtkm::Range& scalarRange) { bool isSupportedField = (scalarField->GetAssociation() == vtkm::cont::Field::ASSOC_POINTS || - scalarField->GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET ); - if(!isSupportedField) throw vtkm::cont::ErrorBadValue("Field not accociated with cell set or points"); + scalarField->GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET); + if (!isSupportedField) + throw vtkm::cont::ErrorBadValue("Field not accociated with cell set or points"); bool isAssocPoints = scalarField->GetAssociation() == vtkm::cont::Field::ASSOC_POINTS; - vtkm::worklet::DispatcherMapField< CalculateNormals >( CalculateNormals(bvh.LeafNodes) ) - .Invoke(rays.HitIdx, - rays.Dir, - rays.NormalX, - rays.NormalY, - rays.NormalZ, - coordsHandle); + vtkm::worklet::DispatcherMapField(CalculateNormals(bvh.LeafNodes)) + .Invoke(rays.HitIdx, rays.Dir, rays.NormalX, rays.NormalY, rays.NormalZ, coordsHandle); - if(isAssocPoints) + if (isAssocPoints) { - vtkm::worklet::DispatcherMapField< LerpScalar >( LerpScalar(bvh.LeafNodes, - vtkm::Float32(scalarRange.Min), - vtkm::Float32(scalarRange.Max)) ) - .Invoke(rays.HitIdx, - rays.U, - rays.V, - rays.Scalar, - *scalarField); + vtkm::worklet::DispatcherMapField( + LerpScalar(bvh.LeafNodes, vtkm::Float32(scalarRange.Min), vtkm::Float32(scalarRange.Max))) + .Invoke(rays.HitIdx, rays.U, rays.V, rays.Scalar, *scalarField); } else { - vtkm::worklet::DispatcherMapField< NodalScalar >( NodalScalar(bvh.LeafNodes, - vtkm::Float32(scalarRange.Min), - vtkm::Float32(scalarRange.Max)) ) - .Invoke(rays.HitIdx, - rays.Scalar, - *scalarField); + vtkm::worklet::DispatcherMapField( + NodalScalar(bvh.LeafNodes, vtkm::Float32(scalarRange.Min), vtkm::Float32(scalarRange.Max))) + .Invoke(rays.HitIdx, rays.Scalar, *scalarField); } } // Run }; // Class reflector -template< typename DeviceAdapter> +template class SurfaceColor { public: class MapScalarToColor : public vtkm::worklet::WorkletMapField { private: - typedef typename vtkm::cont::ArrayHandle > ColorArrayHandle; + typedef typename vtkm::cont::ArrayHandle> ColorArrayHandle; typedef typename ColorArrayHandle::ExecutionTypes::PortalConst ColorArrayPortal; ColorArrayPortal ColorMap; vtkm::Int32 ColorMapSize; - vtkm::Vec LightPosition; - vtkm::Vec LightAbmient; - vtkm::Vec LightDiffuse; - vtkm::Vec LightSpecular; + vtkm::Vec LightPosition; + vtkm::Vec LightAbmient; + vtkm::Vec LightDiffuse; + vtkm::Vec LightSpecular; vtkm::Float32 SpecularExponent; - vtkm::Vec CameraPosition; - vtkm::Vec BackgroundColor; - public: + vtkm::Vec CameraPosition; + vtkm::Vec BackgroundColor; + public: VTKM_CONT - MapScalarToColor(const ColorArrayHandle &colorMap, - const vtkm::Int32 &colorMapSize, - const vtkm::Vec &lightPosition, - const vtkm::Vec &cameraPosition, - const vtkm::Vec &backgroundColor) - : ColorMap( colorMap.PrepareForInput( DeviceAdapter() ) ), - ColorMapSize(colorMapSize), - LightPosition(lightPosition), - CameraPosition(cameraPosition), - BackgroundColor(backgroundColor) + MapScalarToColor(const ColorArrayHandle& colorMap, const vtkm::Int32& colorMapSize, + const vtkm::Vec& lightPosition, + const vtkm::Vec& cameraPosition, + const vtkm::Vec& backgroundColor) + : ColorMap(colorMap.PrepareForInput(DeviceAdapter())) + , ColorMapSize(colorMapSize) + , LightPosition(lightPosition) + , CameraPosition(cameraPosition) + , BackgroundColor(backgroundColor) { //Set up some default lighting parameters for now LightAbmient[0] = .3f; @@ -319,39 +274,34 @@ public: LightSpecular[2] = .7f; SpecularExponent = 80.f; } - typedef void ControlSignature(FieldIn<>, - FieldIn<>, - FieldIn<>, - FieldIn<>, - FieldOut<>); - typedef void ExecutionSignature(_1, - _2, - _3, - _4, - _5); + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldIn<>, FieldIn<>, FieldOut<>); + typedef void ExecutionSignature(_1, _2, _3, _4, _5); VTKM_EXEC - void operator()(const vtkm::Id &hitIdx, - const vtkm::Float32 &scalar, - const vtkm::Vec &normal, - const vtkm::Vec &intersection, - vtkm::Vec &color) const + void operator()(const vtkm::Id& hitIdx, const vtkm::Float32& scalar, + const vtkm::Vec& normal, + const vtkm::Vec& intersection, + vtkm::Vec& color) const { - if(hitIdx < 0) {color = BackgroundColor; return;} - vtkm::Vec lightDir = LightPosition - intersection; - vtkm::Vec viewDir = CameraPosition - intersection; + if (hitIdx < 0) + { + color = BackgroundColor; + return; + } + vtkm::Vec lightDir = LightPosition - intersection; + vtkm::Vec viewDir = CameraPosition - intersection; vtkm::Normalize(lightDir); vtkm::Normalize(viewDir); //Diffuse lighting - vtkm::Float32 cosTheta = vtkm::dot(-normal,lightDir); + vtkm::Float32 cosTheta = vtkm::dot(-normal, lightDir); //clamp tp [0,1] cosTheta = vtkm::Min(vtkm::Max(cosTheta, 0.f), 1.f); //Specular lighting - vtkm::Vec halfVector = viewDir + lightDir; + vtkm::Vec halfVector = viewDir + lightDir; vtkm::Normalize(halfVector); - vtkm::Float32 cosPhi = vtkm::dot(-normal,halfVector); - vtkm::Float32 specularConstant = vtkm::Float32(pow(fmaxf(cosPhi,0.f), SpecularExponent)); + vtkm::Float32 cosPhi = vtkm::dot(-normal, halfVector); + vtkm::Float32 specularConstant = vtkm::Float32(pow(fmaxf(cosPhi, 0.f), SpecularExponent)); vtkm::Int32 colorIdx = vtkm::Int32(scalar * vtkm::Float32(ColorMapSize - 1)); @@ -361,40 +311,34 @@ public: color = ColorMap.Get(colorIdx); //std::cout<<" Before "< &rays, - vtkm::cont::ArrayHandle > &colorMap, - ColorBuffer4f &colorBuffer, - const vtkm::Vec cameraPosition, - const vtkm::Vec backgroundColor) + void run(Ray& rays, vtkm::cont::ArrayHandle>& colorMap, + ColorBuffer4f& colorBuffer, const vtkm::Vec cameraPosition, + const vtkm::Vec backgroundColor) { - vtkm::Vec lightPosition = cameraPosition; + vtkm::Vec lightPosition = cameraPosition; // lightPosition[0] = 0.f; // lightPosition[1] = 0.f; // lightPosition[2] = -10.f; const vtkm::Int32 colorMapSize = vtkm::Int32(colorMap.GetNumberOfValues()); - vtkm::worklet::DispatcherMapField< MapScalarToColor >( MapScalarToColor(colorMap, - colorMapSize, - lightPosition, - cameraPosition, - backgroundColor)) - .Invoke(rays.HitIdx, - rays.Scalar, - rays.Normal, - rays.Intersection, - colorBuffer); + vtkm::worklet::DispatcherMapField( + MapScalarToColor(colorMap, colorMapSize, lightPosition, cameraPosition, backgroundColor)) + .Invoke(rays.HitIdx, rays.Scalar, rays.Normal, rays.Intersection, colorBuffer); } -};// class SurfaceColor +}; // class SurfaceColor -template +template class RayTracer { protected: @@ -404,40 +348,33 @@ protected: LinearBVH Bvh; Camera camera; vtkm::cont::DynamicArrayHandleCoordinateSystem CoordsHandle; - const vtkm::cont::Field *ScalarField; - vtkm::cont::ArrayHandle< vtkm::Vec > Indices; + const vtkm::cont::Field* ScalarField; + vtkm::cont::ArrayHandle> Indices; vtkm::cont::ArrayHandle Scalars; vtkm::Id NumberOfTriangles; - vtkm::cont::ArrayHandle > ColorMap; + vtkm::cont::ArrayHandle> ColorMap; vtkm::Range ScalarRange; vtkm::Bounds DataBounds; - vtkm::Vec BackgroundColor; + vtkm::Vec BackgroundColor; + public: VTKM_CONT - RayTracer() - { - IsSceneDirty = true; - } + RayTracer() { IsSceneDirty = true; } VTKM_CONT - void SetBackgroundColor(const vtkm::Vec &backgroundColor) + void SetBackgroundColor(const vtkm::Vec& backgroundColor) { BackgroundColor = backgroundColor; } VTKM_CONT - Camera& GetCamera() - { - return camera; - } + Camera& GetCamera() { return camera; } VTKM_CONT - void SetData(const vtkm::cont::DynamicArrayHandleCoordinateSystem &coordsHandle, - const vtkm::cont::ArrayHandle< vtkm::Vec > &indices, - const vtkm::cont::Field &scalarField, - const vtkm::Id &numberOfTriangles, - const vtkm::Range &scalarRange, - const vtkm::Bounds &dataBounds) + void SetData(const vtkm::cont::DynamicArrayHandleCoordinateSystem& coordsHandle, + const vtkm::cont::ArrayHandle>& indices, + const vtkm::cont::Field& scalarField, const vtkm::Id& numberOfTriangles, + const vtkm::Range& scalarRange, const vtkm::Bounds& dataBounds) { IsSceneDirty = true; CoordsHandle = coordsHandle; @@ -449,7 +386,7 @@ public: } VTKM_CONT - void SetColorMap(const vtkm::cont::ArrayHandle > &colorMap) + void SetColorMap(const vtkm::cont::ArrayHandle>& colorMap) { ColorMap = colorMap; } @@ -463,9 +400,9 @@ public: } VTKM_CONT - void Render(CanvasRayTracer *canvas) + void Render(CanvasRayTracer* canvas) { - if(IsSceneDirty) + if (IsSceneDirty) { Init(); } @@ -474,27 +411,17 @@ public: intersector.run(Rays, Bvh, CoordsHandle); Reflector reflector; reflector.run(Rays, Bvh, CoordsHandle, ScalarField, ScalarRange); - vtkm::worklet::DispatcherMapField< IntersectionPoint >( IntersectionPoint() ) - .Invoke( Rays.HitIdx, - Rays.Distance, - Rays.Dir, - Rays.Origin, - Rays.IntersectionX, - Rays.IntersectionY, - Rays.IntersectionZ ); - + vtkm::worklet::DispatcherMapField(IntersectionPoint()) + .Invoke(Rays.HitIdx, Rays.Distance, Rays.Dir, Rays.Origin, Rays.IntersectionX, + Rays.IntersectionY, Rays.IntersectionZ); SurfaceColor surfaceColor; - surfaceColor.run(Rays, - ColorMap, - camera.FrameBuffer, - camera.GetPosition(), - BackgroundColor); - - - camera.WriteToSurface(canvas, Rays.Distance); + surfaceColor.run(Rays, ColorMap, camera.FrameBuffer, camera.GetPosition(), BackgroundColor); + camera.WriteToSurface(canvas, Rays.Distance); } -};//class RayTracer -}}}// namespace vtkm::rendering::raytracing +}; //class RayTracer +} +} +} // namespace vtkm::rendering::raytracing #endif //vtk_m_rendering_raytracing_RayTracer_h diff --git a/vtkm/rendering/raytracing/RayTracingTypeDefs.h b/vtkm/rendering/raytracing/RayTracingTypeDefs.h index 57a98b169..26bf327cf 100644 --- a/vtkm/rendering/raytracing/RayTracingTypeDefs.h +++ b/vtkm/rendering/raytracing/RayTracingTypeDefs.h @@ -21,24 +21,33 @@ #define vtk_m_rendering_raytracing_RayTracingTypeDefs_h #include #include -namespace vtkm { -namespace rendering { -namespace raytracing { +namespace vtkm +{ +namespace rendering +{ +namespace raytracing +{ -typedef vtkm::cont::ArrayHandle > ColorBuffer4f; -typedef vtkm::cont::ArrayHandle > ColorBuffer4b; +typedef vtkm::cont::ArrayHandle> ColorBuffer4f; +typedef vtkm::cont::ArrayHandle> ColorBuffer4b; //Defining types supported by the rendering //vec3s -typedef vtkm::Vec< vtkm::Float32, 3 > Vec3F; -typedef vtkm::Vec< vtkm::Float64, 3 > Vec3D; -struct Vec3RenderingTypes : vtkm::ListTagBase< Vec3F, Vec3D> { }; +typedef vtkm::Vec Vec3F; +typedef vtkm::Vec Vec3D; +struct Vec3RenderingTypes : vtkm::ListTagBase +{ +}; // Scalars Types typedef vtkm::Float32 ScalarF; typedef vtkm::Float64 ScalarD; -struct ScalarRenderingTypes : vtkm::ListTagBase {}; -}}}//namespace vtkm::rendering::raytracing +struct ScalarRenderingTypes : vtkm::ListTagBase +{ +}; +} +} +} //namespace vtkm::rendering::raytracing #endif //vtk_m_rendering_raytracing_RayTracingTypeDefs_h diff --git a/vtkm/rendering/raytracing/TriangleIntersector.h b/vtkm/rendering/raytracing/TriangleIntersector.h index d265a30d6..ff13c16fd 100644 --- a/vtkm/rendering/raytracing/TriangleIntersector.h +++ b/vtkm/rendering/raytracing/TriangleIntersector.h @@ -27,22 +27,26 @@ #include #include #include -namespace vtkm { -namespace rendering { -namespace raytracing { +namespace vtkm +{ +namespace rendering +{ +namespace raytracing +{ -namespace { - const static vtkm::Int32 END_FLAG2 = -1000000000; - const static vtkm::Float32 EPSILON2 = 0.0001f; +namespace +{ +const static vtkm::Int32 END_FLAG2 = -1000000000; +const static vtkm::Float32 EPSILON2 = 0.0001f; } template class TriangleIntersector { public: - typedef typename vtkm::cont::ArrayHandle > Float4ArrayHandle; - typedef typename vtkm::cont::ArrayHandle > Int2Handle; - typedef typename vtkm::cont::ArrayHandle > Int4Handle; + typedef typename vtkm::cont::ArrayHandle> Float4ArrayHandle; + typedef typename vtkm::cont::ArrayHandle> Int2Handle; + typedef typename vtkm::cont::ArrayHandle> Int4Handle; typedef typename Float4ArrayHandle::ExecutionTypes::PortalConst Float4ArrayPortal; typedef typename Int2Handle::ExecutionTypes::PortalConst Int2ArrayPortal; typedef typename Int4Handle::ExecutionTypes::PortalConst Int4ArrayPortal; @@ -50,48 +54,31 @@ public: class Intersector : public vtkm::worklet::WorkletMapField { private: - bool Occlusion; vtkm::Float32 MaxDistance; Float4ArrayPortal FlatBVH; Int4ArrayPortal Leafs; VTKM_EXEC - vtkm::Float32 rcp(vtkm::Float32 f) const { return 1.0f/f;} + vtkm::Float32 rcp(vtkm::Float32 f) const { return 1.0f / f; } VTKM_EXEC vtkm::Float32 rcp_safe(vtkm::Float32 f) const { return rcp((fabs(f) < 1e-8f) ? 1e-8f : f); } public: VTKM_CONT - Intersector(bool occlusion, - vtkm::Float32 maxDistance, - LinearBVH &bvh) - : Occlusion(occlusion), - MaxDistance(maxDistance), - FlatBVH(bvh.FlatBVH.PrepareForInput( DeviceAdapter() )), - Leafs( bvh.LeafNodes.PrepareForInput( DeviceAdapter() )) - {} - typedef void ControlSignature(FieldIn<>, - FieldIn<>, - FieldOut<>, - FieldOut<>, - FieldOut<>, - FieldOut<>, - WholeArrayIn); - typedef void ExecutionSignature(_1, - _2, - _3, - _4, - _5, - _6, - _7); - template - VTKM_EXEC - void operator()(const vtkm::Vec &rayDir, - const vtkm::Vec &rayOrigin, - vtkm::Float32 &distance, - vtkm::Float32 &minU, - vtkm::Float32 &minV, - vtkm::Id &hitIndex, - const PointPortalType &points) const + Intersector(bool occlusion, vtkm::Float32 maxDistance, LinearBVH& bvh) + : Occlusion(occlusion) + , MaxDistance(maxDistance) + , FlatBVH(bvh.FlatBVH.PrepareForInput(DeviceAdapter())) + , Leafs(bvh.LeafNodes.PrepareForInput(DeviceAdapter())) + { + } + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldOut<>, FieldOut<>, FieldOut<>, + FieldOut<>, WholeArrayIn); + typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7); + template + VTKM_EXEC void operator()(const vtkm::Vec& rayDir, + const vtkm::Vec& rayOrigin, vtkm::Float32& distance, + vtkm::Float32& minU, vtkm::Float32& minV, vtkm::Id& hitIndex, + const PointPortalType& points) const { float minDistance = MaxDistance; hitIndex = -1; @@ -117,15 +104,15 @@ public: float originDirX = originX * invDirx; float originDirY = originY * invDiry; float originDirZ = originZ * invDirz; - while(currentNode != END_FLAG2) + while (currentNode != END_FLAG2) { - if(currentNode>-1) + if (currentNode > -1) { - vtkm::Vec first4 = FlatBVH.Get(currentNode); - vtkm::Vec second4 = FlatBVH.Get(currentNode+1); - vtkm::Vec third4 = FlatBVH.Get(currentNode+2); - bool hitLeftChild,hitRightChild; + vtkm::Vec first4 = FlatBVH.Get(currentNode); + vtkm::Vec second4 = FlatBVH.Get(currentNode + 1); + vtkm::Vec third4 = FlatBVH.Get(currentNode + 2); + bool hitLeftChild, hitRightChild; vtkm::Float32 xmin0 = first4[0] * invDirx - originDirX; vtkm::Float32 ymin0 = first4[1] * invDiry - originDirY; @@ -134,9 +121,15 @@ public: vtkm::Float32 ymax0 = second4[0] * invDiry - originDirY; vtkm::Float32 zmax0 = second4[1] * invDirz - originDirZ; - vtkm::Float32 min0 = vtkm::Max(vtkm::Max(vtkm::Max(vtkm::Min(ymin0,ymax0),vtkm::Min(xmin0,xmax0)),vtkm::Min(zmin0,zmax0)),0.f); - vtkm::Float32 max0 = vtkm::Min(vtkm::Min(vtkm::Min(vtkm::Max(ymin0,ymax0),vtkm::Max(xmin0,xmax0)),vtkm::Max(zmin0,zmax0)), minDistance); - hitLeftChild = ( max0 >= min0 ); + vtkm::Float32 min0 = + vtkm::Max(vtkm::Max(vtkm::Max(vtkm::Min(ymin0, ymax0), vtkm::Min(xmin0, xmax0)), + vtkm::Min(zmin0, zmax0)), + 0.f); + vtkm::Float32 max0 = + vtkm::Min(vtkm::Min(vtkm::Min(vtkm::Max(ymin0, ymax0), vtkm::Max(xmin0, xmax0)), + vtkm::Max(zmin0, zmax0)), + minDistance); + hitLeftChild = (max0 >= min0); vtkm::Float32 xmin1 = second4[2] * invDirx - originDirX; vtkm::Float32 ymin1 = second4[3] * invDiry - originDirY; @@ -145,119 +138,118 @@ public: vtkm::Float32 ymax1 = third4[2] * invDiry - originDirY; vtkm::Float32 zmax1 = third4[3] * invDirz - originDirZ; - vtkm::Float32 min1 = vtkm::Max(vtkm::Max(vtkm::Max(vtkm::Min(ymin1,ymax1),vtkm::Min(xmin1,xmax1)),vtkm::Min(zmin1,zmax1)),0.f); - vtkm::Float32 max1 = vtkm::Min(vtkm::Min(vtkm::Min(vtkm::Max(ymin1,ymax1),vtkm::Max(xmin1,xmax1)),vtkm::Max(zmin1,zmax1)), minDistance); - hitRightChild = ( max1 >= min1 ); + vtkm::Float32 min1 = + vtkm::Max(vtkm::Max(vtkm::Max(vtkm::Min(ymin1, ymax1), vtkm::Min(xmin1, xmax1)), + vtkm::Min(zmin1, zmax1)), + 0.f); + vtkm::Float32 max1 = + vtkm::Min(vtkm::Min(vtkm::Min(vtkm::Max(ymin1, ymax1), vtkm::Max(xmin1, xmax1)), + vtkm::Max(zmin1, zmax1)), + minDistance); + hitRightChild = (max1 >= min1); - if(!hitLeftChild && !hitRightChild) - { - currentNode = todo[stackptr]; - stackptr--; - } - else - { - vtkm::Vec children = FlatBVH.Get(currentNode+3); //Children.Get(currentNode); - vtkm::Int32 leftChild; - memcpy(&leftChild, &children[0],4); - vtkm::Int32 rightChild; - memcpy(&rightChild, &children[1],4); - currentNode = (hitLeftChild) ? leftChild : rightChild; - if(hitLeftChild && hitRightChild) + if (!hitLeftChild && !hitRightChild) { - if(min0 > min1) - { - currentNode = rightChild; - stackptr++; - todo[stackptr] = leftChild; - } - else - { - stackptr++; - todo[stackptr] = rightChild; - } + currentNode = todo[stackptr]; + stackptr--; } - } - } // if inner node - - if(currentNode < 0 && currentNode != barrier)//check register usage - { - currentNode = -currentNode - 1; //swap the neg address - vtkm::Vec leafnode = Leafs.Get(currentNode); - vtkm::Vec a = vtkm::Vec(points.Get(leafnode[1])); - vtkm::Vec b = vtkm::Vec(points.Get(leafnode[2])); - vtkm::Vec c = vtkm::Vec(points.Get(leafnode[3])); - - vtkm::Vec e1 = b - a; - vtkm::Vec e2 = c - a; - - - vtkm::Vec p; - p[0] = diry * e2[2] - dirz * e2[1]; - p[1] = dirz * e2[0] - dirx * e2[2]; - p[2] = dirx * e2[1] - diry * e2[0]; - vtkm::Float32 dot = e1[0] * p[0] + e1[1] * p[1] + e1[2] * p[2]; - if(dot != 0.f) - { - dot = 1.f / dot; - vtkm::Vec t; - t[0] = originX - a[0]; - t[1] = originY - a[1]; - t[2] = originZ - a[2]; - - float u = (t[0]* p[0] + t[1] * p[1] + t[2] * p[2]) * dot; - if(u >= (0.f - EPSILON2) && u <= (1.f + EPSILON2)) + else { - - vtkm::Vec q; // = t % e1; - q[0] = t[1] * e1[2] - t[2] * e1[1]; - q[1] = t[2] * e1[0] - t[0] * e1[2]; - q[2] = t[0] * e1[1] - t[1] * e1[0]; - vtkm::Float32 v = (dirx * q[0] + diry * q[1] + dirz * q[2]) * dot; - - if(v >= (0.f - EPSILON2) && v <= (1.f + EPSILON2)) + vtkm::Vec children = + FlatBVH.Get(currentNode + 3); //Children.Get(currentNode); + vtkm::Int32 leftChild; + memcpy(&leftChild, &children[0], 4); + vtkm::Int32 rightChild; + memcpy(&rightChild, &children[1], 4); + currentNode = (hitLeftChild) ? leftChild : rightChild; + if (hitLeftChild && hitRightChild) { - - vtkm::Float32 dist = (e2[0] * q[0] + e2[1] * q[1] + e2[2] * q[2]) * dot; - if((dist > EPSILON2 && dist < minDistance) && !(u + v > 1) ) + if (min0 > min1) { - minDistance = dist; - hitIndex = currentNode; - minU = u; - minV = v; - if(Occlusion) return;//or set todo to -1 + currentNode = rightChild; + stackptr++; + todo[stackptr] = leftChild; + } + else + { + stackptr++; + todo[stackptr] = rightChild; } } } - } + } // if inner node - currentNode = todo[stackptr]; - stackptr--; - } // if leaf node + if (currentNode < 0 && currentNode != barrier) //check register usage + { + currentNode = -currentNode - 1; //swap the neg address + vtkm::Vec leafnode = Leafs.Get(currentNode); + vtkm::Vec a = vtkm::Vec(points.Get(leafnode[1])); + vtkm::Vec b = vtkm::Vec(points.Get(leafnode[2])); + vtkm::Vec c = vtkm::Vec(points.Get(leafnode[3])); - } //while - distance = minDistance; + vtkm::Vec e1 = b - a; + vtkm::Vec e2 = c - a; - }// () -}; + vtkm::Vec p; + p[0] = diry * e2[2] - dirz * e2[1]; + p[1] = dirz * e2[0] - dirx * e2[2]; + p[2] = dirx * e2[1] - diry * e2[0]; + vtkm::Float32 dot = e1[0] * p[0] + e1[1] * p[1] + e1[2] * p[2]; + if (dot != 0.f) + { + dot = 1.f / dot; + vtkm::Vec t; + t[0] = originX - a[0]; + t[1] = originY - a[1]; + t[2] = originZ - a[2]; + float u = (t[0] * p[0] + t[1] * p[1] + t[2] * p[2]) * dot; + if (u >= (0.f - EPSILON2) && u <= (1.f + EPSILON2)) + { + vtkm::Vec q; // = t % e1; + q[0] = t[1] * e1[2] - t[2] * e1[1]; + q[1] = t[2] * e1[0] - t[0] * e1[2]; + q[2] = t[0] * e1[1] - t[1] * e1[0]; + vtkm::Float32 v = (dirx * q[0] + diry * q[1] + dirz * q[2]) * dot; + + if (v >= (0.f - EPSILON2) && v <= (1.f + EPSILON2)) + { + + vtkm::Float32 dist = (e2[0] * q[0] + e2[1] * q[1] + e2[2] * q[2]) * dot; + if ((dist > EPSILON2 && dist < minDistance) && !(u + v > 1)) + { + minDistance = dist; + hitIndex = currentNode; + minU = u; + minV = v; + if (Occlusion) + return; //or set todo to -1 + } + } + } + } + + currentNode = todo[stackptr]; + stackptr--; + } // if leaf node + + } //while + distance = minDistance; + + } // () + }; VTKM_CONT - void run(Ray &rays, - LinearBVH &bvh, + void run(Ray& rays, LinearBVH& bvh, vtkm::cont::DynamicArrayHandleCoordinateSystem coordsHandle) { - vtkm::worklet::DispatcherMapField< Intersector >( Intersector( false, 10000000.f, bvh) ) - .Invoke( rays.Dir, - rays.Origin, - rays.Distance, - rays.U, - rays.V, - rays.HitIdx, - coordsHandle); + vtkm::worklet::DispatcherMapField(Intersector(false, 10000000.f, bvh)) + .Invoke(rays.Dir, rays.Origin, rays.Distance, rays.U, rays.V, rays.HitIdx, coordsHandle); } }; // class intersector - -}}}//namespace vtkm::rendering::raytracing +} +} +} //namespace vtkm::rendering::raytracing #endif //vtk_m_rendering_raytracing_TriagnleIntersector_h diff --git a/vtkm/rendering/raytracing/VolumeRendererStructured.h b/vtkm/rendering/raytracing/VolumeRendererStructured.h index 001fb162f..7f19f0e38 100644 --- a/vtkm/rendering/raytracing/VolumeRendererStructured.h +++ b/vtkm/rendering/raytracing/VolumeRendererStructured.h @@ -37,72 +37,83 @@ #include #include -namespace vtkm { -namespace rendering{ -namespace raytracing{ +namespace vtkm +{ +namespace rendering +{ +namespace raytracing +{ -namespace { +namespace +{ -template +template class RectilinearLocator { protected: typedef vtkm::cont::ArrayHandle DefaultHandle; - typedef vtkm::cont::ArrayHandleCartesianProduct CartesianArrayHandle; + typedef vtkm::cont::ArrayHandleCartesianProduct + CartesianArrayHandle; typedef typename DefaultHandle::ExecutionTypes::PortalConst DefaultConstHandle; typedef typename CartesianArrayHandle::ExecutionTypes::PortalConst CartesianConstPortal; vtkm::Float32 InverseDeltaScalar; DefaultConstHandle CoordPortals[3]; CartesianConstPortal Coordinates; - vtkm::exec::ConnectivityStructured Conn; + vtkm::exec::ConnectivityStructured + Conn; vtkm::Id3 PointDimensions; - vtkm::Vec MinPoint; - vtkm::Vec MaxPoint; -public: + vtkm::Vec MinPoint; + vtkm::Vec MaxPoint; - RectilinearLocator(const CartesianArrayHandle &coordinates, - vtkm::cont::CellSetStructured<3> &cellset) - : Coordinates(coordinates.PrepareForInput( Device() )), - Conn( cellset.PrepareForInput( Device(), - vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell() )) +public: + RectilinearLocator(const CartesianArrayHandle& coordinates, + vtkm::cont::CellSetStructured<3>& cellset) + : Coordinates(coordinates.PrepareForInput(Device())) + , Conn(cellset.PrepareForInput(Device(), vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell())) { CoordPortals[0] = Coordinates.GetFirstPortal(); CoordPortals[1] = Coordinates.GetSecondPortal(); CoordPortals[2] = Coordinates.GetThirdPortal(); PointDimensions = Conn.GetPointDimensions(); - MinPoint[0] = static_cast(coordinates.GetPortalConstControl().GetFirstPortal().Get(0)); - MinPoint[1] = static_cast(coordinates.GetPortalConstControl().GetSecondPortal().Get(0)); - MinPoint[2] = static_cast(coordinates.GetPortalConstControl().GetThirdPortal().Get(0)); + MinPoint[0] = + static_cast(coordinates.GetPortalConstControl().GetFirstPortal().Get(0)); + MinPoint[1] = + static_cast(coordinates.GetPortalConstControl().GetSecondPortal().Get(0)); + MinPoint[2] = + static_cast(coordinates.GetPortalConstControl().GetThirdPortal().Get(0)); - MaxPoint[0] = static_cast(coordinates.GetPortalConstControl().GetFirstPortal().Get(PointDimensions[0] - 1)); - MaxPoint[1] = static_cast(coordinates.GetPortalConstControl().GetSecondPortal().Get(PointDimensions[1] - 1)); - MaxPoint[2] = static_cast(coordinates.GetPortalConstControl().GetThirdPortal().Get(PointDimensions[2] - 1)); + MaxPoint[0] = static_cast( + coordinates.GetPortalConstControl().GetFirstPortal().Get(PointDimensions[0] - 1)); + MaxPoint[1] = static_cast( + coordinates.GetPortalConstControl().GetSecondPortal().Get(PointDimensions[1] - 1)); + MaxPoint[2] = static_cast( + coordinates.GetPortalConstControl().GetThirdPortal().Get(PointDimensions[2] - 1)); } VTKM_EXEC - inline bool - IsInside(const vtkm::Vec &point) const + inline bool IsInside(const vtkm::Vec& point) const { bool inside = true; - if(point[0] < MinPoint[0] || point[0] > MaxPoint[0]) inside = false; - if(point[1] < MinPoint[1] || point[1] > MaxPoint[1]) inside = false; - if(point[2] < MinPoint[2] || point[2] > MaxPoint[2]) inside = false; + if (point[0] < MinPoint[0] || point[0] > MaxPoint[0]) + inside = false; + if (point[1] < MinPoint[1] || point[1] > MaxPoint[1]) + inside = false; + if (point[2] < MinPoint[2] || point[2] > MaxPoint[2]) + inside = false; return inside; } VTKM_EXEC - inline void - GetCellIndices(const vtkm::Vec &cell, - vtkm::Vec &cellIndices) const + inline void GetCellIndices(const vtkm::Vec& cell, + vtkm::Vec& cellIndices) const { cellIndices[0] = (cell[2] * PointDimensions[1] + cell[1]) * PointDimensions[0] + cell[0]; cellIndices[1] = cellIndices[0] + 1; cellIndices[2] = cellIndices[1] + PointDimensions[0]; cellIndices[3] = cellIndices[2] - 1; - cellIndices[4] = cellIndices[0] + PointDimensions[0]*PointDimensions[1]; + cellIndices[4] = cellIndices[0] + PointDimensions[0] * PointDimensions[1]; cellIndices[5] = cellIndices[4] + 1; cellIndices[6] = cellIndices[5] + PointDimensions[0]; cellIndices[7] = cellIndices[6] - 1; @@ -112,80 +123,76 @@ public: // Assumes point inside the data set // VTKM_EXEC - inline void - LocateCell(vtkm::Vec &cell, - const vtkm::Vec &point, - vtkm::Vec &invSpacing) const + inline void LocateCell(vtkm::Vec& cell, const vtkm::Vec& point, + vtkm::Vec& invSpacing) const + { + for (vtkm::Int32 dim = 0; dim < 3; ++dim) { - for(vtkm::Int32 dim = 0; dim < 3; ++dim) + // + // When searching for points, we consider the max value of the cell + // to be apart of the next cell. If the point falls on the boundry of the + // data set, then it is technically inside a cell. This checks for that case + // + if (point[dim] == MaxPoint[dim]) { - // - // When searching for points, we consider the max value of the cell - // to be apart of the next cell. If the point falls on the boundry of the - // data set, then it is technically inside a cell. This checks for that case - // - if(point[dim] == MaxPoint[dim]) + cell[dim] = PointDimensions[dim] - 2; + continue; + } + + bool found = false; + vtkm::Float32 minVal = static_cast(CoordPortals[dim].Get(cell[dim])); + const vtkm::Id searchDir = (point[dim] - minVal >= 0.f) ? 1 : -1; + vtkm::Float32 maxVal = static_cast(CoordPortals[dim].Get(cell[dim] + 1)); + + while (!found) + { + if (point[dim] >= minVal && point[dim] < maxVal) { - cell[dim] = PointDimensions[dim] - 2; + found = true; continue; } - bool found = false; - vtkm::Float32 minVal = static_cast(CoordPortals[dim].Get(cell[dim])); - const vtkm::Id searchDir = (point[dim] - minVal >= 0.f) ? 1 : -1; - vtkm::Float32 maxVal = static_cast(CoordPortals[dim].Get(cell[dim] + 1)); - - while(!found) + cell[dim] += searchDir; + vtkm::Id nextCellId = searchDir == 1 ? cell[dim] + 1 : cell[dim]; + vtkm::Float32 next = static_cast(CoordPortals[dim].Get(nextCellId)); + if (searchDir == 1) { - if(point[dim] >= minVal && point[dim] < maxVal) - { - found = true; - continue; - } - - cell[dim] += searchDir; - vtkm::Id nextCellId = searchDir == 1 ? cell[dim] + 1 : cell[dim]; -vtkm::Float32 next = static_cast(CoordPortals[dim].Get(nextCellId)); - if(searchDir == 1) - { - minVal = maxVal; - maxVal = next; - } - else - { - maxVal = minVal; - minVal = next; - } - + minVal = maxVal; + maxVal = next; } - invSpacing[dim] = 1.f / (maxVal - minVal); + else + { + maxVal = minVal; + minVal = next; + } + } + invSpacing[dim] = 1.f / (maxVal - minVal); } } // LocateCell VTKM_EXEC - inline vtkm::Id - GetCellIndex(const vtkm::Vec &cell) const + inline vtkm::Id GetCellIndex(const vtkm::Vec& cell) const { return (cell[2] * (PointDimensions[1] - 1) + cell[1]) * (PointDimensions[0] - 1) + cell[0]; } VTKM_EXEC - inline void - GetPoint(const vtkm::Id &index, vtkm::Vec &point) const + inline void GetPoint(const vtkm::Id& index, vtkm::Vec& point) const { point = Coordinates.Get(index); } VTKM_EXEC - inline void - GetMinPoint(const vtkm::Vec &cell, vtkm::Vec &point) const + inline void GetMinPoint(const vtkm::Vec& cell, + vtkm::Vec& point) const { - const vtkm::Id pointIndex = (cell[2] * PointDimensions[1] + cell[1]) * PointDimensions[0] + cell[0]; + const vtkm::Id pointIndex = + (cell[2] * PointDimensions[1] + cell[1]) * PointDimensions[0] + cell[0]; point = Coordinates.Get(pointIndex); } }; // class RectilinearLocator -template +template class UniformLocator { protected: @@ -193,78 +200,78 @@ protected: typedef typename UniformArrayHandle::ExecutionTypes::PortalConst UniformConstPortal; vtkm::Id3 PointDimensions; - vtkm::Vec Origin; - vtkm::Vec InvSpacing; - vtkm::Vec MaxPoint; + vtkm::Vec Origin; + vtkm::Vec InvSpacing; + vtkm::Vec MaxPoint; UniformConstPortal Coordinates; - vtkm::exec::ConnectivityStructured Conn; -public: - UniformLocator(const UniformArrayHandle &coordinates, - vtkm::cont::CellSetStructured<3> &cellset) - : Coordinates(coordinates.PrepareForInput( Device() )), - Conn( cellset.PrepareForInput( Device(), - vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell() )) - { - Origin = Coordinates.GetOrigin(); - PointDimensions = Conn.GetPointDimensions(); - vtkm::Vec spacing = Coordinates.GetSpacing(); + vtkm::exec::ConnectivityStructured + Conn; - vtkm::Vec unitLength; - unitLength[0] = static_cast(PointDimensions[0] - 1); - unitLength[1] = static_cast(PointDimensions[1] - 1); - unitLength[2] = static_cast(PointDimensions[2] - 1); - MaxPoint = Origin + spacing * unitLength; - InvSpacing[0] = 1.f / spacing[0]; - InvSpacing[1] = 1.f / spacing[1]; - InvSpacing[2] = 1.f / spacing[2]; - } +public: + UniformLocator(const UniformArrayHandle& coordinates, vtkm::cont::CellSetStructured<3>& cellset) + : Coordinates(coordinates.PrepareForInput(Device())) + , Conn(cellset.PrepareForInput(Device(), vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell())) + { + Origin = Coordinates.GetOrigin(); + PointDimensions = Conn.GetPointDimensions(); + vtkm::Vec spacing = Coordinates.GetSpacing(); + + vtkm::Vec unitLength; + unitLength[0] = static_cast(PointDimensions[0] - 1); + unitLength[1] = static_cast(PointDimensions[1] - 1); + unitLength[2] = static_cast(PointDimensions[2] - 1); + MaxPoint = Origin + spacing * unitLength; + InvSpacing[0] = 1.f / spacing[0]; + InvSpacing[1] = 1.f / spacing[1]; + InvSpacing[2] = 1.f / spacing[2]; + } VTKM_EXEC - inline bool - IsInside(const vtkm::Vec &point) const + inline bool IsInside(const vtkm::Vec& point) const { bool inside = true; - if(point[0] < Origin[0] || point[0] > MaxPoint[0]) inside = false; - if(point[1] < Origin[1] || point[1] > MaxPoint[1]) inside = false; - if(point[2] < Origin[2] || point[2] > MaxPoint[2]) inside = false; + if (point[0] < Origin[0] || point[0] > MaxPoint[0]) + inside = false; + if (point[1] < Origin[1] || point[1] > MaxPoint[1]) + inside = false; + if (point[2] < Origin[2] || point[2] > MaxPoint[2]) + inside = false; return inside; } VTKM_EXEC - inline void - GetCellIndices(const vtkm::Vec &cell, - vtkm::Vec &cellIndices) const + inline void GetCellIndices(const vtkm::Vec& cell, + vtkm::Vec& cellIndices) const { cellIndices[0] = (cell[2] * PointDimensions[1] + cell[1]) * PointDimensions[0] + cell[0]; cellIndices[1] = cellIndices[0] + 1; cellIndices[2] = cellIndices[1] + PointDimensions[0]; cellIndices[3] = cellIndices[2] - 1; - cellIndices[4] = cellIndices[0] + PointDimensions[0]*PointDimensions[1]; + cellIndices[4] = cellIndices[0] + PointDimensions[0] * PointDimensions[1]; cellIndices[5] = cellIndices[4] + 1; cellIndices[6] = cellIndices[5] + PointDimensions[0]; cellIndices[7] = cellIndices[6] - 1; } // GetCellIndices VTKM_EXEC - inline vtkm::Id - GetCellIndex(const vtkm::Vec &cell) const + inline vtkm::Id GetCellIndex(const vtkm::Vec& cell) const { return (cell[2] * (PointDimensions[1] - 1) + cell[1]) * (PointDimensions[0] - 1) + cell[0]; } VTKM_EXEC - inline void - LocateCell(vtkm::Vec &cell, - const vtkm::Vec &point, - vtkm::Vec &invSpacing) const + inline void LocateCell(vtkm::Vec& cell, const vtkm::Vec& point, + vtkm::Vec& invSpacing) const { - vtkm::Vec temp = point; + vtkm::Vec temp = point; //make sure that if we border the upper edge, we sample the correct cell - if(temp[0] == vtkm::Float32(PointDimensions[0] - 1)) temp[0] = vtkm::Float32(PointDimensions[0] - 2); - if(temp[1] == vtkm::Float32(PointDimensions[1] - 1)) temp[0] = vtkm::Float32(PointDimensions[1] - 2); - if(temp[2] == vtkm::Float32(PointDimensions[2] - 1)) temp[0] = vtkm::Float32(PointDimensions[2] - 2); + if (temp[0] == vtkm::Float32(PointDimensions[0] - 1)) + temp[0] = vtkm::Float32(PointDimensions[0] - 2); + if (temp[1] == vtkm::Float32(PointDimensions[1] - 1)) + temp[0] = vtkm::Float32(PointDimensions[1] - 2); + if (temp[2] == vtkm::Float32(PointDimensions[2] - 1)) + temp[0] = vtkm::Float32(PointDimensions[2] - 2); temp = temp - Origin; temp = temp * InvSpacing; cell = temp; @@ -272,85 +279,79 @@ public: } VTKM_EXEC - inline void - GetPoint(const vtkm::Id &index, vtkm::Vec &point) const + inline void GetPoint(const vtkm::Id& index, vtkm::Vec& point) const { point = Coordinates.Get(index); } VTKM_EXEC - inline void - GetMinPoint(const vtkm::Vec &cell, vtkm::Vec &point) const + inline void GetMinPoint(const vtkm::Vec& cell, + vtkm::Vec& point) const { - const vtkm::Id pointIndex = (cell[2] * PointDimensions[1] + cell[1]) * PointDimensions[0] + cell[0]; + const vtkm::Id pointIndex = + (cell[2] * PointDimensions[1] + cell[1]) * PointDimensions[0] + cell[0]; point = Coordinates.Get(pointIndex); } }; // class UniformLocator - } //namespace -template +template class VolumeRendererStructured { public: typedef vtkm::cont::ArrayHandle DefaultHandle; - typedef vtkm::cont::ArrayHandleCartesianProduct CartesianArrayHandle; + typedef vtkm::cont::ArrayHandleCartesianProduct + CartesianArrayHandle; - template + template class Sampler : public vtkm::worklet::WorkletMapField { private: - typedef typename vtkm::cont::ArrayHandle > ColorArrayHandle; + typedef typename vtkm::cont::ArrayHandle> ColorArrayHandle; typedef typename ColorArrayHandle::ExecutionTypes::PortalConst ColorArrayPortal; - vtkm::Vec CameraPosition; + vtkm::Vec CameraPosition; ColorArrayPortal ColorMap; vtkm::Id ColorMapSize; vtkm::Float32 MinScalar; vtkm::Float32 SampleDistance; vtkm::Float32 InverseDeltaScalar; LocatorType Locator; + public: VTKM_CONT - Sampler(vtkm::Vec cameraPosition, - const ColorArrayHandle &colorMap, - const vtkm::Float32 &minScalar, - const vtkm::Float32 &maxScalar, - const vtkm::Float32 &sampleDistance, - const LocatorType &locator) - : CameraPosition(cameraPosition), - ColorMap( colorMap.PrepareForInput( Device() )), - MinScalar(minScalar), - SampleDistance(sampleDistance), - Locator(locator) + Sampler(vtkm::Vec cameraPosition, const ColorArrayHandle& colorMap, + const vtkm::Float32& minScalar, const vtkm::Float32& maxScalar, + const vtkm::Float32& sampleDistance, const LocatorType& locator) + : CameraPosition(cameraPosition) + , ColorMap(colorMap.PrepareForInput(Device())) + , MinScalar(minScalar) + , SampleDistance(sampleDistance) + , Locator(locator) { ColorMapSize = colorMap.GetNumberOfValues() - 1; - if((maxScalar - minScalar) != 0.f) InverseDeltaScalar = 1.f / (maxScalar - minScalar); - else InverseDeltaScalar = minScalar; + if ((maxScalar - minScalar) != 0.f) + InverseDeltaScalar = 1.f / (maxScalar - minScalar); + else + InverseDeltaScalar = minScalar; } - typedef void ControlSignature(FieldIn<>, - FieldIn<>, - FieldOut<>, + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldOut<>, WholeArrayIn); - typedef void ExecutionSignature(_1, - _2, - _3, - _4); - - template - VTKM_EXEC - void operator()(const vtkm::Vec &rayDir, - const vtkm::Float32 &minDistance, - vtkm::Vec &color, - ScalarPortalType &scalars) const + typedef void ExecutionSignature(_1, _2, _3, _4); + + template + VTKM_EXEC void operator()(const vtkm::Vec& rayDir, + const vtkm::Float32& minDistance, vtkm::Vec& color, + ScalarPortalType& scalars) const { color[0] = 0.f; color[1] = 0.f; color[2] = 0.f; color[3] = 0.f; - if(minDistance == -1.f) return; //TODO: Compact? or just image subset... + if (minDistance == -1.f) + return; //TODO: Compact? or just image subset... //get the initial sample position; - vtkm::Vec sampleLocation; + vtkm::Vec sampleLocation; sampleLocation = CameraPosition + (0.0001f + minDistance) * rayDir; /* 7----------6 @@ -361,7 +362,7 @@ public: |/ |/ |/ 0----------1 |__ x */ - vtkm::Vec bottomLeft(0,0,0); + vtkm::Vec bottomLeft(0, 0, 0); bool newCell = true; //check to see if we left the cell vtkm::Float32 tx = 0.f; @@ -375,20 +376,21 @@ public: vtkm::Float32 scalar5minus4 = 0.f; vtkm::Float32 scalar6minus7 = 0.f; vtkm::Float32 scalar7 = 0.f; - - vtkm::Vec cell(0,0,0); - vtkm::Vec invSpacing; - while(Locator.IsInside(sampleLocation)) + vtkm::Vec cell(0, 0, 0); + vtkm::Vec invSpacing; + + while (Locator.IsInside(sampleLocation)) { vtkm::Float32 mint = vtkm::Min(tx, vtkm::Min(ty, tz)); vtkm::Float32 maxt = vtkm::Max(tx, vtkm::Max(ty, tz)); - if( maxt > 1.f || mint < 0.f) newCell = true; + if (maxt > 1.f || mint < 0.f) + newCell = true; - if(newCell) + if (newCell) { - - vtkm::Vec cellIndices; + + vtkm::Vec cellIndices; Locator.LocateCell(cell, sampleLocation, invSpacing); Locator.GetCellIndices(cell, cellIndices); Locator.GetPoint(cellIndices[0], bottomLeft); @@ -423,16 +425,18 @@ public: vtkm::Float32 lerped32 = scalar3 + tx * scalar2minus3; vtkm::Float32 lerpedBottom = lerped01 + ty * (lerped32 - lerped01); - vtkm::Float32 finalScalar = lerpedBottom + tz *(lerpedTop - lerpedBottom); + vtkm::Float32 finalScalar = lerpedBottom + tz * (lerpedTop - lerpedBottom); //normalize scalar finalScalar = (finalScalar - MinScalar) * InverseDeltaScalar; - vtkm::Id colorIndex = static_cast( - finalScalar * static_cast(ColorMapSize)); - if(colorIndex < 0) colorIndex = 0; - if(colorIndex > ColorMapSize) colorIndex = ColorMapSize; + vtkm::Id colorIndex = + static_cast(finalScalar * static_cast(ColorMapSize)); + if (colorIndex < 0) + colorIndex = 0; + if (colorIndex > ColorMapSize) + colorIndex = ColorMapSize; - vtkm::Vec sampleColor = ColorMap.Get(colorIndex); + vtkm::Vec sampleColor = ColorMap.Get(colorIndex); //composite sampleColor[3] *= (1.f - color[3]); @@ -448,69 +452,64 @@ public: ty = (sampleLocation[1] - bottomLeft[1]) * invSpacing[1]; tz = (sampleLocation[2] - bottomLeft[2]) * invSpacing[2]; - if(color[3] >= 1.f) break; + if (color[3] >= 1.f) + break; } - color[0] = vtkm::Min(color[0],1.f); - color[1] = vtkm::Min(color[1],1.f); - color[2] = vtkm::Min(color[2],1.f); - color[3] = vtkm::Min(color[3],1.f); + color[0] = vtkm::Min(color[0], 1.f); + color[1] = vtkm::Min(color[1], 1.f); + color[2] = vtkm::Min(color[2], 1.f); + color[3] = vtkm::Min(color[3], 1.f); } }; //Sampler - template + template class SamplerCellAssoc : public vtkm::worklet::WorkletMapField { private: - typedef typename vtkm::cont::ArrayHandle > ColorArrayHandle; + typedef typename vtkm::cont::ArrayHandle> ColorArrayHandle; typedef typename ColorArrayHandle::ExecutionTypes::PortalConst ColorArrayPortal; - vtkm::Vec CameraPosition; + vtkm::Vec CameraPosition; ColorArrayPortal ColorMap; vtkm::Id ColorMapSize; vtkm::Float32 MinScalar; vtkm::Float32 SampleDistance; vtkm::Float32 InverseDeltaScalar; LocatorType Locator; + public: VTKM_CONT - SamplerCellAssoc(vtkm::Vec cameraPosition, - const ColorArrayHandle &colorMap, - const vtkm::Float32 &minScalar, - const vtkm::Float32 &maxScalar, - const vtkm::Float32 &sampleDistance, - const LocatorType &locator) - : CameraPosition(cameraPosition), - ColorMap( colorMap.PrepareForInput( Device() )), - MinScalar(minScalar), - SampleDistance(sampleDistance), - Locator(locator) + SamplerCellAssoc(vtkm::Vec cameraPosition, const ColorArrayHandle& colorMap, + const vtkm::Float32& minScalar, const vtkm::Float32& maxScalar, + const vtkm::Float32& sampleDistance, const LocatorType& locator) + : CameraPosition(cameraPosition) + , ColorMap(colorMap.PrepareForInput(Device())) + , MinScalar(minScalar) + , SampleDistance(sampleDistance) + , Locator(locator) { ColorMapSize = colorMap.GetNumberOfValues() - 1; - if((maxScalar - minScalar) != 0.f) InverseDeltaScalar = 1.f / (maxScalar - minScalar); - else InverseDeltaScalar = minScalar; + if ((maxScalar - minScalar) != 0.f) + InverseDeltaScalar = 1.f / (maxScalar - minScalar); + else + InverseDeltaScalar = minScalar; } - typedef void ControlSignature(FieldIn<>, - FieldIn<>, - FieldOut<>, + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldOut<>, WholeArrayIn); - typedef void ExecutionSignature(_1, - _2, - _3, - _4); - - template - VTKM_EXEC - void operator()(const vtkm::Vec &rayDir, - const vtkm::Float32 &minDistance, - vtkm::Vec &color, - const ScalarPortalType &scalars) const + typedef void ExecutionSignature(_1, _2, _3, _4); + + template + VTKM_EXEC void operator()(const vtkm::Vec& rayDir, + const vtkm::Float32& minDistance, vtkm::Vec& color, + const ScalarPortalType& scalars) const { color[0] = 0.f; color[1] = 0.f; color[2] = 0.f; color[3] = 0.f; - if(minDistance == -1.f) return; //TODO: Compact? or just image subset... + if (minDistance == -1.f) + return; //TODO: Compact? or just image subset... //get the initial sample position; - vtkm::Vec sampleLocation; + vtkm::Vec sampleLocation; sampleLocation = CameraPosition + (0.0001f + minDistance) * rayDir; /* @@ -527,26 +526,29 @@ public: vtkm::Float32 ty = 2.f; vtkm::Float32 tz = 2.f; vtkm::Float32 scalar0 = 0.f; - vtkm::Vec sampleColor(0,0,0,0); - vtkm::Vec bottomLeft(0,0,0); - vtkm::Vec invSpacing; - vtkm::Vec cell(0,0,0); - while(Locator.IsInside(sampleLocation)) + vtkm::Vec sampleColor(0, 0, 0, 0); + vtkm::Vec bottomLeft(0, 0, 0); + vtkm::Vec invSpacing; + vtkm::Vec cell(0, 0, 0); + while (Locator.IsInside(sampleLocation)) { vtkm::Float32 mint = vtkm::Min(tx, vtkm::Min(ty, tz)); vtkm::Float32 maxt = vtkm::Max(tx, vtkm::Max(ty, tz)); - if( maxt > 1.f || mint < 0.f) newCell = true; - if(newCell) + if (maxt > 1.f || mint < 0.f) + newCell = true; + if (newCell) { Locator.LocateCell(cell, sampleLocation, invSpacing); vtkm::Id cellId = Locator.GetCellIndex(cell); scalar0 = vtkm::Float32(scalars.Get(cellId)); vtkm::Float32 normalizedScalar = (scalar0 - MinScalar) * InverseDeltaScalar; - vtkm::Id colorIndex = static_cast( - normalizedScalar * static_cast(ColorMapSize)); - if(colorIndex < 0) colorIndex = 0; - if(colorIndex > ColorMapSize) colorIndex = ColorMapSize; + vtkm::Id colorIndex = + static_cast(normalizedScalar * static_cast(ColorMapSize)); + if (colorIndex < 0) + colorIndex = 0; + if (colorIndex > ColorMapSize) + colorIndex = ColorMapSize; sampleColor = ColorMap.Get(colorIndex); Locator.GetMinPoint(cell, bottomLeft); tx = (sampleLocation[0] - bottomLeft[0]) * invSpacing[0]; @@ -564,33 +566,34 @@ public: //advance sampleLocation = sampleLocation + SampleDistance * rayDir; - if(color[3] >= 1.f) break; + if (color[3] >= 1.f) + break; tx = (sampleLocation[0] - bottomLeft[0]) * invSpacing[0]; ty = (sampleLocation[1] - bottomLeft[1]) * invSpacing[1]; tz = (sampleLocation[2] - bottomLeft[2]) * invSpacing[2]; } - color[0] = vtkm::Min(color[0],1.f); - color[1] = vtkm::Min(color[1],1.f); - color[2] = vtkm::Min(color[2],1.f); - color[3] = vtkm::Min(color[3],1.f); + color[0] = vtkm::Min(color[0], 1.f); + color[1] = vtkm::Min(color[1], 1.f); + color[2] = vtkm::Min(color[2], 1.f); + color[3] = vtkm::Min(color[3], 1.f); } }; //SamplerCell class CalcRayStart : public vtkm::worklet::WorkletMapField { - vtkm::Float32 Xmin; - vtkm::Float32 Ymin; - vtkm::Float32 Zmin; - vtkm::Float32 Xmax; - vtkm::Float32 Ymax; - vtkm::Float32 Zmax; - vtkm::Vec CameraPosition; + vtkm::Float32 Xmin; + vtkm::Float32 Ymin; + vtkm::Float32 Zmin; + vtkm::Float32 Xmax; + vtkm::Float32 Ymax; + vtkm::Float32 Zmax; + vtkm::Vec CameraPosition; + public: VTKM_CONT - CalcRayStart(vtkm::Vec cameraPosition, - const vtkm::Bounds boundingBox) - : CameraPosition(cameraPosition) + CalcRayStart(vtkm::Vec cameraPosition, const vtkm::Bounds boundingBox) + : CameraPosition(cameraPosition) { Xmin = static_cast(boundingBox.X.Min); Xmax = static_cast(boundingBox.X.Max); @@ -601,21 +604,16 @@ public: } VTKM_EXEC - vtkm::Float32 rcp(vtkm::Float32 f) const { return 1.0f/f;} + vtkm::Float32 rcp(vtkm::Float32 f) const { return 1.0f / f; } VTKM_EXEC vtkm::Float32 rcp_safe(vtkm::Float32 f) const { return rcp((fabs(f) < 1e-8f) ? 1e-8f : f); } - typedef void ControlSignature(FieldIn<>, - FieldOut<>, - FieldOut<>); - typedef void ExecutionSignature(_1, - _2, - _3); + typedef void ControlSignature(FieldIn<>, FieldOut<>, FieldOut<>); + typedef void ExecutionSignature(_1, _2, _3); VTKM_EXEC - void operator()(const vtkm::Vec &rayDir, - vtkm::Float32 &minDistance, - vtkm::Float32 &maxDistance) const + void operator()(const vtkm::Vec& rayDir, vtkm::Float32& minDistance, + vtkm::Float32& maxDistance) const { vtkm::Float32 dirx = rayDir[0]; vtkm::Float32 diry = rayDir[1]; @@ -636,39 +634,42 @@ public: vtkm::Float32 ymax = Ymax * invDiry - odiry; vtkm::Float32 zmax = Zmax * invDirz - odirz; - - minDistance = vtkm::Max(vtkm::Max(vtkm::Max(vtkm::Min(ymin,ymax),vtkm::Min(xmin,xmax)),vtkm::Min(zmin,zmax)), 0.f); - maxDistance = vtkm::Min(vtkm::Min(vtkm::Max(ymin,ymax),vtkm::Max(xmin,xmax)),vtkm::Max(zmin,zmax)); - if(maxDistance < minDistance) + minDistance = vtkm::Max( + vtkm::Max(vtkm::Max(vtkm::Min(ymin, ymax), vtkm::Min(xmin, xmax)), vtkm::Min(zmin, zmax)), + 0.f); + maxDistance = + vtkm::Min(vtkm::Min(vtkm::Max(ymin, ymax), vtkm::Max(xmin, xmax)), vtkm::Max(zmin, zmax)); + if (maxDistance < minDistance) { minDistance = -1.f; //flag for miss } - - } }; //class CalcRayStart class CompositeBackground : public vtkm::worklet::WorkletMapField { - vtkm::Vec BackgroundColor; + vtkm::Vec BackgroundColor; + public: VTKM_CONT - CompositeBackground(const vtkm::Vec &backgroundColor) - : BackgroundColor(backgroundColor) - {} + CompositeBackground(const vtkm::Vec& backgroundColor) + : BackgroundColor(backgroundColor) + { + } typedef void ControlSignature(FieldInOut<>); typedef void ExecutionSignature(_1); VTKM_EXEC - void operator()(vtkm::Vec &color) const + void operator()(vtkm::Vec& color) const { - if(color[3] >= 1.f) return; - vtkm::Float32 alpha = BackgroundColor[3] * (1.f - color[3]); - color[0] = color[0] + BackgroundColor[0] * alpha; - color[1] = color[1] + BackgroundColor[1] * alpha; - color[2] = color[2] + BackgroundColor[2] * alpha; - color[3] = alpha + color[3]; + if (color[3] >= 1.f) + return; + vtkm::Float32 alpha = BackgroundColor[3] * (1.f - color[3]); + color[0] = color[0] + BackgroundColor[0] * alpha; + color[1] = color[1] + BackgroundColor[1] * alpha; + color[2] = color[2] + BackgroundColor[2] * alpha; + color[3] = alpha + color[3]; } }; //class CompositeBackground @@ -682,13 +683,10 @@ public: } VTKM_CONT - Camera& GetCamera() - { - return camera; - } + Camera& GetCamera() { return camera; } VTKM_CONT - void SetColorMap(const vtkm::cont::ArrayHandle > &colorMap) + void SetColorMap(const vtkm::cont::ArrayHandle>& colorMap) { ColorMap = colorMap; } @@ -701,13 +699,12 @@ public: } VTKM_CONT - void SetData(const vtkm::cont::CoordinateSystem &coords, - const vtkm::cont::Field &scalarField, - const vtkm::Bounds &coordsBounds, - const vtkm::cont::CellSetStructured<3> &cellset, - const vtkm::Range &scalarRange) + void SetData(const vtkm::cont::CoordinateSystem& coords, const vtkm::cont::Field& scalarField, + const vtkm::Bounds& coordsBounds, const vtkm::cont::CellSetStructured<3>& cellset, + const vtkm::Range& scalarRange) { - if(coords.GetData().IsSameType(CartesianArrayHandle())) IsUniformDataSet = false; + if (coords.GetData().IsSameType(CartesianArrayHandle())) + IsUniformDataSet = false; IsSceneDirty = true; Coordinates = coords.GetData(); ScalarField = &scalarField; @@ -716,17 +713,16 @@ public: ScalarRange = scalarRange; } - VTKM_CONT - void Render(CanvasRayTracer *canvas) + void Render(CanvasRayTracer* canvas) { - if(IsSceneDirty) + if (IsSceneDirty) { Init(); } - if(SampleDistance <= 0.f) + if (SampleDistance <= 0.f) { - vtkm::Vec extent; + vtkm::Vec extent; extent[0] = static_cast(this->DataBounds.X.Length()); extent[1] = static_cast(this->DataBounds.Y.Length()); extent[2] = static_cast(this->DataBounds.Z.Length()); @@ -734,105 +730,80 @@ public: SampleDistance = vtkm::Magnitude(extent) / defaultNumberOfSamples; } - vtkm::worklet::DispatcherMapField< CalcRayStart, Device >( CalcRayStart( camera.GetPosition(), this->DataBounds )) - .Invoke( Rays.Dir, - Rays.MinDistance, - Rays.MaxDistance); + vtkm::worklet::DispatcherMapField( + CalcRayStart(camera.GetPosition(), this->DataBounds)) + .Invoke(Rays.Dir, Rays.MinDistance, Rays.MaxDistance); bool isSupportedField = (ScalarField->GetAssociation() == vtkm::cont::Field::ASSOC_POINTS || - ScalarField->GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET ); - if(!isSupportedField) throw vtkm::cont::ErrorBadValue("Field not accociated with cell set or points"); + ScalarField->GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET); + if (!isSupportedField) + throw vtkm::cont::ErrorBadValue("Field not accociated with cell set or points"); bool isAssocPoints = ScalarField->GetAssociation() == vtkm::cont::Field::ASSOC_POINTS; - if(IsUniformDataSet) + if (IsUniformDataSet) { vtkm::cont::ArrayHandleUniformPointCoordinates vertices; vertices = Coordinates.Cast(); UniformLocator locator(vertices, Cellset); - if(isAssocPoints) + if (isAssocPoints) { - vtkm::worklet::DispatcherMapField< Sampler>, Device > - ( Sampler>( camera.GetPosition(), - ColorMap, - vtkm::Float32(ScalarRange.Min), - vtkm::Float32(ScalarRange.Max), - SampleDistance, - locator)) - .Invoke( Rays.Dir, - Rays.MinDistance, - camera.FrameBuffer, - *ScalarField); + vtkm::worklet::DispatcherMapField>, Device>( + Sampler>(camera.GetPosition(), ColorMap, + vtkm::Float32(ScalarRange.Min), + vtkm::Float32(ScalarRange.Max), SampleDistance, locator)) + .Invoke(Rays.Dir, Rays.MinDistance, camera.FrameBuffer, *ScalarField); } else { - vtkm::worklet::DispatcherMapField< SamplerCellAssoc>> - ( SamplerCellAssoc>( camera.GetPosition(), - ColorMap, - vtkm::Float32(ScalarRange.Min), - vtkm::Float32(ScalarRange.Max), - SampleDistance, - locator)) - .Invoke( Rays.Dir, - Rays.MinDistance, - camera.FrameBuffer, - *ScalarField); - + vtkm::worklet::DispatcherMapField>>( + SamplerCellAssoc>( + camera.GetPosition(), ColorMap, vtkm::Float32(ScalarRange.Min), + vtkm::Float32(ScalarRange.Max), SampleDistance, locator)) + .Invoke(Rays.Dir, Rays.MinDistance, camera.FrameBuffer, *ScalarField); } - } - else - { - CartesianArrayHandle vertices; - vertices = Coordinates.Cast(); - RectilinearLocator locator(vertices, Cellset); - if(isAssocPoints) - { - vtkm::worklet::DispatcherMapField< Sampler>, Device > - ( Sampler>( camera.GetPosition(), - ColorMap, - vtkm::Float32(ScalarRange.Min), - vtkm::Float32(ScalarRange.Max), - SampleDistance, - locator)) - .Invoke( Rays.Dir, - Rays.MinDistance, - camera.FrameBuffer, - *ScalarField); - } - else - { - vtkm::worklet::DispatcherMapField< SamplerCellAssoc>, Device > - ( SamplerCellAssoc>( camera.GetPosition(), - ColorMap, - vtkm::Float32(ScalarRange.Min), - vtkm::Float32(ScalarRange.Max), - SampleDistance, - locator)) - .Invoke( Rays.Dir, - Rays.MinDistance, - camera.FrameBuffer, - *ScalarField); - } - } - - if(DoCompositeBackground) + } + else { - vtkm::worklet::DispatcherMapField< CompositeBackground >( CompositeBackground( BackgroundColor ) ) - .Invoke( camera.FrameBuffer ); + CartesianArrayHandle vertices; + vertices = Coordinates.Cast(); + RectilinearLocator locator(vertices, Cellset); + if (isAssocPoints) + { + vtkm::worklet::DispatcherMapField>, Device>( + Sampler>( + camera.GetPosition(), ColorMap, vtkm::Float32(ScalarRange.Min), + vtkm::Float32(ScalarRange.Max), SampleDistance, locator)) + .Invoke(Rays.Dir, Rays.MinDistance, camera.FrameBuffer, *ScalarField); + } + else + { + vtkm::worklet::DispatcherMapField>, Device>( + SamplerCellAssoc>( + camera.GetPosition(), ColorMap, vtkm::Float32(ScalarRange.Min), + vtkm::Float32(ScalarRange.Max), SampleDistance, locator)) + .Invoke(Rays.Dir, Rays.MinDistance, camera.FrameBuffer, *ScalarField); + } + } + + if (DoCompositeBackground) + { + vtkm::worklet::DispatcherMapField(CompositeBackground(BackgroundColor)) + .Invoke(camera.FrameBuffer); } camera.WriteToSurface(canvas, Rays.MinDistance); } //Render VTKM_CONT - void SetSampleDistance(const vtkm::Float32 & distance) + void SetSampleDistance(const vtkm::Float32& distance) { - if(distance <= 0.f) - throw vtkm::cont::ErrorBadValue("Sample distance must be positive."); + if (distance <= 0.f) + throw vtkm::cont::ErrorBadValue("Sample distance must be positive."); SampleDistance = distance; } VTKM_CONT - void SetBackgroundColor(const vtkm::Vec &backgroundColor) + void SetBackgroundColor(const vtkm::Vec& backgroundColor) { BackgroundColor = backgroundColor; } @@ -841,7 +812,7 @@ public: { DoCompositeBackground = compositeBackground; } - + protected: bool IsSceneDirty; bool IsUniformDataSet; @@ -850,13 +821,14 @@ protected: Camera camera; vtkm::cont::DynamicArrayHandleCoordinateSystem Coordinates; vtkm::cont::CellSetStructured<3> Cellset; - const vtkm::cont::Field *ScalarField; - vtkm::cont::ArrayHandle > ColorMap; + const vtkm::cont::Field* ScalarField; + vtkm::cont::ArrayHandle> ColorMap; vtkm::Float32 SampleDistance; - vtkm::Vec BackgroundColor; + vtkm::Vec BackgroundColor; vtkm::Range ScalarRange; vtkm::Bounds DataBounds; - }; -}}} //namespace vtkm::rendering::raytracing +} +} +} //namespace vtkm::rendering::raytracing #endif diff --git a/vtkm/rendering/raytracing/Worklets.h b/vtkm/rendering/raytracing/Worklets.h index 0805536fa..3204ca22d 100644 --- a/vtkm/rendering/raytracing/Worklets.h +++ b/vtkm/rendering/raytracing/Worklets.h @@ -20,34 +20,36 @@ #ifndef vtk_m_rendering_raytracing_Worklets_h #define vtk_m_rendering_raytracing_Worklets_h #include -namespace vtkm { -namespace rendering { -namespace raytracing { +namespace vtkm +{ +namespace rendering +{ +namespace raytracing +{ // // Utility memory set functor // -template +template class MemSet : public vtkm::worklet::WorkletMapField { T Value; + public: VTKM_CONT MemSet(T value) : Value(value) - {} + { + } typedef void ControlSignature(FieldOut<>); typedef void ExecutionSignature(_1); VTKM_EXEC - void operator()(T &outValue) const - { - outValue = Value; - } + void operator()(T& outValue) const { outValue = Value; } }; //class MemSet struct MaxValue { - template - VTKM_EXEC_CONT T operator()(const T& a,const T& b) const + template + VTKM_EXEC_CONT T operator()(const T& a, const T& b) const { return (a > b) ? a : b; } @@ -56,13 +58,14 @@ struct MaxValue struct MinValue { - template - VTKM_EXEC_CONT T operator()(const T& a,const T& b) const + template + VTKM_EXEC_CONT T operator()(const T& a, const T& b) const { return (a < b) ? a : b; } }; //struct MinValue - -}}}//namespace vtkm::rendering::raytracing +} +} +} //namespace vtkm::rendering::raytracing #endif //vtk_m_rendering_raytracing_Worklets_h diff --git a/vtkm/rendering/testing/RenderTest.h b/vtkm/rendering/testing/RenderTest.h index 6dcf8b224..be3979a54 100644 --- a/vtkm/rendering/testing/RenderTest.h +++ b/vtkm/rendering/testing/RenderTest.h @@ -32,24 +32,22 @@ #include #include -namespace vtkm { -namespace rendering { -namespace testing { +namespace vtkm +{ +namespace rendering +{ +namespace testing +{ template -inline void -SetCamera(vtkm::rendering::Camera &camera, - const vtkm::Bounds &coordBounds); +inline void SetCamera(vtkm::rendering::Camera& camera, const vtkm::Bounds& coordBounds); template -inline void -SetCamera(vtkm::rendering::Camera &camera, - const vtkm::Bounds &coordBounds, - const vtkm::cont::Field &field); +inline void SetCamera(vtkm::rendering::Camera& camera, const vtkm::Bounds& coordBounds, + const vtkm::cont::Field& field); template <> -inline void -SetCamera(vtkm::rendering::Camera &camera, - const vtkm::Bounds &coordBounds) +inline void SetCamera(vtkm::rendering::Camera& camera, + const vtkm::Bounds& coordBounds) { camera = vtkm::rendering::Camera(); camera.ResetToBounds(coordBounds); @@ -58,9 +56,8 @@ SetCamera(vtkm::rendering::Camera &camera, } template <> -inline void -SetCamera(vtkm::rendering::Camera &camera, - const vtkm::Bounds &coordBounds) +inline void SetCamera(vtkm::rendering::Camera& camera, + const vtkm::Bounds& coordBounds) { camera = vtkm::rendering::Camera(vtkm::rendering::Camera::MODE_2D); camera.ResetToBounds(coordBounds); @@ -69,78 +66,63 @@ SetCamera(vtkm::rendering::Camera &camera, } template <> -inline void -SetCamera(vtkm::rendering::Camera &camera, - const vtkm::Bounds &coordBounds, - const vtkm::cont::Field &field) +inline void SetCamera(vtkm::rendering::Camera& camera, + const vtkm::Bounds& coordBounds, + const vtkm::cont::Field& field) { vtkm::Bounds bounds; bounds.X = coordBounds.X; field.GetRange(&bounds.Y); - + camera = vtkm::rendering::Camera(vtkm::rendering::Camera::MODE_2D); camera.ResetToBounds(bounds); camera.SetClippingRange(1.f, 100.f); camera.SetViewport(-0.7f, +0.7f, -0.7f, +0.7f); -} - -template -void -Render(ViewType &view, - const std::string &outputFile) -{ - view.Initialize(); - view.Paint(); - view.SaveAs(outputFile); } -template -void -Render(const vtkm::cont::DataSet &ds, - const std::string &fieldNm, - const vtkm::rendering::ColorTable &colorTable, - const std::string &outputFile) +template +void Render(ViewType& view, const std::string& outputFile) { - MapperType mapper; - CanvasType canvas(512,512); - vtkm::rendering::Scene scene; - - scene.AddActor(vtkm::rendering::Actor(ds.GetCellSet(), - ds.GetCoordinateSystem(), - ds.GetField(fieldNm), - colorTable)); - vtkm::rendering::Camera camera; - SetCamera(camera, - ds.GetCoordinateSystem().GetBounds()); - ViewType view(scene, mapper, canvas, camera, - vtkm::rendering::Color(0.2f, 0.2f, 0.2f, 1.0f)); - - Render(view, outputFile); + view.Initialize(); + view.Paint(); + view.SaveAs(outputFile); } -template -void -Render(const vtkm::cont::DataSet &ds, - const std::string &fieldNm, - const std::string &outputFile) +template +void Render(const vtkm::cont::DataSet& ds, const std::string& fieldNm, + const vtkm::rendering::ColorTable& colorTable, const std::string& outputFile) { - MapperType mapper; - CanvasType canvas(512,512); - vtkm::rendering::Scene scene; + MapperType mapper; + CanvasType canvas(512, 512); + vtkm::rendering::Scene scene; - //DRP Actor? no field? no colortable (or a constant colortable) ?? - scene.AddActor(vtkm::rendering::Actor(ds.GetCellSet(), - ds.GetCoordinateSystem(), - ds.GetField(fieldNm))); - vtkm::rendering::Camera camera; - SetCamera(camera, - ds.GetCoordinateSystem().GetBounds(), - ds.GetField(fieldNm)); - ViewType view(scene, mapper, canvas, camera, - vtkm::rendering::Color(0.2f, 0.2f, 0.2f, 1.0f)); - Render(view, outputFile); + scene.AddActor(vtkm::rendering::Actor(ds.GetCellSet(), ds.GetCoordinateSystem(), + ds.GetField(fieldNm), colorTable)); + vtkm::rendering::Camera camera; + SetCamera(camera, ds.GetCoordinateSystem().GetBounds()); + ViewType view(scene, mapper, canvas, camera, vtkm::rendering::Color(0.2f, 0.2f, 0.2f, 1.0f)); + + Render(view, outputFile); } -}}} // namespace vtkm::rendering::testing +template +void Render(const vtkm::cont::DataSet& ds, const std::string& fieldNm, + const std::string& outputFile) +{ + MapperType mapper; + CanvasType canvas(512, 512); + vtkm::rendering::Scene scene; + + //DRP Actor? no field? no colortable (or a constant colortable) ?? + scene.AddActor( + vtkm::rendering::Actor(ds.GetCellSet(), ds.GetCoordinateSystem(), ds.GetField(fieldNm))); + vtkm::rendering::Camera camera; + SetCamera(camera, ds.GetCoordinateSystem().GetBounds(), ds.GetField(fieldNm)); + ViewType view(scene, mapper, canvas, camera, vtkm::rendering::Color(0.2f, 0.2f, 0.2f, 1.0f)); + Render(view, outputFile); +} +} +} +} // namespace vtkm::rendering::testing #endif //vtk_m_rendering_testing_RenderTest_h diff --git a/vtkm/rendering/testing/UnitTestMapperRayTracer.cxx b/vtkm/rendering/testing/UnitTestMapperRayTracer.cxx index 072287699..f26ad86ce 100644 --- a/vtkm/rendering/testing/UnitTestMapperRayTracer.cxx +++ b/vtkm/rendering/testing/UnitTestMapperRayTracer.cxx @@ -28,7 +28,8 @@ #include #include -namespace { +namespace +{ void RenderTests() { @@ -39,18 +40,17 @@ void RenderTests() vtkm::cont::testing::MakeTestDataSet maker; vtkm::rendering::ColorTable colorTable("thermal"); - vtkm::rendering::testing::Render(maker.Make3DRegularDataSet0(), - "pointvar", colorTable, "reg3D.pnm"); - vtkm::rendering::testing::Render(maker.Make3DRectilinearDataSet0(), - "pointvar", colorTable, "rect3D.pnm"); - vtkm::rendering::testing::Render(maker.Make3DExplicitDataSet4(), - "pointvar", colorTable, "expl3D.pnm"); + vtkm::rendering::testing::Render(maker.Make3DRegularDataSet0(), "pointvar", colorTable, + "reg3D.pnm"); + vtkm::rendering::testing::Render(maker.Make3DRectilinearDataSet0(), "pointvar", + colorTable, "rect3D.pnm"); + vtkm::rendering::testing::Render(maker.Make3DExplicitDataSet4(), "pointvar", colorTable, + "expl3D.pnm"); } } //namespace -int UnitTestMapperRayTracer(int, char *[]) +int UnitTestMapperRayTracer(int, char* []) { return vtkm::cont::testing::Testing::Run(RenderTests); } - diff --git a/vtkm/rendering/testing/UnitTestMapperVolume.cxx b/vtkm/rendering/testing/UnitTestMapperVolume.cxx index a792a74ae..074e57fef 100644 --- a/vtkm/rendering/testing/UnitTestMapperVolume.cxx +++ b/vtkm/rendering/testing/UnitTestMapperVolume.cxx @@ -29,8 +29,9 @@ #include #include -namespace { - +namespace +{ + void RenderTests() { typedef vtkm::rendering::MapperVolume M; @@ -39,18 +40,16 @@ void RenderTests() vtkm::cont::testing::MakeTestDataSet maker; vtkm::rendering::ColorTable colorTable("thermal"); - - vtkm::rendering::testing::Render(maker.Make3DRegularDataSet0(), - "pointvar", colorTable, "reg3D.pnm"); - vtkm::rendering::testing::Render(maker.Make3DRectilinearDataSet0(), - "pointvar", colorTable, "rect3D.pnm"); + + vtkm::rendering::testing::Render(maker.Make3DRegularDataSet0(), "pointvar", colorTable, + "reg3D.pnm"); + vtkm::rendering::testing::Render(maker.Make3DRectilinearDataSet0(), "pointvar", + colorTable, "rect3D.pnm"); } } //namespace -int UnitTestMapperVolume(int, char *[]) +int UnitTestMapperVolume(int, char* []) { return vtkm::cont::testing::Testing::Run(RenderTests); } - - diff --git a/vtkm/rendering/testing/egl/UnitTestMapperEGL.cxx b/vtkm/rendering/testing/egl/UnitTestMapperEGL.cxx index ae4b6209b..33c812579 100644 --- a/vtkm/rendering/testing/egl/UnitTestMapperEGL.cxx +++ b/vtkm/rendering/testing/egl/UnitTestMapperEGL.cxx @@ -30,35 +30,36 @@ #include #include -namespace { +namespace +{ void RenderTests() { - typedef vtkm::rendering::MapperGL M; - typedef vtkm::rendering::CanvasEGL C; - typedef vtkm::rendering::View3D V3; - typedef vtkm::rendering::View2D V2; - typedef vtkm::rendering::View1D V1; + typedef vtkm::rendering::MapperGL M; + typedef vtkm::rendering::CanvasEGL C; + typedef vtkm::rendering::View3D V3; + typedef vtkm::rendering::View2D V2; + typedef vtkm::rendering::View1D V1; - vtkm::cont::testing::MakeTestDataSet maker; - vtkm::rendering::ColorTable colorTable("thermal"); - - vtkm::rendering::testing::Render(maker.Make3DRegularDataSet0(), - "pointvar", colorTable, "reg3D.pnm"); - vtkm::rendering::testing::Render(maker.Make3DRectilinearDataSet0(), - "pointvar", colorTable, "rect3D.pnm"); - vtkm::rendering::testing::Render(maker.Make3DExplicitDataSet4(), - "pointvar", colorTable, "expl3D.pnm"); - vtkm::rendering::testing::Render(maker.Make2DRectilinearDataSet0(), - "pointvar", colorTable, "rect2D.pnm"); - vtkm::rendering::testing::Render(maker.Make1DUniformDataSet0(), - "pointvar", "uniform1D.pnm"); - vtkm::rendering::testing::Render(maker.Make1DExplicitDataSet0(), - "pointvar", "expl1D.pnm"); + vtkm::cont::testing::MakeTestDataSet maker; + vtkm::rendering::ColorTable colorTable("thermal"); + + vtkm::rendering::testing::Render(maker.Make3DRegularDataSet0(), "pointvar", colorTable, + "reg3D.pnm"); + vtkm::rendering::testing::Render(maker.Make3DRectilinearDataSet0(), "pointvar", + colorTable, "rect3D.pnm"); + vtkm::rendering::testing::Render(maker.Make3DExplicitDataSet4(), "pointvar", colorTable, + "expl3D.pnm"); + vtkm::rendering::testing::Render(maker.Make2DRectilinearDataSet0(), "pointvar", + colorTable, "rect2D.pnm"); + vtkm::rendering::testing::Render(maker.Make1DUniformDataSet0(), "pointvar", + "uniform1D.pnm"); + vtkm::rendering::testing::Render(maker.Make1DExplicitDataSet0(), "pointvar", + "expl1D.pnm"); } } //namespace -int UnitTestMapperEGL(int, char *[]) +int UnitTestMapperEGL(int, char* []) { return vtkm::cont::testing::Testing::Run(RenderTests); } diff --git a/vtkm/rendering/testing/glfw/UnitTestMapperGLFW.cxx b/vtkm/rendering/testing/glfw/UnitTestMapperGLFW.cxx index 3478efcd1..9dcbaa39a 100644 --- a/vtkm/rendering/testing/glfw/UnitTestMapperGLFW.cxx +++ b/vtkm/rendering/testing/glfw/UnitTestMapperGLFW.cxx @@ -38,103 +38,104 @@ #include #include -namespace { +namespace +{ static const vtkm::Id WIDTH = 512, HEIGHT = 512; static vtkm::Id which = 0, NUM_DATASETS = 4; static bool done = false; static bool batch = false; -static void -keyCallback(GLFWwindow* vtkmNotUsed(window), int key, - int vtkmNotUsed(scancode), int action, int vtkmNotUsed(mods)) +static void keyCallback(GLFWwindow* vtkmNotUsed(window), int key, int vtkmNotUsed(scancode), + int action, int vtkmNotUsed(mods)) { if (key == GLFW_KEY_ESCAPE) - done = true; + done = true; if (action == 1) - which = (which+1) % NUM_DATASETS; + which = (which + 1) % NUM_DATASETS; } void RenderTests() { - std::cout<<"Press any key to cycle through datasets. ESC to quit."<(camera[i], - ds[i].GetCoordinateSystem().GetBounds()); + for (int i = 0; i < NUM_DATASETS; i++) + { + scene[i].AddActor(vtkm::rendering::Actor(ds[i].GetCellSet(), ds[i].GetCoordinateSystem(), + ds[i].GetField(fldNames[i].c_str()), colorTable)); + vtkm::rendering::testing::SetCamera(camera[i], + ds[i].GetCoordinateSystem().GetBounds()); + } - } + View3DType view3d0(scene[0], mapper[0], canvas[0], camera[0], + vtkm::rendering::Color(0.2f, 0.2f, 0.2f, 1.0f)); + View3DType view3d1(scene[1], mapper[1], canvas[1], camera[1], + vtkm::rendering::Color(0.2f, 0.2f, 0.2f, 1.0f)); + View3DType view3d2(scene[2], mapper[2], canvas[2], camera[2], + vtkm::rendering::Color(0.2f, 0.2f, 0.2f, 1.0f)); - View3DType view3d0(scene[0], mapper[0], canvas[0], camera[0], - vtkm::rendering::Color(0.2f, 0.2f, 0.2f, 1.0f)); - View3DType view3d1(scene[1], mapper[1], canvas[1], camera[1], - vtkm::rendering::Color(0.2f, 0.2f, 0.2f, 1.0f)); - View3DType view3d2(scene[2], mapper[2], canvas[2], camera[2], - vtkm::rendering::Color(0.2f, 0.2f, 0.2f, 1.0f)); + View2DType view2d(scene[3], mapper[3], canvas[3], camera[3], + vtkm::rendering::Color(0.2f, 0.2f, 0.2f, 1.0f)); - View2DType view2d(scene[3], mapper[3], canvas[3], camera[3], - vtkm::rendering::Color(0.2f, 0.2f, 0.2f, 1.0f)); + while (!glfwWindowShouldClose(window) && !done) + { + glfwPollEvents(); - while (!glfwWindowShouldClose(window) && !done) + if (which == 0) + vtkm::rendering::testing::Render(view3d0, "reg3D.pnm"); + else if (which == 1) + vtkm::rendering::testing::Render(view3d1, "rect3D.pnm"); + else if (which == 2) + vtkm::rendering::testing::Render(view3d2, "expl3D.pnm"); + else if (which == 3) + vtkm::rendering::testing::Render(view2d, "rect2D.pnm"); + glfwSwapBuffers(window); + + if (batch) { - glfwPollEvents(); - - if (which == 0) - vtkm::rendering::testing::Render(view3d0,"reg3D.pnm"); - else if (which == 1) - vtkm::rendering::testing::Render(view3d1,"rect3D.pnm"); - else if (which == 2) - vtkm::rendering::testing::Render(view3d2,"expl3D.pnm"); - else if (which == 3) - vtkm::rendering::testing::Render(view2d,"rect2D.pnm"); - glfwSwapBuffers(window); - - if (batch) - { - which++; - if (which >= NUM_DATASETS) { break; } - } + which++; + if (which >= NUM_DATASETS) + { + break; + } } + } - glfwDestroyWindow(window); + glfwDestroyWindow(window); } } //namespace -int UnitTestMapperGLFW(int argc, char *argv[]) +int UnitTestMapperGLFW(int argc, char* argv[]) { if (argc > 1) { diff --git a/vtkm/rendering/testing/glut/UnitTestMapperGLUT.cxx b/vtkm/rendering/testing/glut/UnitTestMapperGLUT.cxx index 04707c7f1..eecf9f9de 100644 --- a/vtkm/rendering/testing/glut/UnitTestMapperGLUT.cxx +++ b/vtkm/rendering/testing/glut/UnitTestMapperGLUT.cxx @@ -20,10 +20,10 @@ #include #include -#if defined (__APPLE__) -# include +#if defined(__APPLE__) +#include #else -# include +#include #endif #include #include @@ -35,26 +35,25 @@ #include #include -namespace { +namespace +{ static const vtkm::Id WIDTH = 512, HEIGHT = 512; static vtkm::Id windowID, which = 0, NUM_DATASETS = 4; static bool done = false; static bool batch = false; -static void -keyboardCall(unsigned char key, int vtkmNotUsed(x), int vtkmNotUsed(y)) +static void keyboardCall(unsigned char key, int vtkmNotUsed(x), int vtkmNotUsed(y)) { if (key == 27) glutDestroyWindow(windowID); else { - which = (which+1) % NUM_DATASETS; + which = (which + 1) % NUM_DATASETS; glutPostRedisplay(); } } -static void -displayCall() +static void displayCall() { vtkm::cont::testing::MakeTestDataSet maker; vtkm::rendering::ColorTable colorTable("thermal"); @@ -65,39 +64,39 @@ displayCall() typedef vtkm::rendering::View2D V2; if (which == 0) - vtkm::rendering::testing::Render(maker.Make3DRegularDataSet0(), - "pointvar", colorTable, "reg3D.pnm"); + vtkm::rendering::testing::Render(maker.Make3DRegularDataSet0(), "pointvar", + colorTable, "reg3D.pnm"); else if (which == 1) - vtkm::rendering::testing::Render(maker.Make3DRectilinearDataSet0(), - "pointvar", colorTable, "rect3D.pnm"); + vtkm::rendering::testing::Render(maker.Make3DRectilinearDataSet0(), "pointvar", + colorTable, "rect3D.pnm"); else if (which == 2) - vtkm::rendering::testing::Render(maker.Make3DExplicitDataSet4(), - "pointvar", colorTable, "expl3D.pnm"); + vtkm::rendering::testing::Render(maker.Make3DExplicitDataSet4(), "pointvar", + colorTable, "expl3D.pnm"); else if (which == 3) - vtkm::rendering::testing::Render(maker.Make2DRectilinearDataSet0(), - "pointvar", colorTable, "rect2D.pnm"); + vtkm::rendering::testing::Render(maker.Make2DRectilinearDataSet0(), "pointvar", + colorTable, "rect2D.pnm"); glutSwapBuffers(); } void batchIdle() { - which++; - if (which >= NUM_DATASETS) - glutDestroyWindow(windowID); - else - glutPostRedisplay(); + which++; + if (which >= NUM_DATASETS) + glutDestroyWindow(windowID); + else + glutPostRedisplay(); } void RenderTests() { if (!batch) - std::cout<<"Press any key to cycle through datasets. ESC to quit."< 1) { diff --git a/vtkm/rendering/testing/osmesa/UnitTestMapperOSMesa.cxx b/vtkm/rendering/testing/osmesa/UnitTestMapperOSMesa.cxx index 378020897..af01684b0 100644 --- a/vtkm/rendering/testing/osmesa/UnitTestMapperOSMesa.cxx +++ b/vtkm/rendering/testing/osmesa/UnitTestMapperOSMesa.cxx @@ -29,36 +29,37 @@ #include #include -namespace { - +namespace +{ + void RenderTests() { - typedef vtkm::rendering::MapperGL M; - typedef vtkm::rendering::CanvasOSMesa C; - typedef vtkm::rendering::View3D V3; - typedef vtkm::rendering::View2D V2; - typedef vtkm::rendering::View1D V1; + typedef vtkm::rendering::MapperGL M; + typedef vtkm::rendering::CanvasOSMesa C; + typedef vtkm::rendering::View3D V3; + typedef vtkm::rendering::View2D V2; + typedef vtkm::rendering::View1D V1; - vtkm::cont::testing::MakeTestDataSet maker; - vtkm::rendering::ColorTable colorTable("thermal"); + vtkm::cont::testing::MakeTestDataSet maker; + vtkm::rendering::ColorTable colorTable("thermal"); - vtkm::rendering::testing::Render(maker.Make3DRegularDataSet0(), - "pointvar", colorTable, "reg3D.pnm"); - vtkm::rendering::testing::Render(maker.Make3DRectilinearDataSet0(), - "pointvar", colorTable, "rect3D.pnm"); - vtkm::rendering::testing::Render(maker.Make3DExplicitDataSet4(), - "pointvar", colorTable, "expl3D.pnm"); - vtkm::rendering::testing::Render(maker.Make2DRectilinearDataSet0(), - "pointvar", colorTable, "rect2D.pnm"); - vtkm::rendering::testing::Render(maker.Make1DUniformDataSet0(), - "pointvar", "uniform1D.pnm"); - vtkm::rendering::testing::Render(maker.Make1DExplicitDataSet0(), - "pointvar", "expl1D.pnm"); + vtkm::rendering::testing::Render(maker.Make3DRegularDataSet0(), "pointvar", colorTable, + "reg3D.pnm"); + vtkm::rendering::testing::Render(maker.Make3DRectilinearDataSet0(), "pointvar", + colorTable, "rect3D.pnm"); + vtkm::rendering::testing::Render(maker.Make3DExplicitDataSet4(), "pointvar", colorTable, + "expl3D.pnm"); + vtkm::rendering::testing::Render(maker.Make2DRectilinearDataSet0(), "pointvar", + colorTable, "rect2D.pnm"); + vtkm::rendering::testing::Render(maker.Make1DUniformDataSet0(), "pointvar", + "uniform1D.pnm"); + vtkm::rendering::testing::Render(maker.Make1DExplicitDataSet0(), "pointvar", + "expl1D.pnm"); } } //namespace -int UnitTestMapperOSMesa(int, char *[]) +int UnitTestMapperOSMesa(int, char* []) { - return vtkm::cont::testing::Testing::Run(RenderTests); + return vtkm::cont::testing::Testing::Run(RenderTests); } diff --git a/vtkm/testing/OptionParser.h b/vtkm/testing/OptionParser.h index 31d69fb5e..d570e534c 100644 --- a/vtkm/testing/OptionParser.h +++ b/vtkm/testing/OptionParser.h @@ -221,11 +221,14 @@ #ifndef vtk_m_testing_OPTIONPARSER_H_ #define vtk_m_testing_OPTIONPARSER_H_ -namespace vtkm { -namespace testing { +namespace vtkm +{ +namespace testing +{ /** @brief The namespace of The Lean Mean C++ Option Parser. */ -namespace option { +namespace option +{ #ifdef _MSC_VER #include @@ -236,7 +239,7 @@ struct MSC_Builtin_CLZ { unsigned long index; _BitScanReverse(&index, x); - return 32-index; // int is always 32bit on Windows, even for target x64 + return 32 - index; // int is always 32bit on Windows, even for target x64 } }; #define __builtin_clz(x) MSC_Builtin_CLZ::builtin_clz(x) @@ -445,6 +448,7 @@ class Option { Option* next_; Option* prev_; + public: /** * @brief Pointer to this Option's Descriptor. @@ -532,19 +536,13 @@ public: * } * @endcode */ - int type() const - { - return desc == 0 ? 0 : desc->type; - } + int type() const { return desc == 0 ? 0 : desc->type; } /** * @brief Returns Descriptor::index of this Option's Descriptor, or -1 if this Option * is invalid (unused). */ - int index() const - { - return desc == 0 ? -1 : static_cast(desc->index); - } + int index() const { return desc == 0 ? -1 : static_cast(desc->index); } /** * @brief Returns the number of times this Option (or others with the same Descriptor::index) @@ -578,10 +576,7 @@ public: * * Returns true for an unused/invalid option. */ - bool isFirst() const - { - return isTagged(prev_); - } + bool isFirst() const { return isTagged(prev_); } /** * @brief Returns true iff this is the last element of the linked list. @@ -591,10 +586,7 @@ public: * * Returns true for an unused/invalid option. */ - bool isLast() const - { - return isTagged(next_); - } + bool isLast() const { return isTagged(next_); } /** * @brief Returns a pointer to the first element of the linked list. @@ -611,7 +603,9 @@ public: { Option* p = this; while (!p->isFirst()) - { p = p->prev_; } + { + p = p->prev_; + } return p; } @@ -631,10 +625,7 @@ public: * Descriptor::type and all you have to do is check last()->type() to get * the state listed last on the command line. */ - Option* last() - { - return first()->prevwrap(); - } + Option* last() { return first()->prevwrap(); } /** * @brief Returns a pointer to the previous element of the linked list or nullptr if @@ -644,10 +635,7 @@ public: * option with the same Descriptor::index that precedes this option on the command * line. */ - Option* prev() - { - return isFirst() ? 0 : prev_; - } + Option* prev() { return isFirst() ? 0 : prev_; } /** * @brief Returns a pointer to the previous element of the linked list with wrap-around from @@ -657,10 +645,7 @@ public: * option with the same Descriptor::index that precedes this option on the command * line. */ - Option* prevwrap() - { - return untag(prev_); - } + Option* prevwrap() { return untag(prev_); } /** * @brief Returns a pointer to the next element of the linked list or nullptr if called @@ -670,10 +655,7 @@ public: * option with the same Descriptor::index that follows this option on the command * line. */ - Option* next() - { - return isLast() ? 0 : next_; - } + Option* next() { return isLast() ? 0 : next_; } /** * @brief Returns a pointer to the next element of the linked list with wrap-around from @@ -683,10 +665,7 @@ public: * option with the same Descriptor::index that follows this option on the command * line. */ - Option* nextwrap() - { - return untag(next_); - } + Option* nextwrap() { return untag(next_); } /** * @brief Makes @c new_last the new last() by chaining it into the list after last(). @@ -724,10 +703,7 @@ public: * @code for (Option* opt = options[FILE]; opt; opt = opt->next()) * fname = opt->arg; ... @endcode */ - operator const Option*() const - { - return desc ? this : 0; - } + operator const Option*() const { return desc ? this : 0; } /** * @brief Casts from Option to Option* but only if this Option is valid. @@ -745,17 +721,17 @@ public: * @code for (Option* opt = options[FILE]; opt; opt = opt->next()) * fname = opt->arg; ... @endcode */ - operator Option*() - { - return desc ? this : 0; - } + operator Option*() { return desc ? this : 0; } /** * @brief Creates a new Option that is a one-element linked list and has nullptr * @ref desc, @ref name, @ref arg and @ref namelen. */ - Option() : - desc(0), name(0), arg(0), namelen(0) + Option() + : desc(0) + , name(0) + , arg(0) + , namelen(0) { prev_ = tag(this); next_ = tag(this); @@ -769,30 +745,21 @@ public: * short option and @ref namelen will be set to 1. Otherwise the length will extend to * the first '=' character or the string's 0-terminator. */ - Option(const Descriptor* desc_, const char* name_, const char* arg_) - { - init(desc_, name_, arg_); - } + Option(const Descriptor* desc_, const char* name_, const char* arg_) { init(desc_, name_, arg_); } /** * @brief Makes @c *this a copy of @c orig except for the linked list pointers. * * After this operation @c *this will be a one-element linked list. */ - void operator=(const Option& orig) - { - init(orig.desc, orig.name, orig.arg); - } + void operator=(const Option& orig) { init(orig.desc, orig.name, orig.arg); } /** * @brief Makes @c *this a copy of @c orig except for the linked list pointers. * * After this operation @c *this will be a one-element linked list. */ - Option(const Option& orig) - { - init(orig.desc, orig.name, orig.arg); - } + Option(const Option& orig) { init(orig.desc, orig.name, orig.arg); } private: /** @@ -812,28 +779,25 @@ private: next_ = tag(this); namelen = 0; if (name == 0) - { return; } + { + return; + } namelen = 1; if (name[0] != '-') - { return; } + { + return; + } while (name[namelen] != 0 && name[namelen] != '=') - { ++namelen; } + { + ++namelen; + } } - static Option* tag(Option* ptr) - { - return (Option*) ((unsigned long long) ptr | 1); - } + static Option* tag(Option* ptr) { return (Option*)((unsigned long long)ptr | 1); } - static Option* untag(Option* ptr) - { - return (Option*) ((unsigned long long) ptr & ~1ull); - } + static Option* untag(Option* ptr) { return (Option*)((unsigned long long)ptr & ~1ull); } - static bool isTagged(Option* ptr) - { - return ((unsigned long long) ptr & 1); - } + static bool isTagged(Option* ptr) { return ((unsigned long long)ptr & 1); } }; /** @@ -893,18 +857,19 @@ private: struct Arg { //! @brief For options that don't take an argument: Returns ARG_NONE. - static ArgStatus None(const Option&, bool) - { - return ARG_NONE; - } + static ArgStatus None(const Option&, bool) { return ARG_NONE; } //! @brief Returns ARG_OK if the argument is attached and ARG_IGNORE otherwise. static ArgStatus Optional(const Option& option, bool) { if (option.arg && option.name[option.namelen] != 0) - { return ARG_OK; } + { + return ARG_OK; + } else - { return ARG_IGNORE; } + { + return ARG_IGNORE; + } } }; @@ -946,8 +911,9 @@ struct Stats /** * @brief Creates a Stats object with counts set to 1 (for the sentinel element). */ - Stats() : - buffer_max(1), options_max(1) // 1 more than necessary as sentinel + Stats() + : buffer_max(1) + , options_max(1) // 1 more than necessary as sentinel { } @@ -961,34 +927,38 @@ struct Stats * See Parser::parse() for the meaning of the arguments. */ Stats(bool gnu, const Descriptor usage[], int argc, const char** argv, int min_abbr_len = 0, // - bool single_minus_longopt = false) : - buffer_max(1), options_max(1) // 1 more than necessary as sentinel + bool single_minus_longopt = false) + : buffer_max(1) + , options_max(1) // 1 more than necessary as sentinel { add(gnu, usage, argc, argv, min_abbr_len, single_minus_longopt); } //! @brief Stats(...) with non-const argv. Stats(bool gnu, const Descriptor usage[], int argc, char** argv, int min_abbr_len = 0, // - bool single_minus_longopt = false) : - buffer_max(1), options_max(1) // 1 more than necessary as sentinel + bool single_minus_longopt = false) + : buffer_max(1) + , options_max(1) // 1 more than necessary as sentinel { - add(gnu, usage, argc, (const char**) argv, min_abbr_len, single_minus_longopt); + add(gnu, usage, argc, (const char**)argv, min_abbr_len, single_minus_longopt); } //! @brief POSIX Stats(...) (gnu==false). Stats(const Descriptor usage[], int argc, const char** argv, int min_abbr_len = 0, // - bool single_minus_longopt = false) : - buffer_max(1), options_max(1) // 1 more than necessary as sentinel + bool single_minus_longopt = false) + : buffer_max(1) + , options_max(1) // 1 more than necessary as sentinel { add(false, usage, argc, argv, min_abbr_len, single_minus_longopt); } //! @brief POSIX Stats(...) (gnu==false) with non-const argv. Stats(const Descriptor usage[], int argc, char** argv, int min_abbr_len = 0, // - bool single_minus_longopt = false) : - buffer_max(1), options_max(1) // 1 more than necessary as sentinel + bool single_minus_longopt = false) + : buffer_max(1) + , options_max(1) // 1 more than necessary as sentinel { - add(false, usage, argc, (const char**) argv, min_abbr_len, single_minus_longopt); + add(false, usage, argc, (const char**)argv, min_abbr_len, single_minus_longopt); } /** @@ -1007,7 +977,7 @@ struct Stats void add(bool gnu, const Descriptor usage[], int argc, char** argv, int min_abbr_len = 0, // bool single_minus_longopt = false) { - add(gnu, usage, argc, (const char**) argv, min_abbr_len, single_minus_longopt); + add(gnu, usage, argc, (const char**)argv, min_abbr_len, single_minus_longopt); } //! @brief POSIX add() (gnu==false). @@ -1021,8 +991,9 @@ struct Stats void add(const Descriptor usage[], int argc, char** argv, int min_abbr_len = 0, // bool single_minus_longopt = false) { - add(false, usage, argc, (const char**) argv, min_abbr_len, single_minus_longopt); + add(false, usage, argc, (const char**)argv, min_abbr_len, single_minus_longopt); } + private: class CountOptionsAction; }; @@ -1049,17 +1020,19 @@ private: */ class Parser { - int op_count; //!< @internal @brief see optionsCount() - int nonop_count; //!< @internal @brief see nonOptionsCount() + int op_count; //!< @internal @brief see optionsCount() + int nonop_count; //!< @internal @brief see nonOptionsCount() const char** nonop_args; //!< @internal @brief see nonOptions() - bool err; //!< @internal @brief see error() + bool err; //!< @internal @brief see error() public: - /** * @brief Creates a new Parser. */ - Parser() : - op_count(0), nonop_count(0), nonop_args(0), err(false) + Parser() + : op_count(0) + , nonop_count(0) + , nonop_args(0) + , err(false) { } @@ -1067,35 +1040,49 @@ public: * @brief Creates a new Parser and immediately parses the given argument vector. * @copydetails parse() */ - Parser(bool gnu, const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], - int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) : - op_count(0), nonop_count(0), nonop_args(0), err(false) + Parser(bool gnu, const Descriptor usage[], int argc, const char** argv, Option options[], + Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) + : op_count(0) + , nonop_count(0) + , nonop_args(0) + , err(false) { parse(gnu, usage, argc, argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); } //! @brief Parser(...) with non-const argv. - Parser(bool gnu, const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], - int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) : - op_count(0), nonop_count(0), nonop_args(0), err(false) + Parser(bool gnu, const Descriptor usage[], int argc, char** argv, Option options[], + Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) + : op_count(0) + , nonop_count(0) + , nonop_args(0) + , err(false) { - parse(gnu, usage, argc, (const char**) argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); + parse(gnu, usage, argc, (const char**)argv, options, buffer, min_abbr_len, single_minus_longopt, + bufmax); } //! @brief POSIX Parser(...) (gnu==false). - Parser(const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], int min_abbr_len = 0, - bool single_minus_longopt = false, int bufmax = -1) : - op_count(0), nonop_count(0), nonop_args(0), err(false) + Parser(const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], + int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) + : op_count(0) + , nonop_count(0) + , nonop_args(0) + , err(false) { parse(false, usage, argc, argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); } //! @brief POSIX Parser(...) (gnu==false) with non-const argv. - Parser(const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], int min_abbr_len = 0, - bool single_minus_longopt = false, int bufmax = -1) : - op_count(0), nonop_count(0), nonop_args(0), err(false) + Parser(const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], + int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) + : op_count(0) + , nonop_count(0) + , nonop_args(0) + , err(false) { - parse(false, usage, argc, (const char**) argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); + parse(false, usage, argc, (const char**)argv, options, buffer, min_abbr_len, + single_minus_longopt, bufmax); } /** @@ -1154,28 +1141,33 @@ public: * @c options[]. You can get the linked list in options from a buffer object via something like * @c options[buffer[i].index()]. */ - void parse(bool gnu, const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], - int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1); + void parse(bool gnu, const Descriptor usage[], int argc, const char** argv, Option options[], + Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, + int bufmax = -1); //! @brief parse() with non-const argv. - void parse(bool gnu, const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], - int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) + void parse(bool gnu, const Descriptor usage[], int argc, char** argv, Option options[], + Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, + int bufmax = -1) { - parse(gnu, usage, argc, (const char**) argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); + parse(gnu, usage, argc, (const char**)argv, options, buffer, min_abbr_len, single_minus_longopt, + bufmax); } //! @brief POSIX parse() (gnu==false). - void parse(const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], - int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) + void parse(const Descriptor usage[], int argc, const char** argv, Option options[], + Option buffer[], int min_abbr_len = 0, bool single_minus_longopt = false, + int bufmax = -1) { parse(false, usage, argc, argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); } //! @brief POSIX parse() (gnu==false) with non-const argv. - void parse(const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], int min_abbr_len = 0, - bool single_minus_longopt = false, int bufmax = -1) + void parse(const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], + int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) { - parse(false, usage, argc, (const char**) argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); + parse(false, usage, argc, (const char**)argv, options, buffer, min_abbr_len, + single_minus_longopt, bufmax); } /** @@ -1187,10 +1179,7 @@ public: * @li The count (and the buffer[]) includes unknown options if they are collected * (see Descriptor::longopt). */ - int optionsCount() - { - return op_count; - } + int optionsCount() { return op_count; } /** * @brief Returns the number of non-option arguments that remained at the end of the @@ -1206,10 +1195,7 @@ public: * user does not supply any non-option arguments the defaults will still be in * effect. */ - int nonOptionsCount() - { - return nonop_count; - } + int nonOptionsCount() { return nonop_count; } /** * @brief Returns a pointer to an array of non-option arguments (only valid @@ -1222,18 +1208,12 @@ public: * that actually encounter non-option arguments. A parse() call that encounters only * options, will not change nonOptions(). */ - const char** nonOptions() - { - return nonop_args; - } + const char** nonOptions() { return nonop_args; } /** * @brief Returns nonOptions()[i] (@e without checking if i is in range!). */ - const char* nonOption(int i) - { - return nonOptions()[i]; - } + const char* nonOption(int i) { return nonOptions()[i]; } /** * @brief Returns @c true if an unrecoverable error occurred while parsing options. @@ -1250,10 +1230,7 @@ public: * @endcode * */ - bool error() - { - return err; - } + bool error() { return err; } private: friend struct Stats; @@ -1265,8 +1242,9 @@ private: * @brief This is the core function that does all the parsing. * @retval false iff an unrecoverable error occurred. */ - static bool workhorse(bool gnu, const Descriptor usage[], int numargs, const char** args, Action& action, - bool single_minus_longopt, bool print_errors, int min_abbr_len); + static bool workhorse(bool gnu, const Descriptor usage[], int numargs, const char** args, + Action& action, bool single_minus_longopt, bool print_errors, + int min_abbr_len); /** * @internal @@ -1286,7 +1264,9 @@ private: { while (*st1 != 0) if (*st1++ != *st2++) - { return false; } + { + return false; + } return (*st2 == 0 || *st2 == '='); } @@ -1335,7 +1315,9 @@ private: static bool instr(char ch, const char* st) { while (*st != 0 && *st != ch) - { ++st; } + { + ++st; + } return *st == ch; } @@ -1374,10 +1356,7 @@ struct Parser::Action * * Returns @c false iff a fatal error has occured and the parse should be aborted. */ - virtual bool perform(Option&) - { - return true; - } + virtual bool perform(Option&) { return true; } /** * @brief Called by Parser::workhorse() after finishing the parse. @@ -1389,8 +1368,8 @@ struct Parser::Action */ virtual bool finished(int numargs, const char** args) { - (void) numargs; - (void) args; + (void)numargs; + (void)args; return true; } }; @@ -1400,23 +1379,26 @@ struct Parser::Action * @brief An Action to pass to Parser::workhorse() that will increment a counter for * each parsed Option. */ -class Stats::CountOptionsAction: public Parser::Action +class Stats::CountOptionsAction : public Parser::Action { unsigned* buffer_max; + public: /** * Creates a new CountOptionsAction that will increase @c *buffer_max_ for each * parsed Option. */ - CountOptionsAction(unsigned* buffer_max_) : - buffer_max(buffer_max_) + CountOptionsAction(unsigned* buffer_max_) + : buffer_max(buffer_max_) { } bool perform(Option&) { if (*buffer_max == 0x7fffffff) - { return false; } // overflow protection: don't accept number of options that doesn't fit signed int + { + return false; + } // overflow protection: don't accept number of options that doesn't fit signed int ++*buffer_max; return true; } @@ -1427,7 +1409,7 @@ public: * @brief An Action to pass to Parser::workhorse() that will store each parsed Option in * appropriate arrays (see Parser::parse()). */ -class Parser::StoreOptionAction: public Parser::Action +class Parser::StoreOptionAction : public Parser::Action { Parser& parser; Option* options; @@ -1441,13 +1423,18 @@ public: * @param buffer_ each Option is appended to this array as long as there's a free slot. * @param bufmax_ number of slots in @c buffer_. @c -1 means "large enough". */ - StoreOptionAction(Parser& parser_, Option options_[], Option buffer_[], int bufmax_) : - parser(parser_), options(options_), buffer(buffer_), bufmax(bufmax_) + StoreOptionAction(Parser& parser_, Option options_[], Option buffer_[], int bufmax_) + : parser(parser_) + , options(options_) + , buffer(buffer_) + , bufmax(bufmax_) { // find first empty slot in buffer (if any) int bufidx = 0; while ((bufmax < 0 || bufidx < bufmax) && buffer[bufidx]) - { ++bufidx; } + { + ++bufidx; + } // set parser's optionCount parser.op_count = bufidx; @@ -1458,14 +1445,20 @@ public: if (bufmax < 0 || parser.op_count < bufmax) { if (parser.op_count == 0x7fffffff) - { return false; } // overflow protection: don't accept number of options that doesn't fit signed int + { + return false; + } // overflow protection: don't accept number of options that doesn't fit signed int buffer[parser.op_count] = option; unsigned int idx = buffer[parser.op_count].desc->index; if (options[idx]) - { options[idx].append(buffer[parser.op_count]); } + { + options[idx].append(buffer[parser.op_count]); + } else - { options[idx] = buffer[parser.op_count]; } + { + options[idx] = buffer[parser.op_count]; + } ++parser.op_count; } return true; // NOTE: an option that is discarded because of a full buffer is not fatal @@ -1488,22 +1481,25 @@ public: VTKM_SILENCE_WEAK_VTABLE_WARNING_END -inline void Parser::parse(bool gnu, const Descriptor usage[], int argc, const char** argv, Option options[], - Option buffer[], int min_abbr_len, bool single_minus_longopt, int bufmax) +inline void Parser::parse(bool gnu, const Descriptor usage[], int argc, const char** argv, + Option options[], Option buffer[], int min_abbr_len, + bool single_minus_longopt, int bufmax) { StoreOptionAction action(*this, options, buffer, bufmax); err = !workhorse(gnu, usage, argc, argv, action, single_minus_longopt, true, min_abbr_len); } -inline void Stats::add(bool gnu, const Descriptor usage[], int argc, const char** argv, int min_abbr_len, - bool single_minus_longopt) +inline void Stats::add(bool gnu, const Descriptor usage[], int argc, const char** argv, + int min_abbr_len, bool single_minus_longopt) { // determine size of options array. This is the greatest index used in the usage + 1 int i = 0; while (usage[i].shortopt != 0) { if (usage[i].index + 1 >= options_max) - { options_max = (usage[i].index + 1) + 1; } // 1 more than necessary as sentinel + { + options_max = (usage[i].index + 1) + 1; + } // 1 more than necessary as sentinel ++i; } @@ -1512,12 +1508,15 @@ inline void Stats::add(bool gnu, const Descriptor usage[], int argc, const char* Parser::workhorse(gnu, usage, argc, argv, action, single_minus_longopt, false, min_abbr_len); } -inline bool Parser::workhorse(bool gnu, const Descriptor usage[], int numargs, const char** args, Action& action, - bool single_minus_longopt, bool print_errors, int min_abbr_len) +inline bool Parser::workhorse(bool gnu, const Descriptor usage[], int numargs, const char** args, + Action& action, bool single_minus_longopt, bool print_errors, + int min_abbr_len) { // protect against nullptr pointer if (args == 0) - { numargs = 0; } + { + numargs = 0; + } int nonops = 0; @@ -1534,11 +1533,15 @@ inline bool Parser::workhorse(bool gnu, const Descriptor usage[], int numargs, c ++nonops; ++args; if (numargs > 0) - { --numargs; } + { + --numargs; + } continue; } else - { break; } + { + break; + } } // -- terminates the option list. The -- itself is skipped. @@ -1547,7 +1550,9 @@ inline bool Parser::workhorse(bool gnu, const Descriptor usage[], int numargs, c shift(args, nonops); ++args; if (numargs > 0) - { --numargs; } + { + --numargs; + } break; } @@ -1578,56 +1583,85 @@ inline bool Parser::workhorse(bool gnu, const Descriptor usage[], int numargs, c { idx = 0; while (usage[idx].longopt != 0 && !streq(usage[idx].longopt, longopt_name)) - { ++idx; } + { + ++idx; + } - if (usage[idx].longopt == 0 && min_abbr_len > 0) // if we should try to match abbreviated long options + if (usage[idx].longopt == 0 && + min_abbr_len > 0) // if we should try to match abbreviated long options { int i1 = 0; - while (usage[i1].longopt != 0 && !streqabbr(usage[i1].longopt, longopt_name, min_abbr_len)) - { ++i1; } + while (usage[i1].longopt != 0 && + !streqabbr(usage[i1].longopt, longopt_name, min_abbr_len)) + { + ++i1; + } if (usage[i1].longopt != 0) { // now test if the match is unambiguous by checking for another match int i2 = i1 + 1; - while (usage[i2].longopt != 0 && !streqabbr(usage[i2].longopt, longopt_name, min_abbr_len)) - { ++i2; } + while (usage[i2].longopt != 0 && + !streqabbr(usage[i2].longopt, longopt_name, min_abbr_len)) + { + ++i2; + } - if (usage[i2].longopt == 0) // if there was no second match it's unambiguous, so accept i1 as idx - { idx = i1; } + if (usage[i2].longopt == + 0) // if there was no second match it's unambiguous, so accept i1 as idx + { + idx = i1; + } } } // if we found something, disable handle_short_options (only relevant if single_minus_longopt) if (usage[idx].longopt != 0) - { handle_short_options = false; } + { + handle_short_options = false; + } - try_single_minus_longopt = false; // prevent looking for longopt in the middle of shortopt group + try_single_minus_longopt = + false; // prevent looking for longopt in the middle of shortopt group optarg = longopt_name; while (*optarg != 0 && *optarg != '=') - { ++optarg; } + { + ++optarg; + } if (*optarg == '=') // attached argument - { ++optarg; } + { + ++optarg; + } else - // possibly detached argument - { optarg = (have_more_args ? args[1] : 0); } + // possibly detached argument + { + optarg = (have_more_args ? args[1] : 0); + } } /************************ short option ***********************************/ if (handle_short_options) { if (*++param == 0) // point at the 1st/next option character - { break; } // end of short option group + { + break; + } // end of short option group idx = 0; while (usage[idx].shortopt != 0 && !instr(*param, usage[idx].shortopt)) - { ++idx; } + { + ++idx; + } if (param[1] == 0) // if the potential argument is separate - { optarg = (have_more_args ? args[1] : 0); } + { + optarg = (have_more_args ? args[1] : 0); + } else - // if the potential argument is attached - { optarg = param + 1; } + // if the potential argument is attached + { + optarg = param + 1; + } } const Descriptor* descriptor = &usage[idx]; @@ -1636,8 +1670,11 @@ inline bool Parser::workhorse(bool gnu, const Descriptor usage[], int numargs, c { // look for dummy entry (shortopt == "" and longopt == "") to use as Descriptor for unknown options idx = 0; - while (usage[idx].shortopt != 0 && (usage[idx].shortopt[0] != 0 || usage[idx].longopt[0] != 0)) - { ++idx; } + while (usage[idx].shortopt != 0 && + (usage[idx].shortopt[0] != 0 || usage[idx].longopt[0] != 0)) + { + ++idx; + } descriptor = (usage[idx].shortopt == 0 ? 0 : &usage[idx]); } @@ -1654,7 +1691,9 @@ inline bool Parser::workhorse(bool gnu, const Descriptor usage[], int numargs, c { shift(args, nonops); if (numargs > 0) - { --numargs; } + { + --numargs; + } ++args; } @@ -1669,28 +1708,36 @@ inline bool Parser::workhorse(bool gnu, const Descriptor usage[], int numargs, c } if (!action.perform(option)) - { return false; } + { + return false; + } } - } - while (handle_short_options); + } while (handle_short_options); shift(args, nonops); ++args; if (numargs > 0) - { --numargs; } + { + --numargs; + } } // while - if (numargs > 0 && *args == 0) // It's a bug in the caller if numargs is greater than the actual number - { numargs = 0; } // of arguments, but as a service to the user we fix this if we spot it. + if (numargs > 0 && + *args == 0) // It's a bug in the caller if numargs is greater than the actual number + { + numargs = 0; + } // of arguments, but as a service to the user we fix this if we spot it. if (numargs < 0) // if we don't know the number of remaining non-option arguments { // we need to count them numargs = 0; while (args[numargs] != 0) - { ++numargs; } + { + ++numargs; + } } return action.finished(numargs + nonops, args - nonops); @@ -1711,9 +1758,7 @@ struct PrintUsageImplementation /** * @brief Writes the given number of chars beginning at the given pointer somewhere. */ - virtual void operator()(const char*, int) - { - } + virtual void operator()(const char*, int) {} }; /** @@ -1721,18 +1766,15 @@ struct PrintUsageImplementation * @brief Encapsulates a function with signature func(string, size) where * string can be initialized with a const char* and size with an int. */ - template - struct FunctionWriter: public IStringWriter + template + struct FunctionWriter : public IStringWriter { Function* write; - virtual void operator()(const char* str, int size) - { - (*write)(str, size); - } + virtual void operator()(const char* str, int size) { (*write)(str, size); } - FunctionWriter(Function* w) : - write(w) + FunctionWriter(Function* w) + : write(w) { } }; @@ -1742,18 +1784,15 @@ struct PrintUsageImplementation * @brief Encapsulates a reference to an object with a write(string, size) * method like that of @c std::ostream. */ - template - struct OStreamWriter: public IStringWriter + template + struct OStreamWriter : public IStringWriter { OStream& ostream; - virtual void operator()(const char* str, int size) - { - ostream.write(str, size); - } + virtual void operator()(const char* str, int size) { ostream.write(str, size); } - OStreamWriter(OStream& o) : - ostream(o) + OStreamWriter(OStream& o) + : ostream(o) { } }; @@ -1763,18 +1802,15 @@ struct PrintUsageImplementation * @brief Like OStreamWriter but encapsulates a @c const reference, which is * typically a temporary object of a user class. */ - template - struct TemporaryWriter: public IStringWriter + template + struct TemporaryWriter : public IStringWriter { const Temporary& userstream; - virtual void operator()(const char* str, int size) - { - userstream.write(str, size); - } + virtual void operator()(const char* str, int size) { userstream.write(str, size); } - TemporaryWriter(const Temporary& u) : - userstream(u) + TemporaryWriter(const Temporary& u) + : userstream(u) { } }; @@ -1785,19 +1821,17 @@ struct PrintUsageImplementation * signature of the @c write() system call) * where fd can be initialized from an int, string from a const char* and size from an int. */ - template - struct SyscallWriter: public IStringWriter + template + struct SyscallWriter : public IStringWriter { Syscall* write; int fd; - virtual void operator()(const char* str, int size) - { - (*write)(fd, str, size); - } + virtual void operator()(const char* str, int size) { (*write)(fd, str, size); } - SyscallWriter(Syscall* w, int f) : - write(w), fd(f) + SyscallWriter(Syscall* w, int f) + : write(w) + , fd(f) { } }; @@ -1806,19 +1840,17 @@ struct PrintUsageImplementation * @internal * @brief Encapsulates a function with the same signature as @c std::fwrite(). */ - template - struct StreamWriter: public IStringWriter + template + struct StreamWriter : public IStringWriter { Function* fwrite; Stream* stream; - virtual void operator()(const char* str, int size) - { - (*fwrite)(str, size, 1, stream); - } + virtual void operator()(const char* str, int size) { (*fwrite)(str, size, 1, stream); } - StreamWriter(Function* w, Stream* s) : - fwrite(w), stream(s) + StreamWriter(Function* w, Stream* s) + : fwrite(w) + , stream(s) { } }; @@ -1827,10 +1859,7 @@ struct PrintUsageImplementation * @internal * @brief Sets i1 = max(i1, i2) */ - static void upmax(int& i1, int i2) - { - i1 = (i1 >= i2 ? i1 : i2); - } + static void upmax(int& i1, int i2) { i1 = (i1 >= i2 ? i1 : i2); } /** * @internal @@ -1856,7 +1885,9 @@ struct PrintUsageImplementation { char space = ' '; for (int i = 0; i < indent; ++i) - { write(&space, 1); } + { + write(&space, 1); + } x = want_x; } } @@ -1882,12 +1913,15 @@ struct PrintUsageImplementation static bool isWideChar(unsigned ch) { if (ch == 0x303F) - { return false; } + { + return false; + } - return ((0x1100 <= ch && ch <= 0x115F) || (0x2329 <= ch && ch <= 0x232A) || (0x2E80 <= ch && ch <= 0xA4C6) - || (0xA960 <= ch && ch <= 0xA97C) || (0xAC00 <= ch && ch <= 0xD7FB) || (0xF900 <= ch && ch <= 0xFAFF) - || (0xFE10 <= ch && ch <= 0xFE6B) || (0xFF01 <= ch && ch <= 0xFF60) || (0xFFE0 <= ch && ch <= 0xFFE6) - || (0x1B000 <= ch)); + return ((0x1100 <= ch && ch <= 0x115F) || (0x2329 <= ch && ch <= 0x232A) || + (0x2E80 <= ch && ch <= 0xA4C6) || (0xA960 <= ch && ch <= 0xA97C) || + (0xAC00 <= ch && ch <= 0xD7FB) || (0xF900 <= ch && ch <= 0xFAFF) || + (0xFE10 <= ch && ch <= 0xFE6B) || (0xFF01 <= ch && ch <= 0xFF60) || + (0xFFE0 <= ch && ch <= 0xFFE6) || (0x1B000 <= ch)); } /** @@ -1929,16 +1963,20 @@ struct PrintUsageImplementation class LinePartIterator { const Descriptor* tablestart; //!< The 1st descriptor of the current table. - const Descriptor* rowdesc; //!< The Descriptor that contains the current row. - const char* rowstart; //!< Ptr to 1st character of current row within rowdesc->help. - const char* ptr; //!< Ptr to current part within the current row. - int col; //!< Index of current column. - int len; //!< Length of the current part (that ptr points at) in BYTES - int screenlen; //!< Length of the current part in screen columns (taking narrow/wide chars into account). - int max_line_in_block; //!< Greatest index of a line within the block. This is the number of \\v within the cell with the most \\vs. - int line_in_block; //!< Line index within the current cell of the current part. - int target_line_in_block; //!< Line index of the parts we should return to the user on this iteration. - bool hit_target_line; //!< Flag whether we encountered a part with line index target_line_in_block in the current cell. + const Descriptor* rowdesc; //!< The Descriptor that contains the current row. + const char* rowstart; //!< Ptr to 1st character of current row within rowdesc->help. + const char* ptr; //!< Ptr to current part within the current row. + int col; //!< Index of current column. + int len; //!< Length of the current part (that ptr points at) in BYTES + int + screenlen; //!< Length of the current part in screen columns (taking narrow/wide chars into account). + int + max_line_in_block; //!< Greatest index of a line within the block. This is the number of \\v within the cell with the most \\vs. + int line_in_block; //!< Line index within the current cell of the current part. + int + target_line_in_block; //!< Line index of the parts we should return to the user on this iteration. + bool + hit_target_line; //!< Flag whether we encountered a part with line index target_line_in_block in the current cell. /** * @brief Determines the byte and character lengths of the part at @ref ptr and @@ -1947,33 +1985,47 @@ struct PrintUsageImplementation void update_length() { screenlen = 0; - for (len = 0; ptr[len] != 0 && ptr[len] != '\v' && ptr[len] != '\t' && ptr[len] != '\n'; ++len) + for (len = 0; ptr[len] != 0 && ptr[len] != '\v' && ptr[len] != '\t' && ptr[len] != '\n'; + ++len) { ++screenlen; - unsigned ch = (unsigned char) ptr[len]; + unsigned ch = (unsigned char)ptr[len]; if (ch > 0xC1) // everything <= 0xC1 (yes, even 0xC1 itself) is not a valid UTF-8 start byte { // int __builtin_clz (unsigned int x) // Returns the number of leading 0-bits in x, starting at the most significant bit - unsigned mask = (unsigned) -1 >> __builtin_clz(ch ^ 0xff); + unsigned mask = (unsigned)-1 >> __builtin_clz(ch ^ 0xff); ch = ch & mask; // mask out length bits, we don't verify their correctness - while (((unsigned char) ptr[len + 1] ^ 0x80) <= 0x3F) // while next byte is continuation byte + while (((unsigned char)ptr[len + 1] ^ 0x80) <= + 0x3F) // while next byte is continuation byte { - ch = (ch << 6) ^ (unsigned char) ptr[len + 1] ^ 0x80; // add continuation to char code + ch = (ch << 6) ^ (unsigned char)ptr[len + 1] ^ 0x80; // add continuation to char code ++len; } // ch is the decoded unicode code point - if (ch >= 0x1100 && isWideChar(ch)) // the test for 0x1100 is here to avoid the function call in the Latin case - { ++screenlen; } + if (ch >= 0x1100 && + isWideChar( + ch)) // the test for 0x1100 is here to avoid the function call in the Latin case + { + ++screenlen; + } } } } public: //! @brief Creates an iterator for @c usage. - LinePartIterator(const Descriptor usage[]) : - tablestart(usage), rowdesc(0), rowstart(0), ptr(0), col(-1), len(0), max_line_in_block(0), line_in_block(0), - target_line_in_block(0), hit_target_line(true) + LinePartIterator(const Descriptor usage[]) + : tablestart(usage) + , rowdesc(0) + , rowstart(0) + , ptr(0) + , col(-1) + , len(0) + , max_line_in_block(0) + , line_in_block(0) + , target_line_in_block(0) + , hit_target_line(true) { } @@ -1989,12 +2041,16 @@ struct PrintUsageImplementation if (rowdesc != 0) { while (tablestart->help != 0 && tablestart->shortopt != 0) - { ++tablestart; } + { + ++tablestart; + } } // Find the next table after the break (if any) while (tablestart->help == 0 && tablestart->shortopt != 0) - { ++tablestart; } + { + ++tablestart; + } restartTable(); return rowstart != 0; @@ -2024,12 +2080,16 @@ struct PrintUsageImplementation } while (*ptr != 0 && *ptr != '\n') - { ++ptr; } + { + ++ptr; + } if (*ptr == 0) { if ((rowdesc + 1)->help == 0) // table break - { return false; } + { + return false; + } ++rowdesc; rowstart = rowdesc->help; @@ -2068,7 +2128,9 @@ struct PrintUsageImplementation bool next() { if (ptr == 0) - { return false; } + { + return false; + } if (col == -1) { @@ -2139,10 +2201,7 @@ struct PrintUsageImplementation * @brief Returns the index (counting from 0) of the column in which * the part pointed to by @ref data() is located. */ - int column() - { - return col; - } + int column() { return col; } /** * @brief Returns the index (counting from 0) of the line within the current column @@ -2156,27 +2215,18 @@ struct PrintUsageImplementation /** * @brief Returns the length of the part pointed to by @ref data() in raw chars (not UTF-8 characters). */ - int length() - { - return len; - } + int length() { return len; } /** * @brief Returns the width in screen columns of the part pointed to by @ref data(). * Takes multi-byte UTF-8 sequences and wide characters into account. */ - int screenLength() - { - return screenlen; - } + int screenLength() { return screenlen; } /** * @brief Returns the current part of the iteration. */ - const char* data() - { - return ptr; - } + const char* data() { return ptr; } }; /** @@ -2237,15 +2287,9 @@ struct PrintUsageImplementation */ bool wrote_something; - bool buf_empty() - { - return ((tail + 1) & bufmask) == head; - } + bool buf_empty() { return ((tail + 1) & bufmask) == head; } - bool buf_full() - { - return tail == head; - } + bool buf_full() { return tail == head; } void buf_store(const char* data, int len) { @@ -2255,10 +2299,7 @@ struct PrintUsageImplementation } //! @brief Call BEFORE reading ...buf[tail]. - void buf_next() - { - tail = (tail + 1) & bufmask; - } + void buf_next() { tail = (tail + 1) & bufmask; } /** * @brief Writes (data,len) into the ring buffer. If the buffer is full, a single line @@ -2267,7 +2308,9 @@ struct PrintUsageImplementation void output(IStringWriter& write, const char* data, int len) { if (buf_full()) - { write_one_line(write); } + { + write_one_line(write); + } buf_store(data, len); } @@ -2292,8 +2335,8 @@ struct PrintUsageImplementation wrote_something = true; } - public: + public: /** * @brief Writes out all remaining data from the LineWrapper using @c write. * Unlike @ref process() this method indents all lines including the first and @@ -2302,12 +2345,16 @@ struct PrintUsageImplementation void flush(IStringWriter& write) { if (buf_empty()) - { return; } + { + return; + } int _ = 0; indent(write, _, x); wrote_something = false; while (!buf_empty()) - { write_one_line(write); } + { + write_one_line(write); + } write("\n", 1); } @@ -2335,7 +2382,9 @@ struct PrintUsageImplementation while (len > 0) { - if (len <= width) // quick test that works because utf8width <= len (all wide chars have at least 2 bytes) + if ( + len <= + width) // quick test that works because utf8width <= len (all wide chars have at least 2 bytes) { output(write, data, len); len = 0; @@ -2347,24 +2396,31 @@ struct PrintUsageImplementation while (maxi < len && utf8width < width) { int charbytes = 1; - unsigned ch = (unsigned char) data[maxi]; - if (ch > 0xC1) // everything <= 0xC1 (yes, even 0xC1 itself) is not a valid UTF-8 start byte + unsigned ch = (unsigned char)data[maxi]; + if (ch > + 0xC1) // everything <= 0xC1 (yes, even 0xC1 itself) is not a valid UTF-8 start byte { // int __builtin_clz (unsigned int x) // Returns the number of leading 0-bits in x, starting at the most significant bit - unsigned mask = (unsigned) -1 >> __builtin_clz(ch ^ 0xff); + unsigned mask = (unsigned)-1 >> __builtin_clz(ch ^ 0xff); ch = ch & mask; // mask out length bits, we don't verify their correctness while ((maxi + charbytes < len) && // - (((unsigned char) data[maxi + charbytes] ^ 0x80) <= 0x3F)) // while next byte is continuation byte + (((unsigned char)data[maxi + charbytes] ^ 0x80) <= + 0x3F)) // while next byte is continuation byte { - ch = (ch << 6) ^ (unsigned char) data[maxi + charbytes] ^ 0x80; // add continuation to char code + ch = (ch << 6) ^ (unsigned char)data[maxi + charbytes] ^ + 0x80; // add continuation to char code ++charbytes; } // ch is the decoded unicode code point - if (ch >= 0x1100 && isWideChar(ch)) // the test for 0x1100 is here to avoid the function call in the Latin case + if (ch >= 0x1100 && + isWideChar( + ch)) // the test for 0x1100 is here to avoid the function call in the Latin case { if (utf8width + 2 > width) - { break; } + { + break; + } ++utf8width; } } @@ -2385,7 +2441,9 @@ struct PrintUsageImplementation int i; for (i = maxi; i >= 0; --i) if (data[i] == ' ') - { break; } + { + break; + } if (i >= 0) { @@ -2404,7 +2462,9 @@ struct PrintUsageImplementation } } if (!wrote_something) // if we didn't already write something to make space in the buffer - { write_one_line(write); } // write at most one line of actual output + { + write_one_line(write); + } // write at most one line of actual output } /** @@ -2413,11 +2473,16 @@ struct PrintUsageImplementation * * @c x1 gives the indentation LineWrapper uses if it needs to indent. */ - LineWrapper(int x1, int x2) : - x(x1), width(x2 - x1), head(0), tail(bufmask) + LineWrapper(int x1, int x2) + : x(x1) + , width(x2 - x1) + , head(0) + , tail(bufmask) { if (width < 2) // because of wide characters we need at least width 2 or the code breaks - { width = 2; } + { + width = 2; + } } }; @@ -2427,18 +2492,25 @@ struct PrintUsageImplementation * Because all printUsage() templates share this implementation, there is no template bloat. */ static void printUsage(IStringWriter& write, const Descriptor usage[], int width = 80, // - int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) + int last_column_min_percent = 50, + int last_column_own_line_max_percent = 75) { if (width < 1) // protect against nonsense values - { width = 80; } + { + width = 80; + } if (width > 10000) // protect against overflow in the following computation - { width = 10000; } + { + width = 10000; + } int last_column_min_width = ((width * last_column_min_percent) + 50) / 100; int last_column_own_line_max_width = ((width * last_column_own_line_max_percent) + 50) / 100; if (last_column_own_line_max_width == 0) - { last_column_own_line_max_width = 1; } + { + last_column_own_line_max_width = 1; + } LinePartIterator part(usage); while (part.nextTable()) @@ -2455,7 +2527,9 @@ struct PrintUsageImplementation { lastcolumn = 0; for (int i = 0; i < maxcolumns; ++i) - { col_width[i] = 0; } + { + col_width[i] = 0; + } part.restartTable(); while (part.nextRow()) @@ -2469,9 +2543,11 @@ struct PrintUsageImplementation // We don't let rows that don't use table separators (\t or \v) influence // the width of column 0. This allows the user to interject section headers // or explanatory paragraphs that do not participate in the table layout. - if (part.column() > 0 || part.line() > 0 || part.data()[part.length()] == '\t' - || part.data()[part.length()] == '\v') - { upmax(col_width[part.column()], part.screenLength()); } + if (part.column() > 0 || part.line() > 0 || part.data()[part.length()] == '\t' || + part.data()[part.length()] == '\v') + { + upmax(col_width[part.column()], part.screenLength()); + } } } } @@ -2495,15 +2571,16 @@ struct PrintUsageImplementation upmax(overlong_column_threshold, col_width[i]); } - } - while (leftwidth > width); + } while (leftwidth > width); /**************** Determine tab stops and last column handling **********************/ int tabstop[maxcolumns]; tabstop[0] = 0; for (int i = 1; i < maxcolumns; ++i) - { tabstop[i] = tabstop[i - 1] + col_width[i - 1]; } + { + tabstop[i] = tabstop[i - 1] + col_width[i - 1]; + } int rightwidth = width - tabstop[lastcolumn]; bool print_last_column_on_own_line = false; @@ -2522,7 +2599,9 @@ struct PrintUsageImplementation // a bullshit value >100 for last_column_min_percent) => the above if condition // is false => print_last_column_on_own_line==false if (lastcolumn == 0) - { print_last_column_on_own_line = false; } + { + print_last_column_on_own_line = false; + } LineWrapper lastColumnLineWrapper(width - rightwidth, width); LineWrapper interjectionLineWrapper(0, width); @@ -2537,34 +2616,41 @@ struct PrintUsageImplementation while (part.next()) { if (part.column() > lastcolumn) - { continue; } // drop excess columns (can happen if lastcolumn == maxcolumns-1) + { + continue; + } // drop excess columns (can happen if lastcolumn == maxcolumns-1) if (part.column() == 0) { if (x >= 0) - { write("\n", 1); } + { + write("\n", 1); + } x = 0; } indent(write, x, tabstop[part.column()]); - if ((part.column() < lastcolumn) - && (part.column() > 0 || part.line() > 0 || part.data()[part.length()] == '\t' - || part.data()[part.length()] == '\v')) + if ((part.column() < lastcolumn) && + (part.column() > 0 || part.line() > 0 || part.data()[part.length()] == '\t' || + part.data()[part.length()] == '\v')) { write(part.data(), part.length()); x += part.screenLength(); } else // either part.column() == lastcolumn or we are in the special case of - // an interjection that doesn't contain \v or \t + // an interjection that doesn't contain \v or \t { // NOTE: This code block is not necessarily executed for // each line, because some rows may have fewer columns. - LineWrapper& lineWrapper = (part.column() == 0) ? interjectionLineWrapper : lastColumnLineWrapper; + LineWrapper& lineWrapper = + (part.column() == 0) ? interjectionLineWrapper : lastColumnLineWrapper; if (!print_last_column_on_own_line) - { lineWrapper.process(write, part.data(), part.length()); } + { + lineWrapper.process(write, part.data(), part.length()); + } } } // while @@ -2589,9 +2675,7 @@ struct PrintUsageImplementation } } } - -} -; +}; /** * @brief Outputs a nicely formatted usage string with support for multi-column formatting @@ -2790,53 +2874,54 @@ struct PrintUsageImplementation * 67890 * @endcode */ -template -void printUsage(OStream& prn, const Descriptor descriptors[], int width = 80, int last_column_min_percent = 50, - int last_column_own_line_max_percent = 75) +template +void printUsage(OStream& prn, const Descriptor descriptors[], int width = 80, + int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) { PrintUsageImplementation::OStreamWriter write(prn); - PrintUsageImplementation::printUsage(write, descriptors, width, last_column_min_percent, last_column_own_line_max_percent); + PrintUsageImplementation::printUsage(write, descriptors, width, last_column_min_percent, + last_column_own_line_max_percent); } -template -void printUsage(Function* prn, const Descriptor descriptors[], int width = 80, int last_column_min_percent = 50, - int last_column_own_line_max_percent = 75) +template +void printUsage(Function* prn, const Descriptor descriptors[], int width = 80, + int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) { PrintUsageImplementation::FunctionWriter write(prn); - PrintUsageImplementation::printUsage(write, descriptors, width, last_column_min_percent, last_column_own_line_max_percent); + PrintUsageImplementation::printUsage(write, descriptors, width, last_column_min_percent, + last_column_own_line_max_percent); } -template -void printUsage(const Temporary& prn, const Descriptor descriptors[], int width = 80, int last_column_min_percent = 50, - int last_column_own_line_max_percent = 75) +template +void printUsage(const Temporary& prn, const Descriptor descriptors[], int width = 80, + int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) { PrintUsageImplementation::TemporaryWriter write(prn); - PrintUsageImplementation::printUsage(write, descriptors, width, last_column_min_percent, last_column_own_line_max_percent); + PrintUsageImplementation::printUsage(write, descriptors, width, last_column_min_percent, + last_column_own_line_max_percent); } -template -void printUsage(Syscall* prn, int fd, const Descriptor descriptors[], int width = 80, int last_column_min_percent = 50, - int last_column_own_line_max_percent = 75) +template +void printUsage(Syscall* prn, int fd, const Descriptor descriptors[], int width = 80, + int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) { PrintUsageImplementation::SyscallWriter write(prn, fd); - PrintUsageImplementation::printUsage(write, descriptors, width, last_column_min_percent, last_column_own_line_max_percent); + PrintUsageImplementation::printUsage(write, descriptors, width, last_column_min_percent, + last_column_own_line_max_percent); } -template -void printUsage(Function* prn, Stream* stream, const Descriptor descriptors[], int width = 80, int last_column_min_percent = - 50, - int last_column_own_line_max_percent = 75) +template +void printUsage(Function* prn, Stream* stream, const Descriptor descriptors[], int width = 80, + int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) { PrintUsageImplementation::StreamWriter write(prn, stream); - PrintUsageImplementation::printUsage(write, descriptors, width, last_column_min_percent, last_column_own_line_max_percent); + PrintUsageImplementation::printUsage(write, descriptors, width, last_column_min_percent, + last_column_own_line_max_percent); } - } // namespace option - } } // namespace vtkm::testing #endif /* OPTIONPARSER_H_ */ - diff --git a/vtkm/testing/Testing.h b/vtkm/testing/Testing.h index decca02d4..b4580f3c5 100644 --- a/vtkm/testing/Testing.h +++ b/vtkm/testing/Testing.h @@ -56,31 +56,34 @@ /// condition resolves to true. If \a condition is false, then the test is /// aborted and failure is returned. -#define VTKM_TEST_ASSERT(condition, message) \ - ::vtkm::testing::Testing::Assert( \ - condition, __FILE__, __LINE__, message, #condition) +#define VTKM_TEST_ASSERT(condition, message) \ + ::vtkm::testing::Testing::Assert(condition, __FILE__, __LINE__, message, #condition) /// \def VTKM_TEST_FAIL(message) /// /// Causes a test to fail with the given \a message. -#define VTKM_TEST_FAIL(message) \ +#define VTKM_TEST_FAIL(message) \ throw ::vtkm::testing::Testing::TestFailure(__FILE__, __LINE__, message) -namespace vtkm { -namespace testing { +namespace vtkm +{ +namespace testing +{ // If you get an error about this class definition being incomplete, it means // that you tried to get the name of a type that is not specified. You can // either not use that type, not try to get the string name, or add it to the // list. -template +template struct TypeName; -#define VTK_M_BASIC_TYPE(type) \ - template<> struct TypeName { \ - static std::string Name() { return #type; } \ - } \ +#define VTK_M_BASIC_TYPE(type) \ + template <> \ + struct TypeName \ + { \ + static std::string Name() { return #type; } \ + } VTK_M_BASIC_TYPE(vtkm::Float32); VTK_M_BASIC_TYPE(vtkm::Float64); @@ -95,67 +98,64 @@ VTK_M_BASIC_TYPE(vtkm::UInt64); #undef VTK_M_BASIC_TYPE -template -struct TypeName > +template +struct TypeName> { - static std::string Name() { + static std::string Name() + { std::stringstream stream; - stream << "vtkm::Vec< " - << TypeName::Name() - << ", " - << Size - << " >"; + stream << "vtkm::Vec< " << TypeName::Name() << ", " << Size << " >"; return stream.str(); } }; -template -struct TypeName > +template +struct TypeName> { - static std::string Name() { + static std::string Name() + { std::stringstream stream; - stream << "vtkm::Pair< " - << TypeName::Name() - << ", " - << TypeName::Name() - << " >"; + stream << "vtkm::Pair< " << TypeName::Name() << ", " << TypeName::Name() << " >"; return stream.str(); } }; -namespace detail { +namespace detail +{ -template +template struct InternalTryCellShape { - template - void operator()(const FunctionType &function) const { - this->PrintAndInvoke(function, - typename vtkm::CellShapeIdToTag::valid()); - InternalTryCellShape()(function); + template + void operator()(const FunctionType& function) const + { + this->PrintAndInvoke(function, typename vtkm::CellShapeIdToTag::valid()); + InternalTryCellShape()(function); } private: - template - void PrintAndInvoke(const FunctionType &function, std::true_type) const { + template + void PrintAndInvoke(const FunctionType& function, std::true_type) const + { typedef typename vtkm::CellShapeIdToTag::Tag CellShapeTag; - std::cout << "*** " - << vtkm::GetCellShapeName(CellShapeTag()) - << " ***************" << std::endl; + std::cout << "*** " << vtkm::GetCellShapeName(CellShapeTag()) << " ***************" + << std::endl; function(CellShapeTag()); } - template - void PrintAndInvoke(const FunctionType &, std::false_type) const { + template + void PrintAndInvoke(const FunctionType&, std::false_type) const + { // Not a valid cell shape. Do nothing. } }; -template<> +template <> struct InternalTryCellShape { - template - void operator()(const FunctionType &) const { + template + void operator()(const FunctionType&) const + { // Done processing cell sets. Do nothing and return. } }; @@ -168,16 +168,17 @@ public: class TestFailure { public: - VTKM_CONT TestFailure(const std::string &file, - vtkm::Id line, - const std::string &message) - : File(file), Line(line), Message(message) { } + VTKM_CONT TestFailure(const std::string& file, vtkm::Id line, const std::string& message) + : File(file) + , Line(line) + , Message(message) + { + } - VTKM_CONT TestFailure(const std::string &file, - vtkm::Id line, - const std::string &message, - const std::string &condition) - : File(file), Line(line) + VTKM_CONT TestFailure(const std::string& file, vtkm::Id line, const std::string& message, + const std::string& condition) + : File(file) + , Line(line) { this->Message.append(message); this->Message.append(" ("); @@ -185,23 +186,17 @@ public: this->Message.append(")"); } - VTKM_CONT const std::string &GetFile() const { return this->File; } + VTKM_CONT const std::string& GetFile() const { return this->File; } VTKM_CONT vtkm::Id GetLine() const { return this->Line; } - VTKM_CONT const std::string &GetMessage() const - { - return this->Message; - } + VTKM_CONT const std::string& GetMessage() const { return this->Message; } private: std::string File; vtkm::Id Line; std::string Message; }; - static VTKM_CONT void Assert(bool condition, - const std::string &file, - vtkm::Id line, - const std::string &message, - const std::string &conditionString) + static VTKM_CONT void Assert(bool condition, const std::string& file, vtkm::Id line, + const std::string& message, const std::string& conditionString) { if (condition) { @@ -241,24 +236,22 @@ public: /// } /// \endcode /// - template + template static VTKM_CONT int Run(Func function) { try { function(); } - catch (TestFailure &error) + catch (TestFailure& error) { - std::cout << "***** Test failed @ " - << error.GetFile() << ":" << error.GetLine() << std::endl + std::cout << "***** Test failed @ " << error.GetFile() << ":" << error.GetLine() << std::endl << error.GetMessage() << std::endl; return 1; } - catch (std::exception &error) + catch (std::exception& error) { - std::cout << "***** STL exception throw." << std::endl - << error.what() << std::endl; + std::cout << "***** STL exception throw." << std::endl << error.what() << std::endl; } catch (...) { @@ -269,17 +262,18 @@ public: } #endif - template + template struct InternalPrintTypeAndInvoke { - InternalPrintTypeAndInvoke(FunctionType function) : Function(function) { } + InternalPrintTypeAndInvoke(FunctionType function) + : Function(function) + { + } - template + template void operator()(T t) const { - std::cout << "*** " - << vtkm::testing::TypeName::Name() - << " ***************" << std::endl; + std::cout << "*** " << vtkm::testing::TypeName::Name() << " ***************" << std::endl; this->Function(t); } @@ -290,94 +284,80 @@ public: /// Runs template \p function on all the types in the given list. If no type /// list is given, then an exemplar list of types is used. /// - template - static void TryTypes(const FunctionType &function, TypeList) + template + static void TryTypes(const FunctionType& function, TypeList) { - vtkm::ListForEach(InternalPrintTypeAndInvoke(function), - TypeList()); + vtkm::ListForEach(InternalPrintTypeAndInvoke(function), TypeList()); } struct TypeListTagExemplarTypes - : vtkm::ListTagBase > - { }; + : vtkm::ListTagBase> + { + }; - template - static void TryTypes(const FunctionType &function) + template + static void TryTypes(const FunctionType& function) { TryTypes(function, TypeListTagExemplarTypes()); } // Disabled: This very long list results is very long compile times. -// /// Runs templated \p function on all the basic types defined in VTK-m. This -// /// is helpful to test templated functions that should work on all types. If -// /// the function is supposed to work on some subset of types, then use -// /// \c TryTypes to restrict the call to some other list of types. -// /// -// template -// static void TryAllTypes(const FunctionType &function) -// { -// TryTypes(function, vtkm::TypeListTagAll()); -// } + // /// Runs templated \p function on all the basic types defined in VTK-m. This + // /// is helpful to test templated functions that should work on all types. If + // /// the function is supposed to work on some subset of types, then use + // /// \c TryTypes to restrict the call to some other list of types. + // /// + // template + // static void TryAllTypes(const FunctionType &function) + // { + // TryTypes(function, vtkm::TypeListTagAll()); + // } /// Runs templated \p function on all cell shapes defined in VTK-m. This is /// helpful to test templated functions that should work on all cell types. /// - template - static void TryAllCellShapes(const FunctionType &function) + template + static void TryAllCellShapes(const FunctionType& function) { detail::InternalTryCellShape<0>()(function); } - }; - } } // namespace vtkm::internal // Prototype declaration -template -static inline VTKM_EXEC_CONT -bool test_equal(VectorType1 vector1, - VectorType2 vector2, - vtkm::Float64 tolerance = 0.00001); +template +static inline VTKM_EXEC_CONT bool test_equal(VectorType1 vector1, VectorType2 vector2, + vtkm::Float64 tolerance = 0.00001); -namespace detail { +namespace detail +{ -template -static inline VTKM_EXEC_CONT -bool test_equal_impl(VectorType1 vector1, - VectorType2 vector2, - vtkm::Float64 tolerance, - vtkm::TypeTraitsVectorTag) +template +static inline VTKM_EXEC_CONT bool test_equal_impl(VectorType1 vector1, VectorType2 vector2, + vtkm::Float64 tolerance, + vtkm::TypeTraitsVectorTag) { // If you get a compiler error here, it means you are comparing a vector to // a scalar, in which case the types are non-comparable. - VTKM_STATIC_ASSERT_MSG( - (std::is_same< - typename vtkm::TypeTraits::DimensionalityTag, - vtkm::TypeTraitsScalarTag>::type::value == false), - "Trying to compare a vector with a scalar."); + VTKM_STATIC_ASSERT_MSG((std::is_same::DimensionalityTag, + vtkm::TypeTraitsScalarTag>::type::value == false), + "Trying to compare a vector with a scalar."); using Traits1 = vtkm::VecTraits; using Traits2 = vtkm::VecTraits; // If vectors have different number of components, then they cannot be equal. - if (Traits1::GetNumberOfComponents(vector1) != - Traits2::GetNumberOfComponents(vector2)) + if (Traits1::GetNumberOfComponents(vector1) != Traits2::GetNumberOfComponents(vector2)) { return false; } - for (vtkm::IdComponent component = 0; - component < Traits1::GetNumberOfComponents(vector1); + for (vtkm::IdComponent component = 0; component < Traits1::GetNumberOfComponents(vector1); component++) { - bool componentEqual = - test_equal(Traits1::GetComponent(vector1, component), - Traits2::GetComponent(vector2, component), - tolerance); + bool componentEqual = test_equal(Traits1::GetComponent(vector1, component), + Traits2::GetComponent(vector2, component), tolerance); if (!componentEqual) { return false; @@ -387,38 +367,31 @@ bool test_equal_impl(VectorType1 vector1, return true; } -template -static inline VTKM_EXEC_CONT -bool test_equal_impl(MatrixType1 matrix1, - MatrixType2 matrix2, - vtkm::Float64 tolerance, - vtkm::TypeTraitsMatrixTag) +template +static inline VTKM_EXEC_CONT bool test_equal_impl(MatrixType1 matrix1, MatrixType2 matrix2, + vtkm::Float64 tolerance, + vtkm::TypeTraitsMatrixTag) { // For the purposes of comparison, treat matrices the same as vectors. - return test_equal_impl( - matrix1, matrix2, tolerance, vtkm::TypeTraitsVectorTag()); + return test_equal_impl(matrix1, matrix2, tolerance, vtkm::TypeTraitsVectorTag()); } -template -static inline VTKM_EXEC_CONT -bool test_equal_impl(ScalarType1 scalar1, - ScalarType2 scalar2, - vtkm::Float64 tolerance, - vtkm::TypeTraitsScalarTag) +template +static inline VTKM_EXEC_CONT bool test_equal_impl(ScalarType1 scalar1, ScalarType2 scalar2, + vtkm::Float64 tolerance, + vtkm::TypeTraitsScalarTag) { // If you get a compiler error here, it means you are comparing a scalar to // a vector, in which case the types are non-comparable. - VTKM_STATIC_ASSERT_MSG( - (std::is_same< - typename vtkm::TypeTraits::DimensionalityTag, - vtkm::TypeTraitsScalarTag>::type::value), - "Trying to compare a scalar with a vector."); + VTKM_STATIC_ASSERT_MSG((std::is_same::DimensionalityTag, + vtkm::TypeTraitsScalarTag>::type::value), + "Trying to compare a scalar with a vector."); // Do all comparisions using 64-bit floats. vtkm::Float64 value1 = vtkm::Float64(scalar1); vtkm::Float64 value2 = vtkm::Float64(scalar2); - if (vtkm::Abs(value1-value2) <= tolerance) + if (vtkm::Abs(value1 - value2) <= tolerance) { return true; } @@ -437,8 +410,7 @@ bool test_equal_impl(ScalarType1 scalar1, // These cannot be within tolerance, so just return false. return false; } - if ((ratio > vtkm::Float64(1.0) - tolerance) - && (ratio < vtkm::Float64(1.0) + tolerance)) + if ((ratio > vtkm::Float64(1.0) - tolerance) && (ratio < vtkm::Float64(1.0) + tolerance)) { // This component is OK. The condition is checked in this way to // correctly handle non-finites that fail all comparisons. Thus, if a @@ -454,21 +426,17 @@ bool test_equal_impl(ScalarType1 scalar1, // Special cases of test equal where a scalar is compared with a Vec of size 1, // which we will allow. -template -static inline VTKM_EXEC_CONT -bool test_equal_impl(vtkm::Vec value1, - T value2, - vtkm::Float64 tolerance, - vtkm::TypeTraitsVectorTag) +template +static inline VTKM_EXEC_CONT bool test_equal_impl(vtkm::Vec value1, T value2, + vtkm::Float64 tolerance, + vtkm::TypeTraitsVectorTag) { return test_equal(value1[0], value2, tolerance); } -template -static inline VTKM_EXEC_CONT -bool test_equal_impl(T value1, - vtkm::Vec value2, - vtkm::Float64 tolerance, - vtkm::TypeTraitsScalarTag) +template +static inline VTKM_EXEC_CONT bool test_equal_impl(T value1, vtkm::Vec value2, + vtkm::Float64 tolerance, + vtkm::TypeTraitsScalarTag) { return test_equal(value1, value2[0], tolerance); } @@ -478,24 +446,18 @@ bool test_equal_impl(T value1, /// Helper function to test two quanitites for equality accounting for slight /// variance due to floating point numerical inaccuracies. /// -template -static inline VTKM_EXEC_CONT -bool test_equal(VectorType1 vector1, - VectorType2 vector2, - vtkm::Float64 tolerance /*= 0.00001*/) +template +static inline VTKM_EXEC_CONT bool test_equal(VectorType1 vector1, VectorType2 vector2, + vtkm::Float64 tolerance /*= 0.00001*/) { - return detail::test_equal_impl( - vector1, - vector2, - tolerance, - typename vtkm::TypeTraits::DimensionalityTag()); + return detail::test_equal_impl(vector1, vector2, tolerance, + typename vtkm::TypeTraits::DimensionalityTag()); } /// Special implementation of test_equal for strings, which don't fit a model /// of fixed length vectors of numbers. /// -static inline VTKM_CONT -bool test_equal(const std::string &string1, const std::string &string2) +static inline VTKM_CONT bool test_equal(const std::string& string1, const std::string& string2) { return string1 == string2; } @@ -503,23 +465,19 @@ bool test_equal(const std::string &string1, const std::string &string2) /// Special implementation of test_equal for Pairs, which are a bit different /// than a vector of numbers of the same type. /// -template -static inline VTKM_CONT -bool test_equal(const vtkm::Pair &pair1, - const vtkm::Pair &pair2, - vtkm::Float64 tolerance = 0.0001) +template +static inline VTKM_CONT bool test_equal(const vtkm::Pair& pair1, + const vtkm::Pair& pair2, + vtkm::Float64 tolerance = 0.0001) { - return test_equal(pair1.first, pair2.first, tolerance) - && test_equal(pair1.second, pair2.second, tolerance); + return test_equal(pair1.first, pair2.first, tolerance) && + test_equal(pair1.second, pair2.second, tolerance); } - /// Special implementation of test_equal for Ranges. /// -static inline VTKM_EXEC_CONT -bool test_equal(const vtkm::Range &range1, - const vtkm::Range &range2, - vtkm::Float64 tolerance = 0.0001) +static inline VTKM_EXEC_CONT bool test_equal(const vtkm::Range& range1, const vtkm::Range& range2, + vtkm::Float64 tolerance = 0.0001) { return (test_equal(range1.Min, range2.Min, tolerance) && test_equal(range1.Max, range2.Max, tolerance)); @@ -527,35 +485,32 @@ bool test_equal(const vtkm::Range &range1, /// Special implementation of test_equal for Bounds. /// -static inline VTKM_EXEC_CONT -bool test_equal(const vtkm::Bounds &bounds1, - const vtkm::Bounds &bounds2, - vtkm::Float64 tolerance = 0.0001) +static inline VTKM_EXEC_CONT bool test_equal(const vtkm::Bounds& bounds1, + const vtkm::Bounds& bounds2, + vtkm::Float64 tolerance = 0.0001) { return (test_equal(bounds1.X, bounds2.X, tolerance) && test_equal(bounds1.Y, bounds2.Y, tolerance) && test_equal(bounds1.Z, bounds2.Z, tolerance)); } -template -static inline VTKM_EXEC_CONT -T TestValue(vtkm::Id index, T, vtkm::TypeTraitsIntegerTag) +template +static inline VTKM_EXEC_CONT T TestValue(vtkm::Id index, T, vtkm::TypeTraitsIntegerTag) { if (sizeof(T) > 2) { - return T(index*100); + return T(index * 100); } else { - return T(index+100); + return T(index + 100); } } -template -static inline VTKM_EXEC_CONT -T TestValue(vtkm::Id index, T, vtkm::TypeTraitsRealTag) +template +static inline VTKM_EXEC_CONT T TestValue(vtkm::Id index, T, vtkm::TypeTraitsRealTag) { - return T(0.01*static_cast(index) + 1.001); + return T(0.01 * static_cast(index) + 1.001); } /// Many tests involve getting and setting values in some index-based structure @@ -563,17 +518,16 @@ T TestValue(vtkm::Id index, T, vtkm::TypeTraitsRealTag) /// overloaded TestValue function returns some unique value for an index for a /// given type. Different types might give different values. /// -template -static inline VTKM_EXEC_CONT -T TestValue(vtkm::Id index, T) +template +static inline VTKM_EXEC_CONT T TestValue(vtkm::Id index, T) { return TestValue(index, T(), typename vtkm::TypeTraits::NumericTag()); } -template -static inline VTKM_EXEC_CONT -vtkm::Vec TestValue(vtkm::Id index, vtkm::Vec) { - vtkm::Vec value; +template +static inline VTKM_EXEC_CONT vtkm::Vec TestValue(vtkm::Id index, vtkm::Vec) +{ + vtkm::Vec value; for (vtkm::IdComponent i = 0; i < N; i++) { value[i] = T(TestValue(index, T()) + T(i + 1)); @@ -581,8 +535,8 @@ vtkm::Vec TestValue(vtkm::Id index, vtkm::Vec) { return value; } -static inline VTKM_CONT -std::string TestValue(vtkm::Id index, std::string) { +static inline VTKM_CONT std::string TestValue(vtkm::Id index, std::string) +{ std::stringstream stream; stream << index; return stream.str(); @@ -591,9 +545,8 @@ std::string TestValue(vtkm::Id index, std::string) { /// Verifies that the contents of the given array portal match the values /// returned by vtkm::testing::TestValue. /// -template -static inline VTKM_CONT -void CheckPortal(const PortalType &portal) +template +static inline VTKM_CONT void CheckPortal(const PortalType& portal) { typedef typename PortalType::ValueType ValueType; @@ -605,8 +558,7 @@ void CheckPortal(const PortalType &portal) { std::stringstream message; message << "Got unexpected value in array." << std::endl - << "Expected: " << expectedValue - << ", Found: " << foundValue << std::endl; + << "Expected: " << expectedValue << ", Found: " << foundValue << std::endl; VTKM_TEST_FAIL(message.str().c_str()); } } @@ -615,9 +567,8 @@ void CheckPortal(const PortalType &portal) /// Sets all the values in a given array portal to be the values returned /// by vtkm::testing::TestValue. The ArrayPortal must be allocated first. /// -template -static inline VTKM_CONT -void SetPortal(const PortalType &portal) +template +static inline VTKM_CONT void SetPortal(const PortalType& portal) { typedef typename PortalType::ValueType ValueType; diff --git a/vtkm/testing/TestingMath.h b/vtkm/testing/TestingMath.h index 26c6c219d..c8ec7d59f 100644 --- a/vtkm/testing/TestingMath.h +++ b/vtkm/testing/TestingMath.h @@ -33,124 +33,117 @@ #include -#define VTKM_MATH_ASSERT(condition, message) \ - if (!(condition)) \ - { \ - this->RaiseError(message); \ +#define VTKM_MATH_ASSERT(condition, message) \ + if (!(condition)) \ + { \ + this->RaiseError(message); \ } //----------------------------------------------------------------------------- -namespace UnitTestMathNamespace { +namespace UnitTestMathNamespace +{ const vtkm::IdComponent NUM_NUMBERS = 5; VTKM_EXEC_CONSTANT const vtkm::Float64 NumberList[NUM_NUMBERS] = { 0.25, 0.5, 1.0, 2.0, 3.75 }; VTKM_EXEC_CONSTANT -const vtkm::Float64 AngleList[NUM_NUMBERS] = - { 0.643501108793284, // angle for 3, 4, 5 triangle. - 0.78539816339745, // pi/4 - 0.5235987755983, // pi/6 - 1.0471975511966, // pi/3 - 0.0 }; +const vtkm::Float64 AngleList[NUM_NUMBERS] = { 0.643501108793284, // angle for 3, 4, 5 triangle. + 0.78539816339745, // pi/4 + 0.5235987755983, // pi/6 + 1.0471975511966, // pi/3 + 0.0 }; VTKM_EXEC_CONSTANT -const vtkm::Float64 OppositeList[NUM_NUMBERS] = { 3.0, 1.0, 1.0, 1.732050807568877 /*sqrt(3)*/, 0.0 }; +const vtkm::Float64 OppositeList[NUM_NUMBERS] = { 3.0, 1.0, 1.0, 1.732050807568877 /*sqrt(3)*/, + 0.0 }; VTKM_EXEC_CONSTANT -const vtkm::Float64 AdjacentList[NUM_NUMBERS] = { 4.0, 1.0, 1.732050807568877 /*sqrt(3)*/, 1.0, 1.0 }; +const vtkm::Float64 AdjacentList[NUM_NUMBERS] = { 4.0, 1.0, 1.732050807568877 /*sqrt(3)*/, 1.0, + 1.0 }; VTKM_EXEC_CONSTANT -const vtkm::Float64 HypotenuseList[NUM_NUMBERS] = { 5.0, 1.414213562373095 /*sqrt(2)*/, 2.0, 2.0, 1.0 }; +const vtkm::Float64 HypotenuseList[NUM_NUMBERS] = { 5.0, 1.414213562373095 /*sqrt(2)*/, 2.0, 2.0, + 1.0 }; VTKM_EXEC_CONSTANT -const vtkm::Float64 NumeratorList[NUM_NUMBERS] = { 6.5, 5.8, 9.3, 77.0, 0.1 }; +const vtkm::Float64 NumeratorList[NUM_NUMBERS] = { 6.5, 5.8, 9.3, 77.0, 0.1 }; VTKM_EXEC_CONSTANT const vtkm::Float64 DenominatorList[NUM_NUMBERS] = { 2.3, 1.6, 3.1, 19.0, 0.4 }; VTKM_EXEC_CONSTANT -const vtkm::Float64 FModRemainderList[NUM_NUMBERS]={ 1.9, 1.0, 0.0, 1.0, 0.1 }; +const vtkm::Float64 FModRemainderList[NUM_NUMBERS] = { 1.9, 1.0, 0.0, 1.0, 0.1 }; VTKM_EXEC_CONSTANT -const vtkm::Float64 RemainderList[NUM_NUMBERS] = {-0.4,-0.6, 0.0, 1.0, 0.1 }; +const vtkm::Float64 RemainderList[NUM_NUMBERS] = { -0.4, -0.6, 0.0, 1.0, 0.1 }; VTKM_EXEC_CONSTANT -const vtkm::Int64 QuotientList[NUM_NUMBERS] = { 3 , 4 , 3 , 4 , 0 }; +const vtkm::Int64 QuotientList[NUM_NUMBERS] = { 3, 4, 3, 4, 0 }; VTKM_EXEC_CONSTANT -const vtkm::Float64 XList[NUM_NUMBERS] = {4.6, 0.1, 73.4, 55.0, 3.75 }; +const vtkm::Float64 XList[NUM_NUMBERS] = { 4.6, 0.1, 73.4, 55.0, 3.75 }; VTKM_EXEC_CONSTANT -const vtkm::Float64 FractionalList[NUM_NUMBERS] = {0.6, 0.1, 0.4, 0.0, 0.75 }; +const vtkm::Float64 FractionalList[NUM_NUMBERS] = { 0.6, 0.1, 0.4, 0.0, 0.75 }; VTKM_EXEC_CONSTANT -const vtkm::Float64 FloorList[NUM_NUMBERS] = {4.0, 0.0, 73.0, 55.0, 3.0 }; +const vtkm::Float64 FloorList[NUM_NUMBERS] = { 4.0, 0.0, 73.0, 55.0, 3.0 }; VTKM_EXEC_CONSTANT -const vtkm::Float64 CeilList[NUM_NUMBERS] = {5.0, 1.0, 74.0, 55.0, 4.0 }; +const vtkm::Float64 CeilList[NUM_NUMBERS] = { 5.0, 1.0, 74.0, 55.0, 4.0 }; VTKM_EXEC_CONSTANT -const vtkm::Float64 RoundList[NUM_NUMBERS] = {5.0, 0.0, 73.0, 55.0, 4.0 }; +const vtkm::Float64 RoundList[NUM_NUMBERS] = { 5.0, 0.0, 73.0, 55.0, 4.0 }; //----------------------------------------------------------------------------- -template +template struct ScalarFieldTests : public vtkm::exec::FunctorBase { VTKM_EXEC void TestPi() const { -// std::cout << "Testing Pi" << std::endl; + // std::cout << "Testing Pi" << std::endl; VTKM_MATH_ASSERT(test_equal(vtkm::Pi(), 3.14159265), "Pi not correct."); } VTKM_EXEC void TestArcTan2() const { -// std::cout << "Testing arc tan 2" << std::endl; + // std::cout << "Testing arc tan 2" << std::endl; - VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(0.0), T(1.0)), - T(0.0)), - "ATan2 x+ axis."); - VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(1.0), T(0.0)), - T(0.5*vtkm::Pi())), + VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(0.0), T(1.0)), T(0.0)), "ATan2 x+ axis."); + VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(1.0), T(0.0)), T(0.5 * vtkm::Pi())), "ATan2 y+ axis."); - VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(-1.0), T(0.0)), - T(-0.5*vtkm::Pi())), + VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(-1.0), T(0.0)), T(-0.5 * vtkm::Pi())), "ATan2 y- axis."); - VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(1.0), T(1.0)), - T(0.25*vtkm::Pi())), + VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(1.0), T(1.0)), T(0.25 * vtkm::Pi())), "ATan2 Quadrant 1"); - VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(1.0), T(-1.0)), - T(0.75*vtkm::Pi())), + VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(1.0), T(-1.0)), T(0.75 * vtkm::Pi())), "ATan2 Quadrant 2"); - VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(-1.0), T(-1.0)), - T(-0.75*vtkm::Pi())), + VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(-1.0), T(-1.0)), T(-0.75 * vtkm::Pi())), "ATan2 Quadrant 3"); - VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(-1.0), T(1.0)), - T(-0.25*vtkm::Pi())), + VTKM_MATH_ASSERT(test_equal(vtkm::ATan2(T(-1.0), T(1.0)), T(-0.25 * vtkm::Pi())), "ATan2 Quadrant 4"); } VTKM_EXEC void TestPow() const { -// std::cout << "Running power tests." << std::endl; + // std::cout << "Running power tests." << std::endl; for (vtkm::IdComponent index = 0; index < NUM_NUMBERS; index++) - { + { T x = static_cast(NumberList[index]); T powx = vtkm::Pow(x, static_cast(2.0)); - T sqrx = x*x; + T sqrx = x * x; VTKM_MATH_ASSERT(test_equal(powx, sqrx), "Power gave wrong result."); - } + } } VTKM_EXEC void TestLog2() const { -// std::cout << "Testing Log2" << std::endl; - VTKM_MATH_ASSERT(test_equal(vtkm::Log2(T(0.25)), T(-2.0)), + // std::cout << "Testing Log2" << std::endl; + VTKM_MATH_ASSERT(test_equal(vtkm::Log2(T(0.25)), T(-2.0)), "Bad value from Log2"); + VTKM_MATH_ASSERT(test_equal(vtkm::Log2(vtkm::Vec(0.5, 1.0, 2.0, 4.0)), + vtkm::Vec(-1.0, 0.0, 1.0, 2.0)), "Bad value from Log2"); - VTKM_MATH_ASSERT( - test_equal(vtkm::Log2(vtkm::Vec(0.5, 1.0, 2.0, 4.0)), - vtkm::Vec(-1.0, 0.0, 1.0, 2.0)), - "Bad value from Log2"); } VTKM_EXEC void TestNonFinites() const { -// std::cout << "Testing non-finites." << std::endl; + // std::cout << "Testing non-finites." << std::endl; T zero = 0.0; T finite = 1.0; @@ -203,7 +196,7 @@ struct ScalarFieldTests : public vtkm::exec::FunctorBase VTKM_EXEC void TestRemainders() const { -// std::cout << "Testing remainders." << std::endl; + // std::cout << "Testing remainders." << std::endl; for (vtkm::IdComponent index = 0; index < NUM_NUMBERS; index++) { T numerator = static_cast(NumeratorList[index]); @@ -219,15 +212,14 @@ struct ScalarFieldTests : public vtkm::exec::FunctorBase vtkm::Int64 q; VTKM_MATH_ASSERT(test_equal(vtkm::RemainderQuotient(numerator, denominator, q), remainder), "Bad remainder-quotient remainder."); - VTKM_MATH_ASSERT(test_equal(q, quotient), - "Bad reminder-quotient quotient."); + VTKM_MATH_ASSERT(test_equal(q, quotient), "Bad reminder-quotient quotient."); } } VTKM_EXEC void TestRound() const { -// std::cout << "Testing round." << std::endl; + // std::cout << "Testing round." << std::endl; for (vtkm::IdComponent index = 0; index < NUM_NUMBERS; index++) { T x = static_cast(XList[index]); @@ -237,23 +229,19 @@ struct ScalarFieldTests : public vtkm::exec::FunctorBase T round = static_cast(RoundList[index]); T intPart; - VTKM_MATH_ASSERT(test_equal(vtkm::ModF(x,intPart), fractional), + VTKM_MATH_ASSERT(test_equal(vtkm::ModF(x, intPart), fractional), "ModF returned wrong fractional part."); - VTKM_MATH_ASSERT(test_equal(intPart, floor), - "ModF returned wrong integral part."); - VTKM_MATH_ASSERT(test_equal(vtkm::Floor(x), floor), - "Bad floor."); - VTKM_MATH_ASSERT(test_equal(vtkm::Ceil(x), ceil), - "Bad ceil."); - VTKM_MATH_ASSERT(test_equal(vtkm::Round(x), round), - "Bad round."); + VTKM_MATH_ASSERT(test_equal(intPart, floor), "ModF returned wrong integral part."); + VTKM_MATH_ASSERT(test_equal(vtkm::Floor(x), floor), "Bad floor."); + VTKM_MATH_ASSERT(test_equal(vtkm::Ceil(x), ceil), "Bad ceil."); + VTKM_MATH_ASSERT(test_equal(vtkm::Round(x), round), "Bad round."); } } VTKM_EXEC void TestIsNegative() const { -// std::cout << "Testing SignBit and IsNegative." << std::endl; + // std::cout << "Testing SignBit and IsNegative." << std::endl; T x = 0; VTKM_MATH_ASSERT(vtkm::SignBit(x) == 0, "SignBit wrong for 0."); VTKM_MATH_ASSERT(!vtkm::IsNegative(x), "IsNegative wrong for 0."); @@ -289,354 +277,307 @@ struct ScalarFieldTests : public vtkm::exec::FunctorBase } }; -template +template struct TryScalarFieldTests { - template + template void operator()(const T&) const { - vtkm::cont::DeviceAdapterAlgorithm::Schedule( - ScalarFieldTests(), 1); + vtkm::cont::DeviceAdapterAlgorithm::Schedule(ScalarFieldTests(), 1); } }; //----------------------------------------------------------------------------- -template +template struct ScalarVectorFieldTests : public vtkm::exec::FunctorBase { typedef vtkm::VecTraits Traits; typedef typename Traits::ComponentType ComponentType; - enum { + enum + { NUM_COMPONENTS = Traits::NUM_COMPONENTS }; VTKM_EXEC void TestTriangleTrig() const { -// std::cout << "Testing normal trig functions." << std::endl; + // std::cout << "Testing normal trig functions." << std::endl; - for (vtkm::IdComponent index = 0; - index < NUM_NUMBERS - NUM_COMPONENTS + 1; - index++) + for (vtkm::IdComponent index = 0; index < NUM_NUMBERS - NUM_COMPONENTS + 1; index++) { VectorType angle; VectorType opposite; VectorType adjacent; VectorType hypotenuse; - for (vtkm::IdComponent componentIndex = 0; - componentIndex < NUM_COMPONENTS; - componentIndex++) + for (vtkm::IdComponent componentIndex = 0; componentIndex < NUM_COMPONENTS; componentIndex++) { - Traits::SetComponent( - angle, - componentIndex, - static_cast(AngleList[componentIndex+index])); - Traits::SetComponent( - opposite, - componentIndex, - static_cast(OppositeList[componentIndex+index])); - Traits::SetComponent( - adjacent, - componentIndex, - static_cast(AdjacentList[componentIndex+index])); - Traits::SetComponent( - hypotenuse, - componentIndex, - static_cast(HypotenuseList[componentIndex+index])); + Traits::SetComponent(angle, componentIndex, + static_cast(AngleList[componentIndex + index])); + Traits::SetComponent(opposite, componentIndex, + static_cast(OppositeList[componentIndex + index])); + Traits::SetComponent(adjacent, componentIndex, + static_cast(AdjacentList[componentIndex + index])); + Traits::SetComponent(hypotenuse, componentIndex, + static_cast(HypotenuseList[componentIndex + index])); } - VTKM_MATH_ASSERT(test_equal(vtkm::Sin(angle), opposite/hypotenuse), - "Sin failed test."); - VTKM_MATH_ASSERT(test_equal(vtkm::Cos(angle), adjacent/hypotenuse), - "Cos failed test."); - VTKM_MATH_ASSERT(test_equal(vtkm::Tan(angle), opposite/adjacent), - "Tan failed test."); + VTKM_MATH_ASSERT(test_equal(vtkm::Sin(angle), opposite / hypotenuse), "Sin failed test."); + VTKM_MATH_ASSERT(test_equal(vtkm::Cos(angle), adjacent / hypotenuse), "Cos failed test."); + VTKM_MATH_ASSERT(test_equal(vtkm::Tan(angle), opposite / adjacent), "Tan failed test."); - VTKM_MATH_ASSERT(test_equal(vtkm::ASin(opposite/hypotenuse), angle), - "Arc Sin failed test."); + VTKM_MATH_ASSERT(test_equal(vtkm::ASin(opposite / hypotenuse), angle), + "Arc Sin failed test."); #if defined(VTKM_ICC) -// When the intel compiler has vectorization enabled ( -O2/-O3 ) it converts the -// `adjacent/hypotenuse` divide operation into reciprocal (rcpps) and -// multiply (mulps) operations. This causes a change in the expected result that -// is larger than the default tolerance of test_equal. -// - VTKM_MATH_ASSERT(test_equal(vtkm::ACos(adjacent/hypotenuse), angle, 0.0004), - "Arc Cos failed test."); + // When the intel compiler has vectorization enabled ( -O2/-O3 ) it converts the + // `adjacent/hypotenuse` divide operation into reciprocal (rcpps) and + // multiply (mulps) operations. This causes a change in the expected result that + // is larger than the default tolerance of test_equal. + // + VTKM_MATH_ASSERT(test_equal(vtkm::ACos(adjacent / hypotenuse), angle, 0.0004), + "Arc Cos failed test."); #else - VTKM_MATH_ASSERT(test_equal(vtkm::ACos(adjacent/hypotenuse), angle), - "Arc Cos failed test."); + VTKM_MATH_ASSERT(test_equal(vtkm::ACos(adjacent / hypotenuse), angle), + "Arc Cos failed test."); #endif - VTKM_MATH_ASSERT(test_equal(vtkm::ATan(opposite/adjacent), angle), - "Arc Tan failed test."); + VTKM_MATH_ASSERT(test_equal(vtkm::ATan(opposite / adjacent), angle), "Arc Tan failed test."); } } VTKM_EXEC void TestHyperbolicTrig() const { -// std::cout << "Testing hyperbolic trig functions." << std::endl; + // std::cout << "Testing hyperbolic trig functions." << std::endl; const VectorType zero(0); const VectorType half(0.5); - for (vtkm::IdComponent index = 0; - index < NUM_NUMBERS - NUM_COMPONENTS + 1; - index++) + for (vtkm::IdComponent index = 0; index < NUM_NUMBERS - NUM_COMPONENTS + 1; index++) { VectorType x; - for (vtkm::IdComponent componentIndex = 0; - componentIndex < NUM_COMPONENTS; - componentIndex++) + for (vtkm::IdComponent componentIndex = 0; componentIndex < NUM_COMPONENTS; componentIndex++) { - Traits::SetComponent( - x, - componentIndex, - static_cast(AngleList[componentIndex+index])); + Traits::SetComponent(x, componentIndex, + static_cast(AngleList[componentIndex + index])); } const VectorType minusX = zero - x; - VTKM_MATH_ASSERT(test_equal(vtkm::SinH(x), - half*(vtkm::Exp(x) - vtkm::Exp(minusX))), - "SinH does not match definition."); - VTKM_MATH_ASSERT(test_equal(vtkm::CosH(x), - half*(vtkm::Exp(x) + vtkm::Exp(minusX))), - "SinH does not match definition."); - VTKM_MATH_ASSERT(test_equal(vtkm::TanH(x), vtkm::SinH(x)/vtkm::CosH(x)), - "TanH does not match definition"); + VTKM_MATH_ASSERT(test_equal(vtkm::SinH(x), half * (vtkm::Exp(x) - vtkm::Exp(minusX))), + "SinH does not match definition."); + VTKM_MATH_ASSERT(test_equal(vtkm::CosH(x), half * (vtkm::Exp(x) + vtkm::Exp(minusX))), + "SinH does not match definition."); + VTKM_MATH_ASSERT(test_equal(vtkm::TanH(x), vtkm::SinH(x) / vtkm::CosH(x)), + "TanH does not match definition"); - VTKM_MATH_ASSERT(test_equal(vtkm::ASinH(vtkm::SinH(x)), x), - "SinH not inverting."); - VTKM_MATH_ASSERT(test_equal(vtkm::ACosH(vtkm::CosH(x)), x), - "CosH not inverting."); - VTKM_MATH_ASSERT(test_equal(vtkm::ATanH(vtkm::TanH(x)), x), - "TanH not inverting."); + VTKM_MATH_ASSERT(test_equal(vtkm::ASinH(vtkm::SinH(x)), x), "SinH not inverting."); + VTKM_MATH_ASSERT(test_equal(vtkm::ACosH(vtkm::CosH(x)), x), "CosH not inverting."); + VTKM_MATH_ASSERT(test_equal(vtkm::ATanH(vtkm::TanH(x)), x), "TanH not inverting."); } } - template - VTKM_EXEC - void RaiseToTest(FunctionType function, - ComponentType exponent) const + template + VTKM_EXEC void RaiseToTest(FunctionType function, ComponentType exponent) const { - for (vtkm::IdComponent index = 0; - index < NUM_NUMBERS - NUM_COMPONENTS + 1; - index++) + for (vtkm::IdComponent index = 0; index < NUM_NUMBERS - NUM_COMPONENTS + 1; index++) { VectorType original; VectorType raiseresult; - for (vtkm::IdComponent componentIndex = 0; - componentIndex < NUM_COMPONENTS; - componentIndex++) + for (vtkm::IdComponent componentIndex = 0; componentIndex < NUM_COMPONENTS; componentIndex++) { - ComponentType x = - static_cast(NumberList[componentIndex + index]); + ComponentType x = static_cast(NumberList[componentIndex + index]); Traits::SetComponent(original, componentIndex, x); Traits::SetComponent(raiseresult, componentIndex, vtkm::Pow(x, exponent)); } VectorType mathresult = function(original); - VTKM_MATH_ASSERT(test_equal(mathresult, raiseresult), - "Exponent functions do not agree."); + VTKM_MATH_ASSERT(test_equal(mathresult, raiseresult), "Exponent functions do not agree."); } } - struct SqrtFunctor { + struct SqrtFunctor + { VTKM_EXEC VectorType operator()(VectorType x) const { return vtkm::Sqrt(x); } }; VTKM_EXEC void TestSqrt() const { -// std::cout << " Testing Sqrt" << std::endl; + // std::cout << " Testing Sqrt" << std::endl; RaiseToTest(SqrtFunctor(), 0.5); } - struct RSqrtFunctor { + struct RSqrtFunctor + { VTKM_EXEC - VectorType operator()(VectorType x) const {return vtkm::RSqrt(x);} + VectorType operator()(VectorType x) const { return vtkm::RSqrt(x); } }; VTKM_EXEC void TestRSqrt() const { -// std::cout << " Testing RSqrt"<< std::endl; + // std::cout << " Testing RSqrt"<< std::endl; RaiseToTest(RSqrtFunctor(), -0.5); } - struct CbrtFunctor { + struct CbrtFunctor + { VTKM_EXEC VectorType operator()(VectorType x) const { return vtkm::Cbrt(x); } }; VTKM_EXEC void TestCbrt() const { -// std::cout << " Testing Cbrt" << std::endl; - RaiseToTest(CbrtFunctor(), vtkm::Float32(1.0/3.0)); + // std::cout << " Testing Cbrt" << std::endl; + RaiseToTest(CbrtFunctor(), vtkm::Float32(1.0 / 3.0)); } - struct RCbrtFunctor { + struct RCbrtFunctor + { VTKM_EXEC - VectorType operator()(VectorType x) const {return vtkm::RCbrt(x);} + VectorType operator()(VectorType x) const { return vtkm::RCbrt(x); } }; VTKM_EXEC void TestRCbrt() const { -// std::cout << " Testing RCbrt" << std::endl; - RaiseToTest(RCbrtFunctor(), vtkm::Float32(-1.0/3.0)); + // std::cout << " Testing RCbrt" << std::endl; + RaiseToTest(RCbrtFunctor(), vtkm::Float32(-1.0 / 3.0)); } - template - VTKM_EXEC - void RaiseByTest(FunctionType function, - ComponentType base, - ComponentType exponentbias = 0.0, - ComponentType resultbias = 0.0) const + template + VTKM_EXEC void RaiseByTest(FunctionType function, ComponentType base, + ComponentType exponentbias = 0.0, ComponentType resultbias = 0.0) const { - for (vtkm::IdComponent index = 0; - index < NUM_NUMBERS - NUM_COMPONENTS + 1; - index++) + for (vtkm::IdComponent index = 0; index < NUM_NUMBERS - NUM_COMPONENTS + 1; index++) { VectorType original; VectorType raiseresult; - for (vtkm::IdComponent componentIndex = 0; - componentIndex < NUM_COMPONENTS; - componentIndex++) + for (vtkm::IdComponent componentIndex = 0; componentIndex < NUM_COMPONENTS; componentIndex++) { - ComponentType x = - static_cast(NumberList[componentIndex + index]); + ComponentType x = static_cast(NumberList[componentIndex + index]); Traits::SetComponent(original, componentIndex, x); - Traits::SetComponent(raiseresult, - componentIndex, + Traits::SetComponent(raiseresult, componentIndex, vtkm::Pow(base, x + exponentbias) + resultbias); } VectorType mathresult = function(original); - VTKM_MATH_ASSERT(test_equal(mathresult, raiseresult), - "Exponent functions do not agree."); + VTKM_MATH_ASSERT(test_equal(mathresult, raiseresult), "Exponent functions do not agree."); } } - struct ExpFunctor { + struct ExpFunctor + { VTKM_EXEC - VectorType operator()(VectorType x) const {return vtkm::Exp(x);} + VectorType operator()(VectorType x) const { return vtkm::Exp(x); } }; VTKM_EXEC void TestExp() const { -// std::cout << " Testing Exp" << std::endl; + // std::cout << " Testing Exp" << std::endl; RaiseByTest(ExpFunctor(), vtkm::Float32(2.71828183)); } - struct Exp2Functor { + struct Exp2Functor + { VTKM_EXEC - VectorType operator()(VectorType x) const {return vtkm::Exp2(x);} + VectorType operator()(VectorType x) const { return vtkm::Exp2(x); } }; VTKM_EXEC void TestExp2() const { -// std::cout << " Testing Exp2" << std::endl; + // std::cout << " Testing Exp2" << std::endl; RaiseByTest(Exp2Functor(), 2.0); } - struct ExpM1Functor { + struct ExpM1Functor + { VTKM_EXEC - VectorType operator()(VectorType x) const {return vtkm::ExpM1(x);} + VectorType operator()(VectorType x) const { return vtkm::ExpM1(x); } }; VTKM_EXEC void TestExpM1() const { -// std::cout << " Testing ExpM1" << std::endl; - RaiseByTest(ExpM1Functor(), - ComponentType(2.71828183), - 0.0, - -1.0); + // std::cout << " Testing ExpM1" << std::endl; + RaiseByTest(ExpM1Functor(), ComponentType(2.71828183), 0.0, -1.0); } - struct Exp10Functor { + struct Exp10Functor + { VTKM_EXEC - VectorType operator()(VectorType x) const {return vtkm::Exp10(x);} + VectorType operator()(VectorType x) const { return vtkm::Exp10(x); } }; VTKM_EXEC void TestExp10() const { -// std::cout << " Testing Exp10" << std::endl; + // std::cout << " Testing Exp10" << std::endl; RaiseByTest(Exp10Functor(), 10.0); } - template - VTKM_EXEC - void LogBaseTest(FunctionType function, - ComponentType base, - ComponentType bias=0.0) const + template + VTKM_EXEC void LogBaseTest(FunctionType function, ComponentType base, + ComponentType bias = 0.0) const { - for (vtkm::IdComponent index = 0; - index < NUM_NUMBERS - NUM_COMPONENTS + 1; - index++) + for (vtkm::IdComponent index = 0; index < NUM_NUMBERS - NUM_COMPONENTS + 1; index++) { VectorType basevector(base); VectorType original; VectorType biased; - for (vtkm::IdComponent componentIndex = 0; - componentIndex < NUM_COMPONENTS; - componentIndex++) + for (vtkm::IdComponent componentIndex = 0; componentIndex < NUM_COMPONENTS; componentIndex++) { - ComponentType x = - static_cast(NumberList[componentIndex + index]); + ComponentType x = static_cast(NumberList[componentIndex + index]); Traits::SetComponent(original, componentIndex, x); Traits::SetComponent(biased, componentIndex, x + bias); } - VectorType logresult = vtkm::Log2(biased)/vtkm::Log2(basevector); + VectorType logresult = vtkm::Log2(biased) / vtkm::Log2(basevector); VectorType mathresult = function(original); - VTKM_MATH_ASSERT(test_equal(mathresult, logresult), - "Exponent functions do not agree."); + VTKM_MATH_ASSERT(test_equal(mathresult, logresult), "Exponent functions do not agree."); } } - struct LogFunctor { + struct LogFunctor + { VTKM_EXEC - VectorType operator()(VectorType x) const {return vtkm::Log(x);} + VectorType operator()(VectorType x) const { return vtkm::Log(x); } }; VTKM_EXEC void TestLog() const { -// std::cout << " Testing Log" << std::endl; + // std::cout << " Testing Log" << std::endl; LogBaseTest(LogFunctor(), vtkm::Float32(2.71828183)); } - struct Log10Functor { + struct Log10Functor + { VTKM_EXEC - VectorType operator()(VectorType x) const {return vtkm::Log10(x);} + VectorType operator()(VectorType x) const { return vtkm::Log10(x); } }; VTKM_EXEC void TestLog10() const { -// std::cout << " Testing Log10" << std::endl; + // std::cout << " Testing Log10" << std::endl; LogBaseTest(Log10Functor(), 10.0); } - struct Log1PFunctor { + struct Log1PFunctor + { VTKM_EXEC - VectorType operator()(VectorType x) const {return vtkm::Log1P(x);} + VectorType operator()(VectorType x) const { return vtkm::Log1P(x); } }; VTKM_EXEC void TestLog1P() const { -// std::cout << " Testing Log1P" << std::endl; - LogBaseTest(Log1PFunctor(), - ComponentType(2.71828183), - 1.0); + // std::cout << " Testing Log1P" << std::endl; + LogBaseTest(Log1PFunctor(), ComponentType(2.71828183), 1.0); } VTKM_EXEC void TestCopySign() const { -// std::cout << "Testing CopySign." << std::endl; + // std::cout << "Testing CopySign." << std::endl; // Assuming all TestValues positive. VectorType positive1 = TestValue(1, VectorType()); VectorType positive2 = TestValue(2, VectorType()); @@ -673,19 +614,18 @@ struct ScalarVectorFieldTests : public vtkm::exec::FunctorBase } }; -template +template struct TryScalarVectorFieldTests { - template + template void operator()(const VectorType&) const { - vtkm::cont::DeviceAdapterAlgorithm::Schedule( - ScalarVectorFieldTests(), 1); + vtkm::cont::DeviceAdapterAlgorithm::Schedule(ScalarVectorFieldTests(), 1); } }; //----------------------------------------------------------------------------- -template +template struct AllTypesTests : public vtkm::exec::FunctorBase { VTKM_EXEC @@ -693,7 +633,7 @@ struct AllTypesTests : public vtkm::exec::FunctorBase { T low = TestValue(2, T()); T high = TestValue(10, T()); -// std::cout << "Testing min/max " << low << " " << high << std::endl; + // std::cout << "Testing min/max " << low << " " << high << std::endl; VTKM_MATH_ASSERT(test_equal(vtkm::Min(low, high), low), "Wrong min."); VTKM_MATH_ASSERT(test_equal(vtkm::Min(high, low), low), "Wrong min."); VTKM_MATH_ASSERT(test_equal(vtkm::Max(low, high), high), "Wrong max."); @@ -711,73 +651,64 @@ struct AllTypesTests : public vtkm::exec::FunctorBase } VTKM_EXEC - void operator()(vtkm::Id) const - { - this->TestMinMax(); - } + void operator()(vtkm::Id) const { this->TestMinMax(); } }; -template +template struct TryAllTypesTests { - template + template void operator()(const T&) const { - vtkm::cont::DeviceAdapterAlgorithm::Schedule( - AllTypesTests(), 1); + vtkm::cont::DeviceAdapterAlgorithm::Schedule(AllTypesTests(), 1); } }; //----------------------------------------------------------------------------- -template +template struct AbsTests : public vtkm::exec::FunctorBase { VTKM_EXEC - void operator()(vtkm::Id index) const { -// std::cout << "Testing Abs." << std::endl; - T positive = TestValue(index, T()); // Assuming all TestValues positive. + void operator()(vtkm::Id index) const + { + // std::cout << "Testing Abs." << std::endl; + T positive = TestValue(index, T()); // Assuming all TestValues positive. T negative = -positive; - VTKM_MATH_ASSERT(test_equal(vtkm::Abs(positive), positive), - "Abs returned wrong value."); - VTKM_MATH_ASSERT(test_equal(vtkm::Abs(negative), positive), - "Abs returned wrong value."); + VTKM_MATH_ASSERT(test_equal(vtkm::Abs(positive), positive), "Abs returned wrong value."); + VTKM_MATH_ASSERT(test_equal(vtkm::Abs(negative), positive), "Abs returned wrong value."); } }; -template +template struct TryAbsTests { - template + template void operator()(const T&) const { - vtkm::cont::DeviceAdapterAlgorithm::Schedule( - AbsTests(), 10); + vtkm::cont::DeviceAdapterAlgorithm::Schedule(AbsTests(), 10); } }; struct TypeListTagAbs - : vtkm::ListTagJoin< - vtkm::ListTagJoin< - vtkm::ListTagBase, - vtkm::TypeListTagIndex>, - vtkm::TypeListTagField> { }; + : vtkm::ListTagJoin< + vtkm::ListTagJoin, vtkm::TypeListTagIndex>, + vtkm::TypeListTagField> +{ +}; //----------------------------------------------------------------------------- -template +template void RunMathTests() { std::cout << "Tests for scalar types." << std::endl; - vtkm::testing::Testing::TryTypes(TryScalarFieldTests(), - vtkm::TypeListTagFieldScalar()); + vtkm::testing::Testing::TryTypes(TryScalarFieldTests(), vtkm::TypeListTagFieldScalar()); std::cout << "Test for scalar and vector types." << std::endl; - vtkm::testing::Testing::TryTypes(TryScalarVectorFieldTests(), - vtkm::TypeListTagField()); + vtkm::testing::Testing::TryTypes(TryScalarVectorFieldTests(), vtkm::TypeListTagField()); std::cout << "Test for exemplar types." << std::endl; vtkm::testing::Testing::TryTypes(TryAllTypesTests()); std::cout << "Test all Abs types" << std::endl; - vtkm::testing::Testing::TryTypes(TryAbsTests(), - TypeListTagAbs()); + vtkm::testing::Testing::TryTypes(TryAbsTests(), TypeListTagAbs()); } } // namespace UnitTestMathNamespace diff --git a/vtkm/testing/UnitTestBinaryOperators.cxx b/vtkm/testing/UnitTestBinaryOperators.cxx index 6ef42f179..8b1f8a6bf 100644 --- a/vtkm/testing/UnitTestBinaryOperators.cxx +++ b/vtkm/testing/UnitTestBinaryOperators.cxx @@ -22,65 +22,64 @@ #include -namespace { +namespace +{ //general pair test template -void BinaryOperatorTest( ) -{ +void BinaryOperatorTest(){ //Not using TestValue method as it causes roll-over to occur with //uint8 and int8 leading to unexpected comparisons. //test Sum - { - vtkm::Sum sum; - T result; + { vtkm::Sum sum; +T result; - result = sum( vtkm::TypeTraits::ZeroInitialization(), T(1)); - VTKM_TEST_ASSERT( result == T(1), "Sum wrong."); +result = sum(vtkm::TypeTraits::ZeroInitialization(), T(1)); +VTKM_TEST_ASSERT(result == T(1), "Sum wrong."); - result = sum( T(1), T(1)); - VTKM_TEST_ASSERT( result == T(2), "Sum wrong."); - } +result = sum(T(1), T(1)); +VTKM_TEST_ASSERT(result == T(2), "Sum wrong."); +} - //test Product - { +//test Product +{ vtkm::Product product; T result; - result = product( vtkm::TypeTraits::ZeroInitialization(), T(1)); - VTKM_TEST_ASSERT( result == vtkm::TypeTraits::ZeroInitialization(), "Product wrong."); + result = product(vtkm::TypeTraits::ZeroInitialization(), T(1)); + VTKM_TEST_ASSERT(result == vtkm::TypeTraits::ZeroInitialization(), "Product wrong."); - result = product( T(1), T(1)); - VTKM_TEST_ASSERT( result == T(1), "Product wrong."); + result = product(T(1), T(1)); + VTKM_TEST_ASSERT(result == T(1), "Product wrong."); + result = product(T(2), T(3)); + VTKM_TEST_ASSERT(result == T(6), "Product wrong."); +} - result = product( T(2), T(3)); - VTKM_TEST_ASSERT( result == T(6), "Product wrong."); - } - - //test Maximum - { +//test Maximum +{ vtkm::Maximum maximum; - VTKM_TEST_ASSERT( maximum( T(1), T(2) ) == T(2), "Maximum wrong."); - VTKM_TEST_ASSERT( maximum( T(2), T(2) ) == T(2), "Maximum wrong."); - VTKM_TEST_ASSERT( maximum( T(2), T(1) ) == T(2), "Maximum wrong."); - } + VTKM_TEST_ASSERT(maximum(T(1), T(2)) == T(2), "Maximum wrong."); + VTKM_TEST_ASSERT(maximum(T(2), T(2)) == T(2), "Maximum wrong."); + VTKM_TEST_ASSERT(maximum(T(2), T(1)) == T(2), "Maximum wrong."); +} - //test Minimum - { +//test Minimum +{ vtkm::Minimum minimum; - VTKM_TEST_ASSERT( minimum( T(1), T(2) ) == T(1), "Minimum wrong."); - VTKM_TEST_ASSERT( minimum( T(1), T(1) ) == T(1), "Minimum wrong."); - VTKM_TEST_ASSERT( minimum( T(3), T(2) ) == T(2), "Minimum wrong."); - } - -}; + VTKM_TEST_ASSERT(minimum(T(1), T(2)) == T(1), "Minimum wrong."); + VTKM_TEST_ASSERT(minimum(T(1), T(1)) == T(1), "Minimum wrong."); + VTKM_TEST_ASSERT(minimum(T(3), T(2)) == T(2), "Minimum wrong."); +} +} +; struct BinaryOperatorTestFunctor { - template void operator()(const T&) const + template + void operator()(const T&) const { BinaryOperatorTest(); } @@ -92,36 +91,35 @@ void TestBinaryOperators() //test BitwiseAnd { - vtkm::BitwiseAnd bitwise_and; - VTKM_TEST_ASSERT( bitwise_and(true, true) == true, "bitwise_and true wrong."); - VTKM_TEST_ASSERT( bitwise_and(true, false) == false, "bitwise_and true wrong."); - VTKM_TEST_ASSERT( bitwise_and(false, true) == false, "bitwise_and true wrong."); - VTKM_TEST_ASSERT( bitwise_and(false, false) == false, "bitwise_and true wrong."); + vtkm::BitwiseAnd bitwise_and; + VTKM_TEST_ASSERT(bitwise_and(true, true) == true, "bitwise_and true wrong."); + VTKM_TEST_ASSERT(bitwise_and(true, false) == false, "bitwise_and true wrong."); + VTKM_TEST_ASSERT(bitwise_and(false, true) == false, "bitwise_and true wrong."); + VTKM_TEST_ASSERT(bitwise_and(false, false) == false, "bitwise_and true wrong."); } //test BitwiseOr { - vtkm::BitwiseOr bitwise_or; - VTKM_TEST_ASSERT( bitwise_or(true, true) == true, "bitwise_or true wrong."); - VTKM_TEST_ASSERT( bitwise_or(true, false) == true, "bitwise_or true wrong."); - VTKM_TEST_ASSERT( bitwise_or(false, true) == true, "bitwise_or true wrong."); - VTKM_TEST_ASSERT( bitwise_or(false, false) == false, "bitwise_or true wrong."); + vtkm::BitwiseOr bitwise_or; + VTKM_TEST_ASSERT(bitwise_or(true, true) == true, "bitwise_or true wrong."); + VTKM_TEST_ASSERT(bitwise_or(true, false) == true, "bitwise_or true wrong."); + VTKM_TEST_ASSERT(bitwise_or(false, true) == true, "bitwise_or true wrong."); + VTKM_TEST_ASSERT(bitwise_or(false, false) == false, "bitwise_or true wrong."); } //test BitwiseXor { - vtkm::BitwiseXor bitwise_xor; - VTKM_TEST_ASSERT( bitwise_xor(true, true) == false, "bitwise_xor true wrong."); - VTKM_TEST_ASSERT( bitwise_xor(true, false) == true, "bitwise_xor true wrong."); - VTKM_TEST_ASSERT( bitwise_xor(false, true) == true, "bitwise_xor true wrong."); - VTKM_TEST_ASSERT( bitwise_xor(false, false) == false, "bitwise_xor true wrong."); + vtkm::BitwiseXor bitwise_xor; + VTKM_TEST_ASSERT(bitwise_xor(true, true) == false, "bitwise_xor true wrong."); + VTKM_TEST_ASSERT(bitwise_xor(true, false) == true, "bitwise_xor true wrong."); + VTKM_TEST_ASSERT(bitwise_xor(false, true) == true, "bitwise_xor true wrong."); + VTKM_TEST_ASSERT(bitwise_xor(false, false) == false, "bitwise_xor true wrong."); } - } } // anonymous namespace -int UnitTestBinaryOperators(int, char *[]) +int UnitTestBinaryOperators(int, char* []) { return vtkm::testing::Testing::Run(TestBinaryOperators); } diff --git a/vtkm/testing/UnitTestBinaryPredicates.cxx b/vtkm/testing/UnitTestBinaryPredicates.cxx index a4d969a88..f2246b0ed 100644 --- a/vtkm/testing/UnitTestBinaryPredicates.cxx +++ b/vtkm/testing/UnitTestBinaryPredicates.cxx @@ -22,57 +22,55 @@ #include -namespace { +namespace +{ //general pair test template -void BinaryPredicateTest( ) -{ +void BinaryPredicateTest(){ //Not using TestValue method as it causes roll-over to occur with //uint8 and int8 leading to unexpected comparisons. //test Equal - { - vtkm::Equal is_equal; - VTKM_TEST_ASSERT( is_equal( vtkm::TypeTraits::ZeroInitialization(), - vtkm::TypeTraits::ZeroInitialization() ), - "Equal wrong."); + { vtkm::Equal is_equal; +VTKM_TEST_ASSERT(is_equal(vtkm::TypeTraits::ZeroInitialization(), + vtkm::TypeTraits::ZeroInitialization()), + "Equal wrong."); - VTKM_TEST_ASSERT( is_equal( T(1), T(2) ) == false, "Equal wrong."); - } +VTKM_TEST_ASSERT(is_equal(T(1), T(2)) == false, "Equal wrong."); +} - //test NotEqual - { +//test NotEqual +{ vtkm::NotEqual not_equal; - VTKM_TEST_ASSERT( not_equal( vtkm::TypeTraits::ZeroInitialization(), - T(1) ), - "NotEqual wrong."); + VTKM_TEST_ASSERT(not_equal(vtkm::TypeTraits::ZeroInitialization(), T(1)), "NotEqual wrong."); - VTKM_TEST_ASSERT( not_equal( T(1), T(1) ) == false, "NotEqual wrong."); - } + VTKM_TEST_ASSERT(not_equal(T(1), T(1)) == false, "NotEqual wrong."); +} - //test SortLess - { +//test SortLess +{ vtkm::SortLess sort_less; - VTKM_TEST_ASSERT( sort_less( T(1), T(2) ) == true, "SortLess wrong."); - VTKM_TEST_ASSERT( sort_less( T(2), T(2) ) == false, "SortLess wrong."); - VTKM_TEST_ASSERT( sort_less( T(2), T(1) ) == false, "SortLess wrong."); - } + VTKM_TEST_ASSERT(sort_less(T(1), T(2)) == true, "SortLess wrong."); + VTKM_TEST_ASSERT(sort_less(T(2), T(2)) == false, "SortLess wrong."); + VTKM_TEST_ASSERT(sort_less(T(2), T(1)) == false, "SortLess wrong."); +} - //test SortGreater - { +//test SortGreater +{ vtkm::SortGreater sort_greater; - VTKM_TEST_ASSERT( sort_greater( T(1), T(2) ) == false, "SortGreater wrong."); - VTKM_TEST_ASSERT( sort_greater( T(1), T(1) ) == false, "SortGreater wrong."); - VTKM_TEST_ASSERT( sort_greater( T(3), T(2) ) == true, "SortGreater wrong."); - } - -}; + VTKM_TEST_ASSERT(sort_greater(T(1), T(2)) == false, "SortGreater wrong."); + VTKM_TEST_ASSERT(sort_greater(T(1), T(1)) == false, "SortGreater wrong."); + VTKM_TEST_ASSERT(sort_greater(T(3), T(2)) == true, "SortGreater wrong."); +} +} +; struct BinaryPredicateTestFunctor { - template void operator()(const T&) const + template + void operator()(const T&) const { BinaryPredicateTest(); } @@ -84,27 +82,26 @@ void TestBinaryPredicates() //test LogicalAnd { - vtkm::LogicalAnd logical_and; - VTKM_TEST_ASSERT( logical_and(true, true) == true, "logical_and true wrong."); - VTKM_TEST_ASSERT( logical_and(true, false) == false, "logical_and true wrong."); - VTKM_TEST_ASSERT( logical_and(false, true) == false, "logical_and true wrong."); - VTKM_TEST_ASSERT( logical_and(false, false) == false, "logical_and true wrong."); + vtkm::LogicalAnd logical_and; + VTKM_TEST_ASSERT(logical_and(true, true) == true, "logical_and true wrong."); + VTKM_TEST_ASSERT(logical_and(true, false) == false, "logical_and true wrong."); + VTKM_TEST_ASSERT(logical_and(false, true) == false, "logical_and true wrong."); + VTKM_TEST_ASSERT(logical_and(false, false) == false, "logical_and true wrong."); } //test LogicalOr { - vtkm::LogicalOr logical_or; - VTKM_TEST_ASSERT( logical_or(true, true) == true, "logical_or true wrong."); - VTKM_TEST_ASSERT( logical_or(true, false) == true, "logical_or true wrong."); - VTKM_TEST_ASSERT( logical_or(false, true) == true, "logical_or true wrong."); - VTKM_TEST_ASSERT( logical_or(false, false) == false, "logical_or true wrong."); + vtkm::LogicalOr logical_or; + VTKM_TEST_ASSERT(logical_or(true, true) == true, "logical_or true wrong."); + VTKM_TEST_ASSERT(logical_or(true, false) == true, "logical_or true wrong."); + VTKM_TEST_ASSERT(logical_or(false, true) == true, "logical_or true wrong."); + VTKM_TEST_ASSERT(logical_or(false, false) == false, "logical_or true wrong."); } - } } // anonymous namespace -int UnitTestBinaryPredicates(int, char *[]) +int UnitTestBinaryPredicates(int, char* []) { return vtkm::testing::Testing::Run(TestBinaryPredicates); } diff --git a/vtkm/testing/UnitTestBounds.cxx b/vtkm/testing/UnitTestBounds.cxx index 2f6ce8b83..e9551a533 100644 --- a/vtkm/testing/UnitTestBounds.cxx +++ b/vtkm/testing/UnitTestBounds.cxx @@ -22,11 +22,12 @@ #include -namespace { +namespace +{ void TestBounds() { - typedef vtkm::Vec Vec3; + typedef vtkm::Vec Vec3; std::cout << "Empty bounds." << std::endl; vtkm::Bounds emptyBounds; @@ -35,28 +36,28 @@ void TestBounds() std::cout << "Single value bounds." << std::endl; vtkm::Bounds singleValueBounds(1.0, 1.0, 2.0, 2.0, 3.0, 3.0); VTKM_TEST_ASSERT(singleValueBounds.IsNonEmpty(), "Empty?"); - VTKM_TEST_ASSERT(test_equal(singleValueBounds.Center(), Vec3(1,2,3)), "Bad center"); - VTKM_TEST_ASSERT(singleValueBounds.Contains(Vec3(1,2,3)), "Contains fail"); - VTKM_TEST_ASSERT(!singleValueBounds.Contains(Vec3(0,0,0)), "Contains fail"); - VTKM_TEST_ASSERT(!singleValueBounds.Contains(Vec3(2,2,2)), "contains fail"); - VTKM_TEST_ASSERT(!singleValueBounds.Contains(Vec3(5,5,5)), "contains fail"); + VTKM_TEST_ASSERT(test_equal(singleValueBounds.Center(), Vec3(1, 2, 3)), "Bad center"); + VTKM_TEST_ASSERT(singleValueBounds.Contains(Vec3(1, 2, 3)), "Contains fail"); + VTKM_TEST_ASSERT(!singleValueBounds.Contains(Vec3(0, 0, 0)), "Contains fail"); + VTKM_TEST_ASSERT(!singleValueBounds.Contains(Vec3(2, 2, 2)), "contains fail"); + VTKM_TEST_ASSERT(!singleValueBounds.Contains(Vec3(5, 5, 5)), "contains fail"); vtkm::Bounds unionBounds = emptyBounds + singleValueBounds; VTKM_TEST_ASSERT(unionBounds.IsNonEmpty(), "Empty?"); - VTKM_TEST_ASSERT(test_equal(unionBounds.Center(), Vec3(1,2,3)), "Bad center"); - VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(1,2,3)), "Contains fail"); - VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(0,0,0)), "Contains fail"); - VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(2,2,2)), "contains fail"); - VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(5,5,5)), "contains fail"); + VTKM_TEST_ASSERT(test_equal(unionBounds.Center(), Vec3(1, 2, 3)), "Bad center"); + VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(1, 2, 3)), "Contains fail"); + VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(0, 0, 0)), "Contains fail"); + VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(2, 2, 2)), "contains fail"); + VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(5, 5, 5)), "contains fail"); VTKM_TEST_ASSERT(singleValueBounds == unionBounds, "Union not equal"); std::cout << "Low bounds." << std::endl; - vtkm::Bounds lowBounds(Vec3(-10,-5,-1), Vec3(-5, -2, 0)); + vtkm::Bounds lowBounds(Vec3(-10, -5, -1), Vec3(-5, -2, 0)); VTKM_TEST_ASSERT(lowBounds.IsNonEmpty(), "Empty?"); - VTKM_TEST_ASSERT(test_equal(lowBounds.Center(), Vec3(-7.5,-3.5,-0.5)), "Bad center"); + VTKM_TEST_ASSERT(test_equal(lowBounds.Center(), Vec3(-7.5, -3.5, -0.5)), "Bad center"); VTKM_TEST_ASSERT(!lowBounds.Contains(Vec3(-20)), "Contains fail"); VTKM_TEST_ASSERT(!lowBounds.Contains(Vec3(-2)), "Contains fail"); - VTKM_TEST_ASSERT(lowBounds.Contains(Vec3(-7,-2,-0.5)), "Contains fail"); + VTKM_TEST_ASSERT(lowBounds.Contains(Vec3(-7, -2, -0.5)), "Contains fail"); VTKM_TEST_ASSERT(!lowBounds.Contains(Vec3(0)), "Contains fail"); VTKM_TEST_ASSERT(!lowBounds.Contains(Vec3(10)), "Contains fail"); @@ -64,50 +65,50 @@ void TestBounds() VTKM_TEST_ASSERT(unionBounds.IsNonEmpty(), "Empty?"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-20)), "Contains fail"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-2)), "Contains fail"); - VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(-7,-2,-0.5)), "Contains fail"); + VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(-7, -2, -0.5)), "Contains fail"); VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(0)), "Contains fail"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(10)), "Contains fail"); std::cout << "High bounds." << std::endl; - vtkm::Float64 highBoundsArray[6] = {15.0, 20.0, 2.0, 5.0, 5.0, 10.0 }; + vtkm::Float64 highBoundsArray[6] = { 15.0, 20.0, 2.0, 5.0, 5.0, 10.0 }; vtkm::Bounds highBounds(highBoundsArray); VTKM_TEST_ASSERT(highBounds.IsNonEmpty(), "Empty?"); VTKM_TEST_ASSERT(!highBounds.Contains(Vec3(-20)), "Contains fail"); VTKM_TEST_ASSERT(!highBounds.Contains(Vec3(-2)), "Contains fail"); - VTKM_TEST_ASSERT(!highBounds.Contains(Vec3(-7,-2,-0.5)), "Contains fail"); + VTKM_TEST_ASSERT(!highBounds.Contains(Vec3(-7, -2, -0.5)), "Contains fail"); VTKM_TEST_ASSERT(!highBounds.Contains(Vec3(0)), "Contains fail"); VTKM_TEST_ASSERT(!highBounds.Contains(Vec3(4)), "Contains fail"); - VTKM_TEST_ASSERT(highBounds.Contains(Vec3(17,3,7)), "Contains fail"); + VTKM_TEST_ASSERT(highBounds.Contains(Vec3(17, 3, 7)), "Contains fail"); VTKM_TEST_ASSERT(!highBounds.Contains(Vec3(25)), "Contains fail"); unionBounds = highBounds.Union(singleValueBounds); VTKM_TEST_ASSERT(unionBounds.IsNonEmpty(), "Empty?"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-20)), "Contains fail"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-2)), "Contains fail"); - VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-7,-2,-0.5)), "Contains fail"); + VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-7, -2, -0.5)), "Contains fail"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(0)), "Contains fail"); VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(4)), "Contains fail"); - VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(17,3,7)), "Contains fail"); + VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(17, 3, 7)), "Contains fail"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(25)), "Contains fail"); unionBounds.Include(Vec3(-1)); VTKM_TEST_ASSERT(unionBounds.IsNonEmpty(), "Empty?"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-20)), "Contains fail"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-2)), "Contains fail"); - VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-7,-2,-0.5)), "Contains fail"); + VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-7, -2, -0.5)), "Contains fail"); VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(0)), "Contains fail"); VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(4)), "Contains fail"); - VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(17,3,7)), "Contains fail"); + VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(17, 3, 7)), "Contains fail"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(25)), "Contains fail"); unionBounds.Include(lowBounds); VTKM_TEST_ASSERT(unionBounds.IsNonEmpty(), "Empty?"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-20)), "Contains fail"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-2)), "Contains fail"); - VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(-7,-2,-0.5)), "Contains fail"); + VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(-7, -2, -0.5)), "Contains fail"); VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(0)), "Contains fail"); VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(4)), "Contains fail"); - VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(17,3,7)), "Contains fail"); + VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(17, 3, 7)), "Contains fail"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(25)), "Contains fail"); std::cout << "Try adding infinity." << std::endl; @@ -115,26 +116,26 @@ void TestBounds() VTKM_TEST_ASSERT(unionBounds.IsNonEmpty(), "Empty?"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-20)), "Contains fail"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-2)), "Contains fail"); - VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(-7,-2,-0.5)), "Contains fail"); + VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(-7, -2, -0.5)), "Contains fail"); VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(0)), "Contains fail"); VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(4)), "Contains fail"); - VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(17,3,7)), "Contains fail"); + VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(17, 3, 7)), "Contains fail"); VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(25)), "Contains fail"); std::cout << "Try adding NaN." << std::endl; unionBounds.Include(Vec3(vtkm::Nan64())); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-20)), "Contains fail"); VTKM_TEST_ASSERT(!unionBounds.Contains(Vec3(-2)), "Contains fail"); - VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(-7,-2,-0.5)), "Contains fail"); + VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(-7, -2, -0.5)), "Contains fail"); VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(0)), "Contains fail"); VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(4)), "Contains fail"); - VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(17,3,7)), "Contains fail"); + VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(17, 3, 7)), "Contains fail"); VTKM_TEST_ASSERT(unionBounds.Contains(Vec3(25)), "Contains fail"); } } // anonymous namespace -int UnitTestBounds(int, char *[]) +int UnitTestBounds(int, char* []) { return vtkm::testing::Testing::Run(TestBounds); } diff --git a/vtkm/testing/UnitTestCellShape.cxx b/vtkm/testing/UnitTestCellShape.cxx index 529d9146c..5322e4a25 100644 --- a/vtkm/testing/UnitTestCellShape.cxx +++ b/vtkm/testing/UnitTestCellShape.cxx @@ -22,37 +22,40 @@ #include -namespace { +namespace +{ -template -void CheckTypeSame(T, T) { +template +void CheckTypeSame(T, T) +{ std::cout << " Success" << std::endl; } -template -void CheckTypeSame(T1, T2) { +template +void CheckTypeSame(T1, T2) +{ VTKM_TEST_FAIL("Got unexpected types."); } struct CellShapeTestFunctor { - template - void operator()(ShapeTag) const { + template + void operator()(ShapeTag) const + { VTKM_IS_CELL_SHAPE_TAG(ShapeTag); const vtkm::IdComponent cellShapeId = ShapeTag::Id; std::cout << "Cell shape id: " << cellShapeId << std::endl; - std::cout << "Check conversion between id and tag is consistent." - << std::endl; - CheckTypeSame(ShapeTag(), - typename vtkm::CellShapeIdToTag::Tag()); + std::cout << "Check conversion between id and tag is consistent." << std::endl; + CheckTypeSame(ShapeTag(), typename vtkm::CellShapeIdToTag::Tag()); std::cout << "Check vtkmGenericCellShapeMacro." << std::endl; - switch (cellShapeId) { - vtkmGenericCellShapeMacro(CheckTypeSame(ShapeTag(), CellShapeTag())); - default: - VTKM_TEST_FAIL("Generic shape switch not working."); + switch (cellShapeId) + { + vtkmGenericCellShapeMacro(CheckTypeSame(ShapeTag(), CellShapeTag())); + default: + VTKM_TEST_FAIL("Generic shape switch not working."); } } }; @@ -64,7 +67,7 @@ void CellShapeTest() } // anonymous namespace -int UnitTestCellShape(int, char *[]) +int UnitTestCellShape(int, char* []) { return vtkm::testing::Testing::Run(CellShapeTest); } diff --git a/vtkm/testing/UnitTestExceptions.cxx b/vtkm/testing/UnitTestExceptions.cxx index 8d3aea96a..ccae1a475 100644 --- a/vtkm/testing/UnitTestExceptions.cxx +++ b/vtkm/testing/UnitTestExceptions.cxx @@ -26,11 +26,12 @@ //------------------------------------------------------------------------------ // This test ensures that exceptions thrown internally by the vtkm_cont library // can be correctly caught across library boundaries. -int UnitTestExceptions(int, char *[]) +int UnitTestExceptions(int, char* []) { vtkm::cont::RuntimeDeviceTracker tracker; - try { + try + { // This throws a ErrorBadValue from RuntimeDeviceTracker::CheckDevice, // which is compiled into the vtkm_cont library: tracker.ResetDevice(vtkm::cont::DeviceAdapterTagError()); diff --git a/vtkm/testing/UnitTestListTag.cxx b/vtkm/testing/UnitTestListTag.cxx index b487b8614..8d221da1f 100644 --- a/vtkm/testing/UnitTestListTag.cxx +++ b/vtkm/testing/UnitTestListTag.cxx @@ -27,49 +27,53 @@ #include #include -namespace { +namespace +{ -template +template struct TestClass { - enum { NUMBER = N }; + enum + { + NUMBER = N + }; }; -struct TestListTag1 - : vtkm::ListTagBase > -{ }; +struct TestListTag1 : vtkm::ListTagBase> +{ +}; -struct TestListTag2 - : vtkm::ListTagBase,TestClass<22> > -{ }; +struct TestListTag2 : vtkm::ListTagBase, TestClass<22>> +{ +}; -struct TestListTag3 - : vtkm::ListTagBase,TestClass<32>,TestClass<33> > -{ }; +struct TestListTag3 : vtkm::ListTagBase, TestClass<32>, TestClass<33>> +{ +}; -struct TestListTag4 - : vtkm::ListTagBase,TestClass<42>,TestClass<43>,TestClass<44> > -{ }; +struct TestListTag4 : vtkm::ListTagBase, TestClass<42>, TestClass<43>, TestClass<44>> +{ +}; -struct TestListTagJoin - : vtkm::ListTagJoin -{ }; +struct TestListTagJoin : vtkm::ListTagJoin +{ +}; -struct TestListTagIntersect - : vtkm::ListTagIntersect -{ }; +struct TestListTagIntersect : vtkm::ListTagIntersect +{ +}; -struct TestListTagUniversal - : vtkm::ListTagUniversal -{ }; +struct TestListTagUniversal : vtkm::ListTagUniversal +{ +}; struct MutableFunctor { std::vector FoundTypes; - template - VTKM_CONT - void operator()(T) { + template + VTKM_CONT void operator()(T) + { this->FoundTypes.push_back(T::NUMBER); } }; @@ -78,66 +82,57 @@ std::vector g_FoundType; struct ConstantFunctor { - ConstantFunctor() { - g_FoundType.erase(g_FoundType.begin(), g_FoundType.end()); - } + ConstantFunctor() { g_FoundType.erase(g_FoundType.begin(), g_FoundType.end()); } - template - VTKM_CONT - void operator()(T) const { + template + VTKM_CONT void operator()(T) const + { g_FoundType.push_back(T::NUMBER); } }; -template -void CheckSame(const vtkm::Vec &expected, - const std::vector &found) +template +void CheckSame(const vtkm::Vec& expected, const std::vector& found) { - VTKM_TEST_ASSERT(static_cast(found.size()) == N, - "Got wrong number of items."); + VTKM_TEST_ASSERT(static_cast(found.size()) == N, "Got wrong number of items."); for (vtkm::IdComponent index = 0; index < N; index++) { vtkm::UInt32 i = static_cast(index); - VTKM_TEST_ASSERT(expected[index] == found[i], - "Got wrong type."); + VTKM_TEST_ASSERT(expected[index] == found[i], "Got wrong type."); } } -template +template void CheckContains(TestClass, ListTag, const std::vector& contents) { //Use intersect to verify at compile time that ListTag contains TestClass - using intersectWith = vtkm::ListTagBase< TestClass >; + using intersectWith = vtkm::ListTagBase>; using intersectResult = typename vtkm::ListTagIntersect::list; VTKM_CONSTEXPR bool intersectContains = (brigand::size::value != 0); - bool listContains = vtkm::ListContains >::value; - bool shouldContain = - std::find(contents.begin(), contents.end(), N) != contents.end(); + bool listContains = vtkm::ListContains>::value; + bool shouldContain = std::find(contents.begin(), contents.end(), N) != contents.end(); - VTKM_TEST_ASSERT(intersectContains == shouldContain, - "ListTagIntersect check failed."); - VTKM_TEST_ASSERT(listContains == shouldContain, - "ListContains check failed."); + VTKM_TEST_ASSERT(intersectContains == shouldContain, "ListTagIntersect check failed."); + VTKM_TEST_ASSERT(listContains == shouldContain, "ListContains check failed."); } -template +template void CheckContains(TestClass, TestListTagUniversal, const std::vector&) { //Use intersect to verify at compile time that ListTag contains TestClass - using intersectWith = vtkm::ListTagBase< TestClass >; - using intersectResult = typename vtkm::ListTagIntersect::list; + using intersectWith = vtkm::ListTagBase>; + using intersectResult = + typename vtkm::ListTagIntersect::list; VTKM_CONSTEXPR bool intersectContains = (brigand::size::value != 0); - VTKM_CONSTEXPR bool listContains = vtkm::ListContains >::value; + VTKM_CONSTEXPR bool listContains = vtkm::ListContains>::value; - VTKM_TEST_ASSERT(intersectContains == listContains, - "ListTagIntersect check failed."); + VTKM_TEST_ASSERT(intersectContains == listContains, "ListTagIntersect check failed."); } - -template -void TryList(const vtkm::Vec &expected, ListTag) +template +void TryList(const vtkm::Vec& expected, ListTag) { VTKM_IS_LIST_TAG(ListTag); @@ -163,8 +158,8 @@ void TryList(const vtkm::Vec &expected, ListTag) CheckContains(TestClass<44>(), ListTag(), functor.FoundTypes); } -template -void TryList(const vtkm::Vec &, TestListTagUniversal tag) +template +void TryList(const vtkm::Vec&, TestListTagUniversal tag) { VTKM_IS_LIST_TAG(TestListTagUniversal); @@ -187,41 +182,38 @@ void TryList(const vtkm::Vec &, TestListTagUniversal tag) void TestLists() { std::cout << "Valid List Tag Checks" << std::endl; - VTKM_TEST_ASSERT(vtkm::internal::ListTagCheck::value, - "Failed list tag check"); - VTKM_TEST_ASSERT(vtkm::internal::ListTagCheck::value, - "Failed list tag check"); - VTKM_TEST_ASSERT(!vtkm::internal::ListTagCheck >::value, - "Failed list tag check"); + VTKM_TEST_ASSERT(vtkm::internal::ListTagCheck::value, "Failed list tag check"); + VTKM_TEST_ASSERT(vtkm::internal::ListTagCheck::value, "Failed list tag check"); + VTKM_TEST_ASSERT(!vtkm::internal::ListTagCheck>::value, "Failed list tag check"); std::cout << "ListTagEmpty" << std::endl; - TryList(vtkm::Vec(), vtkm::ListTagEmpty()); + TryList(vtkm::Vec(), vtkm::ListTagEmpty()); std::cout << "ListTagBase" << std::endl; - TryList(vtkm::Vec(11), TestListTag1()); + TryList(vtkm::Vec(11), TestListTag1()); std::cout << "ListTagBase2" << std::endl; - TryList(vtkm::Vec(21,22), TestListTag2()); + TryList(vtkm::Vec(21, 22), TestListTag2()); std::cout << "ListTagBase3" << std::endl; - TryList(vtkm::Vec(31,32,33), TestListTag3()); + TryList(vtkm::Vec(31, 32, 33), TestListTag3()); std::cout << "ListTagBase4" << std::endl; - TryList(vtkm::Vec(41,42,43,44), TestListTag4()); + TryList(vtkm::Vec(41, 42, 43, 44), TestListTag4()); std::cout << "ListTagJoin" << std::endl; - TryList(vtkm::Vec(31,32,33,11), TestListTagJoin()); + TryList(vtkm::Vec(31, 32, 33, 11), TestListTagJoin()); std::cout << "ListTagIntersect" << std::endl; - TryList(vtkm::Vec(31,32,33), TestListTagIntersect()); + TryList(vtkm::Vec(31, 32, 33), TestListTagIntersect()); std::cout << "ListTagUniversal" << std::endl; - TryList(vtkm::Vec(1,2,3,4), TestListTagUniversal()); + TryList(vtkm::Vec(1, 2, 3, 4), TestListTagUniversal()); } } // anonymous namespace -int UnitTestListTag(int, char *[]) +int UnitTestListTag(int, char* []) { return vtkm::testing::Testing::Run(TestLists); } diff --git a/vtkm/testing/UnitTestMath.cxx b/vtkm/testing/UnitTestMath.cxx index a72ca4e2b..73679f7b2 100644 --- a/vtkm/testing/UnitTestMath.cxx +++ b/vtkm/testing/UnitTestMath.cxx @@ -24,8 +24,8 @@ #include -int UnitTestMath(int, char *[]) +int UnitTestMath(int, char* []) { return vtkm::cont::testing::Testing::Run( - UnitTestMathNamespace::RunMathTests); + UnitTestMathNamespace::RunMathTests); } diff --git a/vtkm/testing/UnitTestMatrix.cxx b/vtkm/testing/UnitTestMatrix.cxx index 6ec4aeace..9480f96f8 100644 --- a/vtkm/testing/UnitTestMatrix.cxx +++ b/vtkm/testing/UnitTestMatrix.cxx @@ -27,34 +27,33 @@ #include // If more tests need a value for Matrix, we can move this to Testing.h -template -vtkm::Matrix -TestValue(vtkm::Id index, const vtkm::Matrix &) +template +vtkm::Matrix TestValue(vtkm::Id index, const vtkm::Matrix&) { - vtkm::Matrix value; + vtkm::Matrix value; for (vtkm::IdComponent rowIndex = 0; rowIndex < NumRow; rowIndex++) { - typedef vtkm::Vec RowType; - RowType row = - TestValue(index, RowType()) - + RowType(static_cast(10*rowIndex)); + typedef vtkm::Vec RowType; + RowType row = TestValue(index, RowType()) + + RowType(static_cast(10 * rowIndex)); vtkm::MatrixSetRow(value, rowIndex, row); } return value; } -namespace { +namespace +{ -#define FOR_ROW_COL(matrix) \ - for(vtkm::IdComponent row=0; row < (matrix).NUM_ROWS; row++) \ - for(vtkm::IdComponent col=0; col < (matrix).NUM_COLUMNS; col++) +#define FOR_ROW_COL(matrix) \ + for (vtkm::IdComponent row = 0; row < (matrix).NUM_ROWS; row++) \ + for (vtkm::IdComponent col = 0; col < (matrix).NUM_COLUMNS; col++) -template +template struct MatrixTest { static const vtkm::IdComponent NUM_ROWS = NumRow; static const vtkm::IdComponent NUM_COLS = NumCol; - typedef vtkm::Matrix MatrixType; + typedef vtkm::Matrix MatrixType; typedef typename MatrixType::ComponentType ComponentType; static void BasicCreation() @@ -63,8 +62,7 @@ struct MatrixTest MatrixType matrix(5); FOR_ROW_COL(matrix) { - VTKM_TEST_ASSERT(test_equal(matrix(row,col), static_cast(5)), - "Constant set incorrect."); + VTKM_TEST_ASSERT(test_equal(matrix(row, col), static_cast(5)), "Constant set incorrect."); } } @@ -73,43 +71,31 @@ struct MatrixTest std::cout << "Basic accessors." << std::endl; MatrixType matrix; MatrixType value = TestValue(0, MatrixType()); + FOR_ROW_COL(matrix) { matrix[row][col] = ComponentType(value(row, col) * 2); } FOR_ROW_COL(matrix) { - matrix[row][col] = ComponentType(value(row,col)*2); - } - FOR_ROW_COL(matrix) - { - VTKM_TEST_ASSERT(test_equal(matrix(row,col), value(row,col)*2), - "Bad set or retreive."); + VTKM_TEST_ASSERT(test_equal(matrix(row, col), value(row, col) * 2), "Bad set or retreive."); const MatrixType const_matrix = matrix; - VTKM_TEST_ASSERT(test_equal(const_matrix(row,col), value(row,col)*2), + VTKM_TEST_ASSERT(test_equal(const_matrix(row, col), value(row, col) * 2), "Bad set or retreive."); } - FOR_ROW_COL(matrix) - { - matrix(row,col) = value(row,col); - } + FOR_ROW_COL(matrix) { matrix(row, col) = value(row, col); } const MatrixType const_matrix = matrix; FOR_ROW_COL(matrix) { - VTKM_TEST_ASSERT(test_equal(matrix[row][col], value(row,col)), - "Bad set or retreive."); - VTKM_TEST_ASSERT(test_equal(const_matrix[row][col], value(row,col)), - "Bad set or retreive."); + VTKM_TEST_ASSERT(test_equal(matrix[row][col], value(row, col)), "Bad set or retreive."); + VTKM_TEST_ASSERT(test_equal(const_matrix[row][col], value(row, col)), "Bad set or retreive."); } - VTKM_TEST_ASSERT(matrix == const_matrix, - "Equal test operator not working."); - VTKM_TEST_ASSERT(!(matrix != const_matrix), - "Not-Equal test operator not working."); - VTKM_TEST_ASSERT(test_equal(matrix, const_matrix), - "Vector-based equal test not working."); + VTKM_TEST_ASSERT(matrix == const_matrix, "Equal test operator not working."); + VTKM_TEST_ASSERT(!(matrix != const_matrix), "Not-Equal test operator not working."); + VTKM_TEST_ASSERT(test_equal(matrix, const_matrix), "Vector-based equal test not working."); } static void RowColAccessors() { - typedef vtkm::Vec ColumnType; - typedef vtkm::Vec RowType; + typedef vtkm::Vec ColumnType; + typedef vtkm::Vec RowType; const MatrixType const_matrix = TestValue(0, MatrixType()); MatrixType matrix; @@ -117,36 +103,32 @@ struct MatrixTest FOR_ROW_COL(matrix) { RowType rowvec = vtkm::MatrixGetRow(const_matrix, row); - VTKM_TEST_ASSERT(test_equal(rowvec[col], const_matrix(row,col)), - "Bad get row."); + VTKM_TEST_ASSERT(test_equal(rowvec[col], const_matrix(row, col)), "Bad get row."); ColumnType columnvec = vtkm::MatrixGetColumn(const_matrix, col); - VTKM_TEST_ASSERT(test_equal(columnvec[row], const_matrix(row,col)), - "Bad get col."); + VTKM_TEST_ASSERT(test_equal(columnvec[row], const_matrix(row, col)), "Bad get col."); } std::cout << "Set a row." << std::endl; for (vtkm::IdComponent row = 0; row < NUM_ROWS; row++) { - RowType rowvec = vtkm::MatrixGetRow(const_matrix, NUM_ROWS-row-1); + RowType rowvec = vtkm::MatrixGetRow(const_matrix, NUM_ROWS - row - 1); vtkm::MatrixSetRow(matrix, row, rowvec); } FOR_ROW_COL(matrix) { - VTKM_TEST_ASSERT(test_equal(matrix(NUM_ROWS-row-1,col), - const_matrix(row,col)), - "Rows not set right."); + VTKM_TEST_ASSERT(test_equal(matrix(NUM_ROWS - row - 1, col), const_matrix(row, col)), + "Rows not set right."); } std::cout << "Set a column." << std::endl; for (vtkm::IdComponent col = 0; col < NUM_COLS; col++) { - ColumnType colvec = vtkm::MatrixGetColumn(const_matrix, NUM_COLS-col-1); + ColumnType colvec = vtkm::MatrixGetColumn(const_matrix, NUM_COLS - col - 1); vtkm::MatrixSetColumn(matrix, col, colvec); } FOR_ROW_COL(matrix) { - VTKM_TEST_ASSERT(test_equal(matrix(row,NUM_COLS-col-1), - const_matrix(row,col)), + VTKM_TEST_ASSERT(test_equal(matrix(row, NUM_COLS - col - 1), const_matrix(row, col)), "Columns not set right."); } } @@ -155,46 +137,41 @@ struct MatrixTest { std::cout << "Try multiply." << std::endl; const MatrixType leftFactor = TestValue(0, MatrixType()); - vtkm::Matrix rightFactor = - TestValue(1, vtkm::Matrix()); + vtkm::Matrix rightFactor = TestValue(1, vtkm::Matrix()); - vtkm::Matrix product - = vtkm::MatrixMultiply(leftFactor, rightFactor); + vtkm::Matrix product = vtkm::MatrixMultiply(leftFactor, rightFactor); FOR_ROW_COL(product) { - vtkm::Vec leftVector = vtkm::MatrixGetRow(leftFactor, row); - vtkm::Vec rightVector=vtkm::MatrixGetColumn(rightFactor, col); - VTKM_TEST_ASSERT(test_equal(product(row,col), - vtkm::dot(leftVector,rightVector)), + vtkm::Vec leftVector = vtkm::MatrixGetRow(leftFactor, row); + vtkm::Vec rightVector = vtkm::MatrixGetColumn(rightFactor, col); + VTKM_TEST_ASSERT(test_equal(product(row, col), vtkm::dot(leftVector, rightVector)), "Matrix multiple wrong."); } std::cout << "Vector multiply." << std::endl; MatrixType matrixFactor; - vtkm::Vec leftVector(2); - vtkm::Vec rightVector; + vtkm::Vec leftVector(2); + vtkm::Vec rightVector; FOR_ROW_COL(matrixFactor) { - matrixFactor(row,col) = T(row + 1); + matrixFactor(row, col) = T(row + 1); rightVector[col] = T(col + 1); } - vtkm::Vec leftResult = - vtkm::MatrixMultiply(leftVector, matrixFactor); + vtkm::Vec leftResult = vtkm::MatrixMultiply(leftVector, matrixFactor); for (vtkm::IdComponent index = 0; index < NUM_COLS; index++) { - VTKM_TEST_ASSERT(test_equal(leftResult[index], T(NUM_ROWS*(NUM_ROWS+1))), - "Vector/matrix multiple wrong."); + VTKM_TEST_ASSERT(test_equal(leftResult[index], T(NUM_ROWS * (NUM_ROWS + 1))), + "Vector/matrix multiple wrong."); } - vtkm::Vec rightResult = - vtkm::MatrixMultiply(matrixFactor, rightVector); + vtkm::Vec rightResult = vtkm::MatrixMultiply(matrixFactor, rightVector); for (vtkm::IdComponent index = 0; index < NUM_ROWS; index++) { - VTKM_TEST_ASSERT(test_equal(rightResult[index], - T(((index+1)*NUM_COLS*(NUM_COLS+1))/2)), - "Matrix/vector multiple wrong."); + VTKM_TEST_ASSERT( + test_equal(rightResult[index], T(((index + 1) * NUM_COLS * (NUM_COLS + 1)) / 2)), + "Matrix/vector multiple wrong."); } } @@ -204,15 +181,12 @@ struct MatrixTest MatrixType originalMatrix = TestValue(0, MatrixType()); - vtkm::Matrix identityMatrix; + vtkm::Matrix identityMatrix; vtkm::MatrixIdentity(identityMatrix); - MatrixType multMatrix = - vtkm::MatrixMultiply(originalMatrix, identityMatrix); - - VTKM_TEST_ASSERT(test_equal(originalMatrix, multMatrix), - "Identity is not really identity."); + MatrixType multMatrix = vtkm::MatrixMultiply(originalMatrix, identityMatrix); + VTKM_TEST_ASSERT(test_equal(originalMatrix, multMatrix), "Identity is not really identity."); } static void Transpose() @@ -221,11 +195,10 @@ struct MatrixTest MatrixType originalMatrix = TestValue(0, MatrixType()); - vtkm::Matrix transMatrix = - vtkm::MatrixTranspose(originalMatrix); + vtkm::Matrix transMatrix = vtkm::MatrixTranspose(originalMatrix); FOR_ROW_COL(originalMatrix) { - VTKM_TEST_ASSERT(test_equal(originalMatrix(row,col), transMatrix(col,row)), + VTKM_TEST_ASSERT(test_equal(originalMatrix(row, col), transMatrix(col, row)), "Transpose wrong."); } } @@ -246,118 +219,149 @@ private: MatrixTest() = delete; }; -template +template void MatrixTest1() { - MatrixTest::Run(); - MatrixTest::Run(); - MatrixTest::Run(); - MatrixTest::Run(); - MatrixTest::Run(); + MatrixTest::Run(); + MatrixTest::Run(); + MatrixTest::Run(); + MatrixTest::Run(); + MatrixTest::Run(); } -template -void NonSingularMatrix(vtkm::Matrix &matrix) +template +void NonSingularMatrix(vtkm::Matrix& matrix) { - matrix(0,0) = 1; + matrix(0, 0) = 1; } -template -void NonSingularMatrix(vtkm::Matrix &matrix) +template +void NonSingularMatrix(vtkm::Matrix& matrix) { - matrix(0,0) = -5; matrix(0,1) = 6; - matrix(1,0) = -7; matrix(1,1) = -2; + matrix(0, 0) = -5; + matrix(0, 1) = 6; + matrix(1, 0) = -7; + matrix(1, 1) = -2; } -template -void NonSingularMatrix(vtkm::Matrix &matrix) +template +void NonSingularMatrix(vtkm::Matrix& matrix) { - matrix(0,0) = 1; matrix(0,1) = -2; matrix(0,2) = 3; - matrix(1,0) = 6; matrix(1,1) = 7; matrix(1,2) = -1; - matrix(2,0) = -3; matrix(2,1) = 1; matrix(2,2) = 4; + matrix(0, 0) = 1; + matrix(0, 1) = -2; + matrix(0, 2) = 3; + matrix(1, 0) = 6; + matrix(1, 1) = 7; + matrix(1, 2) = -1; + matrix(2, 0) = -3; + matrix(2, 1) = 1; + matrix(2, 2) = 4; } -template -void NonSingularMatrix(vtkm::Matrix &matrix) +template +void NonSingularMatrix(vtkm::Matrix& matrix) { - matrix(0,0) = 2; matrix(0,1) = 1; matrix(0,2) = 0; matrix(0,3) = 3; - matrix(1,0) = -1; matrix(1,1) = 0; matrix(1,2) = 2; matrix(1,3) = 4; - matrix(2,0) = 4; matrix(2,1) = -2; matrix(2,2) = 7; matrix(2,3) = 0; - matrix(3,0) = -4; matrix(3,1) = 3; matrix(3,2) = 5; matrix(3,3) = 1; + matrix(0, 0) = 2; + matrix(0, 1) = 1; + matrix(0, 2) = 0; + matrix(0, 3) = 3; + matrix(1, 0) = -1; + matrix(1, 1) = 0; + matrix(1, 2) = 2; + matrix(1, 3) = 4; + matrix(2, 0) = 4; + matrix(2, 1) = -2; + matrix(2, 2) = 7; + matrix(2, 3) = 0; + matrix(3, 0) = -4; + matrix(3, 1) = 3; + matrix(3, 2) = 5; + matrix(3, 3) = 1; } -template -void NonSingularMatrix(vtkm::Matrix &mat) +template +void NonSingularMatrix(vtkm::Matrix& mat) { - mat(0,0) = 2; mat(0,1) = 1; mat(0,2) = 3; mat(0,3) = 7; mat(0,4) = 5; - mat(1,0) = 3; mat(1,1) = 8; mat(1,2) = 7; mat(1,3) = 9; mat(1,4) = 8; - mat(2,0) = 3; mat(2,1) = 4; mat(2,2) = 1; mat(2,3) = 6; mat(2,4) = 2; - mat(3,0) = 4; mat(3,1) = 0; mat(3,2) = 2; mat(3,3) = 2; mat(3,4) = 3; - mat(4,0) = 7; mat(4,1) = 9; mat(4,2) = 1; mat(4,3) = 5; mat(4,4) = 4; + mat(0, 0) = 2; + mat(0, 1) = 1; + mat(0, 2) = 3; + mat(0, 3) = 7; + mat(0, 4) = 5; + mat(1, 0) = 3; + mat(1, 1) = 8; + mat(1, 2) = 7; + mat(1, 3) = 9; + mat(1, 4) = 8; + mat(2, 0) = 3; + mat(2, 1) = 4; + mat(2, 2) = 1; + mat(2, 3) = 6; + mat(2, 4) = 2; + mat(3, 0) = 4; + mat(3, 1) = 0; + mat(3, 2) = 2; + mat(3, 3) = 2; + mat(3, 4) = 3; + mat(4, 0) = 7; + mat(4, 1) = 9; + mat(4, 2) = 1; + mat(4, 3) = 5; + mat(4, 4) = 4; } -template -void SingularMatrix(vtkm::Matrix &singularMatrix) +template +void SingularMatrix(vtkm::Matrix& singularMatrix) { - FOR_ROW_COL(singularMatrix) - { - singularMatrix(row,col) = static_cast(row+col); - } + FOR_ROW_COL(singularMatrix) { singularMatrix(row, col) = static_cast(row + col); } if (Size > 1) { - vtkm::MatrixSetRow(singularMatrix, - 0, - vtkm::MatrixGetRow(singularMatrix, (Size+1)/2)); + vtkm::MatrixSetRow(singularMatrix, 0, vtkm::MatrixGetRow(singularMatrix, (Size + 1) / 2)); } } // A simple but slow implementation of finding a determinant for comparison // purposes. -template -T RecursiveDeterminant(const vtkm::Matrix &A) +template +T RecursiveDeterminant(const vtkm::Matrix& A) { - return A(0,0); + return A(0, 0); } -template -T RecursiveDeterminant(const vtkm::Matrix &A) +template +T RecursiveDeterminant(const vtkm::Matrix& A) { - vtkm::Matrix cofactorMatrix; + vtkm::Matrix cofactorMatrix; T sum = 0.0; T sign = 1.0; for (vtkm::IdComponent rowIndex = 0; rowIndex < Size; rowIndex++) { // Create the cofactor matrix for entry A(rowIndex,0) - for (vtkm::IdComponent cofactorRowIndex = 0; - cofactorRowIndex < rowIndex; + for (vtkm::IdComponent cofactorRowIndex = 0; cofactorRowIndex < rowIndex; cofactorRowIndex++) + { + for (vtkm::IdComponent colIndex = 1; colIndex < Size; colIndex++) + { + cofactorMatrix(cofactorRowIndex, colIndex - 1) = A(cofactorRowIndex, colIndex); + } + } + for (vtkm::IdComponent cofactorRowIndex = rowIndex + 1; cofactorRowIndex < Size; cofactorRowIndex++) { for (vtkm::IdComponent colIndex = 1; colIndex < Size; colIndex++) { - cofactorMatrix(cofactorRowIndex,colIndex-1) = - A(cofactorRowIndex,colIndex); + cofactorMatrix(cofactorRowIndex - 1, colIndex - 1) = A(cofactorRowIndex, colIndex); } } - for (vtkm::IdComponent cofactorRowIndex = rowIndex+1; - cofactorRowIndex < Size; - cofactorRowIndex++) - { - for (vtkm::IdComponent colIndex = 1; colIndex < Size; colIndex++) - { - cofactorMatrix(cofactorRowIndex-1,colIndex-1) = - A(cofactorRowIndex,colIndex); - } - } - sum += sign * A(rowIndex,0) * RecursiveDeterminant(cofactorMatrix); + sum += sign * A(rowIndex, 0) * RecursiveDeterminant(cofactorMatrix); sign = -sign; } return sum; } -template -struct SquareMatrixTest { +template +struct SquareMatrixTest +{ static const vtkm::IdComponent SIZE = Size; - typedef vtkm::Matrix MatrixType; + typedef vtkm::Matrix MatrixType; static void CheckMatrixSize() { @@ -373,14 +377,11 @@ struct SquareMatrixTest { MatrixType A; NonSingularMatrix(A); const MatrixType originalMatrix = A; - vtkm::Vec permutationVector; + vtkm::Vec permutationVector; T inversionParity; bool valid; - vtkm::detail::MatrixLUPFactor(A, - permutationVector, - inversionParity, - valid); + vtkm::detail::MatrixLUPFactor(A, permutationVector, inversionParity, valid); VTKM_TEST_ASSERT(valid, "Matrix declared singular?"); // Reconstruct L and U matrices from A. @@ -390,12 +391,15 @@ struct SquareMatrixTest { { if (row < col) { - U(row,col) = A(row,col); + U(row, col) = A(row, col); } else //(row >= col) { - L(row,col) = A(row,col); - if (row == col) { U(row,col) = 1; } + L(row, col) = A(row, col); + if (row == col) + { + U(row, col) = 1; + } } } @@ -403,7 +407,7 @@ struct SquareMatrixTest { T computedParity = 1.0; for (int i = 0; i < SIZE; i++) { - for (int j = i+1; j < SIZE; j++) + for (int j = i + 1; j < SIZE; j++) { if (permutationVector[i] > permutationVector[j]) { @@ -411,8 +415,7 @@ struct SquareMatrixTest { } } } - VTKM_TEST_ASSERT(test_equal(inversionParity, computedParity), - "Got bad inversion parity."); + VTKM_TEST_ASSERT(test_equal(inversionParity, computedParity), "Got bad inversion parity."); // Reconstruct permutation matrix P. MatrixType P(0); @@ -422,18 +425,15 @@ struct SquareMatrixTest { } // Check that PA = LU is actually correct. - MatrixType permutedMatrix = vtkm::MatrixMultiply(P,originalMatrix); - MatrixType productMatrix = vtkm::MatrixMultiply(L,U); + MatrixType permutedMatrix = vtkm::MatrixMultiply(P, originalMatrix); + MatrixType productMatrix = vtkm::MatrixMultiply(L, U); VTKM_TEST_ASSERT(test_equal(permutedMatrix, productMatrix), - "LUP-factorization gave inconsistent answer."); + "LUP-factorization gave inconsistent answer."); // Check that a singular matrix is identified. MatrixType singularMatrix; SingularMatrix(singularMatrix); - vtkm::detail::MatrixLUPFactor(singularMatrix, - permutationVector, - inversionParity, - valid); + vtkm::detail::MatrixLUPFactor(singularMatrix, permutationVector, inversionParity, valid); VTKM_TEST_ASSERT(!valid, "Expected matrix to be declared singular."); } @@ -442,21 +442,20 @@ struct SquareMatrixTest { std::cout << "Solve a linear system" << std::endl; MatrixType A; - vtkm::Vec b; + vtkm::Vec b; NonSingularMatrix(A); for (vtkm::IdComponent index = 0; index < SIZE; index++) { - b[index] = static_cast(index+1); + b[index] = static_cast(index + 1); } bool valid; - vtkm::Vec x = vtkm::SolveLinearSystem(A, b, valid); + vtkm::Vec x = vtkm::SolveLinearSystem(A, b, valid); VTKM_TEST_ASSERT(valid, "Matrix declared singular?"); // Check result. - vtkm::Vec check = vtkm::MatrixMultiply(A,x); - VTKM_TEST_ASSERT(test_equal(b, check), - "Linear solution does not solve equation."); + vtkm::Vec check = vtkm::MatrixMultiply(A, x); + VTKM_TEST_ASSERT(test_equal(b, check), "Linear solution does not solve equation."); // Check that a singular matrix is identified. MatrixType singularMatrix; @@ -482,12 +481,12 @@ struct SquareMatrixTest { NonSingularMatrix(A); bool valid; - vtkm::Matrix inverse = vtkm::MatrixInverse(A, valid); + vtkm::Matrix inverse = vtkm::MatrixInverse(A, valid); VTKM_TEST_ASSERT(valid, "Matrix declared singular?"); // Check result. - vtkm::Matrix product = vtkm::MatrixMultiply(A, inverse); - VTKM_TEST_ASSERT(test_equal(product, vtkm::MatrixIdentity()), + vtkm::Matrix product = vtkm::MatrixMultiply(A, inverse); + VTKM_TEST_ASSERT(test_equal(product, vtkm::MatrixIdentity()), "Matrix inverse did not give identity."); // Check that a singular matrix is identified. @@ -515,8 +514,7 @@ struct SquareMatrixTest { MatrixType singularMatrix; SingularMatrix(singularMatrix); determinant = vtkm::MatrixDeterminant(singularMatrix); - VTKM_TEST_ASSERT(test_equal(determinant, T(0.0)), - "Non-zero determinant for singular matrix."); + VTKM_TEST_ASSERT(test_equal(determinant, T(0.0)), "Non-zero determinant for singular matrix."); } static void Run() @@ -536,72 +534,74 @@ private: struct MatrixTestFunctor { - template - void operator()(const T&) const { - MatrixTest1(); - MatrixTest1(); - MatrixTest1(); - MatrixTest1(); - MatrixTest1(); + template + void operator()(const T&) const + { + MatrixTest1(); + MatrixTest1(); + MatrixTest1(); + MatrixTest1(); + MatrixTest1(); } }; struct SquareMatrixTestFunctor { - template - void operator()(const T&) const { - SquareMatrixTest::Run(); - SquareMatrixTest::Run(); - SquareMatrixTest::Run(); - SquareMatrixTest::Run(); - SquareMatrixTest::Run(); + template + void operator()(const T&) const + { + SquareMatrixTest::Run(); + SquareMatrixTest::Run(); + SquareMatrixTest::Run(); + SquareMatrixTest::Run(); + SquareMatrixTest::Run(); } }; struct VectorMultFunctor { - template - void operator()(const VectorType &) const { + template + void operator()(const VectorType&) const + { // This is mostly to make sure the compile can convert from Tuples // to vectors. const int SIZE = vtkm::VecTraits::NUM_COMPONENTS; typedef typename vtkm::VecTraits::ComponentType ComponentType; - vtkm::Matrix matrix(0); + vtkm::Matrix matrix(0); VectorType inVec; VectorType outVec; for (vtkm::IdComponent index = 0; index < SIZE; index++) { - matrix(index,index) = 1; - inVec[index] = ComponentType(index+1); + matrix(index, index) = 1; + inVec[index] = ComponentType(index + 1); } - outVec = vtkm::MatrixMultiply(matrix,inVec); + outVec = vtkm::MatrixMultiply(matrix, inVec); VTKM_TEST_ASSERT(test_equal(inVec, outVec), "Bad identity multiply."); - outVec = vtkm::MatrixMultiply(inVec,matrix); + outVec = vtkm::MatrixMultiply(inVec, matrix); VTKM_TEST_ASSERT(test_equal(inVec, outVec), "Bad identity multiply."); } }; void TestMatrices() { -// std::cout << "****** Rectangle tests" << std::endl; -// vtkm::testing::Testing::TryTypes(MatrixTestFunctor(), -// vtkm::TypeListTagScalarAll()); + // std::cout << "****** Rectangle tests" << std::endl; + // vtkm::testing::Testing::TryTypes(MatrixTestFunctor(), + // vtkm::TypeListTagScalarAll()); std::cout << "****** Square tests" << std::endl; - vtkm::testing::Testing::TryTypes(SquareMatrixTestFunctor(), - vtkm::TypeListTagFieldScalar()); + vtkm::testing::Testing::TryTypes(SquareMatrixTestFunctor(), vtkm::TypeListTagFieldScalar()); -// std::cout << "***** Vector multiply tests" << std::endl; -// vtkm::testing::Testing::TryTypes(VectorMultFunctor(), -// vtkm::TypeListTagVecAll()); + // std::cout << "***** Vector multiply tests" << std::endl; + // vtkm::testing::Testing::TryTypes(VectorMultFunctor(), + // vtkm::TypeListTagVecAll()); } } // anonymous namespace -int UnitTestMatrix(int, char *[]) +int UnitTestMatrix(int, char* []) { return vtkm::testing::Testing::Run(TestMatrices); } diff --git a/vtkm/testing/UnitTestNewtonsMethod.cxx b/vtkm/testing/UnitTestNewtonsMethod.cxx index 0ae6f0aec..6344d1a8e 100644 --- a/vtkm/testing/UnitTestNewtonsMethod.cxx +++ b/vtkm/testing/UnitTestNewtonsMethod.cxx @@ -22,7 +22,8 @@ #include -namespace { +namespace +{ // We will test Newton's method with the following three functions: // @@ -32,66 +33,68 @@ namespace { // // If we want the result of all three equations to be 1, then there are two // valid solutions: (2/3, -1/3, -2/3) and (2/3, 2/3, 1/3). -template +template struct EvaluateFunctions { - typedef vtkm::Vec Vector3; + typedef vtkm::Vec Vector3; VTKM_EXEC_CONT Vector3 operator()(Vector3 x) const { Vector3 fx; - fx[0] = x[0]*x[0] + x[1]*x[1] + x[2]*x[2]; - fx[1] = 2*x[0] - x[1] + x[2]; + fx[0] = x[0] * x[0] + x[1] * x[1] + x[2] * x[2]; + fx[1] = 2 * x[0] - x[1] + x[2]; fx[2] = x[0] + x[1] - x[2]; return fx; } }; -template +template struct EvaluateJacobian { - typedef vtkm::Vec Vector3; - typedef vtkm::Matrix Matrix3x3; + typedef vtkm::Vec Vector3; + typedef vtkm::Matrix Matrix3x3; VTKM_EXEC_CONT - Matrix3x3 operator()(Vector3 x) const { + Matrix3x3 operator()(Vector3 x) const + { Matrix3x3 jacobian; - jacobian(0,0) = 2*x[0]; jacobian(0,1) = 2*x[1]; jacobian(0,2) = 2*x[2]; - jacobian(1,0) = 2; jacobian(1,1) = -1; jacobian(1,2) = 1; - jacobian(2,0) = 1; jacobian(2,1) = 1; jacobian(2,2) = -1; + jacobian(0, 0) = 2 * x[0]; + jacobian(0, 1) = 2 * x[1]; + jacobian(0, 2) = 2 * x[2]; + jacobian(1, 0) = 2; + jacobian(1, 1) = -1; + jacobian(1, 2) = 1; + jacobian(2, 0) = 1; + jacobian(2, 1) = 1; + jacobian(2, 2) = -1; return jacobian; } }; -template +template void TestNewtonsMethodTemplate() { std::cout << "Testing Newton's Method." << std::endl; - typedef vtkm::Vec Vector3; + typedef vtkm::Vec Vector3; Vector3 desiredOutput(1, 1, 1); - Vector3 expected1(2.0f/3.0f, -1.0f/3.0f, -2.0f/3.0f); - Vector3 expected2(2.0f/3.0f, 2.0f/3.0f, 1.0f/3.0f); + Vector3 expected1(2.0f / 3.0f, -1.0f / 3.0f, -2.0f / 3.0f); + Vector3 expected2(2.0f / 3.0f, 2.0f / 3.0f, 1.0f / 3.0f); Vector3 initialGuess; for (initialGuess[0] = 0.25f; initialGuess[0] <= 1; initialGuess[0] += 0.25f) { for (initialGuess[1] = 0.25f; initialGuess[1] <= 1; initialGuess[1] += 0.25f) { - for (initialGuess[2] = 0.25f; initialGuess[2] <= 1; initialGuess[2] +=0.25f) + for (initialGuess[2] = 0.25f; initialGuess[2] <= 1; initialGuess[2] += 0.25f) { std::cout << " " << initialGuess << std::endl; - Vector3 solution = - vtkm::NewtonsMethod(EvaluateJacobian(), - EvaluateFunctions(), - desiredOutput, - initialGuess, - T(1e-6)); + Vector3 solution = vtkm::NewtonsMethod(EvaluateJacobian(), EvaluateFunctions(), + desiredOutput, initialGuess, T(1e-6)); - VTKM_TEST_ASSERT(test_equal(solution, expected1) - || test_equal(solution, expected2), + VTKM_TEST_ASSERT(test_equal(solution, expected1) || test_equal(solution, expected2), "Newton's method did not converge to expected result."); } } @@ -108,7 +111,7 @@ void TestNewtonsMethod() } // anonymous namespace -int UnitTestNewtonsMethod(int, char *[]) +int UnitTestNewtonsMethod(int, char* []) { return vtkm::testing::Testing::Run(TestNewtonsMethod); } diff --git a/vtkm/testing/UnitTestPair.cxx b/vtkm/testing/UnitTestPair.cxx index 525737a79..2ed9f0645 100644 --- a/vtkm/testing/UnitTestPair.cxx +++ b/vtkm/testing/UnitTestPair.cxx @@ -24,30 +24,28 @@ #include -namespace { +namespace +{ //general pair test template -void PairTest( ) +void PairTest() { //test that all the constructors work properly { - vtkm::Pair no_params_pair; - no_params_pair.first = TestValue(12, T()); - no_params_pair.second = TestValue(34, U()); - vtkm::Pair copy_constructor_pair(no_params_pair); - vtkm::Pair assignment_pair = no_params_pair; + vtkm::Pair no_params_pair; + no_params_pair.first = TestValue(12, T()); + no_params_pair.second = TestValue(34, U()); + vtkm::Pair copy_constructor_pair(no_params_pair); + vtkm::Pair assignment_pair = no_params_pair; - VTKM_TEST_ASSERT( (no_params_pair == copy_constructor_pair), - "copy constructor doesn't match default constructor"); - VTKM_TEST_ASSERT( !(no_params_pair != copy_constructor_pair), - "operator != is working properly"); + VTKM_TEST_ASSERT((no_params_pair == copy_constructor_pair), + "copy constructor doesn't match default constructor"); + VTKM_TEST_ASSERT(!(no_params_pair != copy_constructor_pair), "operator != is working properly"); - - VTKM_TEST_ASSERT( (no_params_pair == assignment_pair), - "assignment constructor doesn't match default constructor"); - VTKM_TEST_ASSERT( !(no_params_pair != assignment_pair), - "operator != is working properly"); + VTKM_TEST_ASSERT((no_params_pair == assignment_pair), + "assignment constructor doesn't match default constructor"); + VTKM_TEST_ASSERT(!(no_params_pair != assignment_pair), "operator != is working properly"); } //now lets give each item in the pair some values and do some in depth @@ -57,98 +55,89 @@ void PairTest( ) //test the constructors now with real values { - vtkm::Pair pair_ab(a,b); - vtkm::Pair copy_constructor_pair(pair_ab); - vtkm::Pair assignment_pair = pair_ab; - vtkm::Pair make_p = vtkm::make_Pair(a,b); + vtkm::Pair pair_ab(a, b); + vtkm::Pair copy_constructor_pair(pair_ab); + vtkm::Pair assignment_pair = pair_ab; + vtkm::Pair make_p = vtkm::make_Pair(a, b); - VTKM_TEST_ASSERT( !(pair_ab != pair_ab), - "operator != isn't working properly for vtkm::Pair" ); - VTKM_TEST_ASSERT( (pair_ab == pair_ab), - "operator == isn't working properly for vtkm::Pair" ); + VTKM_TEST_ASSERT(!(pair_ab != pair_ab), "operator != isn't working properly for vtkm::Pair"); + VTKM_TEST_ASSERT((pair_ab == pair_ab), "operator == isn't working properly for vtkm::Pair"); - VTKM_TEST_ASSERT( (pair_ab == copy_constructor_pair), + VTKM_TEST_ASSERT((pair_ab == copy_constructor_pair), "copy constructor doesn't match pair constructor"); - VTKM_TEST_ASSERT( (pair_ab == assignment_pair), + VTKM_TEST_ASSERT((pair_ab == assignment_pair), "assignment constructor doesn't match pair constructor"); - VTKM_TEST_ASSERT(copy_constructor_pair.first == a, - "first field not set right"); - VTKM_TEST_ASSERT(assignment_pair.second == b, - "second field not set right"); + VTKM_TEST_ASSERT(copy_constructor_pair.first == a, "first field not set right"); + VTKM_TEST_ASSERT(assignment_pair.second == b, "second field not set right"); - VTKM_TEST_ASSERT( (pair_ab == make_p), - "make_pair function doesn't match pair constructor"); + VTKM_TEST_ASSERT((pair_ab == make_p), "make_pair function doesn't match pair constructor"); } - //test the ordering operators <, >, <=, >= { - //in all cases pair_ab2 is > pair_ab. these verify that if the second - //argument of the pair is different we respond properly - U b2(b); - vtkm::VecTraits::SetComponent(b2,0, - vtkm::VecTraits::GetComponent(b2,0)+1); + //in all cases pair_ab2 is > pair_ab. these verify that if the second + //argument of the pair is different we respond properly + U b2(b); + vtkm::VecTraits::SetComponent(b2, 0, vtkm::VecTraits::GetComponent(b2, 0) + 1); - vtkm::Pair pair_ab2(a,b2); - vtkm::Pair pair_ab(a,b); + vtkm::Pair pair_ab2(a, b2); + vtkm::Pair pair_ab(a, b); - VTKM_TEST_ASSERT( (pair_ab2 >= pair_ab), "operator >= failed" ); - VTKM_TEST_ASSERT( (pair_ab2 >= pair_ab2), "operator >= failed" ); + VTKM_TEST_ASSERT((pair_ab2 >= pair_ab), "operator >= failed"); + VTKM_TEST_ASSERT((pair_ab2 >= pair_ab2), "operator >= failed"); - VTKM_TEST_ASSERT( (pair_ab2 > pair_ab), "operator > failed" ); - VTKM_TEST_ASSERT( !(pair_ab2 > pair_ab2), "operator > failed" ); + VTKM_TEST_ASSERT((pair_ab2 > pair_ab), "operator > failed"); + VTKM_TEST_ASSERT(!(pair_ab2 > pair_ab2), "operator > failed"); - VTKM_TEST_ASSERT( !(pair_ab2 < pair_ab), "operator < failed" ); - VTKM_TEST_ASSERT( !(pair_ab2 < pair_ab2), "operator < failed" ); + VTKM_TEST_ASSERT(!(pair_ab2 < pair_ab), "operator < failed"); + VTKM_TEST_ASSERT(!(pair_ab2 < pair_ab2), "operator < failed"); - VTKM_TEST_ASSERT( !(pair_ab2 <= pair_ab), "operator <= failed" ); - VTKM_TEST_ASSERT( (pair_ab2 <= pair_ab2), "operator <= failed" ); + VTKM_TEST_ASSERT(!(pair_ab2 <= pair_ab), "operator <= failed"); + VTKM_TEST_ASSERT((pair_ab2 <= pair_ab2), "operator <= failed"); - VTKM_TEST_ASSERT( !(pair_ab2 == pair_ab), "operator == failed" ); - VTKM_TEST_ASSERT( (pair_ab2 != pair_ab), "operator != failed" ); + VTKM_TEST_ASSERT(!(pair_ab2 == pair_ab), "operator == failed"); + VTKM_TEST_ASSERT((pair_ab2 != pair_ab), "operator != failed"); - T a2(a); - vtkm::VecTraits::SetComponent(a2,0, - vtkm::VecTraits::GetComponent(a2,0)+1); - vtkm::Pair pair_a2b(a2,b); - //this way can verify that if the first argument of the pair is different - //we respond properly - VTKM_TEST_ASSERT( (pair_a2b >= pair_ab), "operator >= failed" ); - VTKM_TEST_ASSERT( (pair_a2b >= pair_a2b), "operator >= failed" ); + T a2(a); + vtkm::VecTraits::SetComponent(a2, 0, vtkm::VecTraits::GetComponent(a2, 0) + 1); + vtkm::Pair pair_a2b(a2, b); + //this way can verify that if the first argument of the pair is different + //we respond properly + VTKM_TEST_ASSERT((pair_a2b >= pair_ab), "operator >= failed"); + VTKM_TEST_ASSERT((pair_a2b >= pair_a2b), "operator >= failed"); - VTKM_TEST_ASSERT( (pair_a2b > pair_ab), "operator > failed" ); - VTKM_TEST_ASSERT( !(pair_a2b > pair_a2b), "operator > failed" ); + VTKM_TEST_ASSERT((pair_a2b > pair_ab), "operator > failed"); + VTKM_TEST_ASSERT(!(pair_a2b > pair_a2b), "operator > failed"); - VTKM_TEST_ASSERT( !(pair_a2b < pair_ab), "operator < failed" ); - VTKM_TEST_ASSERT( !(pair_a2b < pair_a2b), "operator < failed" ); + VTKM_TEST_ASSERT(!(pair_a2b < pair_ab), "operator < failed"); + VTKM_TEST_ASSERT(!(pair_a2b < pair_a2b), "operator < failed"); - VTKM_TEST_ASSERT( !(pair_a2b <= pair_ab), "operator <= failed" ); - VTKM_TEST_ASSERT( (pair_a2b <= pair_a2b), "operator <= failed" ); + VTKM_TEST_ASSERT(!(pair_a2b <= pair_ab), "operator <= failed"); + VTKM_TEST_ASSERT((pair_a2b <= pair_a2b), "operator <= failed"); - VTKM_TEST_ASSERT( !(pair_a2b == pair_ab), "operator == failed" ); - VTKM_TEST_ASSERT( (pair_a2b != pair_ab), "operator != failed" ); + VTKM_TEST_ASSERT(!(pair_a2b == pair_ab), "operator == failed"); + VTKM_TEST_ASSERT((pair_a2b != pair_ab), "operator != failed"); } - } -template< typename FirstType > +template struct DecideSecondType { - template void operator()(const SecondType&) const + template + void operator()(const SecondType&) const { - PairTest(); + PairTest(); } }; struct DecideFirstType { - template void operator()(const T&) const + template + void operator()(const T&) const { - //T is our first type for vtkm::Pair, now to figure out the second type - vtkm::testing::Testing::TryTypes(DecideSecondType(), - vtkm::TypeListTagField()); - + //T is our first type for vtkm::Pair, now to figure out the second type + vtkm::testing::Testing::TryTypes(DecideSecondType(), vtkm::TypeListTagField()); } }; @@ -159,13 +148,12 @@ void TestPair() //dispatch on all types, but that gets excessively large and takes a //long time to compile (although it runs fast). Instead, just select //a subset of non-trivial combinations. - vtkm::testing::Testing::TryTypes(DecideFirstType(), - vtkm::TypeListTagCommon()); + vtkm::testing::Testing::TryTypes(DecideFirstType(), vtkm::TypeListTagCommon()); } } // anonymous namespace -int UnitTestPair(int, char *[]) +int UnitTestPair(int, char* []) { return vtkm::testing::Testing::Run(TestPair); } diff --git a/vtkm/testing/UnitTestRange.cxx b/vtkm/testing/UnitTestRange.cxx index c86a53181..54cdde60b 100644 --- a/vtkm/testing/UnitTestRange.cxx +++ b/vtkm/testing/UnitTestRange.cxx @@ -22,7 +22,8 @@ #include -namespace { +namespace +{ void TestRange() { @@ -137,7 +138,7 @@ void TestRange() } // anonymous namespace -int UnitTestRange(int, char *[]) +int UnitTestRange(int, char* []) { return vtkm::testing::Testing::Run(TestRange); } diff --git a/vtkm/testing/UnitTestTesting.cxx b/vtkm/testing/UnitTestTesting.cxx index 4e5af1dea..94147b922 100644 --- a/vtkm/testing/UnitTestTesting.cxx +++ b/vtkm/testing/UnitTestTesting.cxx @@ -23,7 +23,8 @@ #include -namespace { +namespace +{ void Fail() { @@ -42,10 +43,8 @@ void GoodAssert() void TestTestEqual() { - VTKM_TEST_ASSERT(test_equal(2.0, 1.9999999), - "These should be close enough."); - VTKM_TEST_ASSERT(!test_equal(2.0, 1.999), - "These should not be close enough."); + VTKM_TEST_ASSERT(test_equal(2.0, 1.9999999), "These should be close enough."); + VTKM_TEST_ASSERT(!test_equal(2.0, 1.999), "These should not be close enough."); } // All tests that should not raise a failure. @@ -57,7 +56,7 @@ void CleanTests() } // anonymous namespace -int UnitTestTesting(int, char *[]) +int UnitTestTesting(int, char* []) { std::cout << "This call should fail." << std::endl; if (vtkm::testing::Testing::Run(Fail) == 0) diff --git a/vtkm/testing/UnitTestTransform3D.cxx b/vtkm/testing/UnitTestTransform3D.cxx index 1e9287042..1a670db6a 100644 --- a/vtkm/testing/UnitTestTransform3D.cxx +++ b/vtkm/testing/UnitTestTransform3D.cxx @@ -27,26 +27,29 @@ #include #include -namespace { +namespace +{ std::mt19937 g_RandomGenerator; -template +template struct TransformTests { std::uniform_real_distribution RandomDistribution; TransformTests() - : RandomDistribution(0.0f, 1.0f) { } + : RandomDistribution(0.0f, 1.0f) + { + } T RandomNum() { return this->RandomDistribution(g_RandomGenerator); } - typedef vtkm::Vec Vec; - typedef vtkm::Matrix Transform; + typedef vtkm::Vec Vec; + typedef vtkm::Matrix Transform; Vec RandomVector() { Vec vec(this->RandomNum(), this->RandomNum(), this->RandomNum()); - return T(2)*vec - Vec(1); + return T(2) * vec - Vec(1); } void CheckTranslate() @@ -63,12 +66,11 @@ struct TransformTests Vec translated1 = vtkm::Transform3DPoint(translate, startPoint); std::cout << " First translation: " << translated1 << std::endl; - VTKM_TEST_ASSERT(test_equal(translated1, startPoint+translateAmount), - "Bad translation."); + VTKM_TEST_ASSERT(test_equal(translated1, startPoint + translateAmount), "Bad translation."); Vec translated2 = vtkm::Transform3DPoint(translate, translated1); std::cout << " Second translation: " << translated2 << std::endl; - VTKM_TEST_ASSERT(test_equal(translated2, startPoint+T(2)*translateAmount), + VTKM_TEST_ASSERT(test_equal(translated2, startPoint + T(2) * translateAmount), "Bad translation."); // Vectors should be invarient to translation. @@ -91,19 +93,16 @@ struct TransformTests Vec scaled1 = vtkm::Transform3DPoint(scale, startPoint); std::cout << " First scale: " << scaled1 << std::endl; - VTKM_TEST_ASSERT(test_equal(scaled1, startPoint*scaleAmount), - "Bad scale."); + VTKM_TEST_ASSERT(test_equal(scaled1, startPoint * scaleAmount), "Bad scale."); Vec scaled2 = vtkm::Transform3DPoint(scale, scaled1); std::cout << " Second scale: " << scaled2 << std::endl; - VTKM_TEST_ASSERT(test_equal(scaled2, startPoint*scaleAmount*scaleAmount), - "Bad scale."); + VTKM_TEST_ASSERT(test_equal(scaled2, startPoint * scaleAmount * scaleAmount), "Bad scale."); // Vectors should scale the same as points. scaled1 = vtkm::Transform3DVector(scale, startPoint); std::cout << " Scaled vector: " << scaled1 << std::endl; - VTKM_TEST_ASSERT(test_equal(scaled1, startPoint*scaleAmount), - "Bad scale."); + VTKM_TEST_ASSERT(test_equal(scaled1, startPoint * scaleAmount), "Bad scale."); } void CheckRotate() @@ -120,66 +119,57 @@ struct TransformTests Vec rotated1 = vtkm::Transform3DPoint(rotateX, startPoint); std::cout << " First rotate: " << rotated1 << std::endl; - VTKM_TEST_ASSERT( - test_equal(rotated1, Vec(startPoint[0],-startPoint[2],startPoint[1])), - "Bad rotate."); + VTKM_TEST_ASSERT(test_equal(rotated1, Vec(startPoint[0], -startPoint[2], startPoint[1])), + "Bad rotate."); Vec rotated2 = vtkm::Transform3DPoint(rotateX, rotated1); std::cout << " Second rotate: " << rotated2 << std::endl; - VTKM_TEST_ASSERT( - test_equal(rotated2, Vec(startPoint[0],-startPoint[1],-startPoint[2])), - "Bad rotate."); + VTKM_TEST_ASSERT(test_equal(rotated2, Vec(startPoint[0], -startPoint[1], -startPoint[2])), + "Bad rotate."); // Vectors should rotate the same as points. rotated1 = vtkm::Transform3DVector(rotateX, startPoint); std::cout << " Vector rotate: " << rotated1 << std::endl; - VTKM_TEST_ASSERT( - test_equal(rotated1, Vec(startPoint[0],-startPoint[2],startPoint[1])), - "Bad rotate."); + VTKM_TEST_ASSERT(test_equal(rotated1, Vec(startPoint[0], -startPoint[2], startPoint[1])), + "Bad rotate."); std::cout << "--Rotate 90 degrees around Y" << std::endl; Transform rotateY = vtkm::Transform3DRotateY(ninetyDegrees); rotated1 = vtkm::Transform3DPoint(rotateY, startPoint); std::cout << " First rotate: " << rotated1 << std::endl; - VTKM_TEST_ASSERT( - test_equal(rotated1, Vec(startPoint[2],startPoint[1],-startPoint[0])), - "Bad rotate."); + VTKM_TEST_ASSERT(test_equal(rotated1, Vec(startPoint[2], startPoint[1], -startPoint[0])), + "Bad rotate."); rotated2 = vtkm::Transform3DPoint(rotateY, rotated1); std::cout << " Second rotate: " << rotated2 << std::endl; - VTKM_TEST_ASSERT( - test_equal(rotated2, Vec(-startPoint[0],startPoint[1],-startPoint[2])), - "Bad rotate."); + VTKM_TEST_ASSERT(test_equal(rotated2, Vec(-startPoint[0], startPoint[1], -startPoint[2])), + "Bad rotate."); // Vectors should rotate the same as points. rotated1 = vtkm::Transform3DVector(rotateY, startPoint); std::cout << " Vector rotate: " << rotated1 << std::endl; - VTKM_TEST_ASSERT( - test_equal(rotated1, Vec(startPoint[2],startPoint[1],-startPoint[0])), - "Bad rotate."); + VTKM_TEST_ASSERT(test_equal(rotated1, Vec(startPoint[2], startPoint[1], -startPoint[0])), + "Bad rotate."); std::cout << "--Rotate 90 degrees around Z" << std::endl; Transform rotateZ = vtkm::Transform3DRotateZ(ninetyDegrees); rotated1 = vtkm::Transform3DPoint(rotateZ, startPoint); std::cout << " First rotate: " << rotated1 << std::endl; - VTKM_TEST_ASSERT( - test_equal(rotated1, Vec(-startPoint[1],startPoint[0],startPoint[2])), - "Bad rotate."); + VTKM_TEST_ASSERT(test_equal(rotated1, Vec(-startPoint[1], startPoint[0], startPoint[2])), + "Bad rotate."); rotated2 = vtkm::Transform3DPoint(rotateZ, rotated1); std::cout << " Second rotate: " << rotated2 << std::endl; - VTKM_TEST_ASSERT( - test_equal(rotated2, Vec(-startPoint[0],-startPoint[1],startPoint[2])), - "Bad rotate."); + VTKM_TEST_ASSERT(test_equal(rotated2, Vec(-startPoint[0], -startPoint[1], startPoint[2])), + "Bad rotate."); // Vectors should rotate the same as points. rotated1 = vtkm::Transform3DVector(rotateZ, startPoint); std::cout << " Vector rotate: " << rotated1 << std::endl; - VTKM_TEST_ASSERT( - test_equal(rotated1, Vec(-startPoint[1],startPoint[0],startPoint[2])), - "Bad rotate."); + VTKM_TEST_ASSERT(test_equal(rotated1, Vec(-startPoint[1], startPoint[0], startPoint[2])), + "Bad rotate."); } void CheckPerspective() @@ -197,15 +187,13 @@ struct TransformTests Vec projected = vtkm::Transform3DPointPerspective(perspective, startPoint); std::cout << " Projected: " << projected << std::endl; - VTKM_TEST_ASSERT( - test_equal(projected, startPoint/startPoint[2]), - "Bad perspective."); + VTKM_TEST_ASSERT(test_equal(projected, startPoint / startPoint[2]), "Bad perspective."); } }; struct TryTransformsFunctor { - template + template void operator()(T) const { TransformTests tests; @@ -221,13 +209,12 @@ void TestTransforms() std::cout << "Seed: " << seed << std::endl; g_RandomGenerator.seed(seed); - vtkm::testing::Testing::TryTypes(TryTransformsFunctor(), - vtkm::TypeListTagFieldScalar()); + vtkm::testing::Testing::TryTypes(TryTransformsFunctor(), vtkm::TypeListTagFieldScalar()); } } // anonymous namespace -int UnitTestTransform3D(int, char *[]) +int UnitTestTransform3D(int, char* []) { return vtkm::testing::Testing::Run(TestTransforms); } diff --git a/vtkm/testing/UnitTestTypeListTag.cxx b/vtkm/testing/UnitTestTypeListTag.cxx index 506da9df4..2e87eb1d7 100644 --- a/vtkm/testing/UnitTestTypeListTag.cxx +++ b/vtkm/testing/UnitTestTypeListTag.cxx @@ -27,20 +27,24 @@ #include #include -namespace { +namespace +{ class TypeSet { typedef std::set NameSetType; NameSetType NameSet; + public: - template - void AddExpected(T) { + template + void AddExpected(T) + { this->NameSet.insert(vtkm::testing::TypeName::Name()); } - template - void Found(T) { + template + void Found(T) + { std::string name = vtkm::testing::TypeName::Name(); //std::cout << " found " << name << std::endl; NameSetType::iterator typeLocation = this->NameSet.find(name); @@ -56,15 +60,13 @@ public: } } - void CheckFound() { - for (NameSetType::iterator typeP = this->NameSet.begin(); - typeP != this->NameSet.end(); - typeP++) + void CheckFound() + { + for (NameSetType::iterator typeP = this->NameSet.begin(); typeP != this->NameSet.end(); typeP++) { std::cout << "**** Failed to find " << *typeP << std::endl; } - VTKM_TEST_ASSERT(this->NameSet.empty(), - "List did not call functor on all expected types."); + VTKM_TEST_ASSERT(this->NameSet.empty(), "List did not call functor on all expected types."); } }; @@ -72,17 +74,20 @@ struct TestFunctor { TypeSet ExpectedTypes; - TestFunctor(const TypeSet &expectedTypes) : ExpectedTypes(expectedTypes) { } + TestFunctor(const TypeSet& expectedTypes) + : ExpectedTypes(expectedTypes) + { + } - template - VTKM_CONT - void operator()(T) { + template + VTKM_CONT void operator()(T) + { this->ExpectedTypes.Found(T()); } }; -template -void TryList(const TypeSet &expected, ListTag) +template +void TryList(const TypeSet& expected, ListTag) { TestFunctor functor(expected); vtkm::ListForEach(functor, ListTag()); @@ -121,32 +126,32 @@ void TestLists() std::cout << "TypeListTagFieldVec2" << std::endl; TypeSet vec2; - vec2.AddExpected(vtkm::Vec()); - vec2.AddExpected(vtkm::Vec()); + vec2.AddExpected(vtkm::Vec()); + vec2.AddExpected(vtkm::Vec()); TryList(vec2, vtkm::TypeListTagFieldVec2()); std::cout << "TypeListTagFieldVec3" << std::endl; TypeSet vec3; - vec3.AddExpected(vtkm::Vec()); - vec3.AddExpected(vtkm::Vec()); + vec3.AddExpected(vtkm::Vec()); + vec3.AddExpected(vtkm::Vec()); TryList(vec3, vtkm::TypeListTagFieldVec3()); std::cout << "TypeListTagFieldVec4" << std::endl; TypeSet vec4; - vec4.AddExpected(vtkm::Vec()); - vec4.AddExpected(vtkm::Vec()); + vec4.AddExpected(vtkm::Vec()); + vec4.AddExpected(vtkm::Vec()); TryList(vec4, vtkm::TypeListTagFieldVec4()); std::cout << "TypeListTagField" << std::endl; TypeSet field; field.AddExpected(vtkm::Float32()); field.AddExpected(vtkm::Float64()); - field.AddExpected(vtkm::Vec()); - field.AddExpected(vtkm::Vec()); - field.AddExpected(vtkm::Vec()); - field.AddExpected(vtkm::Vec()); - field.AddExpected(vtkm::Vec()); - field.AddExpected(vtkm::Vec()); + field.AddExpected(vtkm::Vec()); + field.AddExpected(vtkm::Vec()); + field.AddExpected(vtkm::Vec()); + field.AddExpected(vtkm::Vec()); + field.AddExpected(vtkm::Vec()); + field.AddExpected(vtkm::Vec()); TryList(field, vtkm::TypeListTagField()); std::cout << "TypeListTagCommon" << std::endl; @@ -155,8 +160,8 @@ void TestLists() common.AddExpected(vtkm::Float64()); common.AddExpected(vtkm::Int32()); common.AddExpected(vtkm::Int64()); - common.AddExpected(vtkm::Vec()); - common.AddExpected(vtkm::Vec()); + common.AddExpected(vtkm::Vec()); + common.AddExpected(vtkm::Vec()); TryList(common, vtkm::TypeListTagCommon()); std::cout << "TypeListTagScalarAll" << std::endl; @@ -175,55 +180,55 @@ void TestLists() std::cout << "TypeListTagVecCommon" << std::endl; TypeSet vecCommon; - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); - vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); + vecCommon.AddExpected(vtkm::Vec()); TryList(vecCommon, vtkm::TypeListTagVecCommon()); std::cout << "TypeListTagVecAll" << std::endl; TypeSet vecAll; - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); - vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); + vecAll.AddExpected(vtkm::Vec()); TryList(vecAll, vtkm::TypeListTagVecAll()); std::cout << "TypeListTagAll" << std::endl; @@ -238,42 +243,42 @@ void TestLists() all.AddExpected(vtkm::UInt32()); all.AddExpected(vtkm::Int64()); all.AddExpected(vtkm::UInt64()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); - all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); + all.AddExpected(vtkm::Vec()); TryList(all, vtkm::TypeListTagAll()); } } // anonymous namespace -int UnitTestTypeListTag(int, char *[]) +int UnitTestTypeListTag(int, char* []) { return vtkm::testing::Testing::Run(TestLists); } diff --git a/vtkm/testing/UnitTestTypeTraits.cxx b/vtkm/testing/UnitTestTypeTraits.cxx index e2890b601..f0ca36b01 100644 --- a/vtkm/testing/UnitTestTypeTraits.cxx +++ b/vtkm/testing/UnitTestTypeTraits.cxx @@ -24,19 +24,21 @@ #include -namespace { +namespace +{ struct TypeTraitTest { - template void operator()(T t) const + template + void operator()(T t) const { // If you get compiler errors here, it could be a TypeTraits instance // has missing or malformed tags. this->TestDimensionality(t, typename vtkm::TypeTraits::DimensionalityTag()); this->TestNumeric(t, typename vtkm::TypeTraits::NumericTag()); } -private: +private: template void TestDimensionality(T, vtkm::TypeTraitsScalarTag) const { @@ -82,7 +84,7 @@ static void TestTypeTraits() } // anonymous namespace //----------------------------------------------------------------------------- -int UnitTestTypeTraits(int, char *[]) +int UnitTestTypeTraits(int, char* []) { return vtkm::testing::Testing::Run(TestTypeTraits); } diff --git a/vtkm/testing/UnitTestTypes.cxx b/vtkm/testing/UnitTestTypes.cxx index b28738840..b46ad5fb8 100644 --- a/vtkm/testing/UnitTestTypes.cxx +++ b/vtkm/testing/UnitTestTypes.cxx @@ -22,7 +22,8 @@ #include -namespace { +namespace +{ void CheckTypeSizes() { @@ -41,424 +42,405 @@ void CheckTypeSizes() // This part of the test has to be broken out of GeneralVecTypeTest because // the negate operation is only supported on vectors of signed types. -template -void DoGeneralVecTypeTestNegate(const vtkm::Vec &) +template +void DoGeneralVecTypeTestNegate(const vtkm::Vec&) { - typedef vtkm::Vec VectorType; + typedef vtkm::Vec VectorType; for (vtkm::Id valueIndex = 0; valueIndex < 10; valueIndex++) { VectorType original = TestValue(valueIndex, VectorType()); VectorType negative = -original; - for (vtkm::IdComponent componentIndex = 0; - componentIndex < Size; - componentIndex++) + for (vtkm::IdComponent componentIndex = 0; componentIndex < Size; componentIndex++) { - VTKM_TEST_ASSERT( - test_equal(-(original[componentIndex]), negative[componentIndex]), - "Vec did not negate correctly."); + VTKM_TEST_ASSERT(test_equal(-(original[componentIndex]), negative[componentIndex]), + "Vec did not negate correctly."); } - VTKM_TEST_ASSERT(test_equal(original, -negative), - "Double Vec negative is not positive."); + VTKM_TEST_ASSERT(test_equal(original, -negative), "Double Vec negative is not positive."); } } -template -void GeneralVecTypeTestNegate(const vtkm::Vec &) +template +void GeneralVecTypeTestNegate(const vtkm::Vec&) { // Do not test the negate operator unless it is a negatable type. } -template -void GeneralVecTypeTestNegate(const vtkm::Vec &x) +template +void GeneralVecTypeTestNegate(const vtkm::Vec& x) { DoGeneralVecTypeTestNegate(x); } -template -void GeneralVecTypeTestNegate(const vtkm::Vec &x) +template +void GeneralVecTypeTestNegate(const vtkm::Vec& x) { DoGeneralVecTypeTestNegate(x); } -template -void GeneralVecTypeTestNegate(const vtkm::Vec &x) +template +void GeneralVecTypeTestNegate(const vtkm::Vec& x) { DoGeneralVecTypeTestNegate(x); } -template -void GeneralVecTypeTestNegate(const vtkm::Vec &x) +template +void GeneralVecTypeTestNegate(const vtkm::Vec& x) { DoGeneralVecTypeTestNegate(x); } -template -void GeneralVecTypeTestNegate(const vtkm::Vec &x) +template +void GeneralVecTypeTestNegate(const vtkm::Vec& x) { DoGeneralVecTypeTestNegate(x); } -template -void GeneralVecTypeTestNegate(const vtkm::Vec &x) +template +void GeneralVecTypeTestNegate(const vtkm::Vec& x) { DoGeneralVecTypeTestNegate(x); } //general type test for VecC -template -void GeneralVecCTypeTest(const vtkm::Vec &) +template +void GeneralVecCTypeTest(const vtkm::Vec&) { std::cout << "Checking VecC functionality" << std::endl; using T = vtkm::VecC; - using VecT = vtkm::Vec; + using VecT = vtkm::Vec; //grab the number of elements of T VecT aSrc, bSrc, cSrc; T a(aSrc), b(bSrc), c(cSrc); - VTKM_TEST_ASSERT(a.GetNumberOfComponents() == Size, - "GetNumberOfComponents returns wrong size."); + VTKM_TEST_ASSERT(a.GetNumberOfComponents() == Size, "GetNumberOfComponents returns wrong size."); - for(vtkm::IdComponent i=0; i < Size; ++i) + for (vtkm::IdComponent i = 0; i < Size; ++i) { - a[i]=ComponentType((i+1)*2); - b[i]=ComponentType(i+1); + a[i] = ComponentType((i + 1) * 2); + b[i] = ComponentType(i + 1); } c = a; VTKM_TEST_ASSERT(test_equal(a, c), "Copy does not work."); //verify prefix and postfix increment and decrement - ++c[Size-1]; - c[Size-1]++; - VTKM_TEST_ASSERT(test_equal(c[Size-1], a[Size-1]+2), - "Bad increment on component."); - --c[Size-1]; - c[Size-1]--; - VTKM_TEST_ASSERT(test_equal(c[Size-1], a[Size-1]), - "Bad decrement on component."); + ++c[Size - 1]; + c[Size - 1]++; + VTKM_TEST_ASSERT(test_equal(c[Size - 1], a[Size - 1] + 2), "Bad increment on component."); + --c[Size - 1]; + c[Size - 1]--; + VTKM_TEST_ASSERT(test_equal(c[Size - 1], a[Size - 1]), "Bad decrement on component."); c = a; c += b; - VTKM_TEST_ASSERT(test_equal(c, aSrc+bSrc), "Bad +="); + VTKM_TEST_ASSERT(test_equal(c, aSrc + bSrc), "Bad +="); c -= b; VTKM_TEST_ASSERT(test_equal(c, a), "Bad -="); c *= b; - VTKM_TEST_ASSERT(test_equal(c, aSrc*bSrc), "Bad *="); + VTKM_TEST_ASSERT(test_equal(c, aSrc * bSrc), "Bad *="); c /= b; VTKM_TEST_ASSERT(test_equal(c, a), "Bad /="); //make c nearly alike a to verify == and != are correct. c = a; - c[Size-1]=ComponentType(c[Size-1]-1); + c[Size - 1] = ComponentType(c[Size - 1] - 1); VecT correct_plus; - for(vtkm::IdComponent i=0; i < Size; ++i) + for (vtkm::IdComponent i = 0; i < Size; ++i) { correct_plus[i] = ComponentType(a[i] + b[i]); } VecT plus = a + bSrc; - VTKM_TEST_ASSERT(test_equal(plus, correct_plus),"Tuples not added correctly."); + VTKM_TEST_ASSERT(test_equal(plus, correct_plus), "Tuples not added correctly."); plus = aSrc + b; - VTKM_TEST_ASSERT(test_equal(plus, correct_plus),"Tuples not added correctly."); + VTKM_TEST_ASSERT(test_equal(plus, correct_plus), "Tuples not added correctly."); VecT correct_minus; - for(vtkm::IdComponent i=0; i < Size; ++i) + for (vtkm::IdComponent i = 0; i < Size; ++i) { correct_minus[i] = ComponentType(a[i] - b[i]); } VecT minus = a - bSrc; - VTKM_TEST_ASSERT(test_equal(minus, correct_minus),"Tuples not subtracted correctly."); + VTKM_TEST_ASSERT(test_equal(minus, correct_minus), "Tuples not subtracted correctly."); minus = aSrc - b; - VTKM_TEST_ASSERT(test_equal(minus, correct_minus),"Tuples not subtracted correctly."); - + VTKM_TEST_ASSERT(test_equal(minus, correct_minus), "Tuples not subtracted correctly."); VecT correct_mult; - for(vtkm::IdComponent i=0; i < Size; ++i) + for (vtkm::IdComponent i = 0; i < Size; ++i) { correct_mult[i] = ComponentType(a[i] * b[i]); } VecT mult = a * bSrc; - VTKM_TEST_ASSERT(test_equal(mult, correct_mult),"Tuples not multiplied correctly."); + VTKM_TEST_ASSERT(test_equal(mult, correct_mult), "Tuples not multiplied correctly."); mult = aSrc * b; - VTKM_TEST_ASSERT(test_equal(mult, correct_mult),"Tuples not multiplied correctly."); + VTKM_TEST_ASSERT(test_equal(mult, correct_mult), "Tuples not multiplied correctly."); VecT correct_div; - for(vtkm::IdComponent i=0; i < Size; ++i) + for (vtkm::IdComponent i = 0; i < Size; ++i) { correct_div[i] = ComponentType(a[i] / b[i]); } VecT div = a / bSrc; - VTKM_TEST_ASSERT(test_equal(div,correct_div),"Tuples not divided correctly."); + VTKM_TEST_ASSERT(test_equal(div, correct_div), "Tuples not divided correctly."); div = aSrc / b; - VTKM_TEST_ASSERT(test_equal(div,correct_div),"Tuples not divided correctly."); - + VTKM_TEST_ASSERT(test_equal(div, correct_div), "Tuples not divided correctly."); ComponentType d = vtkm::dot(a, b); ComponentType correct_d = 0; - for(vtkm::IdComponent i=0; i < Size; ++i) + for (vtkm::IdComponent i = 0; i < Size; ++i) { correct_d = ComponentType(correct_d + a[i] * b[i]); } VTKM_TEST_ASSERT(test_equal(d, correct_d), "dot(Tuple) wrong"); VTKM_TEST_ASSERT(!(a < b), "operator< wrong"); - VTKM_TEST_ASSERT((b < a), "operator< wrong"); - VTKM_TEST_ASSERT(!(a < a), "operator< wrong"); - VTKM_TEST_ASSERT((a < plus), "operator< wrong"); - VTKM_TEST_ASSERT((minus < plus), "operator< wrong"); - VTKM_TEST_ASSERT((c < a), "operator< wrong"); + VTKM_TEST_ASSERT((b < a), "operator< wrong"); + VTKM_TEST_ASSERT(!(a < a), "operator< wrong"); + VTKM_TEST_ASSERT((a < plus), "operator< wrong"); + VTKM_TEST_ASSERT((minus < plus), "operator< wrong"); + VTKM_TEST_ASSERT((c < a), "operator< wrong"); VTKM_TEST_ASSERT(!(a == b), "operator== wrong"); - VTKM_TEST_ASSERT((a == a), "operator== wrong"); + VTKM_TEST_ASSERT((a == a), "operator== wrong"); - VTKM_TEST_ASSERT((a != b), "operator!= wrong"); + VTKM_TEST_ASSERT((a != b), "operator!= wrong"); VTKM_TEST_ASSERT(!(a != a), "operator!= wrong"); //test against a tuple that shares some values - VTKM_TEST_ASSERT( !(c == a), "operator == wrong"); - VTKM_TEST_ASSERT( !(a == c), "operator == wrong"); + VTKM_TEST_ASSERT(!(c == a), "operator == wrong"); + VTKM_TEST_ASSERT(!(a == c), "operator == wrong"); - VTKM_TEST_ASSERT( (c != a), "operator != wrong"); - VTKM_TEST_ASSERT( (a != c), "operator != wrong"); + VTKM_TEST_ASSERT((c != a), "operator != wrong"); + VTKM_TEST_ASSERT((a != c), "operator != wrong"); } //general type test for VecC -template -void GeneralVecCConstTypeTest(const vtkm::Vec &) +template +void GeneralVecCConstTypeTest(const vtkm::Vec&) { std::cout << "Checking VecCConst functionality" << std::endl; using T = vtkm::VecCConst; - using VecT = vtkm::Vec; + using VecT = vtkm::Vec; //grab the number of elements of T VecT aSrc, bSrc, cSrc; - for(vtkm::IdComponent i=0; i < Size; ++i) + for (vtkm::IdComponent i = 0; i < Size; ++i) { - aSrc[i]=ComponentType((i+1)*2); - bSrc[i]=ComponentType(i+1); + aSrc[i] = ComponentType((i + 1) * 2); + bSrc[i] = ComponentType(i + 1); } cSrc = aSrc; T a(aSrc), b(bSrc), c(cSrc); - VTKM_TEST_ASSERT(a.GetNumberOfComponents() == Size, - "GetNumberOfComponents returns wrong size."); + VTKM_TEST_ASSERT(a.GetNumberOfComponents() == Size, "GetNumberOfComponents returns wrong size."); VTKM_TEST_ASSERT(test_equal(a, c), "Comparison not working."); //make c nearly alike a to verify == and != are correct. cSrc = aSrc; - cSrc[Size-1]=ComponentType(cSrc[Size-1]-1); + cSrc[Size - 1] = ComponentType(cSrc[Size - 1] - 1); VecT correct_plus; - for(vtkm::IdComponent i=0; i < Size; ++i) + for (vtkm::IdComponent i = 0; i < Size; ++i) { correct_plus[i] = ComponentType(a[i] + b[i]); } VecT plus = a + bSrc; - VTKM_TEST_ASSERT(test_equal(plus, correct_plus),"Tuples not added correctly."); + VTKM_TEST_ASSERT(test_equal(plus, correct_plus), "Tuples not added correctly."); plus = aSrc + b; - VTKM_TEST_ASSERT(test_equal(plus, correct_plus),"Tuples not added correctly."); + VTKM_TEST_ASSERT(test_equal(plus, correct_plus), "Tuples not added correctly."); VecT correct_minus; - for(vtkm::IdComponent i=0; i < Size; ++i) + for (vtkm::IdComponent i = 0; i < Size; ++i) { correct_minus[i] = ComponentType(a[i] - b[i]); } VecT minus = a - bSrc; - VTKM_TEST_ASSERT(test_equal(minus, correct_minus),"Tuples not subtracted correctly."); + VTKM_TEST_ASSERT(test_equal(minus, correct_minus), "Tuples not subtracted correctly."); minus = aSrc - b; - VTKM_TEST_ASSERT(test_equal(minus, correct_minus),"Tuples not subtracted correctly."); - + VTKM_TEST_ASSERT(test_equal(minus, correct_minus), "Tuples not subtracted correctly."); VecT correct_mult; - for(vtkm::IdComponent i=0; i < Size; ++i) + for (vtkm::IdComponent i = 0; i < Size; ++i) { correct_mult[i] = ComponentType(a[i] * b[i]); } VecT mult = a * bSrc; - VTKM_TEST_ASSERT(test_equal(mult, correct_mult),"Tuples not multiplied correctly."); + VTKM_TEST_ASSERT(test_equal(mult, correct_mult), "Tuples not multiplied correctly."); mult = aSrc * b; - VTKM_TEST_ASSERT(test_equal(mult, correct_mult),"Tuples not multiplied correctly."); + VTKM_TEST_ASSERT(test_equal(mult, correct_mult), "Tuples not multiplied correctly."); VecT correct_div; - for(vtkm::IdComponent i=0; i < Size; ++i) + for (vtkm::IdComponent i = 0; i < Size; ++i) { correct_div[i] = ComponentType(a[i] / b[i]); } VecT div = a / bSrc; - VTKM_TEST_ASSERT(test_equal(div,correct_div),"Tuples not divided correctly."); + VTKM_TEST_ASSERT(test_equal(div, correct_div), "Tuples not divided correctly."); div = aSrc / b; - VTKM_TEST_ASSERT(test_equal(div,correct_div),"Tuples not divided correctly."); - + VTKM_TEST_ASSERT(test_equal(div, correct_div), "Tuples not divided correctly."); ComponentType d = vtkm::dot(a, b); ComponentType correct_d = 0; - for(vtkm::IdComponent i=0; i < Size; ++i) + for (vtkm::IdComponent i = 0; i < Size; ++i) { correct_d = ComponentType(correct_d + a[i] * b[i]); } VTKM_TEST_ASSERT(test_equal(d, correct_d), "dot(Tuple) wrong"); VTKM_TEST_ASSERT(!(a < b), "operator< wrong"); - VTKM_TEST_ASSERT((b < a), "operator< wrong"); - VTKM_TEST_ASSERT(!(a < a), "operator< wrong"); - VTKM_TEST_ASSERT((a < plus), "operator< wrong"); - VTKM_TEST_ASSERT((minus < plus), "operator< wrong"); - VTKM_TEST_ASSERT((c < a), "operator< wrong"); + VTKM_TEST_ASSERT((b < a), "operator< wrong"); + VTKM_TEST_ASSERT(!(a < a), "operator< wrong"); + VTKM_TEST_ASSERT((a < plus), "operator< wrong"); + VTKM_TEST_ASSERT((minus < plus), "operator< wrong"); + VTKM_TEST_ASSERT((c < a), "operator< wrong"); VTKM_TEST_ASSERT(!(a == b), "operator== wrong"); - VTKM_TEST_ASSERT((a == a), "operator== wrong"); + VTKM_TEST_ASSERT((a == a), "operator== wrong"); - VTKM_TEST_ASSERT((a != b), "operator!= wrong"); + VTKM_TEST_ASSERT((a != b), "operator!= wrong"); VTKM_TEST_ASSERT(!(a != a), "operator!= wrong"); //test against a tuple that shares some values - VTKM_TEST_ASSERT( !(c == a), "operator == wrong"); - VTKM_TEST_ASSERT( !(a == c), "operator == wrong"); + VTKM_TEST_ASSERT(!(c == a), "operator == wrong"); + VTKM_TEST_ASSERT(!(a == c), "operator == wrong"); - VTKM_TEST_ASSERT( (c != a), "operator != wrong"); - VTKM_TEST_ASSERT( (a != c), "operator != wrong"); + VTKM_TEST_ASSERT((c != a), "operator != wrong"); + VTKM_TEST_ASSERT((a != c), "operator != wrong"); } //general type test for Vec -template -void GeneralVecTypeTest(const vtkm::Vec &) +template +void GeneralVecTypeTest(const vtkm::Vec&) { std::cout << "Checking general Vec functionality." << std::endl; - typedef vtkm::Vec T; + typedef vtkm::Vec T; - VTKM_TEST_ASSERT(T::NUM_COMPONENTS == Size, - "NUM_COMPONENTS is wrong size."); + VTKM_TEST_ASSERT(T::NUM_COMPONENTS == Size, "NUM_COMPONENTS is wrong size."); //grab the number of elements of T T a, b, c; ComponentType s(5); - VTKM_TEST_ASSERT(a.GetNumberOfComponents() == Size, - "GetNumberOfComponents returns wrong size."); + VTKM_TEST_ASSERT(a.GetNumberOfComponents() == Size, "GetNumberOfComponents returns wrong size."); - for(vtkm::IdComponent i=0; i < T::NUM_COMPONENTS; ++i) + for (vtkm::IdComponent i = 0; i < T::NUM_COMPONENTS; ++i) { - a[i]=ComponentType((i+1)*2); - b[i]=ComponentType(i+1); + a[i] = ComponentType((i + 1) * 2); + b[i] = ComponentType(i + 1); } a.CopyInto(c); VTKM_TEST_ASSERT(test_equal(a, c), "CopyInto does not work."); //verify prefix and postfix increment and decrement - ++c[T::NUM_COMPONENTS-1]; - c[T::NUM_COMPONENTS-1]++; - VTKM_TEST_ASSERT(test_equal(c[T::NUM_COMPONENTS-1], a[T::NUM_COMPONENTS-1]+2), - "Bad increment on component."); - --c[T::NUM_COMPONENTS-1]; - c[T::NUM_COMPONENTS-1]--; - VTKM_TEST_ASSERT(test_equal(c[T::NUM_COMPONENTS-1], a[T::NUM_COMPONENTS-1]), - "Bad decrement on component."); + ++c[T::NUM_COMPONENTS - 1]; + c[T::NUM_COMPONENTS - 1]++; + VTKM_TEST_ASSERT(test_equal(c[T::NUM_COMPONENTS - 1], a[T::NUM_COMPONENTS - 1] + 2), + "Bad increment on component."); + --c[T::NUM_COMPONENTS - 1]; + c[T::NUM_COMPONENTS - 1]--; + VTKM_TEST_ASSERT(test_equal(c[T::NUM_COMPONENTS - 1], a[T::NUM_COMPONENTS - 1]), + "Bad decrement on component."); //make c nearly like a to verify == and != are correct. - c[T::NUM_COMPONENTS-1]=ComponentType(c[T::NUM_COMPONENTS-1]-1); + c[T::NUM_COMPONENTS - 1] = ComponentType(c[T::NUM_COMPONENTS - 1] - 1); T plus = a + b; T correct_plus; - for(vtkm::IdComponent i=0; i < T::NUM_COMPONENTS; ++i) + for (vtkm::IdComponent i = 0; i < T::NUM_COMPONENTS; ++i) { correct_plus[i] = ComponentType(a[i] + b[i]); } - VTKM_TEST_ASSERT(test_equal(plus, correct_plus),"Tuples not added correctly."); + VTKM_TEST_ASSERT(test_equal(plus, correct_plus), "Tuples not added correctly."); T minus = a - b; T correct_minus; - for(vtkm::IdComponent i=0; i < T::NUM_COMPONENTS; ++i) + for (vtkm::IdComponent i = 0; i < T::NUM_COMPONENTS; ++i) { correct_minus[i] = ComponentType(a[i] - b[i]); } - VTKM_TEST_ASSERT(test_equal(minus, correct_minus),"Tuples not subtracted correctly."); - + VTKM_TEST_ASSERT(test_equal(minus, correct_minus), "Tuples not subtracted correctly."); T mult = a * b; T correct_mult; - for(vtkm::IdComponent i=0; i < T::NUM_COMPONENTS; ++i) + for (vtkm::IdComponent i = 0; i < T::NUM_COMPONENTS; ++i) { correct_mult[i] = ComponentType(a[i] * b[i]); } - VTKM_TEST_ASSERT(test_equal(mult, correct_mult),"Tuples not multiplied correctly."); + VTKM_TEST_ASSERT(test_equal(mult, correct_mult), "Tuples not multiplied correctly."); T div = a / b; T correct_div; - for(vtkm::IdComponent i=0; i < T::NUM_COMPONENTS; ++i) + for (vtkm::IdComponent i = 0; i < T::NUM_COMPONENTS; ++i) { correct_div[i] = ComponentType(a[i] / b[i]); } - VTKM_TEST_ASSERT(test_equal(div,correct_div),"Tuples not divided correctly."); + VTKM_TEST_ASSERT(test_equal(div, correct_div), "Tuples not divided correctly."); mult = s * a; - for(vtkm::IdComponent i=0; i < T::NUM_COMPONENTS; ++i) + for (vtkm::IdComponent i = 0; i < T::NUM_COMPONENTS; ++i) { correct_mult[i] = ComponentType(s * a[i]); } - VTKM_TEST_ASSERT(test_equal(mult, correct_mult), - "Scalar and Tuple did not multiply correctly."); + VTKM_TEST_ASSERT(test_equal(mult, correct_mult), "Scalar and Tuple did not multiply correctly."); mult = a * s; - VTKM_TEST_ASSERT(test_equal(mult, correct_mult), - "Tuple and Scalar to not multiply correctly."); + VTKM_TEST_ASSERT(test_equal(mult, correct_mult), "Tuple and Scalar to not multiply correctly."); div = a / ComponentType(2); - VTKM_TEST_ASSERT(test_equal(div, b), - "Tuple does not divide by Scalar correctly."); - + VTKM_TEST_ASSERT(test_equal(div, b), "Tuple does not divide by Scalar correctly."); ComponentType d = vtkm::dot(a, b); ComponentType correct_d = 0; - for(vtkm::IdComponent i=0; i < T::NUM_COMPONENTS; ++i) + for (vtkm::IdComponent i = 0; i < T::NUM_COMPONENTS; ++i) { correct_d = ComponentType(correct_d + a[i] * b[i]); } VTKM_TEST_ASSERT(test_equal(d, correct_d), "dot(Tuple) wrong"); VTKM_TEST_ASSERT(!(a < b), "operator< wrong"); - VTKM_TEST_ASSERT((b < a), "operator< wrong"); - VTKM_TEST_ASSERT(!(a < a), "operator< wrong"); - VTKM_TEST_ASSERT((a < plus), "operator< wrong"); - VTKM_TEST_ASSERT((minus < plus), "operator< wrong"); - VTKM_TEST_ASSERT((c < a), "operator< wrong"); + VTKM_TEST_ASSERT((b < a), "operator< wrong"); + VTKM_TEST_ASSERT(!(a < a), "operator< wrong"); + VTKM_TEST_ASSERT((a < plus), "operator< wrong"); + VTKM_TEST_ASSERT((minus < plus), "operator< wrong"); + VTKM_TEST_ASSERT((c < a), "operator< wrong"); VTKM_TEST_ASSERT(!(a == b), "operator== wrong"); - VTKM_TEST_ASSERT((a == a), "operator== wrong"); + VTKM_TEST_ASSERT((a == a), "operator== wrong"); - VTKM_TEST_ASSERT((a != b), "operator!= wrong"); + VTKM_TEST_ASSERT((a != b), "operator!= wrong"); VTKM_TEST_ASSERT(!(a != a), "operator!= wrong"); //test against a tuple that shares some values - VTKM_TEST_ASSERT( !(c == a), "operator == wrong"); - VTKM_TEST_ASSERT( !(a == c), "operator == wrong"); + VTKM_TEST_ASSERT(!(c == a), "operator == wrong"); + VTKM_TEST_ASSERT(!(a == c), "operator == wrong"); - VTKM_TEST_ASSERT( (c != a), "operator != wrong"); - VTKM_TEST_ASSERT( (a != c), "operator != wrong"); + VTKM_TEST_ASSERT((c != a), "operator != wrong"); + VTKM_TEST_ASSERT((a != c), "operator != wrong"); GeneralVecTypeTestNegate(T()); GeneralVecCTypeTest(T()); GeneralVecCConstTypeTest(T()); } -template -void TypeTest(const vtkm::Vec &) +template +void TypeTest(const vtkm::Vec&) { - GeneralVecTypeTest(vtkm::Vec()); + GeneralVecTypeTest(vtkm::Vec()); } -template -void TypeTest(const vtkm::Vec &) +template +void TypeTest(const vtkm::Vec&) { - typedef vtkm::Vec Vector; + typedef vtkm::Vec Vector; GeneralVecTypeTest(Vector()); @@ -467,20 +449,16 @@ void TypeTest(const vtkm::Vec &) Scalar s = 5; Vector plus = a + b; - VTKM_TEST_ASSERT(test_equal(plus, vtkm::make_Vec(3, 6)), - "Vectors do not add correctly."); + VTKM_TEST_ASSERT(test_equal(plus, vtkm::make_Vec(3, 6)), "Vectors do not add correctly."); Vector minus = a - b; - VTKM_TEST_ASSERT(test_equal(minus, vtkm::make_Vec(1, 2)), - "Vectors to not subtract correctly."); + VTKM_TEST_ASSERT(test_equal(minus, vtkm::make_Vec(1, 2)), "Vectors to not subtract correctly."); Vector mult = a * b; - VTKM_TEST_ASSERT(test_equal(mult, vtkm::make_Vec(2, 8)), - "Vectors to not multiply correctly."); + VTKM_TEST_ASSERT(test_equal(mult, vtkm::make_Vec(2, 8)), "Vectors to not multiply correctly."); Vector div = a / b; - VTKM_TEST_ASSERT(test_equal(div, vtkm::make_Vec(2, 2)), - "Vectors to not divide correctly."); + VTKM_TEST_ASSERT(test_equal(div, vtkm::make_Vec(2, 2)), "Vectors to not divide correctly."); mult = s * a; VTKM_TEST_ASSERT(test_equal(mult, vtkm::make_Vec(10, 20)), @@ -498,32 +476,32 @@ void TypeTest(const vtkm::Vec &) VTKM_TEST_ASSERT(test_equal(d, Scalar(10)), "dot(Vector2) wrong"); VTKM_TEST_ASSERT(!(a < b), "operator< wrong"); - VTKM_TEST_ASSERT((b < a), "operator< wrong"); - VTKM_TEST_ASSERT(!(a < a), "operator< wrong"); - VTKM_TEST_ASSERT((a < plus), "operator< wrong"); - VTKM_TEST_ASSERT((minus < plus), "operator< wrong"); + VTKM_TEST_ASSERT((b < a), "operator< wrong"); + VTKM_TEST_ASSERT(!(a < a), "operator< wrong"); + VTKM_TEST_ASSERT((a < plus), "operator< wrong"); + VTKM_TEST_ASSERT((minus < plus), "operator< wrong"); VTKM_TEST_ASSERT(!(a == b), "operator== wrong"); - VTKM_TEST_ASSERT((a == a), "operator== wrong"); + VTKM_TEST_ASSERT((a == a), "operator== wrong"); - VTKM_TEST_ASSERT((a != b), "operator!= wrong"); + VTKM_TEST_ASSERT((a != b), "operator!= wrong"); VTKM_TEST_ASSERT(!(a != a), "operator!= wrong"); //test against a tuple that shares some values const Vector c(2, 3); - VTKM_TEST_ASSERT((c < a), "operator< wrong"); + VTKM_TEST_ASSERT((c < a), "operator< wrong"); - VTKM_TEST_ASSERT( !(c == a), "operator == wrong"); - VTKM_TEST_ASSERT( !(a == c), "operator == wrong"); + VTKM_TEST_ASSERT(!(c == a), "operator == wrong"); + VTKM_TEST_ASSERT(!(a == c), "operator == wrong"); - VTKM_TEST_ASSERT( (c != a), "operator != wrong"); - VTKM_TEST_ASSERT( (a != c), "operator != wrong"); + VTKM_TEST_ASSERT((c != a), "operator != wrong"); + VTKM_TEST_ASSERT((a != c), "operator != wrong"); } -template -void TypeTest(const vtkm::Vec &) +template +void TypeTest(const vtkm::Vec&) { - typedef vtkm::Vec Vector; + typedef vtkm::Vec Vector; GeneralVecTypeTest(Vector()); @@ -532,8 +510,7 @@ void TypeTest(const vtkm::Vec &) Scalar s = 5; Vector plus = a + b; - VTKM_TEST_ASSERT(test_equal(plus, vtkm::make_Vec(3, 6, 9)), - "Vectors do not add correctly."); + VTKM_TEST_ASSERT(test_equal(plus, vtkm::make_Vec(3, 6, 9)), "Vectors do not add correctly."); Vector minus = a - b; VTKM_TEST_ASSERT(test_equal(minus, vtkm::make_Vec(1, 2, 3)), @@ -544,8 +521,7 @@ void TypeTest(const vtkm::Vec &) "Vectors to not multiply correctly."); Vector div = a / b; - VTKM_TEST_ASSERT(test_equal(div, vtkm::make_Vec(2, 2, 2)), - "Vectors to not divide correctly."); + VTKM_TEST_ASSERT(test_equal(div, vtkm::make_Vec(2, 2, 2)), "Vectors to not divide correctly."); mult = s * a; VTKM_TEST_ASSERT(test_equal(mult, vtkm::make_Vec(10, 20, 30)), @@ -556,39 +532,38 @@ void TypeTest(const vtkm::Vec &) "Vector and scalar to not multiply correctly."); div = a / Scalar(2); - VTKM_TEST_ASSERT(test_equal(div, b), - "Vector does not divide by Scalar correctly."); + VTKM_TEST_ASSERT(test_equal(div, b), "Vector does not divide by Scalar correctly."); Scalar d = vtkm::dot(a, b); VTKM_TEST_ASSERT(test_equal(d, Scalar(28)), "dot(Vector3) wrong"); VTKM_TEST_ASSERT(!(a < b), "operator< wrong"); - VTKM_TEST_ASSERT((b < a), "operator< wrong"); - VTKM_TEST_ASSERT(!(a < a), "operator< wrong"); - VTKM_TEST_ASSERT((a < plus), "operator< wrong"); - VTKM_TEST_ASSERT((minus < plus), "operator< wrong"); + VTKM_TEST_ASSERT((b < a), "operator< wrong"); + VTKM_TEST_ASSERT(!(a < a), "operator< wrong"); + VTKM_TEST_ASSERT((a < plus), "operator< wrong"); + VTKM_TEST_ASSERT((minus < plus), "operator< wrong"); VTKM_TEST_ASSERT(!(a == b), "operator== wrong"); - VTKM_TEST_ASSERT((a == a), "operator== wrong"); + VTKM_TEST_ASSERT((a == a), "operator== wrong"); - VTKM_TEST_ASSERT((a != b), "operator!= wrong"); + VTKM_TEST_ASSERT((a != b), "operator!= wrong"); VTKM_TEST_ASSERT(!(a != a), "operator!= wrong"); //test against a tuple that shares some values - const Vector c(2,4,5); - VTKM_TEST_ASSERT((c < a), "operator< wrong"); + const Vector c(2, 4, 5); + VTKM_TEST_ASSERT((c < a), "operator< wrong"); - VTKM_TEST_ASSERT( !(c == a), "operator == wrong"); - VTKM_TEST_ASSERT( !(a == c), "operator == wrong"); + VTKM_TEST_ASSERT(!(c == a), "operator == wrong"); + VTKM_TEST_ASSERT(!(a == c), "operator == wrong"); - VTKM_TEST_ASSERT( (c != a), "operator != wrong"); - VTKM_TEST_ASSERT( (a != c), "operator != wrong"); + VTKM_TEST_ASSERT((c != a), "operator != wrong"); + VTKM_TEST_ASSERT((a != c), "operator != wrong"); } -template -void TypeTest(const vtkm::Vec &) +template +void TypeTest(const vtkm::Vec&) { - typedef vtkm::Vec Vector; + typedef vtkm::Vec Vector; GeneralVecTypeTest(Vector()); @@ -597,8 +572,7 @@ void TypeTest(const vtkm::Vec &) Scalar s = 5; Vector plus = a + b; - VTKM_TEST_ASSERT(test_equal(plus, vtkm::make_Vec(3, 6, 9, 12)), - "Vectors do not add correctly."); + VTKM_TEST_ASSERT(test_equal(plus, vtkm::make_Vec(3, 6, 9, 12)), "Vectors do not add correctly."); Vector minus = a - b; VTKM_TEST_ASSERT(test_equal(minus, vtkm::make_Vec(1, 2, 3, 4)), @@ -609,8 +583,7 @@ void TypeTest(const vtkm::Vec &) "Vectors to not multiply correctly."); Vector div = a / b; - VTKM_TEST_ASSERT(test_equal(div, vtkm::make_Vec(2, 2, 2, 2)), - "Vectors to not divide correctly."); + VTKM_TEST_ASSERT(test_equal(div, vtkm::make_Vec(2, 2, 2, 2)), "Vectors to not divide correctly."); mult = s * a; VTKM_TEST_ASSERT(test_equal(mult, vtkm::make_Vec(10, 20, 30, 40)), @@ -621,37 +594,35 @@ void TypeTest(const vtkm::Vec &) "Vector and scalar to not multiply correctly."); div = a / Scalar(2); - VTKM_TEST_ASSERT(test_equal(div, b), - "Vector does not divide by Scalar correctly."); + VTKM_TEST_ASSERT(test_equal(div, b), "Vector does not divide by Scalar correctly."); Scalar d = vtkm::dot(a, b); VTKM_TEST_ASSERT(test_equal(d, Scalar(60)), "dot(Vector4) wrong"); - VTKM_TEST_ASSERT(!(a < b), "operator< wrong"); - VTKM_TEST_ASSERT((b < a), "operator< wrong"); - VTKM_TEST_ASSERT(!(a < a), "operator< wrong"); - VTKM_TEST_ASSERT((a < plus), "operator< wrong"); - VTKM_TEST_ASSERT((minus < plus), "operator< wrong"); + VTKM_TEST_ASSERT((b < a), "operator< wrong"); + VTKM_TEST_ASSERT(!(a < a), "operator< wrong"); + VTKM_TEST_ASSERT((a < plus), "operator< wrong"); + VTKM_TEST_ASSERT((minus < plus), "operator< wrong"); VTKM_TEST_ASSERT(!(a == b), "operator== wrong"); - VTKM_TEST_ASSERT((a == a), "operator== wrong"); + VTKM_TEST_ASSERT((a == a), "operator== wrong"); - VTKM_TEST_ASSERT((a != b), "operator!= wrong"); + VTKM_TEST_ASSERT((a != b), "operator!= wrong"); VTKM_TEST_ASSERT(!(a != a), "operator!= wrong"); //test against a tuple that shares some values - const Vector c(2,4,6,7); - VTKM_TEST_ASSERT((c < a), "operator< wrong"); + const Vector c(2, 4, 6, 7); + VTKM_TEST_ASSERT((c < a), "operator< wrong"); - VTKM_TEST_ASSERT( !(c == a), "operator == wrong"); - VTKM_TEST_ASSERT( !(a == c), "operator == wrong"); + VTKM_TEST_ASSERT(!(c == a), "operator == wrong"); + VTKM_TEST_ASSERT(!(a == c), "operator == wrong"); - VTKM_TEST_ASSERT( (c != a), "operator != wrong"); - VTKM_TEST_ASSERT( (a != c), "operator != wrong"); + VTKM_TEST_ASSERT((c != a), "operator != wrong"); + VTKM_TEST_ASSERT((a != c), "operator != wrong"); } -template +template void TypeTest(Scalar) { std::cout << "Test functionality of scalar type." << std::endl; @@ -700,22 +671,20 @@ void TypeTest(Scalar) struct TypeTestFunctor { - template void operator()(const T&) const + template + void operator()(const T&) const { TypeTest(T()); } }; struct TypesToTest - : vtkm::ListTagJoin< - vtkm::testing::Testing::TypeListTagExemplarTypes, - vtkm::ListTagBase< - vtkm::Vec, - vtkm::Vec, - vtkm::Vec, - vtkm::Vec, - vtkm::Vec > > -{ }; + : vtkm::ListTagJoin, vtkm::Vec, + vtkm::Vec, vtkm::Vec, + vtkm::Vec>> +{ +}; void TestTypes() { @@ -726,7 +695,7 @@ void TestTypes() } // anonymous namespace -int UnitTestTypes(int, char *[]) +int UnitTestTypes(int, char* []) { return vtkm::testing::Testing::Run(TestTypes); } diff --git a/vtkm/testing/UnitTestUnaryPredicates.cxx b/vtkm/testing/UnitTestUnaryPredicates.cxx index 9ef7849fa..9e96a6d0e 100644 --- a/vtkm/testing/UnitTestUnaryPredicates.cxx +++ b/vtkm/testing/UnitTestUnaryPredicates.cxx @@ -22,33 +22,31 @@ #include -namespace { +namespace +{ template -void UnaryPredicateTest( ) -{ - //test IsZeroInitialized - { - vtkm::IsZeroInitialized is_default; - VTKM_TEST_ASSERT( is_default( vtkm::TypeTraits::ZeroInitialization()) == true, - "IsZeroInitialized wrong."); - VTKM_TEST_ASSERT( is_default( TestValue(1, T()) ) == false, - "IsZeroInitialized wrong."); - } +void UnaryPredicateTest(){ //test IsZeroInitialized + { vtkm::IsZeroInitialized is_default; +VTKM_TEST_ASSERT(is_default(vtkm::TypeTraits::ZeroInitialization()) == true, + "IsZeroInitialized wrong."); +VTKM_TEST_ASSERT(is_default(TestValue(1, T())) == false, "IsZeroInitialized wrong."); +} - //test NotZeroInitialized - { +//test NotZeroInitialized +{ vtkm::NotZeroInitialized not_default; - VTKM_TEST_ASSERT( not_default( vtkm::TypeTraits::ZeroInitialization() ) ==false, - "NotZeroInitialized wrong."); - VTKM_TEST_ASSERT( not_default( TestValue(1, T()) ) == true, - "NotZeroInitialized wrong."); - } -}; + VTKM_TEST_ASSERT(not_default(vtkm::TypeTraits::ZeroInitialization()) == false, + "NotZeroInitialized wrong."); + VTKM_TEST_ASSERT(not_default(TestValue(1, T())) == true, "NotZeroInitialized wrong."); +} +} +; struct UnaryPredicateTestFunctor { - template void operator()(const T&) const + template + void operator()(const T&) const { UnaryPredicateTest(); } @@ -60,16 +58,15 @@ void TestUnaryPredicates() //test LogicalNot { - vtkm::LogicalNot logical_not; - VTKM_TEST_ASSERT( logical_not(true) == false, "logical_not true wrong."); - VTKM_TEST_ASSERT( logical_not(false) == true, "logical_not false wrong."); + vtkm::LogicalNot logical_not; + VTKM_TEST_ASSERT(logical_not(true) == false, "logical_not true wrong."); + VTKM_TEST_ASSERT(logical_not(false) == true, "logical_not false wrong."); } - } } // anonymous namespace -int UnitTestUnaryPredicates(int, char *[]) +int UnitTestUnaryPredicates(int, char* []) { return vtkm::testing::Testing::Run(TestUnaryPredicates); } diff --git a/vtkm/testing/UnitTestVecFromPortal.cxx b/vtkm/testing/UnitTestVecFromPortal.cxx index 829951b1b..219005069 100644 --- a/vtkm/testing/UnitTestVecFromPortal.cxx +++ b/vtkm/testing/UnitTestVecFromPortal.cxx @@ -22,17 +22,18 @@ #include -namespace UnitTestVecFromPortalNamespace { +namespace UnitTestVecFromPortalNamespace +{ static const vtkm::IdComponent ARRAY_SIZE = 10; -template +template void CheckType(T, T) { // Check passes if this function is called correctly. } -template +template class TestPortal { public: @@ -47,7 +48,7 @@ public: struct VecFromPortalTestFunctor { - template + template void operator()(T) const { typedef TestPortal PortalType; @@ -59,13 +60,10 @@ struct VecFromPortalTestFunctor // The statements will fail to compile if the traits is not working as // expected. - CheckType(typename TTraits::DimensionalityTag(), - vtkm::TypeTraitsVectorTag()); + CheckType(typename TTraits::DimensionalityTag(), vtkm::TypeTraitsVectorTag()); CheckType(typename VTraits::ComponentType(), T()); - CheckType(typename VTraits::HasMultipleComponents(), - vtkm::VecTraitsTagMultipleComponents()); - CheckType(typename VTraits::IsSizeStatic(), - vtkm::VecTraitsTagSizeVariable()); + CheckType(typename VTraits::HasMultipleComponents(), vtkm::VecTraitsTagMultipleComponents()); + CheckType(typename VTraits::IsSizeStatic(), vtkm::VecTraitsTagSizeVariable()); std::cout << "Checking VecFromPortal contents" << std::endl; @@ -73,32 +71,26 @@ struct VecFromPortalTestFunctor for (vtkm::Id offset = 0; offset < ARRAY_SIZE; offset++) { - for (vtkm::IdComponent length = 0; length < ARRAY_SIZE-offset; length++) + for (vtkm::IdComponent length = 0; length < ARRAY_SIZE - offset; length++) { VecType vec(portal, length, offset); - VTKM_TEST_ASSERT(vec.GetNumberOfComponents() == length, - "Wrong length."); - VTKM_TEST_ASSERT(VTraits::GetNumberOfComponents(vec) == length, - "Wrong length."); + VTKM_TEST_ASSERT(vec.GetNumberOfComponents() == length, "Wrong length."); + VTKM_TEST_ASSERT(VTraits::GetNumberOfComponents(vec) == length, "Wrong length."); - vtkm::Vec copyDirect; + vtkm::Vec copyDirect; vec.CopyInto(copyDirect); - vtkm::Vec copyTraits; + vtkm::Vec copyTraits; VTraits::CopyInto(vec, copyTraits); for (vtkm::IdComponent index = 0; index < length; index++) { - T expected = TestValue(index+offset, T()); + T expected = TestValue(index + offset, T()); VTKM_TEST_ASSERT(test_equal(vec[index], expected), "Wrong value."); - VTKM_TEST_ASSERT( - test_equal(VTraits::GetComponent(vec, index), expected), - "Wrong value."); - VTKM_TEST_ASSERT(test_equal(copyDirect[index], expected), - "Wrong copied value."); - VTKM_TEST_ASSERT(test_equal(copyTraits[index], expected), - "Wrong copied value."); + VTKM_TEST_ASSERT(test_equal(VTraits::GetComponent(vec, index), expected), "Wrong value."); + VTKM_TEST_ASSERT(test_equal(copyDirect[index], expected), "Wrong copied value."); + VTKM_TEST_ASSERT(test_equal(copyTraits[index], expected), "Wrong copied value."); } } } @@ -107,14 +99,12 @@ struct VecFromPortalTestFunctor void VecFromPortalTest() { - vtkm::testing::Testing::TryTypes(VecFromPortalTestFunctor(), - vtkm::TypeListTagCommon()); + vtkm::testing::Testing::TryTypes(VecFromPortalTestFunctor(), vtkm::TypeListTagCommon()); } } // namespace UnitTestVecFromPortalNamespace -int UnitTestVecFromPortal(int, char *[]) +int UnitTestVecFromPortal(int, char* []) { - return vtkm::testing::Testing::Run( - UnitTestVecFromPortalNamespace::VecFromPortalTest); + return vtkm::testing::Testing::Run(UnitTestVecFromPortalNamespace::VecFromPortalTest); } diff --git a/vtkm/testing/UnitTestVecFromPortalPermute.cxx b/vtkm/testing/UnitTestVecFromPortalPermute.cxx index 7b499464a..8eea57a95 100644 --- a/vtkm/testing/UnitTestVecFromPortalPermute.cxx +++ b/vtkm/testing/UnitTestVecFromPortalPermute.cxx @@ -24,17 +24,18 @@ #include -namespace UnitTestVecFromPortalPermuteNamespace { +namespace UnitTestVecFromPortalPermuteNamespace +{ static const vtkm::IdComponent ARRAY_SIZE = 10; -template +template void CheckType(T, T) { // Check passes if this function is called correctly. } -template +template class TestPortal { public: @@ -49,13 +50,12 @@ public: struct VecFromPortalPermuteTestFunctor { - template + template void operator()(T) const { typedef TestPortal PortalType; - typedef vtkm::VecVariable IndexVecType; - typedef vtkm::VecFromPortalPermute - VecType; + typedef vtkm::VecVariable IndexVecType; + typedef vtkm::VecFromPortalPermute VecType; typedef vtkm::TypeTraits TTraits; typedef vtkm::VecTraits VTraits; @@ -63,13 +63,10 @@ struct VecFromPortalPermuteTestFunctor // The statements will fail to compile if the traits is not working as // expected. - CheckType(typename TTraits::DimensionalityTag(), - vtkm::TypeTraitsVectorTag()); + CheckType(typename TTraits::DimensionalityTag(), vtkm::TypeTraitsVectorTag()); CheckType(typename VTraits::ComponentType(), T()); - CheckType(typename VTraits::HasMultipleComponents(), - vtkm::VecTraitsTagMultipleComponents()); - CheckType(typename VTraits::IsSizeStatic(), - vtkm::VecTraitsTagSizeVariable()); + CheckType(typename VTraits::HasMultipleComponents(), vtkm::VecTraitsTagMultipleComponents()); + CheckType(typename VTraits::IsSizeStatic(), vtkm::VecTraitsTagSizeVariable()); std::cout << "Checking VecFromPortal contents" << std::endl; @@ -77,40 +74,32 @@ struct VecFromPortalPermuteTestFunctor for (vtkm::Id offset = 0; offset < ARRAY_SIZE; offset++) { - for (vtkm::IdComponent length = 0; - 2*length + offset < ARRAY_SIZE; - length++) + for (vtkm::IdComponent length = 0; 2 * length + offset < ARRAY_SIZE; length++) { IndexVecType indices; for (vtkm::IdComponent index = 0; index < length; index++) { - indices.Append(offset + 2*index); + indices.Append(offset + 2 * index); } VecType vec(&indices, portal); - VTKM_TEST_ASSERT(vec.GetNumberOfComponents() == length, - "Wrong length."); - VTKM_TEST_ASSERT(VTraits::GetNumberOfComponents(vec) == length, - "Wrong length."); + VTKM_TEST_ASSERT(vec.GetNumberOfComponents() == length, "Wrong length."); + VTKM_TEST_ASSERT(VTraits::GetNumberOfComponents(vec) == length, "Wrong length."); - vtkm::Vec copyDirect; + vtkm::Vec copyDirect; vec.CopyInto(copyDirect); - vtkm::Vec copyTraits; + vtkm::Vec copyTraits; VTraits::CopyInto(vec, copyTraits); for (vtkm::IdComponent index = 0; index < length; index++) { - T expected = TestValue(2*index+offset, T()); + T expected = TestValue(2 * index + offset, T()); VTKM_TEST_ASSERT(test_equal(vec[index], expected), "Wrong value."); - VTKM_TEST_ASSERT( - test_equal(VTraits::GetComponent(vec, index), expected), - "Wrong value."); - VTKM_TEST_ASSERT(test_equal(copyDirect[index], expected), - "Wrong copied value."); - VTKM_TEST_ASSERT(test_equal(copyTraits[index], expected), - "Wrong copied value."); + VTKM_TEST_ASSERT(test_equal(VTraits::GetComponent(vec, index), expected), "Wrong value."); + VTKM_TEST_ASSERT(test_equal(copyDirect[index], expected), "Wrong copied value."); + VTKM_TEST_ASSERT(test_equal(copyTraits[index], expected), "Wrong copied value."); } } } @@ -119,14 +108,13 @@ struct VecFromPortalPermuteTestFunctor void VecFromPortalPermuteTest() { - vtkm::testing::Testing::TryTypes(VecFromPortalPermuteTestFunctor(), - vtkm::TypeListTagCommon()); + vtkm::testing::Testing::TryTypes(VecFromPortalPermuteTestFunctor(), vtkm::TypeListTagCommon()); } } // namespace UnitTestVecFromPortalPermuteNamespace -int UnitTestVecFromPortalPermute(int, char *[]) +int UnitTestVecFromPortalPermute(int, char* []) { return vtkm::testing::Testing::Run( - UnitTestVecFromPortalPermuteNamespace::VecFromPortalPermuteTest); + UnitTestVecFromPortalPermuteNamespace::VecFromPortalPermuteTest); } diff --git a/vtkm/testing/UnitTestVecRectilinearPointCoordinates.cxx b/vtkm/testing/UnitTestVecRectilinearPointCoordinates.cxx index b07580aaf..4eedb11cd 100644 --- a/vtkm/testing/UnitTestVecRectilinearPointCoordinates.cxx +++ b/vtkm/testing/UnitTestVecRectilinearPointCoordinates.cxx @@ -22,23 +22,18 @@ #include -namespace { +namespace +{ -typedef vtkm::Vec Vec3; +typedef vtkm::Vec Vec3; static const Vec3 g_Origin = Vec3(1.0f, 2.0f, 3.0f); static const Vec3 g_Spacing = Vec3(4.0f, 5.0f, 6.0f); -static const Vec3 g_Coords[8] = { - Vec3(1.0f, 2.0f, 3.0f), - Vec3(5.0f, 2.0f, 3.0f), - Vec3(5.0f, 7.0f, 3.0f), - Vec3(1.0f, 7.0f, 3.0f), - Vec3(1.0f, 2.0f, 9.0f), - Vec3(5.0f, 2.0f, 9.0f), - Vec3(5.0f, 7.0f, 9.0f), - Vec3(1.0f, 7.0f, 9.0f) -}; +static const Vec3 g_Coords[8] = { Vec3(1.0f, 2.0f, 3.0f), Vec3(5.0f, 2.0f, 3.0f), + Vec3(5.0f, 7.0f, 3.0f), Vec3(1.0f, 7.0f, 3.0f), + Vec3(1.0f, 2.0f, 9.0f), Vec3(5.0f, 2.0f, 9.0f), + Vec3(5.0f, 7.0f, 9.0f), Vec3(1.0f, 7.0f, 9.0f) }; // You will get a compile fail if this does not pass void CheckNumericTag(vtkm::TypeTraitsRealTag) @@ -70,21 +65,19 @@ void CheckVariableSize(vtkm::VecTraitsTagSizeStatic) std::cout << "StaticSize" << std::endl; } -template -void CheckCoordsValues(const VecCoordsType &coords) +template +void CheckCoordsValues(const VecCoordsType& coords) { - for (vtkm::IdComponent pointIndex = 0; - pointIndex < VecCoordsType::NUM_COMPONENTS; - pointIndex++) + for (vtkm::IdComponent pointIndex = 0; pointIndex < VecCoordsType::NUM_COMPONENTS; pointIndex++) { VTKM_TEST_ASSERT(test_equal(coords[pointIndex], g_Coords[pointIndex]), "Incorrect point coordinate."); } } -template +template void TryVecRectilinearPointCoordinates( - const vtkm::VecRectilinearPointCoordinates &coords) + const vtkm::VecRectilinearPointCoordinates& coords) { typedef vtkm::VecRectilinearPointCoordinates VecCoordsType; typedef vtkm::TypeTraits TTraits; @@ -98,22 +91,20 @@ void TryVecRectilinearPointCoordinates( CheckVariableSize(typename VTraits::IsSizeStatic()); std::cout << "Check size." << std::endl; - VTKM_TEST_ASSERT( - coords.GetNumberOfComponents() == VecCoordsType::NUM_COMPONENTS, - "Wrong number of components."); - VTKM_TEST_ASSERT( - VTraits::GetNumberOfComponents(coords) == VecCoordsType::NUM_COMPONENTS, - "Wrong number of components."); + VTKM_TEST_ASSERT(coords.GetNumberOfComponents() == VecCoordsType::NUM_COMPONENTS, + "Wrong number of components."); + VTKM_TEST_ASSERT(VTraits::GetNumberOfComponents(coords) == VecCoordsType::NUM_COMPONENTS, + "Wrong number of components."); std::cout << "Check contents." << std::endl; CheckCoordsValues(coords); std::cout << "Check CopyInto." << std::endl; - vtkm::Vec,VecCoordsType::NUM_COMPONENTS> copy1; + vtkm::Vec, VecCoordsType::NUM_COMPONENTS> copy1; coords.CopyInto(copy1); CheckCoordsValues(copy1); - vtkm::Vec,VecCoordsType::NUM_COMPONENTS> copy2; + vtkm::Vec, VecCoordsType::NUM_COMPONENTS> copy2; VTraits::CopyInto(coords, copy2); CheckCoordsValues(copy2); @@ -126,38 +117,35 @@ void TestVecRectilinearPointCoordinates() { std::cout << "***** 1D Coordinates *****************" << std::endl; vtkm::VecRectilinearPointCoordinates<1> coords1d(g_Origin, g_Spacing); - VTKM_TEST_ASSERT(coords1d.NUM_COMPONENTS == 2, - "Wrong number of components"); + VTKM_TEST_ASSERT(coords1d.NUM_COMPONENTS == 2, "Wrong number of components"); VTKM_TEST_ASSERT(vtkm::VecRectilinearPointCoordinates<1>::NUM_COMPONENTS == 2, "Wrong number of components"); - VTKM_TEST_ASSERT(vtkm::VecTraits >::NUM_COMPONENTS == 2, + VTKM_TEST_ASSERT(vtkm::VecTraits>::NUM_COMPONENTS == 2, "Wrong number of components"); TryVecRectilinearPointCoordinates(coords1d); std::cout << "***** 2D Coordinates *****************" << std::endl; vtkm::VecRectilinearPointCoordinates<2> coords2d(g_Origin, g_Spacing); - VTKM_TEST_ASSERT(coords2d.NUM_COMPONENTS == 4, - "Wrong number of components"); + VTKM_TEST_ASSERT(coords2d.NUM_COMPONENTS == 4, "Wrong number of components"); VTKM_TEST_ASSERT(vtkm::VecRectilinearPointCoordinates<2>::NUM_COMPONENTS == 4, "Wrong number of components"); - VTKM_TEST_ASSERT(vtkm::VecTraits >::NUM_COMPONENTS == 4, + VTKM_TEST_ASSERT(vtkm::VecTraits>::NUM_COMPONENTS == 4, "Wrong number of components"); TryVecRectilinearPointCoordinates(coords2d); std::cout << "***** 3D Coordinates *****************" << std::endl; vtkm::VecRectilinearPointCoordinates<3> coords3d(g_Origin, g_Spacing); - VTKM_TEST_ASSERT(coords3d.NUM_COMPONENTS == 8, - "Wrong number of components"); + VTKM_TEST_ASSERT(coords3d.NUM_COMPONENTS == 8, "Wrong number of components"); VTKM_TEST_ASSERT(vtkm::VecRectilinearPointCoordinates<3>::NUM_COMPONENTS == 8, "Wrong number of components"); - VTKM_TEST_ASSERT(vtkm::VecTraits >::NUM_COMPONENTS == 8, + VTKM_TEST_ASSERT(vtkm::VecTraits>::NUM_COMPONENTS == 8, "Wrong number of components"); TryVecRectilinearPointCoordinates(coords3d); } } // anonymous namespace -int UnitTestVecRectilinearPointCoordinates(int, char *[]) +int UnitTestVecRectilinearPointCoordinates(int, char* []) { return vtkm::testing::Testing::Run(TestVecRectilinearPointCoordinates); } diff --git a/vtkm/testing/UnitTestVecTraits.cxx b/vtkm/testing/UnitTestVecTraits.cxx index 88612507e..c7b6ad4bf 100644 --- a/vtkm/testing/UnitTestVecTraits.cxx +++ b/vtkm/testing/UnitTestVecTraits.cxx @@ -21,14 +21,16 @@ #include -namespace { +namespace +{ static const vtkm::Id MAX_VECTOR_SIZE = 5; static const vtkm::Id VecInit[MAX_VECTOR_SIZE] = { 42, 54, 67, 12, 78 }; struct TestVecTypeFunctor { - template void operator()(const T&) const + template + void operator()(const T&) const { typedef vtkm::VecTraits Traits; typedef typename Traits::ComponentType ComponentType; @@ -42,11 +44,11 @@ struct TestVecTypeFunctor T outVector; vtkm::testing::TestVecType(inVector, outVector); vtkm::VecC outVecC(outVector); - vtkm::testing::TestVecType( - vtkm::VecC(inVector), outVecC); + vtkm::testing::TestVecType(vtkm::VecC(inVector), + outVecC); vtkm::VecCConst outVecCConst(outVector); - vtkm::testing::TestVecType( - vtkm::VecCConst(inVector), outVecCConst); + vtkm::testing::TestVecType(vtkm::VecCConst(inVector), + outVecCConst); } }; @@ -55,20 +57,20 @@ void TestVecTraits() TestVecTypeFunctor test; vtkm::testing::Testing::TryTypes(test); std::cout << "vtkm::Vec" << std::endl; - test(vtkm::Vec()); + test(vtkm::Vec()); vtkm::testing::TestVecComponentsTag(); - vtkm::testing::TestVecComponentsTag >(); - vtkm::testing::TestVecComponentsTag >(); - vtkm::testing::TestVecComponentsTag >(); - vtkm::testing::TestVecComponentsTag >(); + vtkm::testing::TestVecComponentsTag>(); + vtkm::testing::TestVecComponentsTag>(); + vtkm::testing::TestVecComponentsTag>(); + vtkm::testing::TestVecComponentsTag>(); vtkm::testing::TestScalarComponentsTag(); vtkm::testing::TestScalarComponentsTag(); } } // anonymous namespace -int UnitTestVecTraits(int, char *[]) +int UnitTestVecTraits(int, char* []) { return vtkm::testing::Testing::Run(TestVecTraits); } diff --git a/vtkm/testing/UnitTestVecVariable.cxx b/vtkm/testing/UnitTestVecVariable.cxx index 9877fef99..c693f3e1c 100644 --- a/vtkm/testing/UnitTestVecVariable.cxx +++ b/vtkm/testing/UnitTestVecVariable.cxx @@ -22,12 +22,13 @@ #include -namespace { +namespace +{ struct VecVariableTestFunctor { // You will get a compile fail if this does not pass - template + template void CheckNumericTag(NumericTag, NumericTag) const { std::cout << "NumericTag pass" << std::endl; @@ -40,7 +41,7 @@ struct VecVariableTestFunctor } // You will get a compile fail if this does not pass - template + template void CheckComponentType(T, T) const { std::cout << "ComponentType pass" << std::endl; @@ -58,12 +59,12 @@ struct VecVariableTestFunctor std::cout << "VariableSize" << std::endl; } - template + template void operator()(T) const { static const vtkm::IdComponent SIZE = 5; - typedef vtkm::Vec VecType; - typedef vtkm::VecVariable VecVariableType; + typedef vtkm::Vec VecType; + typedef vtkm::VecVariable VecVariableType; typedef vtkm::TypeTraits TTraits; typedef vtkm::VecTraits VTraits; @@ -88,30 +89,27 @@ struct VecVariableTestFunctor VecVariableType vec1(source); VecType vecCopy; vec1.CopyInto(vecCopy); - VTKM_TEST_ASSERT(test_equal(vec1, vecCopy), - "Bad init or copyinto."); + VTKM_TEST_ASSERT(test_equal(vec1, vecCopy), "Bad init or copyinto."); - vtkm::VecVariable vec2; + vtkm::VecVariable vec2; for (vtkm::IdComponent setIndex = 0; setIndex < SIZE; setIndex++) { VTKM_TEST_ASSERT(vec2.GetNumberOfComponents() == setIndex, "Report wrong number of components"); vec2.Append(source[setIndex]); } - VTKM_TEST_ASSERT(test_equal(vec2, vec1), - "Bad values from Append."); + VTKM_TEST_ASSERT(test_equal(vec2, vec1), "Bad values from Append."); } }; void TestVecVariable() { - vtkm::testing::Testing::TryTypes(VecVariableTestFunctor(), - vtkm::TypeListTagFieldScalar()); + vtkm::testing::Testing::TryTypes(VecVariableTestFunctor(), vtkm::TypeListTagFieldScalar()); } } // anonymous namespace -int UnitTestVecVariable(int, char *[]) +int UnitTestVecVariable(int, char* []) { return vtkm::testing::Testing::Run(TestVecVariable); } diff --git a/vtkm/testing/UnitTestVectorAnalysis.cxx b/vtkm/testing/UnitTestVectorAnalysis.cxx index 51e720877..f13d37870 100644 --- a/vtkm/testing/UnitTestVectorAnalysis.cxx +++ b/vtkm/testing/UnitTestVectorAnalysis.cxx @@ -29,24 +29,25 @@ #include -namespace { +namespace +{ -namespace internal{ +namespace internal +{ -template -typename vtkm::VecTraits::ComponentType -MyMag(const VectorType &vt) +template +typename vtkm::VecTraits::ComponentType MyMag(const VectorType& vt) { typedef vtkm::VecTraits Traits; double total = 0.0; for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; ++index) { - total += Traits::GetComponent(vt,index) * Traits::GetComponent(vt,index); + total += Traits::GetComponent(vt, index) * Traits::GetComponent(vt, index); } return static_cast(sqrt(total)); } -template +template VectorType MyNormal(const VectorType& vt) { typedef vtkm::VecTraits Traits; @@ -54,20 +55,19 @@ VectorType MyNormal(const VectorType& vt) VectorType temp = vt; for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; ++index) { - Traits::SetComponent(temp, index, Traits::GetComponent(vt,index)/mag); + Traits::SetComponent(temp, index, Traits::GetComponent(vt, index) / mag); } return temp; } -template -T MyLerp (const T &a, const T &b, const W &w) +template +T MyLerp(const T& a, const T& b, const W& w) { - return (W(1)-w)*a + w*b; + return (W(1) - w) * a + w * b; +} } -} - -template +template void TestVector(const VectorType& vector) { typedef typename vtkm::VecTraits::ComponentType ComponentType; @@ -79,24 +79,21 @@ void TestVector(const VectorType& vector) std::cout << " Magnitude" << std::endl; ComponentType magnitude = vtkm::Magnitude(vector); ComponentType magnitudeCompare = internal::MyMag(vector); - VTKM_TEST_ASSERT(test_equal(magnitude, magnitudeCompare), - "Magnitude failed test."); + VTKM_TEST_ASSERT(test_equal(magnitude, magnitudeCompare), "Magnitude failed test."); std::cout << " Magnitude squared" << std::endl; ComponentType magnitudeSquared = vtkm::MagnitudeSquared(vector); - VTKM_TEST_ASSERT(test_equal(magnitude*magnitude, magnitudeSquared), + VTKM_TEST_ASSERT(test_equal(magnitude * magnitude, magnitudeSquared), "Magnitude squared test failed."); if (magnitudeSquared > 0) - { + { std::cout << " Reciprocal magnitude" << std::endl; ComponentType rmagnitude = vtkm::RMagnitude(vector); - VTKM_TEST_ASSERT(test_equal(1/magnitude, rmagnitude), - "Reciprical magnitude failed."); + VTKM_TEST_ASSERT(test_equal(1 / magnitude, rmagnitude), "Reciprical magnitude failed."); std::cout << " Normal" << std::endl; - VTKM_TEST_ASSERT(test_equal(vtkm::Normal(vector), - internal::MyNormal(vector)), + VTKM_TEST_ASSERT(test_equal(vtkm::Normal(vector), internal::MyNormal(vector)), "Normalized vector failed test."); std::cout << " Normalize" << std::endl; @@ -104,66 +101,58 @@ void TestVector(const VectorType& vector) vtkm::Normalize(normalizedVector); VTKM_TEST_ASSERT(test_equal(normalizedVector, internal::MyNormal(vector)), "Inplace Normalized vector failed test."); - } + } } template -void TestLerp(const VectorType& a, - const VectorType& b, - const VectorType& w, +void TestLerp(const VectorType& a, const VectorType& b, const VectorType& w, const typename vtkm::VecTraits::ComponentType& wS) { - std::cout << "Linear interpolation: " << a << "-" << b << ": " << w - << std::endl; + std::cout << "Linear interpolation: " << a << "-" << b << ": " << w << std::endl; VectorType vtkmLerp = vtkm::Lerp(a, b, w); VectorType otherLerp = internal::MyLerp(a, b, w); VTKM_TEST_ASSERT(test_equal(vtkmLerp, otherLerp), "Vectors with Vector weight do not lerp() correctly"); - std::cout << "Linear interpolation: " << a << "-" << b << ": " << wS - << std::endl; - VectorType lhsS = internal::MyLerp(a,b,wS); - VectorType rhsS = vtkm::Lerp(a,b,wS); - VTKM_TEST_ASSERT(test_equal(lhsS, rhsS), - "Vectors with Scalar weight do not lerp() correctly"); + std::cout << "Linear interpolation: " << a << "-" << b << ": " << wS << std::endl; + VectorType lhsS = internal::MyLerp(a, b, wS); + VectorType rhsS = vtkm::Lerp(a, b, wS); + VTKM_TEST_ASSERT(test_equal(lhsS, rhsS), "Vectors with Scalar weight do not lerp() correctly"); } -template -void TestCross(const vtkm::Vec &x, const vtkm::Vec &y) +template +void TestCross(const vtkm::Vec& x, const vtkm::Vec& y) { std::cout << "Testing " << x << " x " << y << std::endl; - typedef vtkm::Vec Vec3; + typedef vtkm::Vec Vec3; Vec3 cross = vtkm::Cross(x, y); std::cout << " = " << cross << std::endl; std::cout << " Orthogonality" << std::endl; // The cross product result should be perpendicular to input vectors. - VTKM_TEST_ASSERT(test_equal(vtkm::dot(cross,x), T(0.0)), - "Cross product not perpendicular."); - VTKM_TEST_ASSERT(test_equal(vtkm::dot(cross,y), T(0.0)), - "Cross product not perpendicular."); + VTKM_TEST_ASSERT(test_equal(vtkm::dot(cross, x), T(0.0)), "Cross product not perpendicular."); + VTKM_TEST_ASSERT(test_equal(vtkm::dot(cross, y), T(0.0)), "Cross product not perpendicular."); std::cout << " Length" << std::endl; // The length of cross product should be the lengths of the input vectors // times the sin of the angle between them. - T sinAngle = - vtkm::Magnitude(cross) * vtkm::RMagnitude(x) * vtkm::RMagnitude(y); + T sinAngle = vtkm::Magnitude(cross) * vtkm::RMagnitude(x) * vtkm::RMagnitude(y); // The dot product is likewise the lengths of the input vectors times the // cos of the angle between them. - T cosAngle = vtkm::dot(x,y) * vtkm::RMagnitude(x) * vtkm::RMagnitude(y); + T cosAngle = vtkm::dot(x, y) * vtkm::RMagnitude(x) * vtkm::RMagnitude(y); // Test that these are the actual sin and cos of the same angle with a // basic trigonometric identity. - VTKM_TEST_ASSERT(test_equal(sinAngle*sinAngle + cosAngle*cosAngle, T(1.0)), + VTKM_TEST_ASSERT(test_equal(sinAngle * sinAngle + cosAngle * cosAngle, T(1.0)), "Bad cross product length."); std::cout << " Triangle normal" << std::endl; // Test finding the normal to a triangle (similar to cross product). Vec3 normal = vtkm::TriangleNormal(x, y, Vec3(0, 0, 0)); - VTKM_TEST_ASSERT(test_equal(vtkm::dot(normal, x-y), T(0.0)), + VTKM_TEST_ASSERT(test_equal(vtkm::dot(normal, x - y), T(0.0)), "Triangle normal is not really normal."); } @@ -188,46 +177,44 @@ struct TestLinearFunctor T weight(ComponentType(0.5)); ComponentType weightS(0.5); - TestLerp(zeroVector,normalizedVector,weight,weightS); - TestLerp(zeroVector,posVec,weight,weightS); - TestLerp(zeroVector,negVec,weight,weightS); + TestLerp(zeroVector, normalizedVector, weight, weightS); + TestLerp(zeroVector, posVec, weight, weightS); + TestLerp(zeroVector, negVec, weight, weightS); - TestLerp(normalizedVector,zeroVector,weight,weightS); - TestLerp(normalizedVector,posVec,weight,weightS); - TestLerp(normalizedVector,negVec,weight,weightS); + TestLerp(normalizedVector, zeroVector, weight, weightS); + TestLerp(normalizedVector, posVec, weight, weightS); + TestLerp(normalizedVector, negVec, weight, weightS); - TestLerp(posVec,zeroVector,weight,weightS); - TestLerp(posVec,normalizedVector,weight,weightS); - TestLerp(posVec,negVec,weight,weightS); + TestLerp(posVec, zeroVector, weight, weightS); + TestLerp(posVec, normalizedVector, weight, weightS); + TestLerp(posVec, negVec, weight, weightS); - TestLerp(negVec,zeroVector,weight,weightS); - TestLerp(negVec,normalizedVector,weight,weightS); - TestLerp(negVec,posVec,weight,weightS); + TestLerp(negVec, zeroVector, weight, weightS); + TestLerp(negVec, normalizedVector, weight, weightS); + TestLerp(negVec, posVec, weight, weightS); } }; struct TestCrossFunctor { - template - void operator()(const VectorType &) const + template + void operator()(const VectorType&) const { - TestCross(VectorType(1.0f,0.0f,0.0f), VectorType(0.0f,1.0f,0.0f)); - TestCross(VectorType(1.0f,2.0f,3.0f), VectorType(-3.0f,-1.0f,1.0f)); - TestCross(VectorType(0.0f,0.0f,1.0f), VectorType(0.001f,0.01f,2.0f)); + TestCross(VectorType(1.0f, 0.0f, 0.0f), VectorType(0.0f, 1.0f, 0.0f)); + TestCross(VectorType(1.0f, 2.0f, 3.0f), VectorType(-3.0f, -1.0f, 1.0f)); + TestCross(VectorType(0.0f, 0.0f, 1.0f), VectorType(0.001f, 0.01f, 2.0f)); } }; void TestVectorAnalysis() { - vtkm::testing::Testing::TryTypes(TestLinearFunctor(), - vtkm::TypeListTagField()); - vtkm::testing::Testing::TryTypes(TestCrossFunctor(), - vtkm::TypeListTagFieldVec3()); + vtkm::testing::Testing::TryTypes(TestLinearFunctor(), vtkm::TypeListTagField()); + vtkm::testing::Testing::TryTypes(TestCrossFunctor(), vtkm::TypeListTagFieldVec3()); } } // anonymous namespace -int UnitTestVectorAnalysis(int, char *[]) +int UnitTestVectorAnalysis(int, char* []) { return vtkm::testing::Testing::Run(TestVectorAnalysis); } diff --git a/vtkm/testing/VecTraitsTests.h b/vtkm/testing/VecTraitsTests.h index 365d2697e..27d30b4cd 100644 --- a/vtkm/testing/VecTraitsTests.h +++ b/vtkm/testing/VecTraitsTests.h @@ -26,13 +26,15 @@ #include -namespace vtkm { -namespace testing { +namespace vtkm +{ +namespace testing +{ -namespace detail { +namespace detail +{ -inline void CompareDimensionalityTags(vtkm::TypeTraitsScalarTag, - vtkm::VecTraitsTagSingleComponent) +inline void CompareDimensionalityTags(vtkm::TypeTraitsScalarTag, vtkm::VecTraitsTagSingleComponent) { // If we are here, everything is fine. } @@ -42,36 +44,34 @@ inline void CompareDimensionalityTags(vtkm::TypeTraitsVectorTag, // If we are here, everything is fine. } -template -inline void CheckIsStatic(const T &, vtkm::VecTraitsTagSizeStatic) +template +inline void CheckIsStatic(const T&, vtkm::VecTraitsTagSizeStatic) { VTKM_TEST_ASSERT(vtkm::VecTraits::NUM_COMPONENTS == NUM_COMPONENTS, "Traits returns unexpected number of components"); } -template -inline void CheckIsStatic(const T &, vtkm::VecTraitsTagSizeVariable) +template +inline void CheckIsStatic(const T&, vtkm::VecTraitsTagSizeVariable) { // If we are here, everything is fine. } -template +template struct VecIsWritable { using type = std::true_type; }; -template -struct VecIsWritable > +template +struct VecIsWritable> { using type = std::false_type; }; // Part of TestVecTypeImpl that writes to the Vec type template -static void TestVecTypeWritableImpl(const T &inVector, - const VecCopyType &vectorCopy, - T &outVector, +static void TestVecTypeWritableImpl(const T& inVector, const VecCopyType& vectorCopy, T& outVector, std::true_type) { using Traits = vtkm::VecTraits; @@ -81,14 +81,12 @@ static void TestVecTypeWritableImpl(const T &inVector, const ComponentType multiplier = 4; for (vtkm::IdComponent i = 0; i < NUM_COMPONENTS; i++) { - Traits::SetComponent(outVector, - i, - ComponentType( - multiplier*Traits::GetComponent(inVector, i))); + Traits::SetComponent(outVector, i, + ComponentType(multiplier * Traits::GetComponent(inVector, i))); } - vtkm::Vec resultCopy; + vtkm::Vec resultCopy; Traits::CopyInto(outVector, resultCopy); - VTKM_TEST_ASSERT(test_equal(resultCopy, multiplier*vectorCopy), + VTKM_TEST_ASSERT(test_equal(resultCopy, multiplier * vectorCopy), "Got bad result for scalar multiple"); } @@ -96,21 +94,20 @@ static void TestVecTypeWritableImpl(const T &inVector, const ComponentType multiplier = 7; for (vtkm::IdComponent i = 0; i < NUM_COMPONENTS; i++) { - Traits::GetComponent(outVector, i) - = ComponentType(multiplier * Traits::GetComponent(inVector, i)); + Traits::GetComponent(outVector, i) = + ComponentType(multiplier * Traits::GetComponent(inVector, i)); } - vtkm::Vec resultCopy; + vtkm::Vec resultCopy; Traits::CopyInto(outVector, resultCopy); - VTKM_TEST_ASSERT(test_equal(resultCopy, multiplier*vectorCopy), + VTKM_TEST_ASSERT(test_equal(resultCopy, multiplier * vectorCopy), "Got bad result for scalar multiple"); } } template -static void TestVecTypeWritableImpl(const T &vtkmNotUsed(inVector), - const VecCopyType &vtkmNotUsed(vectorCopy), - T &vtkmNotUsed(outVector), - std::false_type) +static void TestVecTypeWritableImpl(const T& vtkmNotUsed(inVector), + const VecCopyType& vtkmNotUsed(vectorCopy), + T& vtkmNotUsed(outVector), std::false_type) { // Skip writable functionality. } @@ -118,9 +115,8 @@ static void TestVecTypeWritableImpl(const T &vtkmNotUsed(inVector), /// Compares some manual arithmetic through type traits to arithmetic with /// the Tuple class. template -static void TestVecTypeImpl( - const typename std::remove_const::type &inVector, - typename std::remove_const::type &outVector) +static void TestVecTypeImpl(const typename std::remove_const::type& inVector, + typename std::remove_const::type& outVector) { using Traits = vtkm::VecTraits; using ComponentType = typename Traits::ComponentType; @@ -131,7 +127,7 @@ static void TestVecTypeImpl( VTKM_TEST_ASSERT(Traits::GetNumberOfComponents(inVector) == NUM_COMPONENTS, "Traits returned wrong number of components."); - vtkm::Vec vectorCopy; + vtkm::Vec vectorCopy; Traits::CopyInto(inVector, vectorCopy); VTKM_TEST_ASSERT(test_equal(vectorCopy, inVector), "CopyInto does not work."); @@ -139,25 +135,19 @@ static void TestVecTypeImpl( ComponentType result = 0; for (vtkm::IdComponent i = 0; i < NUM_COMPONENTS; i++) { - ComponentType component - = Traits::GetComponent(inVector, i); + ComponentType component = Traits::GetComponent(inVector, i); result = ComponentType(result + (component * component)); } - VTKM_TEST_ASSERT( - test_equal(result, vtkm::dot(vectorCopy, vectorCopy)), - "Got bad result for dot product"); + VTKM_TEST_ASSERT(test_equal(result, vtkm::dot(vectorCopy, vectorCopy)), + "Got bad result for dot product"); } // This will fail to compile if the tags are wrong. - detail::CompareDimensionalityTags( - typename vtkm::TypeTraits::DimensionalityTag(), - typename vtkm::VecTraits::HasMultipleComponents()); + detail::CompareDimensionalityTags(typename vtkm::TypeTraits::DimensionalityTag(), + typename vtkm::VecTraits::HasMultipleComponents()); - TestVecTypeWritableImpl( - inVector, - vectorCopy, - outVector, - typename VecIsWritable::type()); + TestVecTypeWritableImpl(inVector, vectorCopy, outVector, + typename VecIsWritable::type()); } inline void CheckVecComponentsTag(vtkm::VecTraitsTagMultipleComponents) @@ -171,16 +161,16 @@ inline void CheckVecComponentsTag(vtkm::VecTraitsTagMultipleComponents) /// multiple components. Should only be called for vector classes that actually /// have multiple components. /// -template +template inline void TestVecComponentsTag() { // This will fail to compile if the tag is wrong // (i.e. not vtkm::VecTraitsTagMultipleComponents) - detail::CheckVecComponentsTag( - typename vtkm::VecTraits::HasMultipleComponents()); + detail::CheckVecComponentsTag(typename vtkm::VecTraits::HasMultipleComponents()); } -namespace detail { +namespace detail +{ inline void CheckScalarComponentsTag(vtkm::VecTraitsTagSingleComponent) { @@ -192,7 +182,7 @@ inline void CheckScalarComponentsTag(vtkm::VecTraitsTagSingleComponent) /// Compares some manual arithmetic through type traits to arithmetic with /// the Tuple class. template -static void TestVecType(const T &inVector, T &outVector) +static void TestVecType(const T& inVector, T& outVector) { detail::TestVecTypeImpl(inVector, outVector); detail::TestVecTypeImpl(inVector, outVector); @@ -202,15 +192,13 @@ static void TestVecType(const T &inVector, T &outVector) /// single component. Should only be called for "vector" classes that actually /// have only a single component (that is, are really scalars). /// -template +template inline void TestScalarComponentsTag() { // This will fail to compile if the tag is wrong // (i.e. not vtkm::VecTraitsTagSingleComponent) - detail::CheckScalarComponentsTag( - typename vtkm::VecTraits::HasMultipleComponents()); + detail::CheckScalarComponentsTag(typename vtkm::VecTraits::HasMultipleComponents()); } - } } // namespace vtkm::testing diff --git a/vtkm/worklet/AverageByKey.h b/vtkm/worklet/AverageByKey.h index 79d5fc563..405766887 100644 --- a/vtkm/worklet/AverageByKey.h +++ b/vtkm/worklet/AverageByKey.h @@ -33,36 +33,35 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -struct DivideWorklet: public vtkm::worklet::WorkletMapField +struct DivideWorklet : public vtkm::worklet::WorkletMapField { typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldOut<>); typedef void ExecutionSignature(_1, _2, _3); template - VTKM_EXEC - void operator()(const ValueType &v, const vtkm::Id &count, ValueType &vout) const + VTKM_EXEC void operator()(const ValueType& v, const vtkm::Id& count, ValueType& vout) const { typedef typename VecTraits::ComponentType ComponentType; - vout = v * ComponentType(1./static_cast(count)); + vout = v * ComponentType(1. / static_cast(count)); } template - VTKM_EXEC - void operator()(const T1&, const vtkm::Id &, T2 &) const - { } + VTKM_EXEC void operator()(const T1&, const vtkm::Id&, T2&) const + { + } }; -template -void AverageByKey(const vtkm::cont::ArrayHandle &keyArray, - const vtkm::cont::ArrayHandle &valueArray, - vtkm::cont::ArrayHandle &outputKeyArray, - vtkm::cont::ArrayHandle &outputValueArray, +template +void AverageByKey(const vtkm::cont::ArrayHandle& keyArray, + const vtkm::cont::ArrayHandle& valueArray, + vtkm::cont::ArrayHandle& outputKeyArray, + vtkm::cont::ArrayHandle& outputValueArray, DeviceAdapter) { typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; @@ -75,33 +74,31 @@ void AverageByKey(const vtkm::cont::ArrayHandle &keyArray IdArray indexArraySorted; vtkm::cont::ArrayHandle keyArraySorted; - Algorithm::Copy( keyArray, keyArraySorted ); // keep the input key array unchanged - Algorithm::Copy( indexArray, indexArraySorted ); - Algorithm::SortByKey( keyArraySorted, indexArraySorted, vtkm::SortLess() ) ; + Algorithm::Copy(keyArray, keyArraySorted); // keep the input key array unchanged + Algorithm::Copy(indexArray, indexArraySorted); + Algorithm::SortByKey(keyArraySorted, indexArraySorted, vtkm::SortLess()); // generate permultation array based on the indexes - typedef vtkm::cont::ArrayHandlePermutation PermutatedValueArray; - PermutatedValueArray valueArraySorted = vtkm::cont::make_ArrayHandlePermutation( indexArraySorted, valueArray ); + typedef vtkm::cont::ArrayHandlePermutation PermutatedValueArray; + PermutatedValueArray valueArraySorted = + vtkm::cont::make_ArrayHandlePermutation(indexArraySorted, valueArray); // reduce both sumArray and countArray by key typedef vtkm::cont::ArrayHandleConstant ConstIdArray; ConstIdArray constOneArray(1, valueArray.GetNumberOfValues()); IdArray countArray; ValueArray sumArray; - vtkm::cont::ArrayHandleZip< PermutatedValueArray, ConstIdArray > inputZipHandle(valueArraySorted, constOneArray); - vtkm::cont::ArrayHandleZip< ValueArray, IdArray > outputZipHandle(sumArray, countArray); + vtkm::cont::ArrayHandleZip inputZipHandle(valueArraySorted, + constOneArray); + vtkm::cont::ArrayHandleZip outputZipHandle(sumArray, countArray); - Algorithm::ReduceByKey( keyArraySorted, inputZipHandle, - outputKeyArray, outputZipHandle, - vtkm::Add() ); + Algorithm::ReduceByKey(keyArraySorted, inputZipHandle, outputKeyArray, outputZipHandle, + vtkm::Add()); // get average - DispatcherMapField().Invoke(sumArray, - countArray, - outputValueArray); + DispatcherMapField().Invoke(sumArray, countArray, outputValueArray); } - } } // vtkm::worklet -#endif //vtk_m_worklet_AverageByKey_h +#endif //vtk_m_worklet_AverageByKey_h diff --git a/vtkm/worklet/CellAverage.h b/vtkm/worklet/CellAverage.h index c2cce4f55..251d93c6a 100644 --- a/vtkm/worklet/CellAverage.h +++ b/vtkm/worklet/CellAverage.h @@ -25,77 +25,58 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ //simple functor that returns the average point value as a cell field -class CellAverage : - public vtkm::worklet::WorkletMapPointToCell +class CellAverage : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(CellSetIn cellset, - FieldInPoint<> inPoints, + typedef void ControlSignature(CellSetIn cellset, FieldInPoint<> inPoints, FieldOutCell<> outCells); typedef void ExecutionSignature(PointCount, _2, _3); typedef _1 InputDomain; - template - VTKM_EXEC - void operator()(const vtkm::IdComponent &numPoints, - const PointValueVecType &pointValues, - OutType &average) const + template + VTKM_EXEC void operator()(const vtkm::IdComponent& numPoints, + const PointValueVecType& pointValues, OutType& average) const { using PointValueType = typename PointValueVecType::ComponentType; using InVecSize = - std::integral_constant< - vtkm::IdComponent, - vtkm::VecTraits::NUM_COMPONENTS>; + std::integral_constant::NUM_COMPONENTS>; using OutVecSize = - std::integral_constant< - vtkm::IdComponent, - vtkm::VecTraits::NUM_COMPONENTS>; - using SameLengthVectors = - typename std::is_same::type; + std::integral_constant::NUM_COMPONENTS>; + using SameLengthVectors = typename std::is_same::type; - this->DoAverage(numPoints, - pointValues, - average, - SameLengthVectors()); + this->DoAverage(numPoints, pointValues, average, SameLengthVectors()); } private: - template - VTKM_EXEC - void DoAverage(const vtkm::IdComponent &numPoints, - const PointValueVecType &pointValues, - OutType &average, - std::true_type) const + template + VTKM_EXEC void DoAverage(const vtkm::IdComponent& numPoints, const PointValueVecType& pointValues, + OutType& average, std::true_type) const { using OutComponentType = typename vtkm::VecTraits::ComponentType; OutType sum = OutType(pointValues[0]); for (vtkm::IdComponent pointIndex = 1; pointIndex < numPoints; ++pointIndex) - { + { sum = sum + OutType(pointValues[pointIndex]); - } + } average = sum / OutType(static_cast(numPoints)); } - template - VTKM_EXEC - void DoAverage(const vtkm::IdComponent &vtkmNotUsed(numPoints), - const PointValueVecType &vtkmNotUsed(pointValues), - OutType &vtkmNotUsed(average), - std::false_type) const + template + VTKM_EXEC void DoAverage(const vtkm::IdComponent& vtkmNotUsed(numPoints), + const PointValueVecType& vtkmNotUsed(pointValues), + OutType& vtkmNotUsed(average), std::false_type) const { - this->RaiseError( - "CellAverage called with mismatched Vec sizes for CellAverage."); + this->RaiseError("CellAverage called with mismatched Vec sizes for CellAverage."); } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/CellDeepCopy.h b/vtkm/worklet/CellDeepCopy.h index 579aaa992..a817daabf 100644 --- a/vtkm/worklet/CellDeepCopy.h +++ b/vtkm/worklet/CellDeepCopy.h @@ -28,8 +28,10 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ /// Container for worklets and helper methods to copy a cell set to a new /// \c CellSetExplicit structure @@ -38,92 +40,70 @@ struct CellDeepCopy { struct CountCellPoints : vtkm::worklet::WorkletMapPointToCell { - typedef void ControlSignature(CellSetIn inputTopology, - FieldOut<> numPointsInCell); + typedef void ControlSignature(CellSetIn inputTopology, FieldOut<> numPointsInCell); typedef _2 ExecutionSignature(PointCount); VTKM_EXEC - vtkm::IdComponent operator()(vtkm::IdComponent numPoints) const - { - return numPoints; - } + vtkm::IdComponent operator()(vtkm::IdComponent numPoints) const { return numPoints; } }; struct PassCellStructure : vtkm::worklet::WorkletMapPointToCell { - typedef void ControlSignature(CellSetIn inputTopology, - FieldOut<> shapes, + typedef void ControlSignature(CellSetIn inputTopology, FieldOut<> shapes, FieldOut<> pointIndices); typedef void ExecutionSignature(CellShape, PointIndices, _2, _3); - template - VTKM_EXEC - void operator()(const CellShape &inShape, - const InPointIndexType &inPoints, - vtkm::UInt8 &outShape, - OutPointIndexType &outPoints) const + template + VTKM_EXEC void operator()(const CellShape& inShape, const InPointIndexType& inPoints, + vtkm::UInt8& outShape, OutPointIndexType& outPoints) const { outShape = inShape.Id; vtkm::IdComponent numPoints = inPoints.GetNumberOfComponents(); VTKM_ASSERT(numPoints == outPoints.GetNumberOfComponents()); - for (vtkm::IdComponent pointIndex = 0; pointIndex - VTKM_CONT - static void - Run(const InCellSetType &inCellSet, - vtkm::cont::CellSetExplicit &outCellSet, - Device) + template + VTKM_CONT static void Run( + const InCellSetType& inCellSet, + vtkm::cont::CellSetExplicit& outCellSet, + Device) { VTKM_IS_DYNAMIC_OR_STATIC_CELL_SET(InCellSetType); - vtkm::cont::ArrayHandle numIndices; + vtkm::cont::ArrayHandle numIndices; - vtkm::worklet::DispatcherMapTopology countDispatcher; + vtkm::worklet::DispatcherMapTopology countDispatcher; countDispatcher.Invoke(inCellSet, numIndices); - vtkm::cont::ArrayHandle shapes; - vtkm::cont::ArrayHandle connectivity; + vtkm::cont::ArrayHandle shapes; + vtkm::cont::ArrayHandle connectivity; - vtkm::cont::ArrayHandle offsets; + vtkm::cont::ArrayHandle offsets; vtkm::Id connectivitySize; - vtkm::cont::ConvertNumComponentsToOffsets( - numIndices, offsets, connectivitySize); + vtkm::cont::ConvertNumComponentsToOffsets(numIndices, offsets, connectivitySize); connectivity.Allocate(connectivitySize); - vtkm::worklet::DispatcherMapTopology passDispatcher; - passDispatcher.Invoke( - inCellSet, - shapes, - vtkm::cont::make_ArrayHandleGroupVecVariable(connectivity, offsets)); + vtkm::worklet::DispatcherMapTopology passDispatcher; + passDispatcher.Invoke(inCellSet, shapes, + vtkm::cont::make_ArrayHandleGroupVecVariable(connectivity, offsets)); - vtkm::cont::CellSetExplicit - newCellSet(inCellSet.GetName()); - newCellSet.Fill(inCellSet.GetNumberOfPoints(), - shapes, - numIndices, - connectivity, - offsets); + vtkm::cont::CellSetExplicit + newCellSet(inCellSet.GetName()); + newCellSet.Fill(inCellSet.GetNumberOfPoints(), shapes, numIndices, connectivity, offsets); outCellSet = newCellSet; } - template - VTKM_CONT - static vtkm::cont::CellSetExplicit<> - Run(const InCellSetType &inCellSet, Device) + template + VTKM_CONT static vtkm::cont::CellSetExplicit<> Run(const InCellSetType& inCellSet, Device) { VTKM_IS_DYNAMIC_OR_STATIC_CELL_SET(InCellSetType); @@ -133,7 +113,6 @@ struct CellDeepCopy return outCellSet; } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/Clip.h b/vtkm/worklet/Clip.h index 44ba1d50e..ede10aca1 100644 --- a/vtkm/worklet/Clip.h +++ b/vtkm/worklet/Clip.h @@ -35,31 +35,31 @@ #include #include -#if defined(THRUST_MAJOR_VERSION) && THRUST_MAJOR_VERSION == 1 && \ - THRUST_MINOR_VERSION == 8 && THRUST_SUBMINOR_VERSION < 3 +#if defined(THRUST_MAJOR_VERSION) && THRUST_MAJOR_VERSION == 1 && THRUST_MINOR_VERSION == 8 && \ + THRUST_SUBMINOR_VERSION < 3 // Workaround a bug in thrust 1.8.0 - 1.8.2 scan implementations which produces // wrong results #include #define THRUST_SCAN_WORKAROUND #endif +namespace vtkm +{ +namespace worklet +{ -namespace vtkm { -namespace worklet { - -namespace internal { +namespace internal +{ template -VTKM_EXEC_CONT -T Scale(const T &val, vtkm::Float64 scale) +VTKM_EXEC_CONT T Scale(const T& val, vtkm::Float64 scale) { return static_cast(scale * static_cast(val)); } template -VTKM_EXEC_CONT -vtkm::Vec Scale(const vtkm::Vec &val, - vtkm::Float64 scale) +VTKM_EXEC_CONT vtkm::Vec Scale(const vtkm::Vec& val, + vtkm::Float64 scale) { return val * scale; } @@ -68,39 +68,38 @@ template class ExecutionConnectivityExplicit : vtkm::exec::ExecutionObjectBase { private: - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal UInt8Portal; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal + UInt8Portal; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal IdComponentPortal; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::Portal IdComponentPortal; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal IdPortal; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal + IdPortal; public: VTKM_CONT ExecutionConnectivityExplicit() - : Shapes(), NumIndices(), Connectivity(), IndexOffsets() + : Shapes() + , NumIndices() + , Connectivity() + , IndexOffsets() { } VTKM_CONT - ExecutionConnectivityExplicit(const UInt8Portal &shapes, - const IdComponentPortal &numIndices, - const IdPortal &connectivity, - const IdPortal &indexOffsets) - : Shapes(shapes), - NumIndices(numIndices), - Connectivity(connectivity), - IndexOffsets(indexOffsets) + ExecutionConnectivityExplicit(const UInt8Portal& shapes, const IdComponentPortal& numIndices, + const IdPortal& connectivity, const IdPortal& indexOffsets) + : Shapes(shapes) + , NumIndices(numIndices) + , Connectivity(connectivity) + , IndexOffsets(indexOffsets) { } VTKM_EXEC - void SetCellShape(vtkm::Id cellIndex, vtkm::UInt8 shape) - { - this->Shapes.Set(cellIndex, shape); - } + void SetCellShape(vtkm::Id cellIndex, vtkm::UInt8 shape) { this->Shapes.Set(cellIndex, shape); } VTKM_EXEC void SetNumberOfIndices(vtkm::Id cellIndex, vtkm::IdComponent numIndices) @@ -129,8 +128,6 @@ private: } // namespace internal - - struct ClipStats { vtkm::Id NumberOfCells; @@ -140,7 +137,7 @@ struct ClipStats struct SumOp { VTKM_EXEC_CONT - ClipStats operator()(const ClipStats &cs1, const ClipStats &cs2) const + ClipStats operator()(const ClipStats& cs1, const ClipStats& cs2) const { ClipStats sum = cs1; sum.NumberOfCells += cs2.NumberOfCells; @@ -159,61 +156,57 @@ struct EdgeInterpolation struct LessThanOp { VTKM_EXEC - bool operator()(const EdgeInterpolation &v1, const EdgeInterpolation &v2) const + bool operator()(const EdgeInterpolation& v1, const EdgeInterpolation& v2) const { - return (v1.Vertex1 < v2.Vertex1) || - (v1.Vertex1 == v2.Vertex1 && v1.Vertex2 < v2.Vertex2); + return (v1.Vertex1 < v2.Vertex1) || (v1.Vertex1 == v2.Vertex1 && v1.Vertex2 < v2.Vertex2); } }; struct EqualToOp { VTKM_EXEC - bool operator()(const EdgeInterpolation &v1, const EdgeInterpolation &v2) const + bool operator()(const EdgeInterpolation& v1, const EdgeInterpolation& v2) const { return v1.Vertex1 == v2.Vertex1 && v1.Vertex2 == v2.Vertex2; } }; }; - class Clip { public: - struct TypeClipStats : vtkm::ListTagBase { }; + struct TypeClipStats : vtkm::ListTagBase + { + }; - template + template class ComputeStats : public vtkm::worklet::WorkletMapPointToCell { typedef internal::ClipTables::DevicePortal ClipTablesPortal; + public: - typedef void ControlSignature(CellSetIn cellset, - FieldInPoint scalars, + typedef void ControlSignature(CellSetIn cellset, FieldInPoint scalars, FieldOutCell clipTableIdxs, FieldOutCell stats); typedef void ExecutionSignature(_2, CellShape, PointCount, _3, _4); VTKM_CONT - ComputeStats(vtkm::Float64 value, const ClipTablesPortal &clipTables) - : Value(value), ClipTables(clipTables) + ComputeStats(vtkm::Float64 value, const ClipTablesPortal& clipTables) + : Value(value) + , ClipTables(clipTables) { } - template - VTKM_EXEC - void operator()(const ScalarsVecType &scalars, - CellShapeTag shape, - vtkm::Id count, - vtkm::Id& clipTableIdx, - ClipStats& stats) const + template + VTKM_EXEC void operator()(const ScalarsVecType& scalars, CellShapeTag shape, vtkm::Id count, + vtkm::Id& clipTableIdx, ClipStats& stats) const { const vtkm::Id mask[] = { 1, 2, 4, 8, 16, 32, 64, 128 }; vtkm::Id caseId = 0; for (vtkm::IdComponent i = 0; i < count; ++i) { - caseId |= (static_cast(scalars[i]) > this->Value) ? - mask[i] : 0; + caseId |= (static_cast(scalars[i]) > this->Value) ? mask[i] : 0; } vtkm::Id idx = this->ClipTables.GetCaseIndex(shape.Id, caseId); @@ -244,43 +237,39 @@ public: ClipTablesPortal ClipTables; }; - template + template class GenerateCellSet : public vtkm::worklet::WorkletMapPointToCell { typedef internal::ClipTables::DevicePortal ClipTablesPortal; - public: - struct EdgeInterp : vtkm::ListTagBase { }; - typedef void ControlSignature(CellSetIn cellset, - FieldInPoint scalars, + public: + struct EdgeInterp : vtkm::ListTagBase + { + }; + + typedef void ControlSignature(CellSetIn cellset, FieldInPoint scalars, FieldInCell clipTableIdxs, FieldInCell cellSetIdxs, ExecObject connectivityExplicit, - WholeArrayInOut< EdgeInterp > interpolation, - WholeArrayInOut< IdType > newPointsConnectivityReverseMap); + WholeArrayInOut interpolation, + WholeArrayInOut newPointsConnectivityReverseMap); typedef void ExecutionSignature(CellShape, _2, FromIndices, _3, _4, _5, _6, _7); VTKM_CONT GenerateCellSet(vtkm::Float64 value, const ClipTablesPortal clipTables) - : Value(value), ClipTables(clipTables) + : Value(value) + , ClipTables(clipTables) { } - template - VTKM_EXEC - void operator()( - CellShapeTag shape, - const ScalarsVecType &scalars, - const IndicesVecType &indices, - vtkm::Id clipTableIdx, - ClipStats cellSetIndices, - internal::ExecutionConnectivityExplicit& connectivityExplicit, - InterpolationWholeArrayType& interpolation, - ReverseMapWholeArrayType& newPointsConnectivityReverseMap) const + template + VTKM_EXEC void operator()( + CellShapeTag shape, const ScalarsVecType& scalars, const IndicesVecType& indices, + vtkm::Id clipTableIdx, ClipStats cellSetIndices, + internal::ExecutionConnectivityExplicit& connectivityExplicit, + InterpolationWholeArrayType& interpolation, + ReverseMapWholeArrayType& newPointsConnectivityReverseMap) const { vtkm::Id idx = clipTableIdx; @@ -301,17 +290,14 @@ public: for (vtkm::Id pt = 0; pt < numPoints; ++pt, ++idx) { - vtkm::IdComponent entry = - static_cast(this->ClipTables.ValueAt(idx)); + vtkm::IdComponent entry = static_cast(this->ClipTables.ValueAt(idx)); if (entry >= 100) // existing point { - connectivityExplicit.SetConnectivity(connectivityIdx++, - indices[entry - 100]); + connectivityExplicit.SetConnectivity(connectivityIdx++, indices[entry - 100]); } else // edge, new point to be generated by cutting the egde { - internal::ClipTables::EdgeVec edge = - this->ClipTables.GetEdge(shape.Id, entry); + internal::ClipTables::EdgeVec edge = this->ClipTables.GetEdge(shape.Id, entry); // Sanity check to make sure the edge is valid. VTKM_ASSERT(edge[0] != 255); VTKM_ASSERT(edge[1] != 255); @@ -325,9 +311,9 @@ public: this->swap(edge[0], edge[1]); } ei.Weight = (static_cast(scalars[edge[0]]) - this->Value) / - static_cast(scalars[edge[0]] - scalars[edge[1]]); + static_cast(scalars[edge[0]] - scalars[edge[1]]); - interpolation.Set(newPtsIdx , ei); + interpolation.Set(newPtsIdx, ei); newPointsConnectivityReverseMap.Set(newPtsIdx, connectivityIdx++); ++newPtsIdx; } @@ -335,48 +321,45 @@ public: } } - template - VTKM_EXEC - void swap(T &v1, T &v2) const - { - T temp = v1; - v1 = v2; - v2 = temp; - } + template + VTKM_EXEC void swap(T& v1, T& v2) const + { + T temp = v1; + v1 = v2; + v2 = temp; + } private: vtkm::Float64 Value; ClipTablesPortal ClipTables; }; - -// The following can be done using DeviceAdapterAlgorithm::LowerBounds followed by -// a worklet for updating connectivity. We are going with a custom worklet, that -// combines lower-bounds computation and connectivity update, because this is -// currently faster and uses less memory. - template + // The following can be done using DeviceAdapterAlgorithm::LowerBounds followed by + // a worklet for updating connectivity. We are going with a custom worklet, that + // combines lower-bounds computation and connectivity update, because this is + // currently faster and uses less memory. + template class AmendConnectivity : public vtkm::exec::FunctorBase { - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal IdPortal; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst IdPortalConst; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst - EdgeInterpolationPortalConst; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal + IdPortal; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst IdPortalConst; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst EdgeInterpolationPortalConst; public: VTKM_CONT AmendConnectivity(EdgeInterpolationPortalConst newPoints, EdgeInterpolationPortalConst uniqueNewPoints, - IdPortalConst newPointsConnectivityReverseMap, - vtkm::Id newPointsOffset, + IdPortalConst newPointsConnectivityReverseMap, vtkm::Id newPointsOffset, IdPortal connectivity) - : NewPoints(newPoints), - UniqueNewPoints(uniqueNewPoints), - NewPointsConnectivityReverseMap(newPointsConnectivityReverseMap), - NewPointsOffset(newPointsOffset), - Connectivity(connectivity) + : NewPoints(newPoints) + , UniqueNewPoints(uniqueNewPoints) + , NewPointsConnectivityReverseMap(newPointsConnectivityReverseMap) + , NewPointsOffset(newPointsOffset) + , Connectivity(connectivity) { } @@ -391,7 +374,7 @@ public: vtkm::Id first = 0; while (count > 0) { - vtkm::Id step = count/2; + vtkm::Id step = count / 2; vtkm::Id mid = first + step; if (lt(this->UniqueNewPoints.Get(mid), current)) { @@ -416,55 +399,47 @@ public: IdPortal Connectivity; }; - - Clip() - : ClipTablesInstance(), NewPointsInterpolation(), NewPointsOffset() + : ClipTablesInstance() + , NewPointsInterpolation() + , NewPointsOffset() { } - template - vtkm::cont::CellSetExplicit<> - Run(const vtkm::cont::DynamicCellSetBase &cellSet, - const ScalarsArrayHandle &scalars, - vtkm::Float64 value, - DeviceAdapter device) + template + vtkm::cont::CellSetExplicit<> Run(const vtkm::cont::DynamicCellSetBase& cellSet, + const ScalarsArrayHandle& scalars, vtkm::Float64 value, + DeviceAdapter device) { typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; typedef internal::ClipTables::DevicePortal ClipTablesPortal; - ClipTablesPortal clipTablesDevicePortal = - this->ClipTablesInstance.GetDevicePortal(device); - + ClipTablesPortal clipTablesDevicePortal = this->ClipTablesInstance.GetDevicePortal(device); // Step 1. compute counts for the elements of the cell set data structure vtkm::cont::ArrayHandle clipTableIdxs; vtkm::cont::ArrayHandle stats; ComputeStats computeStats(value, clipTablesDevicePortal); - DispatcherMapTopology< ComputeStats >(computeStats) - .Invoke(cellSet, scalars, clipTableIdxs, stats); + DispatcherMapTopology>(computeStats) + .Invoke(cellSet, scalars, clipTableIdxs, stats); // compute offsets for each invocation ClipStats zero = { 0, 0, 0 }; vtkm::cont::ArrayHandle cellSetIndices; - ClipStats total = Algorithm::ScanExclusive(stats, cellSetIndices, - ClipStats::SumOp(), zero); + ClipStats total = Algorithm::ScanExclusive(stats, cellSetIndices, ClipStats::SumOp(), zero); stats.ReleaseResources(); - // Step 2. generate the output cell set vtkm::cont::ArrayHandle shapes; vtkm::cont::ArrayHandle numIndices; vtkm::cont::ArrayHandle connectivity; vtkm::cont::ArrayHandle cellToConnectivityMap; internal::ExecutionConnectivityExplicit outConnectivity( - shapes.PrepareForOutput(total.NumberOfCells, device), - numIndices.PrepareForOutput(total.NumberOfCells, device), - connectivity.PrepareForOutput(total.NumberOfIndices, device), - cellToConnectivityMap.PrepareForOutput(total.NumberOfCells, device)); + shapes.PrepareForOutput(total.NumberOfCells, device), + numIndices.PrepareForOutput(total.NumberOfCells, device), + connectivity.PrepareForOutput(total.NumberOfIndices, device), + cellToConnectivityMap.PrepareForOutput(total.NumberOfCells, device)); vtkm::cont::ArrayHandle newPoints; newPoints.Allocate(total.NumberOfNewPoints); @@ -473,13 +448,9 @@ public: newPointsConnectivityReverseMap.Allocate(total.NumberOfNewPoints); GenerateCellSet generateCellSet(value, clipTablesDevicePortal); - DispatcherMapTopology >(generateCellSet) - .Invoke(cellSet, scalars, - clipTableIdxs, cellSetIndices, - outConnectivity, - newPoints, - newPointsConnectivityReverseMap - ); + DispatcherMapTopology>(generateCellSet) + .Invoke(cellSet, scalars, clipTableIdxs, cellSetIndices, outConnectivity, newPoints, + newPointsConnectivityReverseMap); cellSetIndices.ReleaseResources(); // Step 3. remove duplicates from the list of new points @@ -493,80 +464,71 @@ public: this->NewPointsInterpolation = uniqueNewPoints; this->NewPointsOffset = scalars.GetNumberOfValues(); - // Step 4. update the connectivity array with indexes to the new, unique points AmendConnectivity computeNewPointsConnectivity( - newPoints.PrepareForInput(device), - uniqueNewPoints.PrepareForInput(device), - newPointsConnectivityReverseMap.PrepareForInput(device), - this->NewPointsOffset, - connectivity.PrepareForInPlace(device)); + newPoints.PrepareForInput(device), uniqueNewPoints.PrepareForInput(device), + newPointsConnectivityReverseMap.PrepareForInput(device), this->NewPointsOffset, + connectivity.PrepareForInPlace(device)); Algorithm::Schedule(computeNewPointsConnectivity, total.NumberOfNewPoints); - vtkm::cont::CellSetExplicit<> output; - output.Fill(this->NewPointsOffset + uniqueNewPoints.GetNumberOfValues(), - shapes, - numIndices, + output.Fill(this->NewPointsOffset + uniqueNewPoints.GetNumberOfValues(), shapes, numIndices, connectivity); return output; } - template + template class ClipWithImplicitFunction { public: VTKM_CONT - ClipWithImplicitFunction(Clip *clipper, const DynamicCellSet &cellSet, - const vtkm::exec::ImplicitFunction &function, vtkm::cont::CellSetExplicit<> *result) - : Clipper(clipper), CellSet(&cellSet), Function(function), Result(result) - { } + ClipWithImplicitFunction(Clip* clipper, const DynamicCellSet& cellSet, + const vtkm::exec::ImplicitFunction& function, + vtkm::cont::CellSetExplicit<>* result) + : Clipper(clipper) + , CellSet(&cellSet) + , Function(function) + , Result(result) + { + } template - VTKM_CONT - void operator()(const ArrayHandleType &handle) const + VTKM_CONT void operator()(const ArrayHandleType& handle) const { // Evaluate the implicit function on the input coordinates using // ArrayHandleTransform - vtkm::cont::ArrayHandleTransform< - vtkm::FloatDefault, - ArrayHandleType, - vtkm::exec::ImplicitFunctionValue> clipScalars(handle, this->Function); + vtkm::cont::ArrayHandleTransform + clipScalars(handle, this->Function); // Clip at locations where the implicit function evaluates to 0 - *this->Result = this->Clipper->Run(*this->CellSet, - clipScalars, - 0.0, - DeviceAdapter()); + *this->Result = this->Clipper->Run(*this->CellSet, clipScalars, 0.0, DeviceAdapter()); } private: - Clip *Clipper; - const DynamicCellSet *CellSet; + Clip* Clipper; + const DynamicCellSet* CellSet; const vtkm::exec::ImplicitFunctionValue Function; - vtkm::cont::CellSetExplicit<> *Result; + vtkm::cont::CellSetExplicit<>* Result; }; - template - vtkm::cont::CellSetExplicit<> - Run(const vtkm::cont::DynamicCellSetBase &cellSet, - const vtkm::cont::ImplicitFunction &clipFunction, - const vtkm::cont::CoordinateSystem &coords, - DeviceAdapter device) + template + vtkm::cont::CellSetExplicit<> Run(const vtkm::cont::DynamicCellSetBase& cellSet, + const vtkm::cont::ImplicitFunction& clipFunction, + const vtkm::cont::CoordinateSystem& coords, + DeviceAdapter device) { vtkm::cont::CellSetExplicit<> output; - ClipWithImplicitFunction< - vtkm::cont::DynamicCellSetBase, DeviceAdapter> - clip(this, cellSet, clipFunction.PrepareForExecution(device), &output); + ClipWithImplicitFunction, DeviceAdapter> clip( + this, cellSet, clipFunction.PrepareForExecution(device), &output); CastAndCall(coords, clip); return output; } - template + template class InterpolateField { public: @@ -574,18 +536,18 @@ public: class Kernel : public vtkm::exec::FunctorBase { public: - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::Portal FieldPortal; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal + FieldPortal; - typedef typename vtkm::cont::ArrayHandle - ::template ExecutionTypes::PortalConst - EdgeInterpolationPortalConst; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst EdgeInterpolationPortalConst; VTKM_CONT - Kernel(EdgeInterpolationPortalConst interpolation, - vtkm::Id newPointsOffset, + Kernel(EdgeInterpolationPortalConst interpolation, vtkm::Id newPointsOffset, FieldPortal field) - : Interpolation(interpolation), NewPointsOffset(newPointsOffset), Field(field) + : Interpolation(interpolation) + , NewPointsOffset(newPointsOffset) + , Field(field) { } @@ -606,34 +568,26 @@ public: }; VTKM_CONT - InterpolateField( - vtkm::cont::ArrayHandle interpolationArray, - vtkm::Id newPointsOffset, - vtkm::cont::DynamicArrayHandle *output) - : InterpolationArray(interpolationArray), - NewPointsOffset(newPointsOffset), - Output(output) + InterpolateField(vtkm::cont::ArrayHandle interpolationArray, + vtkm::Id newPointsOffset, vtkm::cont::DynamicArrayHandle* output) + : InterpolationArray(interpolationArray) + , NewPointsOffset(newPointsOffset) + , Output(output) { } template - VTKM_CONT - void operator()(const vtkm::cont::ArrayHandle &field) const + VTKM_CONT void operator()(const vtkm::cont::ArrayHandle& field) const { typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; vtkm::Id count = this->InterpolationArray.GetNumberOfValues(); vtkm::cont::ArrayHandle result; - result.Allocate(field.GetNumberOfValues()+count); - Algorithm::CopySubRange(field, - 0, - field.GetNumberOfValues(), - result); - Kernel kernel( - this->InterpolationArray.PrepareForInput(DeviceAdapter()), - this->NewPointsOffset, - result.PrepareForInPlace(DeviceAdapter())); + result.Allocate(field.GetNumberOfValues() + count); + Algorithm::CopySubRange(field, 0, field.GetNumberOfValues(), result); + Kernel kernel(this->InterpolationArray.PrepareForInput(DeviceAdapter()), + this->NewPointsOffset, result.PrepareForInPlace(DeviceAdapter())); Algorithm::Schedule(kernel, count); *(this->Output) = vtkm::cont::DynamicArrayHandle(result); @@ -642,19 +596,17 @@ public: private: vtkm::cont::ArrayHandle InterpolationArray; vtkm::Id NewPointsOffset; - vtkm::cont::DynamicArrayHandle *Output; + vtkm::cont::DynamicArrayHandle* Output; }; template - vtkm::cont::DynamicArrayHandle ProcessField( - const FieldType &fieldData, - DeviceAdapter device) const + vtkm::cont::DynamicArrayHandle ProcessField(const FieldType& fieldData, + DeviceAdapter device) const { - (void) device; + (void)device; vtkm::cont::DynamicArrayHandle output; CastAndCall(fieldData, InterpolateField(this->NewPointsInterpolation, - this->NewPointsOffset, - &output)); + this->NewPointsOffset, &output)); return output; } @@ -663,17 +615,20 @@ private: vtkm::cont::ArrayHandle NewPointsInterpolation; vtkm::Id NewPointsOffset; }; - } } // namespace vtkm::worklet #if defined(THRUST_SCAN_WORKAROUND) -namespace thrust { -namespace detail { +namespace thrust +{ +namespace detail +{ // causes a different code path which does not have the bug -template<> struct is_integral : public true_type {}; - +template <> +struct is_integral : public true_type +{ +}; } } // namespace thrust::detail #endif diff --git a/vtkm/worklet/ContourTreeUniform.h b/vtkm/worklet/ContourTreeUniform.h index 88565db6f..76d85cc3c 100644 --- a/vtkm/worklet/ContourTreeUniform.h +++ b/vtkm/worklet/ContourTreeUniform.h @@ -64,7 +64,6 @@ // Proceedings of the IEEE Symposium on Large Data Analysis and Visualization // (LDAV), October 2016, Baltimore, Maryland. - #ifndef vtk_m_worklet_ContourTreeUniform_h #define vtk_m_worklet_ContourTreeUniform_h @@ -87,62 +86,60 @@ const bool SPLIT = false; const bool JOIN_3D = true; const bool SPLIT_3D = false; -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ class ContourTreeMesh2D { public: - - template - void Run(const vtkm::cont::ArrayHandle fieldArray, - const vtkm::Id nRows, + template + void Run(const vtkm::cont::ArrayHandle fieldArray, const vtkm::Id nRows, const vtkm::Id nCols, - vtkm::cont::ArrayHandle > &saddlePeak, + vtkm::cont::ArrayHandle>& saddlePeak, const DeviceAdapter& device) { // DeviceAdapter is passed only to be available in template but is not used - (void) device; + (void)device; vtkm::Id nSlices = 1; // Build the mesh and fill in the values - contourtree::Mesh2D_DEM_Triangulation - mesh(fieldArray, nRows, nCols); + contourtree::Mesh2D_DEM_Triangulation mesh(fieldArray, + nRows, nCols); // Initialize the join tree so that all arcs point to maxima - contourtree::MergeTree - joinTree(fieldArray, nRows, nCols, nSlices, JOIN); + contourtree::MergeTree joinTree(fieldArray, nRows, nCols, + nSlices, JOIN); mesh.SetStarts(joinTree.extrema, JOIN); joinTree.BuildRegularChains(); // Create the active topology graph from the regular graph - contourtree::ChainGraph - joinGraph(fieldArray, joinTree.extrema, JOIN); + contourtree::ChainGraph joinGraph( + fieldArray, joinTree.extrema, JOIN); mesh.SetSaddleStarts(joinGraph, JOIN); // Call join graph to finish computation joinGraph.Compute(joinTree.saddles); // Initialize the split tree so that all arcs point to maxima - contourtree::MergeTree - splitTree(fieldArray, nRows, nCols, nSlices, SPLIT); + contourtree::MergeTree splitTree(fieldArray, nRows, + nCols, nSlices, SPLIT); mesh.SetStarts(splitTree.extrema, SPLIT); splitTree.BuildRegularChains(); // Create the active topology graph from the regular graph - contourtree::ChainGraph - splitGraph(fieldArray, splitTree.extrema, SPLIT); + contourtree::ChainGraph splitGraph( + fieldArray, splitTree.extrema, SPLIT); mesh.SetSaddleStarts(splitGraph, SPLIT); // Call split graph to finish computation splitGraph.Compute(splitTree.saddles); // Now compute the contour tree - contourtree::ContourTree - contourTree(fieldArray, - joinTree, splitTree, - joinGraph, splitGraph); + contourtree::ContourTree contourTree( + fieldArray, joinTree, splitTree, joinGraph, splitGraph); contourTree.CollectSaddlePeak(saddlePeak); } @@ -151,60 +148,54 @@ public: class ContourTreeMesh3D { public: - - template - void Run(const vtkm::cont::ArrayHandle fieldArray, - const vtkm::Id nRows, - const vtkm::Id nCols, - const vtkm::Id nSlices, - vtkm::cont::ArrayHandle > &saddlePeak, + template + void Run(const vtkm::cont::ArrayHandle fieldArray, const vtkm::Id nRows, + const vtkm::Id nCols, const vtkm::Id nSlices, + vtkm::cont::ArrayHandle>& saddlePeak, const DeviceAdapter& device) { // DeviceAdapter is passed only to be available in template but is not used - (void) device; + (void)device; // Build the mesh and fill in the values - contourtree::Mesh3D_DEM_Triangulation - mesh(fieldArray, nRows, nCols, nSlices); + contourtree::Mesh3D_DEM_Triangulation mesh( + fieldArray, nRows, nCols, nSlices); // Initialize the join tree so that all arcs point to maxima - contourtree::MergeTree - joinTree(fieldArray, nRows, nCols, nSlices, JOIN_3D); + contourtree::MergeTree joinTree(fieldArray, nRows, nCols, + nSlices, JOIN_3D); mesh.SetStarts(joinTree.extrema, JOIN_3D); joinTree.BuildRegularChains(); // Create the active topology graph from the regular graph - contourtree::ChainGraph - joinGraph(fieldArray, joinTree.extrema, JOIN_3D); + contourtree::ChainGraph joinGraph( + fieldArray, joinTree.extrema, JOIN_3D); mesh.SetSaddleStarts(joinGraph, JOIN_3D); // Call join graph to finish computation joinGraph.Compute(joinTree.saddles); // Initialize the split tree so that all arcs point to maxima - contourtree::MergeTree - splitTree(fieldArray, nRows, nCols, nSlices, SPLIT_3D); + contourtree::MergeTree splitTree( + fieldArray, nRows, nCols, nSlices, SPLIT_3D); mesh.SetStarts(splitTree.extrema, SPLIT_3D); splitTree.BuildRegularChains(); // Create the active topology graph from the regular graph - contourtree::ChainGraph - splitGraph(fieldArray, splitTree.extrema, SPLIT_3D); + contourtree::ChainGraph splitGraph( + fieldArray, splitTree.extrema, SPLIT_3D); mesh.SetSaddleStarts(splitGraph, SPLIT_3D); // Call split graph to finish computation splitGraph.Compute(splitTree.saddles); // Now compute the contour tree - contourtree::ContourTree - contourTree(fieldArray, - joinTree, splitTree, - joinGraph, splitGraph); + contourtree::ContourTree contourTree( + fieldArray, joinTree, splitTree, joinGraph, splitGraph); contourTree.CollectSaddlePeak(saddlePeak); } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/DispatcherMapField.h b/vtkm/worklet/DispatcherMapField.h index 54ebe2345..aa7ee953a 100644 --- a/vtkm/worklet/DispatcherMapField.h +++ b/vtkm/worklet/DispatcherMapField.h @@ -24,39 +24,38 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ /// \brief Dispatcher for worklets that inherit from \c WorkletMapField. /// -template -class DispatcherMapField : - public vtkm::worklet::internal::DispatcherBase< - DispatcherMapField, - WorkletType, - vtkm::worklet::WorkletMapField> +template +class DispatcherMapField + : public vtkm::worklet::internal::DispatcherBase, + WorkletType, vtkm::worklet::WorkletMapField> { - typedef vtkm::worklet::internal::DispatcherBase< - DispatcherMapField, - WorkletType, - vtkm::worklet::WorkletMapField> Superclass; + typedef vtkm::worklet::internal::DispatcherBase, + WorkletType, vtkm::worklet::WorkletMapField> + Superclass; public: VTKM_CONT - DispatcherMapField(const WorkletType &worklet = WorkletType()) - : Superclass(worklet) { } + DispatcherMapField(const WorkletType& worklet = WorkletType()) + : Superclass(worklet) + { + } - template - VTKM_CONT - void DoInvoke(const Invocation &invocation) const + template + VTKM_CONT void DoInvoke(const Invocation& invocation) const { // This is the type for the input domain typedef typename Invocation::InputDomainType InputDomainType; // We can pull the input domain parameter (the data specifying the input // domain) from the invocation object. - const InputDomainType &inputDomain = invocation.GetInputDomain(); + const InputDomainType& inputDomain = invocation.GetInputDomain(); // For a DispatcherMapField, the inputDomain must be an ArrayHandle (or // a DynamicArrayHandle that gets cast to one). The size of the domain @@ -68,9 +67,7 @@ public: // of invocations, the superclass can take care of the rest. this->BasicInvoke(invocation, numInstances, Device()); } - }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/DispatcherMapTopology.h b/vtkm/worklet/DispatcherMapTopology.h index 90b0884fc..88765fb28 100644 --- a/vtkm/worklet/DispatcherMapTopology.h +++ b/vtkm/worklet/DispatcherMapTopology.h @@ -25,34 +25,33 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ /// \brief Dispatcher for worklets that inherit from \c WorkletMapTopology. /// -template -class DispatcherMapTopology : - public vtkm::worklet::internal::DispatcherBase< - DispatcherMapTopology, - WorkletType, - vtkm::worklet::detail::WorkletMapTopologyBase - > +template +class DispatcherMapTopology + : public vtkm::worklet::internal::DispatcherBase, + WorkletType, + vtkm::worklet::detail::WorkletMapTopologyBase> { - typedef vtkm::worklet::internal::DispatcherBase< - DispatcherMapTopology, - WorkletType, - vtkm::worklet::detail::WorkletMapTopologyBase - > Superclass; + typedef vtkm::worklet::internal::DispatcherBase, + WorkletType, + vtkm::worklet::detail::WorkletMapTopologyBase> + Superclass; public: VTKM_CONT - DispatcherMapTopology(const WorkletType &worklet = WorkletType()) - : Superclass(worklet) { } + DispatcherMapTopology(const WorkletType& worklet = WorkletType()) + : Superclass(worklet) + { + } - template - VTKM_CONT - void DoInvoke(const Invocation &invocation) const + template + VTKM_CONT void DoInvoke(const Invocation& invocation) const { // This is the type for the input domain typedef typename Invocation::InputDomainType InputDomainType; @@ -64,17 +63,14 @@ public: // We can pull the input domain parameter (the data specifying the input // domain) from the invocation object. - const InputDomainType &inputDomain = invocation.GetInputDomain(); + const InputDomainType& inputDomain = invocation.GetInputDomain(); // Now that we have the input domain, we can extract the range of the // scheduling and call BadicInvoke. - this->BasicInvoke(invocation, - inputDomain.GetSchedulingRange( - typename WorkletType::ToTopologyType()), - Device()); + this->BasicInvoke( + invocation, inputDomain.GetSchedulingRange(typename WorkletType::ToTopologyType()), Device()); } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/DispatcherReduceByKey.h b/vtkm/worklet/DispatcherReduceByKey.h index e760c0d6d..f43b3b3ab 100644 --- a/vtkm/worklet/DispatcherReduceByKey.h +++ b/vtkm/worklet/DispatcherReduceByKey.h @@ -26,33 +26,31 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ /// \brief Dispatcher for worklets that inherit from \c WorkletReduceByKey. /// -template +template class DispatcherReduceByKey - : public vtkm::worklet::internal::DispatcherBase< - DispatcherReduceByKey, - WorkletType, - vtkm::worklet::WorkletReduceByKey> + : public vtkm::worklet::internal::DispatcherBase, + WorkletType, vtkm::worklet::WorkletReduceByKey> { using Superclass = - vtkm::worklet::internal::DispatcherBase< - DispatcherReduceByKey, - WorkletType, - vtkm::worklet::WorkletReduceByKey>; + vtkm::worklet::internal::DispatcherBase, WorkletType, + vtkm::worklet::WorkletReduceByKey>; public: VTKM_CONT - DispatcherReduceByKey(const WorkletType &worklet = WorkletType()) + DispatcherReduceByKey(const WorkletType& worklet = WorkletType()) : Superclass(worklet) - { } + { + } - template - void DoInvoke(const Invocation &invocation) const + template + void DoInvoke(const Invocation& invocation) const { // This is the type for the input domain using InputDomainType = typename Invocation::InputDomainType; @@ -61,19 +59,18 @@ public: // something other than vtkm::worklet::Keys as the input domain, which // is illegal. VTKM_STATIC_ASSERT_MSG( - (vtkm::cont::arg::TypeCheck::value), - "Invalid input domain for WorkletReduceByKey."); + (vtkm::cont::arg::TypeCheck::value), + "Invalid input domain for WorkletReduceByKey."); // We can pull the input domain parameter (the data specifying the input // domain) from the invocation object. - const InputDomainType &inputDomain = invocation.GetInputDomain(); + const InputDomainType& inputDomain = invocation.GetInputDomain(); // Now that we have the input domain, we can extract the range of the // scheduling and call BadicInvoke. this->BasicInvoke(invocation, inputDomain.GetInputRange(), Device()); } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/DispatcherStreamingMapField.h b/vtkm/worklet/DispatcherStreamingMapField.h index 4a981c857..0a7812eea 100644 --- a/vtkm/worklet/DispatcherStreamingMapField.h +++ b/vtkm/worklet/DispatcherStreamingMapField.h @@ -25,12 +25,15 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace detail { +namespace detail +{ -template +template struct DispatcherStreamingMapFieldTransformFunctor { vtkm::Id BlockIndex; @@ -39,175 +42,160 @@ struct DispatcherStreamingMapFieldTransformFunctor vtkm::Id FullSize; VTKM_CONT - DispatcherStreamingMapFieldTransformFunctor( - vtkm::Id blockIndex, vtkm::Id blockSize, vtkm::Id curBlockSize, vtkm::Id fullSize) - : BlockIndex(blockIndex), BlockSize(blockSize), - CurBlockSize(curBlockSize), FullSize(fullSize) { } + DispatcherStreamingMapFieldTransformFunctor(vtkm::Id blockIndex, vtkm::Id blockSize, + vtkm::Id curBlockSize, vtkm::Id fullSize) + : BlockIndex(blockIndex) + , BlockSize(blockSize) + , CurBlockSize(curBlockSize) + , FullSize(fullSize) + { + } - template + template struct DetermineReturnType; - template + template struct DetermineReturnType { typedef vtkm::cont::ArrayHandleStreaming type; }; - template + template struct DetermineReturnType { typedef NotArrayHandleType type; }; - template - struct ReturnType { - typedef typename DetermineReturnType::type::value>::type type; + template + struct ReturnType + { + typedef typename DetermineReturnType< + ParameterType, vtkm::cont::internal::ArrayHandleCheck::type::value>::type type; }; - template + template struct TransformImpl; - template + template struct TransformImpl { VTKM_CONT - vtkm::cont::ArrayHandleStreaming - operator()(const ArrayHandleType &array, vtkm::Id blockIndex, - vtkm::Id blockSize, vtkm::Id curBlockSize, vtkm::Id fullSize) const + vtkm::cont::ArrayHandleStreaming operator()(const ArrayHandleType& array, + vtkm::Id blockIndex, + vtkm::Id blockSize, + vtkm::Id curBlockSize, + vtkm::Id fullSize) const { vtkm::cont::ArrayHandleStreaming result = - vtkm::cont::ArrayHandleStreaming( - array, blockIndex, blockSize, curBlockSize); - if (blockIndex == 0) result.AllocateFullArray(fullSize); + vtkm::cont::ArrayHandleStreaming(array, blockIndex, blockSize, + curBlockSize); + if (blockIndex == 0) + result.AllocateFullArray(fullSize); return result; } }; - template + template struct TransformImpl { VTKM_CONT - NotArrayHandleType operator()(const NotArrayHandleType ¬Array) const - { - return notArray; - } + NotArrayHandleType operator()(const NotArrayHandleType& notArray) const { return notArray; } }; - template - VTKM_CONT - typename ReturnType::type - operator()(const ParameterType &invokeData, - vtkm::internal::IndexTag) const + template + VTKM_CONT typename ReturnType::type operator()( + const ParameterType& invokeData, vtkm::internal::IndexTag) const { return TransformImpl::type::value>() - (invokeData, this->BlockIndex, this->BlockSize, this->CurBlockSize, this->FullSize); + vtkm::cont::internal::ArrayHandleCheck::type::value>()( + invokeData, this->BlockIndex, this->BlockSize, this->CurBlockSize, this->FullSize); } }; - -template +template struct DispatcherStreamingMapFieldTransferFunctor { VTKM_CONT - DispatcherStreamingMapFieldTransferFunctor() { } + DispatcherStreamingMapFieldTransferFunctor() {} - template - struct ReturnType { + template + struct ReturnType + { typedef ParameterType type; }; - template + template struct TransformImpl; - template + template struct TransformImpl { VTKM_CONT - ArrayHandleType - operator()(const ArrayHandleType &array) const + ArrayHandleType operator()(const ArrayHandleType& array) const { array.SyncControlArray(); return array; } }; - template + template struct TransformImpl { VTKM_CONT - NotArrayHandleType operator()(const NotArrayHandleType ¬Array) const - { - return notArray; - } + NotArrayHandleType operator()(const NotArrayHandleType& notArray) const { return notArray; } }; - template - VTKM_CONT - typename ReturnType::type - operator()(const ParameterType &invokeData, - vtkm::internal::IndexTag) const + template + VTKM_CONT typename ReturnType::type operator()( + const ParameterType& invokeData, vtkm::internal::IndexTag) const { return TransformImpl::type::value>()(invokeData); + vtkm::cont::internal::ArrayHandleCheck::type::value>()( + invokeData); } }; - } - /// \brief Dispatcher for worklets that inherit from \c WorkletMapField. /// -template -class DispatcherStreamingMapField : - public vtkm::worklet::internal::DispatcherBase< - DispatcherStreamingMapField, - WorkletType, - vtkm::worklet::WorkletMapField> +template +class DispatcherStreamingMapField + : public vtkm::worklet::internal::DispatcherBase, + WorkletType, vtkm::worklet::WorkletMapField> { - typedef vtkm::worklet::internal::DispatcherBase< - DispatcherStreamingMapField, - WorkletType, - vtkm::worklet::WorkletMapField> Superclass; + typedef vtkm::worklet::internal::DispatcherBase, + WorkletType, vtkm::worklet::WorkletMapField> + Superclass; public: VTKM_CONT - DispatcherStreamingMapField(const WorkletType &worklet = WorkletType()) - : Superclass(worklet), NumberOfBlocks(1) { } - - VTKM_CONT - void SetNumberOfBlocks(vtkm::Id numberOfBlocks) + DispatcherStreamingMapField(const WorkletType& worklet = WorkletType()) + : Superclass(worklet) + , NumberOfBlocks(1) { - NumberOfBlocks = numberOfBlocks; } - template VTKM_CONT - void BasicInvoke(const Invocation &invocation, - vtkm::Id numInstances, - vtkm::Id globalIndexOffset, - DeviceAdapter device) const + void SetNumberOfBlocks(vtkm::Id numberOfBlocks) { NumberOfBlocks = numberOfBlocks; } + + template + VTKM_CONT void BasicInvoke(const Invocation& invocation, vtkm::Id numInstances, + vtkm::Id globalIndexOffset, DeviceAdapter device) const { - this->InvokeTransportParameters( - invocation, - numInstances, - globalIndexOffset, - this->Worklet.GetScatter().GetOutputRange(numInstances), - device); + this->InvokeTransportParameters(invocation, numInstances, globalIndexOffset, + this->Worklet.GetScatter().GetOutputRange(numInstances), + device); } - template - VTKM_CONT - void DoInvoke(const Invocation &invocation) const + template + VTKM_CONT void DoInvoke(const Invocation& invocation) const { // This is the type for the input domain typedef typename Invocation::InputDomainType InputDomainType; // We can pull the input domain parameter (the data specifying the input // domain) from the invocation object. - const InputDomainType &inputDomain = invocation.GetInputDomain(); + const InputDomainType& inputDomain = invocation.GetInputDomain(); // For a DispatcherStreamingMapField, the inputDomain must be an ArrayHandle (or // a DynamicArrayHandle that gets cast to one). The size of the domain @@ -215,108 +203,96 @@ public: // array. vtkm::Id fullSize = inputDomain.GetNumberOfValues(); vtkm::Id blockSize = fullSize / NumberOfBlocks; - if (fullSize % NumberOfBlocks != 0) blockSize += 1; + if (fullSize % NumberOfBlocks != 0) + blockSize += 1; typedef detail::DispatcherStreamingMapFieldTransformFunctor< - typename Invocation::ControlInterface, Device> TransformFunctorType; + typename Invocation::ControlInterface, Device> + TransformFunctorType; typedef detail::DispatcherStreamingMapFieldTransferFunctor< - typename Invocation::ControlInterface, Device> TransferFunctorType; + typename Invocation::ControlInterface, Device> + TransferFunctorType; - - for (vtkm::Id block=0; block::type ReportedType; + typedef + typename ParameterInterfaceType::template StaticTransformType::type + ReportedType; ReportedType newParams = invocation.Parameters.StaticTransformCont( - TransformFunctorType(block, blockSize, numberOfInstances, fullSize)); + TransformFunctorType(block, blockSize, numberOfInstances, fullSize)); - typedef typename Invocation::template - ChangeParametersType::type ChangedType; + typedef typename Invocation::template ChangeParametersType::type ChangedType; ChangedType changedParams = invocation.ChangeParameters(newParams); this->BasicInvoke(changedParams, numberOfInstances, globalIndexOffset, Device()); // Loop over parameters again to sync results for this block into control array typedef typename ChangedType::ParameterInterface ParameterInterfaceType2; - const ParameterInterfaceType2 ¶meters2 = changedParams.Parameters; + const ParameterInterfaceType2& parameters2 = changedParams.Parameters; parameters2.StaticTransformCont(TransferFunctorType()); } } - private: - - template - VTKM_CONT - void InvokeTransportParameters(const Invocation &invocation, - const InputRangeType& inputRange, - const InputRangeType& globalIndexOffset, - const OutputRangeType& outputRange, - DeviceAdapter device) const + template + VTKM_CONT void InvokeTransportParameters(const Invocation& invocation, + const InputRangeType& inputRange, + const InputRangeType& globalIndexOffset, + const OutputRangeType& outputRange, + DeviceAdapter device) const { typedef typename Invocation::ParameterInterface ParameterInterfaceType; - const ParameterInterfaceType ¶meters = invocation.Parameters; + const ParameterInterfaceType& parameters = invocation.Parameters; typedef vtkm::worklet::internal::detail::DispatcherBaseTransportFunctor< - typename Invocation::ControlInterface, - typename Invocation::InputDomainType, - DeviceAdapter> TransportFunctorType; - typedef typename ParameterInterfaceType::template StaticTransformType< - TransportFunctorType>::type ExecObjectParameters; + typename Invocation::ControlInterface, typename Invocation::InputDomainType, DeviceAdapter> + TransportFunctorType; + typedef + typename ParameterInterfaceType::template StaticTransformType::type + ExecObjectParameters; - ExecObjectParameters execObjectParameters = - parameters.StaticTransformCont(TransportFunctorType( - invocation.GetInputDomain(), - inputRange, - outputRange)); + ExecObjectParameters execObjectParameters = parameters.StaticTransformCont( + TransportFunctorType(invocation.GetInputDomain(), inputRange, outputRange)); // Get the arrays used for scattering input to output. typename WorkletType::ScatterType::OutputToInputMapType outputToInputMap = - this->Worklet.GetScatter().GetOutputToInputMap(inputRange); + this->Worklet.GetScatter().GetOutputToInputMap(inputRange); typename WorkletType::ScatterType::VisitArrayType visitArray = - this->Worklet.GetScatter().GetVisitArray(inputRange); + this->Worklet.GetScatter().GetVisitArray(inputRange); // Replace the parameters in the invocation with the execution object and // pass to next step of Invoke. Also add the scatter information. - this->InvokeSchedule( - invocation - .ChangeParameters(execObjectParameters) - .ChangeOutputToInputMap(outputToInputMap.PrepareForInput(device)) - .ChangeVisitArray(visitArray.PrepareForInput(device)), - outputRange, - globalIndexOffset, - device); + this->InvokeSchedule(invocation.ChangeParameters(execObjectParameters) + .ChangeOutputToInputMap(outputToInputMap.PrepareForInput(device)) + .ChangeVisitArray(visitArray.PrepareForInput(device)), + outputRange, globalIndexOffset, device); } - template - VTKM_CONT - void InvokeSchedule(const Invocation &invocation, - RangeType range, - RangeType globalIndexOffset, - DeviceAdapter) const + template + VTKM_CONT void InvokeSchedule(const Invocation& invocation, RangeType range, + RangeType globalIndexOffset, DeviceAdapter) const { using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; // The WorkletInvokeFunctor class handles the magic of fetching values // for each instance and calling the worklet's function. So just create // a WorkletInvokeFunctor and schedule it with the device adapter. - using TaskType = vtkm::exec::internal::TaskSingular; + using TaskType = vtkm::exec::internal::TaskSingular; TaskType task = TaskType(this->Worklet, invocation, globalIndexOffset); Algorithm::Schedule(task, range); } - vtkm::Id NumberOfBlocks; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/ExternalFaces.h b/vtkm/worklet/ExternalFaces.h index 3fce36464..0e916eee4 100644 --- a/vtkm/worklet/ExternalFaces.h +++ b/vtkm/worklet/ExternalFaces.h @@ -56,10 +56,10 @@ struct ExternalFaces //Returns True if the argument is equal to 1; False otherwise. struct IsUnity { - template - VTKM_EXEC_CONT bool operator()(const T &x) const + template + VTKM_EXEC_CONT bool operator()(const T& x) const { - return x == T(1); + return x == T(1); } }; @@ -67,30 +67,29 @@ struct ExternalFaces //vector argument; otherwise, False struct Id3LessThan { - template - VTKM_EXEC_CONT bool operator()(const vtkm::Vec &a, - const vtkm::Vec &b) const + template + VTKM_EXEC_CONT bool operator()(const vtkm::Vec& a, const vtkm::Vec& b) const { - bool isLessThan = false; - if(a[0] < b[0]) - { - isLessThan = true; - } - else if(a[0] == b[0]) - { - if(a[1] < b[1]) + bool isLessThan = false; + if (a[0] < b[0]) { isLessThan = true; } - else if(a[1] == b[1]) + else if (a[0] == b[0]) { - if(a[2] < b[2]) + if (a[1] < b[1]) { isLessThan = true; } + else if (a[1] == b[1]) + { + if (a[2] < b[2]) + { + isLessThan = true; + } + } } - } - return isLessThan; + return isLessThan; } }; @@ -98,35 +97,24 @@ struct ExternalFaces class NumFacesPerCell : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(CellSetIn inCellSet, - FieldOut<> numFacesInCell); + typedef void ControlSignature(CellSetIn inCellSet, FieldOut<> numFacesInCell); typedef _2 ExecutionSignature(CellShape); typedef _1 InputDomain; - template - VTKM_EXEC - vtkm::IdComponent operator()(CellShapeTag shape) const + template + VTKM_EXEC vtkm::IdComponent operator()(CellShapeTag shape) const { return vtkm::exec::CellFaceNumberOfFaces(shape, *this); } }; - //Worklet that identifies a cell face by 3 cononical points class FaceHash : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(CellSetIn cellset, - FieldOut<> faceHashes, - FieldOut<> originCells, + typedef void ControlSignature(CellSetIn cellset, FieldOut<> faceHashes, FieldOut<> originCells, FieldOut<> originFaces); - typedef void ExecutionSignature(_2, - _3, - _4, - CellShape, - FromIndices, - InputIndex, - VisitIndex); + typedef void ExecutionSignature(_2, _3, _4, CellShape, FromIndices, InputIndex, VisitIndex); typedef _1 InputDomain; using ScatterType = vtkm::worklet::ScatterCounting; @@ -134,32 +122,27 @@ struct ExternalFaces VTKM_CONT ScatterType GetScatter() const { return this->Scatter; } - template - VTKM_CONT - FaceHash(const CountArrayType &countArray, Device) + template + VTKM_CONT FaceHash(const CountArrayType& countArray, Device) : Scatter(countArray, Device()) { VTKM_IS_ARRAY_HANDLE(CountArrayType); } VTKM_CONT - FaceHash(const ScatterType &scatter) + FaceHash(const ScatterType& scatter) : Scatter(scatter) - { } + { + } - template - VTKM_EXEC - void operator()(vtkm::Id3 &faceHash, - vtkm::Id &cellIndex, - vtkm::IdComponent &faceIndex, - CellShapeTag shape, - const CellNodeVecType &cellNodeIds, - vtkm::Id inputIndex, - vtkm::IdComponent visitIndex) const + template + VTKM_EXEC void operator()(vtkm::Id3& faceHash, vtkm::Id& cellIndex, + vtkm::IdComponent& faceIndex, CellShapeTag shape, + const CellNodeVecType& cellNodeIds, vtkm::Id inputIndex, + vtkm::IdComponent visitIndex) const { vtkm::VecCConst localFaceIndices = - vtkm::exec::CellFaceLocalIndices(visitIndex, shape, *this); + vtkm::exec::CellFaceLocalIndices(visitIndex, shape, *this); VTKM_ASSERT(localFaceIndices.GetNumberOfComponents() >= 3); @@ -169,7 +152,7 @@ struct ExternalFaces vtkm::Id faceP3 = cellNodeIds[localFaceIndices[2]]; //Sort the first 3 face points/nodes in ascending order - vtkm::Id sorted[3] = {faceP1, faceP2, faceP3}; + vtkm::Id sorted[3] = { faceP1, faceP2, faceP3 }; vtkm::Id temp; if (sorted[0] > sorted[2]) { @@ -191,11 +174,8 @@ struct ExternalFaces } // Check the rest of the points to see if they are in the lowest 3 - vtkm::IdComponent numPointsInFace = - localFaceIndices.GetNumberOfComponents(); - for (vtkm::IdComponent pointIndex = 3; - pointIndex < numPointsInFace; - pointIndex++) + vtkm::IdComponent numPointsInFace = localFaceIndices.GetNumberOfComponents(); + for (vtkm::IdComponent pointIndex = 3; pointIndex < numPointsInFace; pointIndex++) { vtkm::Id nextPoint = cellNodeIds[localFaceIndices[pointIndex]]; if (nextPoint < sorted[2]) @@ -242,8 +222,7 @@ struct ExternalFaces class FaceCounts : public vtkm::worklet::WorkletReduceByKey { public: - typedef void ControlSignature(KeysIn keys, - ReducedValuesOut<> numOutputCells); + typedef void ControlSignature(KeysIn keys, ReducedValuesOut<> numOutputCells); typedef _2 ExecutionSignature(ValueCount); using InputDomain = _1; @@ -265,11 +244,8 @@ struct ExternalFaces class NumPointsPerFace : public vtkm::worklet::WorkletReduceByKey { public: - typedef void ControlSignature(KeysIn keys, - WholeCellSetIn<> inputCells, - ValuesIn<> originCells, - ValuesIn<> originFaces, - ReducedValuesOut<> numPointsInFace); + typedef void ControlSignature(KeysIn keys, WholeCellSetIn<> inputCells, ValuesIn<> originCells, + ValuesIn<> originFaces, ReducedValuesOut<> numPointsInFace); typedef _5 ExecutionSignature(_2, _3, _4); using InputDomain = _1; @@ -278,31 +254,28 @@ struct ExternalFaces VTKM_CONT ScatterType GetScatter() const { return this->Scatter; } - template - VTKM_CONT - NumPointsPerFace(const CountArrayType &countArray, Device) + template + VTKM_CONT NumPointsPerFace(const CountArrayType& countArray, Device) : Scatter(countArray, Device()) { VTKM_IS_ARRAY_HANDLE(CountArrayType); } VTKM_CONT - NumPointsPerFace(const ScatterType &scatter) + NumPointsPerFace(const ScatterType& scatter) : Scatter(scatter) - { } + { + } - template - VTKM_EXEC - vtkm::IdComponent operator()(const CellSetType &cellSet, - const OriginCellsType &originCells, - const OriginFacesType &originFaces) const + template + VTKM_EXEC vtkm::IdComponent operator()(const CellSetType& cellSet, + const OriginCellsType& originCells, + const OriginFacesType& originFaces) const { VTKM_ASSERT(originCells.GetNumberOfComponents() == 1); VTKM_ASSERT(originFaces.GetNumberOfComponents() == 1); - return vtkm::exec::CellFaceNumberOfPoints( - originFaces[0], cellSet.GetCellShape(originCells[0]), *this); + return vtkm::exec::CellFaceNumberOfPoints(originFaces[0], + cellSet.GetCellShape(originCells[0]), *this); } private: @@ -313,11 +286,8 @@ struct ExternalFaces class BuildConnectivity : public vtkm::worklet::WorkletReduceByKey { public: - typedef void ControlSignature(KeysIn keys, - WholeCellSetIn<> inputCells, - ValuesIn<> originCells, - ValuesIn<> originFaces, - ReducedValuesOut<> shapesOut, + typedef void ControlSignature(KeysIn keys, WholeCellSetIn<> inputCells, ValuesIn<> originCells, + ValuesIn<> originFaces, ReducedValuesOut<> shapesOut, ReducedValuesOut<> connectivityOut); typedef void ExecutionSignature(_2, _3, _4, _5, _6); using InputDomain = _1; @@ -327,51 +297,41 @@ struct ExternalFaces VTKM_CONT ScatterType GetScatter() const { return this->Scatter; } - template - VTKM_CONT - BuildConnectivity(const CountArrayType &countArray, Device) + template + VTKM_CONT BuildConnectivity(const CountArrayType& countArray, Device) : Scatter(countArray, Device()) { VTKM_IS_ARRAY_HANDLE(CountArrayType); } VTKM_CONT - BuildConnectivity(const ScatterType &scatter) + BuildConnectivity(const ScatterType& scatter) : Scatter(scatter) - { } + { + } - template - VTKM_EXEC - void operator()(const CellSetType &cellSet, - const OriginCellsType &originCells, - const OriginFacesType &originFaces, - vtkm::UInt8 &shapeOut, - ConnectivityType &connectivityOut) const + template + VTKM_EXEC void operator()(const CellSetType& cellSet, const OriginCellsType& originCells, + const OriginFacesType& originFaces, vtkm::UInt8& shapeOut, + ConnectivityType& connectivityOut) const { VTKM_ASSERT(originCells.GetNumberOfComponents() == 1); VTKM_ASSERT(originFaces.GetNumberOfComponents() == 1); - typename CellSetType::CellShapeTag shapeIn = - cellSet.GetCellShape(originCells[0]); + typename CellSetType::CellShapeTag shapeIn = cellSet.GetCellShape(originCells[0]); shapeOut = vtkm::exec::CellFaceShape(originFaces[0], shapeIn, *this); vtkm::VecCConst localFaceIndices = - vtkm::exec::CellFaceLocalIndices(originFaces[0], shapeIn, *this); - vtkm::IdComponent numFacePoints =localFaceIndices.GetNumberOfComponents(); + vtkm::exec::CellFaceLocalIndices(originFaces[0], shapeIn, *this); + vtkm::IdComponent numFacePoints = localFaceIndices.GetNumberOfComponents(); VTKM_ASSERT(numFacePoints == connectivityOut.GetNumberOfComponents()); - typename CellSetType::IndicesType inCellIndices = - cellSet.GetIndices(originCells[0]); + typename CellSetType::IndicesType inCellIndices = cellSet.GetIndices(originCells[0]); - for (vtkm::IdComponent facePointIndex = 0; - facePointIndex < numFacePoints; - facePointIndex++) + for (vtkm::IdComponent facePointIndex = 0; facePointIndex < numFacePoints; facePointIndex++) { - connectivityOut[facePointIndex] = - inCellIndices[localFaceIndices[facePointIndex]]; + connectivityOut[facePointIndex] = inCellIndices[localFaceIndices[facePointIndex]]; } } @@ -380,30 +340,21 @@ struct ExternalFaces }; public: - /////////////////////////////////////////////////// /// \brief ExternalFaces: Extract Faces on outside of geometry - template - VTKM_CONT - void Run(const InCellSetType &inCellSet, - vtkm::cont::CellSetExplicit< - ShapeStorage, - NumIndicesStorage, - ConnectivityStorage, - OffsetsStorage> &outCellSet, - DeviceAdapter) + template + VTKM_CONT void Run(const InCellSetType& inCellSet, + vtkm::cont::CellSetExplicit& outCellSet, + DeviceAdapter) { //Create a worklet to map the number of faces to each cell vtkm::cont::ArrayHandle facesPerCell; vtkm::worklet::DispatcherMapTopology numFacesDispatcher; #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK - vtkm::cont::Timer timer; + vtkm::cont::Timer timer; #endif numFacesDispatcher.Invoke(inCellSet, facesPerCell); #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK @@ -413,8 +364,7 @@ public: #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK timer.Reset(); #endif - vtkm::worklet::ScatterCounting - scatterCellToFace(facesPerCell, DeviceAdapter()); + vtkm::worklet::ScatterCounting scatterCellToFace(facesPerCell, DeviceAdapter()); #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK std::cout << "FaceInputCount_ScatterCounting," << timer.GetElapsedTime() << "\n"; #endif @@ -431,8 +381,8 @@ public: vtkm::cont::ArrayHandle faceHashes; vtkm::cont::ArrayHandle originCells; vtkm::cont::ArrayHandle originFaces; - vtkm::worklet::DispatcherMapTopology - faceHashDispatcher((FaceHash(scatterCellToFace))); + vtkm::worklet::DispatcherMapTopology faceHashDispatcher( + (FaceHash(scatterCellToFace))); #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK timer.Reset(); @@ -445,14 +395,13 @@ public: #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK timer.Reset(); #endif - vtkm::worklet::Keys faceKeys(faceHashes,DeviceAdapter()); + vtkm::worklet::Keys faceKeys(faceHashes, DeviceAdapter()); #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK std::cout << "Keys_BuildArrays," << timer.GetElapsedTime() << "\n"; #endif vtkm::cont::ArrayHandle faceOutputCount; - vtkm::worklet::DispatcherReduceByKey - faceCountDispatcher; + vtkm::worklet::DispatcherReduceByKey faceCountDispatcher; #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK timer.Reset(); @@ -465,68 +414,54 @@ public: #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK timer.Reset(); #endif - vtkm::worklet::ScatterCounting - scatterCullInternalFaces(faceOutputCount, DeviceAdapter()); + vtkm::worklet::ScatterCounting scatterCullInternalFaces(faceOutputCount, DeviceAdapter()); #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK std::cout << "FaceOutputCount_ScatterCounting," << timer.GetElapsedTime() << "\n"; #endif - vtkm::cont::ArrayHandle facePointCount; - vtkm::worklet::DispatcherReduceByKey - pointsPerFaceDispatcher(scatterCullInternalFaces); + vtkm::cont::ArrayHandle facePointCount; + vtkm::worklet::DispatcherReduceByKey pointsPerFaceDispatcher( + scatterCullInternalFaces); #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK timer.Reset(); #endif - pointsPerFaceDispatcher.Invoke(faceKeys, - inCellSet, - originCells, - originFaces, - facePointCount); + pointsPerFaceDispatcher.Invoke(faceKeys, inCellSet, originCells, originFaces, facePointCount); #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK std::cout << "PointsPerFaceCount_Worklet," << timer.GetElapsedTime() << "\n"; #endif - vtkm::cont::ArrayHandle faceShapes; + vtkm::cont::ArrayHandle faceShapes; - vtkm::cont::ArrayHandle faceOffsets; + vtkm::cont::ArrayHandle faceOffsets; vtkm::Id connectivitySize; #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK timer.Reset(); #endif - vtkm::cont::ConvertNumComponentsToOffsets( - facePointCount, faceOffsets, connectivitySize); + vtkm::cont::ConvertNumComponentsToOffsets(facePointCount, faceOffsets, connectivitySize); #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK std::cout << "FacePointCount_ScanExclusive," << timer.GetElapsedTime() << "\n"; #endif - vtkm::cont::ArrayHandle faceConnectivity; + vtkm::cont::ArrayHandle faceConnectivity; // Must pre allocate because worklet invocation will not have enough // information to. faceConnectivity.Allocate(connectivitySize); - vtkm::worklet::DispatcherReduceByKey - buildConnectivityDispatcher(scatterCullInternalFaces); + vtkm::worklet::DispatcherReduceByKey + buildConnectivityDispatcher(scatterCullInternalFaces); #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK timer.Reset(); #endif buildConnectivityDispatcher.Invoke( - faceKeys, - inCellSet, - originCells, - originFaces, - faceShapes, - vtkm::cont::make_ArrayHandleGroupVecVariable(faceConnectivity, - faceOffsets)); + faceKeys, inCellSet, originCells, originFaces, faceShapes, + vtkm::cont::make_ArrayHandleGroupVecVariable(faceConnectivity, faceOffsets)); #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK std::cout << "BuildConnectivity_Worklet," << timer.GetElapsedTime() << "\n"; #endif - outCellSet.Fill(inCellSet.GetNumberOfPoints(), - faceShapes, - facePointCount, - faceConnectivity, + outCellSet.Fill(inCellSet.GetNumberOfPoints(), faceShapes, facePointCount, faceConnectivity, faceOffsets); #ifdef __VTKM_EXTERNAL_FACES_BENCHMARK @@ -535,8 +470,7 @@ public: } }; //struct ExternalFaces - - -}} //namespace vtkm::worklet +} +} //namespace vtkm::worklet #endif //vtk_m_worklet_ExternalFaces_h diff --git a/vtkm/worklet/ExtractGeometry.h b/vtkm/worklet/ExtractGeometry.h index 5acaecb1c..156c807dc 100644 --- a/vtkm/worklet/ExtractGeometry.h +++ b/vtkm/worklet/ExtractGeometry.h @@ -29,42 +29,46 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ class ExtractGeometry { public: - struct BoolType : vtkm::ListTagBase {}; + struct BoolType : vtkm::ListTagBase + { + }; //////////////////////////////////////////////////////////////////////////////////// // Worklet to identify cells within volume of interest class ExtractCellsByVOI : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(CellSetIn cellset, - WholeArrayIn coordinates, + typedef void ControlSignature(CellSetIn cellset, WholeArrayIn coordinates, FieldOutCell passFlags); - typedef _3 ExecutionSignature(PointCount, PointIndices, _2); + typedef _3 ExecutionSignature(PointCount, PointIndices, _2); VTKM_CONT - ExtractCellsByVOI() : Function() {} + ExtractCellsByVOI() + : Function() + { + } VTKM_CONT - ExtractCellsByVOI(const vtkm::exec::ImplicitFunction &function, - bool extractInside, - bool extractBoundaryCells, - bool extractOnlyBoundaryCells) : - Function(function), - ExtractInside(extractInside), - ExtractBoundaryCells(extractBoundaryCells), - ExtractOnlyBoundaryCells(extractOnlyBoundaryCells) {} + ExtractCellsByVOI(const vtkm::exec::ImplicitFunction& function, bool extractInside, + bool extractBoundaryCells, bool extractOnlyBoundaryCells) + : Function(function) + , ExtractInside(extractInside) + , ExtractBoundaryCells(extractBoundaryCells) + , ExtractOnlyBoundaryCells(extractOnlyBoundaryCells) + { + } template - VTKM_EXEC - bool operator()( vtkm::Id numIndices, - const ConnectivityInVec &connectivityIn, - const InVecFieldPortalType &coordinates) const + VTKM_EXEC bool operator()(vtkm::Id numIndices, const ConnectivityInVec& connectivityIn, + const InVecFieldPortalType& coordinates) const { // Count points inside/outside volume of interest vtkm::IdComponent inCnt = 0; @@ -72,7 +76,7 @@ public: for (vtkm::IdComponent indx = 0; indx < numIndices; indx++) { vtkm::Id ptId = connectivityIn[indx]; - vtkm::Vec coordinate = coordinates.Get(ptId); + vtkm::Vec coordinate = coordinates.Get(ptId); vtkm::FloatDefault value = this->Function.Value(coordinate); if (value <= 0) inCnt++; @@ -82,20 +86,15 @@ public: // Decide if cell is extracted bool passFlag = false; - if (inCnt == numIndices && - ExtractInside && - !ExtractOnlyBoundaryCells) - { - passFlag = true; - } - else if (outCnt == numIndices && - !ExtractInside && - !ExtractOnlyBoundaryCells) + if (inCnt == numIndices && ExtractInside && !ExtractOnlyBoundaryCells) { passFlag = true; } - else if (inCnt > 0 && outCnt > 0 && - (ExtractBoundaryCells || ExtractOnlyBoundaryCells)) + else if (outCnt == numIndices && !ExtractInside && !ExtractOnlyBoundaryCells) + { + passFlag = true; + } + else if (inCnt > 0 && outCnt > 0 && (ExtractBoundaryCells || ExtractOnlyBoundaryCells)) { passFlag = true; } @@ -111,12 +110,10 @@ public: //////////////////////////////////////////////////////////////////////////////////// // Extract cells by ids permutes input data - template - vtkm::cont::CellSetPermutation Run( - const CellSetType &cellSet, - const vtkm::cont::ArrayHandle &cellIds, - DeviceAdapter) + template + vtkm::cont::CellSetPermutation Run(const CellSetType& cellSet, + const vtkm::cont::ArrayHandle& cellIds, + DeviceAdapter) { typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; typedef vtkm::cont::CellSetPermutation OutputType; @@ -128,35 +125,26 @@ public: //////////////////////////////////////////////////////////////////////////////////// // Extract cells by implicit function permutes input data - template + template vtkm::cont::CellSetPermutation Run( - const CellSetType &cellSet, - const vtkm::cont::CoordinateSystem &coordinates, - const vtkm::cont::ImplicitFunction &implicitFunction, - bool extractInside, - bool extractBoundaryCells, - bool extractOnlyBoundaryCells, - DeviceAdapter device) + const CellSetType& cellSet, const vtkm::cont::CoordinateSystem& coordinates, + const vtkm::cont::ImplicitFunction& implicitFunction, bool extractInside, + bool extractBoundaryCells, bool extractOnlyBoundaryCells, DeviceAdapter device) { typedef vtkm::cont::CellSetPermutation OutputType; // Worklet output will be a boolean passFlag array vtkm::cont::ArrayHandle passFlags; - ExtractCellsByVOI worklet(implicitFunction.PrepareForExecution(device), - extractInside, - extractBoundaryCells, - extractOnlyBoundaryCells); + ExtractCellsByVOI worklet(implicitFunction.PrepareForExecution(device), extractInside, + extractBoundaryCells, extractOnlyBoundaryCells); DispatcherMapTopology dispatcher(worklet); - dispatcher.Invoke(cellSet, - coordinates, - passFlags); + dispatcher.Invoke(cellSet, coordinates, passFlags); vtkm::cont::ArrayHandleCounting indices = vtkm::cont::make_ArrayHandleCounting(vtkm::Id(0), vtkm::Id(1), passFlags.GetNumberOfValues()); - vtkm::cont::DeviceAdapterAlgorithm - ::CopyIf(indices, passFlags, this->ValidCellIds); + vtkm::cont::DeviceAdapterAlgorithm::CopyIf(indices, passFlags, + this->ValidCellIds); return OutputType(this->ValidCellIds, cellSet, cellSet.GetName()); } @@ -167,12 +155,14 @@ public: { public: PermuteCellData(const vtkm::cont::ArrayHandle validCellIds, - vtkm::cont::DynamicArrayHandle &data) - : ValidCellIds(validCellIds), Data(&data) - { } + vtkm::cont::DynamicArrayHandle& data) + : ValidCellIds(validCellIds) + , Data(&data) + { + } template - void operator()(const ArrayHandleType &input) const + void operator()(const ArrayHandleType& input) const { *(this->Data) = vtkm::cont::DynamicArrayHandle( vtkm::cont::make_ArrayHandlePermutation(this->ValidCellIds, input)); @@ -180,7 +170,7 @@ public: private: vtkm::cont::ArrayHandle ValidCellIds; - vtkm::cont::DynamicArrayHandle *Data; + vtkm::cont::DynamicArrayHandle* Data; }; vtkm::cont::Field ProcessCellField(const vtkm::cont::Field field) const @@ -193,14 +183,13 @@ public: vtkm::cont::DynamicArrayHandle data; CastAndCall(field, PermuteCellData(this->ValidCellIds, data)); - return vtkm::cont::Field(field.GetName(), field.GetAssociation(), - field.GetAssocCellSet(), data); + return vtkm::cont::Field(field.GetName(), field.GetAssociation(), field.GetAssocCellSet(), + data); } private: vtkm::cont::ArrayHandle ValidCellIds; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/ExtractPoints.h b/vtkm/worklet/ExtractPoints.h index 524315934..0649afc69 100644 --- a/vtkm/worklet/ExtractPoints.h +++ b/vtkm/worklet/ExtractPoints.h @@ -28,33 +28,37 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ class ExtractPoints { public: - struct BoolType : vtkm::ListTagBase {}; + struct BoolType : vtkm::ListTagBase + { + }; //////////////////////////////////////////////////////////////////////////////////// // Worklet to identify points within volume of interest class ExtractPointsByVOI : public vtkm::worklet::WorkletMapCellToPoint { public: - typedef void ControlSignature(CellSetIn cellset, - FieldInPoint coordinates, + typedef void ControlSignature(CellSetIn cellset, FieldInPoint coordinates, FieldOutPoint passFlags); - typedef _3 ExecutionSignature(_2); + typedef _3 ExecutionSignature(_2); VTKM_CONT - ExtractPointsByVOI(const vtkm::exec::ImplicitFunction &function, - bool extractInside) : - Function(function), - passValue(extractInside), - failValue(!extractInside) {} + ExtractPointsByVOI(const vtkm::exec::ImplicitFunction& function, bool extractInside) + : Function(function) + , passValue(extractInside) + , failValue(!extractInside) + { + } VTKM_EXEC - bool operator()(const vtkm::Vec &coordinate) const + bool operator()(const vtkm::Vec& coordinate) const { bool pass = passValue; vtkm::Float64 value = this->Function.Value(coordinate); @@ -71,21 +75,17 @@ public: //////////////////////////////////////////////////////////////////////////////////// // Extract points by id creates new cellset of vertex cells - template - vtkm::cont::CellSetSingleType<> Run( - const CellSetType &cellSet, - const vtkm::cont::ArrayHandle &pointIds, - DeviceAdapter) + template + vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, + const vtkm::cont::ArrayHandle& pointIds, + DeviceAdapter) { typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; DeviceAlgorithm::Copy(pointIds, this->ValidPointIds); // Make CellSetSingleType with VERTEX at each point id - vtkm::cont::CellSetSingleType< > outCellSet(cellSet.GetName()); - outCellSet.Fill(cellSet.GetNumberOfPoints(), - vtkm::CellShapeTagVertex::Id, - 1, + vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName()); + outCellSet.Fill(cellSet.GetNumberOfPoints(), vtkm::CellShapeTagVertex::Id, 1, this->ValidPointIds); return outCellSet; @@ -93,23 +93,17 @@ public: //////////////////////////////////////////////////////////////////////////////////// // Extract points by implicit function - template - vtkm::cont::CellSetSingleType<> Run( - const CellSetType &cellSet, - const CoordinateType &coordinates, - const vtkm::cont::ImplicitFunction &implicitFunction, - bool extractInside, - DeviceAdapter device) + template + vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, const CoordinateType& coordinates, + const vtkm::cont::ImplicitFunction& implicitFunction, + bool extractInside, DeviceAdapter device) { typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; // Worklet output will be a boolean passFlag array vtkm::cont::ArrayHandle passFlags; - ExtractPointsByVOI worklet(implicitFunction.PrepareForExecution(device), - extractInside); + ExtractPointsByVOI worklet(implicitFunction.PrepareForExecution(device), extractInside); DispatcherMapTopology dispatcher(worklet); dispatcher.Invoke(cellSet, coordinates, passFlags); @@ -118,10 +112,8 @@ public: DeviceAlgorithm::CopyIf(indices, passFlags, this->ValidPointIds); // Make CellSetSingleType with VERTEX at each point id - vtkm::cont::CellSetSingleType< > outCellSet(cellSet.GetName()); - outCellSet.Fill(cellSet.GetNumberOfPoints(), - vtkm::CellShapeTagVertex::Id, - 1, + vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName()); + outCellSet.Fill(cellSet.GetNumberOfPoints(), vtkm::CellShapeTagVertex::Id, 1, this->ValidPointIds); return outCellSet; @@ -130,7 +122,6 @@ public: private: vtkm::cont::ArrayHandle ValidPointIds; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/ExtractStructured.h b/vtkm/worklet/ExtractStructured.h index 520b59c75..2e0404ffc 100644 --- a/vtkm/worklet/ExtractStructured.h +++ b/vtkm/worklet/ExtractStructured.h @@ -35,16 +35,17 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ // // Distribute input point/cell data to subset/subsample output data // struct DistributeData : public vtkm::worklet::WorkletMapField { - typedef void ControlSignature(FieldIn<> inIndices, - FieldOut<> outIndices); + typedef void ControlSignature(FieldIn<> inIndices, FieldOut<> outIndices); typedef void ExecutionSignature(_1, _2); typedef vtkm::worklet::ScatterCounting ScatterType; @@ -53,18 +54,17 @@ struct DistributeData : public vtkm::worklet::WorkletMapField ScatterType GetScatter() const { return this->Scatter; } template - VTKM_CONT - DistributeData(const CountArrayType &countArray, - DeviceAdapter device) : - Scatter(countArray, device) { } + VTKM_CONT DistributeData(const CountArrayType& countArray, DeviceAdapter device) + : Scatter(countArray, device) + { + } template - VTKM_EXEC - void operator()(T inputIndex, - T &outputIndex) const + VTKM_EXEC void operator()(T inputIndex, T& outputIndex) const { outputIndex = inputIndex; } + private: ScatterType Scatter; }; @@ -83,9 +83,8 @@ public: class CreatePointMap : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn index, - FieldOut passValue); - typedef _2 ExecutionSignature(_1); + typedef void ControlSignature(FieldIn index, FieldOut passValue); + typedef _2 ExecutionSignature(_1); vtkm::Id RowSize; vtkm::Id PlaneSize; @@ -94,15 +93,15 @@ public: bool IncludeBoundary; VTKM_CONT - CreatePointMap(const vtkm::Id3 &inDimension, - const vtkm::Bounds &outBounds, - const vtkm::Id3 &sample, - bool includeBoundary) : - RowSize(inDimension[0]), - PlaneSize(inDimension[0] * inDimension[1]), - OutBounds(outBounds), - Sample(sample), - IncludeBoundary(includeBoundary) {} + CreatePointMap(const vtkm::Id3& inDimension, const vtkm::Bounds& outBounds, + const vtkm::Id3& sample, bool includeBoundary) + : RowSize(inDimension[0]) + , PlaneSize(inDimension[0] * inDimension[1]) + , OutBounds(outBounds) + , Sample(sample) + , IncludeBoundary(includeBoundary) + { + } VTKM_EXEC vtkm::IdComponent operator()(vtkm::Id index) const @@ -111,7 +110,7 @@ public: // Position of this point in the grid vtkm::Id k = index / PlaneSize; - vtkm::Id j = (index % PlaneSize) / RowSize; + vtkm::Id j = (index % PlaneSize) / RowSize; vtkm::Id i = index % RowSize; // Turn on points if within the subset bounding box @@ -123,20 +122,22 @@ public: // Turn off points not within subsampling vtkm::Id3 minPt = vtkm::make_Vec(OutBounds.X.Min, OutBounds.Y.Min, OutBounds.Z.Min); - vtkm::Id3 value = vtkm::make_Vec((i - minPt[0]) % Sample[0], - (j - minPt[1]) % Sample[1], + vtkm::Id3 value = vtkm::make_Vec((i - minPt[0]) % Sample[0], (j - minPt[1]) % Sample[1], (k - minPt[2]) % Sample[2]); // If include boundary then max boundary is also within subsampling if (IncludeBoundary) { - if (i == OutBounds.X.Max) value[0] = 0; - if (j == OutBounds.Y.Max) value[1] = 0; - if (k == OutBounds.Z.Max) value[2] = 0; + if (i == OutBounds.X.Max) + value[0] = 0; + if (j == OutBounds.Y.Max) + value[1] = 0; + if (k == OutBounds.Z.Max) + value[2] = 0; } // If the value for the point is not 0 in all dimensions it is not in sample - if (value != vtkm::Id3(0,0,0)) + if (value != vtkm::Id3(0, 0, 0)) { passValue = 0; } @@ -150,10 +151,9 @@ public: class CreateCellMap : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(CellSetIn cellset, - WholeArrayIn pointMap, + typedef void ControlSignature(CellSetIn cellset, WholeArrayIn pointMap, FieldOutCell passValue); - typedef _3 ExecutionSignature(PointCount, PointIndices, _2); + typedef _3 ExecutionSignature(PointCount, PointIndices, _2); vtkm::Id3 InDimension; vtkm::Id3 OutDimension; @@ -161,18 +161,18 @@ public: vtkm::Id PlaneSize; VTKM_CONT - CreateCellMap(const vtkm::Id3 &inDimension, - const vtkm::Id3 &outDimension) : - InDimension(inDimension), - OutDimension(outDimension), - RowSize(inDimension[0]), - PlaneSize(inDimension[0] * inDimension[1]) {} + CreateCellMap(const vtkm::Id3& inDimension, const vtkm::Id3& outDimension) + : InDimension(inDimension) + , OutDimension(outDimension) + , RowSize(inDimension[0]) + , PlaneSize(inDimension[0] * inDimension[1]) + { + } template - VTKM_EXEC - vtkm::IdComponent operator()( vtkm::Id numIndices, - const ConnectivityInVec &connectivityIn, - const InPointMap &pointMap) const + VTKM_EXEC vtkm::IdComponent operator()(vtkm::Id numIndices, + const ConnectivityInVec& connectivityIn, + const InPointMap& pointMap) const { // If all surrounding points are in the subset, cell will be also vtkm::IdComponent passValue = 1; @@ -193,7 +193,7 @@ public: { vtkm::Id3 position((ptId % RowSize), ((ptId % PlaneSize) / RowSize), (ptId / PlaneSize)); vtkm::Id newPtId; - vtkm::Id3 foundValidPoint(0,0,0); + vtkm::Id3 foundValidPoint(0, 0, 0); vtkm::Id3 offset(1, RowSize, PlaneSize); for (vtkm::IdComponent dim = 0; dim < 3; dim++) @@ -220,9 +220,9 @@ public: } } } - + // If there is a valid point in all dimensions cell is in sample - if (foundValidPoint == vtkm::Id3(1,1,1)) + if (foundValidPoint == vtkm::Id3(1, 1, 1)) { passValue = 1; } @@ -235,19 +235,15 @@ public: // // Uniform Structured // - template - vtkm::cont::DataSet ExtractUniform( - vtkm::IdComponent outDim, - const CellSetType &cellSet, - const vtkm::cont::CoordinateSystem &coordinates, - const vtkm::Bounds &outBounds, - const vtkm::Id3 &sample, - bool includeBoundary, - DeviceAdapter) + template + vtkm::cont::DataSet ExtractUniform(vtkm::IdComponent outDim, const CellSetType& cellSet, + const vtkm::cont::CoordinateSystem& coordinates, + const vtkm::Bounds& outBounds, const vtkm::Id3& sample, + bool includeBoundary, DeviceAdapter) { typedef vtkm::cont::ArrayHandleUniformPointCoordinates UniformArrayHandle; - typedef typename UniformArrayHandle::ExecutionTypes::PortalConst UniformConstPortal; + typedef + typename UniformArrayHandle::ExecutionTypes::PortalConst UniformConstPortal; // Cast dynamic coordinate data to Uniform type vtkm::cont::DynamicArrayHandleCoordinateSystem coordinateData = coordinates.GetData(); @@ -265,10 +261,10 @@ public: // maxBound is the same if no sampling, or if sample point lands on boundary, // or if include boundary is set // Otherwise maxBound will be the last stride point - vtkm::Id3 lastIndex = vtkm::make_Vec(outBounds.X.Max - outBounds.X.Min, - outBounds.Y.Max - outBounds.Y.Min, - outBounds.Z.Max - outBounds.Z.Min); - vtkm::Id3 outDimension = lastIndex + vtkm::Id3(1,1,1); + vtkm::Id3 lastIndex = + vtkm::make_Vec(outBounds.X.Max - outBounds.X.Min, outBounds.Y.Max - outBounds.Y.Min, + outBounds.Z.Max - outBounds.Z.Min); + vtkm::Id3 outDimension = lastIndex + vtkm::Id3(1, 1, 1); // Adjust for sampling and include boundary for (vtkm::IdComponent dim = 0; dim < outDim; dim++) @@ -283,8 +279,8 @@ public: } } - vtkm::Vec outOrigin = vtkm::make_Vec(0,0,0); - vtkm::Vec outSpacing = vtkm::make_Vec(1,1,1); + vtkm::Vec outOrigin = vtkm::make_Vec(0, 0, 0); + vtkm::Vec outSpacing = vtkm::make_Vec(1, 1, 1); // Create output dataset which needs modified coordinate system and cellset vtkm::cont::DataSet output; @@ -298,31 +294,27 @@ public: if (outDim == 3) { vtkm::cont::CellSetStructured<3> outCellSet(cellSet.GetName()); - outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[0], - outDimension[1], - outDimension[2])); + outCellSet.SetPointDimensions( + vtkm::make_Vec(outDimension[0], outDimension[1], outDimension[2])); output.AddCellSet(outCellSet); } else if (outDim == 2) { vtkm::cont::CellSetStructured<2> outCellSet(cellSet.GetName()); - if (outDimension[2] == 1) // XY plane + if (outDimension[2] == 1) // XY plane { - outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[0], - outDimension[1])); + outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[0], outDimension[1])); output.AddCellSet(outCellSet); } else if (outDimension[1] == 1) // XZ plane { - outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[0], - outDimension[2])); + outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[0], outDimension[2])); output.AddCellSet(outCellSet); } else if (outDimension[0] == 1) // YZ plane { - outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[1], - outDimension[2])); + outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[1], outDimension[2])); output.AddCellSet(outCellSet); } } @@ -349,21 +341,14 @@ public: // Create the map for the input point data to output vtkm::cont::ArrayHandleIndex pointIndices(cellSet.GetNumberOfPoints()); - CreatePointMap pointMap(inDimension, - outBounds, - sample, - includeBoundary); + CreatePointMap pointMap(inDimension, outBounds, sample, includeBoundary); vtkm::worklet::DispatcherMapField pointDispatcher(pointMap); - pointDispatcher.Invoke(pointIndices, - this->PointMap); + pointDispatcher.Invoke(pointIndices, this->PointMap); // Create the map for the input cell data to output - CreateCellMap cellMap(inDimension, - outDimension); + CreateCellMap cellMap(inDimension, outDimension); vtkm::worklet::DispatcherMapTopology cellDispatcher(cellMap); - cellDispatcher.Invoke(cellSet, - this->PointMap, - this->CellMap); + cellDispatcher.Invoke(cellSet, this->PointMap, this->CellMap); return output; } @@ -371,21 +356,18 @@ public: // // Rectilinear Structured // - template - vtkm::cont::DataSet ExtractRectilinear( - vtkm::IdComponent outDim, - const CellSetType &cellSet, - const vtkm::cont::CoordinateSystem &coordinates, - const vtkm::Bounds &outBounds, - const vtkm::Id3 &sample, - bool includeBoundary, - DeviceAdapter) + template + vtkm::cont::DataSet ExtractRectilinear(vtkm::IdComponent outDim, const CellSetType& cellSet, + const vtkm::cont::CoordinateSystem& coordinates, + const vtkm::Bounds& outBounds, const vtkm::Id3& sample, + bool includeBoundary, DeviceAdapter) { typedef vtkm::cont::ArrayHandle DefaultHandle; - typedef vtkm::cont::ArrayHandleCartesianProduct CartesianArrayHandle; + typedef vtkm::cont::ArrayHandleCartesianProduct + CartesianArrayHandle; typedef typename DefaultHandle::ExecutionTypes::PortalConst DefaultConstHandle; - typedef typename CartesianArrayHandle::ExecutionTypes::PortalConst CartesianConstPortal; + typedef typename CartesianArrayHandle::ExecutionTypes::PortalConst + CartesianConstPortal; // Cast dynamic coordinate data to Rectilinear type vtkm::cont::DynamicArrayHandleCoordinateSystem coordinateData = coordinates.GetData(); @@ -397,15 +379,13 @@ public: DefaultConstHandle Y = Coordinates.GetSecondPortal(); DefaultConstHandle Z = Coordinates.GetThirdPortal(); - vtkm::Id3 inDimension(X.GetNumberOfValues(), - Y.GetNumberOfValues(), - Z.GetNumberOfValues()); + vtkm::Id3 inDimension(X.GetNumberOfValues(), Y.GetNumberOfValues(), Z.GetNumberOfValues()); // Calculate output subset dimension - vtkm::Id3 lastIndex = vtkm::make_Vec(outBounds.X.Max - outBounds.X.Min, - outBounds.Y.Max - outBounds.Y.Min, - outBounds.Z.Max - outBounds.Z.Min); - vtkm::Id3 outDimension = lastIndex + vtkm::Id3(1,1,1); + vtkm::Id3 lastIndex = + vtkm::make_Vec(outBounds.X.Max - outBounds.X.Min, outBounds.Y.Max - outBounds.Y.Min, + outBounds.Z.Max - outBounds.Z.Min); + vtkm::Id3 outDimension = lastIndex + vtkm::Id3(1, 1, 1); // Adjust for sampling and include boundary for (vtkm::IdComponent dim = 0; dim < outDim; dim++) @@ -465,31 +445,27 @@ public: if (outDim == 3) { vtkm::cont::CellSetStructured<3> outCellSet(cellSet.GetName()); - outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[0], - outDimension[1], - outDimension[2])); + outCellSet.SetPointDimensions( + vtkm::make_Vec(outDimension[0], outDimension[1], outDimension[2])); output.AddCellSet(outCellSet); } else if (outDim == 2) { vtkm::cont::CellSetStructured<2> outCellSet(cellSet.GetName()); - if (outDimension[2] == 1) // XY plane + if (outDimension[2] == 1) // XY plane { - outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[0], - outDimension[1])); + outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[0], outDimension[1])); output.AddCellSet(outCellSet); } else if (outDimension[1] == 1) // XZ plane { - outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[0], - outDimension[2])); + outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[0], outDimension[2])); output.AddCellSet(outCellSet); } else if (outDimension[0] == 1) // YZ plane { - outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[1], - outDimension[2])); + outCellSet.SetPointDimensions(vtkm::make_Vec(outDimension[1], outDimension[2])); output.AddCellSet(outCellSet); } } @@ -516,21 +492,14 @@ public: // Create the map for the input point data to output vtkm::cont::ArrayHandleIndex pointIndices(cellSet.GetNumberOfPoints()); - CreatePointMap pointMap(inDimension, - outBounds, - sample, - includeBoundary); + CreatePointMap pointMap(inDimension, outBounds, sample, includeBoundary); vtkm::worklet::DispatcherMapField pointDispatcher(pointMap); - pointDispatcher.Invoke(pointIndices, - this->PointMap); + pointDispatcher.Invoke(pointIndices, this->PointMap); // Create the map for the input cell data to output - CreateCellMap cellMap(inDimension, - outDimension); + CreateCellMap cellMap(inDimension, outDimension); vtkm::worklet::DispatcherMapTopology cellDispatcher(cellMap); - cellDispatcher.Invoke(cellSet, - this->PointMap, - this->CellMap); + cellDispatcher.Invoke(cellSet, this->PointMap, this->CellMap); return output; } @@ -539,12 +508,10 @@ public: // Run extract structured on uniform or rectilinear, subset and/or subsample // template - vtkm::cont::DataSet Run(const vtkm::cont::DynamicCellSet &cellSet, - const vtkm::cont::CoordinateSystem &coordinates, - const vtkm::Bounds &boundingBox, - const vtkm::Id3 &sample, - bool includeBoundary, - DeviceAdapter) + vtkm::cont::DataSet Run(const vtkm::cont::DynamicCellSet& cellSet, + const vtkm::cont::CoordinateSystem& coordinates, + const vtkm::Bounds& boundingBox, const vtkm::Id3& sample, + bool includeBoundary, DeviceAdapter) { // Check legality of input cellset and set input dimension vtkm::IdComponent inDim = 0; @@ -624,22 +591,12 @@ public: } if (IsUniformDataSet) { - return ExtractUniform(outDim, - cellSet, - coordinates, - outBounds, - sample, - includeBoundary, + return ExtractUniform(outDim, cellSet, coordinates, outBounds, sample, includeBoundary, DeviceAdapter()); } else { - return ExtractRectilinear(outDim, - cellSet, - coordinates, - outBounds, - sample, - includeBoundary, + return ExtractRectilinear(outDim, cellSet, coordinates, outBounds, sample, includeBoundary, DeviceAdapter()); } } @@ -647,12 +604,9 @@ public: // // Subset and/or subsampling of Point Data // - template + template vtkm::cont::ArrayHandle ProcessPointField( - const vtkm::cont::ArrayHandle &input, - DeviceAdapter device) + const vtkm::cont::ArrayHandle& input, DeviceAdapter device) { vtkm::cont::ArrayHandle output; @@ -665,12 +619,9 @@ public: // // Subset and/or subsampling of Cell Data // - template + template vtkm::cont::ArrayHandle ProcessCellField( - const vtkm::cont::ArrayHandle &input, - DeviceAdapter device) + const vtkm::cont::ArrayHandle& input, DeviceAdapter device) { vtkm::cont::ArrayHandle output; @@ -684,7 +635,6 @@ private: vtkm::cont::ArrayHandle PointMap; vtkm::cont::ArrayHandle CellMap; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/FieldHistogram.h b/vtkm/worklet/FieldHistogram.h index 77d0430df..8c3d6fe10 100644 --- a/vtkm/worklet/FieldHistogram.h +++ b/vtkm/worklet/FieldHistogram.h @@ -41,33 +41,34 @@ namespace #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif // gcc - template - T compute_delta(T fieldMinValue, T fieldMaxValue, vtkm::Id num) - { typedef vtkm::VecTraits VecType; - const T fieldRange = fieldMaxValue - fieldMinValue; - return fieldRange / static_cast(num); - } +template +T compute_delta(T fieldMinValue, T fieldMaxValue, vtkm::Id num) +{ + typedef vtkm::VecTraits VecType; + const T fieldRange = fieldMaxValue - fieldMinValue; + return fieldRange / static_cast(num); +} #if defined(VTKM_GCC) #pragma GCC diagnostic pop #endif // gcc } -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ //simple functor that prints basic statistics class FieldHistogram { public: - // For each value set the bin it should be in - template + template class SetHistogramBin : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn<> value, - FieldOut<> binIndex); - typedef void ExecutionSignature(_1,_2); + typedef void ControlSignature(FieldIn<> value, FieldOut<> binIndex); + typedef void ExecutionSignature(_1, _2); typedef _1 InputDomain; vtkm::Id numberOfBins; @@ -75,16 +76,15 @@ public: FieldType delta; VTKM_CONT - SetHistogramBin( - vtkm::Id numberOfBins0, - FieldType minValue0, - FieldType delta0) : - numberOfBins(numberOfBins0), - minValue(minValue0), - delta(delta0) {} + SetHistogramBin(vtkm::Id numberOfBins0, FieldType minValue0, FieldType delta0) + : numberOfBins(numberOfBins0) + , minValue(minValue0) + , delta(delta0) + { + } VTKM_EXEC - void operator()(const FieldType &value, vtkm::Id &binIndex) const + void operator()(const FieldType& value, vtkm::Id& binIndex) const { binIndex = static_cast((value - minValue) / delta); if (binIndex < 0) @@ -98,17 +98,14 @@ public: class AdjacentDifference : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn inputIndex, - WholeArrayIn counts, + typedef void ControlSignature(FieldIn inputIndex, WholeArrayIn counts, FieldOut outputCount); - typedef void ExecutionSignature(_1,_2,_3); + typedef void ExecutionSignature(_1, _2, _3); typedef _1 InputDomain; - template - VTKM_EXEC - void operator()(const vtkm::Id &index, - const WholeArrayType& counts, - vtkm::Id & difference) const + template + VTKM_EXEC void operator()(const vtkm::Id& index, const WholeArrayType& counts, + vtkm::Id& difference) const { if (index == 0) difference = counts.Get(index); @@ -122,13 +119,10 @@ public: // min value of the bins // delta/range of each bin // number of values in each bin - template - void Run(vtkm::cont::ArrayHandle fieldArray, - vtkm::Id numberOfBins, - vtkm::Range& rangeOfValues, - FieldType& binDelta, - vtkm::cont::ArrayHandle& binArray, - DeviceAdapter vtkmNotUsed(device)) + template + void Run(vtkm::cont::ArrayHandle fieldArray, vtkm::Id numberOfBins, + vtkm::Range& rangeOfValues, FieldType& binDelta, + vtkm::cont::ArrayHandle& binArray, DeviceAdapter vtkmNotUsed(device)) { typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; @@ -137,11 +131,10 @@ public: const vtkm::Id numberOfValues = fieldArray.GetNumberOfValues(); - const vtkm::Vec initValue( - fieldArray.GetPortalConstControl().Get(0)); + const vtkm::Vec initValue(fieldArray.GetPortalConstControl().Get(0)); - vtkm::Vec result = - DeviceAlgorithms::Reduce(fieldArray, initValue, vtkm::MinAndMax()); + vtkm::Vec result = + DeviceAlgorithms::Reduce(fieldArray, initValue, vtkm::MinAndMax()); const FieldType& fieldMinValue = result[0]; const FieldType& fieldMaxValue = result[1]; @@ -153,7 +146,8 @@ public: // Worklet to set the bin number for each data value SetHistogramBin binWorklet(numberOfBins, fieldMinValue, fieldDelta); - vtkm::worklet::DispatcherMapField< SetHistogramBin > setHistogramBinDispatcher(binWorklet); + vtkm::worklet::DispatcherMapField> setHistogramBinDispatcher( + binWorklet); setHistogramBinDispatcher.Invoke(fieldArray, binIndex); // Sort the resulting bin array for counting @@ -169,11 +163,10 @@ public: dispatcher.Invoke(binCounter, totalCount, binArray); //update the users data - rangeOfValues = vtkm::Range( fieldMinValue, fieldMaxValue ); + rangeOfValues = vtkm::Range(fieldMinValue, fieldMaxValue); binDelta = fieldDelta; } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/FieldStatistics.h b/vtkm/worklet/FieldStatistics.h index 52a4f14bc..1d644179a 100644 --- a/vtkm/worklet/FieldStatistics.h +++ b/vtkm/worklet/FieldStatistics.h @@ -31,15 +31,16 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ //simple functor that prints basic statistics -template +template class FieldStatistics { public: - // For moments readability static const vtkm::Id FIRST = 0; static const vtkm::Id SECOND = 1; @@ -64,25 +65,22 @@ public: class CalculatePowers : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn<> value, - FieldOut<> pow1Array, - FieldOut<> pow2Array, - FieldOut<> pow3Array, - FieldOut<> pow4Array); - typedef void ExecutionSignature(_1,_2,_3,_4,_5); + typedef void ControlSignature(FieldIn<> value, FieldOut<> pow1Array, FieldOut<> pow2Array, + FieldOut<> pow3Array, FieldOut<> pow4Array); + typedef void ExecutionSignature(_1, _2, _3, _4, _5); typedef _1 InputDomain; vtkm::Id numPowers; VTKM_CONT - CalculatePowers(vtkm::Id num) : numPowers(num) {} + CalculatePowers(vtkm::Id num) + : numPowers(num) + { + } VTKM_EXEC - void operator()(const FieldType& value, - FieldType &pow1, - FieldType &pow2, - FieldType &pow3, - FieldType &pow4) const + void operator()(const FieldType& value, FieldType& pow1, FieldType& pow2, FieldType& pow3, + FieldType& pow4) const { pow1 = value; pow2 = pow1 * value; @@ -94,29 +92,27 @@ public: class SubtractConst : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn<> value, - FieldOut<> diff); + typedef void ControlSignature(FieldIn<> value, FieldOut<> diff); typedef _2 ExecutionSignature(_1); typedef _1 InputDomain; FieldType constant; VTKM_CONT - SubtractConst(const FieldType& constant0) : constant(constant0) {} + SubtractConst(const FieldType& constant0) + : constant(constant0) + { + } VTKM_EXEC - FieldType operator()(const FieldType& value) const - { - return(value - constant); - } + FieldType operator()(const FieldType& value) const { return (value - constant); } }; - template - void Run(vtkm::cont::ArrayHandle fieldArray, - StatInfo& statinfo) + template + void Run(vtkm::cont::ArrayHandle fieldArray, StatInfo& statinfo) { typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; - typedef typename vtkm::cont::ArrayHandle::PortalConstControl FieldPortal; + typedef typename vtkm::cont::ArrayHandle::PortalConstControl FieldPortal; // Copy original data to array for sorting vtkm::cont::ArrayHandle tempArray; @@ -131,9 +127,9 @@ public: statinfo.median = tempPortal.Get(dataSize / 2); // Minimum and maximum - const vtkm::Vec initValue(tempPortal.Get(0)); - vtkm::Vec result = - DeviceAlgorithms::Reduce(fieldArray, initValue, vtkm::MinAndMax()); + const vtkm::Vec initValue(tempPortal.Get(0)); + vtkm::Vec result = + DeviceAlgorithms::Reduce(fieldArray, initValue, vtkm::MinAndMax()); statinfo.minimum = result[0]; statinfo.maximum = result[1]; @@ -150,8 +146,8 @@ public: pow4Array.Allocate(dataSize); // Raw moments via Worklet - vtkm::worklet::DispatcherMapField - calculatePowersDispatcher(CalculatePowers(4)); + vtkm::worklet::DispatcherMapField calculatePowersDispatcher( + CalculatePowers(4)); calculatePowersDispatcher.Invoke(fieldArray, pow1Array, pow2Array, pow3Array, pow4Array); // Accumulate the results using ScanInclusive @@ -161,27 +157,32 @@ public: statinfo.rawMoment[FOURTH] = DeviceAlgorithms::ScanInclusive(pow4Array, pow4Array) / numValues; // Subtract the mean from every value and leave in tempArray - vtkm::worklet::DispatcherMapField - subtractConstDispatcher(SubtractConst(statinfo.mean)); + vtkm::worklet::DispatcherMapField subtractConstDispatcher( + SubtractConst(statinfo.mean)); subtractConstDispatcher.Invoke(fieldArray, tempArray); // Calculate sums of powers on the (value - mean) array calculatePowersDispatcher.Invoke(tempArray, pow1Array, pow2Array, pow3Array, pow4Array); // Accumulate the results using ScanInclusive - statinfo.centralMoment[FIRST] = DeviceAlgorithms::ScanInclusive(pow1Array, pow1Array) / numValues; - statinfo.centralMoment[SECOND] = DeviceAlgorithms::ScanInclusive(pow2Array, pow2Array) / numValues; - statinfo.centralMoment[THIRD] = DeviceAlgorithms::ScanInclusive(pow3Array, pow3Array) / numValues; - statinfo.centralMoment[FOURTH] = DeviceAlgorithms::ScanInclusive(pow4Array, pow4Array) / numValues; + statinfo.centralMoment[FIRST] = + DeviceAlgorithms::ScanInclusive(pow1Array, pow1Array) / numValues; + statinfo.centralMoment[SECOND] = + DeviceAlgorithms::ScanInclusive(pow2Array, pow2Array) / numValues; + statinfo.centralMoment[THIRD] = + DeviceAlgorithms::ScanInclusive(pow3Array, pow3Array) / numValues; + statinfo.centralMoment[FOURTH] = + DeviceAlgorithms::ScanInclusive(pow4Array, pow4Array) / numValues; // Statistics from the moments statinfo.variance = statinfo.centralMoment[SECOND]; statinfo.stddev = Sqrt(statinfo.variance); - statinfo.skewness = statinfo.centralMoment[THIRD] / Pow(statinfo.stddev, static_cast(3.0)); - statinfo.kurtosis = statinfo.centralMoment[FOURTH] / Pow(statinfo.stddev, static_cast(4.0)); + statinfo.skewness = + statinfo.centralMoment[THIRD] / Pow(statinfo.stddev, static_cast(3.0)); + statinfo.kurtosis = + statinfo.centralMoment[FOURTH] / Pow(statinfo.stddev, static_cast(4.0)); } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/Gradient.h b/vtkm/worklet/Gradient.h index 5974758e3..5f32ee012 100644 --- a/vtkm/worklet/Gradient.h +++ b/vtkm/worklet/Gradient.h @@ -30,50 +30,44 @@ #include #include - - #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -struct GradientInTypes - : vtkm::ListTagBase, - vtkm::Vec > -{ }; +struct GradientInTypes : vtkm::ListTagBase, vtkm::Vec> +{ +}; struct GradientOutTypes - : vtkm::ListTagBase< - vtkm::Vec, - vtkm::Vec, - vtkm::Vec< vtkm::Vec, 3>, - vtkm::Vec< vtkm::Vec, 3> - > -{ }; + : vtkm::ListTagBase, vtkm::Vec, + vtkm::Vec, 3>, + vtkm::Vec, 3>> +{ +}; -struct GradientVecOutTypes - : vtkm::ListTagBase< - vtkm::Vec< vtkm::Vec, 3>, - vtkm::Vec< vtkm::Vec, 3> - > { }; +struct GradientVecOutTypes : vtkm::ListTagBase, 3>, + vtkm::Vec, 3>> +{ +}; struct CellGradient : vtkm::worklet::WorkletMapPointToCell { - typedef void ControlSignature(CellSetIn, - FieldInPoint pointCoordinates, + typedef void ControlSignature(CellSetIn, FieldInPoint pointCoordinates, FieldInPoint inputField, FieldOutCell outputField); typedef void ExecutionSignature(CellShape, PointCount, _2, _3, _4); typedef _1 InputDomain; - template - VTKM_EXEC void operator()(CellTagType shape, - vtkm::IdComponent pointCount, const PointCoordVecType& pointCoordinates, - const FieldInVecType& inputField, FieldOutType& outputField) const + template + VTKM_EXEC void operator()(CellTagType shape, vtkm::IdComponent pointCount, + const PointCoordVecType& pointCoordinates, + const FieldInVecType& inputField, FieldOutType& outputField) const { //To confirm that we have the proper input and output types we need //to verify that input type matches the output vtkm::Vec 'T' type. @@ -92,16 +86,14 @@ struct CellGradient : vtkm::worklet::WorkletMapPointToCell //Verify that input and output dimension tags match using Matches = typename std::is_same::type; - this->Compute(shape, pointCount, pointCoordinates, inputField, outputField, - Matches()); + this->Compute(shape, pointCount, pointCoordinates, inputField, outputField, Matches()); } - template - VTKM_EXEC void Compute(CellShapeTag shape, - vtkm::IdComponent pointCount, const PointCoordVecType& wCoords, - const FieldInVecType& field, FieldOutType& outputField, - std::true_type) const + template + VTKM_EXEC void Compute(CellShapeTag shape, vtkm::IdComponent pointCount, + const PointCoordVecType& wCoords, const FieldInVecType& field, + FieldOutType& outputField, std::true_type) const { vtkm::Vec center = vtkm::exec::ParametricCoordinatesCenter(pointCount, shape, *this); @@ -109,25 +101,18 @@ struct CellGradient : vtkm::worklet::WorkletMapPointToCell outputField = vtkm::exec::CellDerivative(field, wCoords, center, shape, *this); } - template - VTKM_EXEC void Compute(CellShapeTag, - vtkm::IdComponent, - const PointCoordVecType&, - const FieldInVecType&, - FieldOutType&, - std::false_type) const + VTKM_EXEC void Compute(CellShapeTag, vtkm::IdComponent, const PointCoordVecType&, + const FieldInVecType&, FieldOutType&, std::false_type) const { - //this is invalid + //this is invalid } }; struct PointGradient : public vtkm::worklet::WorkletMapCellToPoint { - typedef void ControlSignature(CellSetIn, - WholeCellSetIn, + typedef void ControlSignature(CellSetIn, WholeCellSetIn, WholeArrayIn pointCoordinates, WholeArrayIn inputField, FieldOutPoint outputField); @@ -135,18 +120,12 @@ struct PointGradient : public vtkm::worklet::WorkletMapCellToPoint typedef void ExecutionSignature(CellCount, CellIndices, WorkIndex, _2, _3, _4, _5); typedef _1 InputDomain; - template - VTKM_EXEC void operator()(const vtkm::IdComponent& numCells, - const FromIndexType& cellIds, - const vtkm::Id& pointId, - const CellSetInType& geometry, + template + VTKM_EXEC void operator()(const vtkm::IdComponent& numCells, const FromIndexType& cellIds, + const vtkm::Id& pointId, const CellSetInType& geometry, const WholeCoordinatesIn& pointCoordinates, - const WholeFieldIn& inputField, - FieldOutType& outputField) const + const WholeFieldIn& inputField, FieldOutType& outputField) const { //To confirm that we have the proper input and output types we need //to verify that input type matches the output vtkm::Vec 'T' type. @@ -164,31 +143,24 @@ struct PointGradient : public vtkm::worklet::WorkletMapCellToPoint //Verify that input and output dimension tags match using Matches = typename std::is_same::type; - this->Compute(numCells, cellIds, pointId, geometry, pointCoordinates, - inputField, outputField, Matches()); + this->Compute(numCells, cellIds, pointId, geometry, pointCoordinates, inputField, outputField, + Matches()); } - template - VTKM_EXEC void Compute(const vtkm::IdComponent& numCells, - const FromIndexType& cellIds, - const vtkm::Id& pointId, - const CellSetInType& geometry, - const WholeCoordinatesIn& pointCoordinates, - const WholeFieldIn& inputField, - FieldOutType& outputField, - std::true_type) const + template + VTKM_EXEC void Compute(const vtkm::IdComponent& numCells, const FromIndexType& cellIds, + const vtkm::Id& pointId, const CellSetInType& geometry, + const WholeCoordinatesIn& pointCoordinates, const WholeFieldIn& inputField, + FieldOutType& outputField, std::true_type) const { using ThreadIndices = vtkm::exec::arg::ThreadIndicesTopologyMap; using ValueType = typename WholeFieldIn::ValueType; using CellShapeTag = typename CellSetInType::CellShapeTag; - vtkm::Vec gradient( ValueType(0.0) ); + vtkm::Vec gradient(ValueType(0.0)); for (vtkm::IdComponent i = 0; i < numCells; ++i) - { + { const vtkm::Id cellId = cellIds[i]; ThreadIndices cellIndices(cellId, cellId, 0, geometry); @@ -198,65 +170,50 @@ struct PointGradient : public vtkm::worklet::WorkletMapCellToPoint const auto wCoords = this->GetValues(cellIndices, pointCoordinates); const auto field = this->GetValues(cellIndices, inputField); - const vtkm::IdComponent pointIndexForCell = - this->GetPointIndexForCell(cellIndices, pointId); + const vtkm::IdComponent pointIndexForCell = this->GetPointIndexForCell(cellIndices, pointId); this->ComputeGradient(cellShape, pointIndexForCell, wCoords, field, gradient); - } + } using BaseGradientType = typename vtkm::BaseComponent::Type; const BaseGradientType invNumCells = - static_cast(1.) / - static_cast(numCells); + static_cast(1.) / static_cast(numCells); using OutValueType = typename FieldOutType::ComponentType; outputField[0] = static_cast(gradient[0] * invNumCells); outputField[1] = static_cast(gradient[1] * invNumCells); outputField[2] = static_cast(gradient[2] * invNumCells); } - template - VTKM_EXEC void Compute(const vtkm::IdComponent&, - const FromIndexType&, - const vtkm::Id&, - const CellSetInType&, - const WholeCoordinatesIn&, - const WholeFieldIn&, - FieldOutType&, - std::false_type) const + template + VTKM_EXEC void Compute(const vtkm::IdComponent&, const FromIndexType&, const vtkm::Id&, + const CellSetInType&, const WholeCoordinatesIn&, const WholeFieldIn&, + FieldOutType&, std::false_type) const { - //this is invalid, as the input and output types don't match. - //e.g input is float => output is vtkm::Vec< vtkm::Vec< float > > + //this is invalid, as the input and output types don't match. + //e.g input is float => output is vtkm::Vec< vtkm::Vec< float > > } private: - template - inline VTKM_EXEC - void ComputeGradient(CellShapeTag cellShape, - const vtkm::IdComponent& pointIndexForCell, - const PointCoordVecType& wCoords, - const FieldInVecType& field, - vtkm::Vec& gradient) const + template + inline VTKM_EXEC void ComputeGradient(CellShapeTag cellShape, + const vtkm::IdComponent& pointIndexForCell, + const PointCoordVecType& wCoords, + const FieldInVecType& field, + vtkm::Vec& gradient) const { vtkm::Vec pCoords; - vtkm::exec::ParametricCoordinatesPoint( - wCoords.GetNumberOfComponents(), pointIndexForCell, pCoords, cellShape, *this); + vtkm::exec::ParametricCoordinatesPoint(wCoords.GetNumberOfComponents(), pointIndexForCell, + pCoords, cellShape, *this); //we need to add this to a return value - gradient += vtkm::exec::CellDerivative(field, - wCoords, pCoords, - cellShape, *this); + gradient += vtkm::exec::CellDerivative(field, wCoords, pCoords, cellShape, *this); } - template - VTKM_EXEC - vtkm::IdComponent GetPointIndexForCell( - const vtkm::exec::arg::ThreadIndicesTopologyMap& indices, - vtkm::Id pointId) const + template + VTKM_EXEC vtkm::IdComponent GetPointIndexForCell( + const vtkm::exec::arg::ThreadIndicesTopologyMap& indices, vtkm::Id pointId) const { vtkm::IdComponent result = 0; const auto& topo = indices.GetIndicesFrom(); @@ -274,57 +231,48 @@ private: //VecRectilinearPointCoordinates when using structured connectivity, and //uniform point coordinates. //c++14 would make the return type simply auto - template + template VTKM_EXEC - typename vtkm::exec::arg::Fetch< - vtkm::exec::arg::FetchTagArrayTopologyMapIn, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesTopologyMap, - typename WholeFieldIn::PortalType>::ValueType - GetValues(const vtkm::exec::arg::ThreadIndicesTopologyMap& indices, - const WholeFieldIn& in) const + typename vtkm::exec::arg::Fetch, + typename WholeFieldIn::PortalType>::ValueType + GetValues(const vtkm::exec::arg::ThreadIndicesTopologyMap& indices, + const WholeFieldIn& in) const { //the current problem is that when the topology is structured //we are passing in an vtkm::Id when it wants a Id2 or an Id3 that //represents the flat index of the topology using ExecObjectType = typename WholeFieldIn::PortalType; using Fetch = vtkm::exec::arg::Fetch< - vtkm::exec::arg::FetchTagArrayTopologyMapIn, - vtkm::exec::arg::AspectTagDefault, - vtkm::exec::arg::ThreadIndicesTopologyMap, - ExecObjectType>; + vtkm::exec::arg::FetchTagArrayTopologyMapIn, vtkm::exec::arg::AspectTagDefault, + vtkm::exec::arg::ThreadIndicesTopologyMap, ExecObjectType>; Fetch fetch; - return fetch.Load(indices,in.GetPortal()); + return fetch.Load(indices, in.GetPortal()); } - }; - struct Divergence : public vtkm::worklet::WorkletMapField { - typedef void ControlSignature(FieldIn input, - FieldOut output); - typedef void ExecutionSignature(_1,_2); + typedef void ControlSignature(FieldIn input, FieldOut output); + typedef void ExecutionSignature(_1, _2); typedef _1 InputDomain; - template - VTKM_EXEC - void operator()(const InputType &input, OutputType &divergence) const + template + VTKM_EXEC void operator()(const InputType& input, OutputType& divergence) const { - divergence = input[0][0]+input[1][1]+input[2][2]; + divergence = input[0][0] + input[1][1] + input[2][2]; } }; struct Vorticity : public vtkm::worklet::WorkletMapField { - typedef void ControlSignature(FieldIn input, - FieldOut output); - typedef void ExecutionSignature(_1,_2); + typedef void ControlSignature(FieldIn input, FieldOut output); + typedef void ExecutionSignature(_1, _2); typedef _1 InputDomain; - template - VTKM_EXEC - void operator()(const InputType &input, OutputType &vorticity) const + template + VTKM_EXEC void operator()(const InputType& input, OutputType& vorticity) const { vorticity[0] = input[2][1] - input[1][2]; vorticity[1] = input[0][2] - input[2][0]; @@ -334,31 +282,27 @@ struct Vorticity : public vtkm::worklet::WorkletMapField struct QCriterion : public vtkm::worklet::WorkletMapField { - typedef void ControlSignature(FieldIn input, - FieldOut output); - typedef void ExecutionSignature(_1,_2); + typedef void ControlSignature(FieldIn input, FieldOut output); + typedef void ExecutionSignature(_1, _2); typedef _1 InputDomain; - template - VTKM_EXEC - void operator()(const InputType &input, OutputType &qcriterion) const + template + VTKM_EXEC void operator()(const InputType& input, OutputType& qcriterion) const { - OutputType t1 = - ((input[2][1] - input[1][2]) * (input[2][1] - input[1][2]) + - (input[1][0] - input[0][1]) * (input[1][0] - input[0][1]) + - (input[0][2] - input[2][0]) * (input[0][2] - input[2][0])) / 2.0f; - OutputType t2 = - input[0][0] * input[0][0] + input[1][1] * input[1][1] + - input[2][2] * input[2][2] + - ((input[1][0] + input[0][1]) * (input[1][0] + input[0][1]) + - (input[2][0] + input[0][2]) * (input[2][0] + input[0][2]) + - (input[2][1] + input[1][2]) * (input[2][1] + input[1][2])) / 2.0f; + OutputType t1 = ((input[2][1] - input[1][2]) * (input[2][1] - input[1][2]) + + (input[1][0] - input[0][1]) * (input[1][0] - input[0][1]) + + (input[0][2] - input[2][0]) * (input[0][2] - input[2][0])) / + 2.0f; + OutputType t2 = input[0][0] * input[0][0] + input[1][1] * input[1][1] + + input[2][2] * input[2][2] + + ((input[1][0] + input[0][1]) * (input[1][0] + input[0][1]) + + (input[2][0] + input[0][2]) * (input[2][0] + input[0][2]) + + (input[2][1] + input[1][2]) * (input[2][1] + input[1][2])) / + 2.0f; qcriterion = (t1 - t2) / 2.0f; } }; - - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/KernelSplatter.h b/vtkm/worklet/KernelSplatter.h index a4d04c463..53b1aa1fc 100644 --- a/vtkm/worklet/KernelSplatter.h +++ b/vtkm/worklet/KernelSplatter.h @@ -49,558 +49,522 @@ //---------------------------------------------------------------------------- #if defined(__VTKM_GAUSSIAN_SPLATTER_BENCHMARK) && !defined(START_TIMER_BLOCK) // start timer -# define START_TIMER_BLOCK(name) \ - vtkm::cont::Timer timer_##name; +#define START_TIMER_BLOCK(name) vtkm::cont::Timer timer_##name; // stop timer -# define END_TIMER_BLOCK(name) \ - std::cout << #name " : elapsed : " << timer_##name.GetElapsedTime() << "\n"; +#define END_TIMER_BLOCK(name) \ + std::cout << #name " : elapsed : " << timer_##name.GetElapsedTime() << "\n"; #endif #if !defined(START_TIMER_BLOCK) -# define START_TIMER_BLOCK(name) -# define END_TIMER_BLOCK(name) +#define START_TIMER_BLOCK(name) +#define END_TIMER_BLOCK(name) #endif //---------------------------------------------------------------------------- // Kernel splatter worklet/filter //---------------------------------------------------------------------------- -namespace vtkm { namespace worklet +namespace vtkm +{ +namespace worklet { -namespace debug { +namespace debug +{ #ifdef DEBUG_PRINT //---------------------------------------------------------------------------- -template -void OutputArrayDebug(const vtkm::cont::ArrayHandle &outputArray, const std::string &name) +template +void OutputArrayDebug(const vtkm::cont::ArrayHandle& outputArray, const std::string& name) { - typedef T ValueType; - typedef vtkm::cont::internal::Storage StorageType; - typedef typename StorageType::PortalConstType PortalConstType; - PortalConstType readPortal = outputArray.GetPortalConstControl(); - vtkm::cont::ArrayPortalToIterators iterators(readPortal); - std::vector result(readPortal.GetNumberOfValues()); - std::copy(iterators.GetBegin(), iterators.GetEnd(), result.begin()); - std::cout << name.c_str() << " " << outputArray.GetNumberOfValues() << "\n"; - std::copy(result.begin(), result.end(), std::ostream_iterator(std::cout, " ")); - std::cout << std::endl; + typedef T ValueType; + typedef vtkm::cont::internal::Storage StorageType; + typedef typename StorageType::PortalConstType PortalConstType; + PortalConstType readPortal = outputArray.GetPortalConstControl(); + vtkm::cont::ArrayPortalToIterators iterators(readPortal); + std::vector result(readPortal.GetNumberOfValues()); + std::copy(iterators.GetBegin(), iterators.GetEnd(), result.begin()); + std::cout << name.c_str() << " " << outputArray.GetNumberOfValues() << "\n"; + std::copy(result.begin(), result.end(), std::ostream_iterator(std::cout, " ")); + std::cout << std::endl; } //---------------------------------------------------------------------------- -template -void OutputArrayDebug(const vtkm::cont::ArrayHandle< vtkm::Vec > &outputArray, const std::string &name) +template +void OutputArrayDebug(const vtkm::cont::ArrayHandle>& outputArray, + const std::string& name) { - typedef T ValueType; - typedef typename vtkm::cont::ArrayHandle >::PortalConstControl PortalConstType; - PortalConstType readPortal = outputArray.GetPortalConstControl(); - vtkm::cont::ArrayPortalToIterators iterators(readPortal); - std::cout << name.c_str() << " " << outputArray.GetNumberOfValues() << "\n"; - for (int i=0; i>::PortalConstControl PortalConstType; + PortalConstType readPortal = outputArray.GetPortalConstControl(); + vtkm::cont::ArrayPortalToIterators iterators(readPortal); + std::cout << name.c_str() << " " << outputArray.GetNumberOfValues() << "\n"; + for (int i = 0; i < outputArray.GetNumberOfValues(); ++i) + { + std::cout << outputArray.GetPortalConstControl().Get(i); + } + std::cout << std::endl; } //---------------------------------------------------------------------------- -template -void OutputArrayDebug(const vtkm::cont::ArrayHandlePermutation > > &outputArray, const std::string &name) +template +void OutputArrayDebug(const vtkm::cont::ArrayHandlePermutation< + I, vtkm::cont::ArrayHandle>>& outputArray, + const std::string& name) { - typedef typename vtkm::cont::ArrayHandlePermutation > >::PortalConstControl PortalConstType; - PortalConstType readPortal = outputArray.GetPortalConstControl(); - vtkm::cont::ArrayPortalToIterators iterators(readPortal); - std::cout << name.c_str() << " " << outputArray.GetNumberOfValues() << "\n"; - for (int i = 0; i>>::PortalConstControl PortalConstType; + PortalConstType readPortal = outputArray.GetPortalConstControl(); + vtkm::cont::ArrayPortalToIterators iterators(readPortal); + std::cout << name.c_str() << " " << outputArray.GetNumberOfValues() << "\n"; + for (int i = 0; i < outputArray.GetNumberOfValues(); ++i) + { + std::cout << outputArray.GetPortalConstControl().Get(i); + } + std::cout << std::endl; } #else -template -void OutputArrayDebug( - const vtkm::cont::ArrayHandle &vtkmNotUsed(outputArray), - const std::string &vtkmNotUsed(name)) -{} +template +void OutputArrayDebug(const vtkm::cont::ArrayHandle& vtkmNotUsed(outputArray), + const std::string& vtkmNotUsed(name)) +{ +} //---------------------------------------------------------------------------- -template -void OutputArrayDebug( - const vtkm::cont::ArrayHandle< vtkm::Vec > &vtkmNotUsed(outputArray), - const std::string &vtkmNotUsed(name)) -{} +template +void OutputArrayDebug(const vtkm::cont::ArrayHandle>& vtkmNotUsed(outputArray), + const std::string& vtkmNotUsed(name)) +{ +} //---------------------------------------------------------------------------- -template -void OutputArrayDebug( - const vtkm::cont::ArrayHandlePermutation > > &vtkmNotUsed(outputArray), - const std::string &vtkmNotUsed(name)) -{} +template +void OutputArrayDebug(const vtkm::cont::ArrayHandlePermutation< + I, vtkm::cont::ArrayHandle>>& vtkmNotUsed(outputArray), + const std::string& vtkmNotUsed(name)) +{ +} #endif } // namespace debug -template +template struct KernelSplatterFilterUniformGrid { - typedef vtkm::cont::ArrayHandle DoubleHandleType; - typedef vtkm::cont::ArrayHandle FloatHandleType; - typedef vtkm::cont::ArrayHandle VecHandleType; - typedef vtkm::cont::ArrayHandle IdHandleType; - // - typedef vtkm::Vec FloatVec; - typedef vtkm::Vec PointType; - typedef vtkm::cont::ArrayHandle PointHandleType; - // - typedef vtkm::cont::ArrayHandlePermutation VecPermType; - typedef vtkm::cont::ArrayHandlePermutation PointVecPermType; - typedef vtkm::cont::ArrayHandlePermutation IdPermType; - typedef vtkm::cont::ArrayHandlePermutation FloatPermType; - // - typedef vtkm::cont::ArrayHandleCounting IdCountingType; + typedef vtkm::cont::ArrayHandle DoubleHandleType; + typedef vtkm::cont::ArrayHandle FloatHandleType; + typedef vtkm::cont::ArrayHandle VecHandleType; + typedef vtkm::cont::ArrayHandle IdHandleType; + // + typedef vtkm::Vec FloatVec; + typedef vtkm::Vec PointType; + typedef vtkm::cont::ArrayHandle PointHandleType; + // + typedef vtkm::cont::ArrayHandlePermutation VecPermType; + typedef vtkm::cont::ArrayHandlePermutation PointVecPermType; + typedef vtkm::cont::ArrayHandlePermutation IdPermType; + typedef vtkm::cont::ArrayHandlePermutation FloatPermType; + // + typedef vtkm::cont::ArrayHandleCounting IdCountingType; - //----------------------------------------------------------------------- - // zero an array, - // @TODO, get rid of this - //----------------------------------------------------------------------- - struct zero_voxel : public vtkm::worklet::WorkletMapField { - typedef void ControlSignature(FieldIn<>, FieldOut<>); - typedef void ExecutionSignature(_1, WorkIndex, _2); - // - VTKM_CONT - zero_voxel() {} + //----------------------------------------------------------------------- + // zero an array, + // @TODO, get rid of this + //----------------------------------------------------------------------- + struct zero_voxel : public vtkm::worklet::WorkletMapField + { + typedef void ControlSignature(FieldIn<>, FieldOut<>); + typedef void ExecutionSignature(_1, WorkIndex, _2); + // + VTKM_CONT + zero_voxel() {} - template - VTKM_EXEC_CONT - void operator()(const vtkm::Id &, const vtkm::Id &vtkmNotUsed(index), T &voxel_value) const + template + VTKM_EXEC_CONT void operator()(const vtkm::Id&, const vtkm::Id& vtkmNotUsed(index), + T& voxel_value) const + { + voxel_value = T(0); + } + }; + + //----------------------------------------------------------------------- + // Return the splat footprint/neighborhood of each sample point, as + // represented by min and max boundaries in each dimension. + // Also return the size of this footprint and the voxel coordinates + // of the splat point (floating point). + //----------------------------------------------------------------------- + class GetFootprint : public vtkm::worklet::WorkletMapField + { + private: + vtkm::Vec origin_; + vtkm::Vec spacing_; + vtkm::Id3 VolumeDimensions; + Kernel kernel_; + + public: + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldIn<>, FieldIn<>, FieldOut<>, + FieldOut<>, FieldOut<>, FieldOut<>); + typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8); + + VTKM_CONT + GetFootprint(const vtkm::Vec& o, const vtkm::Vec& s, + const vtkm::Id3& dim, const Kernel& kernel) + : origin_(o) + , spacing_(s) + , VolumeDimensions(dim) + , kernel_(kernel) + { + } + + template + VTKM_EXEC_CONT void operator()(const T& x, const T& y, const T& z, const T2& h, + vtkm::Vec& splatPoint, vtkm::Id3& minFootprint, + vtkm::Id3& maxFootprint, vtkm::Id& footprintSize) const + { + PointType splat, min, max; + vtkm::Vec sample = vtkm::make_Vec(x, y, z); + vtkm::Id size = 1; + double cutoff = kernel_.maxDistance(h); + for (int i = 0; i < 3; i++) + { + splat[i] = (sample[i] - this->origin_[i]) / this->spacing_[i]; + min[i] = static_cast(ceil(static_cast(splat[i]) - cutoff)); + max[i] = static_cast(floor(static_cast(splat[i]) + cutoff)); + if (min[i] < 0) { - voxel_value = T(0); + min[i] = 0; } - }; + if (max[i] >= this->VolumeDimensions[i]) + { + max[i] = this->VolumeDimensions[i] - 1; + } + size = static_cast(size * (1 + max[i] - min[i])); + } + splatPoint = splat; + minFootprint = min; + maxFootprint = max; + footprintSize = size; + } + }; - //----------------------------------------------------------------------- - // Return the splat footprint/neighborhood of each sample point, as + //----------------------------------------------------------------------- + // Return the "local" Id of a voxel within a splat point's footprint. + // A splat point that affects 5 neighboring voxel gridpoints would + // have local Ids 0,1,2,3,4 + //----------------------------------------------------------------------- + class ComputeLocalNeighborId : public vtkm::worklet::WorkletMapField + { + public: + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldOut<>); + typedef void ExecutionSignature(_1, _2, WorkIndex, _3); + + VTKM_CONT + ComputeLocalNeighborId() {} + + template + VTKM_EXEC_CONT void operator()(const T& modulus, const T& offset, const vtkm::Id& index, + T& localId) const + { + localId = (index - offset) % modulus; + } + }; + + //----------------------------------------------------------------------- + // Compute the splat value of the input neighbour point. + // The voxel Id of this point within the volume is also determined. + //----------------------------------------------------------------------- + class GetSplatValue : public vtkm::worklet::WorkletMapField + { + private: + vtkm::Vec spacing_; + vtkm::Vec origin_; + vtkm::Id3 VolumeDim; + vtkm::Float64 Radius2; + vtkm::Float64 ExponentFactor; + vtkm::Float64 ScalingFactor; + Kernel kernel; + + public: + typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldIn<>, FieldIn<>, FieldIn<>, FieldIn<>, + FieldOut<>, FieldOut<>); + typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8); + + VTKM_CONT + GetSplatValue(const vtkm::Vec& orig, const vtkm::Vec& s, + const vtkm::Id3& dim, const Kernel& k) + : spacing_(s) + , origin_(orig) + , VolumeDim(dim) + , kernel(k) + { + } + + template + VTKM_EXEC_CONT void operator()(const vtkm::Vec& splatPoint, const T& minBound, + const T& maxBound, const T2& kernel_H, const T2& scale, + const vtkm::Id localNeighborId, vtkm::Id& neighborVoxelId, + vtkm::Float32& splatValue) const + { + vtkm::Id yRange = 1 + maxBound[1] - minBound[1]; + vtkm::Id xRange = 1 + maxBound[0] - minBound[0]; + vtkm::Id divisor = yRange * xRange; + vtkm::Id i = localNeighborId / divisor; + vtkm::Id remainder = localNeighborId % divisor; + vtkm::Id j = remainder / xRange; + vtkm::Id k = remainder % xRange; + // note the order of k,j,i + vtkm::Id3 voxel = minBound + vtkm::make_Vec(k, j, i); + PointType dist = vtkm::make_Vec((splatPoint[0] - voxel[0]) * spacing_[0], + (splatPoint[1] - voxel[1]) * spacing_[0], + (splatPoint[2] - voxel[2]) * spacing_[0]); + vtkm::Float64 dist2 = vtkm::dot(dist, dist); + + // Compute splat value using the kernel distance_squared function + splatValue = scale * kernel.w2(kernel_H, dist2); + // + neighborVoxelId = + (voxel[2] * VolumeDim[0] * VolumeDim[1]) + (voxel[1] * VolumeDim[0]) + voxel[0]; + if (neighborVoxelId < 0) + neighborVoxelId = -1; + else if (neighborVoxelId >= VolumeDim[0] * VolumeDim[1] * VolumeDim[2]) + neighborVoxelId = VolumeDim[0] * VolumeDim[1] * VolumeDim[2] - 1; + } + }; + + //----------------------------------------------------------------------- + // Scatter worklet that writes a splat value into the larger, + // master splat value array, using the splat value's voxel Id as an index. + //----------------------------------------------------------------------- + class UpdateVoxelSplats : public vtkm::worklet::WorkletMapField + { + public: + typedef void ControlSignature(FieldIn<>, FieldIn<>, ExecObject); + typedef void ExecutionSignature(_1, _2, _3); + + VTKM_CONT + UpdateVoxelSplats() {} + + VTKM_EXEC_CONT + void operator()(const vtkm::Id& voxelIndex, const vtkm::Float64& splatValue, + vtkm::exec::ExecutionWholeArray& execArg) const + { + execArg.Set(voxelIndex, static_cast(splatValue)); + } + }; + + //----------------------------------------------------------------------- + // Construct a splatter filter/object + // + // @TODO, get the origin_ and spacing_ from the dataset coordinates + // instead of requiring them to be passed as parameters. + //----------------------------------------------------------------------- + KernelSplatterFilterUniformGrid(const vtkm::Id3& dims, vtkm::Vec origin, + vtkm::Vec spacing, + const vtkm::cont::DataSet& dataset, const Kernel& kernel) + : dims_(dims) + , origin_(origin) + , spacing_(spacing) + , dataset_(dataset) + , kernel_(kernel) + { + } + + //----------------------------------------------------------------------- + // class variables for the splat filter + //----------------------------------------------------------------------- + vtkm::Id3 dims_; + FloatVec origin_; + FloatVec spacing_; + vtkm::cont::DataSet dataset_; + // The kernel used for this filter + Kernel kernel_; + + //----------------------------------------------------------------------- + // Run the filter, given the input params + //----------------------------------------------------------------------- + template + void run(const vtkm::cont::ArrayHandle xValues, + const vtkm::cont::ArrayHandle yValues, + const vtkm::cont::ArrayHandle zValues, + const vtkm::cont::ArrayHandle rValues, + const vtkm::cont::ArrayHandle sValues, + FloatHandleType scalarSplatOutput) + { + // Number of grid points in the volume bounding box + vtkm::Id3 pointDimensions = vtkm::make_Vec(dims_[0] + 1, dims_[1] + 1, dims_[2] + 1); + const vtkm::Id numVolumePoints = (dims_[0] + 1) * (dims_[1] + 1) * (dims_[2] + 1); + + //--------------------------------------------------------------- + // Get the splat footprint/neighborhood of each sample point, as // represented by min and max boundaries in each dimension. - // Also return the size of this footprint and the voxel coordinates - // of the splat point (floating point). - //----------------------------------------------------------------------- - class GetFootprint : public vtkm::worklet::WorkletMapField - { - private: - vtkm::Vec origin_; - vtkm::Vec spacing_; - vtkm::Id3 VolumeDimensions; - Kernel kernel_; + //--------------------------------------------------------------- + PointHandleType splatPoints; + VecHandleType footprintMin; + VecHandleType footprintMax; + IdHandleType numNeighbors; + IdHandleType localNeighborIds; - public: - typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldIn<>, FieldIn<>, - FieldOut<>, FieldOut<>, FieldOut<>, FieldOut<>); - typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8); + GetFootprint footprint_worklet(origin_, spacing_, pointDimensions, kernel_); + vtkm::worklet::DispatcherMapField footprintDispatcher(footprint_worklet); - VTKM_CONT - GetFootprint( - const vtkm::Vec &o, - const vtkm::Vec &s, - const vtkm::Id3 &dim, - const Kernel &kernel) - : origin_(o), spacing_(s), - VolumeDimensions(dim), kernel_(kernel) { } + START_TIMER_BLOCK(GetFootprint) + footprintDispatcher.Invoke(xValues, yValues, zValues, rValues, splatPoints, footprintMin, + footprintMax, numNeighbors); + END_TIMER_BLOCK(GetFootprint) - template - VTKM_EXEC_CONT - void operator()( - const T &x, - const T &y, - const T &z, - const T2 &h, - vtkm::Vec &splatPoint, - vtkm::Id3 &minFootprint, - vtkm::Id3 &maxFootprint, - vtkm::Id &footprintSize) const - { - PointType splat, min, max; - vtkm::Vec sample = vtkm::make_Vec(x, y, z); - vtkm::Id size = 1; - double cutoff = kernel_.maxDistance(h); - for (int i = 0; i < 3; i++) - { - splat[i] = (sample[i] - this->origin_[i]) / this->spacing_[i]; - min[i] = static_cast(ceil(static_cast(splat[i]) - cutoff)); - max[i] = static_cast(floor(static_cast(splat[i]) + cutoff)); - if (min[i] < 0) { - min[i] = 0; - } - if (max[i] >= this->VolumeDimensions[i]) { - max[i] = this->VolumeDimensions[i] - 1; - } - size = static_cast(size * (1 + max[i] - min[i])); - } - splatPoint = splat; - minFootprint = min; - maxFootprint = max; - footprintSize = size; - } - }; + debug::OutputArrayDebug(numNeighbors, "numNeighbours"); + debug::OutputArrayDebug(footprintMin, "footprintMin"); + debug::OutputArrayDebug(footprintMax, "footprintMax"); + debug::OutputArrayDebug(splatPoints, "splatPoints"); - //----------------------------------------------------------------------- - // Return the "local" Id of a voxel within a splat point's footprint. - // A splat point that affects 5 neighboring voxel gridpoints would - // have local Ids 0,1,2,3,4 - //----------------------------------------------------------------------- - class ComputeLocalNeighborId : public vtkm::worklet::WorkletMapField - { - public: - typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldOut<>); - typedef void ExecutionSignature(_1, _2, WorkIndex, _3); + //--------------------------------------------------------------- + // Prefix sum of the number of affected splat voxels ("neighbors") + // for each sample point. The total sum represents the number of + // voxels for which splat values will be computed. + // prefix sum is used in neighbour id lookup + //--------------------------------------------------------------- + IdHandleType numNeighborsPrefixSum; - VTKM_CONT - ComputeLocalNeighborId() {} + START_TIMER_BLOCK(numNeighborsPrefixSum) + const vtkm::Id totalSplatSize = + vtkm::cont::DeviceAdapterAlgorithm::ScanInclusive(numNeighbors, + numNeighborsPrefixSum); + END_TIMER_BLOCK(numNeighborsPrefixSum) - template - VTKM_EXEC_CONT - void operator()(const T &modulus, const T &offset, - const vtkm::Id &index, T &localId) const - { - localId = (index - offset) % modulus; - } - }; + std::cout << "totalSplatSize " << totalSplatSize << "\n"; + debug::OutputArrayDebug(numNeighborsPrefixSum, "numNeighborsPrefixSum"); - //----------------------------------------------------------------------- - // Compute the splat value of the input neighbour point. - // The voxel Id of this point within the volume is also determined. - //----------------------------------------------------------------------- - class GetSplatValue : public vtkm::worklet::WorkletMapField - { - private: - vtkm::Vec spacing_; - vtkm::Vec origin_; - vtkm::Id3 VolumeDim; - vtkm::Float64 Radius2; - vtkm::Float64 ExponentFactor; - vtkm::Float64 ScalingFactor; - Kernel kernel; + // also get the neighbour counts exclusive sum for use in lookup of local neighbour id + IdHandleType numNeighborsExclusiveSum; + START_TIMER_BLOCK(numNeighborsExclusiveSum) + vtkm::cont::DeviceAdapterAlgorithm::ScanExclusive(numNeighbors, + numNeighborsExclusiveSum); + END_TIMER_BLOCK(numNeighborsExclusiveSum) + debug::OutputArrayDebug(numNeighborsExclusiveSum, "numNeighborsExclusiveSum"); - public: - typedef void ControlSignature( - FieldIn<>, FieldIn<>, FieldIn<>, FieldIn<>, FieldIn<>, - FieldIn<>, FieldOut<>, - FieldOut<>); - typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8); + //--------------------------------------------------------------- + // Generate a lookup array that, for each splat voxel, identifies + // the Id of its corresponding (sample) splat point. + // For example, if splat point 0 affects 5 neighbor voxels, then + // the five entries in the lookup array would be 0,0,0,0,0 + //--------------------------------------------------------------- + IdHandleType neighbor2SplatId; + IdCountingType countingArray(vtkm::Id(0), 1, vtkm::Id(totalSplatSize)); + START_TIMER_BLOCK(Upper_bounds) + vtkm::cont::DeviceAdapterAlgorithm::UpperBounds(numNeighborsPrefixSum, + countingArray, neighbor2SplatId); + END_TIMER_BLOCK(Upper_bounds) + countingArray.ReleaseResources(); + debug::OutputArrayDebug(neighbor2SplatId, "neighbor2SplatId"); - VTKM_CONT - GetSplatValue( - const vtkm::Vec &orig, - const vtkm::Vec &s, - const vtkm::Id3 &dim, - const Kernel &k) - : spacing_(s), origin_(orig), VolumeDim(dim), kernel(k) {} + //--------------------------------------------------------------- + // Extract a "local" Id lookup array of the foregoing + // neighbor2SplatId array. So, the local version of 0,0,0,0,0 + // would be 0,1,2,3,4 + //--------------------------------------------------------------- + IdPermType modulii(neighbor2SplatId, numNeighbors); + debug::OutputArrayDebug(modulii, "modulii"); - template - VTKM_EXEC_CONT - void operator()( - const vtkm::Vec &splatPoint, - const T &minBound, - const T &maxBound, - const T2 &kernel_H, - const T2 &scale, - const vtkm::Id localNeighborId, - vtkm::Id &neighborVoxelId, - vtkm::Float32 &splatValue) const - { - vtkm::Id yRange = 1 + maxBound[1] - minBound[1]; - vtkm::Id xRange = 1 + maxBound[0] - minBound[0]; - vtkm::Id divisor = yRange * xRange; - vtkm::Id i = localNeighborId / divisor; - vtkm::Id remainder = localNeighborId % divisor; - vtkm::Id j = remainder / xRange; - vtkm::Id k = remainder % xRange; - // note the order of k,j,i - vtkm::Id3 voxel = minBound + vtkm::make_Vec(k, j, i); - PointType dist = vtkm::make_Vec( - (splatPoint[0] - voxel[0])*spacing_[0], - (splatPoint[1] - voxel[1])*spacing_[0], - (splatPoint[2] - voxel[2])*spacing_[0] - ); - vtkm::Float64 dist2 = vtkm::dot(dist,dist); + IdPermType offsets(neighbor2SplatId, numNeighborsExclusiveSum); + debug::OutputArrayDebug(offsets, "offsets"); - // Compute splat value using the kernel distance_squared function - splatValue = scale*kernel.w2(kernel_H, dist2); - // - neighborVoxelId = (voxel[2] * VolumeDim[0] * VolumeDim[1]) + - (voxel[1] * VolumeDim[0]) + voxel[0]; - if (neighborVoxelId<0) neighborVoxelId = -1; - else if (neighborVoxelId >= VolumeDim[0] * VolumeDim[1] * VolumeDim[2]) - neighborVoxelId = VolumeDim[0] * VolumeDim[1] * VolumeDim[2] - 1; - } - }; + vtkm::worklet::DispatcherMapField idDispatcher; + START_TIMER_BLOCK(idDispatcher) + idDispatcher.Invoke(modulii, offsets, localNeighborIds); + END_TIMER_BLOCK(idDispatcher) + debug::OutputArrayDebug(localNeighborIds, "localNeighborIds"); - //----------------------------------------------------------------------- - // Scatter worklet that writes a splat value into the larger, - // master splat value array, using the splat value's voxel Id as an index. - //----------------------------------------------------------------------- - class UpdateVoxelSplats : public vtkm::worklet::WorkletMapField - { - public: - typedef void ControlSignature(FieldIn<>, FieldIn<>, ExecObject); - typedef void ExecutionSignature(_1, _2, _3); + numNeighbors.ReleaseResources(); + numNeighborsPrefixSum.ReleaseResources(); + numNeighborsExclusiveSum.ReleaseResources(); - VTKM_CONT - UpdateVoxelSplats() {} + //--------------------------------------------------------------- + // We will perform gather operations for the generated splat points + // using permutation arrays + //--------------------------------------------------------------- + PointVecPermType ptSplatPoints(neighbor2SplatId, splatPoints); + VecPermType ptFootprintMins(neighbor2SplatId, footprintMin); + VecPermType ptFootprintMaxs(neighbor2SplatId, footprintMax); + FloatPermType radii(neighbor2SplatId, rValues); + FloatPermType scale(neighbor2SplatId, sValues); - VTKM_EXEC_CONT - void operator()(const vtkm::Id &voxelIndex, - const vtkm::Float64 &splatValue, - vtkm::exec::ExecutionWholeArray &execArg) const - { - execArg.Set(voxelIndex, static_cast(splatValue)); - } - }; + debug::OutputArrayDebug(radii, "radii"); + debug::OutputArrayDebug(ptSplatPoints, "ptSplatPoints"); + debug::OutputArrayDebug(ptFootprintMins, "ptFootprintMins"); - //----------------------------------------------------------------------- - // Construct a splatter filter/object + //--------------------------------------------------------------- + // Calculate the splat value of each affected voxel + //--------------------------------------------------------------- + FloatHandleType voxelSplatSums; + IdHandleType neighborVoxelIds; + IdHandleType uniqueVoxelIds; + FloatHandleType splatValues; + + GetSplatValue splatterDispatcher_worklet(origin_, spacing_, pointDimensions, kernel_); + vtkm::worklet::DispatcherMapField splatterDispatcher(splatterDispatcher_worklet); + + START_TIMER_BLOCK(GetSplatValue) + splatterDispatcher.Invoke(ptSplatPoints, ptFootprintMins, ptFootprintMaxs, radii, scale, + localNeighborIds, neighborVoxelIds, splatValues); + END_TIMER_BLOCK(GetSplatValue) + + debug::OutputArrayDebug(splatValues, "splatValues"); + debug::OutputArrayDebug(neighborVoxelIds, "neighborVoxelIds"); + + ptSplatPoints.ReleaseResources(); + ptFootprintMins.ReleaseResources(); + ptFootprintMaxs.ReleaseResources(); + neighbor2SplatId.ReleaseResources(); + localNeighborIds.ReleaseResources(); + splatPoints.ReleaseResources(); + footprintMin.ReleaseResources(); + footprintMax.ReleaseResources(); + radii.ReleaseResources(); + + //--------------------------------------------------------------- + // Sort the voxel Ids in ascending order + //--------------------------------------------------------------- + START_TIMER_BLOCK(SortByKey) + vtkm::cont::DeviceAdapterAlgorithm::SortByKey(neighborVoxelIds, splatValues); + END_TIMER_BLOCK(SortByKey) + debug::OutputArrayDebug(splatValues, "splatValues"); + + //--------------------------------------------------------------- + // Do a reduction to sum all contributions for each affected voxel + //--------------------------------------------------------------- + START_TIMER_BLOCK(ReduceByKey) + vtkm::cont::DeviceAdapterAlgorithm::ReduceByKey( + neighborVoxelIds, splatValues, uniqueVoxelIds, voxelSplatSums, vtkm::Add()); + END_TIMER_BLOCK(ReduceByKey) + + debug::OutputArrayDebug(neighborVoxelIds, "neighborVoxelIds"); + debug::OutputArrayDebug(uniqueVoxelIds, "uniqueVoxelIds"); + debug::OutputArrayDebug(voxelSplatSums, "voxelSplatSums"); // - // @TODO, get the origin_ and spacing_ from the dataset coordinates - // instead of requiring them to be passed as parameters. - //----------------------------------------------------------------------- - KernelSplatterFilterUniformGrid(const vtkm::Id3 &dims, - vtkm::Vec origin, - vtkm::Vec spacing, - const vtkm::cont::DataSet &dataset, - const Kernel &kernel) : - dims_(dims), - origin_(origin), - spacing_(spacing), - dataset_(dataset), - kernel_(kernel) - { - } + neighborVoxelIds.ReleaseResources(); + splatValues.ReleaseResources(); - //----------------------------------------------------------------------- - // class variables for the splat filter - //----------------------------------------------------------------------- - vtkm::Id3 dims_; - FloatVec origin_; - FloatVec spacing_; - vtkm::cont::DataSet dataset_; - // The kernel used for this filter - Kernel kernel_; + //--------------------------------------------------------------- + // initialize each field value to zero to begin with + //--------------------------------------------------------------- + IdCountingType indexArray(vtkm::Id(0), 1, numVolumePoints); + vtkm::worklet::DispatcherMapField zeroDispatcher; + zeroDispatcher.Invoke(indexArray, scalarSplatOutput); + // + indexArray.ReleaseResources(); - //----------------------------------------------------------------------- - // Run the filter, given the input params - //----------------------------------------------------------------------- - template - void run( - const vtkm::cont::ArrayHandle xValues, - const vtkm::cont::ArrayHandle yValues, - const vtkm::cont::ArrayHandle zValues, - const vtkm::cont::ArrayHandle rValues, - const vtkm::cont::ArrayHandle sValues, - FloatHandleType scalarSplatOutput) - { - // Number of grid points in the volume bounding box - vtkm::Id3 pointDimensions = vtkm::make_Vec(dims_[0]+1, dims_[1]+1, dims_[2]+1); - const vtkm::Id numVolumePoints = (dims_[0] + 1) * (dims_[1] + 1) * (dims_[2] + 1); + //--------------------------------------------------------------- + // Scatter operation to write the previously-computed splat + // value sums into their corresponding entries in the output array + //--------------------------------------------------------------- + vtkm::worklet::DispatcherMapField scatterDispatcher; - //--------------------------------------------------------------- - // Get the splat footprint/neighborhood of each sample point, as - // represented by min and max boundaries in each dimension. - //--------------------------------------------------------------- - PointHandleType splatPoints; - VecHandleType footprintMin; - VecHandleType footprintMax; - IdHandleType numNeighbors; - IdHandleType localNeighborIds; - - GetFootprint footprint_worklet(origin_, spacing_, pointDimensions, kernel_); - vtkm::worklet::DispatcherMapField footprintDispatcher(footprint_worklet); - - START_TIMER_BLOCK(GetFootprint) - footprintDispatcher.Invoke( - xValues, yValues, zValues, rValues, - splatPoints, - footprintMin, - footprintMax, - numNeighbors); - END_TIMER_BLOCK(GetFootprint) - - debug::OutputArrayDebug(numNeighbors, "numNeighbours"); - debug::OutputArrayDebug(footprintMin, "footprintMin"); - debug::OutputArrayDebug(footprintMax, "footprintMax"); - debug::OutputArrayDebug(splatPoints, "splatPoints"); - - //--------------------------------------------------------------- - // Prefix sum of the number of affected splat voxels ("neighbors") - // for each sample point. The total sum represents the number of - // voxels for which splat values will be computed. - // prefix sum is used in neighbour id lookup - //--------------------------------------------------------------- - IdHandleType numNeighborsPrefixSum; - - START_TIMER_BLOCK(numNeighborsPrefixSum) - const vtkm::Id totalSplatSize = - vtkm::cont::DeviceAdapterAlgorithm::ScanInclusive( - numNeighbors, - numNeighborsPrefixSum); - END_TIMER_BLOCK(numNeighborsPrefixSum) - - std::cout << "totalSplatSize " << totalSplatSize << "\n"; - debug::OutputArrayDebug(numNeighborsPrefixSum, "numNeighborsPrefixSum"); - - // also get the neighbour counts exclusive sum for use in lookup of local neighbour id - IdHandleType numNeighborsExclusiveSum; - START_TIMER_BLOCK(numNeighborsExclusiveSum) - vtkm::cont::DeviceAdapterAlgorithm::ScanExclusive( - numNeighbors, - numNeighborsExclusiveSum); - END_TIMER_BLOCK(numNeighborsExclusiveSum) - debug::OutputArrayDebug(numNeighborsExclusiveSum, "numNeighborsExclusiveSum"); - - //--------------------------------------------------------------- - // Generate a lookup array that, for each splat voxel, identifies - // the Id of its corresponding (sample) splat point. - // For example, if splat point 0 affects 5 neighbor voxels, then - // the five entries in the lookup array would be 0,0,0,0,0 - //--------------------------------------------------------------- - IdHandleType neighbor2SplatId; - IdCountingType countingArray(vtkm::Id(0), 1, vtkm::Id(totalSplatSize)); - START_TIMER_BLOCK(Upper_bounds) - vtkm::cont::DeviceAdapterAlgorithm::UpperBounds( - numNeighborsPrefixSum, - countingArray, - neighbor2SplatId); - END_TIMER_BLOCK(Upper_bounds) - countingArray.ReleaseResources(); - debug::OutputArrayDebug(neighbor2SplatId, "neighbor2SplatId"); - - //--------------------------------------------------------------- - // Extract a "local" Id lookup array of the foregoing - // neighbor2SplatId array. So, the local version of 0,0,0,0,0 - // would be 0,1,2,3,4 - //--------------------------------------------------------------- - IdPermType modulii(neighbor2SplatId, numNeighbors); - debug::OutputArrayDebug(modulii, "modulii"); - - IdPermType offsets(neighbor2SplatId, numNeighborsExclusiveSum); - debug::OutputArrayDebug(offsets, "offsets"); - - vtkm::worklet::DispatcherMapField idDispatcher; - START_TIMER_BLOCK(idDispatcher) - idDispatcher.Invoke( - modulii, - offsets, - localNeighborIds); - END_TIMER_BLOCK(idDispatcher) - debug::OutputArrayDebug(localNeighborIds, "localNeighborIds"); - - numNeighbors.ReleaseResources(); - numNeighborsPrefixSum.ReleaseResources(); - numNeighborsExclusiveSum.ReleaseResources(); - - //--------------------------------------------------------------- - // We will perform gather operations for the generated splat points - // using permutation arrays - //--------------------------------------------------------------- - PointVecPermType ptSplatPoints(neighbor2SplatId, splatPoints); - VecPermType ptFootprintMins(neighbor2SplatId, footprintMin); - VecPermType ptFootprintMaxs(neighbor2SplatId, footprintMax); - FloatPermType radii(neighbor2SplatId, rValues); - FloatPermType scale(neighbor2SplatId, sValues); - - debug::OutputArrayDebug(radii, "radii"); - debug::OutputArrayDebug(ptSplatPoints, "ptSplatPoints"); - debug::OutputArrayDebug(ptFootprintMins, "ptFootprintMins"); - - //--------------------------------------------------------------- - // Calculate the splat value of each affected voxel - //--------------------------------------------------------------- - FloatHandleType voxelSplatSums; - IdHandleType neighborVoxelIds; - IdHandleType uniqueVoxelIds; - FloatHandleType splatValues; - - GetSplatValue splatterDispatcher_worklet( - origin_, - spacing_, - pointDimensions, - kernel_); - vtkm::worklet::DispatcherMapField splatterDispatcher(splatterDispatcher_worklet); - - START_TIMER_BLOCK(GetSplatValue) - splatterDispatcher.Invoke( - ptSplatPoints, - ptFootprintMins, - ptFootprintMaxs, - radii, - scale, - localNeighborIds, neighborVoxelIds, splatValues); - END_TIMER_BLOCK(GetSplatValue) - - debug::OutputArrayDebug(splatValues, "splatValues"); - debug::OutputArrayDebug(neighborVoxelIds, "neighborVoxelIds"); - - ptSplatPoints.ReleaseResources(); - ptFootprintMins.ReleaseResources(); - ptFootprintMaxs.ReleaseResources(); - neighbor2SplatId.ReleaseResources(); - localNeighborIds.ReleaseResources(); - splatPoints.ReleaseResources(); - footprintMin.ReleaseResources(); - footprintMax.ReleaseResources(); - radii.ReleaseResources(); - - //--------------------------------------------------------------- - // Sort the voxel Ids in ascending order - //--------------------------------------------------------------- - START_TIMER_BLOCK(SortByKey) - vtkm::cont::DeviceAdapterAlgorithm::SortByKey( - neighborVoxelIds, - splatValues); - END_TIMER_BLOCK(SortByKey) - debug::OutputArrayDebug(splatValues, "splatValues"); - - //--------------------------------------------------------------- - // Do a reduction to sum all contributions for each affected voxel - //--------------------------------------------------------------- - START_TIMER_BLOCK(ReduceByKey) - vtkm::cont::DeviceAdapterAlgorithm::ReduceByKey( - neighborVoxelIds, - splatValues, - uniqueVoxelIds, - voxelSplatSums, - vtkm::Add()); - END_TIMER_BLOCK(ReduceByKey) - - debug::OutputArrayDebug(neighborVoxelIds, "neighborVoxelIds"); - debug::OutputArrayDebug(uniqueVoxelIds, "uniqueVoxelIds"); - debug::OutputArrayDebug(voxelSplatSums, "voxelSplatSums"); - // - neighborVoxelIds.ReleaseResources(); - splatValues.ReleaseResources(); - - //--------------------------------------------------------------- - // initialize each field value to zero to begin with - //--------------------------------------------------------------- - IdCountingType indexArray(vtkm::Id(0), 1, numVolumePoints); - vtkm::worklet::DispatcherMapField zeroDispatcher; - zeroDispatcher.Invoke(indexArray, scalarSplatOutput); - // - indexArray.ReleaseResources(); - - //--------------------------------------------------------------- - // Scatter operation to write the previously-computed splat - // value sums into their corresponding entries in the output array - //--------------------------------------------------------------- - vtkm::worklet::DispatcherMapField scatterDispatcher; - - START_TIMER_BLOCK(UpdateVoxelSplats) - scatterDispatcher.Invoke( - uniqueVoxelIds, - voxelSplatSums, - vtkm::exec::ExecutionWholeArray(scalarSplatOutput)); - END_TIMER_BLOCK(UpdateVoxelSplats) - debug::OutputArrayDebug(scalarSplatOutput, "scalarSplatOutput"); - // - uniqueVoxelIds.ReleaseResources(); - voxelSplatSums.ReleaseResources(); - } + START_TIMER_BLOCK(UpdateVoxelSplats) + scatterDispatcher.Invoke(uniqueVoxelIds, voxelSplatSums, + vtkm::exec::ExecutionWholeArray(scalarSplatOutput)); + END_TIMER_BLOCK(UpdateVoxelSplats) + debug::OutputArrayDebug(scalarSplatOutput, "scalarSplatOutput"); + // + uniqueVoxelIds.ReleaseResources(); + voxelSplatSums.ReleaseResources(); + } }; //struct KernelSplatter - - } } //namespace vtkm::worklet diff --git a/vtkm/worklet/Keys.h b/vtkm/worklet/Keys.h index add98ecc5..4ea0de8d9 100644 --- a/vtkm/worklet/Keys.h +++ b/vtkm/worklet/Keys.h @@ -38,8 +38,10 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ /// \brief Manage keys for a \c WorkletReduceByKey. /// @@ -58,7 +60,7 @@ namespace worklet { /// Keys structure is reused for all the \c Invoke. This is more efficient than /// creating a different \c Keys structure for each \c Invoke. /// -template +template class Keys { public: @@ -66,8 +68,7 @@ public: using KeyArrayHandleType = vtkm::cont::ArrayHandle; VTKM_CONT - Keys() - { } + Keys() {} /// \b Construct a Keys class from an array of keys. /// @@ -78,84 +79,60 @@ public: /// keys in the original order after calling this constructor, then make /// a deep copy of the keys first. /// - template - VTKM_CONT - Keys(vtkm::cont::ArrayHandle keys, Device) + template + VTKM_CONT Keys(vtkm::cont::ArrayHandle keys, Device) { this->BuildArrays(keys, Device()); } VTKM_CONT - vtkm::Id GetInputRange() const - { - return this->UniqueKeys.GetNumberOfValues(); - } + vtkm::Id GetInputRange() const { return this->UniqueKeys.GetNumberOfValues(); } VTKM_CONT - KeyArrayHandleType GetUniqueKeys() const - { - return this->UniqueKeys; - } + KeyArrayHandleType GetUniqueKeys() const { return this->UniqueKeys; } VTKM_CONT - vtkm::cont::ArrayHandle GetSortedValuesMap() const - { - return this->SortedValuesMap; - } + vtkm::cont::ArrayHandle GetSortedValuesMap() const { return this->SortedValuesMap; } VTKM_CONT - vtkm::cont::ArrayHandle GetOffsets() const - { - return this->Offsets; - } + vtkm::cont::ArrayHandle GetOffsets() const { return this->Offsets; } VTKM_CONT - vtkm::cont::ArrayHandle GetCounts() const - { - return this->Counts; - } + vtkm::cont::ArrayHandle GetCounts() const { return this->Counts; } VTKM_CONT - vtkm::Id GetNumberOfValues() const - { - return this->SortedValuesMap.GetNumberOfValues(); - } + vtkm::Id GetNumberOfValues() const { return this->SortedValuesMap.GetNumberOfValues(); } - template + template struct ExecutionTypes { using KeyPortal = typename KeyArrayHandleType::template ExecutionTypes::PortalConst; - using IdPortal = typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst; - using IdComponentPortal = typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst; + using IdPortal = + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst; + using IdComponentPortal = typename vtkm::cont::ArrayHandle< + vtkm::IdComponent>::template ExecutionTypes::PortalConst; - using Lookup = vtkm::exec::internal::ReduceByKeyLookup; + using Lookup = vtkm::exec::internal::ReduceByKeyLookup; }; - template - VTKM_CONT - typename ExecutionTypes::Lookup PrepareForInput(Device) const + template + VTKM_CONT typename ExecutionTypes::Lookup PrepareForInput(Device) const { return typename ExecutionTypes::Lookup( - this->UniqueKeys.PrepareForInput(Device()), - this->SortedValuesMap.PrepareForInput(Device()), - this->Offsets.PrepareForInput(Device()), - this->Counts.PrepareForInput(Device())); + this->UniqueKeys.PrepareForInput(Device()), this->SortedValuesMap.PrepareForInput(Device()), + this->Offsets.PrepareForInput(Device()), this->Counts.PrepareForInput(Device())); } VTKM_CONT - bool operator==(const vtkm::worklet::Keys &other) const + bool operator==(const vtkm::worklet::Keys& other) const { return ((this->UniqueKeys == other.UniqueKeys) && - (this->SortedValuesMap == other.SortedValuesMap) && - (this->Offsets == other.Offsets) && + (this->SortedValuesMap == other.SortedValuesMap) && (this->Offsets == other.Offsets) && (this->Counts == other.Counts)); } VTKM_CONT - bool operator!=(const vtkm::worklet::Keys &other) const - { - return !(*this == other); - } + bool operator!=(const vtkm::worklet::Keys& other) const { return !(*this == other); } private: KeyArrayHandleType UniqueKeys; @@ -163,38 +140,29 @@ private: vtkm::cont::ArrayHandle Offsets; vtkm::cont::ArrayHandle Counts; - template - VTKM_CONT - void BuildArrays(KeyArrayType &keys, Device) + template + VTKM_CONT void BuildArrays(KeyArrayType& keys, Device) { using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; vtkm::Id numKeys = keys.GetNumberOfValues(); - Algorithm::Copy(vtkm::cont::ArrayHandleIndex(numKeys), - this->SortedValuesMap); + Algorithm::Copy(vtkm::cont::ArrayHandleIndex(numKeys), this->SortedValuesMap); // TODO: Do we need the ability to specify a comparison functor for sort? Algorithm::SortByKey(keys, this->SortedValuesMap); // Find the unique keys and the number of values per key. - Algorithm::ReduceByKey( - keys, - vtkm::cont::ArrayHandleConstant(1, numKeys), - this->UniqueKeys, - this->Counts, - vtkm::Sum()); + Algorithm::ReduceByKey(keys, vtkm::cont::ArrayHandleConstant(1, numKeys), + this->UniqueKeys, this->Counts, vtkm::Sum()); // Get the offsets from the counts with a scan. - vtkm::Id offsetsTotal = - Algorithm::ScanExclusive( - vtkm::cont::make_ArrayHandleCast(this->Counts, vtkm::Id()), - this->Offsets); + vtkm::Id offsetsTotal = Algorithm::ScanExclusive( + vtkm::cont::make_ArrayHandleCast(this->Counts, vtkm::Id()), this->Offsets); VTKM_ASSERT(offsetsTotal == numKeys); // Sanity check - (void)offsetsTotal; // Shut up, compiler + (void)offsetsTotal; // Shut up, compiler } }; - } } // namespace vtkm::worklet @@ -203,36 +171,32 @@ private: // the arg classes. (The worklet package depends on the cont and exec packages, // not the other way around.) -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ -template -struct TypeCheck > +template +struct TypeCheck> { static const bool value = true; }; -template -struct Transport, - Device> +template +struct Transport, Device> { using ContObjectType = vtkm::worklet::Keys; - using ExecObjectType = - typename ContObjectType::template ExecutionTypes::Lookup; + using ExecObjectType = typename ContObjectType::template ExecutionTypes::Lookup; VTKM_CONT - ExecObjectType operator()(const ContObjectType &object, - const ContObjectType &inputDomain, - vtkm::Id, - vtkm::Id) const + ExecObjectType operator()(const ContObjectType& object, const ContObjectType& inputDomain, + vtkm::Id, vtkm::Id) const { if (object != inputDomain) { - throw vtkm::cont::ErrorBadValue( - "A Keys object must be the input domain."); + throw vtkm::cont::ErrorBadValue("A Keys object must be the input domain."); } return object.PrepareForInput(Device()); @@ -240,37 +204,28 @@ struct Transport - VTKM_CONT - ExecObjectType operator()(const ContObjectType &, - const InputDomainType &, - vtkm::Id, - vtkm::Id) const = delete; + template + VTKM_CONT ExecObjectType operator()(const ContObjectType&, const InputDomainType&, vtkm::Id, + vtkm::Id) const = delete; }; -template -struct Transport< - vtkm::cont::arg::TransportTagKeyedValuesIn, ArrayHandleType, Device> +template +struct Transport { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); using ContObjectType = ArrayHandleType; using IdArrayType = vtkm::cont::ArrayHandle; - using PermutedArrayType = - vtkm::cont::ArrayHandlePermutation; - using GroupedArrayType = - vtkm::cont::ArrayHandleGroupVecVariable; + using PermutedArrayType = vtkm::cont::ArrayHandlePermutation; + using GroupedArrayType = vtkm::cont::ArrayHandleGroupVecVariable; - using ExecObjectType = - typename GroupedArrayType::template ExecutionTypes::PortalConst; + using ExecObjectType = typename GroupedArrayType::template ExecutionTypes::PortalConst; - template - VTKM_CONT - ExecObjectType operator()(const ContObjectType &object, - const vtkm::worklet::Keys &keys, - vtkm::Id, - vtkm::Id) const + template + VTKM_CONT ExecObjectType operator()(const ContObjectType& object, + const vtkm::worklet::Keys& keys, vtkm::Id, + vtkm::Id) const { if (object.GetNumberOfValues() != keys.GetNumberOfValues()) { @@ -288,34 +243,27 @@ struct Transport< } }; -template -struct Transport< - vtkm::cont::arg::TransportTagKeyedValuesInOut, ArrayHandleType, Device> +template +struct Transport { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); using ContObjectType = ArrayHandleType; using IdArrayType = vtkm::cont::ArrayHandle; - using PermutedArrayType = - vtkm::cont::ArrayHandlePermutation; - using GroupedArrayType = - vtkm::cont::ArrayHandleGroupVecVariable; + using PermutedArrayType = vtkm::cont::ArrayHandlePermutation; + using GroupedArrayType = vtkm::cont::ArrayHandleGroupVecVariable; - using ExecObjectType = - typename GroupedArrayType::template ExecutionTypes::Portal; + using ExecObjectType = typename GroupedArrayType::template ExecutionTypes::Portal; - template - VTKM_CONT - ExecObjectType operator()(ContObjectType object, - const vtkm::worklet::Keys &keys, - vtkm::Id, - vtkm::Id) const + template + VTKM_CONT ExecObjectType operator()(ContObjectType object, + const vtkm::worklet::Keys& keys, vtkm::Id, + vtkm::Id) const { if (object.GetNumberOfValues() != keys.GetNumberOfValues()) { - throw vtkm::cont::ErrorBadValue( - "Input/output values array is wrong size."); + throw vtkm::cont::ErrorBadValue("Input/output values array is wrong size."); } PermutedArrayType permutedArray(keys.GetSortedValuesMap(), object); @@ -329,29 +277,23 @@ struct Transport< } }; -template -struct Transport< - vtkm::cont::arg::TransportTagKeyedValuesOut, ArrayHandleType, Device> +template +struct Transport { VTKM_IS_ARRAY_HANDLE(ArrayHandleType); using ContObjectType = ArrayHandleType; using IdArrayType = vtkm::cont::ArrayHandle; - using PermutedArrayType = - vtkm::cont::ArrayHandlePermutation; - using GroupedArrayType = - vtkm::cont::ArrayHandleGroupVecVariable; + using PermutedArrayType = vtkm::cont::ArrayHandlePermutation; + using GroupedArrayType = vtkm::cont::ArrayHandleGroupVecVariable; - using ExecObjectType = - typename GroupedArrayType::template ExecutionTypes::Portal; + using ExecObjectType = typename GroupedArrayType::template ExecutionTypes::Portal; - template - VTKM_CONT - ExecObjectType operator()(ContObjectType object, - const vtkm::worklet::Keys &keys, - vtkm::Id, - vtkm::Id) const + template + VTKM_CONT ExecObjectType operator()(ContObjectType object, + const vtkm::worklet::Keys& keys, vtkm::Id, + vtkm::Id) const { // The PrepareForOutput for ArrayHandleGroupVecVariable and // ArrayHandlePermutation cannot determine the actual size expected for the @@ -368,7 +310,6 @@ struct Transport< return groupedArray.PrepareForOutput(keys.GetInputRange(), Device()); } }; - } } } // namespace vtkm::cont::arg diff --git a/vtkm/worklet/Magnitude.h b/vtkm/worklet/Magnitude.h index 23d253b21..b944465c0 100644 --- a/vtkm/worklet/Magnitude.h +++ b/vtkm/worklet/Magnitude.h @@ -24,8 +24,10 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ class Magnitude : public vtkm::worklet::WorkletMapField { @@ -33,15 +35,12 @@ public: typedef void ControlSignature(FieldIn, FieldOut); typedef void ExecutionSignature(_1, _2); - template - VTKM_EXEC - void operator()(const T &inValue, - T2 &outValue) const + template + VTKM_EXEC void operator()(const T& inValue, T2& outValue) const { outValue = vtkm::Magnitude(inValue); } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/MarchingCubes.h b/vtkm/worklet/MarchingCubes.h index cfa1db0e8..9032f1d12 100644 --- a/vtkm/worklet/MarchingCubes.h +++ b/vtkm/worklet/MarchingCubes.h @@ -48,68 +48,83 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace marchingcubes { +namespace marchingcubes +{ - -template struct float_type { using type = vtkm::FloatDefault; }; -template<> struct float_type< vtkm::Float32 > { using type = vtkm::Float32; }; -template<> struct float_type< vtkm::Float64 > { using type = vtkm::Float64; }; +template +struct float_type +{ + using type = vtkm::FloatDefault; +}; +template <> +struct float_type +{ + using type = vtkm::Float32; +}; +template <> +struct float_type +{ + using type = vtkm::Float64; +}; // ----------------------------------------------------------------------------- -template -vtkm::cont::ArrayHandle make_ScalarField(const vtkm::cont::ArrayHandle& ah) -{ return ah; } +template +vtkm::cont::ArrayHandle make_ScalarField( + const vtkm::cont::ArrayHandle& ah) +{ + return ah; +} -template -vtkm::cont::ArrayHandle make_ScalarField(const vtkm::cont::ArrayHandle& ah) -{ return ah; } +template +vtkm::cont::ArrayHandle make_ScalarField( + const vtkm::cont::ArrayHandle& ah) +{ + return ah; +} -template -vtkm::cont::ArrayHandleCast > -make_ScalarField(const vtkm::cont::ArrayHandle& ah) -{ return vtkm::cont::make_ArrayHandleCast(ah, vtkm::FloatDefault()); } +template +vtkm::cont::ArrayHandleCast> +make_ScalarField(const vtkm::cont::ArrayHandle& ah) +{ + return vtkm::cont::make_ArrayHandleCast(ah, vtkm::FloatDefault()); +} -template -vtkm::cont::ArrayHandleCast > -make_ScalarField(const vtkm::cont::ArrayHandle& ah) -{ return vtkm::cont::make_ArrayHandleCast(ah, vtkm::FloatDefault()); } +template +vtkm::cont::ArrayHandleCast> +make_ScalarField(const vtkm::cont::ArrayHandle& ah) +{ + return vtkm::cont::make_ArrayHandleCast(ah, vtkm::FloatDefault()); +} // --------------------------------------------------------------------------- -template +template class ClassifyCell : public vtkm::worklet::WorkletMapPointToCell { public: - struct ClassifyCellTagType : vtkm::ListTagBase { }; + struct ClassifyCellTagType : vtkm::ListTagBase + { + }; - typedef void ControlSignature( - WholeArrayIn< ClassifyCellTagType > isoValues, - FieldInPoint< ClassifyCellTagType > fieldIn, - CellSetIn cellset, - FieldOutCell< IdComponentType > outNumTriangles, - WholeArrayIn< IdComponentType > numTrianglesTable); - typedef void ExecutionSignature(CellShape,_1, _2, _4, _5); + typedef void ControlSignature(WholeArrayIn isoValues, + FieldInPoint fieldIn, CellSetIn cellset, + FieldOutCell outNumTriangles, + WholeArrayIn numTrianglesTable); + typedef void ExecutionSignature(CellShape, _1, _2, _4, _5); typedef _3 InputDomain; - - template - VTKM_EXEC - void operator()(vtkm::CellShapeTagGeneric shape, - const IsoValuesType& isovalues, - const FieldInType &fieldIn, - vtkm::IdComponent &numTriangles, - const NumTrianglesTablePortalType &numTrianglesTable) const + template + VTKM_EXEC void operator()(vtkm::CellShapeTagGeneric shape, const IsoValuesType& isovalues, + const FieldInType& fieldIn, vtkm::IdComponent& numTriangles, + const NumTrianglesTablePortalType& numTrianglesTable) const { - if(shape.Id == CELL_SHAPE_HEXAHEDRON ) + if (shape.Id == CELL_SHAPE_HEXAHEDRON) { - this->operator()(vtkm::CellShapeTagHexahedron(), - isovalues, - fieldIn, - numTriangles, + this->operator()(vtkm::CellShapeTagHexahedron(), isovalues, fieldIn, numTriangles, numTrianglesTable); } else @@ -118,55 +133,43 @@ public: } } - template - VTKM_EXEC - void operator()(vtkm::CellShapeTagQuad vtkmNotUsed(shape), - const IsoValuesType &vtkmNotUsed(isovalues), - const FieldInType &vtkmNotUsed(fieldIn), - vtkm::IdComponent &vtkmNotUsed(numTriangles), - const NumTrianglesTablePortalType - &vtkmNotUsed(numTrianglesTable)) const + template + VTKM_EXEC void operator()(vtkm::CellShapeTagQuad vtkmNotUsed(shape), + const IsoValuesType& vtkmNotUsed(isovalues), + const FieldInType& vtkmNotUsed(fieldIn), + vtkm::IdComponent& vtkmNotUsed(numTriangles), + const NumTrianglesTablePortalType& vtkmNotUsed(numTrianglesTable)) const { } - template - VTKM_EXEC - void operator()(vtkm::CellShapeTagHexahedron vtkmNotUsed(shape), - const IsoValuesType& isovalues, - const FieldInType &fieldIn, - vtkm::IdComponent &numTriangles, - const NumTrianglesTablePortalType &numTrianglesTable) const + template + VTKM_EXEC void operator()(vtkm::CellShapeTagHexahedron vtkmNotUsed(shape), + const IsoValuesType& isovalues, const FieldInType& fieldIn, + vtkm::IdComponent& numTriangles, + const NumTrianglesTablePortalType& numTrianglesTable) const { vtkm::IdComponent sum = 0; - for(vtkm::Id i=0; i < isovalues.GetNumberOfValues(); ++i) + for (vtkm::Id i = 0; i < isovalues.GetNumberOfValues(); ++i) { - const vtkm::IdComponent caseNumber = ((fieldIn[0] > isovalues[i]) | - (fieldIn[1] > isovalues[i]) << 1 | - (fieldIn[2] > isovalues[i]) << 2 | - (fieldIn[3] > isovalues[i]) << 3 | - (fieldIn[4] > isovalues[i]) << 4 | - (fieldIn[5] > isovalues[i]) << 5 | - (fieldIn[6] > isovalues[i]) << 6 | - (fieldIn[7] > isovalues[i]) << 7); - sum += numTrianglesTable.Get(caseNumber); + const vtkm::IdComponent caseNumber = + ((fieldIn[0] > isovalues[i]) | (fieldIn[1] > isovalues[i]) << 1 | + (fieldIn[2] > isovalues[i]) << 2 | (fieldIn[3] > isovalues[i]) << 3 | + (fieldIn[4] > isovalues[i]) << 4 | (fieldIn[5] > isovalues[i]) << 5 | + (fieldIn[6] > isovalues[i]) << 6 | (fieldIn[7] > isovalues[i]) << 7); + sum += numTrianglesTable.Get(caseNumber); } numTriangles = sum; } }; - /// \brief Used to store data need for the EdgeWeightGenerate worklet. /// This information is not passed as part of the arguments to the worklet as /// that dramatically increase compile time by 200% // ----------------------------------------------------------------------------- -template< typename DeviceAdapter > +template class EdgeWeightGenerateMetaData { - template + template struct PortalTypes { typedef vtkm::cont::ArrayHandle HandleType; @@ -178,27 +181,26 @@ class EdgeWeightGenerateMetaData public: VTKM_CONT - EdgeWeightGenerateMetaData( - vtkm::Id size, - vtkm::cont::ArrayHandle< vtkm::FloatDefault >& interpWeights, - vtkm::cont::ArrayHandle& interpIds, - vtkm::cont::ArrayHandle& interpCellIds, - vtkm::cont::ArrayHandle& interpContourId, - const vtkm::cont::ArrayHandle< vtkm::IdComponent >& edgeTable, - const vtkm::cont::ArrayHandle< vtkm::IdComponent >& numTriTable, - const vtkm::cont::ArrayHandle< vtkm::IdComponent >& triTable, - const vtkm::worklet::ScatterCounting& scatter): - InterpWeightsPortal( interpWeights.PrepareForOutput( 3*size, DeviceAdapter()) ), - InterpIdPortal( interpIds.PrepareForOutput( 3*size, DeviceAdapter() ) ), - InterpCellIdPortal( interpCellIds .PrepareForOutput( 3*size, DeviceAdapter() ) ), - InterpContourPortal( interpContourId.PrepareForOutput( 3*size, DeviceAdapter() ) ), - EdgeTable( edgeTable.PrepareForInput(DeviceAdapter()) ), - NumTriTable( numTriTable.PrepareForInput(DeviceAdapter()) ), - TriTable( triTable.PrepareForInput(DeviceAdapter()) ), - Scatter(scatter) + EdgeWeightGenerateMetaData(vtkm::Id size, + vtkm::cont::ArrayHandle& interpWeights, + vtkm::cont::ArrayHandle& interpIds, + vtkm::cont::ArrayHandle& interpCellIds, + vtkm::cont::ArrayHandle& interpContourId, + const vtkm::cont::ArrayHandle& edgeTable, + const vtkm::cont::ArrayHandle& numTriTable, + const vtkm::cont::ArrayHandle& triTable, + const vtkm::worklet::ScatterCounting& scatter) + : InterpWeightsPortal(interpWeights.PrepareForOutput(3 * size, DeviceAdapter())) + , InterpIdPortal(interpIds.PrepareForOutput(3 * size, DeviceAdapter())) + , InterpCellIdPortal(interpCellIds.PrepareForOutput(3 * size, DeviceAdapter())) + , InterpContourPortal(interpContourId.PrepareForOutput(3 * size, DeviceAdapter())) + , EdgeTable(edgeTable.PrepareForInput(DeviceAdapter())) + , NumTriTable(numTriTable.PrepareForInput(DeviceAdapter())) + , TriTable(triTable.PrepareForInput(DeviceAdapter())) + , Scatter(scatter) { - // Interp needs to be 3 times longer than size as they are per point of the - // output triangle + // Interp needs to be 3 times longer than size as they are per point of the + // output triangle } typename PortalTypes::Portal InterpWeightsPortal; typename PortalTypes::Portal InterpIdPortal; @@ -213,164 +215,132 @@ public: /// \brief Compute the weights for each edge that is used to generate /// a point in the resulting iso-surface // ----------------------------------------------------------------------------- -template< typename T, typename DeviceAdapter > +template class EdgeWeightGenerate : public vtkm::worklet::WorkletMapPointToCell { public: - struct ClassifyCellTagType : vtkm::ListTagBase { }; + struct ClassifyCellTagType : vtkm::ListTagBase + { + }; typedef vtkm::worklet::ScatterCounting ScatterType; typedef void ControlSignature( - CellSetIn cellset, // Cell set - WholeArrayIn< ClassifyCellTagType > isoValues, - FieldInPoint< ClassifyCellTagType > fieldIn // Input point field defining the contour - ); - typedef void ExecutionSignature(CellShape, _2, _3, InputIndex, WorkIndex, VisitIndex, FromIndices); + CellSetIn cellset, // Cell set + WholeArrayIn isoValues, + FieldInPoint fieldIn // Input point field defining the contour + ); + typedef void ExecutionSignature(CellShape, _2, _3, InputIndex, WorkIndex, VisitIndex, + FromIndices); typedef _1 InputDomain; - VTKM_CONT - EdgeWeightGenerate(const EdgeWeightGenerateMetaData& meta) : - MetaData( meta ) + EdgeWeightGenerate(const EdgeWeightGenerateMetaData& meta) + : MetaData(meta) { } - template - VTKM_EXEC - void operator()( - vtkm::CellShapeTagGeneric shape, - const IsoValuesType &isovalues, - const FieldInType & fieldIn, // Input point field defining the contour - vtkm::Id inputCellId, - vtkm::Id outputCellId, - vtkm::IdComponent visitIndex, - const IndicesVecType & indices) const + template + VTKM_EXEC void operator()(vtkm::CellShapeTagGeneric shape, const IsoValuesType& isovalues, + const FieldInType& fieldIn, // Input point field defining the contour + vtkm::Id inputCellId, vtkm::Id outputCellId, + vtkm::IdComponent visitIndex, const IndicesVecType& indices) const { //covers when we have hexs coming from unstructured data - if(shape.Id == CELL_SHAPE_HEXAHEDRON ) + if (shape.Id == CELL_SHAPE_HEXAHEDRON) { - this->operator()(vtkm::CellShapeTagHexahedron(), - isovalues, - fieldIn, - inputCellId, - outputCellId, - visitIndex, - indices); + this->operator()(vtkm::CellShapeTagHexahedron(), isovalues, fieldIn, inputCellId, + outputCellId, visitIndex, indices); } } - template - VTKM_EXEC - void operator()( - CellShapeTagQuad vtkmNotUsed(shape), - const IsoValuesType &vtkmNotUsed(isovalues), - const FieldInType & vtkmNotUsed(fieldIn), // Input point field defining the contour - vtkm::Id vtkmNotUsed(inputCellId), - vtkm::Id vtkmNotUsed(outputCellId), - vtkm::IdComponent vtkmNotUsed(visitIndex), - const IndicesVecType & vtkmNotUsed(indices) ) const + template + VTKM_EXEC void operator()( + CellShapeTagQuad vtkmNotUsed(shape), const IsoValuesType& vtkmNotUsed(isovalues), + const FieldInType& vtkmNotUsed(fieldIn), // Input point field defining the contour + vtkm::Id vtkmNotUsed(inputCellId), vtkm::Id vtkmNotUsed(outputCellId), + vtkm::IdComponent vtkmNotUsed(visitIndex), const IndicesVecType& vtkmNotUsed(indices)) const { //covers when we have quads coming from 2d structured data } - template - VTKM_EXEC - void operator()( - vtkm::CellShapeTagHexahedron, - const IsoValuesType &isovalues, - const FieldInType &fieldIn, // Input point field defining the contour - vtkm::Id inputCellId, - vtkm::Id outputCellId, - vtkm::IdComponent visitIndex, - const IndicesVecType &indices) const + template + VTKM_EXEC void operator()(vtkm::CellShapeTagHexahedron, const IsoValuesType& isovalues, + const FieldInType& fieldIn, // Input point field defining the contour + vtkm::Id inputCellId, vtkm::Id outputCellId, + vtkm::IdComponent visitIndex, const IndicesVecType& indices) const { //covers when we have hexs coming from 3d structured data const vtkm::Id outputPointId = 3 * outputCellId; typedef typename vtkm::VecTraits::ComponentType FieldType; vtkm::IdComponent sum = 0, caseNumber = 0; - vtkm::IdComponent i=0, size = static_cast(isovalues.GetNumberOfValues()); - for(i=0; i < size; ++i) + vtkm::IdComponent i = 0, size = static_cast(isovalues.GetNumberOfValues()); + for (i = 0; i < size; ++i) { const FieldType ivalue = isovalues[i]; // Compute the Marching Cubes case number for this cell. We need to iterate // the isovalues until the sum >= our visit index. But we need to make // sure the caseNumber is correct before stoping - caseNumber = ((fieldIn[0] > ivalue) | - (fieldIn[1] > ivalue) << 1 | - (fieldIn[2] > ivalue) << 2 | - (fieldIn[3] > ivalue) << 3 | - (fieldIn[4] > ivalue) << 4 | - (fieldIn[5] > ivalue) << 5 | - (fieldIn[6] > ivalue) << 6 | - (fieldIn[7] > ivalue) << 7); - sum += MetaData.NumTriTable.Get(caseNumber); - if(sum > visitIndex) + caseNumber = + ((fieldIn[0] > ivalue) | (fieldIn[1] > ivalue) << 1 | (fieldIn[2] > ivalue) << 2 | + (fieldIn[3] > ivalue) << 3 | (fieldIn[4] > ivalue) << 4 | (fieldIn[5] > ivalue) << 5 | + (fieldIn[6] > ivalue) << 6 | (fieldIn[7] > ivalue) << 7); + sum += MetaData.NumTriTable.Get(caseNumber); + if (sum > visitIndex) { break; } } - visitIndex = sum - visitIndex - 1; // Interpolate for vertex positions and associated scalar values - const vtkm::Id triTableOffset = - static_cast(caseNumber*16 + visitIndex*3); + const vtkm::Id triTableOffset = static_cast(caseNumber * 16 + visitIndex * 3); for (vtkm::IdComponent triVertex = 0; triVertex < 3; triVertex++) { - const vtkm::IdComponent edgeIndex = - MetaData.TriTable.Get(triTableOffset + triVertex); - const vtkm::IdComponent edgeVertex0 = MetaData.EdgeTable.Get(2*edgeIndex + 0); - const vtkm::IdComponent edgeVertex1 = MetaData.EdgeTable.Get(2*edgeIndex + 1); + const vtkm::IdComponent edgeIndex = MetaData.TriTable.Get(triTableOffset + triVertex); + const vtkm::IdComponent edgeVertex0 = MetaData.EdgeTable.Get(2 * edgeIndex + 0); + const vtkm::IdComponent edgeVertex1 = MetaData.EdgeTable.Get(2 * edgeIndex + 1); const FieldType fieldValue0 = fieldIn[edgeVertex0]; const FieldType fieldValue1 = fieldIn[edgeVertex1]; // Store the input cell id so that we can properly generate the normals // in a subsequent call, after we have merged duplicate points - MetaData.InterpCellIdPortal.Set(outputPointId+triVertex, inputCellId); + MetaData.InterpCellIdPortal.Set(outputPointId + triVertex, inputCellId); - MetaData.InterpContourPortal.Set(outputPointId+triVertex, static_cast(i) ); + MetaData.InterpContourPortal.Set(outputPointId + triVertex, static_cast(i)); - MetaData.InterpIdPortal.Set( - outputPointId+triVertex, - vtkm::Id2(indices[edgeVertex0], - indices[edgeVertex1])); + MetaData.InterpIdPortal.Set(outputPointId + triVertex, + vtkm::Id2(indices[edgeVertex0], indices[edgeVertex1])); - vtkm::FloatDefault interpolant = - static_cast(isovalues[i] - fieldValue0) / - static_cast(fieldValue1 - fieldValue0); + vtkm::FloatDefault interpolant = static_cast(isovalues[i] - fieldValue0) / + static_cast(fieldValue1 - fieldValue0); - MetaData.InterpWeightsPortal.Set(outputPointId+triVertex, interpolant); + MetaData.InterpWeightsPortal.Set(outputPointId + triVertex, interpolant); } } VTKM_CONT - ScatterType GetScatter() const - { - return this->MetaData.Scatter; - } + ScatterType GetScatter() const { return this->MetaData.Scatter; } private: EdgeWeightGenerateMetaData MetaData; - void operator=(const EdgeWeightGenerate &) = delete; + void operator=(const EdgeWeightGenerate&) = delete; }; // --------------------------------------------------------------------------- class ApplyToField : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn< Id2Type > interpolation_ids, - FieldIn< Scalar > interpolation_weights, - WholeArrayIn<> inputField, - FieldOut<> output - ); + typedef void ControlSignature(FieldIn interpolation_ids, + FieldIn interpolation_weights, WholeArrayIn<> inputField, + FieldOut<> output); typedef void ExecutionSignature(_1, _2, _3, _4); typedef _1 InputDomain; @@ -378,36 +348,30 @@ public: ApplyToField() {} template - VTKM_EXEC - void operator()(const vtkm::Id2& low_high, - const WeightType &weight, - const InFieldPortalType& inPortal, - OutFieldType &result) const + VTKM_EXEC void operator()(const vtkm::Id2& low_high, const WeightType& weight, + const InFieldPortalType& inPortal, OutFieldType& result) const { //fetch the low / high values from inPortal - result = vtkm::Lerp(inPortal.Get(low_high[0]), - inPortal.Get(low_high[1]), - weight); + result = vtkm::Lerp(inPortal.Get(low_high[0]), inPortal.Get(low_high[1]), weight); } }; // --------------------------------------------------------------------------- struct MultiContourLess { - template + template VTKM_EXEC_CONT bool operator()(const T& a, const T& b) const { return a < b; } - template - VTKM_EXEC_CONT bool operator()(const vtkm::Pair& a, - const vtkm::Pair& b) const + template + VTKM_EXEC_CONT bool operator()(const vtkm::Pair& a, const vtkm::Pair& b) const { return (a.first < b.first) || (!(b.first < a.first) && (a.second < b.second)); } - template + template VTKM_EXEC_CONT bool operator()(const vtkm::internal::ArrayPortalValueReference& a, const U& b) const { @@ -419,25 +383,15 @@ struct MultiContourLess // --------------------------------------------------------------------------- struct MergeDuplicateValues : vtkm::worklet::WorkletReduceByKey { - typedef void ControlSignature(KeysIn keys, - ValuesIn<> valuesIn1, - ValuesIn<> valuesIn2, - ReducedValuesOut<> valueOut1, - ReducedValuesOut<> valueOut2); + typedef void ControlSignature(KeysIn keys, ValuesIn<> valuesIn1, ValuesIn<> valuesIn2, + ReducedValuesOut<> valueOut1, ReducedValuesOut<> valueOut2); typedef void ExecutionSignature(_1, _2, _3, _4, _5); typedef _1 InputDomain; - template - VTKM_EXEC - void operator()(const T &, - const ValuesInType &values1, - const Values2InType &values2, - ValuesOutType &valueOut1, - Values2OutType &valueOut2) const + template + VTKM_EXEC void operator()(const T&, const ValuesInType& values1, const Values2InType& values2, + ValuesOutType& valueOut1, Values2OutType& valueOut2) const { valueOut1 = values1[0]; valueOut2 = values2[0]; @@ -451,30 +405,23 @@ struct CopyEdgeIds : vtkm::worklet::WorkletMapField typedef void ExecutionSignature(_1, _2); typedef _1 InputDomain; - VTKM_EXEC - void operator()(const vtkm::Id2& input, vtkm::Id2& output) const - { - output = input; - } + void operator()(const vtkm::Id2& input, vtkm::Id2& output) const { output = input; } - template - VTKM_EXEC - void operator()(const vtkm::Pair& input, vtkm::Id2& output) const + template + VTKM_EXEC void operator()(const vtkm::Pair& input, vtkm::Id2& output) const { output = input.second; } }; // --------------------------------------------------------------------------- -template -void -MergeDuplicates(const vtkm::cont::ArrayHandle& original_keys, - vtkm::cont::ArrayHandle& weights, - vtkm::cont::ArrayHandle& edgeIds, - vtkm::cont::ArrayHandle& cellids, - vtkm::cont::ArrayHandle& connectivity, - DeviceAdapterTag) +template +void MergeDuplicates(const vtkm::cont::ArrayHandle& original_keys, + vtkm::cont::ArrayHandle& weights, + vtkm::cont::ArrayHandle& edgeIds, + vtkm::cont::ArrayHandle& cellids, + vtkm::cont::ArrayHandle& connectivity, DeviceAdapterTag) { using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; @@ -484,21 +431,18 @@ MergeDuplicates(const vtkm::cont::ArrayHandle& original_key input_keys.ReleaseResources(); { - vtkm::worklet::DispatcherReduceByKey dispatcher; - vtkm::cont::ArrayHandle writeCells; - vtkm::cont::ArrayHandle writeWeights; - dispatcher.Invoke(keys, - weights, - cellids, - writeWeights, - writeCells); - weights = writeWeights; - cellids = writeCells; + vtkm::worklet::DispatcherReduceByKey dispatcher; + vtkm::cont::ArrayHandle writeCells; + vtkm::cont::ArrayHandle writeWeights; + dispatcher.Invoke(keys, weights, cellids, writeWeights, writeCells); + weights = writeWeights; + cellids = writeCells; } //need to build the new connectivity auto uniqueKeys = keys.GetUniqueKeys(); - Algorithm::LowerBounds(uniqueKeys, original_keys, connectivity, marchingcubes::MultiContourLess()); + Algorithm::LowerBounds(uniqueKeys, original_keys, connectivity, + marchingcubes::MultiContourLess()); //update the edge ids vtkm::worklet::DispatcherMapField edgeDispatcher; @@ -508,30 +452,27 @@ MergeDuplicates(const vtkm::cont::ArrayHandle& original_key /// \brief Compute the weights for each edge that is used to generate /// a point in the resulting iso-surface // ----------------------------------------------------------------------------- -template +template class NormalWorklet : public vtkm::worklet::WorkletMapPointToCell { public: - struct ClassifyCellTagType : vtkm::ListTagBase< typename float_type::type > { }; + struct ClassifyCellTagType : vtkm::ListTagBase::type> + { + }; - typedef void ControlSignature( - CellSetIn cellset, // Cell set - FieldInPoint< ClassifyCellTagType > field, - FieldInPoint< Vec3 > originalCellPoints, - FieldInCell< Id2Type > edges, - FieldInCell< Scalar > weights, - FieldOutCell< Vec3 > normal - ); + typedef void ControlSignature(CellSetIn cellset, // Cell set + FieldInPoint field, + FieldInPoint originalCellPoints, FieldInCell edges, + FieldInCell weights, FieldOutCell normal); typedef void ExecutionSignature(CellShape, FromIndices, _2, _3, _4, _5, _6); typedef _1 InputDomain; - template - VTKM_EXEC void operator()(CellType shape, const IndicesVecType& indices, - const FieldType& fieldIn, const CoordType& coords, const EdgeType& edges, - const WeightType& weight, NormalType& normal) const + template + VTKM_EXEC void operator()(CellType shape, const IndicesVecType& indices, const FieldType& fieldIn, + const CoordType& coords, const EdgeType& edges, + const WeightType& weight, NormalType& normal) const { // steps to get the normal calculation to work. // we need to back compute the correct parametric point @@ -551,69 +492,53 @@ public: } auto grad0 = vtkm::exec::CellDerivative( - fieldIn, coords, - vtkm::exec::ParametricCoordinatesPoint( - fieldIn.GetNumberOfComponents(), edgeVertex0, shape, *this), + fieldIn, coords, vtkm::exec::ParametricCoordinatesPoint(fieldIn.GetNumberOfComponents(), + edgeVertex0, shape, *this), shape, *this); auto grad1 = vtkm::exec::CellDerivative( - fieldIn, coords, - vtkm::exec::ParametricCoordinatesPoint( - fieldIn.GetNumberOfComponents(), edgeVertex1, shape, *this), + fieldIn, coords, vtkm::exec::ParametricCoordinatesPoint(fieldIn.GetNumberOfComponents(), + edgeVertex1, shape, *this), shape, *this); - - normal = vtkm::Normal(vtkm::Lerp(grad0,grad1,weight)); + normal = vtkm::Normal(vtkm::Lerp(grad0, grad1, weight)); } }; - - // --------------------------------------------------------------------------- //missing we need the original cells field //missing we need the original cells coordinates -template< typename InputFieldType, - typename InputStorageType, - typename CoordinateSystem, - typename NormalCType, - typename DeviceAdapter > +template struct GenerateNormals { - GenerateNormals(vtkm::cont::ArrayHandle< vtkm::Vec >& normals, + GenerateNormals(vtkm::cont::ArrayHandle>& normals, const vtkm::cont::ArrayHandle& field, - const CoordinateSystem& coordinates, - vtkm::cont::ArrayHandle& cellIds, + const CoordinateSystem& coordinates, vtkm::cont::ArrayHandle& cellIds, vtkm::cont::ArrayHandle& edges, - vtkm::cont::ArrayHandle& weights): - Field(field), - Coordinates(coordinates), - CellIds(cellIds), - Edges(edges), - Weights(weights), - OutputNormals(normals) + vtkm::cont::ArrayHandle& weights) + : Field(field) + , Coordinates(coordinates) + , CellIds(cellIds) + , Edges(edges) + , Weights(weights) + , OutputNormals(normals) { } - template - void operator()(const CellSetType &cellset) const + void operator()(const CellSetType& cellset) const { vtkm::cont::CellSetPermutation permutation; permutation.Fill(this->CellIds, cellset); - using NormalDispatcher = typename vtkm::worklet::DispatcherMapTopology< - NormalWorklet, - DeviceAdapter - >; + using NormalDispatcher = + typename vtkm::worklet::DispatcherMapTopology, DeviceAdapter>; NormalDispatcher dispatcher; - dispatcher.Invoke( permutation, - marchingcubes::make_ScalarField(this->Field), - this->Coordinates, - this->Edges, - this->Weights, - this->OutputNormals ); + dispatcher.Invoke(permutation, marchingcubes::make_ScalarField(this->Field), this->Coordinates, + this->Edges, this->Weights, this->OutputNormals); } const vtkm::cont::ArrayHandle& Field; @@ -621,278 +546,214 @@ struct GenerateNormals vtkm::cont::ArrayHandle& CellIds; vtkm::cont::ArrayHandle& Edges; vtkm::cont::ArrayHandle& Weights; - vtkm::cont::ArrayHandle< vtkm::Vec >& OutputNormals; + vtkm::cont::ArrayHandle>& OutputNormals; }; - } /// \brief Compute the isosurface for a uniform grid data set class MarchingCubes { public: + //---------------------------------------------------------------------------- + MarchingCubes(bool mergeDuplicates = true) + : MergeDuplicatePoints(mergeDuplicates) + , EdgeTable() + , NumTrianglesTable() + , TriangleTable() + , InterpolationWeights() + , InterpolationEdgeIds() + { + // Set up the Marching Cubes case tables as part of the filter so that + // we cache these tables in the execution environment between execution runs + this->EdgeTable = vtkm::cont::make_ArrayHandle(vtkm::worklet::internal::edgeTable, 24); -//---------------------------------------------------------------------------- -MarchingCubes(bool mergeDuplicates=true): - MergeDuplicatePoints(mergeDuplicates), - EdgeTable(), - NumTrianglesTable(), - TriangleTable(), - InterpolationWeights(), - InterpolationEdgeIds() -{ - // Set up the Marching Cubes case tables as part of the filter so that - // we cache these tables in the execution environment between execution runs - this->EdgeTable = - vtkm::cont::make_ArrayHandle(vtkm::worklet::internal::edgeTable, 24); + this->NumTrianglesTable = + vtkm::cont::make_ArrayHandle(vtkm::worklet::internal::numTrianglesTable, 256); - this->NumTrianglesTable = - vtkm::cont::make_ArrayHandle(vtkm::worklet::internal::numTrianglesTable, 256); + this->TriangleTable = vtkm::cont::make_ArrayHandle(vtkm::worklet::internal::triTable, 256 * 16); + } - this->TriangleTable = - vtkm::cont::make_ArrayHandle(vtkm::worklet::internal::triTable, 256*16); -} + //---------------------------------------------------------------------------- + void SetMergeDuplicatePoints(bool merge) { this->MergeDuplicatePoints = merge; } -//---------------------------------------------------------------------------- -void SetMergeDuplicatePoints(bool merge) -{ - this->MergeDuplicatePoints = merge; -} + //---------------------------------------------------------------------------- + bool GetMergeDuplicatePoints() const { return this->MergeDuplicatePoints; } -//---------------------------------------------------------------------------- -bool GetMergeDuplicatePoints( ) const -{ - return this->MergeDuplicatePoints; -} + //---------------------------------------------------------------------------- + template + vtkm::cont::CellSetSingleType<> Run( + const ValueType* const isovalues, const vtkm::Id numIsoValues, const CellSetType& cells, + const CoordinateSystem& coordinateSystem, + const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle, StorageTagVertices> vertices, + const DeviceAdapter& device) + { + vtkm::cont::ArrayHandle> normals; + return this->DoRun(isovalues, numIsoValues, cells, coordinateSystem, input, vertices, normals, + false, device); + } -//---------------------------------------------------------------------------- -template -vtkm::cont::CellSetSingleType< > - Run(const ValueType* const isovalues, - const vtkm::Id numIsoValues, - const CellSetType& cells, - const CoordinateSystem& coordinateSystem, - const vtkm::cont::ArrayHandle& input, - vtkm::cont::ArrayHandle< vtkm::Vec, StorageTagVertices > vertices, - const DeviceAdapter& device) -{ - vtkm::cont::ArrayHandle< vtkm::Vec > normals; - return this->DoRun(isovalues,numIsoValues,cells,coordinateSystem,input,vertices,normals,false,device); -} + //---------------------------------------------------------------------------- + template + vtkm::cont::CellSetSingleType<> Run( + const ValueType* const isovalues, const vtkm::Id numIsoValues, const CellSetType& cells, + const CoordinateSystem& coordinateSystem, + const vtkm::cont::ArrayHandle& input, + vtkm::cont::ArrayHandle, StorageTagVertices> vertices, + vtkm::cont::ArrayHandle, StorageTagNormals> normals, + const DeviceAdapter& device) + { + return this->DoRun(isovalues, numIsoValues, cells, coordinateSystem, input, vertices, normals, + true, device); + } -//---------------------------------------------------------------------------- -template -vtkm::cont::CellSetSingleType< > - Run(const ValueType* const isovalues, - const vtkm::Id numIsoValues, - const CellSetType& cells, - const CoordinateSystem& coordinateSystem, - const vtkm::cont::ArrayHandle& input, - vtkm::cont::ArrayHandle< vtkm::Vec, StorageTagVertices > vertices, - vtkm::cont::ArrayHandle< vtkm::Vec, StorageTagNormals > normals, - const DeviceAdapter& device) -{ - return this->DoRun(isovalues,numIsoValues,cells,coordinateSystem,input,vertices,normals,true,device); -} + //---------------------------------------------------------------------------- + template + void MapFieldOntoIsosurface(const ArrayHandleIn& input, ArrayHandleOut& output, + const DeviceAdapter&) + { + using vtkm::worklet::marchingcubes::ApplyToField; + ApplyToField applyToField; + vtkm::worklet::DispatcherMapField applyFieldDispatcher( + applyToField); -//---------------------------------------------------------------------------- -template -void MapFieldOntoIsosurface(const ArrayHandleIn& input, - ArrayHandleOut& output, - const DeviceAdapter&) -{ - using vtkm::worklet::marchingcubes::ApplyToField; - ApplyToField applyToField; - vtkm::worklet::DispatcherMapField applyFieldDispatcher(applyToField); - - - //todo: need to use the policy to get the correct storage tag for output - applyFieldDispatcher.Invoke(this->InterpolationEdgeIds, - this->InterpolationWeights, - input, - output); -} + //todo: need to use the policy to get the correct storage tag for output + applyFieldDispatcher.Invoke(this->InterpolationEdgeIds, this->InterpolationWeights, input, + output); + } private: + //---------------------------------------------------------------------------- + template + vtkm::cont::CellSetSingleType<> DoRun( + const ValueType* isovalues, const vtkm::Id numIsoValues, const CellSetType& cells, + const CoordinateSystem& coordinateSystem, + const vtkm::cont::ArrayHandle& inputField, + vtkm::cont::ArrayHandle, StorageTagVertices> vertices, + vtkm::cont::ArrayHandle, StorageTagNormals> normals, bool withNormals, + const DeviceAdapter&) + { + using vtkm::worklet::marchingcubes::ApplyToField; + using vtkm::worklet::marchingcubes::EdgeWeightGenerate; + using vtkm::worklet::marchingcubes::EdgeWeightGenerateMetaData; + using vtkm::worklet::marchingcubes::ClassifyCell; -//---------------------------------------------------------------------------- -template -vtkm::cont::CellSetSingleType< > - DoRun(const ValueType* isovalues, - const vtkm::Id numIsoValues, - const CellSetType& cells, - const CoordinateSystem& coordinateSystem, - const vtkm::cont::ArrayHandle& inputField, - vtkm::cont::ArrayHandle< vtkm::Vec, StorageTagVertices > vertices, - vtkm::cont::ArrayHandle< vtkm::Vec, StorageTagNormals > normals, - bool withNormals, - const DeviceAdapter& ) -{ - using vtkm::worklet::marchingcubes::ApplyToField; - using vtkm::worklet::marchingcubes::EdgeWeightGenerate; - using vtkm::worklet::marchingcubes::EdgeWeightGenerateMetaData; - using vtkm::worklet::marchingcubes::ClassifyCell; + // Setup the Dispatcher Typedefs + using ClassifyDispatcher = + typename vtkm::worklet::DispatcherMapTopology, DeviceAdapter>; - // Setup the Dispatcher Typedefs - using ClassifyDispatcher = typename vtkm::worklet::DispatcherMapTopology< - ClassifyCell, - DeviceAdapter - >; + using GenerateDispatcher = + typename vtkm::worklet::DispatcherMapTopology, + DeviceAdapter>; - using GenerateDispatcher = typename vtkm::worklet::DispatcherMapTopology< - EdgeWeightGenerate, - DeviceAdapter - >; - - vtkm::cont::ArrayHandle isoValuesHandle = + vtkm::cont::ArrayHandle isoValuesHandle = vtkm::cont::make_ArrayHandle(isovalues, numIsoValues); - // Call the ClassifyCell functor to compute the Marching Cubes case numbers - // for each cell, and the number of vertices to be generated + // Call the ClassifyCell functor to compute the Marching Cubes case numbers + // for each cell, and the number of vertices to be generated - vtkm::cont::ArrayHandle numOutputTrisPerCell; + vtkm::cont::ArrayHandle numOutputTrisPerCell; - { - ClassifyCell classifyCell; - ClassifyDispatcher classifyCellDispatcher(classifyCell); - classifyCellDispatcher.Invoke(isoValuesHandle, - inputField, - cells, - numOutputTrisPerCell, - this->NumTrianglesTable); - } - - //Pass 2 Generate the edges - vtkm::cont::ArrayHandle contourIds; - vtkm::cont::ArrayHandle originalCellIds; - { - vtkm::worklet::ScatterCounting scatter(numOutputTrisPerCell, DeviceAdapter()); - - EdgeWeightGenerateMetaData< DeviceAdapter - > metaData( scatter.GetOutputRange(numOutputTrisPerCell.GetNumberOfValues()), - this->InterpolationWeights, - this->InterpolationEdgeIds, - originalCellIds, - contourIds, - this->EdgeTable, - this->NumTrianglesTable, - this->TriangleTable, - scatter - ); - - EdgeWeightGenerate weightGenerate( metaData ); - GenerateDispatcher edgeDispatcher(weightGenerate); - edgeDispatcher.Invoke( cells, - //cast to a scalar field if not one, as cellderivative only works on those - isoValuesHandle, - inputField - ); - } - - if(numIsoValues <= 1 || !this->MergeDuplicatePoints) - { //release memory early that we are not going to need again - contourIds.ReleaseResources(); - } - - vtkm::cont::DataSet output; - vtkm::cont::ArrayHandle< vtkm::Id > connectivity; - if(this->MergeDuplicatePoints) - { - // In all the below cases you will notice that only interpolation ids - // are updated. That is because MergeDuplicates will internally update - // the InterpolationWeights and InterpolationOriginCellIds arrays to be the correct for the - // output. But for InterpolationEdgeIds we need to do it manually once done - if(numIsoValues == 1) { - marchingcubes::MergeDuplicates( - this->InterpolationEdgeIds, //keys - this->InterpolationWeights, //values - this->InterpolationEdgeIds, //values - originalCellIds, //values - connectivity, // computed using lower bounds - DeviceAdapter() ); + ClassifyCell classifyCell; + ClassifyDispatcher classifyCellDispatcher(classifyCell); + classifyCellDispatcher.Invoke(isoValuesHandle, inputField, cells, numOutputTrisPerCell, + this->NumTrianglesTable); } - else if(numIsoValues > 1) + + //Pass 2 Generate the edges + vtkm::cont::ArrayHandle contourIds; + vtkm::cont::ArrayHandle originalCellIds; { - marchingcubes::MergeDuplicates( + vtkm::worklet::ScatterCounting scatter(numOutputTrisPerCell, DeviceAdapter()); + + EdgeWeightGenerateMetaData metaData( + scatter.GetOutputRange(numOutputTrisPerCell.GetNumberOfValues()), + this->InterpolationWeights, this->InterpolationEdgeIds, originalCellIds, contourIds, + this->EdgeTable, this->NumTrianglesTable, this->TriangleTable, scatter); + + EdgeWeightGenerate weightGenerate(metaData); + GenerateDispatcher edgeDispatcher(weightGenerate); + edgeDispatcher.Invoke( + cells, + //cast to a scalar field if not one, as cellderivative only works on those + isoValuesHandle, inputField); + } + + if (numIsoValues <= 1 || !this->MergeDuplicatePoints) + { //release memory early that we are not going to need again + contourIds.ReleaseResources(); + } + + vtkm::cont::DataSet output; + vtkm::cont::ArrayHandle connectivity; + if (this->MergeDuplicatePoints) + { + // In all the below cases you will notice that only interpolation ids + // are updated. That is because MergeDuplicates will internally update + // the InterpolationWeights and InterpolationOriginCellIds arrays to be the correct for the + // output. But for InterpolationEdgeIds we need to do it manually once done + if (numIsoValues == 1) + { + marchingcubes::MergeDuplicates(this->InterpolationEdgeIds, //keys + this->InterpolationWeights, //values + this->InterpolationEdgeIds, //values + originalCellIds, //values + connectivity, // computed using lower bounds + DeviceAdapter()); + } + else if (numIsoValues > 1) + { + marchingcubes::MergeDuplicates( vtkm::cont::make_ArrayHandleZip(contourIds, this->InterpolationEdgeIds), //keys - this->InterpolationWeights, //values - this->InterpolationEdgeIds, //values - originalCellIds, //values + this->InterpolationWeights, //values + this->InterpolationEdgeIds, //values + originalCellIds, //values connectivity, // computed using lower bounds - DeviceAdapter() ); + DeviceAdapter()); + } } + else + { + //when we don't merge points, the connectivity array can be represented + //by a counting array. The danger of doing it this way is that the output + //type is unknown. That is why we copy it into an explicit array + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; + vtkm::cont::ArrayHandleIndex temp(this->InterpolationEdgeIds.GetNumberOfValues()); + Algorithm::Copy(temp, connectivity); + } + + //generate the vertices's + ApplyToField applyToField; + vtkm::worklet::DispatcherMapField applyFieldDispatcher( + applyToField); + + applyFieldDispatcher.Invoke(this->InterpolationEdgeIds, this->InterpolationWeights, + coordinateSystem, vertices); + + //assign the connectivity to the cell set + vtkm::cont::CellSetSingleType<> outputCells("contour"); + outputCells.Fill(vertices.GetNumberOfValues(), vtkm::CELL_SHAPE_TRIANGLE, 3, connectivity); + + //now that the vertices have been generated we can generate the normals + if (withNormals) + { + using GenNormals = + marchingcubes::GenerateNormals; + GenNormals gen(normals, inputField, coordinateSystem, originalCellIds, + this->InterpolationEdgeIds, this->InterpolationWeights); + + CastAndCall(cells, gen); + } + + return outputCells; } - else - { - //when we don't merge points, the connectivity array can be represented - //by a counting array. The danger of doing it this way is that the output - //type is unknown. That is why we copy it into an explicit array - using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; - vtkm::cont::ArrayHandleIndex temp(this->InterpolationEdgeIds.GetNumberOfValues()); - Algorithm::Copy(temp, connectivity); - } - - //generate the vertices's - ApplyToField applyToField; - vtkm::worklet::DispatcherMapField applyFieldDispatcher(applyToField); - - applyFieldDispatcher.Invoke(this->InterpolationEdgeIds, - this->InterpolationWeights, - coordinateSystem, - vertices); - - //assign the connectivity to the cell set - vtkm::cont::CellSetSingleType< > outputCells("contour"); - outputCells.Fill( vertices.GetNumberOfValues(), - vtkm::CELL_SHAPE_TRIANGLE, - 3, - connectivity ); - - //now that the vertices have been generated we can generate the normals - if(withNormals) - { - using GenNormals = marchingcubes::GenerateNormals; - GenNormals gen( normals, - inputField, - coordinateSystem, - originalCellIds, - this->InterpolationEdgeIds, - this->InterpolationWeights - ); - - CastAndCall(cells,gen); - } - - return outputCells; -} bool MergeDuplicatePoints; @@ -903,7 +764,6 @@ vtkm::cont::CellSetSingleType< > vtkm::cont::ArrayHandle InterpolationWeights; vtkm::cont::ArrayHandle InterpolationEdgeIds; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/MarchingCubesDataTables.h b/vtkm/worklet/MarchingCubesDataTables.h index 51df5bb18..dd8b65c67 100644 --- a/vtkm/worklet/MarchingCubesDataTables.h +++ b/vtkm/worklet/MarchingCubesDataTables.h @@ -22,537 +22,203 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace internal { +namespace internal +{ -const vtkm::IdComponent edgeTable[24] = { 0, 1, 1, 2, 3, 2, 0, 3, - 4, 5, 5, 6, 7, 6, 4, 7, - 0, 4, 1, 5, 2, 6, 3, 7 }; +const vtkm::IdComponent edgeTable[24] = { 0, 1, 1, 2, 3, 2, 0, 3, 4, 5, 5, 6, + 7, 6, 4, 7, 0, 4, 1, 5, 2, 6, 3, 7 }; const vtkm::IdComponent numTrianglesTable[256] = { - 0, - 1, - 1, - 2, - 1, - 2, - 2, - 3, - 1, - 2, - 2, - 3, - 2, - 3, - 3, - 2, - 1, - 2, - 2, - 3, - 2, - 3, - 3, - 4, - 2, - 3, - 3, - 4, - 3, - 4, - 4, - 3, - 1, - 2, - 2, - 3, - 2, - 3, - 3, - 4, - 2, - 3, - 3, - 4, - 3, - 4, - 4, - 3, - 2, - 3, - 3, - 2, - 3, - 4, - 4, - 3, - 3, - 4, - 4, - 3, - 4, - 5, - 5, - 2, - 1, - 2, - 2, - 3, - 2, - 3, - 3, - 4, - 2, - 3, - 3, - 4, - 3, - 4, - 4, - 3, - 2, - 3, - 3, - 4, - 3, - 4, - 4, - 5, - 3, - 4, - 4, - 5, - 4, - 5, - 5, - 4, - 2, - 3, - 3, - 4, - 3, - 4, - 2, - 3, - 3, - 4, - 4, - 5, - 4, - 5, - 3, - 2, - 3, - 4, - 4, - 3, - 4, - 5, - 3, - 2, - 4, - 5, - 5, - 4, - 5, - 2, - 4, - 1, - 1, - 2, - 2, - 3, - 2, - 3, - 3, - 4, - 2, - 3, - 3, - 4, - 3, - 4, - 4, - 3, - 2, - 3, - 3, - 4, - 3, - 4, - 4, - 5, - 3, - 2, - 4, - 3, - 4, - 3, - 5, - 2, - 2, - 3, - 3, - 4, - 3, - 4, - 4, - 5, - 3, - 4, - 4, - 5, - 4, - 5, - 5, - 4, - 3, - 4, - 4, - 3, - 4, - 5, - 5, - 4, - 4, - 3, - 5, - 2, - 5, - 4, - 2, - 1, - 2, - 3, - 3, - 4, - 3, - 4, - 4, - 5, - 3, - 4, - 4, - 5, - 2, - 3, - 3, - 2, - 3, - 4, - 4, - 5, - 4, - 5, - 5, - 2, - 4, - 3, - 5, - 4, - 3, - 2, - 4, - 1, - 3, - 4, - 4, - 5, - 4, - 5, - 3, - 4, - 4, - 5, - 5, - 2, - 3, - 4, - 2, - 1, - 2, - 3, - 3, - 2, - 3, - 4, - 2, - 1, - 3, - 2, - 4, - 1, - 2, - 1, - 1, - 0, + 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 2, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 3, + 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 3, 2, 3, 3, 2, 3, 4, 4, 3, 3, 4, 4, 3, 4, 5, 5, 2, + 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 3, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 4, + 2, 3, 3, 4, 3, 4, 2, 3, 3, 4, 4, 5, 4, 5, 3, 2, 3, 4, 4, 3, 4, 5, 3, 2, 4, 5, 5, 4, 5, 2, 4, 1, + 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 3, 2, 3, 3, 4, 3, 4, 4, 5, 3, 2, 4, 3, 4, 3, 5, 2, + 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 4, 3, 4, 4, 3, 4, 5, 5, 4, 4, 3, 5, 2, 5, 4, 2, 1, + 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 2, 3, 3, 2, 3, 4, 4, 5, 4, 5, 5, 2, 4, 3, 5, 4, 3, 2, 4, 1, + 3, 4, 4, 5, 4, 5, 3, 4, 4, 5, 5, 2, 3, 4, 2, 1, 2, 3, 3, 2, 3, 4, 2, 1, 3, 2, 4, 1, 2, 1, 1, 0, }; - -const vtkm::IdComponent triTable[256*16] = -{ +const vtkm::IdComponent triTable[256 * 16] = { #define X -1 - X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, - 0, 8, 3, X, X, X, X, X, X, X, X, X, X, X, X, X, - 0, 1, 9, X, X, X, X, X, X, X, X, X, X, X, X, X, - 1, 8, 3, 9, 8, 1, X, X, X, X, X, X, X, X, X, X, - 1, 2, 10, X, X, X, X, X, X, X, X, X, X, X, X, X, - 0, 8, 3, 1, 2, 10, X, X, X, X, X, X, X, X, X, X, - 9, 2, 10, 0, 2, 9, X, X, X, X, X, X, X, X, X, X, - 2, 8, 3, 2, 10, 8, 10, 9, 8, X, X, X, X, X, X, X, - 3, 11, 2, X, X, X, X, X, X, X, X, X, X, X, X, X, - 0, 11, 2, 8, 11, 0, X, X, X, X, X, X, X, X, X, X, - 1, 9, 0, 2, 3, 11, X, X, X, X, X, X, X, X, X, X, - 1, 11, 2, 1, 9, 11, 9, 8, 11, X, X, X, X, X, X, X, - 3, 10, 1, 11, 10, 3, X, X, X, X, X, X, X, X, X, X, - 0, 10, 1, 0, 8, 10, 8, 11, 10, X, X, X, X, X, X, X, - 3, 9, 0, 3, 11, 9, 11, 10, 9, X, X, X, X, X, X, X, - 9, 8, 10, 10, 8, 11, X, X, X, X, X, X, X, X, X, X, - 4, 7, 8, X, X, X, X, X, X, X, X, X, X, X, X, X, - 4, 3, 0, 7, 3, 4, X, X, X, X, X, X, X, X, X, X, - 0, 1, 9, 8, 4, 7, X, X, X, X, X, X, X, X, X, X, - 4, 1, 9, 4, 7, 1, 7, 3, 1, X, X, X, X, X, X, X, - 1, 2, 10, 8, 4, 7, X, X, X, X, X, X, X, X, X, X, - 3, 4, 7, 3, 0, 4, 1, 2, 10, X, X, X, X, X, X, X, - 9, 2, 10, 9, 0, 2, 8, 4, 7, X, X, X, X, X, X, X, - 2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, X, X, X, X, - 8, 4, 7, 3, 11, 2, X, X, X, X, X, X, X, X, X, X, - 11, 4, 7, 11, 2, 4, 2, 0, 4, X, X, X, X, X, X, X, - 9, 0, 1, 8, 4, 7, 2, 3, 11, X, X, X, X, X, X, X, - 4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, X, X, X, X, - 3, 10, 1, 3, 11, 10, 7, 8, 4, X, X, X, X, X, X, X, - 1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, X, X, X, X, - 4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, X, X, X, X, - 4, 7, 11, 4, 11, 9, 9, 11, 10, X, X, X, X, X, X, X, - 9, 5, 4, X, X, X, X, X, X, X, X, X, X, X, X, X, - 9, 5, 4, 0, 8, 3, X, X, X, X, X, X, X, X, X, X, - 0, 5, 4, 1, 5, 0, X, X, X, X, X, X, X, X, X, X, - 8, 5, 4, 8, 3, 5, 3, 1, 5, X, X, X, X, X, X, X, - 1, 2, 10, 9, 5, 4, X, X, X, X, X, X, X, X, X, X, - 3, 0, 8, 1, 2, 10, 4, 9, 5, X, X, X, X, X, X, X, - 5, 2, 10, 5, 4, 2, 4, 0, 2, X, X, X, X, X, X, X, - 2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, X, X, X, X, - 9, 5, 4, 2, 3, 11, X, X, X, X, X, X, X, X, X, X, - 0, 11, 2, 0, 8, 11, 4, 9, 5, X, X, X, X, X, X, X, - 0, 5, 4, 0, 1, 5, 2, 3, 11, X, X, X, X, X, X, X, - 2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, X, X, X, X, - 10, 3, 11, 10, 1, 3, 9, 5, 4, X, X, X, X, X, X, X, - 4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, X, X, X, X, - 5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, X, X, X, X, - 5, 4, 8, 5, 8, 10, 10, 8, 11, X, X, X, X, X, X, X, - 9, 7, 8, 5, 7, 9, X, X, X, X, X, X, X, X, X, X, - 9, 3, 0, 9, 5, 3, 5, 7, 3, X, X, X, X, X, X, X, - 0, 7, 8, 0, 1, 7, 1, 5, 7, X, X, X, X, X, X, X, - 1, 5, 3, 3, 5, 7, X, X, X, X, X, X, X, X, X, X, - 9, 7, 8, 9, 5, 7, 10, 1, 2, X, X, X, X, X, X, X, - 10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, X, X, X, X, - 8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, X, X, X, X, - 2, 10, 5, 2, 5, 3, 3, 5, 7, X, X, X, X, X, X, X, - 7, 9, 5, 7, 8, 9, 3, 11, 2, X, X, X, X, X, X, X, - 9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, X, X, X, X, - 2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, X, X, X, X, - 11, 2, 1, 11, 1, 7, 7, 1, 5, X, X, X, X, X, X, X, - 9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, X, X, X, X, - 5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, X, - 11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, X, - 11, 10, 5, 7, 11, 5, X, X, X, X, X, X, X, X, X, X, - 10, 6, 5, X, X, X, X, X, X, X, X, X, X, X, X, X, - 0, 8, 3, 5, 10, 6, X, X, X, X, X, X, X, X, X, X, - 9, 0, 1, 5, 10, 6, X, X, X, X, X, X, X, X, X, X, - 1, 8, 3, 1, 9, 8, 5, 10, 6, X, X, X, X, X, X, X, - 1, 6, 5, 2, 6, 1, X, X, X, X, X, X, X, X, X, X, - 1, 6, 5, 1, 2, 6, 3, 0, 8, X, X, X, X, X, X, X, - 9, 6, 5, 9, 0, 6, 0, 2, 6, X, X, X, X, X, X, X, - 5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, X, X, X, X, - 2, 3, 11, 10, 6, 5, X, X, X, X, X, X, X, X, X, X, - 11, 0, 8, 11, 2, 0, 10, 6, 5, X, X, X, X, X, X, X, - 0, 1, 9, 2, 3, 11, 5, 10, 6, X, X, X, X, X, X, X, - 5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, X, X, X, X, - 6, 3, 11, 6, 5, 3, 5, 1, 3, X, X, X, X, X, X, X, - 0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, X, X, X, X, - 3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, X, X, X, X, - 6, 5, 9, 6, 9, 11, 11, 9, 8, X, X, X, X, X, X, X, - 5, 10, 6, 4, 7, 8, X, X, X, X, X, X, X, X, X, X, - 4, 3, 0, 4, 7, 3, 6, 5, 10, X, X, X, X, X, X, X, - 1, 9, 0, 5, 10, 6, 8, 4, 7, X, X, X, X, X, X, X, - 10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, X, X, X, X, - 6, 1, 2, 6, 5, 1, 4, 7, 8, X, X, X, X, X, X, X, - 1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, X, X, X, X, - 8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, X, X, X, X, - 7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, X, - 3, 11, 2, 7, 8, 4, 10, 6, 5, X, X, X, X, X, X, X, - 5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, X, X, X, X, - 0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, X, X, X, X, - 9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, X, - 8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, X, X, X, X, - 5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, X, - 0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, X, - 6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, X, X, X, X, - 10, 4, 9, 6, 4, 10, X, X, X, X, X, X, X, X, X, X, - 4, 10, 6, 4, 9, 10, 0, 8, 3, X, X, X, X, X, X, X, - 10, 0, 1, 10, 6, 0, 6, 4, 0, X, X, X, X, X, X, X, - 8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, X, X, X, X, - 1, 4, 9, 1, 2, 4, 2, 6, 4, X, X, X, X, X, X, X, - 3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, X, X, X, X, - 0, 2, 4, 4, 2, 6, X, X, X, X, X, X, X, X, X, X, - 8, 3, 2, 8, 2, 4, 4, 2, 6, X, X, X, X, X, X, X, - 10, 4, 9, 10, 6, 4, 11, 2, 3, X, X, X, X, X, X, X, - 0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, X, X, X, X, - 3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, X, X, X, X, - 6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, X, - 9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, X, X, X, X, - 8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, X, - 3, 11, 6, 3, 6, 0, 0, 6, 4, X, X, X, X, X, X, X, - 6, 4, 8, 11, 6, 8, X, X, X, X, X, X, X, X, X, X, - 7, 10, 6, 7, 8, 10, 8, 9, 10, X, X, X, X, X, X, X, - 0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, X, X, X, X, - 10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, X, X, X, X, - 10, 6, 7, 10, 7, 1, 1, 7, 3, X, X, X, X, X, X, X, - 1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, X, X, X, X, - 2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, X, - 7, 8, 0, 7, 0, 6, 6, 0, 2, X, X, X, X, X, X, X, - 7, 3, 2, 6, 7, 2, X, X, X, X, X, X, X, X, X, X, - 2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, X, X, X, X, - 2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, X, - 1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, X, - 11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, X, X, X, X, - 8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, X, - 0, 9, 1, 11, 6, 7, X, X, X, X, X, X, X, X, X, X, - 7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, X, X, X, X, - 7, 11, 6, X, X, X, X, X, X, X, X, X, X, X, X, X, - 7, 6, 11, X, X, X, X, X, X, X, X, X, X, X, X, X, - 3, 0, 8, 11, 7, 6, X, X, X, X, X, X, X, X, X, X, - 0, 1, 9, 11, 7, 6, X, X, X, X, X, X, X, X, X, X, - 8, 1, 9, 8, 3, 1, 11, 7, 6, X, X, X, X, X, X, X, - 10, 1, 2, 6, 11, 7, X, X, X, X, X, X, X, X, X, X, - 1, 2, 10, 3, 0, 8, 6, 11, 7, X, X, X, X, X, X, X, - 2, 9, 0, 2, 10, 9, 6, 11, 7, X, X, X, X, X, X, X, - 6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, X, X, X, X, - 7, 2, 3, 6, 2, 7, X, X, X, X, X, X, X, X, X, X, - 7, 0, 8, 7, 6, 0, 6, 2, 0, X, X, X, X, X, X, X, - 2, 7, 6, 2, 3, 7, 0, 1, 9, X, X, X, X, X, X, X, - 1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, X, X, X, X, - 10, 7, 6, 10, 1, 7, 1, 3, 7, X, X, X, X, X, X, X, - 10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, X, X, X, X, - 0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, X, X, X, X, - 7, 6, 10, 7, 10, 8, 8, 10, 9, X, X, X, X, X, X, X, - 6, 8, 4, 11, 8, 6, X, X, X, X, X, X, X, X, X, X, - 3, 6, 11, 3, 0, 6, 0, 4, 6, X, X, X, X, X, X, X, - 8, 6, 11, 8, 4, 6, 9, 0, 1, X, X, X, X, X, X, X, - 9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, X, X, X, X, - 6, 8, 4, 6, 11, 8, 2, 10, 1, X, X, X, X, X, X, X, - 1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, X, X, X, X, - 4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, X, X, X, X, - 10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, X, - 8, 2, 3, 8, 4, 2, 4, 6, 2, X, X, X, X, X, X, X, - 0, 4, 2, 4, 6, 2, X, X, X, X, X, X, X, X, X, X, - 1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, X, X, X, X, - 1, 9, 4, 1, 4, 2, 2, 4, 6, X, X, X, X, X, X, X, - 8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, X, X, X, X, - 10, 1, 0, 10, 0, 6, 6, 0, 4, X, X, X, X, X, X, X, - 4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, X, - 10, 9, 4, 6, 10, 4, X, X, X, X, X, X, X, X, X, X, - 4, 9, 5, 7, 6, 11, X, X, X, X, X, X, X, X, X, X, - 0, 8, 3, 4, 9, 5, 11, 7, 6, X, X, X, X, X, X, X, - 5, 0, 1, 5, 4, 0, 7, 6, 11, X, X, X, X, X, X, X, - 11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, X, X, X, X, - 9, 5, 4, 10, 1, 2, 7, 6, 11, X, X, X, X, X, X, X, - 6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, X, X, X, X, - 7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, X, X, X, X, - 3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, X, - 7, 2, 3, 7, 6, 2, 5, 4, 9, X, X, X, X, X, X, X, - 9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, X, X, X, X, - 3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, X, X, X, X, - 6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, X, - 9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, X, X, X, X, - 1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, X, - 4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, X, - 7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, X, X, X, X, - 6, 9, 5, 6, 11, 9, 11, 8, 9, X, X, X, X, X, X, X, - 3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, X, X, X, X, - 0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, X, X, X, X, - 6, 11, 3, 6, 3, 5, 5, 3, 1, X, X, X, X, X, X, X, - 1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, X, X, X, X, - 0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, X, - 11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, X, - 6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, X, X, X, X, - 5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, X, X, X, X, - 9, 5, 6, 9, 6, 0, 0, 6, 2, X, X, X, X, X, X, X, - 1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, X, - 1, 5, 6, 2, 1, 6, X, X, X, X, X, X, X, X, X, X, - 1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, X, - 10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, X, X, X, X, - 0, 3, 8, 5, 6, 10, X, X, X, X, X, X, X, X, X, X, - 10, 5, 6, X, X, X, X, X, X, X, X, X, X, X, X, X, - 11, 5, 10, 7, 5, 11, X, X, X, X, X, X, X, X, X, X, - 11, 5, 10, 11, 7, 5, 8, 3, 0, X, X, X, X, X, X, X, - 5, 11, 7, 5, 10, 11, 1, 9, 0, X, X, X, X, X, X, X, - 10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, X, X, X, X, - 11, 1, 2, 11, 7, 1, 7, 5, 1, X, X, X, X, X, X, X, - 0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, X, X, X, X, - 9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, X, X, X, X, - 7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, X, - 2, 5, 10, 2, 3, 5, 3, 7, 5, X, X, X, X, X, X, X, - 8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, X, X, X, X, - 9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, X, X, X, X, - 9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, X, - 1, 3, 5, 3, 7, 5, X, X, X, X, X, X, X, X, X, X, - 0, 8, 7, 0, 7, 1, 1, 7, 5, X, X, X, X, X, X, X, - 9, 0, 3, 9, 3, 5, 5, 3, 7, X, X, X, X, X, X, X, - 9, 8, 7, 5, 9, 7, X, X, X, X, X, X, X, X, X, X, - 5, 8, 4, 5, 10, 8, 10, 11, 8, X, X, X, X, X, X, X, - 5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, X, X, X, X, - 0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, X, X, X, X, - 10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, X, - 2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, X, X, X, X, - 0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, X, - 0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, X, - 9, 4, 5, 2, 11, 3, X, X, X, X, X, X, X, X, X, X, - 2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, X, X, X, X, - 5, 10, 2, 5, 2, 4, 4, 2, 0, X, X, X, X, X, X, X, - 3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, X, - 5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, X, X, X, X, - 8, 4, 5, 8, 5, 3, 3, 5, 1, X, X, X, X, X, X, X, - 0, 4, 5, 1, 0, 5, X, X, X, X, X, X, X, X, X, X, - 8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, X, X, X, X, - 9, 4, 5, X, X, X, X, X, X, X, X, X, X, X, X, X, - 4, 11, 7, 4, 9, 11, 9, 10, 11, X, X, X, X, X, X, X, - 0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, X, X, X, X, - 1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, X, X, X, X, - 3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, X, - 4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, X, X, X, X, - 9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, X, - 11, 7, 4, 11, 4, 2, 2, 4, 0, X, X, X, X, X, X, X, - 11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, X, X, X, X, - 2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, X, X, X, X, - 9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, X, - 3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, X, - 1, 10, 2, 8, 7, 4, X, X, X, X, X, X, X, X, X, X, - 4, 9, 1, 4, 1, 7, 7, 1, 3, X, X, X, X, X, X, X, - 4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, X, X, X, X, - 4, 0, 3, 7, 4, 3, X, X, X, X, X, X, X, X, X, X, - 4, 8, 7, X, X, X, X, X, X, X, X, X, X, X, X, X, - 9, 10, 8, 10, 11, 8, X, X, X, X, X, X, X, X, X, X, - 3, 0, 9, 3, 9, 11, 11, 9, 10, X, X, X, X, X, X, X, - 0, 1, 10, 0, 10, 8, 8, 10, 11, X, X, X, X, X, X, X, - 3, 1, 10, 11, 3, 10, X, X, X, X, X, X, X, X, X, X, - 1, 2, 11, 1, 11, 9, 9, 11, 8, X, X, X, X, X, X, X, - 3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, X, X, X, X, - 0, 2, 11, 8, 0, 11, X, X, X, X, X, X, X, X, X, X, - 3, 2, 11, X, X, X, X, X, X, X, X, X, X, X, X, X, - 2, 3, 8, 2, 8, 10, 10, 8, 9, X, X, X, X, X, X, X, - 9, 10, 2, 0, 9, 2, X, X, X, X, X, X, X, X, X, X, - 2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, X, X, X, X, - 1, 10, 2, X, X, X, X, X, X, X, X, X, X, X, X, X, - 1, 3, 8, 9, 1, 8, X, X, X, X, X, X, X, X, X, X, - 0, 9, 1, X, X, X, X, X, X, X, X, X, X, X, X, X, - 0, 3, 8, X, X, X, X, X, X, X, X, X, X, X, X, X, - X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X + X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, 0, 8, 3, X, X, X, X, X, + X, X, X, X, X, X, X, X, 0, 1, 9, X, X, X, X, X, X, X, X, X, X, X, X, X, + 1, 8, 3, 9, 8, 1, X, X, X, X, X, X, X, X, X, X, 1, 2, 10, X, X, X, X, X, + X, X, X, X, X, X, X, X, 0, 8, 3, 1, 2, 10, X, X, X, X, X, X, X, X, X, X, + 9, 2, 10, 0, 2, 9, X, X, X, X, X, X, X, X, X, X, 2, 8, 3, 2, 10, 8, 10, 9, + 8, X, X, X, X, X, X, X, 3, 11, 2, X, X, X, X, X, X, X, X, X, X, X, X, X, + 0, 11, 2, 8, 11, 0, X, X, X, X, X, X, X, X, X, X, 1, 9, 0, 2, 3, 11, X, X, + X, X, X, X, X, X, X, X, 1, 11, 2, 1, 9, 11, 9, 8, 11, X, X, X, X, X, X, X, + 3, 10, 1, 11, 10, 3, X, X, X, X, X, X, X, X, X, X, 0, 10, 1, 0, 8, 10, 8, 11, + 10, X, X, X, X, X, X, X, 3, 9, 0, 3, 11, 9, 11, 10, 9, X, X, X, X, X, X, X, + 9, 8, 10, 10, 8, 11, X, X, X, X, X, X, X, X, X, X, 4, 7, 8, X, X, X, X, X, + X, X, X, X, X, X, X, X, 4, 3, 0, 7, 3, 4, X, X, X, X, X, X, X, X, X, X, + 0, 1, 9, 8, 4, 7, X, X, X, X, X, X, X, X, X, X, 4, 1, 9, 4, 7, 1, 7, 3, + 1, X, X, X, X, X, X, X, 1, 2, 10, 8, 4, 7, X, X, X, X, X, X, X, X, X, X, + 3, 4, 7, 3, 0, 4, 1, 2, 10, X, X, X, X, X, X, X, 9, 2, 10, 9, 0, 2, 8, 4, + 7, X, X, X, X, X, X, X, 2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, X, X, X, X, + 8, 4, 7, 3, 11, 2, X, X, X, X, X, X, X, X, X, X, 11, 4, 7, 11, 2, 4, 2, 0, + 4, X, X, X, X, X, X, X, 9, 0, 1, 8, 4, 7, 2, 3, 11, X, X, X, X, X, X, X, + 4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, X, X, X, X, 3, 10, 1, 3, 11, 10, 7, 8, + 4, X, X, X, X, X, X, X, 1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, X, X, X, X, + 4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, X, X, X, X, 4, 7, 11, 4, 11, 9, 9, 11, + 10, X, X, X, X, X, X, X, 9, 5, 4, X, X, X, X, X, X, X, X, X, X, X, X, X, + 9, 5, 4, 0, 8, 3, X, X, X, X, X, X, X, X, X, X, 0, 5, 4, 1, 5, 0, X, X, + X, X, X, X, X, X, X, X, 8, 5, 4, 8, 3, 5, 3, 1, 5, X, X, X, X, X, X, X, + 1, 2, 10, 9, 5, 4, X, X, X, X, X, X, X, X, X, X, 3, 0, 8, 1, 2, 10, 4, 9, + 5, X, X, X, X, X, X, X, 5, 2, 10, 5, 4, 2, 4, 0, 2, X, X, X, X, X, X, X, + 2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, X, X, X, X, 9, 5, 4, 2, 3, 11, X, X, + X, X, X, X, X, X, X, X, 0, 11, 2, 0, 8, 11, 4, 9, 5, X, X, X, X, X, X, X, + 0, 5, 4, 0, 1, 5, 2, 3, 11, X, X, X, X, X, X, X, 2, 1, 5, 2, 5, 8, 2, 8, + 11, 4, 8, 5, X, X, X, X, 10, 3, 11, 10, 1, 3, 9, 5, 4, X, X, X, X, X, X, X, + 4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, X, X, X, X, 5, 4, 0, 5, 0, 11, 5, 11, + 10, 11, 0, 3, X, X, X, X, 5, 4, 8, 5, 8, 10, 10, 8, 11, X, X, X, X, X, X, X, + 9, 7, 8, 5, 7, 9, X, X, X, X, X, X, X, X, X, X, 9, 3, 0, 9, 5, 3, 5, 7, + 3, X, X, X, X, X, X, X, 0, 7, 8, 0, 1, 7, 1, 5, 7, X, X, X, X, X, X, X, + 1, 5, 3, 3, 5, 7, X, X, X, X, X, X, X, X, X, X, 9, 7, 8, 9, 5, 7, 10, 1, + 2, X, X, X, X, X, X, X, 10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, X, X, X, X, + 8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, X, X, X, X, 2, 10, 5, 2, 5, 3, 3, 5, + 7, X, X, X, X, X, X, X, 7, 9, 5, 7, 8, 9, 3, 11, 2, X, X, X, X, X, X, X, + 9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, X, X, X, X, 2, 3, 11, 0, 1, 8, 1, 7, + 8, 1, 5, 7, X, X, X, X, 11, 2, 1, 11, 1, 7, 7, 1, 5, X, X, X, X, X, X, X, + 9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, X, X, X, X, 5, 7, 0, 5, 0, 9, 7, 11, + 0, 1, 0, 10, 11, 10, 0, X, 11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, X, + 11, 10, 5, 7, 11, 5, X, X, X, X, X, X, X, X, X, X, 10, 6, 5, X, X, X, X, X, + X, X, X, X, X, X, X, X, 0, 8, 3, 5, 10, 6, X, X, X, X, X, X, X, X, X, X, + 9, 0, 1, 5, 10, 6, X, X, X, X, X, X, X, X, X, X, 1, 8, 3, 1, 9, 8, 5, 10, + 6, X, X, X, X, X, X, X, 1, 6, 5, 2, 6, 1, X, X, X, X, X, X, X, X, X, X, + 1, 6, 5, 1, 2, 6, 3, 0, 8, X, X, X, X, X, X, X, 9, 6, 5, 9, 0, 6, 0, 2, + 6, X, X, X, X, X, X, X, 5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, X, X, X, X, + 2, 3, 11, 10, 6, 5, X, X, X, X, X, X, X, X, X, X, 11, 0, 8, 11, 2, 0, 10, 6, + 5, X, X, X, X, X, X, X, 0, 1, 9, 2, 3, 11, 5, 10, 6, X, X, X, X, X, X, X, + 5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, X, X, X, X, 6, 3, 11, 6, 5, 3, 5, 1, + 3, X, X, X, X, X, X, X, 0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, X, X, X, X, + 3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, X, X, X, X, 6, 5, 9, 6, 9, 11, 11, 9, + 8, X, X, X, X, X, X, X, 5, 10, 6, 4, 7, 8, X, X, X, X, X, X, X, X, X, X, + 4, 3, 0, 4, 7, 3, 6, 5, 10, X, X, X, X, X, X, X, 1, 9, 0, 5, 10, 6, 8, 4, + 7, X, X, X, X, X, X, X, 10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, X, X, X, X, + 6, 1, 2, 6, 5, 1, 4, 7, 8, X, X, X, X, X, X, X, 1, 2, 5, 5, 2, 6, 3, 0, + 4, 3, 4, 7, X, X, X, X, 8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, X, X, X, X, + 7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, X, 3, 11, 2, 7, 8, 4, 10, 6, + 5, X, X, X, X, X, X, X, 5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, X, X, X, X, + 0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, X, X, X, X, 9, 2, 1, 9, 11, 2, 9, 4, + 11, 7, 11, 4, 5, 10, 6, X, 8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, X, X, X, X, + 5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, X, 0, 5, 9, 0, 6, 5, 0, 3, + 6, 11, 6, 3, 8, 4, 7, X, 6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, X, X, X, X, + 10, 4, 9, 6, 4, 10, X, X, X, X, X, X, X, X, X, X, 4, 10, 6, 4, 9, 10, 0, 8, + 3, X, X, X, X, X, X, X, 10, 0, 1, 10, 6, 0, 6, 4, 0, X, X, X, X, X, X, X, + 8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, X, X, X, X, 1, 4, 9, 1, 2, 4, 2, 6, + 4, X, X, X, X, X, X, X, 3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, X, X, X, X, + 0, 2, 4, 4, 2, 6, X, X, X, X, X, X, X, X, X, X, 8, 3, 2, 8, 2, 4, 4, 2, + 6, X, X, X, X, X, X, X, 10, 4, 9, 10, 6, 4, 11, 2, 3, X, X, X, X, X, X, X, + 0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, X, X, X, X, 3, 11, 2, 0, 1, 6, 0, 6, + 4, 6, 1, 10, X, X, X, X, 6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, X, + 9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, X, X, X, X, 8, 11, 1, 8, 1, 0, 11, 6, + 1, 9, 1, 4, 6, 4, 1, X, 3, 11, 6, 3, 6, 0, 0, 6, 4, X, X, X, X, X, X, X, + 6, 4, 8, 11, 6, 8, X, X, X, X, X, X, X, X, X, X, 7, 10, 6, 7, 8, 10, 8, 9, + 10, X, X, X, X, X, X, X, 0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, X, X, X, X, + 10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, X, X, X, X, 10, 6, 7, 10, 7, 1, 1, 7, + 3, X, X, X, X, X, X, X, 1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, X, X, X, X, + 2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, X, 7, 8, 0, 7, 0, 6, 6, 0, + 2, X, X, X, X, X, X, X, 7, 3, 2, 6, 7, 2, X, X, X, X, X, X, X, X, X, X, + 2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, X, X, X, X, 2, 0, 7, 2, 7, 11, 0, 9, + 7, 6, 7, 10, 9, 10, 7, X, 1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, X, + 11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, X, X, X, X, 8, 9, 6, 8, 6, 7, 9, 1, + 6, 11, 6, 3, 1, 3, 6, X, 0, 9, 1, 11, 6, 7, X, X, X, X, X, X, X, X, X, X, + 7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, X, X, X, X, 7, 11, 6, X, X, X, X, X, + X, X, X, X, X, X, X, X, 7, 6, 11, X, X, X, X, X, X, X, X, X, X, X, X, X, + 3, 0, 8, 11, 7, 6, X, X, X, X, X, X, X, X, X, X, 0, 1, 9, 11, 7, 6, X, X, + X, X, X, X, X, X, X, X, 8, 1, 9, 8, 3, 1, 11, 7, 6, X, X, X, X, X, X, X, + 10, 1, 2, 6, 11, 7, X, X, X, X, X, X, X, X, X, X, 1, 2, 10, 3, 0, 8, 6, 11, + 7, X, X, X, X, X, X, X, 2, 9, 0, 2, 10, 9, 6, 11, 7, X, X, X, X, X, X, X, + 6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, X, X, X, X, 7, 2, 3, 6, 2, 7, X, X, + X, X, X, X, X, X, X, X, 7, 0, 8, 7, 6, 0, 6, 2, 0, X, X, X, X, X, X, X, + 2, 7, 6, 2, 3, 7, 0, 1, 9, X, X, X, X, X, X, X, 1, 6, 2, 1, 8, 6, 1, 9, + 8, 8, 7, 6, X, X, X, X, 10, 7, 6, 10, 1, 7, 1, 3, 7, X, X, X, X, X, X, X, + 10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, X, X, X, X, 0, 3, 7, 0, 7, 10, 0, 10, + 9, 6, 10, 7, X, X, X, X, 7, 6, 10, 7, 10, 8, 8, 10, 9, X, X, X, X, X, X, X, + 6, 8, 4, 11, 8, 6, X, X, X, X, X, X, X, X, X, X, 3, 6, 11, 3, 0, 6, 0, 4, + 6, X, X, X, X, X, X, X, 8, 6, 11, 8, 4, 6, 9, 0, 1, X, X, X, X, X, X, X, + 9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, X, X, X, X, 6, 8, 4, 6, 11, 8, 2, 10, + 1, X, X, X, X, X, X, X, 1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, X, X, X, X, + 4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, X, X, X, X, 10, 9, 3, 10, 3, 2, 9, 4, + 3, 11, 3, 6, 4, 6, 3, X, 8, 2, 3, 8, 4, 2, 4, 6, 2, X, X, X, X, X, X, X, + 0, 4, 2, 4, 6, 2, X, X, X, X, X, X, X, X, X, X, 1, 9, 0, 2, 3, 4, 2, 4, + 6, 4, 3, 8, X, X, X, X, 1, 9, 4, 1, 4, 2, 2, 4, 6, X, X, X, X, X, X, X, + 8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, X, X, X, X, 10, 1, 0, 10, 0, 6, 6, 0, + 4, X, X, X, X, X, X, X, 4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, X, + 10, 9, 4, 6, 10, 4, X, X, X, X, X, X, X, X, X, X, 4, 9, 5, 7, 6, 11, X, X, + X, X, X, X, X, X, X, X, 0, 8, 3, 4, 9, 5, 11, 7, 6, X, X, X, X, X, X, X, + 5, 0, 1, 5, 4, 0, 7, 6, 11, X, X, X, X, X, X, X, 11, 7, 6, 8, 3, 4, 3, 5, + 4, 3, 1, 5, X, X, X, X, 9, 5, 4, 10, 1, 2, 7, 6, 11, X, X, X, X, X, X, X, + 6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, X, X, X, X, 7, 6, 11, 5, 4, 10, 4, 2, + 10, 4, 0, 2, X, X, X, X, 3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, X, + 7, 2, 3, 7, 6, 2, 5, 4, 9, X, X, X, X, X, X, X, 9, 5, 4, 0, 8, 6, 0, 6, + 2, 6, 8, 7, X, X, X, X, 3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, X, X, X, X, + 6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, X, 9, 5, 4, 10, 1, 6, 1, 7, + 6, 1, 3, 7, X, X, X, X, 1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, X, + 4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, X, 7, 6, 10, 7, 10, 8, 5, 4, + 10, 4, 8, 10, X, X, X, X, 6, 9, 5, 6, 11, 9, 11, 8, 9, X, X, X, X, X, X, X, + 3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, X, X, X, X, 0, 11, 8, 0, 5, 11, 0, 1, + 5, 5, 6, 11, X, X, X, X, 6, 11, 3, 6, 3, 5, 5, 3, 1, X, X, X, X, X, X, X, + 1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, X, X, X, X, 0, 11, 3, 0, 6, 11, 0, 9, + 6, 5, 6, 9, 1, 2, 10, X, 11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, X, + 6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, X, X, X, X, 5, 8, 9, 5, 2, 8, 5, 6, + 2, 3, 8, 2, X, X, X, X, 9, 5, 6, 9, 6, 0, 0, 6, 2, X, X, X, X, X, X, X, + 1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, X, 1, 5, 6, 2, 1, 6, X, X, + X, X, X, X, X, X, X, X, 1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, X, + 10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, X, X, X, X, 0, 3, 8, 5, 6, 10, X, X, + X, X, X, X, X, X, X, X, 10, 5, 6, X, X, X, X, X, X, X, X, X, X, X, X, X, + 11, 5, 10, 7, 5, 11, X, X, X, X, X, X, X, X, X, X, 11, 5, 10, 11, 7, 5, 8, 3, + 0, X, X, X, X, X, X, X, 5, 11, 7, 5, 10, 11, 1, 9, 0, X, X, X, X, X, X, X, + 10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, X, X, X, X, 11, 1, 2, 11, 7, 1, 7, 5, + 1, X, X, X, X, X, X, X, 0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, X, X, X, X, + 9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, X, X, X, X, 7, 5, 2, 7, 2, 11, 5, 9, + 2, 3, 2, 8, 9, 8, 2, X, 2, 5, 10, 2, 3, 5, 3, 7, 5, X, X, X, X, X, X, X, + 8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, X, X, X, X, 9, 0, 1, 5, 10, 3, 5, 3, + 7, 3, 10, 2, X, X, X, X, 9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, X, + 1, 3, 5, 3, 7, 5, X, X, X, X, X, X, X, X, X, X, 0, 8, 7, 0, 7, 1, 1, 7, + 5, X, X, X, X, X, X, X, 9, 0, 3, 9, 3, 5, 5, 3, 7, X, X, X, X, X, X, X, + 9, 8, 7, 5, 9, 7, X, X, X, X, X, X, X, X, X, X, 5, 8, 4, 5, 10, 8, 10, 11, + 8, X, X, X, X, X, X, X, 5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, X, X, X, X, + 0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, X, X, X, X, 10, 11, 4, 10, 4, 5, 11, 3, + 4, 9, 4, 1, 3, 1, 4, X, 2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, X, X, X, X, + 0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, X, 0, 2, 5, 0, 5, 9, 2, 11, + 5, 4, 5, 8, 11, 8, 5, X, 9, 4, 5, 2, 11, 3, X, X, X, X, X, X, X, X, X, X, + 2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, X, X, X, X, 5, 10, 2, 5, 2, 4, 4, 2, + 0, X, X, X, X, X, X, X, 3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, X, + 5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, X, X, X, X, 8, 4, 5, 8, 5, 3, 3, 5, + 1, X, X, X, X, X, X, X, 0, 4, 5, 1, 0, 5, X, X, X, X, X, X, X, X, X, X, + 8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, X, X, X, X, 9, 4, 5, X, X, X, X, X, + X, X, X, X, X, X, X, X, 4, 11, 7, 4, 9, 11, 9, 10, 11, X, X, X, X, X, X, X, + 0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, X, X, X, X, 1, 10, 11, 1, 11, 4, 1, 4, + 0, 7, 4, 11, X, X, X, X, 3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, X, + 4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, X, X, X, X, 9, 7, 4, 9, 11, 7, 9, 1, + 11, 2, 11, 1, 0, 8, 3, X, 11, 7, 4, 11, 4, 2, 2, 4, 0, X, X, X, X, X, X, X, + 11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, X, X, X, X, 2, 9, 10, 2, 7, 9, 2, 3, + 7, 7, 4, 9, X, X, X, X, 9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, X, + 3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, X, 1, 10, 2, 8, 7, 4, X, X, + X, X, X, X, X, X, X, X, 4, 9, 1, 4, 1, 7, 7, 1, 3, X, X, X, X, X, X, X, + 4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, X, X, X, X, 4, 0, 3, 7, 4, 3, X, X, + X, X, X, X, X, X, X, X, 4, 8, 7, X, X, X, X, X, X, X, X, X, X, X, X, X, + 9, 10, 8, 10, 11, 8, X, X, X, X, X, X, X, X, X, X, 3, 0, 9, 3, 9, 11, 11, 9, + 10, X, X, X, X, X, X, X, 0, 1, 10, 0, 10, 8, 8, 10, 11, X, X, X, X, X, X, X, + 3, 1, 10, 11, 3, 10, X, X, X, X, X, X, X, X, X, X, 1, 2, 11, 1, 11, 9, 9, 11, + 8, X, X, X, X, X, X, X, 3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, X, X, X, X, + 0, 2, 11, 8, 0, 11, X, X, X, X, X, X, X, X, X, X, 3, 2, 11, X, X, X, X, X, + X, X, X, X, X, X, X, X, 2, 3, 8, 2, 8, 10, 10, 8, 9, X, X, X, X, X, X, X, + 9, 10, 2, 0, 9, 2, X, X, X, X, X, X, X, X, X, X, 2, 3, 8, 2, 8, 10, 0, 1, + 8, 1, 10, 8, X, X, X, X, 1, 10, 2, X, X, X, X, X, X, X, X, X, X, X, X, X, + 1, 3, 8, 9, 1, 8, X, X, X, X, X, X, X, X, X, X, 0, 9, 1, X, X, X, X, X, + X, X, X, X, X, X, X, X, 0, 3, 8, X, X, X, X, X, X, X, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X #undef X }; - } } } diff --git a/vtkm/worklet/Mask.h b/vtkm/worklet/Mask.h index eb31fae05..cbf9ca3db 100644 --- a/vtkm/worklet/Mask.h +++ b/vtkm/worklet/Mask.h @@ -30,21 +30,22 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ // Subselect points using stride for now, creating new cellset of vertices class Mask { public: - struct BoolType : vtkm::ListTagBase {}; + struct BoolType : vtkm::ListTagBase + { + }; - template - vtkm::cont::CellSetPermutation Run( - const CellSetType &cellSet, - const vtkm::Id stride, - DeviceAdapter) + template + vtkm::cont::CellSetPermutation Run(const CellSetType& cellSet, const vtkm::Id stride, + DeviceAdapter) { typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; typedef vtkm::cont::CellSetPermutation OutputType; @@ -63,12 +64,14 @@ public: { public: PermuteCellData(const vtkm::cont::ArrayHandle validCellIds, - vtkm::cont::DynamicArrayHandle &data) - : ValidCellIds(validCellIds), Data(&data) - { } + vtkm::cont::DynamicArrayHandle& data) + : ValidCellIds(validCellIds) + , Data(&data) + { + } template - void operator()(const ArrayHandleType &input) const + void operator()(const ArrayHandleType& input) const { *(this->Data) = vtkm::cont::DynamicArrayHandle( vtkm::cont::make_ArrayHandlePermutation(this->ValidCellIds, input)); @@ -76,7 +79,7 @@ public: private: vtkm::cont::ArrayHandle ValidCellIds; - vtkm::cont::DynamicArrayHandle *Data; + vtkm::cont::DynamicArrayHandle* Data; }; vtkm::cont::Field ProcessCellField(const vtkm::cont::Field field) const @@ -89,14 +92,13 @@ public: vtkm::cont::DynamicArrayHandle data; CastAndCall(field, PermuteCellData(this->ValidCellIds, data)); - return vtkm::cont::Field(field.GetName(), field.GetAssociation(), - field.GetAssocCellSet(), data); + return vtkm::cont::Field(field.GetName(), field.GetAssociation(), field.GetAssocCellSet(), + data); } private: vtkm::cont::ArrayHandle ValidCellIds; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/MaskPoints.h b/vtkm/worklet/MaskPoints.h index 732ad893a..e36b2b8ca 100644 --- a/vtkm/worklet/MaskPoints.h +++ b/vtkm/worklet/MaskPoints.h @@ -25,19 +25,18 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ // Subselect points using stride for now, creating new cellset of vertices class MaskPoints { public: - template - vtkm::cont::CellSetSingleType<> Run( - const CellSetType &cellSet, - const vtkm::Id stride, - DeviceAdapter) + template + vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, const vtkm::Id stride, + DeviceAdapter) { typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; @@ -49,16 +48,12 @@ public: DeviceAlgorithm::Copy(strideArray, pointIds); // Make CellSetSingleType with VERTEX at each point id - vtkm::cont::CellSetSingleType< > outCellSet("cells"); - outCellSet.Fill(numberOfInputPoints, - vtkm::CellShapeTagVertex::Id, - 1, - pointIds); + vtkm::cont::CellSetSingleType<> outCellSet("cells"); + outCellSet.Fill(numberOfInputPoints, vtkm::CellShapeTagVertex::Id, 1, pointIds); return outCellSet; } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/PointAverage.h b/vtkm/worklet/PointAverage.h index 3e1db724c..1543060cc 100644 --- a/vtkm/worklet/PointAverage.h +++ b/vtkm/worklet/PointAverage.h @@ -25,76 +25,58 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ //simple functor that returns the average point value of a given //cell based field. -class PointAverage : - public vtkm::worklet::WorkletMapCellToPoint +class PointAverage : public vtkm::worklet::WorkletMapCellToPoint { public: - typedef void ControlSignature(CellSetIn cellset, - FieldInCell<> inCellField, + typedef void ControlSignature(CellSetIn cellset, FieldInCell<> inCellField, FieldOutPoint<> outPointField); typedef void ExecutionSignature(CellCount, _2, _3); typedef _1 InputDomain; - template - VTKM_EXEC - void operator()(const vtkm::IdComponent &numCells, - const CellValueVecType &cellValues, - OutType &average) const + template + VTKM_EXEC void operator()(const vtkm::IdComponent& numCells, const CellValueVecType& cellValues, + OutType& average) const { using CellValueType = typename CellValueVecType::ComponentType; using InVecSize = - std::integral_constant< - vtkm::IdComponent, - vtkm::VecTraits::NUM_COMPONENTS>; + std::integral_constant::NUM_COMPONENTS>; using OutVecSize = - std::integral_constant< - vtkm::IdComponent, - vtkm::VecTraits::NUM_COMPONENTS>; - using SameLengthVectors = - typename std::is_same::type; + std::integral_constant::NUM_COMPONENTS>; + using SameLengthVectors = typename std::is_same::type; - this->DoAverage(numCells, - cellValues, - average, - SameLengthVectors()); + this->DoAverage(numCells, cellValues, average, SameLengthVectors()); } private: - - template - VTKM_EXEC - void DoAverage(const vtkm::IdComponent &numCells, - const CellValueVecType &cellValues, - OutType &average, - std::true_type) const + template + VTKM_EXEC void DoAverage(const vtkm::IdComponent& numCells, const CellValueVecType& cellValues, + OutType& average, std::true_type) const { using OutComponentType = typename vtkm::VecTraits::ComponentType; OutType sum = OutType(cellValues[0]); for (vtkm::IdComponent cellIndex = 1; cellIndex < numCells; ++cellIndex) - { + { sum = sum + OutType(cellValues[cellIndex]); - } + } average = sum / OutType(static_cast(numCells)); } - template - VTKM_EXEC - void DoAverage(const vtkm::IdComponent &vtkmNotUsed(numCells), - const CellValueVecType &vtkmNotUsed(cellValues), - OutType &vtkmNotUsed(average), - std::false_type) const + template + VTKM_EXEC void DoAverage(const vtkm::IdComponent& vtkmNotUsed(numCells), + const CellValueVecType& vtkmNotUsed(cellValues), + OutType& vtkmNotUsed(average), std::false_type) const { - this->RaiseError( - "PointAverage called with mismatched Vec sizes for PointAverage."); + this->RaiseError("PointAverage called with mismatched Vec sizes for PointAverage."); } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/PointElevation.h b/vtkm/worklet/PointElevation.h index 96da67258..e11bcd033 100644 --- a/vtkm/worklet/PointElevation.h +++ b/vtkm/worklet/PointElevation.h @@ -25,18 +25,19 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace internal { +namespace internal +{ template -VTKM_EXEC -T clamp(const T& val, const T& min, const T& max) +VTKM_EXEC T clamp(const T& val, const T& min, const T& max) { return vtkm::Min(max, vtkm::Max(min, val)); } - } class PointElevation : public vtkm::worklet::WorkletMapField @@ -46,20 +47,19 @@ public: typedef _2 ExecutionSignature(_1); VTKM_CONT - PointElevation() : LowPoint(0.0, 0.0, 0.0), HighPoint(0.0, 0.0, 1.0), - RangeLow(0.0), RangeHigh(1.0) {} - - VTKM_CONT - void SetLowPoint(const vtkm::Vec &point) + PointElevation() + : LowPoint(0.0, 0.0, 0.0) + , HighPoint(0.0, 0.0, 1.0) + , RangeLow(0.0) + , RangeHigh(1.0) { - this->LowPoint = point; } VTKM_CONT - void SetHighPoint(const vtkm::Vec &point) - { - this->HighPoint = point; - } + void SetLowPoint(const vtkm::Vec& point) { this->LowPoint = point; } + + VTKM_CONT + void SetHighPoint(const vtkm::Vec& point) { this->HighPoint = point; } VTKM_CONT void SetRange(vtkm::Float64 low, vtkm::Float64 high) @@ -69,7 +69,7 @@ public: } VTKM_EXEC - vtkm::Float64 operator()(const vtkm::Vec &vec) const + vtkm::Float64 operator()(const vtkm::Vec& vec) const { vtkm::Vec direction = this->HighPoint - this->LowPoint; vtkm::Float64 lengthSqr = vtkm::dot(direction, direction); @@ -80,8 +80,7 @@ public: } template - VTKM_EXEC - vtkm::Float64 operator()(const vtkm::Vec &vec) const + VTKM_EXEC vtkm::Float64 operator()(const vtkm::Vec& vec) const { return (*this)(vtkm::make_Vec(static_cast(vec[0]), static_cast(vec[1]), @@ -92,7 +91,6 @@ private: vtkm::Vec LowPoint, HighPoint; vtkm::Float64 RangeLow, RangeHigh; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/RemoveUnusedPoints.h b/vtkm/worklet/RemoveUnusedPoints.h index 5b6084943..952a00173 100644 --- a/vtkm/worklet/RemoveUnusedPoints.h +++ b/vtkm/worklet/RemoveUnusedPoints.h @@ -31,8 +31,10 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ /// A collection of worklets used to identify which points are used by at least /// one cell and then remove the points that are not used by any cells. The @@ -49,16 +51,13 @@ public: /// struct GeneratePointMask : public vtkm::worklet::WorkletMapField { - typedef void ControlSignature(FieldIn<> pointIndices, - WholeArrayInOut<> pointMask); + typedef void ControlSignature(FieldIn<> pointIndices, WholeArrayInOut<> pointMask); typedef void ExecutionSignature(_1, _2); - template - VTKM_EXEC - void operator()(vtkm::Id pointIndex, - const PointMaskPortalType &pointMask) const + template + VTKM_EXEC void operator()(vtkm::Id pointIndex, const PointMaskPortalType& pointMask) const { - pointMask.Set(pointIndex, 1); + pointMask.Set(pointIndex, 1); } }; @@ -69,15 +68,12 @@ public: /// struct TransformPointIndices : public vtkm::worklet::WorkletMapField { - typedef void ControlSignature(FieldIn pointIndex, - WholeArrayIn indexMap, + typedef void ControlSignature(FieldIn pointIndex, WholeArrayIn indexMap, FieldOut mappedPoints); typedef _3 ExecutionSignature(_1, _2); - template - VTKM_EXEC - vtkm::Id operator()(vtkm::Id pointIndex, - const IndexMapPortalType &indexPortal) const + template + VTKM_EXEC vtkm::Id operator()(vtkm::Id pointIndex, const IndexMapPortalType& indexPortal) const { return indexPortal.Get(pointIndex); } @@ -85,17 +81,14 @@ public: public: VTKM_CONT - RemoveUnusedPoints() - { } + RemoveUnusedPoints() {} - template - VTKM_CONT - RemoveUnusedPoints(const vtkm::cont::CellSetExplicit &inCellSet, - Device) + template + VTKM_CONT RemoveUnusedPoints( + const vtkm::cont::CellSetExplicit& inCellSet, + Device) { this->FindPointsStart(Device()); this->FindPoints(inCellSet, Device()); @@ -104,9 +97,8 @@ public: /// Get this class ready for identifying the points used by cell sets. /// - template - VTKM_CONT - void FindPointsStart(Device) + template + VTKM_CONT void FindPointsStart(Device) { this->MaskArray.ReleaseResources(); } @@ -115,14 +107,12 @@ public: /// points are those that are not found in any cell sets passed to this /// method. /// - template - VTKM_CONT - void FindPoints(const vtkm::cont::CellSetExplicit &inCellSet, - Device) + template + VTKM_CONT void FindPoints( + const vtkm::cont::CellSetExplicit& inCellSet, + Device) { using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; @@ -130,28 +120,24 @@ public: { // Initialize mask array to 0. Algorithm::Copy( - vtkm::cont::ArrayHandleConstant(0, inCellSet.GetNumberOfPoints()), - this->MaskArray); + vtkm::cont::ArrayHandleConstant(0, inCellSet.GetNumberOfPoints()), + this->MaskArray); } - VTKM_ASSERT( - this->MaskArray.GetNumberOfValues() == inCellSet.GetNumberOfPoints()); + VTKM_ASSERT(this->MaskArray.GetNumberOfValues() == inCellSet.GetNumberOfPoints()); - vtkm::worklet::DispatcherMapField dispatcher; - dispatcher.Invoke( - inCellSet.GetConnectivityArray(vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell()), - this->MaskArray); + vtkm::worklet::DispatcherMapField dispatcher; + dispatcher.Invoke(inCellSet.GetConnectivityArray(vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell()), + this->MaskArray); } /// Compile the information collected from calls to \c FindPointsInCellSet to /// ready this class for mapping cell sets and fields. /// - template - VTKM_CONT - void FindPointsEnd(Device) + template + VTKM_CONT void FindPointsEnd(Device) { - this->PointScatter.reset( - new vtkm::worklet::ScatterCounting(this->MaskArray, Device(), true)); + this->PointScatter.reset(new vtkm::worklet::ScatterCounting(this->MaskArray, Device(), true)); this->MaskArray.ReleaseResources(); } @@ -162,14 +148,12 @@ public: /// returns a new cell set with cell points transformed to use the indices of /// the new reduced point arrays. /// - template - VTKM_CONT - vtkm::cont::CellSetExplicit - MapCellSet(const vtkm::cont::CellSetExplicit &inCellSet, + template + VTKM_CONT vtkm::cont::CellSetExplicit + MapCellSet(const vtkm::cont::CellSetExplicit& inCellSet, Device) const { using FromTopology = vtkm::TopologyElementTagPoint; @@ -179,24 +163,20 @@ public: VTKM_ASSERT(this->PointScatter); - vtkm::cont::ArrayHandle - newConnectivityArray; + vtkm::cont::ArrayHandle newConnectivityArray; - vtkm::worklet::DispatcherMapField dispatcher; - dispatcher.Invoke( - inCellSet.GetConnectivityArray(FromTopology(), ToTopology()), - this->PointScatter->GetInputToOutputMap(), - newConnectivityArray); + vtkm::worklet::DispatcherMapField dispatcher; + dispatcher.Invoke(inCellSet.GetConnectivityArray(FromTopology(), ToTopology()), + this->PointScatter->GetInputToOutputMap(), newConnectivityArray); - vtkm::Id numberOfPoints = - this->PointScatter->GetOutputToInputMap().GetNumberOfValues(); - vtkm::cont::CellSetExplicit - outCellSet(inCellSet.GetName()); - outCellSet.Fill(numberOfPoints, - inCellSet.GetShapesArray(FromTopology(),ToTopology()), - inCellSet.GetNumIndicesArray(FromTopology(),ToTopology()), + vtkm::Id numberOfPoints = this->PointScatter->GetOutputToInputMap().GetNumberOfValues(); + vtkm::cont::CellSetExplicit + outCellSet(inCellSet.GetName()); + outCellSet.Fill(numberOfPoints, inCellSet.GetShapesArray(FromTopology(), ToTopology()), + inCellSet.GetNumIndicesArray(FromTopology(), ToTopology()), newConnectivityArray, - inCellSet.GetIndexOffsetArray(FromTopology(),ToTopology())); + inCellSet.GetIndexOffsetArray(FromTopology(), ToTopology())); return outCellSet; } @@ -210,15 +190,14 @@ public: /// This version of point mapping performs a shallow copy by using a /// permutation array. /// - template - VTKM_CONT - vtkm::cont::ArrayHandlePermutation,InArrayHandle> - MapPointFieldShallow(const InArrayHandle &inArray) const + template + VTKM_CONT vtkm::cont::ArrayHandlePermutation, InArrayHandle> + MapPointFieldShallow(const InArrayHandle& inArray) const { VTKM_ASSERT(this->PointScatter); - return vtkm::cont::make_ArrayHandlePermutation( - this->PointScatter->GetOutputToInputMap(), inArray); + return vtkm::cont::make_ArrayHandlePermutation(this->PointScatter->GetOutputToInputMap(), + inArray); } /// \brief Maps a point field from the original points to the new reduced points @@ -230,11 +209,9 @@ public: /// This version of point mapping performs a deep copy into the destination /// array provided. /// - template - VTKM_CONT - void MapPointFieldDeep(const InArrayHandle &inArray, - OutArrayHandle &outArray, - Device) const + template + VTKM_CONT void MapPointFieldDeep(const InArrayHandle& inArray, OutArrayHandle& outArray, + Device) const { VTKM_IS_ARRAY_HANDLE(InArrayHandle); VTKM_IS_ARRAY_HANDLE(OutArrayHandle); @@ -254,9 +231,9 @@ public: /// This version of point mapping performs a deep copy into an array that is /// returned. /// - template - vtkm::cont::ArrayHandle - MapPointFieldDeep(const InArrayHandle &inArray, Device) const + template + vtkm::cont::ArrayHandle MapPointFieldDeep( + const InArrayHandle& inArray, Device) const { VTKM_IS_ARRAY_HANDLE(InArrayHandle); VTKM_IS_DEVICE_ADAPTER_TAG(Device); @@ -274,7 +251,6 @@ private: /// std::shared_ptr PointScatter; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/ScatterCounting.h b/vtkm/worklet/ScatterCounting.h index aaa1d6204..dcef8eca0 100644 --- a/vtkm/worklet/ScatterCounting.h +++ b/vtkm/worklet/ScatterCounting.h @@ -32,20 +32,22 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace detail { +namespace detail +{ -template +template struct ReverseInputToOutputMapKernel : vtkm::exec::FunctorBase { - using InputMapType = typename - vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst; - using OutputMapType = typename - vtkm::cont::ArrayHandle::ExecutionTypes::Portal; - using VisitType = typename - vtkm::cont::ArrayHandle::ExecutionTypes::Portal; + using InputMapType = + typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst; + using OutputMapType = typename vtkm::cont::ArrayHandle::ExecutionTypes::Portal; + using VisitType = + typename vtkm::cont::ArrayHandle::ExecutionTypes::Portal; InputMapType InputToOutputMap; OutputMapType OutputToInputMap; @@ -53,15 +55,15 @@ struct ReverseInputToOutputMapKernel : vtkm::exec::FunctorBase vtkm::Id OutputSize; VTKM_CONT - ReverseInputToOutputMapKernel(const InputMapType &inputToOutputMap, - const OutputMapType &outputToInputMap, - const VisitType &visit, + ReverseInputToOutputMapKernel(const InputMapType& inputToOutputMap, + const OutputMapType& outputToInputMap, const VisitType& visit, vtkm::Id outputSize) - : InputToOutputMap(inputToOutputMap), - OutputToInputMap(outputToInputMap), - Visit(visit), - OutputSize(outputSize) - { } + : InputToOutputMap(inputToOutputMap) + , OutputToInputMap(outputToInputMap) + , Visit(visit) + , OutputSize(outputSize) + { + } VTKM_EXEC void operator()(vtkm::Id inputIndex) const @@ -69,7 +71,7 @@ struct ReverseInputToOutputMapKernel : vtkm::exec::FunctorBase vtkm::Id outputStartIndex; if (inputIndex > 0) { - outputStartIndex = this->InputToOutputMap.Get(inputIndex-1); + outputStartIndex = this->InputToOutputMap.Get(inputIndex - 1); } else { @@ -78,9 +80,7 @@ struct ReverseInputToOutputMapKernel : vtkm::exec::FunctorBase vtkm::Id outputEndIndex = this->InputToOutputMap.Get(inputIndex); vtkm::IdComponent visitIndex = 0; - for (vtkm::Id outputIndex = outputStartIndex; - outputIndex < outputEndIndex; - outputIndex++) + for (vtkm::Id outputIndex = outputStartIndex; outputIndex < outputEndIndex; outputIndex++) { this->OutputToInputMap.Set(outputIndex, inputIndex); this->Visit.Set(outputIndex, visitIndex); @@ -89,56 +89,57 @@ struct ReverseInputToOutputMapKernel : vtkm::exec::FunctorBase } }; -template +template struct SubtractToVisitIndexKernel : vtkm::exec::FunctorBase { - using StartsOfGroupsType = typename - vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst; - using VisitType = typename - vtkm::cont::ArrayHandle::ExecutionTypes::Portal; + using StartsOfGroupsType = + typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst; + using VisitType = + typename vtkm::cont::ArrayHandle::ExecutionTypes::Portal; StartsOfGroupsType StartsOfGroups; VisitType Visit; VTKM_CONT - SubtractToVisitIndexKernel(const StartsOfGroupsType &startsOfGroups, - const VisitType &visit) - : StartsOfGroups(startsOfGroups), Visit(visit) - { } + SubtractToVisitIndexKernel(const StartsOfGroupsType& startsOfGroups, const VisitType& visit) + : StartsOfGroups(startsOfGroups) + , Visit(visit) + { + } VTKM_EXEC void operator()(vtkm::Id inputIndex) const { vtkm::Id startOfGroup = this->StartsOfGroups.Get(inputIndex); - vtkm::IdComponent visitIndex = - static_cast(inputIndex - startOfGroup); + vtkm::IdComponent visitIndex = static_cast(inputIndex - startOfGroup); this->Visit.Set(inputIndex, visitIndex); } }; -template +template struct AdjustMapByOne : vtkm::exec::FunctorBase { - using OffByOnePortalType = typename - vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst; - using CorrectedPortalType = typename - vtkm::cont::ArrayHandle::ExecutionTypes::Portal; + using OffByOnePortalType = + typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst; + using CorrectedPortalType = + typename vtkm::cont::ArrayHandle::ExecutionTypes::Portal; OffByOnePortalType MapOffByOne; CorrectedPortalType MapCorrected; VTKM_CONT - AdjustMapByOne(const OffByOnePortalType &mapOffByOne, - const CorrectedPortalType &mapCorrected) - : MapOffByOne(mapOffByOne), MapCorrected(mapCorrected) - { } + AdjustMapByOne(const OffByOnePortalType& mapOffByOne, const CorrectedPortalType& mapCorrected) + : MapOffByOne(mapOffByOne) + , MapCorrected(mapCorrected) + { + } VTKM_EXEC void operator()(vtkm::Id index) const { if (index != 0) { - this->MapCorrected.Set(index, this->MapOffByOne.Get(index-1)); + this->MapCorrected.Set(index, this->MapOffByOne.Get(index - 1)); } else { @@ -170,28 +171,24 @@ struct ScatterCounting /// other users might make use of it, so you can instruct the constructor /// to save the input to output map. /// - template - VTKM_CONT - ScatterCounting(const CountArrayType &countArray, - Device, - bool saveInputToOutputMap = false) + template + VTKM_CONT ScatterCounting(const CountArrayType& countArray, Device, + bool saveInputToOutputMap = false) { this->BuildArrays(countArray, Device(), saveInputToOutputMap); } typedef vtkm::cont::ArrayHandle OutputToInputMapType; - template - VTKM_CONT - OutputToInputMapType GetOutputToInputMap(RangeType) const + template + VTKM_CONT OutputToInputMapType GetOutputToInputMap(RangeType) const { return this->OutputToInputMap; } typedef vtkm::cont::ArrayHandle VisitArrayType; - template - VTKM_CONT - VisitArrayType GetVisitArray(RangeType) const + template + VTKM_CONT VisitArrayType GetVisitArray(RangeType) const { return this->VisitArray; } @@ -202,10 +199,8 @@ struct ScatterCounting if (inputRange != this->InputRange) { std::stringstream msg; - msg << "ScatterCounting initialized with input domain of size " - << this->InputRange - << " but used with a worklet invoke of size " - << inputRange << std::endl; + msg << "ScatterCounting initialized with input domain of size " << this->InputRange + << " but used with a worklet invoke of size " << inputRange << std::endl; throw vtkm::cont::ErrorBadValue(msg.str()); } return this->VisitArray.GetNumberOfValues(); @@ -213,23 +208,17 @@ struct ScatterCounting VTKM_CONT vtkm::Id GetOutputRange(vtkm::Id3 inputRange) const { - return this->GetOutputRange(inputRange[0]*inputRange[1]*inputRange[2]); + return this->GetOutputRange(inputRange[0] * inputRange[1] * inputRange[2]); } VTKM_CONT - OutputToInputMapType GetOutputToInputMap() const - { - return this->OutputToInputMap; - } + OutputToInputMapType GetOutputToInputMap() const { return this->OutputToInputMap; } /// This array will not be valid unless explicitly instructed to be saved. /// (See documentation for the constructor.) /// VTKM_CONT - vtkm::cont::ArrayHandle GetInputToOutputMap() const - { - return this->InputToOutputMap; - } + vtkm::cont::ArrayHandle GetInputToOutputMap() const { return this->InputToOutputMap; } private: vtkm::Id InputRange; @@ -237,11 +226,8 @@ private: OutputToInputMapType OutputToInputMap; VisitArrayType VisitArray; - template - VTKM_CONT - void BuildArrays(const CountArrayType &count, - Device, - bool saveInputToOutputMap) + template + VTKM_CONT void BuildArrays(const CountArrayType& count, Device, bool saveInputToOutputMap) { VTKM_IS_ARRAY_HANDLE(CountArrayType); VTKM_IS_DEVICE_ADAPTER_TAG(Device); @@ -254,10 +240,8 @@ private: // building the output to input map. Later we will either correct the // map or delete it. vtkm::cont::ArrayHandle inputToOutputMapOffByOne; - vtkm::Id outputSize = - vtkm::cont::DeviceAdapterAlgorithm::ScanInclusive( - vtkm::cont::make_ArrayHandleCast(count, vtkm::Id()), - inputToOutputMapOffByOne); + vtkm::Id outputSize = vtkm::cont::DeviceAdapterAlgorithm::ScanInclusive( + vtkm::cont::make_ArrayHandleCast(count, vtkm::Id()), inputToOutputMapOffByOne); // We have implemented two different ways to compute the output to input // map. The first way is to use a binary search on each output index into @@ -271,69 +255,57 @@ private: // place for optimization. if (outputSize < this->InputRange) { - this->BuildOutputToInputMapWithFind( - outputSize, inputToOutputMapOffByOne, Device()); + this->BuildOutputToInputMapWithFind(outputSize, inputToOutputMapOffByOne, Device()); } else { - this->BuildOutputToInputMapWithIterate( - outputSize, inputToOutputMapOffByOne, Device()); + this->BuildOutputToInputMapWithIterate(outputSize, inputToOutputMapOffByOne, Device()); } if (saveInputToOutputMap) { // Since we are saving it, correct the input to output map. - detail::AdjustMapByOne - kernel(inputToOutputMapOffByOne.PrepareForInput(Device()), - this->InputToOutputMap.PrepareForOutput(this->InputRange, - Device())); + detail::AdjustMapByOne kernel( + inputToOutputMapOffByOne.PrepareForInput(Device()), + this->InputToOutputMap.PrepareForOutput(this->InputRange, Device())); - vtkm::cont::DeviceAdapterAlgorithm::Schedule( - kernel, this->InputRange); + vtkm::cont::DeviceAdapterAlgorithm::Schedule(kernel, this->InputRange); } } - template - VTKM_CONT - void BuildOutputToInputMapWithFind( - vtkm::Id outputSize, - vtkm::cont::ArrayHandle inputToOutputMapOffByOne, - Device) + template + VTKM_CONT void BuildOutputToInputMapWithFind( + vtkm::Id outputSize, vtkm::cont::ArrayHandle inputToOutputMapOffByOne, Device) { vtkm::cont::ArrayHandleIndex outputIndices(outputSize); - vtkm::cont::DeviceAdapterAlgorithm::UpperBounds( - inputToOutputMapOffByOne, outputIndices, this->OutputToInputMap); + vtkm::cont::DeviceAdapterAlgorithm::UpperBounds(inputToOutputMapOffByOne, outputIndices, + this->OutputToInputMap); vtkm::cont::ArrayHandle startsOfGroups; // This find gives the index of the start of a group. - vtkm::cont::DeviceAdapterAlgorithm::LowerBounds( - this->OutputToInputMap, this->OutputToInputMap, startsOfGroups); + vtkm::cont::DeviceAdapterAlgorithm::LowerBounds(this->OutputToInputMap, + this->OutputToInputMap, startsOfGroups); - detail::SubtractToVisitIndexKernel - kernel(startsOfGroups.PrepareForInput(Device()), - this->VisitArray.PrepareForOutput(outputSize, Device())); + detail::SubtractToVisitIndexKernel kernel( + startsOfGroups.PrepareForInput(Device()), + this->VisitArray.PrepareForOutput(outputSize, Device())); vtkm::cont::DeviceAdapterAlgorithm::Schedule(kernel, outputSize); } - template - VTKM_CONT - void BuildOutputToInputMapWithIterate( - vtkm::Id outputSize, - vtkm::cont::ArrayHandle inputToOutputMapOffByOne, - Device) + template + VTKM_CONT void BuildOutputToInputMapWithIterate( + vtkm::Id outputSize, vtkm::cont::ArrayHandle inputToOutputMapOffByOne, Device) { - detail::ReverseInputToOutputMapKernel - kernel(inputToOutputMapOffByOne.PrepareForInput(Device()), - this->OutputToInputMap.PrepareForOutput(outputSize, Device()), - this->VisitArray.PrepareForOutput(outputSize, Device()), - outputSize); + detail::ReverseInputToOutputMapKernel kernel( + inputToOutputMapOffByOne.PrepareForInput(Device()), + this->OutputToInputMap.PrepareForOutput(outputSize, Device()), + this->VisitArray.PrepareForOutput(outputSize, Device()), outputSize); vtkm::cont::DeviceAdapterAlgorithm::Schedule( - kernel, inputToOutputMapOffByOne.GetNumberOfValues()); + kernel, inputToOutputMapOffByOne.GetNumberOfValues()); } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/ScatterIdentity.h b/vtkm/worklet/ScatterIdentity.h index 2d37dcbf5..50ed83ee8 100644 --- a/vtkm/worklet/ScatterIdentity.h +++ b/vtkm/worklet/ScatterIdentity.h @@ -25,8 +25,10 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ /// \brief A scatter that maps input directly to output. /// @@ -47,30 +49,24 @@ struct ScatterIdentity VTKM_CONT OutputToInputMapType GetOutputToInputMap(vtkm::Id3 inputRange) const { - return this->GetOutputToInputMap( - inputRange[0]*inputRange[1]*inputRange[2]); + return this->GetOutputToInputMap(inputRange[0] * inputRange[1] * inputRange[2]); } typedef vtkm::cont::ArrayHandleConstant VisitArrayType; VTKM_CONT - VisitArrayType GetVisitArray(vtkm::Id inputRange) const - { - return VisitArrayType(1, inputRange); - } + VisitArrayType GetVisitArray(vtkm::Id inputRange) const { return VisitArrayType(1, inputRange); } VTKM_CONT VisitArrayType GetVisitArray(vtkm::Id3 inputRange) const { - return this->GetVisitArray(inputRange[0]*inputRange[1]*inputRange[2]); + return this->GetVisitArray(inputRange[0] * inputRange[1] * inputRange[2]); } - template - VTKM_CONT - RangeType GetOutputRange(RangeType inputRange) const + template + VTKM_CONT RangeType GetOutputRange(RangeType inputRange) const { return inputRange; } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/ScatterUniform.h b/vtkm/worklet/ScatterUniform.h index 57a3b76b0..f60ccf071 100644 --- a/vtkm/worklet/ScatterUniform.h +++ b/vtkm/worklet/ScatterUniform.h @@ -26,10 +26,13 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace detail { +namespace detail +{ struct FunctorModulus { @@ -38,7 +41,8 @@ struct FunctorModulus VTKM_EXEC_CONT FunctorModulus(vtkm::IdComponent modulus = 1) : Modulus(modulus) - { } + { + } VTKM_EXEC_CONT vtkm::IdComponent operator()(vtkm::Id index) const @@ -54,15 +58,12 @@ struct FunctorDiv VTKM_EXEC_CONT FunctorDiv(vtkm::Id divisor = 1) : Divisor(divisor) - { } + { + } VTKM_EXEC_CONT - vtkm::Id operator()(vtkm::Id index) const - { - return index / this->Divisor; - } + vtkm::Id operator()(vtkm::Id index) const { return index / this->Divisor; } }; - } /// \brief A scatter that maps input to some constant numbers of output. @@ -78,7 +79,8 @@ struct ScatterUniform VTKM_CONT ScatterUniform(vtkm::IdComponent numOutputsPerInput) : NumOutputsPerInput(numOutputsPerInput) - { } + { + } VTKM_CONT vtkm::Id GetOutputRange(vtkm::Id inputRange) const @@ -88,24 +90,20 @@ struct ScatterUniform VTKM_CONT vtkm::Id GetOutputRange(vtkm::Id3 inputRange) const { - return this->GetOutputRange(inputRange[0]*inputRange[1]*inputRange[2]); + return this->GetOutputRange(inputRange[0] * inputRange[1] * inputRange[2]); } - typedef vtkm::cont::ArrayHandleImplicit - OutputToInputMapType; - template - VTKM_CONT - OutputToInputMapType GetOutputToInputMap(RangeType inputRange) const + typedef vtkm::cont::ArrayHandleImplicit OutputToInputMapType; + template + VTKM_CONT OutputToInputMapType GetOutputToInputMap(RangeType inputRange) const { return OutputToInputMapType(detail::FunctorDiv(this->NumOutputsPerInput), this->GetOutputRange(inputRange)); } - typedef vtkm::cont::ArrayHandleImplicit - VisitArrayType; - template - VTKM_CONT - VisitArrayType GetVisitArray(RangeType inputRange) const + typedef vtkm::cont::ArrayHandleImplicit VisitArrayType; + template + VTKM_CONT VisitArrayType GetVisitArray(RangeType inputRange) const { return VisitArrayType(detail::FunctorModulus(this->NumOutputsPerInput), this->GetOutputRange(inputRange)); @@ -114,7 +112,6 @@ struct ScatterUniform private: vtkm::IdComponent NumOutputsPerInput; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/StreamLineUniformGrid.h b/vtkm/worklet/StreamLineUniformGrid.h index b2cdf87f1..d8f0f22c5 100644 --- a/vtkm/worklet/StreamLineUniformGrid.h +++ b/vtkm/worklet/StreamLineUniformGrid.h @@ -35,104 +35,110 @@ #include -namespace vtkm { +namespace vtkm +{ // Take this out when defined in CellShape.h const vtkm::UInt8 CELL_SHAPE_POLY_LINE = 4; -namespace worklet { +namespace worklet +{ -namespace internal { +namespace internal +{ - enum StreamLineMode +enum StreamLineMode +{ + FORWARD = 0, + BACKWARD = 1, + BOTH = 2 +}; + +// Trilinear interpolation to calculate vector data at position +template +VTKM_EXEC vtkm::Vec VecDataAtPos(vtkm::Vec pos, const vtkm::Id3& vdims, + const vtkm::Id& planesize, const vtkm::Id& rowsize, + const PortalType& vecdata) +{ + // Adjust initial position to be within bounding box of grid + for (vtkm::IdComponent d = 0; d < 3; d++) { - FORWARD = 0, - BACKWARD = 1, - BOTH = 2 - }; - - // Trilinear interpolation to calculate vector data at position - template - VTKM_EXEC - vtkm::Vec VecDataAtPos( - vtkm::Vec pos, - const vtkm::Id3 &vdims, - const vtkm::Id &planesize, - const vtkm::Id &rowsize, - const PortalType &vecdata) - { - // Adjust initial position to be within bounding box of grid - for (vtkm::IdComponent d = 0; d < 3; d++) - { - if (pos[d] < 0.0f) - pos[d] = 0.0f; - if (pos[d] > static_cast(vdims[d] - 1)) - pos[d] = static_cast(vdims[d] - 1); - } - - // Set the eight corner indices with no wraparound - vtkm::Id3 idx000, idx001, idx010, idx011, idx100, idx101, idx110, idx111; - idx000[0] = static_cast(floor(pos[0])); - idx000[1] = static_cast(floor(pos[1])); - idx000[2] = static_cast(floor(pos[2])); - - idx001 = idx000; idx001[0] = (idx001[0] + 1) <= vdims[0] - 1 ? idx001[0] + 1 : vdims[0] - 1; - idx010 = idx000; idx010[1] = (idx010[1] + 1) <= vdims[1] - 1 ? idx010[1] + 1 : vdims[1] - 1; - idx011 = idx010; idx011[0] = (idx011[0] + 1) <= vdims[0] - 1 ? idx011[0] + 1 : vdims[0] - 1; - idx100 = idx000; idx100[2] = (idx100[2] + 1) <= vdims[2] - 1 ? idx100[2] + 1 : vdims[2] - 1; - idx101 = idx100; idx101[0] = (idx101[0] + 1) <= vdims[0] - 1 ? idx101[0] + 1 : vdims[0] - 1; - idx110 = idx100; idx110[1] = (idx110[1] + 1) <= vdims[1] - 1 ? idx110[1] + 1 : vdims[1] - 1; - idx111 = idx110; idx111[0] = (idx111[0] + 1) <= vdims[0] - 1 ? idx111[0] + 1 : vdims[0] - 1; - - // Get the vecdata at the eight corners - vtkm::Vec v000, v001, v010, v011, v100, v101, v110, v111; - v000 = vecdata.Get(idx000[2] * planesize + idx000[1] * rowsize + idx000[0]); - v001 = vecdata.Get(idx001[2] * planesize + idx001[1] * rowsize + idx001[0]); - v010 = vecdata.Get(idx010[2] * planesize + idx010[1] * rowsize + idx010[0]); - v011 = vecdata.Get(idx011[2] * planesize + idx011[1] * rowsize + idx011[0]); - v100 = vecdata.Get(idx100[2] * planesize + idx100[1] * rowsize + idx100[0]); - v101 = vecdata.Get(idx101[2] * planesize + idx101[1] * rowsize + idx101[0]); - v110 = vecdata.Get(idx110[2] * planesize + idx110[1] * rowsize + idx110[0]); - v111 = vecdata.Get(idx111[2] * planesize + idx111[1] * rowsize + idx111[0]); - - // Interpolation in X - vtkm::Vec v00, v01, v10, v11; - FieldType a = pos[0] - static_cast(floor(pos[0])); - v00[0] = (1.0f - a) * v000[0] + a * v001[0]; - v00[1] = (1.0f - a) * v000[1] + a * v001[1]; - v00[2] = (1.0f - a) * v000[2] + a * v001[2]; - - v01[0] = (1.0f - a) * v010[0] + a * v011[0]; - v01[1] = (1.0f - a) * v010[1] + a * v011[1]; - v01[2] = (1.0f - a) * v010[2] + a * v011[2]; - - v10[0] = (1.0f - a) * v100[0] + a * v101[0]; - v10[1] = (1.0f - a) * v100[1] + a * v101[1]; - v10[2] = (1.0f - a) * v100[2] + a * v101[2]; - - v11[0] = (1.0f - a) * v110[0] + a * v111[0]; - v11[1] = (1.0f - a) * v110[1] + a * v111[1]; - v11[2] = (1.0f - a) * v110[2] + a * v111[2]; - - // Interpolation in Y - vtkm::Vec v0, v1; - a = pos[1] - static_cast(floor(pos[1])); - v0[0] = (1.0f - a) * v00[0] + a * v01[0]; - v0[1] = (1.0f - a) * v00[1] + a * v01[1]; - v0[2] = (1.0f - a) * v00[2] + a * v01[2]; - - v1[0] = (1.0f - a) * v10[0] + a * v11[0]; - v1[1] = (1.0f - a) * v10[1] + a * v11[1]; - v1[2] = (1.0f - a) * v10[2] + a * v11[2]; - - // Interpolation in Z - vtkm::Vec v; - a = pos[2] - static_cast(floor(pos[2])); - v[0] = (1.0f - a) * v0[0] + v1[0]; - v[1] = (1.0f - a) * v0[1] + v1[1]; - v[2] = (1.0f - a) * v0[2] + v1[2]; - return v; + if (pos[d] < 0.0f) + pos[d] = 0.0f; + if (pos[d] > static_cast(vdims[d] - 1)) + pos[d] = static_cast(vdims[d] - 1); } + + // Set the eight corner indices with no wraparound + vtkm::Id3 idx000, idx001, idx010, idx011, idx100, idx101, idx110, idx111; + idx000[0] = static_cast(floor(pos[0])); + idx000[1] = static_cast(floor(pos[1])); + idx000[2] = static_cast(floor(pos[2])); + + idx001 = idx000; + idx001[0] = (idx001[0] + 1) <= vdims[0] - 1 ? idx001[0] + 1 : vdims[0] - 1; + idx010 = idx000; + idx010[1] = (idx010[1] + 1) <= vdims[1] - 1 ? idx010[1] + 1 : vdims[1] - 1; + idx011 = idx010; + idx011[0] = (idx011[0] + 1) <= vdims[0] - 1 ? idx011[0] + 1 : vdims[0] - 1; + idx100 = idx000; + idx100[2] = (idx100[2] + 1) <= vdims[2] - 1 ? idx100[2] + 1 : vdims[2] - 1; + idx101 = idx100; + idx101[0] = (idx101[0] + 1) <= vdims[0] - 1 ? idx101[0] + 1 : vdims[0] - 1; + idx110 = idx100; + idx110[1] = (idx110[1] + 1) <= vdims[1] - 1 ? idx110[1] + 1 : vdims[1] - 1; + idx111 = idx110; + idx111[0] = (idx111[0] + 1) <= vdims[0] - 1 ? idx111[0] + 1 : vdims[0] - 1; + + // Get the vecdata at the eight corners + vtkm::Vec v000, v001, v010, v011, v100, v101, v110, v111; + v000 = vecdata.Get(idx000[2] * planesize + idx000[1] * rowsize + idx000[0]); + v001 = vecdata.Get(idx001[2] * planesize + idx001[1] * rowsize + idx001[0]); + v010 = vecdata.Get(idx010[2] * planesize + idx010[1] * rowsize + idx010[0]); + v011 = vecdata.Get(idx011[2] * planesize + idx011[1] * rowsize + idx011[0]); + v100 = vecdata.Get(idx100[2] * planesize + idx100[1] * rowsize + idx100[0]); + v101 = vecdata.Get(idx101[2] * planesize + idx101[1] * rowsize + idx101[0]); + v110 = vecdata.Get(idx110[2] * planesize + idx110[1] * rowsize + idx110[0]); + v111 = vecdata.Get(idx111[2] * planesize + idx111[1] * rowsize + idx111[0]); + + // Interpolation in X + vtkm::Vec v00, v01, v10, v11; + FieldType a = pos[0] - static_cast(floor(pos[0])); + v00[0] = (1.0f - a) * v000[0] + a * v001[0]; + v00[1] = (1.0f - a) * v000[1] + a * v001[1]; + v00[2] = (1.0f - a) * v000[2] + a * v001[2]; + + v01[0] = (1.0f - a) * v010[0] + a * v011[0]; + v01[1] = (1.0f - a) * v010[1] + a * v011[1]; + v01[2] = (1.0f - a) * v010[2] + a * v011[2]; + + v10[0] = (1.0f - a) * v100[0] + a * v101[0]; + v10[1] = (1.0f - a) * v100[1] + a * v101[1]; + v10[2] = (1.0f - a) * v100[2] + a * v101[2]; + + v11[0] = (1.0f - a) * v110[0] + a * v111[0]; + v11[1] = (1.0f - a) * v110[1] + a * v111[1]; + v11[2] = (1.0f - a) * v110[2] + a * v111[2]; + + // Interpolation in Y + vtkm::Vec v0, v1; + a = pos[1] - static_cast(floor(pos[1])); + v0[0] = (1.0f - a) * v00[0] + a * v01[0]; + v0[1] = (1.0f - a) * v00[1] + a * v01[1]; + v0[2] = (1.0f - a) * v00[2] + a * v01[2]; + + v1[0] = (1.0f - a) * v10[0] + a * v11[0]; + v1[1] = (1.0f - a) * v10[1] + a * v11[1]; + v1[2] = (1.0f - a) * v10[2] + a * v11[2]; + + // Interpolation in Z + vtkm::Vec v; + a = pos[2] - static_cast(floor(pos[2])); + v[0] = (1.0f - a) * v0[0] + v1[0]; + v[1] = (1.0f - a) * v0[1] + v1[1]; + v[2] = (1.0f - a) * v0[2] + v1[2]; + return v; +} } /// \brief Compute the streamline @@ -140,35 +146,30 @@ template class StreamLineFilterUniformGrid { public: - struct IsUnity + struct IsUnity { - template - VTKM_EXEC_CONT bool operator()(const T &x) const + template + VTKM_EXEC_CONT bool operator()(const T& x) const { - return x == T(1); + return x == T(1); } }; - typedef vtkm::cont::ArrayHandle > FieldHandle; - typedef typename FieldHandle::template ExecutionTypes::PortalConst FieldPortalConstType; + typedef vtkm::cont::ArrayHandle> FieldHandle; + typedef + typename FieldHandle::template ExecutionTypes::PortalConst FieldPortalConstType; class MakeStreamLines : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn seedId, - FieldIn<> position, - ExecObject numIndices, - ExecObject validPoint, - ExecObject streamLines); + typedef void ControlSignature(FieldIn seedId, FieldIn<> position, ExecObject numIndices, + ExecObject validPoint, ExecObject streamLines); typedef void ExecutionSignature(_1, _2, _3, _4, _5, VisitIndex); typedef _1 InputDomain; typedef vtkm::worklet::ScatterUniform ScatterType; VTKM_CONT - ScatterType GetScatter() const - { - return ScatterType(2); - } + ScatterType GetScatter() const { return ScatterType(2); } FieldPortalConstType field; const vtkm::Id3 vdims; @@ -179,27 +180,23 @@ public: const vtkm::Id streammode; VTKM_CONT - MakeStreamLines(const FieldType tStep, - const vtkm::Id sMode, - const vtkm::Id nSteps, - const vtkm::Id3 dims, - FieldPortalConstType fieldArray) : - field(fieldArray), - vdims(dims), - maxsteps(nSteps), - timestep(tStep), - planesize(dims[0] * dims[1]), - rowsize(dims[0]), - streammode(sMode) + MakeStreamLines(const FieldType tStep, const vtkm::Id sMode, const vtkm::Id nSteps, + const vtkm::Id3 dims, FieldPortalConstType fieldArray) + : field(fieldArray) + , vdims(dims) + , maxsteps(nSteps) + , timestep(tStep) + , planesize(dims[0] * dims[1]) + , rowsize(dims[0]) + , streammode(sMode) { } VTKM_EXEC - void operator()(vtkm::Id &seedId, - vtkm::Vec &seedPos, - vtkm::exec::ExecutionWholeArray &numIndices, - vtkm::exec::ExecutionWholeArray &validPoint, - vtkm::exec::ExecutionWholeArray > &slLists, + void operator()(vtkm::Id& seedId, vtkm::Vec& seedPos, + vtkm::exec::ExecutionWholeArray& numIndices, + vtkm::exec::ExecutionWholeArray& validPoint, + vtkm::exec::ExecutionWholeArray>& slLists, vtkm::IdComponent visitIndex) const { // Set initial offset into the output streams array @@ -207,9 +204,8 @@ public: vtkm::Vec pre_pos = seedPos; // Forward tracing - if (visitIndex == 0 && - (streammode == vtkm::worklet::internal::FORWARD || - streammode == vtkm::worklet::internal::BOTH)) + if (visitIndex == 0 && (streammode == vtkm::worklet::internal::FORWARD || + streammode == vtkm::worklet::internal::BOTH)) { vtkm::Id index = (seedId * 2) * maxsteps; bool done = false; @@ -220,45 +216,47 @@ public: while (done != true && step < maxsteps) { vtkm::Vec vdata, adata, bdata, cdata, ddata; - vdata = internal::VecDataAtPos - (pos, vdims, planesize, rowsize, field); + vdata = internal::VecDataAtPos(pos, vdims, planesize, + rowsize, field); for (vtkm::IdComponent d = 0; d < 3; d++) { adata[d] = timestep * vdata[d]; pos[d] += adata[d] / 2.0f; } - vdata = internal::VecDataAtPos - (pos, vdims, planesize, rowsize, field); + vdata = internal::VecDataAtPos(pos, vdims, planesize, + rowsize, field); for (vtkm::IdComponent d = 0; d < 3; d++) { bdata[d] = timestep * vdata[d]; pos[d] += bdata[d] / 2.0f; } - vdata = internal::VecDataAtPos - (pos, vdims, planesize, rowsize, field); + vdata = internal::VecDataAtPos(pos, vdims, planesize, + rowsize, field); for (vtkm::IdComponent d = 0; d < 3; d++) { cdata[d] = timestep * vdata[d]; pos[d] += cdata[d] / 2.0f; } - vdata = internal::VecDataAtPos - (pos, vdims, planesize, rowsize, field); + vdata = internal::VecDataAtPos(pos, vdims, planesize, + rowsize, field); for (vtkm::IdComponent d = 0; d < 3; d++) { ddata[d] = timestep * vdata[d]; pos[d] += (adata[d] + (2.0f * bdata[d]) + (2.0f * cdata[d]) + ddata[d]) / 6.0f; } - if (pos[0] < 0.0f || pos[0] > static_cast(vdims[0]) || - pos[1] < 0.0f || pos[1] > static_cast(vdims[1]) || - pos[2] < 0.0f || pos[2] > static_cast(vdims[2])) + if (pos[0] < 0.0f || pos[0] > static_cast(vdims[0]) || pos[1] < 0.0f || + pos[1] > static_cast(vdims[1]) || pos[2] < 0.0f || + pos[2] > static_cast(vdims[2])) { pos = pre_pos; done = true; - } else { + } + else + { validPoint.Set(index, 1); slLists.Set(index++, pos); pre_pos = pos; @@ -269,9 +267,8 @@ public: } // Backward tracing - if (visitIndex == 1 && - (streammode == vtkm::worklet::internal::BACKWARD || - streammode == vtkm::worklet::internal::BOTH)) + if (visitIndex == 1 && (streammode == vtkm::worklet::internal::BACKWARD || + streammode == vtkm::worklet::internal::BOTH)) { vtkm::Id index = (seedId * 2 + 1) * maxsteps; bool done = false; @@ -282,45 +279,47 @@ public: while (done != true && step < maxsteps) { vtkm::Vec vdata, adata, bdata, cdata, ddata; - vdata = internal::VecDataAtPos - (pos, vdims, planesize, rowsize, field); + vdata = internal::VecDataAtPos(pos, vdims, planesize, + rowsize, field); for (vtkm::IdComponent d = 0; d < 3; d++) { adata[d] = timestep * (0.0f - vdata[d]); pos[d] += adata[d] / 2.0f; } - vdata = internal::VecDataAtPos - (pos, vdims, planesize, rowsize, field); + vdata = internal::VecDataAtPos(pos, vdims, planesize, + rowsize, field); for (vtkm::IdComponent d = 0; d < 3; d++) { bdata[d] = timestep * (0.0f - vdata[d]); pos[d] += bdata[d] / 2.0f; } - vdata = internal::VecDataAtPos - (pos, vdims, planesize, rowsize, field); + vdata = internal::VecDataAtPos(pos, vdims, planesize, + rowsize, field); for (vtkm::IdComponent d = 0; d < 3; d++) { cdata[d] = timestep * (0.0f - vdata[d]); pos[d] += cdata[d] / 2.0f; } - vdata = internal::VecDataAtPos - (pos, vdims, planesize, rowsize, field); + vdata = internal::VecDataAtPos(pos, vdims, planesize, + rowsize, field); for (vtkm::IdComponent d = 0; d < 3; d++) { ddata[d] = timestep * (0.0f - vdata[d]); pos[d] += (adata[d] + (2.0f * bdata[d]) + (2.0f * cdata[d]) + ddata[d]) / 6.0f; } - if (pos[0] < 0.0f || pos[0] > static_cast(vdims[0]) || - pos[1] < 0.0f || pos[1] > static_cast(vdims[1]) || - pos[2] < 0.0f || pos[2] > static_cast(vdims[2])) + if (pos[0] < 0.0f || pos[0] > static_cast(vdims[0]) || pos[1] < 0.0f || + pos[1] > static_cast(vdims[1]) || pos[2] < 0.0f || + pos[2] > static_cast(vdims[2])) { pos = pre_pos; done = true; - } else { + } + else + { validPoint.Set(index, 1); slLists.Set(index++, pos); pre_pos = pos; @@ -332,28 +331,23 @@ public: } }; - StreamLineFilterUniformGrid() - { - } + StreamLineFilterUniformGrid() {} - vtkm::cont::DataSet Run(const vtkm::cont::DataSet &InDataSet, - vtkm::Id streamMode, - vtkm::Id numSeeds, - vtkm::Id maxSteps, - FieldType timeStep) + vtkm::cont::DataSet Run(const vtkm::cont::DataSet& InDataSet, vtkm::Id streamMode, + vtkm::Id numSeeds, vtkm::Id maxSteps, FieldType timeStep) { typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; // Get information from input dataset vtkm::cont::CellSetStructured<3> inCellSet; InDataSet.GetCellSet(0).CopyTo(inCellSet); - vtkm::Id3 vdims= inCellSet.GetSchedulingRange(vtkm::TopologyElementTagPoint()); + vtkm::Id3 vdims = inCellSet.GetSchedulingRange(vtkm::TopologyElementTagPoint()); - vtkm::cont::ArrayHandle > fieldArray; + vtkm::cont::ArrayHandle> fieldArray; InDataSet.GetField("vecData").GetData().CopyTo(fieldArray); // Generate random seeds for starting streamlines - std::vector > seeds; + std::vector> seeds; for (vtkm::Id i = 0; i < numSeeds; i++) { vtkm::Vec seed; @@ -362,8 +356,8 @@ public: seed[2] = static_cast(rand() % vdims[2]); seeds.push_back(seed); } - vtkm::cont::ArrayHandle > seedPosArray = - vtkm::cont::make_ArrayHandle(&seeds[0], numSeeds); + vtkm::cont::ArrayHandle> seedPosArray = + vtkm::cont::make_ArrayHandle(&seeds[0], numSeeds); vtkm::cont::ArrayHandleCounting seedIdArray(0, 1, numSeeds); // Number of streams * number of steps * [forward, backward] @@ -371,7 +365,7 @@ public: vtkm::Id maxConnectivityLen = numCells * maxSteps; // Stream array at max size will be filled with stream coordinates - vtkm::cont::ArrayHandle > streamArray; + vtkm::cont::ArrayHandle> streamArray; streamArray.Allocate(maxConnectivityLen); // NumIndices per polyline cell filled in by MakeStreamLines @@ -381,7 +375,8 @@ public: // All cells are polylines vtkm::cont::ArrayHandle cellTypes; cellTypes.Allocate(numCells); - vtkm::cont::ArrayHandleConstant polyLineShape(vtkm::CELL_SHAPE_POLY_LINE, numCells); + vtkm::cont::ArrayHandleConstant polyLineShape(vtkm::CELL_SHAPE_POLY_LINE, + numCells); DeviceAlgorithm::Copy(polyLineShape, cellTypes); // Possible maxSteps points but if less use stencil @@ -391,19 +386,15 @@ public: DeviceAlgorithm::Copy(zeros, validPoint); // Worklet to make the streamlines - MakeStreamLines makeStreamLines(timeStep, - streamMode, - maxSteps, - vdims, + MakeStreamLines makeStreamLines(timeStep, streamMode, maxSteps, vdims, fieldArray.PrepareForInput(DeviceAdapter())); typedef typename vtkm::worklet::DispatcherMapField MakeStreamLinesDispatcher; MakeStreamLinesDispatcher makeStreamLinesDispatcher(makeStreamLines); makeStreamLinesDispatcher.Invoke( - seedIdArray, - seedPosArray, - vtkm::exec::ExecutionWholeArray(numIndices, numCells), - vtkm::exec::ExecutionWholeArray(validPoint, maxConnectivityLen), - vtkm::exec::ExecutionWholeArray >(streamArray, maxConnectivityLen)); + seedIdArray, seedPosArray, + vtkm::exec::ExecutionWholeArray(numIndices, numCells), + vtkm::exec::ExecutionWholeArray(validPoint, maxConnectivityLen), + vtkm::exec::ExecutionWholeArray>(streamArray, maxConnectivityLen)); // Size of connectivity based on size of returned streamlines vtkm::cont::ArrayHandle numIndicesOut; @@ -415,25 +406,20 @@ public: DeviceAlgorithm::Copy(connCount, connectivity); // Compact the stream array so it only has valid points - vtkm::cont::ArrayHandle > coordinates; - DeviceAlgorithm::CopyIf(streamArray, - validPoint, - coordinates, - IsUnity()); + vtkm::cont::ArrayHandle> coordinates; + DeviceAlgorithm::CopyIf(streamArray, validPoint, coordinates, IsUnity()); // Create the output data set vtkm::cont::DataSet OutDataSet; vtkm::cont::CellSetExplicit<> outCellSet; - outCellSet.Fill( - coordinates.GetNumberOfValues(), cellTypes, numIndices, connectivity); + outCellSet.Fill(coordinates.GetNumberOfValues(), cellTypes, numIndices, connectivity); OutDataSet.AddCellSet(outCellSet); OutDataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); return OutDataSet; } }; - } } diff --git a/vtkm/worklet/Tetrahedralize.h b/vtkm/worklet/Tetrahedralize.h index 98e8b6e1f..a50b3eb43 100644 --- a/vtkm/worklet/Tetrahedralize.h +++ b/vtkm/worklet/Tetrahedralize.h @@ -23,16 +23,17 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ // // Distribute multiple copies of cell data depending on cells create from original // struct DistributeCellData : public vtkm::worklet::WorkletMapField { - typedef void ControlSignature(FieldIn<> inIndices, - FieldOut<> outIndices); + typedef void ControlSignature(FieldIn<> inIndices, FieldOut<> outIndices); typedef void ExecutionSignature(_1, _2); typedef vtkm::worklet::ScatterCounting ScatterType; @@ -41,18 +42,17 @@ struct DistributeCellData : public vtkm::worklet::WorkletMapField ScatterType GetScatter() const { return this->Scatter; } template - VTKM_CONT - DistributeCellData(const CountArrayType &countArray, - DeviceAdapter device) : - Scatter(countArray, device) { } + VTKM_CONT DistributeCellData(const CountArrayType& countArray, DeviceAdapter device) + : Scatter(countArray, device) + { + } template - VTKM_EXEC - void operator()(T inputIndex, - T &outputIndex) const + VTKM_EXEC void operator()(T inputIndex, T& outputIndex) const { outputIndex = inputIndex; } + private: ScatterType Scatter; }; @@ -60,13 +60,14 @@ private: class Tetrahedralize { public: - Tetrahedralize() : OutCellsPerCell() {} + Tetrahedralize() + : OutCellsPerCell() + { + } // Tetrahedralize explicit data set, save number of tetra cells per input - template - vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, - const DeviceAdapter&) + template + vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, const DeviceAdapter&) { TetrahedralizeExplicit worklet; return worklet.Run(cellSet, this->OutCellsPerCell); @@ -74,7 +75,7 @@ public: // Tetrahedralize structured data set, save number of tetra cells per input template - vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetStructured<3> &cellSet, + vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetStructured<3>& cellSet, const DeviceAdapter&) { TetrahedralizeStructured worklet; @@ -82,19 +83,15 @@ public: } template - vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetStructured<2>&, - const DeviceAdapter&) + vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetStructured<2>&, const DeviceAdapter&) { throw vtkm::cont::ErrorBadType("CellSetStructured<2> can't be tetrahedralized"); } // Using the saved input to output cells, expand cell data - template + template vtkm::cont::ArrayHandle ProcessField( - const vtkm::cont::ArrayHandle &input, - const DeviceAdapter& device) + const vtkm::cont::ArrayHandle& input, const DeviceAdapter& device) { vtkm::cont::ArrayHandle output; @@ -108,7 +105,6 @@ public: private: vtkm::cont::ArrayHandle OutCellsPerCell; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/Threshold.h b/vtkm/worklet/Threshold.h index 28477b562..1a702ee91 100644 --- a/vtkm/worklet/Threshold.h +++ b/vtkm/worklet/Threshold.h @@ -31,35 +31,41 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ class Threshold { public: - struct BoolType : vtkm::ListTagBase { }; + struct BoolType : vtkm::ListTagBase + { + }; template class ThresholdByPointField : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(CellSetIn cellset, - FieldInPoint scalars, + typedef void ControlSignature(CellSetIn cellset, FieldInPoint scalars, FieldOutCell passFlags); typedef _3 ExecutionSignature(_2, PointCount); VTKM_CONT - ThresholdByPointField() : Predicate() { } + ThresholdByPointField() + : Predicate() + { + } VTKM_CONT - explicit ThresholdByPointField(const UnaryPredicate &predicate) + explicit ThresholdByPointField(const UnaryPredicate& predicate) : Predicate(predicate) - { } + { + } - template - VTKM_EXEC - bool operator()(const ScalarsVecType &scalars, vtkm::Id count) const + template + VTKM_EXEC bool operator()(const ScalarsVecType& scalars, vtkm::Id count) const { bool pass = false; for (vtkm::IdComponent i = 0; i < count; ++i) @@ -77,23 +83,25 @@ public: class ThresholdByCellField : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(CellSetIn cellset, - FieldInTo scalars, + typedef void ControlSignature(CellSetIn cellset, FieldInTo scalars, FieldOut passFlags); typedef _3 ExecutionSignature(_2); VTKM_CONT - ThresholdByCellField() : Predicate() { } + ThresholdByCellField() + : Predicate() + { + } VTKM_CONT - explicit ThresholdByCellField(const UnaryPredicate &predicate) + explicit ThresholdByCellField(const UnaryPredicate& predicate) : Predicate(predicate) - { } + { + } - template - VTKM_EXEC - bool operator()(const ScalarType &scalar) const + template + VTKM_EXEC bool operator()(const ScalarType& scalar) const { return this->Predicate(scalar); } @@ -103,46 +111,45 @@ public: }; template - vtkm::cont::CellSetPermutation< CellSetType > - Run(const CellSetType &cellSet, - const vtkm::cont::Field &field, - const UnaryPredicate &predicate, - DeviceAdapter device) + vtkm::cont::CellSetPermutation Run(const CellSetType& cellSet, + const vtkm::cont::Field& field, + const UnaryPredicate& predicate, + DeviceAdapter device) { - (void) device; - typedef vtkm::cont::CellSetPermutation< CellSetType > OutputType; + (void)device; + typedef vtkm::cont::CellSetPermutation OutputType; vtkm::cont::ArrayHandle passFlags; - switch(field.GetAssociation()) + switch (field.GetAssociation()) { - case vtkm::cont::Field::ASSOC_POINTS: + case vtkm::cont::Field::ASSOC_POINTS: { - typedef ThresholdByPointField ThresholdWorklet; + typedef ThresholdByPointField ThresholdWorklet; - ThresholdWorklet worklet(predicate); - DispatcherMapTopology dispatcher(worklet); - dispatcher.Invoke(cellSet, field, passFlags); - break; + ThresholdWorklet worklet(predicate); + DispatcherMapTopology dispatcher(worklet); + dispatcher.Invoke(cellSet, field, passFlags); + break; } - case vtkm::cont::Field::ASSOC_CELL_SET: + case vtkm::cont::Field::ASSOC_CELL_SET: { - typedef ThresholdByCellField ThresholdWorklet; + typedef ThresholdByCellField ThresholdWorklet; - ThresholdWorklet worklet(predicate); - DispatcherMapTopology dispatcher(worklet); - dispatcher.Invoke(cellSet, field, passFlags); - break; + ThresholdWorklet worklet(predicate); + DispatcherMapTopology dispatcher(worklet); + dispatcher.Invoke(cellSet, field, passFlags); + break; } - default: - throw vtkm::cont::ErrorBadValue("Expecting point or cell field."); + default: + throw vtkm::cont::ErrorBadValue("Expecting point or cell field."); } vtkm::cont::ArrayHandleCounting indices = vtkm::cont::make_ArrayHandleCounting(vtkm::Id(0), vtkm::Id(1), passFlags.GetNumberOfValues()); - vtkm::cont::DeviceAdapterAlgorithm - ::CopyIf(indices, passFlags, this->ValidCellIds); + vtkm::cont::DeviceAdapterAlgorithm::CopyIf(indices, passFlags, + this->ValidCellIds); return OutputType(this->ValidCellIds, cellSet, cellSet.GetName()); } @@ -151,12 +158,14 @@ public: { public: PermuteCellData(const vtkm::cont::ArrayHandle validCellIds, - vtkm::cont::DynamicArrayHandle &data) - : ValidCellIds(validCellIds), Data(&data) - { } + vtkm::cont::DynamicArrayHandle& data) + : ValidCellIds(validCellIds) + , Data(&data) + { + } template - void operator()(const ArrayHandleType &input) const + void operator()(const ArrayHandleType& input) const { *(this->Data) = vtkm::cont::DynamicArrayHandle( vtkm::cont::make_ArrayHandlePermutation(this->ValidCellIds, input)); @@ -164,7 +173,7 @@ public: private: vtkm::cont::ArrayHandle ValidCellIds; - vtkm::cont::DynamicArrayHandle *Data; + vtkm::cont::DynamicArrayHandle* Data; }; vtkm::cont::Field ProcessCellField(const vtkm::cont::Field field) const @@ -177,14 +186,13 @@ public: vtkm::cont::DynamicArrayHandle data; CastAndCall(field, PermuteCellData(this->ValidCellIds, data)); - return vtkm::cont::Field(field.GetName(), field.GetAssociation(), - field.GetAssocCellSet(), data); + return vtkm::cont::Field(field.GetName(), field.GetAssociation(), field.GetAssocCellSet(), + data); } private: vtkm::cont::ArrayHandle ValidCellIds; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/ThresholdPoints.h b/vtkm/worklet/ThresholdPoints.h index 73e7df94f..ff9ca2fca 100644 --- a/vtkm/worklet/ThresholdPoints.h +++ b/vtkm/worklet/ThresholdPoints.h @@ -27,34 +27,40 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ class ThresholdPoints { public: - struct BoolType : vtkm::ListTagBase { }; + struct BoolType : vtkm::ListTagBase + { + }; template class ThresholdPointField : public vtkm::worklet::WorkletMapCellToPoint { public: - typedef void ControlSignature(CellSetIn cellset, - FieldInPoint scalars, + typedef void ControlSignature(CellSetIn cellset, FieldInPoint scalars, FieldOutPoint passFlags); typedef _3 ExecutionSignature(_2); VTKM_CONT - ThresholdPointField() : Predicate() { } + ThresholdPointField() + : Predicate() + { + } VTKM_CONT - explicit ThresholdPointField(const UnaryPredicate &predicate) + explicit ThresholdPointField(const UnaryPredicate& predicate) : Predicate(predicate) - { } + { + } - template - VTKM_EXEC - bool operator()(const ScalarType &scalar) const + template + VTKM_EXEC bool operator()(const ScalarType& scalar) const { return this->Predicate(scalar); } @@ -63,15 +69,10 @@ public: UnaryPredicate Predicate; }; - template - vtkm::cont::CellSetSingleType<> Run( - const CellSetType &cellSet, - const ScalarsArrayHandle &scalars, - const UnaryPredicate &predicate, - DeviceAdapter) + vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, const ScalarsArrayHandle& scalars, + const UnaryPredicate& predicate, DeviceAdapter) { typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; @@ -89,16 +90,12 @@ public: DeviceAlgorithm::CopyIf(indices, passFlags, pointIds); // Make CellSetSingleType with VERTEX at each point id - vtkm::cont::CellSetSingleType< > outCellSet(cellSet.GetName()); - outCellSet.Fill(cellSet.GetNumberOfPoints(), - vtkm::CellShapeTagVertex::Id, - 1, - pointIds); + vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName()); + outCellSet.Fill(cellSet.GetNumberOfPoints(), vtkm::CellShapeTagVertex::Id, 1, pointIds); return outCellSet; } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/Triangulate.h b/vtkm/worklet/Triangulate.h index 6c9bee502..868e2979b 100644 --- a/vtkm/worklet/Triangulate.h +++ b/vtkm/worklet/Triangulate.h @@ -23,16 +23,17 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ // // Distribute multiple copies of cell data depending on cells create from original // struct DistributeCellData : public vtkm::worklet::WorkletMapField { - typedef void ControlSignature(FieldIn<> inIndices, - FieldOut<> outIndices); + typedef void ControlSignature(FieldIn<> inIndices, FieldOut<> outIndices); typedef void ExecutionSignature(_1, _2); typedef vtkm::worklet::ScatterCounting ScatterType; @@ -41,18 +42,17 @@ struct DistributeCellData : public vtkm::worklet::WorkletMapField ScatterType GetScatter() const { return this->Scatter; } template - VTKM_CONT - DistributeCellData(const CountArrayType &countArray, - DeviceAdapter device) : - Scatter(countArray, device) { } + VTKM_CONT DistributeCellData(const CountArrayType& countArray, DeviceAdapter device) + : Scatter(countArray, device) + { + } template - VTKM_EXEC - void operator()(T inputIndex, - T &outputIndex) const + VTKM_EXEC void operator()(T inputIndex, T& outputIndex) const { outputIndex = inputIndex; } + private: ScatterType Scatter; }; @@ -60,13 +60,14 @@ private: class Triangulate { public: - Triangulate() : OutCellsPerCell() {} + Triangulate() + : OutCellsPerCell() + { + } // Triangulate explicit data set, save number of triangulated cells per input - template - vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, - const DeviceAdapter&) + template + vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, const DeviceAdapter&) { TriangulateExplicit worklet; return worklet.Run(cellSet, this->OutCellsPerCell); @@ -74,7 +75,7 @@ public: // Triangulate structured data set, save number of triangulated cells per input template - vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetStructured<2> &cellSet, + vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetStructured<2>& cellSet, const DeviceAdapter&) { TriangulateStructured worklet; @@ -82,19 +83,15 @@ public: } template - vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetStructured<3>&, - const DeviceAdapter&) + vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetStructured<3>&, const DeviceAdapter&) { throw vtkm::cont::ErrorBadType("CellSetStructured<3> can't be triangulated"); } // Using the saved input to output cells, expand cell data - template + template vtkm::cont::ArrayHandle ProcessField( - const vtkm::cont::ArrayHandle &input, - const DeviceAdapter& device) + const vtkm::cont::ArrayHandle& input, const DeviceAdapter& device) { vtkm::cont::ArrayHandle output; @@ -108,7 +105,6 @@ public: private: vtkm::cont::ArrayHandle OutCellsPerCell; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/VertexClustering.h b/vtkm/worklet/VertexClustering.h index 596edc2d6..1bf6ae237 100644 --- a/vtkm/worklet/VertexClustering.h +++ b/vtkm/worklet/VertexClustering.h @@ -34,24 +34,27 @@ #include #include - //#define __VTKM_VERTEX_CLUSTERING_BENCHMARK //#include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace internal { +namespace internal +{ -template -vtkm::cont::ArrayHandle copyFromVec(vtkm::cont::ArrayHandle > const& other, +template +vtkm::cont::ArrayHandle copyFromVec(vtkm::cont::ArrayHandle> const& other, DeviceAdapter) { - const T *vmem = reinterpret_cast< const T *>(& *other.GetPortalConstControl().GetIteratorBegin()); - vtkm::cont::ArrayHandle mem = vtkm::cont::make_ArrayHandle(vmem, other.GetNumberOfValues()*N); - vtkm::cont::ArrayHandle result; - vtkm::cont::DeviceAdapterAlgorithm::Copy(mem,result); - return result; + const T* vmem = reinterpret_cast(&*other.GetPortalConstControl().GetIteratorBegin()); + vtkm::cont::ArrayHandle mem = + vtkm::cont::make_ArrayHandle(vmem, other.GetNumberOfValues() * N); + vtkm::cont::ArrayHandle result; + vtkm::cont::DeviceAdapterAlgorithm::Copy(mem, result); + return result; } template @@ -62,31 +65,29 @@ private: public: VTKM_CONT - AverageByKeyDynamicValue(const KeyArrayIn &inputKeys, - KeyArrayOut &outputKeys, - vtkm::cont::DynamicArrayHandle &outputValues) - : InputKeys(inputKeys), OutputKeys(&outputKeys), OutputValues(&outputValues) - { } + AverageByKeyDynamicValue(const KeyArrayIn& inputKeys, KeyArrayOut& outputKeys, + vtkm::cont::DynamicArrayHandle& outputValues) + : InputKeys(inputKeys) + , OutputKeys(&outputKeys) + , OutputValues(&outputValues) + { + } template - VTKM_CONT - void operator()(const ValueArrayIn& coordinates) const + VTKM_CONT void operator()(const ValueArrayIn& coordinates) const { typedef typename ValueArrayIn::ValueType ValueType; vtkm::cont::ArrayHandle outArray; - vtkm::worklet::AverageByKey(InputKeys, - coordinates, - *(this->OutputKeys), - outArray, + vtkm::worklet::AverageByKey(InputKeys, coordinates, *(this->OutputKeys), outArray, DeviceAdapter()); *(this->OutputValues) = vtkm::cont::DynamicArrayHandle(outArray); } private: KeyArrayIn InputKeys; - KeyArrayOut *OutputKeys; - vtkm::cont::DynamicArrayHandle *OutputValues; + KeyArrayOut* OutputKeys; + vtkm::cont::DynamicArrayHandle* OutputValues; }; } // namespace internal @@ -108,60 +109,53 @@ struct VertexClustering GridInfo Grid; public: - typedef void ControlSignature(FieldIn , FieldOut); + typedef void ControlSignature(FieldIn, FieldOut); typedef void ExecutionSignature(_1, _2); VTKM_CONT - MapPointsWorklet(const GridInfo &grid) + MapPointsWorklet(const GridInfo& grid) : Grid(grid) - { } - - /// determine grid resolution for clustering - template - VTKM_EXEC - vtkm::Id GetClusterId(const PointType &p) const { - typedef typename PointType::ComponentType ComponentType; - PointType gridOrigin( - static_cast(this->Grid.origin[0]), - static_cast(this->Grid.origin[1]), - static_cast(this->Grid.origin[2])); - - PointType p_rel = (p - gridOrigin) * - static_cast(this->Grid.inv_grid_width); - vtkm::Id x = vtkm::Min((vtkm::Id)p_rel[0], this->Grid.dim[0]-1); - vtkm::Id y = vtkm::Min((vtkm::Id)p_rel[1], this->Grid.dim[1]-1); - vtkm::Id z = vtkm::Min((vtkm::Id)p_rel[2], this->Grid.dim[2]-1); - return x + this->Grid.dim[0] * (y + this->Grid.dim[1] * z); // get a unique hash value } - template - VTKM_EXEC - void operator()(const PointType &point, vtkm::Id &cid) const + /// determine grid resolution for clustering + template + VTKM_EXEC vtkm::Id GetClusterId(const PointType& p) const + { + typedef typename PointType::ComponentType ComponentType; + PointType gridOrigin(static_cast(this->Grid.origin[0]), + static_cast(this->Grid.origin[1]), + static_cast(this->Grid.origin[2])); + + PointType p_rel = (p - gridOrigin) * static_cast(this->Grid.inv_grid_width); + vtkm::Id x = vtkm::Min((vtkm::Id)p_rel[0], this->Grid.dim[0] - 1); + vtkm::Id y = vtkm::Min((vtkm::Id)p_rel[1], this->Grid.dim[1] - 1); + vtkm::Id z = vtkm::Min((vtkm::Id)p_rel[2], this->Grid.dim[2] - 1); + return x + this->Grid.dim[0] * (y + this->Grid.dim[1] * z); // get a unique hash value + } + + template + VTKM_EXEC void operator()(const PointType& point, vtkm::Id& cid) const { cid = this->GetClusterId(point); - VTKM_ASSERT(cid>=0); // the id could overflow if too many cells + VTKM_ASSERT(cid >= 0); // the id could overflow if too many cells } }; - - class MapCellsWorklet: public vtkm::worklet::WorkletMapPointToCell + class MapCellsWorklet : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(CellSetIn cellset, - FieldInPoint pointClusterIds, + typedef void ControlSignature(CellSetIn cellset, FieldInPoint pointClusterIds, FieldOutCell cellClusterIds); typedef void ExecutionSignature(_2, _3); VTKM_CONT - MapCellsWorklet() - { } + MapCellsWorklet() {} // TODO: Currently only works with Triangle cell types - template - VTKM_EXEC - void operator()(const ClusterIdsVecType &pointClusterIds, - vtkm::Id3 &cellClusterId) const + template + VTKM_EXEC void operator()(const ClusterIdsVecType& pointClusterIds, + vtkm::Id3& cellClusterId) const { cellClusterId[0] = pointClusterIds[0]; cellClusterId[1] = pointClusterIds[1]; @@ -173,18 +167,15 @@ struct VertexClustering class IndexingWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn, - WholeArrayOut); - typedef void ExecutionSignature(WorkIndex, _1, _2); // WorkIndex: use vtkm indexing + typedef void ControlSignature(FieldIn, WholeArrayOut); + typedef void ExecutionSignature(WorkIndex, _1, _2); // WorkIndex: use vtkm indexing - template - VTKM_EXEC - void operator()(const vtkm::Id &counter, - const vtkm::Id &cid, - const OutPortalType &outPortal) const - { - outPortal.Set(cid, counter); - } + template + VTKM_EXEC void operator()(const vtkm::Id& counter, const vtkm::Id& cid, + const OutPortalType& outPortal) const + { + outPortal.Set(cid, counter); + } }; class Cid2PointIdWorklet : public vtkm::worklet::WorkletMapField @@ -192,44 +183,44 @@ struct VertexClustering vtkm::Id NPoints; VTKM_EXEC - void rotate(vtkm::Id3 &ids) const + void rotate(vtkm::Id3& ids) const { - vtkm::Id temp=ids[0]; ids[0] = ids[1]; ids[1] = ids[2]; ids[2] = temp; + vtkm::Id temp = ids[0]; + ids[0] = ids[1]; + ids[1] = ids[2]; + ids[2] = temp; } public: - typedef void ControlSignature(FieldIn, - FieldOut, - WholeArrayIn); + typedef void ControlSignature(FieldIn, FieldOut, WholeArrayIn); typedef void ExecutionSignature(_1, _2, _3); VTKM_CONT - Cid2PointIdWorklet( vtkm::Id nPoints ): - NPoints(nPoints) - {} - - template - VTKM_EXEC - void operator()(const vtkm::Id3 &cid3, - vtkm::Id3 &pointId3, - const InPortalType& inPortal) const + Cid2PointIdWorklet(vtkm::Id nPoints) + : NPoints(nPoints) { - if (cid3[0]==cid3[1] || cid3[0]==cid3[2] || cid3[1]==cid3[2]) + } + + template + VTKM_EXEC void operator()(const vtkm::Id3& cid3, vtkm::Id3& pointId3, + const InPortalType& inPortal) const + { + if (cid3[0] == cid3[1] || cid3[0] == cid3[2] || cid3[1] == cid3[2]) { - pointId3[0] = pointId3[1] = pointId3[2] = this->NPoints ; // invalid cell to be removed + pointId3[0] = pointId3[1] = pointId3[2] = this->NPoints; // invalid cell to be removed } else { - pointId3[0] = inPortal.Get( cid3[0] ); - pointId3[1] = inPortal.Get( cid3[1] ); - pointId3[2] = inPortal.Get( cid3[2] ); + pointId3[0] = inPortal.Get(cid3[0]); + pointId3[1] = inPortal.Get(cid3[1]); + pointId3[2] = inPortal.Get(cid3[2]); // Sort triangle point ids so that the same triangle will have the same signature // Rotate these ids making the first one the smallest - if (pointId3[0]>pointId3[1] || pointId3[0]>pointId3[2]) + if (pointId3[0] > pointId3[1] || pointId3[0] > pointId3[2]) { rotate(pointId3); - if (pointId3[0]>pointId3[1] || pointId3[0]>pointId3[2]) + if (pointId3[0] > pointId3[1] || pointId3[0] > pointId3[2]) { rotate(pointId3); } @@ -238,8 +229,9 @@ struct VertexClustering } }; - - struct TypeInt64 : vtkm::ListTagBase { }; + struct TypeInt64 : vtkm::ListTagBase + { + }; class Cid3HashWorklet : public vtkm::worklet::WorkletMapField { @@ -247,18 +239,20 @@ struct VertexClustering vtkm::Int64 NPoints; public: - typedef void ControlSignature(FieldIn , FieldOut); + typedef void ControlSignature(FieldIn, FieldOut); typedef void ExecutionSignature(_1, _2); VTKM_CONT Cid3HashWorklet(vtkm::Id nPoints) : NPoints(nPoints) - { } + { + } VTKM_EXEC - void operator()(const vtkm::Id3 &cid, vtkm::Int64 &cidHash) const + void operator()(const vtkm::Id3& cid, vtkm::Int64& cidHash) const { - cidHash = cid[0] + this->NPoints * (cid[1] + this->NPoints * cid[2]); // get a unique hash value + cidHash = + cid[0] + this->NPoints * (cid[1] + this->NPoints * cid[2]); // get a unique hash value } }; @@ -268,21 +262,22 @@ struct VertexClustering vtkm::Int64 NPoints; public: - typedef void ControlSignature(FieldIn , FieldOut); + typedef void ControlSignature(FieldIn, FieldOut); typedef void ExecutionSignature(_1, _2); VTKM_CONT Cid3UnhashWorklet(vtkm::Id nPoints) : NPoints(nPoints) - { } + { + } VTKM_EXEC - void operator()(const vtkm::Int64 &cidHash, vtkm::Id3 &cid) const + void operator()(const vtkm::Int64& cidHash, vtkm::Id3& cid) const { - cid[0] = static_cast( cidHash % this->NPoints ); - vtkm::Int64 t = cidHash / this->NPoints ; - cid[1] = static_cast( t % this->NPoints ); - cid[2] = static_cast( t / this->NPoints ); + cid[0] = static_cast(cidHash % this->NPoints); + vtkm::Int64 t = cidHash / this->NPoints; + cid[1] = static_cast(t % this->NPoints); + cid[2] = static_cast(t / this->NPoints); } }; @@ -290,7 +285,7 @@ struct VertexClustering { public: VTKM_EXEC - bool operator() (const vtkm::Id3 & a, const vtkm::Id3 & b) const + bool operator()(const vtkm::Id3& a, const vtkm::Id3& b) const { if (a[0] < 0) { @@ -298,53 +293,53 @@ struct VertexClustering // (comparing to 0 is faster than matching -1) return false; } - return b[0] < 0 || - a[0] < b[0] || - (a[0]==b[0] && a[1] < b[1]) || - (a[0]==b[0] && a[1]==b[1] && a[2] < b[2]); + return b[0] < 0 || a[0] < b[0] || (a[0] == b[0] && a[1] < b[1]) || + (a[0] == b[0] && a[1] == b[1] && a[2] < b[2]); } }; public: - /////////////////////////////////////////////////// /// \brief VertexClustering: Mesh simplification /// - template - vtkm::cont::DataSet Run(const DynamicCellSetType &cellSet, - const DynamicCoordinateHandleType &coordinates, - const vtkm::Bounds &bounds, - const vtkm::Id3& nDivisions, - DeviceAdapter) + template + vtkm::cont::DataSet Run(const DynamicCellSetType& cellSet, + const DynamicCoordinateHandleType& coordinates, + const vtkm::Bounds& bounds, const vtkm::Id3& nDivisions, DeviceAdapter) { - /// determine grid resolution for clustering GridInfo gridInfo; { - vtkm::Vec res( - bounds.X.Length()/static_cast(nDivisions[0]), - bounds.Y.Length()/static_cast(nDivisions[1]), - bounds.Z.Length()/static_cast(nDivisions[2])); + vtkm::Vec res(bounds.X.Length() / static_cast(nDivisions[0]), + bounds.Y.Length() / static_cast(nDivisions[1]), + bounds.Z.Length() / + static_cast(nDivisions[2])); gridInfo.grid_width = vtkm::Max(res[0], vtkm::Max(res[1], res[2])); - vtkm::Float64 inv_grid_width = gridInfo.inv_grid_width = vtkm::Float64(1) / gridInfo.grid_width; + vtkm::Float64 inv_grid_width = gridInfo.inv_grid_width = + vtkm::Float64(1) / gridInfo.grid_width; //printf("Bounds: %lf, %lf, %lf, %lf, %lf, %lf\n", bounds[0], bounds[1], bounds[2], bounds[3], bounds[4], bounds[5]); - gridInfo.dim[0] = vtkm::Min((vtkm::Id)vtkm::Ceil((bounds.X.Length())*inv_grid_width), nDivisions[0]); - gridInfo.dim[1] = vtkm::Min((vtkm::Id)vtkm::Ceil((bounds.Y.Length())*inv_grid_width), nDivisions[1]); - gridInfo.dim[2] = vtkm::Min((vtkm::Id)vtkm::Ceil((bounds.Z.Length())*inv_grid_width), nDivisions[2]); + gridInfo.dim[0] = + vtkm::Min((vtkm::Id)vtkm::Ceil((bounds.X.Length()) * inv_grid_width), nDivisions[0]); + gridInfo.dim[1] = + vtkm::Min((vtkm::Id)vtkm::Ceil((bounds.Y.Length()) * inv_grid_width), nDivisions[1]); + gridInfo.dim[2] = + vtkm::Min((vtkm::Id)vtkm::Ceil((bounds.Z.Length()) * inv_grid_width), nDivisions[2]); // center the mesh in the grids - vtkm::Vec center = bounds.Center(); - gridInfo.origin[0] = center[0] - gridInfo.grid_width*static_cast(gridInfo.dim[0])*.5; - gridInfo.origin[1] = center[1] - gridInfo.grid_width*static_cast(gridInfo.dim[1])*.5; - gridInfo.origin[2] = center[2] - gridInfo.grid_width*static_cast(gridInfo.dim[2])*.5; + vtkm::Vec center = bounds.Center(); + gridInfo.origin[0] = + center[0] - gridInfo.grid_width * static_cast(gridInfo.dim[0]) * .5; + gridInfo.origin[1] = + center[1] - gridInfo.grid_width * static_cast(gridInfo.dim[1]) * .5; + gridInfo.origin[2] = + center[2] - gridInfo.grid_width * static_cast(gridInfo.dim[2]) * .5; } - //construct the scheduler that will execute all the worklets +//construct the scheduler that will execute all the worklets #ifdef __VTKM_VERTEX_CLUSTERING_BENCHMARK vtkm::cont::Timer<> timer; #endif @@ -357,26 +352,22 @@ public: /// map points vtkm::cont::ArrayHandle pointCidArray; - vtkm::worklet::DispatcherMapField( - MapPointsWorklet(gridInfo)).Invoke(coordinates, pointCidArray); + vtkm::worklet::DispatcherMapField(MapPointsWorklet(gridInfo)) + .Invoke(coordinates, pointCidArray); #ifdef __VTKM_VERTEX_CLUSTERING_BENCHMARK std::cout << "Time map points (s): " << timer.GetElapsedTime() << std::endl; #endif - /// pass 2 : compute average point position for each cluster, /// using pointCidArray as the key /// vtkm::cont::ArrayHandle pointCidArrayReduced; - vtkm::cont::DynamicArrayHandle repPointArray; // representative point + vtkm::cont::DynamicArrayHandle repPointArray; // representative point internal::AverageByKeyDynamicValue, - vtkm::cont::ArrayHandle, - DeviceAdapter> - averageByKey(pointCidArray, - pointCidArrayReduced, - repPointArray); + vtkm::cont::ArrayHandle, DeviceAdapter> + averageByKey(pointCidArray, pointCidArrayReduced, repPointArray); CastAndCall(coordinates, averageByKey); #ifdef __VTKM_VERTEX_CLUSTERING_BENCHMARK @@ -391,19 +382,18 @@ public: /// of the cell vertices vtkm::cont::ArrayHandle cid3Array; - vtkm::worklet::DispatcherMapTopology( - MapCellsWorklet()).Invoke(cellSet, pointCidArray, cid3Array); + vtkm::worklet::DispatcherMapTopology(MapCellsWorklet()) + .Invoke(cellSet, pointCidArray, cid3Array); pointCidArray.ReleaseResources(); /// preparation: Get the indexes of the clustered points to prepare for new cell array vtkm::cont::ArrayHandle cidIndexArray; - cidIndexArray.PrepareForOutput(gridInfo.dim[0]*gridInfo.dim[1]*gridInfo.dim[2], + cidIndexArray.PrepareForOutput(gridInfo.dim[0] * gridInfo.dim[1] * gridInfo.dim[2], DeviceAdapter()); - vtkm::worklet::DispatcherMapField< - IndexingWorklet, - DeviceAdapter>().Invoke(pointCidArrayReduced, cidIndexArray); + vtkm::worklet::DispatcherMapField().Invoke(pointCidArrayReduced, + cidIndexArray); pointCidArrayReduced.ReleaseResources(); @@ -416,57 +406,62 @@ public: vtkm::cont::ArrayHandle pointId3Array; vtkm::worklet::DispatcherMapField( - Cid2PointIdWorklet(nPoints)).Invoke(cid3Array, pointId3Array, cidIndexArray); + Cid2PointIdWorklet(nPoints)) + .Invoke(cid3Array, pointId3Array, cidIndexArray); cid3Array.ReleaseResources(); cidIndexArray.ReleaseResources(); - bool doHashing = (nPoints < (1<<21)); // Check whether we can hash Id3 into 64-bit integers + bool doHashing = (nPoints < (1 << 21)); // Check whether we can hash Id3 into 64-bit integers if (doHashing) { /// Create hashed array vtkm::cont::ArrayHandle pointId3HashArray; - vtkm::worklet::DispatcherMapField( - Cid3HashWorklet(nPoints)).Invoke( pointId3Array, pointId3HashArray ); + vtkm::worklet::DispatcherMapField(Cid3HashWorklet(nPoints)) + .Invoke(pointId3Array, pointId3HashArray); pointId3Array.ReleaseResources(); #ifdef __VTKM_VERTEX_CLUSTERING_BENCHMARK - std::cout << "Time before sort and unique with hashing (s): " << timer.GetElapsedTime() << std::endl; + std::cout << "Time before sort and unique with hashing (s): " << timer.GetElapsedTime() + << std::endl; #endif vtkm::cont::DeviceAdapterAlgorithm::Sort(pointId3HashArray); vtkm::cont::DeviceAdapterAlgorithm::Unique(pointId3HashArray); #ifdef __VTKM_VERTEX_CLUSTERING_BENCHMARK - std::cout << "Time after sort and unique with hashing (s): " << timer.GetElapsedTime() << std::endl; + std::cout << "Time after sort and unique with hashing (s): " << timer.GetElapsedTime() + << std::endl; #endif // decode vtkm::worklet::DispatcherMapField( - Cid3UnhashWorklet(nPoints)).Invoke( pointId3HashArray, pointId3Array ); - + Cid3UnhashWorklet(nPoints)) + .Invoke(pointId3HashArray, pointId3Array); } else { #ifdef __VTKM_VERTEX_CLUSTERING_BENCHMARK - std::cout << "Time before sort and unique [no hashing] (s): " << timer.GetElapsedTime() << std::endl; + std::cout << "Time before sort and unique [no hashing] (s): " << timer.GetElapsedTime() + << std::endl; #endif vtkm::cont::DeviceAdapterAlgorithm::Sort(pointId3Array); vtkm::cont::DeviceAdapterAlgorithm::Unique(pointId3Array); #ifdef __VTKM_VERTEX_CLUSTERING_BENCHMARK - std::cout << "Time after sort and unique [no hashing] (s): " << timer.GetElapsedTime() << std::endl; + std::cout << "Time after sort and unique [no hashing] (s): " << timer.GetElapsedTime() + << std::endl; #endif } // remove the last element if invalid vtkm::Id cells = pointId3Array.GetNumberOfValues(); - if (cells > 0 && pointId3Array.GetPortalConstControl().Get(cells-1)[2] >= nPoints ) + if (cells > 0 && pointId3Array.GetPortalConstControl().Get(cells - 1)[2] >= nPoints) { cells--; pointId3Array.Shrink(cells); @@ -477,12 +472,10 @@ public: output.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", repPointArray)); - vtkm::cont::CellSetSingleType< > triangles("cells"); - triangles.Fill( repPointArray.GetNumberOfValues(), - vtkm::CellShapeTagTriangle::Id, - 3, - internal::copyFromVec(pointId3Array, DeviceAdapter()) ); - output.AddCellSet( triangles ); + vtkm::cont::CellSetSingleType<> triangles("cells"); + triangles.Fill(repPointArray.GetNumberOfValues(), vtkm::CellShapeTagTriangle::Id, 3, + internal::copyFromVec(pointId3Array, DeviceAdapter())); + output.AddCellSet(triangles); #ifdef __VTKM_VERTEX_CLUSTERING_BENCHMARK vtkm::Float64 t = timer.GetElapsedTime(); @@ -494,8 +487,6 @@ public: return output; } }; // struct VertexClustering - - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/WaveletCompressor.h b/vtkm/worklet/WaveletCompressor.h index c717434f5..2027d31fb 100644 --- a/vtkm/worklet/WaveletCompressor.h +++ b/vtkm/worklet/WaveletCompressor.h @@ -23,292 +23,253 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ class WaveletCompressor : public vtkm::worklet::wavelets::WaveletDWT { public: - // Constructor - WaveletCompressor( wavelets::WaveletName name ) : WaveletDWT( name ) {} - + WaveletCompressor(wavelets::WaveletName name) + : WaveletDWT(name) + { + } // Multi-level 1D wavelet decomposition - template< typename SignalArrayType, typename CoeffArrayType, typename DeviceTag > - VTKM_CONT - vtkm::Id WaveDecompose( const SignalArrayType &sigIn, // Input - vtkm::Id nLevels, // n levels of DWT - CoeffArrayType &coeffOut, - std::vector &L, - DeviceTag ) + template + VTKM_CONT vtkm::Id WaveDecompose(const SignalArrayType& sigIn, // Input + vtkm::Id nLevels, // n levels of DWT + CoeffArrayType& coeffOut, std::vector& L, DeviceTag) { vtkm::Id sigInLen = sigIn.GetNumberOfValues(); - if( nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel( sigInLen ) ) + if (nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel(sigInLen)) { throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! "); } - if( nLevels == 0 ) // 0 levels means no transform + if (nLevels == 0) // 0 levels means no transform { - vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( sigIn, coeffOut ); + vtkm::cont::DeviceAdapterAlgorithm::Copy(sigIn, coeffOut); return 0; } - this->ComputeL( sigInLen, nLevels, L ); // memory for L is allocated by ComputeL(). - vtkm::Id CLength = this->ComputeCoeffLength( L, nLevels ); - VTKM_ASSERT( CLength == sigInLen ); + this->ComputeL(sigInLen, nLevels, L); // memory for L is allocated by ComputeL(). + vtkm::Id CLength = this->ComputeCoeffLength(L, nLevels); + VTKM_ASSERT(CLength == sigInLen); - vtkm::Id sigInPtr = 0; // pseudo pointer for the beginning of input array + vtkm::Id sigInPtr = 0; // pseudo pointer for the beginning of input array vtkm::Id len = sigInLen; - vtkm::Id cALen = WaveletBase::GetApproxLength( len ); - vtkm::Id cptr; // pseudo pointer for the beginning of output array + vtkm::Id cALen = WaveletBase::GetApproxLength(len); + vtkm::Id cptr; // pseudo pointer for the beginning of output array vtkm::Id tlen = 0; std::vector L1d(3, 0); // Use an intermediate array - typedef typename CoeffArrayType::ValueType OutputValueType; - typedef vtkm::cont::ArrayHandle< OutputValueType > InterArrayType; + typedef typename CoeffArrayType::ValueType OutputValueType; + typedef vtkm::cont::ArrayHandle InterArrayType; // Define a few more types - typedef vtkm::cont::ArrayHandleCounting< vtkm::Id > IdArrayType; - typedef vtkm::cont::ArrayHandlePermutation< IdArrayType, CoeffArrayType > - PermutArrayType; + typedef vtkm::cont::ArrayHandleCounting IdArrayType; + typedef vtkm::cont::ArrayHandlePermutation PermutArrayType; - vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( sigIn, coeffOut ); + vtkm::cont::DeviceAdapterAlgorithm::Copy(sigIn, coeffOut); - for( vtkm::Id i = nLevels; i > 0; i-- ) + for (vtkm::Id i = nLevels; i > 0; i--) { - tlen += L[ size_t(i) ]; + tlen += L[size_t(i)]; cptr = 0 + CLength - tlen - cALen; // make input array (permutation array) - IdArrayType inputIndices( sigInPtr, 1, len ); - PermutArrayType input( inputIndices, coeffOut ); + IdArrayType inputIndices(sigInPtr, 1, len); + PermutArrayType input(inputIndices, coeffOut); // make output array - InterArrayType output; + InterArrayType output; - WaveletDWT::DWT1D( input, output, L1d, DeviceTag() ); + WaveletDWT::DWT1D(input, output, L1d, DeviceTag()); // move intermediate results to final array - WaveletBase::DeviceCopyStartX( output, coeffOut, cptr, DeviceTag() ); + WaveletBase::DeviceCopyStartX(output, coeffOut, cptr, DeviceTag()); // update pseudo pointers len = cALen; - cALen = WaveletBase::GetApproxLength( cALen ); + cALen = WaveletBase::GetApproxLength(cALen); sigInPtr = cptr; } return 0; } - - // Multi-level 1D wavelet reconstruction - template< typename CoeffArrayType, typename SignalArrayType, typename DeviceTag > - VTKM_CONT - vtkm::Id WaveReconstruct( const CoeffArrayType &coeffIn, // Input - vtkm::Id nLevels, // n levels of DWT - std::vector &L, - SignalArrayType &sigOut, - DeviceTag ) + template + VTKM_CONT vtkm::Id WaveReconstruct(const CoeffArrayType& coeffIn, // Input + vtkm::Id nLevels, // n levels of DWT + std::vector& L, SignalArrayType& sigOut, DeviceTag) { - VTKM_ASSERT( nLevels > 0 ); + VTKM_ASSERT(nLevels > 0); vtkm::Id LLength = nLevels + 2; - VTKM_ASSERT( vtkm::Id(L.size()) == LLength ); + VTKM_ASSERT(vtkm::Id(L.size()) == LLength); - std::vector L1d(3, 0); // three elements + std::vector L1d(3, 0); // three elements L1d[0] = L[0]; L1d[1] = L[1]; - typedef typename SignalArrayType::ValueType OutValueType; - typedef vtkm::cont::ArrayHandle< OutValueType > OutArrayBasic; - typedef vtkm::cont::ArrayHandleCounting< vtkm::Id > IdArrayType; - typedef vtkm::cont::ArrayHandlePermutation< IdArrayType, SignalArrayType > - PermutArrayType; + typedef typename SignalArrayType::ValueType OutValueType; + typedef vtkm::cont::ArrayHandle OutArrayBasic; + typedef vtkm::cont::ArrayHandleCounting IdArrayType; + typedef vtkm::cont::ArrayHandlePermutation PermutArrayType; - vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( coeffIn, sigOut ); + vtkm::cont::DeviceAdapterAlgorithm::Copy(coeffIn, sigOut); - for( vtkm::Id i = 1; i <= nLevels; i++ ) + for (vtkm::Id i = 1; i <= nLevels; i++) { - L1d[2] = this->GetApproxLengthLevN( L[ size_t(LLength-1) ], nLevels-i ); + L1d[2] = this->GetApproxLengthLevN(L[size_t(LLength - 1)], nLevels - i); // Make an input array - IdArrayType inputIndices( 0, 1, L1d[2] ); - PermutArrayType input( inputIndices, sigOut ); + IdArrayType inputIndices(0, 1, L1d[2]); + PermutArrayType input(inputIndices, sigOut); // Make an output array OutArrayBasic output; - WaveletDWT::IDWT1D( input, L1d, output, DeviceTag() ); - VTKM_ASSERT( output.GetNumberOfValues() == L1d[2] ); + WaveletDWT::IDWT1D(input, L1d, output, DeviceTag()); + VTKM_ASSERT(output.GetNumberOfValues() == L1d[2]); // Move output to intermediate array - WaveletBase::DeviceCopyStartX( output, sigOut, 0, DeviceTag() ); + WaveletBase::DeviceCopyStartX(output, sigOut, 0, DeviceTag()); L1d[0] = L1d[2]; - L1d[1] = L[ size_t(i+1) ]; + L1d[1] = L[size_t(i + 1)]; } return 0; } - - // Multi-level 3D wavelet decomposition - template< typename InArrayType, typename OutArrayType, typename DeviceTag> - VTKM_CONT - vtkm::Float64 WaveDecompose3D( InArrayType &sigIn, // Input - vtkm::Id nLevels, // n levels of DWT - vtkm::Id inX, - vtkm::Id inY, - vtkm::Id inZ, - OutArrayType &coeffOut, - bool discardSigIn, // can we discard sigIn on devices? - DeviceTag ) + template + VTKM_CONT vtkm::Float64 WaveDecompose3D(InArrayType& sigIn, // Input + vtkm::Id nLevels, // n levels of DWT + vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, + OutArrayType& coeffOut, + bool discardSigIn, // can we discard sigIn on devices? + DeviceTag) { vtkm::Id sigInLen = sigIn.GetNumberOfValues(); - VTKM_ASSERT( inX * inY * inZ == sigInLen ); - if( nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel( inX ) || - nLevels > WaveletBase::GetWaveletMaxLevel( inY ) || - nLevels > WaveletBase::GetWaveletMaxLevel( inZ ) ) + VTKM_ASSERT(inX * inY * inZ == sigInLen); + if (nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel(inX) || + nLevels > WaveletBase::GetWaveletMaxLevel(inY) || + nLevels > WaveletBase::GetWaveletMaxLevel(inZ)) { throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! "); } - if( nLevels == 0 ) // 0 levels means no transform + if (nLevels == 0) // 0 levels means no transform { - vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( sigIn, coeffOut ); + vtkm::cont::DeviceAdapterAlgorithm::Copy(sigIn, coeffOut); return 0; } - vtkm::Id currentLenX = inX; - vtkm::Id currentLenY = inY; - vtkm::Id currentLenZ = inZ; + vtkm::Id currentLenX = inX; + vtkm::Id currentLenY = inY; + vtkm::Id currentLenZ = inZ; std::vector L3d(27, 0); - typedef typename OutArrayType::ValueType OutValueType; - typedef vtkm::cont::ArrayHandle OutBasicArray; + typedef typename OutArrayType::ValueType OutValueType; + typedef vtkm::cont::ArrayHandle OutBasicArray; // First level transform writes to the output array - vtkm::Float64 computationTime = WaveletDWT::DWT3D( - sigIn, - inX, inY, inZ, - 0, 0, 0, - currentLenX, currentLenY, currentLenZ, - coeffOut, - discardSigIn, - DeviceTag() ); + vtkm::Float64 computationTime = + WaveletDWT::DWT3D(sigIn, inX, inY, inZ, 0, 0, 0, currentLenX, currentLenY, currentLenZ, + coeffOut, discardSigIn, DeviceTag()); // Successor transforms writes to a temporary array - for( vtkm::Id i = nLevels-1; i > 0; i-- ) + for (vtkm::Id i = nLevels - 1; i > 0; i--) { - currentLenX = WaveletBase::GetApproxLength( currentLenX ); - currentLenY = WaveletBase::GetApproxLength( currentLenY ); - currentLenZ = WaveletBase::GetApproxLength( currentLenZ ); + currentLenX = WaveletBase::GetApproxLength(currentLenX); + currentLenY = WaveletBase::GetApproxLength(currentLenY); + currentLenZ = WaveletBase::GetApproxLength(currentLenZ); OutBasicArray tempOutput; - computationTime += WaveletDWT::DWT3D( - coeffOut, - inX, inY, inZ, - 0, 0, 0, - currentLenX, currentLenY, currentLenZ, - tempOutput, - false, - DeviceTag() ); + computationTime += + WaveletDWT::DWT3D(coeffOut, inX, inY, inZ, 0, 0, 0, currentLenX, currentLenY, currentLenZ, + tempOutput, false, DeviceTag()); // copy results to coeffOut - WaveletBase::DeviceCubeCopyTo( tempOutput, - currentLenX, currentLenY, currentLenZ, - coeffOut, - inX, inY, inZ, - 0, 0, 0, - DeviceTag() ); + WaveletBase::DeviceCubeCopyTo(tempOutput, currentLenX, currentLenY, currentLenZ, coeffOut, + inX, inY, inZ, 0, 0, 0, DeviceTag()); } return computationTime; } - - // Multi-level 3D wavelet reconstruction - template< typename InArrayType, typename OutArrayType, typename DeviceTag> - VTKM_CONT - vtkm::Float64 WaveReconstruct3D( - InArrayType &arrIn, // Input - vtkm::Id nLevels, // n levels of DWT - vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, - OutArrayType &arrOut, - bool discardArrIn, // can we discard input for more memory? - DeviceTag ) + template + VTKM_CONT vtkm::Float64 WaveReconstruct3D( + InArrayType& arrIn, // Input + vtkm::Id nLevels, // n levels of DWT + vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, OutArrayType& arrOut, + bool discardArrIn, // can we discard input for more memory? + DeviceTag) { vtkm::Id arrInLen = arrIn.GetNumberOfValues(); - VTKM_ASSERT( inX * inY * inZ == arrInLen ); - if( nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel( inX ) || - nLevels > WaveletBase::GetWaveletMaxLevel( inY ) || - nLevels > WaveletBase::GetWaveletMaxLevel( inZ ) ) + VTKM_ASSERT(inX * inY * inZ == arrInLen); + if (nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel(inX) || + nLevels > WaveletBase::GetWaveletMaxLevel(inY) || + nLevels > WaveletBase::GetWaveletMaxLevel(inZ)) { throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! "); } - typedef typename OutArrayType::ValueType OutValueType; - typedef vtkm::cont::ArrayHandle OutBasicArray; + typedef typename OutArrayType::ValueType OutValueType; + typedef vtkm::cont::ArrayHandle OutBasicArray; vtkm::Float64 computationTime = 0.0; OutBasicArray outBuffer; - if( nLevels == 0 ) // 0 levels means no transform + if (nLevels == 0) // 0 levels means no transform { - vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( arrIn, arrOut ); + vtkm::cont::DeviceAdapterAlgorithm::Copy(arrIn, arrOut); return 0; } - else if ( discardArrIn ) + else if (discardArrIn) { outBuffer = arrIn; } else { - vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( arrIn, outBuffer ); + vtkm::cont::DeviceAdapterAlgorithm::Copy(arrIn, outBuffer); } std::vector L; - this->ComputeL3( inX, inY, inZ, nLevels, L ); + this->ComputeL3(inX, inY, inZ, nLevels, L); std::vector L3d(27, 0); // All transforms but the last level operate on temporary arrays - for( size_t i = 0; i < 24; i++ ) + for (size_t i = 0; i < 24; i++) { L3d[i] = L[i]; } - for( size_t i = 1; i < static_cast(nLevels); i++ ) + for (size_t i = 1; i < static_cast(nLevels); i++) { - L3d[24] = L3d[0] + L3d[12]; // Total X dim; this is always true for Biorthogonal wavelets - L3d[25] = L3d[1] + L3d[7]; // Total Y dim - L3d[26] = L3d[2] + L3d[5]; // Total Z dim + L3d[24] = L3d[0] + L3d[12]; // Total X dim; this is always true for Biorthogonal wavelets + L3d[25] = L3d[1] + L3d[7]; // Total Y dim + L3d[26] = L3d[2] + L3d[5]; // Total Z dim - OutBasicArray tempOutput; + OutBasicArray tempOutput; // IDWT - computationTime += WaveletDWT::IDWT3D( outBuffer, - inX, inY, inZ, - 0, 0, 0, - L3d, - tempOutput, - false, - DeviceTag() ); + computationTime += + WaveletDWT::IDWT3D(outBuffer, inX, inY, inZ, 0, 0, 0, L3d, tempOutput, false, DeviceTag()); // copy back reconstructed block - WaveletBase::DeviceCubeCopyTo( tempOutput, - L3d[24], L3d[25], L3d[26], - outBuffer, - inX, inY, inZ, - 0, 0, 0, - DeviceTag() ); + WaveletBase::DeviceCubeCopyTo(tempOutput, L3d[24], L3d[25], L3d[26], outBuffer, inX, inY, inZ, + 0, 0, 0, DeviceTag()); // update L3d array - L3d[0] = L3d[24]; - L3d[1] = L3d[25]; - L3d[2] = L3d[26]; - for( size_t j = 3; j < 24; j++ ) + L3d[0] = L3d[24]; + L3d[1] = L3d[25]; + L3d[2] = L3d[26]; + for (size_t j = 3; j < 24; j++) { - L3d[j] = L[ 21 * i + j ]; + L3d[j] = L[21 * i + j]; } } @@ -316,420 +277,369 @@ public: L3d[24] = L3d[0] + L3d[12]; L3d[25] = L3d[1] + L3d[7]; L3d[26] = L3d[2] + L3d[5]; - computationTime += WaveletDWT::IDWT3D( outBuffer, - inX, inY, inZ, - 0, 0, 0, - L3d, - arrOut, - true, - DeviceTag() ); + computationTime += + WaveletDWT::IDWT3D(outBuffer, inX, inY, inZ, 0, 0, 0, L3d, arrOut, true, DeviceTag()); return computationTime; } - - // Multi-level 2D wavelet decomposition - template< typename InArrayType, typename OutArrayType, typename DeviceTag> - VTKM_CONT - vtkm::Float64 WaveDecompose2D( const InArrayType &sigIn, // Input - vtkm::Id nLevels, // n levels of DWT - vtkm::Id inX, // Input X dim - vtkm::Id inY, // Input Y dim - OutArrayType &coeffOut, - std::vector &L, - DeviceTag ) + template + VTKM_CONT vtkm::Float64 WaveDecompose2D(const InArrayType& sigIn, // Input + vtkm::Id nLevels, // n levels of DWT + vtkm::Id inX, // Input X dim + vtkm::Id inY, // Input Y dim + OutArrayType& coeffOut, std::vector& L, + DeviceTag) { vtkm::Id sigInLen = sigIn.GetNumberOfValues(); - VTKM_ASSERT( inX * inY == sigInLen ); - if( nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel( inX ) || - nLevels > WaveletBase::GetWaveletMaxLevel( inY ) ) + VTKM_ASSERT(inX * inY == sigInLen); + if (nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel(inX) || + nLevels > WaveletBase::GetWaveletMaxLevel(inY)) { throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! "); } - if( nLevels == 0 ) // 0 levels means no transform + if (nLevels == 0) // 0 levels means no transform { - vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( sigIn, coeffOut ); + vtkm::cont::DeviceAdapterAlgorithm::Copy(sigIn, coeffOut); return 0; } - this->ComputeL2( inX, inY, nLevels, L ); - vtkm::Id CLength = this->ComputeCoeffLength2( L, nLevels ); - VTKM_ASSERT( CLength == sigInLen ); + this->ComputeL2(inX, inY, nLevels, L); + vtkm::Id CLength = this->ComputeCoeffLength2(L, nLevels); + VTKM_ASSERT(CLength == sigInLen); - vtkm::Id currentLenX = inX; - vtkm::Id currentLenY = inY; + vtkm::Id currentLenX = inX; + vtkm::Id currentLenY = inY; std::vector L2d(10, 0); vtkm::Float64 computationTime = 0.0; - typedef typename OutArrayType::ValueType OutValueType; - typedef vtkm::cont::ArrayHandle OutBasicArray; + typedef typename OutArrayType::ValueType OutValueType; + typedef vtkm::cont::ArrayHandle OutBasicArray; // First level transform operates writes to the output array - computationTime += WaveletDWT::DWT2D ( sigIn, - currentLenX, currentLenY, - 0, 0, - currentLenX, currentLenY, - coeffOut, L2d, DeviceTag() ); - VTKM_ASSERT( coeffOut.GetNumberOfValues() == currentLenX * currentLenY ); - currentLenX = WaveletBase::GetApproxLength( currentLenX ); - currentLenY = WaveletBase::GetApproxLength( currentLenY ); + computationTime += WaveletDWT::DWT2D(sigIn, currentLenX, currentLenY, 0, 0, currentLenX, + currentLenY, coeffOut, L2d, DeviceTag()); + VTKM_ASSERT(coeffOut.GetNumberOfValues() == currentLenX * currentLenY); + currentLenX = WaveletBase::GetApproxLength(currentLenX); + currentLenY = WaveletBase::GetApproxLength(currentLenY); // Successor transforms writes to a temporary array - for( vtkm::Id i = nLevels-1; i > 0; i-- ) + for (vtkm::Id i = nLevels - 1; i > 0; i--) { OutBasicArray tempOutput; - computationTime += - WaveletDWT::DWT2D ( coeffOut, - inX, inY, - 0, 0, - currentLenX, currentLenY, - tempOutput, L2d, DeviceTag() ); + computationTime += WaveletDWT::DWT2D(coeffOut, inX, inY, 0, 0, currentLenX, currentLenY, + tempOutput, L2d, DeviceTag()); // copy results to coeffOut - WaveletBase::DeviceRectangleCopyTo( tempOutput, currentLenX, currentLenY, - coeffOut, inX, inY, 0, 0, DeviceTag() ); + WaveletBase::DeviceRectangleCopyTo(tempOutput, currentLenX, currentLenY, coeffOut, inX, inY, + 0, 0, DeviceTag()); // update currentLen - currentLenX = WaveletBase::GetApproxLength( currentLenX ); - currentLenY = WaveletBase::GetApproxLength( currentLenY ); + currentLenX = WaveletBase::GetApproxLength(currentLenX); + currentLenY = WaveletBase::GetApproxLength(currentLenY); } return computationTime; } - - // Multi-level 2D wavelet reconstruction - template< typename InArrayType, typename OutArrayType, typename DeviceTag> - VTKM_CONT - vtkm::Float64 WaveReconstruct2D( const InArrayType &arrIn, // Input - vtkm::Id nLevels, // n levels of DWT - vtkm::Id inX, // Input X dim - vtkm::Id inY, // Input Y dim - OutArrayType &arrOut, - std::vector &L, - DeviceTag ) + template + VTKM_CONT vtkm::Float64 WaveReconstruct2D(const InArrayType& arrIn, // Input + vtkm::Id nLevels, // n levels of DWT + vtkm::Id inX, // Input X dim + vtkm::Id inY, // Input Y dim + OutArrayType& arrOut, std::vector& L, + DeviceTag) { vtkm::Id arrInLen = arrIn.GetNumberOfValues(); - VTKM_ASSERT( inX * inY == arrInLen ); - if( nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel( inX ) || - nLevels > WaveletBase::GetWaveletMaxLevel( inY ) ) + VTKM_ASSERT(inX * inY == arrInLen); + if (nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel(inX) || + nLevels > WaveletBase::GetWaveletMaxLevel(inY)) { throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! "); } - typedef typename OutArrayType::ValueType OutValueType; - typedef vtkm::cont::ArrayHandle OutBasicArray; + typedef typename OutArrayType::ValueType OutValueType; + typedef vtkm::cont::ArrayHandle OutBasicArray; vtkm::Float64 computationTime = 0.0; OutBasicArray outBuffer; - if( nLevels == 0 ) // 0 levels means no transform + if (nLevels == 0) // 0 levels means no transform { - vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( arrIn, arrOut ); + vtkm::cont::DeviceAdapterAlgorithm::Copy(arrIn, arrOut); return 0; } else { - vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( arrIn, outBuffer ); + vtkm::cont::DeviceAdapterAlgorithm::Copy(arrIn, outBuffer); } - VTKM_ASSERT( vtkm::Id(L.size()) == 6 * nLevels + 4 ); + VTKM_ASSERT(vtkm::Id(L.size()) == 6 * nLevels + 4); std::vector L2d(10, 0); - L2d[0] = L[0]; - L2d[1] = L[1]; - L2d[2] = L[2]; - L2d[3] = L[3]; - L2d[4] = L[4]; - L2d[5] = L[5]; - L2d[6] = L[6]; - L2d[7] = L[7]; + L2d[0] = L[0]; + L2d[1] = L[1]; + L2d[2] = L[2]; + L2d[3] = L[3]; + L2d[4] = L[4]; + L2d[5] = L[5]; + L2d[6] = L[6]; + L2d[7] = L[7]; // All transforms but the last operate on temporary arrays - for( size_t i = 1; i < static_cast(nLevels); i++ ) + for (size_t i = 1; i < static_cast(nLevels); i++) { - L2d[8] = L2d[0] + L2d[4]; // This is always true for Biorthogonal wavelets - L2d[9] = L2d[1] + L2d[3]; // (same above) + L2d[8] = L2d[0] + L2d[4]; // This is always true for Biorthogonal wavelets + L2d[9] = L2d[1] + L2d[3]; // (same above) - OutBasicArray tempOutput; + OutBasicArray tempOutput; // IDWT computationTime += - WaveletDWT::IDWT2D ( outBuffer, inX, inY, 0, 0, L2d, tempOutput, DeviceTag() ); + WaveletDWT::IDWT2D(outBuffer, inX, inY, 0, 0, L2d, tempOutput, DeviceTag()); // copy back reconstructed block - WaveletBase::DeviceRectangleCopyTo( tempOutput, L2d[8], L2d[9], - outBuffer, inX, inY, 0, 0, DeviceTag() ); + WaveletBase::DeviceRectangleCopyTo(tempOutput, L2d[8], L2d[9], outBuffer, inX, inY, 0, 0, + DeviceTag()); // update L2d array - L2d[0] = L2d[8]; - L2d[1] = L2d[9]; - L2d[2] = L[6*i+2]; - L2d[3] = L[6*i+3]; - L2d[4] = L[6*i+4]; - L2d[5] = L[6*i+5]; - L2d[6] = L[6*i+6]; - L2d[7] = L[6*i+7]; - + L2d[0] = L2d[8]; + L2d[1] = L2d[9]; + L2d[2] = L[6 * i + 2]; + L2d[3] = L[6 * i + 3]; + L2d[4] = L[6 * i + 4]; + L2d[5] = L[6 * i + 5]; + L2d[6] = L[6 * i + 6]; + L2d[7] = L[6 * i + 7]; } // The last transform outputs to the final output L2d[8] = L2d[0] + L2d[4]; L2d[9] = L2d[1] + L2d[3]; - computationTime += - WaveletDWT::IDWT2D ( outBuffer, inX, inY, 0, 0, L2d, arrOut, DeviceTag() ); + computationTime += WaveletDWT::IDWT2D(outBuffer, inX, inY, 0, 0, L2d, arrOut, DeviceTag()); return computationTime; } - - // Squash coefficients smaller than a threshold - template< typename CoeffArrayType, typename DeviceTag > - vtkm::Id SquashCoefficients( CoeffArrayType &coeffIn, - vtkm::Float64 ratio, - DeviceTag ) + template + vtkm::Id SquashCoefficients(CoeffArrayType& coeffIn, vtkm::Float64 ratio, DeviceTag) { - if( ratio > 1.0 ) + if (ratio > 1.0) { vtkm::Id coeffLen = coeffIn.GetNumberOfValues(); typedef typename CoeffArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle< ValueType > CoeffArrayBasic; + typedef vtkm::cont::ArrayHandle CoeffArrayBasic; CoeffArrayBasic sortedArray; - vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( coeffIn, sortedArray ); + vtkm::cont::DeviceAdapterAlgorithm::Copy(coeffIn, sortedArray); - WaveletBase::DeviceSort( sortedArray, DeviceTag() ); + WaveletBase::DeviceSort(sortedArray, DeviceTag()); - vtkm::Id n = coeffLen - - static_cast( static_cast(coeffLen)/ratio ); - vtkm::Float64 nthVal = static_cast - (sortedArray.GetPortalConstControl().Get(n)); - if( nthVal < 0.0 ) + vtkm::Id n = coeffLen - static_cast(static_cast(coeffLen) / ratio); + vtkm::Float64 nthVal = static_cast(sortedArray.GetPortalConstControl().Get(n)); + if (nthVal < 0.0) { nthVal *= -1.0; } typedef vtkm::worklet::wavelets::ThresholdWorklet ThresholdType; - ThresholdType thresholdWorklet( nthVal ); - vtkm::worklet::DispatcherMapField< ThresholdType, DeviceTag > dispatcher( thresholdWorklet ); - dispatcher.Invoke( coeffIn ); + ThresholdType thresholdWorklet(nthVal); + vtkm::worklet::DispatcherMapField dispatcher(thresholdWorklet); + dispatcher.Invoke(coeffIn); } return 0; } - - // Report statistics on reconstructed array - template< typename ArrayType, typename DeviceTag > - vtkm::Id EvaluateReconstruction( const ArrayType &original, - const ArrayType &reconstruct, - DeviceTag ) + template + vtkm::Id EvaluateReconstruction(const ArrayType& original, const ArrayType& reconstruct, + DeviceTag) { - #define VAL vtkm::Float64 - #define MAKEVAL(a) (static_cast(a)) - VAL VarOrig = WaveletBase::DeviceCalculateVariance( original, DeviceTag() ); +#define VAL vtkm::Float64 +#define MAKEVAL(a) (static_cast(a)) + VAL VarOrig = WaveletBase::DeviceCalculateVariance(original, DeviceTag()); typedef typename ArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle< ValueType > ArrayBasic; + typedef vtkm::cont::ArrayHandle ArrayBasic; ArrayBasic errorArray, errorSquare; // Use a worklet to calculate point-wise error, and its square typedef vtkm::worklet::wavelets::Differencer DifferencerWorklet; DifferencerWorklet dw; - vtkm::worklet::DispatcherMapField< DifferencerWorklet > dwDispatcher( dw ); - dwDispatcher.Invoke( original, reconstruct, errorArray ); + vtkm::worklet::DispatcherMapField dwDispatcher(dw); + dwDispatcher.Invoke(original, reconstruct, errorArray); typedef vtkm::worklet::wavelets::SquareWorklet SquareWorklet; SquareWorklet sw; - vtkm::worklet::DispatcherMapField< SquareWorklet > swDispatcher( sw ); - swDispatcher.Invoke( errorArray, errorSquare ); + vtkm::worklet::DispatcherMapField swDispatcher(sw); + swDispatcher.Invoke(errorArray, errorSquare); - VAL varErr = WaveletBase::DeviceCalculateVariance( errorArray, DeviceTag() ); + VAL varErr = WaveletBase::DeviceCalculateVariance(errorArray, DeviceTag()); VAL snr, decibels; - if( varErr != 0.0 ) + if (varErr != 0.0) { - snr = VarOrig / varErr; - decibels = 10 * vtkm::Log10( snr ); + snr = VarOrig / varErr; + decibels = 10 * vtkm::Log10(snr); } else { - snr = vtkm::Infinity64(); - decibels = vtkm::Infinity64(); + snr = vtkm::Infinity64(); + decibels = vtkm::Infinity64(); } - VAL origMax = WaveletBase::DeviceMax( original, DeviceTag() ); - VAL origMin = WaveletBase::DeviceMin( original, DeviceTag() ); - VAL errorMax = WaveletBase::DeviceMaxAbs( errorArray, DeviceTag() ); - VAL range = origMax - origMin; + VAL origMax = WaveletBase::DeviceMax(original, DeviceTag()); + VAL origMin = WaveletBase::DeviceMin(original, DeviceTag()); + VAL errorMax = WaveletBase::DeviceMaxAbs(errorArray, DeviceTag()); + VAL range = origMax - origMin; - VAL squareSum = WaveletBase::DeviceSum( errorSquare, DeviceTag() ); - VAL rmse = vtkm::Sqrt( MAKEVAL(squareSum) / MAKEVAL(errorArray.GetNumberOfValues()) ); + VAL squareSum = WaveletBase::DeviceSum(errorSquare, DeviceTag()); + VAL rmse = vtkm::Sqrt(MAKEVAL(squareSum) / MAKEVAL(errorArray.GetNumberOfValues())); std::cout << "Data range = " << range << std::endl; std::cout << "SNR = " << snr << std::endl; std::cout << "SNR in decibels = " << decibels << std::endl; std::cout << "L-infy norm = " << errorMax << ", after normalization = " << errorMax / range << std::endl; - std::cout << "RMSE = " << rmse - << ", after normalization = " << rmse / range << std::endl; - #undef MAKEVAL - #undef VAL + std::cout << "RMSE = " << rmse << ", after normalization = " << rmse / range + << std::endl; +#undef MAKEVAL +#undef VAL return 0; } - - // Compute the book keeping array L for 1D DWT - void ComputeL( vtkm::Id sigInLen, - vtkm::Id nLev, - std::vector &L ) + void ComputeL(vtkm::Id sigInLen, vtkm::Id nLev, std::vector& L) { - size_t nLevels = static_cast( nLev ); // cast once - L.resize( nLevels + 2 ); - L[ nLevels+1 ] = sigInLen; - L[ nLevels ] = sigInLen; - for( size_t i = nLevels; i > 0; i-- ) + size_t nLevels = static_cast(nLev); // cast once + L.resize(nLevels + 2); + L[nLevels + 1] = sigInLen; + L[nLevels] = sigInLen; + for (size_t i = nLevels; i > 0; i--) { - L[i-1] = WaveletBase::GetApproxLength( L[i] ); - L[i] = WaveletBase::GetDetailLength( L[i] ); + L[i - 1] = WaveletBase::GetApproxLength(L[i]); + L[i] = WaveletBase::GetDetailLength(L[i]); } } - - // Compute the book keeping array L for 2D DWT - void ComputeL2( vtkm::Id inX, - vtkm::Id inY, - vtkm::Id nLev, - std::vector &L ) + void ComputeL2(vtkm::Id inX, vtkm::Id inY, vtkm::Id nLev, std::vector& L) { - size_t nLevels = static_cast( nLev ); - L.resize( nLevels*6 + 4 ); - L[ nLevels*6 ] = inX; - L[ nLevels*6 + 1 ] = inY; - L[ nLevels*6 + 2 ] = inX; - L[ nLevels*6 + 3 ] = inY; + size_t nLevels = static_cast(nLev); + L.resize(nLevels * 6 + 4); + L[nLevels * 6] = inX; + L[nLevels * 6 + 1] = inY; + L[nLevels * 6 + 2] = inX; + L[nLevels * 6 + 3] = inY; - for( size_t i = nLevels; i > 0; i-- ) + for (size_t i = nLevels; i > 0; i--) { // cA - L[ i*6 - 6 ] = WaveletBase::GetApproxLength( L[ i*6 + 0 ]); - L[ i*6 - 5 ] = WaveletBase::GetApproxLength( L[ i*6 + 1 ]); + L[i * 6 - 6] = WaveletBase::GetApproxLength(L[i * 6 + 0]); + L[i * 6 - 5] = WaveletBase::GetApproxLength(L[i * 6 + 1]); // cDh - L[ i*6 - 4 ] = WaveletBase::GetApproxLength( L[ i*6 + 0 ]); - L[ i*6 - 3 ] = WaveletBase::GetDetailLength( L[ i*6 + 1 ]); + L[i * 6 - 4] = WaveletBase::GetApproxLength(L[i * 6 + 0]); + L[i * 6 - 3] = WaveletBase::GetDetailLength(L[i * 6 + 1]); // cDv - L[ i*6 - 2 ] = WaveletBase::GetDetailLength( L[ i*6 + 0 ]); - L[ i*6 - 1 ] = WaveletBase::GetApproxLength( L[ i*6 + 1 ]); + L[i * 6 - 2] = WaveletBase::GetDetailLength(L[i * 6 + 0]); + L[i * 6 - 1] = WaveletBase::GetApproxLength(L[i * 6 + 1]); // cDv - overwrites previous value! - L[ i*6 - 0 ] = WaveletBase::GetDetailLength( L[ i*6 + 0 ]); - L[ i*6 + 1 ] = WaveletBase::GetDetailLength( L[ i*6 + 1 ]); + L[i * 6 - 0] = WaveletBase::GetDetailLength(L[i * 6 + 0]); + L[i * 6 + 1] = WaveletBase::GetDetailLength(L[i * 6 + 1]); } } - - // Compute the bookkeeping array L for 3D DWT - void ComputeL3( vtkm::Id inX, - vtkm::Id inY, - vtkm::Id inZ, - vtkm::Id nLev, - std::vector &L ) + void ComputeL3(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, vtkm::Id nLev, std::vector& L) { - size_t n = static_cast( nLev ); - L.resize( n * 21 + 6 ); - L[ n * 21 + 0 ] = inX; - L[ n * 21 + 1 ] = inY; - L[ n * 21 + 2 ] = inZ; - L[ n * 21 + 3 ] = inX; - L[ n * 21 + 4 ] = inY; - L[ n * 21 + 5 ] = inZ; + size_t n = static_cast(nLev); + L.resize(n * 21 + 6); + L[n * 21 + 0] = inX; + L[n * 21 + 1] = inY; + L[n * 21 + 2] = inZ; + L[n * 21 + 3] = inX; + L[n * 21 + 4] = inY; + L[n * 21 + 5] = inZ; - for( size_t i = n; i > 0; i-- ) + for (size_t i = n; i > 0; i--) { // cLLL - L[ i * 21 - 21 ] = WaveletBase::GetApproxLength( L[ i * 21 + 0 ] ); - L[ i * 21 - 20 ] = WaveletBase::GetApproxLength( L[ i * 21 + 1 ] ); - L[ i * 21 - 19 ] = WaveletBase::GetApproxLength( L[ i * 21 + 2 ] ); + L[i * 21 - 21] = WaveletBase::GetApproxLength(L[i * 21 + 0]); + L[i * 21 - 20] = WaveletBase::GetApproxLength(L[i * 21 + 1]); + L[i * 21 - 19] = WaveletBase::GetApproxLength(L[i * 21 + 2]); // cLLH - L[ i * 21 - 18 ] = L[ i * 21 - 21 ]; - L[ i * 21 - 17 ] = L[ i * 21 - 20 ]; - L[ i * 21 - 16 ] = WaveletBase::GetDetailLength( L[ i * 21 + 2 ] ); + L[i * 21 - 18] = L[i * 21 - 21]; + L[i * 21 - 17] = L[i * 21 - 20]; + L[i * 21 - 16] = WaveletBase::GetDetailLength(L[i * 21 + 2]); // cLHL - L[ i * 21 - 15 ] = L[ i * 21 - 21 ]; - L[ i * 21 - 14 ] = WaveletBase::GetDetailLength( L[ i * 21 + 1 ] ); - L[ i * 21 - 13 ] = L[ i * 21 - 19 ]; + L[i * 21 - 15] = L[i * 21 - 21]; + L[i * 21 - 14] = WaveletBase::GetDetailLength(L[i * 21 + 1]); + L[i * 21 - 13] = L[i * 21 - 19]; // cLHH - L[ i * 21 - 12 ] = L[ i * 21 - 21 ]; - L[ i * 21 - 11 ] = L[ i * 21 - 14 ]; - L[ i * 21 - 10 ] = L[ i * 21 - 16 ]; + L[i * 21 - 12] = L[i * 21 - 21]; + L[i * 21 - 11] = L[i * 21 - 14]; + L[i * 21 - 10] = L[i * 21 - 16]; // cHLL - L[ i * 21 - 9 ] = WaveletBase::GetDetailLength( L[ i * 21 + 0 ] ); - L[ i * 21 - 8 ] = L[ i * 21 - 20 ]; - L[ i * 21 - 7 ] = L[ i * 21 - 19 ]; + L[i * 21 - 9] = WaveletBase::GetDetailLength(L[i * 21 + 0]); + L[i * 21 - 8] = L[i * 21 - 20]; + L[i * 21 - 7] = L[i * 21 - 19]; // cHLH - L[ i * 21 - 6 ] = L[ i * 21 - 9 ]; - L[ i * 21 - 5 ] = L[ i * 21 - 20 ]; - L[ i * 21 - 3 ] = L[ i * 21 - 16 ]; + L[i * 21 - 6] = L[i * 21 - 9]; + L[i * 21 - 5] = L[i * 21 - 20]; + L[i * 21 - 3] = L[i * 21 - 16]; // cHHL - L[ i * 21 - 3 ] = L[ i * 21 - 9 ]; - L[ i * 21 - 2 ] = L[ i * 21 - 14 ]; - L[ i * 21 - 1 ] = L[ i * 21 - 19 ]; + L[i * 21 - 3] = L[i * 21 - 9]; + L[i * 21 - 2] = L[i * 21 - 14]; + L[i * 21 - 1] = L[i * 21 - 19]; // cHHH - overwrites previous value - L[ i * 21 + 0 ] = L[ i * 21 - 9 ]; - L[ i * 21 + 1 ] = L[ i * 21 - 14 ]; - L[ i * 21 + 2 ] = L[ i * 21 - 16 ]; + L[i * 21 + 0] = L[i * 21 - 9]; + L[i * 21 + 1] = L[i * 21 - 14]; + L[i * 21 + 2] = L[i * 21 - 16]; } - } - - // Compute the length of coefficients for 1D transforms - vtkm::Id ComputeCoeffLength( std::vector &L, - vtkm::Id nLevels ) + vtkm::Id ComputeCoeffLength(std::vector& L, vtkm::Id nLevels) { - vtkm::Id sum = L[0]; // 1st level cA - for( size_t i = 1; i <= size_t(nLevels); i++ ) + vtkm::Id sum = L[0]; // 1st level cA + for (size_t i = 1; i <= size_t(nLevels); i++) { sum += L[i]; } return sum; } // Compute the length of coefficients for 2D transforms - vtkm::Id ComputeCoeffLength2( std::vector &L, - vtkm::Id nLevels ) + vtkm::Id ComputeCoeffLength2(std::vector& L, vtkm::Id nLevels) { - vtkm::Id sum = (L[0] * L[1]); // 1st level cA - for( size_t i = 1; i <= size_t(nLevels); i++ ) + vtkm::Id sum = (L[0] * L[1]); // 1st level cA + for (size_t i = 1; i <= size_t(nLevels); i++) { - sum += L[ i*6 - 4 ] * L[ i*6 - 3 ]; // cDh - sum += L[ i*6 - 2 ] * L[ i*6 - 1 ]; // cDv - sum += L[ i*6 - 0 ] * L[ i*6 + 1 ]; // cDd + sum += L[i * 6 - 4] * L[i * 6 - 3]; // cDh + sum += L[i * 6 - 2] * L[i * 6 - 1]; // cDv + sum += L[i * 6 - 0] * L[i * 6 + 1]; // cDd } return sum; } // Compute approximate coefficient length at a specific level - vtkm::Id GetApproxLengthLevN( vtkm::Id sigInLen, vtkm::Id levN ) + vtkm::Id GetApproxLengthLevN(vtkm::Id sigInLen, vtkm::Id levN) { vtkm::Id cALen = sigInLen; - for( vtkm::Id i = 0; i < levN; i++ ) + for (vtkm::Id i = 0; i < levN; i++) { - cALen = WaveletBase::GetApproxLength( cALen ); - if( cALen == 0 ) + cALen = WaveletBase::GetApproxLength(cALen); + if (cALen == 0) { return cALen; } @@ -738,10 +648,9 @@ public: return cALen; } +}; // class WaveletCompressor -}; // class WaveletCompressor +} // namespace worklet +} // namespace vtkm -} // namespace worklet -} // namespace vtkm - -#endif +#endif diff --git a/vtkm/worklet/WorkletMapField.h b/vtkm/worklet/WorkletMapField.h index 8a3b1ef9a..66ab3fca8 100644 --- a/vtkm/worklet/WorkletMapField.h +++ b/vtkm/worklet/WorkletMapField.h @@ -34,8 +34,10 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ /// Base class for worklets that do a simple mapping of field arrays. All /// inputs and outputs are on the same domain. That is, all the arrays are the @@ -49,8 +51,9 @@ public: /// This tag takes a template argument that is a type list tag that limits /// the possible value types in the array. /// - template - struct FieldIn : vtkm::cont::arg::ControlSignatureTagBase { + template + struct FieldIn : vtkm::cont::arg::ControlSignatureTagBase + { typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTag; typedef vtkm::cont::arg::TransportTagArrayIn TransportTag; typedef vtkm::exec::arg::FetchTagArrayDirectIn FetchTag; @@ -61,8 +64,9 @@ public: /// This tag takes a template argument that is a type list tag that limits /// the possible value types in the array. /// - template - struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase { + template + struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase + { typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTag; typedef vtkm::cont::arg::TransportTagArrayOut TransportTag; typedef vtkm::exec::arg::FetchTagArrayDirectOut FetchTag; @@ -73,14 +77,14 @@ public: /// This tag takes a template argument that is a type list tag that limits /// the possible value types in the array. /// - template - struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase { + template + struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase + { typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTag; typedef vtkm::cont::arg::TransportTagArrayInOut TransportTag; typedef vtkm::exec::arg::FetchTagArrayDirectInOut FetchTag; }; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/WorkletMapTopology.h b/vtkm/worklet/WorkletMapTopology.h index 69bba540a..452ea91c4 100644 --- a/vtkm/worklet/WorkletMapTopology.h +++ b/vtkm/worklet/WorkletMapTopology.h @@ -43,13 +43,17 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace detail { +namespace detail +{ struct WorkletMapTopologyBase : vtkm::worklet::internal::WorkletBase -{ }; +{ +}; } // namespace detail @@ -57,7 +61,7 @@ struct WorkletMapTopologyBase : vtkm::worklet::internal::WorkletBase /// inputs and outputs are on the same domain. That is, all the arrays are the /// same size. /// -template +template class WorkletMapTopology : public detail::WorkletMapTopologyBase { public: @@ -69,8 +73,9 @@ public: /// This tag takes a template argument that is a type list tag that limits /// the possible value types in the array. /// - template - struct FieldInTo : vtkm::cont::arg::ControlSignatureTagBase { + template + struct FieldInTo : vtkm::cont::arg::ControlSignatureTagBase + { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; using TransportTag = vtkm::cont::arg::TransportTagTopologyFieldIn; using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn; @@ -81,8 +86,9 @@ public: /// This tag takes a template argument that is a type list tag that limits /// the possible value types in the array. /// - template - struct FieldInFrom : vtkm::cont::arg::ControlSignatureTagBase { + template + struct FieldInFrom : vtkm::cont::arg::ControlSignatureTagBase + { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; using TransportTag = vtkm::cont::arg::TransportTagTopologyFieldIn; using FetchTag = vtkm::exec::arg::FetchTagArrayTopologyMapIn; @@ -93,8 +99,9 @@ public: /// This tag takes a template argument that is a type list tag that limits /// the possible value types in the array. /// - template - struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase { + template + struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase + { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; using TransportTag = vtkm::cont::arg::TransportTagArrayOut; using FetchTag = vtkm::exec::arg::FetchTagArrayDirectOut; @@ -105,8 +112,9 @@ public: /// This tag takes a template argument that is a type list tag that limits /// the possible value types in the array. /// - template - struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase { + template + struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase + { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; using TransportTag = vtkm::cont::arg::TransportTagArrayInOut; using FetchTag = vtkm::exec::arg::FetchTagArrayDirectInOut; @@ -114,15 +122,18 @@ public: /// \brief A control signature tag for input connectivity. /// - struct CellSetIn : vtkm::cont::arg::ControlSignatureTagBase { + struct CellSetIn : vtkm::cont::arg::ControlSignatureTagBase + { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagCellSet; - using TransportTag = vtkm::cont::arg::TransportTagCellSetIn; + using TransportTag = vtkm::cont::arg::TransportTagCellSetIn; using FetchTag = vtkm::exec::arg::FetchTagCellSetIn; }; /// \brief An execution signature tag for getting the cell shape. /// - struct CellShape : vtkm::exec::arg::CellShape { }; + struct CellShape : vtkm::exec::arg::CellShape + { + }; /// \brief An execution signature tag to get the number of from elements. /// @@ -132,7 +143,9 @@ public: /// accessible. This \c ExecutionSignature tag provides the number of these /// \em from elements that are accessible. /// - struct FromCount : vtkm::exec::arg::FromCount { }; + struct FromCount : vtkm::exec::arg::FromCount + { + }; /// \brief An execution signature tag to get the indices of from elements. /// @@ -142,48 +155,40 @@ public: /// accessible. This \c ExecutionSignature tag provides the indices of these /// \em from elements that are accessible. /// - struct FromIndices : vtkm::exec::arg::FromIndices { }; + struct FromIndices : vtkm::exec::arg::FromIndices + { + }; /// Topology map worklets use topology map indices. /// VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC - vtkm::exec::arg::ThreadIndicesTopologyMap - GetThreadIndices(const T& threadIndex, - const OutToInArrayType& outToIn, - const VisitArrayType& visit, - const InputDomainType &connectivity, - const G& globalThreadIndexOffset) const + template + VTKM_EXEC vtkm::exec::arg::ThreadIndicesTopologyMap GetThreadIndices( + const T& threadIndex, const OutToInArrayType& outToIn, const VisitArrayType& visit, + const InputDomainType& connectivity, const G& globalThreadIndexOffset) const { return vtkm::exec::arg::ThreadIndicesTopologyMap( - threadIndex, - outToIn, - visit, - connectivity, - globalThreadIndexOffset); + threadIndex, outToIn, visit, connectivity, globalThreadIndexOffset); } }; /// Base class for worklets that map from Points to Cells. /// class WorkletMapPointToCell - : public WorkletMapTopology< - vtkm::TopologyElementTagPoint,vtkm::TopologyElementTagCell> + : public WorkletMapTopology { public: - - template + template using FieldInPoint = FieldInFrom; - template + template using FieldInCell = FieldInTo; - template + template using FieldOutCell = FieldOut; - template + template using FieldInOutCell = FieldInOut; using PointCount = FromCount; @@ -194,27 +199,25 @@ public: /// Base class for worklets that map from Cells to Points. /// class WorkletMapCellToPoint - : public WorkletMapTopology< - vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint> + : public WorkletMapTopology { public: - template + template using FieldInCell = FieldInFrom; - template + template using FieldInPoint = FieldInTo; - template + template using FieldOutPoint = FieldOut; - template + template using FieldInOutPoint = FieldInOut; using CellCount = FromCount; using CellIndices = FromIndices; }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/WorkletReduceByKey.h b/vtkm/worklet/WorkletReduceByKey.h index ac5243ac5..471cf10e8 100644 --- a/vtkm/worklet/WorkletReduceByKey.h +++ b/vtkm/worklet/WorkletReduceByKey.h @@ -41,8 +41,10 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ class WorkletReduceByKey : public vtkm::worklet::internal::WorkletBase { @@ -70,7 +72,7 @@ public: /// all values with a matching key. This tag specifies an \c ArrayHandle /// object that holds the values. /// - template + template struct ValuesIn : vtkm::cont::arg::ControlSignatureTagBase { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; @@ -87,7 +89,7 @@ public: /// /// This tag might not work with scatter operations. /// - template + template struct ValuesInOut : vtkm::cont::arg::ControlSignatureTagBase { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; @@ -104,7 +106,7 @@ public: /// /// This tag might not work with scatter operations. /// - template + template struct ValuesOut : vtkm::cont::arg::ControlSignatureTagBase { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; @@ -122,7 +124,7 @@ public: /// an input array with entries for each reduced value. This could be useful /// to access values from a previous run of WorkletReduceByKey. /// - template + template struct ReducedValuesIn : vtkm::cont::arg::ControlSignatureTagBase { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; @@ -140,7 +142,7 @@ public: /// an input/output array with entries for each reduced value. This could be /// useful to access values from a previous run of WorkletReduceByKey. /// - template + template struct ReducedValuesInOut : vtkm::cont::arg::ControlSignatureTagBase { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; @@ -155,7 +157,7 @@ public: /// then produces a "reduced" value per key. This tag specifies an \c /// ArrayHandle object that holds the values. /// - template + template struct ReducedValuesOut : vtkm::cont::arg::ControlSignatureTagBase { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; @@ -170,32 +172,24 @@ public: /// values with a matching key. This \c ExecutionSignature tag provides the /// number of values associated with the key and given in the Vec-like objects. /// - struct ValueCount : vtkm::exec::arg::ValueCount { }; + struct ValueCount : vtkm::exec::arg::ValueCount + { + }; /// Reduce by key worklets use the related thread indices class. /// VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC - vtkm::exec::arg::ThreadIndicesReduceByKey - GetThreadIndices(const T& threadIndex, - const OutToInArrayType& outToIn, - const VisitArrayType& visit, - const InputDomainType &inputDomain, - const T& globalThreadIndexOffset=0) const + template + VTKM_EXEC vtkm::exec::arg::ThreadIndicesReduceByKey GetThreadIndices( + const T& threadIndex, const OutToInArrayType& outToIn, const VisitArrayType& visit, + const InputDomainType& inputDomain, const T& globalThreadIndexOffset = 0) const { - return vtkm::exec::arg::ThreadIndicesReduceByKey( - threadIndex, - outToIn.Get(threadIndex), - visit.Get(threadIndex), - inputDomain, - globalThreadIndexOffset); + return vtkm::exec::arg::ThreadIndicesReduceByKey(threadIndex, outToIn.Get(threadIndex), + visit.Get(threadIndex), inputDomain, + globalThreadIndexOffset); } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/contourtree/ActiveEdgeTransferrer.h b/vtkm/worklet/contourtree/ActiveEdgeTransferrer.h index cc8d4fe49..5313ae837 100644 --- a/vtkm/worklet/contourtree/ActiveEdgeTransferrer.h +++ b/vtkm/worklet/contourtree/ActiveEdgeTransferrer.h @@ -87,38 +87,45 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet: set initial chain maximum value template class ActiveEdgeTransferrer : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn vertexID, // (input) active vertex ID - FieldIn newPosition, // (input) new position of edge in array - FieldIn newOutdegree, // (input) the new updegree computed - WholeArrayInOut firstEdge, // (i/o) first edge of each active vertex - WholeArrayInOut outdegree, // (i/o) existing vertex updegrees - WholeArrayInOut chainExtremum, // (i/o) chain extremum for vertices - WholeArrayInOut edgeFar, // (i/o) high end of each edge - WholeArrayOut newActiveEdges); // (output) new active edge list + typedef void ControlSignature( + FieldIn vertexID, // (input) active vertex ID + FieldIn newPosition, // (input) new position of edge in array + FieldIn newOutdegree, // (input) the new updegree computed + WholeArrayInOut firstEdge, // (i/o) first edge of each active vertex + WholeArrayInOut outdegree, // (i/o) existing vertex updegrees + WholeArrayInOut chainExtremum, // (i/o) chain extremum for vertices + WholeArrayInOut edgeFar, // (i/o) high end of each edge + WholeArrayOut newActiveEdges); // (output) new active edge list typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8); - typedef _1 InputDomain; + typedef _1 InputDomain; // Passed in constructor because of argument limit on operator - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst IdPortalType; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst + IdPortalType; - IdPortalType activeEdges; // (input) active edges - IdPortalType prunesTo; // (input) where a vertex prunes to + IdPortalType activeEdges; // (input) active edges + IdPortalType prunesTo; // (input) where a vertex prunes to // Constructor VTKM_EXEC_CONT - ActiveEdgeTransferrer(IdPortalType ActiveEdges, - IdPortalType PrunesTo) : - activeEdges(ActiveEdges), - prunesTo(PrunesTo) {} + ActiveEdgeTransferrer(IdPortalType ActiveEdges, IdPortalType PrunesTo) + : activeEdges(ActiveEdges) + , prunesTo(PrunesTo) + { + } // WARNING: POTENTIAL RISK FOR I/O // chainMaximum is safe for I/O here because: @@ -130,15 +137,12 @@ public: // the same is true of firstEdge and updegree template - VTKM_EXEC - void operator()(const vtkm::Id &vertexID, - const vtkm::Id &newPosition, - const vtkm::Id &newOutdegree, - const InOutFieldPortalType &firstEdge, - const InOutFieldPortalType &outdegree, - const InOutFieldPortalType &chainExtremum, - const InOutFieldPortalType &edgeFar, - const OutFieldPortalType &newActiveEdges) const + VTKM_EXEC void operator()(const vtkm::Id& vertexID, const vtkm::Id& newPosition, + const vtkm::Id& newOutdegree, const InOutFieldPortalType& firstEdge, + const InOutFieldPortalType& outdegree, + const InOutFieldPortalType& chainExtremum, + const InOutFieldPortalType& edgeFar, + const OutFieldPortalType& newActiveEdges) const { // retrieve actual vertex ID & first edge vtkm::Id edgeFirst = firstEdge.Get(vertexID); @@ -175,7 +179,6 @@ public: firstEdge.Set(vertexID, newPosition); } }; // ActiveEdgeTransferrer - } } } diff --git a/vtkm/worklet/contourtree/ChainDoubler.h b/vtkm/worklet/contourtree/ChainDoubler.h index c12f7a367..02db8cfd6 100644 --- a/vtkm/worklet/contourtree/ChainDoubler.h +++ b/vtkm/worklet/contourtree/ChainDoubler.h @@ -86,9 +86,12 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Functor for doing chain doubling // Unary because it takes the index of the element to process, and is not guaranteed to @@ -99,19 +102,16 @@ namespace contourtree { class ChainDoubler : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn vertexID, - WholeArrayInOut chains); + typedef void ControlSignature(FieldIn vertexID, WholeArrayInOut chains); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT ChainDoubler() {} template - VTKM_EXEC - void operator()(const vtkm::Id& vertexID, - const InOutFieldPortalType& chains) const + VTKM_EXEC void operator()(const vtkm::Id& vertexID, const InOutFieldPortalType& chains) const { vtkm::Id next = chains.Get(vertexID); vtkm::Id doubleNext = chains.Get(next); @@ -120,7 +120,6 @@ public: chains.Set(vertexID, doubleNext); } }; // ChainDoubler - } } } diff --git a/vtkm/worklet/contourtree/ChainGraph.h b/vtkm/worklet/contourtree/ChainGraph.h index 18c7a7536..42c7db10d 100644 --- a/vtkm/worklet/contourtree/ChainGraph.h +++ b/vtkm/worklet/contourtree/ChainGraph.h @@ -100,9 +100,12 @@ //#define DEBUG_FUNCTION_ENTRY 1 //#define DEBUG_TIMING 1 -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ #define DEBUG_STRING_TRANSFER_GOVERNING_SADDLES "Extrema should now be assigned" #define DEBUG_STRING_TRANSFER_SADDLE_STARTS "Transfer Saddle Starts " @@ -131,96 +134,97 @@ template class ChainGraph { public: - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; - // we will want a reference to the original data array - const vtkm::cont::ArrayHandle &values; + // we will want a reference to the original data array + const vtkm::cont::ArrayHandle& values; - // we will also want a reference to the arc array where we write the output - vtkm::cont::ArrayHandle &arcArray; + // we will also want a reference to the arc array where we write the output + vtkm::cont::ArrayHandle& arcArray; - // for each vertex, we need to know where it is in the original data array - vtkm::cont::ArrayHandle valueIndex; + // for each vertex, we need to know where it is in the original data array + vtkm::cont::ArrayHandle valueIndex; - // and we also need the orientation of the edges (i.e. is it join or split) - bool isJoinGraph; + // and we also need the orientation of the edges (i.e. is it join or split) + bool isJoinGraph; - // and we will store the number of iterations the computation took here - vtkm::Id nIterations; + // and we will store the number of iterations the computation took here + vtkm::Id nIterations; - // array recording pruning sequence - // pseudo-extrema prune to pseudo-saddles - // all others prune to pseudo-extrema - vtkm::cont::ArrayHandle prunesTo; + // array recording pruning sequence + // pseudo-extrema prune to pseudo-saddles + // all others prune to pseudo-extrema + vtkm::cont::ArrayHandle prunesTo; - // we also want to keep track of the first edge for each vertex - vtkm::cont::ArrayHandle firstEdge; + // we also want to keep track of the first edge for each vertex + vtkm::cont::ArrayHandle firstEdge; - // and the outdegree for each vertex - vtkm::cont::ArrayHandle outdegree; + // and the outdegree for each vertex + vtkm::cont::ArrayHandle outdegree; - // finally, we need to keep track of the chain extremum for each vertex - vtkm::cont::ArrayHandle chainExtremum; + // finally, we need to keep track of the chain extremum for each vertex + vtkm::cont::ArrayHandle chainExtremum; - // we will also need to keep track of both near and far ends of each edge - vtkm::cont::ArrayHandle edgeFar; - vtkm::cont::ArrayHandle edgeNear; + // we will also need to keep track of both near and far ends of each edge + vtkm::cont::ArrayHandle edgeFar; + vtkm::cont::ArrayHandle edgeNear; - // we will also keep track of the currently active set of vertices and edges - vtkm::cont::ArrayHandle activeVertices; - vtkm::cont::ArrayHandle activeEdges; + // we will also keep track of the currently active set of vertices and edges + vtkm::cont::ArrayHandle activeVertices; + vtkm::cont::ArrayHandle activeEdges; - // and an array for sorting edges - vtkm::cont::ArrayHandle edgeSorter; + // and an array for sorting edges + vtkm::cont::ArrayHandle edgeSorter; - // constructor takes necessary references - ChainGraph(const vtkm::cont::ArrayHandle &Values, - vtkm::cont::ArrayHandle &ArcArray, - bool IsJoinGraph) : - values(Values), - arcArray(ArcArray), - isJoinGraph(IsJoinGraph) {} + // constructor takes necessary references + ChainGraph(const vtkm::cont::ArrayHandle& Values, + vtkm::cont::ArrayHandle& ArcArray, bool IsJoinGraph) + : values(Values) + , arcArray(ArcArray) + , isJoinGraph(IsJoinGraph) + { + } - // sets initial size of vertex arrays - void AllocateVertexArrays(vtkm::Id Size); + // sets initial size of vertex arrays + void AllocateVertexArrays(vtkm::Id Size); - // sets initial size of edge arrays - void AllocateEdgeArrays(vtkm::Id Size); + // sets initial size of edge arrays + void AllocateEdgeArrays(vtkm::Id Size); - // routine that builds the merge graph once the initial vertices & edges are set - void Compute(vtkm::cont::ArrayHandle &saddles); + // routine that builds the merge graph once the initial vertices & edges are set + void Compute(vtkm::cont::ArrayHandle& saddles); - // sorts saddle starts to find governing saddles - void FindGoverningSaddles(); + // sorts saddle starts to find governing saddles + void FindGoverningSaddles(); - // marks now regular points for removal - void TransferRegularPoints(); + // marks now regular points for removal + void TransferRegularPoints(); - // compacts the active vertex list - void CompactActiveVertices(); + // compacts the active vertex list + void CompactActiveVertices(); - // compacts the active edge list - void CompactActiveEdges(); + // compacts the active edge list + void CompactActiveEdges(); - // builds the chains for the new active vertices - void BuildChains(); + // builds the chains for the new active vertices + void BuildChains(); - // suppresses non-saddles for the governing saddles pass - void TransferSaddleStarts(); + // suppresses non-saddles for the governing saddles pass + void TransferSaddleStarts(); - // sets all remaining active vertices - void BuildTrunk(); + // sets all remaining active vertices + void BuildTrunk(); - // transfers partial results to merge tree array - void TransferToMergeTree(vtkm::cont::ArrayHandle &saddles); + // transfers partial results to merge tree array + void TransferToMergeTree(vtkm::cont::ArrayHandle& saddles); - // prints the contents of the topology graph in a standard format - void DebugPrint(const char *message); -} ; // class ChainGraph + // prints the contents of the topology graph in a standard format + void DebugPrint(const char* message); +}; // class ChainGraph // sets initial size of vertex arrays -template -void ChainGraph::AllocateVertexArrays(vtkm::Id Size) +template +void ChainGraph::AllocateVertexArrays(vtkm::Id Size) { valueIndex.Allocate(Size); prunesTo.Allocate(Size); @@ -231,8 +235,8 @@ void ChainGraph::AllocateVertexArrays(vtkm::Id Size } // AllocateVertexArrays() // sets initial size of edge arrays -template -void ChainGraph::AllocateEdgeArrays(vtkm::Id Size) +template +void ChainGraph::AllocateEdgeArrays(vtkm::Id Size) { edgeFar.Allocate(Size); edgeNear.Allocate(Size); @@ -240,15 +244,15 @@ void ChainGraph::AllocateEdgeArrays(vtkm::Id Size) } // AllocateEdgeArrays() // routine that builds the merge graph once the initial vertices & edges are set -template -void ChainGraph::Compute(vtkm::cont::ArrayHandle &saddles) +template +void ChainGraph::Compute(vtkm::cont::ArrayHandle& saddles) { #ifdef DEBUG_FUNCTION_ENTRY - std::cout << std::endl; - std::cout << "===================" << std::endl; - std::cout << "Compute Chain Graph" << std::endl; - std::cout << "===================" << std::endl; - std::cout << std::endl; + std::cout << std::endl; + std::cout << "===================" << std::endl; + std::cout << "Compute Chain Graph" << std::endl; + std::cout << "===================" << std::endl; + std::cout << std::endl; #endif DebugPrint("Chain Graph Computation Starting"); @@ -301,26 +305,24 @@ void ChainGraph::Compute(vtkm::cont::ArrayHandle -void ChainGraph::FindGoverningSaddles() +template +void ChainGraph::FindGoverningSaddles() { #ifdef DEBUG_FUNCTION_ENTRY - std::cout << std::endl; - std::cout << "======================" << std::endl; - std::cout << "Find Governing Saddles" << std::endl; - std::cout << "======================" << std::endl; - std::cout << std::endl; + std::cout << std::endl; + std::cout << "======================" << std::endl; + std::cout << "Find Governing Saddles" << std::endl; + std::cout << "======================" << std::endl; + std::cout << std::endl; #endif // sort with the comparator - DeviceAlgorithm::Sort(edgeSorter, - EdgePeakComparator( - values.PrepareForInput(DeviceAdapter()), - valueIndex.PrepareForInput(DeviceAdapter()), - edgeFar.PrepareForInput(DeviceAdapter()), - edgeNear.PrepareForInput(DeviceAdapter()), - arcArray.PrepareForInput(DeviceAdapter()), - isJoinGraph)); + DeviceAlgorithm::Sort(edgeSorter, EdgePeakComparator( + values.PrepareForInput(DeviceAdapter()), + valueIndex.PrepareForInput(DeviceAdapter()), + edgeFar.PrepareForInput(DeviceAdapter()), + edgeNear.PrepareForInput(DeviceAdapter()), + arcArray.PrepareForInput(DeviceAdapter()), isJoinGraph)); #ifdef DEBUG_PRINT DebugPrint("After Sorting"); @@ -328,59 +330,58 @@ void ChainGraph::FindGoverningSaddles() // now loop through the edges GoverningSaddleFinder governingSaddleFinder; - vtkm::worklet::DispatcherMapField - governingSaddleFinderDispatcher(governingSaddleFinder); + vtkm::worklet::DispatcherMapField governingSaddleFinderDispatcher( + governingSaddleFinder); vtkm::Id nEdges = edgeSorter.GetNumberOfValues(); vtkm::cont::ArrayHandleIndex edgeIndexArray(nEdges); - governingSaddleFinderDispatcher.Invoke(edgeIndexArray, // input - edgeSorter, // input (whole array) - edgeFar, // input (whole array) - edgeNear, // input (whole array) - prunesTo, // output (whole array) - outdegree); // output (whole array) + governingSaddleFinderDispatcher.Invoke(edgeIndexArray, // input + edgeSorter, // input (whole array) + edgeFar, // input (whole array) + edgeNear, // input (whole array) + prunesTo, // output (whole array) + outdegree); // output (whole array) #ifdef DEBUG_PRINT DebugPrint(DEBUG_STRING_TRANSFER_GOVERNING_SADDLES); #endif } // FindGoverningSaddles() // marks now regular points for removal -template -void ChainGraph::TransferRegularPoints() +template +void ChainGraph::TransferRegularPoints() { #ifdef DEBUG_FUNCTION_ENTRY - std::cout << std::endl; - std::cout << "=======================" << std::endl; - std::cout << "Transfer Regular Points" << std::endl; - std::cout << "=======================" << std::endl; - std::cout << std::endl; + std::cout << std::endl; + std::cout << "=======================" << std::endl; + std::cout << "Transfer Regular Points" << std::endl; + std::cout << "=======================" << std::endl; + std::cout << std::endl; #endif RegularPointTransferrer regularPointTransferrer(isJoinGraph); - vtkm::worklet::DispatcherMapField > - regularPointTransferrerDispatcher(regularPointTransferrer); + vtkm::worklet::DispatcherMapField> regularPointTransferrerDispatcher( + regularPointTransferrer); - regularPointTransferrerDispatcher.Invoke(activeVertices, // input - chainExtremum, // input (whole array) - values, // input (whole array) - valueIndex, // input (whole array) - prunesTo, // i/o (whole array) - outdegree); // output (whole array) + regularPointTransferrerDispatcher.Invoke(activeVertices, // input + chainExtremum, // input (whole array) + values, // input (whole array) + valueIndex, // input (whole array) + prunesTo, // i/o (whole array) + outdegree); // output (whole array) #ifdef DEBUG_PRINT DebugPrint("Regular Points Should Now Be Labelled"); #endif } // TransferRegularPoints() - // compacts the active vertex list -template -void ChainGraph::CompactActiveVertices() +template +void ChainGraph::CompactActiveVertices() { #ifdef DEBUG_FUNCTION_ENTRY - std::cout << std::endl; - std::cout << "=======================" << std::endl; - std::cout << "Compact Active Vertices" << std::endl; - std::cout << "=======================" << std::endl; - std::cout << std::endl; + std::cout << std::endl; + std::cout << "=======================" << std::endl; + std::cout << "Compact Active Vertices" << std::endl; + std::cout << "=======================" << std::endl; + std::cout << std::endl; #endif typedef vtkm::cont::ArrayHandle IdArrayType; typedef vtkm::cont::ArrayHandlePermutation PermuteIndexType; @@ -404,15 +405,15 @@ void ChainGraph::CompactActiveVertices() } // CompactActiveVertices() // compacts the active edge list -template -void ChainGraph::CompactActiveEdges() +template +void ChainGraph::CompactActiveEdges() { #ifdef DEBUG_FUNCTION_ENTRY - std::cout << std::endl; - std::cout << "====================" << std::endl; - std::cout << "Compact Active Edges" << std::endl; - std::cout << "====================" << std::endl; - std::cout << std::endl; + std::cout << std::endl; + std::cout << "====================" << std::endl; + std::cout << "Compact Active Edges" << std::endl; + std::cout << "====================" << std::endl; + std::cout << std::endl; #endif // grab the size of the array for easier reference vtkm::Id nActiveVertices = activeVertices.GetNumberOfValues(); @@ -426,23 +427,23 @@ void ChainGraph::CompactActiveEdges() // WARNING: Using chainMaximum for I/O in parallel loop // See functor description for algorithmic justification of safety VertexDegreeUpdater vertexDegreeUpdater; - vtkm::worklet::DispatcherMapField - vertexDegreeUpdaterDispatcher(vertexDegreeUpdater); + vtkm::worklet::DispatcherMapField vertexDegreeUpdaterDispatcher( + vertexDegreeUpdater); - vertexDegreeUpdaterDispatcher.Invoke(activeVertices, // input - activeEdges, // input (whole array) - edgeFar, // input (whole array) - firstEdge, // input (whole array) - prunesTo, // input (whole array) - outdegree, // input (whole array) - chainExtremum, // i/o (whole array) - newOutdegree); // output + vertexDegreeUpdaterDispatcher.Invoke(activeVertices, // input + activeEdges, // input (whole array) + edgeFar, // input (whole array) + firstEdge, // input (whole array) + prunesTo, // input (whole array) + outdegree, // input (whole array) + chainExtremum, // i/o (whole array) + newOutdegree); // output // now we do a reduction to compute the offsets of each vertex vtkm::cont::ArrayHandle newPosition; DeviceAlgorithm::ScanExclusive(newOutdegree, newPosition); - vtkm::Id nNewEdges = newPosition.GetPortalControl().Get(nActiveVertices-1) + - newOutdegree.GetPortalControl().Get(nActiveVertices-1); + vtkm::Id nNewEdges = newPosition.GetPortalControl().Get(nActiveVertices - 1) + + newOutdegree.GetPortalControl().Get(nActiveVertices - 1); // create a temporary vector for copying vtkm::cont::ArrayHandle newActiveEdges; @@ -452,19 +453,18 @@ void ChainGraph::CompactActiveEdges() // WARNING: Using chainMaximum, edgeHigh, firstEdge, updegree for I/O in parallel loop // See functor description for algorithmic justification of safety ActiveEdgeTransferrer activeEdgeTransferrer( - activeEdges.PrepareForInput(DeviceAdapter()), - prunesTo.PrepareForInput(DeviceAdapter())); - vtkm::worklet::DispatcherMapField > - activeEdgeTransferrerDispatcher(activeEdgeTransferrer); + activeEdges.PrepareForInput(DeviceAdapter()), prunesTo.PrepareForInput(DeviceAdapter())); + vtkm::worklet::DispatcherMapField> + activeEdgeTransferrerDispatcher(activeEdgeTransferrer); - activeEdgeTransferrerDispatcher.Invoke(activeVertices, // input - newPosition, // input - newOutdegree, // input - firstEdge, // i/o (whole array) - outdegree, // i/o (whole array) - chainExtremum, // i/o (whole array) - edgeFar, // i/o (whole array) - newActiveEdges); // output (whole array) + activeEdgeTransferrerDispatcher.Invoke(activeVertices, // input + newPosition, // input + newOutdegree, // input + firstEdge, // i/o (whole array) + outdegree, // i/o (whole array) + chainExtremum, // i/o (whole array) + edgeFar, // i/o (whole array) + newActiveEdges); // output (whole array) // resize the original array and recopy DeviceAlgorithm::Copy(newActiveEdges, activeEdges); @@ -475,15 +475,15 @@ void ChainGraph::CompactActiveEdges() } // CompactActiveEdges() // builds the chains for the new active vertices -template -void ChainGraph::BuildChains() +template +void ChainGraph::BuildChains() { #ifdef DEBUG_FUNCTION_ENTRY - std::cout << std::endl; - std::cout << "============" << std::endl; - std::cout << "Build Chains" << std::endl; - std::cout << "============" << std::endl; - std::cout << std::endl; + std::cout << std::endl; + std::cout << "============" << std::endl; + std::cout << "Build Chains" << std::endl; + std::cout << "============" << std::endl; + std::cout << std::endl; #endif // a temporary array the full size of the graph vtkm::cont::ArrayHandle tempChainExtremum; @@ -503,8 +503,8 @@ void ChainGraph::BuildChains() // Step two at a time, so that we rock between the original and the temp for (vtkm::Id logStep = 0; logStep < nLogSteps; logStep++) { - chainDoublerDispatcher.Invoke(activeVertices, // input - chainExtremum); // i/o (whole array) + chainDoublerDispatcher.Invoke(activeVertices, // input + chainExtremum); // i/o (whole array) } #ifdef DEBUG_PRINT @@ -513,15 +513,15 @@ void ChainGraph::BuildChains() } // BuildChains() // transfers saddle ascent edges into edge sorter -template -void ChainGraph::TransferSaddleStarts() +template +void ChainGraph::TransferSaddleStarts() { #ifdef DEBUG_FUNCTION_ENTRY - std::cout << std::endl; - std::cout << "=======================" << std::endl; - std::cout << DEBUG_STRING_TRANSFER_SADDLE_STARTS << std::endl; - std::cout << "=======================" << std::endl; - std::cout << std::endl; + std::cout << std::endl; + std::cout << "=======================" << std::endl; + std::cout << DEBUG_STRING_TRANSFER_SADDLE_STARTS << std::endl; + std::cout << "=======================" << std::endl; + std::cout << std::endl; #endif // grab the size of the array for easier reference @@ -538,36 +538,35 @@ void ChainGraph::TransferSaddleStarts() // 2. now test all active vertices to see if they have only one chain maximum SaddleAscentFunctor saddleAscentFunctor; - vtkm::worklet::DispatcherMapField - saddleAscentFunctorDispatcher(saddleAscentFunctor); + vtkm::worklet::DispatcherMapField saddleAscentFunctorDispatcher( + saddleAscentFunctor); - saddleAscentFunctorDispatcher.Invoke(activeVertices, // input - firstEdge, // input (whole array) - outdegree, // input (whole array) - activeEdges, // input (whole array) - chainExtremum, // input (whole array) - edgeFar, // input (whole array) - newOutdegree); // output + saddleAscentFunctorDispatcher.Invoke(activeVertices, // input + firstEdge, // input (whole array) + outdegree, // input (whole array) + activeEdges, // input (whole array) + chainExtremum, // input (whole array) + edgeFar, // input (whole array) + newOutdegree); // output // 3. now compute the new offsets in the newFirstEdge array DeviceAlgorithm::ScanExclusive(newOutdegree, newFirstEdge); - nEdgesToSort = newFirstEdge.GetPortalControl().Get(nActiveVertices-1) + - newOutdegree.GetPortalControl().Get(nActiveVertices-1); - + nEdgesToSort = newFirstEdge.GetPortalControl().Get(nActiveVertices - 1) + + newOutdegree.GetPortalControl().Get(nActiveVertices - 1); edgeSorter.ReleaseResources(); edgeSorter.Allocate(nEdgesToSort); SaddleAscentTransferrer saddleAscentTransferrer; - vtkm::worklet::DispatcherMapField - saddleAscentTransferrerDispatcher(saddleAscentTransferrer); + vtkm::worklet::DispatcherMapField saddleAscentTransferrerDispatcher( + saddleAscentTransferrer); - saddleAscentTransferrerDispatcher.Invoke(activeVertices, // input - newOutdegree, // input - newFirstEdge, // input - activeEdges, // input (whole array) - firstEdge, // input (whole array) - edgeSorter); // output (whole array) + saddleAscentTransferrerDispatcher.Invoke(activeVertices, // input + newOutdegree, // input + newFirstEdge, // input + activeEdges, // input (whole array) + firstEdge, // input (whole array) + edgeSorter); // output (whole array) #ifdef DEBUG_PRINT DebugPrint(DEBUG_STRING_TRANSFERRED_SADDLE_STARTS); @@ -575,39 +574,39 @@ void ChainGraph::TransferSaddleStarts() } // TransferSaddleStarts() // sets all remaining active vertices -template -void ChainGraph::BuildTrunk() +template +void ChainGraph::BuildTrunk() { #ifdef DEBUG_FUNCTION_ENTRY - std::cout << std::endl; - std::cout << "===========" << std::endl; - std::cout << "Build Trunk" << std::endl; - std::cout << "============" << std::endl; - std::cout << std::endl; + std::cout << std::endl; + std::cout << "===========" << std::endl; + std::cout << "Build Trunk" << std::endl; + std::cout << "============" << std::endl; + std::cout << std::endl; #endif TrunkBuilder trunkBuilder; - vtkm::worklet::DispatcherMapField - trunkBuilderDispatcher(trunkBuilder); + vtkm::worklet::DispatcherMapField trunkBuilderDispatcher(trunkBuilder); - trunkBuilderDispatcher.Invoke(activeVertices, // input - chainExtremum, // input (whole array) - prunesTo); // output (whole array) + trunkBuilderDispatcher.Invoke(activeVertices, // input + chainExtremum, // input (whole array) + prunesTo); // output (whole array) #ifdef DEBUG_PRINT DebugPrint("Trunk Built"); #endif } // BuildTrunk() // transfers partial results to merge tree array -template -void ChainGraph::TransferToMergeTree(vtkm::cont::ArrayHandle &saddles) +template +void ChainGraph::TransferToMergeTree( + vtkm::cont::ArrayHandle& saddles) { #ifdef DEBUG_FUNCTION_ENTRY - std::cout << std::endl; - std::cout << "=====================" << std::endl; - std::cout << DEBUG_STRING_TRANSFER_TO_MERGE_TREE << std::endl; - std::cout << "=====================" << std::endl; - std::cout << std::endl; + std::cout << std::endl; + std::cout << "=====================" << std::endl; + std::cout << DEBUG_STRING_TRANSFER_TO_MERGE_TREE << std::endl; + std::cout << "=====================" << std::endl; + std::cout << std::endl; #endif // first allocate memory for the target array @@ -617,21 +616,21 @@ void ChainGraph::TransferToMergeTree(vtkm::cont::Ar DeviceAlgorithm::Copy(arcArray, saddles); JoinTreeTransferrer joinTreeTransferrer; - vtkm::worklet::DispatcherMapField - joinTreeTransferrerDispatcher(joinTreeTransferrer); + vtkm::worklet::DispatcherMapField joinTreeTransferrerDispatcher( + joinTreeTransferrer); vtkm::cont::ArrayHandleIndex valueIndexArray(valueIndex.GetNumberOfValues()); - joinTreeTransferrerDispatcher.Invoke(valueIndexArray, // input - prunesTo, // input - valueIndex, // input (whole array) - chainExtremum, // input (whole array) - saddles, // output (whole array) - arcArray); // output (whole array) + joinTreeTransferrerDispatcher.Invoke(valueIndexArray, // input + prunesTo, // input + valueIndex, // input (whole array) + chainExtremum, // input (whole array) + saddles, // output (whole array) + arcArray); // output (whole array) } // TransferToMergeTree() // prints the contents of the topology graph in standard format -template -void ChainGraph::DebugPrint(const char *message) +template +void ChainGraph::DebugPrint(const char* message) { std::cout << "---------------------------" << std::endl; std::cout << std::string(message) << std::endl; @@ -645,7 +644,7 @@ void ChainGraph::DebugPrint(const char *message) // Full Vertex Arrays vtkm::Id nValues = valueIndex.GetNumberOfValues(); - vtkm::cont::ArrayHandle vertexValues; + vtkm::cont::ArrayHandle vertexValues; std::cout << "Full Vertex Arrays - Size: " << nValues << std::endl; printHeader(nValues); @@ -661,7 +660,8 @@ void ChainGraph::DebugPrint(const char *message) // Active Vertex Arrays vtkm::Id nActiveVertices = activeVertices.GetNumberOfValues(); std::cout << "Active Vertex Arrays - Size: " << nActiveVertices << std::endl; - if (nActiveVertices > 0) { + if (nActiveVertices > 0) + { vtkm::cont::ArrayHandle tempIndex; vtkm::cont::ArrayHandle tempValue; @@ -687,9 +687,10 @@ void ChainGraph::DebugPrint(const char *message) std::cout << "Full Edge Arrays - Size: " << nEdges << std::endl; vtkm::cont::ArrayHandle farIndices; vtkm::cont::ArrayHandle nearIndices; - vtkm::cont::ArrayHandle farValues; - vtkm::cont::ArrayHandle nearValues; - if (nEdges > 0) { + vtkm::cont::ArrayHandle farValues; + vtkm::cont::ArrayHandle nearValues; + if (nEdges > 0) + { printHeader(nEdges); printIndices("Far", edgeFar); DeviceAlgorithm::Copy(PermuteIndexType(edgeFar, valueIndex), farIndices); @@ -708,11 +709,12 @@ void ChainGraph::DebugPrint(const char *message) // Active Edge Arrays vtkm::Id nActiveEdges = activeEdges.GetNumberOfValues(); std::cout << "Active Edge Arrays - Size: " << nActiveEdges << std::endl; - if (nActiveEdges > 0) { + if (nActiveEdges > 0) + { vtkm::cont::ArrayHandle activeFarIndices; vtkm::cont::ArrayHandle activeNearIndices; vtkm::cont::ArrayHandle activeNearLookup; - vtkm::cont::ArrayHandle activeNearValues; + vtkm::cont::ArrayHandle activeNearValues; printHeader(nActiveEdges); printIndices("Active Edges", activeEdges); @@ -731,7 +733,8 @@ void ChainGraph::DebugPrint(const char *message) // Edge Sorter Array vtkm::Id nEdgeSorter = edgeSorter.GetNumberOfValues(); std::cout << "Edge Sorter - Size: " << nEdgeSorter << std::endl; - if (nEdgeSorter > 0) { + if (nEdgeSorter > 0) + { vtkm::cont::ArrayHandle tempSortIndex; vtkm::cont::ArrayHandle tempSortValue; @@ -751,7 +754,6 @@ void ChainGraph::DebugPrint(const char *message) std::cout << "---------------------------" << std::endl; std::cout << std::endl; } // DebugPrint() - } } } diff --git a/vtkm/worklet/contourtree/ContourTree.h b/vtkm/worklet/contourtree/ContourTree.h index 4e74c344e..a3cbd2cb8 100644 --- a/vtkm/worklet/contourtree/ContourTree.h +++ b/vtkm/worklet/contourtree/ContourTree.h @@ -162,101 +162,103 @@ #define DEBUG_PRINT 1 //#define DEBUG_TIMING 1 -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ template class ContourTree { public: - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; - typedef vtkm::cont::ArrayHandle IdArrayType; - typedef vtkm::cont::ArrayHandle ValueArrayType; - typedef vtkm::cont::ArrayHandlePermutation PermuteIndexType; - typedef vtkm::cont::ArrayHandlePermutation PermuteValueType; + typedef vtkm::cont::ArrayHandle IdArrayType; + typedef vtkm::cont::ArrayHandle ValueArrayType; + typedef vtkm::cont::ArrayHandlePermutation PermuteIndexType; + typedef vtkm::cont::ArrayHandlePermutation PermuteValueType; - // reference to the underlying data - const vtkm::cont::ArrayHandle values; + // reference to the underlying data + const vtkm::cont::ArrayHandle values; - // vector of superarcs in the contour tree (stored as inward-pointing) - vtkm::cont::ArrayHandle superarcs; + // vector of superarcs in the contour tree (stored as inward-pointing) + vtkm::cont::ArrayHandle superarcs; - // vector of supernodes - vtkm::cont::ArrayHandle supernodes; + // vector of supernodes + vtkm::cont::ArrayHandle supernodes; - // vector of supernodes still unprocessed - vtkm::cont::ArrayHandle activeSupernodes; + // vector of supernodes still unprocessed + vtkm::cont::ArrayHandle activeSupernodes; - // references to join & split trees - MergeTree &joinTree, &splitTree; + // references to join & split trees + MergeTree &joinTree, &splitTree; - // references to join & split graphs - ChainGraph &joinGraph, &splitGraph; + // references to join & split graphs + ChainGraph &joinGraph, &splitGraph; - // vectors of up & down degree used during computation - vtkm::cont::ArrayHandle updegree, downdegree; + // vectors of up & down degree used during computation + vtkm::cont::ArrayHandle updegree, downdegree; - // vectors for tracking merge arcs - vtkm::cont::ArrayHandle joinArcs, splitArcs; + // vectors for tracking merge arcs + vtkm::cont::ArrayHandle joinArcs, splitArcs; - // counter for how many iterations it took to compute - vtkm::Id nIterations; + // counter for how many iterations it took to compute + vtkm::Id nIterations; - // contour tree constructor - ContourTree(const vtkm::cont::ArrayHandle &Values, - MergeTree &JoinTree, - MergeTree &SplitTree, - ChainGraph &JoinGraph, - ChainGraph &SplitGraph); + // contour tree constructor + ContourTree(const vtkm::cont::ArrayHandle& Values, + MergeTree& JoinTree, + MergeTree& SplitTree, + ChainGraph& JoinGraph, + ChainGraph& SplitGraph); - // routines for computing the contour tree - // combines the list of active vertices for join & split trees - // then reduces them to eliminate regular vertices & non-connectivity critical points - void FindSupernodes(); + // routines for computing the contour tree + // combines the list of active vertices for join & split trees + // then reduces them to eliminate regular vertices & non-connectivity critical points + void FindSupernodes(); - // transfers leaves from join/split trees to contour tree - void TransferLeaves(); + // transfers leaves from join/split trees to contour tree + void TransferLeaves(); - // collapses regular edges along leaf superarcs - void CollapseRegular(bool isJoin); + // collapses regular edges along leaf superarcs + void CollapseRegular(bool isJoin); - // compresses trees to remove transferred vertices - void CompressTrees(); + // compresses trees to remove transferred vertices + void CompressTrees(); - // compresses active set of supernodes - void CompressActiveSupernodes(); + // compresses active set of supernodes + void CompressActiveSupernodes(); - // finds the degree of each supernode from the join & split trees - void FindDegrees(); + // finds the degree of each supernode from the join & split trees + void FindDegrees(); - // collect the resulting saddle peaks in sort pairs - void CollectSaddlePeak(vtkm::cont::ArrayHandle > &saddlePeak); + // collect the resulting saddle peaks in sort pairs + void CollectSaddlePeak(vtkm::cont::ArrayHandle>& saddlePeak); - void DebugPrint(const char *message); + void DebugPrint(const char* message); }; // class ContourTree - struct VertexAssigned : vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn supernode, - WholeArrayIn superarcs, + typedef void ControlSignature(FieldIn supernode, WholeArrayIn superarcs, FieldOut hasSuperArc); - typedef _3 ExecutionSignature(_1, _2); - typedef _1 InputDomain; + typedef _3 ExecutionSignature(_1, _2); + typedef _1 InputDomain; bool vertexIsAssigned; VTKM_EXEC_CONT - VertexAssigned(bool VertexIsAssigned) : vertexIsAssigned(VertexIsAssigned) {} + VertexAssigned(bool VertexIsAssigned) + : vertexIsAssigned(VertexIsAssigned) + { + } template - VTKM_EXEC - vtkm::Id operator()(const vtkm::Id supernode, - const InPortalFieldType& superarcs) const + VTKM_EXEC vtkm::Id operator()(const vtkm::Id supernode, const InPortalFieldType& superarcs) const { if (vertexIsAssigned == false) { @@ -277,17 +279,17 @@ public: // creates contour tree template -ContourTree::ContourTree( - const vtkm::cont::ArrayHandle &Values, - MergeTree &JoinTree, - MergeTree &SplitTree, - ChainGraph &JoinGraph, - ChainGraph &SplitGraph) - : values(Values), - joinTree(JoinTree), - splitTree(SplitTree), - joinGraph(JoinGraph), - splitGraph(SplitGraph) +ContourTree::ContourTree( + const vtkm::cont::ArrayHandle& Values, + MergeTree& JoinTree, + MergeTree& SplitTree, + ChainGraph& JoinGraph, + ChainGraph& SplitGraph) + : values(Values) + , joinTree(JoinTree) + , splitTree(SplitTree) + , joinGraph(JoinGraph) + , splitGraph(SplitGraph) { // first we have to get the correct list of supernodes @@ -307,7 +309,8 @@ ContourTree::ContourTree( #ifdef DEBUG_PRINT std::cout << "========================================" << std::endl; std::cout << " " << std::endl; - std::cout << "Iteration " << nIterations << " Size " << activeSupernodes.GetNumberOfValues() << std::endl; + std::cout << "Iteration " << nIterations << " Size " << activeSupernodes.GetNumberOfValues() + << std::endl; std::cout << " " << std::endl; std::cout << "========================================" << std::endl; #endif @@ -335,17 +338,18 @@ ContourTree::ContourTree( // combines the list of active vertices for join & split trees // then reduces them to eliminate regular vertices & non-connectivity critical points template -void ContourTree::FindSupernodes() +void ContourTree::FindSupernodes() { // both trees may have non-connectivity critical points, so we first make a joint list // here, we will explicitly assume that the active lists are in numerical order // which is how we are currently constructing them - vtkm::Id nCandidates = joinGraph.valueIndex.GetNumberOfValues() + - splitGraph.valueIndex.GetNumberOfValues(); + vtkm::Id nCandidates = + joinGraph.valueIndex.GetNumberOfValues() + splitGraph.valueIndex.GetNumberOfValues(); vtkm::cont::ArrayHandle candidates; // take the union of the two sets of vertices - vtkm::cont::ArrayHandleConcatenate candidateArray(joinGraph.valueIndex, splitGraph.valueIndex); + vtkm::cont::ArrayHandleConcatenate candidateArray( + joinGraph.valueIndex, splitGraph.valueIndex); DeviceAlgorithm::Copy(candidateArray, candidates); DeviceAlgorithm::Sort(candidates); DeviceAlgorithm::Unique(candidates); @@ -359,10 +363,11 @@ void ContourTree::FindSupernodes() vtkm::cont::ArrayHandleConstant noVertArray(NO_VERTEX_ASSIGNED, nValues); DeviceAlgorithm::Copy(noVertArray, regularToCritical); - if (nCandidates > 0) { + if (nCandidates > 0) + { RegularToCriticalUp regularToCriticalUp; - vtkm::worklet::DispatcherMapField - regularToCriticalUpDispatcher(regularToCriticalUp); + vtkm::worklet::DispatcherMapField regularToCriticalUpDispatcher( + regularToCriticalUp); regularToCriticalUpDispatcher.Invoke(candidateIndexArray, // input candidates, // input @@ -395,15 +400,16 @@ void ContourTree::FindSupernodes() sortVector.Allocate(nCandidates); // 1. Copy the lower ends of the edges, converting from regular ID to candidate ID - if (nCandidates > 0) { + if (nCandidates > 0) + { RegularToCandidate regularToCandidate; - vtkm::worklet::DispatcherMapField - regularToCandidateDispatcher(regularToCandidate); + vtkm::worklet::DispatcherMapField regularToCandidateDispatcher( + regularToCandidate); - regularToCandidateDispatcher.Invoke(candidates, // input - joinTree.mergeArcs, // input (whole array) - regularToCritical, // input (whole array) - sortVector); // output + regularToCandidateDispatcher.Invoke(candidates, // input + joinTree.mergeArcs, // input (whole array) + regularToCritical, // input (whole array) + sortVector); // output } // 2. Sort the lower ends of the edges @@ -413,34 +419,35 @@ void ContourTree::FindSupernodes() // The 0th element is guaranteed to be NO_VERTEX_ASSIGNED, & can be skipped // Otherwise, if the i-1th element is different, we are the offset for the subrange // and store into the ith place - vtkm::cont::ArrayHandleCounting subsetIndexArray(1, 1, nCandidates-1); - if (nCandidates > 0) { + vtkm::cont::ArrayHandleCounting subsetIndexArray(1, 1, nCandidates - 1); + if (nCandidates > 0) + { SubrangeOffset subRangeOffset; - vtkm::worklet::DispatcherMapField - subrangeOffsetDispatcher(subRangeOffset); + vtkm::worklet::DispatcherMapField subrangeOffsetDispatcher(subRangeOffset); - subrangeOffsetDispatcher.Invoke(subsetIndexArray, // index - sortVector, // input - upCandidate); // output + subrangeOffsetDispatcher.Invoke(subsetIndexArray, // index + sortVector, // input + upCandidate); // output } // 4. Compute the delta to get the degree. - if (nCandidates > 0) { + if (nCandidates > 0) + { DegreeDelta degreeDelta(nCandidates); - vtkm::worklet::DispatcherMapField - degreeDeltaDispatcher(degreeDelta); + vtkm::worklet::DispatcherMapField degreeDeltaDispatcher(degreeDelta); - degreeDeltaDispatcher.Invoke(subsetIndexArray, // input - sortVector, // input (whole array) - upCandidate); // output (whole array) + degreeDeltaDispatcher.Invoke(subsetIndexArray, // input + sortVector, // input (whole array) + upCandidate); // output (whole array) } // Now repeat the same steps for the downdegree // 1. Copy the upper ends of the edges, converting from regular ID to candidate ID - if (nCandidates > 0) { + if (nCandidates > 0) + { RegularToCriticalDown regularToCriticalDown; - vtkm::worklet::DispatcherMapField - regularToCriticalDownDispatcher(regularToCriticalDown); + vtkm::worklet::DispatcherMapField regularToCriticalDownDispatcher( + regularToCriticalDown); regularToCriticalDownDispatcher.Invoke(candidates, // input splitTree.mergeArcs, // input (whole array) @@ -455,25 +462,25 @@ void ContourTree::FindSupernodes() // The 0th element is guaranteed to be NO_VERTEX_ASSIGNED, & can be skipped // Otherwise, if the i-1th element is different, we are the offset for the subrange // and store into the ith place - if (nCandidates > 0) { + if (nCandidates > 0) + { SubrangeOffset subRangeOffset; - vtkm::worklet::DispatcherMapField - subrangeOffsetDispatcher(subRangeOffset); + vtkm::worklet::DispatcherMapField subrangeOffsetDispatcher(subRangeOffset); - subrangeOffsetDispatcher.Invoke(subsetIndexArray, // index - sortVector, // input - downCandidate); // output + subrangeOffsetDispatcher.Invoke(subsetIndexArray, // index + sortVector, // input + downCandidate); // output } // 4. Compute the delta to get the degree. - if (nCandidates > 0) { + if (nCandidates > 0) + { DegreeDelta degreeDelta(nCandidates); - vtkm::worklet::DispatcherMapField - degreeDeltaDispatcher(degreeDelta); + vtkm::worklet::DispatcherMapField degreeDeltaDispatcher(degreeDelta); - degreeDeltaDispatcher.Invoke(subsetIndexArray, // index - sortVector, // input - downCandidate); // in out + degreeDeltaDispatcher.Invoke(subsetIndexArray, // index + sortVector, // input + downCandidate); // in out } // create an index vector for whether the vertex is to be kept @@ -481,14 +488,14 @@ void ContourTree::FindSupernodes() isSupernode.Allocate(nCandidates); // fill the vector in - if (nCandidates > 0) { + if (nCandidates > 0) + { FillSupernodes fillSupernodes; - vtkm::worklet::DispatcherMapField - fillSupernodesDispatcher(fillSupernodes); + vtkm::worklet::DispatcherMapField fillSupernodesDispatcher(fillSupernodes); - fillSupernodesDispatcher.Invoke(upCandidate, // input - downCandidate, // input - isSupernode); // output + fillSupernodesDispatcher.Invoke(upCandidate, // input + downCandidate, // input + isSupernode); // output } // do a compaction to find the new index for each @@ -497,8 +504,8 @@ void ContourTree::FindSupernodes() DeviceAlgorithm::ScanExclusive(isSupernode, supernodeID); // size is the position of the last element + the size of the last element (0/1) - vtkm::Id nSupernodes = supernodeID.GetPortalConstControl().Get(nCandidates-1) + - isSupernode.GetPortalConstControl().Get(nCandidates-1); + vtkm::Id nSupernodes = supernodeID.GetPortalConstControl().Get(nCandidates - 1) + + isSupernode.GetPortalConstControl().Get(nCandidates - 1); // allocate memory for our arrays supernodes.ReleaseResources(); @@ -510,20 +517,20 @@ void ContourTree::FindSupernodes() downdegree.Allocate(nSupernodes); // now copy over the positions to compact - if (nCandidates > 0) { + if (nCandidates > 0) + { CopySupernodes copySupernodes; - vtkm::worklet::DispatcherMapField - copySupernodesDispatcher(copySupernodes); + vtkm::worklet::DispatcherMapField copySupernodesDispatcher(copySupernodes); - copySupernodesDispatcher.Invoke(isSupernode, // input - candidates, // input - supernodeID, // input - upCandidate, // input - downCandidate, // input - regularToCritical, // output (whole array) - supernodes, // output (whole array) - updegree, // output (whole array) - downdegree); // output (whole array) + copySupernodesDispatcher.Invoke(isSupernode, // input + candidates, // input + supernodeID, // input + upCandidate, // input + downCandidate, // input + regularToCritical, // output (whole array) + supernodes, // output (whole array) + updegree, // output (whole array) + downdegree); // output (whole array) } // now we call the merge tree again to reset the merge arcs @@ -540,8 +547,8 @@ void ContourTree::FindSupernodes() // and copy them across, setting IDs for both ends SetJoinAndSplitArcs setJoinAndSplitArcs; - vtkm::worklet::DispatcherMapField - setJoinAndSplitArcsDispatcher(setJoinAndSplitArcs); + vtkm::worklet::DispatcherMapField setJoinAndSplitArcsDispatcher( + setJoinAndSplitArcs); setJoinAndSplitArcsDispatcher.Invoke(supernodes, // input joinTree.mergeArcs, // input (whole array) @@ -567,18 +574,17 @@ void ContourTree::FindSupernodes() // transfers leaves from join/split trees to contour tree template -void ContourTree::TransferLeaves() +void ContourTree::TransferLeaves() { FindLeaves findLeaves; - vtkm::worklet::DispatcherMapField - findLeavesDispatcher(findLeaves); + vtkm::worklet::DispatcherMapField findLeavesDispatcher(findLeaves); - findLeavesDispatcher.Invoke(activeSupernodes, // input - updegree, // input (whole array) - downdegree, // input (whole array) - joinArcs, // input (whole array) - splitArcs, // input (whole array) - superarcs); // i/o (whole array) + findLeavesDispatcher.Invoke(activeSupernodes, // input + updegree, // input (whole array) + downdegree, // input (whole array) + joinArcs, // input (whole array) + splitArcs, // input (whole array) + superarcs); // i/o (whole array) #ifdef DEBUG_PRINT DebugPrint("Leaves Transferred"); #endif @@ -586,7 +592,7 @@ void ContourTree::TransferLeaves() // collapses regular edges along leaf superarcs template -void ContourTree::CollapseRegular(bool isJoin) +void ContourTree::CollapseRegular(bool isJoin) { // we'll have a vector for tracking outwards vtkm::Id nSupernodes = supernodes.GetNumberOfValues(); @@ -599,12 +605,14 @@ void ContourTree::CollapseRegular(bool isJoin) vtkm::cont::ArrayHandle inbound; vtkm::cont::ArrayHandle indegree; vtkm::cont::ArrayHandle outdegree; - if (isJoin) { + if (isJoin) + { DeviceAlgorithm::Copy(joinArcs, inbound); DeviceAlgorithm::Copy(downdegree, indegree); DeviceAlgorithm::Copy(updegree, outdegree); } - else { + else + { DeviceAlgorithm::Copy(splitArcs, inbound); DeviceAlgorithm::Copy(updegree, indegree); DeviceAlgorithm::Copy(downdegree, outdegree); @@ -612,14 +620,13 @@ void ContourTree::CollapseRegular(bool isJoin) // loop to copy join/split CopyJoinSplit copyJoinSplit; - vtkm::worklet::DispatcherMapField - copyJoinSplitDispatcher(copyJoinSplit); + vtkm::worklet::DispatcherMapField copyJoinSplitDispatcher(copyJoinSplit); - copyJoinSplitDispatcher.Invoke(activeSupernodes, // input - inbound, // input (whole array) - indegree, // input (whole array) - outdegree, // input (whole array) - outbound); // output (whole array) + copyJoinSplitDispatcher.Invoke(activeSupernodes, // input + inbound, // input (whole array) + indegree, // input (whole array) + outdegree, // input (whole array) + outbound); // output (whole array) // Compute the number of log steps required in this pass vtkm::Id nLogSteps = 1; @@ -632,11 +639,10 @@ void ContourTree::CollapseRegular(bool isJoin) for (vtkm::Id iteration = 0; iteration < nLogSteps; iteration++) { UpdateOutbound updateOutbound; - vtkm::worklet::DispatcherMapField - updateOutboundDispatcher(updateOutbound); + vtkm::worklet::DispatcherMapField updateOutboundDispatcher(updateOutbound); - updateOutboundDispatcher.Invoke(activeSupernodes, // input - outbound); // i/o (whole array) + updateOutboundDispatcher.Invoke(activeSupernodes, // input + outbound); // i/o (whole array) } // at this point, the outbound vector chains everything outwards to the leaf @@ -646,15 +652,15 @@ void ContourTree::CollapseRegular(bool isJoin) // a. outbound is not -1 (i.e. vertex is regular) // b. superarc[outbound] is not -1 (i.e. outbound is a leaf) SetSupernodeInward setSupernodeInward; - vtkm::worklet::DispatcherMapField - setSupernodeInwardDispatcher(setSupernodeInward); + vtkm::worklet::DispatcherMapField setSupernodeInwardDispatcher( + setSupernodeInward); - setSupernodeInwardDispatcher.Invoke(activeSupernodes, // input - inbound, // input (whole array) - outbound, // input (whole array) - indegree, // input (whole array) - outdegree, // input (whole array) - superarcs); // i/o (whole array) + setSupernodeInwardDispatcher.Invoke(activeSupernodes, // input + inbound, // input (whole array) + outbound, // input (whole array) + indegree, // input (whole array) + outdegree, // input (whole array) + superarcs); // i/o (whole array) outbound.ReleaseResources(); #ifdef DEBUG_PRINT @@ -662,10 +668,9 @@ void ContourTree::CollapseRegular(bool isJoin) #endif } // CollapseRegular() - // compresses trees to remove transferred vertices template -void ContourTree::CompressTrees() +void ContourTree::CompressTrees() { // Compute the number of log steps required in this pass vtkm::Id nActiveSupernodes = activeSupernodes.GetNumberOfValues(); @@ -677,13 +682,12 @@ void ContourTree::CompressTrees() for (vtkm::Id logStep = 0; logStep < nLogSteps; logStep++) { SkipVertex skipVertex; - vtkm::worklet::DispatcherMapField - skipVertexDispatcher(skipVertex); + vtkm::worklet::DispatcherMapField skipVertexDispatcher(skipVertex); - skipVertexDispatcher.Invoke(activeSupernodes, // input - superarcs, // input (whole array) - joinArcs, // i/o (whole array) - splitArcs); // i/o (whole array) + skipVertexDispatcher.Invoke(activeSupernodes, // input + superarcs, // input (whole array) + joinArcs, // i/o (whole array) + splitArcs); // i/o (whole array) } #ifdef DEBUG_PRINT @@ -693,19 +697,16 @@ void ContourTree::CompressTrees() // compresses active set of supernodes template -void ContourTree::CompressActiveSupernodes() +void ContourTree::CompressActiveSupernodes() { // copy only if the superarc is not set vtkm::cont::ArrayHandle noSuperarcArray; noSuperarcArray.Allocate(activeSupernodes.GetNumberOfValues()); VertexAssigned vertexAssigned(false); - vtkm::worklet::DispatcherMapField - vertexAssignedDispatcher(vertexAssigned); + vtkm::worklet::DispatcherMapField vertexAssignedDispatcher(vertexAssigned); - vertexAssignedDispatcher.Invoke(activeSupernodes, - superarcs, - noSuperarcArray); + vertexAssignedDispatcher.Invoke(activeSupernodes, superarcs, noSuperarcArray); vtkm::cont::ArrayHandle compressSupernodes; DeviceAlgorithm::CopyIf(activeSupernodes, noSuperarcArray, compressSupernodes); @@ -720,19 +721,18 @@ void ContourTree::CompressActiveSupernodes() // recomputes the degree of each supernode from the join & split trees template -void ContourTree::FindDegrees() +void ContourTree::FindDegrees() { if (activeSupernodes.GetNumberOfValues() == 0) return; vtkm::Id nActiveSupernodes = activeSupernodes.GetNumberOfValues(); ResetDegrees resetDegrees; - vtkm::worklet::DispatcherMapField - resetDegreesDispatcher(resetDegrees); + vtkm::worklet::DispatcherMapField resetDegreesDispatcher(resetDegrees); - resetDegreesDispatcher.Invoke(activeSupernodes, // input - updegree, // output (whole array) - downdegree); // output (whole array) + resetDegreesDispatcher.Invoke(activeSupernodes, // input + updegree, // output (whole array) + downdegree); // output (whole array) // create a temporary sorting array vtkm::cont::ArrayHandle sortVector; @@ -740,15 +740,15 @@ void ContourTree::FindDegrees() vtkm::cont::ArrayHandleIndex activeSupernodeIndexArray(nActiveSupernodes); // 1. Copy the neighbours for each active edge - if (nActiveSupernodes > 0) { + if (nActiveSupernodes > 0) + { CopyNeighbors copyNeighbors; - vtkm::worklet::DispatcherMapField - copyNeighborsDispatcher(copyNeighbors); + vtkm::worklet::DispatcherMapField copyNeighborsDispatcher(copyNeighbors); - copyNeighborsDispatcher.Invoke(activeSupernodeIndexArray, // input - activeSupernodes, // input (whole array) - joinArcs, // input (whole array) - sortVector); // output + copyNeighborsDispatcher.Invoke(activeSupernodeIndexArray, // input + activeSupernodes, // input (whole array) + joinArcs, // input (whole array) + sortVector); // output } // 2. Sort the neighbours @@ -758,11 +758,12 @@ void ContourTree::FindDegrees() // The 0th element is guaranteed to be NO_VERTEX_ASSIGNED, & can be skipped // Otherwise, if the i-1th element is different, we are the offset for the subrange // and store into the ith place - vtkm::cont::ArrayHandleCounting subsetIndexArray(1, 1, nActiveSupernodes-1); - if (nActiveSupernodes > 1) { + vtkm::cont::ArrayHandleCounting subsetIndexArray(1, 1, nActiveSupernodes - 1); + if (nActiveSupernodes > 1) + { DegreeSubrangeOffset degreeSubrangeOffset; - vtkm::worklet::DispatcherMapField - degreeSubrangeOffsetDispatcher(degreeSubrangeOffset); + vtkm::worklet::DispatcherMapField degreeSubrangeOffsetDispatcher( + degreeSubrangeOffset); degreeSubrangeOffsetDispatcher.Invoke(subsetIndexArray, // input sortVector, // input (whole array) @@ -770,27 +771,27 @@ void ContourTree::FindDegrees() } // 4. Compute the delta to get the degree. - if (nActiveSupernodes > 1) { + if (nActiveSupernodes > 1) + { DegreeDelta degreeDelta(nActiveSupernodes); - vtkm::worklet::DispatcherMapField - degreeDeltaDispatcher(degreeDelta); + vtkm::worklet::DispatcherMapField degreeDeltaDispatcher(degreeDelta); - degreeDeltaDispatcher.Invoke(subsetIndexArray, // input - sortVector, // input - updegree); // in out + degreeDeltaDispatcher.Invoke(subsetIndexArray, // input + sortVector, // input + updegree); // in out } // Now repeat the same steps for the downdegree // 1. Copy the neighbours for each active edge - if (nActiveSupernodes > 0) { + if (nActiveSupernodes > 0) + { CopyNeighbors copyNeighbors; - vtkm::worklet::DispatcherMapField - copyNeighborsDispatcher(copyNeighbors); + vtkm::worklet::DispatcherMapField copyNeighborsDispatcher(copyNeighbors); - copyNeighborsDispatcher.Invoke(activeSupernodeIndexArray, // input - activeSupernodes, // input (whole array) - splitArcs, // input (whole array) - sortVector); // output + copyNeighborsDispatcher.Invoke(activeSupernodeIndexArray, // input + activeSupernodes, // input (whole array) + splitArcs, // input (whole array) + sortVector); // output } // 2. Sort the neighbours @@ -800,10 +801,11 @@ void ContourTree::FindDegrees() // The 0th element is guaranteed to be NO_VERTEX_ASSIGNED, & can be skipped // Otherwise, if the i-1th element is different, we are the offset for the subrange // and store into the ith place - if (nActiveSupernodes > 1) { + if (nActiveSupernodes > 1) + { DegreeSubrangeOffset degreeSubrangeOffset; - vtkm::worklet::DispatcherMapField - degreeSubrangeOffsetDispatcher(degreeSubrangeOffset); + vtkm::worklet::DispatcherMapField degreeSubrangeOffsetDispatcher( + degreeSubrangeOffset); degreeSubrangeOffsetDispatcher.Invoke(subsetIndexArray, // input sortVector, // input (whole array) @@ -811,21 +813,20 @@ void ContourTree::FindDegrees() } // 4. Compute the delta to get the degree. - if (nActiveSupernodes > 1) { + if (nActiveSupernodes > 1) + { DegreeDelta degreeDelta(nActiveSupernodes); - vtkm::worklet::DispatcherMapField - degreeDeltaDispatcher(degreeDelta); + vtkm::worklet::DispatcherMapField degreeDeltaDispatcher(degreeDelta); - degreeDeltaDispatcher.Invoke(subsetIndexArray, // input - sortVector, // input (whole array) - downdegree); // in out (whole array) + degreeDeltaDispatcher.Invoke(subsetIndexArray, // input + sortVector, // input (whole array) + downdegree); // in out (whole array) } #ifdef DEBUG_PRINT DebugPrint("Degrees Recomputed"); #endif } // FindDegrees() - // small class for storing the contour arcs class EdgePair { @@ -833,39 +834,51 @@ public: vtkm::Id low, high; // constructor - defaults to -1 - EdgePair(vtkm::Id Low = -1, vtkm::Id High = -1) : low(Low), high(High) {} + EdgePair(vtkm::Id Low = -1, vtkm::Id High = -1) + : low(Low) + , high(High) + { + } }; // comparison operator < -bool operator < (const EdgePair LHS, const EdgePair RHS) +bool operator<(const EdgePair LHS, const EdgePair RHS) { - if (LHS.low < RHS.low) return true; - if (LHS.low > RHS.low) return false; - if (LHS.high < RHS.high) return true; - if (LHS.high > RHS.high) return false; + if (LHS.low < RHS.low) + return true; + if (LHS.low > RHS.low) + return false; + if (LHS.high < RHS.high) + return true; + if (LHS.high > RHS.high) + return false; return false; } struct SaddlePeakSort { - VTKM_EXEC_CONT bool operator()(const vtkm::Pair& a, - const vtkm::Pair& b) const + VTKM_EXEC_CONT bool operator()(const vtkm::Pair& a, + const vtkm::Pair& b) const { - if (a.first < b.first) return true; - if (a.first > b.first) return false; - if (a.second < b.second) return true; - if (a.second > b.second) return false; + if (a.first < b.first) + return true; + if (a.first > b.first) + return false; + if (a.second < b.second) + return true; + if (a.second > b.second) + return false; return false; } }; // sorted print routine template -void ContourTree::CollectSaddlePeak( - vtkm::cont::ArrayHandle > &saddlePeak) +void ContourTree::CollectSaddlePeak( + vtkm::cont::ArrayHandle>& saddlePeak) { // Collect the valid saddle peak pairs - std::vector > superarcVector; + std::vector> superarcVector; for (vtkm::Id supernode = 0; supernode < supernodes.GetNumberOfValues(); supernode++) { // ID of regular node @@ -893,7 +906,8 @@ void ContourTree::CollectSaddlePeak( } // per vertex // Setting saddlePeak reference to the make_ArrayHandle directly does not work - vtkm::cont::ArrayHandle > tempArray = vtkm::cont::make_ArrayHandle(superarcVector); + vtkm::cont::ArrayHandle> tempArray = + vtkm::cont::make_ArrayHandle(superarcVector); // now sort it DeviceAlgorithm::Sort(tempArray, SaddlePeakSort()); @@ -903,14 +917,15 @@ void ContourTree::CollectSaddlePeak( for (vtkm::UInt32 superarc = 0; superarc < superarcVector.size(); superarc++) { std::cout << std::setw(PRINT_WIDTH) << saddlePeak.GetPortalControl().Get(superarc).first << " "; - std::cout << std::setw(PRINT_WIDTH) << saddlePeak.GetPortalControl().Get(superarc).second << std::endl; + std::cout << std::setw(PRINT_WIDTH) << saddlePeak.GetPortalControl().Get(superarc).second + << std::endl; } #endif } // CollectSaddlePeak() // debug routine template -void ContourTree::DebugPrint(const char *message) +void ContourTree::DebugPrint(const char* message) { std::cout << "---------------------------" << std::endl; std::cout << std::string(message) << std::endl; @@ -961,7 +976,6 @@ void ContourTree::DebugPrint(const char *message) printIndices("Active Superarcs", activeSuperarcs); std::cout << std::endl; } // DebugPrint() - } } } diff --git a/vtkm/worklet/contourtree/CopyJoinSplit.h b/vtkm/worklet/contourtree/CopyJoinSplit.h index b94c11069..02a5fd6be 100644 --- a/vtkm/worklet/contourtree/CopyJoinSplit.h +++ b/vtkm/worklet/contourtree/CopyJoinSplit.h @@ -71,33 +71,33 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to candidate class CopyJoinSplit : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn superID, // (input) index into super nodes - WholeArrayIn inbound, // (input) join or split arcs - WholeArrayIn indegree, // (input) - WholeArrayIn outdegree, // (input) - WholeArrayOut outbound); // (output) join or split arcs + typedef void ControlSignature(FieldIn superID, // (input) index into super nodes + WholeArrayIn inbound, // (input) join or split arcs + WholeArrayIn indegree, // (input) + WholeArrayIn outdegree, // (input) + WholeArrayOut outbound); // (output) join or split arcs typedef void ExecutionSignature(_1, _2, _3, _4, _5); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT CopyJoinSplit() {} template - VTKM_EXEC - void operator()(const vtkm::Id& superID, - const InFieldPortalType& inbound, - const InFieldPortalType& indegree, - const InFieldPortalType& outdegree, - const OutFieldPortalType& outbound) const + VTKM_EXEC void operator()(const vtkm::Id& superID, const InFieldPortalType& inbound, + const InFieldPortalType& indegree, const InFieldPortalType& outdegree, + const OutFieldPortalType& outbound) const { // if the vertex is critical, set it to -1 if ((outdegree.Get(superID) != 1) || (indegree.Get(superID) != 1)) @@ -113,7 +113,6 @@ public: } // inbound exists } }; // CopyJoinSplit - } } } diff --git a/vtkm/worklet/contourtree/CopyNeighbors.h b/vtkm/worklet/contourtree/CopyNeighbors.h index 970042a13..8ae5d6ca3 100644 --- a/vtkm/worklet/contourtree/CopyNeighbors.h +++ b/vtkm/worklet/contourtree/CopyNeighbors.h @@ -71,30 +71,33 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet class CopyNeighbors : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn activeSupernode, // (input) index into supernodes - WholeArrayIn activeSupernodes, // (input) active supernode vertex IDs - WholeArrayIn arcs, // (input) merge tree arcs - FieldOut sortVector); // (output) neighbors for active edge - typedef _4 ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + typedef void ControlSignature( + FieldIn activeSupernode, // (input) index into supernodes + WholeArrayIn activeSupernodes, // (input) active supernode vertex IDs + WholeArrayIn arcs, // (input) merge tree arcs + FieldOut sortVector); // (output) neighbors for active edge + typedef _4 ExecutionSignature(_1, _2, _3); + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT CopyNeighbors() {} template - VTKM_EXEC - vtkm::Id operator()(const vtkm::Id& activeSupernode, - const InFieldPortalType& activeSupernodes, - const InFieldPortalType& arcs) const + VTKM_EXEC vtkm::Id operator()(const vtkm::Id& activeSupernode, + const InFieldPortalType& activeSupernodes, + const InFieldPortalType& arcs) const { vtkm::Id sortVector; vtkm::Id superID = activeSupernodes.Get(activeSupernode); @@ -103,7 +106,6 @@ public: return sortVector; } }; // CopyNeighbors - } } } diff --git a/vtkm/worklet/contourtree/CopySupernodes.h b/vtkm/worklet/contourtree/CopySupernodes.h index 0209ef888..85f314478 100644 --- a/vtkm/worklet/contourtree/CopySupernodes.h +++ b/vtkm/worklet/contourtree/CopySupernodes.h @@ -70,41 +70,41 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to candidate class CopySupernodes : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn isSupernode, // (input) is this a supernode - FieldIn regularID, // (input) candidate ID - FieldIn superID, // (input) supernode ID - FieldIn upCandidate, // (input) - FieldIn downCandidate, // (input) + typedef void ControlSignature(FieldIn isSupernode, // (input) is this a supernode + FieldIn regularID, // (input) candidate ID + FieldIn superID, // (input) supernode ID + FieldIn upCandidate, // (input) + FieldIn downCandidate, // (input) WholeArrayOut regularToCritical, // (output) - WholeArrayOut supernodes, // (output) compacted supernodes - WholeArrayOut updegree, // (output) compacted updegree - WholeArrayOut downdegree); // (output) compacted downdegree + WholeArrayOut supernodes, // (output) compacted supernodes + WholeArrayOut updegree, // (output) compacted updegree + WholeArrayOut downdegree); // (output) compacted downdegree typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8, _9); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT CopySupernodes() {} template - VTKM_EXEC - void operator()(const vtkm::Id& isSupernode, - const vtkm::Id& regularID, - const vtkm::Id& superID, - const vtkm::Id& upCandidate, - const vtkm::Id& downCandidate, - const OutFieldPortalType& regularToCritical, - const OutFieldPortalType& supernodes, - const OutFieldPortalType& updegree, - const OutFieldPortalType& downdegree) const + VTKM_EXEC void operator()(const vtkm::Id& isSupernode, const vtkm::Id& regularID, + const vtkm::Id& superID, const vtkm::Id& upCandidate, + const vtkm::Id& downCandidate, + const OutFieldPortalType& regularToCritical, + const OutFieldPortalType& supernodes, + const OutFieldPortalType& updegree, + const OutFieldPortalType& downdegree) const { if (isSupernode) { // supernode @@ -116,7 +116,6 @@ public: } } }; // CopySupernodes - } } } diff --git a/vtkm/worklet/contourtree/DegreeDelta.h b/vtkm/worklet/contourtree/DegreeDelta.h index 7ee0049a9..6a7987b32 100644 --- a/vtkm/worklet/contourtree/DegreeDelta.h +++ b/vtkm/worklet/contourtree/DegreeDelta.h @@ -70,50 +70,54 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to candidate class DegreeDelta : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn sortID, // (input) index into sorted vertices [1..N] - WholeArrayIn sortVector, // (input) sorted vector of vertices - WholeArrayOut candidate); // (output) candidate + typedef void ControlSignature( + FieldIn sortID, // (input) index into sorted vertices [1..N] + WholeArrayIn sortVector, // (input) sorted vector of vertices + WholeArrayOut candidate); // (output) candidate typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + typedef _1 InputDomain; vtkm::Id nCandidates; // Constructor VTKM_EXEC_CONT - DegreeDelta(vtkm::Id NCandidates) : nCandidates(NCandidates) {} + DegreeDelta(vtkm::Id NCandidates) + : nCandidates(NCandidates) + { + } template - VTKM_EXEC - void operator()(const vtkm::Id& sortID, - const InFieldPortalType& sortVector, - const OutFieldPortalType& candidate) const + VTKM_EXEC void operator()(const vtkm::Id& sortID, const InFieldPortalType& sortVector, + const OutFieldPortalType& candidate) const { vtkm::Id iCandidate = sortVector.Get(sortID); // last element needs to be subtracted from vector size - if (sortID == nCandidates-1) + if (sortID == nCandidates - 1) { // final element candidate.Set(iCandidate, (nCandidates - candidate.Get(iCandidate))); } // final element // otherwise, if the next one is different else { // not the last element - vtkm::Id nextCandidate = sortVector.Get(sortID+1); + vtkm::Id nextCandidate = sortVector.Get(sortID + 1); if (iCandidate != nextCandidate) { // no match - candidate.Set(iCandidate, (sortID+1 - candidate.Get(iCandidate))); + candidate.Set(iCandidate, (sortID + 1 - candidate.Get(iCandidate))); } // no match - } // not the last element + } // not the last element } }; // DegreeDelta - } } } diff --git a/vtkm/worklet/contourtree/DegreeSubrangeOffset.h b/vtkm/worklet/contourtree/DegreeSubrangeOffset.h index 1a2ea93fe..ca9ddf902 100644 --- a/vtkm/worklet/contourtree/DegreeSubrangeOffset.h +++ b/vtkm/worklet/contourtree/DegreeSubrangeOffset.h @@ -71,39 +71,39 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet class DegreeSubrangeOffset : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn sortID, // (input) index into sort vector - WholeArrayIn sortVector, // (input) - WholeArrayOut degree); // (output) + typedef void ControlSignature(FieldIn sortID, // (input) index into sort vector + WholeArrayIn sortVector, // (input) + WholeArrayOut degree); // (output) typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT DegreeSubrangeOffset() {} template - VTKM_EXEC - void operator()(const vtkm::Id& sortID, - const InFieldPortalType& sortVector, - const OutFieldPortalType& degree) const + VTKM_EXEC void operator()(const vtkm::Id& sortID, const InFieldPortalType& sortVector, + const OutFieldPortalType& degree) const { vtkm::Id superID = sortVector.Get(sortID); - vtkm::Id prevSuper = sortVector.Get(sortID-1); + vtkm::Id prevSuper = sortVector.Get(sortID - 1); // if they don't match, we've found a boundary if (superID != prevSuper) degree.Set(superID, sortID); } }; // DegreeSubrangeOffset - } } } diff --git a/vtkm/worklet/contourtree/EdgePeakComparator.h b/vtkm/worklet/contourtree/EdgePeakComparator.h index 82d256d10..524ae11a7 100644 --- a/vtkm/worklet/contourtree/EdgePeakComparator.h +++ b/vtkm/worklet/contourtree/EdgePeakComparator.h @@ -84,17 +84,23 @@ #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Comparator for edges to sort governing saddles high template class EdgePeakComparator { public: - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst ValuePortalType; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst IdPortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst ValuePortalType; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst + IdPortalType; ValuePortalType values; IdPortalType valueIndex; @@ -104,21 +110,19 @@ public: bool isJoinGraph; VTKM_CONT - EdgePeakComparator(ValuePortalType Values, - IdPortalType ValueIndex, - IdPortalType EdgeFar, - IdPortalType EdgeNear, - IdPortalType ArcArray, - bool IsJoinGraph) : - values(Values), - valueIndex(ValueIndex), - edgeFar(EdgeFar), - edgeNear(EdgeNear), - arcArray(ArcArray), - isJoinGraph(IsJoinGraph) {} + EdgePeakComparator(ValuePortalType Values, IdPortalType ValueIndex, IdPortalType EdgeFar, + IdPortalType EdgeNear, IdPortalType ArcArray, bool IsJoinGraph) + : values(Values) + , valueIndex(ValueIndex) + , edgeFar(EdgeFar) + , edgeNear(EdgeNear) + , arcArray(ArcArray) + , isJoinGraph(IsJoinGraph) + { + } VTKM_EXEC - bool operator() (const vtkm::Id &i, const vtkm::Id &j) const + bool operator()(const vtkm::Id& i, const vtkm::Id& j) const { // first compare the far end if (edgeFar.Get(i) < edgeFar.Get(j)) @@ -151,7 +155,6 @@ public: } }; // EdgePeakComparator - } } } diff --git a/vtkm/worklet/contourtree/FillSupernodes.h b/vtkm/worklet/contourtree/FillSupernodes.h index 5d74ab227..8d5081365 100644 --- a/vtkm/worklet/contourtree/FillSupernodes.h +++ b/vtkm/worklet/contourtree/FillSupernodes.h @@ -70,17 +70,20 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet class FillSupernodes : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn upCandidate, // (input) - FieldIn downCandidate, // (input) - FieldOut isSupernode); // (output) + typedef void ControlSignature(FieldIn upCandidate, // (input) + FieldIn downCandidate, // (input) + FieldOut isSupernode); // (output) typedef _3 ExecutionSignature(_1, _2); typedef _1 InputDomain; @@ -88,14 +91,12 @@ public: VTKM_EXEC_CONT FillSupernodes() {} - vtkm::Id operator()(const vtkm::Id& upCandidate, - const vtkm::Id& downCandidate) const + vtkm::Id operator()(const vtkm::Id& upCandidate, const vtkm::Id& downCandidate) const { vtkm::Id isSupernode = ((upCandidate != 1) || (downCandidate != 1)); return isSupernode; } }; // FillSupernodes - } } } diff --git a/vtkm/worklet/contourtree/FindLeaves.h b/vtkm/worklet/contourtree/FindLeaves.h index c992b73fc..3665e61b5 100644 --- a/vtkm/worklet/contourtree/FindLeaves.h +++ b/vtkm/worklet/contourtree/FindLeaves.h @@ -71,35 +71,35 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to candidate class FindLeaves : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn superID, // (input) super nodes - WholeArrayIn updegree, // (input) - WholeArrayIn downdegree, // (input) - WholeArrayIn joinArc, // (input) - WholeArrayIn splitArc, // (input) - WholeArrayInOut superarc); // (i/o) + typedef void ControlSignature(FieldIn superID, // (input) super nodes + WholeArrayIn updegree, // (input) + WholeArrayIn downdegree, // (input) + WholeArrayIn joinArc, // (input) + WholeArrayIn splitArc, // (input) + WholeArrayInOut superarc); // (i/o) typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT FindLeaves() {} template - VTKM_EXEC - void operator()(const vtkm::Id& superID, - const InPortalFieldType& updegree, - const InPortalFieldType& downdegree, - const InPortalFieldType& joinArc, - const InPortalFieldType& splitArc, - const OutPortalFieldType& superarc) const + VTKM_EXEC void operator()(const vtkm::Id& superID, const InPortalFieldType& updegree, + const InPortalFieldType& downdegree, const InPortalFieldType& joinArc, + const InPortalFieldType& splitArc, + const OutPortalFieldType& superarc) const { // omit previously processed vertices if (superarc.Get(superID) != NO_VERTEX_ASSIGNED) @@ -116,7 +116,6 @@ public: } // minimum } }; // FindLeaves - } } } diff --git a/vtkm/worklet/contourtree/GoverningSaddleFinder.h b/vtkm/worklet/contourtree/GoverningSaddleFinder.h index a67782d95..72ad9e23c 100644 --- a/vtkm/worklet/contourtree/GoverningSaddleFinder.h +++ b/vtkm/worklet/contourtree/GoverningSaddleFinder.h @@ -20,48 +20,48 @@ // Copyright (c) 2016, Los Alamos National Security, LLC // All rights reserved. // -// Copyright 2016. Los Alamos National Security, LLC. -// This software was produced under U.S. Government contract DE-AC52-06NA25396 -// for Los Alamos National Laboratory (LANL), which is operated by -// Los Alamos National Security, LLC for the U.S. Department of Energy. -// The U.S. Government has rights to use, reproduce, and distribute this -// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC -// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE -// USE OF THIS SOFTWARE. If software is modified to produce derivative works, -// such modified software should be clearly marked, so as not to confuse it +// Copyright 2016. Los Alamos National Security, LLC. +// This software was produced under U.S. Government contract DE-AC52-06NA25396 +// for Los Alamos National Laboratory (LANL), which is operated by +// Los Alamos National Security, LLC for the U.S. Department of Energy. +// The U.S. Government has rights to use, reproduce, and distribute this +// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC +// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE +// USE OF THIS SOFTWARE. If software is modified to produce derivative works, +// such modified software should be clearly marked, so as not to confuse it // with the version available from LANL. // -// Additionally, redistribution and use in source and binary forms, with or -// without modification, are permitted provided that the following conditions +// Additionally, redistribution and use in source and binary forms, with or +// without modification, are permitted provided that the following conditions // are met: // -// 1. Redistributions of source code must retain the above copyright notice, +// 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. -// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos -// National Laboratory, LANL, the U.S. Government, nor the names of its -// contributors may be used to endorse or promote products derived from +// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos +// National Laboratory, LANL, the U.S. Government, nor the names of its +// contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND -// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS -// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS +// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //============================================================================ -// This code is based on the algorithm presented in the paper: -// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” -// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. -// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization +// This code is based on the algorithm presented in the paper: +// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” +// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. +// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization // (LDAV), October 2016, Baltimore, Maryland. //======================================================================================= @@ -86,52 +86,53 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value class GoverningSaddleFinder : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn edgeNo, // (input) index into sorted edges - WholeArrayIn edgeSorter, // (input) sorted edge index - WholeArrayIn edgeFar, // (input) high ends of edges - WholeArrayIn edgeNear, // (input) low ends of edges - WholeArrayOut prunesTo, // (output) where vertex is pruned to - WholeArrayOut outdegree); // (output) updegree of vertex + typedef void ControlSignature( + FieldIn edgeNo, // (input) index into sorted edges + WholeArrayIn edgeSorter, // (input) sorted edge index + WholeArrayIn edgeFar, // (input) high ends of edges + WholeArrayIn edgeNear, // (input) low ends of edges + WholeArrayOut prunesTo, // (output) where vertex is pruned to + WholeArrayOut outdegree); // (output) updegree of vertex typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT GoverningSaddleFinder() {} template - VTKM_EXEC - void operator()(const vtkm::Id &edgeNo, - const InFieldPortalType &edgeSorter, - const InFieldPortalType &edgeFar, - const InFieldPortalType &edgeNear, - const OutFieldPortalType &prunesTo, - const OutFieldPortalType &outdegree) const + VTKM_EXEC void operator()(const vtkm::Id& edgeNo, const InFieldPortalType& edgeSorter, + const InFieldPortalType& edgeFar, const InFieldPortalType& edgeNear, + const OutFieldPortalType& prunesTo, + const OutFieldPortalType& outdegree) const { - // default to true + // default to true bool isBestSaddleEdge = true; // retrieve the edge ID vtkm::Id edge = edgeSorter.Get(edgeNo); - + // edge no. 0 is always best, so skip it if (edgeNo != 0) { // retrieve the previous edge - vtkm::Id prevEdge = edgeSorter.Get(edgeNo-1); + vtkm::Id prevEdge = edgeSorter.Get(edgeNo - 1); // if the previous edge has the same far end if (edgeFar.Get(prevEdge) == edgeFar.Get(edge)) isBestSaddleEdge = false; } - + if (isBestSaddleEdge) { // found an extremum // retrieve the near end as the saddle @@ -141,14 +142,13 @@ public: // set the extremum to point to the saddle in the chainExtremum array prunesTo.Set(extreme, saddle); - + // and set the outdegree to 0 - outdegree.Set(extreme, 0); + outdegree.Set(extreme, 0); } // found a extremum - } // operator() + } // operator() }; // GoverningSaddleFinder - } } } diff --git a/vtkm/worklet/contourtree/JoinArcConnector.h b/vtkm/worklet/contourtree/JoinArcConnector.h index ffa999b19..90b182dd2 100644 --- a/vtkm/worklet/contourtree/JoinArcConnector.h +++ b/vtkm/worklet/contourtree/JoinArcConnector.h @@ -86,40 +86,44 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value class JoinArcConnector : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn vertex, // (input) index into sorted edges + typedef void ControlSignature(FieldIn vertex, // (input) index into sorted edges WholeArrayIn vertexSorter, // (input) sorting indices WholeArrayIn extrema, // (input) maxima WholeArrayIn saddles, // (input) saddles WholeArrayOut mergeArcs); // (output) target for write back typedef void ExecutionSignature(_1, _2, _3, _4, _5); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT JoinArcConnector() {} template - VTKM_EXEC - void operator()(const vtkm::Id& vertex, - const InFieldPortalType& vertexSorter, - const InFieldPortalType& extrema, - const InFieldPortalType& saddles, - const OutFieldPortalType& mergeArcs) const + VTKM_EXEC void operator()(const vtkm::Id& vertex, const InFieldPortalType& vertexSorter, + const InFieldPortalType& extrema, const InFieldPortalType& saddles, + const OutFieldPortalType& mergeArcs) const { // work out whether we have the low element on the join arc bool joinToSaddle = false; - if (vertex == 0) { + if (vertex == 0) + { joinToSaddle = true; - } else { - joinToSaddle = (extrema.Get(vertexSorter.Get(vertex)) != extrema.Get(vertexSorter.Get(vertex-1))); + } + else + { + joinToSaddle = + (extrema.Get(vertexSorter.Get(vertex)) != extrema.Get(vertexSorter.Get(vertex - 1))); } // now set the join arcs for everybody @@ -129,7 +133,6 @@ public: mergeArcs.Set(vertexSorter.Get(vertex), vertexSorter.Get(vertex - 1)); } }; // JoinArcConnector - } } } diff --git a/vtkm/worklet/contourtree/JoinSuperArcFinder.h b/vtkm/worklet/contourtree/JoinSuperArcFinder.h index 16808373d..f50436372 100644 --- a/vtkm/worklet/contourtree/JoinSuperArcFinder.h +++ b/vtkm/worklet/contourtree/JoinSuperArcFinder.h @@ -92,9 +92,12 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for finding join superarc - expressed as a unary functor since it is not // guaranteed to write back @@ -107,27 +110,30 @@ template class JoinSuperArcFinder : public vtkm::worklet::WorkletMapField { public: - struct TagType : vtkm::ListTagBase {}; + struct TagType : vtkm::ListTagBase + { + }; typedef void ControlSignature(FieldIn vertex, // (input) index into sorted edges WholeArrayIn values, // (input) data values WholeArrayInOut saddles, // (in out) saddles WholeArrayInOut extrema); // (in out) maxima typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + typedef _1 InputDomain; bool isJoinTree; // Constructor VTKM_EXEC_CONT - JoinSuperArcFinder(bool IsJoinTree) : isJoinTree(IsJoinTree) {} + JoinSuperArcFinder(bool IsJoinTree) + : isJoinTree(IsJoinTree) + { + } template - VTKM_EXEC - void operator()(const vtkm::Id& vertex, - const InFieldPortalType& values, - const OutFieldPortalType& saddles, - const OutFieldPortalType& extrema) const + VTKM_EXEC void operator()(const vtkm::Id& vertex, const InFieldPortalType& values, + const OutFieldPortalType& saddles, + const OutFieldPortalType& extrema) const { VertexValueComparator lessThan(values); @@ -147,14 +153,13 @@ public: // if we're in the trunk, break immediately if (saddle == NO_VERTEX_ASSIGNED) break; - } // saddle above vertex + } // saddle above vertex - // when done, write back to the array - extrema.Set(vertex, extreme); - saddles.Set(vertex, saddle); + // when done, write back to the array + extrema.Set(vertex, extreme); + saddles.Set(vertex, saddle); } }; // JoinSuperArcFinder - } } } diff --git a/vtkm/worklet/contourtree/JoinTreeTransferrer.h b/vtkm/worklet/contourtree/JoinTreeTransferrer.h index 2f7607861..d9450d2e2 100644 --- a/vtkm/worklet/contourtree/JoinTreeTransferrer.h +++ b/vtkm/worklet/contourtree/JoinTreeTransferrer.h @@ -88,35 +88,37 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value class JoinTreeTransferrer : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn vertex, // (input) index into active vertices - FieldIn prunesTo, // (input) where vertex is pruned to - WholeArrayIn valueIndex, // (input) indices into main array - WholeArrayIn chainExtemum, // (input) chain extemum for vertices - WholeArrayOut saddles, // (output) saddle array for writing - WholeArrayOut arcArray); // (output) arc / max array for writing + typedef void ControlSignature( + FieldIn vertex, // (input) index into active vertices + FieldIn prunesTo, // (input) where vertex is pruned to + WholeArrayIn valueIndex, // (input) indices into main array + WholeArrayIn chainExtemum, // (input) chain extemum for vertices + WholeArrayOut saddles, // (output) saddle array for writing + WholeArrayOut arcArray); // (output) arc / max array for writing typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT JoinTreeTransferrer() {} template - VTKM_EXEC - void operator()(const vtkm::Id& vertex, - const vtkm::Id& prunesTo, - const InFieldPortalType& valueIndex, - const InFieldPortalType& chainExtremum, - const OutFieldPortalType& saddles, - const OutFieldPortalType& arcArray) const + VTKM_EXEC void operator()(const vtkm::Id& vertex, const vtkm::Id& prunesTo, + const InFieldPortalType& valueIndex, + const InFieldPortalType& chainExtremum, + const OutFieldPortalType& saddles, + const OutFieldPortalType& arcArray) const { // convert vertex & prunesTo to indices in original data // and write to saddle array @@ -126,9 +128,8 @@ public: saddles.Set(valueIndex.Get(vertex), valueIndex.Get(prunesTo)); // and in either event, we need to transfer the chain maximum arcArray.Set(valueIndex.Get(vertex), valueIndex.Get(chainExtremum.Get(vertex))); - } + } }; // JoinTreeTransferrer - } } } diff --git a/vtkm/worklet/contourtree/LinkComponentCaseTable2D.h b/vtkm/worklet/contourtree/LinkComponentCaseTable2D.h index 51dc02fda..3bc7b0a34 100644 --- a/vtkm/worklet/contourtree/LinkComponentCaseTable2D.h +++ b/vtkm/worklet/contourtree/LinkComponentCaseTable2D.h @@ -70,25 +70,21 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ -const vtkm::IdComponent neighbourOffsets3D[N_INCIDENT_EDGES * 2] = { - 0, 1, - 1, 1, - 1, 0, - 0, -1, - -1, -1, - -1, 0 -}; - -const vtkm::UInt8 linkComponentCaseTable[64] = { - 0, 1, 2, 2, 4, 5, 4, 4, 8, 9, 10, 10, 8, 9, 8, 8, 16, 17, 18, 18, 20, 21, 20, 20, 16, - 17, 18, 18, 16, 17, 16, 16, 32, 32, 34, 32, 36, 36, 36, 32, 40, 40, 42, 40, 40, 40, 40, 32, 32, 32, - 34, 32, 36, 36, 36, 32, 32, 32, 34, 32, 32, 32, 32, 32 -}; +const vtkm::IdComponent neighbourOffsets3D[N_INCIDENT_EDGES * 2] = { 0, 1, 1, 1, 1, 0, + 0, -1, -1, -1, -1, 0 }; +const vtkm::UInt8 linkComponentCaseTable[64] = { 0, 1, 2, 2, 4, 5, 4, 4, 8, 9, 10, 10, 8, + 9, 8, 8, 16, 17, 18, 18, 20, 21, 20, 20, 16, 17, + 18, 18, 16, 17, 16, 16, 32, 32, 34, 32, 36, 36, 36, + 32, 40, 40, 42, 40, 40, 40, 40, 32, 32, 32, 34, 32, + 36, 36, 36, 32, 32, 32, 34, 32, 32, 32, 32, 32 }; } } } diff --git a/vtkm/worklet/contourtree/LinkComponentCaseTable3D.h b/vtkm/worklet/contourtree/LinkComponentCaseTable3D.h index 9923c5da5..7a4e4bed7 100644 --- a/vtkm/worklet/contourtree/LinkComponentCaseTable3D.h +++ b/vtkm/worklet/contourtree/LinkComponentCaseTable3D.h @@ -70,686 +70,1044 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ -const vtkm::IdComponent neighbourOffsets3D[42] = { - -1, -1, -1, - 0, -1, 0, - -1, -1, 0, - -1, 0, 0, - -1, 0, -1, - 0, 0, -1, - 0, -1, -1, - 0, 0, 1, - 0, 1, 0, - 0, 1, 1, - 1, 0, 0, - 1, 0, 1, - 1, 1, 0, - 1, 1, 1 -}; +const vtkm::IdComponent neighbourOffsets3D[42] = { -1, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, + 0, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, + 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, + 1, 0, 1, 1, 1, 0, 1, 1, 1 }; const vtkm::UInt16 linkComponentCaseTable3D[16384] = { - 0, 1, 2, 2, 4, 4, 4, 4, 8, 8, 10, 8, 8, 8, 8, 8, 16, 16, 18, 16, 20, 16, 20, 16, 16, - 16, 18, 16, 16, 16, 16, 16, 32, 32, 34, 32, 36, 32, 36, 32, 40, 32, 42, 32, 40, 32, 40, 32, 32, 32, - 34, 32, 36, 32, 36, 32, 32, 32, 34, 32, 32, 32, 32, 32, 64, 64, 64, 64, 68, 64, 64, 64, 72, 64, 72, - 64, 72, 64, 64, 64, 80, 64, 80, 64, 84, 64, 80, 64, 80, 64, 80, 64, 80, 64, 64, 64, 64, 64, 64, 64, - 68, 64, 64, 64, 72, 64, 72, 64, 72, 64, 64, 64, 64, 64, 64, 64, 68, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 128, 129, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 144, 144, 144, 128, 144, 128, - 144, 128, 128, 128, 128, 128, 128, 128, 128, 128, 160, 160, 160, 128, 160, 128, 160, 128, 160, 128, 160, 128, 160, 128, 160, - 128, 160, 160, 160, 128, 160, 128, 160, 128, 128, 128, 128, 128, 128, 128, 128, 128, 192, 192, 128, 128, 192, 128, 128, 128, - 192, 128, 128, 128, 192, 128, 128, 128, 208, 192, 144, 128, 208, 128, 144, 128, 192, 128, 128, 128, 192, 128, 128, 128, 192, - 192, 128, 128, 192, 128, 128, 128, 192, 128, 128, 128, 192, 128, 128, 128, 192, 192, 128, 128, 192, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 256, 257, 258, 258, 260, 260, 260, 260, 256, 256, 258, 256, 256, 256, 256, 256, 256, 256, 258, - 256, 260, 256, 260, 256, 256, 256, 258, 256, 256, 256, 256, 256, 256, 256, 258, 256, 260, 256, 260, 256, 256, 256, 258, 256, - 256, 256, 256, 256, 256, 256, 258, 256, 260, 256, 260, 256, 256, 256, 258, 256, 256, 256, 256, 256, 320, 320, 320, 320, 324, - 320, 320, 320, 320, 256, 320, 256, 320, 256, 256, 256, 320, 256, 320, 256, 324, 256, 320, 256, 320, 256, 320, 256, 320, 256, - 256, 256, 256, 256, 256, 256, 260, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 260, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, 256, 384, 385, 384, 384, 384, 384, 384, 384, 256, 256, 256, 256, 256, 256, 256, 256, - 384, 384, 384, 256, 384, 256, 384, 256, 256, 256, 256, 256, 256, 256, 256, 256, 384, 384, 384, 256, 384, 256, 384, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 384, 384, 384, 256, 384, 256, 384, 256, 256, 256, 256, 256, 256, 256, 256, 256, 448, 448, - 384, 384, 448, 384, 384, 384, 320, 256, 256, 256, 320, 256, 256, 256, 448, 384, 384, 256, 448, 256, 384, 256, 320, 256, 256, - 256, 320, 256, 256, 256, 384, 384, 256, 256, 384, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 384, 384, 256, 256, - 384, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 512, 513, 514, 514, 516, 516, 516, 516, 512, 512, 514, 512, 512, - 512, 512, 512, 528, 528, 530, 528, 532, 528, 532, 528, 512, 512, 514, 512, 512, 512, 512, 512, 544, 544, 546, 544, 548, 544, - 548, 544, 544, 512, 546, 512, 544, 512, 544, 512, 544, 544, 546, 544, 548, 544, 548, 544, 512, 512, 514, 512, 512, 512, 512, - 512, 576, 576, 576, 576, 580, 576, 576, 576, 576, 512, 576, 512, 576, 512, 512, 512, 592, 576, 592, 576, 596, 576, 592, 576, - 576, 512, 576, 512, 576, 512, 512, 512, 576, 576, 576, 576, 580, 576, 576, 576, 576, 512, 576, 512, 576, 512, 512, 512, 576, - 576, 576, 576, 580, 576, 576, 576, 512, 512, 512, 512, 512, 512, 512, 512, 512, 513, 512, 512, 512, 512, 512, 512, 512, 512, - 512, 512, 512, 512, 512, 512, 528, 528, 528, 512, 528, 512, 528, 512, 512, 512, 512, 512, 512, 512, 512, 512, 544, 544, 544, - 512, 544, 512, 544, 512, 544, 512, 544, 512, 544, 512, 544, 512, 544, 544, 544, 512, 544, 512, 544, 512, 512, 512, 512, 512, - 512, 512, 512, 512, 576, 576, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, 592, 576, 528, 512, 592, - 512, 528, 512, 576, 512, 512, 512, 576, 512, 512, 512, 576, 576, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, 576, 512, - 512, 512, 576, 576, 512, 512, 576, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 513, 514, 514, 516, 516, 516, - 516, 512, 512, 514, 512, 512, 512, 512, 512, 512, 512, 514, 512, 516, 512, 516, 512, 512, 512, 514, 512, 512, 512, 512, 512, - 512, 512, 514, 512, 516, 512, 516, 512, 512, 512, 514, 512, 512, 512, 512, 512, 512, 512, 514, 512, 516, 512, 516, 512, 512, - 512, 514, 512, 512, 512, 512, 512, 576, 576, 576, 576, 580, 576, 576, 576, 576, 512, 576, 512, 576, 512, 512, 512, 576, 512, - 576, 512, 580, 512, 576, 512, 576, 512, 576, 512, 576, 512, 512, 512, 512, 512, 512, 512, 516, 512, 512, 512, 512, 512, 512, - 512, 512, 512, 512, 512, 512, 512, 512, 512, 516, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 513, 512, 512, - 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, - 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, - 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 576, 576, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, 576, 512, 512, - 512, 576, 512, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, - 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 1024, - 1025, 1024, 1024, 1028, 1028, 1024, 1024, 1032, 1032, 1032, 1024, 1032, 1032, 1024, 1024, 1040, 1040, 1040, 1024, 1044, 1040, 1040, 1024, 1040, 1040, - 1040, 1024, 1040, 1040, 1024, 1024, 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1032, 1024, 1032, 1024, 1032, 1024, 1024, 1024, 1024, 1024, 1024, - 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1032, 1024, 1032, 1024, - 1032, 1024, 1024, 1024, 1040, 1024, 1040, 1024, 1044, 1024, 1040, 1024, 1040, 1024, 1040, 1024, 1040, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1028, - 1024, 1024, 1024, 1032, 1024, 1032, 1024, 1032, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, - 1024, 1024, 1152, 1153, 1024, 1024, 1152, 1152, 1024, 1024, 1152, 1152, 1024, 1024, 1152, 1152, 1024, 1024, 1168, 1168, 1040, 1024, 1168, 1152, 1040, - 1024, 1152, 1152, 1024, 1024, 1152, 1152, 1024, 1024, 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1152, 1024, 1024, 1024, 1152, 1024, 1024, 1024, - 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1152, - 1024, 1024, 1024, 1152, 1024, 1024, 1024, 1168, 1152, 1040, 1024, 1168, 1024, 1040, 1024, 1152, 1024, 1024, 1024, 1152, 1024, 1024, 1024, 1152, 1152, - 1024, 1024, 1152, 1024, 1024, 1024, 1152, 1024, 1024, 1024, 1152, 1024, 1024, 1024, 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1024, 1024, 1024, - 1024, 1024, 1024, 1024, 1024, 1280, 1281, 1280, 1280, 1284, 1284, 1280, 1280, 1280, 1280, 1280, 1024, 1280, 1280, 1024, 1024, 1280, 1280, 1280, 1024, - 1284, 1280, 1280, 1024, 1280, 1280, 1280, 1024, 1280, 1280, 1024, 1024, 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, - 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1280, 1280, 1280, 1280, 1284, 1280, - 1280, 1280, 1280, 1024, 1280, 1024, 1280, 1024, 1024, 1024, 1280, 1024, 1280, 1024, 1284, 1024, 1280, 1024, 1280, 1024, 1280, 1024, 1280, 1024, 1024, - 1024, 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, - 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1408, 1409, 1280, 1280, 1408, 1408, 1280, 1280, 1280, 1280, 1024, 1024, 1280, 1280, 1024, 1024, 1408, - 1408, 1280, 1024, 1408, 1280, 1280, 1024, 1280, 1280, 1024, 1024, 1280, 1280, 1024, 1024, 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1024, 1024, - 1024, 1024, 1024, 1024, 1024, 1024, 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1408, 1408, 1280, - 1280, 1408, 1280, 1280, 1280, 1280, 1024, 1024, 1024, 1280, 1024, 1024, 1024, 1408, 1152, 1280, 1024, 1408, 1024, 1280, 1024, 1280, 1024, 1024, 1024, - 1280, 1024, 1024, 1024, 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1152, 1152, 1024, 1024, 1152, - 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1536, 1537, 1536, 1536, 1540, 1540, 1536, 1536, 1536, 1536, 1536, 1024, 1536, 1536, - 1024, 1024, 1552, 1552, 1552, 1536, 1556, 1552, 1552, 1536, 1536, 1536, 1536, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1536, 1536, 1540, 1536, 1536, - 1536, 1536, 1024, 1536, 1024, 1536, 1024, 1024, 1024, 1536, 1536, 1536, 1536, 1540, 1536, 1536, 1536, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, - 1536, 1536, 1536, 1536, 1540, 1536, 1536, 1536, 1536, 1024, 1536, 1024, 1536, 1024, 1024, 1024, 1552, 1536, 1552, 1536, 1556, 1536, 1552, 1536, 1536, - 1024, 1536, 1024, 1536, 1024, 1024, 1024, 1536, 1536, 1536, 1536, 1540, 1536, 1536, 1536, 1536, 1024, 1536, 1024, 1536, 1024, 1024, 1024, 1536, 1536, - 1536, 1536, 1540, 1536, 1536, 1536, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1536, 1537, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, - 1024, 1536, 1536, 1024, 1024, 1552, 1552, 1040, 1024, 1552, 1536, 1040, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, - 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, - 1024, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1552, 1536, 1040, 1024, 1552, 1024, - 1040, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, - 1024, 1536, 1536, 1024, 1024, 1536, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1536, 1537, 1536, 1536, 1540, 1540, 1536, 1536, - 1536, 1536, 1536, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1536, 1024, 1540, 1536, 1536, 1024, 1536, 1536, 1536, 1024, 1536, 1536, 1024, 1024, 1024, - 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, - 1024, 1024, 1024, 1024, 1024, 1024, 1536, 1536, 1536, 1536, 1540, 1536, 1536, 1536, 1536, 1024, 1536, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1536, - 1024, 1540, 1024, 1536, 1024, 1536, 1024, 1536, 1024, 1536, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, - 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1536, 1537, 1024, 1024, 1536, - 1536, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, - 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, - 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, - 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, - 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 2048, 2049, - 2048, 2048, 2052, 2052, 2048, 2048, 2056, 2056, 2056, 2048, 2056, 2056, 2048, 2048, 2064, 2064, 2064, 2048, 2068, 2064, 2064, 2048, 2064, 2064, 2064, - 2048, 2064, 2064, 2048, 2048, 2080, 2080, 2080, 2048, 2084, 2080, 2080, 2048, 2088, 2080, 2088, 2048, 2088, 2080, 2080, 2048, 2080, 2080, 2080, 2048, - 2084, 2080, 2080, 2048, 2080, 2080, 2080, 2048, 2080, 2080, 2048, 2048, 2112, 2112, 2048, 2048, 2116, 2112, 2048, 2048, 2120, 2112, 2056, 2048, 2120, - 2112, 2048, 2048, 2128, 2112, 2064, 2048, 2132, 2112, 2064, 2048, 2128, 2112, 2064, 2048, 2128, 2112, 2048, 2048, 2112, 2112, 2048, 2048, 2116, 2112, - 2048, 2048, 2120, 2112, 2056, 2048, 2120, 2112, 2048, 2048, 2112, 2112, 2048, 2048, 2116, 2112, 2048, 2048, 2112, 2112, 2048, 2048, 2112, 2112, 2048, - 2048, 2048, 2049, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2064, 2064, 2064, 2048, 2064, 2048, 2064, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2080, 2080, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, - 2080, 2080, 2048, 2080, 2048, 2080, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, - 2048, 2048, 2112, 2048, 2048, 2048, 2128, 2112, 2064, 2048, 2128, 2048, 2064, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2112, 2048, - 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2304, 2305, 2304, 2304, 2308, 2308, 2304, 2304, 2304, 2304, 2304, 2048, 2304, 2304, 2048, 2048, 2304, 2304, 2304, 2048, 2308, - 2304, 2304, 2048, 2304, 2304, 2304, 2048, 2304, 2304, 2048, 2048, 2304, 2304, 2304, 2048, 2308, 2304, 2304, 2048, 2304, 2304, 2304, 2048, 2304, 2304, - 2048, 2048, 2304, 2304, 2304, 2048, 2308, 2304, 2304, 2048, 2304, 2304, 2304, 2048, 2304, 2304, 2048, 2048, 2368, 2368, 2304, 2304, 2372, 2368, 2304, - 2304, 2368, 2304, 2304, 2048, 2368, 2304, 2048, 2048, 2368, 2304, 2304, 2048, 2372, 2304, 2304, 2048, 2368, 2304, 2304, 2048, 2368, 2304, 2048, 2048, - 2304, 2304, 2048, 2048, 2308, 2304, 2048, 2048, 2304, 2304, 2048, 2048, 2304, 2304, 2048, 2048, 2304, 2304, 2048, 2048, 2308, 2304, 2048, 2048, 2304, - 2304, 2048, 2048, 2304, 2304, 2048, 2048, 2304, 2305, 2304, 2304, 2304, 2304, 2304, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2304, 2304, - 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2304, 2304, 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2304, 2304, 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2368, 2368, 2304, 2304, - 2368, 2304, 2304, 2304, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2368, 2304, 2304, 2048, 2368, 2048, 2304, 2048, 2112, 2048, 2048, 2048, 2112, - 2048, 2048, 2048, 2304, 2304, 2048, 2048, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2304, 2304, 2048, 2048, 2304, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2560, 2561, 2560, 2560, 2564, 2564, 2560, 2560, 2560, 2560, 2560, 2048, 2560, 2560, 2048, - 2048, 2576, 2576, 2576, 2560, 2580, 2576, 2576, 2560, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, 2592, 2592, 2592, 2560, 2596, 2592, 2592, 2560, - 2592, 2560, 2592, 2048, 2592, 2560, 2080, 2048, 2592, 2592, 2592, 2560, 2596, 2592, 2592, 2560, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, 2624, - 2624, 2560, 2560, 2628, 2624, 2560, 2560, 2624, 2560, 2560, 2048, 2624, 2560, 2048, 2048, 2640, 2624, 2576, 2560, 2644, 2624, 2576, 2560, 2624, 2560, - 2560, 2048, 2624, 2560, 2048, 2048, 2624, 2624, 2560, 2560, 2628, 2624, 2560, 2560, 2624, 2560, 2560, 2048, 2624, 2560, 2048, 2048, 2624, 2624, 2560, - 2560, 2628, 2624, 2560, 2560, 2560, 2560, 2048, 2048, 2560, 2560, 2048, 2048, 2048, 2049, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2064, 2064, 2064, 2048, 2064, 2048, 2064, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2080, 2080, 2080, 2048, 2080, - 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2080, 2080, 2048, 2080, 2048, 2080, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2128, 2112, 2064, 2048, 2128, 2048, 2064, - 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, - 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2560, 2561, 2560, 2560, 2564, 2564, 2560, 2560, 2560, - 2560, 2560, 2048, 2560, 2560, 2048, 2048, 2560, 2560, 2560, 2048, 2564, 2560, 2560, 2048, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, 2560, 2560, - 2560, 2048, 2564, 2560, 2560, 2048, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, 2560, 2560, 2560, 2048, 2564, 2560, 2560, 2048, 2560, 2560, 2560, - 2048, 2560, 2560, 2048, 2048, 2624, 2624, 2560, 2560, 2628, 2624, 2560, 2560, 2624, 2560, 2560, 2048, 2624, 2560, 2048, 2048, 2624, 2560, 2560, 2048, - 2628, 2560, 2560, 2048, 2624, 2560, 2560, 2048, 2624, 2560, 2048, 2048, 2560, 2560, 2048, 2048, 2564, 2560, 2048, 2048, 2560, 2560, 2048, 2048, 2560, - 2560, 2048, 2048, 2560, 2560, 2048, 2048, 2564, 2560, 2048, 2048, 2560, 2560, 2048, 2048, 2560, 2560, 2048, 2048, 2048, 2049, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, - 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2049, 2048, - 2048, 2052, 2052, 2048, 2048, 2056, 2056, 2056, 2048, 2056, 2056, 2048, 2048, 2064, 2064, 2064, 2048, 2068, 2064, 2064, 2048, 2064, 2064, 2064, 2048, - 2064, 2064, 2048, 2048, 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2056, 2048, 2056, 2048, 2056, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2052, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2056, 2048, 2056, 2048, 2056, 2048, - 2048, 2048, 2064, 2048, 2064, 2048, 2068, 2048, 2064, 2048, 2064, 2048, 2064, 2048, 2064, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2052, 2048, 2048, - 2048, 2056, 2048, 2056, 2048, 2056, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2049, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2064, 2064, 2064, 2048, 2064, 2048, 2064, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2064, 2048, 2064, 2048, 2064, 2048, 2064, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2304, 2305, 2304, 2304, 2308, 2308, 2304, 2304, 2304, 2304, 2304, 2048, 2304, 2304, 2048, 2048, 2304, 2304, 2304, 2048, 2308, 2304, - 2304, 2048, 2304, 2304, 2304, 2048, 2304, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2304, 2304, 2304, 2304, 2308, 2304, 2304, 2304, - 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, 2304, 2048, 2304, 2048, 2308, 2048, 2304, 2048, 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2304, 2305, 2304, 2304, 2304, 2304, 2304, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2304, 2304, 2304, - 2048, 2304, 2048, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2304, 2304, 2304, 2304, 2304, - 2304, 2304, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2304, 2048, 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2560, 2561, 2560, 2560, 2564, 2564, 2560, 2560, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, - 2576, 2576, 2576, 2560, 2580, 2576, 2576, 2560, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, 2560, 2560, 2560, 2560, 2564, 2560, 2560, 2560, 2560, - 2048, 2560, 2048, 2560, 2048, 2048, 2048, 2560, 2560, 2560, 2560, 2564, 2560, 2560, 2560, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2560, 2560, - 2560, 2560, 2564, 2560, 2560, 2560, 2560, 2048, 2560, 2048, 2560, 2048, 2048, 2048, 2576, 2560, 2576, 2560, 2580, 2560, 2576, 2560, 2560, 2048, 2560, - 2048, 2560, 2048, 2048, 2048, 2560, 2560, 2560, 2560, 2564, 2560, 2560, 2560, 2560, 2048, 2560, 2048, 2560, 2048, 2048, 2048, 2560, 2560, 2560, 2560, - 2564, 2560, 2560, 2560, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2049, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2064, 2064, 2064, 2048, 2064, 2048, 2064, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2064, 2048, 2064, 2048, 2064, 2048, 2064, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2560, 2561, 2560, 2560, 2564, 2564, 2560, 2560, 2560, 2560, - 2560, 2048, 2560, 2560, 2048, 2048, 2560, 2560, 2560, 2048, 2564, 2560, 2560, 2048, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, 2048, 2048, 2048, - 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2560, 2560, 2560, 2560, 2564, 2560, 2560, 2560, 2560, 2048, 2560, 2048, 2560, 2048, 2048, 2048, 2560, 2048, 2560, 2048, 2564, - 2048, 2560, 2048, 2560, 2048, 2560, 2048, 2560, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2049, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 4096, 4097, 4098, 4098, - 4100, 4100, 4100, 4100, 4104, 4104, 4106, 4104, 4104, 4104, 4104, 4104, 4112, 4112, 4114, 4112, 4116, 4112, 4116, 4112, 4112, 4112, 4114, 4112, 4112, - 4112, 4112, 4112, 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4104, 4096, 4106, 4096, 4104, 4096, 4104, 4096, 4096, 4096, 4098, 4096, 4100, 4096, - 4100, 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, 4160, 4160, 4160, 4160, 4164, 4160, 4160, 4160, 4168, 4160, 4168, 4160, 4168, 4160, 4160, - 4160, 4176, 4160, 4176, 4160, 4180, 4160, 4176, 4160, 4176, 4160, 4176, 4160, 4176, 4160, 4160, 4160, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, - 4104, 4096, 4104, 4096, 4104, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4224, - 4225, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4240, 4240, 4240, 4224, 4240, 4224, 4240, 4224, 4224, 4224, - 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4096, 4224, 4096, 4224, 4096, 4224, 4096, 4224, 4096, 4224, 4096, 4224, 4096, 4224, 4224, 4224, - 4096, 4224, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4288, 4288, 4224, 4224, 4288, 4224, 4224, 4224, 4288, 4224, 4224, 4224, - 4288, 4224, 4224, 4224, 4304, 4288, 4240, 4224, 4304, 4224, 4240, 4224, 4288, 4224, 4224, 4224, 4288, 4224, 4224, 4224, 4224, 4224, 4096, 4096, 4224, - 4096, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4097, 4098, 4098, 4100, 4100, 4100, 4100, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4098, 4096, 4100, 4096, 4100, - 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, 4160, 4160, 4160, 4160, 4164, 4160, 4160, 4160, 4160, - 4096, 4160, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4160, 4096, 4164, 4096, 4160, 4096, 4160, 4096, 4160, 4096, 4160, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4224, 4225, 4224, 4224, 4224, 4224, 4224, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4224, 4224, 4224, 4096, - 4224, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4224, 4224, 4224, 4096, 4224, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4224, 4224, 4224, 4096, 4224, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4288, 4288, 4224, 4224, 4288, 4224, - 4224, 4224, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4288, 4224, 4224, 4096, 4288, 4096, 4224, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, - 4096, 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4608, 4609, 4610, 4610, 4612, 4612, 4612, 4612, 4608, 4608, 4610, 4608, 4608, 4608, 4608, 4608, 4624, - 4624, 4626, 4624, 4628, 4624, 4628, 4624, 4608, 4608, 4610, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4610, 4608, 4612, 4608, 4612, 4608, 4608, 4096, - 4610, 4096, 4608, 4096, 4608, 4096, 4608, 4608, 4610, 4608, 4612, 4608, 4612, 4608, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, 4672, 4672, 4672, - 4672, 4676, 4672, 4672, 4672, 4672, 4608, 4672, 4608, 4672, 4608, 4608, 4608, 4688, 4672, 4688, 4672, 4692, 4672, 4688, 4672, 4672, 4608, 4672, 4608, - 4672, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, 4608, 4608, 4608, 4608, 4612, - 4608, 4608, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4608, 4609, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, - 4608, 4608, 4624, 4624, 4624, 4608, 4624, 4608, 4624, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, - 4096, 4608, 4096, 4608, 4096, 4608, 4096, 4608, 4096, 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4672, 4672, 4608, 4608, 4672, 4608, 4608, 4608, 4672, 4608, 4608, 4608, 4672, 4608, 4608, 4608, 4688, 4672, 4624, 4608, 4688, 4608, 4624, 4608, 4672, - 4608, 4608, 4608, 4672, 4608, 4608, 4608, 4608, 4608, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4608, - 4096, 4096, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4097, 4098, 4098, 4100, 4100, 4100, 4100, 4096, 4096, 4098, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4098, 4096, - 4100, 4096, 4100, 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4096, 4096, 4098, 4096, 4096, - 4096, 4096, 4096, 4160, 4160, 4160, 4160, 4164, 4160, 4160, 4160, 4160, 4096, 4160, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4160, 4096, 4164, 4096, - 4160, 4096, 4160, 4096, 4160, 4096, 4160, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4160, 4160, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, - 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4097, 4096, 4096, 4100, - 4100, 4096, 4096, 4104, 4104, 4104, 4096, 4104, 4104, 4096, 4096, 4112, 4112, 4112, 4096, 4116, 4112, 4112, 4096, 4112, 4112, 4112, 4096, 4112, 4112, - 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, 4096, 4104, 4096, 4104, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, 4096, 4104, 4096, 4104, 4096, 4096, 4096, - 4112, 4096, 4112, 4096, 4116, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, - 4096, 4104, 4096, 4104, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4224, 4225, - 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4224, 4096, 4096, 4240, 4240, 4112, 4096, 4240, 4224, 4112, 4096, 4224, 4224, 4096, - 4096, 4224, 4224, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4224, 4096, 4096, - 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, 4224, - 4096, 4096, 4096, 4240, 4224, 4112, 4096, 4240, 4096, 4112, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4096, - 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4097, 4096, 4096, 4100, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4224, 4225, 4096, 4096, 4224, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4224, 4224, 4096, 4096, 4224, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4608, 4609, 4608, 4608, 4612, 4612, 4608, 4608, 4608, 4608, 4608, 4096, 4608, 4608, 4096, 4096, 4624, 4624, - 4624, 4608, 4628, 4624, 4624, 4608, 4608, 4608, 4608, 4096, 4608, 4608, 4096, 4096, 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4608, 4096, 4608, - 4096, 4608, 4096, 4096, 4096, 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4608, 4608, 4608, 4608, - 4612, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, 4624, 4608, 4624, 4608, 4628, 4608, 4624, 4608, 4608, 4096, 4608, 4096, 4608, - 4096, 4096, 4096, 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, 4608, 4608, 4608, 4608, 4612, 4608, - 4608, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4608, 4609, 4096, 4096, 4608, 4608, 4096, 4096, 4608, 4608, 4096, 4096, 4608, 4608, 4096, - 4096, 4624, 4624, 4112, 4096, 4624, 4608, 4112, 4096, 4608, 4608, 4096, 4096, 4608, 4608, 4096, 4096, 4608, 4608, 4096, 4096, 4608, 4096, 4096, 4096, - 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4608, 4096, 4096, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4608, - 4608, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, 4624, 4608, 4112, 4096, 4624, 4096, 4112, 4096, 4608, 4096, - 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4608, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4608, 4096, - 4096, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4097, 4096, 4096, 4100, 4100, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 6144, 6145, 6144, 6144, 6148, 6148, - 6144, 6144, 6152, 6152, 6152, 6144, 6152, 6152, 6144, 6144, 6160, 6160, 6160, 6144, 6164, 6160, 6160, 6144, 6160, 6160, 6160, 6144, 6160, 6160, 6144, - 6144, 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6152, 6144, 6152, 4096, 6152, 6144, 6144, 4096, 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, - 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, 6208, 6208, 6144, 6144, 6212, 6208, 6144, 6144, 6216, 6208, 6152, 6144, 6216, 6208, 6144, 6144, 6224, - 6208, 6160, 6144, 6228, 6208, 6160, 6144, 6224, 6208, 6160, 6144, 6224, 6208, 6144, 6144, 6144, 6144, 4096, 4096, 6148, 6144, 4096, 4096, 6152, 6144, - 4104, 4096, 6152, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6148, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 6145, 6144, - 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6160, 6160, 6160, 6144, 6160, 6144, 6160, 6144, 6144, 6144, 6144, 6144, - 6144, 6144, 6144, 6144, 6144, 6144, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 6144, 6144, 4096, 6144, - 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 6208, 6208, 6144, 6144, 6208, 6144, 6144, 6144, 6208, 6144, 6144, 6144, 6208, 6144, - 6144, 6144, 6224, 6208, 6160, 6144, 6224, 6144, 6160, 6144, 6208, 6144, 6144, 6144, 6208, 6144, 6144, 6144, 6144, 6144, 4096, 4096, 6144, 4096, 4096, - 4096, 6144, 4096, 4096, 4096, 6144, 4096, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 6144, 6145, 6144, 6144, 6148, 6148, 6144, 6144, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6144, - 6144, 6144, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, 6144, 6144, - 6144, 4096, 6148, 6144, 6144, 4096, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, 6208, 6208, 6144, 6144, 6212, 6208, 6144, 6144, 6208, 6144, 6144, - 4096, 6208, 6144, 4096, 4096, 6208, 6144, 6144, 4096, 6212, 6144, 6144, 4096, 6208, 6144, 6144, 4096, 6208, 6144, 4096, 4096, 6144, 6144, 4096, 4096, - 6148, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6148, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, - 6144, 4096, 4096, 6144, 6145, 6144, 6144, 6144, 6144, 6144, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 6144, 6144, 6144, 4096, 6144, 4096, - 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 6144, 6144, 6144, 4096, 6144, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 6144, 6144, 6144, 4096, 6144, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 6208, 6208, 6144, 6144, 6208, 6144, 6144, 6144, - 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 6208, 6144, 6144, 4096, 6208, 4096, 6144, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 6144, - 6144, 4096, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 6656, 6657, 6656, 6656, 6660, 6660, 6656, 6656, 6656, 6656, 6656, 6144, 6656, 6656, 6144, 6144, 6672, 6672, 6672, - 6656, 6676, 6672, 6672, 6656, 6656, 6656, 6656, 6144, 6656, 6656, 6144, 6144, 6656, 6656, 6656, 4608, 6660, 6656, 6656, 4608, 6656, 6144, 6656, 4096, - 6656, 6144, 6144, 4096, 6656, 6656, 6656, 4608, 6660, 6656, 6656, 4608, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, 6720, 6720, 6656, 6656, 6724, - 6720, 6656, 6656, 6720, 6656, 6656, 6144, 6720, 6656, 6144, 6144, 6736, 6720, 6672, 6656, 6740, 6720, 6672, 6656, 6720, 6656, 6656, 6144, 6720, 6656, - 6144, 6144, 6656, 6656, 4608, 4608, 6660, 6656, 4608, 4608, 6656, 6144, 4608, 4096, 6656, 6144, 4096, 4096, 6656, 6656, 4608, 4608, 6660, 6656, 4608, - 4608, 6144, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 6145, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, - 6160, 6160, 6160, 6144, 6160, 6144, 6160, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 4096, 6144, 4096, 6144, 4096, 6144, - 4096, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 6144, 6144, 4096, 6144, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 6208, 6208, - 6144, 6144, 6208, 6144, 6144, 6144, 6208, 6144, 6144, 6144, 6208, 6144, 6144, 6144, 6224, 6208, 6160, 6144, 6224, 6144, 6160, 6144, 6208, 6144, 6144, - 6144, 6208, 6144, 6144, 6144, 6144, 6144, 4096, 4096, 6144, 4096, 4096, 4096, 6144, 4096, 4096, 4096, 6144, 4096, 4096, 4096, 6144, 6144, 4096, 4096, - 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 6144, 6145, 6144, 6144, 6148, 6148, 6144, 6144, 6144, 6144, 6144, 4096, 6144, - 6144, 4096, 4096, 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 6144, 4096, 6148, 6144, - 6144, 4096, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6144, 6144, 6144, 4096, 6144, 6144, 4096, - 4096, 6208, 6208, 6144, 6144, 6212, 6208, 6144, 6144, 6208, 6144, 6144, 4096, 6208, 6144, 4096, 4096, 6208, 6144, 6144, 4096, 6212, 6144, 6144, 4096, - 6208, 6144, 6144, 4096, 6208, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6148, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, - 6144, 4096, 4096, 6148, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4160, 4160, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, - 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4097, 4096, 4096, 4100, 4100, 4096, - 4096, 4104, 4104, 4104, 4096, 4104, 4104, 4096, 4096, 4112, 4112, 4112, 4096, 4116, 4112, 4112, 4096, 4112, 4112, 4112, 4096, 4112, 4112, 4096, 4096, - 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, 4096, 4104, 4096, 4104, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, 4096, 4104, 4096, 4104, 4096, 4096, 4096, 4112, 4096, - 4112, 4096, 4116, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, 4096, 4104, - 4096, 4104, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4097, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4112, 4112, 4112, 4096, 4112, 4096, 4112, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4097, 4096, 4096, 4100, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4608, 4609, 4608, 4608, 4612, 4612, 4608, 4608, 4608, 4608, 4608, 4096, 4608, 4608, 4096, 4096, 4624, 4624, 4624, 4608, - 4628, 4624, 4624, 4608, 4608, 4608, 4608, 4096, 4608, 4608, 4096, 4096, 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, - 4096, 4096, 4096, 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4608, 4608, 4608, 4608, 4612, 4608, - 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, 4624, 4608, 4624, 4608, 4628, 4608, 4624, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, - 4096, 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4112, - 4112, 4112, 4096, 4112, 4096, 4112, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4097, 4096, 4096, 4100, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, - 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, - 8200, 8200, 8202, 8200, 8200, 8200, 8200, 8200, 8208, 8208, 8210, 8208, 8212, 8208, 8212, 8208, 8208, 8208, 8210, 8208, 8208, 8208, 8208, 8208, 8224, - 8224, 8226, 8224, 8228, 8224, 8228, 8224, 8232, 8224, 8234, 8224, 8232, 8224, 8232, 8224, 8224, 8224, 8226, 8224, 8228, 8224, 8228, 8224, 8224, 8224, - 8226, 8224, 8224, 8224, 8224, 8224, 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8264, 8256, 8264, 8256, 8264, 8256, 8256, 8256, 8272, 8256, 8272, - 8256, 8276, 8256, 8272, 8256, 8272, 8256, 8272, 8256, 8272, 8256, 8256, 8256, 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8264, 8256, 8264, 8256, - 8264, 8256, 8256, 8256, 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8256, 8256, 8256, 8256, 8256, 8256, 8256, 8192, 8193, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8224, 8224, 8192, 8224, 8192, 8224, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, - 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, - 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, - 8194, 8194, 8196, 8196, 8196, 8196, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8194, 8192, - 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8192, 8256, 8192, 8256, - 8192, 8192, 8192, 8256, 8192, 8256, 8192, 8260, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, - 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8210, 8208, 8212, - 8208, 8212, 8208, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8224, 8224, 8226, 8224, 8228, 8224, 8228, 8224, 8224, 8192, 8226, 8192, 8224, 8192, - 8224, 8192, 8224, 8224, 8226, 8224, 8228, 8224, 8228, 8224, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8256, 8256, 8260, 8256, 8256, - 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, 8272, 8256, 8272, 8256, 8276, 8256, 8272, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, - 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, - 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, - 8192, 8224, 8192, 8224, 8192, 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, - 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, - 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8192, 8192, 8194, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, - 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8256, - 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8256, 8192, 8260, 8192, 8256, 8192, 8256, 8192, - 8256, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, - 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8200, - 8200, 8200, 8192, 8200, 8200, 8192, 8192, 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8208, 8208, 8208, 8192, 8208, 8208, 8192, 8192, 8192, 8192, - 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8208, 8192, 8208, 8192, - 8212, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, - 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, - 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8212, 8208, - 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, - 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8200, 8200, - 8200, 8192, 8200, 8200, 8192, 8192, 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8208, 8208, 8208, 8192, 8208, 8208, 8192, 8192, 8224, 8224, 8224, - 8192, 8228, 8224, 8224, 8192, 8232, 8224, 8232, 8192, 8232, 8224, 8224, 8192, 8224, 8224, 8224, 8192, 8228, 8224, 8224, 8192, 8224, 8224, 8224, 8192, - 8224, 8224, 8192, 8192, 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8264, 8256, 8200, 8192, 8264, 8256, 8192, 8192, 8272, 8256, 8208, 8192, 8276, - 8256, 8208, 8192, 8272, 8256, 8208, 8192, 8272, 8256, 8192, 8192, 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8264, 8256, 8200, 8192, 8264, 8256, - 8192, 8192, 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8256, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8272, 8256, - 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, - 8192, 8256, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, - 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, - 8192, 8256, 8192, 8192, 8192, 8260, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, - 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8212, 8208, 8208, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8224, 8224, 8224, 8192, 8228, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, - 8224, 8224, 8224, 8192, 8228, 8224, 8224, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, - 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8272, 8256, 8208, 8192, 8276, 8256, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8256, - 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, - 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, - 8192, 8224, 8192, 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, - 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, - 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, - 8192, 8260, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8260, 8192, 8192, 8192, 8256, 8192, 8192, 8192, - 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, - 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8200, 8200, 8200, - 8192, 8200, 8200, 8192, 8192, 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8208, 8208, 8208, 8192, 8208, 8208, 8192, 8192, 8192, 8192, 8192, 8192, - 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8208, 8192, 8208, 8192, 8212, 8192, - 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8192, 8208, - 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, - 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, - 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8200, 8200, 8202, 8200, - 8200, 8200, 8200, 8200, 8208, 8208, 8210, 8208, 8212, 8208, 8212, 8208, 8208, 8208, 8210, 8208, 8208, 8208, 8208, 8208, 8192, 8192, 8194, 8192, 8196, - 8192, 8196, 8192, 8200, 8192, 8202, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, - 8192, 8192, 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8264, 8256, 8264, 8256, 8264, 8256, 8256, 8256, 8272, 8256, 8272, 8256, 8276, 8256, 8272, - 8256, 8272, 8256, 8272, 8256, 8272, 8256, 8256, 8256, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8272, 8256, 8208, 8192, - 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8194, 8194, 8196, 8196, - 8196, 8196, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, - 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, 8256, - 8192, 8256, 8192, 8260, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, - 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8210, 8208, 8212, 8208, 8212, 8208, 8192, - 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8192, 8256, - 8192, 8256, 8192, 8192, 8192, 8272, 8256, 8272, 8256, 8276, 8256, 8272, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, 8192, - 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, - 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8194, - 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8256, 8256, 8260, - 8256, 8256, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8256, 8192, 8260, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8256, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, - 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, - 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8200, 8200, 8200, 8192, 8200, - 8200, 8192, 8192, 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8208, 8208, 8208, 8192, 8208, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, - 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, - 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8192, 8208, 8192, 8208, - 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, 8192, 8208, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8200, 8200, 8200, 8192, 8200, 8200, - 8192, 8192, 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8208, 8208, 8208, 8192, 8208, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, - 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8264, 8256, 8200, 8192, 8264, 8256, 8192, 8192, 8272, 8256, 8208, 8192, 8276, 8256, 8208, 8192, 8272, - 8256, 8208, 8192, 8272, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8272, 8256, 8208, 8192, 8272, 8192, - 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, - 8192, 8260, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, - 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, - 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, - 8192, 8192, 8192, 8272, 8256, 8208, 8192, 8276, 8256, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, - 8192, 8192, 8256, 8192, 8192, 8192, 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, 8260, 8256, 8192, - 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8260, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8256, 8256, 8192, 8192, - 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8200, 8200, 8200, 8192, 8200, 8200, 8192, - 8192, 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8208, 8208, 8208, 8192, 8208, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, - 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8208, 8192, - 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8208, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, - 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, - 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192 + 0, 1, 2, 2, 4, 4, 4, 4, 8, 8, 10, 8, 8, 8, 8, 8, + 16, 16, 18, 16, 20, 16, 20, 16, 16, 16, 18, 16, 16, 16, 16, 16, + 32, 32, 34, 32, 36, 32, 36, 32, 40, 32, 42, 32, 40, 32, 40, 32, + 32, 32, 34, 32, 36, 32, 36, 32, 32, 32, 34, 32, 32, 32, 32, 32, + 64, 64, 64, 64, 68, 64, 64, 64, 72, 64, 72, 64, 72, 64, 64, 64, + 80, 64, 80, 64, 84, 64, 80, 64, 80, 64, 80, 64, 80, 64, 64, 64, + 64, 64, 64, 64, 68, 64, 64, 64, 72, 64, 72, 64, 72, 64, 64, 64, + 64, 64, 64, 64, 68, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 128, 129, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 144, 144, 144, 128, 144, 128, 144, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 160, 160, 160, 128, 160, 128, 160, 128, 160, 128, 160, 128, 160, 128, 160, 128, + 160, 160, 160, 128, 160, 128, 160, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 192, 192, 128, 128, 192, 128, 128, 128, 192, 128, 128, 128, 192, 128, 128, 128, + 208, 192, 144, 128, 208, 128, 144, 128, 192, 128, 128, 128, 192, 128, 128, 128, + 192, 192, 128, 128, 192, 128, 128, 128, 192, 128, 128, 128, 192, 128, 128, 128, + 192, 192, 128, 128, 192, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 256, 257, 258, 258, 260, 260, 260, 260, 256, 256, 258, 256, 256, 256, 256, 256, + 256, 256, 258, 256, 260, 256, 260, 256, 256, 256, 258, 256, 256, 256, 256, 256, + 256, 256, 258, 256, 260, 256, 260, 256, 256, 256, 258, 256, 256, 256, 256, 256, + 256, 256, 258, 256, 260, 256, 260, 256, 256, 256, 258, 256, 256, 256, 256, 256, + 320, 320, 320, 320, 324, 320, 320, 320, 320, 256, 320, 256, 320, 256, 256, 256, + 320, 256, 320, 256, 324, 256, 320, 256, 320, 256, 320, 256, 320, 256, 256, 256, + 256, 256, 256, 256, 260, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 260, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 384, 385, 384, 384, 384, 384, 384, 384, 256, 256, 256, 256, 256, 256, 256, 256, + 384, 384, 384, 256, 384, 256, 384, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 384, 384, 384, 256, 384, 256, 384, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 384, 384, 384, 256, 384, 256, 384, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 448, 448, 384, 384, 448, 384, 384, 384, 320, 256, 256, 256, 320, 256, 256, 256, + 448, 384, 384, 256, 448, 256, 384, 256, 320, 256, 256, 256, 320, 256, 256, 256, + 384, 384, 256, 256, 384, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 384, 384, 256, 256, 384, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 512, 513, 514, 514, 516, 516, 516, 516, 512, 512, 514, 512, 512, 512, 512, 512, + 528, 528, 530, 528, 532, 528, 532, 528, 512, 512, 514, 512, 512, 512, 512, 512, + 544, 544, 546, 544, 548, 544, 548, 544, 544, 512, 546, 512, 544, 512, 544, 512, + 544, 544, 546, 544, 548, 544, 548, 544, 512, 512, 514, 512, 512, 512, 512, 512, + 576, 576, 576, 576, 580, 576, 576, 576, 576, 512, 576, 512, 576, 512, 512, 512, + 592, 576, 592, 576, 596, 576, 592, 576, 576, 512, 576, 512, 576, 512, 512, 512, + 576, 576, 576, 576, 580, 576, 576, 576, 576, 512, 576, 512, 576, 512, 512, 512, + 576, 576, 576, 576, 580, 576, 576, 576, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 513, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 528, 528, 528, 512, 528, 512, 528, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 544, 544, 544, 512, 544, 512, 544, 512, 544, 512, 544, 512, 544, 512, 544, 512, + 544, 544, 544, 512, 544, 512, 544, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 576, 576, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, + 592, 576, 528, 512, 592, 512, 528, 512, 576, 512, 512, 512, 576, 512, 512, 512, + 576, 576, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, + 576, 576, 512, 512, 576, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 513, 514, 514, 516, 516, 516, 516, 512, 512, 514, 512, 512, 512, 512, 512, + 512, 512, 514, 512, 516, 512, 516, 512, 512, 512, 514, 512, 512, 512, 512, 512, + 512, 512, 514, 512, 516, 512, 516, 512, 512, 512, 514, 512, 512, 512, 512, 512, + 512, 512, 514, 512, 516, 512, 516, 512, 512, 512, 514, 512, 512, 512, 512, 512, + 576, 576, 576, 576, 580, 576, 576, 576, 576, 512, 576, 512, 576, 512, 512, 512, + 576, 512, 576, 512, 580, 512, 576, 512, 576, 512, 576, 512, 576, 512, 512, 512, + 512, 512, 512, 512, 516, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 512, 512, 512, 516, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 513, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 576, 576, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, + 576, 512, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, 576, 512, 512, 512, + 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 1024, 1025, 1024, 1024, 1028, 1028, 1024, 1024, 1032, 1032, 1032, 1024, 1032, 1032, 1024, 1024, + 1040, 1040, 1040, 1024, 1044, 1040, 1040, 1024, 1040, 1040, 1040, 1024, 1040, 1040, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1032, 1024, 1032, 1024, 1032, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1032, 1024, 1032, 1024, 1032, 1024, 1024, 1024, + 1040, 1024, 1040, 1024, 1044, 1024, 1040, 1024, 1040, 1024, 1040, 1024, 1040, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1032, 1024, 1032, 1024, 1032, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1152, 1153, 1024, 1024, 1152, 1152, 1024, 1024, 1152, 1152, 1024, 1024, 1152, 1152, 1024, 1024, + 1168, 1168, 1040, 1024, 1168, 1152, 1040, 1024, 1152, 1152, 1024, 1024, 1152, 1152, 1024, 1024, + 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1152, 1024, 1024, 1024, 1152, 1024, 1024, 1024, + 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1152, 1024, 1024, 1024, 1152, 1024, 1024, 1024, + 1168, 1152, 1040, 1024, 1168, 1024, 1040, 1024, 1152, 1024, 1024, 1024, 1152, 1024, 1024, 1024, + 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1152, 1024, 1024, 1024, 1152, 1024, 1024, 1024, + 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1280, 1281, 1280, 1280, 1284, 1284, 1280, 1280, 1280, 1280, 1280, 1024, 1280, 1280, 1024, 1024, + 1280, 1280, 1280, 1024, 1284, 1280, 1280, 1024, 1280, 1280, 1280, 1024, 1280, 1280, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1280, 1280, 1280, 1280, 1284, 1280, 1280, 1280, 1280, 1024, 1280, 1024, 1280, 1024, 1024, 1024, + 1280, 1024, 1280, 1024, 1284, 1024, 1280, 1024, 1280, 1024, 1280, 1024, 1280, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1408, 1409, 1280, 1280, 1408, 1408, 1280, 1280, 1280, 1280, 1024, 1024, 1280, 1280, 1024, 1024, + 1408, 1408, 1280, 1024, 1408, 1280, 1280, 1024, 1280, 1280, 1024, 1024, 1280, 1280, 1024, 1024, + 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1408, 1408, 1280, 1280, 1408, 1280, 1280, 1280, 1280, 1024, 1024, 1024, 1280, 1024, 1024, 1024, + 1408, 1152, 1280, 1024, 1408, 1024, 1280, 1024, 1280, 1024, 1024, 1024, 1280, 1024, 1024, 1024, + 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1152, 1152, 1024, 1024, 1152, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1536, 1537, 1536, 1536, 1540, 1540, 1536, 1536, 1536, 1536, 1536, 1024, 1536, 1536, 1024, 1024, + 1552, 1552, 1552, 1536, 1556, 1552, 1552, 1536, 1536, 1536, 1536, 1024, 1536, 1536, 1024, 1024, + 1536, 1536, 1536, 1536, 1540, 1536, 1536, 1536, 1536, 1024, 1536, 1024, 1536, 1024, 1024, 1024, + 1536, 1536, 1536, 1536, 1540, 1536, 1536, 1536, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1536, 1536, 1536, 1536, 1540, 1536, 1536, 1536, 1536, 1024, 1536, 1024, 1536, 1024, 1024, 1024, + 1552, 1536, 1552, 1536, 1556, 1536, 1552, 1536, 1536, 1024, 1536, 1024, 1536, 1024, 1024, 1024, + 1536, 1536, 1536, 1536, 1540, 1536, 1536, 1536, 1536, 1024, 1536, 1024, 1536, 1024, 1024, 1024, + 1536, 1536, 1536, 1536, 1540, 1536, 1536, 1536, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1536, 1537, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, + 1552, 1552, 1040, 1024, 1552, 1536, 1040, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, + 1536, 1536, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, + 1536, 1536, 1024, 1024, 1536, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1536, 1536, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, + 1552, 1536, 1040, 1024, 1552, 1024, 1040, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, + 1536, 1536, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, + 1536, 1536, 1024, 1024, 1536, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1536, 1537, 1536, 1536, 1540, 1540, 1536, 1536, 1536, 1536, 1536, 1024, 1536, 1536, 1024, 1024, + 1536, 1536, 1536, 1024, 1540, 1536, 1536, 1024, 1536, 1536, 1536, 1024, 1536, 1536, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1536, 1536, 1536, 1536, 1540, 1536, 1536, 1536, 1536, 1024, 1536, 1024, 1536, 1024, 1024, 1024, + 1536, 1024, 1536, 1024, 1540, 1024, 1536, 1024, 1536, 1024, 1536, 1024, 1536, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1028, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1536, 1537, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, + 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, 1536, 1536, 1024, 1024, + 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1536, 1536, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, + 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, 1536, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 2048, 2049, 2048, 2048, 2052, 2052, 2048, 2048, 2056, 2056, 2056, 2048, 2056, 2056, 2048, 2048, + 2064, 2064, 2064, 2048, 2068, 2064, 2064, 2048, 2064, 2064, 2064, 2048, 2064, 2064, 2048, 2048, + 2080, 2080, 2080, 2048, 2084, 2080, 2080, 2048, 2088, 2080, 2088, 2048, 2088, 2080, 2080, 2048, + 2080, 2080, 2080, 2048, 2084, 2080, 2080, 2048, 2080, 2080, 2080, 2048, 2080, 2080, 2048, 2048, + 2112, 2112, 2048, 2048, 2116, 2112, 2048, 2048, 2120, 2112, 2056, 2048, 2120, 2112, 2048, 2048, + 2128, 2112, 2064, 2048, 2132, 2112, 2064, 2048, 2128, 2112, 2064, 2048, 2128, 2112, 2048, 2048, + 2112, 2112, 2048, 2048, 2116, 2112, 2048, 2048, 2120, 2112, 2056, 2048, 2120, 2112, 2048, 2048, + 2112, 2112, 2048, 2048, 2116, 2112, 2048, 2048, 2112, 2112, 2048, 2048, 2112, 2112, 2048, 2048, + 2048, 2049, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2064, 2064, 2064, 2048, 2064, 2048, 2064, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2080, 2080, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, + 2080, 2080, 2080, 2048, 2080, 2048, 2080, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, + 2128, 2112, 2064, 2048, 2128, 2048, 2064, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, + 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, + 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2304, 2305, 2304, 2304, 2308, 2308, 2304, 2304, 2304, 2304, 2304, 2048, 2304, 2304, 2048, 2048, + 2304, 2304, 2304, 2048, 2308, 2304, 2304, 2048, 2304, 2304, 2304, 2048, 2304, 2304, 2048, 2048, + 2304, 2304, 2304, 2048, 2308, 2304, 2304, 2048, 2304, 2304, 2304, 2048, 2304, 2304, 2048, 2048, + 2304, 2304, 2304, 2048, 2308, 2304, 2304, 2048, 2304, 2304, 2304, 2048, 2304, 2304, 2048, 2048, + 2368, 2368, 2304, 2304, 2372, 2368, 2304, 2304, 2368, 2304, 2304, 2048, 2368, 2304, 2048, 2048, + 2368, 2304, 2304, 2048, 2372, 2304, 2304, 2048, 2368, 2304, 2304, 2048, 2368, 2304, 2048, 2048, + 2304, 2304, 2048, 2048, 2308, 2304, 2048, 2048, 2304, 2304, 2048, 2048, 2304, 2304, 2048, 2048, + 2304, 2304, 2048, 2048, 2308, 2304, 2048, 2048, 2304, 2304, 2048, 2048, 2304, 2304, 2048, 2048, + 2304, 2305, 2304, 2304, 2304, 2304, 2304, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2304, 2304, 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2304, 2304, 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2304, 2304, 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2368, 2368, 2304, 2304, 2368, 2304, 2304, 2304, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, + 2368, 2304, 2304, 2048, 2368, 2048, 2304, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, + 2304, 2304, 2048, 2048, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2304, 2304, 2048, 2048, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2560, 2561, 2560, 2560, 2564, 2564, 2560, 2560, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, + 2576, 2576, 2576, 2560, 2580, 2576, 2576, 2560, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, + 2592, 2592, 2592, 2560, 2596, 2592, 2592, 2560, 2592, 2560, 2592, 2048, 2592, 2560, 2080, 2048, + 2592, 2592, 2592, 2560, 2596, 2592, 2592, 2560, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, + 2624, 2624, 2560, 2560, 2628, 2624, 2560, 2560, 2624, 2560, 2560, 2048, 2624, 2560, 2048, 2048, + 2640, 2624, 2576, 2560, 2644, 2624, 2576, 2560, 2624, 2560, 2560, 2048, 2624, 2560, 2048, 2048, + 2624, 2624, 2560, 2560, 2628, 2624, 2560, 2560, 2624, 2560, 2560, 2048, 2624, 2560, 2048, 2048, + 2624, 2624, 2560, 2560, 2628, 2624, 2560, 2560, 2560, 2560, 2048, 2048, 2560, 2560, 2048, 2048, + 2048, 2049, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2064, 2064, 2064, 2048, 2064, 2048, 2064, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2080, 2080, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, 2080, 2048, + 2080, 2080, 2080, 2048, 2080, 2048, 2080, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, + 2128, 2112, 2064, 2048, 2128, 2048, 2064, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, + 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, + 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2560, 2561, 2560, 2560, 2564, 2564, 2560, 2560, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, + 2560, 2560, 2560, 2048, 2564, 2560, 2560, 2048, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, + 2560, 2560, 2560, 2048, 2564, 2560, 2560, 2048, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, + 2560, 2560, 2560, 2048, 2564, 2560, 2560, 2048, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, + 2624, 2624, 2560, 2560, 2628, 2624, 2560, 2560, 2624, 2560, 2560, 2048, 2624, 2560, 2048, 2048, + 2624, 2560, 2560, 2048, 2628, 2560, 2560, 2048, 2624, 2560, 2560, 2048, 2624, 2560, 2048, 2048, + 2560, 2560, 2048, 2048, 2564, 2560, 2048, 2048, 2560, 2560, 2048, 2048, 2560, 2560, 2048, 2048, + 2560, 2560, 2048, 2048, 2564, 2560, 2048, 2048, 2560, 2560, 2048, 2048, 2560, 2560, 2048, 2048, + 2048, 2049, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2112, 2112, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, + 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, 2112, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2049, 2048, 2048, 2052, 2052, 2048, 2048, 2056, 2056, 2056, 2048, 2056, 2056, 2048, 2048, + 2064, 2064, 2064, 2048, 2068, 2064, 2064, 2048, 2064, 2064, 2064, 2048, 2064, 2064, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2056, 2048, 2056, 2048, 2056, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2056, 2048, 2056, 2048, 2056, 2048, 2048, 2048, + 2064, 2048, 2064, 2048, 2068, 2048, 2064, 2048, 2064, 2048, 2064, 2048, 2064, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2056, 2048, 2056, 2048, 2056, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2049, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2064, 2064, 2064, 2048, 2064, 2048, 2064, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2064, 2048, 2064, 2048, 2064, 2048, 2064, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2304, 2305, 2304, 2304, 2308, 2308, 2304, 2304, 2304, 2304, 2304, 2048, 2304, 2304, 2048, 2048, + 2304, 2304, 2304, 2048, 2308, 2304, 2304, 2048, 2304, 2304, 2304, 2048, 2304, 2304, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2304, 2304, 2304, 2304, 2308, 2304, 2304, 2304, 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, + 2304, 2048, 2304, 2048, 2308, 2048, 2304, 2048, 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2304, 2305, 2304, 2304, 2304, 2304, 2304, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2304, 2304, 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2304, 2304, 2304, 2304, 2304, 2304, 2304, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2304, 2048, 2304, 2048, 2304, 2048, 2304, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2560, 2561, 2560, 2560, 2564, 2564, 2560, 2560, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, + 2576, 2576, 2576, 2560, 2580, 2576, 2576, 2560, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, + 2560, 2560, 2560, 2560, 2564, 2560, 2560, 2560, 2560, 2048, 2560, 2048, 2560, 2048, 2048, 2048, + 2560, 2560, 2560, 2560, 2564, 2560, 2560, 2560, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2560, 2560, 2560, 2560, 2564, 2560, 2560, 2560, 2560, 2048, 2560, 2048, 2560, 2048, 2048, 2048, + 2576, 2560, 2576, 2560, 2580, 2560, 2576, 2560, 2560, 2048, 2560, 2048, 2560, 2048, 2048, 2048, + 2560, 2560, 2560, 2560, 2564, 2560, 2560, 2560, 2560, 2048, 2560, 2048, 2560, 2048, 2048, 2048, + 2560, 2560, 2560, 2560, 2564, 2560, 2560, 2560, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2049, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2064, 2064, 2064, 2048, 2064, 2048, 2064, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2064, 2048, 2064, 2048, 2064, 2048, 2064, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2560, 2561, 2560, 2560, 2564, 2564, 2560, 2560, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, + 2560, 2560, 2560, 2048, 2564, 2560, 2560, 2048, 2560, 2560, 2560, 2048, 2560, 2560, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2560, 2560, 2560, 2560, 2564, 2560, 2560, 2560, 2560, 2048, 2560, 2048, 2560, 2048, 2048, 2048, + 2560, 2048, 2560, 2048, 2564, 2048, 2560, 2048, 2560, 2048, 2560, 2048, 2560, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2052, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2049, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 4096, 4097, 4098, 4098, 4100, 4100, 4100, 4100, 4104, 4104, 4106, 4104, 4104, 4104, 4104, 4104, + 4112, 4112, 4114, 4112, 4116, 4112, 4116, 4112, 4112, 4112, 4114, 4112, 4112, 4112, 4112, 4112, + 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4104, 4096, 4106, 4096, 4104, 4096, 4104, 4096, + 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, + 4160, 4160, 4160, 4160, 4164, 4160, 4160, 4160, 4168, 4160, 4168, 4160, 4168, 4160, 4160, 4160, + 4176, 4160, 4176, 4160, 4180, 4160, 4176, 4160, 4176, 4160, 4176, 4160, 4176, 4160, 4160, 4160, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, 4096, 4104, 4096, 4104, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4225, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, + 4240, 4240, 4240, 4224, 4240, 4224, 4240, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, + 4224, 4224, 4224, 4096, 4224, 4096, 4224, 4096, 4224, 4096, 4224, 4096, 4224, 4096, 4224, 4096, + 4224, 4224, 4224, 4096, 4224, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4288, 4288, 4224, 4224, 4288, 4224, 4224, 4224, 4288, 4224, 4224, 4224, 4288, 4224, 4224, 4224, + 4304, 4288, 4240, 4224, 4304, 4224, 4240, 4224, 4288, 4224, 4224, 4224, 4288, 4224, 4224, 4224, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4098, 4098, 4100, 4100, 4100, 4100, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, + 4160, 4160, 4160, 4160, 4164, 4160, 4160, 4160, 4160, 4096, 4160, 4096, 4160, 4096, 4096, 4096, + 4160, 4096, 4160, 4096, 4164, 4096, 4160, 4096, 4160, 4096, 4160, 4096, 4160, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4225, 4224, 4224, 4224, 4224, 4224, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4224, 4224, 4096, 4224, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4224, 4224, 4096, 4224, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4224, 4224, 4096, 4224, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4288, 4288, 4224, 4224, 4288, 4224, 4224, 4224, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, + 4288, 4224, 4224, 4096, 4288, 4096, 4224, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4608, 4609, 4610, 4610, 4612, 4612, 4612, 4612, 4608, 4608, 4610, 4608, 4608, 4608, 4608, 4608, + 4624, 4624, 4626, 4624, 4628, 4624, 4628, 4624, 4608, 4608, 4610, 4608, 4608, 4608, 4608, 4608, + 4608, 4608, 4610, 4608, 4612, 4608, 4612, 4608, 4608, 4096, 4610, 4096, 4608, 4096, 4608, 4096, + 4608, 4608, 4610, 4608, 4612, 4608, 4612, 4608, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, + 4672, 4672, 4672, 4672, 4676, 4672, 4672, 4672, 4672, 4608, 4672, 4608, 4672, 4608, 4608, 4608, + 4688, 4672, 4688, 4672, 4692, 4672, 4688, 4672, 4672, 4608, 4672, 4608, 4672, 4608, 4608, 4608, + 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, + 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4608, 4609, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, + 4624, 4624, 4624, 4608, 4624, 4608, 4624, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, 4608, + 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4608, 4096, 4608, 4096, 4608, 4096, 4608, 4096, + 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4672, 4672, 4608, 4608, 4672, 4608, 4608, 4608, 4672, 4608, 4608, 4608, 4672, 4608, 4608, 4608, + 4688, 4672, 4624, 4608, 4688, 4608, 4624, 4608, 4672, 4608, 4608, 4608, 4672, 4608, 4608, 4608, + 4608, 4608, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, + 4608, 4608, 4096, 4096, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4098, 4098, 4100, 4100, 4100, 4100, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4098, 4096, 4100, 4096, 4100, 4096, 4096, 4096, 4098, 4096, 4096, 4096, 4096, 4096, + 4160, 4160, 4160, 4160, 4164, 4160, 4160, 4160, 4160, 4096, 4160, 4096, 4160, 4096, 4096, 4096, + 4160, 4096, 4160, 4096, 4164, 4096, 4160, 4096, 4160, 4096, 4160, 4096, 4160, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4160, 4160, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, + 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4096, 4096, 4100, 4100, 4096, 4096, 4104, 4104, 4104, 4096, 4104, 4104, 4096, 4096, + 4112, 4112, 4112, 4096, 4116, 4112, 4112, 4096, 4112, 4112, 4112, 4096, 4112, 4112, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, 4096, 4104, 4096, 4104, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, 4096, 4104, 4096, 4104, 4096, 4096, 4096, + 4112, 4096, 4112, 4096, 4116, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, 4096, 4104, 4096, 4104, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4225, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4224, 4096, 4096, 4224, 4224, 4096, 4096, + 4240, 4240, 4112, 4096, 4240, 4224, 4112, 4096, 4224, 4224, 4096, 4096, 4224, 4224, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, + 4240, 4224, 4112, 4096, 4240, 4096, 4112, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, 4224, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4096, 4096, 4100, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4225, 4096, 4096, 4224, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4224, 4224, 4096, 4096, 4224, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4608, 4609, 4608, 4608, 4612, 4612, 4608, 4608, 4608, 4608, 4608, 4096, 4608, 4608, 4096, 4096, + 4624, 4624, 4624, 4608, 4628, 4624, 4624, 4608, 4608, 4608, 4608, 4096, 4608, 4608, 4096, 4096, + 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, + 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, + 4624, 4608, 4624, 4608, 4628, 4608, 4624, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, + 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, + 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4608, 4609, 4096, 4096, 4608, 4608, 4096, 4096, 4608, 4608, 4096, 4096, 4608, 4608, 4096, 4096, + 4624, 4624, 4112, 4096, 4624, 4608, 4112, 4096, 4608, 4608, 4096, 4096, 4608, 4608, 4096, 4096, + 4608, 4608, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, + 4608, 4608, 4096, 4096, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4608, 4608, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, + 4624, 4608, 4112, 4096, 4624, 4096, 4112, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, + 4608, 4608, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, 4608, 4096, 4096, 4096, + 4608, 4608, 4096, 4096, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4096, 4096, 4100, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 6144, 6145, 6144, 6144, 6148, 6148, 6144, 6144, 6152, 6152, 6152, 6144, 6152, 6152, 6144, 6144, + 6160, 6160, 6160, 6144, 6164, 6160, 6160, 6144, 6160, 6160, 6160, 6144, 6160, 6160, 6144, 6144, + 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6152, 6144, 6152, 4096, 6152, 6144, 6144, 4096, + 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, + 6208, 6208, 6144, 6144, 6212, 6208, 6144, 6144, 6216, 6208, 6152, 6144, 6216, 6208, 6144, 6144, + 6224, 6208, 6160, 6144, 6228, 6208, 6160, 6144, 6224, 6208, 6160, 6144, 6224, 6208, 6144, 6144, + 6144, 6144, 4096, 4096, 6148, 6144, 4096, 4096, 6152, 6144, 4104, 4096, 6152, 6144, 4096, 4096, + 6144, 6144, 4096, 4096, 6148, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 4096, 4096, + 6144, 6145, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, + 6160, 6160, 6160, 6144, 6160, 6144, 6160, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, + 6144, 6144, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 4096, + 6144, 6144, 6144, 4096, 6144, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 6208, 6208, 6144, 6144, 6208, 6144, 6144, 6144, 6208, 6144, 6144, 6144, 6208, 6144, 6144, 6144, + 6224, 6208, 6160, 6144, 6224, 6144, 6160, 6144, 6208, 6144, 6144, 6144, 6208, 6144, 6144, 6144, + 6144, 6144, 4096, 4096, 6144, 4096, 4096, 4096, 6144, 4096, 4096, 4096, 6144, 4096, 4096, 4096, + 6144, 6144, 4096, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 6144, 6145, 6144, 6144, 6148, 6148, 6144, 6144, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, + 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, + 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, + 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, + 6208, 6208, 6144, 6144, 6212, 6208, 6144, 6144, 6208, 6144, 6144, 4096, 6208, 6144, 4096, 4096, + 6208, 6144, 6144, 4096, 6212, 6144, 6144, 4096, 6208, 6144, 6144, 4096, 6208, 6144, 4096, 4096, + 6144, 6144, 4096, 4096, 6148, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 4096, 4096, + 6144, 6144, 4096, 4096, 6148, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 4096, 4096, + 6144, 6145, 6144, 6144, 6144, 6144, 6144, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 6144, 6144, 6144, 4096, 6144, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 6144, 6144, 6144, 4096, 6144, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 6144, 6144, 6144, 4096, 6144, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 6208, 6208, 6144, 6144, 6208, 6144, 6144, 6144, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, + 6208, 6144, 6144, 4096, 6208, 4096, 6144, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, + 6144, 6144, 4096, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 6144, 6144, 4096, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 6656, 6657, 6656, 6656, 6660, 6660, 6656, 6656, 6656, 6656, 6656, 6144, 6656, 6656, 6144, 6144, + 6672, 6672, 6672, 6656, 6676, 6672, 6672, 6656, 6656, 6656, 6656, 6144, 6656, 6656, 6144, 6144, + 6656, 6656, 6656, 4608, 6660, 6656, 6656, 4608, 6656, 6144, 6656, 4096, 6656, 6144, 6144, 4096, + 6656, 6656, 6656, 4608, 6660, 6656, 6656, 4608, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, + 6720, 6720, 6656, 6656, 6724, 6720, 6656, 6656, 6720, 6656, 6656, 6144, 6720, 6656, 6144, 6144, + 6736, 6720, 6672, 6656, 6740, 6720, 6672, 6656, 6720, 6656, 6656, 6144, 6720, 6656, 6144, 6144, + 6656, 6656, 4608, 4608, 6660, 6656, 4608, 4608, 6656, 6144, 4608, 4096, 6656, 6144, 4096, 4096, + 6656, 6656, 4608, 4608, 6660, 6656, 4608, 4608, 6144, 6144, 4096, 4096, 6144, 6144, 4096, 4096, + 6144, 6145, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, + 6160, 6160, 6160, 6144, 6160, 6144, 6160, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, 6144, + 6144, 6144, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 4096, 6144, 4096, + 6144, 6144, 6144, 4096, 6144, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 6208, 6208, 6144, 6144, 6208, 6144, 6144, 6144, 6208, 6144, 6144, 6144, 6208, 6144, 6144, 6144, + 6224, 6208, 6160, 6144, 6224, 6144, 6160, 6144, 6208, 6144, 6144, 6144, 6208, 6144, 6144, 6144, + 6144, 6144, 4096, 4096, 6144, 4096, 4096, 4096, 6144, 4096, 4096, 4096, 6144, 4096, 4096, 4096, + 6144, 6144, 4096, 4096, 6144, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 6144, 6145, 6144, 6144, 6148, 6148, 6144, 6144, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, + 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, + 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, + 6144, 6144, 6144, 4096, 6148, 6144, 6144, 4096, 6144, 6144, 6144, 4096, 6144, 6144, 4096, 4096, + 6208, 6208, 6144, 6144, 6212, 6208, 6144, 6144, 6208, 6144, 6144, 4096, 6208, 6144, 4096, 4096, + 6208, 6144, 6144, 4096, 6212, 6144, 6144, 4096, 6208, 6144, 6144, 4096, 6208, 6144, 4096, 4096, + 6144, 6144, 4096, 4096, 6148, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 4096, 4096, + 6144, 6144, 4096, 4096, 6148, 6144, 4096, 4096, 6144, 6144, 4096, 4096, 6144, 6144, 4096, 4096, + 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4160, 4160, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, + 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, 4160, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4096, 4096, 4100, 4100, 4096, 4096, 4104, 4104, 4104, 4096, 4104, 4104, 4096, 4096, + 4112, 4112, 4112, 4096, 4116, 4112, 4112, 4096, 4112, 4112, 4112, 4096, 4112, 4112, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, 4096, 4104, 4096, 4104, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, 4096, 4104, 4096, 4104, 4096, 4096, 4096, + 4112, 4096, 4112, 4096, 4116, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4104, 4096, 4104, 4096, 4104, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4112, 4112, 4112, 4096, 4112, 4096, 4112, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4112, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4096, 4096, 4100, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4608, 4609, 4608, 4608, 4612, 4612, 4608, 4608, 4608, 4608, 4608, 4096, 4608, 4608, 4096, 4096, + 4624, 4624, 4624, 4608, 4628, 4624, 4624, 4608, 4608, 4608, 4608, 4096, 4608, 4608, 4096, 4096, + 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, + 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, + 4624, 4608, 4624, 4608, 4628, 4608, 4624, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, + 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4608, 4096, 4608, 4096, 4608, 4096, 4096, 4096, + 4608, 4608, 4608, 4608, 4612, 4608, 4608, 4608, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4112, 4112, 4112, 4096, 4112, 4096, 4112, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4112, 4096, 4112, 4096, 4112, 4096, 4112, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4096, 4096, 4100, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4100, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4097, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8200, 8200, 8202, 8200, 8200, 8200, 8200, 8200, + 8208, 8208, 8210, 8208, 8212, 8208, 8212, 8208, 8208, 8208, 8210, 8208, 8208, 8208, 8208, 8208, + 8224, 8224, 8226, 8224, 8228, 8224, 8228, 8224, 8232, 8224, 8234, 8224, 8232, 8224, 8232, 8224, + 8224, 8224, 8226, 8224, 8228, 8224, 8228, 8224, 8224, 8224, 8226, 8224, 8224, 8224, 8224, 8224, + 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8264, 8256, 8264, 8256, 8264, 8256, 8256, 8256, + 8272, 8256, 8272, 8256, 8276, 8256, 8272, 8256, 8272, 8256, 8272, 8256, 8272, 8256, 8256, 8256, + 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8264, 8256, 8264, 8256, 8264, 8256, 8256, 8256, + 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8256, 8256, 8256, 8256, 8256, 8256, 8256, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, + 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8256, 8192, 8260, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8210, 8208, 8212, 8208, 8212, 8208, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8224, 8224, 8226, 8224, 8228, 8224, 8228, 8224, 8224, 8192, 8226, 8192, 8224, 8192, 8224, 8192, + 8224, 8224, 8226, 8224, 8228, 8224, 8228, 8224, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8272, 8256, 8272, 8256, 8276, 8256, 8272, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, + 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8256, 8192, 8260, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8200, 8200, 8200, 8192, 8200, 8200, 8192, 8192, + 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8208, 8208, 8208, 8192, 8208, 8208, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8200, 8200, 8200, 8192, 8200, 8200, 8192, 8192, + 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8208, 8208, 8208, 8192, 8208, 8208, 8192, 8192, + 8224, 8224, 8224, 8192, 8228, 8224, 8224, 8192, 8232, 8224, 8232, 8192, 8232, 8224, 8224, 8192, + 8224, 8224, 8224, 8192, 8228, 8224, 8224, 8192, 8224, 8224, 8224, 8192, 8224, 8224, 8192, 8192, + 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8264, 8256, 8200, 8192, 8264, 8256, 8192, 8192, + 8272, 8256, 8208, 8192, 8276, 8256, 8208, 8192, 8272, 8256, 8208, 8192, 8272, 8256, 8192, 8192, + 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8264, 8256, 8200, 8192, 8264, 8256, 8192, 8192, + 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8256, 8192, 8192, 8256, 8256, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, + 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8192, 8192, 8260, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8224, 8224, 8224, 8192, 8228, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, + 8224, 8224, 8224, 8192, 8228, 8224, 8224, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8272, 8256, 8208, 8192, 8276, 8256, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, 8224, 8192, + 8224, 8224, 8224, 8192, 8224, 8192, 8224, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8192, 8192, 8260, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8200, 8200, 8200, 8192, 8200, 8200, 8192, 8192, + 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8208, 8208, 8208, 8192, 8208, 8208, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8200, 8200, 8202, 8200, 8200, 8200, 8200, 8200, + 8208, 8208, 8210, 8208, 8212, 8208, 8212, 8208, 8208, 8208, 8210, 8208, 8208, 8208, 8208, 8208, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8200, 8192, 8202, 8192, 8200, 8192, 8200, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8264, 8256, 8264, 8256, 8264, 8256, 8256, 8256, + 8272, 8256, 8272, 8256, 8276, 8256, 8272, 8256, 8272, 8256, 8272, 8256, 8272, 8256, 8256, 8256, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8256, 8192, 8260, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8210, 8208, 8212, 8208, 8212, 8208, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8272, 8256, 8272, 8256, 8276, 8256, 8272, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8194, 8194, 8196, 8196, 8196, 8196, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8194, 8192, 8196, 8192, 8196, 8192, 8192, 8192, 8194, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8256, 8256, 8260, 8256, 8256, 8256, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8256, 8192, 8260, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8200, 8200, 8200, 8192, 8200, 8200, 8192, 8192, + 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8208, 8208, 8208, 8192, 8208, 8208, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8200, 8200, 8200, 8192, 8200, 8200, 8192, 8192, + 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8208, 8208, 8208, 8192, 8208, 8208, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8264, 8256, 8200, 8192, 8264, 8256, 8192, 8192, + 8272, 8256, 8208, 8192, 8276, 8256, 8208, 8192, 8272, 8256, 8208, 8192, 8272, 8256, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8192, 8192, 8260, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8272, 8256, 8208, 8192, 8276, 8256, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8272, 8256, 8208, 8192, 8272, 8192, 8208, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8260, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8192, 8192, 8260, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8256, 8256, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, 8256, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8200, 8200, 8200, 8192, 8200, 8200, 8192, 8192, + 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8208, 8208, 8208, 8192, 8208, 8208, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8200, 8192, 8200, 8192, 8200, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8212, 8208, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8212, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8208, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8208, 8192, 8208, 8192, 8208, 8192, 8208, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8196, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8196, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8193, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, + 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192 }; - } } } diff --git a/vtkm/worklet/contourtree/MergeTree.h b/vtkm/worklet/contourtree/MergeTree.h index e07adca9c..298894d0a 100644 --- a/vtkm/worklet/contourtree/MergeTree.h +++ b/vtkm/worklet/contourtree/MergeTree.h @@ -123,70 +123,67 @@ //#define DEBUG_FUNCTION_ENTRY 1 //#define DEBUG_TIMING 1 -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ template class MergeTree { public: - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; - // original data array - const vtkm::cont::ArrayHandle &values; + // original data array + const vtkm::cont::ArrayHandle& values; - // size of mesh - vtkm::Id nRows, nCols, nSlices, nVertices, nLogSteps; + // size of mesh + vtkm::Id nRows, nCols, nSlices, nVertices, nLogSteps; - // whether it is join or split tree - bool isJoinTree; + // whether it is join or split tree + bool isJoinTree; - // vector of arcs representing the merge tree - vtkm::cont::ArrayHandle mergeArcs; + // vector of arcs representing the merge tree + vtkm::cont::ArrayHandle mergeArcs; - // vector storing an extremum for each vertex - vtkm::cont::ArrayHandle extrema; + // vector storing an extremum for each vertex + vtkm::cont::ArrayHandle extrema; - // vector storing a saddle for each vertex - vtkm::cont::ArrayHandle saddles; + // vector storing a saddle for each vertex + vtkm::cont::ArrayHandle saddles; - // merge tree constructor - MergeTree(const vtkm::cont::ArrayHandle &Values, - vtkm::Id NRows, - vtkm::Id NCols, - vtkm::Id NSlices, - bool IsJoinTree); + // merge tree constructor + MergeTree(const vtkm::cont::ArrayHandle& Values, vtkm::Id NRows, vtkm::Id NCols, + vtkm::Id NSlices, bool IsJoinTree); - // routine that does pointer-doubling in the mergeArc array - void BuildRegularChains(); + // routine that does pointer-doubling in the mergeArc array + void BuildRegularChains(); - // routine that computes the augmented merge tree superarcs from the merge graph - void ComputeAugmentedSuperarcs(); + // routine that computes the augmented merge tree superarcs from the merge graph + void ComputeAugmentedSuperarcs(); - // routine that computes the augmented merge arcs from the superarcs - // this is separate from the previous routine because it also gets called separately - // once saddle & extrema are set for a given set of vertices, the merge arcs can be - // computed for any subset of those vertices that contains all of the critical points - void ComputeAugmentedArcs(vtkm::cont::ArrayHandle &vertices); + // routine that computes the augmented merge arcs from the superarcs + // this is separate from the previous routine because it also gets called separately + // once saddle & extrema are set for a given set of vertices, the merge arcs can be + // computed for any subset of those vertices that contains all of the critical points + void ComputeAugmentedArcs(vtkm::cont::ArrayHandle& vertices); - // debug routine - void DebugPrint(const char *message); + // debug routine + void DebugPrint(const char* message); }; // creates merge tree template -MergeTree::MergeTree( - const vtkm::cont::ArrayHandle &Values, - vtkm::Id NRows, - vtkm::Id NCols, - vtkm::Id NSlices, - bool IsJoinTree) : - values(Values), - nRows(NRows), - nCols(NCols), - nSlices(NSlices), - isJoinTree(IsJoinTree) +MergeTree::MergeTree( + const vtkm::cont::ArrayHandle& Values, vtkm::Id NRows, vtkm::Id NCols, + vtkm::Id NSlices, bool IsJoinTree) + : values(Values) + , nRows(NRows) + , nCols(NCols) + , nSlices(NSlices) + , isJoinTree(IsJoinTree) { nVertices = nRows * nCols * nSlices; nLogSteps = 1; @@ -205,42 +202,42 @@ MergeTree::MergeTree( } // routine that does pointer-doubling in the saddles array -template -void MergeTree::BuildRegularChains() +template +void MergeTree::BuildRegularChains() { #ifdef DEBUG_FUNCTION_ENTRY - std::cout << std::endl; - std::cout << "====================" << std::endl; - std::cout << "Build Regular Chains" << std::endl; - std::cout << "====================" << std::endl; - std::cout << std::endl; + std::cout << std::endl; + std::cout << "====================" << std::endl; + std::cout << "Build Regular Chains" << std::endl; + std::cout << "====================" << std::endl; + std::cout << std::endl; #endif - // 2. Create a temporary array so that we can alternate writing between them - vtkm::cont::ArrayHandle temporaryArcs; - temporaryArcs.Allocate(nVertices); + // 2. Create a temporary array so that we can alternate writing between them + vtkm::cont::ArrayHandle temporaryArcs; + temporaryArcs.Allocate(nVertices); - vtkm::cont::ArrayHandleIndex vertexIndexArray(nVertices); - ChainDoubler chainDoubler; - vtkm::worklet::DispatcherMapField chainDoublerDispatcher(chainDoubler); + vtkm::cont::ArrayHandleIndex vertexIndexArray(nVertices); + ChainDoubler chainDoubler; + vtkm::worklet::DispatcherMapField chainDoublerDispatcher(chainDoubler); - // 3. Apply pointer-doubling to build chains to maxima, rocking between two arrays - for (vtkm::Id logStep = 0; logStep < nLogSteps; logStep++) - { - chainDoublerDispatcher.Invoke(vertexIndexArray, // input - extrema); // i/o whole array - } + // 3. Apply pointer-doubling to build chains to maxima, rocking between two arrays + for (vtkm::Id logStep = 0; logStep < nLogSteps; logStep++) + { + chainDoublerDispatcher.Invoke(vertexIndexArray, // input + extrema); // i/o whole array + } } // BuildRegularChains() // routine that computes the augmented merge tree from the merge graph template -void MergeTree::ComputeAugmentedSuperarcs() +void MergeTree::ComputeAugmentedSuperarcs() { #ifdef DEBUG_FUNCTION_ENTRY - std::cout << std::endl; - std::cout << "=================================" << std::endl; - std::cout << "Compute Augmented Merge Superarcs" << std::endl; - std::cout << "=================================" << std::endl; - std::cout << std::endl; + std::cout << std::endl; + std::cout << "=================================" << std::endl; + std::cout << "Compute Augmented Merge Superarcs" << std::endl; + std::cout << "=================================" << std::endl; + std::cout << std::endl; #endif // our first step is to assign every vertex to a pseudo-extremum based on how the @@ -252,8 +249,8 @@ void MergeTree::ComputeAugmentedSuperarcs() vtkm::Id nExtrema = extrema.GetNumberOfValues(); JoinSuperArcFinder joinSuperArcFinder(isJoinTree); - vtkm::worklet::DispatcherMapField > - joinSuperArcFinderDispatcher(joinSuperArcFinder); + vtkm::worklet::DispatcherMapField> joinSuperArcFinderDispatcher( + joinSuperArcFinder); vtkm::cont::ArrayHandleIndex vertexIndexArray(nExtrema); joinSuperArcFinderDispatcher.Invoke(vertexIndexArray, // input @@ -261,8 +258,8 @@ void MergeTree::ComputeAugmentedSuperarcs() saddles, // i/o (whole array) extrema); // i/o (whole array) - // at the end of this, all vertices should have a pseudo-extremum in the extrema array - // and a pseudo-saddle in the saddles array +// at the end of this, all vertices should have a pseudo-extremum in the extrema array +// and a pseudo-saddle in the saddles array #ifdef DEBUG_PRINT DebugPrint("Merge Superarcs Set"); #endif @@ -273,15 +270,15 @@ void MergeTree::ComputeAugmentedSuperarcs() // once saddle & extrema are set for a given set of vertices, the merge arcs can be // computed for any subset of those vertices that contains all of the critical points template -void MergeTree::ComputeAugmentedArcs( - vtkm::cont::ArrayHandle &vertices) +void MergeTree::ComputeAugmentedArcs( + vtkm::cont::ArrayHandle& vertices) { #ifdef DEBUG_FUNCTION_ENTRY - std::cout << std::endl; - std::cout << "============================" << std::endl; - std::cout << "Compute Augmented Merge Arcs" << std::endl; - std::cout << "============================" << std::endl; - std::cout << std::endl; + std::cout << std::endl; + std::cout << "============================" << std::endl; + std::cout << "Compute Augmented Merge Arcs" << std::endl; + std::cout << "============================" << std::endl; + std::cout << std::endl; #endif // create a vector of indices for sorting @@ -290,11 +287,9 @@ void MergeTree::ComputeAugmentedArcs( DeviceAlgorithm::Copy(vertices, vertexSorter); // We sort by pseudo-maximum to establish the extents - DeviceAlgorithm::Sort(vertexSorter, - VertexMergeComparator( - values.PrepareForInput(DeviceAdapter()), - extrema.PrepareForInput(DeviceAdapter()), - isJoinTree)); + DeviceAlgorithm::Sort(vertexSorter, VertexMergeComparator( + values.PrepareForInput(DeviceAdapter()), + extrema.PrepareForInput(DeviceAdapter()), isJoinTree)); #ifdef DEBUG_PRINT DebugPrint("Sorting Complete"); #endif @@ -304,29 +299,28 @@ void MergeTree::ComputeAugmentedArcs( vtkm::cont::ArrayHandleIndex critVertexIndexArray(nCriticalVerts); JoinArcConnector joinArcConnector; - vtkm::worklet::DispatcherMapField - joinArcConnectorDispatcher(joinArcConnector); + vtkm::worklet::DispatcherMapField joinArcConnectorDispatcher(joinArcConnector); - joinArcConnectorDispatcher.Invoke(critVertexIndexArray, // input - vertexSorter, // input (whole array) - extrema, // input (whole array) - saddles, // input (whole array) - mergeArcs); // output (whole array) + joinArcConnectorDispatcher.Invoke(critVertexIndexArray, // input + vertexSorter, // input (whole array) + extrema, // input (whole array) + saddles, // input (whole array) + mergeArcs); // output (whole array) #ifdef DEBUG_PRINT DebugPrint("Augmented Arcs Set"); #endif } // ComputeAugmentedArcs() // debug routine -template -void MergeTree::DebugPrint(const char *message) +template +void MergeTree::DebugPrint(const char* message) { std::cout << "---------------------------" << std::endl; std::cout << std::string(message) << std::endl; std::cout << "---------------------------" << std::endl; std::cout << std::endl; - printLabelledBlock("Values", values, nRows*nSlices, nCols); + printLabelledBlock("Values", values, nRows * nSlices, nCols); std::cout << std::endl; printLabelledBlock("MergeArcs", mergeArcs, nRows, nCols); std::cout << std::endl; @@ -335,7 +329,6 @@ void MergeTree::DebugPrint(const char *message) printLabelledBlock("Saddles", saddles, nRows, nCols); std::cout << std::endl; } // DebugPrint() - } } } diff --git a/vtkm/worklet/contourtree/Mesh2D_DEM_SaddleStarter.h b/vtkm/worklet/contourtree/Mesh2D_DEM_SaddleStarter.h index 77d78f89f..5bea36719 100644 --- a/vtkm/worklet/contourtree/Mesh2D_DEM_SaddleStarter.h +++ b/vtkm/worklet/contourtree/Mesh2D_DEM_SaddleStarter.h @@ -87,52 +87,56 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value class Mesh2D_DEM_SaddleStarter : public vtkm::worklet::WorkletMapField { public: - struct PairType : vtkm::ListTagBase > {}; + struct PairType : vtkm::ListTagBase> + { + }; - typedef void ControlSignature(FieldIn vertex, // (input) index into active vertices - FieldIn outDegFirstEdge, // (input) out degree/first edge of vertex - FieldIn valueIndex, // (input) index into regular graph - WholeArrayIn linkMask, // (input) neighbors of vertex - WholeArrayIn arcArray, // (input) chain extrema per vertex - WholeArrayIn inverseIndex, // (input) permutation of index - WholeArrayOut edgeNear, // (output) low end of edges - WholeArrayOut edgeFar, // (output) high end of edges - WholeArrayOut activeEdges); // (output) active edge list + typedef void ControlSignature( + FieldIn vertex, // (input) index into active vertices + FieldIn outDegFirstEdge, // (input) out degree/first edge of vertex + FieldIn valueIndex, // (input) index into regular graph + WholeArrayIn linkMask, // (input) neighbors of vertex + WholeArrayIn arcArray, // (input) chain extrema per vertex + WholeArrayIn inverseIndex, // (input) permutation of index + WholeArrayOut edgeNear, // (output) low end of edges + WholeArrayOut edgeFar, // (output) high end of edges + WholeArrayOut activeEdges); // (output) active edge list typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8, _9); - typedef _1 InputDomain; + typedef _1 InputDomain; - vtkm::Id nRows; // (input) number of rows in 2D - vtkm::Id nCols; // (input) number of cols in 2D - bool ascending; // (input) ascending or descending (join or split) + vtkm::Id nRows; // (input) number of rows in 2D + vtkm::Id nCols; // (input) number of cols in 2D + bool ascending; // (input) ascending or descending (join or split) // Constructor VTKM_EXEC_CONT - Mesh2D_DEM_SaddleStarter(vtkm::Id NRows, - vtkm::Id NCols, - bool Ascending) : nRows(NRows), - nCols(NCols), - ascending(Ascending) {} + Mesh2D_DEM_SaddleStarter(vtkm::Id NRows, vtkm::Id NCols, bool Ascending) + : nRows(NRows) + , nCols(NCols) + , ascending(Ascending) + { + } // operator() routine that executes the loop - template - VTKM_EXEC - void operator()(const vtkm::Id& vertex, - const vtkm::Pair& outDegFirstEdge, - const vtkm::Id& valueIndex, - const InFieldPortalType& linkMask, - const InFieldPortalType& arcArray, - const InFieldPortalType& inverseIndex, - const OutFieldPortalType& edgeNear, - const OutFieldPortalType& edgeFar, - const OutFieldPortalType& activeEdges) const + template + VTKM_EXEC void operator()(const vtkm::Id& vertex, + const vtkm::Pair& outDegFirstEdge, + const vtkm::Id& valueIndex, const InFieldPortalType& linkMask, + const InFieldPortalType& arcArray, + const InFieldPortalType& inverseIndex, + const OutFieldPortalType& edgeNear, const OutFieldPortalType& edgeFar, + const OutFieldPortalType& activeEdges) const { vtkm::Id outdegree = outDegFirstEdge.first; vtkm::Id firstEdge = outDegFirstEdge.second; @@ -153,17 +157,17 @@ public: // copy into the temporary array if ((nbrMask & 0x30) == 0x20) - farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(VERTEX_ID(row-1, col, nCols))); + farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(VERTEX_ID(row - 1, col, nCols))); if ((nbrMask & 0x18) == 0x10) - farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(VERTEX_ID(row-1, col-1, nCols))); + farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(VERTEX_ID(row - 1, col - 1, nCols))); if ((nbrMask & 0x0C) == 0x08) - farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(VERTEX_ID(row, col-1, nCols))); + farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(VERTEX_ID(row, col - 1, nCols))); if ((nbrMask & 0x06) == 0x04) - farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(VERTEX_ID(row+1, col, nCols))); + farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(VERTEX_ID(row + 1, col, nCols))); if ((nbrMask & 0x03) == 0x02) - farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(VERTEX_ID(row+1, col+1, nCols))); + farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(VERTEX_ID(row + 1, col + 1, nCols))); if ((nbrMask & 0x21) == 0x01) - farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(VERTEX_ID(row, col+1, nCols))); + farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(VERTEX_ID(row, col + 1, nCols))); // now we check them against each other if ((outDegree == 2) && (farEnds[0] == farEnds[1])) @@ -187,13 +191,13 @@ public: // and reset the count outDegree = 2; } // - } // first two match + } // first two match else if ((farEnds[0] == farEnds[2]) || (farEnds[1] == farEnds[2])) { // second one matches either of the first two // decrease the count, keeping 0 & 1 outDegree = 2; } // second one matches either of the first two - } // outDegree 3 + } // outDegree 3 // now the farEnds array holds the far ends we can reach for (vtkm::Id edge = 0; edge < outDegree; edge++) @@ -204,12 +208,11 @@ public: // now set the near and far ends and save the edge itself edgeNear.Set(edgeID, vertex); edgeFar.Set(edgeID, farEnds[edge]); - activeEdges.Set(edgeID, edgeID); + activeEdges.Set(edgeID, edgeID); } // per start - } // operator() + } // operator() }; // Mesh2D_DEM_SaddleStarter - } } } diff --git a/vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation.h b/vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation.h index 0a7158037..e4fe08869 100644 --- a/vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation.h +++ b/vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation.h @@ -98,9 +98,12 @@ #define DEBUG_PRINT 1 //#define DEBUG_TIMING 1 -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ template class Mesh2D_DEM_Triangulation @@ -109,7 +112,7 @@ public: typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; // original data array - const vtkm::cont::ArrayHandle &values; + const vtkm::cont::ArrayHandle& values; // size of the mesh vtkm::Id nRows, nCols, nVertices, nLogSteps; @@ -118,23 +121,20 @@ public: vtkm::cont::ArrayHandle neighbourhoodMask; // constructor - Mesh2D_DEM_Triangulation(const vtkm::cont::ArrayHandle &Values, - vtkm::Id NRows, + Mesh2D_DEM_Triangulation(const vtkm::cont::ArrayHandle& Values, vtkm::Id NRows, vtkm::Id NCols); // sets all vertices to point along an outgoing edge (except extrema) - void SetStarts(vtkm::cont::ArrayHandle &chains, - bool descending); + void SetStarts(vtkm::cont::ArrayHandle& chains, bool descending); // sets outgoing paths for saddles - void SetSaddleStarts(ChainGraph &mergeGraph, bool descending); + void SetSaddleStarts(ChainGraph& mergeGraph, bool descending); }; // sets outgoing paths for saddles -template -void Mesh2D_DEM_Triangulation::SetStarts( - vtkm::cont::ArrayHandle &chains, - bool ascending) +template +void Mesh2D_DEM_Triangulation::SetStarts( + vtkm::cont::ArrayHandle& chains, bool ascending) { // create the neighbourhood mask neighbourhoodMask.Allocate(nVertices); @@ -142,24 +142,22 @@ void Mesh2D_DEM_Triangulation::SetStarts( // For each vertex set the next vertex in the chain vtkm::cont::ArrayHandleIndex vertexIndexArray(nVertices); Mesh2D_DEM_VertexStarter vertexStarter(nRows, nCols, ascending); - vtkm::worklet::DispatcherMapField > - vertexStarterDispatcher(vertexStarter); + vtkm::worklet::DispatcherMapField> vertexStarterDispatcher( + vertexStarter); - vertexStarterDispatcher.Invoke(vertexIndexArray, // input - values, // input (whole array) - chains, // output - neighbourhoodMask); // output + vertexStarterDispatcher.Invoke(vertexIndexArray, // input + values, // input (whole array) + chains, // output + neighbourhoodMask); // output } // SetStarts() // creates input mesh -template -Mesh2D_DEM_Triangulation::Mesh2D_DEM_Triangulation( - const vtkm::cont::ArrayHandle &Values, - vtkm::Id NRows, - vtkm::Id NCols) : - values(Values), - nRows(NRows), - nCols(NCols) +template +Mesh2D_DEM_Triangulation::Mesh2D_DEM_Triangulation( + const vtkm::cont::ArrayHandle& Values, vtkm::Id NRows, vtkm::Id NCols) + : values(Values) + , nRows(NRows) + , nCols(NCols) { nVertices = nRows * nCols; @@ -170,9 +168,9 @@ Mesh2D_DEM_Triangulation::Mesh2D_DEM_Triangulation( } // sets outgoing paths for saddles -template -void Mesh2D_DEM_Triangulation::SetSaddleStarts(ChainGraph &mergeGraph, - bool ascending) +template +void Mesh2D_DEM_Triangulation::SetSaddleStarts( + ChainGraph& mergeGraph, bool ascending) { // we need a temporary inverse index to change vertex IDs vtkm::cont::ArrayHandle inverseIndex; @@ -183,23 +181,21 @@ void Mesh2D_DEM_Triangulation::SetSaddleStarts(Chai outdegree.Allocate(nVertices); vtkm::cont::ArrayHandleIndex vertexIndexArray(nVertices); - Mesh2D_DEM_VertexOutdegreeStarter vertexOutdegreeStarter(nRows, - nCols, - ascending); + Mesh2D_DEM_VertexOutdegreeStarter vertexOutdegreeStarter(nRows, nCols, ascending); vtkm::worklet::DispatcherMapField - vertexOutdegreeStarterDispatcher(vertexOutdegreeStarter); + vertexOutdegreeStarterDispatcher(vertexOutdegreeStarter); - vertexOutdegreeStarterDispatcher.Invoke(vertexIndexArray, // input - neighbourhoodMask, // input - mergeGraph.arcArray, // input (whole array) - outdegree, // output - isCritical); // output + vertexOutdegreeStarterDispatcher.Invoke(vertexIndexArray, // input + neighbourhoodMask, // input + mergeGraph.arcArray, // input (whole array) + outdegree, // output + isCritical); // output DeviceAlgorithm::ScanExclusive(isCritical, inverseIndex); // now we can compute how many critical points we carry forward - vtkm::Id nCriticalPoints = inverseIndex.GetPortalConstControl().Get(nVertices-1) + - isCritical.GetPortalConstControl().Get(nVertices-1); + vtkm::Id nCriticalPoints = inverseIndex.GetPortalConstControl().Get(nVertices - 1) + + isCritical.GetPortalConstControl().Get(nVertices - 1); // allocate space for the join graph vertex arrays mergeGraph.AllocateVertexArrays(nCriticalPoints); @@ -232,39 +228,37 @@ void Mesh2D_DEM_Triangulation::SetSaddleStarts(Chai // now we need to compute the firstEdge array from the outdegrees DeviceAlgorithm::ScanExclusive(mergeGraph.outdegree, mergeGraph.firstEdge); - vtkm::Id nCriticalEdges = mergeGraph.firstEdge.GetPortalConstControl().Get(nCriticalPoints-1) + - mergeGraph.outdegree.GetPortalConstControl().Get(nCriticalPoints-1); + vtkm::Id nCriticalEdges = mergeGraph.firstEdge.GetPortalConstControl().Get(nCriticalPoints - 1) + + mergeGraph.outdegree.GetPortalConstControl().Get(nCriticalPoints - 1); // now we allocate the edge arrays mergeGraph.AllocateEdgeArrays(nCriticalEdges); // and we have to set them, so we go back to the vertices - Mesh2D_DEM_SaddleStarter saddleStarter(nRows, // input - nCols, // input - ascending); // input - vtkm::worklet::DispatcherMapField - saddleStarterDispatcher(saddleStarter); + Mesh2D_DEM_SaddleStarter saddleStarter(nRows, // input + nCols, // input + ascending); // input + vtkm::worklet::DispatcherMapField saddleStarterDispatcher( + saddleStarter); - vtkm::cont::ArrayHandleZip, vtkm::cont::ArrayHandle > outDegFirstEdge = - vtkm::cont::make_ArrayHandleZip(mergeGraph.outdegree, mergeGraph.firstEdge); + vtkm::cont::ArrayHandleZip, vtkm::cont::ArrayHandle> + outDegFirstEdge = vtkm::cont::make_ArrayHandleZip(mergeGraph.outdegree, mergeGraph.firstEdge); - saddleStarterDispatcher.Invoke(criticalVertsIndexArray, // input - outDegFirstEdge, // input (pair) - mergeGraph.valueIndex, // input - neighbourhoodMask, // input (whole array) - mergeGraph.arcArray, // input (whole array) - inverseIndex, // input (whole array) - mergeGraph.edgeNear, // output (whole array) - mergeGraph.edgeFar, // output (whole array) - mergeGraph.activeEdges); // output (whole array) + saddleStarterDispatcher.Invoke(criticalVertsIndexArray, // input + outDegFirstEdge, // input (pair) + mergeGraph.valueIndex, // input + neighbourhoodMask, // input (whole array) + mergeGraph.arcArray, // input (whole array) + inverseIndex, // input (whole array) + mergeGraph.edgeNear, // output (whole array) + mergeGraph.edgeFar, // output (whole array) + mergeGraph.activeEdges); // output (whole array) // finally, allocate and initialise the edgeSorter array DeviceAlgorithm::Copy(mergeGraph.activeEdges, mergeGraph.edgeSorter); } // SetSaddleStarts() - } } } #endif - diff --git a/vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation_Macros.h b/vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation_Macros.h index 154ea3eb2..849a4ee60 100644 --- a/vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation_Macros.h +++ b/vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation_Macros.h @@ -86,23 +86,25 @@ #define MAX_OUTDEGREE 3 // vertex row - integer divide by columns -#define VERTEX_ROW(V,NCOLS) ((V)/(NCOLS)) +#define VERTEX_ROW(V, NCOLS) ((V) / (NCOLS)) // vertex column - integer modulus by columns -#define VERTEX_COL(V,NCOLS) ((V)%(NCOLS)) +#define VERTEX_COL(V, NCOLS) ((V) % (NCOLS)) // vertex ID - row * ncols + col -#define VERTEX_ID(R,C,NCOLS) ((R)*(NCOLS)+(C)) +#define VERTEX_ID(R, C, NCOLS) ((R) * (NCOLS) + (C)) // edge row - edge / (ncols * nEdgeTypes) -#define EDGE_ROW(E,NCOLS) ((E)/((NCOLS)*(N_EDGE_TYPES))) +#define EDGE_ROW(E, NCOLS) ((E) / ((NCOLS) * (N_EDGE_TYPES))) // edge col - (edge / nEdgeTypes) % nCols -#define EDGE_COL(E,NCOLS) (((E)/(N_EDGE_TYPES))%(NCOLS)) +#define EDGE_COL(E, NCOLS) (((E) / (N_EDGE_TYPES)) % (NCOLS)) // edge which - edge % nEdgeTypes -#define EDGE_WHICH(E) ((E)%(N_EDGE_TYPES)) +#define EDGE_WHICH(E) ((E) % (N_EDGE_TYPES)) // edge ID - (row * ncols + col) * nEdgeTypes + which -#define EDGE_ID(R,C,W,NCOLS) ((((R)*(NCOLS)+(C))*(N_EDGE_TYPES))+(W)) +#define EDGE_ID(R, C, W, NCOLS) ((((R) * (NCOLS) + (C)) * (N_EDGE_TYPES)) + (W)) // edge from - vertex with same row & col -#define EDGE_FROM(E,NCOLS) VERTEX_ID(EDGE_ROW(E,NCOLS),EDGE_COL(E,NCOLS),NCOLS) +#define EDGE_FROM(E, NCOLS) VERTEX_ID(EDGE_ROW(E, NCOLS), EDGE_COL(E, NCOLS), NCOLS) // edge to - edge from +1 col if not vertical, +1 row if not horizontal -#define EDGE_TO(E,NCOLS) VERTEX_ID(EDGE_ROW(E,NCOLS)+((EDGE_WHICH(E)==EDGE_TYPE_HORIZONTAL)?0:1),EDGE_COL(E,NCOLS)+((EDGE_WHICH(E)==EDGE_TYPE_VERTICAL)?0:1),NCOLS) +#define EDGE_TO(E, NCOLS) \ + VERTEX_ID(EDGE_ROW(E, NCOLS) + ((EDGE_WHICH(E) == EDGE_TYPE_HORIZONTAL) ? 0 : 1), \ + EDGE_COL(E, NCOLS) + ((EDGE_WHICH(E) == EDGE_TYPE_VERTICAL) ? 0 : 1), NCOLS) diff --git a/vtkm/worklet/contourtree/Mesh2D_DEM_VertexOutdegreeStarter.h b/vtkm/worklet/contourtree/Mesh2D_DEM_VertexOutdegreeStarter.h index 564c080e5..d3667c7ac 100644 --- a/vtkm/worklet/contourtree/Mesh2D_DEM_VertexOutdegreeStarter.h +++ b/vtkm/worklet/contourtree/Mesh2D_DEM_VertexOutdegreeStarter.h @@ -87,42 +87,43 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value class Mesh2D_DEM_VertexOutdegreeStarter : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn vertex, // (input) index into active vertices - FieldIn nbrMask, // (input) neighbor mask - WholeArrayIn arcArray, // (input) chain extrema - FieldOut outdegree, // (output) outdegree - FieldOut isCritical); // (output) whether critical - typedef void ExecutionSignature(_1, _2, _3, _4, _5/*, _6*/); - typedef _1 InputDomain; + typedef void ControlSignature(FieldIn vertex, // (input) index into active vertices + FieldIn nbrMask, // (input) neighbor mask + WholeArrayIn arcArray, // (input) chain extrema + FieldOut outdegree, // (output) outdegree + FieldOut isCritical); // (output) whether critical + typedef void ExecutionSignature(_1, _2, _3, _4, _5 /*, _6*/); + typedef _1 InputDomain; - vtkm::Id nRows; // (input) number of rows in 2D - vtkm::Id nCols; // (input) number of cols in 2D - bool ascending; // (input) ascending or descending (join or split tree) + vtkm::Id nRows; // (input) number of rows in 2D + vtkm::Id nCols; // (input) number of cols in 2D + bool ascending; // (input) ascending or descending (join or split tree) // Constructor VTKM_EXEC_CONT - Mesh2D_DEM_VertexOutdegreeStarter(vtkm::Id NRows, - vtkm::Id NCols, - bool Ascending) : nRows(NRows), - nCols(NCols), - ascending(Ascending) {} + Mesh2D_DEM_VertexOutdegreeStarter(vtkm::Id NRows, vtkm::Id NCols, bool Ascending) + : nRows(NRows) + , nCols(NCols) + , ascending(Ascending) + { + } //template - template - VTKM_EXEC - void operator()(const vtkm::Id& vertex, - const vtkm::Id& nbrMask, - const InFieldPortalType& arcArray, - vtkm::Id& outdegree, - vtkm::Id& isCritical) const + template + VTKM_EXEC void operator()(const vtkm::Id& vertex, const vtkm::Id& nbrMask, + const InFieldPortalType& arcArray, vtkm::Id& outdegree, + vtkm::Id& isCritical) const { // get the row and column vtkm::Id row = VERTEX_ROW(vertex, nCols); @@ -134,22 +135,24 @@ public: vtkm::Id farEnds[MAX_OUTDEGREE]; // special case for local extremum - if (nbrMask == 0x3F) { + if (nbrMask == 0x3F) + { outDegree = 1; } - else { // not a local minimum + else + { // not a local minimum if ((nbrMask & 0x30) == 0x20) - farEnds[outDegree++] = arcArray.Get(VERTEX_ID(row-1, col, nCols)); + farEnds[outDegree++] = arcArray.Get(VERTEX_ID(row - 1, col, nCols)); if ((nbrMask & 0x18) == 0x10) - farEnds[outDegree++] = arcArray.Get(VERTEX_ID(row-1, col-1, nCols)); + farEnds[outDegree++] = arcArray.Get(VERTEX_ID(row - 1, col - 1, nCols)); if ((nbrMask & 0x0C) == 0x08) - farEnds[outDegree++] = arcArray.Get(VERTEX_ID(row, col-1, nCols)); + farEnds[outDegree++] = arcArray.Get(VERTEX_ID(row, col - 1, nCols)); if ((nbrMask & 0x06) == 0x04) - farEnds[outDegree++] = arcArray.Get(VERTEX_ID(row+1, col, nCols)); + farEnds[outDegree++] = arcArray.Get(VERTEX_ID(row + 1, col, nCols)); if ((nbrMask & 0x03) == 0x02) - farEnds[outDegree++] = arcArray.Get(VERTEX_ID(row+1, col+1, nCols)); + farEnds[outDegree++] = arcArray.Get(VERTEX_ID(row + 1, col + 1, nCols)); if ((nbrMask & 0x21) == 0x01) - farEnds[outDegree++] = arcArray.Get(VERTEX_ID(row, col+1, nCols)); + farEnds[outDegree++] = arcArray.Get(VERTEX_ID(row, col + 1, nCols)); } // not a local minimum // now we check them against each other @@ -174,13 +177,13 @@ public: // and reset the count outDegree = 2; } // - } // first two match + } // first two match else if ((farEnds[0] == farEnds[2]) || (farEnds[1] == farEnds[2])) { // second one matches either of the first two // decrease the count, keeping 0 & 1 outDegree = 2; } // second one matches either of the first two - } // outDegree 3 + } // outDegree 3 // now store the outDegree outdegree = outDegree; diff --git a/vtkm/worklet/contourtree/Mesh2D_DEM_VertexStarter.h b/vtkm/worklet/contourtree/Mesh2D_DEM_VertexStarter.h index f7cda9788..4e4f0a8a9 100644 --- a/vtkm/worklet/contourtree/Mesh2D_DEM_VertexStarter.h +++ b/vtkm/worklet/contourtree/Mesh2D_DEM_VertexStarter.h @@ -88,43 +88,46 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value -template +template class Mesh2D_DEM_VertexStarter : public vtkm::worklet::WorkletMapField { public: - struct TagType : vtkm::ListTagBase {}; + struct TagType : vtkm::ListTagBase + { + }; - typedef void ControlSignature(FieldIn vertex, // (input) index of vertex - WholeArrayIn values, // (input) values within mesh - FieldOut chain, // (output) modify the chains - FieldOut linkMask); // (output) modify the mask + typedef void ControlSignature(FieldIn vertex, // (input) index of vertex + WholeArrayIn values, // (input) values within mesh + FieldOut chain, // (output) modify the chains + FieldOut linkMask); // (output) modify the mask typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + typedef _1 InputDomain; - vtkm::Id nRows; // (input) number of rows in 2D - vtkm::Id nCols; // (input) number of cols in 2D - bool ascending; // ascending or descending (join or split tree) + vtkm::Id nRows; // (input) number of rows in 2D + vtkm::Id nCols; // (input) number of cols in 2D + bool ascending; // ascending or descending (join or split tree) // Constructor VTKM_EXEC_CONT - Mesh2D_DEM_VertexStarter(vtkm::Id NRows, - vtkm::Id NCols, - bool Ascending) : nRows(NRows), - nCols(NCols), - ascending(Ascending) {} + Mesh2D_DEM_VertexStarter(vtkm::Id NRows, vtkm::Id NCols, bool Ascending) + : nRows(NRows) + , nCols(NCols) + , ascending(Ascending) + { + } // Locate the next vertex in direction indicated template - VTKM_EXEC - void operator()(const vtkm::Id& vertex, - const InFieldPortalType& values, - vtkm::Id& chain, - vtkm::Id& linkMask) const + VTKM_EXEC void operator()(const vtkm::Id& vertex, const InFieldPortalType& values, + vtkm::Id& chain, vtkm::Id& linkMask) const { VertexValueComparator lessThan(values); vtkm::Id row = VERTEX_ROW(vertex, nCols); @@ -136,7 +139,7 @@ public: bool isLeft = (col == 0); bool isRight = (col == nCols - 1); bool isTop = (row == 0); - bool isBottom = (row == nRows - 1); + bool isBottom = (row == nRows - 1); for (vtkm::Id edgeNo = 0; edgeNo < N_INCIDENT_EDGES; edgeNo++) { // per edge @@ -144,73 +147,72 @@ public: switch (edgeNo) { - case 5: // up - if (isTop) + case 5: // up + if (isTop) + break; + nbr = vertex - nCols; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x20; + destination = nbr; break; - nbr = vertex - nCols; - if (lessThan(vertex, nbr, ascending)) - break; - mask |= 0x20; - destination = nbr; - break; - case 4: // up left - if (isLeft || isTop) + case 4: // up left + if (isLeft || isTop) + break; + nbr = vertex - nCols - 1; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x10; + destination = nbr; break; - nbr = vertex - nCols - 1; - if (lessThan(vertex, nbr, ascending)) - break; - mask |= 0x10; - destination = nbr; - break; - case 3: // left - if (isLeft) + case 3: // left + if (isLeft) + break; + nbr = vertex - 1; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x08; + destination = nbr; break; - nbr = vertex - 1; - if (lessThan(vertex, nbr, ascending)) - break; - mask |= 0x08; - destination = nbr; - break; - case 2: // down - if (isBottom) + case 2: // down + if (isBottom) + break; + nbr = vertex + nCols; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x04; + destination = nbr; break; - nbr = vertex + nCols; - if (lessThan(vertex, nbr, ascending)) - break; - mask |= 0x04; - destination = nbr; - break; - case 1: // down right - if (isBottom || isRight) + case 1: // down right + if (isBottom || isRight) + break; + nbr = vertex + nCols + 1; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x02; + destination = nbr; break; - nbr = vertex + nCols + 1; - if (lessThan(vertex, nbr, ascending)) - break; - mask |= 0x02; - destination = nbr; - break; - case 0: // right - if (isRight) + case 0: // right + if (isRight) + break; + nbr = vertex + 1; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x01; + destination = nbr; break; - nbr = vertex + 1; - if (lessThan(vertex, nbr, ascending)) - break; - mask |= 0x01; - destination = nbr; - break; } // switch on edgeNo - } // per edge + } // per edge linkMask = mask; chain = destination; } // operator() -}; // Mesh2D_DEM_VertexStarter - +}; // Mesh2D_DEM_VertexStarter } } } diff --git a/vtkm/worklet/contourtree/Mesh3D_DEM_SaddleStarter.h b/vtkm/worklet/contourtree/Mesh3D_DEM_SaddleStarter.h index 98735f6a1..c8000b7fc 100644 --- a/vtkm/worklet/contourtree/Mesh3D_DEM_SaddleStarter.h +++ b/vtkm/worklet/contourtree/Mesh3D_DEM_SaddleStarter.h @@ -88,68 +88,69 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value -template +template class Mesh3D_DEM_SaddleStarter : public vtkm::worklet::WorkletMapField { public: - struct PairType : vtkm::ListTagBase > {}; + struct PairType : vtkm::ListTagBase> + { + }; - typedef void ControlSignature(FieldIn vertex, // (input) index into active vertices - FieldIn outDegFirstEdge, // (input) out degree/first edge of vertex - FieldIn valueIndex, // (input) index into regular graph - WholeArrayIn linkMask, // (input) neighbors of vertex - WholeArrayIn arcArray, // (input) chain extrema per vertex - WholeArrayIn inverseIndex, // (input) permutation of index - WholeArrayOut edgeNear, // (output) low end of edges - WholeArrayOut edgeFar, // (output) high end of edges - WholeArrayOut activeEdges); // (output) active edge list + typedef void ControlSignature( + FieldIn vertex, // (input) index into active vertices + FieldIn outDegFirstEdge, // (input) out degree/first edge of vertex + FieldIn valueIndex, // (input) index into regular graph + WholeArrayIn linkMask, // (input) neighbors of vertex + WholeArrayIn arcArray, // (input) chain extrema per vertex + WholeArrayIn inverseIndex, // (input) permutation of index + WholeArrayOut edgeNear, // (output) low end of edges + WholeArrayOut edgeFar, // (output) high end of edges + WholeArrayOut activeEdges); // (output) active edge list typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8, _9); - typedef _1 InputDomain; + typedef _1 InputDomain; - typedef typename vtkm::cont::ArrayHandle::template - ExecutionTypes::PortalConst IdComponentPortalType; - typedef typename vtkm::cont::ArrayHandle::template - ExecutionTypes::PortalConst IdPortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst IdComponentPortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst IdPortalType; - vtkm::Id nRows; // (input) number of rows in 3D - vtkm::Id nCols; // (input) number of cols in 3D - vtkm::Id nSlices; // (input) number of cols in 3D - bool ascending; // (input) ascending or descending (join or split) - IdComponentPortalType neighbourTable; // (input) table for neighbour offsets - IdPortalType caseTable; // (input) case table for neighbours + vtkm::Id nRows; // (input) number of rows in 3D + vtkm::Id nCols; // (input) number of cols in 3D + vtkm::Id nSlices; // (input) number of cols in 3D + bool ascending; // (input) ascending or descending (join or split) + IdComponentPortalType neighbourTable; // (input) table for neighbour offsets + IdPortalType caseTable; // (input) case table for neighbours // Constructor VTKM_EXEC_CONT - Mesh3D_DEM_SaddleStarter(vtkm::Id NRows, - vtkm::Id NCols, - vtkm::Id NSlices, - bool Ascending, - IdComponentPortalType NeighbourTable, - IdPortalType CaseTable) : - nRows(NRows), - nCols(NCols), - nSlices(NSlices), - ascending(Ascending), - neighbourTable(NeighbourTable), - caseTable(CaseTable) {} + Mesh3D_DEM_SaddleStarter(vtkm::Id NRows, vtkm::Id NCols, vtkm::Id NSlices, bool Ascending, + IdComponentPortalType NeighbourTable, IdPortalType CaseTable) + : nRows(NRows) + , nCols(NCols) + , nSlices(NSlices) + , ascending(Ascending) + , neighbourTable(NeighbourTable) + , caseTable(CaseTable) + { + } // operator() routine that executes the loop - template - VTKM_EXEC - void operator()(const vtkm::Id& vertex, - const vtkm::Pair& outDegFirstEdge, - const vtkm::Id& valueIndex, - const InFieldPortalType& linkMask, - const InFieldPortalType& arcArray, - const InFieldPortalType& inverseIndex, - const OutFieldPortalType& edgeNear, - const OutFieldPortalType& edgeFar, - const OutFieldPortalType& activeEdges) const + template + VTKM_EXEC void operator()(const vtkm::Id& vertex, + const vtkm::Pair& outDegFirstEdge, + const vtkm::Id& valueIndex, const InFieldPortalType& linkMask, + const InFieldPortalType& arcArray, + const InFieldPortalType& inverseIndex, + const OutFieldPortalType& edgeNear, const OutFieldPortalType& edgeFar, + const OutFieldPortalType& activeEdges) const { vtkm::Id outdegree = outDegFirstEdge.first; vtkm::Id firstEdge = outDegFirstEdge.second; @@ -175,8 +176,8 @@ public: { vtkm::Id indx = edgeNo * 3; vtkm::Id nbrSlice = slice + neighbourTable.Get(indx); - vtkm::Id nbrRow = row + neighbourTable.Get(indx + 1); - vtkm::Id nbrCol = col + neighbourTable.Get(indx + 2); + vtkm::Id nbrRow = row + neighbourTable.Get(indx + 1); + vtkm::Id nbrCol = col + neighbourTable.Get(indx + 2); vtkm::Id nbr = VERTEX_ID_3D(nbrSlice, nbrRow, nbrCol, nRows, nCols); farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(nbr)); @@ -205,13 +206,13 @@ public: // and reset the count outDegree = 2; } // - } // first two match + } // first two match else if ((farEnds[0] == farEnds[2]) || (farEnds[1] == farEnds[2])) { // second one matches either of the first two // decrease the count, keeping 0 & 1 outDegree = 2; } // second one matches either of the first two - } // outDegree 3 + } // outDegree 3 // now the farEnds array holds the far ends we can reach for (vtkm::Id edge = 0; edge < outDegree; edge++) @@ -222,12 +223,11 @@ public: // now set the near and far ends and save the edge itself edgeNear.Set(edgeID, vertex); edgeFar.Set(edgeID, farEnds[edge]); - activeEdges.Set(edgeID, edgeID); + activeEdges.Set(edgeID, edgeID); } // per start - } // operator() + } // operator() }; // Mesh3D_DEM_SaddleStarter - } } } diff --git a/vtkm/worklet/contourtree/Mesh3D_DEM_Triangulation.h b/vtkm/worklet/contourtree/Mesh3D_DEM_Triangulation.h index 894bd22ad..03755110c 100644 --- a/vtkm/worklet/contourtree/Mesh3D_DEM_Triangulation.h +++ b/vtkm/worklet/contourtree/Mesh3D_DEM_Triangulation.h @@ -100,9 +100,12 @@ #define DEBUG_PRINT 1 //#define DEBUG_TIMING 1 -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ template class Mesh3D_DEM_Triangulation @@ -111,7 +114,7 @@ public: typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; // original data array - const vtkm::cont::ArrayHandle &values; + const vtkm::cont::ArrayHandle& values; // size of the mesh vtkm::Id nRows, nCols, nSlices, nVertices, nLogSteps; @@ -124,32 +127,27 @@ public: vtkm::cont::ArrayHandle linkComponentCaseTable3D; // constructor - Mesh3D_DEM_Triangulation(const vtkm::cont::ArrayHandle &Values, - vtkm::Id NRows, - vtkm::Id NCols, - vtkm::Id NSlices); + Mesh3D_DEM_Triangulation(const vtkm::cont::ArrayHandle& Values, vtkm::Id NRows, + vtkm::Id NCols, vtkm::Id NSlices); // sets all vertices to point along an outgoing edge (except extrema) - void SetStarts(vtkm::cont::ArrayHandle &chains, - bool descending); + void SetStarts(vtkm::cont::ArrayHandle& chains, bool descending); // sets outgoing paths for saddles - void SetSaddleStarts(ChainGraph &mergeGraph, bool descending); + void SetSaddleStarts(ChainGraph& mergeGraph, bool descending); }; // creates input mesh -template -Mesh3D_DEM_Triangulation::Mesh3D_DEM_Triangulation( - const vtkm::cont::ArrayHandle &Values, - vtkm::Id NRows, - vtkm::Id NCols, - vtkm::Id NSlices) : - values(Values), - nRows(NRows), - nCols(NCols), - nSlices(NSlices), - neighbourOffsets3D(), - linkComponentCaseTable3D() +template +Mesh3D_DEM_Triangulation::Mesh3D_DEM_Triangulation( + const vtkm::cont::ArrayHandle& Values, vtkm::Id NRows, vtkm::Id NCols, + vtkm::Id NSlices) + : values(Values) + , nRows(NRows) + , nCols(NCols) + , nSlices(NSlices) + , neighbourOffsets3D() + , linkComponentCaseTable3D() { nVertices = nRows * nCols * nSlices; @@ -159,16 +157,15 @@ Mesh3D_DEM_Triangulation::Mesh3D_DEM_Triangulation( nLogSteps++; neighbourOffsets3D = - vtkm::cont::make_ArrayHandle(vtkm::worklet::contourtree::neighbourOffsets3D, 42); + vtkm::cont::make_ArrayHandle(vtkm::worklet::contourtree::neighbourOffsets3D, 42); linkComponentCaseTable3D = - vtkm::cont::make_ArrayHandle(vtkm::worklet::contourtree::linkComponentCaseTable3D, 16384); + vtkm::cont::make_ArrayHandle(vtkm::worklet::contourtree::linkComponentCaseTable3D, 16384); } // sets outgoing paths for saddles -template -void Mesh3D_DEM_Triangulation::SetStarts( - vtkm::cont::ArrayHandle &chains, - bool ascending) +template +void Mesh3D_DEM_Triangulation::SetStarts( + vtkm::cont::ArrayHandle& chains, bool ascending) { // create the neighbourhood mask neighbourhoodMask.Allocate(nVertices); @@ -176,19 +173,19 @@ void Mesh3D_DEM_Triangulation::SetStarts( // For each vertex set the next vertex in the chain vtkm::cont::ArrayHandleIndex vertexIndexArray(nVertices); Mesh3D_DEM_VertexStarter vertexStarter(nRows, nCols, nSlices, ascending); - vtkm::worklet::DispatcherMapField > - vertexStarterDispatcher(vertexStarter); + vtkm::worklet::DispatcherMapField> vertexStarterDispatcher( + vertexStarter); - vertexStarterDispatcher.Invoke(vertexIndexArray, // input - values, // input (whole array) - chains, // output - neighbourhoodMask); // output + vertexStarterDispatcher.Invoke(vertexIndexArray, // input + values, // input (whole array) + chains, // output + neighbourhoodMask); // output } // SetStarts() // sets outgoing paths for saddles -template -void Mesh3D_DEM_Triangulation::SetSaddleStarts(ChainGraph &mergeGraph, - bool ascending) +template +void Mesh3D_DEM_Triangulation::SetSaddleStarts( + ChainGraph& mergeGraph, bool ascending) { // we need a temporary inverse index to change vertex IDs vtkm::cont::ArrayHandle inverseIndex; @@ -199,27 +196,23 @@ void Mesh3D_DEM_Triangulation::SetSaddleStarts(Chai outdegree.Allocate(nVertices); vtkm::cont::ArrayHandleIndex vertexIndexArray(nVertices); - Mesh3D_DEM_VertexOutdegreeStarter - vertexOutdegreeStarter(nRows, - nCols, - nSlices, - ascending, - neighbourOffsets3D.PrepareForInput(DeviceAdapter()), - linkComponentCaseTable3D.PrepareForInput(DeviceAdapter())); - vtkm::worklet::DispatcherMapField > - vertexOutdegreeStarterDispatcher(vertexOutdegreeStarter); + Mesh3D_DEM_VertexOutdegreeStarter vertexOutdegreeStarter( + nRows, nCols, nSlices, ascending, neighbourOffsets3D.PrepareForInput(DeviceAdapter()), + linkComponentCaseTable3D.PrepareForInput(DeviceAdapter())); + vtkm::worklet::DispatcherMapField> + vertexOutdegreeStarterDispatcher(vertexOutdegreeStarter); - vertexOutdegreeStarterDispatcher.Invoke(vertexIndexArray, // input - neighbourhoodMask, // input - mergeGraph.arcArray, // input (whole array) - outdegree, // output - isCritical); // output + vertexOutdegreeStarterDispatcher.Invoke(vertexIndexArray, // input + neighbourhoodMask, // input + mergeGraph.arcArray, // input (whole array) + outdegree, // output + isCritical); // output DeviceAlgorithm::ScanExclusive(isCritical, inverseIndex); // now we can compute how many critical points we carry forward - vtkm::Id nCriticalPoints = inverseIndex.GetPortalConstControl().Get(nVertices-1) + - isCritical.GetPortalConstControl().Get(nVertices-1); + vtkm::Id nCriticalPoints = inverseIndex.GetPortalConstControl().Get(nVertices - 1) + + isCritical.GetPortalConstControl().Get(nVertices - 1); // allocate space for the join graph vertex arrays mergeGraph.AllocateVertexArrays(nCriticalPoints); @@ -252,40 +245,39 @@ void Mesh3D_DEM_Triangulation::SetSaddleStarts(Chai // now we need to compute the firstEdge array from the outdegrees DeviceAlgorithm::ScanExclusive(mergeGraph.outdegree, mergeGraph.firstEdge); - vtkm::Id nCriticalEdges = mergeGraph.firstEdge.GetPortalConstControl().Get(nCriticalPoints-1) + - mergeGraph.outdegree.GetPortalConstControl().Get(nCriticalPoints-1); + vtkm::Id nCriticalEdges = mergeGraph.firstEdge.GetPortalConstControl().Get(nCriticalPoints - 1) + + mergeGraph.outdegree.GetPortalConstControl().Get(nCriticalPoints - 1); // now we allocate the edge arrays mergeGraph.AllocateEdgeArrays(nCriticalEdges); // and we have to set them, so we go back to the vertices - Mesh3D_DEM_SaddleStarter - saddleStarter(nRows, // input - nCols, // input - nSlices, // input - ascending, // input - neighbourOffsets3D.PrepareForInput(DeviceAdapter()), - linkComponentCaseTable3D.PrepareForInput(DeviceAdapter())); - vtkm::worklet::DispatcherMapField > - saddleStarterDispatcher(saddleStarter); + Mesh3D_DEM_SaddleStarter saddleStarter( + nRows, // input + nCols, // input + nSlices, // input + ascending, // input + neighbourOffsets3D.PrepareForInput(DeviceAdapter()), + linkComponentCaseTable3D.PrepareForInput(DeviceAdapter())); + vtkm::worklet::DispatcherMapField> + saddleStarterDispatcher(saddleStarter); - vtkm::cont::ArrayHandleZip, vtkm::cont::ArrayHandle > outDegFirstEdge = - vtkm::cont::make_ArrayHandleZip(mergeGraph.outdegree, mergeGraph.firstEdge); + vtkm::cont::ArrayHandleZip, vtkm::cont::ArrayHandle> + outDegFirstEdge = vtkm::cont::make_ArrayHandleZip(mergeGraph.outdegree, mergeGraph.firstEdge); - saddleStarterDispatcher.Invoke(criticalVertsIndexArray, // input - outDegFirstEdge, // input (pair) - mergeGraph.valueIndex, // input - neighbourhoodMask, // input (whole array) - mergeGraph.arcArray, // input (whole array) - inverseIndex, // input (whole array) - mergeGraph.edgeNear, // output (whole array) - mergeGraph.edgeFar, // output (whole array) - mergeGraph.activeEdges); // output (whole array) + saddleStarterDispatcher.Invoke(criticalVertsIndexArray, // input + outDegFirstEdge, // input (pair) + mergeGraph.valueIndex, // input + neighbourhoodMask, // input (whole array) + mergeGraph.arcArray, // input (whole array) + inverseIndex, // input (whole array) + mergeGraph.edgeNear, // output (whole array) + mergeGraph.edgeFar, // output (whole array) + mergeGraph.activeEdges); // output (whole array) // finally, allocate and initialise the edgeSorter array DeviceAlgorithm::Copy(mergeGraph.activeEdges, mergeGraph.edgeSorter); } // SetSaddleStarts() - } } } diff --git a/vtkm/worklet/contourtree/Mesh3D_DEM_Triangulation_Macros.h b/vtkm/worklet/contourtree/Mesh3D_DEM_Triangulation_Macros.h index a41d9d477..b62fd93b6 100644 --- a/vtkm/worklet/contourtree/Mesh3D_DEM_Triangulation_Macros.h +++ b/vtkm/worklet/contourtree/Mesh3D_DEM_Triangulation_Macros.h @@ -77,28 +77,30 @@ #define MAX_OUTDEGREE_3D 6 // vertex row -#define VERTEX_ROW_3D(V,NROWS,NCOLS) (((V) % (NROWS * NCOLS)) / NCOLS) +#define VERTEX_ROW_3D(V, NROWS, NCOLS) (((V) % (NROWS * NCOLS)) / NCOLS) // vertex column -#define VERTEX_COL_3D(V,NROWS,NCOLS) ((V) % (NCOLS)) +#define VERTEX_COL_3D(V, NROWS, NCOLS) ((V) % (NCOLS)) // vertex slice -#define VERTEX_SLICE_3D(V,NROWS,NCOLS) ((V) / (NROWS * NCOLS)) +#define VERTEX_SLICE_3D(V, NROWS, NCOLS) ((V) / (NROWS * NCOLS)) // vertex ID - row * ncols + col -#define VERTEX_ID_3D(S,R,C,NROWS,NCOLS) (((S) * NROWS + (R)) * (NCOLS)+(C)) +#define VERTEX_ID_3D(S, R, C, NROWS, NCOLS) (((S)*NROWS + (R)) * (NCOLS) + (C)) // edge row - edge / (ncols * nEdgeTypes) -#define EDGE_ROW(E,NCOLS) ((E)/((NCOLS)*(N_EDGE_TYPES))) +#define EDGE_ROW(E, NCOLS) ((E) / ((NCOLS) * (N_EDGE_TYPES))) // edge col - (edge / nEdgeTypes) % nCols -#define EDGE_COL(E,NCOLS) (((E)/(N_EDGE_TYPES))%(NCOLS)) +#define EDGE_COL(E, NCOLS) (((E) / (N_EDGE_TYPES)) % (NCOLS)) // edge which - edge % nEdgeTypes -#define EDGE_WHICH(E) ((E)%(N_EDGE_TYPES)) +#define EDGE_WHICH(E) ((E) % (N_EDGE_TYPES)) // edge ID - (row * ncols + col) * nEdgeTypes + which -#define EDGE_ID(R,C,W,NCOLS) ((((R)*(NCOLS)+(C))*(N_EDGE_TYPES))+(W)) +#define EDGE_ID(R, C, W, NCOLS) ((((R) * (NCOLS) + (C)) * (N_EDGE_TYPES)) + (W)) // edge from - vertex with same row & col -#define EDGE_FROM(E,NCOLS) VERTEX_ID(EDGE_ROW(E,NCOLS),EDGE_COL(E,NCOLS),NCOLS) +#define EDGE_FROM(E, NCOLS) VERTEX_ID(EDGE_ROW(E, NCOLS), EDGE_COL(E, NCOLS), NCOLS) // edge to - edge from +1 col if not vertical, +1 row if not horizontal -#define EDGE_TO(E,NCOLS) VERTEX_ID(EDGE_ROW(E,NCOLS)+((EDGE_WHICH(E)==EDGE_TYPE_HORIZONTAL)?0:1),EDGE_COL(E,NCOLS)+((EDGE_WHICH(E)==EDGE_TYPE_VERTICAL)?0:1),NCOLS) +#define EDGE_TO(E, NCOLS) \ + VERTEX_ID(EDGE_ROW(E, NCOLS) + ((EDGE_WHICH(E) == EDGE_TYPE_HORIZONTAL) ? 0 : 1), \ + EDGE_COL(E, NCOLS) + ((EDGE_WHICH(E) == EDGE_TYPE_VERTICAL) ? 0 : 1), NCOLS) #endif diff --git a/vtkm/worklet/contourtree/Mesh3D_DEM_VertexOutdegreeStarter.h b/vtkm/worklet/contourtree/Mesh3D_DEM_VertexOutdegreeStarter.h index 6cf5f185a..b98b5906c 100644 --- a/vtkm/worklet/contourtree/Mesh3D_DEM_VertexOutdegreeStarter.h +++ b/vtkm/worklet/contourtree/Mesh3D_DEM_VertexOutdegreeStarter.h @@ -88,58 +88,57 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value -template +template class Mesh3D_DEM_VertexOutdegreeStarter : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn vertex, // (input) index into active vertices - FieldIn nbrMask, // (input) neighbor mask - WholeArrayIn arcArray, // (input) chain extrema - FieldOut outdegree, // (output) outdegree - FieldOut isCritical); // (output) whether critical + typedef void ControlSignature(FieldIn vertex, // (input) index into active vertices + FieldIn nbrMask, // (input) neighbor mask + WholeArrayIn arcArray, // (input) chain extrema + FieldOut outdegree, // (output) outdegree + FieldOut isCritical); // (output) whether critical typedef void ExecutionSignature(_1, _2, _3, _4, _5); - typedef _1 InputDomain; + typedef _1 InputDomain; - typedef typename vtkm::cont::ArrayHandle::template - ExecutionTypes::PortalConst IdComponentPortalType; - typedef typename vtkm::cont::ArrayHandle::template - ExecutionTypes::PortalConst IdPortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst IdComponentPortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst IdPortalType; - vtkm::Id nRows; // (input) number of rows in 3D - vtkm::Id nCols; // (input) number of cols in 3D - vtkm::Id nSlices; // (input) number of cols in 3D - bool ascending; // (input) ascending or descending (join or split tree) - IdComponentPortalType neighbourTable; // (input) table for neighbour offsets - IdPortalType caseTable; // (input) case table for neighbours + vtkm::Id nRows; // (input) number of rows in 3D + vtkm::Id nCols; // (input) number of cols in 3D + vtkm::Id nSlices; // (input) number of cols in 3D + bool ascending; // (input) ascending or descending (join or split tree) + IdComponentPortalType neighbourTable; // (input) table for neighbour offsets + IdPortalType caseTable; // (input) case table for neighbours // Constructor VTKM_EXEC_CONT - Mesh3D_DEM_VertexOutdegreeStarter(vtkm::Id NRows, - vtkm::Id NCols, - vtkm::Id NSlices, - bool Ascending, - IdComponentPortalType NeighbourTable, - IdPortalType CaseTable) : - nRows(NRows), - nCols(NCols), - nSlices(NSlices), - ascending(Ascending), - neighbourTable(NeighbourTable), - caseTable(CaseTable) {} + Mesh3D_DEM_VertexOutdegreeStarter(vtkm::Id NRows, vtkm::Id NCols, vtkm::Id NSlices, + bool Ascending, IdComponentPortalType NeighbourTable, + IdPortalType CaseTable) + : nRows(NRows) + , nCols(NCols) + , nSlices(NSlices) + , ascending(Ascending) + , neighbourTable(NeighbourTable) + , caseTable(CaseTable) + { + } //template - template - VTKM_EXEC - void operator()(const vtkm::Id& vertex, - const vtkm::Id& nbrMask, - const InFieldPortalType& arcArray, - vtkm::Id& outdegree, - vtkm::Id& isCritical) const + template + VTKM_EXEC void operator()(const vtkm::Id& vertex, const vtkm::Id& nbrMask, + const InFieldPortalType& arcArray, vtkm::Id& outdegree, + vtkm::Id& isCritical) const { // get the row and column vtkm::Id row = VERTEX_ROW_3D(vertex, nRows, nCols); @@ -156,8 +155,8 @@ public: { vtkm::Id indx = edgeNo * 3; vtkm::Id nbrSlice = slice + neighbourTable.Get(indx); - vtkm::Id nbrRow = row + neighbourTable.Get(indx + 1); - vtkm::Id nbrCol = col + neighbourTable.Get(indx + 2); + vtkm::Id nbrRow = row + neighbourTable.Get(indx + 1); + vtkm::Id nbrCol = col + neighbourTable.Get(indx + 2); vtkm::Id nbr = VERTEX_ID_3D(nbrSlice, nbrRow, nbrCol, nRows, nCols); farEnds[outDegree++] = arcArray.Get(nbr); @@ -186,13 +185,13 @@ public: // and reset the count outDegree = 2; } // - } // first two match + } // first two match else if ((farEnds[0] == farEnds[2]) || (farEnds[1] == farEnds[2])) { // second one matches either of the first two // decrease the count, keeping 0 & 1 outDegree = 2; } // second one matches either of the first two - } // outDegree 3 + } // outDegree 3 // now store the outDegree outdegree = outDegree; diff --git a/vtkm/worklet/contourtree/Mesh3D_DEM_VertexStarter.h b/vtkm/worklet/contourtree/Mesh3D_DEM_VertexStarter.h index f7aa2d999..1462e3020 100644 --- a/vtkm/worklet/contourtree/Mesh3D_DEM_VertexStarter.h +++ b/vtkm/worklet/contourtree/Mesh3D_DEM_VertexStarter.h @@ -89,46 +89,48 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value -template +template class Mesh3D_DEM_VertexStarter : public vtkm::worklet::WorkletMapField { public: - struct TagType : vtkm::ListTagBase {}; + struct TagType : vtkm::ListTagBase + { + }; - typedef void ControlSignature(FieldIn vertex, // (input) index of vertex - WholeArrayIn values, // (input) values within mesh - FieldOut chain, // (output) modify the chains - FieldOut linkMask); // (output) modify the mask + typedef void ControlSignature(FieldIn vertex, // (input) index of vertex + WholeArrayIn values, // (input) values within mesh + FieldOut chain, // (output) modify the chains + FieldOut linkMask); // (output) modify the mask typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + typedef _1 InputDomain; - vtkm::Id nRows; // (input) number of rows in 3D - vtkm::Id nCols; // (input) number of cols in 3D - vtkm::Id nSlices; // (input) number of cols in 3D - bool ascending; // ascending or descending (join or split tree) + vtkm::Id nRows; // (input) number of rows in 3D + vtkm::Id nCols; // (input) number of cols in 3D + vtkm::Id nSlices; // (input) number of cols in 3D + bool ascending; // ascending or descending (join or split tree) // Constructor VTKM_EXEC_CONT - Mesh3D_DEM_VertexStarter(vtkm::Id NRows, - vtkm::Id NCols, - vtkm::Id NSlices, - bool Ascending) : nRows(NRows), - nCols(NCols), - nSlices(NSlices), - ascending(Ascending) {} + Mesh3D_DEM_VertexStarter(vtkm::Id NRows, vtkm::Id NCols, vtkm::Id NSlices, bool Ascending) + : nRows(NRows) + , nCols(NCols) + , nSlices(NSlices) + , ascending(Ascending) + { + } // Locate the next vertex in direction indicated template - VTKM_EXEC - void operator()(const vtkm::Id& vertex, - const InFieldPortalType& values, - vtkm::Id& chain, - vtkm::Id& linkMask) const + VTKM_EXEC void operator()(const vtkm::Id& vertex, const InFieldPortalType& values, + vtkm::Id& chain, vtkm::Id& linkMask) const { VertexValueComparator lessThan(values); vtkm::Id row = VERTEX_ROW_3D(vertex, nRows, nCols); @@ -141,9 +143,9 @@ public: bool isLeft = (col == 0); bool isRight = (col == nCols - 1); bool isTop = (row == 0); - bool isBottom = (row == nRows - 1); + bool isBottom = (row == nRows - 1); bool isFront = (slice == 0); - bool isBack = (slice == nSlices - 1); + bool isBack = (slice == nSlices - 1); // This order of processing must be maintained to match the LinkComponentCaseTables // and to return the correct destination extremum @@ -153,126 +155,153 @@ public: switch (edgeNo) { - //////////////////////////////////////////////////////// - case 13: // down right back - if (isBack || isRight || isBottom) break; - nbr = vertex + (nRows * nCols) + nCols + 1; - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x2000; - destination = nbr; - break; + //////////////////////////////////////////////////////// + case 13: // down right back + if (isBack || isRight || isBottom) + break; + nbr = vertex + (nRows * nCols) + nCols + 1; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x2000; + destination = nbr; + break; - case 12: // down back - if (isBack || isBottom) break; - nbr = vertex + (nRows * nCols) + nCols; - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x1000; - destination = nbr; - break; + case 12: // down back + if (isBack || isBottom) + break; + nbr = vertex + (nRows * nCols) + nCols; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x1000; + destination = nbr; + break; - case 11: // right back - if (isBack || isRight) break; - nbr = vertex + (nRows * nCols) + 1; - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x800; - destination = nbr; - break; + case 11: // right back + if (isBack || isRight) + break; + nbr = vertex + (nRows * nCols) + 1; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x800; + destination = nbr; + break; - case 10: // back - if (isBack) break; - nbr = vertex + (nRows * nCols); - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x400; - destination = nbr; - break; + case 10: // back + if (isBack) + break; + nbr = vertex + (nRows * nCols); + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x400; + destination = nbr; + break; - case 9: // down right - if (isBottom || isRight) break; - nbr = vertex + nCols + 1; - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x200; - destination = nbr; - break; + case 9: // down right + if (isBottom || isRight) + break; + nbr = vertex + nCols + 1; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x200; + destination = nbr; + break; - case 8: // down - if (isBottom) break; - nbr = vertex + nCols; - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x100; - destination = nbr; - break; + case 8: // down + if (isBottom) + break; + nbr = vertex + nCols; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x100; + destination = nbr; + break; - case 7: // right - if (isRight) break; - nbr = vertex + 1; - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x80; - destination = nbr; - break; + case 7: // right + if (isRight) + break; + nbr = vertex + 1; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x80; + destination = nbr; + break; - case 6: // up left - if (isLeft || isTop) break; - nbr = vertex - nCols - 1; - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x40; - destination = nbr; - break; + case 6: // up left + if (isLeft || isTop) + break; + nbr = vertex - nCols - 1; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x40; + destination = nbr; + break; - case 5: // left - if (isLeft) break; - nbr = vertex - 1; - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x20; - destination = nbr; - break; + case 5: // left + if (isLeft) + break; + nbr = vertex - 1; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x20; + destination = nbr; + break; - case 4: // left front - if (isLeft || isFront) break; - nbr = vertex - (nRows * nCols) - 1; - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x10; - destination = nbr; - break; + case 4: // left front + if (isLeft || isFront) + break; + nbr = vertex - (nRows * nCols) - 1; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x10; + destination = nbr; + break; - case 3: // front - if (isFront) break; - nbr = vertex - (nRows * nCols); - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x08; - destination = nbr; - break; + case 3: // front + if (isFront) + break; + nbr = vertex - (nRows * nCols); + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x08; + destination = nbr; + break; - case 2: // up front - if (isTop || isFront) break; - nbr = vertex - (nRows * nCols) - nCols; - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x04; - destination = nbr; - break; + case 2: // up front + if (isTop || isFront) + break; + nbr = vertex - (nRows * nCols) - nCols; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x04; + destination = nbr; + break; - case 1: // up - if (isTop) break; - nbr = vertex - nCols; - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x02; - destination = nbr; - break; + case 1: // up + if (isTop) + break; + nbr = vertex - nCols; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x02; + destination = nbr; + break; - case 0: // up left front - if (isTop || isLeft || isFront) break; - nbr = vertex - (nRows * nCols) - nCols - 1; - if (lessThan(vertex, nbr, ascending)) break; - mask |= 0x01; - destination = nbr; - break; + case 0: // up left front + if (isTop || isLeft || isFront) + break; + nbr = vertex - (nRows * nCols) - nCols - 1; + if (lessThan(vertex, nbr, ascending)) + break; + mask |= 0x01; + destination = nbr; + break; } // switch on edgeNo - } // per edge + } // per edge linkMask = mask; chain = destination; } // operator() -}; // Mesh3D_DEM_VertexStarter - +}; // Mesh3D_DEM_VertexStarter } } } diff --git a/vtkm/worklet/contourtree/PrintVectors.h b/vtkm/worklet/contourtree/PrintVectors.h index b53029661..96df8b7e9 100644 --- a/vtkm/worklet/contourtree/PrintVectors.h +++ b/vtkm/worklet/contourtree/PrintVectors.h @@ -75,9 +75,12 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // debug value for number of columns to print #define PRINT_COLS 10 @@ -92,7 +95,7 @@ void printLabel(std::string label); void printSeparatingBar(vtkm::Id howMany); // routines to print out a single value -template +template void printDataType(T value); void printIndexType(vtkm::Id value); @@ -100,137 +103,147 @@ void printIndexType(vtkm::Id value); void printHeader(vtkm::Id howMany); // base routines for reading & writing host vectors -template -void printValues(std::string label, vtkm::cont::ArrayHandle &dVec, vtkm::Id nValues = -1); -void printIndices(std::string label, vtkm::cont::ArrayHandle &iVec, vtkm::Id nIndices = -1); +template +void printValues(std::string label, vtkm::cont::ArrayHandle& dVec, + vtkm::Id nValues = -1); +void printIndices(std::string label, vtkm::cont::ArrayHandle& iVec, + vtkm::Id nIndices = -1); // routines for printing indices & data in blocks -template -void printLabelledBlock(std::string label, const vtkm::cont::ArrayHandle &dVec, vtkm::Id nRows, vtkm::Id nColumns); +template +void printLabelledBlock(std::string label, const vtkm::cont::ArrayHandle& dVec, + vtkm::Id nRows, vtkm::Id nColumns); // utility routine to convert number to a string inline std::string NumString(vtkm::Id number) - { // NumString() - char strBuf[20]; - sprintf(strBuf, "%1d", (int) number); - return std::string(strBuf); - } // NumString() +{ // NumString() + char strBuf[20]; + sprintf(strBuf, "%1d", (int)number); + return std::string(strBuf); +} // NumString() // base routines for printing label & prefix bars inline void printLabel(std::string label) - { // printLabel() - // print out the front end - std::cout << std::setw(PREFIX_WIDTH) << std::left << label; - // print out the vertical line - std::cout << std::right << "|"; - } // printLabel() +{ // printLabel() + // print out the front end + std::cout << std::setw(PREFIX_WIDTH) << std::left << label; + // print out the vertical line + std::cout << std::right << "|"; +} // printLabel() inline void printSeparatingBar(vtkm::Id howMany) - { // printSeparatingBar() - // print out the front end - std::cout << std::setw(PREFIX_WIDTH) << std::setfill('-') << ""; - // now the + at the vertical line - std::cout << "+"; - // now print out the tail end - fixed number of spaces per entry - for (vtkm::Id block = 0; block < howMany; block++) - std::cout << std::setw(PRINT_WIDTH) << std::setfill('-') << ""; - // now the endl, resetting the fill character - std::cout << std::setfill(' ') << std::endl; - } // printSeparatingBar() +{ // printSeparatingBar() + // print out the front end + std::cout << std::setw(PREFIX_WIDTH) << std::setfill('-') << ""; + // now the + at the vertical line + std::cout << "+"; + // now print out the tail end - fixed number of spaces per entry + for (vtkm::Id block = 0; block < howMany; block++) + std::cout << std::setw(PRINT_WIDTH) << std::setfill('-') << ""; + // now the endl, resetting the fill character + std::cout << std::setfill(' ') << std::endl; +} // printSeparatingBar() // routine to print out a single value -template +template void printDataType(T value) - { // printDataType - std::cout << std::setw(PRINT_WIDTH) << value; - } // printDataType +{ // printDataType + std::cout << std::setw(PRINT_WIDTH) << value; +} // printDataType // routine to print out a single value inline void printIndexType(vtkm::Id value) - { // printIndexType - std::cout << std::setw(PRINT_WIDTH) << value; - } // printIndexType +{ // printIndexType + std::cout << std::setw(PRINT_WIDTH) << value; +} // printIndexType // header line inline void printHeader(vtkm::Id howMany) - { // printHeader() - if (howMany > PRINT_COLS) howMany = PRINT_COLS; - // print out a separating bar - printSeparatingBar(howMany); - // print out a label - printLabel("ID"); - // print out the ID numbers - for (vtkm::Id entry = 0; entry < howMany; entry++) - printIndexType(entry); - // and an endl - std::cout << std::endl; - // print out another separating bar - printSeparatingBar(howMany); - } // printHeader() +{ // printHeader() + if (howMany > PRINT_COLS) + howMany = PRINT_COLS; + // print out a separating bar + printSeparatingBar(howMany); + // print out a label + printLabel("ID"); + // print out the ID numbers + for (vtkm::Id entry = 0; entry < howMany; entry++) + printIndexType(entry); + // and an endl + std::cout << std::endl; + // print out another separating bar + printSeparatingBar(howMany); +} // printHeader() // base routines for reading & writing host vectors -template -void printValues(std::string label, vtkm::cont::ArrayHandle &dVec, vtkm::Id nValues) +template +void printValues(std::string label, vtkm::cont::ArrayHandle& dVec, vtkm::Id nValues) { - // -1 means full size - if (nValues == -1) - nValues = dVec.GetNumberOfValues(); - if (nValues > PRINT_COLS) nValues = PRINT_COLS; + // -1 means full size + if (nValues == -1) + nValues = dVec.GetNumberOfValues(); + if (nValues > PRINT_COLS) + nValues = PRINT_COLS; - // print the label - printLabel(label); + // print the label + printLabel(label); - // now print the data - for (vtkm::Id entry = 0; entry < nValues; entry++) - printDataType(dVec.GetPortalControl().Get(entry)); + // now print the data + for (vtkm::Id entry = 0; entry < nValues; entry++) + printDataType(dVec.GetPortalControl().Get(entry)); - // and an endl - std::cout << std::endl; + // and an endl + std::cout << std::endl; } // printValues() // base routines for reading & writing host vectors -inline void printIndices(std::string label, vtkm::cont::ArrayHandle &iVec, vtkm::Id nIndices) +inline void printIndices(std::string label, vtkm::cont::ArrayHandle& iVec, + vtkm::Id nIndices) { - // -1 means full size - if (nIndices == -1) - nIndices = iVec.GetNumberOfValues(); + // -1 means full size + if (nIndices == -1) + nIndices = iVec.GetNumberOfValues(); - if (nIndices > PRINT_COLS) nIndices = PRINT_COLS; + if (nIndices > PRINT_COLS) + nIndices = PRINT_COLS; - // print the label - printLabel(label); + // print the label + printLabel(label); - // now print the data - for (vtkm::Id entry = 0; entry < nIndices; entry++) - printIndexType(iVec.GetPortalControl().Get(entry)); + // now print the data + for (vtkm::Id entry = 0; entry < nIndices; entry++) + printIndexType(iVec.GetPortalControl().Get(entry)); - // and an endl - std::cout << std::endl; + // and an endl + std::cout << std::endl; } // printIndices() -template -void printLabelledBlock(std::string label, const vtkm::cont::ArrayHandle &dVec, vtkm::Id nRows, vtkm::Id nColumns) +template +void printLabelledBlock(std::string label, const vtkm::cont::ArrayHandle& dVec, + vtkm::Id nRows, vtkm::Id nColumns) { - if (nRows > PRINT_COLS) nRows = PRINT_COLS; - if (nColumns > PRINT_COLS) nColumns = PRINT_COLS; + if (nRows > PRINT_COLS) + nRows = PRINT_COLS; + if (nColumns > PRINT_COLS) + nColumns = PRINT_COLS; - // start with a header - printHeader(nColumns); - // loop control variable - vtkm::Id entry = 0; - // per row - for (vtkm::Id row = 0; row < nRows; row++) - { // per row - printLabel(label + "[" + NumString(row) + "]"); - // now print the data - for (vtkm::Id col = 0; col < nColumns; col++, entry++) { - printDataType(dVec.GetPortalConstControl().Get(entry)); - } - std::cout << std::endl; - } // per row - std::cout << std::endl; + // start with a header + printHeader(nColumns); + // loop control variable + vtkm::Id entry = 0; + // per row + for (vtkm::Id row = 0; row < nRows; row++) + { // per row + printLabel(label + "[" + NumString(row) + "]"); + // now print the data + for (vtkm::Id col = 0; col < nColumns; col++, entry++) + { + printDataType(dVec.GetPortalConstControl().Get(entry)); + } + std::cout << std::endl; + } // per row + std::cout << std::endl; } // printLabelledBlock() - } } } diff --git a/vtkm/worklet/contourtree/RegularPointTransferrer.h b/vtkm/worklet/contourtree/RegularPointTransferrer.h index 8e2054f82..743d107fc 100644 --- a/vtkm/worklet/contourtree/RegularPointTransferrer.h +++ b/vtkm/worklet/contourtree/RegularPointTransferrer.h @@ -89,40 +89,46 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value -template +template class RegularPointTransferrer : public vtkm::worklet::WorkletMapField { public: - struct TagType : vtkm::ListTagBase {}; + struct TagType : vtkm::ListTagBase + { + }; - typedef void ControlSignature(FieldIn vertexID, // (input) vertex ID - WholeArrayIn chainExtremum, // (input) chain extremum - WholeArrayIn values, // (input) values array - WholeArrayIn valueIndex, // (input) index into value array - WholeArrayInOut prunesTo, // (i/o) where vertex is pruned to - WholeArrayOut outdegree); // (output) updegree of vertex + typedef void ControlSignature(FieldIn vertexID, // (input) vertex ID + WholeArrayIn chainExtremum, // (input) chain extremum + WholeArrayIn values, // (input) values array + WholeArrayIn valueIndex, // (input) index into value array + WholeArrayInOut prunesTo, // (i/o) where vertex is pruned to + WholeArrayOut outdegree); // (output) updegree of vertex typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + typedef _1 InputDomain; bool isJoinGraph; // Constructor VTKM_EXEC_CONT - RegularPointTransferrer(bool IsJoinGraph) : isJoinGraph(IsJoinGraph) {} + RegularPointTransferrer(bool IsJoinGraph) + : isJoinGraph(IsJoinGraph) + { + } - template - VTKM_EXEC - void operator()(const vtkm::Id& vertexID, - const InIndexPortalType& chainExtremum, - const InFieldPortalType &values, - const InIndexPortalType &valueIndex, - const InOutFieldPortalType &prunesTo, - const OutFieldPortalType &outdegree) const + template + VTKM_EXEC void operator()(const vtkm::Id& vertexID, const InIndexPortalType& chainExtremum, + const InFieldPortalType& values, const InIndexPortalType& valueIndex, + const InOutFieldPortalType& prunesTo, + const OutFieldPortalType& outdegree) const { VertexValueComparator lessThan(values); @@ -143,10 +149,8 @@ public: // and reset the outdegree to zero outdegree.Set(vertexID, 0); } // regular point to be pruned - } }; // RegularPointTransferrer - } } } diff --git a/vtkm/worklet/contourtree/RegularToCandidate.h b/vtkm/worklet/contourtree/RegularToCandidate.h index 87c68aadd..482996118 100644 --- a/vtkm/worklet/contourtree/RegularToCandidate.h +++ b/vtkm/worklet/contourtree/RegularToCandidate.h @@ -71,30 +71,31 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to candidate class RegularToCandidate : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn vertexId, // (input) vertex id of candidate - WholeArrayIn mergeArcs, // (input) merge arcs + typedef void ControlSignature(FieldIn vertexId, // (input) vertex id of candidate + WholeArrayIn mergeArcs, // (input) merge arcs WholeArrayIn regularToCritical, // (input) sorting indices - FieldOut sortVector); // (output) target for write back + FieldOut sortVector); // (output) target for write back typedef _4 ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT RegularToCandidate() {} template - VTKM_EXEC - vtkm::Id operator()(const vtkm::Id& vertexID, - const InFieldPortalType& mergeArcs, - const InFieldPortalType& regularToCritical) const + VTKM_EXEC vtkm::Id operator()(const vtkm::Id& vertexID, const InFieldPortalType& mergeArcs, + const InFieldPortalType& regularToCritical) const { vtkm::Id sortVector; @@ -111,7 +112,6 @@ public: return sortVector; } }; // RegularToCandidate - } } } diff --git a/vtkm/worklet/contourtree/RegularToCriticalDown.h b/vtkm/worklet/contourtree/RegularToCriticalDown.h index 604146114..f54c5cb0f 100644 --- a/vtkm/worklet/contourtree/RegularToCriticalDown.h +++ b/vtkm/worklet/contourtree/RegularToCriticalDown.h @@ -71,9 +71,12 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to critical class RegularToCriticalDown : public vtkm::worklet::WorkletMapField @@ -91,10 +94,8 @@ public: RegularToCriticalDown() {} template - VTKM_EXEC - vtkm::Id operator()(const vtkm::Id& vertexID, - const InFieldPortalType& mergeArcs, - const InFieldPortalType& regularToCritical) const + VTKM_EXEC vtkm::Id operator()(const vtkm::Id& vertexID, const InFieldPortalType& mergeArcs, + const InFieldPortalType& regularToCritical) const { vtkm::Id sortVector; @@ -110,7 +111,6 @@ public: return sortVector; } }; // RegularToCriticalDown - } } } diff --git a/vtkm/worklet/contourtree/RegularToCriticalUp.h b/vtkm/worklet/contourtree/RegularToCriticalUp.h index a8c334ff5..65a708811 100644 --- a/vtkm/worklet/contourtree/RegularToCriticalUp.h +++ b/vtkm/worklet/contourtree/RegularToCriticalUp.h @@ -70,34 +70,34 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to critical class RegularToCriticalUp : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn candIndex, // (input) index into candidates - FieldIn candidate, // (input) candidate index - WholeArrayOut critical); // (output) + typedef void ControlSignature(FieldIn candIndex, // (input) index into candidates + FieldIn candidate, // (input) candidate index + WholeArrayOut critical); // (output) typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT RegularToCriticalUp() {} template - VTKM_EXEC - void operator()(const vtkm::Id& index, - const vtkm::Id& candidate, - const OutFieldPortalType& critical) const + VTKM_EXEC void operator()(const vtkm::Id& index, const vtkm::Id& candidate, + const OutFieldPortalType& critical) const { critical.Set(candidate, index); } }; // RegularToCriticalUp - } } } diff --git a/vtkm/worklet/contourtree/ResetDegrees.h b/vtkm/worklet/contourtree/ResetDegrees.h index c3707b080..5dc758bd4 100644 --- a/vtkm/worklet/contourtree/ResetDegrees.h +++ b/vtkm/worklet/contourtree/ResetDegrees.h @@ -70,35 +70,35 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to candidate class ResetDegrees : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn superID, // input - WholeArrayOut updegree, // output - WholeArrayOut downdegree); // output + typedef void ControlSignature(FieldIn superID, // input + WholeArrayOut updegree, // output + WholeArrayOut downdegree); // output typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT ResetDegrees() {} template - VTKM_EXEC - void operator()(const vtkm::Id& superId, - const OutFieldPortalType& updegree, - const OutFieldPortalType& downdegree) const + VTKM_EXEC void operator()(const vtkm::Id& superId, const OutFieldPortalType& updegree, + const OutFieldPortalType& downdegree) const { updegree.Set(superId, 0); downdegree.Set(superId, 0); } }; // ResetDegrees - } } } diff --git a/vtkm/worklet/contourtree/SaddleAscentFunctor.h b/vtkm/worklet/contourtree/SaddleAscentFunctor.h index bdf38e91a..1c88133bc 100644 --- a/vtkm/worklet/contourtree/SaddleAscentFunctor.h +++ b/vtkm/worklet/contourtree/SaddleAscentFunctor.h @@ -84,21 +84,25 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value class SaddleAscentFunctor : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn vertexID, // (input) index into active vertices - WholeArrayIn firstEdge, // (input) first edge for each active vertex - WholeArrayIn outdegree, // (input) updegree of vertex - WholeArrayIn activeEdges, // (input) active edges - WholeArrayIn chainExtemum, // (input) chain extemum for vertices - WholeArrayInOut edgeFar, // (input) high ends of edges - FieldOut newOutdegree); // (output) new updegree of vertex + typedef void ControlSignature( + FieldIn vertexID, // (input) index into active vertices + WholeArrayIn firstEdge, // (input) first edge for each active vertex + WholeArrayIn outdegree, // (input) updegree of vertex + WholeArrayIn activeEdges, // (input) active edges + WholeArrayIn chainExtemum, // (input) chain extemum for vertices + WholeArrayInOut edgeFar, // (input) high ends of edges + FieldOut newOutdegree); // (output) new updegree of vertex typedef _7 ExecutionSignature(_1, _2, _3, _4, _5, _6); typedef _1 InputDomain; @@ -107,13 +111,11 @@ public: SaddleAscentFunctor() {} template - VTKM_EXEC - vtkm::Id operator()(const vtkm::Id& vertexID, - const InFieldPortalType& firstEdge, - const InFieldPortalType& outdegree, - const InFieldPortalType& activeEdges, - const InFieldPortalType& chainExtremum, - const InOutFieldPortalType& edgeFar) const + VTKM_EXEC vtkm::Id operator()(const vtkm::Id& vertexID, const InFieldPortalType& firstEdge, + const InFieldPortalType& outdegree, + const InFieldPortalType& activeEdges, + const InFieldPortalType& chainExtremum, + const InOutFieldPortalType& edgeFar) const { vtkm::Id newOutdegree; @@ -134,10 +136,10 @@ public: firstMax = nbrHigh; else // otherwise, check for whether we have an actual join saddle if (firstMax != nbrHigh) - { // first non-matching - isGenuineSaddle = true; - } // first non-matching - } // per edge + { // first non-matching + isGenuineSaddle = true; + } // first non-matching + } // per edge // if it's not a genuine saddle, ignore the edges by setting updegree to 0 if (!isGenuineSaddle) @@ -147,7 +149,6 @@ public: return newOutdegree; } }; // SaddleAscentFunctor - } } } diff --git a/vtkm/worklet/contourtree/SaddleAscentTransferrer.h b/vtkm/worklet/contourtree/SaddleAscentTransferrer.h index 96d48cbf2..5f4c75ea3 100644 --- a/vtkm/worklet/contourtree/SaddleAscentTransferrer.h +++ b/vtkm/worklet/contourtree/SaddleAscentTransferrer.h @@ -83,35 +83,36 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value class SaddleAscentTransferrer : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn vertexID, // (input) active vertex - FieldIn newOutdegree, // (input) updated updegree - FieldIn newFirstEdge, // (input) updated first edge of vertex - WholeArrayIn activeEdges, // (input) active edges - WholeArrayIn firstEdge, // (input) first edges - WholeArrayOut edgeSorter); // (output) edge sorter + typedef void ControlSignature( + FieldIn vertexID, // (input) active vertex + FieldIn newOutdegree, // (input) updated updegree + FieldIn newFirstEdge, // (input) updated first edge of vertex + WholeArrayIn activeEdges, // (input) active edges + WholeArrayIn firstEdge, // (input) first edges + WholeArrayOut edgeSorter); // (output) edge sorter typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT SaddleAscentTransferrer() {} template - VTKM_EXEC - void operator()(const vtkm::Id& vertexID, - const vtkm::Id& newOutdegree, - const vtkm::Id& newFirstEdge, - const InFieldPortalType& activeEdges, - const InFieldPortalType& firstEdge, - const OutFieldPortalType& edgeSorter) const + VTKM_EXEC void operator()(const vtkm::Id& vertexID, const vtkm::Id& newOutdegree, + const vtkm::Id& newFirstEdge, const InFieldPortalType& activeEdges, + const InFieldPortalType& firstEdge, + const OutFieldPortalType& edgeSorter) const { // loop through the edges from the vertex for (vtkm::Id edge = 0; edge < newOutdegree; edge++) @@ -126,7 +127,6 @@ public: } }; // SaddleAscentTransferrer - } } } diff --git a/vtkm/worklet/contourtree/SetJoinAndSplitArcs.h b/vtkm/worklet/contourtree/SetJoinAndSplitArcs.h index faebe11a9..33cdf4be7 100644 --- a/vtkm/worklet/contourtree/SetJoinAndSplitArcs.h +++ b/vtkm/worklet/contourtree/SetJoinAndSplitArcs.h @@ -71,9 +71,12 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to candidate class SetJoinAndSplitArcs : public vtkm::worklet::WorkletMapField @@ -86,20 +89,17 @@ public: FieldOut joinArc, // (output) FieldOut splitArc); // (output) typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT SetJoinAndSplitArcs() {} template - VTKM_EXEC - void operator()(const vtkm::Id& regularID, - const InFieldPortalType& joinMergeArcs, - const InFieldPortalType& splitMergeArcs, - const InFieldPortalType& regularToCritical, - vtkm::Id &joinArc, - vtkm::Id &splitArc) const + VTKM_EXEC void operator()(const vtkm::Id& regularID, const InFieldPortalType& joinMergeArcs, + const InFieldPortalType& splitMergeArcs, + const InFieldPortalType& regularToCritical, vtkm::Id& joinArc, + vtkm::Id& splitArc) const { // use it to grab join arc target vtkm::Id joinTo = joinMergeArcs.Get(regularID); @@ -117,7 +117,6 @@ public: splitArc = regularToCritical.Get(splitTo); } }; // SetJoinAndSplitArcs - } } } diff --git a/vtkm/worklet/contourtree/SetSupernodeInward.h b/vtkm/worklet/contourtree/SetSupernodeInward.h index 367b6ce6f..b357ba4c0 100644 --- a/vtkm/worklet/contourtree/SetSupernodeInward.h +++ b/vtkm/worklet/contourtree/SetSupernodeInward.h @@ -71,9 +71,12 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to candidate class SetSupernodeInward : public vtkm::worklet::WorkletMapField @@ -86,20 +89,17 @@ public: WholeArrayIn outdegree, // (input) WholeArrayInOut superarcs); // (in out) typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT SetSupernodeInward() {} template - VTKM_EXEC - void operator()(const vtkm::Id& superID, - const InFieldPortalType& inbound, - const InFieldPortalType& outbound, - const InFieldPortalType& indegree, - const InFieldPortalType& outdegree, - const OutFieldPortalType& superarcs) const + VTKM_EXEC void operator()(const vtkm::Id& superID, const InFieldPortalType& inbound, + const InFieldPortalType& outbound, const InFieldPortalType& indegree, + const InFieldPortalType& outdegree, + const OutFieldPortalType& superarcs) const { // test for criticality vtkm::Id outNeighbour = outbound.Get(superID); @@ -119,7 +119,6 @@ public: superarcs.Set(superID, inNeighbour); } }; // SetSupernodeInward - } } } diff --git a/vtkm/worklet/contourtree/SkipVertex.h b/vtkm/worklet/contourtree/SkipVertex.h index 498c9549a..2acf412ca 100644 --- a/vtkm/worklet/contourtree/SkipVertex.h +++ b/vtkm/worklet/contourtree/SkipVertex.h @@ -71,9 +71,12 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to candidate class SkipVertex : public vtkm::worklet::WorkletMapField @@ -84,24 +87,23 @@ public: WholeArrayInOut joinArcs, // (i/o) WholeArrayInOut splitArcs); // (i/o) typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT SkipVertex() {} template - VTKM_EXEC - void operator()(const vtkm::Id& superID, - const InFieldPortalType& superarcs, - const OutFieldPortalType& joinArcs, - const OutFieldPortalType& splitArcs) const + VTKM_EXEC void operator()(const vtkm::Id& superID, const InFieldPortalType& superarcs, + const OutFieldPortalType& joinArcs, + const OutFieldPortalType& splitArcs) const { // retrieve it's join neighbour j vtkm::Id joinNeighbour = joinArcs.Get(superID); // if v has a join neighbour (i.e. j == -1) and j has a contour arc - if ((joinNeighbour != NO_VERTEX_ASSIGNED) && (superarcs.Get(joinNeighbour) != NO_VERTEX_ASSIGNED)) + if ((joinNeighbour != NO_VERTEX_ASSIGNED) && + (superarcs.Get(joinNeighbour) != NO_VERTEX_ASSIGNED)) // reset the vertex' join neighbour joinArcs.Set(superID, joinArcs.Get(joinNeighbour)); @@ -109,12 +111,12 @@ public: vtkm::Id splitNeighbour = splitArcs.Get(superID); // if v has a split neighbour (i.e. s == -1) and s has a contour arc - if ((splitNeighbour != NO_VERTEX_ASSIGNED) && (superarcs.Get(splitNeighbour) != NO_VERTEX_ASSIGNED)) + if ((splitNeighbour != NO_VERTEX_ASSIGNED) && + (superarcs.Get(splitNeighbour) != NO_VERTEX_ASSIGNED)) // reset the vertex' split neighbour splitArcs.Set(superID, splitArcs.Get(splitNeighbour)); } }; // SkipVertex - } } } diff --git a/vtkm/worklet/contourtree/SubrangeOffset.h b/vtkm/worklet/contourtree/SubrangeOffset.h index 58515a471..8103d37f7 100644 --- a/vtkm/worklet/contourtree/SubrangeOffset.h +++ b/vtkm/worklet/contourtree/SubrangeOffset.h @@ -70,35 +70,36 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to candidate class SubrangeOffset : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn sortID, // (input) index into sorted vertices - WholeArrayIn sortVector, // (input) sorted vector of vertices - WholeArrayOut candidate); // (output) candidate + typedef void ControlSignature( + FieldIn sortID, // (input) index into sorted vertices + WholeArrayIn sortVector, // (input) sorted vector of vertices + WholeArrayOut candidate); // (output) candidate typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT SubrangeOffset() {} template - VTKM_EXEC - void operator()(const vtkm::Id& sortID, - const InFieldPortalType& sortVector, - const OutFieldPortalType& candidate) const + VTKM_EXEC void operator()(const vtkm::Id& sortID, const InFieldPortalType& sortVector, + const OutFieldPortalType& candidate) const { - if (sortVector.Get(sortID) != sortVector.Get(sortID-1)) + if (sortVector.Get(sortID) != sortVector.Get(sortID - 1)) candidate.Set(sortVector.Get(sortID), sortID); } }; // SubrangeOffset - } } } diff --git a/vtkm/worklet/contourtree/TrunkBuilder.h b/vtkm/worklet/contourtree/TrunkBuilder.h index 524c29b12..51f6f08c3 100644 --- a/vtkm/worklet/contourtree/TrunkBuilder.h +++ b/vtkm/worklet/contourtree/TrunkBuilder.h @@ -88,29 +88,31 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value class TrunkBuilder : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn vertexID, // (input) index into active vertices - WholeArrayIn chainExtremum, // (input) chain extemum for vertices - WholeArrayOut prunesTo); // (output) where a vertex prunes to + typedef void ControlSignature( + FieldIn vertexID, // (input) index into active vertices + WholeArrayIn chainExtremum, // (input) chain extemum for vertices + WholeArrayOut prunesTo); // (output) where a vertex prunes to typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT TrunkBuilder() {} template - VTKM_EXEC - void operator()(const vtkm::Id& vertexID, - const InFieldPortalType& chainExtremum, - const OutFieldPortalType& prunesTo) const + VTKM_EXEC void operator()(const vtkm::Id& vertexID, const InFieldPortalType& chainExtremum, + const OutFieldPortalType& prunesTo) const { // the chain max of everyone prunes to the global minimum vtkm::Id chainExt = chainExtremum.Get(vertexID); @@ -120,7 +122,6 @@ public: prunesTo.Set(vertexID, chainExt); } }; // TrunkBuilder - } } } diff --git a/vtkm/worklet/contourtree/UpdateOutbound.h b/vtkm/worklet/contourtree/UpdateOutbound.h index d4a3e33a7..de655b8aa 100644 --- a/vtkm/worklet/contourtree/UpdateOutbound.h +++ b/vtkm/worklet/contourtree/UpdateOutbound.h @@ -71,9 +71,12 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for doing regular to candidate class UpdateOutbound : public vtkm::worklet::WorkletMapField @@ -82,16 +85,14 @@ public: typedef void ControlSignature(FieldIn superID, // input WholeArrayInOut outbound); // i/o typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT UpdateOutbound() {} template - VTKM_EXEC - void operator()(const vtkm::Id &superID, - const InOutPortalType& outbound) const + VTKM_EXEC void operator()(const vtkm::Id& superID, const InOutPortalType& outbound) const { vtkm::Id outNeighbour = outbound.Get(superID); @@ -108,7 +109,6 @@ public: outbound.Set(superID, doubleOut); } }; // UpdateOutbound - } } } diff --git a/vtkm/worklet/contourtree/VertexDegreeUpdater.h b/vtkm/worklet/contourtree/VertexDegreeUpdater.h index df6516060..51feb601a 100644 --- a/vtkm/worklet/contourtree/VertexDegreeUpdater.h +++ b/vtkm/worklet/contourtree/VertexDegreeUpdater.h @@ -87,22 +87,26 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ // Worklet for setting initial chain maximum value class VertexDegreeUpdater : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn vertexID, // (input) active vertices - WholeArrayIn activeEdges, // (input) active edges - WholeArrayIn edgeFar, // (input) high ends of edges - WholeArrayIn firstEdge, // (input) first edge for each active vertex - WholeArrayIn prunesTo, // (input) where vertex is pruned to - WholeArrayIn outdegree, // (input) updegree of vertex - WholeArrayInOut chainExtemum, // (i/o) chain extemum for vertices - FieldOut newOutdegree); // (output) new updegree of vertex + typedef void ControlSignature( + FieldIn vertexID, // (input) active vertices + WholeArrayIn activeEdges, // (input) active edges + WholeArrayIn edgeFar, // (input) high ends of edges + WholeArrayIn firstEdge, // (input) first edge for each active vertex + WholeArrayIn prunesTo, // (input) where vertex is pruned to + WholeArrayIn outdegree, // (input) updegree of vertex + WholeArrayInOut chainExtemum, // (i/o) chain extemum for vertices + FieldOut newOutdegree); // (output) new updegree of vertex typedef _8 ExecutionSignature(_1, _2, _3, _4, _5, _6, _7); typedef _1 InputDomain; @@ -117,14 +121,12 @@ public: VertexDegreeUpdater() {} template - VTKM_EXEC - vtkm::Id operator()(const vtkm::Id &vertexID, - const InFieldPortalType &activeEdges, - const InFieldPortalType &edgeFar, - const InFieldPortalType &firstEdge, - const InFieldPortalType &prunesTo, - const InFieldPortalType &outdegree, - const OutFieldPortalType &chainExtremum) const + VTKM_EXEC vtkm::Id operator()(const vtkm::Id& vertexID, const InFieldPortalType& activeEdges, + const InFieldPortalType& edgeFar, + const InFieldPortalType& firstEdge, + const InFieldPortalType& prunesTo, + const InFieldPortalType& outdegree, + const OutFieldPortalType& chainExtremum) const { vtkm::Id newOutdegree = 0; @@ -153,7 +155,6 @@ public: return newOutdegree; } }; // VertexDegreeUpdater - } } } diff --git a/vtkm/worklet/contourtree/VertexMergeComparator.h b/vtkm/worklet/contourtree/VertexMergeComparator.h index 6ab5bcd0d..e7e93ba89 100644 --- a/vtkm/worklet/contourtree/VertexMergeComparator.h +++ b/vtkm/worklet/contourtree/VertexMergeComparator.h @@ -81,9 +81,12 @@ #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ //======================================================================================= // @@ -98,22 +101,26 @@ template class VertexMergeComparator { public: - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst ValuePortalType; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst IdPortalType; + typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst ValuePortalType; + typedef + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst + IdPortalType; ValuePortalType values; IdPortalType extrema; bool isJoinTree; VTKM_EXEC_CONT - VertexMergeComparator(ValuePortalType Values, - IdPortalType Extrema, - bool IsJoinTree) - : values(Values), extrema(Extrema), isJoinTree(IsJoinTree) - {} + VertexMergeComparator(ValuePortalType Values, IdPortalType Extrema, bool IsJoinTree) + : values(Values) + , extrema(Extrema) + , isJoinTree(IsJoinTree) + { + } VTKM_EXEC - bool operator() (const vtkm::Id& i, const vtkm::Id& j) const + bool operator()(const vtkm::Id& i, const vtkm::Id& j) const { // retrieve the pseudo-extremum the vertex belongs to vtkm::Id pseudoExtI = extrema.Get(i); @@ -138,7 +145,6 @@ public: return false; // true ^ isJoinTree; } }; // VertexMergeComparator - } } } diff --git a/vtkm/worklet/contourtree/VertexValueComparator.h b/vtkm/worklet/contourtree/VertexValueComparator.h index f0308dd6a..8b43f1799 100644 --- a/vtkm/worklet/contourtree/VertexValueComparator.h +++ b/vtkm/worklet/contourtree/VertexValueComparator.h @@ -82,9 +82,12 @@ #include #include -namespace vtkm { -namespace worklet { -namespace contourtree { +namespace vtkm +{ +namespace worklet +{ +namespace contourtree +{ template class VertexValueComparator @@ -93,10 +96,13 @@ public: const InFieldPortalType& values; VTKM_EXEC_CONT - VertexValueComparator(const InFieldPortalType& Values) : values(Values) {} + VertexValueComparator(const InFieldPortalType& Values) + : values(Values) + { + } VTKM_EXEC - bool operator () (const vtkm::Id &i, const vtkm::Id &j, bool ascending) + bool operator()(const vtkm::Id& i, const vtkm::Id& j, bool ascending) { if (values.Get(i) < values.Get(j)) return ascending ^ true; @@ -107,10 +113,9 @@ public: else if (j < i) return ascending ^ false; // fall through to return false - return false; - } + return false; + } }; - } } } diff --git a/vtkm/worklet/internal/.gitattributes b/vtkm/worklet/internal/.gitattributes new file mode 100644 index 000000000..f825a27a4 --- /dev/null +++ b/vtkm/worklet/internal/.gitattributes @@ -0,0 +1,3 @@ +# This file takes a long time to format on the kwrobot host. Skip formatting +# for now. +ClipTables.h -format.clang-format diff --git a/vtkm/worklet/internal/ClipTables.h b/vtkm/worklet/internal/ClipTables.h index a8511c580..a8d4dd264 100644 --- a/vtkm/worklet/internal/ClipTables.h +++ b/vtkm/worklet/internal/ClipTables.h @@ -25,9 +25,12 @@ #include -namespace vtkm { -namespace worklet { -namespace internal { +namespace vtkm +{ +namespace worklet +{ +namespace internal +{ // table format: // ncells, {{celltype, nverts, {edge/verts(>=100), ...}}, ...}, \n @@ -35,1649 +38,1074 @@ namespace internal { // values >= 100 reresent existing vertices of the input cell (vertex = value - 100) static vtkm::UInt8 ClipTablesData[] = { // vtkm::CELL_SHAPE_VERTEX - 0, // 0 - 1, 1, 1, 100, // 1 - // vtkm::CELL_SHAPE_LINE - 0, // 0 - 1, 3, 2, 100, 0, // 1 - 1, 3, 2, 0, 101, // 2 - 1, 3, 2, 100, 101, // 3 - // vtkm::CELL_SHAPE_TRIANGLE - 0, // 0 - 1, 5, 3, 0, 2, 100, // 1 - 1, 5, 3, 1, 0, 101, // 2 - 2, 5, 3, 1, 2, 100, 5, 3, 1, 100, 101, // 3 - 1, 5, 3, 2, 1, 102, // 4 - 2, 5, 3, 0, 1, 102, 5, 3, 102, 100, 0, // 5 - 2, 5, 3, 0, 101, 2, 5, 3, 2, 101, 102, // 6 - 1, 5, 3, 100, 101, 102, // 7 - // vtkm::CELL_SHAPE_QUAD - 0, // 0 - 1, 5, 3, 100, 0, 3, // 1 - 1, 5, 3, 101, 1, 0, // 2 - 1, 9, 4, 100, 101, 1, 3, // 3 - 1, 5, 3, 102, 2, 1, // 4 - 3, 5, 3, 100, 0, 3, 5, 3, 102, 2, 1, 9, 4, 0, 1, - 2, 3, // 5 - 1, 9, 4, 101, 102, 2, 0, // 6 - 3, 5, 3, 100, 101, 3, 5, 3, 101, 2, 3, 5, 3, 101, 102, - 2, // 7 - 1, 5, 3, 103, 3, 2, // 8 - 1, 9, 4, 100, 0, 2, 103, // 9 - 3, 5, 3, 101, 1, 0, 5, 3, 103, 3, 2, 9, 4, 0, 1, - 2, 3, // 10 - 3, 5, 3, 100, 101, 1, 5, 3, 100, 1, 2, 5, 3, 100, 2, - 103, // 11 - 1, 9, 4, 102, 103, 3, 1, // 12 - 3, 5, 3, 100, 0, 103, 5, 3, 0, 1, 103, 5, 3, 1, 102, - 103, // 13 - 3, 5, 3, 0, 101, 102, 5, 3, 0, 102, 3, 5, 3, 102, 103, - 3, // 14 - 1, 9, 4, 100, 101, 102, 103, // 15 - // vtkm::CELL_SHAPE_TETRA - 0, // 0 - 1, 10, 4, 0, 3, 2, 100, // 1 - 1, 10, 4, 0, 1, 4, 101, // 2 - 1, 13, 6, 101, 1, 4, 100, 2, 3, // 3 - 1, 10, 4, 1, 2, 5, 102, // 4 - 1, 13, 6, 102, 5, 1, 100, 3, 0, // 5 - 1, 13, 6, 102, 2, 5, 101, 0, 4, // 6 - 1, 13, 6, 3, 4, 5, 100, 101, 102, // 7 - 1, 10, 4, 3, 4, 5, 103, // 8 - 1, 13, 6, 103, 4, 5, 100, 0, 2, // 9 - 1, 13, 6, 103, 5, 3, 101, 1, 0, // 10 - 1, 13, 6, 100, 101, 103, 2, 1, 5, // 11 - 1, 13, 6, 2, 102, 1, 3, 103, 4, // 12 - 1, 13, 6, 0, 1, 4, 100, 102, 103, // 13 - 1, 13, 6, 0, 3, 2, 101, 103, 102, // 14 - 1, 10, 4, 100, 101, 102, 103, // 15 - // vtkm::CELL_SHAPE_HEXAHEDRON - 0, // 0 - 1, 10, 4, 0, 3, 100, 8, // 1 - 1, 10, 4, 101, 1, 0, 9, // 2 - 3, 10, 4, 1, 8, 101, 9, 10, 4, 1, 3, 100, 8, 10, 4, - 101, 1, 100, 8, // 3 - 1, 10, 4, 102, 2, 1, 11, // 4 - 5, 10, 4, 102, 2, 1, 11, 10, 4, 2, 8, 1, 11, 10, 4, - 1, 2, 0, 8, 10, 4, 2, 3, 0, 8, 10, 4, 100, 0, - 3, 8, // 5 - 3, 10, 4, 2, 9, 102, 11, 10, 4, 102, 2, 0, 9, 10, 4, - 102, 0, 101, 9, // 6 - 7, 10, 4, 8, 9, 2, 11, 10, 4, 2, 9, 102, 11, 10, 4, - 2, 3, 101, 9, 10, 4, 3, 8, 101, 9, 10, 4, 2, 8, - 3, 9, 10, 4, 102, 2, 101, 9, 10, 4, 101, 3, 100, 8, // 7 - 1, 10, 4, 103, 3, 2, 10, // 8 - 3, 10, 4, 103, 8, 2, 10, 10, 4, 0, 2, 103, 8, 10, 4, - 100, 0, 103, 8, // 9 - 5, 10, 4, 103, 3, 2, 10, 10, 4, 3, 9, 2, 10, 10, 4, - 2, 3, 0, 9, 10, 4, 1, 2, 0, 9, 10, 4, 101, 1, - 0, 9, // 10 - 7, 10, 4, 8, 9, 2, 10, 10, 4, 103, 8, 2, 10, 10, 4, - 2, 8, 1, 9, 10, 4, 1, 8, 101, 9, 10, 4, 100, 2, - 103, 8, 10, 4, 1, 2, 100, 8, 10, 4, 101, 1, 100, 8, // 11 - 3, 10, 4, 102, 10, 1, 11, 10, 4, 103, 1, 102, 10, 10, 4, - 103, 3, 1, 10, // 12 - 7, 10, 4, 1, 10, 8, 11, 10, 4, 102, 10, 1, 11, 10, 4, - 0, 1, 103, 10, 10, 4, 0, 103, 8, 10, 10, 4, 0, 8, - 1, 10, 10, 4, 103, 1, 102, 10, 10, 4, 100, 0, 103, 8, // 13 - 7, 10, 4, 102, 3, 0, 11, 10, 4, 102, 0, 9, 11, 10, 4, - 3, 9, 0, 11, 10, 4, 3, 102, 10, 11, 10, 4, 3, 10, - 9, 11, 10, 4, 103, 3, 102, 10, 10, 4, 102, 0, 101, 9, // 14 - 6, 10, 4, 102, 10, 9, 11, 10, 4, 8, 9, 102, 10, 10, 4, - 103, 8, 102, 10, 10, 4, 102, 8, 101, 9, 10, 4, 102, 103, - 100, 8, 10, 4, 101, 102, 100, 8, // 15 - 1, 10, 4, 104, 7, 4, 8, // 16 - 3, 10, 4, 104, 4, 3, 7, 10, 4, 0, 3, 104, 4, 10, 4, - 104, 0, 100, 3, // 17 - 5, 10, 4, 101, 1, 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, - 0, 4, 7, 8, 10, 4, 104, 7, 4, 8, 10, 4, 0, 4, - 1, 7, // 18 - 7, 10, 4, 100, 1, 3, 9, 10, 4, 100, 3, 4, 9, 10, 4, - 1, 4, 3, 9, 10, 4, 100, 101, 1, 9, 10, 4, 3, 4, - 1, 7, 10, 4, 104, 4, 3, 7, 10, 4, 100, 3, 104, 4, // 19 - 6, 10, 4, 102, 2, 1, 11, 10, 4, 2, 4, 1, 11, 10, 4, - 2, 7, 4, 11, 10, 4, 4, 7, 2, 8, 10, 4, 104, 7, - 4, 8, 10, 4, 1, 4, 2, 8, // 20 - 9, 10, 4, 102, 2, 1, 11, 10, 4, 2, 4, 1, 11, 10, 4, - 2, 7, 4, 11, 10, 4, 3, 4, 2, 7, 10, 4, 104, 4, - 3, 7, 10, 4, 104, 0, 3, 4, 10, 4, 2, 3, 0, 4, - 10, 4, 1, 2, 0, 4, 10, 4, 104, 0, 100, 3, // 21 - 10, 10, 4, 102, 2, 9, 11, 10, 4, 4, 9, 2, 11, 10, 4, - 2, 7, 4, 11, 10, 4, 102, 2, 0, 9, 10, 4, 2, 4, - 0, 9, 10, 4, 101, 102, 0, 9, 10, 4, 0, 7, 2, 8, - 10, 4, 0, 4, 7, 8, 10, 4, 104, 7, 4, 8, 10, 4, - 0, 4, 2, 7, // 22 - 11, 10, 4, 102, 2, 9, 11, 10, 4, 4, 9, 2, 11, 10, 4, - 2, 7, 4, 11, 10, 4, 101, 102, 2, 9, 10, 4, 101, 2, - 3, 9, 10, 4, 2, 4, 3, 9, 10, 4, 101, 3, 100, 9, - 10, 4, 3, 4, 100, 9, 10, 4, 3, 4, 2, 7, 10, 4, - 104, 4, 3, 7, 10, 4, 100, 3, 104, 4, // 23 - 5, 10, 4, 103, 3, 2, 10, 10, 4, 3, 7, 2, 10, 10, 4, - 4, 7, 3, 8, 10, 4, 104, 7, 4, 8, 10, 4, 3, 4, - 2, 7, // 24 - 7, 10, 4, 103, 100, 0, 10, 10, 4, 100, 7, 0, 10, 10, 4, - 0, 2, 103, 10, 10, 4, 0, 7, 2, 10, 10, 4, 0, 104, - 4, 7, 10, 4, 0, 4, 2, 7, 10, 4, 104, 0, 100, 7, // 25 - 10, 10, 4, 103, 3, 2, 10, 10, 4, 3, 7, 2, 10, 10, 4, - 101, 1, 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, 4, 7, - 3, 8, 10, 4, 104, 7, 4, 8, 10, 4, 0, 4, 3, 8, - 10, 4, 3, 4, 2, 7, 10, 4, 2, 3, 0, 4, 10, 4, - 1, 2, 0, 4, // 26 - 7, 10, 4, 103, 100, 2, 10, 10, 4, 100, 7, 2, 10, 10, 4, - 101, 1, 100, 9, 10, 4, 1, 4, 100, 9, 10, 4, 100, 4, - 2, 7, 10, 4, 104, 4, 100, 7, 10, 4, 1, 2, 100, 4, // 27 - 10, 10, 4, 1, 10, 7, 11, 10, 4, 102, 10, 1, 11, 10, 4, - 1, 7, 4, 11, 10, 4, 103, 3, 1, 10, 10, 4, 3, 7, - 1, 10, 10, 4, 102, 103, 1, 10, 10, 4, 1, 4, 3, 8, - 10, 4, 4, 7, 3, 8, 10, 4, 104, 7, 4, 8, 10, 4, - 3, 4, 1, 7, // 28 - 11, 10, 4, 1, 10, 7, 11, 10, 4, 102, 10, 1, 11, 10, 4, - 1, 7, 4, 11, 10, 4, 103, 100, 0, 10, 10, 4, 100, 7, - 0, 10, 10, 4, 0, 1, 103, 10, 10, 4, 0, 7, 1, 10, - 10, 4, 102, 103, 1, 10, 10, 4, 104, 0, 100, 7, 10, 4, - 104, 4, 0, 7, 10, 4, 0, 4, 1, 7, // 29 - 15, 10, 4, 102, 3, 0, 11, 10, 4, 102, 0, 9, 11, 10, 4, - 3, 9, 0, 11, 10, 4, 3, 10, 9, 11, 10, 4, 102, 10, - 3, 11, 10, 4, 9, 10, 7, 11, 10, 4, 4, 9, 7, 11, - 10, 4, 7, 9, 3, 10, 10, 4, 102, 103, 3, 10, 10, 4, - 3, 7, 4, 9, 10, 4, 3, 4, 0, 9, 10, 4, 102, 0, - 101, 9, 10, 4, 4, 7, 3, 8, 10, 4, 104, 7, 4, 8, - 10, 4, 0, 4, 3, 8, // 30 - 10, 10, 4, 9, 10, 7, 11, 10, 4, 102, 10, 9, 11, 10, 4, - 4, 9, 7, 11, 10, 4, 103, 100, 9, 10, 10, 4, 7, 9, - 100, 10, 10, 4, 103, 9, 102, 10, 10, 4, 100, 7, 4, 9, - 10, 4, 102, 103, 100, 9, 10, 4, 101, 102, 100, 9, 10, 4, - 104, 4, 100, 7, // 31 - 1, 10, 4, 4, 5, 105, 9, // 32 - 5, 10, 4, 105, 4, 5, 9, 10, 4, 0, 5, 4, 9, 10, 4, - 0, 3, 100, 8, 10, 4, 0, 4, 3, 8, 10, 4, 3, 4, - 0, 5, // 33 - 3, 10, 4, 1, 4, 105, 5, 10, 4, 105, 1, 0, 4, 10, 4, - 101, 0, 105, 1, // 34 - 7, 10, 4, 100, 101, 1, 8, 10, 4, 101, 4, 1, 8, 10, 4, - 100, 1, 3, 8, 10, 4, 1, 4, 3, 8, 10, 4, 3, 4, - 1, 5, 10, 4, 1, 4, 105, 5, 10, 4, 105, 1, 101, 4, // 35 - 5, 10, 4, 102, 2, 1, 11, 10, 4, 2, 5, 1, 11, 10, 4, - 105, 4, 5, 9, 10, 4, 1, 5, 4, 9, 10, 4, 2, 4, - 1, 5, // 36 - 10, 10, 4, 102, 2, 1, 11, 10, 4, 2, 5, 1, 11, 10, 4, - 1, 4, 0, 9, 10, 4, 105, 4, 5, 9, 10, 4, 1, 5, - 4, 9, 10, 4, 0, 3, 100, 8, 10, 4, 0, 4, 3, 8, - 10, 4, 2, 4, 1, 5, 10, 4, 1, 2, 0, 4, 10, 4, - 2, 3, 0, 4, // 37 - 7, 10, 4, 102, 2, 0, 11, 10, 4, 2, 5, 0, 11, 10, 4, - 101, 102, 0, 11, 10, 4, 101, 0, 5, 11, 10, 4, 105, 0, - 4, 5, 10, 4, 2, 4, 0, 5, 10, 4, 101, 0, 105, 5, // 38 - 7, 10, 4, 101, 102, 2, 11, 10, 4, 101, 2, 5, 11, 10, 4, - 101, 3, 100, 8, 10, 4, 101, 4, 3, 8, 10, 4, 101, 2, - 4, 5, 10, 4, 101, 4, 105, 5, 10, 4, 101, 2, 3, 4, // 39 - 6, 10, 4, 103, 3, 2, 10, 10, 4, 3, 4, 2, 10, 10, 4, - 4, 5, 2, 10, 10, 4, 4, 5, 105, 9, 10, 4, 2, 5, - 4, 9, 10, 4, 2, 4, 3, 9, // 40 - 10, 10, 4, 2, 103, 8, 10, 10, 4, 2, 8, 4, 10, 10, 4, - 4, 5, 2, 10, 10, 4, 2, 5, 0, 9, 10, 4, 105, 4, - 5, 9, 10, 4, 0, 5, 4, 9, 10, 4, 0, 2, 103, 8, - 10, 4, 0, 4, 2, 8, 10, 4, 103, 100, 0, 8, 10, 4, - 2, 4, 0, 5, // 41 - 9, 10, 4, 103, 3, 2, 10, 10, 4, 3, 4, 2, 10, 10, 4, - 4, 5, 2, 10, 10, 4, 105, 1, 4, 5, 10, 4, 2, 4, - 1, 5, 10, 4, 105, 1, 0, 4, 10, 4, 1, 2, 0, 4, - 10, 4, 2, 3, 0, 4, 10, 4, 101, 0, 105, 1, // 42 - 11, 10, 4, 2, 8, 4, 10, 10, 4, 103, 8, 2, 10, 10, 4, - 4, 5, 2, 10, 10, 4, 101, 1, 100, 8, 10, 4, 101, 4, - 1, 8, 10, 4, 1, 2, 100, 8, 10, 4, 1, 4, 2, 8, - 10, 4, 103, 100, 2, 8, 10, 4, 105, 1, 4, 5, 10, 4, - 2, 4, 1, 5, 10, 4, 101, 105, 1, 4, // 43 - 10, 10, 4, 1, 10, 5, 11, 10, 4, 102, 10, 1, 11, 10, 4, - 102, 103, 1, 10, 10, 4, 103, 3, 1, 10, 10, 4, 3, 5, - 1, 10, 10, 4, 4, 5, 3, 10, 10, 4, 1, 4, 3, 9, - 10, 4, 4, 5, 105, 9, 10, 4, 1, 5, 4, 9, 10, 4, - 3, 4, 1, 5, // 44 - 14, 10, 4, 1, 10, 5, 11, 10, 4, 102, 10, 1, 11, 10, 4, - 0, 1, 103, 10, 10, 4, 0, 103, 8, 10, 10, 4, 0, 8, - 1, 10, 10, 4, 102, 103, 1, 10, 10, 4, 1, 8, 5, 10, - 10, 4, 5, 8, 4, 10, 10, 4, 1, 4, 0, 9, 10, 4, - 4, 5, 105, 9, 10, 4, 1, 5, 4, 9, 10, 4, 4, 5, - 1, 8, 10, 4, 0, 4, 1, 8, 10, 4, 103, 100, 0, 8, // 45 - 11, 10, 4, 3, 10, 5, 11, 10, 4, 102, 10, 3, 11, 10, 4, - 102, 3, 0, 11, 10, 4, 3, 5, 0, 11, 10, 4, 102, 0, - 101, 11, 10, 4, 0, 5, 101, 11, 10, 4, 102, 103, 3, 10, - 10, 4, 4, 5, 3, 10, 10, 4, 101, 0, 105, 5, 10, 4, - 0, 4, 105, 5, 10, 4, 3, 4, 0, 5, // 46 - 10, 10, 4, 8, 10, 5, 11, 10, 4, 102, 10, 8, 11, 10, 4, - 101, 102, 8, 11, 10, 4, 101, 8, 5, 11, 10, 4, 103, 8, - 102, 10, 10, 4, 5, 8, 4, 10, 10, 4, 101, 4, 5, 8, - 10, 4, 101, 102, 100, 8, 10, 4, 102, 103, 100, 8, 10, 4, - 101, 4, 105, 5, // 47 - 3, 10, 4, 105, 8, 5, 9, 10, 4, 104, 5, 105, 8, 10, 4, - 104, 7, 5, 8, // 48 - 7, 10, 4, 0, 5, 7, 9, 10, 4, 104, 7, 5, 9, 10, 4, - 0, 7, 104, 9, 10, 4, 105, 104, 5, 9, 10, 4, 0, 3, - 104, 7, 10, 4, 0, 5, 3, 7, 10, 4, 104, 0, 100, 3, // 49 - 7, 10, 4, 0, 5, 7, 8, 10, 4, 104, 7, 5, 8, 10, 4, - 105, 104, 5, 8, 10, 4, 105, 5, 0, 8, 10, 4, 0, 5, - 1, 7, 10, 4, 105, 1, 0, 5, 10, 4, 101, 0, 105, 1, // 50 - 6, 10, 4, 104, 5, 3, 7, 10, 4, 1, 3, 104, 5, 10, 4, - 105, 1, 104, 5, 10, 4, 100, 104, 1, 3, 10, 4, 104, 105, - 101, 1, 10, 4, 100, 104, 101, 1, // 51 - 10, 10, 4, 2, 7, 5, 11, 10, 4, 102, 2, 1, 11, 10, 4, - 2, 5, 1, 11, 10, 4, 5, 8, 1, 9, 10, 4, 105, 8, - 5, 9, 10, 4, 105, 104, 5, 8, 10, 4, 1, 5, 7, 8, - 10, 4, 104, 7, 5, 8, 10, 4, 1, 7, 2, 8, 10, 4, - 1, 5, 2, 7, // 52 - 14, 10, 4, 2, 7, 5, 11, 10, 4, 102, 2, 1, 11, 10, 4, - 2, 5, 1, 11, 10, 4, 104, 0, 7, 9, 10, 4, 5, 7, - 0, 9, 10, 4, 104, 7, 5, 9, 10, 4, 105, 104, 5, 9, - 10, 4, 1, 5, 0, 9, 10, 4, 104, 0, 3, 7, 10, 4, - 0, 5, 3, 7, 10, 4, 3, 5, 2, 7, 10, 4, 2, 3, - 0, 5, 10, 4, 1, 2, 0, 5, 10, 4, 104, 0, 100, 3, // 53 - 12, 10, 4, 2, 7, 5, 11, 10, 4, 102, 2, 0, 11, 10, 4, - 2, 5, 0, 11, 10, 4, 102, 0, 101, 11, 10, 4, 0, 5, - 101, 11, 10, 4, 0, 7, 2, 8, 10, 4, 0, 5, 7, 8, - 10, 4, 104, 7, 5, 8, 10, 4, 105, 104, 5, 8, 10, 4, - 105, 5, 0, 8, 10, 4, 0, 5, 2, 7, 10, 4, 101, 0, - 105, 5, // 54 - 10, 10, 4, 2, 7, 5, 11, 10, 4, 102, 2, 101, 11, 10, 4, - 2, 5, 101, 11, 10, 4, 3, 5, 2, 7, 10, 4, 104, 5, - 3, 7, 10, 4, 105, 101, 3, 5, 10, 4, 2, 3, 101, 5, - 10, 4, 104, 105, 3, 5, 10, 4, 104, 105, 101, 3, 10, 4, - 101, 100, 104, 3, // 55 - 10, 10, 4, 103, 3, 2, 10, 10, 4, 3, 7, 2, 10, 10, 4, - 2, 7, 5, 10, 10, 4, 5, 8, 3, 9, 10, 4, 105, 8, - 5, 9, 10, 4, 2, 5, 3, 9, 10, 4, 5, 7, 3, 8, - 10, 4, 104, 7, 5, 8, 10, 4, 104, 5, 105, 8, 10, 4, - 3, 5, 2, 7, // 56 - 12, 10, 4, 103, 100, 0, 10, 10, 4, 100, 7, 0, 10, 10, 4, - 103, 0, 2, 10, 10, 4, 0, 7, 2, 10, 10, 4, 2, 7, - 5, 10, 10, 4, 2, 5, 0, 9, 10, 4, 0, 5, 7, 9, - 10, 4, 104, 7, 5, 9, 10, 4, 0, 7, 104, 9, 10, 4, - 105, 104, 5, 9, 10, 4, 0, 5, 2, 7, 10, 4, 104, 0, - 100, 7, // 57 - 14, 10, 4, 103, 3, 2, 10, 10, 4, 3, 7, 2, 10, 10, 4, - 2, 7, 5, 10, 10, 4, 0, 7, 3, 8, 10, 4, 5, 7, - 0, 8, 10, 4, 104, 7, 5, 8, 10, 4, 105, 104, 5, 8, - 10, 4, 105, 5, 0, 8, 10, 4, 0, 5, 3, 7, 10, 4, - 3, 5, 2, 7, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, - 0, 5, 10, 4, 105, 1, 0, 5, 10, 4, 101, 0, 105, 1, // 58 - 10, 10, 4, 103, 100, 2, 10, 10, 4, 100, 7, 2, 10, 10, 4, - 2, 7, 5, 10, 10, 4, 1, 104, 5, 7, 10, 4, 1, 5, - 2, 7, 10, 4, 104, 1, 100, 7, 10, 4, 1, 2, 100, 7, - 10, 4, 105, 1, 104, 5, 10, 4, 101, 100, 104, 1, 10, 4, - 104, 105, 101, 1, // 59 - 12, 10, 4, 1, 10, 5, 11, 10, 4, 102, 10, 1, 11, 10, 4, - 3, 7, 5, 10, 10, 4, 103, 3, 1, 10, 10, 4, 3, 5, - 1, 10, 10, 4, 102, 103, 1, 10, 10, 4, 5, 8, 1, 9, - 10, 4, 105, 8, 5, 9, 10, 4, 5, 7, 3, 8, 10, 4, - 104, 7, 5, 8, 10, 4, 1, 5, 3, 8, 10, 4, 105, 104, - 5, 8, // 60 - 15, 10, 4, 1, 10, 5, 11, 10, 4, 102, 10, 1, 11, 10, 4, - 103, 100, 0, 10, 10, 4, 100, 7, 0, 10, 10, 4, 0, 1, - 103, 10, 10, 4, 0, 7, 1, 10, 10, 4, 1, 7, 5, 10, - 10, 4, 102, 103, 1, 10, 10, 4, 104, 0, 7, 9, 10, 4, - 5, 7, 0, 9, 10, 4, 104, 7, 5, 9, 10, 4, 105, 104, - 5, 9, 10, 4, 1, 5, 0, 9, 10, 4, 0, 5, 1, 7, - 10, 4, 104, 0, 100, 7, // 61 - 15, 10, 4, 3, 10, 5, 11, 10, 4, 102, 10, 3, 11, 10, 4, - 102, 3, 0, 11, 10, 4, 3, 5, 0, 11, 10, 4, 102, 0, - 101, 11, 10, 4, 0, 5, 101, 11, 10, 4, 3, 7, 5, 10, - 10, 4, 102, 103, 3, 10, 10, 4, 0, 7, 3, 8, 10, 4, - 0, 5, 7, 8, 10, 4, 104, 7, 5, 8, 10, 4, 105, 104, - 5, 8, 10, 4, 105, 5, 0, 8, 10, 4, 0, 5, 3, 7, - 10, 4, 101, 0, 105, 5, // 62 - 9, 10, 4, 101, 102, 10, 11, 10, 4, 101, 10, 5, 11, 10, 4, - 100, 7, 5, 10, 10, 4, 101, 102, 100, 10, 10, 4, 101, 100, - 5, 10, 10, 4, 102, 103, 100, 10, 10, 4, 104, 5, 100, 7, - 10, 4, 104, 105, 101, 5, 10, 4, 101, 100, 104, 5, // 63 - 1, 10, 4, 5, 6, 106, 11, // 64 - 6, 10, 4, 5, 6, 106, 11, 10, 4, 3, 6, 5, 11, 10, 4, - 3, 5, 0, 11, 10, 4, 0, 3, 100, 8, 10, 4, 0, 5, - 3, 8, 10, 4, 5, 6, 3, 8, // 65 - 5, 10, 4, 5, 6, 106, 11, 10, 4, 1, 6, 5, 11, 10, 4, - 101, 1, 0, 9, 10, 4, 1, 5, 0, 9, 10, 4, 0, 5, - 1, 6, // 66 - 10, 10, 4, 3, 6, 1, 11, 10, 4, 106, 5, 6, 11, 10, 4, - 1, 6, 5, 11, 10, 4, 101, 1, 8, 9, 10, 4, 5, 8, - 1, 9, 10, 4, 100, 101, 1, 8, 10, 4, 100, 1, 3, 8, - 10, 4, 1, 5, 3, 8, 10, 4, 5, 6, 3, 8, 10, 4, - 3, 5, 1, 6, // 67 - 3, 10, 4, 2, 5, 106, 6, 10, 4, 106, 2, 1, 5, 10, 4, - 102, 1, 106, 2, // 68 - 9, 10, 4, 0, 3, 100, 8, 10, 4, 0, 5, 3, 8, 10, 4, - 5, 6, 3, 8, 10, 4, 106, 2, 5, 6, 10, 4, 3, 5, - 2, 6, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, 0, 5, - 10, 4, 106, 2, 1, 5, 10, 4, 106, 102, 1, 2, // 69 - 7, 10, 4, 102, 2, 0, 9, 10, 4, 2, 5, 0, 9, 10, 4, - 102, 5, 2, 9, 10, 4, 101, 102, 0, 9, 10, 4, 0, 5, - 2, 6, 10, 4, 106, 2, 5, 6, 10, 4, 102, 106, 2, 5, // 70 - 11, 10, 4, 101, 102, 2, 9, 10, 4, 102, 5, 2, 9, 10, 4, - 101, 2, 3, 9, 10, 4, 2, 5, 3, 9, 10, 4, 101, 3, - 8, 9, 10, 4, 5, 8, 3, 9, 10, 4, 101, 3, 100, 8, - 10, 4, 5, 6, 3, 8, 10, 4, 106, 2, 5, 6, 10, 4, - 3, 5, 2, 6, 10, 4, 106, 2, 102, 5, // 71 - 5, 10, 4, 106, 5, 6, 11, 10, 4, 2, 6, 5, 11, 10, 4, - 103, 3, 2, 10, 10, 4, 3, 6, 2, 10, 10, 4, 3, 5, - 2, 6, // 72 - 10, 10, 4, 2, 5, 0, 11, 10, 4, 106, 5, 6, 11, 10, 4, - 2, 6, 5, 11, 10, 4, 2, 103, 8, 10, 10, 4, 2, 8, - 6, 10, 10, 4, 0, 2, 103, 8, 10, 4, 0, 6, 2, 8, - 10, 4, 103, 100, 0, 8, 10, 4, 5, 6, 0, 8, 10, 4, - 0, 5, 2, 6, // 73 - 10, 10, 4, 2, 5, 1, 11, 10, 4, 106, 5, 6, 11, 10, 4, - 2, 6, 5, 11, 10, 4, 103, 3, 2, 10, 10, 4, 3, 6, - 2, 10, 10, 4, 101, 1, 0, 9, 10, 4, 1, 5, 0, 9, - 10, 4, 3, 5, 2, 6, 10, 4, 2, 3, 0, 5, 10, 4, - 1, 2, 0, 5, // 74 - 12, 10, 4, 2, 5, 1, 11, 10, 4, 5, 6, 106, 11, 10, 4, - 2, 6, 5, 11, 10, 4, 2, 8, 6, 10, 10, 4, 103, 8, - 2, 10, 10, 4, 101, 1, 8, 9, 10, 4, 5, 8, 1, 9, - 10, 4, 103, 100, 2, 8, 10, 4, 101, 1, 100, 8, 10, 4, - 1, 2, 100, 8, 10, 4, 1, 5, 2, 8, 10, 4, 5, 6, - 2, 8, // 75 - 7, 10, 4, 103, 3, 1, 10, 10, 4, 3, 6, 1, 10, 10, 4, - 102, 103, 1, 10, 10, 4, 102, 1, 6, 10, 10, 4, 106, 1, - 5, 6, 10, 4, 3, 5, 1, 6, 10, 4, 102, 1, 106, 6, // 76 - 11, 10, 4, 0, 8, 6, 10, 10, 4, 103, 8, 0, 10, 10, 4, - 0, 1, 103, 10, 10, 4, 0, 6, 1, 10, 10, 4, 102, 103, - 1, 10, 10, 4, 102, 1, 6, 10, 10, 4, 103, 100, 0, 8, - 10, 4, 5, 6, 0, 8, 10, 4, 102, 1, 106, 6, 10, 4, - 106, 1, 5, 6, 10, 4, 0, 5, 1, 6, // 77 - 7, 10, 4, 102, 103, 3, 10, 10, 4, 102, 3, 6, 10, 10, 4, - 102, 0, 101, 9, 10, 4, 102, 5, 0, 9, 10, 4, 102, 3, - 5, 6, 10, 4, 102, 5, 106, 6, 10, 4, 102, 3, 0, 5, // 78 - 10, 10, 4, 102, 8, 9, 10, 10, 4, 6, 9, 8, 10, 10, 4, - 102, 9, 6, 10, 10, 4, 102, 103, 8, 10, 10, 4, 102, 5, - 6, 9, 10, 4, 5, 8, 6, 9, 10, 4, 101, 102, 8, 9, - 10, 4, 101, 102, 100, 8, 10, 4, 102, 103, 100, 8, 10, 4, - 102, 5, 106, 6, // 79 - 5, 10, 4, 106, 5, 6, 11, 10, 4, 5, 8, 6, 11, 10, 4, - 4, 6, 5, 8, 10, 4, 4, 7, 6, 8, 10, 4, 104, 7, - 4, 8, // 80 - 9, 10, 4, 106, 5, 6, 11, 10, 4, 3, 6, 5, 11, 10, 4, - 3, 5, 0, 11, 10, 4, 104, 4, 3, 7, 10, 4, 4, 6, - 3, 7, 10, 4, 4, 5, 3, 6, 10, 4, 3, 4, 0, 5, - 10, 4, 0, 3, 104, 4, 10, 4, 100, 104, 0, 3, // 81 - 10, 10, 4, 106, 5, 6, 11, 10, 4, 1, 6, 5, 11, 10, 4, - 1, 5, 4, 9, 10, 4, 101, 1, 0, 9, 10, 4, 1, 4, - 0, 9, 10, 4, 4, 7, 0, 8, 10, 4, 104, 7, 4, 8, - 10, 4, 4, 6, 0, 7, 10, 4, 4, 5, 1, 6, 10, 4, - 0, 4, 1, 6, // 82 - 14, 10, 4, 3, 6, 1, 11, 10, 4, 106, 5, 6, 11, 10, 4, - 1, 6, 5, 11, 10, 4, 1, 5, 4, 9, 10, 4, 100, 1, - 3, 9, 10, 4, 100, 3, 4, 9, 10, 4, 1, 4, 3, 9, - 10, 4, 100, 101, 1, 9, 10, 4, 104, 4, 3, 7, 10, 4, - 4, 6, 3, 7, 10, 4, 3, 5, 1, 6, 10, 4, 4, 5, - 3, 6, 10, 4, 3, 4, 1, 5, 10, 4, 100, 3, 104, 4, // 83 - 9, 10, 4, 4, 7, 2, 8, 10, 4, 104, 7, 4, 8, 10, 4, - 1, 4, 2, 8, 10, 4, 4, 6, 2, 7, 10, 4, 106, 2, - 5, 6, 10, 4, 4, 5, 2, 6, 10, 4, 106, 2, 1, 5, - 10, 4, 2, 4, 1, 5, 10, 4, 102, 1, 106, 2, // 84 - 12, 10, 4, 104, 4, 3, 7, 10, 4, 4, 6, 3, 7, 10, 4, - 106, 2, 5, 6, 10, 4, 4, 5, 2, 6, 10, 4, 3, 4, - 2, 6, 10, 4, 106, 2, 1, 5, 10, 4, 2, 4, 1, 5, - 10, 4, 104, 0, 3, 4, 10, 4, 2, 3, 0, 4, 10, 4, - 1, 2, 0, 4, 10, 4, 104, 0, 100, 3, 10, 4, 106, 102, - 1, 2, // 85 - 14, 10, 4, 102, 2, 0, 9, 10, 4, 2, 5, 0, 9, 10, 4, - 102, 5, 2, 9, 10, 4, 102, 0, 101, 9, 10, 4, 0, 5, - 4, 9, 10, 4, 0, 7, 2, 8, 10, 4, 0, 4, 7, 8, - 10, 4, 104, 7, 4, 8, 10, 4, 4, 6, 2, 7, 10, 4, - 0, 4, 2, 7, 10, 4, 106, 2, 5, 6, 10, 4, 4, 5, - 2, 6, 10, 4, 2, 4, 0, 5, 10, 4, 102, 106, 2, 5, // 86 - 14, 10, 4, 102, 2, 101, 9, 10, 4, 102, 5, 2, 9, 10, 4, - 2, 5, 4, 9, 10, 4, 101, 2, 3, 9, 10, 4, 2, 4, - 3, 9, 10, 4, 101, 3, 100, 9, 10, 4, 3, 4, 100, 9, - 10, 4, 104, 4, 3, 7, 10, 4, 4, 6, 3, 7, 10, 4, - 106, 2, 5, 6, 10, 4, 4, 5, 2, 6, 10, 4, 3, 4, - 2, 6, 10, 4, 102, 106, 2, 5, 10, 4, 100, 3, 104, 4, // 87 - 10, 10, 4, 106, 5, 6, 11, 10, 4, 2, 6, 5, 11, 10, 4, - 3, 7, 6, 10, 10, 4, 103, 3, 2, 10, 10, 4, 3, 6, - 2, 10, 10, 4, 4, 7, 3, 8, 10, 4, 104, 7, 4, 8, - 10, 4, 4, 6, 3, 7, 10, 4, 4, 5, 2, 6, 10, 4, - 3, 4, 2, 6, // 88 - 14, 10, 4, 2, 5, 0, 11, 10, 4, 106, 5, 6, 11, 10, 4, - 2, 6, 5, 11, 10, 4, 103, 100, 0, 10, 10, 4, 100, 7, - 0, 10, 10, 4, 103, 0, 2, 10, 10, 4, 0, 7, 2, 10, - 10, 4, 2, 7, 6, 10, 10, 4, 4, 6, 2, 7, 10, 4, - 0, 104, 4, 7, 10, 4, 0, 4, 2, 7, 10, 4, 104, 0, - 100, 7, 10, 4, 4, 5, 2, 6, 10, 4, 2, 4, 0, 5, // 89 - 18, 10, 4, 2, 5, 1, 11, 10, 4, 106, 5, 6, 11, 10, 4, - 2, 6, 5, 11, 10, 4, 3, 7, 6, 10, 10, 4, 103, 3, - 2, 10, 10, 4, 3, 6, 2, 10, 10, 4, 1, 5, 4, 9, - 10, 4, 101, 1, 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, - 4, 7, 3, 8, 10, 4, 104, 7, 4, 8, 10, 4, 0, 4, - 3, 8, 10, 4, 4, 6, 3, 7, 10, 4, 4, 5, 2, 6, - 10, 4, 3, 4, 2, 6, 10, 4, 2, 4, 1, 5, 10, 4, - 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, // 90 - 15, 10, 4, 2, 5, 1, 11, 10, 4, 106, 5, 6, 11, 10, 4, - 2, 6, 5, 11, 10, 4, 103, 100, 2, 10, 10, 4, 100, 7, - 2, 10, 10, 4, 2, 7, 6, 10, 10, 4, 1, 5, 4, 9, - 10, 4, 101, 1, 100, 9, 10, 4, 1, 4, 100, 9, 10, 4, - 4, 6, 2, 7, 10, 4, 100, 4, 2, 7, 10, 4, 104, 4, - 100, 7, 10, 4, 4, 5, 2, 6, 10, 4, 2, 4, 1, 5, - 10, 4, 1, 2, 100, 4, // 91 - 14, 10, 4, 3, 7, 6, 10, 10, 4, 103, 3, 1, 10, 10, 4, - 3, 6, 1, 10, 10, 4, 103, 1, 102, 10, 10, 4, 1, 6, - 102, 10, 10, 4, 1, 4, 3, 8, 10, 4, 4, 7, 3, 8, - 10, 4, 104, 7, 4, 8, 10, 4, 4, 6, 3, 7, 10, 4, - 106, 1, 5, 6, 10, 4, 3, 5, 1, 6, 10, 4, 4, 5, - 3, 6, 10, 4, 102, 1, 106, 6, 10, 4, 3, 4, 1, 5, // 92 - 14, 10, 4, 103, 100, 0, 10, 10, 4, 100, 7, 0, 10, 10, 4, - 0, 7, 6, 10, 10, 4, 103, 0, 1, 10, 10, 4, 0, 6, - 1, 10, 10, 4, 103, 1, 102, 10, 10, 4, 1, 6, 102, 10, - 10, 4, 4, 6, 0, 7, 10, 4, 104, 4, 0, 7, 10, 4, - 104, 0, 100, 7, 10, 4, 0, 4, 1, 6, 10, 4, 4, 5, - 1, 6, 10, 4, 1, 5, 106, 6, 10, 4, 102, 1, 106, 6, // 93 - 15, 10, 4, 3, 7, 6, 10, 10, 4, 103, 3, 102, 10, 10, 4, - 3, 6, 102, 10, 10, 4, 102, 0, 101, 9, 10, 4, 102, 5, - 0, 9, 10, 4, 0, 5, 4, 9, 10, 4, 4, 7, 3, 8, - 10, 4, 104, 7, 4, 8, 10, 4, 0, 4, 3, 8, 10, 4, - 4, 6, 3, 7, 10, 4, 102, 3, 5, 6, 10, 4, 102, 5, - 106, 6, 10, 4, 4, 5, 3, 6, 10, 4, 3, 4, 0, 5, - 10, 4, 102, 3, 0, 5, // 94 - 13, 10, 4, 103, 100, 9, 10, 10, 4, 7, 9, 100, 10, 10, 4, - 6, 9, 7, 10, 10, 4, 102, 9, 6, 10, 10, 4, 103, 9, - 102, 10, 10, 4, 5, 6, 102, 9, 10, 4, 4, 6, 5, 9, - 10, 4, 4, 7, 6, 9, 10, 4, 100, 7, 4, 9, 10, 4, - 102, 103, 100, 9, 10, 4, 101, 102, 100, 9, 10, 4, 104, 4, - 100, 7, 10, 4, 102, 5, 106, 6, // 95 - 3, 10, 4, 106, 9, 6, 11, 10, 4, 4, 6, 106, 9, 10, 4, - 105, 4, 106, 9, // 96 - 10, 10, 4, 6, 9, 0, 11, 10, 4, 106, 9, 6, 11, 10, 4, - 3, 6, 0, 11, 10, 4, 106, 4, 6, 9, 10, 4, 0, 6, - 4, 9, 10, 4, 106, 105, 4, 9, 10, 4, 100, 0, 3, 8, - 10, 4, 0, 4, 3, 8, 10, 4, 4, 6, 3, 8, 10, 4, - 3, 4, 0, 6, // 97 - 7, 10, 4, 105, 1, 4, 11, 10, 4, 105, 4, 106, 11, 10, 4, - 4, 6, 106, 11, 10, 4, 1, 6, 4, 11, 10, 4, 0, 4, - 1, 6, 10, 4, 105, 1, 0, 4, 10, 4, 105, 101, 0, 1, // 98 - 12, 10, 4, 3, 6, 1, 11, 10, 4, 106, 105, 4, 11, 10, 4, - 1, 4, 105, 11, 10, 4, 106, 4, 6, 11, 10, 4, 1, 6, - 4, 11, 10, 4, 100, 101, 1, 8, 10, 4, 101, 4, 1, 8, - 10, 4, 100, 1, 3, 8, 10, 4, 1, 4, 3, 8, 10, 4, - 4, 6, 3, 8, 10, 4, 3, 4, 1, 6, 10, 4, 105, 1, - 101, 4, // 99 - 7, 10, 4, 106, 4, 6, 9, 10, 4, 1, 6, 4, 9, 10, 4, - 106, 6, 1, 9, 10, 4, 106, 105, 4, 9, 10, 4, 106, 2, - 1, 6, 10, 4, 2, 4, 1, 6, 10, 4, 102, 1, 106, 2, // 100 - 14, 10, 4, 1, 4, 0, 9, 10, 4, 106, 4, 6, 9, 10, 4, - 1, 6, 4, 9, 10, 4, 106, 6, 1, 9, 10, 4, 105, 4, - 106, 9, 10, 4, 100, 0, 3, 8, 10, 4, 0, 4, 3, 8, - 10, 4, 4, 6, 3, 8, 10, 4, 106, 2, 1, 6, 10, 4, - 2, 4, 1, 6, 10, 4, 3, 4, 2, 6, 10, 4, 2, 3, - 0, 4, 10, 4, 1, 2, 0, 4, 10, 4, 106, 102, 1, 2, // 101 - 6, 10, 4, 2, 4, 106, 6, 10, 4, 106, 2, 0, 4, 10, 4, - 106, 0, 105, 4, 10, 4, 102, 0, 106, 2, 10, 4, 105, 106, - 102, 0, 10, 4, 101, 105, 102, 0, // 102 - 10, 10, 4, 101, 3, 100, 8, 10, 4, 101, 4, 3, 8, 10, 4, - 4, 6, 3, 8, 10, 4, 106, 2, 4, 6, 10, 4, 3, 4, - 2, 6, 10, 4, 101, 105, 2, 4, 10, 4, 101, 2, 3, 4, - 10, 4, 106, 2, 105, 4, 10, 4, 105, 106, 102, 2, 10, 4, - 101, 105, 102, 2, // 103 - 10, 10, 4, 6, 9, 2, 11, 10, 4, 106, 9, 6, 11, 10, 4, - 4, 6, 3, 10, 10, 4, 103, 3, 2, 10, 10, 4, 3, 6, - 2, 10, 10, 4, 106, 4, 6, 9, 10, 4, 2, 6, 4, 9, - 10, 4, 106, 105, 4, 9, 10, 4, 2, 4, 3, 9, 10, 4, - 3, 4, 2, 6, // 104 - 12, 10, 4, 6, 9, 2, 11, 10, 4, 106, 9, 6, 11, 10, 4, - 2, 8, 6, 10, 10, 4, 103, 8, 2, 10, 10, 4, 106, 105, - 4, 9, 10, 4, 106, 4, 6, 9, 10, 4, 2, 6, 4, 9, - 10, 4, 2, 4, 0, 9, 10, 4, 103, 100, 0, 8, 10, 4, - 0, 2, 103, 8, 10, 4, 0, 4, 2, 8, 10, 4, 4, 6, - 2, 8, // 105 - 14, 10, 4, 105, 1, 4, 11, 10, 4, 105, 4, 106, 11, 10, 4, - 106, 4, 6, 11, 10, 4, 1, 6, 4, 11, 10, 4, 2, 6, - 1, 11, 10, 4, 4, 6, 3, 10, 10, 4, 103, 3, 2, 10, - 10, 4, 3, 6, 2, 10, 10, 4, 2, 4, 1, 6, 10, 4, - 3, 4, 2, 6, 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, - 0, 4, 10, 4, 105, 1, 0, 4, 10, 4, 105, 101, 0, 1, // 106 - 15, 10, 4, 106, 105, 4, 11, 10, 4, 1, 4, 105, 11, 10, 4, - 106, 4, 6, 11, 10, 4, 1, 6, 4, 11, 10, 4, 2, 6, - 1, 11, 10, 4, 2, 8, 6, 10, 10, 4, 103, 8, 2, 10, - 10, 4, 101, 1, 100, 8, 10, 4, 101, 4, 1, 8, 10, 4, - 1, 2, 100, 8, 10, 4, 1, 4, 2, 8, 10, 4, 103, 100, - 2, 8, 10, 4, 4, 6, 2, 8, 10, 4, 2, 4, 1, 6, - 10, 4, 101, 105, 1, 4, // 107 - 12, 10, 4, 4, 6, 3, 10, 10, 4, 103, 3, 1, 10, 10, 4, - 3, 6, 1, 10, 10, 4, 103, 1, 102, 10, 10, 4, 1, 6, - 102, 10, 10, 4, 1, 4, 3, 9, 10, 4, 106, 4, 6, 9, - 10, 4, 1, 6, 4, 9, 10, 4, 106, 6, 1, 9, 10, 4, - 106, 105, 4, 9, 10, 4, 3, 4, 1, 6, 10, 4, 102, 1, - 106, 6, // 108 - 15, 10, 4, 0, 8, 6, 10, 10, 4, 103, 8, 0, 10, 10, 4, - 103, 0, 1, 10, 10, 4, 0, 6, 1, 10, 10, 4, 103, 1, - 102, 10, 10, 4, 1, 6, 102, 10, 10, 4, 1, 4, 0, 9, - 10, 4, 1, 106, 6, 9, 10, 4, 4, 6, 106, 9, 10, 4, - 1, 6, 4, 9, 10, 4, 105, 4, 106, 9, 10, 4, 103, 100, - 0, 8, 10, 4, 4, 6, 0, 8, 10, 4, 0, 4, 1, 6, - 10, 4, 102, 1, 106, 6, // 109 - 10, 10, 4, 4, 6, 3, 10, 10, 4, 103, 3, 102, 10, 10, 4, - 3, 6, 102, 10, 10, 4, 106, 0, 4, 6, 10, 4, 3, 4, - 0, 6, 10, 4, 102, 0, 106, 6, 10, 4, 102, 3, 0, 6, - 10, 4, 106, 0, 105, 4, 10, 4, 105, 106, 102, 0, 10, 4, - 102, 101, 105, 0, // 110 - 9, 10, 4, 102, 8, 6, 10, 10, 4, 103, 8, 102, 10, 10, 4, - 101, 102, 100, 8, 10, 4, 101, 4, 102, 8, 10, 4, 102, 103, - 100, 8, 10, 4, 4, 6, 102, 8, 10, 4, 102, 4, 106, 6, - 10, 4, 101, 105, 102, 4, 10, 4, 105, 106, 102, 4, // 111 - 7, 10, 4, 6, 9, 8, 11, 10, 4, 106, 9, 6, 11, 10, 4, - 105, 7, 6, 9, 10, 4, 7, 8, 6, 9, 10, 4, 105, 8, - 7, 9, 10, 4, 105, 6, 106, 9, 10, 4, 104, 7, 105, 8, // 112 - 11, 10, 4, 6, 9, 0, 11, 10, 4, 106, 9, 6, 11, 10, 4, - 3, 6, 0, 11, 10, 4, 104, 0, 7, 9, 10, 4, 104, 7, - 105, 9, 10, 4, 6, 7, 0, 9, 10, 4, 105, 7, 6, 9, - 10, 4, 106, 105, 6, 9, 10, 4, 104, 0, 3, 7, 10, 4, - 0, 6, 3, 7, 10, 4, 104, 0, 100, 3, // 113 - 7, 10, 4, 105, 1, 6, 11, 10, 4, 105, 6, 106, 11, 10, 4, - 105, 7, 0, 8, 10, 4, 104, 7, 105, 8, 10, 4, 105, 6, - 0, 7, 10, 4, 105, 1, 0, 6, 10, 4, 105, 101, 0, 1, // 114 - 10, 10, 4, 3, 6, 1, 11, 10, 4, 106, 105, 6, 11, 10, 4, - 1, 6, 105, 11, 10, 4, 104, 105, 1, 7, 10, 4, 105, 6, - 1, 7, 10, 4, 1, 3, 104, 7, 10, 4, 1, 6, 3, 7, - 10, 4, 100, 104, 1, 3, 10, 4, 104, 105, 101, 1, 10, 4, - 100, 104, 101, 1, // 115 - 11, 10, 4, 7, 8, 1, 9, 10, 4, 105, 8, 7, 9, 10, 4, - 6, 7, 1, 9, 10, 4, 105, 7, 6, 9, 10, 4, 106, 105, - 6, 9, 10, 4, 106, 6, 1, 9, 10, 4, 104, 7, 105, 8, - 10, 4, 1, 7, 2, 8, 10, 4, 1, 6, 2, 7, 10, 4, - 106, 2, 1, 6, 10, 4, 102, 1, 106, 2, // 116 - 14, 10, 4, 104, 0, 7, 9, 10, 4, 104, 7, 105, 9, 10, 4, - 6, 7, 0, 9, 10, 4, 105, 7, 6, 9, 10, 4, 1, 6, - 0, 9, 10, 4, 106, 6, 1, 9, 10, 4, 105, 6, 106, 9, - 10, 4, 104, 0, 3, 7, 10, 4, 0, 6, 3, 7, 10, 4, - 1, 2, 0, 6, 10, 4, 106, 2, 1, 6, 10, 4, 2, 3, - 0, 6, 10, 4, 104, 0, 100, 3, 10, 4, 106, 102, 1, 2, // 117 - 10, 10, 4, 0, 7, 2, 8, 10, 4, 105, 7, 0, 8, 10, 4, - 104, 7, 105, 8, 10, 4, 105, 6, 0, 7, 10, 4, 0, 6, - 2, 7, 10, 4, 106, 0, 105, 6, 10, 4, 106, 2, 0, 6, - 10, 4, 102, 0, 106, 2, 10, 4, 105, 106, 102, 0, 10, 4, - 102, 101, 105, 0, // 118 - 9, 10, 4, 104, 105, 3, 7, 10, 4, 105, 6, 3, 7, 10, 4, - 106, 2, 105, 6, 10, 4, 2, 3, 105, 6, 10, 4, 104, 105, - 101, 3, 10, 4, 105, 2, 101, 3, 10, 4, 101, 100, 104, 3, - 10, 4, 105, 106, 102, 2, 10, 4, 102, 101, 105, 2, // 119 - 14, 10, 4, 6, 9, 2, 11, 10, 4, 106, 9, 6, 11, 10, 4, - 3, 7, 6, 10, 10, 4, 103, 3, 2, 10, 10, 4, 3, 6, - 2, 10, 10, 4, 105, 7, 6, 9, 10, 4, 7, 8, 6, 9, - 10, 4, 105, 8, 7, 9, 10, 4, 106, 105, 6, 9, 10, 4, - 2, 6, 8, 9, 10, 4, 2, 8, 3, 9, 10, 4, 2, 6, - 3, 8, 10, 4, 6, 7, 3, 8, 10, 4, 104, 7, 105, 8, // 120 - 15, 10, 4, 6, 9, 2, 11, 10, 4, 106, 9, 6, 11, 10, 4, - 103, 100, 0, 10, 10, 4, 100, 7, 0, 10, 10, 4, 0, 2, - 103, 10, 10, 4, 0, 7, 2, 10, 10, 4, 2, 7, 6, 10, - 10, 4, 104, 0, 7, 9, 10, 4, 104, 7, 105, 9, 10, 4, - 6, 7, 0, 9, 10, 4, 105, 7, 6, 9, 10, 4, 106, 105, - 6, 9, 10, 4, 2, 6, 0, 9, 10, 4, 0, 6, 2, 7, - 10, 4, 104, 0, 100, 7, // 121 - 15, 10, 4, 105, 1, 6, 11, 10, 4, 105, 6, 106, 11, 10, 4, - 2, 6, 1, 11, 10, 4, 3, 7, 6, 10, 10, 4, 103, 3, - 2, 10, 10, 4, 3, 6, 2, 10, 10, 4, 0, 7, 3, 8, - 10, 4, 105, 7, 0, 8, 10, 4, 104, 7, 105, 8, 10, 4, - 105, 6, 0, 7, 10, 4, 0, 6, 3, 7, 10, 4, 1, 2, - 0, 6, 10, 4, 2, 3, 0, 6, 10, 4, 105, 1, 0, 6, - 10, 4, 105, 101, 0, 1, // 122 - 13, 10, 4, 106, 105, 6, 11, 10, 4, 1, 6, 105, 11, 10, 4, - 2, 6, 1, 11, 10, 4, 103, 100, 2, 10, 10, 4, 100, 7, - 2, 10, 10, 4, 2, 7, 6, 10, 10, 4, 104, 105, 1, 7, - 10, 4, 105, 6, 1, 7, 10, 4, 1, 6, 2, 7, 10, 4, - 104, 1, 100, 7, 10, 4, 1, 2, 100, 7, 10, 4, 101, 100, - 104, 1, 10, 4, 104, 105, 101, 1, // 123 - 15, 10, 4, 3, 7, 6, 10, 10, 4, 103, 3, 1, 10, 10, 4, - 3, 6, 1, 10, 10, 4, 103, 1, 102, 10, 10, 4, 1, 6, - 102, 10, 10, 4, 7, 8, 1, 9, 10, 4, 105, 8, 7, 9, - 10, 4, 6, 7, 1, 9, 10, 4, 105, 7, 6, 9, 10, 4, - 106, 105, 6, 9, 10, 4, 106, 6, 1, 9, 10, 4, 1, 7, - 3, 8, 10, 4, 104, 7, 105, 8, 10, 4, 1, 6, 3, 7, - 10, 4, 102, 1, 106, 6, // 124 - 16, 10, 4, 103, 100, 0, 10, 10, 4, 100, 7, 0, 10, 10, 4, - 0, 7, 6, 10, 10, 4, 103, 0, 1, 10, 10, 4, 0, 6, - 1, 10, 10, 4, 103, 1, 102, 10, 10, 4, 1, 6, 102, 10, - 10, 4, 104, 0, 7, 9, 10, 4, 104, 7, 105, 9, 10, 4, - 6, 7, 0, 9, 10, 4, 105, 7, 6, 9, 10, 4, 1, 6, - 0, 9, 10, 4, 106, 6, 1, 9, 10, 4, 105, 6, 106, 9, - 10, 4, 104, 0, 100, 7, 10, 4, 102, 1, 106, 6, // 125 - 13, 10, 4, 3, 7, 6, 10, 10, 4, 103, 3, 102, 10, 10, 4, - 3, 6, 102, 10, 10, 4, 0, 7, 3, 8, 10, 4, 105, 7, - 0, 8, 10, 4, 104, 7, 105, 8, 10, 4, 105, 6, 0, 7, - 10, 4, 0, 6, 3, 7, 10, 4, 102, 0, 106, 6, 10, 4, - 102, 3, 0, 6, 10, 4, 106, 0, 105, 6, 10, 4, 105, 106, - 102, 0, 10, 4, 102, 101, 105, 0, // 126 - 10, 10, 4, 101, 100, 7, 10, 10, 4, 101, 7, 6, 10, 10, 4, - 101, 102, 100, 10, 10, 4, 101, 6, 102, 10, 10, 4, 102, 103, - 100, 10, 10, 4, 104, 105, 101, 7, 10, 4, 105, 6, 101, 7, - 10, 4, 101, 100, 104, 7, 10, 4, 105, 106, 102, 6, 10, 4, - 102, 101, 105, 6, // 127 - 1, 10, 4, 6, 7, 107, 10, // 128 - 5, 10, 4, 6, 7, 107, 10, 10, 4, 3, 7, 6, 10, 10, 4, - 0, 3, 100, 8, 10, 4, 0, 7, 3, 8, 10, 4, 0, 6, - 3, 7, // 129 - 6, 10, 4, 6, 7, 107, 10, 10, 4, 0, 7, 6, 10, 10, 4, - 0, 6, 1, 10, 10, 4, 101, 1, 0, 9, 10, 4, 1, 6, - 0, 9, 10, 4, 6, 7, 0, 9, // 130 - 10, 10, 4, 3, 6, 1, 10, 10, 4, 6, 7, 107, 10, 10, 4, - 3, 7, 6, 10, 10, 4, 101, 1, 8, 9, 10, 4, 7, 8, - 1, 9, 10, 4, 6, 7, 1, 9, 10, 4, 100, 101, 1, 8, - 10, 4, 100, 1, 3, 8, 10, 4, 1, 7, 3, 8, 10, 4, - 1, 6, 3, 7, // 131 - 5, 10, 4, 102, 2, 1, 11, 10, 4, 2, 6, 1, 11, 10, 4, - 6, 7, 107, 10, 10, 4, 2, 7, 6, 10, 10, 4, 1, 6, - 2, 7, // 132 - 10, 10, 4, 102, 2, 1, 11, 10, 4, 2, 6, 1, 11, 10, 4, - 3, 6, 2, 10, 10, 4, 107, 6, 7, 10, 10, 4, 3, 7, - 6, 10, 10, 4, 0, 3, 100, 8, 10, 4, 0, 7, 3, 8, - 10, 4, 0, 6, 3, 7, 10, 4, 2, 3, 0, 6, 10, 4, - 1, 2, 0, 6, // 133 - 10, 10, 4, 102, 2, 9, 11, 10, 4, 6, 9, 2, 11, 10, 4, - 0, 7, 2, 10, 10, 4, 6, 7, 107, 10, 10, 4, 2, 7, - 6, 10, 10, 4, 102, 2, 0, 9, 10, 4, 2, 6, 0, 9, - 10, 4, 101, 102, 0, 9, 10, 4, 6, 7, 0, 9, 10, 4, - 0, 6, 2, 7, // 134 - 14, 10, 4, 102, 2, 9, 11, 10, 4, 6, 9, 2, 11, 10, 4, - 3, 6, 2, 10, 10, 4, 6, 7, 107, 10, 10, 4, 3, 7, - 6, 10, 10, 4, 101, 2, 3, 9, 10, 4, 101, 3, 8, 9, - 10, 4, 2, 8, 3, 9, 10, 4, 101, 102, 2, 9, 10, 4, - 6, 8, 2, 9, 10, 4, 7, 8, 6, 9, 10, 4, 2, 6, - 3, 8, 10, 4, 6, 7, 3, 8, 10, 4, 101, 3, 100, 8, // 135 - 3, 10, 4, 3, 6, 107, 7, 10, 4, 107, 3, 2, 6, 10, 4, - 103, 2, 107, 3, // 136 - 7, 10, 4, 0, 2, 103, 8, 10, 4, 2, 7, 103, 8, 10, 4, - 0, 7, 2, 8, 10, 4, 103, 100, 0, 8, 10, 4, 2, 6, - 107, 7, 10, 4, 0, 6, 2, 7, 10, 4, 107, 103, 2, 7, // 137 - 9, 10, 4, 101, 1, 0, 9, 10, 4, 1, 6, 0, 9, 10, 4, - 6, 7, 0, 9, 10, 4, 107, 3, 6, 7, 10, 4, 0, 6, - 3, 7, 10, 4, 2, 3, 0, 6, 10, 4, 107, 3, 2, 6, - 10, 4, 1, 2, 0, 6, 10, 4, 107, 103, 2, 3, // 138 - 11, 10, 4, 101, 1, 8, 9, 10, 4, 7, 8, 1, 9, 10, 4, - 6, 7, 1, 9, 10, 4, 101, 1, 100, 8, 10, 4, 1, 2, - 100, 8, 10, 4, 1, 7, 2, 8, 10, 4, 103, 100, 2, 8, - 10, 4, 103, 2, 7, 8, 10, 4, 103, 2, 107, 7, 10, 4, - 107, 2, 6, 7, 10, 4, 1, 6, 2, 7, // 139 - 7, 10, 4, 103, 3, 1, 11, 10, 4, 3, 6, 1, 11, 10, 4, - 103, 6, 3, 11, 10, 4, 102, 103, 1, 11, 10, 4, 1, 6, - 3, 7, 10, 4, 107, 3, 6, 7, 10, 4, 103, 107, 3, 6, // 140 - 7, 10, 4, 102, 103, 1, 11, 10, 4, 103, 6, 1, 11, 10, 4, - 103, 100, 0, 8, 10, 4, 103, 0, 7, 8, 10, 4, 107, 103, - 6, 7, 10, 4, 0, 6, 103, 7, 10, 4, 0, 1, 103, 6, // 141 - 11, 10, 4, 102, 103, 3, 11, 10, 4, 103, 6, 3, 11, 10, 4, - 102, 3, 0, 11, 10, 4, 3, 6, 0, 11, 10, 4, 102, 0, - 9, 11, 10, 4, 6, 9, 0, 11, 10, 4, 102, 0, 101, 9, - 10, 4, 6, 7, 0, 9, 10, 4, 3, 6, 107, 7, 10, 4, - 0, 6, 3, 7, 10, 4, 107, 3, 103, 6, // 142 - 10, 10, 4, 102, 103, 8, 11, 10, 4, 6, 8, 103, 11, 10, 4, - 8, 9, 102, 11, 10, 4, 6, 9, 8, 11, 10, 4, 101, 102, - 8, 9, 10, 4, 7, 8, 6, 9, 10, 4, 101, 102, 100, 8, - 10, 4, 102, 103, 100, 8, 10, 4, 103, 6, 7, 8, 10, 4, - 103, 6, 107, 7, // 143 - 3, 10, 4, 107, 6, 8, 10, 10, 4, 107, 6, 4, 8, 10, 4, - 107, 4, 104, 8, // 144 - 7, 10, 4, 4, 6, 3, 10, 10, 4, 107, 6, 4, 10, 10, 4, - 104, 4, 3, 10, 10, 4, 107, 4, 104, 10, 10, 4, 3, 4, - 0, 6, 10, 4, 0, 3, 104, 4, 10, 4, 100, 104, 0, 3, // 145 - 10, 10, 4, 6, 8, 107, 10, 10, 4, 0, 8, 6, 10, 10, 4, - 0, 6, 1, 10, 10, 4, 1, 6, 4, 9, 10, 4, 101, 1, - 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, 0, 4, 6, 8, - 10, 4, 107, 6, 4, 8, 10, 4, 104, 107, 4, 8, 10, 4, - 0, 4, 1, 6, // 146 - 12, 10, 4, 3, 6, 1, 10, 10, 4, 4, 6, 3, 10, 10, 4, - 107, 6, 4, 10, 10, 4, 104, 4, 3, 10, 10, 4, 107, 4, - 104, 10, 10, 4, 1, 6, 4, 9, 10, 4, 100, 1, 3, 9, - 10, 4, 100, 3, 4, 9, 10, 4, 1, 4, 3, 9, 10, 4, - 100, 101, 1, 9, 10, 4, 3, 4, 1, 6, 10, 4, 100, 3, - 104, 4, // 147 - 10, 10, 4, 102, 2, 1, 11, 10, 4, 2, 6, 1, 11, 10, 4, - 1, 6, 4, 11, 10, 4, 107, 6, 8, 10, 10, 4, 2, 8, - 6, 10, 10, 4, 4, 6, 2, 8, 10, 4, 107, 6, 4, 8, - 10, 4, 107, 4, 104, 8, 10, 4, 1, 4, 2, 8, 10, 4, - 2, 4, 1, 6, // 148 - 14, 10, 4, 102, 2, 1, 11, 10, 4, 2, 6, 1, 11, 10, 4, - 1, 6, 4, 11, 10, 4, 3, 6, 2, 10, 10, 4, 4, 6, - 3, 10, 10, 4, 107, 6, 4, 10, 10, 4, 104, 4, 3, 10, - 10, 4, 107, 4, 104, 10, 10, 4, 3, 4, 2, 6, 10, 4, - 2, 4, 1, 6, 10, 4, 1, 2, 0, 4, 10, 4, 2, 3, - 0, 4, 10, 4, 0, 3, 104, 4, 10, 4, 100, 104, 0, 3, // 149 - 12, 10, 4, 102, 2, 9, 11, 10, 4, 6, 9, 2, 11, 10, 4, - 107, 6, 8, 10, 10, 4, 2, 8, 6, 10, 10, 4, 2, 6, - 4, 9, 10, 4, 102, 2, 0, 9, 10, 4, 2, 4, 0, 9, - 10, 4, 101, 102, 0, 9, 10, 4, 4, 6, 2, 8, 10, 4, - 107, 6, 4, 8, 10, 4, 0, 4, 2, 8, 10, 4, 104, 107, - 4, 8, // 150 - 15, 10, 4, 2, 6, 9, 11, 10, 4, 2, 9, 102, 11, 10, 4, - 3, 6, 2, 10, 10, 4, 4, 6, 3, 10, 10, 4, 107, 6, - 4, 10, 10, 4, 104, 4, 3, 10, 10, 4, 107, 4, 104, 10, - 10, 4, 2, 6, 4, 9, 10, 4, 101, 102, 2, 9, 10, 4, - 101, 2, 3, 9, 10, 4, 2, 4, 3, 9, 10, 4, 101, 3, - 100, 9, 10, 4, 3, 4, 100, 9, 10, 4, 3, 4, 2, 6, - 10, 4, 100, 3, 104, 4, // 151 - 7, 10, 4, 107, 3, 6, 8, 10, 4, 4, 6, 3, 8, 10, 4, - 107, 6, 4, 8, 10, 4, 107, 4, 104, 8, 10, 4, 107, 3, - 2, 6, 10, 4, 3, 4, 2, 6, 10, 4, 103, 2, 107, 3, // 152 - 6, 10, 4, 107, 4, 2, 6, 10, 4, 0, 2, 107, 4, 10, 4, - 104, 0, 107, 4, 10, 4, 107, 0, 103, 2, 10, 4, 103, 107, - 104, 0, 10, 4, 103, 104, 100, 0, // 153 - 14, 10, 4, 1, 6, 4, 9, 10, 4, 101, 1, 0, 9, 10, 4, - 1, 4, 0, 9, 10, 4, 107, 3, 6, 8, 10, 4, 4, 6, - 3, 8, 10, 4, 107, 6, 4, 8, 10, 4, 107, 4, 104, 8, - 10, 4, 0, 4, 3, 8, 10, 4, 107, 3, 2, 6, 10, 4, - 3, 4, 2, 6, 10, 4, 2, 4, 1, 6, 10, 4, 1, 2, - 0, 4, 10, 4, 2, 3, 0, 4, 10, 4, 103, 2, 107, 3, // 154 - 10, 10, 4, 1, 6, 4, 9, 10, 4, 101, 1, 100, 9, 10, 4, - 1, 4, 100, 9, 10, 4, 2, 4, 1, 6, 10, 4, 107, 4, - 2, 6, 10, 4, 104, 100, 2, 4, 10, 4, 1, 2, 100, 4, - 10, 4, 107, 104, 2, 4, 10, 4, 103, 107, 104, 2, 10, 4, - 103, 104, 100, 2, // 155 - 12, 10, 4, 103, 3, 1, 11, 10, 4, 3, 6, 1, 11, 10, 4, - 103, 6, 3, 11, 10, 4, 103, 1, 102, 11, 10, 4, 1, 6, - 4, 11, 10, 4, 1, 4, 3, 8, 10, 4, 107, 3, 6, 8, - 10, 4, 4, 6, 3, 8, 10, 4, 107, 6, 4, 8, 10, 4, - 107, 4, 104, 8, 10, 4, 3, 4, 1, 6, 10, 4, 103, 107, - 3, 6, // 156 - 10, 10, 4, 103, 1, 102, 11, 10, 4, 103, 6, 1, 11, 10, 4, - 1, 6, 4, 11, 10, 4, 0, 107, 4, 6, 10, 4, 0, 4, - 1, 6, 10, 4, 103, 107, 0, 6, 10, 4, 103, 0, 1, 6, - 10, 4, 104, 0, 107, 4, 10, 4, 103, 107, 104, 0, 10, 4, - 103, 104, 100, 0, // 157 - 15, 10, 4, 103, 3, 102, 11, 10, 4, 103, 6, 3, 11, 10, 4, - 102, 3, 0, 11, 10, 4, 3, 6, 0, 11, 10, 4, 102, 0, - 9, 11, 10, 4, 6, 9, 0, 11, 10, 4, 0, 6, 4, 9, - 10, 4, 102, 0, 101, 9, 10, 4, 107, 3, 6, 8, 10, 4, - 4, 6, 3, 8, 10, 4, 107, 6, 4, 8, 10, 4, 107, 4, - 104, 8, 10, 4, 0, 4, 3, 8, 10, 4, 3, 4, 0, 6, - 10, 4, 103, 107, 3, 6, // 158 - 9, 10, 4, 103, 6, 9, 11, 10, 4, 103, 9, 102, 11, 10, 4, - 103, 6, 4, 9, 10, 4, 102, 103, 100, 9, 10, 4, 103, 4, - 100, 9, 10, 4, 101, 102, 100, 9, 10, 4, 103, 107, 4, 6, - 10, 4, 103, 107, 104, 4, 10, 4, 103, 104, 100, 4, // 159 - 5, 10, 4, 107, 6, 7, 10, 10, 4, 6, 9, 7, 10, 10, 4, - 4, 7, 6, 9, 10, 4, 4, 6, 5, 9, 10, 4, 105, 4, - 5, 9, // 160 - 10, 10, 4, 107, 6, 7, 10, 10, 4, 3, 7, 6, 10, 10, 4, - 4, 5, 105, 9, 10, 4, 0, 5, 4, 9, 10, 4, 100, 0, - 3, 8, 10, 4, 0, 4, 3, 8, 10, 4, 4, 7, 3, 8, - 10, 4, 4, 6, 3, 7, 10, 4, 4, 5, 3, 6, 10, 4, - 3, 4, 0, 5, // 161 - 9, 10, 4, 6, 7, 107, 10, 10, 4, 0, 7, 6, 10, 10, 4, - 0, 6, 1, 10, 10, 4, 0, 4, 6, 7, 10, 4, 0, 4, - 1, 6, 10, 4, 4, 5, 1, 6, 10, 4, 105, 1, 4, 5, - 10, 4, 105, 1, 0, 4, 10, 4, 105, 101, 0, 1, // 162 - 14, 10, 4, 3, 6, 1, 10, 10, 4, 107, 6, 7, 10, 10, 4, - 3, 7, 6, 10, 10, 4, 100, 101, 1, 8, 10, 4, 101, 4, - 1, 8, 10, 4, 100, 1, 3, 8, 10, 4, 1, 4, 3, 8, - 10, 4, 4, 7, 3, 8, 10, 4, 4, 6, 3, 7, 10, 4, - 4, 5, 3, 6, 10, 4, 3, 5, 1, 6, 10, 4, 3, 4, - 1, 5, 10, 4, 1, 4, 105, 5, 10, 4, 105, 1, 101, 4, // 163 - 10, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 1, 11, 10, 4, - 2, 5, 1, 11, 10, 4, 107, 6, 7, 10, 10, 4, 2, 7, - 6, 10, 10, 4, 4, 5, 105, 9, 10, 4, 1, 5, 4, 9, - 10, 4, 4, 6, 2, 7, 10, 4, 4, 5, 2, 6, 10, 4, - 2, 4, 1, 5, // 164 - 18, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 1, 11, 10, 4, - 2, 5, 1, 11, 10, 4, 3, 6, 2, 10, 10, 4, 107, 6, - 7, 10, 10, 4, 3, 7, 6, 10, 10, 4, 1, 4, 0, 9, - 10, 4, 105, 4, 5, 9, 10, 4, 1, 5, 4, 9, 10, 4, - 100, 0, 3, 8, 10, 4, 0, 4, 3, 8, 10, 4, 4, 7, - 3, 8, 10, 4, 4, 6, 3, 7, 10, 4, 3, 4, 2, 6, - 10, 4, 4, 5, 2, 6, 10, 4, 2, 4, 1, 5, 10, 4, - 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, // 165 - 14, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 0, 11, 10, 4, - 2, 5, 0, 11, 10, 4, 101, 102, 0, 11, 10, 4, 101, 0, - 5, 11, 10, 4, 0, 7, 2, 10, 10, 4, 107, 6, 7, 10, - 10, 4, 2, 7, 6, 10, 10, 4, 0, 4, 2, 7, 10, 4, - 4, 6, 2, 7, 10, 4, 4, 5, 2, 6, 10, 4, 105, 0, - 4, 5, 10, 4, 2, 4, 0, 5, 10, 4, 101, 0, 105, 5, // 166 - 15, 10, 4, 2, 6, 5, 11, 10, 4, 101, 102, 2, 11, 10, 4, - 101, 2, 5, 11, 10, 4, 3, 6, 2, 10, 10, 4, 107, 6, - 7, 10, 10, 4, 3, 7, 6, 10, 10, 4, 101, 3, 100, 8, - 10, 4, 101, 4, 3, 8, 10, 4, 4, 7, 3, 8, 10, 4, - 4, 6, 3, 7, 10, 4, 3, 4, 2, 6, 10, 4, 4, 5, - 2, 6, 10, 4, 101, 2, 4, 5, 10, 4, 101, 4, 105, 5, - 10, 4, 101, 2, 3, 4, // 167 - 9, 10, 4, 4, 5, 105, 9, 10, 4, 2, 5, 4, 9, 10, 4, - 2, 4, 3, 9, 10, 4, 107, 3, 6, 7, 10, 4, 4, 6, - 3, 7, 10, 4, 107, 3, 2, 6, 10, 4, 3, 4, 2, 6, - 10, 4, 4, 5, 2, 6, 10, 4, 103, 2, 107, 3, // 168 - 14, 10, 4, 2, 5, 0, 9, 10, 4, 105, 4, 5, 9, 10, 4, - 0, 5, 4, 9, 10, 4, 0, 2, 103, 8, 10, 4, 2, 7, - 103, 8, 10, 4, 0, 7, 2, 8, 10, 4, 100, 0, 103, 8, - 10, 4, 4, 7, 0, 8, 10, 4, 107, 103, 2, 7, 10, 4, - 0, 4, 2, 7, 10, 4, 107, 2, 6, 7, 10, 4, 4, 6, - 2, 7, 10, 4, 4, 5, 2, 6, 10, 4, 2, 4, 0, 5, // 169 - 12, 10, 4, 107, 3, 6, 7, 10, 4, 4, 6, 3, 7, 10, 4, - 107, 3, 2, 6, 10, 4, 3, 4, 2, 6, 10, 4, 4, 5, - 2, 6, 10, 4, 105, 1, 4, 5, 10, 4, 2, 4, 1, 5, - 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, 10, 4, - 105, 1, 0, 4, 10, 4, 107, 103, 2, 3, 10, 4, 101, 0, - 105, 1, // 170 - 14, 10, 4, 100, 2, 103, 8, 10, 4, 2, 7, 103, 8, 10, 4, - 101, 1, 100, 8, 10, 4, 101, 4, 1, 8, 10, 4, 100, 1, - 2, 8, 10, 4, 1, 4, 2, 8, 10, 4, 4, 7, 2, 8, - 10, 4, 103, 2, 107, 7, 10, 4, 107, 2, 6, 7, 10, 4, - 4, 6, 2, 7, 10, 4, 4, 5, 2, 6, 10, 4, 1, 4, - 105, 5, 10, 4, 2, 4, 1, 5, 10, 4, 101, 105, 1, 4, // 171 - 14, 10, 4, 103, 3, 1, 11, 10, 4, 3, 6, 1, 11, 10, 4, - 103, 6, 3, 11, 10, 4, 103, 1, 102, 11, 10, 4, 1, 6, - 5, 11, 10, 4, 1, 4, 3, 9, 10, 4, 4, 5, 105, 9, - 10, 4, 1, 5, 4, 9, 10, 4, 107, 3, 6, 7, 10, 4, - 4, 6, 3, 7, 10, 4, 4, 5, 3, 6, 10, 4, 3, 5, - 1, 6, 10, 4, 103, 107, 3, 6, 10, 4, 3, 4, 1, 5, // 172 - 15, 10, 4, 103, 1, 102, 11, 10, 4, 103, 6, 1, 11, 10, 4, - 1, 6, 5, 11, 10, 4, 1, 4, 0, 9, 10, 4, 105, 4, - 5, 9, 10, 4, 1, 5, 4, 9, 10, 4, 100, 0, 103, 8, - 10, 4, 0, 7, 103, 8, 10, 4, 4, 7, 0, 8, 10, 4, - 103, 0, 6, 7, 10, 4, 103, 6, 107, 7, 10, 4, 0, 4, - 6, 7, 10, 4, 4, 5, 1, 6, 10, 4, 0, 4, 1, 6, - 10, 4, 103, 0, 1, 6, // 173 - 14, 10, 4, 103, 3, 102, 11, 10, 4, 103, 6, 3, 11, 10, 4, - 3, 6, 5, 11, 10, 4, 102, 3, 0, 11, 10, 4, 3, 5, - 0, 11, 10, 4, 102, 0, 101, 11, 10, 4, 0, 5, 101, 11, - 10, 4, 107, 3, 6, 7, 10, 4, 4, 6, 3, 7, 10, 4, - 4, 5, 3, 6, 10, 4, 103, 107, 3, 6, 10, 4, 3, 4, - 0, 5, 10, 4, 105, 0, 4, 5, 10, 4, 101, 0, 105, 5, // 174 - 13, 10, 4, 103, 6, 8, 11, 10, 4, 103, 8, 102, 11, 10, 4, - 5, 8, 6, 11, 10, 4, 101, 102, 8, 11, 10, 4, 101, 8, - 5, 11, 10, 4, 103, 6, 7, 8, 10, 4, 4, 7, 6, 8, - 10, 4, 4, 6, 5, 8, 10, 4, 101, 4, 5, 8, 10, 4, - 101, 102, 100, 8, 10, 4, 102, 103, 100, 8, 10, 4, 103, 6, - 107, 7, 10, 4, 101, 4, 105, 5, // 175 - 7, 10, 4, 6, 9, 8, 10, 10, 4, 6, 8, 107, 10, 10, 4, - 5, 8, 6, 9, 10, 4, 105, 8, 5, 9, 10, 4, 104, 5, - 105, 8, 10, 4, 104, 6, 5, 8, 10, 4, 104, 107, 6, 8, // 176 - 7, 10, 4, 104, 107, 6, 10, 10, 4, 104, 6, 3, 10, 10, 4, - 104, 0, 5, 9, 10, 4, 104, 5, 105, 9, 10, 4, 104, 5, - 3, 6, 10, 4, 104, 0, 3, 5, 10, 4, 104, 0, 100, 3, // 177 - 11, 10, 4, 6, 8, 107, 10, 10, 4, 0, 8, 6, 10, 10, 4, - 0, 6, 1, 10, 10, 4, 104, 107, 6, 8, 10, 4, 5, 6, - 0, 8, 10, 4, 104, 6, 5, 8, 10, 4, 105, 5, 0, 8, - 10, 4, 104, 5, 105, 8, 10, 4, 0, 5, 1, 6, 10, 4, - 105, 1, 0, 5, 10, 4, 105, 101, 0, 1, // 178 - 10, 10, 4, 3, 6, 1, 10, 10, 4, 104, 6, 3, 10, 10, 4, - 107, 6, 104, 10, 10, 4, 104, 5, 3, 6, 10, 4, 3, 5, - 1, 6, 10, 4, 1, 3, 104, 5, 10, 4, 104, 105, 1, 5, - 10, 4, 100, 104, 1, 3, 10, 4, 100, 104, 101, 1, 10, 4, - 104, 105, 101, 1, // 179 - 12, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 1, 11, 10, 4, - 2, 5, 1, 11, 10, 4, 107, 6, 8, 10, 10, 4, 2, 8, - 6, 10, 10, 4, 5, 8, 1, 9, 10, 4, 105, 8, 5, 9, - 10, 4, 107, 6, 104, 8, 10, 4, 5, 6, 2, 8, 10, 4, - 104, 6, 5, 8, 10, 4, 104, 5, 105, 8, 10, 4, 1, 5, - 2, 8, // 180 - 15, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 1, 11, 10, 4, - 2, 5, 1, 11, 10, 4, 3, 6, 2, 10, 10, 4, 104, 6, - 3, 10, 10, 4, 107, 6, 104, 10, 10, 4, 104, 0, 5, 9, - 10, 4, 104, 5, 105, 9, 10, 4, 1, 5, 0, 9, 10, 4, - 104, 5, 3, 6, 10, 4, 3, 5, 2, 6, 10, 4, 0, 3, - 104, 5, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, 0, 5, - 10, 4, 100, 104, 0, 3, // 181 - 15, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 0, 11, 10, 4, - 2, 5, 0, 11, 10, 4, 102, 0, 101, 11, 10, 4, 0, 5, - 101, 11, 10, 4, 6, 8, 107, 10, 10, 4, 2, 8, 6, 10, - 10, 4, 0, 6, 2, 8, 10, 4, 104, 107, 6, 8, 10, 4, - 5, 6, 0, 8, 10, 4, 104, 6, 5, 8, 10, 4, 105, 5, - 0, 8, 10, 4, 104, 5, 105, 8, 10, 4, 0, 5, 2, 6, - 10, 4, 101, 0, 105, 5, // 182 - 13, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 101, 11, 10, 4, - 2, 5, 101, 11, 10, 4, 3, 6, 2, 10, 10, 4, 104, 6, - 3, 10, 10, 4, 107, 6, 104, 10, 10, 4, 104, 5, 3, 6, - 10, 4, 3, 5, 2, 6, 10, 4, 105, 101, 3, 5, 10, 4, - 2, 3, 101, 5, 10, 4, 104, 105, 3, 5, 10, 4, 104, 105, - 101, 3, 10, 4, 101, 100, 104, 3, // 183 - 11, 10, 4, 5, 8, 3, 9, 10, 4, 105, 8, 5, 9, 10, 4, - 2, 5, 3, 9, 10, 4, 104, 107, 6, 8, 10, 4, 3, 6, - 107, 8, 10, 4, 5, 6, 3, 8, 10, 4, 104, 6, 5, 8, - 10, 4, 104, 5, 105, 8, 10, 4, 107, 3, 2, 6, 10, 4, - 3, 5, 2, 6, 10, 4, 103, 2, 107, 3, // 184 - 10, 10, 4, 2, 5, 0, 9, 10, 4, 104, 0, 5, 9, 10, 4, - 104, 5, 105, 9, 10, 4, 104, 0, 107, 6, 10, 4, 104, 5, - 0, 6, 10, 4, 0, 2, 107, 6, 10, 4, 0, 5, 2, 6, - 10, 4, 107, 0, 103, 2, 10, 4, 104, 103, 107, 0, 10, 4, - 103, 104, 100, 0, // 185 - 14, 10, 4, 104, 107, 6, 8, 10, 4, 3, 6, 107, 8, 10, 4, - 5, 6, 3, 8, 10, 4, 104, 6, 5, 8, 10, 4, 0, 5, - 3, 8, 10, 4, 105, 5, 0, 8, 10, 4, 104, 5, 105, 8, - 10, 4, 107, 3, 2, 6, 10, 4, 3, 5, 2, 6, 10, 4, - 105, 1, 0, 5, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, - 0, 5, 10, 4, 107, 103, 2, 3, 10, 4, 101, 0, 105, 1, // 186 - 9, 10, 4, 104, 2, 107, 6, 10, 4, 104, 5, 2, 6, 10, 4, - 104, 105, 1, 5, 10, 4, 104, 1, 2, 5, 10, 4, 104, 103, - 107, 2, 10, 4, 103, 104, 100, 2, 10, 4, 104, 1, 100, 2, - 10, 4, 101, 100, 104, 1, 10, 4, 104, 105, 101, 1, // 187 - 15, 10, 4, 103, 3, 1, 11, 10, 4, 3, 6, 1, 11, 10, 4, - 103, 6, 3, 11, 10, 4, 103, 1, 102, 11, 10, 4, 1, 6, - 5, 11, 10, 4, 5, 8, 1, 9, 10, 4, 105, 8, 5, 9, - 10, 4, 107, 3, 6, 8, 10, 4, 107, 6, 104, 8, 10, 4, - 5, 6, 3, 8, 10, 4, 104, 6, 5, 8, 10, 4, 1, 5, - 3, 8, 10, 4, 104, 5, 105, 8, 10, 4, 3, 5, 1, 6, - 10, 4, 103, 107, 3, 6, // 188 - 13, 10, 4, 103, 1, 102, 11, 10, 4, 103, 6, 1, 11, 10, 4, - 1, 6, 5, 11, 10, 4, 104, 0, 5, 9, 10, 4, 104, 5, - 105, 9, 10, 4, 1, 5, 0, 9, 10, 4, 104, 0, 107, 6, - 10, 4, 104, 5, 0, 6, 10, 4, 0, 5, 1, 6, 10, 4, - 103, 107, 0, 6, 10, 4, 103, 0, 1, 6, 10, 4, 103, 107, - 104, 0, 10, 4, 103, 104, 100, 0, // 189 - 16, 10, 4, 103, 3, 102, 11, 10, 4, 103, 6, 3, 11, 10, 4, - 3, 6, 5, 11, 10, 4, 102, 3, 0, 11, 10, 4, 3, 5, - 0, 11, 10, 4, 102, 0, 101, 11, 10, 4, 0, 5, 101, 11, - 10, 4, 107, 3, 6, 8, 10, 4, 107, 6, 104, 8, 10, 4, - 5, 6, 3, 8, 10, 4, 104, 6, 5, 8, 10, 4, 0, 5, - 3, 8, 10, 4, 105, 5, 0, 8, 10, 4, 104, 5, 105, 8, - 10, 4, 103, 107, 3, 6, 10, 4, 101, 0, 105, 5, // 190 - 10, 10, 4, 100, 6, 5, 11, 10, 4, 103, 6, 100, 11, 10, 4, - 102, 103, 100, 11, 10, 4, 101, 102, 100, 11, 10, 4, 101, 100, - 5, 11, 10, 4, 103, 104, 100, 6, 10, 4, 104, 5, 100, 6, - 10, 4, 103, 107, 104, 6, 10, 4, 101, 100, 104, 5, 10, 4, - 104, 105, 101, 5, // 191 - 3, 10, 4, 106, 5, 10, 11, 10, 4, 5, 7, 107, 10, 10, 4, - 106, 5, 107, 10, // 192 - 10, 10, 4, 106, 5, 10, 11, 10, 4, 3, 10, 5, 11, 10, 4, - 3, 5, 0, 11, 10, 4, 106, 5, 107, 10, 10, 4, 5, 7, - 107, 10, 10, 4, 3, 7, 5, 10, 10, 4, 5, 7, 0, 8, - 10, 4, 0, 3, 100, 8, 10, 4, 0, 7, 3, 8, 10, 4, - 0, 5, 3, 7, // 193 - 10, 10, 4, 106, 5, 10, 11, 10, 4, 1, 10, 5, 11, 10, 4, - 106, 5, 107, 10, 10, 4, 5, 7, 107, 10, 10, 4, 1, 7, - 5, 10, 10, 4, 0, 7, 1, 10, 10, 4, 101, 1, 0, 9, - 10, 4, 1, 5, 0, 9, 10, 4, 5, 7, 0, 9, 10, 4, - 0, 5, 1, 7, // 194 - 12, 10, 4, 5, 10, 106, 11, 10, 4, 1, 10, 5, 11, 10, 4, - 107, 106, 5, 10, 10, 4, 3, 5, 1, 10, 10, 4, 107, 5, - 7, 10, 10, 4, 3, 7, 5, 10, 10, 4, 101, 1, 8, 9, - 10, 4, 5, 8, 1, 9, 10, 4, 100, 101, 1, 8, 10, 4, - 1, 3, 100, 8, 10, 4, 1, 5, 3, 8, 10, 4, 5, 7, - 3, 8, // 195 - 7, 10, 4, 106, 2, 5, 10, 10, 4, 106, 5, 107, 10, 10, 4, - 5, 7, 107, 10, 10, 4, 2, 7, 5, 10, 10, 4, 1, 5, - 2, 7, 10, 4, 106, 2, 1, 5, 10, 4, 106, 102, 1, 2, // 196 - 14, 10, 4, 106, 2, 5, 10, 10, 4, 106, 5, 107, 10, 10, 4, - 107, 5, 7, 10, 10, 4, 2, 7, 5, 10, 10, 4, 3, 7, - 2, 10, 10, 4, 5, 7, 0, 8, 10, 4, 100, 0, 3, 8, - 10, 4, 0, 7, 3, 8, 10, 4, 3, 5, 2, 7, 10, 4, - 0, 5, 3, 7, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, - 0, 5, 10, 4, 106, 2, 1, 5, 10, 4, 106, 102, 1, 2, // 197 - 12, 10, 4, 0, 7, 2, 10, 10, 4, 106, 2, 5, 10, 10, 4, - 106, 5, 107, 10, 10, 4, 5, 7, 107, 10, 10, 4, 2, 7, - 5, 10, 10, 4, 102, 2, 0, 9, 10, 4, 2, 5, 0, 9, - 10, 4, 102, 5, 2, 9, 10, 4, 101, 102, 0, 9, 10, 4, - 5, 7, 0, 9, 10, 4, 0, 5, 2, 7, 10, 4, 106, 2, - 102, 5, // 198 - 15, 10, 4, 107, 106, 5, 10, 10, 4, 2, 5, 106, 10, 10, 4, - 107, 5, 7, 10, 10, 4, 2, 7, 5, 10, 10, 4, 3, 7, - 2, 10, 10, 4, 101, 102, 2, 9, 10, 4, 102, 5, 2, 9, - 10, 4, 101, 2, 3, 9, 10, 4, 2, 5, 3, 9, 10, 4, - 101, 3, 8, 9, 10, 4, 5, 8, 3, 9, 10, 4, 101, 3, - 100, 8, 10, 4, 5, 7, 3, 8, 10, 4, 3, 5, 2, 7, - 10, 4, 106, 2, 102, 5, // 199 - 7, 10, 4, 107, 5, 7, 11, 10, 4, 2, 7, 5, 11, 10, 4, - 107, 7, 2, 11, 10, 4, 107, 106, 5, 11, 10, 4, 107, 3, - 2, 7, 10, 4, 3, 5, 2, 7, 10, 4, 103, 2, 107, 3, // 200 - 12, 10, 4, 2, 5, 0, 11, 10, 4, 2, 107, 7, 11, 10, 4, - 5, 7, 107, 11, 10, 4, 2, 7, 5, 11, 10, 4, 106, 5, - 107, 11, 10, 4, 5, 7, 0, 8, 10, 4, 0, 2, 103, 8, - 10, 4, 2, 7, 103, 8, 10, 4, 0, 7, 2, 8, 10, 4, - 100, 0, 103, 8, 10, 4, 0, 5, 2, 7, 10, 4, 107, 103, - 2, 7, // 201 - 14, 10, 4, 2, 5, 1, 11, 10, 4, 107, 5, 7, 11, 10, 4, - 2, 7, 5, 11, 10, 4, 107, 7, 2, 11, 10, 4, 106, 5, - 107, 11, 10, 4, 101, 1, 0, 9, 10, 4, 1, 5, 0, 9, - 10, 4, 5, 7, 0, 9, 10, 4, 107, 3, 2, 7, 10, 4, - 3, 5, 2, 7, 10, 4, 0, 5, 3, 7, 10, 4, 2, 3, - 0, 5, 10, 4, 1, 2, 0, 5, 10, 4, 107, 103, 2, 3, // 202 - 15, 10, 4, 2, 5, 1, 11, 10, 4, 2, 107, 7, 11, 10, 4, - 5, 7, 107, 11, 10, 4, 2, 7, 5, 11, 10, 4, 106, 5, - 107, 11, 10, 4, 101, 1, 8, 9, 10, 4, 5, 8, 1, 9, - 10, 4, 101, 1, 100, 8, 10, 4, 5, 7, 1, 8, 10, 4, - 100, 1, 2, 8, 10, 4, 1, 7, 2, 8, 10, 4, 100, 2, - 103, 8, 10, 4, 2, 7, 103, 8, 10, 4, 1, 5, 2, 7, - 10, 4, 103, 2, 107, 7, // 203 - 6, 10, 4, 3, 5, 107, 7, 10, 4, 107, 3, 1, 5, 10, 4, - 107, 1, 106, 5, 10, 4, 103, 1, 107, 3, 10, 4, 106, 107, - 103, 1, 10, 4, 102, 106, 103, 1, // 204 - 10, 10, 4, 5, 7, 0, 8, 10, 4, 100, 0, 103, 8, 10, 4, - 0, 7, 103, 8, 10, 4, 1, 5, 107, 7, 10, 4, 0, 5, - 1, 7, 10, 4, 107, 103, 1, 7, 10, 4, 0, 1, 103, 7, - 10, 4, 106, 107, 1, 5, 10, 4, 106, 107, 103, 1, 10, 4, - 102, 106, 103, 1, // 205 - 10, 10, 4, 102, 0, 101, 9, 10, 4, 102, 5, 0, 9, 10, 4, - 5, 7, 0, 9, 10, 4, 3, 5, 107, 7, 10, 4, 0, 5, - 3, 7, 10, 4, 102, 106, 3, 5, 10, 4, 102, 3, 0, 5, - 10, 4, 106, 107, 3, 5, 10, 4, 102, 106, 103, 3, 10, 4, - 106, 107, 103, 3, // 206 - 9, 10, 4, 101, 102, 8, 9, 10, 4, 5, 8, 102, 9, 10, 4, - 101, 102, 100, 8, 10, 4, 102, 103, 100, 8, 10, 4, 102, 5, - 103, 8, 10, 4, 5, 7, 103, 8, 10, 4, 103, 5, 107, 7, - 10, 4, 102, 106, 103, 5, 10, 4, 106, 107, 103, 5, // 207 - 7, 10, 4, 8, 10, 5, 11, 10, 4, 106, 5, 10, 11, 10, 4, - 107, 5, 4, 10, 10, 4, 107, 4, 8, 10, 10, 4, 5, 8, - 4, 10, 10, 4, 106, 5, 107, 10, 10, 4, 104, 107, 4, 8, // 208 - 11, 10, 4, 106, 5, 10, 11, 10, 4, 3, 10, 5, 11, 10, 4, - 3, 5, 0, 11, 10, 4, 106, 5, 107, 10, 10, 4, 4, 5, - 3, 10, 10, 4, 107, 5, 4, 10, 10, 4, 104, 107, 4, 10, - 10, 4, 104, 4, 3, 10, 10, 4, 3, 4, 0, 5, 10, 4, - 104, 0, 3, 4, 10, 4, 104, 0, 100, 3, // 209 - 14, 10, 4, 106, 5, 10, 11, 10, 4, 1, 10, 5, 11, 10, 4, - 107, 5, 4, 10, 10, 4, 107, 4, 8, 10, 10, 4, 5, 8, - 4, 10, 10, 4, 106, 5, 107, 10, 10, 4, 1, 8, 5, 10, - 10, 4, 0, 8, 1, 10, 10, 4, 1, 5, 4, 9, 10, 4, - 101, 1, 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, 4, 5, - 1, 8, 10, 4, 0, 4, 1, 8, 10, 4, 104, 107, 4, 8, // 210 - 15, 10, 4, 5, 10, 106, 11, 10, 4, 1, 10, 5, 11, 10, 4, - 107, 106, 5, 10, 10, 4, 3, 5, 1, 10, 10, 4, 4, 5, - 3, 10, 10, 4, 107, 5, 4, 10, 10, 4, 104, 4, 3, 10, - 10, 4, 107, 4, 104, 10, 10, 4, 1, 5, 4, 9, 10, 4, - 100, 1, 3, 9, 10, 4, 100, 3, 4, 9, 10, 4, 1, 4, - 3, 9, 10, 4, 100, 101, 1, 9, 10, 4, 3, 4, 1, 5, - 10, 4, 100, 3, 104, 4, // 211 - 11, 10, 4, 106, 2, 5, 10, 10, 4, 106, 5, 107, 10, 10, 4, - 4, 5, 2, 10, 10, 4, 107, 5, 4, 10, 10, 4, 107, 4, - 8, 10, 10, 4, 2, 8, 4, 10, 10, 4, 107, 4, 104, 8, - 10, 4, 1, 4, 2, 8, 10, 4, 106, 2, 1, 5, 10, 4, - 2, 4, 1, 5, 10, 4, 106, 102, 1, 2, // 212 - 14, 10, 4, 106, 2, 5, 10, 10, 4, 106, 5, 107, 10, 10, 4, - 4, 5, 2, 10, 10, 4, 107, 5, 4, 10, 10, 4, 3, 4, - 2, 10, 10, 4, 104, 4, 3, 10, 10, 4, 107, 4, 104, 10, - 10, 4, 106, 2, 1, 5, 10, 4, 2, 4, 1, 5, 10, 4, - 0, 3, 104, 4, 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, - 0, 4, 10, 4, 100, 104, 0, 3, 10, 4, 106, 102, 1, 2, // 213 - 15, 10, 4, 106, 2, 5, 10, 10, 4, 106, 5, 107, 10, 10, 4, - 4, 5, 2, 10, 10, 4, 107, 5, 4, 10, 10, 4, 4, 8, - 107, 10, 10, 4, 2, 8, 4, 10, 10, 4, 102, 2, 0, 9, - 10, 4, 2, 5, 0, 9, 10, 4, 102, 5, 2, 9, 10, 4, - 102, 0, 101, 9, 10, 4, 0, 5, 4, 9, 10, 4, 0, 4, - 2, 8, 10, 4, 104, 107, 4, 8, 10, 4, 2, 4, 0, 5, - 10, 4, 106, 2, 102, 5, // 214 - 16, 10, 4, 107, 106, 5, 10, 10, 4, 2, 5, 106, 10, 10, 4, - 4, 5, 2, 10, 10, 4, 107, 5, 4, 10, 10, 4, 3, 4, - 2, 10, 10, 4, 104, 4, 3, 10, 10, 4, 107, 4, 104, 10, - 10, 4, 102, 2, 101, 9, 10, 4, 102, 5, 2, 9, 10, 4, - 2, 5, 4, 9, 10, 4, 101, 2, 3, 9, 10, 4, 2, 4, - 3, 9, 10, 4, 101, 3, 100, 9, 10, 4, 3, 4, 100, 9, - 10, 4, 102, 106, 2, 5, 10, 4, 100, 3, 104, 4, // 215 - 7, 10, 4, 107, 106, 5, 11, 10, 4, 107, 5, 2, 11, 10, 4, - 104, 107, 4, 8, 10, 4, 3, 4, 107, 8, 10, 4, 107, 4, - 2, 5, 10, 4, 107, 3, 2, 4, 10, 4, 103, 2, 107, 3, // 216 - 10, 10, 4, 2, 5, 0, 11, 10, 4, 107, 5, 2, 11, 10, 4, - 106, 5, 107, 11, 10, 4, 107, 4, 2, 5, 10, 4, 2, 4, - 0, 5, 10, 4, 0, 2, 107, 4, 10, 4, 104, 0, 107, 4, - 10, 4, 107, 0, 103, 2, 10, 4, 104, 103, 107, 0, 10, 4, - 103, 104, 100, 0, // 217 - 15, 10, 4, 2, 5, 1, 11, 10, 4, 107, 5, 2, 11, 10, 4, - 106, 5, 107, 11, 10, 4, 1, 5, 4, 9, 10, 4, 101, 1, - 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, 104, 107, 4, 8, - 10, 4, 3, 4, 107, 8, 10, 4, 0, 4, 3, 8, 10, 4, - 107, 4, 2, 5, 10, 4, 2, 4, 1, 5, 10, 4, 2, 3, - 0, 4, 10, 4, 107, 3, 2, 4, 10, 4, 1, 2, 0, 4, - 10, 4, 107, 103, 2, 3, // 218 - 13, 10, 4, 2, 5, 1, 11, 10, 4, 107, 5, 2, 11, 10, 4, - 106, 5, 107, 11, 10, 4, 1, 5, 4, 9, 10, 4, 101, 1, - 100, 9, 10, 4, 1, 4, 100, 9, 10, 4, 107, 4, 2, 5, - 10, 4, 2, 4, 1, 5, 10, 4, 104, 100, 2, 4, 10, 4, - 1, 2, 100, 4, 10, 4, 104, 2, 107, 4, 10, 4, 104, 103, - 107, 2, 10, 4, 103, 104, 100, 2, // 219 - 10, 10, 4, 1, 4, 3, 8, 10, 4, 104, 107, 4, 8, 10, 4, - 3, 4, 107, 8, 10, 4, 107, 3, 1, 5, 10, 4, 3, 4, - 1, 5, 10, 4, 107, 4, 3, 5, 10, 4, 107, 1, 106, 5, - 10, 4, 103, 1, 107, 3, 10, 4, 106, 107, 103, 1, 10, 4, - 103, 102, 106, 1, // 220 - 9, 10, 4, 106, 107, 1, 5, 10, 4, 107, 4, 1, 5, 10, 4, - 104, 0, 107, 4, 10, 4, 0, 1, 107, 4, 10, 4, 106, 107, - 103, 1, 10, 4, 107, 0, 103, 1, 10, 4, 103, 102, 106, 1, - 10, 4, 104, 103, 107, 0, 10, 4, 103, 104, 100, 0, // 221 - 13, 10, 4, 102, 0, 101, 9, 10, 4, 102, 5, 0, 9, 10, 4, - 0, 5, 4, 9, 10, 4, 104, 107, 4, 8, 10, 4, 3, 4, - 107, 8, 10, 4, 0, 4, 3, 8, 10, 4, 106, 107, 3, 5, - 10, 4, 107, 4, 3, 5, 10, 4, 3, 4, 0, 5, 10, 4, - 102, 106, 3, 5, 10, 4, 102, 3, 0, 5, 10, 4, 103, 102, - 106, 3, 10, 4, 106, 107, 103, 3, // 222 - 10, 10, 4, 103, 102, 5, 9, 10, 4, 103, 5, 4, 9, 10, 4, - 102, 103, 100, 9, 10, 4, 103, 4, 100, 9, 10, 4, 101, 102, - 100, 9, 10, 4, 106, 107, 103, 5, 10, 4, 107, 4, 103, 5, - 10, 4, 103, 102, 106, 5, 10, 4, 104, 103, 107, 4, 10, 4, - 103, 104, 100, 4, // 223 - 7, 10, 4, 106, 4, 7, 11, 10, 4, 4, 9, 7, 11, 10, 4, - 106, 9, 4, 11, 10, 4, 106, 7, 10, 11, 10, 4, 9, 10, - 7, 11, 10, 4, 106, 7, 107, 10, 10, 4, 105, 4, 106, 9, // 224 - 15, 10, 4, 106, 4, 7, 11, 10, 4, 4, 9, 7, 11, 10, 4, - 106, 9, 4, 11, 10, 4, 106, 7, 10, 11, 10, 4, 9, 10, - 7, 11, 10, 4, 3, 10, 9, 11, 10, 4, 3, 9, 0, 11, - 10, 4, 7, 9, 3, 10, 10, 4, 106, 7, 107, 10, 10, 4, - 3, 7, 4, 9, 10, 4, 3, 4, 0, 9, 10, 4, 105, 4, - 106, 9, 10, 4, 0, 3, 100, 8, 10, 4, 0, 4, 3, 8, - 10, 4, 4, 7, 3, 8, // 225 - 11, 10, 4, 105, 1, 4, 11, 10, 4, 105, 4, 106, 11, 10, 4, - 106, 4, 7, 11, 10, 4, 1, 7, 4, 11, 10, 4, 106, 7, - 10, 11, 10, 4, 1, 10, 7, 11, 10, 4, 106, 7, 107, 10, - 10, 4, 0, 7, 1, 10, 10, 4, 0, 4, 1, 7, 10, 4, - 105, 1, 0, 4, 10, 4, 105, 101, 0, 1, // 226 - 15, 10, 4, 105, 1, 4, 11, 10, 4, 105, 4, 106, 11, 10, 4, - 4, 7, 106, 11, 10, 4, 1, 7, 4, 11, 10, 4, 7, 10, - 106, 11, 10, 4, 1, 10, 7, 11, 10, 4, 107, 106, 7, 10, - 10, 4, 3, 7, 1, 10, 10, 4, 100, 101, 1, 8, 10, 4, - 101, 4, 1, 8, 10, 4, 1, 3, 100, 8, 10, 4, 1, 4, - 3, 8, 10, 4, 4, 7, 3, 8, 10, 4, 3, 4, 1, 7, - 10, 4, 105, 1, 101, 4, // 227 - 7, 10, 4, 106, 2, 7, 10, 10, 4, 106, 7, 107, 10, 10, 4, - 106, 4, 1, 9, 10, 4, 105, 4, 106, 9, 10, 4, 106, 2, - 4, 7, 10, 4, 106, 2, 1, 4, 10, 4, 106, 102, 1, 2, // 228 - 15, 10, 4, 106, 2, 7, 10, 10, 4, 106, 7, 107, 10, 10, 4, - 3, 7, 2, 10, 10, 4, 1, 4, 0, 9, 10, 4, 106, 4, - 1, 9, 10, 4, 105, 4, 106, 9, 10, 4, 100, 0, 3, 8, - 10, 4, 0, 4, 3, 8, 10, 4, 4, 7, 3, 8, 10, 4, - 3, 4, 2, 7, 10, 4, 106, 2, 4, 7, 10, 4, 2, 3, - 0, 4, 10, 4, 1, 2, 0, 4, 10, 4, 106, 2, 1, 4, - 10, 4, 106, 102, 1, 2, // 229 - 10, 10, 4, 0, 7, 2, 10, 10, 4, 106, 2, 7, 10, 10, 4, - 106, 7, 107, 10, 10, 4, 0, 4, 2, 7, 10, 4, 106, 2, - 4, 7, 10, 4, 106, 2, 0, 4, 10, 4, 105, 106, 0, 4, - 10, 4, 106, 102, 0, 2, 10, 4, 105, 106, 102, 0, 10, 4, - 101, 105, 102, 0, // 230 - 13, 10, 4, 107, 106, 7, 10, 10, 4, 2, 7, 106, 10, 10, 4, - 3, 7, 2, 10, 10, 4, 101, 3, 100, 8, 10, 4, 101, 4, - 3, 8, 10, 4, 4, 7, 3, 8, 10, 4, 3, 4, 2, 7, - 10, 4, 2, 4, 106, 7, 10, 4, 101, 105, 2, 4, 10, 4, - 101, 2, 3, 4, 10, 4, 105, 106, 2, 4, 10, 4, 105, 106, - 102, 2, 10, 4, 101, 105, 102, 2, // 231 - 11, 10, 4, 4, 9, 2, 11, 10, 4, 106, 9, 4, 11, 10, 4, - 4, 7, 106, 11, 10, 4, 2, 7, 4, 11, 10, 4, 107, 106, - 7, 11, 10, 4, 107, 7, 2, 11, 10, 4, 105, 4, 106, 9, - 10, 4, 2, 4, 3, 9, 10, 4, 107, 3, 2, 7, 10, 4, - 3, 4, 2, 7, 10, 4, 103, 2, 107, 3, // 232 - 15, 10, 4, 4, 9, 2, 11, 10, 4, 106, 9, 4, 11, 10, 4, - 106, 4, 7, 11, 10, 4, 2, 7, 4, 11, 10, 4, 107, 7, - 2, 11, 10, 4, 106, 7, 107, 11, 10, 4, 105, 4, 106, 9, - 10, 4, 2, 4, 0, 9, 10, 4, 0, 2, 103, 8, 10, 4, - 2, 7, 103, 8, 10, 4, 0, 7, 2, 8, 10, 4, 100, 0, - 103, 8, 10, 4, 4, 7, 0, 8, 10, 4, 107, 103, 2, 7, - 10, 4, 0, 4, 2, 7, // 233 - 14, 10, 4, 105, 1, 4, 11, 10, 4, 105, 4, 106, 11, 10, 4, - 2, 4, 1, 11, 10, 4, 106, 4, 7, 11, 10, 4, 2, 7, - 4, 11, 10, 4, 107, 7, 2, 11, 10, 4, 106, 7, 107, 11, - 10, 4, 107, 3, 2, 7, 10, 4, 3, 4, 2, 7, 10, 4, - 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, 10, 4, 105, 1, - 0, 4, 10, 4, 107, 103, 2, 3, 10, 4, 105, 101, 0, 1, // 234 - 16, 10, 4, 105, 1, 4, 11, 10, 4, 105, 4, 106, 11, 10, 4, - 2, 4, 1, 11, 10, 4, 106, 4, 7, 11, 10, 4, 2, 7, - 4, 11, 10, 4, 107, 7, 2, 11, 10, 4, 106, 7, 107, 11, - 10, 4, 100, 2, 103, 8, 10, 4, 2, 7, 103, 8, 10, 4, - 101, 1, 100, 8, 10, 4, 101, 4, 1, 8, 10, 4, 100, 1, - 2, 8, 10, 4, 1, 4, 2, 8, 10, 4, 4, 7, 2, 8, - 10, 4, 103, 2, 107, 7, 10, 4, 101, 105, 1, 4, // 235 - 10, 10, 4, 1, 4, 3, 9, 10, 4, 106, 4, 1, 9, 10, 4, - 105, 4, 106, 9, 10, 4, 107, 3, 1, 7, 10, 4, 3, 4, - 1, 7, 10, 4, 107, 1, 106, 7, 10, 4, 1, 4, 106, 7, - 10, 4, 103, 1, 107, 3, 10, 4, 106, 107, 103, 1, 10, 4, - 103, 102, 106, 1, // 236 - 13, 10, 4, 1, 4, 0, 9, 10, 4, 106, 4, 1, 9, 10, 4, - 105, 4, 106, 9, 10, 4, 100, 0, 103, 8, 10, 4, 0, 7, - 103, 8, 10, 4, 4, 7, 0, 8, 10, 4, 107, 103, 1, 7, - 10, 4, 0, 1, 103, 7, 10, 4, 0, 4, 1, 7, 10, 4, - 106, 107, 1, 7, 10, 4, 106, 1, 4, 7, 10, 4, 106, 107, - 103, 1, 10, 4, 103, 102, 106, 1, // 237 - 9, 10, 4, 106, 107, 3, 7, 10, 4, 106, 3, 4, 7, 10, 4, - 106, 3, 0, 4, 10, 4, 105, 106, 0, 4, 10, 4, 103, 102, - 106, 3, 10, 4, 102, 0, 106, 3, 10, 4, 106, 107, 103, 3, - 10, 4, 105, 106, 102, 0, 10, 4, 102, 101, 105, 0, // 238 - 10, 10, 4, 103, 102, 7, 8, 10, 4, 4, 7, 102, 8, 10, 4, - 101, 102, 100, 8, 10, 4, 101, 4, 102, 8, 10, 4, 102, 103, - 100, 8, 10, 4, 103, 102, 106, 7, 10, 4, 102, 4, 106, 7, - 10, 4, 106, 107, 103, 7, 10, 4, 105, 106, 102, 4, 10, 4, - 101, 105, 102, 4, // 239 - 6, 10, 4, 106, 9, 10, 11, 10, 4, 106, 9, 8, 10, 10, 4, - 106, 8, 107, 10, 10, 4, 105, 8, 106, 9, 10, 4, 104, 106, - 105, 8, 10, 4, 104, 107, 106, 8, // 240 - 10, 10, 4, 106, 9, 10, 11, 10, 4, 3, 10, 9, 11, 10, 4, - 3, 9, 0, 11, 10, 4, 106, 9, 107, 10, 10, 4, 104, 107, - 9, 10, 10, 4, 104, 9, 3, 10, 10, 4, 104, 0, 3, 9, - 10, 4, 104, 107, 106, 9, 10, 4, 104, 106, 105, 9, 10, 4, - 104, 0, 100, 3, // 241 - 10, 10, 4, 105, 1, 8, 11, 10, 4, 105, 8, 106, 11, 10, 4, - 106, 8, 10, 11, 10, 4, 1, 10, 8, 11, 10, 4, 106, 8, - 107, 10, 10, 4, 0, 8, 1, 10, 10, 4, 104, 107, 106, 8, - 10, 4, 105, 1, 0, 8, 10, 4, 104, 106, 105, 8, 10, 4, - 105, 101, 0, 1, // 242 - 9, 10, 4, 106, 105, 10, 11, 10, 4, 1, 10, 105, 11, 10, 4, - 104, 106, 105, 10, 10, 4, 104, 105, 1, 10, 10, 4, 104, 107, - 106, 10, 10, 4, 1, 3, 104, 10, 10, 4, 100, 104, 1, 3, - 10, 4, 104, 105, 101, 1, 10, 4, 100, 104, 101, 1, // 243 - 10, 10, 4, 106, 2, 9, 10, 10, 4, 8, 9, 2, 10, 10, 4, - 106, 9, 8, 10, 10, 4, 106, 8, 107, 10, 10, 4, 106, 2, - 1, 9, 10, 4, 2, 8, 1, 9, 10, 4, 106, 105, 8, 9, - 10, 4, 104, 106, 105, 8, 10, 4, 104, 107, 106, 8, 10, 4, - 106, 102, 1, 2, // 244 - 13, 10, 4, 106, 2, 9, 10, 10, 4, 106, 9, 107, 10, 10, 4, - 3, 9, 2, 10, 10, 4, 104, 9, 3, 10, 10, 4, 107, 9, - 104, 10, 10, 4, 106, 2, 1, 9, 10, 4, 1, 2, 0, 9, - 10, 4, 2, 3, 0, 9, 10, 4, 0, 3, 104, 9, 10, 4, - 104, 107, 106, 9, 10, 4, 104, 106, 105, 9, 10, 4, 100, 104, - 0, 3, 10, 4, 106, 102, 1, 2, // 245 - 9, 10, 4, 106, 2, 8, 10, 10, 4, 106, 8, 107, 10, 10, 4, - 106, 2, 0, 8, 10, 4, 104, 107, 106, 8, 10, 4, 104, 106, - 105, 8, 10, 4, 106, 0, 105, 8, 10, 4, 106, 102, 0, 2, - 10, 4, 102, 101, 105, 0, 10, 4, 105, 106, 102, 0, // 246 - 10, 10, 4, 104, 105, 3, 10, 10, 4, 2, 3, 105, 10, 10, 4, - 104, 106, 105, 10, 10, 4, 106, 2, 105, 10, 10, 4, 104, 107, - 106, 10, 10, 4, 104, 105, 101, 3, 10, 4, 105, 2, 101, 3, - 10, 4, 101, 100, 104, 3, 10, 4, 102, 101, 105, 2, 10, 4, - 105, 106, 102, 2, // 247 - 10, 10, 4, 8, 9, 2, 11, 10, 4, 106, 9, 8, 11, 10, 4, - 107, 106, 8, 11, 10, 4, 107, 8, 2, 11, 10, 4, 106, 105, - 8, 9, 10, 4, 2, 8, 3, 9, 10, 4, 107, 3, 2, 8, - 10, 4, 104, 107, 106, 8, 10, 4, 104, 106, 105, 8, 10, 4, - 103, 2, 107, 3, // 248 - 9, 10, 4, 107, 9, 2, 11, 10, 4, 106, 9, 107, 11, 10, 4, - 104, 106, 105, 9, 10, 4, 104, 107, 106, 9, 10, 4, 104, 0, - 107, 9, 10, 4, 0, 2, 107, 9, 10, 4, 107, 0, 103, 2, - 10, 4, 104, 103, 107, 0, 10, 4, 103, 104, 100, 0, // 249 - 13, 10, 4, 105, 1, 8, 11, 10, 4, 105, 8, 106, 11, 10, 4, - 2, 8, 1, 11, 10, 4, 107, 8, 2, 11, 10, 4, 106, 8, - 107, 11, 10, 4, 104, 107, 106, 8, 10, 4, 2, 3, 0, 8, - 10, 4, 107, 3, 2, 8, 10, 4, 1, 2, 0, 8, 10, 4, - 105, 1, 0, 8, 10, 4, 104, 106, 105, 8, 10, 4, 107, 103, - 2, 3, 10, 4, 105, 101, 0, 1, // 250 - 10, 10, 4, 104, 1, 2, 11, 10, 4, 104, 2, 107, 11, 10, 4, - 104, 106, 105, 11, 10, 4, 104, 105, 1, 11, 10, 4, 104, 107, - 106, 11, 10, 4, 104, 103, 107, 2, 10, 4, 103, 104, 100, 2, - 10, 4, 104, 1, 100, 2, 10, 4, 101, 100, 104, 1, 10, 4, - 104, 105, 101, 1, // 251 - 9, 10, 4, 106, 105, 8, 9, 10, 4, 106, 8, 1, 9, 10, 4, - 107, 3, 1, 8, 10, 4, 104, 107, 106, 8, 10, 4, 107, 1, - 106, 8, 10, 4, 104, 106, 105, 8, 10, 4, 103, 1, 107, 3, - 10, 4, 106, 107, 103, 1, 10, 4, 103, 102, 106, 1, // 252 - 10, 10, 4, 106, 107, 1, 9, 10, 4, 0, 1, 107, 9, 10, 4, - 104, 107, 106, 9, 10, 4, 104, 0, 107, 9, 10, 4, 104, 106, - 105, 9, 10, 4, 106, 107, 103, 1, 10, 4, 107, 0, 103, 1, - 10, 4, 103, 102, 106, 1, 10, 4, 104, 103, 107, 0, 10, 4, - 103, 104, 100, 0, // 253 - 10, 10, 4, 106, 107, 3, 8, 10, 4, 106, 3, 0, 8, 10, 4, - 104, 107, 106, 8, 10, 4, 104, 106, 105, 8, 10, 4, 106, 0, - 105, 8, 10, 4, 103, 102, 106, 3, 10, 4, 102, 0, 106, 3, - 10, 4, 106, 107, 103, 3, 10, 4, 105, 106, 102, 0, 10, 4, - 102, 101, 105, 0, // 254 - 1, 12, 8, 100, 101, 102, 103, 104, 105, 106, 107, // 255 - // vtkm::CELL_SHAPE_WEDGE - 0, // 0 - 1, 10, 4, 0, 2, 100, 6, // 1 - 1, 10, 4, 101, 1, 0, 7, // 2 - 3, 10, 4, 1, 6, 101, 7, 10, 4, 1, 2, 100, 6, 10, 4, - 101, 1, 100, 6, // 3 - 1, 10, 4, 102, 2, 1, 8, // 4 - 3, 10, 4, 102, 6, 1, 8, 10, 4, 100, 1, 102, 6, 10, 4, - 100, 0, 1, 6, // 5 - 3, 10, 4, 2, 7, 102, 8, 10, 4, 102, 2, 0, 7, 10, 4, - 102, 0, 101, 7, // 6 - 3, 10, 4, 6, 7, 102, 8, 10, 4, 102, 6, 101, 7, 10, 4, - 101, 102, 100, 6, // 7 - 1, 10, 4, 103, 5, 3, 6, // 8 - 3, 10, 4, 103, 3, 2, 5, 10, 4, 0, 2, 103, 3, 10, 4, - 103, 0, 100, 2, // 9 - 6, 10, 4, 1, 5, 3, 7, 10, 4, 101, 1, 0, 7, 10, 4, - 1, 3, 0, 7, 10, 4, 3, 5, 1, 6, 10, 4, 103, 5, - 3, 6, 10, 4, 0, 3, 1, 6, // 10 - 7, 10, 4, 1, 5, 3, 7, 10, 4, 100, 101, 1, 7, 10, 4, - 100, 1, 3, 7, 10, 4, 103, 3, 1, 5, 10, 4, 1, 2, - 103, 5, 10, 4, 100, 1, 103, 3, 10, 4, 103, 1, 100, 2, // 11 - 6, 10, 4, 102, 2, 1, 8, 10, 4, 2, 5, 1, 8, 10, 4, - 1, 5, 3, 8, 10, 4, 1, 5, 2, 6, 10, 4, 3, 5, - 1, 6, 10, 4, 103, 5, 3, 6, // 12 - 7, 10, 4, 102, 100, 1, 8, 10, 4, 100, 5, 1, 8, 10, 4, - 1, 5, 3, 8, 10, 4, 103, 1, 100, 5, 10, 4, 103, 3, - 1, 5, 10, 4, 0, 1, 103, 3, 10, 4, 103, 0, 100, 1, // 13 - 9, 10, 4, 102, 2, 7, 8, 10, 4, 5, 7, 2, 8, 10, 4, - 2, 5, 3, 7, 10, 4, 102, 2, 0, 7, 10, 4, 2, 3, - 0, 7, 10, 4, 101, 102, 0, 7, 10, 4, 3, 5, 2, 6, - 10, 4, 103, 5, 3, 6, 10, 4, 0, 3, 2, 6, // 14 - 5, 10, 4, 102, 100, 7, 8, 10, 4, 5, 7, 100, 8, 10, 4, - 100, 5, 3, 7, 10, 4, 101, 102, 100, 7, 10, 4, 103, 3, - 100, 5, // 15 - 1, 10, 4, 3, 4, 104, 7, // 16 - 6, 10, 4, 2, 4, 0, 7, 10, 4, 104, 3, 4, 7, 10, 4, - 0, 4, 3, 7, 10, 4, 0, 2, 100, 6, 10, 4, 2, 0, - 4, 6, 10, 4, 3, 4, 0, 6, // 17 - 3, 10, 4, 1, 3, 104, 4, 10, 4, 104, 1, 0, 3, 10, 4, - 101, 0, 104, 1, // 18 - 7, 10, 4, 100, 101, 1, 6, 10, 4, 101, 3, 1, 6, 10, 4, - 1, 2, 100, 6, 10, 4, 2, 1, 4, 6, 10, 4, 3, 4, - 1, 6, 10, 4, 1, 3, 104, 4, 10, 4, 104, 1, 101, 3, // 19 - 7, 10, 4, 3, 4, 2, 8, 10, 4, 102, 2, 1, 8, 10, 4, - 2, 4, 1, 8, 10, 4, 1, 3, 2, 7, 10, 4, 3, 4, - 104, 7, 10, 4, 1, 4, 3, 7, 10, 4, 2, 3, 1, 4, // 20 - 9, 10, 4, 1, 6, 4, 8, 10, 4, 102, 6, 1, 8, 10, 4, - 1, 3, 0, 7, 10, 4, 3, 4, 104, 7, 10, 4, 1, 4, - 3, 7, 10, 4, 102, 100, 1, 6, 10, 4, 0, 1, 100, 6, - 10, 4, 0, 3, 1, 6, 10, 4, 3, 4, 1, 6, // 21 - 7, 10, 4, 3, 4, 2, 8, 10, 4, 2, 4, 102, 8, 10, 4, - 104, 0, 3, 4, 10, 4, 2, 3, 0, 4, 10, 4, 102, 2, - 0, 4, 10, 4, 101, 102, 0, 4, 10, 4, 101, 0, 104, 4, // 22 - 6, 10, 4, 102, 6, 4, 8, 10, 4, 100, 4, 102, 6, 10, 4, - 101, 3, 4, 6, 10, 4, 101, 4, 100, 6, 10, 4, 101, 102, - 100, 4, 10, 4, 101, 3, 104, 4, // 23 - 3, 10, 4, 104, 6, 4, 7, 10, 4, 103, 4, 104, 6, 10, 4, - 103, 5, 4, 6, // 24 - 6, 10, 4, 2, 4, 0, 7, 10, 4, 104, 103, 4, 7, 10, 4, - 0, 4, 103, 7, 10, 4, 103, 4, 2, 5, 10, 4, 0, 2, - 103, 4, 10, 4, 103, 0, 100, 2, // 25 - 7, 10, 4, 4, 5, 1, 6, 10, 4, 103, 5, 4, 6, 10, 4, - 0, 4, 1, 6, 10, 4, 104, 103, 4, 6, 10, 4, 104, 4, - 0, 6, 10, 4, 104, 1, 0, 4, 10, 4, 101, 0, 104, 1, // 26 - 6, 10, 4, 103, 4, 2, 5, 10, 4, 104, 1, 103, 4, 10, 4, - 1, 2, 103, 4, 10, 4, 103, 1, 100, 2, 10, 4, 100, 103, - 101, 1, 10, 4, 103, 104, 101, 1, // 27 - 9, 10, 4, 2, 5, 4, 8, 10, 4, 102, 2, 1, 8, 10, 4, - 2, 4, 1, 8, 10, 4, 4, 6, 1, 7, 10, 4, 104, 6, - 4, 7, 10, 4, 4, 5, 2, 6, 10, 4, 103, 5, 4, 6, - 10, 4, 1, 4, 2, 6, 10, 4, 104, 103, 4, 6, // 28 - 10, 10, 4, 102, 100, 1, 8, 10, 4, 100, 5, 1, 8, 10, 4, - 1, 5, 4, 8, 10, 4, 104, 103, 4, 7, 10, 4, 0, 4, - 103, 7, 10, 4, 1, 4, 0, 7, 10, 4, 103, 4, 1, 5, - 10, 4, 103, 1, 100, 5, 10, 4, 0, 1, 103, 4, 10, 4, - 103, 0, 100, 1, // 29 - 10, 10, 4, 102, 2, 4, 8, 10, 4, 2, 5, 4, 8, 10, 4, - 4, 5, 2, 6, 10, 4, 103, 5, 4, 6, 10, 4, 0, 4, - 2, 6, 10, 4, 104, 103, 4, 6, 10, 4, 104, 4, 0, 6, - 10, 4, 102, 2, 0, 4, 10, 4, 101, 0, 104, 4, 10, 4, - 102, 0, 101, 4, // 30 - 6, 10, 4, 102, 100, 4, 8, 10, 4, 100, 5, 4, 8, 10, 4, - 103, 4, 100, 5, 10, 4, 101, 102, 100, 4, 10, 4, 101, 100, - 103, 4, 10, 4, 103, 104, 101, 4, // 31 - 1, 10, 4, 4, 5, 105, 8, // 32 - 6, 10, 4, 2, 4, 0, 8, 10, 4, 105, 4, 5, 8, 10, 4, - 2, 5, 4, 8, 10, 4, 0, 2, 100, 6, 10, 4, 0, 4, - 2, 6, 10, 4, 4, 5, 2, 6, // 33 - 7, 10, 4, 0, 5, 1, 8, 10, 4, 4, 5, 105, 8, 10, 4, - 1, 5, 4, 8, 10, 4, 101, 1, 0, 7, 10, 4, 1, 4, - 0, 7, 10, 4, 4, 5, 0, 7, 10, 4, 0, 4, 1, 5, // 34 - 9, 10, 4, 2, 4, 1, 8, 10, 4, 105, 4, 5, 8, 10, 4, - 2, 5, 4, 8, 10, 4, 101, 1, 6, 7, 10, 4, 4, 6, - 1, 7, 10, 4, 100, 101, 1, 6, 10, 4, 1, 2, 100, 6, - 10, 4, 1, 4, 2, 6, 10, 4, 4, 5, 2, 6, // 35 - 3, 10, 4, 2, 4, 105, 5, 10, 4, 105, 2, 1, 4, 10, 4, - 102, 1, 105, 2, // 36 - 7, 10, 4, 0, 1, 100, 6, 10, 4, 0, 4, 1, 6, 10, 4, - 4, 5, 1, 6, 10, 4, 102, 100, 1, 6, 10, 4, 102, 1, - 5, 6, 10, 4, 105, 1, 4, 5, 10, 4, 102, 1, 105, 5, // 37 - 7, 10, 4, 4, 5, 0, 7, 10, 4, 101, 4, 0, 7, 10, 4, - 105, 2, 4, 5, 10, 4, 0, 4, 2, 5, 10, 4, 102, 105, - 2, 4, 10, 4, 102, 2, 0, 4, 10, 4, 101, 102, 0, 4, // 38 - 6, 10, 4, 4, 6, 101, 7, 10, 4, 101, 4, 100, 6, 10, 4, - 102, 100, 4, 6, 10, 4, 102, 4, 5, 6, 10, 4, 102, 4, - 105, 5, 10, 4, 101, 102, 100, 4, // 39 - 3, 10, 4, 4, 6, 105, 8, 10, 4, 103, 4, 3, 6, 10, 4, - 105, 4, 103, 6, // 40 - 7, 10, 4, 2, 4, 0, 8, 10, 4, 103, 4, 2, 8, 10, 4, - 105, 4, 103, 8, 10, 4, 103, 3, 2, 4, 10, 4, 2, 3, - 0, 4, 10, 4, 0, 2, 103, 3, 10, 4, 100, 103, 0, 2, // 41 - 9, 10, 4, 4, 6, 105, 8, 10, 4, 1, 6, 4, 8, 10, 4, - 1, 4, 3, 7, 10, 4, 101, 1, 0, 7, 10, 4, 1, 3, - 0, 7, 10, 4, 103, 105, 4, 6, 10, 4, 3, 4, 1, 6, - 10, 4, 103, 4, 3, 6, 10, 4, 0, 3, 1, 6, // 42 - 10, 10, 4, 2, 4, 1, 8, 10, 4, 103, 4, 2, 8, 10, 4, - 105, 4, 103, 8, 10, 4, 1, 4, 3, 7, 10, 4, 100, 101, - 1, 7, 10, 4, 100, 1, 3, 7, 10, 4, 1, 2, 103, 4, - 10, 4, 103, 3, 1, 4, 10, 4, 100, 1, 103, 3, 10, 4, - 100, 103, 1, 2, // 43 - 7, 10, 4, 105, 2, 4, 6, 10, 4, 105, 4, 103, 6, 10, 4, - 1, 4, 2, 6, 10, 4, 3, 4, 1, 6, 10, 4, 103, 4, - 3, 6, 10, 4, 105, 2, 1, 4, 10, 4, 102, 1, 105, 2, // 44 - 6, 10, 4, 103, 1, 105, 4, 10, 4, 103, 3, 1, 4, 10, 4, - 0, 1, 103, 3, 10, 4, 102, 105, 103, 1, 10, 4, 102, 103, - 100, 1, 10, 4, 103, 0, 100, 1, // 45 - 10, 10, 4, 0, 101, 4, 7, 10, 4, 0, 4, 3, 7, 10, 4, - 2, 0, 4, 6, 10, 4, 3, 4, 0, 6, 10, 4, 105, 2, - 4, 6, 10, 4, 105, 4, 103, 6, 10, 4, 103, 4, 3, 6, - 10, 4, 102, 105, 2, 4, 10, 4, 102, 2, 0, 4, 10, 4, - 102, 0, 101, 4, // 46 - 6, 10, 4, 100, 4, 3, 7, 10, 4, 101, 4, 100, 7, 10, 4, - 101, 102, 100, 4, 10, 4, 102, 103, 100, 4, 10, 4, 103, 3, - 100, 4, 10, 4, 102, 105, 103, 4, // 47 - 3, 10, 4, 105, 7, 5, 8, 10, 4, 3, 5, 105, 7, 10, 4, - 104, 3, 105, 7, // 48 - 9, 10, 4, 2, 5, 7, 8, 10, 4, 105, 7, 5, 8, 10, 4, - 105, 104, 3, 7, 10, 4, 3, 5, 105, 7, 10, 4, 2, 5, - 3, 7, 10, 4, 2, 3, 0, 7, 10, 4, 100, 0, 2, 6, - 10, 4, 0, 3, 2, 6, 10, 4, 3, 5, 2, 6, // 49 - 7, 10, 4, 0, 5, 1, 8, 10, 4, 1, 5, 105, 8, 10, 4, - 1, 3, 105, 5, 10, 4, 0, 3, 1, 5, 10, 4, 104, 105, - 1, 3, 10, 4, 104, 1, 0, 3, 10, 4, 104, 101, 0, 1, // 50 - 10, 10, 4, 105, 1, 5, 8, 10, 4, 2, 5, 1, 8, 10, 4, - 2, 1, 5, 6, 10, 4, 3, 5, 1, 6, 10, 4, 100, 101, - 1, 6, 10, 4, 101, 3, 1, 6, 10, 4, 1, 2, 100, 6, - 10, 4, 105, 1, 3, 5, 10, 4, 104, 1, 101, 3, 10, 4, - 105, 1, 104, 3, // 51 - 7, 10, 4, 1, 3, 2, 7, 10, 4, 104, 3, 1, 7, 10, 4, - 105, 2, 1, 5, 10, 4, 105, 1, 3, 5, 10, 4, 2, 3, - 1, 5, 10, 4, 105, 1, 104, 3, 10, 4, 102, 1, 105, 2, // 52 - 10, 10, 4, 1, 3, 0, 7, 10, 4, 104, 3, 1, 7, 10, 4, - 100, 1, 102, 6, 10, 4, 1, 5, 102, 6, 10, 4, 100, 0, - 1, 6, 10, 4, 0, 3, 1, 6, 10, 4, 3, 5, 1, 6, - 10, 4, 1, 3, 105, 5, 10, 4, 102, 1, 105, 5, 10, 4, - 104, 105, 1, 3, // 53 - 6, 10, 4, 2, 3, 105, 5, 10, 4, 105, 2, 0, 3, 10, 4, - 105, 0, 104, 3, 10, 4, 102, 0, 105, 2, 10, 4, 104, 105, - 102, 0, 10, 4, 101, 104, 102, 0, // 54 - 6, 10, 4, 101, 102, 100, 6, 10, 4, 101, 3, 102, 6, 10, 4, - 3, 5, 102, 6, 10, 4, 102, 3, 105, 5, 10, 4, 101, 104, - 102, 3, 10, 4, 104, 105, 102, 3, // 55 - 3, 10, 4, 105, 7, 6, 8, 10, 4, 104, 6, 105, 7, 10, 4, - 103, 105, 104, 6, // 56 - 5, 10, 4, 103, 105, 7, 8, 10, 4, 103, 7, 2, 8, 10, 4, - 103, 105, 104, 7, 10, 4, 103, 0, 2, 7, 10, 4, 103, 0, - 100, 2, // 57 - 6, 10, 4, 1, 6, 105, 8, 10, 4, 105, 1, 103, 6, 10, 4, - 104, 1, 0, 6, 10, 4, 103, 1, 104, 6, 10, 4, 103, 105, - 104, 1, 10, 4, 104, 101, 0, 1, // 58 - 6, 10, 4, 105, 1, 103, 8, 10, 4, 1, 2, 103, 8, 10, 4, - 100, 103, 1, 2, 10, 4, 100, 103, 101, 1, 10, 4, 103, 104, - 101, 1, 10, 4, 103, 105, 104, 1, // 59 - 6, 10, 4, 104, 6, 1, 7, 10, 4, 103, 105, 1, 6, 10, 4, - 105, 2, 1, 6, 10, 4, 103, 1, 104, 6, 10, 4, 102, 1, - 105, 2, 10, 4, 103, 105, 104, 1, // 60 - 6, 10, 4, 103, 0, 1, 7, 10, 4, 103, 1, 104, 7, 10, 4, - 103, 105, 104, 1, 10, 4, 102, 103, 100, 1, 10, 4, 103, 0, - 100, 1, 10, 4, 103, 102, 105, 1, // 61 - 6, 10, 4, 105, 2, 0, 6, 10, 4, 103, 105, 104, 6, 10, 4, - 105, 0, 104, 6, 10, 4, 102, 0, 105, 2, 10, 4, 104, 105, - 102, 0, 10, 4, 102, 101, 104, 0, // 62 - 1, 13, 6, 100, 101, 102, 103, 104, 105, // 63 - // vtkm::CELL_SHAPE_PYRAMID - 0, // 0 - 1, 10, 4, 0, 3, 100, 4, // 1 - 1, 10, 4, 101, 1, 0, 5, // 2 - 3, 10, 4, 1, 3, 100, 5, 10, 4, 3, 4, 100, 5, 10, 4, - 101, 1, 100, 5, // 3 - 1, 10, 4, 102, 2, 1, 6, // 4 - 5, 10, 4, 102, 2, 1, 6, 10, 4, 2, 3, 0, 6, 10, 4, - 3, 4, 0, 6, 10, 4, 1, 2, 0, 6, 10, 4, 100, 0, - 3, 4, // 5 - 3, 10, 4, 102, 2, 0, 6, 10, 4, 102, 0, 101, 6, 10, 4, - 0, 5, 101, 6, // 6 - 6, 10, 4, 102, 2, 101, 6, 10, 4, 2, 3, 101, 6, 10, 4, - 3, 5, 101, 6, 10, 4, 4, 5, 3, 6, 10, 4, 101, 3, - 100, 5, 10, 4, 3, 4, 100, 5, // 7 - 1, 10, 4, 103, 3, 2, 7, // 8 - 3, 10, 4, 100, 0, 103, 7, 10, 4, 100, 4, 0, 7, 10, 4, - 0, 2, 103, 7, // 9 - 5, 10, 4, 103, 3, 2, 7, 10, 4, 3, 5, 2, 7, 10, 4, - 2, 3, 0, 5, 10, 4, 1, 2, 0, 5, 10, 4, 101, 1, - 0, 5, // 10 - 5, 10, 4, 100, 2, 103, 7, 10, 4, 2, 100, 5, 7, 10, 4, - 4, 5, 100, 7, 10, 4, 1, 2, 100, 5, 10, 4, 101, 1, - 100, 5, // 11 - 3, 10, 4, 3, 6, 103, 7, 10, 4, 103, 3, 1, 6, 10, 4, - 103, 1, 102, 6, // 12 - 6, 10, 4, 100, 4, 6, 7, 10, 4, 100, 6, 103, 7, 10, 4, - 103, 1, 102, 6, 10, 4, 100, 0, 103, 6, 10, 4, 100, 4, - 0, 6, 10, 4, 0, 1, 103, 6, // 13 - 7, 10, 4, 3, 6, 103, 7, 10, 4, 5, 6, 3, 7, 10, 4, - 103, 3, 102, 6, 10, 4, 102, 3, 0, 6, 10, 4, 3, 5, - 0, 6, 10, 4, 102, 0, 101, 6, 10, 4, 0, 5, 101, 6, // 14 - 6, 10, 4, 103, 100, 6, 7, 10, 4, 4, 6, 100, 7, 10, 4, - 4, 5, 100, 6, 10, 4, 102, 103, 100, 6, 10, 4, 101, 102, - 100, 6, 10, 4, 101, 100, 5, 6, // 15 - 2, 10, 4, 104, 6, 4, 7, 10, 4, 104, 5, 4, 6, // 16 - 6, 10, 4, 5, 6, 3, 7, 10, 4, 104, 6, 5, 7, 10, 4, - 100, 5, 3, 7, 10, 4, 104, 5, 100, 7, 10, 4, 3, 5, - 0, 6, 10, 4, 0, 3, 100, 5, // 17 - 6, 10, 4, 104, 6, 4, 7, 10, 4, 0, 6, 1, 7, 10, 4, - 4, 6, 0, 7, 10, 4, 104, 0, 4, 6, 10, 4, 101, 0, - 104, 6, 10, 4, 101, 1, 0, 6, // 18 - 5, 10, 4, 100, 104, 6, 7, 10, 4, 100, 6, 3, 7, 10, 4, - 100, 1, 3, 6, 10, 4, 100, 104, 101, 6, 10, 4, 100, 101, - 1, 6, // 19 - 6, 10, 4, 4, 5, 2, 7, 10, 4, 104, 5, 4, 7, 10, 4, - 102, 2, 5, 7, 10, 4, 102, 5, 104, 7, 10, 4, 2, 4, - 1, 5, 10, 4, 102, 2, 1, 5, // 20 - 9, 10, 4, 3, 5, 2, 7, 10, 4, 100, 5, 3, 7, 10, 4, - 104, 5, 100, 7, 10, 4, 104, 102, 5, 7, 10, 4, 2, 5, - 102, 7, 10, 4, 0, 3, 100, 5, 10, 4, 2, 3, 0, 5, - 10, 4, 1, 2, 0, 5, 10, 4, 102, 2, 1, 5, // 21 - 5, 10, 4, 104, 0, 4, 7, 10, 4, 101, 104, 102, 7, 10, 4, - 101, 102, 0, 7, 10, 4, 101, 0, 104, 7, 10, 4, 102, 2, - 0, 7, // 22 - 5, 10, 4, 101, 2, 3, 7, 10, 4, 101, 100, 104, 7, 10, 4, - 101, 3, 100, 7, 10, 4, 101, 104, 102, 7, 10, 4, 101, 102, - 2, 7, // 23 - 6, 10, 4, 104, 5, 4, 6, 10, 4, 2, 3, 5, 6, 10, 4, - 4, 5, 3, 6, 10, 4, 104, 4, 3, 6, 10, 4, 103, 104, - 3, 6, 10, 4, 103, 3, 2, 6, // 24 - 5, 10, 4, 103, 104, 100, 6, 10, 4, 104, 5, 100, 6, 10, 4, - 103, 100, 0, 6, 10, 4, 100, 5, 0, 6, 10, 4, 0, 2, - 103, 6, // 25 - 9, 10, 4, 103, 3, 2, 6, 10, 4, 104, 3, 103, 6, 10, 4, - 104, 4, 3, 6, 10, 4, 2, 3, 0, 6, 10, 4, 3, 4, - 0, 6, 10, 4, 1, 2, 0, 6, 10, 4, 104, 0, 4, 6, - 10, 4, 101, 0, 104, 6, 10, 4, 101, 1, 0, 6, // 26 - 5, 10, 4, 1, 2, 100, 6, 10, 4, 103, 104, 100, 6, 10, 4, - 103, 100, 2, 6, 10, 4, 101, 100, 104, 6, 10, 4, 101, 1, - 100, 6, // 27 - 5, 10, 4, 104, 4, 3, 5, 10, 4, 103, 104, 3, 5, 10, 4, - 103, 3, 1, 5, 10, 4, 102, 104, 103, 5, 10, 4, 102, 103, - 1, 5, // 28 - 5, 10, 4, 103, 104, 100, 5, 10, 4, 103, 100, 0, 5, 10, 4, - 0, 1, 103, 5, 10, 4, 102, 104, 103, 5, 10, 4, 102, 103, - 1, 5, // 29 - 5, 10, 4, 102, 0, 104, 4, 10, 4, 102, 104, 3, 4, 10, 4, - 102, 3, 0, 4, 10, 4, 102, 104, 103, 3, 10, 4, 102, 101, - 104, 0, // 30 - 1, 14, 5, 100, 101, 102, 103, 104 // 31 + 0, // 0 + 1, 1, 1, 100, // 1 + // vtkm::CELL_SHAPE_LINE + 0, // 0 + 1, 3, 2, 100, 0, // 1 + 1, 3, 2, 0, 101, // 2 + 1, 3, 2, 100, 101, // 3 + // vtkm::CELL_SHAPE_TRIANGLE + 0, // 0 + 1, 5, 3, 0, 2, 100, // 1 + 1, 5, 3, 1, 0, 101, // 2 + 2, 5, 3, 1, 2, 100, 5, 3, 1, 100, 101, // 3 + 1, 5, 3, 2, 1, 102, // 4 + 2, 5, 3, 0, 1, 102, 5, 3, 102, 100, 0, // 5 + 2, 5, 3, 0, 101, 2, 5, 3, 2, 101, 102, // 6 + 1, 5, 3, 100, 101, 102, // 7 + // vtkm::CELL_SHAPE_QUAD + 0, // 0 + 1, 5, 3, 100, 0, 3, // 1 + 1, 5, 3, 101, 1, 0, // 2 + 1, 9, 4, 100, 101, 1, 3, // 3 + 1, 5, 3, 102, 2, 1, // 4 + 3, 5, 3, 100, 0, 3, 5, 3, 102, 2, 1, 9, 4, 0, 1, 2, 3, // 5 + 1, 9, 4, 101, 102, 2, 0, // 6 + 3, 5, 3, 100, 101, 3, 5, 3, 101, 2, 3, 5, 3, 101, 102, + 2, // 7 + 1, 5, 3, 103, 3, 2, // 8 + 1, 9, 4, 100, 0, 2, 103, // 9 + 3, 5, 3, 101, 1, 0, 5, 3, 103, 3, 2, 9, 4, 0, 1, 2, 3, // 10 + 3, 5, 3, 100, 101, 1, 5, 3, 100, 1, 2, 5, 3, 100, 2, + 103, // 11 + 1, 9, 4, 102, 103, 3, 1, // 12 + 3, 5, 3, 100, 0, 103, 5, 3, 0, 1, 103, 5, 3, 1, 102, + 103, // 13 + 3, 5, 3, 0, 101, 102, 5, 3, 0, 102, 3, 5, 3, 102, 103, + 3, // 14 + 1, 9, 4, 100, 101, 102, 103, // 15 + // vtkm::CELL_SHAPE_TETRA + 0, // 0 + 1, 10, 4, 0, 3, 2, 100, // 1 + 1, 10, 4, 0, 1, 4, 101, // 2 + 1, 13, 6, 101, 1, 4, 100, 2, 3, // 3 + 1, 10, 4, 1, 2, 5, 102, // 4 + 1, 13, 6, 102, 5, 1, 100, 3, 0, // 5 + 1, 13, 6, 102, 2, 5, 101, 0, 4, // 6 + 1, 13, 6, 3, 4, 5, 100, 101, 102, // 7 + 1, 10, 4, 3, 4, 5, 103, // 8 + 1, 13, 6, 103, 4, 5, 100, 0, 2, // 9 + 1, 13, 6, 103, 5, 3, 101, 1, 0, // 10 + 1, 13, 6, 100, 101, 103, 2, 1, 5, // 11 + 1, 13, 6, 2, 102, 1, 3, 103, 4, // 12 + 1, 13, 6, 0, 1, 4, 100, 102, 103, // 13 + 1, 13, 6, 0, 3, 2, 101, 103, 102, // 14 + 1, 10, 4, 100, 101, 102, 103, // 15 + // vtkm::CELL_SHAPE_HEXAHEDRON + 0, // 0 + 1, 10, 4, 0, 3, 100, 8, // 1 + 1, 10, 4, 101, 1, 0, 9, // 2 + 3, 10, 4, 1, 8, 101, 9, 10, 4, 1, 3, 100, 8, 10, 4, 101, 1, 100, 8, // 3 + 1, 10, 4, 102, 2, 1, 11, // 4 + 5, 10, 4, 102, 2, 1, 11, 10, 4, 2, 8, 1, 11, 10, 4, 1, 2, 0, 8, 10, 4, 2, 3, 0, 8, 10, 4, 100, 0, + 3, 8, // 5 + 3, 10, 4, 2, 9, 102, 11, 10, 4, 102, 2, 0, 9, 10, 4, 102, 0, 101, 9, // 6 + 7, 10, 4, 8, 9, 2, 11, 10, 4, 2, 9, 102, 11, 10, 4, 2, 3, 101, 9, 10, 4, 3, 8, 101, 9, 10, 4, 2, + 8, 3, 9, 10, 4, 102, 2, 101, 9, 10, 4, 101, 3, 100, 8, // 7 + 1, 10, 4, 103, 3, 2, 10, // 8 + 3, 10, 4, 103, 8, 2, 10, 10, 4, 0, 2, 103, 8, 10, 4, 100, 0, 103, 8, // 9 + 5, 10, 4, 103, 3, 2, 10, 10, 4, 3, 9, 2, 10, 10, 4, 2, 3, 0, 9, 10, 4, 1, 2, 0, 9, 10, 4, 101, 1, + 0, 9, // 10 + 7, 10, 4, 8, 9, 2, 10, 10, 4, 103, 8, 2, 10, 10, 4, 2, 8, 1, 9, 10, 4, 1, 8, 101, 9, 10, 4, 100, + 2, 103, 8, 10, 4, 1, 2, 100, 8, 10, 4, 101, 1, 100, 8, // 11 + 3, 10, 4, 102, 10, 1, 11, 10, 4, 103, 1, 102, 10, 10, 4, 103, 3, 1, 10, // 12 + 7, 10, 4, 1, 10, 8, 11, 10, 4, 102, 10, 1, 11, 10, 4, 0, 1, 103, 10, 10, 4, 0, 103, 8, 10, 10, 4, + 0, 8, 1, 10, 10, 4, 103, 1, 102, 10, 10, 4, 100, 0, 103, 8, // 13 + 7, 10, 4, 102, 3, 0, 11, 10, 4, 102, 0, 9, 11, 10, 4, 3, 9, 0, 11, 10, 4, 3, 102, 10, 11, 10, 4, + 3, 10, 9, 11, 10, 4, 103, 3, 102, 10, 10, 4, 102, 0, 101, 9, // 14 + 6, 10, 4, 102, 10, 9, 11, 10, 4, 8, 9, 102, 10, 10, 4, 103, 8, 102, 10, 10, 4, 102, 8, 101, 9, 10, + 4, 102, 103, 100, 8, 10, 4, 101, 102, 100, 8, // 15 + 1, 10, 4, 104, 7, 4, 8, // 16 + 3, 10, 4, 104, 4, 3, 7, 10, 4, 0, 3, 104, 4, 10, 4, 104, 0, 100, 3, // 17 + 5, 10, 4, 101, 1, 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, 0, 4, 7, 8, 10, 4, 104, 7, 4, 8, 10, 4, 0, 4, 1, + 7, // 18 + 7, 10, 4, 100, 1, 3, 9, 10, 4, 100, 3, 4, 9, 10, 4, 1, 4, 3, 9, 10, 4, 100, 101, 1, 9, 10, 4, 3, + 4, 1, 7, 10, 4, 104, 4, 3, 7, 10, 4, 100, 3, 104, 4, // 19 + 6, 10, 4, 102, 2, 1, 11, 10, 4, 2, 4, 1, 11, 10, 4, 2, 7, 4, 11, 10, 4, 4, 7, 2, 8, 10, 4, 104, 7, + 4, 8, 10, 4, 1, 4, 2, 8, // 20 + 9, 10, 4, 102, 2, 1, 11, 10, 4, 2, 4, 1, 11, 10, 4, 2, 7, 4, 11, 10, 4, 3, 4, 2, 7, 10, 4, 104, 4, + 3, 7, 10, 4, 104, 0, 3, 4, 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, 10, 4, 104, 0, 100, 3, // 21 + 10, 10, 4, 102, 2, 9, 11, 10, 4, 4, 9, 2, 11, 10, 4, 2, 7, 4, 11, 10, 4, 102, 2, 0, 9, 10, 4, 2, + 4, 0, 9, 10, 4, 101, 102, 0, 9, 10, 4, 0, 7, 2, 8, 10, 4, 0, 4, 7, 8, 10, 4, 104, 7, 4, 8, 10, 4, + 0, 4, 2, 7, // 22 + 11, 10, 4, 102, 2, 9, 11, 10, 4, 4, 9, 2, 11, 10, 4, 2, 7, 4, 11, 10, 4, 101, 102, 2, 9, 10, 4, + 101, 2, 3, 9, 10, 4, 2, 4, 3, 9, 10, 4, 101, 3, 100, 9, 10, 4, 3, 4, 100, 9, 10, 4, 3, 4, 2, 7, + 10, 4, 104, 4, 3, 7, 10, 4, 100, 3, 104, 4, // 23 + 5, 10, 4, 103, 3, 2, 10, 10, 4, 3, 7, 2, 10, 10, 4, 4, 7, 3, 8, 10, 4, 104, 7, 4, 8, 10, 4, 3, 4, + 2, 7, // 24 + 7, 10, 4, 103, 100, 0, 10, 10, 4, 100, 7, 0, 10, 10, 4, 0, 2, 103, 10, 10, 4, 0, 7, 2, 10, 10, 4, + 0, 104, 4, 7, 10, 4, 0, 4, 2, 7, 10, 4, 104, 0, 100, 7, // 25 + 10, 10, 4, 103, 3, 2, 10, 10, 4, 3, 7, 2, 10, 10, 4, 101, 1, 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, 4, 7, + 3, 8, 10, 4, 104, 7, 4, 8, 10, 4, 0, 4, 3, 8, 10, 4, 3, 4, 2, 7, 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, + 0, 4, // 26 + 7, 10, 4, 103, 100, 2, 10, 10, 4, 100, 7, 2, 10, 10, 4, 101, 1, 100, 9, 10, 4, 1, 4, 100, 9, 10, + 4, 100, 4, 2, 7, 10, 4, 104, 4, 100, 7, 10, 4, 1, 2, 100, 4, // 27 + 10, 10, 4, 1, 10, 7, 11, 10, 4, 102, 10, 1, 11, 10, 4, 1, 7, 4, 11, 10, 4, 103, 3, 1, 10, 10, 4, + 3, 7, 1, 10, 10, 4, 102, 103, 1, 10, 10, 4, 1, 4, 3, 8, 10, 4, 4, 7, 3, 8, 10, 4, 104, 7, 4, 8, + 10, 4, 3, 4, 1, 7, // 28 + 11, 10, 4, 1, 10, 7, 11, 10, 4, 102, 10, 1, 11, 10, 4, 1, 7, 4, 11, 10, 4, 103, 100, 0, 10, 10, 4, + 100, 7, 0, 10, 10, 4, 0, 1, 103, 10, 10, 4, 0, 7, 1, 10, 10, 4, 102, 103, 1, 10, 10, 4, 104, 0, + 100, 7, 10, 4, 104, 4, 0, 7, 10, 4, 0, 4, 1, 7, // 29 + 15, 10, 4, 102, 3, 0, 11, 10, 4, 102, 0, 9, 11, 10, 4, 3, 9, 0, 11, 10, 4, 3, 10, 9, 11, 10, 4, + 102, 10, 3, 11, 10, 4, 9, 10, 7, 11, 10, 4, 4, 9, 7, 11, 10, 4, 7, 9, 3, 10, 10, 4, 102, 103, 3, + 10, 10, 4, 3, 7, 4, 9, 10, 4, 3, 4, 0, 9, 10, 4, 102, 0, 101, 9, 10, 4, 4, 7, 3, 8, 10, 4, 104, 7, + 4, 8, 10, 4, 0, 4, 3, 8, // 30 + 10, 10, 4, 9, 10, 7, 11, 10, 4, 102, 10, 9, 11, 10, 4, 4, 9, 7, 11, 10, 4, 103, 100, 9, 10, 10, 4, + 7, 9, 100, 10, 10, 4, 103, 9, 102, 10, 10, 4, 100, 7, 4, 9, 10, 4, 102, 103, 100, 9, 10, 4, 101, + 102, 100, 9, 10, 4, 104, 4, 100, 7, // 31 + 1, 10, 4, 4, 5, 105, 9, // 32 + 5, 10, 4, 105, 4, 5, 9, 10, 4, 0, 5, 4, 9, 10, 4, 0, 3, 100, 8, 10, 4, 0, 4, 3, 8, 10, 4, 3, 4, 0, + 5, // 33 + 3, 10, 4, 1, 4, 105, 5, 10, 4, 105, 1, 0, 4, 10, 4, 101, 0, 105, 1, // 34 + 7, 10, 4, 100, 101, 1, 8, 10, 4, 101, 4, 1, 8, 10, 4, 100, 1, 3, 8, 10, 4, 1, 4, 3, 8, 10, 4, 3, + 4, 1, 5, 10, 4, 1, 4, 105, 5, 10, 4, 105, 1, 101, 4, // 35 + 5, 10, 4, 102, 2, 1, 11, 10, 4, 2, 5, 1, 11, 10, 4, 105, 4, 5, 9, 10, 4, 1, 5, 4, 9, 10, 4, 2, 4, + 1, 5, // 36 + 10, 10, 4, 102, 2, 1, 11, 10, 4, 2, 5, 1, 11, 10, 4, 1, 4, 0, 9, 10, 4, 105, 4, 5, 9, 10, 4, 1, 5, + 4, 9, 10, 4, 0, 3, 100, 8, 10, 4, 0, 4, 3, 8, 10, 4, 2, 4, 1, 5, 10, 4, 1, 2, 0, 4, 10, 4, 2, 3, + 0, 4, // 37 + 7, 10, 4, 102, 2, 0, 11, 10, 4, 2, 5, 0, 11, 10, 4, 101, 102, 0, 11, 10, 4, 101, 0, 5, 11, 10, 4, + 105, 0, 4, 5, 10, 4, 2, 4, 0, 5, 10, 4, 101, 0, 105, 5, // 38 + 7, 10, 4, 101, 102, 2, 11, 10, 4, 101, 2, 5, 11, 10, 4, 101, 3, 100, 8, 10, 4, 101, 4, 3, 8, 10, + 4, 101, 2, 4, 5, 10, 4, 101, 4, 105, 5, 10, 4, 101, 2, 3, 4, // 39 + 6, 10, 4, 103, 3, 2, 10, 10, 4, 3, 4, 2, 10, 10, 4, 4, 5, 2, 10, 10, 4, 4, 5, 105, 9, 10, 4, 2, 5, + 4, 9, 10, 4, 2, 4, 3, 9, // 40 + 10, 10, 4, 2, 103, 8, 10, 10, 4, 2, 8, 4, 10, 10, 4, 4, 5, 2, 10, 10, 4, 2, 5, 0, 9, 10, 4, 105, + 4, 5, 9, 10, 4, 0, 5, 4, 9, 10, 4, 0, 2, 103, 8, 10, 4, 0, 4, 2, 8, 10, 4, 103, 100, 0, 8, 10, 4, + 2, 4, 0, 5, // 41 + 9, 10, 4, 103, 3, 2, 10, 10, 4, 3, 4, 2, 10, 10, 4, 4, 5, 2, 10, 10, 4, 105, 1, 4, 5, 10, 4, 2, 4, + 1, 5, 10, 4, 105, 1, 0, 4, 10, 4, 1, 2, 0, 4, 10, 4, 2, 3, 0, 4, 10, 4, 101, 0, 105, 1, // 42 + 11, 10, 4, 2, 8, 4, 10, 10, 4, 103, 8, 2, 10, 10, 4, 4, 5, 2, 10, 10, 4, 101, 1, 100, 8, 10, 4, + 101, 4, 1, 8, 10, 4, 1, 2, 100, 8, 10, 4, 1, 4, 2, 8, 10, 4, 103, 100, 2, 8, 10, 4, 105, 1, 4, 5, + 10, 4, 2, 4, 1, 5, 10, 4, 101, 105, 1, 4, // 43 + 10, 10, 4, 1, 10, 5, 11, 10, 4, 102, 10, 1, 11, 10, 4, 102, 103, 1, 10, 10, 4, 103, 3, 1, 10, 10, + 4, 3, 5, 1, 10, 10, 4, 4, 5, 3, 10, 10, 4, 1, 4, 3, 9, 10, 4, 4, 5, 105, 9, 10, 4, 1, 5, 4, 9, 10, + 4, 3, 4, 1, 5, // 44 + 14, 10, 4, 1, 10, 5, 11, 10, 4, 102, 10, 1, 11, 10, 4, 0, 1, 103, 10, 10, 4, 0, 103, 8, 10, 10, 4, + 0, 8, 1, 10, 10, 4, 102, 103, 1, 10, 10, 4, 1, 8, 5, 10, 10, 4, 5, 8, 4, 10, 10, 4, 1, 4, 0, 9, + 10, 4, 4, 5, 105, 9, 10, 4, 1, 5, 4, 9, 10, 4, 4, 5, 1, 8, 10, 4, 0, 4, 1, 8, 10, 4, 103, 100, 0, + 8, // 45 + 11, 10, 4, 3, 10, 5, 11, 10, 4, 102, 10, 3, 11, 10, 4, 102, 3, 0, 11, 10, 4, 3, 5, 0, 11, 10, 4, + 102, 0, 101, 11, 10, 4, 0, 5, 101, 11, 10, 4, 102, 103, 3, 10, 10, 4, 4, 5, 3, 10, 10, 4, 101, 0, + 105, 5, 10, 4, 0, 4, 105, 5, 10, 4, 3, 4, 0, 5, // 46 + 10, 10, 4, 8, 10, 5, 11, 10, 4, 102, 10, 8, 11, 10, 4, 101, 102, 8, 11, 10, 4, 101, 8, 5, 11, 10, + 4, 103, 8, 102, 10, 10, 4, 5, 8, 4, 10, 10, 4, 101, 4, 5, 8, 10, 4, 101, 102, 100, 8, 10, 4, 102, + 103, 100, 8, 10, 4, 101, 4, 105, 5, // 47 + 3, 10, 4, 105, 8, 5, 9, 10, 4, 104, 5, 105, 8, 10, 4, 104, 7, 5, 8, // 48 + 7, 10, 4, 0, 5, 7, 9, 10, 4, 104, 7, 5, 9, 10, 4, 0, 7, 104, 9, 10, 4, 105, 104, 5, 9, 10, 4, 0, + 3, 104, 7, 10, 4, 0, 5, 3, 7, 10, 4, 104, 0, 100, 3, // 49 + 7, 10, 4, 0, 5, 7, 8, 10, 4, 104, 7, 5, 8, 10, 4, 105, 104, 5, 8, 10, 4, 105, 5, 0, 8, 10, 4, 0, + 5, 1, 7, 10, 4, 105, 1, 0, 5, 10, 4, 101, 0, 105, 1, // 50 + 6, 10, 4, 104, 5, 3, 7, 10, 4, 1, 3, 104, 5, 10, 4, 105, 1, 104, 5, 10, 4, 100, 104, 1, 3, 10, 4, + 104, 105, 101, 1, 10, 4, 100, 104, 101, 1, // 51 + 10, 10, 4, 2, 7, 5, 11, 10, 4, 102, 2, 1, 11, 10, 4, 2, 5, 1, 11, 10, 4, 5, 8, 1, 9, 10, 4, 105, + 8, 5, 9, 10, 4, 105, 104, 5, 8, 10, 4, 1, 5, 7, 8, 10, 4, 104, 7, 5, 8, 10, 4, 1, 7, 2, 8, 10, 4, + 1, 5, 2, 7, // 52 + 14, 10, 4, 2, 7, 5, 11, 10, 4, 102, 2, 1, 11, 10, 4, 2, 5, 1, 11, 10, 4, 104, 0, 7, 9, 10, 4, 5, + 7, 0, 9, 10, 4, 104, 7, 5, 9, 10, 4, 105, 104, 5, 9, 10, 4, 1, 5, 0, 9, 10, 4, 104, 0, 3, 7, 10, + 4, 0, 5, 3, 7, 10, 4, 3, 5, 2, 7, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, 0, 5, 10, 4, 104, 0, 100, + 3, // 53 + 12, 10, 4, 2, 7, 5, 11, 10, 4, 102, 2, 0, 11, 10, 4, 2, 5, 0, 11, 10, 4, 102, 0, 101, 11, 10, 4, + 0, 5, 101, 11, 10, 4, 0, 7, 2, 8, 10, 4, 0, 5, 7, 8, 10, 4, 104, 7, 5, 8, 10, 4, 105, 104, 5, 8, + 10, 4, 105, 5, 0, 8, 10, 4, 0, 5, 2, 7, 10, 4, 101, 0, 105, 5, // 54 + 10, 10, 4, 2, 7, 5, 11, 10, 4, 102, 2, 101, 11, 10, 4, 2, 5, 101, 11, 10, 4, 3, 5, 2, 7, 10, 4, + 104, 5, 3, 7, 10, 4, 105, 101, 3, 5, 10, 4, 2, 3, 101, 5, 10, 4, 104, 105, 3, 5, 10, 4, 104, 105, + 101, 3, 10, 4, 101, 100, 104, 3, // 55 + 10, 10, 4, 103, 3, 2, 10, 10, 4, 3, 7, 2, 10, 10, 4, 2, 7, 5, 10, 10, 4, 5, 8, 3, 9, 10, 4, 105, + 8, 5, 9, 10, 4, 2, 5, 3, 9, 10, 4, 5, 7, 3, 8, 10, 4, 104, 7, 5, 8, 10, 4, 104, 5, 105, 8, 10, 4, + 3, 5, 2, 7, // 56 + 12, 10, 4, 103, 100, 0, 10, 10, 4, 100, 7, 0, 10, 10, 4, 103, 0, 2, 10, 10, 4, 0, 7, 2, 10, 10, 4, + 2, 7, 5, 10, 10, 4, 2, 5, 0, 9, 10, 4, 0, 5, 7, 9, 10, 4, 104, 7, 5, 9, 10, 4, 0, 7, 104, 9, 10, + 4, 105, 104, 5, 9, 10, 4, 0, 5, 2, 7, 10, 4, 104, 0, 100, 7, // 57 + 14, 10, 4, 103, 3, 2, 10, 10, 4, 3, 7, 2, 10, 10, 4, 2, 7, 5, 10, 10, 4, 0, 7, 3, 8, 10, 4, 5, 7, + 0, 8, 10, 4, 104, 7, 5, 8, 10, 4, 105, 104, 5, 8, 10, 4, 105, 5, 0, 8, 10, 4, 0, 5, 3, 7, 10, 4, + 3, 5, 2, 7, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, 0, 5, 10, 4, 105, 1, 0, 5, 10, 4, 101, 0, 105, + 1, // 58 + 10, 10, 4, 103, 100, 2, 10, 10, 4, 100, 7, 2, 10, 10, 4, 2, 7, 5, 10, 10, 4, 1, 104, 5, 7, 10, 4, + 1, 5, 2, 7, 10, 4, 104, 1, 100, 7, 10, 4, 1, 2, 100, 7, 10, 4, 105, 1, 104, 5, 10, 4, 101, 100, + 104, 1, 10, 4, 104, 105, 101, 1, // 59 + 12, 10, 4, 1, 10, 5, 11, 10, 4, 102, 10, 1, 11, 10, 4, 3, 7, 5, 10, 10, 4, 103, 3, 1, 10, 10, 4, + 3, 5, 1, 10, 10, 4, 102, 103, 1, 10, 10, 4, 5, 8, 1, 9, 10, 4, 105, 8, 5, 9, 10, 4, 5, 7, 3, 8, + 10, 4, 104, 7, 5, 8, 10, 4, 1, 5, 3, 8, 10, 4, 105, 104, 5, 8, // 60 + 15, 10, 4, 1, 10, 5, 11, 10, 4, 102, 10, 1, 11, 10, 4, 103, 100, 0, 10, 10, 4, 100, 7, 0, 10, 10, + 4, 0, 1, 103, 10, 10, 4, 0, 7, 1, 10, 10, 4, 1, 7, 5, 10, 10, 4, 102, 103, 1, 10, 10, 4, 104, 0, + 7, 9, 10, 4, 5, 7, 0, 9, 10, 4, 104, 7, 5, 9, 10, 4, 105, 104, 5, 9, 10, 4, 1, 5, 0, 9, 10, 4, 0, + 5, 1, 7, 10, 4, 104, 0, 100, 7, // 61 + 15, 10, 4, 3, 10, 5, 11, 10, 4, 102, 10, 3, 11, 10, 4, 102, 3, 0, 11, 10, 4, 3, 5, 0, 11, 10, 4, + 102, 0, 101, 11, 10, 4, 0, 5, 101, 11, 10, 4, 3, 7, 5, 10, 10, 4, 102, 103, 3, 10, 10, 4, 0, 7, 3, + 8, 10, 4, 0, 5, 7, 8, 10, 4, 104, 7, 5, 8, 10, 4, 105, 104, 5, 8, 10, 4, 105, 5, 0, 8, 10, 4, 0, + 5, 3, 7, 10, 4, 101, 0, 105, 5, // 62 + 9, 10, 4, 101, 102, 10, 11, 10, 4, 101, 10, 5, 11, 10, 4, 100, 7, 5, 10, 10, 4, 101, 102, 100, 10, + 10, 4, 101, 100, 5, 10, 10, 4, 102, 103, 100, 10, 10, 4, 104, 5, 100, 7, 10, 4, 104, 105, 101, 5, + 10, 4, 101, 100, 104, 5, // 63 + 1, 10, 4, 5, 6, 106, 11, // 64 + 6, 10, 4, 5, 6, 106, 11, 10, 4, 3, 6, 5, 11, 10, 4, 3, 5, 0, 11, 10, 4, 0, 3, 100, 8, 10, 4, 0, 5, + 3, 8, 10, 4, 5, 6, 3, 8, // 65 + 5, 10, 4, 5, 6, 106, 11, 10, 4, 1, 6, 5, 11, 10, 4, 101, 1, 0, 9, 10, 4, 1, 5, 0, 9, 10, 4, 0, 5, + 1, 6, // 66 + 10, 10, 4, 3, 6, 1, 11, 10, 4, 106, 5, 6, 11, 10, 4, 1, 6, 5, 11, 10, 4, 101, 1, 8, 9, 10, 4, 5, + 8, 1, 9, 10, 4, 100, 101, 1, 8, 10, 4, 100, 1, 3, 8, 10, 4, 1, 5, 3, 8, 10, 4, 5, 6, 3, 8, 10, 4, + 3, 5, 1, 6, // 67 + 3, 10, 4, 2, 5, 106, 6, 10, 4, 106, 2, 1, 5, 10, 4, 102, 1, 106, 2, // 68 + 9, 10, 4, 0, 3, 100, 8, 10, 4, 0, 5, 3, 8, 10, 4, 5, 6, 3, 8, 10, 4, 106, 2, 5, 6, 10, 4, 3, 5, 2, + 6, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, 0, 5, 10, 4, 106, 2, 1, 5, 10, 4, 106, 102, 1, 2, // 69 + 7, 10, 4, 102, 2, 0, 9, 10, 4, 2, 5, 0, 9, 10, 4, 102, 5, 2, 9, 10, 4, 101, 102, 0, 9, 10, 4, 0, + 5, 2, 6, 10, 4, 106, 2, 5, 6, 10, 4, 102, 106, 2, 5, // 70 + 11, 10, 4, 101, 102, 2, 9, 10, 4, 102, 5, 2, 9, 10, 4, 101, 2, 3, 9, 10, 4, 2, 5, 3, 9, 10, 4, + 101, 3, 8, 9, 10, 4, 5, 8, 3, 9, 10, 4, 101, 3, 100, 8, 10, 4, 5, 6, 3, 8, 10, 4, 106, 2, 5, 6, + 10, 4, 3, 5, 2, 6, 10, 4, 106, 2, 102, 5, // 71 + 5, 10, 4, 106, 5, 6, 11, 10, 4, 2, 6, 5, 11, 10, 4, 103, 3, 2, 10, 10, 4, 3, 6, 2, 10, 10, 4, 3, + 5, 2, 6, // 72 + 10, 10, 4, 2, 5, 0, 11, 10, 4, 106, 5, 6, 11, 10, 4, 2, 6, 5, 11, 10, 4, 2, 103, 8, 10, 10, 4, 2, + 8, 6, 10, 10, 4, 0, 2, 103, 8, 10, 4, 0, 6, 2, 8, 10, 4, 103, 100, 0, 8, 10, 4, 5, 6, 0, 8, 10, 4, + 0, 5, 2, 6, // 73 + 10, 10, 4, 2, 5, 1, 11, 10, 4, 106, 5, 6, 11, 10, 4, 2, 6, 5, 11, 10, 4, 103, 3, 2, 10, 10, 4, 3, + 6, 2, 10, 10, 4, 101, 1, 0, 9, 10, 4, 1, 5, 0, 9, 10, 4, 3, 5, 2, 6, 10, 4, 2, 3, 0, 5, 10, 4, 1, + 2, 0, 5, // 74 + 12, 10, 4, 2, 5, 1, 11, 10, 4, 5, 6, 106, 11, 10, 4, 2, 6, 5, 11, 10, 4, 2, 8, 6, 10, 10, 4, 103, + 8, 2, 10, 10, 4, 101, 1, 8, 9, 10, 4, 5, 8, 1, 9, 10, 4, 103, 100, 2, 8, 10, 4, 101, 1, 100, 8, + 10, 4, 1, 2, 100, 8, 10, 4, 1, 5, 2, 8, 10, 4, 5, 6, 2, 8, // 75 + 7, 10, 4, 103, 3, 1, 10, 10, 4, 3, 6, 1, 10, 10, 4, 102, 103, 1, 10, 10, 4, 102, 1, 6, 10, 10, 4, + 106, 1, 5, 6, 10, 4, 3, 5, 1, 6, 10, 4, 102, 1, 106, 6, // 76 + 11, 10, 4, 0, 8, 6, 10, 10, 4, 103, 8, 0, 10, 10, 4, 0, 1, 103, 10, 10, 4, 0, 6, 1, 10, 10, 4, + 102, 103, 1, 10, 10, 4, 102, 1, 6, 10, 10, 4, 103, 100, 0, 8, 10, 4, 5, 6, 0, 8, 10, 4, 102, 1, + 106, 6, 10, 4, 106, 1, 5, 6, 10, 4, 0, 5, 1, 6, // 77 + 7, 10, 4, 102, 103, 3, 10, 10, 4, 102, 3, 6, 10, 10, 4, 102, 0, 101, 9, 10, 4, 102, 5, 0, 9, 10, + 4, 102, 3, 5, 6, 10, 4, 102, 5, 106, 6, 10, 4, 102, 3, 0, 5, // 78 + 10, 10, 4, 102, 8, 9, 10, 10, 4, 6, 9, 8, 10, 10, 4, 102, 9, 6, 10, 10, 4, 102, 103, 8, 10, 10, 4, + 102, 5, 6, 9, 10, 4, 5, 8, 6, 9, 10, 4, 101, 102, 8, 9, 10, 4, 101, 102, 100, 8, 10, 4, 102, 103, + 100, 8, 10, 4, 102, 5, 106, 6, // 79 + 5, 10, 4, 106, 5, 6, 11, 10, 4, 5, 8, 6, 11, 10, 4, 4, 6, 5, 8, 10, 4, 4, 7, 6, 8, 10, 4, 104, 7, + 4, 8, // 80 + 9, 10, 4, 106, 5, 6, 11, 10, 4, 3, 6, 5, 11, 10, 4, 3, 5, 0, 11, 10, 4, 104, 4, 3, 7, 10, 4, 4, 6, + 3, 7, 10, 4, 4, 5, 3, 6, 10, 4, 3, 4, 0, 5, 10, 4, 0, 3, 104, 4, 10, 4, 100, 104, 0, 3, // 81 + 10, 10, 4, 106, 5, 6, 11, 10, 4, 1, 6, 5, 11, 10, 4, 1, 5, 4, 9, 10, 4, 101, 1, 0, 9, 10, 4, 1, 4, + 0, 9, 10, 4, 4, 7, 0, 8, 10, 4, 104, 7, 4, 8, 10, 4, 4, 6, 0, 7, 10, 4, 4, 5, 1, 6, 10, 4, 0, 4, + 1, 6, // 82 + 14, 10, 4, 3, 6, 1, 11, 10, 4, 106, 5, 6, 11, 10, 4, 1, 6, 5, 11, 10, 4, 1, 5, 4, 9, 10, 4, 100, + 1, 3, 9, 10, 4, 100, 3, 4, 9, 10, 4, 1, 4, 3, 9, 10, 4, 100, 101, 1, 9, 10, 4, 104, 4, 3, 7, 10, + 4, 4, 6, 3, 7, 10, 4, 3, 5, 1, 6, 10, 4, 4, 5, 3, 6, 10, 4, 3, 4, 1, 5, 10, 4, 100, 3, 104, + 4, // 83 + 9, 10, 4, 4, 7, 2, 8, 10, 4, 104, 7, 4, 8, 10, 4, 1, 4, 2, 8, 10, 4, 4, 6, 2, 7, 10, 4, 106, 2, 5, + 6, 10, 4, 4, 5, 2, 6, 10, 4, 106, 2, 1, 5, 10, 4, 2, 4, 1, 5, 10, 4, 102, 1, 106, 2, // 84 + 12, 10, 4, 104, 4, 3, 7, 10, 4, 4, 6, 3, 7, 10, 4, 106, 2, 5, 6, 10, 4, 4, 5, 2, 6, 10, 4, 3, 4, + 2, 6, 10, 4, 106, 2, 1, 5, 10, 4, 2, 4, 1, 5, 10, 4, 104, 0, 3, 4, 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, + 0, 4, 10, 4, 104, 0, 100, 3, 10, 4, 106, 102, 1, 2, // 85 + 14, 10, 4, 102, 2, 0, 9, 10, 4, 2, 5, 0, 9, 10, 4, 102, 5, 2, 9, 10, 4, 102, 0, 101, 9, 10, 4, 0, + 5, 4, 9, 10, 4, 0, 7, 2, 8, 10, 4, 0, 4, 7, 8, 10, 4, 104, 7, 4, 8, 10, 4, 4, 6, 2, 7, 10, 4, 0, + 4, 2, 7, 10, 4, 106, 2, 5, 6, 10, 4, 4, 5, 2, 6, 10, 4, 2, 4, 0, 5, 10, 4, 102, 106, 2, 5, // 86 + 14, 10, 4, 102, 2, 101, 9, 10, 4, 102, 5, 2, 9, 10, 4, 2, 5, 4, 9, 10, 4, 101, 2, 3, 9, 10, 4, 2, + 4, 3, 9, 10, 4, 101, 3, 100, 9, 10, 4, 3, 4, 100, 9, 10, 4, 104, 4, 3, 7, 10, 4, 4, 6, 3, 7, 10, + 4, 106, 2, 5, 6, 10, 4, 4, 5, 2, 6, 10, 4, 3, 4, 2, 6, 10, 4, 102, 106, 2, 5, 10, 4, 100, 3, 104, + 4, // 87 + 10, 10, 4, 106, 5, 6, 11, 10, 4, 2, 6, 5, 11, 10, 4, 3, 7, 6, 10, 10, 4, 103, 3, 2, 10, 10, 4, 3, + 6, 2, 10, 10, 4, 4, 7, 3, 8, 10, 4, 104, 7, 4, 8, 10, 4, 4, 6, 3, 7, 10, 4, 4, 5, 2, 6, 10, 4, 3, + 4, 2, 6, // 88 + 14, 10, 4, 2, 5, 0, 11, 10, 4, 106, 5, 6, 11, 10, 4, 2, 6, 5, 11, 10, 4, 103, 100, 0, 10, 10, 4, + 100, 7, 0, 10, 10, 4, 103, 0, 2, 10, 10, 4, 0, 7, 2, 10, 10, 4, 2, 7, 6, 10, 10, 4, 4, 6, 2, 7, + 10, 4, 0, 104, 4, 7, 10, 4, 0, 4, 2, 7, 10, 4, 104, 0, 100, 7, 10, 4, 4, 5, 2, 6, 10, 4, 2, 4, 0, + 5, // 89 + 18, 10, 4, 2, 5, 1, 11, 10, 4, 106, 5, 6, 11, 10, 4, 2, 6, 5, 11, 10, 4, 3, 7, 6, 10, 10, 4, 103, + 3, 2, 10, 10, 4, 3, 6, 2, 10, 10, 4, 1, 5, 4, 9, 10, 4, 101, 1, 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, 4, + 7, 3, 8, 10, 4, 104, 7, 4, 8, 10, 4, 0, 4, 3, 8, 10, 4, 4, 6, 3, 7, 10, 4, 4, 5, 2, 6, 10, 4, 3, + 4, 2, 6, 10, 4, 2, 4, 1, 5, 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, // 90 + 15, 10, 4, 2, 5, 1, 11, 10, 4, 106, 5, 6, 11, 10, 4, 2, 6, 5, 11, 10, 4, 103, 100, 2, 10, 10, 4, + 100, 7, 2, 10, 10, 4, 2, 7, 6, 10, 10, 4, 1, 5, 4, 9, 10, 4, 101, 1, 100, 9, 10, 4, 1, 4, 100, 9, + 10, 4, 4, 6, 2, 7, 10, 4, 100, 4, 2, 7, 10, 4, 104, 4, 100, 7, 10, 4, 4, 5, 2, 6, 10, 4, 2, 4, 1, + 5, 10, 4, 1, 2, 100, 4, // 91 + 14, 10, 4, 3, 7, 6, 10, 10, 4, 103, 3, 1, 10, 10, 4, 3, 6, 1, 10, 10, 4, 103, 1, 102, 10, 10, 4, + 1, 6, 102, 10, 10, 4, 1, 4, 3, 8, 10, 4, 4, 7, 3, 8, 10, 4, 104, 7, 4, 8, 10, 4, 4, 6, 3, 7, 10, + 4, 106, 1, 5, 6, 10, 4, 3, 5, 1, 6, 10, 4, 4, 5, 3, 6, 10, 4, 102, 1, 106, 6, 10, 4, 3, 4, 1, + 5, // 92 + 14, 10, 4, 103, 100, 0, 10, 10, 4, 100, 7, 0, 10, 10, 4, 0, 7, 6, 10, 10, 4, 103, 0, 1, 10, 10, 4, + 0, 6, 1, 10, 10, 4, 103, 1, 102, 10, 10, 4, 1, 6, 102, 10, 10, 4, 4, 6, 0, 7, 10, 4, 104, 4, 0, 7, + 10, 4, 104, 0, 100, 7, 10, 4, 0, 4, 1, 6, 10, 4, 4, 5, 1, 6, 10, 4, 1, 5, 106, 6, 10, 4, 102, 1, + 106, 6, // 93 + 15, 10, 4, 3, 7, 6, 10, 10, 4, 103, 3, 102, 10, 10, 4, 3, 6, 102, 10, 10, 4, 102, 0, 101, 9, 10, + 4, 102, 5, 0, 9, 10, 4, 0, 5, 4, 9, 10, 4, 4, 7, 3, 8, 10, 4, 104, 7, 4, 8, 10, 4, 0, 4, 3, 8, 10, + 4, 4, 6, 3, 7, 10, 4, 102, 3, 5, 6, 10, 4, 102, 5, 106, 6, 10, 4, 4, 5, 3, 6, 10, 4, 3, 4, 0, 5, + 10, 4, 102, 3, 0, 5, // 94 + 13, 10, 4, 103, 100, 9, 10, 10, 4, 7, 9, 100, 10, 10, 4, 6, 9, 7, 10, 10, 4, 102, 9, 6, 10, 10, 4, + 103, 9, 102, 10, 10, 4, 5, 6, 102, 9, 10, 4, 4, 6, 5, 9, 10, 4, 4, 7, 6, 9, 10, 4, 100, 7, 4, 9, + 10, 4, 102, 103, 100, 9, 10, 4, 101, 102, 100, 9, 10, 4, 104, 4, 100, 7, 10, 4, 102, 5, 106, + 6, // 95 + 3, 10, 4, 106, 9, 6, 11, 10, 4, 4, 6, 106, 9, 10, 4, 105, 4, 106, 9, // 96 + 10, 10, 4, 6, 9, 0, 11, 10, 4, 106, 9, 6, 11, 10, 4, 3, 6, 0, 11, 10, 4, 106, 4, 6, 9, 10, 4, 0, + 6, 4, 9, 10, 4, 106, 105, 4, 9, 10, 4, 100, 0, 3, 8, 10, 4, 0, 4, 3, 8, 10, 4, 4, 6, 3, 8, 10, 4, + 3, 4, 0, 6, // 97 + 7, 10, 4, 105, 1, 4, 11, 10, 4, 105, 4, 106, 11, 10, 4, 4, 6, 106, 11, 10, 4, 1, 6, 4, 11, 10, 4, + 0, 4, 1, 6, 10, 4, 105, 1, 0, 4, 10, 4, 105, 101, 0, 1, // 98 + 12, 10, 4, 3, 6, 1, 11, 10, 4, 106, 105, 4, 11, 10, 4, 1, 4, 105, 11, 10, 4, 106, 4, 6, 11, 10, 4, + 1, 6, 4, 11, 10, 4, 100, 101, 1, 8, 10, 4, 101, 4, 1, 8, 10, 4, 100, 1, 3, 8, 10, 4, 1, 4, 3, 8, + 10, 4, 4, 6, 3, 8, 10, 4, 3, 4, 1, 6, 10, 4, 105, 1, 101, 4, // 99 + 7, 10, 4, 106, 4, 6, 9, 10, 4, 1, 6, 4, 9, 10, 4, 106, 6, 1, 9, 10, 4, 106, 105, 4, 9, 10, 4, 106, + 2, 1, 6, 10, 4, 2, 4, 1, 6, 10, 4, 102, 1, 106, 2, // 100 + 14, 10, 4, 1, 4, 0, 9, 10, 4, 106, 4, 6, 9, 10, 4, 1, 6, 4, 9, 10, 4, 106, 6, 1, 9, 10, 4, 105, 4, + 106, 9, 10, 4, 100, 0, 3, 8, 10, 4, 0, 4, 3, 8, 10, 4, 4, 6, 3, 8, 10, 4, 106, 2, 1, 6, 10, 4, 2, + 4, 1, 6, 10, 4, 3, 4, 2, 6, 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, 10, 4, 106, 102, 1, 2, // 101 + 6, 10, 4, 2, 4, 106, 6, 10, 4, 106, 2, 0, 4, 10, 4, 106, 0, 105, 4, 10, 4, 102, 0, 106, 2, 10, 4, + 105, 106, 102, 0, 10, 4, 101, 105, 102, 0, // 102 + 10, 10, 4, 101, 3, 100, 8, 10, 4, 101, 4, 3, 8, 10, 4, 4, 6, 3, 8, 10, 4, 106, 2, 4, 6, 10, 4, 3, + 4, 2, 6, 10, 4, 101, 105, 2, 4, 10, 4, 101, 2, 3, 4, 10, 4, 106, 2, 105, 4, 10, 4, 105, 106, 102, + 2, 10, 4, 101, 105, 102, 2, // 103 + 10, 10, 4, 6, 9, 2, 11, 10, 4, 106, 9, 6, 11, 10, 4, 4, 6, 3, 10, 10, 4, 103, 3, 2, 10, 10, 4, 3, + 6, 2, 10, 10, 4, 106, 4, 6, 9, 10, 4, 2, 6, 4, 9, 10, 4, 106, 105, 4, 9, 10, 4, 2, 4, 3, 9, 10, 4, + 3, 4, 2, 6, // 104 + 12, 10, 4, 6, 9, 2, 11, 10, 4, 106, 9, 6, 11, 10, 4, 2, 8, 6, 10, 10, 4, 103, 8, 2, 10, 10, 4, + 106, 105, 4, 9, 10, 4, 106, 4, 6, 9, 10, 4, 2, 6, 4, 9, 10, 4, 2, 4, 0, 9, 10, 4, 103, 100, 0, 8, + 10, 4, 0, 2, 103, 8, 10, 4, 0, 4, 2, 8, 10, 4, 4, 6, 2, 8, // 105 + 14, 10, 4, 105, 1, 4, 11, 10, 4, 105, 4, 106, 11, 10, 4, 106, 4, 6, 11, 10, 4, 1, 6, 4, 11, 10, 4, + 2, 6, 1, 11, 10, 4, 4, 6, 3, 10, 10, 4, 103, 3, 2, 10, 10, 4, 3, 6, 2, 10, 10, 4, 2, 4, 1, 6, 10, + 4, 3, 4, 2, 6, 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, 10, 4, 105, 1, 0, 4, 10, 4, 105, 101, 0, + 1, // 106 + 15, 10, 4, 106, 105, 4, 11, 10, 4, 1, 4, 105, 11, 10, 4, 106, 4, 6, 11, 10, 4, 1, 6, 4, 11, 10, 4, + 2, 6, 1, 11, 10, 4, 2, 8, 6, 10, 10, 4, 103, 8, 2, 10, 10, 4, 101, 1, 100, 8, 10, 4, 101, 4, 1, 8, + 10, 4, 1, 2, 100, 8, 10, 4, 1, 4, 2, 8, 10, 4, 103, 100, 2, 8, 10, 4, 4, 6, 2, 8, 10, 4, 2, 4, 1, + 6, 10, 4, 101, 105, 1, 4, // 107 + 12, 10, 4, 4, 6, 3, 10, 10, 4, 103, 3, 1, 10, 10, 4, 3, 6, 1, 10, 10, 4, 103, 1, 102, 10, 10, 4, + 1, 6, 102, 10, 10, 4, 1, 4, 3, 9, 10, 4, 106, 4, 6, 9, 10, 4, 1, 6, 4, 9, 10, 4, 106, 6, 1, 9, 10, + 4, 106, 105, 4, 9, 10, 4, 3, 4, 1, 6, 10, 4, 102, 1, 106, 6, // 108 + 15, 10, 4, 0, 8, 6, 10, 10, 4, 103, 8, 0, 10, 10, 4, 103, 0, 1, 10, 10, 4, 0, 6, 1, 10, 10, 4, + 103, 1, 102, 10, 10, 4, 1, 6, 102, 10, 10, 4, 1, 4, 0, 9, 10, 4, 1, 106, 6, 9, 10, 4, 4, 6, 106, + 9, 10, 4, 1, 6, 4, 9, 10, 4, 105, 4, 106, 9, 10, 4, 103, 100, 0, 8, 10, 4, 4, 6, 0, 8, 10, 4, 0, + 4, 1, 6, 10, 4, 102, 1, 106, 6, // 109 + 10, 10, 4, 4, 6, 3, 10, 10, 4, 103, 3, 102, 10, 10, 4, 3, 6, 102, 10, 10, 4, 106, 0, 4, 6, 10, 4, + 3, 4, 0, 6, 10, 4, 102, 0, 106, 6, 10, 4, 102, 3, 0, 6, 10, 4, 106, 0, 105, 4, 10, 4, 105, 106, + 102, 0, 10, 4, 102, 101, 105, 0, // 110 + 9, 10, 4, 102, 8, 6, 10, 10, 4, 103, 8, 102, 10, 10, 4, 101, 102, 100, 8, 10, 4, 101, 4, 102, 8, + 10, 4, 102, 103, 100, 8, 10, 4, 4, 6, 102, 8, 10, 4, 102, 4, 106, 6, 10, 4, 101, 105, 102, 4, 10, + 4, 105, 106, 102, 4, // 111 + 7, 10, 4, 6, 9, 8, 11, 10, 4, 106, 9, 6, 11, 10, 4, 105, 7, 6, 9, 10, 4, 7, 8, 6, 9, 10, 4, 105, + 8, 7, 9, 10, 4, 105, 6, 106, 9, 10, 4, 104, 7, 105, 8, // 112 + 11, 10, 4, 6, 9, 0, 11, 10, 4, 106, 9, 6, 11, 10, 4, 3, 6, 0, 11, 10, 4, 104, 0, 7, 9, 10, 4, 104, + 7, 105, 9, 10, 4, 6, 7, 0, 9, 10, 4, 105, 7, 6, 9, 10, 4, 106, 105, 6, 9, 10, 4, 104, 0, 3, 7, 10, + 4, 0, 6, 3, 7, 10, 4, 104, 0, 100, 3, // 113 + 7, 10, 4, 105, 1, 6, 11, 10, 4, 105, 6, 106, 11, 10, 4, 105, 7, 0, 8, 10, 4, 104, 7, 105, 8, 10, + 4, 105, 6, 0, 7, 10, 4, 105, 1, 0, 6, 10, 4, 105, 101, 0, 1, // 114 + 10, 10, 4, 3, 6, 1, 11, 10, 4, 106, 105, 6, 11, 10, 4, 1, 6, 105, 11, 10, 4, 104, 105, 1, 7, 10, + 4, 105, 6, 1, 7, 10, 4, 1, 3, 104, 7, 10, 4, 1, 6, 3, 7, 10, 4, 100, 104, 1, 3, 10, 4, 104, 105, + 101, 1, 10, 4, 100, 104, 101, 1, // 115 + 11, 10, 4, 7, 8, 1, 9, 10, 4, 105, 8, 7, 9, 10, 4, 6, 7, 1, 9, 10, 4, 105, 7, 6, 9, 10, 4, 106, + 105, 6, 9, 10, 4, 106, 6, 1, 9, 10, 4, 104, 7, 105, 8, 10, 4, 1, 7, 2, 8, 10, 4, 1, 6, 2, 7, 10, + 4, 106, 2, 1, 6, 10, 4, 102, 1, 106, 2, // 116 + 14, 10, 4, 104, 0, 7, 9, 10, 4, 104, 7, 105, 9, 10, 4, 6, 7, 0, 9, 10, 4, 105, 7, 6, 9, 10, 4, 1, + 6, 0, 9, 10, 4, 106, 6, 1, 9, 10, 4, 105, 6, 106, 9, 10, 4, 104, 0, 3, 7, 10, 4, 0, 6, 3, 7, 10, + 4, 1, 2, 0, 6, 10, 4, 106, 2, 1, 6, 10, 4, 2, 3, 0, 6, 10, 4, 104, 0, 100, 3, 10, 4, 106, 102, 1, + 2, // 117 + 10, 10, 4, 0, 7, 2, 8, 10, 4, 105, 7, 0, 8, 10, 4, 104, 7, 105, 8, 10, 4, 105, 6, 0, 7, 10, 4, 0, + 6, 2, 7, 10, 4, 106, 0, 105, 6, 10, 4, 106, 2, 0, 6, 10, 4, 102, 0, 106, 2, 10, 4, 105, 106, 102, + 0, 10, 4, 102, 101, 105, 0, // 118 + 9, 10, 4, 104, 105, 3, 7, 10, 4, 105, 6, 3, 7, 10, 4, 106, 2, 105, 6, 10, 4, 2, 3, 105, 6, 10, 4, + 104, 105, 101, 3, 10, 4, 105, 2, 101, 3, 10, 4, 101, 100, 104, 3, 10, 4, 105, 106, 102, 2, 10, 4, + 102, 101, 105, 2, // 119 + 14, 10, 4, 6, 9, 2, 11, 10, 4, 106, 9, 6, 11, 10, 4, 3, 7, 6, 10, 10, 4, 103, 3, 2, 10, 10, 4, 3, + 6, 2, 10, 10, 4, 105, 7, 6, 9, 10, 4, 7, 8, 6, 9, 10, 4, 105, 8, 7, 9, 10, 4, 106, 105, 6, 9, 10, + 4, 2, 6, 8, 9, 10, 4, 2, 8, 3, 9, 10, 4, 2, 6, 3, 8, 10, 4, 6, 7, 3, 8, 10, 4, 104, 7, 105, + 8, // 120 + 15, 10, 4, 6, 9, 2, 11, 10, 4, 106, 9, 6, 11, 10, 4, 103, 100, 0, 10, 10, 4, 100, 7, 0, 10, 10, 4, + 0, 2, 103, 10, 10, 4, 0, 7, 2, 10, 10, 4, 2, 7, 6, 10, 10, 4, 104, 0, 7, 9, 10, 4, 104, 7, 105, 9, + 10, 4, 6, 7, 0, 9, 10, 4, 105, 7, 6, 9, 10, 4, 106, 105, 6, 9, 10, 4, 2, 6, 0, 9, 10, 4, 0, 6, 2, + 7, 10, 4, 104, 0, 100, 7, // 121 + 15, 10, 4, 105, 1, 6, 11, 10, 4, 105, 6, 106, 11, 10, 4, 2, 6, 1, 11, 10, 4, 3, 7, 6, 10, 10, 4, + 103, 3, 2, 10, 10, 4, 3, 6, 2, 10, 10, 4, 0, 7, 3, 8, 10, 4, 105, 7, 0, 8, 10, 4, 104, 7, 105, 8, + 10, 4, 105, 6, 0, 7, 10, 4, 0, 6, 3, 7, 10, 4, 1, 2, 0, 6, 10, 4, 2, 3, 0, 6, 10, 4, 105, 1, 0, 6, + 10, 4, 105, 101, 0, 1, // 122 + 13, 10, 4, 106, 105, 6, 11, 10, 4, 1, 6, 105, 11, 10, 4, 2, 6, 1, 11, 10, 4, 103, 100, 2, 10, 10, + 4, 100, 7, 2, 10, 10, 4, 2, 7, 6, 10, 10, 4, 104, 105, 1, 7, 10, 4, 105, 6, 1, 7, 10, 4, 1, 6, 2, + 7, 10, 4, 104, 1, 100, 7, 10, 4, 1, 2, 100, 7, 10, 4, 101, 100, 104, 1, 10, 4, 104, 105, 101, + 1, // 123 + 15, 10, 4, 3, 7, 6, 10, 10, 4, 103, 3, 1, 10, 10, 4, 3, 6, 1, 10, 10, 4, 103, 1, 102, 10, 10, 4, + 1, 6, 102, 10, 10, 4, 7, 8, 1, 9, 10, 4, 105, 8, 7, 9, 10, 4, 6, 7, 1, 9, 10, 4, 105, 7, 6, 9, 10, + 4, 106, 105, 6, 9, 10, 4, 106, 6, 1, 9, 10, 4, 1, 7, 3, 8, 10, 4, 104, 7, 105, 8, 10, 4, 1, 6, 3, + 7, 10, 4, 102, 1, 106, 6, // 124 + 16, 10, 4, 103, 100, 0, 10, 10, 4, 100, 7, 0, 10, 10, 4, 0, 7, 6, 10, 10, 4, 103, 0, 1, 10, 10, 4, + 0, 6, 1, 10, 10, 4, 103, 1, 102, 10, 10, 4, 1, 6, 102, 10, 10, 4, 104, 0, 7, 9, 10, 4, 104, 7, + 105, 9, 10, 4, 6, 7, 0, 9, 10, 4, 105, 7, 6, 9, 10, 4, 1, 6, 0, 9, 10, 4, 106, 6, 1, 9, 10, 4, + 105, 6, 106, 9, 10, 4, 104, 0, 100, 7, 10, 4, 102, 1, 106, 6, // 125 + 13, 10, 4, 3, 7, 6, 10, 10, 4, 103, 3, 102, 10, 10, 4, 3, 6, 102, 10, 10, 4, 0, 7, 3, 8, 10, 4, + 105, 7, 0, 8, 10, 4, 104, 7, 105, 8, 10, 4, 105, 6, 0, 7, 10, 4, 0, 6, 3, 7, 10, 4, 102, 0, 106, + 6, 10, 4, 102, 3, 0, 6, 10, 4, 106, 0, 105, 6, 10, 4, 105, 106, 102, 0, 10, 4, 102, 101, 105, + 0, // 126 + 10, 10, 4, 101, 100, 7, 10, 10, 4, 101, 7, 6, 10, 10, 4, 101, 102, 100, 10, 10, 4, 101, 6, 102, + 10, 10, 4, 102, 103, 100, 10, 10, 4, 104, 105, 101, 7, 10, 4, 105, 6, 101, 7, 10, 4, 101, 100, + 104, 7, 10, 4, 105, 106, 102, 6, 10, 4, 102, 101, 105, 6, // 127 + 1, 10, 4, 6, 7, 107, 10, // 128 + 5, 10, 4, 6, 7, 107, 10, 10, 4, 3, 7, 6, 10, 10, 4, 0, 3, 100, 8, 10, 4, 0, 7, 3, 8, 10, 4, 0, 6, + 3, 7, // 129 + 6, 10, 4, 6, 7, 107, 10, 10, 4, 0, 7, 6, 10, 10, 4, 0, 6, 1, 10, 10, 4, 101, 1, 0, 9, 10, 4, 1, 6, + 0, 9, 10, 4, 6, 7, 0, 9, // 130 + 10, 10, 4, 3, 6, 1, 10, 10, 4, 6, 7, 107, 10, 10, 4, 3, 7, 6, 10, 10, 4, 101, 1, 8, 9, 10, 4, 7, + 8, 1, 9, 10, 4, 6, 7, 1, 9, 10, 4, 100, 101, 1, 8, 10, 4, 100, 1, 3, 8, 10, 4, 1, 7, 3, 8, 10, 4, + 1, 6, 3, 7, // 131 + 5, 10, 4, 102, 2, 1, 11, 10, 4, 2, 6, 1, 11, 10, 4, 6, 7, 107, 10, 10, 4, 2, 7, 6, 10, 10, 4, 1, + 6, 2, 7, // 132 + 10, 10, 4, 102, 2, 1, 11, 10, 4, 2, 6, 1, 11, 10, 4, 3, 6, 2, 10, 10, 4, 107, 6, 7, 10, 10, 4, 3, + 7, 6, 10, 10, 4, 0, 3, 100, 8, 10, 4, 0, 7, 3, 8, 10, 4, 0, 6, 3, 7, 10, 4, 2, 3, 0, 6, 10, 4, 1, + 2, 0, 6, // 133 + 10, 10, 4, 102, 2, 9, 11, 10, 4, 6, 9, 2, 11, 10, 4, 0, 7, 2, 10, 10, 4, 6, 7, 107, 10, 10, 4, 2, + 7, 6, 10, 10, 4, 102, 2, 0, 9, 10, 4, 2, 6, 0, 9, 10, 4, 101, 102, 0, 9, 10, 4, 6, 7, 0, 9, 10, 4, + 0, 6, 2, 7, // 134 + 14, 10, 4, 102, 2, 9, 11, 10, 4, 6, 9, 2, 11, 10, 4, 3, 6, 2, 10, 10, 4, 6, 7, 107, 10, 10, 4, 3, + 7, 6, 10, 10, 4, 101, 2, 3, 9, 10, 4, 101, 3, 8, 9, 10, 4, 2, 8, 3, 9, 10, 4, 101, 102, 2, 9, 10, + 4, 6, 8, 2, 9, 10, 4, 7, 8, 6, 9, 10, 4, 2, 6, 3, 8, 10, 4, 6, 7, 3, 8, 10, 4, 101, 3, 100, + 8, // 135 + 3, 10, 4, 3, 6, 107, 7, 10, 4, 107, 3, 2, 6, 10, 4, 103, 2, 107, 3, // 136 + 7, 10, 4, 0, 2, 103, 8, 10, 4, 2, 7, 103, 8, 10, 4, 0, 7, 2, 8, 10, 4, 103, 100, 0, 8, 10, 4, 2, + 6, 107, 7, 10, 4, 0, 6, 2, 7, 10, 4, 107, 103, 2, 7, // 137 + 9, 10, 4, 101, 1, 0, 9, 10, 4, 1, 6, 0, 9, 10, 4, 6, 7, 0, 9, 10, 4, 107, 3, 6, 7, 10, 4, 0, 6, 3, + 7, 10, 4, 2, 3, 0, 6, 10, 4, 107, 3, 2, 6, 10, 4, 1, 2, 0, 6, 10, 4, 107, 103, 2, 3, // 138 + 11, 10, 4, 101, 1, 8, 9, 10, 4, 7, 8, 1, 9, 10, 4, 6, 7, 1, 9, 10, 4, 101, 1, 100, 8, 10, 4, 1, 2, + 100, 8, 10, 4, 1, 7, 2, 8, 10, 4, 103, 100, 2, 8, 10, 4, 103, 2, 7, 8, 10, 4, 103, 2, 107, 7, 10, + 4, 107, 2, 6, 7, 10, 4, 1, 6, 2, 7, // 139 + 7, 10, 4, 103, 3, 1, 11, 10, 4, 3, 6, 1, 11, 10, 4, 103, 6, 3, 11, 10, 4, 102, 103, 1, 11, 10, 4, + 1, 6, 3, 7, 10, 4, 107, 3, 6, 7, 10, 4, 103, 107, 3, 6, // 140 + 7, 10, 4, 102, 103, 1, 11, 10, 4, 103, 6, 1, 11, 10, 4, 103, 100, 0, 8, 10, 4, 103, 0, 7, 8, 10, + 4, 107, 103, 6, 7, 10, 4, 0, 6, 103, 7, 10, 4, 0, 1, 103, 6, // 141 + 11, 10, 4, 102, 103, 3, 11, 10, 4, 103, 6, 3, 11, 10, 4, 102, 3, 0, 11, 10, 4, 3, 6, 0, 11, 10, 4, + 102, 0, 9, 11, 10, 4, 6, 9, 0, 11, 10, 4, 102, 0, 101, 9, 10, 4, 6, 7, 0, 9, 10, 4, 3, 6, 107, 7, + 10, 4, 0, 6, 3, 7, 10, 4, 107, 3, 103, 6, // 142 + 10, 10, 4, 102, 103, 8, 11, 10, 4, 6, 8, 103, 11, 10, 4, 8, 9, 102, 11, 10, 4, 6, 9, 8, 11, 10, 4, + 101, 102, 8, 9, 10, 4, 7, 8, 6, 9, 10, 4, 101, 102, 100, 8, 10, 4, 102, 103, 100, 8, 10, 4, 103, + 6, 7, 8, 10, 4, 103, 6, 107, 7, // 143 + 3, 10, 4, 107, 6, 8, 10, 10, 4, 107, 6, 4, 8, 10, 4, 107, 4, 104, 8, // 144 + 7, 10, 4, 4, 6, 3, 10, 10, 4, 107, 6, 4, 10, 10, 4, 104, 4, 3, 10, 10, 4, 107, 4, 104, 10, 10, 4, + 3, 4, 0, 6, 10, 4, 0, 3, 104, 4, 10, 4, 100, 104, 0, 3, // 145 + 10, 10, 4, 6, 8, 107, 10, 10, 4, 0, 8, 6, 10, 10, 4, 0, 6, 1, 10, 10, 4, 1, 6, 4, 9, 10, 4, 101, + 1, 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, 0, 4, 6, 8, 10, 4, 107, 6, 4, 8, 10, 4, 104, 107, 4, 8, 10, 4, + 0, 4, 1, 6, // 146 + 12, 10, 4, 3, 6, 1, 10, 10, 4, 4, 6, 3, 10, 10, 4, 107, 6, 4, 10, 10, 4, 104, 4, 3, 10, 10, 4, + 107, 4, 104, 10, 10, 4, 1, 6, 4, 9, 10, 4, 100, 1, 3, 9, 10, 4, 100, 3, 4, 9, 10, 4, 1, 4, 3, 9, + 10, 4, 100, 101, 1, 9, 10, 4, 3, 4, 1, 6, 10, 4, 100, 3, 104, 4, // 147 + 10, 10, 4, 102, 2, 1, 11, 10, 4, 2, 6, 1, 11, 10, 4, 1, 6, 4, 11, 10, 4, 107, 6, 8, 10, 10, 4, 2, + 8, 6, 10, 10, 4, 4, 6, 2, 8, 10, 4, 107, 6, 4, 8, 10, 4, 107, 4, 104, 8, 10, 4, 1, 4, 2, 8, 10, 4, + 2, 4, 1, 6, // 148 + 14, 10, 4, 102, 2, 1, 11, 10, 4, 2, 6, 1, 11, 10, 4, 1, 6, 4, 11, 10, 4, 3, 6, 2, 10, 10, 4, 4, 6, + 3, 10, 10, 4, 107, 6, 4, 10, 10, 4, 104, 4, 3, 10, 10, 4, 107, 4, 104, 10, 10, 4, 3, 4, 2, 6, 10, + 4, 2, 4, 1, 6, 10, 4, 1, 2, 0, 4, 10, 4, 2, 3, 0, 4, 10, 4, 0, 3, 104, 4, 10, 4, 100, 104, 0, + 3, // 149 + 12, 10, 4, 102, 2, 9, 11, 10, 4, 6, 9, 2, 11, 10, 4, 107, 6, 8, 10, 10, 4, 2, 8, 6, 10, 10, 4, 2, + 6, 4, 9, 10, 4, 102, 2, 0, 9, 10, 4, 2, 4, 0, 9, 10, 4, 101, 102, 0, 9, 10, 4, 4, 6, 2, 8, 10, 4, + 107, 6, 4, 8, 10, 4, 0, 4, 2, 8, 10, 4, 104, 107, 4, 8, // 150 + 15, 10, 4, 2, 6, 9, 11, 10, 4, 2, 9, 102, 11, 10, 4, 3, 6, 2, 10, 10, 4, 4, 6, 3, 10, 10, 4, 107, + 6, 4, 10, 10, 4, 104, 4, 3, 10, 10, 4, 107, 4, 104, 10, 10, 4, 2, 6, 4, 9, 10, 4, 101, 102, 2, 9, + 10, 4, 101, 2, 3, 9, 10, 4, 2, 4, 3, 9, 10, 4, 101, 3, 100, 9, 10, 4, 3, 4, 100, 9, 10, 4, 3, 4, + 2, 6, 10, 4, 100, 3, 104, 4, // 151 + 7, 10, 4, 107, 3, 6, 8, 10, 4, 4, 6, 3, 8, 10, 4, 107, 6, 4, 8, 10, 4, 107, 4, 104, 8, 10, 4, 107, + 3, 2, 6, 10, 4, 3, 4, 2, 6, 10, 4, 103, 2, 107, 3, // 152 + 6, 10, 4, 107, 4, 2, 6, 10, 4, 0, 2, 107, 4, 10, 4, 104, 0, 107, 4, 10, 4, 107, 0, 103, 2, 10, 4, + 103, 107, 104, 0, 10, 4, 103, 104, 100, 0, // 153 + 14, 10, 4, 1, 6, 4, 9, 10, 4, 101, 1, 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, 107, 3, 6, 8, 10, 4, 4, 6, + 3, 8, 10, 4, 107, 6, 4, 8, 10, 4, 107, 4, 104, 8, 10, 4, 0, 4, 3, 8, 10, 4, 107, 3, 2, 6, 10, 4, + 3, 4, 2, 6, 10, 4, 2, 4, 1, 6, 10, 4, 1, 2, 0, 4, 10, 4, 2, 3, 0, 4, 10, 4, 103, 2, 107, 3, // 154 + 10, 10, 4, 1, 6, 4, 9, 10, 4, 101, 1, 100, 9, 10, 4, 1, 4, 100, 9, 10, 4, 2, 4, 1, 6, 10, 4, 107, + 4, 2, 6, 10, 4, 104, 100, 2, 4, 10, 4, 1, 2, 100, 4, 10, 4, 107, 104, 2, 4, 10, 4, 103, 107, 104, + 2, 10, 4, 103, 104, 100, 2, // 155 + 12, 10, 4, 103, 3, 1, 11, 10, 4, 3, 6, 1, 11, 10, 4, 103, 6, 3, 11, 10, 4, 103, 1, 102, 11, 10, 4, + 1, 6, 4, 11, 10, 4, 1, 4, 3, 8, 10, 4, 107, 3, 6, 8, 10, 4, 4, 6, 3, 8, 10, 4, 107, 6, 4, 8, 10, + 4, 107, 4, 104, 8, 10, 4, 3, 4, 1, 6, 10, 4, 103, 107, 3, 6, // 156 + 10, 10, 4, 103, 1, 102, 11, 10, 4, 103, 6, 1, 11, 10, 4, 1, 6, 4, 11, 10, 4, 0, 107, 4, 6, 10, 4, + 0, 4, 1, 6, 10, 4, 103, 107, 0, 6, 10, 4, 103, 0, 1, 6, 10, 4, 104, 0, 107, 4, 10, 4, 103, 107, + 104, 0, 10, 4, 103, 104, 100, 0, // 157 + 15, 10, 4, 103, 3, 102, 11, 10, 4, 103, 6, 3, 11, 10, 4, 102, 3, 0, 11, 10, 4, 3, 6, 0, 11, 10, 4, + 102, 0, 9, 11, 10, 4, 6, 9, 0, 11, 10, 4, 0, 6, 4, 9, 10, 4, 102, 0, 101, 9, 10, 4, 107, 3, 6, 8, + 10, 4, 4, 6, 3, 8, 10, 4, 107, 6, 4, 8, 10, 4, 107, 4, 104, 8, 10, 4, 0, 4, 3, 8, 10, 4, 3, 4, 0, + 6, 10, 4, 103, 107, 3, 6, // 158 + 9, 10, 4, 103, 6, 9, 11, 10, 4, 103, 9, 102, 11, 10, 4, 103, 6, 4, 9, 10, 4, 102, 103, 100, 9, 10, + 4, 103, 4, 100, 9, 10, 4, 101, 102, 100, 9, 10, 4, 103, 107, 4, 6, 10, 4, 103, 107, 104, 4, 10, 4, + 103, 104, 100, 4, // 159 + 5, 10, 4, 107, 6, 7, 10, 10, 4, 6, 9, 7, 10, 10, 4, 4, 7, 6, 9, 10, 4, 4, 6, 5, 9, 10, 4, 105, 4, + 5, 9, // 160 + 10, 10, 4, 107, 6, 7, 10, 10, 4, 3, 7, 6, 10, 10, 4, 4, 5, 105, 9, 10, 4, 0, 5, 4, 9, 10, 4, 100, + 0, 3, 8, 10, 4, 0, 4, 3, 8, 10, 4, 4, 7, 3, 8, 10, 4, 4, 6, 3, 7, 10, 4, 4, 5, 3, 6, 10, 4, 3, 4, + 0, 5, // 161 + 9, 10, 4, 6, 7, 107, 10, 10, 4, 0, 7, 6, 10, 10, 4, 0, 6, 1, 10, 10, 4, 0, 4, 6, 7, 10, 4, 0, 4, + 1, 6, 10, 4, 4, 5, 1, 6, 10, 4, 105, 1, 4, 5, 10, 4, 105, 1, 0, 4, 10, 4, 105, 101, 0, 1, // 162 + 14, 10, 4, 3, 6, 1, 10, 10, 4, 107, 6, 7, 10, 10, 4, 3, 7, 6, 10, 10, 4, 100, 101, 1, 8, 10, 4, + 101, 4, 1, 8, 10, 4, 100, 1, 3, 8, 10, 4, 1, 4, 3, 8, 10, 4, 4, 7, 3, 8, 10, 4, 4, 6, 3, 7, 10, 4, + 4, 5, 3, 6, 10, 4, 3, 5, 1, 6, 10, 4, 3, 4, 1, 5, 10, 4, 1, 4, 105, 5, 10, 4, 105, 1, 101, + 4, // 163 + 10, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 1, 11, 10, 4, 2, 5, 1, 11, 10, 4, 107, 6, 7, 10, 10, 4, 2, + 7, 6, 10, 10, 4, 4, 5, 105, 9, 10, 4, 1, 5, 4, 9, 10, 4, 4, 6, 2, 7, 10, 4, 4, 5, 2, 6, 10, 4, 2, + 4, 1, 5, // 164 + 18, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 1, 11, 10, 4, 2, 5, 1, 11, 10, 4, 3, 6, 2, 10, 10, 4, 107, + 6, 7, 10, 10, 4, 3, 7, 6, 10, 10, 4, 1, 4, 0, 9, 10, 4, 105, 4, 5, 9, 10, 4, 1, 5, 4, 9, 10, 4, + 100, 0, 3, 8, 10, 4, 0, 4, 3, 8, 10, 4, 4, 7, 3, 8, 10, 4, 4, 6, 3, 7, 10, 4, 3, 4, 2, 6, 10, 4, + 4, 5, 2, 6, 10, 4, 2, 4, 1, 5, 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, // 165 + 14, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 0, 11, 10, 4, 2, 5, 0, 11, 10, 4, 101, 102, 0, 11, 10, 4, + 101, 0, 5, 11, 10, 4, 0, 7, 2, 10, 10, 4, 107, 6, 7, 10, 10, 4, 2, 7, 6, 10, 10, 4, 0, 4, 2, 7, + 10, 4, 4, 6, 2, 7, 10, 4, 4, 5, 2, 6, 10, 4, 105, 0, 4, 5, 10, 4, 2, 4, 0, 5, 10, 4, 101, 0, 105, + 5, // 166 + 15, 10, 4, 2, 6, 5, 11, 10, 4, 101, 102, 2, 11, 10, 4, 101, 2, 5, 11, 10, 4, 3, 6, 2, 10, 10, 4, + 107, 6, 7, 10, 10, 4, 3, 7, 6, 10, 10, 4, 101, 3, 100, 8, 10, 4, 101, 4, 3, 8, 10, 4, 4, 7, 3, 8, + 10, 4, 4, 6, 3, 7, 10, 4, 3, 4, 2, 6, 10, 4, 4, 5, 2, 6, 10, 4, 101, 2, 4, 5, 10, 4, 101, 4, 105, + 5, 10, 4, 101, 2, 3, 4, // 167 + 9, 10, 4, 4, 5, 105, 9, 10, 4, 2, 5, 4, 9, 10, 4, 2, 4, 3, 9, 10, 4, 107, 3, 6, 7, 10, 4, 4, 6, 3, + 7, 10, 4, 107, 3, 2, 6, 10, 4, 3, 4, 2, 6, 10, 4, 4, 5, 2, 6, 10, 4, 103, 2, 107, 3, // 168 + 14, 10, 4, 2, 5, 0, 9, 10, 4, 105, 4, 5, 9, 10, 4, 0, 5, 4, 9, 10, 4, 0, 2, 103, 8, 10, 4, 2, 7, + 103, 8, 10, 4, 0, 7, 2, 8, 10, 4, 100, 0, 103, 8, 10, 4, 4, 7, 0, 8, 10, 4, 107, 103, 2, 7, 10, 4, + 0, 4, 2, 7, 10, 4, 107, 2, 6, 7, 10, 4, 4, 6, 2, 7, 10, 4, 4, 5, 2, 6, 10, 4, 2, 4, 0, 5, // 169 + 12, 10, 4, 107, 3, 6, 7, 10, 4, 4, 6, 3, 7, 10, 4, 107, 3, 2, 6, 10, 4, 3, 4, 2, 6, 10, 4, 4, 5, + 2, 6, 10, 4, 105, 1, 4, 5, 10, 4, 2, 4, 1, 5, 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, 10, 4, 105, 1, + 0, 4, 10, 4, 107, 103, 2, 3, 10, 4, 101, 0, 105, 1, // 170 + 14, 10, 4, 100, 2, 103, 8, 10, 4, 2, 7, 103, 8, 10, 4, 101, 1, 100, 8, 10, 4, 101, 4, 1, 8, 10, 4, + 100, 1, 2, 8, 10, 4, 1, 4, 2, 8, 10, 4, 4, 7, 2, 8, 10, 4, 103, 2, 107, 7, 10, 4, 107, 2, 6, 7, + 10, 4, 4, 6, 2, 7, 10, 4, 4, 5, 2, 6, 10, 4, 1, 4, 105, 5, 10, 4, 2, 4, 1, 5, 10, 4, 101, 105, 1, + 4, // 171 + 14, 10, 4, 103, 3, 1, 11, 10, 4, 3, 6, 1, 11, 10, 4, 103, 6, 3, 11, 10, 4, 103, 1, 102, 11, 10, 4, + 1, 6, 5, 11, 10, 4, 1, 4, 3, 9, 10, 4, 4, 5, 105, 9, 10, 4, 1, 5, 4, 9, 10, 4, 107, 3, 6, 7, 10, + 4, 4, 6, 3, 7, 10, 4, 4, 5, 3, 6, 10, 4, 3, 5, 1, 6, 10, 4, 103, 107, 3, 6, 10, 4, 3, 4, 1, + 5, // 172 + 15, 10, 4, 103, 1, 102, 11, 10, 4, 103, 6, 1, 11, 10, 4, 1, 6, 5, 11, 10, 4, 1, 4, 0, 9, 10, 4, + 105, 4, 5, 9, 10, 4, 1, 5, 4, 9, 10, 4, 100, 0, 103, 8, 10, 4, 0, 7, 103, 8, 10, 4, 4, 7, 0, 8, + 10, 4, 103, 0, 6, 7, 10, 4, 103, 6, 107, 7, 10, 4, 0, 4, 6, 7, 10, 4, 4, 5, 1, 6, 10, 4, 0, 4, 1, + 6, 10, 4, 103, 0, 1, 6, // 173 + 14, 10, 4, 103, 3, 102, 11, 10, 4, 103, 6, 3, 11, 10, 4, 3, 6, 5, 11, 10, 4, 102, 3, 0, 11, 10, 4, + 3, 5, 0, 11, 10, 4, 102, 0, 101, 11, 10, 4, 0, 5, 101, 11, 10, 4, 107, 3, 6, 7, 10, 4, 4, 6, 3, 7, + 10, 4, 4, 5, 3, 6, 10, 4, 103, 107, 3, 6, 10, 4, 3, 4, 0, 5, 10, 4, 105, 0, 4, 5, 10, 4, 101, 0, + 105, 5, // 174 + 13, 10, 4, 103, 6, 8, 11, 10, 4, 103, 8, 102, 11, 10, 4, 5, 8, 6, 11, 10, 4, 101, 102, 8, 11, 10, + 4, 101, 8, 5, 11, 10, 4, 103, 6, 7, 8, 10, 4, 4, 7, 6, 8, 10, 4, 4, 6, 5, 8, 10, 4, 101, 4, 5, 8, + 10, 4, 101, 102, 100, 8, 10, 4, 102, 103, 100, 8, 10, 4, 103, 6, 107, 7, 10, 4, 101, 4, 105, + 5, // 175 + 7, 10, 4, 6, 9, 8, 10, 10, 4, 6, 8, 107, 10, 10, 4, 5, 8, 6, 9, 10, 4, 105, 8, 5, 9, 10, 4, 104, + 5, 105, 8, 10, 4, 104, 6, 5, 8, 10, 4, 104, 107, 6, 8, // 176 + 7, 10, 4, 104, 107, 6, 10, 10, 4, 104, 6, 3, 10, 10, 4, 104, 0, 5, 9, 10, 4, 104, 5, 105, 9, 10, + 4, 104, 5, 3, 6, 10, 4, 104, 0, 3, 5, 10, 4, 104, 0, 100, 3, // 177 + 11, 10, 4, 6, 8, 107, 10, 10, 4, 0, 8, 6, 10, 10, 4, 0, 6, 1, 10, 10, 4, 104, 107, 6, 8, 10, 4, 5, + 6, 0, 8, 10, 4, 104, 6, 5, 8, 10, 4, 105, 5, 0, 8, 10, 4, 104, 5, 105, 8, 10, 4, 0, 5, 1, 6, 10, + 4, 105, 1, 0, 5, 10, 4, 105, 101, 0, 1, // 178 + 10, 10, 4, 3, 6, 1, 10, 10, 4, 104, 6, 3, 10, 10, 4, 107, 6, 104, 10, 10, 4, 104, 5, 3, 6, 10, 4, + 3, 5, 1, 6, 10, 4, 1, 3, 104, 5, 10, 4, 104, 105, 1, 5, 10, 4, 100, 104, 1, 3, 10, 4, 100, 104, + 101, 1, 10, 4, 104, 105, 101, 1, // 179 + 12, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 1, 11, 10, 4, 2, 5, 1, 11, 10, 4, 107, 6, 8, 10, 10, 4, 2, + 8, 6, 10, 10, 4, 5, 8, 1, 9, 10, 4, 105, 8, 5, 9, 10, 4, 107, 6, 104, 8, 10, 4, 5, 6, 2, 8, 10, 4, + 104, 6, 5, 8, 10, 4, 104, 5, 105, 8, 10, 4, 1, 5, 2, 8, // 180 + 15, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 1, 11, 10, 4, 2, 5, 1, 11, 10, 4, 3, 6, 2, 10, 10, 4, 104, + 6, 3, 10, 10, 4, 107, 6, 104, 10, 10, 4, 104, 0, 5, 9, 10, 4, 104, 5, 105, 9, 10, 4, 1, 5, 0, 9, + 10, 4, 104, 5, 3, 6, 10, 4, 3, 5, 2, 6, 10, 4, 0, 3, 104, 5, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, 0, 5, + 10, 4, 100, 104, 0, 3, // 181 + 15, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 0, 11, 10, 4, 2, 5, 0, 11, 10, 4, 102, 0, 101, 11, 10, 4, + 0, 5, 101, 11, 10, 4, 6, 8, 107, 10, 10, 4, 2, 8, 6, 10, 10, 4, 0, 6, 2, 8, 10, 4, 104, 107, 6, 8, + 10, 4, 5, 6, 0, 8, 10, 4, 104, 6, 5, 8, 10, 4, 105, 5, 0, 8, 10, 4, 104, 5, 105, 8, 10, 4, 0, 5, + 2, 6, 10, 4, 101, 0, 105, 5, // 182 + 13, 10, 4, 2, 6, 5, 11, 10, 4, 102, 2, 101, 11, 10, 4, 2, 5, 101, 11, 10, 4, 3, 6, 2, 10, 10, 4, + 104, 6, 3, 10, 10, 4, 107, 6, 104, 10, 10, 4, 104, 5, 3, 6, 10, 4, 3, 5, 2, 6, 10, 4, 105, 101, 3, + 5, 10, 4, 2, 3, 101, 5, 10, 4, 104, 105, 3, 5, 10, 4, 104, 105, 101, 3, 10, 4, 101, 100, 104, + 3, // 183 + 11, 10, 4, 5, 8, 3, 9, 10, 4, 105, 8, 5, 9, 10, 4, 2, 5, 3, 9, 10, 4, 104, 107, 6, 8, 10, 4, 3, 6, + 107, 8, 10, 4, 5, 6, 3, 8, 10, 4, 104, 6, 5, 8, 10, 4, 104, 5, 105, 8, 10, 4, 107, 3, 2, 6, 10, 4, + 3, 5, 2, 6, 10, 4, 103, 2, 107, 3, // 184 + 10, 10, 4, 2, 5, 0, 9, 10, 4, 104, 0, 5, 9, 10, 4, 104, 5, 105, 9, 10, 4, 104, 0, 107, 6, 10, 4, + 104, 5, 0, 6, 10, 4, 0, 2, 107, 6, 10, 4, 0, 5, 2, 6, 10, 4, 107, 0, 103, 2, 10, 4, 104, 103, 107, + 0, 10, 4, 103, 104, 100, 0, // 185 + 14, 10, 4, 104, 107, 6, 8, 10, 4, 3, 6, 107, 8, 10, 4, 5, 6, 3, 8, 10, 4, 104, 6, 5, 8, 10, 4, 0, + 5, 3, 8, 10, 4, 105, 5, 0, 8, 10, 4, 104, 5, 105, 8, 10, 4, 107, 3, 2, 6, 10, 4, 3, 5, 2, 6, 10, + 4, 105, 1, 0, 5, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, 0, 5, 10, 4, 107, 103, 2, 3, 10, 4, 101, 0, 105, + 1, // 186 + 9, 10, 4, 104, 2, 107, 6, 10, 4, 104, 5, 2, 6, 10, 4, 104, 105, 1, 5, 10, 4, 104, 1, 2, 5, 10, 4, + 104, 103, 107, 2, 10, 4, 103, 104, 100, 2, 10, 4, 104, 1, 100, 2, 10, 4, 101, 100, 104, 1, 10, 4, + 104, 105, 101, 1, // 187 + 15, 10, 4, 103, 3, 1, 11, 10, 4, 3, 6, 1, 11, 10, 4, 103, 6, 3, 11, 10, 4, 103, 1, 102, 11, 10, 4, + 1, 6, 5, 11, 10, 4, 5, 8, 1, 9, 10, 4, 105, 8, 5, 9, 10, 4, 107, 3, 6, 8, 10, 4, 107, 6, 104, 8, + 10, 4, 5, 6, 3, 8, 10, 4, 104, 6, 5, 8, 10, 4, 1, 5, 3, 8, 10, 4, 104, 5, 105, 8, 10, 4, 3, 5, 1, + 6, 10, 4, 103, 107, 3, 6, // 188 + 13, 10, 4, 103, 1, 102, 11, 10, 4, 103, 6, 1, 11, 10, 4, 1, 6, 5, 11, 10, 4, 104, 0, 5, 9, 10, 4, + 104, 5, 105, 9, 10, 4, 1, 5, 0, 9, 10, 4, 104, 0, 107, 6, 10, 4, 104, 5, 0, 6, 10, 4, 0, 5, 1, 6, + 10, 4, 103, 107, 0, 6, 10, 4, 103, 0, 1, 6, 10, 4, 103, 107, 104, 0, 10, 4, 103, 104, 100, + 0, // 189 + 16, 10, 4, 103, 3, 102, 11, 10, 4, 103, 6, 3, 11, 10, 4, 3, 6, 5, 11, 10, 4, 102, 3, 0, 11, 10, 4, + 3, 5, 0, 11, 10, 4, 102, 0, 101, 11, 10, 4, 0, 5, 101, 11, 10, 4, 107, 3, 6, 8, 10, 4, 107, 6, + 104, 8, 10, 4, 5, 6, 3, 8, 10, 4, 104, 6, 5, 8, 10, 4, 0, 5, 3, 8, 10, 4, 105, 5, 0, 8, 10, 4, + 104, 5, 105, 8, 10, 4, 103, 107, 3, 6, 10, 4, 101, 0, 105, 5, // 190 + 10, 10, 4, 100, 6, 5, 11, 10, 4, 103, 6, 100, 11, 10, 4, 102, 103, 100, 11, 10, 4, 101, 102, 100, + 11, 10, 4, 101, 100, 5, 11, 10, 4, 103, 104, 100, 6, 10, 4, 104, 5, 100, 6, 10, 4, 103, 107, 104, + 6, 10, 4, 101, 100, 104, 5, 10, 4, 104, 105, 101, 5, // 191 + 3, 10, 4, 106, 5, 10, 11, 10, 4, 5, 7, 107, 10, 10, 4, 106, 5, 107, 10, // 192 + 10, 10, 4, 106, 5, 10, 11, 10, 4, 3, 10, 5, 11, 10, 4, 3, 5, 0, 11, 10, 4, 106, 5, 107, 10, 10, 4, + 5, 7, 107, 10, 10, 4, 3, 7, 5, 10, 10, 4, 5, 7, 0, 8, 10, 4, 0, 3, 100, 8, 10, 4, 0, 7, 3, 8, 10, + 4, 0, 5, 3, 7, // 193 + 10, 10, 4, 106, 5, 10, 11, 10, 4, 1, 10, 5, 11, 10, 4, 106, 5, 107, 10, 10, 4, 5, 7, 107, 10, 10, + 4, 1, 7, 5, 10, 10, 4, 0, 7, 1, 10, 10, 4, 101, 1, 0, 9, 10, 4, 1, 5, 0, 9, 10, 4, 5, 7, 0, 9, 10, + 4, 0, 5, 1, 7, // 194 + 12, 10, 4, 5, 10, 106, 11, 10, 4, 1, 10, 5, 11, 10, 4, 107, 106, 5, 10, 10, 4, 3, 5, 1, 10, 10, 4, + 107, 5, 7, 10, 10, 4, 3, 7, 5, 10, 10, 4, 101, 1, 8, 9, 10, 4, 5, 8, 1, 9, 10, 4, 100, 101, 1, 8, + 10, 4, 1, 3, 100, 8, 10, 4, 1, 5, 3, 8, 10, 4, 5, 7, 3, 8, // 195 + 7, 10, 4, 106, 2, 5, 10, 10, 4, 106, 5, 107, 10, 10, 4, 5, 7, 107, 10, 10, 4, 2, 7, 5, 10, 10, 4, + 1, 5, 2, 7, 10, 4, 106, 2, 1, 5, 10, 4, 106, 102, 1, 2, // 196 + 14, 10, 4, 106, 2, 5, 10, 10, 4, 106, 5, 107, 10, 10, 4, 107, 5, 7, 10, 10, 4, 2, 7, 5, 10, 10, 4, + 3, 7, 2, 10, 10, 4, 5, 7, 0, 8, 10, 4, 100, 0, 3, 8, 10, 4, 0, 7, 3, 8, 10, 4, 3, 5, 2, 7, 10, 4, + 0, 5, 3, 7, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, 0, 5, 10, 4, 106, 2, 1, 5, 10, 4, 106, 102, 1, + 2, // 197 + 12, 10, 4, 0, 7, 2, 10, 10, 4, 106, 2, 5, 10, 10, 4, 106, 5, 107, 10, 10, 4, 5, 7, 107, 10, 10, 4, + 2, 7, 5, 10, 10, 4, 102, 2, 0, 9, 10, 4, 2, 5, 0, 9, 10, 4, 102, 5, 2, 9, 10, 4, 101, 102, 0, 9, + 10, 4, 5, 7, 0, 9, 10, 4, 0, 5, 2, 7, 10, 4, 106, 2, 102, 5, // 198 + 15, 10, 4, 107, 106, 5, 10, 10, 4, 2, 5, 106, 10, 10, 4, 107, 5, 7, 10, 10, 4, 2, 7, 5, 10, 10, 4, + 3, 7, 2, 10, 10, 4, 101, 102, 2, 9, 10, 4, 102, 5, 2, 9, 10, 4, 101, 2, 3, 9, 10, 4, 2, 5, 3, 9, + 10, 4, 101, 3, 8, 9, 10, 4, 5, 8, 3, 9, 10, 4, 101, 3, 100, 8, 10, 4, 5, 7, 3, 8, 10, 4, 3, 5, 2, + 7, 10, 4, 106, 2, 102, 5, // 199 + 7, 10, 4, 107, 5, 7, 11, 10, 4, 2, 7, 5, 11, 10, 4, 107, 7, 2, 11, 10, 4, 107, 106, 5, 11, 10, 4, + 107, 3, 2, 7, 10, 4, 3, 5, 2, 7, 10, 4, 103, 2, 107, 3, // 200 + 12, 10, 4, 2, 5, 0, 11, 10, 4, 2, 107, 7, 11, 10, 4, 5, 7, 107, 11, 10, 4, 2, 7, 5, 11, 10, 4, + 106, 5, 107, 11, 10, 4, 5, 7, 0, 8, 10, 4, 0, 2, 103, 8, 10, 4, 2, 7, 103, 8, 10, 4, 0, 7, 2, 8, + 10, 4, 100, 0, 103, 8, 10, 4, 0, 5, 2, 7, 10, 4, 107, 103, 2, 7, // 201 + 14, 10, 4, 2, 5, 1, 11, 10, 4, 107, 5, 7, 11, 10, 4, 2, 7, 5, 11, 10, 4, 107, 7, 2, 11, 10, 4, + 106, 5, 107, 11, 10, 4, 101, 1, 0, 9, 10, 4, 1, 5, 0, 9, 10, 4, 5, 7, 0, 9, 10, 4, 107, 3, 2, 7, + 10, 4, 3, 5, 2, 7, 10, 4, 0, 5, 3, 7, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, 0, 5, 10, 4, 107, 103, 2, + 3, // 202 + 15, 10, 4, 2, 5, 1, 11, 10, 4, 2, 107, 7, 11, 10, 4, 5, 7, 107, 11, 10, 4, 2, 7, 5, 11, 10, 4, + 106, 5, 107, 11, 10, 4, 101, 1, 8, 9, 10, 4, 5, 8, 1, 9, 10, 4, 101, 1, 100, 8, 10, 4, 5, 7, 1, 8, + 10, 4, 100, 1, 2, 8, 10, 4, 1, 7, 2, 8, 10, 4, 100, 2, 103, 8, 10, 4, 2, 7, 103, 8, 10, 4, 1, 5, + 2, 7, 10, 4, 103, 2, 107, 7, // 203 + 6, 10, 4, 3, 5, 107, 7, 10, 4, 107, 3, 1, 5, 10, 4, 107, 1, 106, 5, 10, 4, 103, 1, 107, 3, 10, 4, + 106, 107, 103, 1, 10, 4, 102, 106, 103, 1, // 204 + 10, 10, 4, 5, 7, 0, 8, 10, 4, 100, 0, 103, 8, 10, 4, 0, 7, 103, 8, 10, 4, 1, 5, 107, 7, 10, 4, 0, + 5, 1, 7, 10, 4, 107, 103, 1, 7, 10, 4, 0, 1, 103, 7, 10, 4, 106, 107, 1, 5, 10, 4, 106, 107, 103, + 1, 10, 4, 102, 106, 103, 1, // 205 + 10, 10, 4, 102, 0, 101, 9, 10, 4, 102, 5, 0, 9, 10, 4, 5, 7, 0, 9, 10, 4, 3, 5, 107, 7, 10, 4, 0, + 5, 3, 7, 10, 4, 102, 106, 3, 5, 10, 4, 102, 3, 0, 5, 10, 4, 106, 107, 3, 5, 10, 4, 102, 106, 103, + 3, 10, 4, 106, 107, 103, 3, // 206 + 9, 10, 4, 101, 102, 8, 9, 10, 4, 5, 8, 102, 9, 10, 4, 101, 102, 100, 8, 10, 4, 102, 103, 100, 8, + 10, 4, 102, 5, 103, 8, 10, 4, 5, 7, 103, 8, 10, 4, 103, 5, 107, 7, 10, 4, 102, 106, 103, 5, 10, 4, + 106, 107, 103, 5, // 207 + 7, 10, 4, 8, 10, 5, 11, 10, 4, 106, 5, 10, 11, 10, 4, 107, 5, 4, 10, 10, 4, 107, 4, 8, 10, 10, 4, + 5, 8, 4, 10, 10, 4, 106, 5, 107, 10, 10, 4, 104, 107, 4, 8, // 208 + 11, 10, 4, 106, 5, 10, 11, 10, 4, 3, 10, 5, 11, 10, 4, 3, 5, 0, 11, 10, 4, 106, 5, 107, 10, 10, 4, + 4, 5, 3, 10, 10, 4, 107, 5, 4, 10, 10, 4, 104, 107, 4, 10, 10, 4, 104, 4, 3, 10, 10, 4, 3, 4, 0, + 5, 10, 4, 104, 0, 3, 4, 10, 4, 104, 0, 100, 3, // 209 + 14, 10, 4, 106, 5, 10, 11, 10, 4, 1, 10, 5, 11, 10, 4, 107, 5, 4, 10, 10, 4, 107, 4, 8, 10, 10, 4, + 5, 8, 4, 10, 10, 4, 106, 5, 107, 10, 10, 4, 1, 8, 5, 10, 10, 4, 0, 8, 1, 10, 10, 4, 1, 5, 4, 9, + 10, 4, 101, 1, 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, 4, 5, 1, 8, 10, 4, 0, 4, 1, 8, 10, 4, 104, 107, 4, + 8, // 210 + 15, 10, 4, 5, 10, 106, 11, 10, 4, 1, 10, 5, 11, 10, 4, 107, 106, 5, 10, 10, 4, 3, 5, 1, 10, 10, 4, + 4, 5, 3, 10, 10, 4, 107, 5, 4, 10, 10, 4, 104, 4, 3, 10, 10, 4, 107, 4, 104, 10, 10, 4, 1, 5, 4, + 9, 10, 4, 100, 1, 3, 9, 10, 4, 100, 3, 4, 9, 10, 4, 1, 4, 3, 9, 10, 4, 100, 101, 1, 9, 10, 4, 3, + 4, 1, 5, 10, 4, 100, 3, 104, 4, // 211 + 11, 10, 4, 106, 2, 5, 10, 10, 4, 106, 5, 107, 10, 10, 4, 4, 5, 2, 10, 10, 4, 107, 5, 4, 10, 10, 4, + 107, 4, 8, 10, 10, 4, 2, 8, 4, 10, 10, 4, 107, 4, 104, 8, 10, 4, 1, 4, 2, 8, 10, 4, 106, 2, 1, 5, + 10, 4, 2, 4, 1, 5, 10, 4, 106, 102, 1, 2, // 212 + 14, 10, 4, 106, 2, 5, 10, 10, 4, 106, 5, 107, 10, 10, 4, 4, 5, 2, 10, 10, 4, 107, 5, 4, 10, 10, 4, + 3, 4, 2, 10, 10, 4, 104, 4, 3, 10, 10, 4, 107, 4, 104, 10, 10, 4, 106, 2, 1, 5, 10, 4, 2, 4, 1, 5, + 10, 4, 0, 3, 104, 4, 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, 10, 4, 100, 104, 0, 3, 10, 4, 106, 102, + 1, 2, // 213 + 15, 10, 4, 106, 2, 5, 10, 10, 4, 106, 5, 107, 10, 10, 4, 4, 5, 2, 10, 10, 4, 107, 5, 4, 10, 10, 4, + 4, 8, 107, 10, 10, 4, 2, 8, 4, 10, 10, 4, 102, 2, 0, 9, 10, 4, 2, 5, 0, 9, 10, 4, 102, 5, 2, 9, + 10, 4, 102, 0, 101, 9, 10, 4, 0, 5, 4, 9, 10, 4, 0, 4, 2, 8, 10, 4, 104, 107, 4, 8, 10, 4, 2, 4, + 0, 5, 10, 4, 106, 2, 102, 5, // 214 + 16, 10, 4, 107, 106, 5, 10, 10, 4, 2, 5, 106, 10, 10, 4, 4, 5, 2, 10, 10, 4, 107, 5, 4, 10, 10, 4, + 3, 4, 2, 10, 10, 4, 104, 4, 3, 10, 10, 4, 107, 4, 104, 10, 10, 4, 102, 2, 101, 9, 10, 4, 102, 5, + 2, 9, 10, 4, 2, 5, 4, 9, 10, 4, 101, 2, 3, 9, 10, 4, 2, 4, 3, 9, 10, 4, 101, 3, 100, 9, 10, 4, 3, + 4, 100, 9, 10, 4, 102, 106, 2, 5, 10, 4, 100, 3, 104, 4, // 215 + 7, 10, 4, 107, 106, 5, 11, 10, 4, 107, 5, 2, 11, 10, 4, 104, 107, 4, 8, 10, 4, 3, 4, 107, 8, 10, + 4, 107, 4, 2, 5, 10, 4, 107, 3, 2, 4, 10, 4, 103, 2, 107, 3, // 216 + 10, 10, 4, 2, 5, 0, 11, 10, 4, 107, 5, 2, 11, 10, 4, 106, 5, 107, 11, 10, 4, 107, 4, 2, 5, 10, 4, + 2, 4, 0, 5, 10, 4, 0, 2, 107, 4, 10, 4, 104, 0, 107, 4, 10, 4, 107, 0, 103, 2, 10, 4, 104, 103, + 107, 0, 10, 4, 103, 104, 100, 0, // 217 + 15, 10, 4, 2, 5, 1, 11, 10, 4, 107, 5, 2, 11, 10, 4, 106, 5, 107, 11, 10, 4, 1, 5, 4, 9, 10, 4, + 101, 1, 0, 9, 10, 4, 1, 4, 0, 9, 10, 4, 104, 107, 4, 8, 10, 4, 3, 4, 107, 8, 10, 4, 0, 4, 3, 8, + 10, 4, 107, 4, 2, 5, 10, 4, 2, 4, 1, 5, 10, 4, 2, 3, 0, 4, 10, 4, 107, 3, 2, 4, 10, 4, 1, 2, 0, 4, + 10, 4, 107, 103, 2, 3, // 218 + 13, 10, 4, 2, 5, 1, 11, 10, 4, 107, 5, 2, 11, 10, 4, 106, 5, 107, 11, 10, 4, 1, 5, 4, 9, 10, 4, + 101, 1, 100, 9, 10, 4, 1, 4, 100, 9, 10, 4, 107, 4, 2, 5, 10, 4, 2, 4, 1, 5, 10, 4, 104, 100, 2, + 4, 10, 4, 1, 2, 100, 4, 10, 4, 104, 2, 107, 4, 10, 4, 104, 103, 107, 2, 10, 4, 103, 104, 100, + 2, // 219 + 10, 10, 4, 1, 4, 3, 8, 10, 4, 104, 107, 4, 8, 10, 4, 3, 4, 107, 8, 10, 4, 107, 3, 1, 5, 10, 4, 3, + 4, 1, 5, 10, 4, 107, 4, 3, 5, 10, 4, 107, 1, 106, 5, 10, 4, 103, 1, 107, 3, 10, 4, 106, 107, 103, + 1, 10, 4, 103, 102, 106, 1, // 220 + 9, 10, 4, 106, 107, 1, 5, 10, 4, 107, 4, 1, 5, 10, 4, 104, 0, 107, 4, 10, 4, 0, 1, 107, 4, 10, 4, + 106, 107, 103, 1, 10, 4, 107, 0, 103, 1, 10, 4, 103, 102, 106, 1, 10, 4, 104, 103, 107, 0, 10, 4, + 103, 104, 100, 0, // 221 + 13, 10, 4, 102, 0, 101, 9, 10, 4, 102, 5, 0, 9, 10, 4, 0, 5, 4, 9, 10, 4, 104, 107, 4, 8, 10, 4, + 3, 4, 107, 8, 10, 4, 0, 4, 3, 8, 10, 4, 106, 107, 3, 5, 10, 4, 107, 4, 3, 5, 10, 4, 3, 4, 0, 5, + 10, 4, 102, 106, 3, 5, 10, 4, 102, 3, 0, 5, 10, 4, 103, 102, 106, 3, 10, 4, 106, 107, 103, + 3, // 222 + 10, 10, 4, 103, 102, 5, 9, 10, 4, 103, 5, 4, 9, 10, 4, 102, 103, 100, 9, 10, 4, 103, 4, 100, 9, + 10, 4, 101, 102, 100, 9, 10, 4, 106, 107, 103, 5, 10, 4, 107, 4, 103, 5, 10, 4, 103, 102, 106, 5, + 10, 4, 104, 103, 107, 4, 10, 4, 103, 104, 100, 4, // 223 + 7, 10, 4, 106, 4, 7, 11, 10, 4, 4, 9, 7, 11, 10, 4, 106, 9, 4, 11, 10, 4, 106, 7, 10, 11, 10, 4, + 9, 10, 7, 11, 10, 4, 106, 7, 107, 10, 10, 4, 105, 4, 106, 9, // 224 + 15, 10, 4, 106, 4, 7, 11, 10, 4, 4, 9, 7, 11, 10, 4, 106, 9, 4, 11, 10, 4, 106, 7, 10, 11, 10, 4, + 9, 10, 7, 11, 10, 4, 3, 10, 9, 11, 10, 4, 3, 9, 0, 11, 10, 4, 7, 9, 3, 10, 10, 4, 106, 7, 107, 10, + 10, 4, 3, 7, 4, 9, 10, 4, 3, 4, 0, 9, 10, 4, 105, 4, 106, 9, 10, 4, 0, 3, 100, 8, 10, 4, 0, 4, 3, + 8, 10, 4, 4, 7, 3, 8, // 225 + 11, 10, 4, 105, 1, 4, 11, 10, 4, 105, 4, 106, 11, 10, 4, 106, 4, 7, 11, 10, 4, 1, 7, 4, 11, 10, 4, + 106, 7, 10, 11, 10, 4, 1, 10, 7, 11, 10, 4, 106, 7, 107, 10, 10, 4, 0, 7, 1, 10, 10, 4, 0, 4, 1, + 7, 10, 4, 105, 1, 0, 4, 10, 4, 105, 101, 0, 1, // 226 + 15, 10, 4, 105, 1, 4, 11, 10, 4, 105, 4, 106, 11, 10, 4, 4, 7, 106, 11, 10, 4, 1, 7, 4, 11, 10, 4, + 7, 10, 106, 11, 10, 4, 1, 10, 7, 11, 10, 4, 107, 106, 7, 10, 10, 4, 3, 7, 1, 10, 10, 4, 100, 101, + 1, 8, 10, 4, 101, 4, 1, 8, 10, 4, 1, 3, 100, 8, 10, 4, 1, 4, 3, 8, 10, 4, 4, 7, 3, 8, 10, 4, 3, 4, + 1, 7, 10, 4, 105, 1, 101, 4, // 227 + 7, 10, 4, 106, 2, 7, 10, 10, 4, 106, 7, 107, 10, 10, 4, 106, 4, 1, 9, 10, 4, 105, 4, 106, 9, 10, + 4, 106, 2, 4, 7, 10, 4, 106, 2, 1, 4, 10, 4, 106, 102, 1, 2, // 228 + 15, 10, 4, 106, 2, 7, 10, 10, 4, 106, 7, 107, 10, 10, 4, 3, 7, 2, 10, 10, 4, 1, 4, 0, 9, 10, 4, + 106, 4, 1, 9, 10, 4, 105, 4, 106, 9, 10, 4, 100, 0, 3, 8, 10, 4, 0, 4, 3, 8, 10, 4, 4, 7, 3, 8, + 10, 4, 3, 4, 2, 7, 10, 4, 106, 2, 4, 7, 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, 10, 4, 106, 2, 1, 4, + 10, 4, 106, 102, 1, 2, // 229 + 10, 10, 4, 0, 7, 2, 10, 10, 4, 106, 2, 7, 10, 10, 4, 106, 7, 107, 10, 10, 4, 0, 4, 2, 7, 10, 4, + 106, 2, 4, 7, 10, 4, 106, 2, 0, 4, 10, 4, 105, 106, 0, 4, 10, 4, 106, 102, 0, 2, 10, 4, 105, 106, + 102, 0, 10, 4, 101, 105, 102, 0, // 230 + 13, 10, 4, 107, 106, 7, 10, 10, 4, 2, 7, 106, 10, 10, 4, 3, 7, 2, 10, 10, 4, 101, 3, 100, 8, 10, + 4, 101, 4, 3, 8, 10, 4, 4, 7, 3, 8, 10, 4, 3, 4, 2, 7, 10, 4, 2, 4, 106, 7, 10, 4, 101, 105, 2, 4, + 10, 4, 101, 2, 3, 4, 10, 4, 105, 106, 2, 4, 10, 4, 105, 106, 102, 2, 10, 4, 101, 105, 102, + 2, // 231 + 11, 10, 4, 4, 9, 2, 11, 10, 4, 106, 9, 4, 11, 10, 4, 4, 7, 106, 11, 10, 4, 2, 7, 4, 11, 10, 4, + 107, 106, 7, 11, 10, 4, 107, 7, 2, 11, 10, 4, 105, 4, 106, 9, 10, 4, 2, 4, 3, 9, 10, 4, 107, 3, 2, + 7, 10, 4, 3, 4, 2, 7, 10, 4, 103, 2, 107, 3, // 232 + 15, 10, 4, 4, 9, 2, 11, 10, 4, 106, 9, 4, 11, 10, 4, 106, 4, 7, 11, 10, 4, 2, 7, 4, 11, 10, 4, + 107, 7, 2, 11, 10, 4, 106, 7, 107, 11, 10, 4, 105, 4, 106, 9, 10, 4, 2, 4, 0, 9, 10, 4, 0, 2, 103, + 8, 10, 4, 2, 7, 103, 8, 10, 4, 0, 7, 2, 8, 10, 4, 100, 0, 103, 8, 10, 4, 4, 7, 0, 8, 10, 4, 107, + 103, 2, 7, 10, 4, 0, 4, 2, 7, // 233 + 14, 10, 4, 105, 1, 4, 11, 10, 4, 105, 4, 106, 11, 10, 4, 2, 4, 1, 11, 10, 4, 106, 4, 7, 11, 10, 4, + 2, 7, 4, 11, 10, 4, 107, 7, 2, 11, 10, 4, 106, 7, 107, 11, 10, 4, 107, 3, 2, 7, 10, 4, 3, 4, 2, 7, + 10, 4, 2, 3, 0, 4, 10, 4, 1, 2, 0, 4, 10, 4, 105, 1, 0, 4, 10, 4, 107, 103, 2, 3, 10, 4, 105, 101, + 0, 1, // 234 + 16, 10, 4, 105, 1, 4, 11, 10, 4, 105, 4, 106, 11, 10, 4, 2, 4, 1, 11, 10, 4, 106, 4, 7, 11, 10, 4, + 2, 7, 4, 11, 10, 4, 107, 7, 2, 11, 10, 4, 106, 7, 107, 11, 10, 4, 100, 2, 103, 8, 10, 4, 2, 7, + 103, 8, 10, 4, 101, 1, 100, 8, 10, 4, 101, 4, 1, 8, 10, 4, 100, 1, 2, 8, 10, 4, 1, 4, 2, 8, 10, 4, + 4, 7, 2, 8, 10, 4, 103, 2, 107, 7, 10, 4, 101, 105, 1, 4, // 235 + 10, 10, 4, 1, 4, 3, 9, 10, 4, 106, 4, 1, 9, 10, 4, 105, 4, 106, 9, 10, 4, 107, 3, 1, 7, 10, 4, 3, + 4, 1, 7, 10, 4, 107, 1, 106, 7, 10, 4, 1, 4, 106, 7, 10, 4, 103, 1, 107, 3, 10, 4, 106, 107, 103, + 1, 10, 4, 103, 102, 106, 1, // 236 + 13, 10, 4, 1, 4, 0, 9, 10, 4, 106, 4, 1, 9, 10, 4, 105, 4, 106, 9, 10, 4, 100, 0, 103, 8, 10, 4, + 0, 7, 103, 8, 10, 4, 4, 7, 0, 8, 10, 4, 107, 103, 1, 7, 10, 4, 0, 1, 103, 7, 10, 4, 0, 4, 1, 7, + 10, 4, 106, 107, 1, 7, 10, 4, 106, 1, 4, 7, 10, 4, 106, 107, 103, 1, 10, 4, 103, 102, 106, + 1, // 237 + 9, 10, 4, 106, 107, 3, 7, 10, 4, 106, 3, 4, 7, 10, 4, 106, 3, 0, 4, 10, 4, 105, 106, 0, 4, 10, 4, + 103, 102, 106, 3, 10, 4, 102, 0, 106, 3, 10, 4, 106, 107, 103, 3, 10, 4, 105, 106, 102, 0, 10, 4, + 102, 101, 105, 0, // 238 + 10, 10, 4, 103, 102, 7, 8, 10, 4, 4, 7, 102, 8, 10, 4, 101, 102, 100, 8, 10, 4, 101, 4, 102, 8, + 10, 4, 102, 103, 100, 8, 10, 4, 103, 102, 106, 7, 10, 4, 102, 4, 106, 7, 10, 4, 106, 107, 103, 7, + 10, 4, 105, 106, 102, 4, 10, 4, 101, 105, 102, 4, // 239 + 6, 10, 4, 106, 9, 10, 11, 10, 4, 106, 9, 8, 10, 10, 4, 106, 8, 107, 10, 10, 4, 105, 8, 106, 9, 10, + 4, 104, 106, 105, 8, 10, 4, 104, 107, 106, 8, // 240 + 10, 10, 4, 106, 9, 10, 11, 10, 4, 3, 10, 9, 11, 10, 4, 3, 9, 0, 11, 10, 4, 106, 9, 107, 10, 10, 4, + 104, 107, 9, 10, 10, 4, 104, 9, 3, 10, 10, 4, 104, 0, 3, 9, 10, 4, 104, 107, 106, 9, 10, 4, 104, + 106, 105, 9, 10, 4, 104, 0, 100, 3, // 241 + 10, 10, 4, 105, 1, 8, 11, 10, 4, 105, 8, 106, 11, 10, 4, 106, 8, 10, 11, 10, 4, 1, 10, 8, 11, 10, + 4, 106, 8, 107, 10, 10, 4, 0, 8, 1, 10, 10, 4, 104, 107, 106, 8, 10, 4, 105, 1, 0, 8, 10, 4, 104, + 106, 105, 8, 10, 4, 105, 101, 0, 1, // 242 + 9, 10, 4, 106, 105, 10, 11, 10, 4, 1, 10, 105, 11, 10, 4, 104, 106, 105, 10, 10, 4, 104, 105, 1, + 10, 10, 4, 104, 107, 106, 10, 10, 4, 1, 3, 104, 10, 10, 4, 100, 104, 1, 3, 10, 4, 104, 105, 101, + 1, 10, 4, 100, 104, 101, 1, // 243 + 10, 10, 4, 106, 2, 9, 10, 10, 4, 8, 9, 2, 10, 10, 4, 106, 9, 8, 10, 10, 4, 106, 8, 107, 10, 10, 4, + 106, 2, 1, 9, 10, 4, 2, 8, 1, 9, 10, 4, 106, 105, 8, 9, 10, 4, 104, 106, 105, 8, 10, 4, 104, 107, + 106, 8, 10, 4, 106, 102, 1, 2, // 244 + 13, 10, 4, 106, 2, 9, 10, 10, 4, 106, 9, 107, 10, 10, 4, 3, 9, 2, 10, 10, 4, 104, 9, 3, 10, 10, 4, + 107, 9, 104, 10, 10, 4, 106, 2, 1, 9, 10, 4, 1, 2, 0, 9, 10, 4, 2, 3, 0, 9, 10, 4, 0, 3, 104, 9, + 10, 4, 104, 107, 106, 9, 10, 4, 104, 106, 105, 9, 10, 4, 100, 104, 0, 3, 10, 4, 106, 102, 1, + 2, // 245 + 9, 10, 4, 106, 2, 8, 10, 10, 4, 106, 8, 107, 10, 10, 4, 106, 2, 0, 8, 10, 4, 104, 107, 106, 8, 10, + 4, 104, 106, 105, 8, 10, 4, 106, 0, 105, 8, 10, 4, 106, 102, 0, 2, 10, 4, 102, 101, 105, 0, 10, 4, + 105, 106, 102, 0, // 246 + 10, 10, 4, 104, 105, 3, 10, 10, 4, 2, 3, 105, 10, 10, 4, 104, 106, 105, 10, 10, 4, 106, 2, 105, + 10, 10, 4, 104, 107, 106, 10, 10, 4, 104, 105, 101, 3, 10, 4, 105, 2, 101, 3, 10, 4, 101, 100, + 104, 3, 10, 4, 102, 101, 105, 2, 10, 4, 105, 106, 102, 2, // 247 + 10, 10, 4, 8, 9, 2, 11, 10, 4, 106, 9, 8, 11, 10, 4, 107, 106, 8, 11, 10, 4, 107, 8, 2, 11, 10, 4, + 106, 105, 8, 9, 10, 4, 2, 8, 3, 9, 10, 4, 107, 3, 2, 8, 10, 4, 104, 107, 106, 8, 10, 4, 104, 106, + 105, 8, 10, 4, 103, 2, 107, 3, // 248 + 9, 10, 4, 107, 9, 2, 11, 10, 4, 106, 9, 107, 11, 10, 4, 104, 106, 105, 9, 10, 4, 104, 107, 106, 9, + 10, 4, 104, 0, 107, 9, 10, 4, 0, 2, 107, 9, 10, 4, 107, 0, 103, 2, 10, 4, 104, 103, 107, 0, 10, 4, + 103, 104, 100, 0, // 249 + 13, 10, 4, 105, 1, 8, 11, 10, 4, 105, 8, 106, 11, 10, 4, 2, 8, 1, 11, 10, 4, 107, 8, 2, 11, 10, 4, + 106, 8, 107, 11, 10, 4, 104, 107, 106, 8, 10, 4, 2, 3, 0, 8, 10, 4, 107, 3, 2, 8, 10, 4, 1, 2, 0, + 8, 10, 4, 105, 1, 0, 8, 10, 4, 104, 106, 105, 8, 10, 4, 107, 103, 2, 3, 10, 4, 105, 101, 0, + 1, // 250 + 10, 10, 4, 104, 1, 2, 11, 10, 4, 104, 2, 107, 11, 10, 4, 104, 106, 105, 11, 10, 4, 104, 105, 1, + 11, 10, 4, 104, 107, 106, 11, 10, 4, 104, 103, 107, 2, 10, 4, 103, 104, 100, 2, 10, 4, 104, 1, + 100, 2, 10, 4, 101, 100, 104, 1, 10, 4, 104, 105, 101, 1, // 251 + 9, 10, 4, 106, 105, 8, 9, 10, 4, 106, 8, 1, 9, 10, 4, 107, 3, 1, 8, 10, 4, 104, 107, 106, 8, 10, + 4, 107, 1, 106, 8, 10, 4, 104, 106, 105, 8, 10, 4, 103, 1, 107, 3, 10, 4, 106, 107, 103, 1, 10, 4, + 103, 102, 106, 1, // 252 + 10, 10, 4, 106, 107, 1, 9, 10, 4, 0, 1, 107, 9, 10, 4, 104, 107, 106, 9, 10, 4, 104, 0, 107, 9, + 10, 4, 104, 106, 105, 9, 10, 4, 106, 107, 103, 1, 10, 4, 107, 0, 103, 1, 10, 4, 103, 102, 106, 1, + 10, 4, 104, 103, 107, 0, 10, 4, 103, 104, 100, 0, // 253 + 10, 10, 4, 106, 107, 3, 8, 10, 4, 106, 3, 0, 8, 10, 4, 104, 107, 106, 8, 10, 4, 104, 106, 105, 8, + 10, 4, 106, 0, 105, 8, 10, 4, 103, 102, 106, 3, 10, 4, 102, 0, 106, 3, 10, 4, 106, 107, 103, 3, + 10, 4, 105, 106, 102, 0, 10, 4, 102, 101, 105, 0, // 254 + 1, 12, 8, 100, 101, 102, 103, 104, 105, 106, 107, // 255 + // vtkm::CELL_SHAPE_WEDGE + 0, // 0 + 1, 10, 4, 0, 2, 100, 6, // 1 + 1, 10, 4, 101, 1, 0, 7, // 2 + 3, 10, 4, 1, 6, 101, 7, 10, 4, 1, 2, 100, 6, 10, 4, 101, 1, 100, 6, // 3 + 1, 10, 4, 102, 2, 1, 8, // 4 + 3, 10, 4, 102, 6, 1, 8, 10, 4, 100, 1, 102, 6, 10, 4, 100, 0, 1, 6, // 5 + 3, 10, 4, 2, 7, 102, 8, 10, 4, 102, 2, 0, 7, 10, 4, 102, 0, 101, 7, // 6 + 3, 10, 4, 6, 7, 102, 8, 10, 4, 102, 6, 101, 7, 10, 4, 101, 102, 100, 6, // 7 + 1, 10, 4, 103, 5, 3, 6, // 8 + 3, 10, 4, 103, 3, 2, 5, 10, 4, 0, 2, 103, 3, 10, 4, 103, 0, 100, 2, // 9 + 6, 10, 4, 1, 5, 3, 7, 10, 4, 101, 1, 0, 7, 10, 4, 1, 3, 0, 7, 10, 4, 3, 5, 1, 6, 10, 4, 103, 5, 3, + 6, 10, 4, 0, 3, 1, 6, // 10 + 7, 10, 4, 1, 5, 3, 7, 10, 4, 100, 101, 1, 7, 10, 4, 100, 1, 3, 7, 10, 4, 103, 3, 1, 5, 10, 4, 1, + 2, 103, 5, 10, 4, 100, 1, 103, 3, 10, 4, 103, 1, 100, 2, // 11 + 6, 10, 4, 102, 2, 1, 8, 10, 4, 2, 5, 1, 8, 10, 4, 1, 5, 3, 8, 10, 4, 1, 5, 2, 6, 10, 4, 3, 5, 1, + 6, 10, 4, 103, 5, 3, 6, // 12 + 7, 10, 4, 102, 100, 1, 8, 10, 4, 100, 5, 1, 8, 10, 4, 1, 5, 3, 8, 10, 4, 103, 1, 100, 5, 10, 4, + 103, 3, 1, 5, 10, 4, 0, 1, 103, 3, 10, 4, 103, 0, 100, 1, // 13 + 9, 10, 4, 102, 2, 7, 8, 10, 4, 5, 7, 2, 8, 10, 4, 2, 5, 3, 7, 10, 4, 102, 2, 0, 7, 10, 4, 2, 3, 0, + 7, 10, 4, 101, 102, 0, 7, 10, 4, 3, 5, 2, 6, 10, 4, 103, 5, 3, 6, 10, 4, 0, 3, 2, 6, // 14 + 5, 10, 4, 102, 100, 7, 8, 10, 4, 5, 7, 100, 8, 10, 4, 100, 5, 3, 7, 10, 4, 101, 102, 100, 7, 10, + 4, 103, 3, 100, 5, // 15 + 1, 10, 4, 3, 4, 104, 7, // 16 + 6, 10, 4, 2, 4, 0, 7, 10, 4, 104, 3, 4, 7, 10, 4, 0, 4, 3, 7, 10, 4, 0, 2, 100, 6, 10, 4, 2, 0, 4, + 6, 10, 4, 3, 4, 0, 6, // 17 + 3, 10, 4, 1, 3, 104, 4, 10, 4, 104, 1, 0, 3, 10, 4, 101, 0, 104, 1, // 18 + 7, 10, 4, 100, 101, 1, 6, 10, 4, 101, 3, 1, 6, 10, 4, 1, 2, 100, 6, 10, 4, 2, 1, 4, 6, 10, 4, 3, + 4, 1, 6, 10, 4, 1, 3, 104, 4, 10, 4, 104, 1, 101, 3, // 19 + 7, 10, 4, 3, 4, 2, 8, 10, 4, 102, 2, 1, 8, 10, 4, 2, 4, 1, 8, 10, 4, 1, 3, 2, 7, 10, 4, 3, 4, 104, + 7, 10, 4, 1, 4, 3, 7, 10, 4, 2, 3, 1, 4, // 20 + 9, 10, 4, 1, 6, 4, 8, 10, 4, 102, 6, 1, 8, 10, 4, 1, 3, 0, 7, 10, 4, 3, 4, 104, 7, 10, 4, 1, 4, 3, + 7, 10, 4, 102, 100, 1, 6, 10, 4, 0, 1, 100, 6, 10, 4, 0, 3, 1, 6, 10, 4, 3, 4, 1, 6, // 21 + 7, 10, 4, 3, 4, 2, 8, 10, 4, 2, 4, 102, 8, 10, 4, 104, 0, 3, 4, 10, 4, 2, 3, 0, 4, 10, 4, 102, 2, + 0, 4, 10, 4, 101, 102, 0, 4, 10, 4, 101, 0, 104, 4, // 22 + 6, 10, 4, 102, 6, 4, 8, 10, 4, 100, 4, 102, 6, 10, 4, 101, 3, 4, 6, 10, 4, 101, 4, 100, 6, 10, 4, + 101, 102, 100, 4, 10, 4, 101, 3, 104, 4, // 23 + 3, 10, 4, 104, 6, 4, 7, 10, 4, 103, 4, 104, 6, 10, 4, 103, 5, 4, 6, // 24 + 6, 10, 4, 2, 4, 0, 7, 10, 4, 104, 103, 4, 7, 10, 4, 0, 4, 103, 7, 10, 4, 103, 4, 2, 5, 10, 4, 0, + 2, 103, 4, 10, 4, 103, 0, 100, 2, // 25 + 7, 10, 4, 4, 5, 1, 6, 10, 4, 103, 5, 4, 6, 10, 4, 0, 4, 1, 6, 10, 4, 104, 103, 4, 6, 10, 4, 104, + 4, 0, 6, 10, 4, 104, 1, 0, 4, 10, 4, 101, 0, 104, 1, // 26 + 6, 10, 4, 103, 4, 2, 5, 10, 4, 104, 1, 103, 4, 10, 4, 1, 2, 103, 4, 10, 4, 103, 1, 100, 2, 10, 4, + 100, 103, 101, 1, 10, 4, 103, 104, 101, 1, // 27 + 9, 10, 4, 2, 5, 4, 8, 10, 4, 102, 2, 1, 8, 10, 4, 2, 4, 1, 8, 10, 4, 4, 6, 1, 7, 10, 4, 104, 6, 4, + 7, 10, 4, 4, 5, 2, 6, 10, 4, 103, 5, 4, 6, 10, 4, 1, 4, 2, 6, 10, 4, 104, 103, 4, 6, // 28 + 10, 10, 4, 102, 100, 1, 8, 10, 4, 100, 5, 1, 8, 10, 4, 1, 5, 4, 8, 10, 4, 104, 103, 4, 7, 10, 4, + 0, 4, 103, 7, 10, 4, 1, 4, 0, 7, 10, 4, 103, 4, 1, 5, 10, 4, 103, 1, 100, 5, 10, 4, 0, 1, 103, 4, + 10, 4, 103, 0, 100, 1, // 29 + 10, 10, 4, 102, 2, 4, 8, 10, 4, 2, 5, 4, 8, 10, 4, 4, 5, 2, 6, 10, 4, 103, 5, 4, 6, 10, 4, 0, 4, + 2, 6, 10, 4, 104, 103, 4, 6, 10, 4, 104, 4, 0, 6, 10, 4, 102, 2, 0, 4, 10, 4, 101, 0, 104, 4, 10, + 4, 102, 0, 101, 4, // 30 + 6, 10, 4, 102, 100, 4, 8, 10, 4, 100, 5, 4, 8, 10, 4, 103, 4, 100, 5, 10, 4, 101, 102, 100, 4, 10, + 4, 101, 100, 103, 4, 10, 4, 103, 104, 101, 4, // 31 + 1, 10, 4, 4, 5, 105, 8, // 32 + 6, 10, 4, 2, 4, 0, 8, 10, 4, 105, 4, 5, 8, 10, 4, 2, 5, 4, 8, 10, 4, 0, 2, 100, 6, 10, 4, 0, 4, 2, + 6, 10, 4, 4, 5, 2, 6, // 33 + 7, 10, 4, 0, 5, 1, 8, 10, 4, 4, 5, 105, 8, 10, 4, 1, 5, 4, 8, 10, 4, 101, 1, 0, 7, 10, 4, 1, 4, 0, + 7, 10, 4, 4, 5, 0, 7, 10, 4, 0, 4, 1, 5, // 34 + 9, 10, 4, 2, 4, 1, 8, 10, 4, 105, 4, 5, 8, 10, 4, 2, 5, 4, 8, 10, 4, 101, 1, 6, 7, 10, 4, 4, 6, 1, + 7, 10, 4, 100, 101, 1, 6, 10, 4, 1, 2, 100, 6, 10, 4, 1, 4, 2, 6, 10, 4, 4, 5, 2, 6, // 35 + 3, 10, 4, 2, 4, 105, 5, 10, 4, 105, 2, 1, 4, 10, 4, 102, 1, 105, 2, // 36 + 7, 10, 4, 0, 1, 100, 6, 10, 4, 0, 4, 1, 6, 10, 4, 4, 5, 1, 6, 10, 4, 102, 100, 1, 6, 10, 4, 102, + 1, 5, 6, 10, 4, 105, 1, 4, 5, 10, 4, 102, 1, 105, 5, // 37 + 7, 10, 4, 4, 5, 0, 7, 10, 4, 101, 4, 0, 7, 10, 4, 105, 2, 4, 5, 10, 4, 0, 4, 2, 5, 10, 4, 102, + 105, 2, 4, 10, 4, 102, 2, 0, 4, 10, 4, 101, 102, 0, 4, // 38 + 6, 10, 4, 4, 6, 101, 7, 10, 4, 101, 4, 100, 6, 10, 4, 102, 100, 4, 6, 10, 4, 102, 4, 5, 6, 10, 4, + 102, 4, 105, 5, 10, 4, 101, 102, 100, 4, // 39 + 3, 10, 4, 4, 6, 105, 8, 10, 4, 103, 4, 3, 6, 10, 4, 105, 4, 103, 6, // 40 + 7, 10, 4, 2, 4, 0, 8, 10, 4, 103, 4, 2, 8, 10, 4, 105, 4, 103, 8, 10, 4, 103, 3, 2, 4, 10, 4, 2, + 3, 0, 4, 10, 4, 0, 2, 103, 3, 10, 4, 100, 103, 0, 2, // 41 + 9, 10, 4, 4, 6, 105, 8, 10, 4, 1, 6, 4, 8, 10, 4, 1, 4, 3, 7, 10, 4, 101, 1, 0, 7, 10, 4, 1, 3, 0, + 7, 10, 4, 103, 105, 4, 6, 10, 4, 3, 4, 1, 6, 10, 4, 103, 4, 3, 6, 10, 4, 0, 3, 1, 6, // 42 + 10, 10, 4, 2, 4, 1, 8, 10, 4, 103, 4, 2, 8, 10, 4, 105, 4, 103, 8, 10, 4, 1, 4, 3, 7, 10, 4, 100, + 101, 1, 7, 10, 4, 100, 1, 3, 7, 10, 4, 1, 2, 103, 4, 10, 4, 103, 3, 1, 4, 10, 4, 100, 1, 103, 3, + 10, 4, 100, 103, 1, 2, // 43 + 7, 10, 4, 105, 2, 4, 6, 10, 4, 105, 4, 103, 6, 10, 4, 1, 4, 2, 6, 10, 4, 3, 4, 1, 6, 10, 4, 103, + 4, 3, 6, 10, 4, 105, 2, 1, 4, 10, 4, 102, 1, 105, 2, // 44 + 6, 10, 4, 103, 1, 105, 4, 10, 4, 103, 3, 1, 4, 10, 4, 0, 1, 103, 3, 10, 4, 102, 105, 103, 1, 10, + 4, 102, 103, 100, 1, 10, 4, 103, 0, 100, 1, // 45 + 10, 10, 4, 0, 101, 4, 7, 10, 4, 0, 4, 3, 7, 10, 4, 2, 0, 4, 6, 10, 4, 3, 4, 0, 6, 10, 4, 105, 2, + 4, 6, 10, 4, 105, 4, 103, 6, 10, 4, 103, 4, 3, 6, 10, 4, 102, 105, 2, 4, 10, 4, 102, 2, 0, 4, 10, + 4, 102, 0, 101, 4, // 46 + 6, 10, 4, 100, 4, 3, 7, 10, 4, 101, 4, 100, 7, 10, 4, 101, 102, 100, 4, 10, 4, 102, 103, 100, 4, + 10, 4, 103, 3, 100, 4, 10, 4, 102, 105, 103, 4, // 47 + 3, 10, 4, 105, 7, 5, 8, 10, 4, 3, 5, 105, 7, 10, 4, 104, 3, 105, 7, // 48 + 9, 10, 4, 2, 5, 7, 8, 10, 4, 105, 7, 5, 8, 10, 4, 105, 104, 3, 7, 10, 4, 3, 5, 105, 7, 10, 4, 2, + 5, 3, 7, 10, 4, 2, 3, 0, 7, 10, 4, 100, 0, 2, 6, 10, 4, 0, 3, 2, 6, 10, 4, 3, 5, 2, 6, // 49 + 7, 10, 4, 0, 5, 1, 8, 10, 4, 1, 5, 105, 8, 10, 4, 1, 3, 105, 5, 10, 4, 0, 3, 1, 5, 10, 4, 104, + 105, 1, 3, 10, 4, 104, 1, 0, 3, 10, 4, 104, 101, 0, 1, // 50 + 10, 10, 4, 105, 1, 5, 8, 10, 4, 2, 5, 1, 8, 10, 4, 2, 1, 5, 6, 10, 4, 3, 5, 1, 6, 10, 4, 100, 101, + 1, 6, 10, 4, 101, 3, 1, 6, 10, 4, 1, 2, 100, 6, 10, 4, 105, 1, 3, 5, 10, 4, 104, 1, 101, 3, 10, 4, + 105, 1, 104, 3, // 51 + 7, 10, 4, 1, 3, 2, 7, 10, 4, 104, 3, 1, 7, 10, 4, 105, 2, 1, 5, 10, 4, 105, 1, 3, 5, 10, 4, 2, 3, + 1, 5, 10, 4, 105, 1, 104, 3, 10, 4, 102, 1, 105, 2, // 52 + 10, 10, 4, 1, 3, 0, 7, 10, 4, 104, 3, 1, 7, 10, 4, 100, 1, 102, 6, 10, 4, 1, 5, 102, 6, 10, 4, + 100, 0, 1, 6, 10, 4, 0, 3, 1, 6, 10, 4, 3, 5, 1, 6, 10, 4, 1, 3, 105, 5, 10, 4, 102, 1, 105, 5, + 10, 4, 104, 105, 1, 3, // 53 + 6, 10, 4, 2, 3, 105, 5, 10, 4, 105, 2, 0, 3, 10, 4, 105, 0, 104, 3, 10, 4, 102, 0, 105, 2, 10, 4, + 104, 105, 102, 0, 10, 4, 101, 104, 102, 0, // 54 + 6, 10, 4, 101, 102, 100, 6, 10, 4, 101, 3, 102, 6, 10, 4, 3, 5, 102, 6, 10, 4, 102, 3, 105, 5, 10, + 4, 101, 104, 102, 3, 10, 4, 104, 105, 102, 3, // 55 + 3, 10, 4, 105, 7, 6, 8, 10, 4, 104, 6, 105, 7, 10, 4, 103, 105, 104, 6, // 56 + 5, 10, 4, 103, 105, 7, 8, 10, 4, 103, 7, 2, 8, 10, 4, 103, 105, 104, 7, 10, 4, 103, 0, 2, 7, 10, + 4, 103, 0, 100, 2, // 57 + 6, 10, 4, 1, 6, 105, 8, 10, 4, 105, 1, 103, 6, 10, 4, 104, 1, 0, 6, 10, 4, 103, 1, 104, 6, 10, 4, + 103, 105, 104, 1, 10, 4, 104, 101, 0, 1, // 58 + 6, 10, 4, 105, 1, 103, 8, 10, 4, 1, 2, 103, 8, 10, 4, 100, 103, 1, 2, 10, 4, 100, 103, 101, 1, 10, + 4, 103, 104, 101, 1, 10, 4, 103, 105, 104, 1, // 59 + 6, 10, 4, 104, 6, 1, 7, 10, 4, 103, 105, 1, 6, 10, 4, 105, 2, 1, 6, 10, 4, 103, 1, 104, 6, 10, 4, + 102, 1, 105, 2, 10, 4, 103, 105, 104, 1, // 60 + 6, 10, 4, 103, 0, 1, 7, 10, 4, 103, 1, 104, 7, 10, 4, 103, 105, 104, 1, 10, 4, 102, 103, 100, 1, + 10, 4, 103, 0, 100, 1, 10, 4, 103, 102, 105, 1, // 61 + 6, 10, 4, 105, 2, 0, 6, 10, 4, 103, 105, 104, 6, 10, 4, 105, 0, 104, 6, 10, 4, 102, 0, 105, 2, 10, + 4, 104, 105, 102, 0, 10, 4, 102, 101, 104, 0, // 62 + 1, 13, 6, 100, 101, 102, 103, 104, 105, // 63 + // vtkm::CELL_SHAPE_PYRAMID + 0, // 0 + 1, 10, 4, 0, 3, 100, 4, // 1 + 1, 10, 4, 101, 1, 0, 5, // 2 + 3, 10, 4, 1, 3, 100, 5, 10, 4, 3, 4, 100, 5, 10, 4, 101, 1, 100, 5, // 3 + 1, 10, 4, 102, 2, 1, 6, // 4 + 5, 10, 4, 102, 2, 1, 6, 10, 4, 2, 3, 0, 6, 10, 4, 3, 4, 0, 6, 10, 4, 1, 2, 0, 6, 10, 4, 100, 0, 3, + 4, // 5 + 3, 10, 4, 102, 2, 0, 6, 10, 4, 102, 0, 101, 6, 10, 4, 0, 5, 101, 6, // 6 + 6, 10, 4, 102, 2, 101, 6, 10, 4, 2, 3, 101, 6, 10, 4, 3, 5, 101, 6, 10, 4, 4, 5, 3, 6, 10, 4, 101, + 3, 100, 5, 10, 4, 3, 4, 100, 5, // 7 + 1, 10, 4, 103, 3, 2, 7, // 8 + 3, 10, 4, 100, 0, 103, 7, 10, 4, 100, 4, 0, 7, 10, 4, 0, 2, 103, 7, // 9 + 5, 10, 4, 103, 3, 2, 7, 10, 4, 3, 5, 2, 7, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, 0, 5, 10, 4, 101, 1, 0, + 5, // 10 + 5, 10, 4, 100, 2, 103, 7, 10, 4, 2, 100, 5, 7, 10, 4, 4, 5, 100, 7, 10, 4, 1, 2, 100, 5, 10, 4, + 101, 1, 100, 5, // 11 + 3, 10, 4, 3, 6, 103, 7, 10, 4, 103, 3, 1, 6, 10, 4, 103, 1, 102, 6, // 12 + 6, 10, 4, 100, 4, 6, 7, 10, 4, 100, 6, 103, 7, 10, 4, 103, 1, 102, 6, 10, 4, 100, 0, 103, 6, 10, + 4, 100, 4, 0, 6, 10, 4, 0, 1, 103, 6, // 13 + 7, 10, 4, 3, 6, 103, 7, 10, 4, 5, 6, 3, 7, 10, 4, 103, 3, 102, 6, 10, 4, 102, 3, 0, 6, 10, 4, 3, + 5, 0, 6, 10, 4, 102, 0, 101, 6, 10, 4, 0, 5, 101, 6, // 14 + 6, 10, 4, 103, 100, 6, 7, 10, 4, 4, 6, 100, 7, 10, 4, 4, 5, 100, 6, 10, 4, 102, 103, 100, 6, 10, + 4, 101, 102, 100, 6, 10, 4, 101, 100, 5, 6, // 15 + 2, 10, 4, 104, 6, 4, 7, 10, 4, 104, 5, 4, 6, // 16 + 6, 10, 4, 5, 6, 3, 7, 10, 4, 104, 6, 5, 7, 10, 4, 100, 5, 3, 7, 10, 4, 104, 5, 100, 7, 10, 4, 3, + 5, 0, 6, 10, 4, 0, 3, 100, 5, // 17 + 6, 10, 4, 104, 6, 4, 7, 10, 4, 0, 6, 1, 7, 10, 4, 4, 6, 0, 7, 10, 4, 104, 0, 4, 6, 10, 4, 101, 0, + 104, 6, 10, 4, 101, 1, 0, 6, // 18 + 5, 10, 4, 100, 104, 6, 7, 10, 4, 100, 6, 3, 7, 10, 4, 100, 1, 3, 6, 10, 4, 100, 104, 101, 6, 10, + 4, 100, 101, 1, 6, // 19 + 6, 10, 4, 4, 5, 2, 7, 10, 4, 104, 5, 4, 7, 10, 4, 102, 2, 5, 7, 10, 4, 102, 5, 104, 7, 10, 4, 2, + 4, 1, 5, 10, 4, 102, 2, 1, 5, // 20 + 9, 10, 4, 3, 5, 2, 7, 10, 4, 100, 5, 3, 7, 10, 4, 104, 5, 100, 7, 10, 4, 104, 102, 5, 7, 10, 4, 2, + 5, 102, 7, 10, 4, 0, 3, 100, 5, 10, 4, 2, 3, 0, 5, 10, 4, 1, 2, 0, 5, 10, 4, 102, 2, 1, 5, // 21 + 5, 10, 4, 104, 0, 4, 7, 10, 4, 101, 104, 102, 7, 10, 4, 101, 102, 0, 7, 10, 4, 101, 0, 104, 7, 10, + 4, 102, 2, 0, 7, // 22 + 5, 10, 4, 101, 2, 3, 7, 10, 4, 101, 100, 104, 7, 10, 4, 101, 3, 100, 7, 10, 4, 101, 104, 102, 7, + 10, 4, 101, 102, 2, 7, // 23 + 6, 10, 4, 104, 5, 4, 6, 10, 4, 2, 3, 5, 6, 10, 4, 4, 5, 3, 6, 10, 4, 104, 4, 3, 6, 10, 4, 103, + 104, 3, 6, 10, 4, 103, 3, 2, 6, // 24 + 5, 10, 4, 103, 104, 100, 6, 10, 4, 104, 5, 100, 6, 10, 4, 103, 100, 0, 6, 10, 4, 100, 5, 0, 6, 10, + 4, 0, 2, 103, 6, // 25 + 9, 10, 4, 103, 3, 2, 6, 10, 4, 104, 3, 103, 6, 10, 4, 104, 4, 3, 6, 10, 4, 2, 3, 0, 6, 10, 4, 3, + 4, 0, 6, 10, 4, 1, 2, 0, 6, 10, 4, 104, 0, 4, 6, 10, 4, 101, 0, 104, 6, 10, 4, 101, 1, 0, 6, // 26 + 5, 10, 4, 1, 2, 100, 6, 10, 4, 103, 104, 100, 6, 10, 4, 103, 100, 2, 6, 10, 4, 101, 100, 104, 6, + 10, 4, 101, 1, 100, 6, // 27 + 5, 10, 4, 104, 4, 3, 5, 10, 4, 103, 104, 3, 5, 10, 4, 103, 3, 1, 5, 10, 4, 102, 104, 103, 5, 10, + 4, 102, 103, 1, 5, // 28 + 5, 10, 4, 103, 104, 100, 5, 10, 4, 103, 100, 0, 5, 10, 4, 0, 1, 103, 5, 10, 4, 102, 104, 103, 5, + 10, 4, 102, 103, 1, 5, // 29 + 5, 10, 4, 102, 0, 104, 4, 10, 4, 102, 104, 3, 4, 10, 4, 102, 3, 0, 4, 10, 4, 102, 104, 103, 3, 10, + 4, 102, 101, 104, 0, // 30 + 1, 14, 5, 100, 101, 102, 103, 104 // 31 }; // Index into ClipTablesData for each shape and configuration static vtkm::UInt16 ClipTablesIndices[] = { // vtkm::CELL_SHAPE_VERTEX - 0, 1, + 0, 1, // vtkm::CELL_SHAPE_LINE - 5, 6, 11, 16, + 5, 6, 11, 16, // vtkm::CELL_SHAPE_TRIANGLE - 21, 22, 28, 34, 45, 51, 62, 73, + 21, 22, 28, 34, 45, 51, 62, 73, // vtkm::CELL_SHAPE_QUAD - 79, 80, 86, 92, 99, 105, 122, 129, 145, 151, 158, - 175, 191, 198, 214, 230, + 79, 80, 86, 92, 99, 105, 122, 129, 145, 151, 158, 175, 191, 198, 214, 230, // vtkm::CELL_SHAPE_TETRA - 237, 238, 245, 252, 261, 268, 277, 286, 295, 302, 311, - 320, 329, 338, 347, 356, + 237, 238, 245, 252, 261, 268, 277, 286, 295, 302, 311, 320, 329, 338, 347, 356, // vtkm::CELL_SHAPE_HEXAHEDRON - 363, 364, 371, 378, 397, 404, 435, 454, 497, 504, 523, - 554, 597, 616, 659, 702, 739, 746, 765, 796, 839, 876, - 931, 992, 1059, 1090, 1133, 1194, 1237, 1298, 1365, 1456, 1517, - 1524, 1555, 1574, 1617, 1648, 1709, 1752, 1795, 1832, 1893, 1948, - 2015, 2076, 2161, 2228, 2289, 2308, 2351, 2394, 2431, 2492, 2577, - 2650, 2711, 2772, 2845, 2930, 2991, 3064, 3155, 3246, 3301, 3308, - 3345, 3376, 3437, 3456, 3511, 3554, 3621, 3652, 3713, 3774, 3847, - 3890, 3957, 4000, 4061, 4092, 4147, 4208, 4293, 4348, 4421, 4506, - 4591, 4652, 4737, 4846, 4937, 5022, 5107, 5198, 5277, 5296, 5357, - 5400, 5473, 5516, 5601, 5638, 5699, 5760, 5833, 5918, 6009, 6082, - 6173, 6234, 6289, 6332, 6399, 6442, 6503, 6570, 6655, 6716, 6771, - 6856, 6947, 7038, 7117, 7208, 7305, 7384, 7445, 7452, 7483, 7520, - 7581, 7612, 7673, 7734, 7819, 7838, 7881, 7936, 8003, 8046, 8089, - 8156, 8217, 8236, 8279, 8340, 8413, 8474, 8559, 8632, 8723, 8766, - 8803, 8888, 8949, 9022, 9083, 9174, 9229, 9260, 9321, 9376, 9461, - 9522, 9631, 9716, 9807, 9862, 9947, 10020, 10105, 10190, 10281, 10366, - 10445, 10488, 10531, 10598, 10659, 10732, 10823, 10914, 10993, 11060, 11121, - 11206, 11261, 11352, 11431, 11528, 11589, 11608, 11669, 11730, 11803, 11846, - 11931, 12004, 12095, 12138, 12211, 12296, 12387, 12424, 12485, 12546, 12601, - 12644, 12711, 12796, 12887, 12954, 13039, 13130, 13227, 13270, 13331, 13422, - 13501, 13562, 13617, 13696, 13757, 13800, 13891, 13958, 14049, 14092, 14183, - 14244, 14323, 14390, 14481, 14566, 14663, 14724, 14803, 14858, 14919, 14956, - 15017, 15078, 15133, 15194, 15273, 15328, 15389, 15450, 15505, 15584, 15645, - 15700, 15761, 15822, + 363, 364, 371, 378, 397, 404, 435, 454, 497, 504, 523, 554, 597, 616, 659, 702, 739, 746, 765, + 796, 839, 876, 931, 992, 1059, 1090, 1133, 1194, 1237, 1298, 1365, 1456, 1517, 1524, 1555, 1574, + 1617, 1648, 1709, 1752, 1795, 1832, 1893, 1948, 2015, 2076, 2161, 2228, 2289, 2308, 2351, 2394, + 2431, 2492, 2577, 2650, 2711, 2772, 2845, 2930, 2991, 3064, 3155, 3246, 3301, 3308, 3345, 3376, + 3437, 3456, 3511, 3554, 3621, 3652, 3713, 3774, 3847, 3890, 3957, 4000, 4061, 4092, 4147, 4208, + 4293, 4348, 4421, 4506, 4591, 4652, 4737, 4846, 4937, 5022, 5107, 5198, 5277, 5296, 5357, 5400, + 5473, 5516, 5601, 5638, 5699, 5760, 5833, 5918, 6009, 6082, 6173, 6234, 6289, 6332, 6399, 6442, + 6503, 6570, 6655, 6716, 6771, 6856, 6947, 7038, 7117, 7208, 7305, 7384, 7445, 7452, 7483, 7520, + 7581, 7612, 7673, 7734, 7819, 7838, 7881, 7936, 8003, 8046, 8089, 8156, 8217, 8236, 8279, 8340, + 8413, 8474, 8559, 8632, 8723, 8766, 8803, 8888, 8949, 9022, 9083, 9174, 9229, 9260, 9321, 9376, + 9461, 9522, 9631, 9716, 9807, 9862, 9947, 10020, 10105, 10190, 10281, 10366, 10445, 10488, 10531, + 10598, 10659, 10732, 10823, 10914, 10993, 11060, 11121, 11206, 11261, 11352, 11431, 11528, 11589, + 11608, 11669, 11730, 11803, 11846, 11931, 12004, 12095, 12138, 12211, 12296, 12387, 12424, 12485, + 12546, 12601, 12644, 12711, 12796, 12887, 12954, 13039, 13130, 13227, 13270, 13331, 13422, 13501, + 13562, 13617, 13696, 13757, 13800, 13891, 13958, 14049, 14092, 14183, 14244, 14323, 14390, 14481, + 14566, 14663, 14724, 14803, 14858, 14919, 14956, 15017, 15078, 15133, 15194, 15273, 15328, 15389, + 15450, 15505, 15584, 15645, 15700, 15761, 15822, // vtkm::CELL_SHAPE_WEDGE - 15833, 15834, 15841, 15848, 15867, 15874, 15893, 15912, 15931, 15938, 15957, - 15994, 16037, 16074, 16117, 16172, 16203, 16210, 16247, 16266, 16309, 16352, - 16407, 16450, 16487, 16506, 16543, 16586, 16623, 16678, 16739, 16800, 16837, - 16844, 16881, 16924, 16979, 16998, 17041, 17084, 17121, 17140, 17183, 17238, - 17299, 17342, 17379, 17440, 17477, 17496, 17551, 17594, 17655, 17698, 17759, - 17796, 17833, 17852, 17883, 17920, 17957, 17994, 18031, 18068, + 15833, 15834, 15841, 15848, 15867, 15874, 15893, 15912, 15931, 15938, 15957, 15994, 16037, 16074, + 16117, 16172, 16203, 16210, 16247, 16266, 16309, 16352, 16407, 16450, 16487, 16506, 16543, 16586, + 16623, 16678, 16739, 16800, 16837, 16844, 16881, 16924, 16979, 16998, 17041, 17084, 17121, 17140, + 17183, 17238, 17299, 17342, 17379, 17440, 17477, 17496, 17551, 17594, 17655, 17698, 17759, 17796, + 17833, 17852, 17883, 17920, 17957, 17994, 18031, 18068, // vtkm::CELL_SHAPE_PYRAMID - 18077, 18078, 18085, 18092, 18111, 18118, 18149, 18168, 18205, 18212, 18231, - 18262, 18293, 18312, 18349, 18392, 18429, 18442, 18479, 18516, 18547, 18584, - 18639, 18670, 18701, 18738, 18769, 18824, 18855, 18886, 18917, 18948 + 18077, 18078, 18085, 18092, 18111, 18118, 18149, 18168, 18205, 18212, 18231, 18262, 18293, 18312, + 18349, 18392, 18429, 18442, 18479, 18516, 18547, 18584, 18639, 18670, 18701, 18738, 18769, 18824, + 18855, 18886, 18917, 18948 }; -enum { - CLIP_TABLES_DATA_SIZE = sizeof(ClipTablesData)/sizeof(ClipTablesData[0]), - CLIP_TABLES_INDICES_SIZE = sizeof(ClipTablesIndices)/sizeof(ClipTablesIndices[0]), +enum +{ + CLIP_TABLES_DATA_SIZE = sizeof(ClipTablesData) / sizeof(ClipTablesData[0]), + CLIP_TABLES_INDICES_SIZE = sizeof(ClipTablesIndices) / sizeof(ClipTablesIndices[0]), MAX_CELL_EDGES = 12, // Hexahedron CELL_EDGES_SIZE = vtkm::NUMBER_OF_CELL_SHAPES * MAX_CELL_EDGES * 2 }; #define X 255 static vtkm::UInt8 CellEdges[CELL_EDGES_SIZE] = { - X, X, X, X, X, X, X, X, X, X, X, X, - X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_EMPTY_CELL - X, X, X, X, X, X, X, X, X, X, X, X, - X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_VERTEX - X, X, X, X, X, X, X, X, X, X, X, X, - X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_POLY_VERTEX - 0, 1, X, X, X, X, X, X, X, X, X, X, - X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_LINE - X, X, X, X, X, X, X, X, X, X, X, X, - X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_POLY_LINE - 0, 1, 1, 2, 2, 0, X, X, X, X, X, X, - X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_TRIANGLE - X, X, X, X, X, X, X, X, X, X, X, X, - X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_TRIANGLE_STRIP - X, X, X, X, X, X, X, X, X, X, X, X, - X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_POLYGON - X, X, X, X, X, X, X, X, X, X, X, X, - X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_PIXEL - 0, 1, 1, 2, 3, 2, 0, 3, X, X, X, X, - X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_QUAD - 0, 1, 1, 2, 2, 0, 0, 3, 1, 3, 2, 3, - X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_TETRA - X, X, X, X, X, X, X, X, X, X, X, X, - X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_VOXEL - 0, 1, 1, 2, 3, 2, 0, 3, 4, 5, 5, 6, - 7, 6, 4, 7, 0, 4, 1, 5, 3, 7, 2, 6, // vtkm::CELL_SHAPE_HEXAHEDRON - 0, 1, 1, 2, 2, 0, 3, 4, 4, 5, 5, 3, - 0, 3, 1, 4, 2, 5, X, X, X, X, X, X, // vtkm::CELL_SHAPE_WEDGE - 0, 1, 1, 2, 2, 3, 3, 0, 0, 4, 1, 4, - 2, 4, 3, 4, X, X, X, X, X, X, X, X // vtkm::CELL_SHAPE_PYRAMID + X, X, X, X, X, X, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_EMPTY_CELL + X, X, X, X, X, X, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_VERTEX + X, X, X, X, X, X, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_POLY_VERTEX + 0, 1, X, X, X, X, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_LINE + X, X, X, X, X, X, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_POLY_LINE + 0, 1, 1, 2, 2, 0, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_TRIANGLE + X, X, X, X, X, X, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_TRIANGLE_STRIP + X, X, X, X, X, X, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_POLYGON + X, X, X, X, X, X, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_PIXEL + 0, 1, 1, 2, 3, 2, 0, 3, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_QUAD + 0, 1, 1, 2, 2, 0, 0, 3, 1, 3, 2, 3, + X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_TETRA + X, X, X, X, X, X, X, X, X, X, X, X, + X, X, X, X, X, X, X, X, X, X, X, X, // vtkm::CELL_SHAPE_VOXEL + 0, 1, 1, 2, 3, 2, 0, 3, 4, 5, 5, 6, + 7, 6, 4, 7, 0, 4, 1, 5, 3, 7, 2, 6, // vtkm::CELL_SHAPE_HEXAHEDRON + 0, 1, 1, 2, 2, 0, 3, 4, 4, 5, 5, 3, + 0, 3, 1, 4, 2, 5, X, X, X, X, X, X, // vtkm::CELL_SHAPE_WEDGE + 0, 1, 1, 2, 2, 3, 3, 0, 0, 4, 1, 4, + 2, 4, 3, 4, X, X, X, X, X, X, X, X // vtkm::CELL_SHAPE_PYRAMID }; #undef X // index into ClipTablesIndices for each shape VTKM_EXEC_CONSTANT static vtkm::Int16 CellIndexLookup[vtkm::NUMBER_OF_CELL_SHAPES] = { - -1, // 0 = vtkm::CELL_SHAPE_EMPTY_CELL - 0, // 1 = vtkm::CELL_SHAPE_VERTEX - -1, // 2 = vtkm::CELL_SHAPE_POLY_VERTEX - 2, // 3 = vtkm::CELL_SHAPE_LINE - -1, // 4 = vtkm::CELL_SHAPE_POLY_LINE - 6, // 5 = vtkm::CELL_SHAPE_TRIANGLE - -1, // 6 = vtkm::CELL_SHAPE_TRIANGLE_STRIP - -1, // 7 = vtkm::CELL_SHAPE_POLYGON - -1, // 8 = vtkm::CELL_SHAPE_PIXEL - 14, // 9 = vtkm::CELL_SHAPE_QUAD - 30, // 10 = vtkm::CELL_SHAPE_TETRA - -1, // 11 = vtkm::CELL_SHAPE_VOXEL - 46, // 12 = vtkm::CELL_SHAPE_HEXAHEDRON + -1, // 0 = vtkm::CELL_SHAPE_EMPTY_CELL + 0, // 1 = vtkm::CELL_SHAPE_VERTEX + -1, // 2 = vtkm::CELL_SHAPE_POLY_VERTEX + 2, // 3 = vtkm::CELL_SHAPE_LINE + -1, // 4 = vtkm::CELL_SHAPE_POLY_LINE + 6, // 5 = vtkm::CELL_SHAPE_TRIANGLE + -1, // 6 = vtkm::CELL_SHAPE_TRIANGLE_STRIP + -1, // 7 = vtkm::CELL_SHAPE_POLYGON + -1, // 8 = vtkm::CELL_SHAPE_PIXEL + 14, // 9 = vtkm::CELL_SHAPE_QUAD + 30, // 10 = vtkm::CELL_SHAPE_TETRA + -1, // 11 = vtkm::CELL_SHAPE_VOXEL + 46, // 12 = vtkm::CELL_SHAPE_HEXAHEDRON 302, // 13 = vtkm::CELL_SHAPE_WEDGE 366 // 14 = vtkm::CELL_SHAPE_PYRAMID }; - class ClipTables { public: typedef vtkm::Vec EdgeVec; - template + template class DevicePortal { public: @@ -1689,10 +1117,7 @@ public: } VTKM_EXEC - vtkm::UInt8 ValueAt(vtkm::Id idx) const - { - return this->ClipTablesDataPortal.Get(idx); - } + vtkm::UInt8 ValueAt(vtkm::Id idx) const { return this->ClipTablesDataPortal.Get(idx); } VTKM_EXEC EdgeVec GetEdge(vtkm::Id shape, vtkm::Id edgeId) const @@ -1704,36 +1129,30 @@ public: } private: - typename - vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst - ClipTablesDataPortal; - typename - vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst - ClipTablesIndicesPortal; - typename - vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst - CellEdgesPortal; + typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst + ClipTablesDataPortal; + typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst + ClipTablesIndicesPortal; + typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst + CellEdgesPortal; friend class ClipTables; }; ClipTables() - : ClipTablesDataArray(vtkm::cont::make_ArrayHandle(ClipTablesData, - CLIP_TABLES_DATA_SIZE)), - ClipTablesIndicesArray(vtkm::cont::make_ArrayHandle(ClipTablesIndices, - CLIP_TABLES_INDICES_SIZE)), - CellEdgesArray(vtkm::cont::make_ArrayHandle(CellEdges, CELL_EDGES_SIZE)) + : ClipTablesDataArray(vtkm::cont::make_ArrayHandle(ClipTablesData, CLIP_TABLES_DATA_SIZE)) + , ClipTablesIndicesArray( + vtkm::cont::make_ArrayHandle(ClipTablesIndices, CLIP_TABLES_INDICES_SIZE)) + , CellEdgesArray(vtkm::cont::make_ArrayHandle(CellEdges, CELL_EDGES_SIZE)) { } - template + template DevicePortal GetDevicePortal(DeviceAdapter) { DevicePortal portal; - portal.ClipTablesDataPortal = - this->ClipTablesDataArray.PrepareForInput(DeviceAdapter()); - portal.ClipTablesIndicesPortal = - this->ClipTablesIndicesArray.PrepareForInput(DeviceAdapter()); + portal.ClipTablesDataPortal = this->ClipTablesDataArray.PrepareForInput(DeviceAdapter()); + portal.ClipTablesIndicesPortal = this->ClipTablesIndicesArray.PrepareForInput(DeviceAdapter()); portal.CellEdgesPortal = this->CellEdgesArray.PrepareForInput(DeviceAdapter()); return portal; } @@ -1743,7 +1162,6 @@ private: vtkm::cont::ArrayHandle ClipTablesIndicesArray; vtkm::cont::ArrayHandle CellEdgesArray; }; - } } } // namespace vtkm::worklet::internal diff --git a/vtkm/worklet/internal/DispatcherBase.h b/vtkm/worklet/internal/DispatcherBase.h index 1e9498d67..f13b70964 100644 --- a/vtkm/worklet/internal/DispatcherBase.h +++ b/vtkm/worklet/internal/DispatcherBase.h @@ -41,11 +41,15 @@ #include -namespace vtkm { -namespace worklet { -namespace internal { +namespace vtkm +{ +namespace worklet +{ +namespace internal +{ -namespace detail { +namespace detail +{ // This code is actually taking an error found at compile-time and not // reporting it until run-time. This seems strange at first, but this @@ -55,50 +59,49 @@ namespace detail { // these unsupported combinations we just silently halt the compiler from // attempting to create code for these errant conditions and throw a run-time // error if one every tries to create one. -inline void PrintFailureMessage(int, std::true_type) {} +inline void PrintFailureMessage(int, std::true_type) +{ +} inline void PrintFailureMessage(int index, std::false_type) { std::stringstream message; - message << "Encountered bad type for parameter " - << index + message << "Encountered bad type for parameter " << index << " when calling Invoke on a dispatcher."; throw vtkm::cont::ErrorBadType(message.str()); } // Is designed as a brigand fold operation. -template +template struct DetermineIfHasDynamicParameter { using DynamicTag = typename vtkm::cont::internal::DynamicTransformTraits::DynamicTag; - using isDynamic = typename std::is_same< - DynamicTag, - vtkm::cont::internal::DynamicTransformTagCastAndCall>::type; + using isDynamic = + typename std::is_same::type; - using type = std::integral_constant; + using type = std::integral_constant; }; // Is designed as a brigand fold operation. template struct DetermineHasInCorrectParameters { - using T = typename brigand::at_c; - using ControlSignatureTag = typename brigand::at_c; - using TypeCheckTag = typename ControlSignatureTag::TypeCheckTag; + using T = typename brigand::at_c; + using ControlSignatureTag = typename brigand::at_c; + using TypeCheckTag = typename ControlSignatureTag::TypeCheckTag; - using type = std::integral_constant< bool, - vtkm::cont::arg::TypeCheck::value >; + using type = std::integral_constant::value>; - static_assert( type::value, - "Unable to match 'ValueType' to the signature tag 'ControlSignatureTag'"); + static_assert(type::value, + "Unable to match 'ValueType' to the signature tag 'ControlSignatureTag'"); }; // Checks that an argument in a ControlSignature is a valid control signature // tag. Causes a compile error otherwise. struct DispatcherBaseControlSignatureTagCheck { - template - struct ReturnType { + template + struct ReturnType + { // If you get a compile error here, it means there is something that is // not a valid control signature tag in a worklet's ControlSignature. VTKM_IS_CONTROL_SIGNATURE_TAG(ControlSignatureTag); @@ -110,8 +113,9 @@ struct DispatcherBaseControlSignatureTagCheck // signature tag. Causes a compile error otherwise. struct DispatcherBaseExecutionSignatureTagCheck { - template - struct ReturnType { + template + struct ReturnType + { // If you get a compile error here, it means there is something that is not // a valid execution signature tag in a worklet's ExecutionSignature. VTKM_IS_EXECUTION_SIGNATURE_TAG(ExecutionSignatureTag); @@ -121,66 +125,60 @@ struct DispatcherBaseExecutionSignatureTagCheck // Used in the dynamic cast to check to make sure that the type passed into // the Invoke method matches the type accepted by the ControlSignature. -template +template struct DispatcherBaseTypeCheckFunctor { - const ContinueFunctor &Continue; + const ContinueFunctor& Continue; VTKM_CONT - DispatcherBaseTypeCheckFunctor(const ContinueFunctor &continueFunc) - : Continue(continueFunc) { } - - template - VTKM_CONT - void operator()(const T &x) const + DispatcherBaseTypeCheckFunctor(const ContinueFunctor& continueFunc) + : Continue(continueFunc) { - typedef std::integral_constant::value> CanContinueTagType; + } - vtkm::worklet::internal::detail::PrintFailureMessage(Index,CanContinueTagType()); + template + VTKM_CONT void operator()(const T& x) const + { + typedef std::integral_constant::value> + CanContinueTagType; + + vtkm::worklet::internal::detail::PrintFailureMessage(Index, CanContinueTagType()); this->WillContinue(x, CanContinueTagType()); } private: - template - VTKM_CONT - void WillContinue(const T &x, std::true_type) const + template + VTKM_CONT void WillContinue(const T& x, std::true_type) const { this->Continue(x); } - template - VTKM_CONT - void WillContinue(const T&, std::false_type) const - { } + template + VTKM_CONT void WillContinue(const T&, std::false_type) const + { + } - void operator=(const DispatcherBaseTypeCheckFunctor &) = delete; + void operator=(const DispatcherBaseTypeCheckFunctor&) = + delete; }; // Uses vtkm::cont::internal::DynamicTransform and the DynamicTransformCont // method of FunctionInterface to convert all DynamicArrayHandles and any // other arguments declaring themselves as dynamic to static versions. -template +template struct DispatcherBaseDynamicTransform { vtkm::cont::internal::DynamicTransform BasicDynamicTransform; - template - VTKM_CONT - void operator()(const InputType &input, - const ContinueFunctor &continueFunc, - const vtkm::internal::IndexTag& indexTag) const + template + VTKM_CONT void operator()(const InputType& input, const ContinueFunctor& continueFunc, + const vtkm::internal::IndexTag& indexTag) const { - typedef typename ControlInterface::template ParameterType::type - ControlSignatureTag; + typedef typename ControlInterface::template ParameterType::type ControlSignatureTag; - typedef DispatcherBaseTypeCheckFunctor< - ContinueFunctor, typename ControlSignatureTag::TypeCheckTag, Index> - TypeCheckFunctor; + typedef DispatcherBaseTypeCheckFunctor + TypeCheckFunctor; this->BasicDynamicTransform(input, TypeCheckFunctor(continueFunc), indexTag); } @@ -188,53 +186,52 @@ struct DispatcherBaseDynamicTransform // A functor called at the end of the dynamic transform to call the next // step in the dynamic transform. -template +template struct DispatcherBaseDynamicTransformHelper { - const DispatcherBaseType *Dispatcher; + const DispatcherBaseType* Dispatcher; VTKM_CONT - DispatcherBaseDynamicTransformHelper(const DispatcherBaseType *dispatcher) - : Dispatcher(dispatcher) { } + DispatcherBaseDynamicTransformHelper(const DispatcherBaseType* dispatcher) + : Dispatcher(dispatcher) + { + } - template - VTKM_CONT - void operator()(const FunctionInterface ¶meters) const { - this->Dispatcher->DynamicTransformInvoke(parameters, std::true_type() ); + template + VTKM_CONT void operator()(const FunctionInterface& parameters) const + { + this->Dispatcher->DynamicTransformInvoke(parameters, std::true_type()); } }; // A look up helper used by DispatcherBaseTransportFunctor to determine //the types independent of the device we are templated on. -template +template struct DispatcherBaseTransportInvokeTypes { //Moved out of DispatcherBaseTransportFunctor to reduce code generation - typedef typename ControlInterface::template ParameterType::type - ControlSignatureTag; + typedef typename ControlInterface::template ParameterType::type ControlSignatureTag; typedef typename ControlSignatureTag::TransportTag TransportTag; }; VTKM_CONT -inline -vtkm::Id FlatRange(vtkm::Id range) +inline vtkm::Id FlatRange(vtkm::Id range) { return range; } VTKM_CONT -inline -vtkm::Id FlatRange(const vtkm::Id3 &range) +inline vtkm::Id FlatRange(const vtkm::Id3& range) { - return range[0]*range[1]*range[2]; + return range[0] * range[1] * range[2]; } // A functor used in a StaticCast of a FunctionInterface to transport arguments // from the control environment to the execution environment. -template +template struct DispatcherBaseTransportFunctor { - const InputDomainType &InputDomain; // Warning: this is a reference + const InputDomainType& InputDomain; // Warning: this is a reference vtkm::Id InputRange; vtkm::Id OutputRange; @@ -242,40 +239,38 @@ struct DispatcherBaseTransportFunctor // Chances are we need to allow the transport for each argument to manage // 3D indices (for example, allocate a 3D array instead of a 1D array). // But for now, just treat all transports as 1D arrays. - template - VTKM_CONT - DispatcherBaseTransportFunctor(const InputDomainType &inputDomain, - const InputRangeType &inputRange, - const OutputRangeType &outputRange) - : InputDomain(inputDomain), - InputRange(FlatRange(inputRange)), - OutputRange(FlatRange(outputRange)) - { } + template + VTKM_CONT DispatcherBaseTransportFunctor(const InputDomainType& inputDomain, + const InputRangeType& inputRange, + const OutputRangeType& outputRange) + : InputDomain(inputDomain) + , InputRange(FlatRange(inputRange)) + , OutputRange(FlatRange(outputRange)) + { + } - - template - struct ReturnType { - using TransportTag = typename DispatcherBaseTransportInvokeTypes::TransportTag; - using TransportType = typename vtkm::cont::arg::Transport; + template + struct ReturnType + { + using TransportTag = + typename DispatcherBaseTransportInvokeTypes::TransportTag; + using TransportType = + typename vtkm::cont::arg::Transport; using type = typename TransportType::ExecObjectType; }; - template - VTKM_CONT - typename ReturnType::type - operator()(const ControlParameter &invokeData, - vtkm::internal::IndexTag) const + template + VTKM_CONT typename ReturnType::type operator()( + const ControlParameter& invokeData, vtkm::internal::IndexTag) const { - using TransportTag = typename DispatcherBaseTransportInvokeTypes::TransportTag; - vtkm::cont::arg::Transport transport; - return transport(invokeData, - this->InputDomain, - this->InputRange, - this->OutputRange); + using TransportTag = + typename DispatcherBaseTransportInvokeTypes::TransportTag; + vtkm::cont::arg::Transport transport; + return transport(invokeData, this->InputDomain, this->InputRange, this->OutputRange); } private: - void operator=(const DispatcherBaseTransportFunctor &) = delete; + void operator=(const DispatcherBaseTransportFunctor&) = delete; }; } // namespace detail @@ -283,47 +278,40 @@ private: /// Base class for all dispatcher classes. Every worklet type should have its /// own dispatcher. /// -template +template class DispatcherBase { private: - typedef DispatcherBase MyType; + typedef DispatcherBase MyType; friend struct detail::DispatcherBaseDynamicTransformHelper; protected: - typedef vtkm::internal::FunctionInterface< - typename WorkletType::ControlSignature> ControlInterface; - typedef vtkm::internal::FunctionInterface< - typename WorkletType::ExecutionSignature> ExecutionInterface; + typedef vtkm::internal::FunctionInterface + ControlInterface; + typedef vtkm::internal::FunctionInterface + ExecutionInterface; static const vtkm::IdComponent NUM_INVOKE_PARAMS = ControlInterface::ARITY; private: // We don't really need these types, but declaring them checks the arguments // of the control and execution signatures. - typedef typename ControlInterface:: - template StaticTransformType< - detail::DispatcherBaseControlSignatureTagCheck>::type - ControlSignatureCheck; - typedef typename ExecutionInterface:: - template StaticTransformType< - detail::DispatcherBaseExecutionSignatureTagCheck>::type - ExecutionSignatureCheck; + typedef typename ControlInterface::template StaticTransformType< + detail::DispatcherBaseControlSignatureTagCheck>::type ControlSignatureCheck; + typedef typename ExecutionInterface::template StaticTransformType< + detail::DispatcherBaseExecutionSignatureTagCheck>::type ExecutionSignatureCheck; - template - VTKM_CONT - void StartInvoke( - const vtkm::internal::FunctionInterface ¶meters) const + template + VTKM_CONT void StartInvoke(const vtkm::internal::FunctionInterface& parameters) const { using ParameterInterface = vtkm::internal::FunctionInterface; VTKM_STATIC_ASSERT_MSG(ParameterInterface::ARITY == NUM_INVOKE_PARAMS, "Dispatcher Invoke called with wrong number of arguments."); - static_assert( std::is_base_of::value, + static_assert( + std::is_base_of::value, "The worklet being scheduled by this dispatcher doesn't match the type of the dispatcher"); //We need to determine if we have the need to do any dynamic @@ -334,22 +322,15 @@ private: //in smaller executables and libraries. using ParamTypes = typename ParameterInterface::ParameterSig; using HasDynamicTypes = - brigand::fold< ParamTypes, - std::false_type, - detail::DetermineIfHasDynamicParameter< brigand::_element, - brigand::_state - > - >; + brigand::fold>; - this->StartInvokeDynamic(parameters, HasDynamicTypes() ); + this->StartInvokeDynamic(parameters, HasDynamicTypes()); } - - template - VTKM_CONT - void StartInvokeDynamic( - const vtkm::internal::FunctionInterface ¶meters, - std::true_type) const + template + VTKM_CONT void StartInvokeDynamic(const vtkm::internal::FunctionInterface& parameters, + std::true_type) const { // As we do the dynamic transform, we are also going to check the static // type against the TypeCheckTag in the ControlSignature tags. To do this, @@ -360,16 +341,13 @@ private: // dynamic transform mechanism to get the right tag and make sure that // the dynamic type is correct. (This prevents the compiler from expanding // worklets with types that should not be.) - parameters.DynamicTransformCont( - detail::DispatcherBaseDynamicTransform(), - detail::DispatcherBaseDynamicTransformHelper(this)); + parameters.DynamicTransformCont(detail::DispatcherBaseDynamicTransform(), + detail::DispatcherBaseDynamicTransformHelper(this)); } - template - VTKM_CONT - void StartInvokeDynamic( - const vtkm::internal::FunctionInterface ¶meters, - std::false_type) const + template + VTKM_CONT void StartInvokeDynamic(const vtkm::internal::FunctionInterface& parameters, + std::false_type) const { using ParameterInterface = vtkm::internal::FunctionInterface; @@ -378,110 +356,86 @@ private: //we need to throw a nice compile time error using ParamTypes = typename ParameterInterface::ParameterSig; using ContSigTypes = typename vtkm::internal::detail::FunctionSigInfo< - typename WorkletType::ControlSignature>::Parameters; - using NumParams = vtkm::internal::MakeIntegerSequence< ParameterInterface::ARITY >; + typename WorkletType::ControlSignature>::Parameters; + using NumParams = vtkm::internal::MakeIntegerSequence; - using isAllValid = - brigand::fold< NumParams, - std::true_type, - detail::DetermineHasInCorrectParameters< brigand::_element, - ParamTypes, - ContSigTypes - > - >; + using isAllValid = brigand::fold< + NumParams, std::true_type, + detail::DetermineHasInCorrectParameters>; //When isAllValid is false we produce a second static_assert //stating that the static transform is not possible - static_assert( isAllValid::value, "Unable to match all parameter types" ); + static_assert(isAllValid::value, "Unable to match all parameter types"); this->DynamicTransformInvoke(parameters, isAllValid()); } - template - VTKM_CONT - void DynamicTransformInvoke( - const vtkm::internal::FunctionInterface ¶meters, - std::true_type ) const + template + VTKM_CONT void DynamicTransformInvoke( + const vtkm::internal::FunctionInterface& parameters, std::true_type) const { // TODO: Check parameters - static const vtkm::IdComponent INPUT_DOMAIN_INDEX = - WorkletType::InputDomain::INDEX; - reinterpret_cast(this)->DoInvoke( - vtkm::internal::make_Invocation( - parameters, ControlInterface(), ExecutionInterface())); + static const vtkm::IdComponent INPUT_DOMAIN_INDEX = WorkletType::InputDomain::INDEX; + reinterpret_cast(this)->DoInvoke( + vtkm::internal::make_Invocation(parameters, ControlInterface(), + ExecutionInterface())); } - template - VTKM_CONT - void DynamicTransformInvoke( - const vtkm::internal::FunctionInterface &, - std::false_type ) const + template + VTKM_CONT void DynamicTransformInvoke(const vtkm::internal::FunctionInterface&, + std::false_type) const { } public: - template - VTKM_CONT - void Invoke(ArgTypes... args) const + template + VTKM_CONT void Invoke(ArgTypes... args) const { - this->StartInvoke( - vtkm::internal::make_FunctionInterface(args...)); + this->StartInvoke(vtkm::internal::make_FunctionInterface(args...)); } protected: VTKM_CONT - DispatcherBase(const WorkletType &worklet) : Worklet(worklet) { } - - template - VTKM_CONT - void BasicInvoke(const Invocation &invocation, - vtkm::Id numInstances, - DeviceAdapter device) const + DispatcherBase(const WorkletType& worklet) + : Worklet(worklet) { - this->InvokeTransportParameters( - invocation, - numInstances, - this->Worklet.GetScatter().GetOutputRange(numInstances), - device); } - template - VTKM_CONT - void BasicInvoke(const Invocation &invocation, - vtkm::Id2 dimensions, - DeviceAdapter device) const - { - this->BasicInvoke(invocation, - vtkm::Id3(dimensions[0], dimensions[1], 1), - device); - } - - - template - VTKM_CONT - void BasicInvoke(const Invocation &invocation, - vtkm::Id3 dimensions, - DeviceAdapter device) const + template + VTKM_CONT void BasicInvoke(const Invocation& invocation, vtkm::Id numInstances, + DeviceAdapter device) const { this->InvokeTransportParameters( - invocation, - dimensions, - this->Worklet.GetScatter().GetOutputRange(dimensions), - device); + invocation, numInstances, this->Worklet.GetScatter().GetOutputRange(numInstances), device); + } + + template + VTKM_CONT void BasicInvoke(const Invocation& invocation, vtkm::Id2 dimensions, + DeviceAdapter device) const + { + this->BasicInvoke(invocation, vtkm::Id3(dimensions[0], dimensions[1], 1), device); + } + + template + VTKM_CONT void BasicInvoke(const Invocation& invocation, vtkm::Id3 dimensions, + DeviceAdapter device) const + { + this->InvokeTransportParameters(invocation, dimensions, + this->Worklet.GetScatter().GetOutputRange(dimensions), device); } WorkletType Worklet; private: // Dispatchers cannot be copied - DispatcherBase(const MyType &) = delete; - void operator=(const MyType &) = delete; + DispatcherBase(const MyType&) = delete; + void operator=(const MyType&) = delete; - template - VTKM_CONT - void InvokeTransportParameters(const Invocation &invocation, - const InputRangeType& inputRange, - const OutputRangeType& outputRange, - DeviceAdapter device) const + template + VTKM_CONT void InvokeTransportParameters(const Invocation& invocation, + const InputRangeType& inputRange, + const OutputRangeType& outputRange, + DeviceAdapter device) const { // The first step in invoking a worklet is to transport the arguments to // the execution environment. The invocation object passed to this function @@ -493,58 +447,46 @@ private: // static transform of the FunctionInterface to call the transport on each // argument and return the corresponding execution environment object. typedef typename Invocation::ParameterInterface ParameterInterfaceType; - const ParameterInterfaceType ¶meters = invocation.Parameters; + const ParameterInterfaceType& parameters = invocation.Parameters; typedef detail::DispatcherBaseTransportFunctor< - typename Invocation::ControlInterface, - typename Invocation::InputDomainType, - DeviceAdapter> TransportFunctorType; - typedef typename ParameterInterfaceType::template StaticTransformType< - TransportFunctorType>::type ExecObjectParameters; + typename Invocation::ControlInterface, typename Invocation::InputDomainType, DeviceAdapter> + TransportFunctorType; + typedef + typename ParameterInterfaceType::template StaticTransformType::type + ExecObjectParameters; - ExecObjectParameters execObjectParameters = - parameters.StaticTransformCont(TransportFunctorType( - invocation.GetInputDomain(), - inputRange, - outputRange)); + ExecObjectParameters execObjectParameters = parameters.StaticTransformCont( + TransportFunctorType(invocation.GetInputDomain(), inputRange, outputRange)); // Get the arrays used for scattering input to output. typename WorkletType::ScatterType::OutputToInputMapType outputToInputMap = - this->Worklet.GetScatter().GetOutputToInputMap(inputRange); + this->Worklet.GetScatter().GetOutputToInputMap(inputRange); typename WorkletType::ScatterType::VisitArrayType visitArray = - this->Worklet.GetScatter().GetVisitArray(inputRange); + this->Worklet.GetScatter().GetVisitArray(inputRange); // Replace the parameters in the invocation with the execution object and // pass to next step of Invoke. Also add the scatter information. - this->InvokeSchedule( - invocation - .ChangeParameters(execObjectParameters) - .ChangeOutputToInputMap(outputToInputMap.PrepareForInput(device)) - .ChangeVisitArray(visitArray.PrepareForInput(device)), - outputRange, - device); + this->InvokeSchedule(invocation.ChangeParameters(execObjectParameters) + .ChangeOutputToInputMap(outputToInputMap.PrepareForInput(device)) + .ChangeVisitArray(visitArray.PrepareForInput(device)), + outputRange, device); } - template - VTKM_CONT - void InvokeSchedule(const Invocation &invocation, - RangeType range, - DeviceAdapter) const + template + VTKM_CONT void InvokeSchedule(const Invocation& invocation, RangeType range, DeviceAdapter) const { // The TaskSingular class handles the magic of fetching values // for each instance and calling the worklet's function. So just create // a TaskSingular and schedule it with the device adapter. - typedef vtkm::exec::internal::TaskSingular - WorkletInvokeFunctorType; - WorkletInvokeFunctorType workletFunctor = - WorkletInvokeFunctorType(this->Worklet, invocation); + typedef vtkm::exec::internal::TaskSingular WorkletInvokeFunctorType; + WorkletInvokeFunctorType workletFunctor = WorkletInvokeFunctorType(this->Worklet, invocation); typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; Algorithm::Schedule(workletFunctor, range); } }; - } } } // namespace vtkm::worklet::internal diff --git a/vtkm/worklet/internal/TriangulateTables.h b/vtkm/worklet/internal/TriangulateTables.h index 6df4517ae..119cbf793 100644 --- a/vtkm/worklet/internal/TriangulateTables.h +++ b/vtkm/worklet/internal/TriangulateTables.h @@ -28,85 +28,85 @@ #include #include -namespace vtkm { -namespace worklet { -namespace internal { +namespace vtkm +{ +namespace worklet +{ +namespace internal +{ typedef vtkm::cont::ArrayHandle - TriangulateArrayHandle; + TriangulateArrayHandle; static vtkm::IdComponent TriangleCountData[vtkm::NUMBER_OF_CELL_SHAPES] = { - 0, // 0 = vtkm::CELL_SHAPE_EMPTY_CELL - 0, // 1 = vtkm::CELL_SHAPE_VERTEX - 0, // 2 = vtkm::CELL_SHAPE_POLY_VERTEX - 0, // 3 = vtkm::CELL_SHAPE_LINE - 0, // 4 = vtkm::CELL_SHAPE_POLY_LINE - 1, // 5 = vtkm::CELL_SHAPE_TRIANGLE - 0, // 6 = vtkm::CELL_SHAPE_TRIANGLE_STRIP - -1, // 7 = vtkm::CELL_SHAPE_POLYGON - 0, // 8 = vtkm::CELL_SHAPE_PIXEL - 2, // 9 = vtkm::CELL_SHAPE_QUAD - 0, // 10 = vtkm::CELL_SHAPE_TETRA - 0, // 11 = vtkm::CELL_SHAPE_VOXEL - 0, // 12 = vtkm::CELL_SHAPE_HEXAHEDRON - 0, // 13 = vtkm::CELL_SHAPE_WEDGE - 0 // 14 = vtkm::CELL_SHAPE_PYRAMID + 0, // 0 = vtkm::CELL_SHAPE_EMPTY_CELL + 0, // 1 = vtkm::CELL_SHAPE_VERTEX + 0, // 2 = vtkm::CELL_SHAPE_POLY_VERTEX + 0, // 3 = vtkm::CELL_SHAPE_LINE + 0, // 4 = vtkm::CELL_SHAPE_POLY_LINE + 1, // 5 = vtkm::CELL_SHAPE_TRIANGLE + 0, // 6 = vtkm::CELL_SHAPE_TRIANGLE_STRIP + -1, // 7 = vtkm::CELL_SHAPE_POLYGON + 0, // 8 = vtkm::CELL_SHAPE_PIXEL + 2, // 9 = vtkm::CELL_SHAPE_QUAD + 0, // 10 = vtkm::CELL_SHAPE_TETRA + 0, // 11 = vtkm::CELL_SHAPE_VOXEL + 0, // 12 = vtkm::CELL_SHAPE_HEXAHEDRON + 0, // 13 = vtkm::CELL_SHAPE_WEDGE + 0 // 14 = vtkm::CELL_SHAPE_PYRAMID }; static vtkm::IdComponent TriangleOffsetData[vtkm::NUMBER_OF_CELL_SHAPES] = { - -1, // 0 = vtkm::CELL_SHAPE_EMPTY_CELL - -1, // 1 = vtkm::CELL_SHAPE_VERTEX - -1, // 2 = vtkm::CELL_SHAPE_POLY_VERTEX - -1, // 3 = vtkm::CELL_SHAPE_LINE - -1, // 4 = vtkm::CELL_SHAPE_POLY_LINE - 0, // 5 = vtkm::CELL_SHAPE_TRIANGLE - -1, // 6 = vtkm::CELL_SHAPE_TRIANGLE_STRIP - -1, // 7 = vtkm::CELL_SHAPE_POLYGON - -1, // 8 = vtkm::CELL_SHAPE_PIXEL - 1, // 9 = vtkm::CELL_SHAPE_QUAD - -1, // 10 = vtkm::CELL_SHAPE_TETRA - -1, // 11 = vtkm::CELL_SHAPE_VOXEL - -1, // 12 = vtkm::CELL_SHAPE_HEXAHEDRON - -1, // 13 = vtkm::CELL_SHAPE_WEDGE - -1 // 14 = vtkm::CELL_SHAPE_PYRAMID + -1, // 0 = vtkm::CELL_SHAPE_EMPTY_CELL + -1, // 1 = vtkm::CELL_SHAPE_VERTEX + -1, // 2 = vtkm::CELL_SHAPE_POLY_VERTEX + -1, // 3 = vtkm::CELL_SHAPE_LINE + -1, // 4 = vtkm::CELL_SHAPE_POLY_LINE + 0, // 5 = vtkm::CELL_SHAPE_TRIANGLE + -1, // 6 = vtkm::CELL_SHAPE_TRIANGLE_STRIP + -1, // 7 = vtkm::CELL_SHAPE_POLYGON + -1, // 8 = vtkm::CELL_SHAPE_PIXEL + 1, // 9 = vtkm::CELL_SHAPE_QUAD + -1, // 10 = vtkm::CELL_SHAPE_TETRA + -1, // 11 = vtkm::CELL_SHAPE_VOXEL + -1, // 12 = vtkm::CELL_SHAPE_HEXAHEDRON + -1, // 13 = vtkm::CELL_SHAPE_WEDGE + -1 // 14 = vtkm::CELL_SHAPE_PYRAMID }; static vtkm::IdComponent TriangleIndexData[] = { // vtkm::CELL_SHAPE_TRIANGLE 0, 1, 2, // vtkm::CELL_SHAPE_QUAD - 0, 1, 2, - 0, 2, 3 + 0, 1, 2, 0, 2, 3 }; -template +template class TriangulateTablesExecutionObject : public vtkm::exec::ExecutionObjectBase { public: - typedef typename TriangulateArrayHandle::ExecutionTypes::PortalConst - PortalType; + typedef typename TriangulateArrayHandle::ExecutionTypes::PortalConst PortalType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - TriangulateTablesExecutionObject() - { } + TriangulateTablesExecutionObject() {} VTKM_CONT - TriangulateTablesExecutionObject(const TriangulateArrayHandle &counts, - const TriangulateArrayHandle &offsets, - const TriangulateArrayHandle &indices) - : Counts(counts.PrepareForInput(Device())), - Offsets(offsets.PrepareForInput(Device())), - Indices(indices.PrepareForInput(Device())) - { } + TriangulateTablesExecutionObject(const TriangulateArrayHandle& counts, + const TriangulateArrayHandle& offsets, + const TriangulateArrayHandle& indices) + : Counts(counts.PrepareForInput(Device())) + , Offsets(offsets.PrepareForInput(Device())) + , Indices(indices.PrepareForInput(Device())) + { + } - template - VTKM_EXEC - vtkm::IdComponent GetCount(CellShape shape, vtkm::IdComponent numPoints) const + template + VTKM_EXEC vtkm::IdComponent GetCount(CellShape shape, vtkm::IdComponent numPoints) const { if (shape.Id == vtkm::CELL_SHAPE_POLYGON) { - return numPoints-2; + return numPoints - 2; } else { @@ -114,10 +114,9 @@ public: } } - template - VTKM_EXEC - vtkm::Vec - GetIndices(CellShape shape, vtkm::IdComponent triangleIndex) const + template + VTKM_EXEC vtkm::Vec GetIndices(CellShape shape, + vtkm::IdComponent triangleIndex) const { vtkm::Vec triIndices; if (shape.Id == vtkm::CELL_SHAPE_POLYGON) @@ -128,8 +127,7 @@ public: } else { - vtkm::IdComponent offset = - 3*(this->Offsets.Get(shape.Id) + triangleIndex); + vtkm::IdComponent offset = 3 * (this->Offsets.Get(shape.Id) + triangleIndex); triIndices[0] = this->Indices.Get(offset + 0); triIndices[1] = this->Indices.Get(offset + 1); triIndices[2] = this->Indices.Get(offset + 2); @@ -148,23 +146,19 @@ class TriangulateTables public: VTKM_CONT TriangulateTables() - : Counts(vtkm::cont::make_ArrayHandle( - vtkm::worklet::internal::TriangleCountData, - vtkm::NUMBER_OF_CELL_SHAPES)), - Offsets(vtkm::cont::make_ArrayHandle( - vtkm::worklet::internal::TriangleOffsetData, - vtkm::NUMBER_OF_CELL_SHAPES)), - Indices(vtkm::cont::make_ArrayHandle( - vtkm::worklet::internal::TriangleIndexData, - vtkm::Id(9) )) - { } + : Counts(vtkm::cont::make_ArrayHandle(vtkm::worklet::internal::TriangleCountData, + vtkm::NUMBER_OF_CELL_SHAPES)) + , Offsets(vtkm::cont::make_ArrayHandle(vtkm::worklet::internal::TriangleOffsetData, + vtkm::NUMBER_OF_CELL_SHAPES)) + , Indices(vtkm::cont::make_ArrayHandle(vtkm::worklet::internal::TriangleIndexData, vtkm::Id(9))) + { + } - template - vtkm::worklet::internal::TriangulateTablesExecutionObject - PrepareForInput(Device) const + template + vtkm::worklet::internal::TriangulateTablesExecutionObject PrepareForInput(Device) const { return vtkm::worklet::internal::TriangulateTablesExecutionObject( - this->Counts, this->Offsets, this->Indices); + this->Counts, this->Offsets, this->Indices); } private: @@ -192,78 +186,66 @@ static vtkm::IdComponent TetrahedronCountData[vtkm::NUMBER_OF_CELL_SHAPES] = { }; static vtkm::IdComponent TetrahedronOffsetData[vtkm::NUMBER_OF_CELL_SHAPES] = { - -1, // 0 = vtkm::CELL_SHAPE_EMPTY_CELL - -1, // 1 = vtkm::CELL_SHAPE_VERTEX - -1, // 2 = vtkm::CELL_SHAPE_POLY_VERTEX - -1, // 3 = vtkm::CELL_SHAPE_LINE - -1, // 4 = vtkm::CELL_SHAPE_POLY_LINE - -1, // 5 = vtkm::CELL_SHAPE_TRIANGLE - -1, // 6 = vtkm::CELL_SHAPE_TRIANGLE_STRIP - -1, // 7 = vtkm::CELL_SHAPE_POLYGON - -1, // 8 = vtkm::CELL_SHAPE_PIXEL - -1, // 9 = vtkm::CELL_SHAPE_QUAD - 0, // 10 = vtkm::CELL_SHAPE_TETRA - -1, // 11 = vtkm::CELL_SHAPE_VOXEL - 1, // 12 = vtkm::CELL_SHAPE_HEXAHEDRON - 6, // 13 = vtkm::CELL_SHAPE_WEDGE - 9 // 14 = vtkm::CELL_SHAPE_PYRAMID + -1, // 0 = vtkm::CELL_SHAPE_EMPTY_CELL + -1, // 1 = vtkm::CELL_SHAPE_VERTEX + -1, // 2 = vtkm::CELL_SHAPE_POLY_VERTEX + -1, // 3 = vtkm::CELL_SHAPE_LINE + -1, // 4 = vtkm::CELL_SHAPE_POLY_LINE + -1, // 5 = vtkm::CELL_SHAPE_TRIANGLE + -1, // 6 = vtkm::CELL_SHAPE_TRIANGLE_STRIP + -1, // 7 = vtkm::CELL_SHAPE_POLYGON + -1, // 8 = vtkm::CELL_SHAPE_PIXEL + -1, // 9 = vtkm::CELL_SHAPE_QUAD + 0, // 10 = vtkm::CELL_SHAPE_TETRA + -1, // 11 = vtkm::CELL_SHAPE_VOXEL + 1, // 12 = vtkm::CELL_SHAPE_HEXAHEDRON + 6, // 13 = vtkm::CELL_SHAPE_WEDGE + 9 // 14 = vtkm::CELL_SHAPE_PYRAMID }; static vtkm::IdComponent TetrahedronIndexData[] = { // vtkm::CELL_SHAPE_TETRA 0, 1, 2, 3, // vtkm::CELL_SHAPE_HEXAHEDRON - 0, 1, 3, 4, - 1, 4, 5, 6, - 1, 4, 6, 3, - 1, 3, 6, 2, - 3, 6, 7, 4, + 0, 1, 3, 4, 1, 4, 5, 6, 1, 4, 6, 3, 1, 3, 6, 2, 3, 6, 7, 4, // vtkm::CELL_SHAPE_WEDGE - 0, 1, 2, 4, - 3, 4, 5, 2, - 0, 2, 3, 4, + 0, 1, 2, 4, 3, 4, 5, 2, 0, 2, 3, 4, // vtkm::CELL_SHAPE_PYRAMID - 0, 1, 2, 4, - 0, 2, 3, 4 + 0, 1, 2, 4, 0, 2, 3, 4 }; -template -class TetrahedralizeTablesExecutionObject - : public vtkm::exec::ExecutionObjectBase +template +class TetrahedralizeTablesExecutionObject : public vtkm::exec::ExecutionObjectBase { public: - typedef typename TriangulateArrayHandle::ExecutionTypes::PortalConst - PortalType; + typedef typename TriangulateArrayHandle::ExecutionTypes::PortalConst PortalType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC - TetrahedralizeTablesExecutionObject() - { } + TetrahedralizeTablesExecutionObject() {} VTKM_CONT - TetrahedralizeTablesExecutionObject(const TriangulateArrayHandle &counts, - const TriangulateArrayHandle &offsets, - const TriangulateArrayHandle &indices) - : Counts(counts.PrepareForInput(Device())), - Offsets(offsets.PrepareForInput(Device())), - Indices(indices.PrepareForInput(Device())) - { } + TetrahedralizeTablesExecutionObject(const TriangulateArrayHandle& counts, + const TriangulateArrayHandle& offsets, + const TriangulateArrayHandle& indices) + : Counts(counts.PrepareForInput(Device())) + , Offsets(offsets.PrepareForInput(Device())) + , Indices(indices.PrepareForInput(Device())) + { + } - template - VTKM_EXEC - vtkm::IdComponent GetCount(CellShape shape) const + template + VTKM_EXEC vtkm::IdComponent GetCount(CellShape shape) const { return this->Counts.Get(shape.Id); } - template - VTKM_EXEC - vtkm::Vec - GetIndices(CellShape shape, vtkm::IdComponent tetrahedronIndex) const + template + VTKM_EXEC vtkm::Vec GetIndices(CellShape shape, + vtkm::IdComponent tetrahedronIndex) const { vtkm::Vec tetIndices; - vtkm::IdComponent offset = - 4*(this->Offsets.Get(shape.Id) + tetrahedronIndex); + vtkm::IdComponent offset = 4 * (this->Offsets.Get(shape.Id) + tetrahedronIndex); tetIndices[0] = this->Indices.Get(offset + 0); tetIndices[1] = this->Indices.Get(offset + 1); tetIndices[2] = this->Indices.Get(offset + 2); @@ -282,23 +264,20 @@ class TetrahedralizeTables public: VTKM_CONT TetrahedralizeTables() - : Counts(vtkm::cont::make_ArrayHandle( - vtkm::worklet::internal::TetrahedronCountData, - vtkm::NUMBER_OF_CELL_SHAPES)), - Offsets(vtkm::cont::make_ArrayHandle( - vtkm::worklet::internal::TetrahedronOffsetData, - vtkm::NUMBER_OF_CELL_SHAPES)), - Indices(vtkm::cont::make_ArrayHandle( - vtkm::worklet::internal::TetrahedronIndexData, - vtkm::Id(44) )) - { } + : Counts(vtkm::cont::make_ArrayHandle(vtkm::worklet::internal::TetrahedronCountData, + vtkm::NUMBER_OF_CELL_SHAPES)) + , Offsets(vtkm::cont::make_ArrayHandle(vtkm::worklet::internal::TetrahedronOffsetData, + vtkm::NUMBER_OF_CELL_SHAPES)) + , Indices( + vtkm::cont::make_ArrayHandle(vtkm::worklet::internal::TetrahedronIndexData, vtkm::Id(44))) + { + } - template - vtkm::worklet::internal::TetrahedralizeTablesExecutionObject - PrepareForInput(Device) const + template + vtkm::worklet::internal::TetrahedralizeTablesExecutionObject PrepareForInput(Device) const { return vtkm::worklet::internal::TetrahedralizeTablesExecutionObject( - this->Counts, this->Offsets, this->Indices); + this->Counts, this->Offsets, this->Indices); } private: @@ -306,7 +285,6 @@ private: TriangulateArrayHandle Offsets; TriangulateArrayHandle Indices; }; - } } } diff --git a/vtkm/worklet/internal/WorkletBase.h b/vtkm/worklet/internal/WorkletBase.h index cbec648e6..98b5611cd 100644 --- a/vtkm/worklet/internal/WorkletBase.h +++ b/vtkm/worklet/internal/WorkletBase.h @@ -48,26 +48,50 @@ #include -namespace vtkm { -namespace placeholders { +namespace vtkm +{ +namespace placeholders +{ - template - struct Arg : vtkm::exec::arg::BasicArg { }; +template +struct Arg : vtkm::exec::arg::BasicArg +{ +}; - /// Basic execution argument tags - struct _1 : Arg<1> { }; - struct _2 : Arg<2> { }; - struct _3 : Arg<3> { }; - struct _4 : Arg<4> { }; - struct _5 : Arg<5> { }; - struct _6 : Arg<6> { }; - struct _7 : Arg<7> { }; - struct _8 : Arg<8> { }; - struct _9 : Arg<9> { }; +/// Basic execution argument tags +struct _1 : Arg<1> +{ +}; +struct _2 : Arg<2> +{ +}; +struct _3 : Arg<3> +{ +}; +struct _4 : Arg<4> +{ +}; +struct _5 : Arg<5> +{ +}; +struct _6 : Arg<6> +{ +}; +struct _7 : Arg<7> +{ +}; +struct _8 : Arg<8> +{ +}; +struct _9 : Arg<9> +{ +}; } -namespace worklet { -namespace internal { +namespace worklet +{ +namespace internal +{ /// Base class for all worklet classes. Worklet classes are subclasses and a /// operator() const is added to implement an algorithm in VTK-m. Different @@ -107,7 +131,8 @@ public: typedef vtkm::exec::arg::VisitIndex VisitIndex; /// \c ControlSignature tag for execution object inputs. - struct ExecObject : vtkm::cont::arg::ControlSignatureTagBase { + struct ExecObject : vtkm::cont::arg::ControlSignatureTagBase + { typedef vtkm::cont::arg::TypeCheckTagExecObject TypeCheckTag; typedef vtkm::cont::arg::TransportTagExecObject TransportTag; typedef vtkm::exec::arg::FetchTagExecObject FetchTag; @@ -228,8 +253,9 @@ public: /// The template operator specifies all the potential value types of the /// array. The default value type is all types. /// - template - struct WholeArrayIn : vtkm::cont::arg::ControlSignatureTagBase { + template + struct WholeArrayIn : vtkm::cont::arg::ControlSignatureTagBase + { typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTag; typedef vtkm::cont::arg::TransportTagWholeArrayIn TransportTag; typedef vtkm::exec::arg::FetchTagExecObject FetchTag; @@ -246,8 +272,9 @@ public: /// The template operator specifies all the potential value types of the /// array. The default value type is all types. /// - template - struct WholeArrayOut : vtkm::cont::arg::ControlSignatureTagBase { + template + struct WholeArrayOut : vtkm::cont::arg::ControlSignatureTagBase + { typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTag; typedef vtkm::cont::arg::TransportTagWholeArrayOut TransportTag; typedef vtkm::exec::arg::FetchTagExecObject FetchTag; @@ -265,8 +292,9 @@ public: /// The template operator specifies all the potential value types of the /// array. The default value type is all types. /// - template - struct WholeArrayInOut : vtkm::cont::arg::ControlSignatureTagBase { + template + struct WholeArrayInOut : vtkm::cont::arg::ControlSignatureTagBase + { typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTag; typedef vtkm::cont::arg::TransportTagWholeArrayInOut TransportTag; typedef vtkm::exec::arg::FetchTagExecObject FetchTag; @@ -284,14 +312,14 @@ public: /// The template operator specifies all the potential value types of the /// array. The default value type is all types. /// - template - struct AtomicArrayInOut : vtkm::cont::arg::ControlSignatureTagBase { + template + struct AtomicArrayInOut : vtkm::cont::arg::ControlSignatureTagBase + { typedef vtkm::cont::arg::TypeCheckTagAtomicArray TypeCheckTag; typedef vtkm::cont::arg::TransportTagAtomicArray TransportTag; typedef vtkm::exec::arg::FetchTagExecObject FetchTag; }; - /// \c ControlSignature tag for whole input topology. /// /// The \c WholeCellSetIn control signature tag specifies an \c CellSet @@ -302,10 +330,11 @@ public: using Cell = vtkm::TopologyElementTagCell; using Point = vtkm::TopologyElementTagPoint; - template - struct WholeCellSetIn : vtkm::cont::arg::ControlSignatureTagBase { + template + struct WholeCellSetIn : vtkm::cont::arg::ControlSignatureTagBase + { typedef vtkm::cont::arg::TypeCheckTagCellSet TypeCheckTag; - typedef vtkm::cont::arg::TransportTagCellSetIn TransportTag; + typedef vtkm::cont::arg::TransportTagCellSetIn TransportTag; typedef vtkm::exec::arg::FetchTagWholeCellSetIn FetchTag; }; @@ -315,22 +344,16 @@ public: /// types. /// VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC - vtkm::exec::arg::ThreadIndicesBasic - GetThreadIndices(const T& threadIndex, - const OutToInArrayType& outToIn, - const VisitArrayType& visit, - const InputDomainType &, - const T& globalThreadIndexOffset=0) const + template + VTKM_EXEC vtkm::exec::arg::ThreadIndicesBasic GetThreadIndices( + const T& threadIndex, const OutToInArrayType& outToIn, const VisitArrayType& visit, + const InputDomainType&, const T& globalThreadIndexOffset = 0) const { - return vtkm::exec::arg::ThreadIndicesBasic(threadIndex, - outToIn.Get(threadIndex), - visit.Get(threadIndex), - globalThreadIndexOffset ); + return vtkm::exec::arg::ThreadIndicesBasic(threadIndex, outToIn.Get(threadIndex), + visit.Get(threadIndex), globalThreadIndexOffset); } }; - } } } // namespace vtkm::worklet::internal diff --git a/vtkm/worklet/internal/testing/UnitTestDispatcherBase.cxx b/vtkm/worklet/internal/testing/UnitTestDispatcherBase.cxx index c8a9cea16..f8fdbd767 100644 --- a/vtkm/worklet/internal/testing/UnitTestDispatcherBase.cxx +++ b/vtkm/worklet/internal/testing/UnitTestDispatcherBase.cxx @@ -28,7 +28,8 @@ #include -namespace { +namespace +{ typedef vtkm::cont::DeviceAdapterTagSerial Device; @@ -37,17 +38,23 @@ static const vtkm::Id ARRAY_SIZE = 10; struct TestExecObject { VTKM_EXEC_CONT - TestExecObject() : Array(nullptr) { } + TestExecObject() + : Array(nullptr) + { + } VTKM_EXEC_CONT - TestExecObject(vtkm::Id *array) : Array(array) { } + TestExecObject(vtkm::Id* array) + : Array(array) + { + } - vtkm::Id *Array; + vtkm::Id* Array; }; struct TestExecObjectType : vtkm::exec::ExecutionObjectBase { - template + template void CastAndCall(Functor f) const { f(*this); @@ -55,126 +62,135 @@ struct TestExecObjectType : vtkm::exec::ExecutionObjectBase vtkm::Id Value; }; -struct TestTypeCheckTag { }; -struct TestTransportTag { }; -struct TestFetchTagInput { }; -struct TestFetchTagOutput { }; +struct TestTypeCheckTag +{ +}; +struct TestTransportTag +{ +}; +struct TestFetchTagInput +{ +}; +struct TestFetchTagOutput +{ +}; } // anonymous namespace -namespace vtkm { -namespace cont { -namespace arg { +namespace vtkm +{ +namespace cont +{ +namespace arg +{ -template<> -struct TypeCheck +template <> +struct TypeCheck { static const bool value = true; }; -template<> -struct Transport +template <> +struct Transport { typedef TestExecObject ExecObjectType; VTKM_CONT - ExecObjectType operator()(vtkm::Id *contData, - vtkm::Id *, - vtkm::Id inputRange, + ExecObjectType operator()(vtkm::Id* contData, vtkm::Id*, vtkm::Id inputRange, vtkm::Id outputRange) const { - VTKM_TEST_ASSERT(inputRange == ARRAY_SIZE, - "Got unexpected size in test transport."); - VTKM_TEST_ASSERT(outputRange == ARRAY_SIZE, - "Got unexpected size in test transport."); + VTKM_TEST_ASSERT(inputRange == ARRAY_SIZE, "Got unexpected size in test transport."); + VTKM_TEST_ASSERT(outputRange == ARRAY_SIZE, "Got unexpected size in test transport."); return ExecObjectType(contData); } }; - } } } // namespace vtkm::cont::arg -namespace vtkm { -namespace cont { -namespace internal { +namespace vtkm +{ +namespace cont +{ +namespace internal +{ -template<> -struct DynamicTransformTraits< TestExecObjectType > +template <> +struct DynamicTransformTraits { typedef vtkm::cont::internal::DynamicTransformTagCastAndCall DynamicTag; }; - } } } // namespace vtkm::cont::internal -namespace vtkm { -namespace exec { -namespace arg { +namespace vtkm +{ +namespace exec +{ +namespace arg +{ -template<> -struct Fetch +template <> +struct Fetch { typedef vtkm::Id ValueType; VTKM_EXEC ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic indices, - const TestExecObject &execObject) const { + const TestExecObject& execObject) const + { return execObject.Array[indices.GetInputIndex()]; } VTKM_EXEC - void Store(const vtkm::exec::arg::ThreadIndicesBasic, - const TestExecObject &, - ValueType) const { + void Store(const vtkm::exec::arg::ThreadIndicesBasic, const TestExecObject&, ValueType) const + { // No-op } }; -template<> -struct Fetch +template <> +struct Fetch { typedef vtkm::Id ValueType; VTKM_EXEC - ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic &, - const TestExecObject &) const { + ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic&, const TestExecObject&) const + { // No-op return ValueType(); } VTKM_EXEC - void Store(const vtkm::exec::arg::ThreadIndicesBasic &indices, - const TestExecObject &execObject, - ValueType value) const { + void Store(const vtkm::exec::arg::ThreadIndicesBasic& indices, const TestExecObject& execObject, + ValueType value) const + { execObject.Array[indices.GetOutputIndex()] = value; } }; - } } } // vtkm::exec::arg -namespace { +namespace +{ static const vtkm::Id EXPECTED_EXEC_OBJECT_VALUE = 123; class TestWorkletBase : public vtkm::worklet::internal::WorkletBase { public: - struct TestIn : vtkm::cont::arg::ControlSignatureTagBase { + struct TestIn : vtkm::cont::arg::ControlSignatureTagBase + { typedef TestTypeCheckTag TypeCheckTag; typedef TestTransportTag TransportTag; typedef TestFetchTagInput FetchTag; }; - struct TestOut : vtkm::cont::arg::ControlSignatureTagBase { + struct TestOut : vtkm::cont::arg::ControlSignatureTagBase + { typedef TestTypeCheckTag TypeCheckTag; typedef TestTransportTag TransportTag; typedef TestFetchTagOutput FetchTag; @@ -188,12 +204,9 @@ public: typedef _3 ExecutionSignature(_1, _2, WorkIndex); VTKM_EXEC - vtkm::Id operator()(vtkm::Id value, - TestExecObjectType execObject, - vtkm::Id index) const + vtkm::Id operator()(vtkm::Id value, TestExecObjectType execObject, vtkm::Id index) const { - VTKM_TEST_ASSERT(value == TestValue(index, vtkm::Id()), - "Got bad value in worklet."); + VTKM_TEST_ASSERT(value == TestValue(index, vtkm::Id()), "Got bad value in worklet."); VTKM_TEST_ASSERT(execObject.Value == EXPECTED_EXEC_OBJECT_VALUE, "Got bad exec object in worklet."); return TestValue(index, vtkm::Id()) + 1000; @@ -209,37 +222,31 @@ public: typedef void ExecutionSignature(_1, _2, _3); VTKM_EXEC - void operator()(vtkm::Id, TestExecObjectType, vtkm::Id) const - { - this->RaiseError(ERROR_MESSAGE); - } + void operator()(vtkm::Id, TestExecObjectType, vtkm::Id) const { this->RaiseError(ERROR_MESSAGE); } }; -template -class TestDispatcher : - public vtkm::worklet::internal::DispatcherBase< - TestDispatcher, - WorkletType, - TestWorkletBase> +template +class TestDispatcher : public vtkm::worklet::internal::DispatcherBase, + WorkletType, TestWorkletBase> { - typedef vtkm::worklet::internal::DispatcherBase< - TestDispatcher, - WorkletType, - TestWorkletBase> Superclass; - typedef vtkm::internal::FunctionInterface - ParameterInterface; - typedef vtkm::internal::Invocation< - ParameterInterface, - typename Superclass::ControlInterface, - typename Superclass::ExecutionInterface, - 1> Invocation; + typedef vtkm::worklet::internal::DispatcherBase, WorkletType, + TestWorkletBase> + Superclass; + typedef vtkm::internal::FunctionInterface + ParameterInterface; + typedef vtkm::internal::Invocation + Invocation; + public: VTKM_CONT - TestDispatcher(const WorkletType &worklet = WorkletType()) - : Superclass(worklet) { } + TestDispatcher(const WorkletType& worklet = WorkletType()) + : Superclass(worklet) + { + } VTKM_CONT - void DoInvoke(const Invocation &invocation) const + void DoInvoke(const Invocation& invocation) const { std::cout << "In TestDispatcher::DoInvoke()" << std::endl; this->BasicInvoke(invocation, ARRAY_SIZE, Device()); @@ -276,7 +283,6 @@ void TestBasicInvoke() } } - void TestInvokeWithError() { std::cout << "Test invoke with error raised" << std::endl; @@ -299,15 +305,13 @@ void TestInvokeWithError() dispatcher.Invoke(inputArray, execObject, outputArray); VTKM_TEST_FAIL("Exception not thrown."); } - catch (vtkm::cont::ErrorExecution &error) + catch (vtkm::cont::ErrorExecution& error) { std::cout << " Got expected exception." << std::endl; - VTKM_TEST_ASSERT(error.GetMessage() == ERROR_MESSAGE, - "Got unexpected error message."); + VTKM_TEST_ASSERT(error.GetMessage() == ERROR_MESSAGE, "Got unexpected error message."); } } - void TestInvokeWithDynamicAndBadTypes() { std::cout << "Test invoke with bad type" << std::endl; @@ -323,7 +327,7 @@ void TestInvokeWithDynamicAndBadTypes() dispatcher.Invoke(nullptr, execObject, array); VTKM_TEST_FAIL("Dispatcher did not throw expected error."); } - catch (vtkm::cont::ErrorBadType &error) + catch (vtkm::cont::ErrorBadType& error) { std::cout << " Got expected exception." << std::endl; std::cout << " " << error.GetMessage() << std::endl; @@ -337,7 +341,7 @@ void TestInvokeWithDynamicAndBadTypes() dispatcher.Invoke(array, execObject, nullptr); VTKM_TEST_FAIL("Dispatcher did not throw expected error."); } - catch (vtkm::cont::ErrorBadType &error) + catch (vtkm::cont::ErrorBadType& error) { std::cout << " Got expected exception." << std::endl; std::cout << " " << error.GetMessage() << std::endl; @@ -355,7 +359,7 @@ void TestDispatcherBase() } // anonymous namespace -int UnitTestDispatcherBase(int, char *[]) +int UnitTestDispatcherBase(int, char* []) { return vtkm::cont::testing::Testing::Run(TestDispatcherBase); } diff --git a/vtkm/worklet/splatkernels/Gaussian.h b/vtkm/worklet/splatkernels/Gaussian.h index 487f9f872..451ccd17b 100644 --- a/vtkm/worklet/splatkernels/Gaussian.h +++ b/vtkm/worklet/splatkernels/Gaussian.h @@ -28,171 +28,173 @@ // This implementation uses a factor of 5 between smoothing length and cutoff // -namespace vtkm { namespace worklet { -namespace splatkernels { +namespace vtkm +{ +namespace worklet +{ +namespace splatkernels +{ template -struct Gaussian : public KernelBase< Gaussian > +struct Gaussian : public KernelBase> { - //--------------------------------------------------------------------- - // Constructor - // Calculate coefficients used repeatedly when evaluating the kernel - // value or gradient - VTKM_EXEC_CONT - Gaussian(double smoothingLength) - : KernelBase< Gaussian >(smoothingLength) - { - Hinverse_ = 1.0/smoothingLength; - Hinverse2_ = Hinverse_*Hinverse_; - maxRadius_ = 5.0*smoothingLength; - maxRadius2_ = maxRadius_*maxRadius_; - // - norm_ = 1.0 / pow(M_PI, static_cast(Dimensions) / 2.0); - scale_W_ = norm_ * PowerExpansion (Hinverse_); - scale_GradW_ = - 2.0 * PowerExpansion(Hinverse_) / norm_; - } + //--------------------------------------------------------------------- + // Constructor + // Calculate coefficients used repeatedly when evaluating the kernel + // value or gradient + VTKM_EXEC_CONT + Gaussian(double smoothingLength) + : KernelBase>(smoothingLength) + { + Hinverse_ = 1.0 / smoothingLength; + Hinverse2_ = Hinverse_ * Hinverse_; + maxRadius_ = 5.0 * smoothingLength; + maxRadius2_ = maxRadius_ * maxRadius_; + // + norm_ = 1.0 / pow(M_PI, static_cast(Dimensions) / 2.0); + scale_W_ = norm_ * PowerExpansion(Hinverse_); + scale_GradW_ = -2.0 * PowerExpansion(Hinverse_) / norm_; + } - //--------------------------------------------------------------------- - // return the multiplier between smoothing length and max cutoff distance - VTKM_CONSTEXPR double getDilationFactor() const { return 5.0; } + //--------------------------------------------------------------------- + // return the multiplier between smoothing length and max cutoff distance + VTKM_CONSTEXPR double getDilationFactor() const { return 5.0; } - //--------------------------------------------------------------------- - // compute w(h) for the given distance - VTKM_EXEC_CONT - double w(double distance) const + //--------------------------------------------------------------------- + // compute w(h) for the given distance + VTKM_EXEC_CONT + double w(double distance) const + { + if (distance < maxDistance()) { - if (distance(Hinverse); - double Q = distance * Hinverse; + double Hinverse = 1.0 / h; + double scale_W = norm_ * PowerExpansion(Hinverse); + double Q = distance * Hinverse; - return scale_W * exp(-Q*Q); - } - return 0; + return scale_W * exp(-Q * Q); } + return 0; + } - //--------------------------------------------------------------------- - // compute w(h) for a variable h kernel using distance squared - VTKM_EXEC_CONT - double w2(double h, double distance2) const + //--------------------------------------------------------------------- + // compute w(h) for a variable h kernel using distance squared + VTKM_EXEC_CONT + double w2(double h, double distance2) const + { + if (distance2 < maxSquaredDistance(h)) { - if (distance2(Hinverse); - double Q = distance2 * Hinverse * Hinverse; + double Hinverse = 1.0 / h; + double scale_W = norm_ * PowerExpansion(Hinverse); + double Q = distance2 * Hinverse * Hinverse; - return scale_W * exp(-Q); - } - return 0; + return scale_W * exp(-Q); } + return 0; + } - //--------------------------------------------------------------------- - // Calculates the kernel derivative for a distance {x,y,z} vector - // from the centre - VTKM_EXEC_CONT - vector_type gradW(double distance, const vector_type& pos) const + //--------------------------------------------------------------------- + // Calculates the kernel derivative for a distance {x,y,z} vector + // from the centre + VTKM_EXEC_CONT + vector_type gradW(double distance, const vector_type& pos) const + { + double Q = distance * Hinverse_; + if (Q != 0.0) { - double Q = distance * Hinverse_; - if (Q != 0.0) - { - return scale_GradW_ * exp(-Q * Q) * pos; - } - else { - return vector_type(0.0); - } + return scale_GradW_ * exp(-Q * Q) * pos; } - - //--------------------------------------------------------------------- - // Calculates the kernel derivative for a distance {x,y,z} vector - // from the centre using a variable h - VTKM_EXEC_CONT - vector_type gradW(double h, double distance, const vector_type& pos) const + else { - double Hinverse = 1.0/h; - double scale_GradW = - 2.0 * PowerExpansion(Hinverse) - / pow(M_PI, static_cast(Dimensions) / 2.0); - double Q = distance * Hinverse; - - //!!! check this due to the fitting offset - if (distance != 0.0) - { - return scale_GradW * exp(-Q * Q) * pos; - } - else { - return vector_type(0.0); - } + return vector_type(0.0); } + } - //--------------------------------------------------------------------- - // return the maximum distance at which this kernel is non zero - VTKM_EXEC_CONT - double maxDistance() const + //--------------------------------------------------------------------- + // Calculates the kernel derivative for a distance {x,y,z} vector + // from the centre using a variable h + VTKM_EXEC_CONT + vector_type gradW(double h, double distance, const vector_type& pos) const + { + double Hinverse = 1.0 / h; + double scale_GradW = -2.0 * PowerExpansion(Hinverse) / + pow(M_PI, static_cast(Dimensions) / 2.0); + double Q = distance * Hinverse; + + //!!! check this due to the fitting offset + if (distance != 0.0) { - return maxRadius_; + return scale_GradW * exp(-Q * Q) * pos; } - - //--------------------------------------------------------------------- - // return the maximum distance at which this variable h kernel is non zero - VTKM_EXEC_CONT - double maxDistance(double h) const + else { - return getDilationFactor()*h; + return vector_type(0.0); } + } - //--------------------------------------------------------------------- - // return the maximum distance at which this kernel is non zero - VTKM_EXEC_CONT - double maxSquaredDistance() const - { - return maxRadius2_; - } + //--------------------------------------------------------------------- + // return the maximum distance at which this kernel is non zero + VTKM_EXEC_CONT + double maxDistance() const { return maxRadius_; } - //--------------------------------------------------------------------- - // return the maximum distance at which this kernel is non zero - VTKM_EXEC_CONT - double maxSquaredDistance(double h) const - { - return PowerExpansion<2>(getDilationFactor())*h*h; - } + //--------------------------------------------------------------------- + // return the maximum distance at which this variable h kernel is non zero + VTKM_EXEC_CONT + double maxDistance(double h) const { return getDilationFactor() * h; } + + //--------------------------------------------------------------------- + // return the maximum distance at which this kernel is non zero + VTKM_EXEC_CONT + double maxSquaredDistance() const { return maxRadius2_; } + + //--------------------------------------------------------------------- + // return the maximum distance at which this kernel is non zero + VTKM_EXEC_CONT + double maxSquaredDistance(double h) const + { + return PowerExpansion<2>(getDilationFactor()) * h * h; + } private: - double norm_; - double Hinverse_; - double Hinverse2_; - double maxRadius_; - double maxRadius2_; - double scale_W_; - double scale_GradW_; + double norm_; + double Hinverse_; + double Hinverse2_; + double maxRadius_; + double maxRadius2_; + double scale_W_; + double scale_GradW_; }; - -}}} +} +} +} #endif diff --git a/vtkm/worklet/splatkernels/KernelBase.h b/vtkm/worklet/splatkernels/KernelBase.h index 53aa0253e..abcd3b39a 100644 --- a/vtkm/worklet/splatkernels/KernelBase.h +++ b/vtkm/worklet/splatkernels/KernelBase.h @@ -23,31 +23,38 @@ #include #include -namespace vtkm { namespace worklet { -namespace splatkernels { +namespace vtkm +{ +namespace worklet +{ +namespace splatkernels +{ // Vector class used in the kernels typedef vtkm::Vec vector_type; // Pi compatibility #ifndef M_PI - #define M_PI vtkm::Pi() +#define M_PI vtkm::Pi() #endif // templated utility to generate expansions at compile time for x^N template -inline VTKM_EXEC_CONT -vtkm::Float64 PowerExpansion(vtkm::Float64 x) +inline VTKM_EXEC_CONT vtkm::Float64 PowerExpansion(vtkm::Float64 x) { - return x * PowerExpansion(x); + return x * PowerExpansion(x); } template <> -inline VTKM_EXEC_CONT -vtkm::Float64 PowerExpansion<1>(vtkm::Float64 x) { return x; } +inline VTKM_EXEC_CONT vtkm::Float64 PowerExpansion<1>(vtkm::Float64 x) +{ + return x; +} template <> -inline VTKM_EXEC_CONT -vtkm::Float64 PowerExpansion<0>(vtkm::Float64) { return 1; } +inline VTKM_EXEC_CONT vtkm::Float64 PowerExpansion<0>(vtkm::Float64) +{ + return 1; +} //--------------------------------------------------------------------- // Base class for Kernels @@ -55,98 +62,86 @@ vtkm::Float64 PowerExpansion<0>(vtkm::Float64) { return 1; } template struct KernelBase { - //--------------------------------------------------------------------- - // Constructor - // Calculate coefficients used repeatedly when evaluating the kernel - // value or gradient - // The smoothing length is usually denoted as 'h' in SPH literature - VTKM_EXEC_CONT - KernelBase(double smoothingLength) - : smoothingLength_(smoothingLength) {} + //--------------------------------------------------------------------- + // Constructor + // Calculate coefficients used repeatedly when evaluating the kernel + // value or gradient + // The smoothing length is usually denoted as 'h' in SPH literature + VTKM_EXEC_CONT + KernelBase(double smoothingLength) + : smoothingLength_(smoothingLength) + { + } - //--------------------------------------------------------------------- - // The functions below are placeholders which should be provided by - // concrete implementations of this class. - // The KernelBase versions will not be called when algorithms are - // templated over a concrete implementation. - //--------------------------------------------------------------------- + //--------------------------------------------------------------------- + // The functions below are placeholders which should be provided by + // concrete implementations of this class. + // The KernelBase versions will not be called when algorithms are + // templated over a concrete implementation. + //--------------------------------------------------------------------- - //--------------------------------------------------------------------- - // compute w(h) for the given distance - VTKM_EXEC_CONT - double w(double distance) { - return static_cast(this)->w(distance); - } + //--------------------------------------------------------------------- + // compute w(h) for the given distance + VTKM_EXEC_CONT + double w(double distance) { return static_cast(this)->w(distance); } - //--------------------------------------------------------------------- - // compute w(h) for the given squared distance - // this version takes the distance squared as a convenience/optimization - // but not all implementations will benefit from it - VTKM_EXEC_CONT - double w2(double distance2) { - return static_cast(this)->w2(distance2); - } + //--------------------------------------------------------------------- + // compute w(h) for the given squared distance + // this version takes the distance squared as a convenience/optimization + // but not all implementations will benefit from it + VTKM_EXEC_CONT + double w2(double distance2) { return static_cast(this)->w2(distance2); } - //--------------------------------------------------------------------- - // compute w(h) for a variable h kernel - // this is less efficient than the fixed radius version as coefficients - // must be calculatd on the fly, but it is required when all particles - // have different smoothing lengths - VTKM_EXEC_CONT - double w(double h, double distance) { - return static_cast(this)->w(h, distance); - } + //--------------------------------------------------------------------- + // compute w(h) for a variable h kernel + // this is less efficient than the fixed radius version as coefficients + // must be calculatd on the fly, but it is required when all particles + // have different smoothing lengths + VTKM_EXEC_CONT + double w(double h, double distance) { return static_cast(this)->w(h, distance); } - //--------------------------------------------------------------------- - // compute w(h) for a variable h kernel using distance squared - // this version takes the distance squared as a convenience/optimization - VTKM_EXEC_CONT - double w2(double h, double distance2) { - return static_cast(this)->w2(h, distance2); - } + //--------------------------------------------------------------------- + // compute w(h) for a variable h kernel using distance squared + // this version takes the distance squared as a convenience/optimization + VTKM_EXEC_CONT + double w2(double h, double distance2) { return static_cast(this)->w2(h, distance2); } - //--------------------------------------------------------------------- - // Calculates the kernel derivative for a distance {x,y,z} vector - // from the centre. - VTKM_EXEC_CONT - vector_type gradW(double distance, const vector_type& pos) { - return static_cast(this)->gradW(distance, pos); - } + //--------------------------------------------------------------------- + // Calculates the kernel derivative for a distance {x,y,z} vector + // from the centre. + VTKM_EXEC_CONT + vector_type gradW(double distance, const vector_type& pos) + { + return static_cast(this)->gradW(distance, pos); + } - // Calculates the kernel derivative at the given distance using a variable h value - // this is less efficient than the fixed radius version as coefficients - // must be calculatd on the fly - VTKM_EXEC_CONT - vector_type gradW(double h, double distance, const vector_type& pos) { - return static_cast(this)->gradW(h, distance, pos); - } + // Calculates the kernel derivative at the given distance using a variable h value + // this is less efficient than the fixed radius version as coefficients + // must be calculatd on the fly + VTKM_EXEC_CONT + vector_type gradW(double h, double distance, const vector_type& pos) + { + return static_cast(this)->gradW(h, distance, pos); + } - // return the multiplier between smoothing length and max cutoff distance - VTKM_EXEC_CONT - double getDilationFactor() const { - return static_cast(this)->getDilationFactor; - } + // return the multiplier between smoothing length and max cutoff distance + VTKM_EXEC_CONT + double getDilationFactor() const { return static_cast(this)->getDilationFactor; } - // return the maximum cutoff distance over which the kernel acts, - // beyond this distance the kernel value is zero - VTKM_EXEC_CONT - double maxDistance() { - return static_cast(this)->maxDistance(); - } + // return the maximum cutoff distance over which the kernel acts, + // beyond this distance the kernel value is zero + VTKM_EXEC_CONT + double maxDistance() { return static_cast(this)->maxDistance(); } - // return the maximum cutoff distance over which the kernel acts, - // beyond this distance the kernel value is zero - VTKM_EXEC_CONT - double maxDistanceSquared() { - return static_cast(this)->maxDistanceSquared(); - } + // return the maximum cutoff distance over which the kernel acts, + // beyond this distance the kernel value is zero + VTKM_EXEC_CONT + double maxDistanceSquared() { return static_cast(this)->maxDistanceSquared(); } - protected: - - const double smoothingLength_; +protected: + const double smoothingLength_; }; - -}}} +} +} +} #endif - - diff --git a/vtkm/worklet/splatkernels/Spline3rdOrder.h b/vtkm/worklet/splatkernels/Spline3rdOrder.h index 6ae47b5c3..0fe187cce 100644 --- a/vtkm/worklet/splatkernels/Spline3rdOrder.h +++ b/vtkm/worklet/splatkernels/Spline3rdOrder.h @@ -26,205 +26,224 @@ // Spline 3rd Order kernel. // -namespace vtkm { namespace worklet { -namespace splatkernels { +namespace vtkm +{ +namespace worklet +{ +namespace splatkernels +{ template -struct Spline3rdOrder : public KernelBase< Spline3rdOrder > +struct Spline3rdOrder : public KernelBase> { - //--------------------------------------------------------------------- - // Constructor - // Calculate coefficients used repeatedly when evaluating the kernel - // value or gradient - VTKM_EXEC_CONT - Spline3rdOrder(double smoothingLength) - : KernelBase< Spline3rdOrder >(smoothingLength) - { - Hinverse_ = 1.0/smoothingLength; - Hinverse2_ = Hinverse_*Hinverse_; - maxRadius_ = 2.0*smoothingLength; - maxRadius2_ = maxRadius_*maxRadius_; - // - if (Dimensions==2) { - norm_ = 10.0/(7.0*M_PI); - } - if (Dimensions==3) { - norm_ = 1.0/M_PI; - } - scale_W_ = norm_ * PowerExpansion (Hinverse_); - scale_GradW_ = norm_ * PowerExpansion(Hinverse_); - } - //--------------------------------------------------------------------- - // Calculates the kernel value for the given distance - VTKM_EXEC_CONT - double w(double distance) const + //--------------------------------------------------------------------- + // Constructor + // Calculate coefficients used repeatedly when evaluating the kernel + // value or gradient + VTKM_EXEC_CONT + Spline3rdOrder(double smoothingLength) + : KernelBase>(smoothingLength) + { + Hinverse_ = 1.0 / smoothingLength; + Hinverse2_ = Hinverse_ * Hinverse_; + maxRadius_ = 2.0 * smoothingLength; + maxRadius2_ = maxRadius_ * maxRadius_; + // + if (Dimensions == 2) { - // compute Q=(r/h) - double Q = distance * Hinverse_; - if (Q<1.0) { - return scale_W_ *(1.0 - (3.0/2.0)*Q*Q + (3.0/4.0)*Q*Q*Q); - } - else if (Q<2.0) { - double q2 = (2.0-Q); - return scale_W_ * (1.0/4.0) * (q2*q2*q2);; - } - else { - return 0.0; - } + norm_ = 10.0 / (7.0 * M_PI); } - - //--------------------------------------------------------------------- - // Calculates the kernel value for the given squared distance - VTKM_EXEC_CONT - double w2(double distance2) const + if (Dimensions == 3) { - // compute Q - double Q = sqrt(distance2) * Hinverse_; - if (Q<1.0) { - return scale_W_ *(1.0 - (3.0/2.0)*Q*Q + (3.0/4.0)*Q*Q*Q); - } - else if (Q<2.0) { - double q2 = (2.0-Q); - return scale_W_ * (1.0/4.0) * (q2*q2*q2);; - } - else { - return 0.0; - } + norm_ = 1.0 / M_PI; } - - //--------------------------------------------------------------------- - // compute w(h) for a variable h kernel - VTKM_EXEC_CONT - double w(double h, double distance) const + scale_W_ = norm_ * PowerExpansion(Hinverse_); + scale_GradW_ = norm_ * PowerExpansion(Hinverse_); + } + //--------------------------------------------------------------------- + // Calculates the kernel value for the given distance + VTKM_EXEC_CONT + double w(double distance) const + { + // compute Q=(r/h) + double Q = distance * Hinverse_; + if (Q < 1.0) { - double Hinverse = 1.0/h; - double scale_W = norm_ * PowerExpansion(Hinverse); - double Q = distance * Hinverse; - if (Q<1.0) { - return scale_W *(1.0 - (3.0/2.0)*Q*Q + (3.0/4.0)*Q*Q*Q); - } - else if (Q<2.0) { - double q2 = (2.0-Q); - return scale_W * (1.0/4.0) * (q2*q2*q2);; - } - else { - return 0.0; - } + return scale_W_ * (1.0 - (3.0 / 2.0) * Q * Q + (3.0 / 4.0) * Q * Q * Q); } - - //--------------------------------------------------------------------- - // compute w(h) for a variable h kernel using distance squared - VTKM_EXEC_CONT - double w2(double h, double distance2) const + else if (Q < 2.0) { - double Hinverse = 1.0/h; - double scale_W = norm_ * PowerExpansion(Hinverse); - double Q = sqrt(distance2) * Hinverse; - if (Q<1.0) { - return scale_W *(1.0 - (3.0/2.0)*Q*Q + (3.0/4.0)*Q*Q*Q); - } - else if (Q<2.0) { - double q2 = (2.0-Q); - return scale_W * (1.0/4.0) * (q2*q2*q2);; - } - else { - return 0.0; - } + double q2 = (2.0 - Q); + return scale_W_ * (1.0 / 4.0) * (q2 * q2 * q2); + ; } - - //--------------------------------------------------------------------- - // Calculates the kernel derivation for the given distance of two particles. - // The used formula is the derivation of Speith (3.126) for the value - // with (3.21) for the direction of the gradient vector. - // Be careful: grad W is antisymmetric in r (3.25)!. - VTKM_EXEC_CONT - vector_type gradW(double distance, const vector_type& pos) const + else { - double Q = distance * Hinverse_; - if (Q==0.0) { - return vector_type(0.0); - } - else if (Q<1.0) { - return scale_GradW_ * (-3.0*Q + (9.0/4.0)*Q*Q) * pos; - } - else if (Q<2.0) { - double q2 = (2.0-Q); - return scale_GradW_ * (-3.0/4.0)*q2*q2 * pos; - } - else { - return vector_type(0.0); - } + return 0.0; } + } - //--------------------------------------------------------------------- - VTKM_EXEC_CONT - vector_type gradW(double h, double distance, const vector_type& pos) const + //--------------------------------------------------------------------- + // Calculates the kernel value for the given squared distance + VTKM_EXEC_CONT + double w2(double distance2) const + { + // compute Q + double Q = sqrt(distance2) * Hinverse_; + if (Q < 1.0) { - double Hinverse = 1.0/h; - double scale_GradW = norm_ * PowerExpansion(Hinverse); - double Q = distance * Hinverse; - if (Q==0.0) { - return vector_type(0.0); - } - else if (Q<1.0) { - return scale_GradW * (-3.0*Q + (9.0/4.0)*Q*Q) * pos; - } - else if (Q<2.0) { - double q2 = (2.0-Q); - return scale_GradW * (-3.0/4.0)*q2*q2 * pos; - } - else { - return vector_type(0.0); - } + return scale_W_ * (1.0 - (3.0 / 2.0) * Q * Q + (3.0 / 4.0) * Q * Q * Q); } - - //--------------------------------------------------------------------- - // return the maximum distance at which this kernel is non zero - VTKM_EXEC_CONT - double maxDistance() const + else if (Q < 2.0) { - return maxRadius_; + double q2 = (2.0 - Q); + return scale_W_ * (1.0 / 4.0) * (q2 * q2 * q2); + ; } - - //--------------------------------------------------------------------- - // return the maximum distance at which this variable h kernel is non zero - VTKM_EXEC_CONT - double maxDistance(double h) const + else { - return 2.0*h; + return 0.0; } + } - //--------------------------------------------------------------------- - // return the maximum distance at which this kernel is non zero - VTKM_EXEC_CONT - double maxSquaredDistance() const + //--------------------------------------------------------------------- + // compute w(h) for a variable h kernel + VTKM_EXEC_CONT + double w(double h, double distance) const + { + double Hinverse = 1.0 / h; + double scale_W = norm_ * PowerExpansion(Hinverse); + double Q = distance * Hinverse; + if (Q < 1.0) { - return maxRadius2_; + return scale_W * (1.0 - (3.0 / 2.0) * Q * Q + (3.0 / 4.0) * Q * Q * Q); } - - //--------------------------------------------------------------------- - // return the maximum distance at which this kernel is non zero - VTKM_EXEC_CONT - double maxSquaredDistance(double h) const + else if (Q < 2.0) { - return 4.0*h*h; + double q2 = (2.0 - Q); + return scale_W * (1.0 / 4.0) * (q2 * q2 * q2); + ; } + else + { + return 0.0; + } + } - //--------------------------------------------------------------------- - // return the multiplier between smoothing length and max cutoff distance - VTKM_EXEC_CONT - double getDilationFactor() const { return 2.0; } + //--------------------------------------------------------------------- + // compute w(h) for a variable h kernel using distance squared + VTKM_EXEC_CONT + double w2(double h, double distance2) const + { + double Hinverse = 1.0 / h; + double scale_W = norm_ * PowerExpansion(Hinverse); + double Q = sqrt(distance2) * Hinverse; + if (Q < 1.0) + { + return scale_W * (1.0 - (3.0 / 2.0) * Q * Q + (3.0 / 4.0) * Q * Q * Q); + } + else if (Q < 2.0) + { + double q2 = (2.0 - Q); + return scale_W * (1.0 / 4.0) * (q2 * q2 * q2); + ; + } + else + { + return 0.0; + } + } + + //--------------------------------------------------------------------- + // Calculates the kernel derivation for the given distance of two particles. + // The used formula is the derivation of Speith (3.126) for the value + // with (3.21) for the direction of the gradient vector. + // Be careful: grad W is antisymmetric in r (3.25)!. + VTKM_EXEC_CONT + vector_type gradW(double distance, const vector_type& pos) const + { + double Q = distance * Hinverse_; + if (Q == 0.0) + { + return vector_type(0.0); + } + else if (Q < 1.0) + { + return scale_GradW_ * (-3.0 * Q + (9.0 / 4.0) * Q * Q) * pos; + } + else if (Q < 2.0) + { + double q2 = (2.0 - Q); + return scale_GradW_ * (-3.0 / 4.0) * q2 * q2 * pos; + } + else + { + return vector_type(0.0); + } + } + + //--------------------------------------------------------------------- + VTKM_EXEC_CONT + vector_type gradW(double h, double distance, const vector_type& pos) const + { + double Hinverse = 1.0 / h; + double scale_GradW = norm_ * PowerExpansion(Hinverse); + double Q = distance * Hinverse; + if (Q == 0.0) + { + return vector_type(0.0); + } + else if (Q < 1.0) + { + return scale_GradW * (-3.0 * Q + (9.0 / 4.0) * Q * Q) * pos; + } + else if (Q < 2.0) + { + double q2 = (2.0 - Q); + return scale_GradW * (-3.0 / 4.0) * q2 * q2 * pos; + } + else + { + return vector_type(0.0); + } + } + + //--------------------------------------------------------------------- + // return the maximum distance at which this kernel is non zero + VTKM_EXEC_CONT + double maxDistance() const { return maxRadius_; } + + //--------------------------------------------------------------------- + // return the maximum distance at which this variable h kernel is non zero + VTKM_EXEC_CONT + double maxDistance(double h) const { return 2.0 * h; } + + //--------------------------------------------------------------------- + // return the maximum distance at which this kernel is non zero + VTKM_EXEC_CONT + double maxSquaredDistance() const { return maxRadius2_; } + + //--------------------------------------------------------------------- + // return the maximum distance at which this kernel is non zero + VTKM_EXEC_CONT + double maxSquaredDistance(double h) const { return 4.0 * h * h; } + + //--------------------------------------------------------------------- + // return the multiplier between smoothing length and max cutoff distance + VTKM_EXEC_CONT + double getDilationFactor() const { return 2.0; } private: - double norm_; - double Hinverse_; - double Hinverse2_; - double maxRadius_; - double maxRadius2_; - double scale_W_; - double scale_GradW_; + double norm_; + double Hinverse_; + double Hinverse2_; + double maxRadius_; + double maxRadius2_; + double scale_W_; + double scale_GradW_; }; - -}}} +} +} +} #endif diff --git a/vtkm/worklet/testing/UnitTestCellAverage.cxx b/vtkm/worklet/testing/UnitTestCellAverage.cxx index a2c53beb4..55ccb0645 100644 --- a/vtkm/worklet/testing/UnitTestCellAverage.cxx +++ b/vtkm/worklet/testing/UnitTestCellAverage.cxx @@ -24,7 +24,8 @@ #include #include -namespace { +namespace +{ void TestCellAverageUniform3D() { @@ -36,16 +37,13 @@ void TestCellAverageUniform3D() vtkm::cont::ArrayHandle result; vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke(dataSet.GetCellSet(), - dataSet.GetField("pointvar"), - result); + dispatcher.Invoke(dataSet.GetCellSet(), dataSet.GetField("pointvar"), result); vtkm::Float32 expected[4] = { 60.1875f, 70.2125f, 120.3375f, 130.3625f }; for (int i = 0; i < 4; ++i) { - VTKM_TEST_ASSERT( - test_equal(result.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for CellAverage worklet on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellAverage worklet on 3D uniform data"); } } @@ -59,17 +57,14 @@ void TestCellAverageUniform2D() vtkm::cont::ArrayHandle result; vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke(dataSet.GetCellSet(), - dataSet.GetField("pointvar"), - result); + dispatcher.Invoke(dataSet.GetCellSet(), dataSet.GetField("pointvar"), result); vtkm::Float32 expected[2] = { 30.1f, 40.1f }; std::cout << std::endl; for (int i = 0; i < 2; ++i) { - VTKM_TEST_ASSERT( - test_equal(result.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for CellAverage worklet on 2D uniform data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellAverage worklet on 2D uniform data"); } } @@ -83,30 +78,25 @@ void TestCellAverageExplicit() vtkm::cont::ArrayHandle result; vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke(dataSet.GetCellSet(), - dataSet.GetField("pointvar"), - result); + dispatcher.Invoke(dataSet.GetCellSet(), dataSet.GetField("pointvar"), result); vtkm::Float32 expected[2] = { 20.1333f, 35.2f }; for (int i = 0; i < 2; ++i) { - VTKM_TEST_ASSERT( - test_equal(result.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for CellAverage worklet on 3D explicit data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellAverage worklet on 3D explicit data"); } } - void TestCellAverage() { TestCellAverageUniform2D(); TestCellAverageUniform3D(); TestCellAverageExplicit(); } - } -int UnitTestCellAverage(int, char *[]) +int UnitTestCellAverage(int, char* []) { return vtkm::cont::testing::Testing::Run(TestCellAverage); } diff --git a/vtkm/worklet/testing/UnitTestCellDeepCopy.cxx b/vtkm/worklet/testing/UnitTestCellDeepCopy.cxx index 8cd22500d..fee7bea56 100644 --- a/vtkm/worklet/testing/UnitTestCellDeepCopy.cxx +++ b/vtkm/worklet/testing/UnitTestCellDeepCopy.cxx @@ -27,10 +27,10 @@ #include #include -namespace { +namespace +{ -vtkm::cont::CellSetExplicit<> -CreateCellSet() +vtkm::cont::CellSetExplicit<> CreateCellSet() { vtkm::cont::testing::MakeTestDataSet makeData; vtkm::cont::DataSet data = makeData.Make3DExplicitDataSet0(); @@ -39,31 +39,28 @@ CreateCellSet() return cellSet; } -vtkm::cont::CellSetPermutation< - vtkm::cont::CellSetExplicit<>, - vtkm::cont::ArrayHandleCounting > +vtkm::cont::CellSetPermutation, + vtkm::cont::ArrayHandleCounting> CreatePermutedCellSet() { std::cout << "Creating input cell set" << std::endl; vtkm::cont::CellSetExplicit<> cellSet = CreateCellSet(); return vtkm::cont::make_CellSetPermutation( - vtkm::cont::ArrayHandleCounting( - cellSet.GetNumberOfCells()-1, -1, cellSet.GetNumberOfCells()), - cellSet); + vtkm::cont::ArrayHandleCounting(cellSet.GetNumberOfCells() - 1, -1, + cellSet.GetNumberOfCells()), + cellSet); } -template -vtkm::cont::CellSetExplicit<> -DoCellDeepCopy(const CellSetType &inCells) +template +vtkm::cont::CellSetExplicit<> DoCellDeepCopy(const CellSetType& inCells) { std::cout << "Doing cell copy" << std::endl; - return vtkm::worklet::CellDeepCopy::Run(inCells, - VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); + return vtkm::worklet::CellDeepCopy::Run(inCells, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); } -void CheckOutput(const vtkm::cont::CellSetExplicit<> &copiedCells) +void CheckOutput(const vtkm::cont::CellSetExplicit<>& copiedCells) { std::cout << "Checking copied cells" << std::endl; @@ -77,36 +74,31 @@ void CheckOutput(const vtkm::cont::CellSetExplicit<> &copiedCells) for (vtkm::Id cellIndex = 0; cellIndex < numberOfCells; cellIndex++) { vtkm::Id oCellIndex = numberOfCells - cellIndex - 1; - VTKM_TEST_ASSERT(copiedCells.GetCellShape(cellIndex) == - originalCells.GetCellShape(oCellIndex), + VTKM_TEST_ASSERT(copiedCells.GetCellShape(cellIndex) == originalCells.GetCellShape(oCellIndex), "Bad cell shape"); - vtkm::IdComponent numPoints = - copiedCells.GetNumberOfPointsInCell(cellIndex); - VTKM_TEST_ASSERT( - numPoints == originalCells.GetNumberOfPointsInCell(oCellIndex), - "Bad number of points in cell"); + vtkm::IdComponent numPoints = copiedCells.GetNumberOfPointsInCell(cellIndex); + VTKM_TEST_ASSERT(numPoints == originalCells.GetNumberOfPointsInCell(oCellIndex), + "Bad number of points in cell"); // Only checking 3 points. All cells should have at least 3 - vtkm::Vec cellPoints; + vtkm::Vec cellPoints; copiedCells.GetIndices(cellIndex, cellPoints); - vtkm::Vec oCellPoints; + vtkm::Vec oCellPoints; originalCells.GetIndices(oCellIndex, oCellPoints); - VTKM_TEST_ASSERT(cellPoints == oCellPoints, - "Point indices not copied correctly"); + VTKM_TEST_ASSERT(cellPoints == oCellPoints, "Point indices not copied correctly"); } } void RunTest() { - vtkm::cont::CellSetExplicit<> cellSet = - DoCellDeepCopy(CreatePermutedCellSet()); + vtkm::cont::CellSetExplicit<> cellSet = DoCellDeepCopy(CreatePermutedCellSet()); CheckOutput(cellSet); } -} // anonymous namespace +} // anonymous namespace -int UnitTestCellDeepCopy(int, char *[]) +int UnitTestCellDeepCopy(int, char* []) { return vtkm::cont::testing::Testing::Run(RunTest); } diff --git a/vtkm/worklet/testing/UnitTestCellGradient.cxx b/vtkm/worklet/testing/UnitTestCellGradient.cxx index 04a741027..1d7451e0a 100644 --- a/vtkm/worklet/testing/UnitTestCellGradient.cxx +++ b/vtkm/worklet/testing/UnitTestCellGradient.cxx @@ -24,8 +24,8 @@ #include #include -namespace { - +namespace +{ void TestCellGradientUniform2D() { @@ -34,24 +34,20 @@ void TestCellGradientUniform2D() vtkm::cont::testing::MakeTestDataSet testDataSet; vtkm::cont::DataSet dataSet = testDataSet.Make2DUniformDataSet0(); - vtkm::cont::ArrayHandle< vtkm::Vec > result; + vtkm::cont::ArrayHandle> result; vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke(dataSet.GetCellSet(), - dataSet.GetCoordinateSystem(), - dataSet.GetField("pointvar"), - result); + dispatcher.Invoke(dataSet.GetCellSet(), dataSet.GetCoordinateSystem(), + dataSet.GetField("pointvar"), result); - vtkm::Vec expected[2] = { {10,30,0}, {10,30,0} }; + vtkm::Vec expected[2] = { { 10, 30, 0 }, { 10, 30, 0 } }; for (int i = 0; i < 2; ++i) { - VTKM_TEST_ASSERT( - test_equal(result.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for CellGradient worklet on 2D uniform data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellGradient worklet on 2D uniform data"); } } - void TestCellGradientUniform3D() { std::cout << "Testing CellGradient Worklet on 3D strucutred data" << std::endl; @@ -59,78 +55,66 @@ void TestCellGradientUniform3D() vtkm::cont::testing::MakeTestDataSet testDataSet; vtkm::cont::DataSet dataSet = testDataSet.Make3DUniformDataSet0(); - vtkm::cont::ArrayHandle< vtkm::Vec > result; + vtkm::cont::ArrayHandle> result; vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke(dataSet.GetCellSet(), - dataSet.GetCoordinateSystem(), - dataSet.GetField("pointvar"), - result); + dispatcher.Invoke(dataSet.GetCellSet(), dataSet.GetCoordinateSystem(), + dataSet.GetField("pointvar"), result); - vtkm::Vec expected[4] = { {10.025,30.075,60.125}, - {10.025,30.075,60.125}, - {10.025,30.075,60.175}, - {10.025,30.075,60.175}, - }; + vtkm::Vec expected[4] = { + { 10.025, 30.075, 60.125 }, + { 10.025, 30.075, 60.125 }, + { 10.025, 30.075, 60.175 }, + { 10.025, 30.075, 60.175 }, + }; for (int i = 0; i < 4; ++i) { - VTKM_TEST_ASSERT( - test_equal(result.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for CellGradient worklet on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellGradient worklet on 3D uniform data"); } - } void TestCellGradientUniform3DWithVectorField() { - std::cout << "Testing CellGradient Worklet with a vector field on 3D strucutred data" << std::endl; + std::cout << "Testing CellGradient Worklet with a vector field on 3D strucutred data" + << std::endl; vtkm::cont::testing::MakeTestDataSet testDataSet; vtkm::cont::DataSet dataSet = testDataSet.Make3DUniformDataSet0(); //Verify that we can compute the gradient of a 3 component vector const int nVerts = 18; - vtkm::Float64 vars[nVerts] = {10.1, 20.1, 30.1, 40.1, 50.2, - 60.2, 70.2, 80.2, 90.3, 100.3, - 110.3, 120.3, 130.4, 140.4, - 150.4, 160.4, 170.5, 180.5}; - std::vector< vtkm::Vec > vec(18); - for(std::size_t i=0; i < vec.size(); ++i) + vtkm::Float64 vars[nVerts] = { 10.1, 20.1, 30.1, 40.1, 50.2, 60.2, 70.2, 80.2, 90.3, + 100.3, 110.3, 120.3, 130.4, 140.4, 150.4, 160.4, 170.5, 180.5 }; + std::vector> vec(18); + for (std::size_t i = 0; i < vec.size(); ++i) { - vec[i] = vtkm::make_Vec(vars[i],vars[i],vars[i]); + vec[i] = vtkm::make_Vec(vars[i], vars[i], vars[i]); } - vtkm::cont::ArrayHandle< vtkm::Vec > input = - vtkm::cont::make_ArrayHandle(vec); + vtkm::cont::ArrayHandle> input = vtkm::cont::make_ArrayHandle(vec); //we need to add Vec3 array to the dataset - vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::Vec, 3> > result; + vtkm::cont::ArrayHandle, 3>> result; vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke(dataSet.GetCellSet(), - dataSet.GetCoordinateSystem(), - input, - result); + dispatcher.Invoke(dataSet.GetCellSet(), dataSet.GetCoordinateSystem(), input, result); - vtkm::Vec< vtkm::Vec, 3> expected[4] = { - { {10.025,10.025,10.025}, {30.075,30.075,30.075}, {60.125,60.125,60.125} }, - { {10.025,10.025,10.025}, {30.075,30.075,30.075}, {60.125,60.125,60.125} }, - { {10.025,10.025,10.025}, {30.075,30.075,30.075}, {60.175,60.175,60.175} }, - { {10.025,10.025,10.025}, {30.075,30.075,30.075}, {60.175,60.175,60.175} } - }; + vtkm::Vec, 3> expected[4] = { + { { 10.025, 10.025, 10.025 }, { 30.075, 30.075, 30.075 }, { 60.125, 60.125, 60.125 } }, + { { 10.025, 10.025, 10.025 }, { 30.075, 30.075, 30.075 }, { 60.125, 60.125, 60.125 } }, + { { 10.025, 10.025, 10.025 }, { 30.075, 30.075, 30.075 }, { 60.175, 60.175, 60.175 } }, + { { 10.025, 10.025, 10.025 }, { 30.075, 30.075, 30.075 }, { 60.175, 60.175, 60.175 } } + }; for (int i = 0; i < 4; ++i) { - vtkm::Vec< vtkm::Vec, 3> e = expected[i]; - vtkm::Vec< vtkm::Vec, 3> r = result.GetPortalConstControl().Get(i); + vtkm::Vec, 3> e = expected[i]; + vtkm::Vec, 3> r = result.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT( - test_equal(e[0],r[0]), - "Wrong result for vec field CellGradient worklet on 3D uniform data"); - VTKM_TEST_ASSERT( - test_equal(e[1],r[1]), - "Wrong result for vec field CellGradient worklet on 3D uniform data"); - VTKM_TEST_ASSERT( - test_equal(e[2],r[2]), - "Wrong result for vec field CellGradient worklet on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(e[0], r[0]), + "Wrong result for vec field CellGradient worklet on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(e[1], r[1]), + "Wrong result for vec field CellGradient worklet on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(e[2], r[2]), + "Wrong result for vec field CellGradient worklet on 3D uniform data"); } - } void TestCellGradientExplicit() @@ -140,24 +124,20 @@ void TestCellGradientExplicit() vtkm::cont::testing::MakeTestDataSet testDataSet; vtkm::cont::DataSet dataSet = testDataSet.Make3DExplicitDataSet0(); - vtkm::cont::ArrayHandle< vtkm::Vec > result; + vtkm::cont::ArrayHandle> result; vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke(dataSet.GetCellSet(), - dataSet.GetCoordinateSystem(), - dataSet.GetField("pointvar"), - result); + dispatcher.Invoke(dataSet.GetCellSet(), dataSet.GetCoordinateSystem(), + dataSet.GetField("pointvar"), result); - vtkm::Vec expected[2] = { {10.f,10.1f,0.0f}, {10.f,10.1f,-0.0f} }; + vtkm::Vec expected[2] = { { 10.f, 10.1f, 0.0f }, { 10.f, 10.1f, -0.0f } }; for (int i = 0; i < 2; ++i) { - VTKM_TEST_ASSERT( - test_equal(result.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for CellGradient worklet on 3D explicit data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for CellGradient worklet on 3D explicit data"); } } - void TestCellGradient() { TestCellGradientUniform2D(); @@ -165,10 +145,9 @@ void TestCellGradient() TestCellGradientUniform3DWithVectorField(); TestCellGradientExplicit(); } - } -int UnitTestCellGradient(int, char *[]) +int UnitTestCellGradient(int, char* []) { return vtkm::cont::testing::Testing::Run(TestCellGradient); } diff --git a/vtkm/worklet/testing/UnitTestClipping.cxx b/vtkm/worklet/testing/UnitTestClipping.cxx index d3caefe36..6f51ac156 100644 --- a/vtkm/worklet/testing/UnitTestClipping.cxx +++ b/vtkm/worklet/testing/UnitTestClipping.cxx @@ -39,8 +39,8 @@ typedef vtkm::Vec Coord3D; const vtkm::Float32 clipValue = 0.5; -template -bool TestArrayHandle(const vtkm::cont::ArrayHandle &ah, const T *expected, +template +bool TestArrayHandle(const vtkm::cont::ArrayHandle& ah, const T* expected, vtkm::Id size) { if (size != ah.GetNumberOfValues()) @@ -62,10 +62,10 @@ bool TestArrayHandle(const vtkm::cont::ArrayHandle &ah, const T *exp vtkm::cont::DataSet MakeTestDatasetExplicit() { std::vector coords; - coords.push_back( Coord3D(0.0f, 0.0f, 0.0f) ); - coords.push_back( Coord3D(1.0f, 0.0f, 0.0f) ); - coords.push_back( Coord3D(1.0f, 1.0f, 0.0f) ); - coords.push_back( Coord3D(0.0f, 1.0f, 0.0f) ); + coords.push_back(Coord3D(0.0f, 0.0f, 0.0f)); + coords.push_back(Coord3D(1.0f, 0.0f, 0.0f)); + coords.push_back(Coord3D(1.0f, 1.0f, 0.0f)); + coords.push_back(Coord3D(0.0f, 1.0f, 0.0f)); std::vector connectivity; connectivity.push_back(0); @@ -120,25 +120,19 @@ void TestClippingExplicit() vtkm::worklet::Clip clip; vtkm::cont::CellSetExplicit<> outputCellSet = - clip.Run(ds.GetCellSet(0), - ds.GetField("scalars").GetData(), - clipValue, - DeviceAdapter()); - + clip.Run(ds.GetCellSet(0), ds.GetField("scalars").GetData(), clipValue, DeviceAdapter()); vtkm::cont::DynamicArrayHandle coords = - clip.ProcessField(ds.GetCoordinateSystem("coords"), DeviceAdapter()); + clip.ProcessField(ds.GetCoordinateSystem("coords"), DeviceAdapter()); vtkm::cont::DynamicArrayHandle scalars = - clip.ProcessField(ds.GetField("scalars"), DeviceAdapter()); - + clip.ProcessField(ds.GetField("scalars"), DeviceAdapter()); vtkm::Id connectivitySize = 12; vtkm::Id fieldSize = 7; vtkm::Id expectedConnectivity[] = { 5, 4, 0, 5, 0, 1, 5, 1, 6, 6, 1, 2 }; Coord3D expectedCoords[] = { - Coord3D(0.00f, 0.00f, 0.0f), Coord3D(1.00f, 0.00f, 0.0f), - Coord3D(1.00f, 1.00f, 0.0f), Coord3D(0.00f, 1.00f, 0.0f), - Coord3D(0.00f, 0.50f, 0.0f), Coord3D(0.25f, 0.75f, 0.0f), + Coord3D(0.00f, 0.00f, 0.0f), Coord3D(1.00f, 0.00f, 0.0f), Coord3D(1.00f, 1.00f, 0.0f), + Coord3D(0.00f, 1.00f, 0.0f), Coord3D(0.00f, 0.50f, 0.0f), Coord3D(0.25f, 0.75f, 0.0f), Coord3D(0.50f, 1.00f, 0.0f), }; vtkm::Float32 expectedScalars[] = { 1, 2, 1, 0, 0.5, 0.5, 0.5 }; @@ -147,25 +141,19 @@ void TestClippingExplicit() "Wrong number of points in cell set."); VTKM_TEST_ASSERT( - TestArrayHandle(outputCellSet.GetConnectivityArray( - vtkm::TopologyElementTagPoint(),vtkm::TopologyElementTagCell()), - expectedConnectivity, - connectivitySize), - "Got incorrect conectivity"); + TestArrayHandle(outputCellSet.GetConnectivityArray(vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell()), + expectedConnectivity, connectivitySize), + "Got incorrect conectivity"); + + VTKM_TEST_ASSERT(TestArrayHandle(coords.CastToTypeStorage(), + expectedCoords, fieldSize), + "Got incorrect coordinates"); VTKM_TEST_ASSERT( - TestArrayHandle( - coords.CastToTypeStorage(), - expectedCoords, - fieldSize), - "Got incorrect coordinates"); - - VTKM_TEST_ASSERT( - TestArrayHandle( - scalars.CastToTypeStorage(), - expectedScalars, - fieldSize), - "Got incorrect scalars"); + TestArrayHandle(scalars.CastToTypeStorage(), + expectedScalars, fieldSize), + "Got incorrect scalars"); } template @@ -175,22 +163,18 @@ void TestClippingStrucutred() vtkm::worklet::Clip clip; vtkm::cont::CellSetExplicit<> outputCellSet = - clip.Run(ds.GetCellSet(0), - ds.GetField("scalars").GetData(), - clipValue, - DeviceAdapter()); - + clip.Run(ds.GetCellSet(0), ds.GetField("scalars").GetData(), clipValue, DeviceAdapter()); vtkm::cont::DynamicArrayHandle coords = - clip.ProcessField(ds.GetCoordinateSystem("coords"), DeviceAdapter()); + clip.ProcessField(ds.GetCoordinateSystem("coords"), DeviceAdapter()); vtkm::cont::DynamicArrayHandle scalars = - clip.ProcessField(ds.GetField("scalars"), DeviceAdapter()); + clip.ProcessField(ds.GetField("scalars"), DeviceAdapter()); vtkm::Id connectivitySize = 36; vtkm::Id fieldSize = 13; - vtkm::Id expectedConnectivity[] = { - 0, 1, 9, 0, 9, 10, 0, 10, 3, 1, 2, 9, 2, 11, 9, 2, 5, 11, - 3, 10, 6, 10, 12, 6, 12, 7, 6, 11, 5, 8, 11, 8, 12, 8, 7, 12 }; + vtkm::Id expectedConnectivity[] = { 0, 1, 9, 0, 9, 10, 0, 10, 3, 1, 2, 9, + 2, 11, 9, 2, 5, 11, 3, 10, 6, 10, 12, 6, + 12, 7, 6, 11, 5, 8, 11, 8, 12, 8, 7, 12 }; Coord3D expectedCoords[] = { Coord3D(0.0f, 0.0f, 0.0f), Coord3D(1.0f, 0.0f, 0.0f), Coord3D(2.0f, 0.0f, 0.0f), Coord3D(0.0f, 1.0f, 0.0f), Coord3D(1.0f, 1.0f, 0.0f), Coord3D(2.0f, 1.0f, 0.0f), @@ -204,25 +188,19 @@ void TestClippingStrucutred() "Wrong number of points in cell set."); VTKM_TEST_ASSERT( - TestArrayHandle(outputCellSet.GetConnectivityArray( - vtkm::TopologyElementTagPoint(),vtkm::TopologyElementTagCell()), - expectedConnectivity, - connectivitySize), - "Got incorrect conectivity"); + TestArrayHandle(outputCellSet.GetConnectivityArray(vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell()), + expectedConnectivity, connectivitySize), + "Got incorrect conectivity"); + + VTKM_TEST_ASSERT(TestArrayHandle(coords.CastToTypeStorage(), + expectedCoords, fieldSize), + "Got incorrect coordinates"); VTKM_TEST_ASSERT( - TestArrayHandle( - coords.CastToTypeStorage(), - expectedCoords, - fieldSize), - "Got incorrect coordinates"); - - VTKM_TEST_ASSERT( - TestArrayHandle( - scalars.CastToTypeStorage(), - expectedScalars, - fieldSize), - "Got incorrect scalars"); + TestArrayHandle(scalars.CastToTypeStorage(), + expectedScalars, fieldSize), + "Got incorrect scalars"); } template @@ -236,52 +214,41 @@ void TestClippingWithImplicitFunction() vtkm::worklet::Clip clip; vtkm::cont::CellSetExplicit<> outputCellSet = - clip.Run(ds.GetCellSet(0), - sphere, - ds.GetCoordinateSystem("coords"), - DeviceAdapter()); - + clip.Run(ds.GetCellSet(0), sphere, ds.GetCoordinateSystem("coords"), DeviceAdapter()); vtkm::cont::DynamicArrayHandle coords = - clip.ProcessField(ds.GetCoordinateSystem("coords"), DeviceAdapter()); + clip.ProcessField(ds.GetCoordinateSystem("coords"), DeviceAdapter()); vtkm::cont::DynamicArrayHandle scalars = - clip.ProcessField(ds.GetField("scalars"), DeviceAdapter()); + clip.ProcessField(ds.GetField("scalars"), DeviceAdapter()); vtkm::Id connectivitySize = 36; vtkm::Id fieldSize = 13; - vtkm::Id expectedConnectivity[] = { - 0, 1, 9, 0, 9, 10, 0, 10, 3, 1, 2, 9, 2, 11, 9, 2, 5, 11, - 3, 10, 6, 10, 12, 6, 12, 7, 6, 11, 5, 8, 11, 8, 12, 8, 7, 12 }; + vtkm::Id expectedConnectivity[] = { 0, 1, 9, 0, 9, 10, 0, 10, 3, 1, 2, 9, + 2, 11, 9, 2, 5, 11, 3, 10, 6, 10, 12, 6, + 12, 7, 6, 11, 5, 8, 11, 8, 12, 8, 7, 12 }; Coord3D expectedCoords[] = { - Coord3D(0.0f, 0.0f, 0.0f), Coord3D( 1.0f, 0.0f, 0.0f), Coord3D( 2.0f, 0.0f, 0.0f), - Coord3D(0.0f, 1.0f, 0.0f), Coord3D( 1.0f, 1.0f, 0.0f), Coord3D( 2.0f, 1.0f, 0.0f), - Coord3D(0.0f, 2.0f, 0.0f), Coord3D( 1.0f, 2.0f, 0.0f), Coord3D( 2.0f, 2.0f, 0.0f), + Coord3D(0.0f, 0.0f, 0.0f), Coord3D(1.0f, 0.0f, 0.0f), Coord3D(2.0f, 0.0f, 0.0f), + Coord3D(0.0f, 1.0f, 0.0f), Coord3D(1.0f, 1.0f, 0.0f), Coord3D(2.0f, 1.0f, 0.0f), + Coord3D(0.0f, 2.0f, 0.0f), Coord3D(1.0f, 2.0f, 0.0f), Coord3D(2.0f, 2.0f, 0.0f), Coord3D(1.0f, 0.75f, 0.0f), Coord3D(0.75f, 1.0f, 0.0f), Coord3D(1.25f, 1.0f, 0.0f), Coord3D(1.0f, 1.25f, 0.0f), }; - vtkm::Float32 expectedScalars[] = { 1, 1, 1, 1, 0, 1, 1, 1, 1, - 0.25, 0.25, 0.25, 0.25 }; + vtkm::Float32 expectedScalars[] = { 1, 1, 1, 1, 0, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.25 }; VTKM_TEST_ASSERT( - TestArrayHandle(outputCellSet.GetConnectivityArray( - vtkm::TopologyElementTagPoint(),vtkm::TopologyElementTagCell()), - expectedConnectivity, - connectivitySize), - "Got incorrect conectivity"); + TestArrayHandle(outputCellSet.GetConnectivityArray(vtkm::TopologyElementTagPoint(), + vtkm::TopologyElementTagCell()), + expectedConnectivity, connectivitySize), + "Got incorrect conectivity"); + + VTKM_TEST_ASSERT(TestArrayHandle(coords.CastToTypeStorage(), + expectedCoords, fieldSize), + "Got incorrect coordinates"); VTKM_TEST_ASSERT( - TestArrayHandle( - coords.CastToTypeStorage(), - expectedCoords, - fieldSize), - "Got incorrect coordinates"); - - VTKM_TEST_ASSERT( - TestArrayHandle( - scalars.CastToTypeStorage(), - expectedScalars, - fieldSize), - "Got incorrect scalars"); + TestArrayHandle(scalars.CastToTypeStorage(), + expectedScalars, fieldSize), + "Got incorrect scalars"); } template @@ -295,8 +262,7 @@ void TestClipping() TestClippingWithImplicitFunction(); } -int UnitTestClipping(int, char *[]) +int UnitTestClipping(int, char* []) { - return vtkm::cont::testing::Testing::Run( - TestClipping); + return vtkm::cont::testing::Testing::Run(TestClipping); } diff --git a/vtkm/worklet/testing/UnitTestContourTreeUniform.cxx b/vtkm/worklet/testing/UnitTestContourTreeUniform.cxx index a81c0fecc..cac720b64 100644 --- a/vtkm/worklet/testing/UnitTestContourTreeUniform.cxx +++ b/vtkm/worklet/testing/UnitTestContourTreeUniform.cxx @@ -20,48 +20,48 @@ // Copyright (c) 2016, Los Alamos National Security, LLC // All rights reserved. // -// Copyright 2016. Los Alamos National Security, LLC. -// This software was produced under U.S. Government contract DE-AC52-06NA25396 -// for Los Alamos National Laboratory (LANL), which is operated by -// Los Alamos National Security, LLC for the U.S. Department of Energy. -// The U.S. Government has rights to use, reproduce, and distribute this -// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC -// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE -// USE OF THIS SOFTWARE. If software is modified to produce derivative works, -// such modified software should be clearly marked, so as not to confuse it +// Copyright 2016. Los Alamos National Security, LLC. +// This software was produced under U.S. Government contract DE-AC52-06NA25396 +// for Los Alamos National Laboratory (LANL), which is operated by +// Los Alamos National Security, LLC for the U.S. Department of Energy. +// The U.S. Government has rights to use, reproduce, and distribute this +// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC +// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE +// USE OF THIS SOFTWARE. If software is modified to produce derivative works, +// such modified software should be clearly marked, so as not to confuse it // with the version available from LANL. // -// Additionally, redistribution and use in source and binary forms, with or -// without modification, are permitted provided that the following conditions +// Additionally, redistribution and use in source and binary forms, with or +// without modification, are permitted provided that the following conditions // are met: // -// 1. Redistributions of source code must retain the above copyright notice, +// 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. -// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos -// National Laboratory, LANL, the U.S. Government, nor the names of its -// contributors may be used to endorse or promote products derived from +// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos +// National Laboratory, LANL, the U.S. Government, nor the names of its +// contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND -// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS -// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS +// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //============================================================================ -// This code is based on the algorithm presented in the paper: -// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” -// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. -// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization +// This code is based on the algorithm presented in the paper: +// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” +// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens. +// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization // (LDAV), October 2016, Baltimore, Maryland. #include @@ -69,7 +69,8 @@ #include #include -namespace { +namespace +{ using vtkm::cont::testing::MakeTestDataSet; @@ -83,48 +84,44 @@ public: void TestContourTree_Mesh2D_DEM_Triangulation() const { std::cout << "Testing ContourTree_Mesh2D Filter" << std::endl; - + // Create the input uniform cell set with values to contour vtkm::cont::DataSet dataSet = MakeTestDataSet().Make2DUniformDataSet1(); - + vtkm::cont::CellSetStructured<2> cellSet; dataSet.GetCellSet().CopyTo(cellSet); - + vtkm::Id2 pointDimensions = cellSet.GetPointDimensions(); vtkm::Id nRows = pointDimensions[0]; vtkm::Id nCols = pointDimensions[1]; - + vtkm::cont::ArrayHandle fieldArray; dataSet.GetField("pointvar").GetData().CopyTo(fieldArray); - + // Output saddle peak pairs array - vtkm::cont::ArrayHandle > saddlePeak; - + vtkm::cont::ArrayHandle> saddlePeak; + // Create the worklet and run it vtkm::worklet::ContourTreeMesh2D contourTreeMesh2D; - - contourTreeMesh2D.Run(fieldArray, - nRows, - nCols, - saddlePeak, - DeviceAdapter()); - - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetNumberOfValues(), 7), + + contourTreeMesh2D.Run(fieldArray, nRows, nCols, saddlePeak, DeviceAdapter()); + + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetNumberOfValues(), 7), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(0), vtkm::make_Pair(0, 12)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(1), vtkm::make_Pair(4, 13)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(2), vtkm::make_Pair(12, 13)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(3), vtkm::make_Pair(12, 18)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(4), vtkm::make_Pair(12, 20)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(5), vtkm::make_Pair(13, 14)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(6), vtkm::make_Pair(13, 19)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(0), - vtkm::make_Pair( 0, 12)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(1), - vtkm::make_Pair( 4, 13)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(2), - vtkm::make_Pair(12, 13)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(3), - vtkm::make_Pair(12, 18)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(4), - vtkm::make_Pair(12, 20)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(5), - vtkm::make_Pair(13, 14)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(6), - vtkm::make_Pair(13, 19)), "Wrong result for ContourTree filter"); } // @@ -133,66 +130,60 @@ public: void TestContourTree_Mesh3D_DEM_Triangulation() const { std::cout << "Testing ContourTree_Mesh3D Filter" << std::endl; - + // Create the input uniform cell set with values to contour vtkm::cont::DataSet dataSet = MakeTestDataSet().Make3DUniformDataSet1(); - + vtkm::cont::CellSetStructured<3> cellSet; dataSet.GetCellSet().CopyTo(cellSet); - + vtkm::Id3 pointDimensions = cellSet.GetPointDimensions(); vtkm::Id nRows = pointDimensions[0]; vtkm::Id nCols = pointDimensions[1]; vtkm::Id nSlices = pointDimensions[2]; - + vtkm::cont::ArrayHandle fieldArray; dataSet.GetField("pointvar").GetData().CopyTo(fieldArray); - + // Output saddle peak pairs array - vtkm::cont::ArrayHandle > saddlePeak; - + vtkm::cont::ArrayHandle> saddlePeak; + // Create the worklet and run it vtkm::worklet::ContourTreeMesh3D contourTreeMesh3D; - - contourTreeMesh3D.Run(fieldArray, - nRows, - nCols, - nSlices, - saddlePeak, - DeviceAdapter()); - - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetNumberOfValues(), 9), + + contourTreeMesh3D.Run(fieldArray, nRows, nCols, nSlices, saddlePeak, DeviceAdapter()); + + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetNumberOfValues(), 9), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(0), vtkm::make_Pair(0, 67)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(1), vtkm::make_Pair(31, 42)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(2), vtkm::make_Pair(42, 43)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(3), vtkm::make_Pair(42, 56)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(4), vtkm::make_Pair(56, 67)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(5), vtkm::make_Pair(56, 92)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(6), vtkm::make_Pair(62, 67)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(7), vtkm::make_Pair(81, 92)), + "Wrong result for ContourTree filter"); + VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(8), vtkm::make_Pair(92, 93)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(0), - vtkm::make_Pair( 0, 67)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(1), - vtkm::make_Pair(31, 42)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(2), - vtkm::make_Pair(42, 43)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(3), - vtkm::make_Pair(42, 56)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(4), - vtkm::make_Pair(56, 67)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(5), - vtkm::make_Pair(56, 92)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(6), - vtkm::make_Pair(62, 67)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(7), - vtkm::make_Pair(81, 92)), "Wrong result for ContourTree filter"); - VTKM_TEST_ASSERT(test_equal(saddlePeak.GetPortalControl().Get(8), - vtkm::make_Pair(92, 93)), "Wrong result for ContourTree filter"); } - + void operator()() const { this->TestContourTree_Mesh2D_DEM_Triangulation(); this->TestContourTree_Mesh3D_DEM_Triangulation(); } }; - } -int UnitTestContourTreeUniform(int, char *[]) +int UnitTestContourTreeUniform(int, char* []) { return vtkm::cont::testing::Testing::Run( TestContourTreeUniform()); diff --git a/vtkm/worklet/testing/UnitTestExternalFaces.cxx b/vtkm/worklet/testing/UnitTestExternalFaces.cxx index d53e3a5cd..1bb4f9f1e 100644 --- a/vtkm/worklet/testing/UnitTestExternalFaces.cxx +++ b/vtkm/worklet/testing/UnitTestExternalFaces.cxx @@ -32,7 +32,8 @@ #include #include -namespace { +namespace +{ // For this test, we want using the default device adapter to be an error // to make sure that all the code is using the device adapter we specify. @@ -40,7 +41,7 @@ using MyDeviceAdapter = VTKM_DEFAULT_DEVICE_ADAPTER_TAG; #undef VTKM_DEFAULT_DEVICE_ADAPTER_TAG #define VTKM_DEFAULT_DEVICE_ADAPTER_TAG ::vtkm::cont::DeviceAdapterTagError -vtkm::cont::DataSet RunExternalFaces(vtkm::cont::DataSet &inDataSet) +vtkm::cont::DataSet RunExternalFaces(vtkm::cont::DataSet& inDataSet) { vtkm::cont::CellSetExplicit<> inCellSet; @@ -49,12 +50,10 @@ vtkm::cont::DataSet RunExternalFaces(vtkm::cont::DataSet &inDataSet) vtkm::cont::CellSetExplicit<> outCellSet("cells"); //Run the External Faces worklet - vtkm::worklet::ExternalFaces().Run(inCellSet, - outCellSet, - MyDeviceAdapter()); + vtkm::worklet::ExternalFaces().Run(inCellSet, outCellSet, MyDeviceAdapter()); vtkm::cont::DataSet outDataSet; - for(vtkm::IdComponent i=0; i < inDataSet.GetNumberOfCoordinateSystems(); ++i) + for (vtkm::IdComponent i = 0; i < inDataSet.GetNumberOfCoordinateSystems(); ++i) { outDataSet.AddCoordinateSystem(inDataSet.GetCoordinateSystem(i)); } @@ -70,38 +69,36 @@ void TestExternalFaces1() //--------------Construct a VTK-m Test Dataset---------------- const int nVerts = 8; //A cube that is tetrahedralized - typedef vtkm::Vec CoordType; - vtkm::cont::ArrayHandle< CoordType > coordinates; + typedef vtkm::Vec CoordType; + vtkm::cont::ArrayHandle coordinates; coordinates.Allocate(nVerts); - coordinates.GetPortalControl().Set(0, CoordType(0.0f, 0.0f, 0.0f) ); - coordinates.GetPortalControl().Set(1, CoordType(1.0f, 0.0f, 0.0f) ); - coordinates.GetPortalControl().Set(2, CoordType(1.0f, 1.0f, 0.0f) ); - coordinates.GetPortalControl().Set(3, CoordType(0.0f, 1.0f, 0.0f) ); - coordinates.GetPortalControl().Set(4, CoordType(0.0f, 0.0f, 1.0f) ); - coordinates.GetPortalControl().Set(5, CoordType(1.0f, 0.0f, 1.0f) ); - coordinates.GetPortalControl().Set(6, CoordType(1.0f, 1.0f, 1.0f) ); - coordinates.GetPortalControl().Set(7, CoordType(0.0f, 1.0f, 1.0f) ); + coordinates.GetPortalControl().Set(0, CoordType(0.0f, 0.0f, 0.0f)); + coordinates.GetPortalControl().Set(1, CoordType(1.0f, 0.0f, 0.0f)); + coordinates.GetPortalControl().Set(2, CoordType(1.0f, 1.0f, 0.0f)); + coordinates.GetPortalControl().Set(3, CoordType(0.0f, 1.0f, 0.0f)); + coordinates.GetPortalControl().Set(4, CoordType(0.0f, 0.0f, 1.0f)); + coordinates.GetPortalControl().Set(5, CoordType(1.0f, 0.0f, 1.0f)); + coordinates.GetPortalControl().Set(6, CoordType(1.0f, 1.0f, 1.0f)); + coordinates.GetPortalControl().Set(7, CoordType(0.0f, 1.0f, 1.0f)); //Construct the VTK-m shapes and numIndices connectivity arrays - const int nCells = 6; //The tetrahedrons of the cube - vtkm::IdComponent cellVerts[nCells][4] = { - {4,7,6,3}, {4,6,3,2}, {4,0,3,2}, - {4,6,5,2}, {4,5,0,2}, {1,0,5,2} - }; + const int nCells = 6; //The tetrahedrons of the cube + vtkm::IdComponent cellVerts[nCells][4] = { { 4, 7, 6, 3 }, { 4, 6, 3, 2 }, { 4, 0, 3, 2 }, + { 4, 6, 5, 2 }, { 4, 5, 0, 2 }, { 1, 0, 5, 2 } }; - vtkm::cont::ArrayHandle shapes; + vtkm::cont::ArrayHandle shapes; vtkm::cont::ArrayHandle numIndices; - vtkm::cont::ArrayHandle conn; + vtkm::cont::ArrayHandle conn; shapes.Allocate(static_cast(nCells)); numIndices.Allocate(static_cast(nCells)); conn.Allocate(static_cast(4 * nCells)); int index = 0; - for(int j = 0; j < nCells; j++) + for (int j = 0; j < nCells; j++) { shapes.GetPortalControl().Set(j, static_cast(vtkm::CELL_SHAPE_TETRA)); numIndices.GetPortalControl().Set(j, 4); - for(int k = 0; k < 4; k++) + for (int k = 0; k < 4; k++) conn.GetPortalControl().Set(index++, cellVerts[j][k]); } @@ -128,33 +125,23 @@ void TestExternalFaces2() vtkm::cont::testing::MakeTestDataSet dataSetMaker; vtkm::cont::DataSet inDataSet = dataSetMaker.Make3DExplicitDataSet5(); -// vtkm::io::writer::VTKDataSetWriter writer("vtkm_explicit_data_5.vtk"); -// writer.WriteDataSet(inDataSet); + // vtkm::io::writer::VTKDataSetWriter writer("vtkm_explicit_data_5.vtk"); + // writer.WriteDataSet(inDataSet); // Expected faces const vtkm::IdComponent MAX_POINTS_PER_FACE = 4; const vtkm::Id NUM_FACES = 12; const vtkm::Id ExpectedExternalFaces[NUM_FACES][MAX_POINTS_PER_FACE] = { - { 0, 3, 7, 4 }, - { 0, 1, 2, 3 }, - { 0, 4, 5, 1 }, - { 3, 2, 6, 7 }, - { 1, 5, 8, -1 }, - { 6, 2, 8, -1 }, - { 2, 1, 8, -1 }, - { 8, 10, 6, -1 }, - { 5, 10, 8, -1 }, - { 4, 7, 9, -1 }, - { 7, 6, 10, 9 }, - { 9, 10, 5, 4 } + { 0, 3, 7, 4 }, { 0, 1, 2, 3 }, { 0, 4, 5, 1 }, { 3, 2, 6, 7 }, + { 1, 5, 8, -1 }, { 6, 2, 8, -1 }, { 2, 1, 8, -1 }, { 8, 10, 6, -1 }, + { 5, 10, 8, -1 }, { 4, 7, 9, -1 }, { 7, 6, 10, 9 }, { 9, 10, 5, 4 } }; vtkm::cont::DataSet outDataSet = RunExternalFaces(inDataSet); vtkm::cont::CellSetExplicit<> outCellSet; outDataSet.GetCellSet(0).CopyTo(outCellSet); - VTKM_TEST_ASSERT(outCellSet.GetNumberOfCells() == NUM_FACES, - "Got wrong number of faces."); + VTKM_TEST_ASSERT(outCellSet.GetNumberOfCells() == NUM_FACES, "Got wrong number of faces."); bool foundFaces[NUM_FACES]; for (vtkm::Id faceId = 0; faceId < NUM_FACES; faceId++) @@ -164,17 +151,14 @@ void TestExternalFaces2() for (vtkm::Id dataFaceId = 0; dataFaceId < NUM_FACES; dataFaceId++) { - vtkm::Vec dataIndices(-1); + vtkm::Vec dataIndices(-1); outCellSet.GetIndices(dataFaceId, dataIndices); std::cout << "Looking for face " << dataIndices << std::endl; bool foundFace = false; - for (vtkm::Id expectedFaceId = 0; - expectedFaceId < NUM_FACES; - expectedFaceId++) + for (vtkm::Id expectedFaceId = 0; expectedFaceId < NUM_FACES; expectedFaceId++) { - vtkm::Vec expectedIndices; - vtkm::make_VecC(ExpectedExternalFaces[expectedFaceId], 4). - CopyInto(expectedIndices); + vtkm::Vec expectedIndices; + vtkm::make_VecC(ExpectedExternalFaces[expectedFaceId], 4).CopyInto(expectedIndices); if (expectedIndices == dataIndices) { VTKM_TEST_ASSERT(!foundFaces[expectedFaceId], "Found face twice."); @@ -193,10 +177,9 @@ void TestExternalFaces() TestExternalFaces1(); TestExternalFaces2(); } - } -int UnitTestExternalFaces(int, char *[]) +int UnitTestExternalFaces(int, char* []) { return vtkm::cont::testing::Testing::Run(TestExternalFaces); } diff --git a/vtkm/worklet/testing/UnitTestExtractGeometry.cxx b/vtkm/worklet/testing/UnitTestExtractGeometry.cxx index a3f9124b2..5bbc62207 100644 --- a/vtkm/worklet/testing/UnitTestExtractGeometry.cxx +++ b/vtkm/worklet/testing/UnitTestExtractGeometry.cxx @@ -36,9 +36,9 @@ public: typedef vtkm::cont::CellSetExplicit<> CellSetType; typedef vtkm::cont::CellSetPermutation OutCellSetType; - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); @@ -47,25 +47,21 @@ public: // Cells to extract const int nCells = 2; - vtkm::Id cellids[nCells] = {1, 2}; - vtkm::cont::ArrayHandle cellIds = - vtkm::cont::make_ArrayHandle(cellids, nCells); - + vtkm::Id cellids[nCells] = { 1, 2 }; + vtkm::cont::ArrayHandle cellIds = vtkm::cont::make_ArrayHandle(cellids, nCells); + // Output data set with cell set containing extracted cells and all points vtkm::worklet::ExtractGeometry extractGeometry; - OutCellSetType outCellSet = - extractGeometry.Run(cellSet, - cellIds, - DeviceAdapter()); + OutCellSetType outCellSet = extractGeometry.Run(cellSet, cellIds, DeviceAdapter()); - vtkm::cont::Field cellField = - extractGeometry.ProcessCellField(dataset.GetField("cellvar")); + vtkm::cont::Field cellField = extractGeometry.ProcessCellField(dataset.GetField("cellvar")); OutCellFieldArrayHandleType cellFieldArray; cellField.GetData().CopyTo(cellFieldArray); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), nCells), "Wrong result for ExtractCells"); + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), nCells), + "Wrong result for ExtractCells"); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == nCells && - cellFieldArray.GetPortalConstControl().Get(0) == 110.f, + cellFieldArray.GetPortalConstControl().Get(0) == 110.f, "Wrong cell field data"); } @@ -76,9 +72,9 @@ public: typedef vtkm::cont::CellSetExplicit<> CellSetType; typedef vtkm::cont::CellSetPermutation OutCellSetType; - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); @@ -93,26 +89,20 @@ public: bool extractInside = true; bool extractBoundaryCells = false; bool extractOnlyBoundaryCells = false; - + // Output data set with cell set containing extracted cells and all points vtkm::worklet::ExtractGeometry extractGeometry; - OutCellSetType outCellSet = - extractGeometry.Run(cellSet, - dataset.GetCoordinateSystem("coordinates"), - box, - extractInside, - extractBoundaryCells, - extractOnlyBoundaryCells, - DeviceAdapter()); + OutCellSetType outCellSet = + extractGeometry.Run(cellSet, dataset.GetCoordinateSystem("coordinates"), box, extractInside, + extractBoundaryCells, extractOnlyBoundaryCells, DeviceAdapter()); - vtkm::cont::Field cellField = - extractGeometry.ProcessCellField(dataset.GetField("cellvar")); + vtkm::cont::Field cellField = extractGeometry.ProcessCellField(dataset.GetField("cellvar")); OutCellFieldArrayHandleType cellFieldArray; cellField.GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 2), "Wrong result for ExtractCells"); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 2 && - cellFieldArray.GetPortalConstControl().Get(1) == 120.2f, + cellFieldArray.GetPortalConstControl().Get(1) == 120.2f, "Wrong cell field data"); } @@ -123,36 +113,32 @@ public: typedef vtkm::cont::CellSetStructured<2> CellSetType; typedef vtkm::cont::CellSetPermutation OutCellSetType; - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make2DUniformDataSet1(); CellSetType cellSet; dataset.GetCellSet(0).CopyTo(cellSet); - + // Cells to extract const int nCells = 5; - vtkm::Id cellids[nCells] = {0, 4, 5, 10, 15}; - vtkm::cont::ArrayHandle cellIds = - vtkm::cont::make_ArrayHandle(cellids, nCells); + vtkm::Id cellids[nCells] = { 0, 4, 5, 10, 15 }; + vtkm::cont::ArrayHandle cellIds = vtkm::cont::make_ArrayHandle(cellids, nCells); // Output data set permutation of with only extracted cells vtkm::worklet::ExtractGeometry extractGeometry; - OutCellSetType outCellSet = - extractGeometry.Run(cellSet, - cellIds, - DeviceAdapter()); + OutCellSetType outCellSet = extractGeometry.Run(cellSet, cellIds, DeviceAdapter()); - vtkm::cont::Field cellField = - extractGeometry.ProcessCellField(dataset.GetField("cellvar")); + vtkm::cont::Field cellField = extractGeometry.ProcessCellField(dataset.GetField("cellvar")); OutCellFieldArrayHandleType cellFieldArray; cellField.GetData().CopyTo(cellFieldArray); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), nCells), "Wrong result for ExtractCells"); + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), nCells), + "Wrong result for ExtractCells"); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == nCells && - cellFieldArray.GetPortalConstControl().Get(1) == 4.f, + cellFieldArray.GetPortalConstControl().Get(1) == 4.f, "Wrong cell field data"); } @@ -163,36 +149,32 @@ public: typedef vtkm::cont::CellSetStructured<3> CellSetType; typedef vtkm::cont::CellSetPermutation OutCellSetType; - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); CellSetType cellSet; dataset.GetCellSet(0).CopyTo(cellSet); - + // Cells to extract const int nCells = 5; - vtkm::Id cellids[nCells] = {0, 4, 5, 10, 15}; - vtkm::cont::ArrayHandle cellIds = - vtkm::cont::make_ArrayHandle(cellids, nCells); + vtkm::Id cellids[nCells] = { 0, 4, 5, 10, 15 }; + vtkm::cont::ArrayHandle cellIds = vtkm::cont::make_ArrayHandle(cellids, nCells); // Output data set with cell set containing extracted cells and all points vtkm::worklet::ExtractGeometry extractGeometry; - OutCellSetType outCellSet = - extractGeometry.Run(cellSet, - cellIds, - DeviceAdapter()); + OutCellSetType outCellSet = extractGeometry.Run(cellSet, cellIds, DeviceAdapter()); - vtkm::cont::Field cellField = - extractGeometry.ProcessCellField(dataset.GetField("cellvar")); + vtkm::cont::Field cellField = extractGeometry.ProcessCellField(dataset.GetField("cellvar")); OutCellFieldArrayHandleType cellFieldArray; cellField.GetData().CopyTo(cellFieldArray); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), nCells), "Wrong result for ExtractCells"); + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), nCells), + "Wrong result for ExtractCells"); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == nCells && - cellFieldArray.GetPortalConstControl().Get(2) == 5.f, + cellFieldArray.GetPortalConstControl().Get(2) == 5.f, "Wrong cell field data"); } @@ -203,43 +185,37 @@ public: typedef vtkm::cont::CellSetStructured<3> CellSetType; typedef vtkm::cont::CellSetPermutation OutCellSetType; - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); CellSetType cellSet; dataset.GetCellSet(0).CopyTo(cellSet); - + // Implicit function vtkm::Vec minPoint(1.0f, 1.0f, 1.0f); vtkm::Vec maxPoint(3.0f, 3.0f, 3.0f); vtkm::cont::Box box(minPoint, maxPoint); - + bool extractInside = true; bool extractBoundaryCells = false; bool extractOnlyBoundaryCells = false; // Output data set with cell set containing extracted points vtkm::worklet::ExtractGeometry extractGeometry; - OutCellSetType outCellSet = - extractGeometry.Run(cellSet, - dataset.GetCoordinateSystem("coords"), - box, - extractInside, - extractBoundaryCells, - extractOnlyBoundaryCells, - DeviceAdapter()); + OutCellSetType outCellSet = + extractGeometry.Run(cellSet, dataset.GetCoordinateSystem("coords"), box, extractInside, + extractBoundaryCells, extractOnlyBoundaryCells, DeviceAdapter()); - vtkm::cont::Field cellField = - extractGeometry.ProcessCellField(dataset.GetField("cellvar")); + vtkm::cont::Field cellField = extractGeometry.ProcessCellField(dataset.GetField("cellvar")); OutCellFieldArrayHandleType cellFieldArray; cellField.GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 8), "Wrong result for ExtractCells"); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 8 && - cellFieldArray.GetPortalConstControl().Get(0) == 21.f, + cellFieldArray.GetPortalConstControl().Get(0) == 21.f, "Wrong cell field data"); } @@ -250,43 +226,37 @@ public: typedef vtkm::cont::CellSetStructured<3> CellSetType; typedef vtkm::cont::CellSetPermutation OutCellSetType; - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); CellSetType cellSet; dataset.GetCellSet(0).CopyTo(cellSet); - + // Implicit function vtkm::Vec center(2.f, 2.f, 2.f); vtkm::FloatDefault radius(1.8f); vtkm::cont::Sphere sphere(center, radius); - + bool extractInside = true; bool extractBoundaryCells = false; bool extractOnlyBoundaryCells = false; // Output data set with cell set containing extracted cells vtkm::worklet::ExtractGeometry extractGeometry; - OutCellSetType outCellSet = - extractGeometry.Run(cellSet, - dataset.GetCoordinateSystem("coords"), - sphere, - extractInside, - extractBoundaryCells, - extractOnlyBoundaryCells, - DeviceAdapter()); + OutCellSetType outCellSet = + extractGeometry.Run(cellSet, dataset.GetCoordinateSystem("coords"), sphere, extractInside, + extractBoundaryCells, extractOnlyBoundaryCells, DeviceAdapter()); - vtkm::cont::Field cellField = - extractGeometry.ProcessCellField(dataset.GetField("cellvar")); + vtkm::cont::Field cellField = extractGeometry.ProcessCellField(dataset.GetField("cellvar")); OutCellFieldArrayHandleType cellFieldArray; cellField.GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 8), "Wrong result for ExtractCells"); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 8 && - cellFieldArray.GetPortalConstControl().Get(1) == 22.f, + cellFieldArray.GetPortalConstControl().Get(1) == 22.f, "Wrong cell field data"); } @@ -301,8 +271,8 @@ public: } }; -int UnitTestExtractGeometry(int, char *[]) +int UnitTestExtractGeometry(int, char* []) { return vtkm::cont::testing::Testing::Run( - TestingExtractGeometry()); + TestingExtractGeometry()); } diff --git a/vtkm/worklet/testing/UnitTestExtractPoints.cxx b/vtkm/worklet/testing/UnitTestExtractPoints.cxx index 795da49b1..1984fd6e4 100644 --- a/vtkm/worklet/testing/UnitTestExtractPoints.cxx +++ b/vtkm/worklet/testing/UnitTestExtractPoints.cxx @@ -37,12 +37,11 @@ public: // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); - + // Points to extract const int nPoints = 13; - vtkm::Id pointids[nPoints] = {0, 1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100}; - vtkm::cont::ArrayHandle pointIds = - vtkm::cont::make_ArrayHandle(pointids, nPoints); + vtkm::Id pointids[nPoints] = { 0, 1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100 }; + vtkm::cont::ArrayHandle pointIds = vtkm::cont::make_ArrayHandle(pointids, nPoints); // Output dataset contains input coordinate system and point data vtkm::cont::DataSet outDataSet; @@ -50,13 +49,11 @@ public: // Output data set with cell set containing extracted points vtkm::worklet::ExtractPoints extractPoints; - OutCellSetType outCellSet = - extractPoints.Run(dataset.GetCellSet(0), - pointIds, - DeviceAdapter()); + OutCellSetType outCellSet = extractPoints.Run(dataset.GetCellSet(0), pointIds, DeviceAdapter()); outDataSet.AddCellSet(outCellSet); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), nPoints), "Wrong result for ExtractPoints"); + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), nPoints), + "Wrong result for ExtractPoints"); } void TestUniformByBox0() const @@ -67,28 +64,26 @@ public: // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); - + // Implicit function vtkm::Vec minPoint(1.f, 1.f, 1.f); vtkm::Vec maxPoint(3.f, 3.f, 3.f); vtkm::cont::Box box(minPoint, maxPoint); bool extractInside = true; - + // Output dataset contains input coordinate system and point data vtkm::cont::DataSet outDataSet; outDataSet.AddCoordinateSystem(dataset.GetCoordinateSystem(0)); // Output data set with cell set containing extracted points vtkm::worklet::ExtractPoints extractPoints; - OutCellSetType outCellSet = - extractPoints.Run(dataset.GetCellSet(0), - dataset.GetCoordinateSystem("coords"), - box, - extractInside, - DeviceAdapter()); + OutCellSetType outCellSet = + extractPoints.Run(dataset.GetCellSet(0), dataset.GetCoordinateSystem("coords"), box, + extractInside, DeviceAdapter()); outDataSet.AddCellSet(outCellSet); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 27), "Wrong result for ExtractPoints"); + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 27), + "Wrong result for ExtractPoints"); } void TestUniformByBox1() const @@ -99,28 +94,26 @@ public: // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); - + // Implicit function vtkm::Vec minPoint(1.f, 1.f, 1.f); vtkm::Vec maxPoint(3.f, 3.f, 3.f); vtkm::cont::Box box(minPoint, maxPoint); bool extractInside = false; - + // Output dataset contains input coordinate system and point data vtkm::cont::DataSet outDataSet; outDataSet.AddCoordinateSystem(dataset.GetCoordinateSystem(0)); // Output data set with cell set containing extracted points vtkm::worklet::ExtractPoints extractPoints; - OutCellSetType outCellSet = - extractPoints.Run(dataset.GetCellSet(0), - dataset.GetCoordinateSystem("coords"), - box, - extractInside, - DeviceAdapter()); + OutCellSetType outCellSet = + extractPoints.Run(dataset.GetCellSet(0), dataset.GetCoordinateSystem("coords"), box, + extractInside, DeviceAdapter()); outDataSet.AddCellSet(outCellSet); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 98), "Wrong result for ExtractPoints"); + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 98), + "Wrong result for ExtractPoints"); } void TestUniformBySphere() const @@ -131,28 +124,26 @@ public: // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); - + // Implicit function vtkm::Vec center(2.f, 2.f, 2.f); vtkm::FloatDefault radius(1.8f); vtkm::cont::Sphere sphere(center, radius); bool extractInside = true; - + // Output dataset contains input coordinate system and point data vtkm::cont::DataSet outDataSet; outDataSet.AddCoordinateSystem(dataset.GetCoordinateSystem(0)); // Output data set with cell set containing extracted points vtkm::worklet::ExtractPoints extractPoints; - OutCellSetType outCellSet = - extractPoints.Run(dataset.GetCellSet(0), - dataset.GetCoordinateSystem("coords"), - sphere, - extractInside, - DeviceAdapter()); + OutCellSetType outCellSet = + extractPoints.Run(dataset.GetCellSet(0), dataset.GetCoordinateSystem("coords"), sphere, + extractInside, DeviceAdapter()); outDataSet.AddCellSet(outCellSet); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 27), "Wrong result for ExtractPoints"); + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 27), + "Wrong result for ExtractPoints"); } void TestExplicitByBox0() const @@ -163,28 +154,26 @@ public: // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); - + // Implicit function vtkm::Vec minPoint(0.f, 0.f, 0.f); vtkm::Vec maxPoint(1.f, 1.f, 1.f); vtkm::cont::Box box(minPoint, maxPoint); bool extractInside = true; - + // Output dataset contains input coordinate system and point data vtkm::cont::DataSet outDataSet; outDataSet.AddCoordinateSystem(dataset.GetCoordinateSystem(0)); // Output data set with cell set containing extracted points vtkm::worklet::ExtractPoints extractPoints; - OutCellSetType outCellSet = - extractPoints.Run(dataset.GetCellSet(0), - dataset.GetCoordinateSystem("coordinates"), - box, - extractInside, - DeviceAdapter()); + OutCellSetType outCellSet = + extractPoints.Run(dataset.GetCellSet(0), dataset.GetCoordinateSystem("coordinates"), box, + extractInside, DeviceAdapter()); outDataSet.AddCellSet(outCellSet); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 8), "Wrong result for ExtractPoints"); + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 8), + "Wrong result for ExtractPoints"); } void TestExplicitByBox1() const @@ -195,28 +184,26 @@ public: // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); - + // Implicit function vtkm::Vec minPoint(0.f, 0.f, 0.f); vtkm::Vec maxPoint(1.f, 1.f, 1.f); vtkm::cont::Box box(minPoint, maxPoint); bool extractInside = false; - + // Output dataset contains input coordinate system and point data vtkm::cont::DataSet outDataSet; outDataSet.AddCoordinateSystem(dataset.GetCoordinateSystem(0)); // Output data set with cell set containing extracted points vtkm::worklet::ExtractPoints extractPoints; - OutCellSetType outCellSet = - extractPoints.Run(dataset.GetCellSet(0), - dataset.GetCoordinateSystem("coordinates"), - box, - extractInside, - DeviceAdapter()); + OutCellSetType outCellSet = + extractPoints.Run(dataset.GetCellSet(0), dataset.GetCoordinateSystem("coordinates"), box, + extractInside, DeviceAdapter()); outDataSet.AddCellSet(outCellSet); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 3), "Wrong result for ExtractPoints"); + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 3), + "Wrong result for ExtractPoints"); } void TestExplicitById() const @@ -230,23 +217,20 @@ public: // Points to extract const int nPoints = 6; - vtkm::Id pointids[nPoints] = {0, 4,5, 7, 9, 10}; - vtkm::cont::ArrayHandle pointIds = - vtkm::cont::make_ArrayHandle(pointids, nPoints); - + vtkm::Id pointids[nPoints] = { 0, 4, 5, 7, 9, 10 }; + vtkm::cont::ArrayHandle pointIds = vtkm::cont::make_ArrayHandle(pointids, nPoints); + // Output dataset contains input coordinate system and point data vtkm::cont::DataSet outDataSet; outDataSet.AddCoordinateSystem(dataset.GetCoordinateSystem(0)); // Output data set with cell set containing extracted points vtkm::worklet::ExtractPoints extractPoints; - OutCellSetType outCellSet = - extractPoints.Run(dataset.GetCellSet(0), - pointIds, - DeviceAdapter()); + OutCellSetType outCellSet = extractPoints.Run(dataset.GetCellSet(0), pointIds, DeviceAdapter()); outDataSet.AddCellSet(outCellSet); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), nPoints), "Wrong result for ExtractPoints"); + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), nPoints), + "Wrong result for ExtractPoints"); } void operator()() const @@ -261,8 +245,7 @@ public: } }; -int UnitTestExtractPoints(int, char *[]) +int UnitTestExtractPoints(int, char* []) { - return vtkm::cont::testing::Testing::Run( - TestingExtractPoints()); + return vtkm::cont::testing::Testing::Run(TestingExtractPoints()); } diff --git a/vtkm/worklet/testing/UnitTestExtractStructured.cxx b/vtkm/worklet/testing/UnitTestExtractStructured.cxx index 7f3216ac8..5acf8338e 100644 --- a/vtkm/worklet/testing/UnitTestExtractStructured.cxx +++ b/vtkm/worklet/testing/UnitTestExtractStructured.cxx @@ -35,26 +35,21 @@ public: { std::cout << "Testing extract structured uniform" << std::endl; typedef vtkm::cont::CellSetStructured<2> CellSetType; - + // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make2DUniformDataSet1(); CellSetType cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); // Bounds and subsample - vtkm::Bounds bounds(1,3, 1,3, 0,0); - vtkm::Id3 sample(1,1,1); + vtkm::Bounds bounds(1, 3, 1, 3, 0, 0); + vtkm::Id3 sample(1, 1, 1); bool includeBoundary = false; - + vtkm::worklet::ExtractStructured worklet; - vtkm::cont::DataSet outDataSet = worklet.Run( - cellSet, - dataSet.GetCoordinateSystem(0), - bounds, - sample, - includeBoundary, - DeviceAdapter()); - + vtkm::cont::DataSet outDataSet = worklet.Run(cellSet, dataSet.GetCoordinateSystem(0), bounds, + sample, includeBoundary, DeviceAdapter()); + VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfPoints(), 9), "Wrong result for ExtractStructured worklet"); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfCells(), 4), @@ -65,7 +60,7 @@ public: { std::cout << "Testing extract structured uniform" << std::endl; typedef vtkm::cont::CellSetStructured<3> CellSetType; - + // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make3DUniformDataSet1(); CellSetType cellSet; @@ -75,81 +70,57 @@ public: vtkm::cont::DataSet outDataSet; // Bounding box within dataset - vtkm::Bounds bounds0(1,3, 1,3, 1,3); - vtkm::Id3 sample(1,1,1); + vtkm::Bounds bounds0(1, 3, 1, 3, 1, 3); + vtkm::Id3 sample(1, 1, 1); bool includeBoundary = false; - outDataSet = worklet.Run(cellSet, - dataSet.GetCoordinateSystem(0), - bounds0, - sample, - includeBoundary, - DeviceAdapter()); + outDataSet = worklet.Run(cellSet, dataSet.GetCoordinateSystem(0), bounds0, sample, + includeBoundary, DeviceAdapter()); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfPoints(), 27), "Wrong result for ExtractStructured worklet"); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfCells(), 8), "Wrong result for ExtractStructured worklet"); // Bounding box surrounds dataset - vtkm::Bounds bounds1(-1,7, -1,7, -1,7); - outDataSet = worklet.Run(cellSet, - dataSet.GetCoordinateSystem(0), - bounds1, - sample, - includeBoundary, - DeviceAdapter()); + vtkm::Bounds bounds1(-1, 7, -1, 7, -1, 7); + outDataSet = worklet.Run(cellSet, dataSet.GetCoordinateSystem(0), bounds1, sample, + includeBoundary, DeviceAdapter()); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfPoints(), 125), "Wrong result for ExtractStructured worklet"); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfCells(), 64), "Wrong result for ExtractStructured worklet"); // Bounding box intersects dataset on near boundary - vtkm::Bounds bounds2(-1,2, -1,2, -1,2); - outDataSet = worklet.Run(cellSet, - dataSet.GetCoordinateSystem(0), - bounds2, - sample, - includeBoundary, - DeviceAdapter()); + vtkm::Bounds bounds2(-1, 2, -1, 2, -1, 2); + outDataSet = worklet.Run(cellSet, dataSet.GetCoordinateSystem(0), bounds2, sample, + includeBoundary, DeviceAdapter()); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfPoints(), 27), "Wrong result for ExtractStructured worklet"); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfCells(), 8), "Wrong result for ExtractStructured worklet"); // Bounding box intersects dataset on far boundary - vtkm::Bounds bounds3(1,7, 1,7, 1,7); - outDataSet = worklet.Run(cellSet, - dataSet.GetCoordinateSystem(0), - bounds3, - sample, - includeBoundary, - DeviceAdapter()); + vtkm::Bounds bounds3(1, 7, 1, 7, 1, 7); + outDataSet = worklet.Run(cellSet, dataSet.GetCoordinateSystem(0), bounds3, sample, + includeBoundary, DeviceAdapter()); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfPoints(), 64), "Wrong result for ExtractStructured worklet"); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfCells(), 27), "Wrong result for ExtractStructured worklet"); // Bounding box intersects dataset without corner - vtkm::Bounds bounds4(2,7, 1,3, 1,3); - outDataSet = worklet.Run(cellSet, - dataSet.GetCoordinateSystem(0), - bounds4, - sample, - includeBoundary, - DeviceAdapter()); + vtkm::Bounds bounds4(2, 7, 1, 3, 1, 3); + outDataSet = worklet.Run(cellSet, dataSet.GetCoordinateSystem(0), bounds4, sample, + includeBoundary, DeviceAdapter()); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfPoints(), 27), "Wrong result for ExtractStructured worklet"); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfCells(), 8), "Wrong result for ExtractStructured worklet"); // Bounding box intersects dataset with plane - vtkm::Bounds bounds5(2,7, 1,1, 1,3); - outDataSet = worklet.Run(cellSet, - dataSet.GetCoordinateSystem(0), - bounds5, - sample, - includeBoundary, - DeviceAdapter()); + vtkm::Bounds bounds5(2, 7, 1, 1, 1, 3); + outDataSet = worklet.Run(cellSet, dataSet.GetCoordinateSystem(0), bounds5, sample, + includeBoundary, DeviceAdapter()); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfPoints(), 9), "Wrong result for ExtractStructured worklet"); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfCells(), 4), @@ -160,7 +131,7 @@ public: { std::cout << "Testing extract structured uniform with sampling" << std::endl; typedef vtkm::cont::CellSetStructured<3> CellSetType; - + // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make3DUniformDataSet1(); CellSetType cellSet; @@ -170,16 +141,12 @@ public: vtkm::cont::DataSet outDataSet; // Bounding box within data set with sampling - vtkm::Bounds bounds0(0,4, 0,4, 1,3); - vtkm::Id3 sample0(2,2,1); + vtkm::Bounds bounds0(0, 4, 0, 4, 1, 3); + vtkm::Id3 sample0(2, 2, 1); bool includeBoundary0 = false; - outDataSet = worklet.Run(cellSet, - dataSet.GetCoordinateSystem(0), - bounds0, - sample0, - includeBoundary0, - DeviceAdapter()); + outDataSet = worklet.Run(cellSet, dataSet.GetCoordinateSystem(0), bounds0, sample0, + includeBoundary0, DeviceAdapter()); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfPoints(), 27), "Wrong result for ExtractStructured worklet"); @@ -187,16 +154,12 @@ public: "Wrong result for ExtractStructured worklet"); // Bounds and subsample - vtkm::Bounds bounds1(0,4, 0,4, 1,3); - vtkm::Id3 sample1(3,3,2); + vtkm::Bounds bounds1(0, 4, 0, 4, 1, 3); + vtkm::Id3 sample1(3, 3, 2); bool includeBoundary1 = false; - outDataSet = worklet.Run(cellSet, - dataSet.GetCoordinateSystem(0), - bounds1, - sample1, - includeBoundary1, - DeviceAdapter()); + outDataSet = worklet.Run(cellSet, dataSet.GetCoordinateSystem(0), bounds1, sample1, + includeBoundary1, DeviceAdapter()); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfPoints(), 8), "Wrong result for ExtractStructured worklet"); @@ -204,16 +167,12 @@ public: "Wrong result for ExtractStructured worklet"); // Bounds and subsample - vtkm::Bounds bounds2(0,4, 0,4, 1,3); - vtkm::Id3 sample2(3,3,2); + vtkm::Bounds bounds2(0, 4, 0, 4, 1, 3); + vtkm::Id3 sample2(3, 3, 2); bool includeBoundary2 = true; - outDataSet = worklet.Run(cellSet, - dataSet.GetCoordinateSystem(0), - bounds2, - sample2, - includeBoundary2, - DeviceAdapter()); + outDataSet = worklet.Run(cellSet, dataSet.GetCoordinateSystem(0), bounds2, sample2, + includeBoundary2, DeviceAdapter()); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfPoints(), 18), "Wrong result for ExtractStructured worklet"); @@ -225,27 +184,22 @@ public: { std::cout << "Testing extract structured rectilinear" << std::endl; typedef vtkm::cont::CellSetStructured<2> CellSetType; - + // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make2DRectilinearDataSet0(); CellSetType cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); // Bounds and subsample - vtkm::Bounds bounds(0,1, 0,1, 0,0); - vtkm::Id3 sample(1,1,1); + vtkm::Bounds bounds(0, 1, 0, 1, 0, 0); + vtkm::Id3 sample(1, 1, 1); bool includeBoundary = false; - + // Extract subset vtkm::worklet::ExtractStructured worklet; - vtkm::cont::DataSet outDataSet = worklet.Run( - cellSet, - dataSet.GetCoordinateSystem(0), - bounds, - sample, - includeBoundary, - DeviceAdapter()); - + vtkm::cont::DataSet outDataSet = worklet.Run(cellSet, dataSet.GetCoordinateSystem(0), bounds, + sample, includeBoundary, DeviceAdapter()); + VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfPoints(), 4), "Wrong result for ExtractStructured worklet"); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfCells(), 1), @@ -256,27 +210,22 @@ public: { std::cout << "Testing extract structured rectilinear" << std::endl; typedef vtkm::cont::CellSetStructured<3> CellSetType; - + // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make3DRectilinearDataSet0(); CellSetType cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); // Bounds and subsample - vtkm::Bounds bounds(0,1, 0,1, 0,1); - vtkm::Id3 sample(1,1,1); + vtkm::Bounds bounds(0, 1, 0, 1, 0, 1); + vtkm::Id3 sample(1, 1, 1); bool includeBoundary = false; - + // Extract subset vtkm::worklet::ExtractStructured worklet; - vtkm::cont::DataSet outDataSet = worklet.Run( - cellSet, - dataSet.GetCoordinateSystem(0), - bounds, - sample, - includeBoundary, - DeviceAdapter()); - + vtkm::cont::DataSet outDataSet = worklet.Run(cellSet, dataSet.GetCoordinateSystem(0), bounds, + sample, includeBoundary, DeviceAdapter()); + VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfPoints(), 8), "Wrong result for ExtractStructured worklet"); VTKM_TEST_ASSERT(test_equal(outDataSet.GetCellSet(0).GetNumberOfCells(), 1), @@ -293,7 +242,7 @@ public: } }; -int UnitTestExtractStructured(int, char *[]) +int UnitTestExtractStructured(int, char* []) { return vtkm::cont::testing::Testing::Run( TestingExtractStructured()); diff --git a/vtkm/worklet/testing/UnitTestFieldHistogram.cxx b/vtkm/worklet/testing/UnitTestFieldHistogram.cxx index be2f09fd0..666a7928a 100644 --- a/vtkm/worklet/testing/UnitTestFieldHistogram.cxx +++ b/vtkm/worklet/testing/UnitTestFieldHistogram.cxx @@ -28,276 +28,248 @@ // vtkm::cont::DataSet MakeTestDataSet() { - vtkm::cont::DataSet dataSet; + vtkm::cont::DataSet dataSet; - const int dimension = 2; - const int xVerts = 20; - const int yVerts = 50; - const int nVerts = xVerts * yVerts; + const int dimension = 2; + const int xVerts = 20; + const int yVerts = 50; + const int nVerts = xVerts * yVerts; - const int xCells = xVerts - 1; - const int yCells = yVerts - 1; - const int nCells = xCells * yCells; + const int xCells = xVerts - 1; + const int yCells = yVerts - 1; + const int nCells = xCells * yCells; - // Poisson distribution [0:49] mean = 10 - vtkm::Float32 poisson[nVerts] = { - 8,10,9,8,14,11,12,9,19,7,8,11,7,10,11,11,11,6,8,8, - 7,15,9,7,8,10,9,10,10,12,7,6,14,10,14,10,7,11,13,9, - 13,11,10,10,12,12,7,12,10,11,12,8,13,9,5,12,11,9,5,9, - 12,9,6,10,11,9,9,11,9,7,7,18,16,13,12,8,10,11,9,8, - 17,3,15,15,9,10,10,8,10,9,7,9,8,10,13,9,7,11,7,10, - 13,10,11,9,10,7,10,6,12,6,9,7,6,12,12,9,12,12,11,6, - 1,12,8,13,14,8,8,10,7,7,6,7,5,11,6,11,13,8,13,5, - 9,12,7,11,10,15,11,9,7,12,15,7,8,7,12,8,21,16,13,11, - 10,14,12,11,12,14,7,11,7,12,16,8,10,8,9,7,8,7,13,13, - 11,15,7,7,6,11,7,12,12,13,14,11,13,11,11,9,15,8,6,11, - 12,10,11,7,6,14,11,10,12,5,8,9,11,15,11,10,17,14,9,10, - 10,12,11,13,13,12,11,7,8,10,7,11,10,5,8,10,13,13,12,6, - 10,7,13,8,11,7,10,7,8,7,14,16,9,11,8,11,9,15,11,10, - 10,12,7,7,11,7,5,17,9,11,11,11,10,17,10,15,7,11,12,16, - 9,8,11,14,9,22,8,8,8,13,12,12,1,14,15,6,15,8,11,16, - 14,8,6,9,8,9,9,10,8,6,13,8,6,12,11,12,13,8,6,6, - 5,6,10,9,11,12,14,12,10,11,10,10,8,13,8,11,7,13,13,12, - 12,13,15,4,9,16,7,9,8,10,6,9,11,12,6,7,14,6,4,15, - 5,18,9,9,11,12,9,5,6,7,15,6,11,14,8,12,6,9,5,9, - 14,9,12,6,9,14,11,12,12,13,15,9,8,7,13,12,7,13,6,9, - 10,10,10,9,11,5,9,13,16,9,10,8,9,6,13,12,8,12,9,12, - 17,8,11,10,8,7,11,7,13,13,10,14,11,9,6,6,14,16,5,9, - 13,11,12,7,4,6,9,11,11,10,12,9,7,13,8,8,12,5,10,7, - 11,11,10,10,14,6,8,8,3,12,16,11,11,7,6,12,11,5,9,12, - 9,13,7,8,9,9,12,7,9,8,12,11,6,10,6,7,6,11,10,8, - 9,8,4,19,12,6,10,9,6,12,9,14,7,8,11,7,7,12,13,9, - 13,12,8,6,10,17,19,10,10,13,5,11,8,10,8,16,12,6,6,7, - 10,9,12,8,5,10,7,18,9,12,10,4,9,9,15,15,6,7,7,11, - 12,4,8,18,5,12,12,11,10,14,9,9,10,8,10,8,10,9,9,4, - 10,12,5,13,6,9,7,5,12,8,11,10,9,17,9,9,8,11,18,11, - 10,9,4,13,10,15,5,10,9,7,7,8,10,6,6,19,10,16,7,7, - 9,10,10,13,10,10,14,13,12,8,7,13,12,11,13,12,9,8,6,8, - 10,3,8,8,12,12,13,13,10,5,10,7,13,7,9,5,13,7,10,8, - 13,11,17,9,6,14,10,10,13,9,15,8,15,9,12,11,12,8,3,9, - 8,10,12,8,14,13,12,11,12,9,18,10,13,7,4,4,11,8,3,7, - 9,10,12,7,11,21,9,7,8,9,10,10,11,9,15,13,21,12,8,11, - 9,10,11,9,17,8,9,8,14,6,13,9,8,11,12,12,12,11,6,13, - 7,9,11,15,17,17,11,10,7,8,11,8,6,9,13,7,9,6,5,10, - 7,16,16,9,7,6,14,8,13,16,7,7,10,11,6,10,9,9,8,14, - 11,9,11,9,10,11,9,8,14,11,7,12,11,8,9,9,10,11,11,10, - 9,6,6,11,16,10,7,6,6,13,18,8,12,11,14,13,8,8,10,17, - 17,6,6,10,18,5,8,11,6,6,14,10,9,6,11,6,13,12,10,6, - 9,9,9,13,7,17,10,14,10,9,10,10,11,10,11,15,13,6,12,19, - 10,12,12,15,13,10,10,13,11,13,13,17,6,5,6,7,6,9,13,11, - 8,12,9,6,10,16,11,12,5,12,14,13,13,16,11,6,12,12,15,8, - 7,11,8,5,10,8,9,11,9,12,10,5,12,11,9,6,14,12,10,11, - 9,6,7,12,8,12,8,15,9,8,7,9,3,6,14,7,8,11,9,10, - 12,9,10,9,8,6,12,11,6,8,9,8,15,11,7,18,12,11,10,13, - 11,11,10,7,9,8,8,11,11,13,6,12,13,16,11,11,5,12,14,15, - 9,14,15,6,8,7,6,8,9,19,7,12,11,8,14,12,10,9,3,7 - }; + // Poisson distribution [0:49] mean = 10 + vtkm::Float32 poisson[nVerts] = { + 8, 10, 9, 8, 14, 11, 12, 9, 19, 7, 8, 11, 7, 10, 11, 11, 11, 6, 8, 8, 7, 15, 9, 7, + 8, 10, 9, 10, 10, 12, 7, 6, 14, 10, 14, 10, 7, 11, 13, 9, 13, 11, 10, 10, 12, 12, 7, 12, + 10, 11, 12, 8, 13, 9, 5, 12, 11, 9, 5, 9, 12, 9, 6, 10, 11, 9, 9, 11, 9, 7, 7, 18, + 16, 13, 12, 8, 10, 11, 9, 8, 17, 3, 15, 15, 9, 10, 10, 8, 10, 9, 7, 9, 8, 10, 13, 9, + 7, 11, 7, 10, 13, 10, 11, 9, 10, 7, 10, 6, 12, 6, 9, 7, 6, 12, 12, 9, 12, 12, 11, 6, + 1, 12, 8, 13, 14, 8, 8, 10, 7, 7, 6, 7, 5, 11, 6, 11, 13, 8, 13, 5, 9, 12, 7, 11, + 10, 15, 11, 9, 7, 12, 15, 7, 8, 7, 12, 8, 21, 16, 13, 11, 10, 14, 12, 11, 12, 14, 7, 11, + 7, 12, 16, 8, 10, 8, 9, 7, 8, 7, 13, 13, 11, 15, 7, 7, 6, 11, 7, 12, 12, 13, 14, 11, + 13, 11, 11, 9, 15, 8, 6, 11, 12, 10, 11, 7, 6, 14, 11, 10, 12, 5, 8, 9, 11, 15, 11, 10, + 17, 14, 9, 10, 10, 12, 11, 13, 13, 12, 11, 7, 8, 10, 7, 11, 10, 5, 8, 10, 13, 13, 12, 6, + 10, 7, 13, 8, 11, 7, 10, 7, 8, 7, 14, 16, 9, 11, 8, 11, 9, 15, 11, 10, 10, 12, 7, 7, + 11, 7, 5, 17, 9, 11, 11, 11, 10, 17, 10, 15, 7, 11, 12, 16, 9, 8, 11, 14, 9, 22, 8, 8, + 8, 13, 12, 12, 1, 14, 15, 6, 15, 8, 11, 16, 14, 8, 6, 9, 8, 9, 9, 10, 8, 6, 13, 8, + 6, 12, 11, 12, 13, 8, 6, 6, 5, 6, 10, 9, 11, 12, 14, 12, 10, 11, 10, 10, 8, 13, 8, 11, + 7, 13, 13, 12, 12, 13, 15, 4, 9, 16, 7, 9, 8, 10, 6, 9, 11, 12, 6, 7, 14, 6, 4, 15, + 5, 18, 9, 9, 11, 12, 9, 5, 6, 7, 15, 6, 11, 14, 8, 12, 6, 9, 5, 9, 14, 9, 12, 6, + 9, 14, 11, 12, 12, 13, 15, 9, 8, 7, 13, 12, 7, 13, 6, 9, 10, 10, 10, 9, 11, 5, 9, 13, + 16, 9, 10, 8, 9, 6, 13, 12, 8, 12, 9, 12, 17, 8, 11, 10, 8, 7, 11, 7, 13, 13, 10, 14, + 11, 9, 6, 6, 14, 16, 5, 9, 13, 11, 12, 7, 4, 6, 9, 11, 11, 10, 12, 9, 7, 13, 8, 8, + 12, 5, 10, 7, 11, 11, 10, 10, 14, 6, 8, 8, 3, 12, 16, 11, 11, 7, 6, 12, 11, 5, 9, 12, + 9, 13, 7, 8, 9, 9, 12, 7, 9, 8, 12, 11, 6, 10, 6, 7, 6, 11, 10, 8, 9, 8, 4, 19, + 12, 6, 10, 9, 6, 12, 9, 14, 7, 8, 11, 7, 7, 12, 13, 9, 13, 12, 8, 6, 10, 17, 19, 10, + 10, 13, 5, 11, 8, 10, 8, 16, 12, 6, 6, 7, 10, 9, 12, 8, 5, 10, 7, 18, 9, 12, 10, 4, + 9, 9, 15, 15, 6, 7, 7, 11, 12, 4, 8, 18, 5, 12, 12, 11, 10, 14, 9, 9, 10, 8, 10, 8, + 10, 9, 9, 4, 10, 12, 5, 13, 6, 9, 7, 5, 12, 8, 11, 10, 9, 17, 9, 9, 8, 11, 18, 11, + 10, 9, 4, 13, 10, 15, 5, 10, 9, 7, 7, 8, 10, 6, 6, 19, 10, 16, 7, 7, 9, 10, 10, 13, + 10, 10, 14, 13, 12, 8, 7, 13, 12, 11, 13, 12, 9, 8, 6, 8, 10, 3, 8, 8, 12, 12, 13, 13, + 10, 5, 10, 7, 13, 7, 9, 5, 13, 7, 10, 8, 13, 11, 17, 9, 6, 14, 10, 10, 13, 9, 15, 8, + 15, 9, 12, 11, 12, 8, 3, 9, 8, 10, 12, 8, 14, 13, 12, 11, 12, 9, 18, 10, 13, 7, 4, 4, + 11, 8, 3, 7, 9, 10, 12, 7, 11, 21, 9, 7, 8, 9, 10, 10, 11, 9, 15, 13, 21, 12, 8, 11, + 9, 10, 11, 9, 17, 8, 9, 8, 14, 6, 13, 9, 8, 11, 12, 12, 12, 11, 6, 13, 7, 9, 11, 15, + 17, 17, 11, 10, 7, 8, 11, 8, 6, 9, 13, 7, 9, 6, 5, 10, 7, 16, 16, 9, 7, 6, 14, 8, + 13, 16, 7, 7, 10, 11, 6, 10, 9, 9, 8, 14, 11, 9, 11, 9, 10, 11, 9, 8, 14, 11, 7, 12, + 11, 8, 9, 9, 10, 11, 11, 10, 9, 6, 6, 11, 16, 10, 7, 6, 6, 13, 18, 8, 12, 11, 14, 13, + 8, 8, 10, 17, 17, 6, 6, 10, 18, 5, 8, 11, 6, 6, 14, 10, 9, 6, 11, 6, 13, 12, 10, 6, + 9, 9, 9, 13, 7, 17, 10, 14, 10, 9, 10, 10, 11, 10, 11, 15, 13, 6, 12, 19, 10, 12, 12, 15, + 13, 10, 10, 13, 11, 13, 13, 17, 6, 5, 6, 7, 6, 9, 13, 11, 8, 12, 9, 6, 10, 16, 11, 12, + 5, 12, 14, 13, 13, 16, 11, 6, 12, 12, 15, 8, 7, 11, 8, 5, 10, 8, 9, 11, 9, 12, 10, 5, + 12, 11, 9, 6, 14, 12, 10, 11, 9, 6, 7, 12, 8, 12, 8, 15, 9, 8, 7, 9, 3, 6, 14, 7, + 8, 11, 9, 10, 12, 9, 10, 9, 8, 6, 12, 11, 6, 8, 9, 8, 15, 11, 7, 18, 12, 11, 10, 13, + 11, 11, 10, 7, 9, 8, 8, 11, 11, 13, 6, 12, 13, 16, 11, 11, 5, 12, 14, 15, 9, 14, 15, 6, + 8, 7, 6, 8, 9, 19, 7, 12, 11, 8, 14, 12, 10, 9, 3, 7 + }; - // Normal distribution [0:49] mean = 25 standard deviation = 5.0 - vtkm::Float32 normal[nVerts] = { - 24,19,28,19,25,28,25,22,27,26,35,26,30,28,24,23,21,31,20,11, - 21,22,14,25,20,24,24,21,24,29,26,21,32,29,23,28,31,25,23,30, - 18,24,22,25,33,24,22,23,21,17,20,28,30,18,20,32,25,24,32,15, - 27,24,27,19,30,27,17,24,29,23,22,19,24,19,28,24,25,24,25,30, - 24,31,30,27,25,25,25,15,29,23,29,29,21,25,35,24,28,10,31,23, - 22,22,22,33,29,27,18,27,27,24,20,20,21,29,23,31,23,23,22,23, - 30,27,28,31,16,29,25,19,33,28,25,24,15,27,37,29,15,19,14,19, - 24,23,30,29,35,22,19,26,26,14,24,30,32,23,30,29,26,27,25,23, - 17,26,32,29,20,17,21,23,22,20,36,12,26,23,15,29,24,22,26,33, - 24,23,20,26,22,17,26,26,34,22,26,17,23,18,29,27,21,29,28,29, - 24,25,28,19,18,21,23,23,27,25,24,25,24,25,21,25,21,27,23,20, - 29,15,28,30,24,27,17,23,16,21,25,17,27,28,21,13,19,27,16,30, - 31,25,30,17,17,25,26,22,21,17,24,17,25,22,27,14,27,24,27,25, - 26,31,21,23,30,30,22,19,23,22,23,25,24,25,24,28,26,30,18,25, - 30,37,27,34,28,34,25,10,25,22,35,30,24,32,24,34,19,29,26,16, - 27,17,26,23,27,25,26,21,31,21,28,15,32,24,23,23,18,15,22,25, - 16,25,31,26,25,28,24,26,23,25,33,20,27,28,24,29,32,20,24,20, - 19,32,24,6,24,21,26,18,15,30,19,26,22,30,35,23,22,30,20,22, - 18,30,28,25,16,25,27,30,18,24,30,28,20,19,20,28,21,24,15,33, - 20,18,20,36,30,26,25,18,28,27,31,31,15,26,16,22,27,14,17,27, - 27,22,32,30,22,34,22,25,20,22,26,29,28,33,18,23,20,20,27,24, - 28,21,25,27,25,19,19,25,19,32,29,27,23,21,28,33,23,23,28,26, - 31,19,21,29,21,27,23,32,24,26,21,28,28,24,17,31,27,21,19,32, - 28,23,30,23,29,15,26,26,15,20,25,26,27,31,21,23,23,33,28,19, - 23,22,22,25,27,17,23,17,25,28,26,30,32,31,19,25,25,19,23,29, - 27,23,34,22,13,21,32,10,20,33,21,17,29,31,14,24,23,19,19,22, - 17,26,37,26,22,26,38,29,29,27,30,20,31,14,32,32,24,23,23,18, - 21,31,24,20,28,15,21,25,25,20,30,25,22,21,21,25,24,25,18,23, - 28,30,20,27,27,19,10,32,24,20,29,26,25,20,25,29,28,24,32,26, - 22,19,23,27,27,29,20,25,21,30,28,31,24,19,23,19,19,18,30,18, - 16,24,20,20,30,25,29,25,31,21,28,31,24,26,27,21,24,23,26,18, - 32,26,28,26,24,26,29,30,22,20,24,28,25,29,20,21,22,15,30,27, - 33,26,22,32,30,31,20,19,24,26,27,31,17,17,33,27,16,27,27,22, - 27,19,24,21,17,24,28,23,26,24,19,26,20,24,22,19,22,21,21,28, - 29,39,19,16,25,29,31,22,22,29,26,22,22,22,26,23,23,23,30,25, - 25,25,27,29,18,33,21,12,22,29,12,20,35,22,34,28,18,29,21,20, - 24,33,24,26,23,34,31,25,31,22,35,21,20,29,27,22,30,22,27,23, - 22,32,16,19,27,22,24,27,21,33,25,25,19,28,20,27,21,25,28,20, - 27,22,21,20,26,30,33,23,20,24,17,23,28,35,14,23,22,28,28,26, - 25,18,20,28,28,22,13,24,22,20,30,26,26,18,22,20,23,24,20,27, - 34,28,18,24,34,33,25,33,37,21,20,31,19,23,29,22,21,24,19,27, - 19,32,25,23,33,26,33,27,29,30,19,22,30,19,18,24,25,17,31,19, - 31,26,22,23,28,28,25,24,19,19,27,28,23,21,29,26,31,22,22,25, - 16,29,21,22,23,25,22,21,22,19,27,26,28,30,22,21,24,22,23,26, - 28,22,18,25,23,27,31,19,15,29,20,19,27,25,21,29,22,24,25,17, - 36,29,22,22,24,28,27,22,26,31,29,31,18,25,23,16,37,27,21,31, - 25,24,20,23,28,33,24,21,26,20,18,31,20,24,23,19,27,17,23,23, - 20,26,28,23,26,31,25,31,19,32,26,18,19,29,20,21,15,25,27,29, - 22,22,22,26,23,22,23,29,28,20,21,22,20,22,27,25,23,32,23,20, - 31,20,27,26,34,20,22,36,21,29,25,20,21,22,29,29,25,22,24,22 - }; + // Normal distribution [0:49] mean = 25 standard deviation = 5.0 + vtkm::Float32 normal[nVerts] = { + 24, 19, 28, 19, 25, 28, 25, 22, 27, 26, 35, 26, 30, 28, 24, 23, 21, 31, 20, 11, 21, 22, 14, 25, + 20, 24, 24, 21, 24, 29, 26, 21, 32, 29, 23, 28, 31, 25, 23, 30, 18, 24, 22, 25, 33, 24, 22, 23, + 21, 17, 20, 28, 30, 18, 20, 32, 25, 24, 32, 15, 27, 24, 27, 19, 30, 27, 17, 24, 29, 23, 22, 19, + 24, 19, 28, 24, 25, 24, 25, 30, 24, 31, 30, 27, 25, 25, 25, 15, 29, 23, 29, 29, 21, 25, 35, 24, + 28, 10, 31, 23, 22, 22, 22, 33, 29, 27, 18, 27, 27, 24, 20, 20, 21, 29, 23, 31, 23, 23, 22, 23, + 30, 27, 28, 31, 16, 29, 25, 19, 33, 28, 25, 24, 15, 27, 37, 29, 15, 19, 14, 19, 24, 23, 30, 29, + 35, 22, 19, 26, 26, 14, 24, 30, 32, 23, 30, 29, 26, 27, 25, 23, 17, 26, 32, 29, 20, 17, 21, 23, + 22, 20, 36, 12, 26, 23, 15, 29, 24, 22, 26, 33, 24, 23, 20, 26, 22, 17, 26, 26, 34, 22, 26, 17, + 23, 18, 29, 27, 21, 29, 28, 29, 24, 25, 28, 19, 18, 21, 23, 23, 27, 25, 24, 25, 24, 25, 21, 25, + 21, 27, 23, 20, 29, 15, 28, 30, 24, 27, 17, 23, 16, 21, 25, 17, 27, 28, 21, 13, 19, 27, 16, 30, + 31, 25, 30, 17, 17, 25, 26, 22, 21, 17, 24, 17, 25, 22, 27, 14, 27, 24, 27, 25, 26, 31, 21, 23, + 30, 30, 22, 19, 23, 22, 23, 25, 24, 25, 24, 28, 26, 30, 18, 25, 30, 37, 27, 34, 28, 34, 25, 10, + 25, 22, 35, 30, 24, 32, 24, 34, 19, 29, 26, 16, 27, 17, 26, 23, 27, 25, 26, 21, 31, 21, 28, 15, + 32, 24, 23, 23, 18, 15, 22, 25, 16, 25, 31, 26, 25, 28, 24, 26, 23, 25, 33, 20, 27, 28, 24, 29, + 32, 20, 24, 20, 19, 32, 24, 6, 24, 21, 26, 18, 15, 30, 19, 26, 22, 30, 35, 23, 22, 30, 20, 22, + 18, 30, 28, 25, 16, 25, 27, 30, 18, 24, 30, 28, 20, 19, 20, 28, 21, 24, 15, 33, 20, 18, 20, 36, + 30, 26, 25, 18, 28, 27, 31, 31, 15, 26, 16, 22, 27, 14, 17, 27, 27, 22, 32, 30, 22, 34, 22, 25, + 20, 22, 26, 29, 28, 33, 18, 23, 20, 20, 27, 24, 28, 21, 25, 27, 25, 19, 19, 25, 19, 32, 29, 27, + 23, 21, 28, 33, 23, 23, 28, 26, 31, 19, 21, 29, 21, 27, 23, 32, 24, 26, 21, 28, 28, 24, 17, 31, + 27, 21, 19, 32, 28, 23, 30, 23, 29, 15, 26, 26, 15, 20, 25, 26, 27, 31, 21, 23, 23, 33, 28, 19, + 23, 22, 22, 25, 27, 17, 23, 17, 25, 28, 26, 30, 32, 31, 19, 25, 25, 19, 23, 29, 27, 23, 34, 22, + 13, 21, 32, 10, 20, 33, 21, 17, 29, 31, 14, 24, 23, 19, 19, 22, 17, 26, 37, 26, 22, 26, 38, 29, + 29, 27, 30, 20, 31, 14, 32, 32, 24, 23, 23, 18, 21, 31, 24, 20, 28, 15, 21, 25, 25, 20, 30, 25, + 22, 21, 21, 25, 24, 25, 18, 23, 28, 30, 20, 27, 27, 19, 10, 32, 24, 20, 29, 26, 25, 20, 25, 29, + 28, 24, 32, 26, 22, 19, 23, 27, 27, 29, 20, 25, 21, 30, 28, 31, 24, 19, 23, 19, 19, 18, 30, 18, + 16, 24, 20, 20, 30, 25, 29, 25, 31, 21, 28, 31, 24, 26, 27, 21, 24, 23, 26, 18, 32, 26, 28, 26, + 24, 26, 29, 30, 22, 20, 24, 28, 25, 29, 20, 21, 22, 15, 30, 27, 33, 26, 22, 32, 30, 31, 20, 19, + 24, 26, 27, 31, 17, 17, 33, 27, 16, 27, 27, 22, 27, 19, 24, 21, 17, 24, 28, 23, 26, 24, 19, 26, + 20, 24, 22, 19, 22, 21, 21, 28, 29, 39, 19, 16, 25, 29, 31, 22, 22, 29, 26, 22, 22, 22, 26, 23, + 23, 23, 30, 25, 25, 25, 27, 29, 18, 33, 21, 12, 22, 29, 12, 20, 35, 22, 34, 28, 18, 29, 21, 20, + 24, 33, 24, 26, 23, 34, 31, 25, 31, 22, 35, 21, 20, 29, 27, 22, 30, 22, 27, 23, 22, 32, 16, 19, + 27, 22, 24, 27, 21, 33, 25, 25, 19, 28, 20, 27, 21, 25, 28, 20, 27, 22, 21, 20, 26, 30, 33, 23, + 20, 24, 17, 23, 28, 35, 14, 23, 22, 28, 28, 26, 25, 18, 20, 28, 28, 22, 13, 24, 22, 20, 30, 26, + 26, 18, 22, 20, 23, 24, 20, 27, 34, 28, 18, 24, 34, 33, 25, 33, 37, 21, 20, 31, 19, 23, 29, 22, + 21, 24, 19, 27, 19, 32, 25, 23, 33, 26, 33, 27, 29, 30, 19, 22, 30, 19, 18, 24, 25, 17, 31, 19, + 31, 26, 22, 23, 28, 28, 25, 24, 19, 19, 27, 28, 23, 21, 29, 26, 31, 22, 22, 25, 16, 29, 21, 22, + 23, 25, 22, 21, 22, 19, 27, 26, 28, 30, 22, 21, 24, 22, 23, 26, 28, 22, 18, 25, 23, 27, 31, 19, + 15, 29, 20, 19, 27, 25, 21, 29, 22, 24, 25, 17, 36, 29, 22, 22, 24, 28, 27, 22, 26, 31, 29, 31, + 18, 25, 23, 16, 37, 27, 21, 31, 25, 24, 20, 23, 28, 33, 24, 21, 26, 20, 18, 31, 20, 24, 23, 19, + 27, 17, 23, 23, 20, 26, 28, 23, 26, 31, 25, 31, 19, 32, 26, 18, 19, 29, 20, 21, 15, 25, 27, 29, + 22, 22, 22, 26, 23, 22, 23, 29, 28, 20, 21, 22, 20, 22, 27, 25, 23, 32, 23, 20, 31, 20, 27, 26, + 34, 20, 22, 36, 21, 29, 25, 20, 21, 22, 29, 29, 25, 22, 24, 22 + }; - //Chi squared distribution [0:49] degrees of freedom = 5.0 - vtkm::Float32 chiSquare[nVerts] = { - 3,1,4,6,5,4,8,7,2,9,2,0,0,4,3,2,5,2,3,6, - 3,8,3,4,3,3,2,7,2,10,9,6,1,1,4,7,3,3,1,4, - 4,3,9,4,4,7,3,2,4,7,3,3,2,10,1,6,2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,4,3,3,5,1,2,9,0,5,7,12,2,4,8,5,7, - 8,3,2,2,18,1,7,2,2,1,3,3,3,7,1,9,8,4,3,7, - 6,4,5,2,0,5,1,5,10,4,2,8,2,2,0,5,6,4,5,0, - 1,5,11,3,3,4,4,2,3,5,1,6,5,7,2,2,5,7,4,8, - 4,1,1,7,2,3,9,6,13,1,5,4,6,2,4,11,2,5,5,1, - 4,1,4,7,1,5,8,3,1,10,9,13,1,7,2,9,4,3,3,10, - 12,2,0,4,6,5,5,1,4,7,2,12,7,6,5,0,6,4,4,12, - 1,3,10,1,9,2,2,2,1,5,5,6,9,6,4,1,11,6,9,3, - 2,7,1,7,4,3,0,3,1,12,17,2,1,6,4,4,2,1,5,5, - 3,2,2,4,6,5,4,6,11,3,12,6,3,6,3,0,6,3,7,4, - 8,5,14,5,1,9,4,6,5,3,9,3,1,1,0,3,7,3,5,1, - 6,2,2,6,2,12,1,0,6,3,3,5,4,7,2,2,15,7,3,10, - 4,2,6,3,4,8,3,1,5,5,5,4,3,7,3,4,5,5,2,4, - 2,5,1,12,5,6,3,2,8,5,2,3,11,11,6,5,0,3,3,9, - 4,2,11,1,5,3,5,6,3,6,4,2,4,10,11,3,3,4,1,1, - 1,3,5,5,1,1,4,1,5,1,6,8,6,4,6,7,6,3,5,3, - 6,6,6,4,0,6,3,1,2,4,2,6,1,1,1,2,2,4,7,2, - 6,2,5,7,6,4,6,3,1,4,5,1,4,6,2,3,0,6,11,2, - 9,2,6,4,5,6,2,19,2,10,4,2,3,3,11,7,3,3,1,5, - 3,6,4,3,0,6,6,6,4,2,5,2,2,2,6,10,4,9,3,7, - 7,0,6,8,5,2,3,2,3,3,3,1,6,1,8,2,5,3,6,11, - 5,7,2,6,7,3,4,1,0,5,8,3,2,9,3,1,2,3,3,9, - 5,6,5,1,4,5,6,7,6,1,5,1,6,6,2,6,7,2,4,6 - }; + //Chi squared distribution [0:49] degrees of freedom = 5.0 + vtkm::Float32 chiSquare[nVerts] = { + 3, 1, 4, 6,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,37,22,26,10,2,33,33,46,19,25,41,1,2,26,33,0,19,3, - 20,34,29,46,42,26,4,32,20,35,45,38,13,2,36,16,31,37,49,18, - 12,49,36,37,32,3,31,44,13,21,38,23,11,13,17,8,24,44,45,3, - 45,25,25,15,49,24,13,4,47,3,25,19,13,45,26,23,47,2,38,38, - 41,6,0,34,43,31,36,36,49,44,11,15,17,25,29,42,20,42,13,20, - 26,23,14,8,7,28,40,1,26,24,47,37,27,44,31,42,7,10,35,6, - 4,13,0,20,1,35,46,11,9,15,44,32,7,34,19,19,24,7,29,42, - 29,47,27,7,49,20,7,28,12,24,23,48,6,9,15,31,6,32,31,40, - 12,23,19,10,1,45,21,7,47,20,6,44,4,8,3,18,12,6,39,22, - 17,22,40,46,32,10,33,45,12,43,23,25,30,40,37,23,47,31,21,41, - 34,35,49,47,42,14,26,25,5,20,28,43,22,36,43,35,40,35,37,0, - 44,26,23,3,35,24,33,34,9,45,43,44,27,6,22,49,10,22,15,25, - 44,21,23,40,18,10,49,7,31,30,0,0,38,36,15,20,34,34,10,41, - 35,41,4,4,38,31,10,10,4,19,47,47,19,13,34,14,38,39,21,14, - 9,0,9,49,12,40,6,19,30,8,41,7,49,12,11,5,10,31,34,39, - 34,37,33,31,2,29,11,15,34,5,38,26,27,29,16,35,7,8,24,43, - 40,27,36,15,6,26,15,29,25,21,12,18,19,22,23,19,13,3,18,12, - 33,33,25,36,36,47,23,47,16,23,25,33,20,30,49,7,33,17,27,26, - 41,0,13,32,27,45,13,48,12,42,34,22,40,1,8,35,35,21,29,37, - 49,34,13,37,8,0,24,3,8,45,39,37,21,0,29,25,3,27,19,10, - 19,31,32,35,26,14,40,18,34,15,0,5,26,38,11,2,3,8,36,14, - 2,23,22,25,22,7,14,41,34,28,34,16,2,49,27,0,42,1,18,24, - 28,36,33,26,1,6,48,9,17,30,30,6,27,47,17,41,48,12,12,21, - 40,44,12,38,34,22,13,33,5,10,5,27,0,8,29,21,4,34,18,41, - 6,48,1,4,24,38,46,12,17,38,24,37,33,34,37,1,11,11,28,32, - 30,18,11,11,32,8,37,7,2,33,6,47,24,31,45,0,29,36,24,2, - 22,25,38,3,22,48,23,16,22,37,10,8,18,46,48,12,3,6,26,8, - 25,5,42,18,21,16,35,28,43,37,41,34,19,46,30,18,26,22,20,12, - 4,21,23,14,5,10,40,26,33,43,12,35,13,19,4,22,11,39,24,0, - 13,33,21,9,48,6,39,47,8,30,3,17,14,25,41,41,36,16,40,31, - 2,2,7,38,3,25,46,11,10,4,34,35,24,13,35,18,10,11,21,23, - 43,48,22,1,26,1,37,29,41,16,11,26,21,20,49,48,42,43,15,7, - 49,31,23,46,34,40,27,28,7,47,41,7,2,17,5,4,25,1,28,42, - 25,33,36,34,1,9,33,17,3,7,46,11,19,29,8,1,34,38,35,3, - 29,46,46,21,25,41,45,30,36,25,24,8,48,28,13,26,34,33,4,27, - 30,33,24,28,29,22,7,25,36,1,2,26,16,1,12,5,19,27,29,30, - 46,38,25,24,32,34,20,24,23,35,26,13,30,14,35,26,46,11,20,29, - 39,46,34,41,26,11,7,44,12,32,0,46,13,42,13,47,25,6,20,35, - 21,5,38,4,22,17,14,37,16,16,2,28,24,10,5,48,43,24,18,40, - 8,7,2,7,23,19,44,21,20,32,15,3,40,44,45,45,38,8,28,1, - 40,26,43,13,43,29,19,40,26,46,21,28,37,44,16,9,37,35,43,3, - 35,43,17,4,8,20,4,33,28,40,43,38,31,44,43,24,5,18,19,34, - 6,3,7,23,35,11,19,48,31,34,45,18,42,39,21,3,24,24,22,24, - 37,46,15,7,5,4,48,20,11,48,41,9,6,9,16,28,22,29,21,18, - 19,30,21,7,33,49,34,20,42,40,39,18,0,23,31,32,32,39,18,17, - 19,16,34,7,14,33,42,15,7,30,0,46,19,25,17,13,14,41,6,31, - 2,22,18,7,37,33,0,39,28,14,20,16,25,35,42,11,23,18,2,3, - 10,28,41,21,41,14,9,17,46,29,18,23,31,47,20,2,22,29,37,43, - 6,5,33,41,29,32,49,0,46,9,48,26,13,35,29,41,41,32,36,32, - 17,26,33,16,43,22,45,13,47,5,20,41,48,16,26,26,40,46,33,12 - }; + // Uniform distribution [0:49] + vtkm::Float32 uniform[nVerts] = { + 0, 6, 37, 22, 26, 10, 2, 33, 33, 46, 19, 25, 41, 1, 2, 26, 33, 0, 19, 3, 20, 34, 29, 46, + 42, 26, 4, 32, 20, 35, 45, 38, 13, 2, 36, 16, 31, 37, 49, 18, 12, 49, 36, 37, 32, 3, 31, 44, + 13, 21, 38, 23, 11, 13, 17, 8, 24, 44, 45, 3, 45, 25, 25, 15, 49, 24, 13, 4, 47, 3, 25, 19, + 13, 45, 26, 23, 47, 2, 38, 38, 41, 6, 0, 34, 43, 31, 36, 36, 49, 44, 11, 15, 17, 25, 29, 42, + 20, 42, 13, 20, 26, 23, 14, 8, 7, 28, 40, 1, 26, 24, 47, 37, 27, 44, 31, 42, 7, 10, 35, 6, + 4, 13, 0, 20, 1, 35, 46, 11, 9, 15, 44, 32, 7, 34, 19, 19, 24, 7, 29, 42, 29, 47, 27, 7, + 49, 20, 7, 28, 12, 24, 23, 48, 6, 9, 15, 31, 6, 32, 31, 40, 12, 23, 19, 10, 1, 45, 21, 7, + 47, 20, 6, 44, 4, 8, 3, 18, 12, 6, 39, 22, 17, 22, 40, 46, 32, 10, 33, 45, 12, 43, 23, 25, + 30, 40, 37, 23, 47, 31, 21, 41, 34, 35, 49, 47, 42, 14, 26, 25, 5, 20, 28, 43, 22, 36, 43, 35, + 40, 35, 37, 0, 44, 26, 23, 3, 35, 24, 33, 34, 9, 45, 43, 44, 27, 6, 22, 49, 10, 22, 15, 25, + 44, 21, 23, 40, 18, 10, 49, 7, 31, 30, 0, 0, 38, 36, 15, 20, 34, 34, 10, 41, 35, 41, 4, 4, + 38, 31, 10, 10, 4, 19, 47, 47, 19, 13, 34, 14, 38, 39, 21, 14, 9, 0, 9, 49, 12, 40, 6, 19, + 30, 8, 41, 7, 49, 12, 11, 5, 10, 31, 34, 39, 34, 37, 33, 31, 2, 29, 11, 15, 34, 5, 38, 26, + 27, 29, 16, 35, 7, 8, 24, 43, 40, 27, 36, 15, 6, 26, 15, 29, 25, 21, 12, 18, 19, 22, 23, 19, + 13, 3, 18, 12, 33, 33, 25, 36, 36, 47, 23, 47, 16, 23, 25, 33, 20, 30, 49, 7, 33, 17, 27, 26, + 41, 0, 13, 32, 27, 45, 13, 48, 12, 42, 34, 22, 40, 1, 8, 35, 35, 21, 29, 37, 49, 34, 13, 37, + 8, 0, 24, 3, 8, 45, 39, 37, 21, 0, 29, 25, 3, 27, 19, 10, 19, 31, 32, 35, 26, 14, 40, 18, + 34, 15, 0, 5, 26, 38, 11, 2, 3, 8, 36, 14, 2, 23, 22, 25, 22, 7, 14, 41, 34, 28, 34, 16, + 2, 49, 27, 0, 42, 1, 18, 24, 28, 36, 33, 26, 1, 6, 48, 9, 17, 30, 30, 6, 27, 47, 17, 41, + 48, 12, 12, 21, 40, 44, 12, 38, 34, 22, 13, 33, 5, 10, 5, 27, 0, 8, 29, 21, 4, 34, 18, 41, + 6, 48, 1, 4, 24, 38, 46, 12, 17, 38, 24, 37, 33, 34, 37, 1, 11, 11, 28, 32, 30, 18, 11, 11, + 32, 8, 37, 7, 2, 33, 6, 47, 24, 31, 45, 0, 29, 36, 24, 2, 22, 25, 38, 3, 22, 48, 23, 16, + 22, 37, 10, 8, 18, 46, 48, 12, 3, 6, 26, 8, 25, 5, 42, 18, 21, 16, 35, 28, 43, 37, 41, 34, + 19, 46, 30, 18, 26, 22, 20, 12, 4, 21, 23, 14, 5, 10, 40, 26, 33, 43, 12, 35, 13, 19, 4, 22, + 11, 39, 24, 0, 13, 33, 21, 9, 48, 6, 39, 47, 8, 30, 3, 17, 14, 25, 41, 41, 36, 16, 40, 31, + 2, 2, 7, 38, 3, 25, 46, 11, 10, 4, 34, 35, 24, 13, 35, 18, 10, 11, 21, 23, 43, 48, 22, 1, + 26, 1, 37, 29, 41, 16, 11, 26, 21, 20, 49, 48, 42, 43, 15, 7, 49, 31, 23, 46, 34, 40, 27, 28, + 7, 47, 41, 7, 2, 17, 5, 4, 25, 1, 28, 42, 25, 33, 36, 34, 1, 9, 33, 17, 3, 7, 46, 11, + 19, 29, 8, 1, 34, 38, 35, 3, 29, 46, 46, 21, 25, 41, 45, 30, 36, 25, 24, 8, 48, 28, 13, 26, + 34, 33, 4, 27, 30, 33, 24, 28, 29, 22, 7, 25, 36, 1, 2, 26, 16, 1, 12, 5, 19, 27, 29, 30, + 46, 38, 25, 24, 32, 34, 20, 24, 23, 35, 26, 13, 30, 14, 35, 26, 46, 11, 20, 29, 39, 46, 34, 41, + 26, 11, 7, 44, 12, 32, 0, 46, 13, 42, 13, 47, 25, 6, 20, 35, 21, 5, 38, 4, 22, 17, 14, 37, + 16, 16, 2, 28, 24, 10, 5, 48, 43, 24, 18, 40, 8, 7, 2, 7, 23, 19, 44, 21, 20, 32, 15, 3, + 40, 44, 45, 45, 38, 8, 28, 1, 40, 26, 43, 13, 43, 29, 19, 40, 26, 46, 21, 28, 37, 44, 16, 9, + 37, 35, 43, 3, 35, 43, 17, 4, 8, 20, 4, 33, 28, 40, 43, 38, 31, 44, 43, 24, 5, 18, 19, 34, + 6, 3, 7, 23, 35, 11, 19, 48, 31, 34, 45, 18, 42, 39, 21, 3, 24, 24, 22, 24, 37, 46, 15, 7, + 5, 4, 48, 20, 11, 48, 41, 9, 6, 9, 16, 28, 22, 29, 21, 18, 19, 30, 21, 7, 33, 49, 34, 20, + 42, 40, 39, 18, 0, 23, 31, 32, 32, 39, 18, 17, 19, 16, 34, 7, 14, 33, 42, 15, 7, 30, 0, 46, + 19, 25, 17, 13, 14, 41, 6, 31, 2, 22, 18, 7, 37, 33, 0, 39, 28, 14, 20, 16, 25, 35, 42, 11, + 23, 18, 2, 3, 10, 28, 41, 21, 41, 14, 9, 17, 46, 29, 18, 23, 31, 47, 20, 2, 22, 29, 37, 43, + 6, 5, 33, 41, 29, 32, 49, 0, 46, 9, 48, 26, 13, 35, 29, 41, 41, 32, 36, 32, 17, 26, 33, 16, + 43, 22, 45, 13, 47, 5, 20, 41, 48, 16, 26, 26, 40, 46, 33, 12 + }; - vtkm::cont::ArrayHandleUniformPointCoordinates - coordinates(vtkm::Id3(xVerts, yVerts, 1)); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vtkm::Id3(xVerts, yVerts, 1)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); - // Set point scalars - dataSet.AddField(vtkm::cont::Field("p_poisson", vtkm::cont::Field::ASSOC_POINTS, poisson, nVerts)); - dataSet.AddField(vtkm::cont::Field("p_normal", vtkm::cont::Field::ASSOC_POINTS, normal, nVerts)); - dataSet.AddField(vtkm::cont::Field("p_chiSquare", vtkm::cont::Field::ASSOC_POINTS, chiSquare, nVerts)); - dataSet.AddField(vtkm::cont::Field("p_uniform", vtkm::cont::Field::ASSOC_POINTS, uniform, nVerts)); + // Set point scalars + dataSet.AddField( + vtkm::cont::Field("p_poisson", vtkm::cont::Field::ASSOC_POINTS, poisson, nVerts)); + dataSet.AddField(vtkm::cont::Field("p_normal", vtkm::cont::Field::ASSOC_POINTS, normal, nVerts)); + dataSet.AddField( + vtkm::cont::Field("p_chiSquare", vtkm::cont::Field::ASSOC_POINTS, chiSquare, nVerts)); + dataSet.AddField( + vtkm::cont::Field("p_uniform", vtkm::cont::Field::ASSOC_POINTS, uniform, nVerts)); - // Set cell scalars - dataSet.AddField(vtkm::cont::Field("c_poisson", vtkm::cont::Field::ASSOC_CELL_SET, "cells", poisson, nCells)); - dataSet.AddField(vtkm::cont::Field("c_normal", vtkm::cont::Field::ASSOC_CELL_SET, "cells", normal, nCells)); - dataSet.AddField(vtkm::cont::Field("c_chiSquare", vtkm::cont::Field::ASSOC_CELL_SET, "cells", chiSquare, nCells)); - dataSet.AddField(vtkm::cont::Field("c_uniform", vtkm::cont::Field::ASSOC_CELL_SET, "cells", poisson, nCells)); + // Set cell scalars + dataSet.AddField( + vtkm::cont::Field("c_poisson", vtkm::cont::Field::ASSOC_CELL_SET, "cells", poisson, nCells)); + dataSet.AddField( + vtkm::cont::Field("c_normal", vtkm::cont::Field::ASSOC_CELL_SET, "cells", normal, nCells)); + dataSet.AddField(vtkm::cont::Field("c_chiSquare", vtkm::cont::Field::ASSOC_CELL_SET, "cells", + chiSquare, nCells)); + dataSet.AddField( + vtkm::cont::Field("c_uniform", vtkm::cont::Field::ASSOC_CELL_SET, "cells", poisson, nCells)); - vtkm::cont::CellSetStructured cellSet("cells"); + vtkm::cont::CellSetStructured cellSet("cells"); - //Set regular structure - cellSet.SetPointDimensions(vtkm::make_Vec(xVerts, yVerts)); - dataSet.AddCellSet(cellSet); + //Set regular structure + cellSet.SetPointDimensions(vtkm::make_Vec(xVerts, yVerts)); + dataSet.AddCellSet(cellSet); - return dataSet; + return dataSet; } // // Print the histogram result and tally // -void PrintHistogram(vtkm::cont::ArrayHandle bins, - vtkm::Id numberOfBins, - const vtkm::Range& range, - vtkm::Float32 delta) +void PrintHistogram(vtkm::cont::ArrayHandle bins, vtkm::Id numberOfBins, + const vtkm::Range& range, vtkm::Float32 delta) { vtkm::cont::ArrayHandle::PortalConstControl binPortal = bins.GetPortalConstControl(); vtkm::Id sum = 0; - for (vtkm::Id i = 0; i < numberOfBins; i++) { + for (vtkm::Id i = 0; i < numberOfBins; i++) + { vtkm::Float64 lo = range.Min + (static_cast(i) * delta); vtkm::Float64 hi = lo + delta; sum += binPortal.Get(i); - std::cout << " BIN[" << i << "] Range[" << lo << ", " << hi << "] = " - << binPortal.Get(i) << std::endl; + std::cout << " BIN[" << i << "] Range[" << lo << ", " << hi << "] = " << binPortal.Get(i) + << std::endl; } VTKM_TEST_ASSERT(test_equal(sum, 1000), "Histogram not full"); } @@ -349,9 +321,7 @@ void TestFieldHistogram() PrintHistogram(bins, numberOfBins, range, delta); } // TestFieldHistogram - -int UnitTestFieldHistogram(int, char *[]) +int UnitTestFieldHistogram(int, char* []) { return vtkm::cont::testing::Testing::Run(TestFieldHistogram); } - diff --git a/vtkm/worklet/testing/UnitTestFieldStatistics.cxx b/vtkm/worklet/testing/UnitTestFieldStatistics.cxx index 90697c196..8878e643b 100644 --- a/vtkm/worklet/testing/UnitTestFieldStatistics.cxx +++ b/vtkm/worklet/testing/UnitTestFieldStatistics.cxx @@ -30,34 +30,32 @@ // vtkm::cont::DataSet Make2DUniformStatDataSet0() { - vtkm::cont::DataSet dataSet; + vtkm::cont::DataSet dataSet; - const int dimension = 2; - const int xVerts = 11; - const int yVerts = 2; - const int nVerts = xVerts * yVerts; + const int dimension = 2; + const int xVerts = 11; + const int yVerts = 2; + const int nVerts = xVerts * yVerts; - const int xCells = xVerts - 1; - const int yCells = yVerts - 1; - const int nCells = xCells * yCells; + const int xCells = xVerts - 1; + const int yCells = yVerts - 1; + const int nCells = xCells * yCells; - vtkm::cont::ArrayHandleUniformPointCoordinates - coordinates(vtkm::Id3(xVerts, yVerts, 1)); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vtkm::Id3(xVerts, yVerts, 1)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); - // Create cell scalar - vtkm::Float32 data[nVerts] = {4,1,10,6,8,2,9,3,5,7}; - dataSet.AddField(vtkm::cont::Field("data", vtkm::cont::Field::ASSOC_CELL_SET, - "cells", data, nCells)); + // Create cell scalar + vtkm::Float32 data[nVerts] = { 4, 1, 10, 6, 8, 2, 9, 3, 5, 7 }; + dataSet.AddField( + vtkm::cont::Field("data", vtkm::cont::Field::ASSOC_CELL_SET, "cells", data, nCells)); - vtkm::cont::CellSetStructured cellSet("cells"); + vtkm::cont::CellSetStructured cellSet("cells"); - //Set uniform structure - cellSet.SetPointDimensions(vtkm::make_Vec(xVerts, yVerts)); - dataSet.AddCellSet(cellSet); + //Set uniform structure + cellSet.SetPointDimensions(vtkm::make_Vec(xVerts, yVerts)); + dataSet.AddCellSet(cellSet); - return dataSet; + return dataSet; } // @@ -65,271 +63,237 @@ vtkm::cont::DataSet Make2DUniformStatDataSet0() // vtkm::cont::DataSet Make2DUniformStatDataSet1() { - vtkm::cont::DataSet dataSet; + vtkm::cont::DataSet dataSet; - const int dimension = 2; - const int xVerts = 20; - const int yVerts = 50; - const int nVerts = xVerts * yVerts; + const int dimension = 2; + const int xVerts = 20; + const int yVerts = 50; + const int nVerts = xVerts * yVerts; - const int xCells = xVerts - 1; - const int yCells = yVerts - 1; - const int nCells = xCells * yCells; + const int xCells = xVerts - 1; + const int yCells = yVerts - 1; + const int nCells = xCells * yCells; - // Poisson distribution [0:49] mean = 10 - vtkm::Float32 poisson[nVerts] = { - 8,10,9,8,14,11,12,9,19,7,8,11,7,10,11,11,11,6,8,8, - 7,15,9,7,8,10,9,10,10,12,7,6,14,10,14,10,7,11,13,9, - 13,11,10,10,12,12,7,12,10,11,12,8,13,9,5,12,11,9,5,9, - 12,9,6,10,11,9,9,11,9,7,7,18,16,13,12,8,10,11,9,8, - 17,3,15,15,9,10,10,8,10,9,7,9,8,10,13,9,7,11,7,10, - 13,10,11,9,10,7,10,6,12,6,9,7,6,12,12,9,12,12,11,6, - 1,12,8,13,14,8,8,10,7,7,6,7,5,11,6,11,13,8,13,5, - 9,12,7,11,10,15,11,9,7,12,15,7,8,7,12,8,21,16,13,11, - 10,14,12,11,12,14,7,11,7,12,16,8,10,8,9,7,8,7,13,13, - 11,15,7,7,6,11,7,12,12,13,14,11,13,11,11,9,15,8,6,11, - 12,10,11,7,6,14,11,10,12,5,8,9,11,15,11,10,17,14,9,10, - 10,12,11,13,13,12,11,7,8,10,7,11,10,5,8,10,13,13,12,6, - 10,7,13,8,11,7,10,7,8,7,14,16,9,11,8,11,9,15,11,10, - 10,12,7,7,11,7,5,17,9,11,11,11,10,17,10,15,7,11,12,16, - 9,8,11,14,9,22,8,8,8,13,12,12,1,14,15,6,15,8,11,16, - 14,8,6,9,8,9,9,10,8,6,13,8,6,12,11,12,13,8,6,6, - 5,6,10,9,11,12,14,12,10,11,10,10,8,13,8,11,7,13,13,12, - 12,13,15,4,9,16,7,9,8,10,6,9,11,12,6,7,14,6,4,15, - 5,18,9,9,11,12,9,5,6,7,15,6,11,14,8,12,6,9,5,9, - 14,9,12,6,9,14,11,12,12,13,15,9,8,7,13,12,7,13,6,9, - 10,10,10,9,11,5,9,13,16,9,10,8,9,6,13,12,8,12,9,12, - 17,8,11,10,8,7,11,7,13,13,10,14,11,9,6,6,14,16,5,9, - 13,11,12,7,4,6,9,11,11,10,12,9,7,13,8,8,12,5,10,7, - 11,11,10,10,14,6,8,8,3,12,16,11,11,7,6,12,11,5,9,12, - 9,13,7,8,9,9,12,7,9,8,12,11,6,10,6,7,6,11,10,8, - 9,8,4,19,12,6,10,9,6,12,9,14,7,8,11,7,7,12,13,9, - 13,12,8,6,10,17,19,10,10,13,5,11,8,10,8,16,12,6,6,7, - 10,9,12,8,5,10,7,18,9,12,10,4,9,9,15,15,6,7,7,11, - 12,4,8,18,5,12,12,11,10,14,9,9,10,8,10,8,10,9,9,4, - 10,12,5,13,6,9,7,5,12,8,11,10,9,17,9,9,8,11,18,11, - 10,9,4,13,10,15,5,10,9,7,7,8,10,6,6,19,10,16,7,7, - 9,10,10,13,10,10,14,13,12,8,7,13,12,11,13,12,9,8,6,8, - 10,3,8,8,12,12,13,13,10,5,10,7,13,7,9,5,13,7,10,8, - 13,11,17,9,6,14,10,10,13,9,15,8,15,9,12,11,12,8,3,9, - 8,10,12,8,14,13,12,11,12,9,18,10,13,7,4,4,11,8,3,7, - 9,10,12,7,11,21,9,7,8,9,10,10,11,9,15,13,21,12,8,11, - 9,10,11,9,17,8,9,8,14,6,13,9,8,11,12,12,12,11,6,13, - 7,9,11,15,17,17,11,10,7,8,11,8,6,9,13,7,9,6,5,10, - 7,16,16,9,7,6,14,8,13,16,7,7,10,11,6,10,9,9,8,14, - 11,9,11,9,10,11,9,8,14,11,7,12,11,8,9,9,10,11,11,10, - 9,6,6,11,16,10,7,6,6,13,18,8,12,11,14,13,8,8,10,17, - 17,6,6,10,18,5,8,11,6,6,14,10,9,6,11,6,13,12,10,6, - 9,9,9,13,7,17,10,14,10,9,10,10,11,10,11,15,13,6,12,19, - 10,12,12,15,13,10,10,13,11,13,13,17,6,5,6,7,6,9,13,11, - 8,12,9,6,10,16,11,12,5,12,14,13,13,16,11,6,12,12,15,8, - 7,11,8,5,10,8,9,11,9,12,10,5,12,11,9,6,14,12,10,11, - 9,6,7,12,8,12,8,15,9,8,7,9,3,6,14,7,8,11,9,10, - 12,9,10,9,8,6,12,11,6,8,9,8,15,11,7,18,12,11,10,13, - 11,11,10,7,9,8,8,11,11,13,6,12,13,16,11,11,5,12,14,15, - 9,14,15,6,8,7,6,8,9,19,7,12,11,8,14,12,10,9,3,7 - }; + // Poisson distribution [0:49] mean = 10 + vtkm::Float32 poisson[nVerts] = { + 8, 10, 9, 8, 14, 11, 12, 9, 19, 7, 8, 11, 7, 10, 11, 11, 11, 6, 8, 8, 7, 15, 9, 7, + 8, 10, 9, 10, 10, 12, 7, 6, 14, 10, 14, 10, 7, 11, 13, 9, 13, 11, 10, 10, 12, 12, 7, 12, + 10, 11, 12, 8, 13, 9, 5, 12, 11, 9, 5, 9, 12, 9, 6, 10, 11, 9, 9, 11, 9, 7, 7, 18, + 16, 13, 12, 8, 10, 11, 9, 8, 17, 3, 15, 15, 9, 10, 10, 8, 10, 9, 7, 9, 8, 10, 13, 9, + 7, 11, 7, 10, 13, 10, 11, 9, 10, 7, 10, 6, 12, 6, 9, 7, 6, 12, 12, 9, 12, 12, 11, 6, + 1, 12, 8, 13, 14, 8, 8, 10, 7, 7, 6, 7, 5, 11, 6, 11, 13, 8, 13, 5, 9, 12, 7, 11, + 10, 15, 11, 9, 7, 12, 15, 7, 8, 7, 12, 8, 21, 16, 13, 11, 10, 14, 12, 11, 12, 14, 7, 11, + 7, 12, 16, 8, 10, 8, 9, 7, 8, 7, 13, 13, 11, 15, 7, 7, 6, 11, 7, 12, 12, 13, 14, 11, + 13, 11, 11, 9, 15, 8, 6, 11, 12, 10, 11, 7, 6, 14, 11, 10, 12, 5, 8, 9, 11, 15, 11, 10, + 17, 14, 9, 10, 10, 12, 11, 13, 13, 12, 11, 7, 8, 10, 7, 11, 10, 5, 8, 10, 13, 13, 12, 6, + 10, 7, 13, 8, 11, 7, 10, 7, 8, 7, 14, 16, 9, 11, 8, 11, 9, 15, 11, 10, 10, 12, 7, 7, + 11, 7, 5, 17, 9, 11, 11, 11, 10, 17, 10, 15, 7, 11, 12, 16, 9, 8, 11, 14, 9, 22, 8, 8, + 8, 13, 12, 12, 1, 14, 15, 6, 15, 8, 11, 16, 14, 8, 6, 9, 8, 9, 9, 10, 8, 6, 13, 8, + 6, 12, 11, 12, 13, 8, 6, 6, 5, 6, 10, 9, 11, 12, 14, 12, 10, 11, 10, 10, 8, 13, 8, 11, + 7, 13, 13, 12, 12, 13, 15, 4, 9, 16, 7, 9, 8, 10, 6, 9, 11, 12, 6, 7, 14, 6, 4, 15, + 5, 18, 9, 9, 11, 12, 9, 5, 6, 7, 15, 6, 11, 14, 8, 12, 6, 9, 5, 9, 14, 9, 12, 6, + 9, 14, 11, 12, 12, 13, 15, 9, 8, 7, 13, 12, 7, 13, 6, 9, 10, 10, 10, 9, 11, 5, 9, 13, + 16, 9, 10, 8, 9, 6, 13, 12, 8, 12, 9, 12, 17, 8, 11, 10, 8, 7, 11, 7, 13, 13, 10, 14, + 11, 9, 6, 6, 14, 16, 5, 9, 13, 11, 12, 7, 4, 6, 9, 11, 11, 10, 12, 9, 7, 13, 8, 8, + 12, 5, 10, 7, 11, 11, 10, 10, 14, 6, 8, 8, 3, 12, 16, 11, 11, 7, 6, 12, 11, 5, 9, 12, + 9, 13, 7, 8, 9, 9, 12, 7, 9, 8, 12, 11, 6, 10, 6, 7, 6, 11, 10, 8, 9, 8, 4, 19, + 12, 6, 10, 9, 6, 12, 9, 14, 7, 8, 11, 7, 7, 12, 13, 9, 13, 12, 8, 6, 10, 17, 19, 10, + 10, 13, 5, 11, 8, 10, 8, 16, 12, 6, 6, 7, 10, 9, 12, 8, 5, 10, 7, 18, 9, 12, 10, 4, + 9, 9, 15, 15, 6, 7, 7, 11, 12, 4, 8, 18, 5, 12, 12, 11, 10, 14, 9, 9, 10, 8, 10, 8, + 10, 9, 9, 4, 10, 12, 5, 13, 6, 9, 7, 5, 12, 8, 11, 10, 9, 17, 9, 9, 8, 11, 18, 11, + 10, 9, 4, 13, 10, 15, 5, 10, 9, 7, 7, 8, 10, 6, 6, 19, 10, 16, 7, 7, 9, 10, 10, 13, + 10, 10, 14, 13, 12, 8, 7, 13, 12, 11, 13, 12, 9, 8, 6, 8, 10, 3, 8, 8, 12, 12, 13, 13, + 10, 5, 10, 7, 13, 7, 9, 5, 13, 7, 10, 8, 13, 11, 17, 9, 6, 14, 10, 10, 13, 9, 15, 8, + 15, 9, 12, 11, 12, 8, 3, 9, 8, 10, 12, 8, 14, 13, 12, 11, 12, 9, 18, 10, 13, 7, 4, 4, + 11, 8, 3, 7, 9, 10, 12, 7, 11, 21, 9, 7, 8, 9, 10, 10, 11, 9, 15, 13, 21, 12, 8, 11, + 9, 10, 11, 9, 17, 8, 9, 8, 14, 6, 13, 9, 8, 11, 12, 12, 12, 11, 6, 13, 7, 9, 11, 15, + 17, 17, 11, 10, 7, 8, 11, 8, 6, 9, 13, 7, 9, 6, 5, 10, 7, 16, 16, 9, 7, 6, 14, 8, + 13, 16, 7, 7, 10, 11, 6, 10, 9, 9, 8, 14, 11, 9, 11, 9, 10, 11, 9, 8, 14, 11, 7, 12, + 11, 8, 9, 9, 10, 11, 11, 10, 9, 6, 6, 11, 16, 10, 7, 6, 6, 13, 18, 8, 12, 11, 14, 13, + 8, 8, 10, 17, 17, 6, 6, 10, 18, 5, 8, 11, 6, 6, 14, 10, 9, 6, 11, 6, 13, 12, 10, 6, + 9, 9, 9, 13, 7, 17, 10, 14, 10, 9, 10, 10, 11, 10, 11, 15, 13, 6, 12, 19, 10, 12, 12, 15, + 13, 10, 10, 13, 11, 13, 13, 17, 6, 5, 6, 7, 6, 9, 13, 11, 8, 12, 9, 6, 10, 16, 11, 12, + 5, 12, 14, 13, 13, 16, 11, 6, 12, 12, 15, 8, 7, 11, 8, 5, 10, 8, 9, 11, 9, 12, 10, 5, + 12, 11, 9, 6, 14, 12, 10, 11, 9, 6, 7, 12, 8, 12, 8, 15, 9, 8, 7, 9, 3, 6, 14, 7, + 8, 11, 9, 10, 12, 9, 10, 9, 8, 6, 12, 11, 6, 8, 9, 8, 15, 11, 7, 18, 12, 11, 10, 13, + 11, 11, 10, 7, 9, 8, 8, 11, 11, 13, 6, 12, 13, 16, 11, 11, 5, 12, 14, 15, 9, 14, 15, 6, + 8, 7, 6, 8, 9, 19, 7, 12, 11, 8, 14, 12, 10, 9, 3, 7 + }; - // Normal distribution [0:49] mean = 25 standard deviation = 5.0 - vtkm::Float32 normal[nVerts] = { - 24,19,28,19,25,28,25,22,27,26,35,26,30,28,24,23,21,31,20,11, - 21,22,14,25,20,24,24,21,24,29,26,21,32,29,23,28,31,25,23,30, - 18,24,22,25,33,24,22,23,21,17,20,28,30,18,20,32,25,24,32,15, - 27,24,27,19,30,27,17,24,29,23,22,19,24,19,28,24,25,24,25,30, - 24,31,30,27,25,25,25,15,29,23,29,29,21,25,35,24,28,10,31,23, - 22,22,22,33,29,27,18,27,27,24,20,20,21,29,23,31,23,23,22,23, - 30,27,28,31,16,29,25,19,33,28,25,24,15,27,37,29,15,19,14,19, - 24,23,30,29,35,22,19,26,26,14,24,30,32,23,30,29,26,27,25,23, - 17,26,32,29,20,17,21,23,22,20,36,12,26,23,15,29,24,22,26,33, - 24,23,20,26,22,17,26,26,34,22,26,17,23,18,29,27,21,29,28,29, - 24,25,28,19,18,21,23,23,27,25,24,25,24,25,21,25,21,27,23,20, - 29,15,28,30,24,27,17,23,16,21,25,17,27,28,21,13,19,27,16,30, - 31,25,30,17,17,25,26,22,21,17,24,17,25,22,27,14,27,24,27,25, - 26,31,21,23,30,30,22,19,23,22,23,25,24,25,24,28,26,30,18,25, - 30,37,27,34,28,34,25,10,25,22,35,30,24,32,24,34,19,29,26,16, - 27,17,26,23,27,25,26,21,31,21,28,15,32,24,23,23,18,15,22,25, - 16,25,31,26,25,28,24,26,23,25,33,20,27,28,24,29,32,20,24,20, - 19,32,24,6,24,21,26,18,15,30,19,26,22,30,35,23,22,30,20,22, - 18,30,28,25,16,25,27,30,18,24,30,28,20,19,20,28,21,24,15,33, - 20,18,20,36,30,26,25,18,28,27,31,31,15,26,16,22,27,14,17,27, - 27,22,32,30,22,34,22,25,20,22,26,29,28,33,18,23,20,20,27,24, - 28,21,25,27,25,19,19,25,19,32,29,27,23,21,28,33,23,23,28,26, - 31,19,21,29,21,27,23,32,24,26,21,28,28,24,17,31,27,21,19,32, - 28,23,30,23,29,15,26,26,15,20,25,26,27,31,21,23,23,33,28,19, - 23,22,22,25,27,17,23,17,25,28,26,30,32,31,19,25,25,19,23,29, - 27,23,34,22,13,21,32,10,20,33,21,17,29,31,14,24,23,19,19,22, - 17,26,37,26,22,26,38,29,29,27,30,20,31,14,32,32,24,23,23,18, - 21,31,24,20,28,15,21,25,25,20,30,25,22,21,21,25,24,25,18,23, - 28,30,20,27,27,19,10,32,24,20,29,26,25,20,25,29,28,24,32,26, - 22,19,23,27,27,29,20,25,21,30,28,31,24,19,23,19,19,18,30,18, - 16,24,20,20,30,25,29,25,31,21,28,31,24,26,27,21,24,23,26,18, - 32,26,28,26,24,26,29,30,22,20,24,28,25,29,20,21,22,15,30,27, - 33,26,22,32,30,31,20,19,24,26,27,31,17,17,33,27,16,27,27,22, - 27,19,24,21,17,24,28,23,26,24,19,26,20,24,22,19,22,21,21,28, - 29,39,19,16,25,29,31,22,22,29,26,22,22,22,26,23,23,23,30,25, - 25,25,27,29,18,33,21,12,22,29,12,20,35,22,34,28,18,29,21,20, - 24,33,24,26,23,34,31,25,31,22,35,21,20,29,27,22,30,22,27,23, - 22,32,16,19,27,22,24,27,21,33,25,25,19,28,20,27,21,25,28,20, - 27,22,21,20,26,30,33,23,20,24,17,23,28,35,14,23,22,28,28,26, - 25,18,20,28,28,22,13,24,22,20,30,26,26,18,22,20,23,24,20,27, - 34,28,18,24,34,33,25,33,37,21,20,31,19,23,29,22,21,24,19,27, - 19,32,25,23,33,26,33,27,29,30,19,22,30,19,18,24,25,17,31,19, - 31,26,22,23,28,28,25,24,19,19,27,28,23,21,29,26,31,22,22,25, - 16,29,21,22,23,25,22,21,22,19,27,26,28,30,22,21,24,22,23,26, - 28,22,18,25,23,27,31,19,15,29,20,19,27,25,21,29,22,24,25,17, - 36,29,22,22,24,28,27,22,26,31,29,31,18,25,23,16,37,27,21,31, - 25,24,20,23,28,33,24,21,26,20,18,31,20,24,23,19,27,17,23,23, - 20,26,28,23,26,31,25,31,19,32,26,18,19,29,20,21,15,25,27,29, - 22,22,22,26,23,22,23,29,28,20,21,22,20,22,27,25,23,32,23,20, - 31,20,27,26,34,20,22,36,21,29,25,20,21,22,29,29,25,22,24,22 - }; + // Normal distribution [0:49] mean = 25 standard deviation = 5.0 + vtkm::Float32 normal[nVerts] = { + 24, 19, 28, 19, 25, 28, 25, 22, 27, 26, 35, 26, 30, 28, 24, 23, 21, 31, 20, 11, 21, 22, 14, 25, + 20, 24, 24, 21, 24, 29, 26, 21, 32, 29, 23, 28, 31, 25, 23, 30, 18, 24, 22, 25, 33, 24, 22, 23, + 21, 17, 20, 28, 30, 18, 20, 32, 25, 24, 32, 15, 27, 24, 27, 19, 30, 27, 17, 24, 29, 23, 22, 19, + 24, 19, 28, 24, 25, 24, 25, 30, 24, 31, 30, 27, 25, 25, 25, 15, 29, 23, 29, 29, 21, 25, 35, 24, + 28, 10, 31, 23, 22, 22, 22, 33, 29, 27, 18, 27, 27, 24, 20, 20, 21, 29, 23, 31, 23, 23, 22, 23, + 30, 27, 28, 31, 16, 29, 25, 19, 33, 28, 25, 24, 15, 27, 37, 29, 15, 19, 14, 19, 24, 23, 30, 29, + 35, 22, 19, 26, 26, 14, 24, 30, 32, 23, 30, 29, 26, 27, 25, 23, 17, 26, 32, 29, 20, 17, 21, 23, + 22, 20, 36, 12, 26, 23, 15, 29, 24, 22, 26, 33, 24, 23, 20, 26, 22, 17, 26, 26, 34, 22, 26, 17, + 23, 18, 29, 27, 21, 29, 28, 29, 24, 25, 28, 19, 18, 21, 23, 23, 27, 25, 24, 25, 24, 25, 21, 25, + 21, 27, 23, 20, 29, 15, 28, 30, 24, 27, 17, 23, 16, 21, 25, 17, 27, 28, 21, 13, 19, 27, 16, 30, + 31, 25, 30, 17, 17, 25, 26, 22, 21, 17, 24, 17, 25, 22, 27, 14, 27, 24, 27, 25, 26, 31, 21, 23, + 30, 30, 22, 19, 23, 22, 23, 25, 24, 25, 24, 28, 26, 30, 18, 25, 30, 37, 27, 34, 28, 34, 25, 10, + 25, 22, 35, 30, 24, 32, 24, 34, 19, 29, 26, 16, 27, 17, 26, 23, 27, 25, 26, 21, 31, 21, 28, 15, + 32, 24, 23, 23, 18, 15, 22, 25, 16, 25, 31, 26, 25, 28, 24, 26, 23, 25, 33, 20, 27, 28, 24, 29, + 32, 20, 24, 20, 19, 32, 24, 6, 24, 21, 26, 18, 15, 30, 19, 26, 22, 30, 35, 23, 22, 30, 20, 22, + 18, 30, 28, 25, 16, 25, 27, 30, 18, 24, 30, 28, 20, 19, 20, 28, 21, 24, 15, 33, 20, 18, 20, 36, + 30, 26, 25, 18, 28, 27, 31, 31, 15, 26, 16, 22, 27, 14, 17, 27, 27, 22, 32, 30, 22, 34, 22, 25, + 20, 22, 26, 29, 28, 33, 18, 23, 20, 20, 27, 24, 28, 21, 25, 27, 25, 19, 19, 25, 19, 32, 29, 27, + 23, 21, 28, 33, 23, 23, 28, 26, 31, 19, 21, 29, 21, 27, 23, 32, 24, 26, 21, 28, 28, 24, 17, 31, + 27, 21, 19, 32, 28, 23, 30, 23, 29, 15, 26, 26, 15, 20, 25, 26, 27, 31, 21, 23, 23, 33, 28, 19, + 23, 22, 22, 25, 27, 17, 23, 17, 25, 28, 26, 30, 32, 31, 19, 25, 25, 19, 23, 29, 27, 23, 34, 22, + 13, 21, 32, 10, 20, 33, 21, 17, 29, 31, 14, 24, 23, 19, 19, 22, 17, 26, 37, 26, 22, 26, 38, 29, + 29, 27, 30, 20, 31, 14, 32, 32, 24, 23, 23, 18, 21, 31, 24, 20, 28, 15, 21, 25, 25, 20, 30, 25, + 22, 21, 21, 25, 24, 25, 18, 23, 28, 30, 20, 27, 27, 19, 10, 32, 24, 20, 29, 26, 25, 20, 25, 29, + 28, 24, 32, 26, 22, 19, 23, 27, 27, 29, 20, 25, 21, 30, 28, 31, 24, 19, 23, 19, 19, 18, 30, 18, + 16, 24, 20, 20, 30, 25, 29, 25, 31, 21, 28, 31, 24, 26, 27, 21, 24, 23, 26, 18, 32, 26, 28, 26, + 24, 26, 29, 30, 22, 20, 24, 28, 25, 29, 20, 21, 22, 15, 30, 27, 33, 26, 22, 32, 30, 31, 20, 19, + 24, 26, 27, 31, 17, 17, 33, 27, 16, 27, 27, 22, 27, 19, 24, 21, 17, 24, 28, 23, 26, 24, 19, 26, + 20, 24, 22, 19, 22, 21, 21, 28, 29, 39, 19, 16, 25, 29, 31, 22, 22, 29, 26, 22, 22, 22, 26, 23, + 23, 23, 30, 25, 25, 25, 27, 29, 18, 33, 21, 12, 22, 29, 12, 20, 35, 22, 34, 28, 18, 29, 21, 20, + 24, 33, 24, 26, 23, 34, 31, 25, 31, 22, 35, 21, 20, 29, 27, 22, 30, 22, 27, 23, 22, 32, 16, 19, + 27, 22, 24, 27, 21, 33, 25, 25, 19, 28, 20, 27, 21, 25, 28, 20, 27, 22, 21, 20, 26, 30, 33, 23, + 20, 24, 17, 23, 28, 35, 14, 23, 22, 28, 28, 26, 25, 18, 20, 28, 28, 22, 13, 24, 22, 20, 30, 26, + 26, 18, 22, 20, 23, 24, 20, 27, 34, 28, 18, 24, 34, 33, 25, 33, 37, 21, 20, 31, 19, 23, 29, 22, + 21, 24, 19, 27, 19, 32, 25, 23, 33, 26, 33, 27, 29, 30, 19, 22, 30, 19, 18, 24, 25, 17, 31, 19, + 31, 26, 22, 23, 28, 28, 25, 24, 19, 19, 27, 28, 23, 21, 29, 26, 31, 22, 22, 25, 16, 29, 21, 22, + 23, 25, 22, 21, 22, 19, 27, 26, 28, 30, 22, 21, 24, 22, 23, 26, 28, 22, 18, 25, 23, 27, 31, 19, + 15, 29, 20, 19, 27, 25, 21, 29, 22, 24, 25, 17, 36, 29, 22, 22, 24, 28, 27, 22, 26, 31, 29, 31, + 18, 25, 23, 16, 37, 27, 21, 31, 25, 24, 20, 23, 28, 33, 24, 21, 26, 20, 18, 31, 20, 24, 23, 19, + 27, 17, 23, 23, 20, 26, 28, 23, 26, 31, 25, 31, 19, 32, 26, 18, 19, 29, 20, 21, 15, 25, 27, 29, + 22, 22, 22, 26, 23, 22, 23, 29, 28, 20, 21, 22, 20, 22, 27, 25, 23, 32, 23, 20, 31, 20, 27, 26, + 34, 20, 22, 36, 21, 29, 25, 20, 21, 22, 29, 29, 25, 22, 24, 22 + }; - //Chi squared distribution [0:49] degrees of freedom = 5.0 - vtkm::Float32 chiSquare[nVerts] = { - 3,1,4,6,5,4,8,7,2,9,2,0,0,4,3,2,5,2,3,6, - 3,8,3,4,3,3,2,7,2,10,9,6,1,1,4,7,3,3,1,4, - 4,3,9,4,4,7,3,2,4,7,3,3,2,10,1,6,2,2,3,8, - 3,3,6,9,4,1,4,3,16,7,0,1,8,7,13,3,5,0,3,8, - 10,3,5,5,1,5,2,1,3,2,5,3,4,3,3,3,3,1,13,2, - 3,1,2,7,3,4,1,2,5,4,4,4,2,6,3,2,7,8,1,3, - 4,1,2,0,1,6,1,8,8,1,1,4,2,1,4,3,5,4,6,4, - 2,3,8,8,3,3,3,4,5,8,8,16,7,12,4,3,14,8,3,12, - 5,0,5,3,5,2,9,2,9,4,1,0,0,4,4,6,3,4,11,2, - 4,7,4,2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, 1, 0, + 6, 3, 3, 5, 4, 7, 2, 2, 15, 7, 3, 10, 4, 2, 6, 3, 4, 8, 3, 1, 5, 5, 5, 4, + 3, 7, 3, 4, 5, 5, 2, 4, 2, 5, 1, 12, 5, 6, 3, 2, 8, 5, 2, 3, 11, 11, 6, 5, + 0, 3, 3, 9, 4, 2, 11, 1, 5, 3, 5, 6, 3, 6, 4, 2, 4, 10, 11, 3, 3, 4, 1, 1, + 1, 3, 5, 5, 1, 1, 4, 1, 5, 1, 6, 8, 6, 4, 6, 7, 6, 3, 5, 3, 6, 6, 6, 4, + 0, 6, 3, 1, 2, 4, 2, 6, 1, 1, 1, 2, 2, 4, 7, 2, 6, 2, 5, 7, 6, 4, 6, 3, + 1, 4, 5, 1, 4, 6, 2, 3, 0, 6, 11, 2, 9, 2, 6, 4, 5, 6, 2, 19, 2, 10, 4, 2, + 3, 3, 11, 7, 3, 3, 1, 5, 3, 6, 4, 3, 0, 6, 6, 6, 4, 2, 5, 2, 2, 2, 6, 10, + 4, 9, 3, 7, 7, 0, 6, 8, 5, 2, 3, 2, 3, 3, 3, 1, 6, 1, 8, 2, 5, 3, 6, 11, + 5, 7, 2, 6, 7, 3, 4, 1, 0, 5, 8, 3, 2, 9, 3, 1, 2, 3, 3, 9, 5, 6, 5, 1, + 4, 5, 6, 7, 6, 1, 5, 1, 6, 6, 2, 6, 7, 2, 4, 6 + }; - // Uniform distribution [0:49] - vtkm::Float32 uniform[nVerts] = { - 0,6,37,22,26,10,2,33,33,46,19,25,41,1,2,26,33,0,19,3, - 20,34,29,46,42,26,4,32,20,35,45,38,13,2,36,16,31,37,49,18, - 12,49,36,37,32,3,31,44,13,21,38,23,11,13,17,8,24,44,45,3, - 45,25,25,15,49,24,13,4,47,3,25,19,13,45,26,23,47,2,38,38, - 41,6,0,34,43,31,36,36,49,44,11,15,17,25,29,42,20,42,13,20, - 26,23,14,8,7,28,40,1,26,24,47,37,27,44,31,42,7,10,35,6, - 4,13,0,20,1,35,46,11,9,15,44,32,7,34,19,19,24,7,29,42, - 29,47,27,7,49,20,7,28,12,24,23,48,6,9,15,31,6,32,31,40, - 12,23,19,10,1,45,21,7,47,20,6,44,4,8,3,18,12,6,39,22, - 17,22,40,46,32,10,33,45,12,43,23,25,30,40,37,23,47,31,21,41, - 34,35,49,47,42,14,26,25,5,20,28,43,22,36,43,35,40,35,37,0, - 44,26,23,3,35,24,33,34,9,45,43,44,27,6,22,49,10,22,15,25, - 44,21,23,40,18,10,49,7,31,30,0,0,38,36,15,20,34,34,10,41, - 35,41,4,4,38,31,10,10,4,19,47,47,19,13,34,14,38,39,21,14, - 9,0,9,49,12,40,6,19,30,8,41,7,49,12,11,5,10,31,34,39, - 34,37,33,31,2,29,11,15,34,5,38,26,27,29,16,35,7,8,24,43, - 40,27,36,15,6,26,15,29,25,21,12,18,19,22,23,19,13,3,18,12, - 33,33,25,36,36,47,23,47,16,23,25,33,20,30,49,7,33,17,27,26, - 41,0,13,32,27,45,13,48,12,42,34,22,40,1,8,35,35,21,29,37, - 49,34,13,37,8,0,24,3,8,45,39,37,21,0,29,25,3,27,19,10, - 19,31,32,35,26,14,40,18,34,15,0,5,26,38,11,2,3,8,36,14, - 2,23,22,25,22,7,14,41,34,28,34,16,2,49,27,0,42,1,18,24, - 28,36,33,26,1,6,48,9,17,30,30,6,27,47,17,41,48,12,12,21, - 40,44,12,38,34,22,13,33,5,10,5,27,0,8,29,21,4,34,18,41, - 6,48,1,4,24,38,46,12,17,38,24,37,33,34,37,1,11,11,28,32, - 30,18,11,11,32,8,37,7,2,33,6,47,24,31,45,0,29,36,24,2, - 22,25,38,3,22,48,23,16,22,37,10,8,18,46,48,12,3,6,26,8, - 25,5,42,18,21,16,35,28,43,37,41,34,19,46,30,18,26,22,20,12, - 4,21,23,14,5,10,40,26,33,43,12,35,13,19,4,22,11,39,24,0, - 13,33,21,9,48,6,39,47,8,30,3,17,14,25,41,41,36,16,40,31, - 2,2,7,38,3,25,46,11,10,4,34,35,24,13,35,18,10,11,21,23, - 43,48,22,1,26,1,37,29,41,16,11,26,21,20,49,48,42,43,15,7, - 49,31,23,46,34,40,27,28,7,47,41,7,2,17,5,4,25,1,28,42, - 25,33,36,34,1,9,33,17,3,7,46,11,19,29,8,1,34,38,35,3, - 29,46,46,21,25,41,45,30,36,25,24,8,48,28,13,26,34,33,4,27, - 30,33,24,28,29,22,7,25,36,1,2,26,16,1,12,5,19,27,29,30, - 46,38,25,24,32,34,20,24,23,35,26,13,30,14,35,26,46,11,20,29, - 39,46,34,41,26,11,7,44,12,32,0,46,13,42,13,47,25,6,20,35, - 21,5,38,4,22,17,14,37,16,16,2,28,24,10,5,48,43,24,18,40, - 8,7,2,7,23,19,44,21,20,32,15,3,40,44,45,45,38,8,28,1, - 40,26,43,13,43,29,19,40,26,46,21,28,37,44,16,9,37,35,43,3, - 35,43,17,4,8,20,4,33,28,40,43,38,31,44,43,24,5,18,19,34, - 6,3,7,23,35,11,19,48,31,34,45,18,42,39,21,3,24,24,22,24, - 37,46,15,7,5,4,48,20,11,48,41,9,6,9,16,28,22,29,21,18, - 19,30,21,7,33,49,34,20,42,40,39,18,0,23,31,32,32,39,18,17, - 19,16,34,7,14,33,42,15,7,30,0,46,19,25,17,13,14,41,6,31, - 2,22,18,7,37,33,0,39,28,14,20,16,25,35,42,11,23,18,2,3, - 10,28,41,21,41,14,9,17,46,29,18,23,31,47,20,2,22,29,37,43, - 6,5,33,41,29,32,49,0,46,9,48,26,13,35,29,41,41,32,36,32, - 17,26,33,16,43,22,45,13,47,5,20,41,48,16,26,26,40,46,33,12 - }; + // Uniform distribution [0:49] + vtkm::Float32 uniform[nVerts] = { + 0, 6, 37, 22, 26, 10, 2, 33, 33, 46, 19, 25, 41, 1, 2, 26, 33, 0, 19, 3, 20, 34, 29, 46, + 42, 26, 4, 32, 20, 35, 45, 38, 13, 2, 36, 16, 31, 37, 49, 18, 12, 49, 36, 37, 32, 3, 31, 44, + 13, 21, 38, 23, 11, 13, 17, 8, 24, 44, 45, 3, 45, 25, 25, 15, 49, 24, 13, 4, 47, 3, 25, 19, + 13, 45, 26, 23, 47, 2, 38, 38, 41, 6, 0, 34, 43, 31, 36, 36, 49, 44, 11, 15, 17, 25, 29, 42, + 20, 42, 13, 20, 26, 23, 14, 8, 7, 28, 40, 1, 26, 24, 47, 37, 27, 44, 31, 42, 7, 10, 35, 6, + 4, 13, 0, 20, 1, 35, 46, 11, 9, 15, 44, 32, 7, 34, 19, 19, 24, 7, 29, 42, 29, 47, 27, 7, + 49, 20, 7, 28, 12, 24, 23, 48, 6, 9, 15, 31, 6, 32, 31, 40, 12, 23, 19, 10, 1, 45, 21, 7, + 47, 20, 6, 44, 4, 8, 3, 18, 12, 6, 39, 22, 17, 22, 40, 46, 32, 10, 33, 45, 12, 43, 23, 25, + 30, 40, 37, 23, 47, 31, 21, 41, 34, 35, 49, 47, 42, 14, 26, 25, 5, 20, 28, 43, 22, 36, 43, 35, + 40, 35, 37, 0, 44, 26, 23, 3, 35, 24, 33, 34, 9, 45, 43, 44, 27, 6, 22, 49, 10, 22, 15, 25, + 44, 21, 23, 40, 18, 10, 49, 7, 31, 30, 0, 0, 38, 36, 15, 20, 34, 34, 10, 41, 35, 41, 4, 4, + 38, 31, 10, 10, 4, 19, 47, 47, 19, 13, 34, 14, 38, 39, 21, 14, 9, 0, 9, 49, 12, 40, 6, 19, + 30, 8, 41, 7, 49, 12, 11, 5, 10, 31, 34, 39, 34, 37, 33, 31, 2, 29, 11, 15, 34, 5, 38, 26, + 27, 29, 16, 35, 7, 8, 24, 43, 40, 27, 36, 15, 6, 26, 15, 29, 25, 21, 12, 18, 19, 22, 23, 19, + 13, 3, 18, 12, 33, 33, 25, 36, 36, 47, 23, 47, 16, 23, 25, 33, 20, 30, 49, 7, 33, 17, 27, 26, + 41, 0, 13, 32, 27, 45, 13, 48, 12, 42, 34, 22, 40, 1, 8, 35, 35, 21, 29, 37, 49, 34, 13, 37, + 8, 0, 24, 3, 8, 45, 39, 37, 21, 0, 29, 25, 3, 27, 19, 10, 19, 31, 32, 35, 26, 14, 40, 18, + 34, 15, 0, 5, 26, 38, 11, 2, 3, 8, 36, 14, 2, 23, 22, 25, 22, 7, 14, 41, 34, 28, 34, 16, + 2, 49, 27, 0, 42, 1, 18, 24, 28, 36, 33, 26, 1, 6, 48, 9, 17, 30, 30, 6, 27, 47, 17, 41, + 48, 12, 12, 21, 40, 44, 12, 38, 34, 22, 13, 33, 5, 10, 5, 27, 0, 8, 29, 21, 4, 34, 18, 41, + 6, 48, 1, 4, 24, 38, 46, 12, 17, 38, 24, 37, 33, 34, 37, 1, 11, 11, 28, 32, 30, 18, 11, 11, + 32, 8, 37, 7, 2, 33, 6, 47, 24, 31, 45, 0, 29, 36, 24, 2, 22, 25, 38, 3, 22, 48, 23, 16, + 22, 37, 10, 8, 18, 46, 48, 12, 3, 6, 26, 8, 25, 5, 42, 18, 21, 16, 35, 28, 43, 37, 41, 34, + 19, 46, 30, 18, 26, 22, 20, 12, 4, 21, 23, 14, 5, 10, 40, 26, 33, 43, 12, 35, 13, 19, 4, 22, + 11, 39, 24, 0, 13, 33, 21, 9, 48, 6, 39, 47, 8, 30, 3, 17, 14, 25, 41, 41, 36, 16, 40, 31, + 2, 2, 7, 38, 3, 25, 46, 11, 10, 4, 34, 35, 24, 13, 35, 18, 10, 11, 21, 23, 43, 48, 22, 1, + 26, 1, 37, 29, 41, 16, 11, 26, 21, 20, 49, 48, 42, 43, 15, 7, 49, 31, 23, 46, 34, 40, 27, 28, + 7, 47, 41, 7, 2, 17, 5, 4, 25, 1, 28, 42, 25, 33, 36, 34, 1, 9, 33, 17, 3, 7, 46, 11, + 19, 29, 8, 1, 34, 38, 35, 3, 29, 46, 46, 21, 25, 41, 45, 30, 36, 25, 24, 8, 48, 28, 13, 26, + 34, 33, 4, 27, 30, 33, 24, 28, 29, 22, 7, 25, 36, 1, 2, 26, 16, 1, 12, 5, 19, 27, 29, 30, + 46, 38, 25, 24, 32, 34, 20, 24, 23, 35, 26, 13, 30, 14, 35, 26, 46, 11, 20, 29, 39, 46, 34, 41, + 26, 11, 7, 44, 12, 32, 0, 46, 13, 42, 13, 47, 25, 6, 20, 35, 21, 5, 38, 4, 22, 17, 14, 37, + 16, 16, 2, 28, 24, 10, 5, 48, 43, 24, 18, 40, 8, 7, 2, 7, 23, 19, 44, 21, 20, 32, 15, 3, + 40, 44, 45, 45, 38, 8, 28, 1, 40, 26, 43, 13, 43, 29, 19, 40, 26, 46, 21, 28, 37, 44, 16, 9, + 37, 35, 43, 3, 35, 43, 17, 4, 8, 20, 4, 33, 28, 40, 43, 38, 31, 44, 43, 24, 5, 18, 19, 34, + 6, 3, 7, 23, 35, 11, 19, 48, 31, 34, 45, 18, 42, 39, 21, 3, 24, 24, 22, 24, 37, 46, 15, 7, + 5, 4, 48, 20, 11, 48, 41, 9, 6, 9, 16, 28, 22, 29, 21, 18, 19, 30, 21, 7, 33, 49, 34, 20, + 42, 40, 39, 18, 0, 23, 31, 32, 32, 39, 18, 17, 19, 16, 34, 7, 14, 33, 42, 15, 7, 30, 0, 46, + 19, 25, 17, 13, 14, 41, 6, 31, 2, 22, 18, 7, 37, 33, 0, 39, 28, 14, 20, 16, 25, 35, 42, 11, + 23, 18, 2, 3, 10, 28, 41, 21, 41, 14, 9, 17, 46, 29, 18, 23, 31, 47, 20, 2, 22, 29, 37, 43, + 6, 5, 33, 41, 29, 32, 49, 0, 46, 9, 48, 26, 13, 35, 29, 41, 41, 32, 36, 32, 17, 26, 33, 16, + 43, 22, 45, 13, 47, 5, 20, 41, 48, 16, 26, 26, 40, 46, 33, 12 + }; - vtkm::cont::ArrayHandleUniformPointCoordinates - coordinates(vtkm::Id3(xVerts, yVerts, 1)); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vtkm::Id3(xVerts, yVerts, 1)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); - // Set point scalars - dataSet.AddField(vtkm::cont::Field("p_poisson", vtkm::cont::Field::ASSOC_POINTS, - poisson, nVerts)); - dataSet.AddField(vtkm::cont::Field("p_normal", vtkm::cont::Field::ASSOC_POINTS, - normal, nVerts)); - dataSet.AddField(vtkm::cont::Field("p_chiSquare", vtkm::cont::Field::ASSOC_POINTS, - chiSquare, nVerts)); - dataSet.AddField(vtkm::cont::Field("p_uniform", vtkm::cont::Field::ASSOC_POINTS, - uniform, nVerts)); + // Set point scalars + dataSet.AddField( + vtkm::cont::Field("p_poisson", vtkm::cont::Field::ASSOC_POINTS, poisson, nVerts)); + dataSet.AddField(vtkm::cont::Field("p_normal", vtkm::cont::Field::ASSOC_POINTS, normal, nVerts)); + dataSet.AddField( + vtkm::cont::Field("p_chiSquare", vtkm::cont::Field::ASSOC_POINTS, chiSquare, nVerts)); + dataSet.AddField( + vtkm::cont::Field("p_uniform", vtkm::cont::Field::ASSOC_POINTS, uniform, nVerts)); - // Set cell scalars - dataSet.AddField(vtkm::cont::Field("c_poisson", vtkm::cont::Field::ASSOC_CELL_SET, - "cells", poisson, nCells)); - dataSet.AddField(vtkm::cont::Field("c_normal", vtkm::cont::Field::ASSOC_CELL_SET, - "cells", normal, nCells)); - dataSet.AddField(vtkm::cont::Field("c_chiSquare", vtkm::cont::Field::ASSOC_CELL_SET, - "cells", chiSquare, nCells)); - dataSet.AddField(vtkm::cont::Field("c_uniform", vtkm::cont::Field::ASSOC_CELL_SET, - "cells", poisson, nCells)); + // Set cell scalars + dataSet.AddField( + vtkm::cont::Field("c_poisson", vtkm::cont::Field::ASSOC_CELL_SET, "cells", poisson, nCells)); + dataSet.AddField( + vtkm::cont::Field("c_normal", vtkm::cont::Field::ASSOC_CELL_SET, "cells", normal, nCells)); + dataSet.AddField(vtkm::cont::Field("c_chiSquare", vtkm::cont::Field::ASSOC_CELL_SET, "cells", + chiSquare, nCells)); + dataSet.AddField( + vtkm::cont::Field("c_uniform", vtkm::cont::Field::ASSOC_CELL_SET, "cells", poisson, nCells)); - vtkm::cont::CellSetStructured cellSet("cells"); + vtkm::cont::CellSetStructured cellSet("cells"); - //Set uniform structure - cellSet.SetPointDimensions(vtkm::make_Vec(xVerts, yVerts)); - dataSet.AddCellSet(cellSet); + //Set uniform structure + cellSet.SetPointDimensions(vtkm::make_Vec(xVerts, yVerts)); + dataSet.AddCellSet(cellSet); - return dataSet; + return dataSet; } // // Create a dataset with known point data and cell data (statistical distributions) // -void PrintStatInfo(vtkm::worklet::FieldStatistics::StatInfo statinfo) +void PrintStatInfo( + vtkm::worklet::FieldStatistics::StatInfo statinfo) { std::cout << " Median " << statinfo.median << std::endl; std::cout << " Minimum " << statinfo.minimum << std::endl; @@ -365,7 +329,8 @@ void TestFieldSimple() ds.GetField("data").GetData().CopyTo(data); // Run - vtkm::worklet::FieldStatistics().Run(data, statinfo); + vtkm::worklet::FieldStatistics().Run(data, + statinfo); std::cout << "Statistics for CELL data:" << std::endl; PrintStatInfo(statinfo); @@ -402,34 +367,37 @@ void TestFieldStandardDistributions() ds.GetField("p_uniform").GetData().CopyTo(p_uniform); // Run Poisson data - vtkm::worklet::FieldStatistics().Run(p_poisson, statinfo); + vtkm::worklet::FieldStatistics().Run(p_poisson, + statinfo); std::cout << "Poisson distributed POINT data:" << std::endl; PrintStatInfo(statinfo); // Run Normal data - vtkm::worklet::FieldStatistics().Run(p_normal, statinfo); + vtkm::worklet::FieldStatistics().Run(p_normal, + statinfo); std::cout << "Normal distributed POINT data:" << std::endl; PrintStatInfo(statinfo); // Run Chi Square data - vtkm::worklet::FieldStatistics().Run(p_chiSquare, statinfo); + vtkm::worklet::FieldStatistics().Run(p_chiSquare, + statinfo); std::cout << "Chi Square distributed POINT data:" << std::endl; PrintStatInfo(statinfo); // Run Uniform data - vtkm::worklet::FieldStatistics().Run(p_uniform, statinfo); + vtkm::worklet::FieldStatistics().Run(p_uniform, + statinfo); std::cout << "Uniform distributed POINT data:" << std::endl; PrintStatInfo(statinfo); } // TestFieldStatistics - void TestFieldStatistics() { TestFieldStandardDistributions(); TestFieldSimple(); } -int UnitTestFieldStatistics(int, char *[]) +int UnitTestFieldStatistics(int, char* []) { return vtkm::cont::testing::Testing::Run(TestFieldStatistics); } diff --git a/vtkm/worklet/testing/UnitTestKeys.cxx b/vtkm/worklet/testing/UnitTestKeys.cxx index 0f086af60..a82d9dc48 100644 --- a/vtkm/worklet/testing/UnitTestKeys.cxx +++ b/vtkm/worklet/testing/UnitTestKeys.cxx @@ -24,67 +24,56 @@ #include -namespace { +namespace +{ static const vtkm::Id ARRAY_SIZE = 1033; -static const vtkm::Id NUM_UNIQUE = ARRAY_SIZE/10; +static const vtkm::Id NUM_UNIQUE = ARRAY_SIZE / 10; -template -void CheckKeyReduce(const KeyPortal &originalKeys, - const KeyPortal &uniqueKeys, - const IdPortal &sortedValuesMap, - const IdPortal &offsets, - const IdComponentPortal &counts) +template +void CheckKeyReduce(const KeyPortal& originalKeys, const KeyPortal& uniqueKeys, + const IdPortal& sortedValuesMap, const IdPortal& offsets, + const IdComponentPortal& counts) { using KeyType = typename KeyPortal::ValueType; vtkm::Id originalSize = originalKeys.GetNumberOfValues(); vtkm::Id uniqueSize = uniqueKeys.GetNumberOfValues(); - VTKM_TEST_ASSERT(originalSize == sortedValuesMap.GetNumberOfValues(), - "Inconsistent array size."); - VTKM_TEST_ASSERT(uniqueSize == offsets.GetNumberOfValues(), - "Inconsistent array size."); - VTKM_TEST_ASSERT(uniqueSize == counts.GetNumberOfValues(), - "Inconsistent array size."); + VTKM_TEST_ASSERT(originalSize == sortedValuesMap.GetNumberOfValues(), "Inconsistent array size."); + VTKM_TEST_ASSERT(uniqueSize == offsets.GetNumberOfValues(), "Inconsistent array size."); + VTKM_TEST_ASSERT(uniqueSize == counts.GetNumberOfValues(), "Inconsistent array size."); for (vtkm::Id uniqueIndex = 0; uniqueIndex < uniqueSize; uniqueIndex++) { KeyType key = uniqueKeys.Get(uniqueIndex); vtkm::Id offset = offsets.Get(uniqueIndex); vtkm::IdComponent groupCount = counts.Get(uniqueIndex); - for (vtkm::IdComponent groupIndex = 0; groupIndex +template void TryKeyType(KeyType) { KeyType keyBuffer[ARRAY_SIZE]; for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { - keyBuffer[index] = TestValue(index%NUM_UNIQUE, KeyType()); + keyBuffer[index] = TestValue(index % NUM_UNIQUE, KeyType()); } - vtkm::cont::ArrayHandle keyArray = - vtkm::cont::make_ArrayHandle(keyBuffer, ARRAY_SIZE); + vtkm::cont::ArrayHandle keyArray = vtkm::cont::make_ArrayHandle(keyBuffer, ARRAY_SIZE); vtkm::cont::ArrayHandle sortedKeys; - vtkm::cont::DeviceAdapterAlgorithm:: - Copy(keyArray, sortedKeys); + vtkm::cont::DeviceAdapterAlgorithm::Copy(keyArray, sortedKeys); - vtkm::worklet::Keys keys(sortedKeys, - VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); - VTKM_TEST_ASSERT(keys.GetInputRange() == NUM_UNIQUE, - "Keys has bad input range."); + vtkm::worklet::Keys keys(sortedKeys, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); + VTKM_TEST_ASSERT(keys.GetInputRange() == NUM_UNIQUE, "Keys has bad input range."); - CheckKeyReduce(keyArray.GetPortalConstControl(), - keys.GetUniqueKeys().GetPortalConstControl(), + CheckKeyReduce(keyArray.GetPortalConstControl(), keys.GetUniqueKeys().GetPortalConstControl(), keys.GetSortedValuesMap().GetPortalConstControl(), keys.GetOffsets().GetPortalConstControl(), keys.GetCounts().GetPortalConstControl()); @@ -107,7 +96,7 @@ void TestKeys() } // anonymous namespace -int UnitTestKeys(int, char*[]) +int UnitTestKeys(int, char* []) { return vtkm::cont::testing::Testing::Run(TestKeys); } diff --git a/vtkm/worklet/testing/UnitTestMagnitude.cxx b/vtkm/worklet/testing/UnitTestMagnitude.cxx index a05df9aa9..09c1802af 100644 --- a/vtkm/worklet/testing/UnitTestMagnitude.cxx +++ b/vtkm/worklet/testing/UnitTestMagnitude.cxx @@ -23,7 +23,8 @@ #include -namespace { +namespace +{ void TestMagnitude() { @@ -32,7 +33,7 @@ void TestMagnitude() vtkm::worklet::Magnitude magnitudeWorklet; typedef vtkm::cont::ArrayHandle ArrayReturnType; - typedef vtkm::cont::ArrayHandle > ArrayVectorType; + typedef vtkm::cont::ArrayHandle> ArrayVectorType; typedef ArrayVectorType::PortalControl PortalType; ArrayVectorType pythagoreanTriples; @@ -44,29 +45,25 @@ void TestMagnitude() pt.Set(2, vtkm::make_Vec(8, 15, 17, 0)); pt.Set(3, vtkm::make_Vec(7, 24, 25, 0)); pt.Set(4, vtkm::make_Vec(9, 40, 41, 0)); - - vtkm::worklet::DispatcherMapField - dispatcher(magnitudeWorklet); + + vtkm::worklet::DispatcherMapField dispatcher(magnitudeWorklet); ArrayReturnType result; - dispatcher.Invoke(pythagoreanTriples, - result); + dispatcher.Invoke(pythagoreanTriples, result); for (vtkm::Id i = 0; i < result.GetNumberOfValues(); ++i) { VTKM_TEST_ASSERT( - test_equal(std::sqrt(pt.Get(i)[0]*pt.Get(i)[0] + - pt.Get(i)[1]*pt.Get(i)[1] + - pt.Get(i)[2]*pt.Get(i)[2]), - result.GetPortalConstControl().Get(i)), - "Wrong result for Magnitude worklet"); + test_equal(std::sqrt(pt.Get(i)[0] * pt.Get(i)[0] + pt.Get(i)[1] * pt.Get(i)[1] + + pt.Get(i)[2] * pt.Get(i)[2]), + result.GetPortalConstControl().Get(i)), + "Wrong result for Magnitude worklet"); } } - } -int UnitTestMagnitude(int, char *[]) +int UnitTestMagnitude(int, char* []) { return vtkm::cont::testing::Testing::Run(TestMagnitude); } diff --git a/vtkm/worklet/testing/UnitTestMarchingCubes.cxx b/vtkm/worklet/testing/UnitTestMarchingCubes.cxx index 18f5306bb..0e7c488e8 100644 --- a/vtkm/worklet/testing/UnitTestMarchingCubes.cxx +++ b/vtkm/worklet/testing/UnitTestMarchingCubes.cxx @@ -28,7 +28,8 @@ #include #include -namespace { +namespace +{ class TangleField : public vtkm::worklet::WorkletMapField { @@ -42,25 +43,43 @@ public: const vtkm::Id cellsPerLayer; VTKM_CONT - TangleField(const vtkm::Id3 dims, const vtkm::FloatDefault mins[3], const vtkm::FloatDefault maxs[3]) : xdim(dims[0]), ydim(dims[1]), zdim(dims[2]), - xmin(mins[0]), ymin(mins[1]), zmin(mins[2]), xmax(maxs[0]), ymax(maxs[1]), zmax(maxs[2]), cellsPerLayer((xdim) * (ydim)) { } + TangleField(const vtkm::Id3 dims, const vtkm::FloatDefault mins[3], + const vtkm::FloatDefault maxs[3]) + : xdim(dims[0]) + , ydim(dims[1]) + , zdim(dims[2]) + , xmin(mins[0]) + , ymin(mins[1]) + , zmin(mins[2]) + , xmax(maxs[0]) + , ymax(maxs[1]) + , zmax(maxs[2]) + , cellsPerLayer((xdim) * (ydim)) + { + } VTKM_EXEC - void operator()(const vtkm::Id &vertexId, vtkm::Float32 &v) const + void operator()(const vtkm::Id& vertexId, vtkm::Float32& v) const { const vtkm::Id x = vertexId % (xdim); const vtkm::Id y = (vertexId / (xdim)) % (ydim); const vtkm::Id z = vertexId / cellsPerLayer; - const vtkm::FloatDefault fx = static_cast(x) / static_cast(xdim-1); - const vtkm::FloatDefault fy = static_cast(y) / static_cast(xdim-1); - const vtkm::FloatDefault fz = static_cast(z) / static_cast(xdim-1); + const vtkm::FloatDefault fx = + static_cast(x) / static_cast(xdim - 1); + const vtkm::FloatDefault fy = + static_cast(y) / static_cast(xdim - 1); + const vtkm::FloatDefault fz = + static_cast(z) / static_cast(xdim - 1); - const vtkm::Float32 xx = 3.0f*vtkm::Float32(xmin+(xmax-xmin)*(fx)); - const vtkm::Float32 yy = 3.0f*vtkm::Float32(ymin+(ymax-ymin)*(fy)); - const vtkm::Float32 zz = 3.0f*vtkm::Float32(zmin+(zmax-zmin)*(fz)); + const vtkm::Float32 xx = 3.0f * vtkm::Float32(xmin + (xmax - xmin) * (fx)); + const vtkm::Float32 yy = 3.0f * vtkm::Float32(ymin + (ymax - ymin) * (fy)); + const vtkm::Float32 zz = 3.0f * vtkm::Float32(zmin + (zmax - zmin) * (fz)); - v = (xx*xx*xx*xx - 5.0f*xx*xx + yy*yy*yy*yy - 5.0f*yy*yy + zz*zz*zz*zz - 5.0f*zz*zz + 11.8f) * 0.2f + 0.5f; + v = (xx * xx * xx * xx - 5.0f * xx * xx + yy * yy * yy * yy - 5.0f * yy * yy + + zz * zz * zz * zz - 5.0f * zz * zz + 11.8f) * + 0.2f + + 0.5f; } }; @@ -70,24 +89,22 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims) const vtkm::Id3 vdims(dims[0] + 1, dims[1] + 1, dims[2] + 1); - vtkm::FloatDefault mins[3] = {-1.0f, -1.0f, -1.0f}; - vtkm::FloatDefault maxs[3] = {1.0f, 1.0f, 1.0f}; + vtkm::FloatDefault mins[3] = { -1.0f, -1.0f, -1.0f }; + vtkm::FloatDefault maxs[3] = { 1.0f, 1.0f, 1.0f }; vtkm::cont::ArrayHandle fieldArray; - vtkm::cont::ArrayHandleIndex vertexCountImplicitArray(vdims[0]*vdims[1]*vdims[2]); - vtkm::worklet::DispatcherMapField tangleFieldDispatcher(TangleField(vdims, mins, maxs)); + vtkm::cont::ArrayHandleIndex vertexCountImplicitArray(vdims[0] * vdims[1] * vdims[2]); + vtkm::worklet::DispatcherMapField tangleFieldDispatcher( + TangleField(vdims, mins, maxs)); tangleFieldDispatcher.Invoke(vertexCountImplicitArray, fieldArray); - vtkm::Vec origin(0.0f, 0.0f, 0.0f); - vtkm::Vec spacing( - 1.0f/static_cast(dims[0]), - 1.0f/static_cast(dims[2]), - 1.0f/static_cast(dims[1])); + vtkm::Vec origin(0.0f, 0.0f, 0.0f); + vtkm::Vec spacing(1.0f / static_cast(dims[0]), + 1.0f / static_cast(dims[2]), + 1.0f / static_cast(dims[1])); - vtkm::cont::ArrayHandleUniformPointCoordinates - coordinates(vdims, origin, spacing); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vdims, origin, spacing); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); dataSet.AddField(vtkm::cont::Field("nodevar", vtkm::cont::Field::ASSOC_POINTS, fieldArray)); @@ -103,34 +120,45 @@ class EuclideanNorm { public: VTKM_EXEC_CONT - EuclideanNorm() : Reference(0.,0.,0.) {} + EuclideanNorm() + : Reference(0., 0., 0.) + { + } VTKM_EXEC_CONT - EuclideanNorm(vtkm::Vec reference):Reference(reference) {} + EuclideanNorm(vtkm::Vec reference) + : Reference(reference) + { + } VTKM_EXEC_CONT - vtkm::Float32 operator()(vtkm::Vec v) const + vtkm::Float32 operator()(vtkm::Vec v) const { - vtkm::Vec d(v[0]-this->Reference[0], - v[1]-this->Reference[1], - v[2]-this->Reference[2]); + vtkm::Vec d(v[0] - this->Reference[0], v[1] - this->Reference[1], + v[2] - this->Reference[2]); return vtkm::Magnitude(d); } private: - vtkm::Vec Reference; + vtkm::Vec Reference; }; class CubeGridConnectivity { public: VTKM_EXEC_CONT - CubeGridConnectivity() : Dimension(1), - DimSquared(1), - DimPlus1Squared(4) {} + CubeGridConnectivity() + : Dimension(1) + , DimSquared(1) + , DimPlus1Squared(4) + { + } VTKM_EXEC_CONT - CubeGridConnectivity(vtkm::Id dim) : Dimension(dim), - DimSquared(dim*dim), - DimPlus1Squared((dim+1)*(dim+1)) {} + CubeGridConnectivity(vtkm::Id dim) + : Dimension(dim) + , DimSquared(dim * dim) + , DimPlus1Squared((dim + 1) * (dim + 1)) + { + } VTKM_EXEC_CONT vtkm::Id operator()(vtkm::Id vertex) const @@ -138,23 +166,31 @@ public: typedef vtkm::CellShapeTagHexahedron HexTag; typedef vtkm::CellTraits HexTraits; - vtkm::Id cellId = vertex/HexTraits::NUM_POINTS; - vtkm::Id localId = vertex%HexTraits::NUM_POINTS; + vtkm::Id cellId = vertex / HexTraits::NUM_POINTS; + vtkm::Id localId = vertex % HexTraits::NUM_POINTS; vtkm::Id globalId = - (cellId + cellId/this->Dimension + - (this->Dimension+1)*(cellId/(this->DimSquared))); + (cellId + cellId / this->Dimension + (this->Dimension + 1) * (cellId / (this->DimSquared))); switch (localId) - { - case 2: globalId += 1; - case 3: globalId += this->Dimension; - case 1: globalId += 1; - case 0: break; - case 6: globalId += 1; - case 7: globalId += this->Dimension; - case 5: globalId += 1; - case 4: globalId += this->DimPlus1Squared; break; - } + { + case 2: + globalId += 1; + case 3: + globalId += this->Dimension; + case 1: + globalId += 1; + case 0: + break; + case 6: + globalId += 1; + case 7: + globalId += this->Dimension; + case 5: + globalId += 1; + case 4: + globalId += this->DimPlus1Squared; + break; + } return globalId; } @@ -169,19 +205,18 @@ class MakeRadiantDataSet { public: typedef vtkm::cont::ArrayHandleUniformPointCoordinates CoordinateArrayHandle; - typedef vtkm::cont::ArrayHandleTransform DataArrayHandle; - typedef vtkm::cont::ArrayHandleTransform, - CubeGridConnectivity> ConnectivityArrayHandle; + typedef vtkm::cont::ArrayHandleTransform< + vtkm::Float32, vtkm::cont::ArrayHandleUniformPointCoordinates, EuclideanNorm> + DataArrayHandle; + typedef vtkm::cont::ArrayHandleTransform, + CubeGridConnectivity> + ConnectivityArrayHandle; - typedef vtkm::cont::CellSetSingleType< - vtkm::cont::ArrayHandleTransform, - CubeGridConnectivity>::StorageTag> CellSet; + typedef vtkm::cont::CellSetSingleType, CubeGridConnectivity>::StorageTag> + CellSet; - vtkm::cont::DataSet Make3DRadiantDataSet(vtkm::IdComponent dim=5); + vtkm::cont::DataSet Make3DRadiantDataSet(vtkm::IdComponent dim = 5); }; inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComponent dim) @@ -194,39 +229,31 @@ inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComp typedef vtkm::CellShapeTagHexahedron HexTag; typedef vtkm::CellTraits HexTraits; - typedef vtkm::Vec CoordType; + typedef vtkm::Vec CoordType; - const vtkm::IdComponent nCells = dim*dim*dim; + const vtkm::IdComponent nCells = dim * dim * dim; - vtkm::Float32 spacing = vtkm::Float32(1./dim); - CoordinateArrayHandle coordinates(vtkm::Id3(dim+1,dim+1,dim+1), - CoordType(-.5,-.5,-.5), - CoordType(spacing,spacing,spacing)); + vtkm::Float32 spacing = vtkm::Float32(1. / dim); + CoordinateArrayHandle coordinates(vtkm::Id3(dim + 1, dim + 1, dim + 1), CoordType(-.5, -.5, -.5), + CoordType(spacing, spacing, spacing)); DataArrayHandle distanceToOrigin(coordinates); - DataArrayHandle distanceToOther(coordinates, - EuclideanNorm(CoordType(1.,1.,1.))); + DataArrayHandle distanceToOther(coordinates, EuclideanNorm(CoordType(1., 1., 1.))); ConnectivityArrayHandle connectivity( - vtkm::cont::ArrayHandleCounting(0,1,nCells*HexTraits::NUM_POINTS), + vtkm::cont::ArrayHandleCounting(0, 1, nCells * HexTraits::NUM_POINTS), CubeGridConnectivity(dim)); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); //Set point scalar - dataSet.AddField( - vtkm::cont::Field("distanceToOrigin", vtkm::cont::Field::ASSOC_POINTS, - vtkm::cont::DynamicArrayHandle(distanceToOrigin))); - dataSet.AddField( - vtkm::cont::Field("distanceToOther", vtkm::cont::Field::ASSOC_POINTS, - vtkm::cont::DynamicArrayHandle(distanceToOther))); + dataSet.AddField(vtkm::cont::Field("distanceToOrigin", vtkm::cont::Field::ASSOC_POINTS, + vtkm::cont::DynamicArrayHandle(distanceToOrigin))); + dataSet.AddField(vtkm::cont::Field("distanceToOther", vtkm::cont::Field::ASSOC_POINTS, + vtkm::cont::DynamicArrayHandle(distanceToOther))); CellSet cellSet("cells"); - cellSet.Fill((dim+1)*(dim+1)*(dim+1), - HexTag::Id, - HexTraits::NUM_POINTS, - connectivity); + cellSet.Fill((dim + 1) * (dim + 1) * (dim + 1), HexTag::Id, HexTraits::NUM_POINTS, connectivity); dataSet.AddCellSet(cellSet); @@ -239,7 +266,7 @@ void TestMarchingCubesUniformGrid() { std::cout << "Testing MarchingCubes filter on a uniform grid" << std::endl; - vtkm::Id3 dims(4,4,4); + vtkm::Id3 dims(4, 4, 4); vtkm::cont::DataSet dataSet = MakeIsosurfaceTestDataSet(dims); typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; @@ -252,21 +279,13 @@ void TestMarchingCubesUniformGrid() isosurfaceFilter.SetMergeDuplicatePoints(false); vtkm::Float32 contourValue = 0.5f; - vtkm::cont::ArrayHandle > verticesArray; - vtkm::cont::ArrayHandle > normalsArray; + vtkm::cont::ArrayHandle> verticesArray; + vtkm::cont::ArrayHandle> normalsArray; vtkm::cont::ArrayHandle scalarsArray; - isosurfaceFilter.Run(&contourValue, - 1, - cellSet, - dataSet.GetCoordinateSystem(), - fieldArray, - verticesArray, - normalsArray, - DeviceAdapter()); + isosurfaceFilter.Run(&contourValue, 1, cellSet, dataSet.GetCoordinateSystem(), fieldArray, + verticesArray, normalsArray, DeviceAdapter()); - isosurfaceFilter.MapFieldOntoIsosurface(fieldArray, - scalarsArray, - DeviceAdapter()); + isosurfaceFilter.MapFieldOntoIsosurface(fieldArray, scalarsArray, DeviceAdapter()); std::cout << "vertices: "; vtkm::cont::printSummary_ArrayHandle(verticesArray, std::cout); @@ -288,7 +307,7 @@ void TestMarchingCubesExplicit() typedef MakeRadiantDataSet DataSetGenerator; typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; - typedef vtkm::cont::ArrayHandle > Vec3Handle; + typedef vtkm::cont::ArrayHandle> Vec3Handle; typedef vtkm::cont::ArrayHandle DataHandle; DataSetGenerator dataSetGenerator; @@ -296,8 +315,7 @@ void TestMarchingCubesExplicit() vtkm::IdComponent Dimension = 10; vtkm::Float32 contourValue = vtkm::Float32(.45); - vtkm::cont::DataSet dataSet = - dataSetGenerator.Make3DRadiantDataSet(Dimension); + vtkm::cont::DataSet dataSet = dataSetGenerator.Make3DRadiantDataSet(Dimension); DataSetGenerator::CellSet cellSet; dataSet.GetCellSet().CopyTo(cellSet); @@ -311,14 +329,8 @@ void TestMarchingCubesExplicit() vtkm::worklet::MarchingCubes marchingCubes; marchingCubes.SetMergeDuplicatePoints(false); - marchingCubes.Run(&contourValue, - 1, - cellSet, - dataSet.GetCoordinateSystem(), - contourArray, - vertices, - normals, - DeviceAdapter()); + marchingCubes.Run(&contourValue, 1, cellSet, dataSet.GetCoordinateSystem(), contourArray, + vertices, normals, DeviceAdapter()); DataHandle scalars; @@ -327,9 +339,7 @@ void TestMarchingCubesExplicit() DataSetGenerator::DataArrayHandle projectedArray; projectedField.GetData().CopyTo(projectedArray); - marchingCubes.MapFieldOntoIsosurface(projectedArray, - scalars, - DeviceAdapter()); + marchingCubes.MapFieldOntoIsosurface(projectedArray, scalars, DeviceAdapter()); std::cout << "vertices: "; vtkm::cont::printSummary_ArrayHandle(vertices, std::cout); @@ -349,7 +359,7 @@ void TestMarchingCubesExplicit() "Wrong scalars result for MarchingCubes filter"); } -int UnitTestMarchingCubes(int, char *[]) +int UnitTestMarchingCubes(int, char* []) { return vtkm::cont::testing::Testing::Run(TestMarchingCubesUniformGrid); return vtkm::cont::testing::Testing::Run(TestMarchingCubesExplicit); diff --git a/vtkm/worklet/testing/UnitTestMask.cxx b/vtkm/worklet/testing/UnitTestMask.cxx index 718ebd5f9..405c53760 100644 --- a/vtkm/worklet/testing/UnitTestMask.cxx +++ b/vtkm/worklet/testing/UnitTestMask.cxx @@ -36,7 +36,6 @@ template class TestingMask { public: - ///////////////////////////////////////////////////////////////////////////////////////////////// void TestUniform2D() const { @@ -44,30 +43,26 @@ public: typedef vtkm::cont::CellSetStructured<2> CellSetType; typedef vtkm::cont::CellSetPermutation OutCellSetType; - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make2DUniformDataSet1(); CellSetType cellSet; dataset.GetCellSet(0).CopyTo(cellSet); - + // Output data set permutation vtkm::worklet::Mask maskCells; - OutCellSetType outCellSet = - maskCells.Run(cellSet, - 2, - DeviceAdapter()); + OutCellSetType outCellSet = maskCells.Run(cellSet, 2, DeviceAdapter()); - vtkm::cont::Field cellField = - maskCells.ProcessCellField(dataset.GetField("cellvar")); + vtkm::cont::Field cellField = maskCells.ProcessCellField(dataset.GetField("cellvar")); OutCellFieldArrayHandleType cellFieldArray; cellField.GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 8), "Wrong result for Mask"); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 8 && - cellFieldArray.GetPortalConstControl().Get(7) == 14.f, + cellFieldArray.GetPortalConstControl().Get(7) == 14.f, "Wrong cell field data"); } @@ -78,30 +73,26 @@ public: typedef vtkm::cont::CellSetStructured<3> CellSetType; typedef vtkm::cont::CellSetPermutation OutCellSetType; - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); CellSetType cellSet; dataset.GetCellSet(0).CopyTo(cellSet); - + // Output data set with cell set permuted vtkm::worklet::Mask maskCells; - OutCellSetType outCellSet = - maskCells.Run(cellSet, - 9, - DeviceAdapter()); + OutCellSetType outCellSet = maskCells.Run(cellSet, 9, DeviceAdapter()); - vtkm::cont::Field cellField = - maskCells.ProcessCellField(dataset.GetField("cellvar")); + vtkm::cont::Field cellField = maskCells.ProcessCellField(dataset.GetField("cellvar")); OutCellFieldArrayHandleType cellFieldArray; cellField.GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 7), "Wrong result for ExtractCells"); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 7 && - cellFieldArray.GetPortalConstControl().Get(2) == 18.f, + cellFieldArray.GetPortalConstControl().Get(2) == 18.f, "Wrong cell field data"); } @@ -112,9 +103,9 @@ public: typedef vtkm::cont::CellSetExplicit<> CellSetType; typedef vtkm::cont::CellSetPermutation OutCellSetType; - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); @@ -123,20 +114,15 @@ public: // Output data set with cell set permuted vtkm::worklet::Mask maskCells; - OutCellSetType outCellSet = - maskCells.Run(cellSet, - 2, - DeviceAdapter()); + OutCellSetType outCellSet = maskCells.Run(cellSet, 2, DeviceAdapter()); - - vtkm::cont::Field cellField = - maskCells.ProcessCellField(dataset.GetField("cellvar")); + vtkm::cont::Field cellField = maskCells.ProcessCellField(dataset.GetField("cellvar")); OutCellFieldArrayHandleType cellFieldArray; cellField.GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 2), "Wrong result for ExtractCells"); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 2 && - cellFieldArray.GetPortalConstControl().Get(1) == 120.2f, + cellFieldArray.GetPortalConstControl().Get(1) == 120.2f, "Wrong cell field data"); } @@ -148,8 +134,7 @@ public: } }; -int UnitTestMask(int, char *[]) +int UnitTestMask(int, char* []) { - return vtkm::cont::testing::Testing::Run( - TestingMask()); + return vtkm::cont::testing::Testing::Run(TestingMask()); } diff --git a/vtkm/worklet/testing/UnitTestMaskPoints.cxx b/vtkm/worklet/testing/UnitTestMaskPoints.cxx index 551ad89de..8209de4e8 100644 --- a/vtkm/worklet/testing/UnitTestMaskPoints.cxx +++ b/vtkm/worklet/testing/UnitTestMaskPoints.cxx @@ -30,7 +30,8 @@ #include #include -namespace { +namespace +{ using vtkm::cont::testing::MakeTestDataSet; @@ -53,9 +54,7 @@ public: // Output dataset gets new cell set of points that pass subsampling vtkm::worklet::MaskPoints maskPoints; OutCellSetType outCellSet; - outCellSet = maskPoints.Run(dataset.GetCellSet(0), - 2, - DeviceAdapter()); + outCellSet = maskPoints.Run(dataset.GetCellSet(0), 2, DeviceAdapter()); outDataSet.AddCellSet(outCellSet); VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 12), "Wrong result for MaskPoints"); @@ -76,9 +75,7 @@ public: // Output dataset gets new cell set of points that meet threshold predicate vtkm::worklet::MaskPoints maskPoints; OutCellSetType outCellSet; - outCellSet = maskPoints.Run(dataset.GetCellSet(0), - 5, - DeviceAdapter()); + outCellSet = maskPoints.Run(dataset.GetCellSet(0), 5, DeviceAdapter()); outDataSet.AddCellSet(outCellSet); VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 25), "Wrong result for MaskPoints"); @@ -99,9 +96,7 @@ public: // Output dataset gets new cell set of points that meet threshold predicate vtkm::worklet::MaskPoints maskPoints; OutCellSetType outCellSet; - outCellSet = maskPoints.Run(dataset.GetCellSet(0), - 3, - DeviceAdapter()); + outCellSet = maskPoints.Run(dataset.GetCellSet(0), 3, DeviceAdapter()); outDataSet.AddCellSet(outCellSet); VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 3), "Wrong result for MaskPoints"); @@ -114,11 +109,9 @@ public: this->TestExplicit3D(); } }; - } -int UnitTestMaskPoints(int, char *[]) +int UnitTestMaskPoints(int, char* []) { - return vtkm::cont::testing::Testing::Run( - TestingMaskPoints()); + return vtkm::cont::testing::Testing::Run(TestingMaskPoints()); } diff --git a/vtkm/worklet/testing/UnitTestPointElevation.cxx b/vtkm/worklet/testing/UnitTestPointElevation.cxx index 0173a27c9..cfcb13a27 100644 --- a/vtkm/worklet/testing/UnitTestPointElevation.cxx +++ b/vtkm/worklet/testing/UnitTestPointElevation.cxx @@ -28,30 +28,28 @@ #include -namespace { +namespace +{ vtkm::cont::DataSet MakePointElevationTestDataSet() { vtkm::cont::DataSet dataSet; - std::vector > coordinates; + std::vector> coordinates; const vtkm::Id dim = 5; for (vtkm::Id j = 0; j < dim; ++j) { - vtkm::Float32 z = static_cast(j) / - static_cast(dim - 1); + vtkm::Float32 z = static_cast(j) / static_cast(dim - 1); for (vtkm::Id i = 0; i < dim; ++i) { - vtkm::Float32 x = static_cast(i) / - static_cast(dim - 1); - vtkm::Float32 y = (x*x + z*z)/2.0f; - coordinates.push_back(vtkm::make_Vec(x,y,z)); + vtkm::Float32 x = static_cast(i) / static_cast(dim - 1); + vtkm::Float32 y = (x * x + z * z) / 2.0f; + coordinates.push_back(vtkm::make_Vec(x, y, z)); } } vtkm::Id numCells = (dim - 1) * (dim - 1); - dataSet.AddCoordinateSystem( - vtkm::cont::CoordinateSystem("coordinates", coordinates)); + dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates)); vtkm::cont::CellSetExplicit<> cellSet("cells"); cellSet.PrepareToAddCells(numCells, numCells * 4); @@ -59,11 +57,8 @@ vtkm::cont::DataSet MakePointElevationTestDataSet() { 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, + 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)); } } @@ -72,7 +67,6 @@ vtkm::cont::DataSet MakePointElevationTestDataSet() dataSet.AddCellSet(cellSet); return dataSet; } - } void TestPointElevation() @@ -88,24 +82,22 @@ void TestPointElevation() pointElevationWorklet.SetHighPoint(vtkm::make_Vec(0.0, 1.0, 0.0)); pointElevationWorklet.SetRange(0.0, 2.0); - vtkm::worklet::DispatcherMapField - dispatcher(pointElevationWorklet); - dispatcher.Invoke(dataSet.GetCoordinateSystem(), - result); + vtkm::worklet::DispatcherMapField dispatcher( + pointElevationWorklet); + dispatcher.Invoke(dataSet.GetCoordinateSystem(), result); - vtkm::cont::ArrayHandle > coordinates; + vtkm::cont::ArrayHandle> coordinates; dataSet.GetCoordinateSystem().GetData().CopyTo(coordinates); for (vtkm::Id i = 0; i < result.GetNumberOfValues(); ++i) { - VTKM_TEST_ASSERT( - test_equal(coordinates.GetPortalConstControl().Get(i)[1] * 2.0, - result.GetPortalConstControl().Get(i)), - "Wrong result for PointElevation worklet"); + VTKM_TEST_ASSERT(test_equal(coordinates.GetPortalConstControl().Get(i)[1] * 2.0, + result.GetPortalConstControl().Get(i)), + "Wrong result for PointElevation worklet"); } } -int UnitTestPointElevation(int, char *[]) +int UnitTestPointElevation(int, char* []) { return vtkm::cont::testing::Testing::Run(TestPointElevation); } diff --git a/vtkm/worklet/testing/UnitTestPointGradient.cxx b/vtkm/worklet/testing/UnitTestPointGradient.cxx index 92f22c323..163059636 100644 --- a/vtkm/worklet/testing/UnitTestPointGradient.cxx +++ b/vtkm/worklet/testing/UnitTestPointGradient.cxx @@ -24,34 +24,33 @@ #include #include -namespace { +namespace +{ -template +template struct PointGrad { - PointGrad(const vtkm::cont::DataSet& data, - const std::string& fieldName, - vtkm::cont::ArrayHandle< vtkm::Vec >& result): - Data(data), - FieldName(fieldName), - Result(result) + PointGrad(const vtkm::cont::DataSet& data, const std::string& fieldName, + vtkm::cont::ArrayHandle>& result) + : Data(data) + , FieldName(fieldName) + , Result(result) { } - template - void operator()(const CellSetType& cellset ) const + template + void operator()(const CellSetType& cellset) const { vtkm::worklet::DispatcherMapTopology dispatcher; dispatcher.Invoke(cellset, //topology to iterate on a per point basis cellset, //whole cellset in - this->Data.GetCoordinateSystem(), - this->Data.GetField(this->FieldName), + this->Data.GetCoordinateSystem(), this->Data.GetField(this->FieldName), this->Result); } vtkm::cont::DataSet Data; std::string FieldName; - vtkm::cont::ArrayHandle< vtkm::Vec > Result; + vtkm::cont::ArrayHandle> Result; }; void TestPointGradientUniform2D() @@ -61,21 +60,19 @@ void TestPointGradientUniform2D() vtkm::cont::testing::MakeTestDataSet testDataSet; vtkm::cont::DataSet dataSet = testDataSet.Make2DUniformDataSet0(); - vtkm::cont::ArrayHandle< vtkm::Vec > result; + vtkm::cont::ArrayHandle> result; PointGrad func(dataSet, "pointvar", result); vtkm::cont::CastAndCall(dataSet.GetCellSet(), func); - vtkm::Vec expected[2] = { {10,30,0}, {10,30,0} }; + vtkm::Vec expected[2] = { { 10, 30, 0 }, { 10, 30, 0 } }; for (int i = 0; i < 2; ++i) { - VTKM_TEST_ASSERT( - test_equal(result.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for PointGradient worklet on 2D uniform data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for PointGradient worklet on 2D uniform data"); } } - void TestPointGradientUniform3D() { std::cout << "Testing PointGradient Worklet on 3D strucutred data" << std::endl; @@ -83,73 +80,63 @@ void TestPointGradientUniform3D() vtkm::cont::testing::MakeTestDataSet testDataSet; vtkm::cont::DataSet dataSet = testDataSet.Make3DUniformDataSet0(); - vtkm::cont::ArrayHandle< vtkm::Vec > result; + vtkm::cont::ArrayHandle> result; PointGrad func(dataSet, "pointvar", result); vtkm::cont::CastAndCall(dataSet.GetCellSet(), func); - vtkm::Vec expected[4] = { {10.0,30,60.1}, - {10.0,30.1,60.1}, - {10.0,30.1,60.2}, - {10.1,30,60.2}, - }; + vtkm::Vec expected[4] = { + { 10.0, 30, 60.1 }, { 10.0, 30.1, 60.1 }, { 10.0, 30.1, 60.2 }, { 10.1, 30, 60.2 }, + }; for (int i = 0; i < 4; ++i) { - VTKM_TEST_ASSERT( - test_equal(result.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for PointGradient worklet on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for PointGradient worklet on 3D uniform data"); } - } void TestPointGradientUniform3DWithVectorField() { - std::cout << "Testing PointGradient Worklet with a vector field on 3D strucutred data" << std::endl; + std::cout << "Testing PointGradient Worklet with a vector field on 3D strucutred data" + << std::endl; vtkm::cont::testing::MakeTestDataSet testDataSet; vtkm::cont::DataSet dataSet = testDataSet.Make3DUniformDataSet0(); //Verify that we can compute the gradient of a 3 component vector const int nVerts = 18; - vtkm::Float64 vars[nVerts] = {10.1, 20.1, 30.1, 40.1, 50.2, - 60.2, 70.2, 80.2, 90.3, 100.3, - 110.3, 120.3, 130.4, 140.4, - 150.4, 160.4, 170.5, 180.5}; - std::vector< vtkm::Vec > vec(18); - for(std::size_t i=0; i < vec.size(); ++i) + vtkm::Float64 vars[nVerts] = { 10.1, 20.1, 30.1, 40.1, 50.2, 60.2, 70.2, 80.2, 90.3, + 100.3, 110.3, 120.3, 130.4, 140.4, 150.4, 160.4, 170.5, 180.5 }; + std::vector> vec(18); + for (std::size_t i = 0; i < vec.size(); ++i) { - vec[i] = vtkm::make_Vec(vars[i],vars[i],vars[i]); + vec[i] = vtkm::make_Vec(vars[i], vars[i], vars[i]); } - vtkm::cont::ArrayHandle< vtkm::Vec > input = - vtkm::cont::make_ArrayHandle(vec); + vtkm::cont::ArrayHandle> input = vtkm::cont::make_ArrayHandle(vec); //we need to add Vec3 array to the dataset vtkm::cont::DataSetFieldAdd::AddPointField(dataSet, "vec_pointvar", input); - vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::Vec, 3> > result; - PointGrad< vtkm::Vec > func(dataSet, "vec_pointvar", result); + vtkm::cont::ArrayHandle, 3>> result; + PointGrad> func(dataSet, "vec_pointvar", result); vtkm::cont::CastAndCall(dataSet.GetCellSet(), func); - vtkm::Vec< vtkm::Vec, 3> expected[4] = { - { {10.0,10.0,10.0}, {30.0,30.0,30.0}, {60.1,60.1,60.1} }, - { {10.0,10.0,10.0}, {30.1,30.1,30.1}, {60.1,60.1,60.1} }, - { {10.0,10.0,10.0}, {30.1,30.1,30.1}, {60.2,60.2,60.2} }, - { {10.1,10.1,10.1}, {30.0,30.0,30.0}, {60.2,60.2,60.2} } - }; + vtkm::Vec, 3> expected[4] = { + { { 10.0, 10.0, 10.0 }, { 30.0, 30.0, 30.0 }, { 60.1, 60.1, 60.1 } }, + { { 10.0, 10.0, 10.0 }, { 30.1, 30.1, 30.1 }, { 60.1, 60.1, 60.1 } }, + { { 10.0, 10.0, 10.0 }, { 30.1, 30.1, 30.1 }, { 60.2, 60.2, 60.2 } }, + { { 10.1, 10.1, 10.1 }, { 30.0, 30.0, 30.0 }, { 60.2, 60.2, 60.2 } } + }; for (int i = 0; i < 4; ++i) { - vtkm::Vec< vtkm::Vec, 3> e = expected[i]; - vtkm::Vec< vtkm::Vec, 3> r = result.GetPortalConstControl().Get(i); + vtkm::Vec, 3> e = expected[i]; + vtkm::Vec, 3> r = result.GetPortalConstControl().Get(i); - VTKM_TEST_ASSERT( - test_equal(e[0],r[0]), - "Wrong result for vec field PointGradient worklet on 3D uniform data"); - VTKM_TEST_ASSERT( - test_equal(e[1],r[1]), - "Wrong result for vec field PointGradient worklet on 3D uniform data"); - VTKM_TEST_ASSERT( - test_equal(e[2],r[2]), - "Wrong result for vec field PointGradient worklet on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(e[0], r[0]), + "Wrong result for vec field PointGradient worklet on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(e[1], r[1]), + "Wrong result for vec field PointGradient worklet on 3D uniform data"); + VTKM_TEST_ASSERT(test_equal(e[2], r[2]), + "Wrong result for vec field PointGradient worklet on 3D uniform data"); } - } void TestPointGradientExplicit() @@ -159,21 +146,19 @@ void TestPointGradientExplicit() vtkm::cont::testing::MakeTestDataSet testDataSet; vtkm::cont::DataSet dataSet = testDataSet.Make3DExplicitDataSet0(); - vtkm::cont::ArrayHandle< vtkm::Vec > result; + vtkm::cont::ArrayHandle> result; PointGrad func(dataSet, "pointvar", result); vtkm::cont::CastAndCall(dataSet.GetCellSet(), func); - vtkm::Vec expected[2] = { {10.f,10.1f,0.0f}, {10.f,10.1f,0.0f} }; + vtkm::Vec expected[2] = { { 10.f, 10.1f, 0.0f }, { 10.f, 10.1f, 0.0f } }; for (int i = 0; i < 2; ++i) { - VTKM_TEST_ASSERT( - test_equal(result.GetPortalConstControl().Get(i), expected[i]), - "Wrong result for PointGradient worklet on 3D explicit data"); + VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(i), expected[i]), + "Wrong result for PointGradient worklet on 3D explicit data"); } } - void TestPointGradient() { TestPointGradientUniform2D(); @@ -181,10 +166,9 @@ void TestPointGradient() TestPointGradientUniform3DWithVectorField(); TestPointGradientExplicit(); } - } -int UnitTestPointGradient(int, char *[]) +int UnitTestPointGradient(int, char* []) { return vtkm::cont::testing::Testing::Run(TestPointGradient); } diff --git a/vtkm/worklet/testing/UnitTestRemoveUnusedPoints.cxx b/vtkm/worklet/testing/UnitTestRemoveUnusedPoints.cxx index 3bf6299fb..a5662fbf1 100644 --- a/vtkm/worklet/testing/UnitTestRemoveUnusedPoints.cxx +++ b/vtkm/worklet/testing/UnitTestRemoveUnusedPoints.cxx @@ -22,40 +22,38 @@ #include -namespace { +namespace +{ -vtkm::cont::CellSetExplicit<> -CreateInputCellSet() +vtkm::cont::CellSetExplicit<> CreateInputCellSet() { vtkm::cont::CellSetExplicit<> cellSet("cells"); cellSet.PrepareToAddCells(2, 7); - cellSet.AddCell(vtkm::CELL_SHAPE_TRIANGLE,3,vtkm::make_Vec(0,2,4)); - cellSet.AddCell(vtkm::CELL_SHAPE_QUAD,4,vtkm::make_Vec(4,2,6,8)); + cellSet.AddCell(vtkm::CELL_SHAPE_TRIANGLE, 3, vtkm::make_Vec(0, 2, 4)); + cellSet.AddCell(vtkm::CELL_SHAPE_QUAD, 4, vtkm::make_Vec(4, 2, 6, 8)); cellSet.CompleteAddingCells(11); return cellSet; } -void CheckOutputCellSet(const vtkm::cont::CellSetExplicit<> &cellSet, - const vtkm::cont::ArrayHandle &field) +void CheckOutputCellSet(const vtkm::cont::CellSetExplicit<>& cellSet, + const vtkm::cont::ArrayHandle& field) { VTKM_TEST_ASSERT(cellSet.GetNumberOfCells() == 2, "Wrong num cells."); VTKM_TEST_ASSERT(cellSet.GetNumberOfPoints() == 5, "Wrong num points."); - VTKM_TEST_ASSERT(cellSet.GetCellShape(0) == vtkm::CELL_SHAPE_TRIANGLE, - "Wrong shape"); - VTKM_TEST_ASSERT(cellSet.GetCellShape(1) == vtkm::CELL_SHAPE_QUAD, - "Wrong shape"); + VTKM_TEST_ASSERT(cellSet.GetCellShape(0) == vtkm::CELL_SHAPE_TRIANGLE, "Wrong shape"); + VTKM_TEST_ASSERT(cellSet.GetCellShape(1) == vtkm::CELL_SHAPE_QUAD, "Wrong shape"); VTKM_TEST_ASSERT(cellSet.GetNumberOfPointsInCell(0) == 3, "Wrong num points"); VTKM_TEST_ASSERT(cellSet.GetNumberOfPointsInCell(1) == 4, "Wrong num points"); - vtkm::Vec pointIds3; + vtkm::Vec pointIds3; cellSet.GetIndices(0, pointIds3); VTKM_TEST_ASSERT(pointIds3[0] == 0, "Wrong point id for cell"); VTKM_TEST_ASSERT(pointIds3[1] == 1, "Wrong point id for cell"); VTKM_TEST_ASSERT(pointIds3[2] == 2, "Wrong point id for cell"); - vtkm::Vec pointIds4; + vtkm::Vec pointIds4; cellSet.GetIndices(1, pointIds4); VTKM_TEST_ASSERT(pointIds4[0] == 2, "Wrong point id for cell"); VTKM_TEST_ASSERT(pointIds4[1] == 1, "Wrong point id for cell"); @@ -64,16 +62,11 @@ void CheckOutputCellSet(const vtkm::cont::CellSetExplicit<> &cellSet, vtkm::Float32 fieldValues[5]; field.CopyInto(fieldValues, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); - VTKM_TEST_ASSERT( - test_equal(fieldValues[0], TestValue(0,vtkm::Float32())), "Bad field"); - VTKM_TEST_ASSERT( - test_equal(fieldValues[1], TestValue(2,vtkm::Float32())), "Bad field"); - VTKM_TEST_ASSERT( - test_equal(fieldValues[2], TestValue(4,vtkm::Float32())), "Bad field"); - VTKM_TEST_ASSERT( - test_equal(fieldValues[3], TestValue(6,vtkm::Float32())), "Bad field"); - VTKM_TEST_ASSERT( - test_equal(fieldValues[4], TestValue(8,vtkm::Float32())), "Bad field"); + VTKM_TEST_ASSERT(test_equal(fieldValues[0], TestValue(0, vtkm::Float32())), "Bad field"); + VTKM_TEST_ASSERT(test_equal(fieldValues[1], TestValue(2, vtkm::Float32())), "Bad field"); + VTKM_TEST_ASSERT(test_equal(fieldValues[2], TestValue(4, vtkm::Float32())), "Bad field"); + VTKM_TEST_ASSERT(test_equal(fieldValues[3], TestValue(6, vtkm::Float32())), "Bad field"); + VTKM_TEST_ASSERT(test_equal(fieldValues[4], TestValue(8, vtkm::Float32())), "Bad field"); } void RunTest() @@ -89,10 +82,9 @@ void RunTest() std::cout << "Removing unused points" << std::endl; vtkm::worklet::RemoveUnusedPoints compactPoints(inCellSet, Device()); - vtkm::cont::CellSetExplicit<> outCellSet = - compactPoints.MapCellSet(inCellSet, Device()); + vtkm::cont::CellSetExplicit<> outCellSet = compactPoints.MapCellSet(inCellSet, Device()); vtkm::cont::ArrayHandle outField = - compactPoints.MapPointFieldDeep(inField, Device()); + compactPoints.MapPointFieldDeep(inField, Device()); std::cout << "Checking resulting cell set" << std::endl; CheckOutputCellSet(outCellSet, outField); @@ -100,7 +92,7 @@ void RunTest() } // anonymous namespace -int UnitTestRemoveUnusedPoints(int, char *[]) +int UnitTestRemoveUnusedPoints(int, char* []) { return vtkm::cont::testing::Testing::Run(RunTest); } diff --git a/vtkm/worklet/testing/UnitTestScatterCounting.cxx b/vtkm/worklet/testing/UnitTestScatterCounting.cxx index e89fab4db..7c7789599 100644 --- a/vtkm/worklet/testing/UnitTestScatterCounting.cxx +++ b/vtkm/worklet/testing/UnitTestScatterCounting.cxx @@ -32,7 +32,8 @@ #include -namespace { +namespace +{ struct TestScatterArrays { @@ -45,33 +46,24 @@ struct TestScatterArrays TestScatterArrays MakeScatterArraysShort() { const vtkm::Id countArraySize = 18; - const vtkm::IdComponent countArray[countArraySize] = { - 1, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 - }; - const vtkm::Id inputToOutputMap[countArraySize] = { - 0, 1, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6 - }; + const vtkm::IdComponent countArray[countArraySize] = { 1, 2, 0, 0, 1, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0 }; + const vtkm::Id inputToOutputMap[countArraySize] = { 0, 1, 3, 3, 3, 4, 4, 5, 5, + 5, 5, 5, 5, 5, 5, 6, 6, 6 }; const vtkm::Id outputSize = 6; - const vtkm::Id outputToInputMap[outputSize] = { - 0, 1, 1, 4, 6, 14 - }; - const vtkm::IdComponent visitArray[outputSize] = { - 0, 0, 1, 0, 0, 0 - }; + const vtkm::Id outputToInputMap[outputSize] = { 0, 1, 1, 4, 6, 14 }; + const vtkm::IdComponent visitArray[outputSize] = { 0, 0, 1, 0, 0, 0 }; TestScatterArrays arrays; - typedef vtkm::cont::DeviceAdapterAlgorithm - Algorithm; + typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; // Need to copy arrays so that the data does not go out of scope. - Algorithm::Copy(vtkm::cont::make_ArrayHandle(countArray, countArraySize), - arrays.CountArray); + Algorithm::Copy(vtkm::cont::make_ArrayHandle(countArray, countArraySize), arrays.CountArray); Algorithm::Copy(vtkm::cont::make_ArrayHandle(inputToOutputMap, countArraySize), arrays.InputToOutputMap); Algorithm::Copy(vtkm::cont::make_ArrayHandle(outputToInputMap, outputSize), arrays.OutputToInputMap); - Algorithm::Copy(vtkm::cont::make_ArrayHandle(visitArray, outputSize), - arrays.VisitArray); + Algorithm::Copy(vtkm::cont::make_ArrayHandle(visitArray, outputSize), arrays.VisitArray); return arrays; } @@ -79,33 +71,22 @@ TestScatterArrays MakeScatterArraysShort() TestScatterArrays MakeScatterArraysLong() { const vtkm::Id countArraySize = 6; - const vtkm::IdComponent countArray[countArraySize] = { - 0, 1, 2, 3, 4, 5 - }; - const vtkm::Id inputToOutputMap[countArraySize] = { - 0, 0, 1, 3, 6, 10 - }; + const vtkm::IdComponent countArray[countArraySize] = { 0, 1, 2, 3, 4, 5 }; + const vtkm::Id inputToOutputMap[countArraySize] = { 0, 0, 1, 3, 6, 10 }; const vtkm::Id outputSize = 15; - const vtkm::Id outputToInputMap[outputSize] = { - 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5 - }; - const vtkm::IdComponent visitArray[outputSize] = { - 0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4 - }; + const vtkm::Id outputToInputMap[outputSize] = { 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5 }; + const vtkm::IdComponent visitArray[outputSize] = { 0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4 }; TestScatterArrays arrays; - typedef vtkm::cont::DeviceAdapterAlgorithm - Algorithm; + typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; // Need to copy arrays so that the data does not go out of scope. - Algorithm::Copy(vtkm::cont::make_ArrayHandle(countArray, countArraySize), - arrays.CountArray); + Algorithm::Copy(vtkm::cont::make_ArrayHandle(countArray, countArraySize), arrays.CountArray); Algorithm::Copy(vtkm::cont::make_ArrayHandle(inputToOutputMap, countArraySize), arrays.InputToOutputMap); Algorithm::Copy(vtkm::cont::make_ArrayHandle(outputToInputMap, outputSize), arrays.OutputToInputMap); - Algorithm::Copy(vtkm::cont::make_ArrayHandle(visitArray, outputSize), - arrays.VisitArray); + Algorithm::Copy(vtkm::cont::make_ArrayHandle(visitArray, outputSize), arrays.VisitArray); return arrays; } @@ -113,20 +94,14 @@ TestScatterArrays MakeScatterArraysLong() TestScatterArrays MakeScatterArraysZero() { const vtkm::Id countArraySize = 6; - const vtkm::IdComponent countArray[countArraySize] = { - 0, 0, 0, 0, 0, 0 - }; - const vtkm::Id inputToOutputMap[countArraySize] = { - 0, 0, 0, 0, 0, 0 - }; + const vtkm::IdComponent countArray[countArraySize] = { 0, 0, 0, 0, 0, 0 }; + const vtkm::Id inputToOutputMap[countArraySize] = { 0, 0, 0, 0, 0, 0 }; TestScatterArrays arrays; - typedef vtkm::cont::DeviceAdapterAlgorithm - Algorithm; + typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; // Need to copy arrays so that the data does not go out of scope. - Algorithm::Copy(vtkm::cont::make_ArrayHandle(countArray, countArraySize), - arrays.CountArray); + Algorithm::Copy(vtkm::cont::make_ArrayHandle(countArray, countArraySize), arrays.CountArray); Algorithm::Copy(vtkm::cont::make_ArrayHandle(inputToOutputMap, countArraySize), arrays.InputToOutputMap); arrays.OutputToInputMap.Allocate(0); @@ -137,38 +112,36 @@ TestScatterArrays MakeScatterArraysZero() struct TestScatterCountingWorklet : public vtkm::worklet::WorkletMapField { - typedef void ControlSignature(FieldIn<> inputIndices, - FieldOut<> copyIndices, - FieldOut<> recordVisit, - FieldOut<> recordWorkId); - typedef void ExecutionSignature(_1, _2 ,_3, _4, VisitIndex, WorkIndex); + typedef void ControlSignature(FieldIn<> inputIndices, FieldOut<> copyIndices, + FieldOut<> recordVisit, FieldOut<> recordWorkId); + typedef void ExecutionSignature(_1, _2, _3, _4, VisitIndex, WorkIndex); typedef vtkm::worklet::ScatterCounting ScatterType; VTKM_CONT ScatterType GetScatter() const { return this->Scatter; } - template - VTKM_CONT - TestScatterCountingWorklet(const CountArrayType &countArray) - : Scatter(countArray, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()) { } + template + VTKM_CONT TestScatterCountingWorklet(const CountArrayType& countArray) + : Scatter(countArray, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()) + { + } - template - VTKM_CONT - TestScatterCountingWorklet(const CountArrayType &countArray, Device) - : Scatter(countArray, Device()) { } + template + VTKM_CONT TestScatterCountingWorklet(const CountArrayType& countArray, Device) + : Scatter(countArray, Device()) + { + } VTKM_CONT - TestScatterCountingWorklet(const vtkm::worklet::ScatterCounting &scatter) - : Scatter(scatter) { } + TestScatterCountingWorklet(const vtkm::worklet::ScatterCounting& scatter) + : Scatter(scatter) + { + } VTKM_EXEC - void operator()(vtkm::Id inputIndex, - vtkm::Id &indexCopy, - vtkm::IdComponent &writeVisit, - vtkm::Float32 &captureWorkId, - vtkm::IdComponent visitIndex, - vtkm::Id workId) const + void operator()(vtkm::Id inputIndex, vtkm::Id& indexCopy, vtkm::IdComponent& writeVisit, + vtkm::Float32& captureWorkId, vtkm::IdComponent visitIndex, vtkm::Id workId) const { indexCopy = inputIndex; writeVisit = visitIndex; @@ -179,9 +152,8 @@ private: ScatterType Scatter; }; -template -void CompareArrays(vtkm::cont::ArrayHandle array1, - vtkm::cont::ArrayHandle array2) +template +void CompareArrays(vtkm::cont::ArrayHandle array1, vtkm::cont::ArrayHandle array2) { typedef typename vtkm::cont::ArrayHandle::PortalConstControl PortalType; PortalType portal1 = array1.GetPortalConstControl(); @@ -200,40 +172,34 @@ void CompareArrays(vtkm::cont::ArrayHandle array1, // This unit test makes sure the ScatterCounting generates the correct map // and visit arrays. -void TestScatterArrayGeneration(const TestScatterArrays &arrays) +void TestScatterArrayGeneration(const TestScatterArrays& arrays) { std::cout << " Testing array generation" << std::endl; - vtkm::worklet::ScatterCounting scatter(arrays.CountArray, - VTKM_DEFAULT_DEVICE_ADAPTER_TAG(), + vtkm::worklet::ScatterCounting scatter(arrays.CountArray, VTKM_DEFAULT_DEVICE_ADAPTER_TAG(), true); vtkm::Id inputSize = arrays.CountArray.GetNumberOfValues(); std::cout << " Checking input to output map." << std::endl; - CompareArrays(arrays.InputToOutputMap, - scatter.GetInputToOutputMap()); + CompareArrays(arrays.InputToOutputMap, scatter.GetInputToOutputMap()); std::cout << " Checking output to input map." << std::endl; - CompareArrays(arrays.OutputToInputMap, - scatter.GetOutputToInputMap(inputSize)); + CompareArrays(arrays.OutputToInputMap, scatter.GetOutputToInputMap(inputSize)); std::cout << " Checking visit array." << std::endl; - CompareArrays(arrays.VisitArray, - scatter.GetVisitArray(inputSize)); + CompareArrays(arrays.VisitArray, scatter.GetVisitArray(inputSize)); } // This is more of an integration test that makes sure the scatter works with a // worklet invocation. -void TestScatterWorklet(const TestScatterArrays &arrays) +void TestScatterWorklet(const TestScatterArrays& arrays) { std::cout << " Testing scatter counting in a worklet." << std::endl; - vtkm::worklet::ScatterCounting scatter(arrays.CountArray, - VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); + vtkm::worklet::ScatterCounting scatter(arrays.CountArray, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); TestScatterCountingWorklet worklet(scatter); - vtkm::worklet::DispatcherMapField dispatcher( - worklet); + vtkm::worklet::DispatcherMapField dispatcher(worklet); vtkm::Id inputSize = arrays.CountArray.GetNumberOfValues(); vtkm::cont::ArrayHandleIndex inputIndices(inputSize); @@ -242,8 +208,7 @@ void TestScatterWorklet(const TestScatterArrays &arrays) vtkm::cont::ArrayHandle captureWorkId; std::cout << " Invoke worklet" << std::endl; - dispatcher.Invoke( - inputIndices, outputToInputMapCopy, visitCopy, captureWorkId); + dispatcher.Invoke(inputIndices, outputToInputMapCopy, visitCopy, captureWorkId); std::cout << " Check output to input map." << std::endl; CompareArrays(outputToInputMapCopy, arrays.OutputToInputMap); @@ -253,7 +218,7 @@ void TestScatterWorklet(const TestScatterArrays &arrays) CheckPortal(captureWorkId.GetPortalConstControl()); } -void TestScatterCountingWithArrays(const TestScatterArrays &arrays) +void TestScatterCountingWithArrays(const TestScatterArrays& arrays) { TestScatterArrayGeneration(arrays); TestScatterWorklet(arrays); @@ -273,7 +238,7 @@ void TestScatterCounting() } // anonymous namespace -int UnitTestScatterCounting(int, char *[]) +int UnitTestScatterCounting(int, char* []) { return vtkm::cont::testing::Testing::Run(TestScatterCounting); } diff --git a/vtkm/worklet/testing/UnitTestSplatKernels.cxx b/vtkm/worklet/testing/UnitTestSplatKernels.cxx index 62b11ec91..e7d5ede2a 100644 --- a/vtkm/worklet/testing/UnitTestSplatKernels.cxx +++ b/vtkm/worklet/testing/UnitTestSplatKernels.cxx @@ -34,82 +34,91 @@ typedef vtkm::Vec Vector; // Simpson integradion rule -double SimpsonIntegration(const std::vector &y, - const std::vector &x) { - std::size_t n = x.size()-1; - const double aux = 2.*(x[n]-x[0])/(3.*static_cast(n)); - double val = 0.5*(y[0]*x[0]+y[n]*x[n]); - for(std::size_t i=2; i& y, const std::vector& x) +{ + std::size_t n = x.size() - 1; + const double aux = 2. * (x[n] - x[0]) / (3. * static_cast(n)); + double val = 0.5 * (y[0] * x[0] + y[n] * x[n]); + for (std::size_t i = 2; i < n; i += 2) + { + val += 2 * y[i - 1] + y[i]; } - val += 2*y[n-1]; - return aux*val; + val += 2 * y[n - 1]; + return aux * val; } // Integrade a kernel in 3D template -double IntegralOfKernel(const Kernel& ker) { +double IntegralOfKernel(const Kernel& ker) +{ const double supportlength = ker.maxDistance(); const int npoint = 15000; std::vector x; std::vector y; - for (int i = 0; i(i) * supportlength / static_cast(npoint); x.push_back(r); - y.push_back(ker.w(r)*r*r); + y.push_back(ker.w(r) * r * r); } - return 4.0*M_PI*SimpsonIntegration(y, x); + return 4.0 * M_PI * SimpsonIntegration(y, x); } // Same integration, but using the variable smoothing length interface template -double IntegralOfKernel(const Kernel& ker, double h) { +double IntegralOfKernel(const Kernel& ker, double h) +{ const double supportlength = ker.maxDistance(); const int npoint = 15000; std::vector x; std::vector y; - for (int i = 0; i(i) * supportlength / static_cast(npoint); x.push_back(r); - y.push_back(ker.w(h,r)*r*r); + y.push_back(ker.w(h, r) * r * r); } - return 4.0*M_PI*SimpsonIntegration(y, x); + return 4.0 * M_PI * SimpsonIntegration(y, x); } - -int TestSplatKernels() { +int TestSplatKernels() +{ const double eps = 1e-4; double s; double smoothinglength; std::cout << "Testing Gaussian 3D fixed h kernel integration \n"; - for (int i=0; i<100; ++i) { - smoothinglength = 0.01 + i*(10.0/100.0); - s = IntegralOfKernel(vtkm::worklet::splatkernels::Gaussian<3>(smoothinglength)); - VTKM_TEST_ASSERT ( fabs(s - 1.0) < eps, "Gaussian 3D integration failure"); + for (int i = 0; i < 100; ++i) + { + smoothinglength = 0.01 + i * (10.0 / 100.0); + s = IntegralOfKernel(vtkm::worklet::splatkernels::Gaussian<3>(smoothinglength)); + VTKM_TEST_ASSERT(fabs(s - 1.0) < eps, "Gaussian 3D integration failure"); } std::cout << "Testing Gaussian 3D variable h kernel integration \n"; - for (int i=0; i<100; ++i) { - smoothinglength = 0.01 + i*(10.0/100.0); - s = IntegralOfKernel(vtkm::worklet::splatkernels::Gaussian<3>(smoothinglength),smoothinglength); - VTKM_TEST_ASSERT ( fabs(s - 1.0) < eps, "Gaussian 3D integration failure"); + for (int i = 0; i < 100; ++i) + { + smoothinglength = 0.01 + i * (10.0 / 100.0); + s = + IntegralOfKernel(vtkm::worklet::splatkernels::Gaussian<3>(smoothinglength), smoothinglength); + VTKM_TEST_ASSERT(fabs(s - 1.0) < eps, "Gaussian 3D integration failure"); } -// s = IntegralOfKernel(vtkm::worklet::splatkernels::Gaussian<2>(smoothinglength)); -// VTKM_TEST_ASSERT ( fabs(s - 1.0) < eps, "Gaussian 2D integration failure"); + // s = IntegralOfKernel(vtkm::worklet::splatkernels::Gaussian<2>(smoothinglength)); + // VTKM_TEST_ASSERT ( fabs(s - 1.0) < eps, "Gaussian 2D integration failure"); std::cout << "Testing Spline3rdOrder 3D kernel integration \n"; - for (int i=0; i<100; ++i) { - smoothinglength = 0.01 + i*(10.0/100.0); - s = IntegralOfKernel(vtkm::worklet::splatkernels::Spline3rdOrder<3>(smoothinglength)); - VTKM_TEST_ASSERT ( fabs(s - 1.0) < eps, "Spline3rdOrder 3D integration failure"); + for (int i = 0; i < 100; ++i) + { + smoothinglength = 0.01 + i * (10.0 / 100.0); + s = IntegralOfKernel(vtkm::worklet::splatkernels::Spline3rdOrder<3>(smoothinglength)); + VTKM_TEST_ASSERT(fabs(s - 1.0) < eps, "Spline3rdOrder 3D integration failure"); } -// s = IntegralOfKernel(vtkm::worklet::splatkernels::Spline3rdOrder<2>(smoothinglength)); -// VTKM_TEST_ASSERT ( fabs(s - 1.0) < eps, "Spline3rdOrder 2D integration failure"); + // s = IntegralOfKernel(vtkm::worklet::splatkernels::Spline3rdOrder<2>(smoothinglength)); + // VTKM_TEST_ASSERT ( fabs(s - 1.0) < eps, "Spline3rdOrder 2D integration failure"); -/* + /* s = IntegralOfKernel(KernelBox(ndim, smoothinglength)); if ( fabs(s - 1.0) > eps) { return EXIT_FAILURE; @@ -142,8 +151,7 @@ int TestSplatKernels() { return EXIT_SUCCESS; } -int UnitTestSplatKernels(int, char *[]) +int UnitTestSplatKernels(int, char* []) { return vtkm::cont::testing::Testing::Run(TestSplatKernels); } - diff --git a/vtkm/worklet/testing/UnitTestStreamLineUniformGrid.cxx b/vtkm/worklet/testing/UnitTestStreamLineUniformGrid.cxx index e4bc8b839..21b4f690f 100644 --- a/vtkm/worklet/testing/UnitTestStreamLineUniformGrid.cxx +++ b/vtkm/worklet/testing/UnitTestStreamLineUniformGrid.cxx @@ -27,11 +27,11 @@ #include #include -namespace { +namespace +{ template -VTKM_EXEC_CONT -vtkm::Vec Normalize(vtkm::Vec v) +VTKM_EXEC_CONT vtkm::Vec Normalize(vtkm::Vec v) { T magnitude = static_cast(sqrt(vtkm::dot(v, v))); T zero = static_cast(0.0); @@ -42,135 +42,71 @@ vtkm::Vec Normalize(vtkm::Vec v) return one / magnitude * v; } -float data[125*3] = -{ --0.00603248f, -0.0966396f, -0.000732792f, -0.000530014f, -0.0986189f, -0.000806706f, -0.00684929f, -0.100098f, -0.000876566f, -0.0129235f, -0.101102f, -0.000942341f, -0.0187515f, -0.101656f, -0.00100401f, -0.0706091f, -0.083023f, -0.00144278f, -0.0736404f, -0.0801616f, -0.00145784f, -0.0765194f, -0.0772063f, -0.00147036f, -0.0792559f, -0.0741751f, -0.00148051f, -0.0818589f, -0.071084f, -0.00148843f, -0.103585f, -0.0342287f, -0.001425f, -0.104472f, -0.0316147f, -0.00140433f, -0.105175f, -0.0291574f, -0.00138057f, -0.105682f, -0.0268808f, -0.00135357f, -0.105985f, -0.0248099f, -0.00132315f, --0.00244603f, -0.0989576f, -0.000821705f, -0.00389525f, -0.100695f, -0.000894513f, -0.00999301f, -0.10193f, -0.000963114f, -0.0158452f, -0.102688f, -0.00102747f, -0.0214509f, -0.102995f, -0.00108757f, -0.0708166f, -0.081799f, -0.00149941f, -0.0736939f, -0.0787879f, -0.00151236f, -0.0764359f, -0.0756944f, -0.00152297f, -0.0790546f, -0.0725352f, -0.00153146f, -0.0815609f, -0.0693255f, -0.001538f, --0.00914287f, -0.104658f, -0.001574f, --0.00642891f, -0.10239f, -0.00159659f, --0.00402289f, -0.0994835f, -0.00160731f, --0.00194792f, -0.0959752f, -0.00160528f, --0.00022818f, -0.0919077f, -0.00158957f, --0.0134913f, -0.0274735f, -9.50056e-05f, --0.0188683f, -0.023273f, 0.000194107f, --0.0254516f, -0.0197589f, 0.000529693f, --0.0312798f, -0.0179514f, 0.00083619f, --0.0360426f, -0.0177537f, 0.00110164f, -0.0259929f, -0.0204479f, -0.000304646f, -0.033336f, -0.0157385f, -0.000505569f, -0.0403427f, -0.0104637f, -0.000693529f, -0.0469371f, -0.00477766f, -0.000865609f, -0.0530722f, 0.0011701f, -0.00102f, --0.0121869f, -0.10317f, -0.0015868f, --0.0096549f, -0.100606f, -0.00160377f, --0.00743038f, -0.0973796f, -0.00160783f, --0.00553901f, -0.0935261f, -0.00159792f, --0.00400821f, -0.0890871f, -0.00157287f, --0.0267803f, -0.0165823f, 0.000454173f, --0.0348303f, -0.011642f, 0.000881271f, --0.0424964f, -0.00870761f, 0.00129226f, --0.049437f, -0.00781358f, 0.0016728f, --0.0552635f, -0.00888708f, 0.00200659f, --0.0629746f, -0.0721524f, -0.00160475f, --0.0606813f, -0.0677576f, -0.00158427f, --0.0582203f, -0.0625009f, -0.00154304f, --0.0555686f, -0.0563905f, -0.00147822f, --0.0526988f, -0.0494369f, -0.00138643f, -0.0385695f, 0.115704f, 0.00674413f, -0.056434f, 0.128273f, 0.00869052f, -0.0775564f, 0.137275f, 0.0110399f, -0.102515f, 0.140823f, 0.0138637f, -0.131458f, 0.136024f, 0.0171804f, -0.0595175f, -0.0845927f, 0.00512454f, -0.0506615f, -0.0680369f, 0.00376604f, -0.0434904f, -0.0503557f, 0.00261592f, -0.0376711f, -0.0318716f, 0.00163301f, -0.0329454f, -0.0128019f, 0.000785352f, --0.0664062f, -0.0701094f, -0.00160644f, --0.0641074f, -0.0658893f, -0.00158969f, --0.0616054f, -0.0608302f, -0.00155303f, --0.0588734f, -0.0549447f, -0.00149385f, --0.0558797f, -0.0482482f, -0.00140906f, -0.0434062f, 0.102969f, 0.00581269f, -0.0619547f, 0.112838f, 0.00742057f, -0.0830229f, 0.118752f, 0.00927516f, -0.106603f, 0.119129f, 0.0113757f, -0.132073f, 0.111946f, 0.0136613f, --0.0135758f, -0.0934604f, -0.000533868f, --0.00690763f, -0.0958773f, -0.000598878f, --0.000475275f, -0.0977838f, -0.000660985f, -0.00571866f, -0.0992032f, -0.0007201f, -0.0116724f, -0.10016f, -0.000776144f, -0.0651428f, -0.0850475f, -0.00120243f, -0.0682895f, -0.0823666f, -0.00121889f, -0.0712792f, -0.0795772f, -0.00123291f, -0.0741224f, -0.0766981f, -0.00124462f, -0.076829f, -0.0737465f, -0.00125416f, -0.10019f, -0.0375515f, -0.00121866f, -0.101296f, -0.0348723f, -0.00120216f, -0.102235f, -0.0323223f, -0.00118309f, -0.102994f, -0.0299234f, -0.00116131f, -0.103563f, -0.0276989f, -0.0011367f, --0.00989236f, -0.0958821f, -0.000608883f, --0.00344154f, -0.0980645f, -0.000673641f, -0.00277318f, -0.0997337f, -0.000735354f, -0.00874908f, -0.100914f, -0.000793927f, -0.0144843f, -0.101629f, -0.000849279f, -0.0654428f, -0.0839355f, -0.00125739f, -0.0684225f, -0.0810989f, -0.00127208f, -0.0712599f, -0.0781657f, -0.00128444f, -0.0739678f, -0.0751541f, -0.00129465f, -0.076558f, -0.0720804f, -0.00130286f, --0.0132841f, -0.103948f, -0.00131159f, --0.010344f, -0.102328f, -0.0013452f, --0.00768637f, -0.100054f, -0.00136938f, --0.00533293f, -0.0971572f, -0.00138324f, --0.00330643f, -0.0936735f, -0.00138586f, --0.0116984f, -0.0303752f, -0.000229102f, --0.0149879f, -0.0265231f, -3.43823e-05f, --0.0212917f, -0.0219544f, 0.000270283f, --0.0277756f, -0.0186879f, 0.000582781f, --0.0335115f, -0.0171098f, 0.00086919f, -0.0170095f, -0.025299f, -3.73557e-05f, -0.024552f, -0.0214351f, -0.000231975f, -0.0318714f, -0.0168568f, -0.000417463f, -0.0388586f, -0.0117131f, -0.000589883f, -0.0454388f, -0.00615626f, -0.000746594f, --0.0160785f, -0.102675f, -0.00132891f, --0.0133174f, -0.100785f, -0.00135859f, --0.0108365f, -0.0982184f, -0.00137801f, --0.00865931f, -0.0950053f, -0.00138614f, --0.00681126f, -0.0911806f, -0.00138185f, --0.0208973f, -0.0216631f, 0.000111231f, --0.0289373f, -0.0151081f, 0.000512553f, --0.0368736f, -0.0104306f, 0.000911793f, --0.0444294f, -0.00773838f, 0.00129762f, --0.0512663f, -0.00706554f, 0.00165611f +float data[125 * 3] = { + -0.00603248f, -0.0966396f, -0.000732792f, 0.000530014f, -0.0986189f, -0.000806706f, + 0.00684929f, -0.100098f, -0.000876566f, 0.0129235f, -0.101102f, -0.000942341f, + 0.0187515f, -0.101656f, -0.00100401f, 0.0706091f, -0.083023f, -0.00144278f, + 0.0736404f, -0.0801616f, -0.00145784f, 0.0765194f, -0.0772063f, -0.00147036f, + 0.0792559f, -0.0741751f, -0.00148051f, 0.0818589f, -0.071084f, -0.00148843f, + 0.103585f, -0.0342287f, -0.001425f, 0.104472f, -0.0316147f, -0.00140433f, + 0.105175f, -0.0291574f, -0.00138057f, 0.105682f, -0.0268808f, -0.00135357f, + 0.105985f, -0.0248099f, -0.00132315f, -0.00244603f, -0.0989576f, -0.000821705f, + 0.00389525f, -0.100695f, -0.000894513f, 0.00999301f, -0.10193f, -0.000963114f, + 0.0158452f, -0.102688f, -0.00102747f, 0.0214509f, -0.102995f, -0.00108757f, + 0.0708166f, -0.081799f, -0.00149941f, 0.0736939f, -0.0787879f, -0.00151236f, + 0.0764359f, -0.0756944f, -0.00152297f, 0.0790546f, -0.0725352f, -0.00153146f, + 0.0815609f, -0.0693255f, -0.001538f, -0.00914287f, -0.104658f, -0.001574f, + -0.00642891f, -0.10239f, -0.00159659f, -0.00402289f, -0.0994835f, -0.00160731f, + -0.00194792f, -0.0959752f, -0.00160528f, -0.00022818f, -0.0919077f, -0.00158957f, + -0.0134913f, -0.0274735f, -9.50056e-05f, -0.0188683f, -0.023273f, 0.000194107f, + -0.0254516f, -0.0197589f, 0.000529693f, -0.0312798f, -0.0179514f, 0.00083619f, + -0.0360426f, -0.0177537f, 0.00110164f, 0.0259929f, -0.0204479f, -0.000304646f, + 0.033336f, -0.0157385f, -0.000505569f, 0.0403427f, -0.0104637f, -0.000693529f, + 0.0469371f, -0.00477766f, -0.000865609f, 0.0530722f, 0.0011701f, -0.00102f, + -0.0121869f, -0.10317f, -0.0015868f, -0.0096549f, -0.100606f, -0.00160377f, + -0.00743038f, -0.0973796f, -0.00160783f, -0.00553901f, -0.0935261f, -0.00159792f, + -0.00400821f, -0.0890871f, -0.00157287f, -0.0267803f, -0.0165823f, 0.000454173f, + -0.0348303f, -0.011642f, 0.000881271f, -0.0424964f, -0.00870761f, 0.00129226f, + -0.049437f, -0.00781358f, 0.0016728f, -0.0552635f, -0.00888708f, 0.00200659f, + -0.0629746f, -0.0721524f, -0.00160475f, -0.0606813f, -0.0677576f, -0.00158427f, + -0.0582203f, -0.0625009f, -0.00154304f, -0.0555686f, -0.0563905f, -0.00147822f, + -0.0526988f, -0.0494369f, -0.00138643f, 0.0385695f, 0.115704f, 0.00674413f, + 0.056434f, 0.128273f, 0.00869052f, 0.0775564f, 0.137275f, 0.0110399f, + 0.102515f, 0.140823f, 0.0138637f, 0.131458f, 0.136024f, 0.0171804f, + 0.0595175f, -0.0845927f, 0.00512454f, 0.0506615f, -0.0680369f, 0.00376604f, + 0.0434904f, -0.0503557f, 0.00261592f, 0.0376711f, -0.0318716f, 0.00163301f, + 0.0329454f, -0.0128019f, 0.000785352f, -0.0664062f, -0.0701094f, -0.00160644f, + -0.0641074f, -0.0658893f, -0.00158969f, -0.0616054f, -0.0608302f, -0.00155303f, + -0.0588734f, -0.0549447f, -0.00149385f, -0.0558797f, -0.0482482f, -0.00140906f, + 0.0434062f, 0.102969f, 0.00581269f, 0.0619547f, 0.112838f, 0.00742057f, + 0.0830229f, 0.118752f, 0.00927516f, 0.106603f, 0.119129f, 0.0113757f, + 0.132073f, 0.111946f, 0.0136613f, -0.0135758f, -0.0934604f, -0.000533868f, + -0.00690763f, -0.0958773f, -0.000598878f, -0.000475275f, -0.0977838f, -0.000660985f, + 0.00571866f, -0.0992032f, -0.0007201f, 0.0116724f, -0.10016f, -0.000776144f, + 0.0651428f, -0.0850475f, -0.00120243f, 0.0682895f, -0.0823666f, -0.00121889f, + 0.0712792f, -0.0795772f, -0.00123291f, 0.0741224f, -0.0766981f, -0.00124462f, + 0.076829f, -0.0737465f, -0.00125416f, 0.10019f, -0.0375515f, -0.00121866f, + 0.101296f, -0.0348723f, -0.00120216f, 0.102235f, -0.0323223f, -0.00118309f, + 0.102994f, -0.0299234f, -0.00116131f, 0.103563f, -0.0276989f, -0.0011367f, + -0.00989236f, -0.0958821f, -0.000608883f, -0.00344154f, -0.0980645f, -0.000673641f, + 0.00277318f, -0.0997337f, -0.000735354f, 0.00874908f, -0.100914f, -0.000793927f, + 0.0144843f, -0.101629f, -0.000849279f, 0.0654428f, -0.0839355f, -0.00125739f, + 0.0684225f, -0.0810989f, -0.00127208f, 0.0712599f, -0.0781657f, -0.00128444f, + 0.0739678f, -0.0751541f, -0.00129465f, 0.076558f, -0.0720804f, -0.00130286f, + -0.0132841f, -0.103948f, -0.00131159f, -0.010344f, -0.102328f, -0.0013452f, + -0.00768637f, -0.100054f, -0.00136938f, -0.00533293f, -0.0971572f, -0.00138324f, + -0.00330643f, -0.0936735f, -0.00138586f, -0.0116984f, -0.0303752f, -0.000229102f, + -0.0149879f, -0.0265231f, -3.43823e-05f, -0.0212917f, -0.0219544f, 0.000270283f, + -0.0277756f, -0.0186879f, 0.000582781f, -0.0335115f, -0.0171098f, 0.00086919f, + 0.0170095f, -0.025299f, -3.73557e-05f, 0.024552f, -0.0214351f, -0.000231975f, + 0.0318714f, -0.0168568f, -0.000417463f, 0.0388586f, -0.0117131f, -0.000589883f, + 0.0454388f, -0.00615626f, -0.000746594f, -0.0160785f, -0.102675f, -0.00132891f, + -0.0133174f, -0.100785f, -0.00135859f, -0.0108365f, -0.0982184f, -0.00137801f, + -0.00865931f, -0.0950053f, -0.00138614f, -0.00681126f, -0.0911806f, -0.00138185f, + -0.0208973f, -0.0216631f, 0.000111231f, -0.0289373f, -0.0151081f, 0.000512553f, + -0.0368736f, -0.0104306f, 0.000911793f, -0.0444294f, -0.00773838f, 0.00129762f, + -0.0512663f, -0.00706554f, 0.00165611f }; - } void TestStreamLineUniformGrid() @@ -190,7 +126,7 @@ void TestStreamLineUniformGrid() // Read vector data at each point of the uniform grid and store vtkm::Id nElements = vdims[0] * vdims[1] * vdims[2] * 3; - std::vector > field; + std::vector> field; for (vtkm::Id i = 0; i < nElements; i++) { vtkm::Float32 x = data[i]; @@ -199,7 +135,7 @@ void TestStreamLineUniformGrid() vtkm::Vec vecData(x, y, z); field.push_back(Normalize(vecData)); } - vtkm::cont::ArrayHandle > fieldArray; + vtkm::cont::ArrayHandle> fieldArray; fieldArray = vtkm::cont::make_ArrayHandle(&field[0], nElements); // Construct the input dataset (uniform) to hold the input and set vector data @@ -214,17 +150,14 @@ void TestStreamLineUniformGrid() // Create and run the filter vtkm::worklet::StreamLineFilterUniformGrid streamLineFilter; - vtkm::cont::DataSet outDataSet = streamLineFilter.Run(inDataSet, - vtkm::worklet::internal::BOTH, - numSeeds, - maxSteps, - timeStep); + vtkm::cont::DataSet outDataSet = + streamLineFilter.Run(inDataSet, vtkm::worklet::internal::BOTH, numSeeds, maxSteps, timeStep); // Check output vtkm::cont::CellSetExplicit<> outCellSet; outDataSet.GetCellSet(0).CopyTo(outCellSet); - const vtkm::cont::DynamicArrayHandleCoordinateSystem &coordArray = - outDataSet.GetCoordinateSystem(0).GetData(); + const vtkm::cont::DynamicArrayHandleCoordinateSystem& coordArray = + outDataSet.GetCoordinateSystem(0).GetData(); vtkm::Id numberOfCells = outCellSet.GetNumberOfCells(); vtkm::Id numberOfPoints = coordArray.GetNumberOfValues(); @@ -235,7 +168,7 @@ void TestStreamLineUniformGrid() "Wrong number of cells for stream lines"); } -int UnitTestStreamLineUniformGrid(int, char *[]) +int UnitTestStreamLineUniformGrid(int, char* []) { return vtkm::cont::testing::Testing::Run(TestStreamLineUniformGrid); } diff --git a/vtkm/worklet/testing/UnitTestStreamingSine.cxx b/vtkm/worklet/testing/UnitTestStreamingSine.cxx index 0eb23bf47..aa1b660e7 100644 --- a/vtkm/worklet/testing/UnitTestStreamingSine.cxx +++ b/vtkm/worklet/testing/UnitTestStreamingSine.cxx @@ -26,7 +26,6 @@ #include - namespace vtkm { namespace worklet @@ -37,43 +36,40 @@ public: typedef void ControlSignature(FieldIn<>, FieldOut<>); typedef _2 ExecutionSignature(_1, WorkIndex); - template - VTKM_EXEC - T operator()(T x, vtkm::Id& index) const { + template + VTKM_EXEC T operator()(T x, vtkm::Id& index) const + { return (static_cast(index) + vtkm::Sin(x)); } }; } } - // Utility method to print input, output, and reference arrays template void compareArrays(T1& a1, T2& a2, T3& a3, char const* text) { for (vtkm::Id i = 0; i < a1.GetNumberOfValues(); ++i) { - std::cout << a1.GetPortalConstControl().Get(i) << " " - << a2.GetPortalConstControl().Get(i) << " " - << a3.GetPortalConstControl().Get(i) << std::endl; + std::cout << a1.GetPortalConstControl().Get(i) << " " << a2.GetPortalConstControl().Get(i) + << " " << a3.GetPortalConstControl().Get(i) << std::endl; VTKM_TEST_ASSERT( - test_equal(a2.GetPortalConstControl().Get(i), - a3.GetPortalConstControl().Get(i), 0.01f), - text); + test_equal(a2.GetPortalConstControl().Get(i), a3.GetPortalConstControl().Get(i), 0.01f), + text); } } - void TestStreamingSine() { // Test the streaming worklet std::cout << "Testing streaming worklet:" << std::endl; - const vtkm::Id N = 25; const vtkm::Id NBlocks = 4; + const vtkm::Id N = 25; + const vtkm::Id NBlocks = 4; vtkm::cont::ArrayHandle input, output, reference, summation; std::vector data(N), test(N); vtkm::Float32 testSum = 0.0f; - for (vtkm::UInt32 i=0; i(i); test[i] = static_cast(i) + static_cast(vtkm::Sin(data[i])); @@ -83,8 +79,7 @@ void TestStreamingSine() typedef vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; vtkm::worklet::SineWorklet sineWorklet; - vtkm::worklet::DispatcherStreamingMapField - dispatcher(sineWorklet); + vtkm::worklet::DispatcherStreamingMapField dispatcher(sineWorklet); dispatcher.SetNumberOfBlocks(NBlocks); dispatcher.Invoke(input, output); @@ -97,16 +92,20 @@ void TestStreamingSine() std::cout << "Testing streaming exclusive scan: " << std::endl; referenceSum = DeviceAlgorithms::ScanExclusive(input, summation); streamSum = DeviceAlgorithms::StreamingScanExclusive(4, input, output); - VTKM_TEST_ASSERT(test_equal(streamSum, referenceSum, 0.01f), "Wrong sum for streaming exclusive scan"); + VTKM_TEST_ASSERT(test_equal(streamSum, referenceSum, 0.01f), + "Wrong sum for streaming exclusive scan"); compareArrays(input, output, summation, "Wrong result for streaming exclusive scan"); // Test the streaming exclusive scan with binary operator std::cout << "Testing streaming exnclusive scan with binary operator: " << std::endl; - vtkm::Float32 initValue = 0.0; + vtkm::Float32 initValue = 0.0; referenceSum = DeviceAlgorithms::ScanExclusive(input, summation, vtkm::Maximum(), initValue); - streamSum = DeviceAlgorithms::StreamingScanExclusive(4, input, output, vtkm::Maximum(), initValue); - VTKM_TEST_ASSERT(test_equal(streamSum, referenceSum, 0.01f), "Wrong sum for streaming exclusive scan with binary operator"); - compareArrays(input, output, summation, "Wrong result for streaming exclusive scan with binary operator"); + streamSum = + DeviceAlgorithms::StreamingScanExclusive(4, input, output, vtkm::Maximum(), initValue); + VTKM_TEST_ASSERT(test_equal(streamSum, referenceSum, 0.01f), + "Wrong sum for streaming exclusive scan with binary operator"); + compareArrays(input, output, summation, + "Wrong result for streaming exclusive scan with binary operator"); // Test the streaming reduce std::cout << "Testing streaming reduce: " << std::endl; @@ -120,11 +119,11 @@ void TestStreamingSine() referenceSum = DeviceAlgorithms::Reduce(input, 0.0f, vtkm::Maximum()); streamSum = DeviceAlgorithms::StreamingReduce(4, input, 0.0f, vtkm::Maximum()); std::cout << "Result: " << streamSum << " " << referenceSum << std::endl; - VTKM_TEST_ASSERT(test_equal(streamSum, referenceSum, 0.01f), "Wrong sum for streaming reduce with binary operator"); - + VTKM_TEST_ASSERT(test_equal(streamSum, referenceSum, 0.01f), + "Wrong sum for streaming reduce with binary operator"); } -int UnitTestStreamingSine(int, char *[]) +int UnitTestStreamingSine(int, char* []) { return vtkm::cont::testing::Testing::Run(TestStreamingSine); } diff --git a/vtkm/worklet/testing/UnitTestTetrahedralize.cxx b/vtkm/worklet/testing/UnitTestTetrahedralize.cxx index aa78bd74f..ae6e670bc 100644 --- a/vtkm/worklet/testing/UnitTestTetrahedralize.cxx +++ b/vtkm/worklet/testing/UnitTestTetrahedralize.cxx @@ -42,22 +42,21 @@ public: std::cout << "Testing TetrahedralizeStructured" << std::endl; typedef vtkm::cont::CellSetStructured<3> CellSetType; typedef vtkm::cont::CellSetSingleType<> OutCellSetType; - + // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make3DUniformDataSet0(); CellSetType cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); - + // Convert uniform hexahedra to tetrahedra vtkm::worklet::Tetrahedralize tetrahedralize; - OutCellSetType outCellSet = tetrahedralize.Run(cellSet, - DeviceAdapter()); - + OutCellSetType outCellSet = tetrahedralize.Run(cellSet, DeviceAdapter()); + // Create the output dataset with same coordinate system vtkm::cont::DataSet outDataSet; outDataSet.AddCoordinateSystem(dataSet.GetCoordinateSystem(0)); outDataSet.AddCellSet(outCellSet); - + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), cellSet.GetNumberOfCells() * 5), "Wrong result for Tetrahedralize filter"); } @@ -71,24 +70,23 @@ public: std::cout << "Testing TetrahedralizeExplicit" << std::endl; typedef vtkm::cont::CellSetExplicit<> CellSetType; typedef vtkm::cont::CellSetSingleType<> OutCellSetType; - + // Create the input explicit cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make3DExplicitDataSet5(); CellSetType cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); vtkm::cont::ArrayHandle outCellsPerCell; - + // Convert explicit cells to tetrahedra vtkm::worklet::Tetrahedralize tetrahedralize; - OutCellSetType outCellSet = tetrahedralize.Run(cellSet, - DeviceAdapter()); - + OutCellSetType outCellSet = tetrahedralize.Run(cellSet, DeviceAdapter()); + // Create the output dataset explicit cell set with same coordinate system vtkm::cont::DataSet outDataSet; outDataSet.AddCoordinateSystem(dataSet.GetCoordinateSystem(0)); outDataSet.AddCellSet(outCellSet); - - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 11), + + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 11), "Wrong result for Tetrahedralize filter"); } @@ -99,7 +97,7 @@ public: } }; -int UnitTestTetrahedralize(int, char *[]) +int UnitTestTetrahedralize(int, char* []) { return vtkm::cont::testing::Testing::Run( TestingTetrahedralize()); diff --git a/vtkm/worklet/testing/UnitTestThreshold.cxx b/vtkm/worklet/testing/UnitTestThreshold.cxx index c7677bd11..c36d12a7c 100644 --- a/vtkm/worklet/testing/UnitTestThreshold.cxx +++ b/vtkm/worklet/testing/UnitTestThreshold.cxx @@ -29,18 +29,20 @@ #include #include -namespace { +namespace +{ class HasValue { public: VTKM_CONT - HasValue(vtkm::Float32 value) : Value(value) - { } + HasValue(vtkm::Float32 value) + : Value(value) + { + } template - VTKM_EXEC - bool operator()(ScalarType value) const + VTKM_EXEC bool operator()(ScalarType value) const { return static_cast(value) == this->Value; } @@ -61,9 +63,9 @@ public: typedef vtkm::cont::CellSetStructured<2> CellSetType; typedef vtkm::cont::CellSetPermutation OutCellSetType; - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; vtkm::cont::DataSet dataset = MakeTestDataSet().Make2DUniformDataSet0(); @@ -71,12 +73,9 @@ public: dataset.GetCellSet(0).CopyTo(cellset); vtkm::worklet::Threshold threshold; - OutCellSetType outCellSet = threshold.Run(cellset, - dataset.GetField("pointvar"), - HasValue(60.1f), - DeviceAdapter()); - vtkm::cont::Field cellField = - threshold.ProcessCellField(dataset.GetField("cellvar")); + OutCellSetType outCellSet = + threshold.Run(cellset, dataset.GetField("pointvar"), HasValue(60.1f), DeviceAdapter()); + vtkm::cont::Field cellField = threshold.ProcessCellField(dataset.GetField("cellvar")); VTKM_TEST_ASSERT(outCellSet.GetNumberOfCells() == 1, "Wrong number of cells"); @@ -84,7 +83,7 @@ public: cellField.GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 1 && - cellFieldArray.GetPortalConstControl().Get(0) == 200.1f, + cellFieldArray.GetPortalConstControl().Get(0) == 200.1f, "Wrong cell field data"); } @@ -94,9 +93,9 @@ public: typedef vtkm::cont::CellSetStructured<3> CellSetType; typedef vtkm::cont::CellSetPermutation OutCellSetType; - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet0(); @@ -104,12 +103,9 @@ public: dataset.GetCellSet(0).CopyTo(cellset); vtkm::worklet::Threshold threshold; - OutCellSetType outCellSet = threshold.Run(cellset, - dataset.GetField("pointvar"), - HasValue(20.1f), - DeviceAdapter()); - vtkm::cont::Field cellField = - threshold.ProcessCellField(dataset.GetField("cellvar")); + OutCellSetType outCellSet = + threshold.Run(cellset, dataset.GetField("pointvar"), HasValue(20.1f), DeviceAdapter()); + vtkm::cont::Field cellField = threshold.ProcessCellField(dataset.GetField("cellvar")); VTKM_TEST_ASSERT(outCellSet.GetNumberOfCells() == 2, "Wrong number of cells"); @@ -117,8 +113,8 @@ public: cellField.GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 2 && - cellFieldArray.GetPortalConstControl().Get(0) == 100.1f && - cellFieldArray.GetPortalConstControl().Get(1) == 100.2f, + cellFieldArray.GetPortalConstControl().Get(0) == 100.1f && + cellFieldArray.GetPortalConstControl().Get(1) == 100.2f, "Wrong cell field data"); } @@ -128,9 +124,9 @@ public: typedef vtkm::cont::CellSetExplicit<> CellSetType; typedef vtkm::cont::CellSetPermutation OutCellSetType; - typedef vtkm::cont::ArrayHandlePermutation< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle > OutCellFieldArrayHandleType; + typedef vtkm::cont::ArrayHandlePermutation, + vtkm::cont::ArrayHandle> + OutCellFieldArrayHandleType; vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet0(); @@ -138,12 +134,9 @@ public: dataset.GetCellSet(0).CopyTo(cellset); vtkm::worklet::Threshold threshold; - OutCellSetType outCellSet = threshold.Run(cellset, - dataset.GetField("cellvar"), - HasValue(100.1f), - DeviceAdapter()); - vtkm::cont::Field cellField = - threshold.ProcessCellField(dataset.GetField("cellvar")); + OutCellSetType outCellSet = + threshold.Run(cellset, dataset.GetField("cellvar"), HasValue(100.1f), DeviceAdapter()); + vtkm::cont::Field cellField = threshold.ProcessCellField(dataset.GetField("cellvar")); VTKM_TEST_ASSERT(outCellSet.GetNumberOfCells() == 1, "Wrong number of cells"); @@ -151,7 +144,7 @@ public: cellField.GetData().CopyTo(cellFieldArray); VTKM_TEST_ASSERT(cellFieldArray.GetNumberOfValues() == 1 && - cellFieldArray.GetPortalConstControl().Get(0) == 100.1f, + cellFieldArray.GetPortalConstControl().Get(0) == 100.1f, "Wrong cell field data"); } @@ -162,11 +155,9 @@ public: this->TestExplicit3D(); } }; - } -int UnitTestThreshold(int, char *[]) +int UnitTestThreshold(int, char* []) { - return vtkm::cont::testing::Testing::Run( - TestingThreshold()); + return vtkm::cont::testing::Testing::Run(TestingThreshold()); } diff --git a/vtkm/worklet/testing/UnitTestThresholdPoints.cxx b/vtkm/worklet/testing/UnitTestThresholdPoints.cxx index bf897b7f4..3a6972b9b 100644 --- a/vtkm/worklet/testing/UnitTestThresholdPoints.cxx +++ b/vtkm/worklet/testing/UnitTestThresholdPoints.cxx @@ -30,19 +30,21 @@ #include #include -namespace { +namespace +{ // Predicate for values less than minimum class ValuesBelow { public: VTKM_CONT - ValuesBelow(const vtkm::FloatDefault& value) : Value(value) - { } + ValuesBelow(const vtkm::FloatDefault& value) + : Value(value) + { + } - template - VTKM_EXEC - bool operator()(const ScalarType& value) const + template + VTKM_EXEC bool operator()(const ScalarType& value) const { return static_cast(value) <= this->Value; } @@ -56,12 +58,13 @@ class ValuesAbove { public: VTKM_CONT - ValuesAbove(const vtkm::FloatDefault& value) : Value(value) - { } + ValuesAbove(const vtkm::FloatDefault& value) + : Value(value) + { + } - template - VTKM_EXEC - bool operator()(const ScalarType& value) const + template + VTKM_EXEC bool operator()(const ScalarType& value) const { return static_cast(value) >= this->Value; } @@ -70,24 +73,22 @@ private: vtkm::FloatDefault Value; }; - // Predicate for values between minimum and maximum class ValuesBetween { public: VTKM_CONT - ValuesBetween(const vtkm::FloatDefault& lower, - const vtkm::FloatDefault& upper) : - Lower(lower), - Upper(upper) - { } + ValuesBetween(const vtkm::FloatDefault& lower, const vtkm::FloatDefault& upper) + : Lower(lower) + , Upper(upper) + { + } - template - VTKM_EXEC - bool operator()(const ScalarType& value) const + template + VTKM_EXEC bool operator()(const ScalarType& value) const { return static_cast(value) >= this->Lower && - static_cast(value) <= this->Upper; + static_cast(value) <= this->Upper; } private: @@ -117,13 +118,12 @@ public: // Output dataset gets new cell set of points that meet threshold predicate vtkm::worklet::ThresholdPoints threshold; OutCellSetType outCellSet; - outCellSet = threshold.Run(dataset.GetCellSet(0), - dataset.GetField("pointvar").GetData(), - ValuesBetween(40.0f, 71.0f), - DeviceAdapter()); + outCellSet = threshold.Run(dataset.GetCellSet(0), dataset.GetField("pointvar").GetData(), + ValuesBetween(40.0f, 71.0f), DeviceAdapter()); outDataSet.AddCellSet(outCellSet); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 11), "Wrong result for ThresholdPoints"); + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 11), + "Wrong result for ThresholdPoints"); vtkm::cont::Field pointField = outDataSet.GetField("pointvar"); vtkm::cont::ArrayHandle pointFieldArray; @@ -148,14 +148,12 @@ public: // Output dataset gets new cell set of points that meet threshold predicate vtkm::worklet::ThresholdPoints threshold; OutCellSetType outCellSet; - outCellSet = threshold.Run(dataset.GetCellSet(0), - dataset.GetField("pointvar").GetData(), - ValuesAbove(1.0f), - DeviceAdapter()); + outCellSet = threshold.Run(dataset.GetCellSet(0), dataset.GetField("pointvar").GetData(), + ValuesAbove(1.0f), DeviceAdapter()); outDataSet.AddCellSet(outCellSet); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 27), "Wrong result for ThresholdPoints"); - + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 27), + "Wrong result for ThresholdPoints"); } void TestExplicit3D() const @@ -173,13 +171,12 @@ public: // Output dataset gets new cell set of points that meet threshold predicate vtkm::worklet::ThresholdPoints threshold; OutCellSetType outCellSet; - outCellSet = threshold.Run(dataset.GetCellSet(0), - dataset.GetField("pointvar").GetData(), - ValuesBelow(50.0f), - DeviceAdapter()); + outCellSet = threshold.Run(dataset.GetCellSet(0), dataset.GetField("pointvar").GetData(), + ValuesBelow(50.0f), DeviceAdapter()); outDataSet.AddCellSet(outCellSet); - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 6), "Wrong result for ThresholdPoints"); + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 6), + "Wrong result for ThresholdPoints"); } void operator()() const @@ -189,10 +186,9 @@ public: this->TestExplicit3D(); } }; - } -int UnitTestThresholdPoints(int, char *[]) +int UnitTestThresholdPoints(int, char* []) { return vtkm::cont::testing::Testing::Run( TestingThresholdPoints()); diff --git a/vtkm/worklet/testing/UnitTestTriangulate.cxx b/vtkm/worklet/testing/UnitTestTriangulate.cxx index 67990e834..5606b1ba4 100644 --- a/vtkm/worklet/testing/UnitTestTriangulate.cxx +++ b/vtkm/worklet/testing/UnitTestTriangulate.cxx @@ -45,8 +45,7 @@ public: // Convert uniform quadrilaterals to triangles vtkm::worklet::Triangulate triangulate; - OutCellSetType outCellSet = triangulate.Run(cellSet, - DeviceAdapter()); + OutCellSetType outCellSet = triangulate.Run(cellSet, DeviceAdapter()); // Create the output dataset and assign the input coordinate system vtkm::cont::DataSet outDataSet; @@ -63,24 +62,24 @@ public: std::cout << "Testing TriangulateExplicit:" << std::endl; typedef vtkm::cont::CellSetExplicit<> CellSetType; typedef vtkm::cont::CellSetSingleType<> OutCellSetType; - + // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make2DExplicitDataSet0(); CellSetType cellSet; dataSet.GetCellSet(0).CopyTo(cellSet); vtkm::cont::ArrayHandle outCellsPerCell; - + // Convert explicit cells to triangles vtkm::worklet::Triangulate triangulate; - OutCellSetType outCellSet = triangulate.Run(cellSet, - DeviceAdapter()); + OutCellSetType outCellSet = triangulate.Run(cellSet, DeviceAdapter()); // Create the output dataset explicit cell set with same coordinate system vtkm::cont::DataSet outDataSet; outDataSet.AddCoordinateSystem(dataSet.GetCoordinateSystem(0)); outDataSet.AddCellSet(outCellSet); - - VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 14), "Wrong result for Triangulate filter"); + + VTKM_TEST_ASSERT(test_equal(outCellSet.GetNumberOfCells(), 14), + "Wrong result for Triangulate filter"); } void operator()() const @@ -90,8 +89,7 @@ public: } }; -int UnitTestTriangulate(int, char *[]) +int UnitTestTriangulate(int, char* []) { - return vtkm::cont::testing::Testing::Run( - TestingTriangulate()); + return vtkm::cont::testing::Testing::Run(TestingTriangulate()); } diff --git a/vtkm/worklet/testing/UnitTestVertexClustering.cxx b/vtkm/worklet/testing/UnitTestVertexClustering.cxx index 032dc5d58..6bf2a31e3 100644 --- a/vtkm/worklet/testing/UnitTestVertexClustering.cxx +++ b/vtkm/worklet/testing/UnitTestVertexClustering.cxx @@ -28,7 +28,6 @@ #include #include - void TestVertexClustering() { const vtkm::Id3 divisions(3, 3, 3); @@ -40,17 +39,19 @@ void TestVertexClustering() // run vtkm::worklet::VertexClustering clustering; - vtkm::cont::DataSet outDataSet = clustering.Run(dataSet.GetCellSet(), - dataSet.GetCoordinateSystem(), - bounds, - divisions, - VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); + vtkm::cont::DataSet outDataSet = + clustering.Run(dataSet.GetCellSet(), dataSet.GetCoordinateSystem(), bounds, divisions, + VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); // test const vtkm::Id output_pointIds = 9; - vtkm::Id output_pointId[output_pointIds] = {0,1,3, 1,5,4, 1,2,5}; + vtkm::Id output_pointId[output_pointIds] = { 0, 1, 3, 1, 5, 4, 1, 2, 5 }; const vtkm::Id output_points = 6; - vtkm::Float64 output_point[output_points][3] = {{0.0174716003,0.0501927994,0.0930275023}, {0.0320714004,0.14704667,0.0952706337}, {0.0268670674,0.246195346,0.119720004}, {0.00215422804,0.0340906903,0.180881709}, {0.0108188,0.152774006,0.167914003}, {0.0202241503,0.225427493,0.140208006}}; + vtkm::Float64 output_point[output_points][3] = { + { 0.0174716003, 0.0501927994, 0.0930275023 }, { 0.0320714004, 0.14704667, 0.0952706337 }, + { 0.0268670674, 0.246195346, 0.119720004 }, { 0.00215422804, 0.0340906903, 0.180881709 }, + { 0.0108188, 0.152774006, 0.167914003 }, { 0.0202241503, 0.225427493, 0.140208006 } + }; VTKM_TEST_ASSERT(outDataSet.GetNumberOfCoordinateSystems() == 1, "Number of output coordinate systems mismatch"); @@ -58,36 +59,40 @@ void TestVertexClustering() vtkm::cont::ArrayHandle pointArray; outDataSet.GetCoordinateSystem(0).GetData().CopyTo(pointArray); VTKM_TEST_ASSERT(pointArray.GetNumberOfValues() == output_points, - "Number of output points mismatch" ); + "Number of output points mismatch"); for (vtkm::Id i = 0; i < pointArray.GetNumberOfValues(); ++i) - { - const PointType &p1 = pointArray.GetPortalConstControl().Get(i); - PointType p2 = vtkm::make_Vec(output_point[i][0], - output_point[i][1], - output_point[i][2]); - std::cout << "point: " << p1 << " " << p2 << std::endl; - VTKM_TEST_ASSERT(test_equal(p1, p2), "Point Array mismatch"); - } + { + const PointType& p1 = pointArray.GetPortalConstControl().Get(i); + PointType p2 = vtkm::make_Vec(output_point[i][0], output_point[i][1], output_point[i][2]); + std::cout << "point: " << p1 << " " << p2 << std::endl; + VTKM_TEST_ASSERT(test_equal(p1, p2), "Point Array mismatch"); + } typedef vtkm::cont::CellSetSingleType<> CellSetType; VTKM_TEST_ASSERT(outDataSet.GetNumberOfCellSets() == 1, "Number of output cellsets mismatch"); CellSetType cellSet; outDataSet.GetCellSet(0).CopyTo(cellSet); VTKM_TEST_ASSERT( - cellSet.GetConnectivityArray(vtkm::TopologyElementTagPoint(),vtkm::TopologyElementTagCell()).GetNumberOfValues() == output_pointIds, - "Number of connectivity array elements mismatch"); - for (vtkm::Id i=0; i - VTKM_EXEC - void operator()(T& val, const vtkm::Id& workIdx) const + template + VTKM_EXEC void operator()(T& val, const vtkm::Id& workIdx) const { vtkm::Id x, y; - Sig1Dto2D( workIdx, x, y ); - val = GetGaussian( static_cast(x), static_cast(y) ); + Sig1Dto2D(workIdx, x, y); + val = GetGaussian(static_cast(x), static_cast(y)); } -private: // see wikipedia page - const vtkm::Id dimX, dimY; // 2D extent - const vtkm::Float64 amp; // amplitude - const vtkm::Float64 x0, y0; // center - const vtkm::Float64 sigmaX, sigmaY; // spread - vtkm::Float64 sigmaX2, sigmaY2; // 2 * sigma * sigma +private: // see wikipedia page + const vtkm::Id dimX, dimY; // 2D extent + const vtkm::Float64 amp; // amplitude + const vtkm::Float64 x0, y0; // center + const vtkm::Float64 sigmaX, sigmaY; // spread + vtkm::Float64 sigmaX2, sigmaY2; // 2 * sigma * sigma }; -template< typename T> +template class GaussianWorklet3D : public vtkm::worklet::WorkletMapField { public: @@ -91,17 +93,22 @@ public: typedef void ExecutionSignature(_1, WorkIndex); VTKM_EXEC - GaussianWorklet3D( vtkm::Id dx, vtkm::Id dy, vtkm::Id dz ) - : dimX( dx ), dimY( dy ), dimZ( dz ) + GaussianWorklet3D(vtkm::Id dx, vtkm::Id dy, vtkm::Id dz) + : dimX(dx) + , dimY(dy) + , dimZ(dz) { amp = (T)20.0; - sigmaX = (T)dimX / (T)4.0; sigmaX2 = sigmaX * sigmaX * (T)2.0; - sigmaY = (T)dimY / (T)4.0; sigmaY2 = sigmaY * sigmaY * (T)2.0; - sigmaZ = (T)dimZ / (T)4.0; sigmaZ2 = sigmaZ * sigmaZ * (T)2.0; + sigmaX = (T)dimX / (T)4.0; + sigmaX2 = sigmaX * sigmaX * (T)2.0; + sigmaY = (T)dimY / (T)4.0; + sigmaY2 = sigmaY * sigmaY * (T)2.0; + sigmaZ = (T)dimZ / (T)4.0; + sigmaZ2 = sigmaZ * sigmaZ * (T)2.0; } VTKM_EXEC - void Sig1Dto3D( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z ) const + void Sig1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const { z = idx / (dimX * dimY); y = (idx - z * dimX * dimY) / dimX; @@ -109,104 +116,101 @@ public: } VTKM_EXEC - T GetGaussian( T x, T y, T z ) const + T GetGaussian(T x, T y, T z) const { - x -= (T)dimX / (T)2.0; // translate to center at (0, 0, 0) + x -= (T)dimX / (T)2.0; // translate to center at (0, 0, 0) y -= (T)dimY / (T)2.0; z -= (T)dimZ / (T)2.0; - T power = x*x/sigmaX2 + y*y/sigmaY2 + z*z/sigmaZ2; + T power = x * x / sigmaX2 + y * y / sigmaY2 + z * z / sigmaZ2; - return vtkm::Exp( power * (T)-1.0 ) * amp; + return vtkm::Exp(power * (T)-1.0) * amp; } VTKM_EXEC void operator()(T& val, const vtkm::Id& workIdx) const { vtkm::Id x, y, z; - Sig1Dto3D( workIdx, x, y, z ); - val = GetGaussian( (T)x, (T)y, (T)z ); + Sig1Dto3D(workIdx, x, y, z); + val = GetGaussian((T)x, (T)y, (T)z); } private: - const vtkm::Id dimX, dimY, dimZ; // extent - T amp; // amplitude - T sigmaX, sigmaY, sigmaZ; // spread - T sigmaX2, sigmaY2, sigmaZ2; // sigma * sigma * 2 + const vtkm::Id dimX, dimY, dimZ; // extent + T amp; // amplitude + T sigmaX, sigmaY, sigmaZ; // spread + T sigmaX2, sigmaY2, sigmaZ2; // sigma * sigma * 2 }; - } } } -template< typename ArrayType > -void FillArray2D( ArrayType& array, vtkm::Id dimX, vtkm::Id dimY ) +template +void FillArray2D(ArrayType& array, vtkm::Id dimX, vtkm::Id dimY) { typedef vtkm::worklet::wavelets::GaussianWorklet2D WorkletType; - WorkletType worklet( dimX, dimY, 100.0, - static_cast(dimX)/2.0, // center - static_cast(dimY)/2.0, // center - static_cast(dimX)/4.0, // spread - static_cast(dimY)/4.0);// spread - vtkm::worklet::DispatcherMapField< WorkletType > dispatcher( worklet ); - dispatcher.Invoke( array ); + WorkletType worklet(dimX, dimY, 100.0, + static_cast(dimX) / 2.0, // center + static_cast(dimY) / 2.0, // center + static_cast(dimX) / 4.0, // spread + static_cast(dimY) / 4.0); // spread + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(array); } -template< typename ArrayType > -void FillArray3D( ArrayType& array, vtkm::Id dimX, vtkm::Id dimY, vtkm::Id dimZ ) +template +void FillArray3D(ArrayType& array, vtkm::Id dimX, vtkm::Id dimY, vtkm::Id dimZ) { - typedef vtkm::worklet::wavelets::GaussianWorklet3D< typename ArrayType::ValueType> WorkletType; - WorkletType worklet( dimX, dimY, dimZ ); - vtkm::worklet::DispatcherMapField< WorkletType > dispatcher( worklet ); - dispatcher.Invoke( array ); + typedef vtkm::worklet::wavelets::GaussianWorklet3D WorkletType; + WorkletType worklet(dimX, dimY, dimZ); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(array); } - -void TestDecomposeReconstruct3D( vtkm::Float64 cratio ) +void TestDecomposeReconstruct3D(vtkm::Float64 cratio) { - vtkm::Id sigX = 99; - vtkm::Id sigY = 99; - vtkm::Id sigZ = 99; + vtkm::Id sigX = 99; + vtkm::Id sigY = 99; + vtkm::Id sigZ = 99; vtkm::Id sigLen = sigX * sigY * sigZ; std::cout << "Testing 3D wavelet compressor on a (99x99x99) cube..." << std::endl; // make input data array handle vtkm::cont::ArrayHandle inputArray; - inputArray.PrepareForOutput( sigLen, VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); - FillArray3D( inputArray, sigX, sigY, sigZ ); + inputArray.PrepareForOutput(sigLen, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); + FillArray3D(inputArray, sigX, sigY, sigZ); vtkm::cont::ArrayHandle outputArray; // Use a WaveletCompressor vtkm::worklet::wavelets::WaveletName wname = vtkm::worklet::wavelets::BIOR4_4; - if( wname == vtkm::worklet::wavelets::BIOR1_1 ) + if (wname == vtkm::worklet::wavelets::BIOR1_1) std::cout << "Using wavelet kernel = Bior1.1 (HAAR)" << std::endl; - else if( wname == vtkm::worklet::wavelets::BIOR2_2 ) + else if (wname == vtkm::worklet::wavelets::BIOR2_2) std::cout << "Using wavelet kernel = Bior2.2 (CDF 5/3)" << std::endl; - else if( wname == vtkm::worklet::wavelets::BIOR3_3 ) + else if (wname == vtkm::worklet::wavelets::BIOR3_3) std::cout << "Using wavelet kernel = Bior3.3 (CDF 8/4)" << std::endl; - else if( wname == vtkm::worklet::wavelets::BIOR4_4 ) + else if (wname == vtkm::worklet::wavelets::BIOR4_4) std::cout << "Using wavelet kernel = Bior4.4 (CDF 9/7)" << std::endl; - vtkm::worklet::WaveletCompressor compressor( wname ); + vtkm::worklet::WaveletCompressor compressor(wname); - vtkm::Id XMaxLevel = compressor.GetWaveletMaxLevel( sigX ); - vtkm::Id YMaxLevel = compressor.GetWaveletMaxLevel( sigY ); - vtkm::Id ZMaxLevel = compressor.GetWaveletMaxLevel( sigZ ); - vtkm::Id nLevels = vtkm::Min( vtkm::Min(XMaxLevel, YMaxLevel), ZMaxLevel ); + vtkm::Id XMaxLevel = compressor.GetWaveletMaxLevel(sigX); + vtkm::Id YMaxLevel = compressor.GetWaveletMaxLevel(sigY); + vtkm::Id ZMaxLevel = compressor.GetWaveletMaxLevel(sigZ); + vtkm::Id nLevels = vtkm::Min(vtkm::Min(XMaxLevel, YMaxLevel), ZMaxLevel); std::cout << "Decomposition levels = " << nLevels << std::endl; vtkm::Float64 computationTime = 0.0; vtkm::Float64 elapsedTime1, elapsedTime2, elapsedTime3; // Decompose vtkm::cont::Timer<> timer; - computationTime = - compressor.WaveDecompose3D( inputArray, nLevels, sigX, sigY, sigZ, outputArray, - false, VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); + computationTime = compressor.WaveDecompose3D(inputArray, nLevels, sigX, sigY, sigZ, outputArray, + false, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); elapsedTime1 = timer.GetElapsedTime(); std::cout << "Decompose time = " << elapsedTime1 << std::endl; std::cout << " ->computation time = " << computationTime << std::endl; // Squash small coefficients timer.Reset(); - compressor.SquashCoefficients( outputArray, cratio, VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); + compressor.SquashCoefficients(outputArray, cratio, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); elapsedTime2 = timer.GetElapsedTime(); std::cout << "Squash time = " << elapsedTime2 << std::endl; @@ -214,32 +218,31 @@ void TestDecomposeReconstruct3D( vtkm::Float64 cratio ) vtkm::cont::ArrayHandle reconstructArray; timer.Reset(); computationTime = - compressor.WaveReconstruct3D( outputArray, nLevels, sigX, sigY, sigZ, reconstructArray, - false, VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); + compressor.WaveReconstruct3D(outputArray, nLevels, sigX, sigY, sigZ, reconstructArray, false, + VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); elapsedTime3 = timer.GetElapsedTime(); std::cout << "Reconstruction time = " << elapsedTime3 << std::endl; std::cout << " ->computation time = " << computationTime << std::endl; - std::cout << "Total time = " - << (elapsedTime1 + elapsedTime2 + elapsedTime3) << std::endl; + std::cout << "Total time = " << (elapsedTime1 + elapsedTime2 + elapsedTime3) + << std::endl; outputArray.ReleaseResources(); - compressor.EvaluateReconstruction( inputArray, reconstructArray, VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); + compressor.EvaluateReconstruction(inputArray, reconstructArray, + VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); timer.Reset(); - for( vtkm::Id i = 0; i < reconstructArray.GetNumberOfValues(); i++ ) + for (vtkm::Id i = 0; i < reconstructArray.GetNumberOfValues(); i++) { - VTKM_TEST_ASSERT( test_equal( reconstructArray.GetPortalConstControl().Get(i), - inputArray.GetPortalConstControl().Get(i) ), - "WaveletCompressor 3D failed..." ); + VTKM_TEST_ASSERT(test_equal(reconstructArray.GetPortalConstControl().Get(i), + inputArray.GetPortalConstControl().Get(i)), + "WaveletCompressor 3D failed..."); } elapsedTime1 = timer.GetElapsedTime(); std::cout << "Verification time = " << elapsedTime1 << std::endl; } - - -void TestDecomposeReconstruct2D( vtkm::Float64 cratio ) +void TestDecomposeReconstruct2D(vtkm::Float64 cratio) { std::cout << "Testing 2D wavelet compressor on a (1000x1000) square... " << std::endl; vtkm::Id sigX = 1000; @@ -248,19 +251,19 @@ void TestDecomposeReconstruct2D( vtkm::Float64 cratio ) // make input data array handle vtkm::cont::ArrayHandle inputArray; - inputArray.PrepareForOutput( sigLen, VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); - FillArray2D( inputArray, sigX, sigY ); + inputArray.PrepareForOutput(sigLen, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); + FillArray2D(inputArray, sigX, sigY); vtkm::cont::ArrayHandle outputArray; // Use a WaveletCompressor vtkm::worklet::wavelets::WaveletName wname = vtkm::worklet::wavelets::CDF9_7; std::cout << "Wavelet kernel = CDF 9/7" << std::endl; - vtkm::worklet::WaveletCompressor compressor( wname ); + vtkm::worklet::WaveletCompressor compressor(wname); - vtkm::Id XMaxLevel = compressor.GetWaveletMaxLevel( sigX ); - vtkm::Id YMaxLevel = compressor.GetWaveletMaxLevel( sigY ); - vtkm::Id nLevels = vtkm::Min( XMaxLevel, YMaxLevel ); + vtkm::Id XMaxLevel = compressor.GetWaveletMaxLevel(sigX); + vtkm::Id YMaxLevel = compressor.GetWaveletMaxLevel(sigY); + vtkm::Id nLevels = vtkm::Min(XMaxLevel, YMaxLevel); std::cout << "Decomposition levels = " << nLevels << std::endl; std::vector L; vtkm::Float64 computationTime = 0.0; @@ -268,70 +271,67 @@ void TestDecomposeReconstruct2D( vtkm::Float64 cratio ) // Decompose vtkm::cont::Timer<> timer; - computationTime = - compressor.WaveDecompose2D( inputArray, nLevels, sigX, sigY, outputArray, L, - VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); + computationTime = compressor.WaveDecompose2D(inputArray, nLevels, sigX, sigY, outputArray, L, + VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); elapsedTime1 = timer.GetElapsedTime(); std::cout << "Decompose time = " << elapsedTime1 << std::endl; std::cout << " ->computation time = " << computationTime << std::endl; // Squash small coefficients timer.Reset(); - compressor.SquashCoefficients( outputArray, cratio, VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); + compressor.SquashCoefficients(outputArray, cratio, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); elapsedTime2 = timer.GetElapsedTime(); std::cout << "Squash time = " << elapsedTime2 << std::endl; // Reconstruct vtkm::cont::ArrayHandle reconstructArray; timer.Reset(); - computationTime = - compressor.WaveReconstruct2D( outputArray, nLevels, sigX, sigY, reconstructArray, L, - VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); + computationTime = compressor.WaveReconstruct2D(outputArray, nLevels, sigX, sigY, reconstructArray, + L, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); elapsedTime3 = timer.GetElapsedTime(); std::cout << "Reconstruction time = " << elapsedTime3 << std::endl; std::cout << " ->computation time = " << computationTime << std::endl; - std::cout << "Total time = " - << (elapsedTime1 + elapsedTime2 + elapsedTime3) << std::endl; + std::cout << "Total time = " << (elapsedTime1 + elapsedTime2 + elapsedTime3) + << std::endl; outputArray.ReleaseResources(); - compressor.EvaluateReconstruction( inputArray, reconstructArray, VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); + compressor.EvaluateReconstruction(inputArray, reconstructArray, + VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); timer.Reset(); - for( vtkm::Id i = 0; i < reconstructArray.GetNumberOfValues(); i++ ) + for (vtkm::Id i = 0; i < reconstructArray.GetNumberOfValues(); i++) { - VTKM_TEST_ASSERT( test_equal( reconstructArray.GetPortalConstControl().Get(i), - inputArray.GetPortalConstControl().Get(i) ), - "WaveletCompressor 2D failed..." ); + VTKM_TEST_ASSERT(test_equal(reconstructArray.GetPortalConstControl().Get(i), + inputArray.GetPortalConstControl().Get(i)), + "WaveletCompressor 2D failed..."); } elapsedTime1 = timer.GetElapsedTime(); std::cout << "Verification time = " << elapsedTime1 << std::endl; } - -void TestDecomposeReconstruct1D( vtkm::Float64 cratio ) +void TestDecomposeReconstruct1D(vtkm::Float64 cratio) { std::cout << "Testing 1D wavelet compressor on a 1 million sized array... " << std::endl; vtkm::Id sigLen = 1000000; // make input data array handle std::vector tmpVector; - for( vtkm::Id i = 0; i < sigLen; i++ ) + for (vtkm::Id i = 0; i < sigLen; i++) { - tmpVector.push_back( 100.0 * vtkm::Sin(static_cast(i)/100.0 )); + tmpVector.push_back(100.0 * vtkm::Sin(static_cast(i) / 100.0)); } - vtkm::cont::ArrayHandle inputArray = - vtkm::cont::make_ArrayHandle(tmpVector); + vtkm::cont::ArrayHandle inputArray = vtkm::cont::make_ArrayHandle(tmpVector); vtkm::cont::ArrayHandle outputArray; // Use a WaveletCompressor vtkm::worklet::wavelets::WaveletName wname = vtkm::worklet::wavelets::CDF9_7; std::cout << "Wavelet kernel = CDF 9/7" << std::endl; - vtkm::worklet::WaveletCompressor compressor( wname ); + vtkm::worklet::WaveletCompressor compressor(wname); // User maximum decompose levels - vtkm::Id maxLevel = compressor.GetWaveletMaxLevel( sigLen ); + vtkm::Id maxLevel = compressor.GetWaveletMaxLevel(sigLen); vtkm::Id nLevels = maxLevel; std::cout << "Decomposition levels = " << nLevels << std::endl; @@ -339,32 +339,34 @@ void TestDecomposeReconstruct1D( vtkm::Float64 cratio ) // Decompose vtkm::cont::Timer<> timer; - compressor.WaveDecompose( inputArray, nLevels, outputArray, L, VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); + compressor.WaveDecompose(inputArray, nLevels, outputArray, L, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); vtkm::Float64 elapsedTime = timer.GetElapsedTime(); std::cout << "Decompose time = " << elapsedTime << std::endl; // Squash small coefficients timer.Reset(); - compressor.SquashCoefficients( outputArray, cratio, VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); + compressor.SquashCoefficients(outputArray, cratio, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); elapsedTime = timer.GetElapsedTime(); std::cout << "Squash time = " << elapsedTime << std::endl; // Reconstruct vtkm::cont::ArrayHandle reconstructArray; timer.Reset(); - compressor.WaveReconstruct( outputArray, nLevels, L, reconstructArray, VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); + compressor.WaveReconstruct(outputArray, nLevels, L, reconstructArray, + VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); elapsedTime = timer.GetElapsedTime(); std::cout << "Reconstruction time = " << elapsedTime << std::endl; - compressor.EvaluateReconstruction( inputArray, reconstructArray, VTKM_DEFAULT_DEVICE_ADAPTER_TAG() ); + compressor.EvaluateReconstruction(inputArray, reconstructArray, + VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); timer.Reset(); - for( vtkm::Id i = 0; i < reconstructArray.GetNumberOfValues(); i++ ) + for (vtkm::Id i = 0; i < reconstructArray.GetNumberOfValues(); i++) { - VTKM_TEST_ASSERT( test_equal( reconstructArray.GetPortalConstControl().Get(i), - inputArray.GetPortalConstControl().Get(i)), - "WaveletCompressor 1D failed..." ); + VTKM_TEST_ASSERT(test_equal(reconstructArray.GetPortalConstControl().Get(i), + inputArray.GetPortalConstControl().Get(i)), + "WaveletCompressor 1D failed..."); } elapsedTime = timer.GetElapsedTime(); std::cout << "Verification time = " << elapsedTime << std::endl; @@ -372,18 +374,20 @@ void TestDecomposeReconstruct1D( vtkm::Float64 cratio ) void TestWaveletCompressor() { - vtkm::Float64 cratio = 2.0; // X:1 compression, where X >= 1 + vtkm::Float64 cratio = 2.0; // X:1 compression, where X >= 1 std::cout << "Compression ratio = " << cratio << ":1 "; - std::cout << "(Reconstruction using higher compression ratios may result in failure in verification)" << std::endl; + std::cout + << "(Reconstruction using higher compression ratios may result in failure in verification)" + << std::endl; - TestDecomposeReconstruct1D( cratio ); + TestDecomposeReconstruct1D(cratio); std::cout << std::endl; - TestDecomposeReconstruct2D( cratio ); + TestDecomposeReconstruct2D(cratio); std::cout << std::endl; - TestDecomposeReconstruct3D( cratio ); + TestDecomposeReconstruct3D(cratio); } -int UnitTestWaveletCompressor(int, char *[]) +int UnitTestWaveletCompressor(int, char* []) { return vtkm::cont::testing::Testing::Run(TestWaveletCompressor); } diff --git a/vtkm/worklet/testing/UnitTestWorkletMapField.cxx b/vtkm/worklet/testing/UnitTestWorkletMapField.cxx index 3ce06e952..47bcced4c 100644 --- a/vtkm/worklet/testing/UnitTestWorkletMapField.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletMapField.cxx @@ -31,9 +31,8 @@ public: typedef void ControlSignature(FieldIn<>, FieldOut<>, FieldInOut<>); typedef void ExecutionSignature(_1, _2, _3, WorkIndex); - template - VTKM_EXEC - void operator()(const T &in, T &out, T &inout, vtkm::Id workIndex) const + template + VTKM_EXEC void operator()(const T& in, T& out, T& inout, vtkm::Id workIndex) const { if (!test_equal(in, TestValue(workIndex, T()) + T(100))) { @@ -47,9 +46,8 @@ public: inout = inout - T(100); } - template - VTKM_EXEC - void operator()(const T1 &, const T2 &, const T3 &, vtkm::Id) const + template + VTKM_EXEC void operator()(const T1&, const T2&, const T3&, vtkm::Id) const { this->RaiseError("Cannot call this worklet with different types."); } @@ -58,14 +56,11 @@ public: class TestMapFieldWorkletLimitedTypes : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn, - FieldOut, - FieldInOut); + typedef void ControlSignature(FieldIn, FieldOut, FieldInOut); typedef _2 ExecutionSignature(_1, _3, WorkIndex); - template - VTKM_EXEC - T1 operator()(const T1 &in, T3 &inout, vtkm::Id workIndex) const + template + VTKM_EXEC T1 operator()(const T1& in, T3& inout, vtkm::Id workIndex) const { if (!test_equal(in, TestValue(workIndex, T1()) + T1(100))) { @@ -82,16 +77,15 @@ public: } }; - -namespace mapfield { +namespace mapfield +{ static const vtkm::Id ARRAY_SIZE = 10; -template +template struct DoStaticTestWorklet { - template - VTKM_CONT - void operator()(T) const + template + VTKM_CONT void operator()(T) const { std::cout << "Set up data." << std::endl; T inputArray[ARRAY_SIZE]; @@ -101,13 +95,12 @@ struct DoStaticTestWorklet inputArray[index] = TestValue(index, T()) + T(100); } - vtkm::cont::ArrayHandle inputHandle = - vtkm::cont::make_ArrayHandle(inputArray, ARRAY_SIZE); + vtkm::cont::ArrayHandle inputHandle = vtkm::cont::make_ArrayHandle(inputArray, ARRAY_SIZE); vtkm::cont::ArrayHandle outputHandle; vtkm::cont::ArrayHandle inoutHandle; - vtkm::cont::DeviceAdapterAlgorithm:: - Copy(inputHandle, inoutHandle); + vtkm::cont::DeviceAdapterAlgorithm::Copy(inputHandle, + inoutHandle); std::cout << "Create and run dispatcher." << std::endl; vtkm::worklet::DispatcherMapField dispatcher; @@ -117,31 +110,27 @@ struct DoStaticTestWorklet CheckPortal(outputHandle.GetPortalConstControl()); CheckPortal(inoutHandle.GetPortalConstControl()); - std::cout << "Try to invoke with an input array of the wrong size." - << std::endl; - inputHandle.Shrink(ARRAY_SIZE/2); + std::cout << "Try to invoke with an input array of the wrong size." << std::endl; + inputHandle.Shrink(ARRAY_SIZE / 2); bool exceptionThrown = false; try { dispatcher.Invoke(inputHandle, outputHandle, inoutHandle); } - catch (vtkm::cont::ErrorBadValue &error) + catch (vtkm::cont::ErrorBadValue& error) { - std::cout << " Caught expected error: " << error.GetMessage() - << std::endl; + std::cout << " Caught expected error: " << error.GetMessage() << std::endl; exceptionThrown = true; } - VTKM_TEST_ASSERT(exceptionThrown, - "Dispatcher did not throw expected exception."); + VTKM_TEST_ASSERT(exceptionThrown, "Dispatcher did not throw expected exception."); } }; -template +template struct DoDynamicTestWorklet { - template - VTKM_CONT - void operator()(T) const + template + VTKM_CONT void operator()(T) const { std::cout << "Set up data." << std::endl; T inputArray[ARRAY_SIZE]; @@ -151,13 +140,12 @@ struct DoDynamicTestWorklet inputArray[index] = TestValue(index, T()) + T(100); } - vtkm::cont::ArrayHandle inputHandle = - vtkm::cont::make_ArrayHandle(inputArray, ARRAY_SIZE); + vtkm::cont::ArrayHandle inputHandle = vtkm::cont::make_ArrayHandle(inputArray, ARRAY_SIZE); vtkm::cont::ArrayHandle outputHandle; vtkm::cont::ArrayHandle inoutHandle; - vtkm::cont::DeviceAdapterAlgorithm:: - Copy(inputHandle, inoutHandle); + vtkm::cont::DeviceAdapterAlgorithm::Copy(inputHandle, + inoutHandle); std::cout << "Create and run dispatcher with dynamic arrays." << std::endl; vtkm::worklet::DispatcherMapField dispatcher; @@ -173,44 +161,42 @@ struct DoDynamicTestWorklet } }; -template +template struct DoTestWorklet { - template - VTKM_CONT - void operator()(T t) const + template + VTKM_CONT void operator()(T t) const { - DoStaticTestWorklet sw; sw(t); - DoDynamicTestWorklet dw; dw(t); + DoStaticTestWorklet sw; + sw(t); + DoDynamicTestWorklet dw; + dw(t); } }; void TestWorkletMapField() { - typedef vtkm::cont::DeviceAdapterTraits< - VTKM_DEFAULT_DEVICE_ADAPTER_TAG> DeviceAdapterTraits; - std::cout << "Testing Map Field on device adapter: " - << DeviceAdapterTraits::GetName() << std::endl; + typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; + std::cout << "Testing Map Field on device adapter: " << DeviceAdapterTraits::GetName() + << std::endl; std::cout << "--- Worklet accepting all types." << std::endl; - vtkm::testing::Testing::TryTypes( - mapfield::DoTestWorklet< TestMapFieldWorklet >(), - vtkm::TypeListTagCommon()); + vtkm::testing::Testing::TryTypes(mapfield::DoTestWorklet(), + vtkm::TypeListTagCommon()); std::cout << "--- Worklet accepting some types." << std::endl; - vtkm::testing::Testing::TryTypes( - mapfield::DoTestWorklet< TestMapFieldWorkletLimitedTypes >(), - vtkm::TypeListTagFieldScalar()); + vtkm::testing::Testing::TryTypes(mapfield::DoTestWorklet(), + vtkm::TypeListTagFieldScalar()); std::cout << "--- Sending bad type to worklet." << std::endl; try { //can only test with dynamic arrays, as static arrays will fail to compile - DoDynamicTestWorklet< TestMapFieldWorkletLimitedTypes > badWorkletTest; - badWorkletTest( vtkm::Vec() ); + DoDynamicTestWorklet badWorkletTest; + badWorkletTest(vtkm::Vec()); VTKM_TEST_FAIL("Did not throw expected error."); } - catch (vtkm::cont::ErrorBadType &error) + catch (vtkm::cont::ErrorBadType& error) { std::cout << "Got expected error: " << error.GetMessage() << std::endl; } @@ -218,7 +204,7 @@ void TestWorkletMapField() } // mapfield namespace -int UnitTestWorkletMapField(int, char *[]) +int UnitTestWorkletMapField(int, char* []) { return vtkm::cont::testing::Testing::Run(mapfield::TestWorkletMapField); } diff --git a/vtkm/worklet/testing/UnitTestWorkletMapFieldExecArg.cxx b/vtkm/worklet/testing/UnitTestWorkletMapFieldExecArg.cxx index 227f33696..97336141d 100644 --- a/vtkm/worklet/testing/UnitTestWorkletMapFieldExecArg.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletMapFieldExecArg.cxx @@ -31,15 +31,13 @@ class TestExecObjectWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( FieldIn<>, ExecObject, ExecObject, FieldOut<>); + typedef void ControlSignature(FieldIn<>, ExecObject, ExecObject, FieldOut<>); typedef void ExecutionSignature(_1, _2, _3, _4); - template - VTKM_EXEC - void operator()(const vtkm::Id &index, - const vtkm::exec::ExecutionWholeArrayConst &execIn, - vtkm::exec::ExecutionWholeArray &execOut, - T& out) const + template + VTKM_EXEC void operator()(const vtkm::Id& index, + const vtkm::exec::ExecutionWholeArrayConst& execIn, + vtkm::exec::ExecutionWholeArray& execOut, T& out) const { if (!test_equal(execIn.Get(index), TestValue(index, T()) + T(100))) { @@ -49,24 +47,23 @@ public: execOut.Set(index, out); } - template - VTKM_EXEC - void operator()(const vtkm::Id &, const T1 &, const T2 &, const T3&) const + template + VTKM_EXEC void operator()(const vtkm::Id&, const T1&, const T2&, const T3&) const { this->RaiseError("Cannot call this worklet with different types."); } }; -namespace map_exec_field { +namespace map_exec_field +{ static const vtkm::Id ARRAY_SIZE = 10; -template +template struct DoTestWorklet { - template - VTKM_CONT - void operator()(T) const + template + VTKM_CONT void operator()(T) const { std::cout << "Set up data." << std::endl; T inputArray[ARRAY_SIZE]; @@ -77,15 +74,13 @@ struct DoTestWorklet } vtkm::cont::ArrayHandleIndex counting(ARRAY_SIZE); - vtkm::cont::ArrayHandle inputHandle = - vtkm::cont::make_ArrayHandle(inputArray, ARRAY_SIZE); + vtkm::cont::ArrayHandle inputHandle = vtkm::cont::make_ArrayHandle(inputArray, ARRAY_SIZE); vtkm::cont::ArrayHandle outputHandle; vtkm::cont::ArrayHandle outputFieldArray; std::cout << "Create and run dispatcher." << std::endl; vtkm::worklet::DispatcherMapField dispatcher; - dispatcher.Invoke(counting, - vtkm::exec::ExecutionWholeArrayConst(inputHandle), + dispatcher.Invoke(counting, vtkm::exec::ExecutionWholeArrayConst(inputHandle), vtkm::exec::ExecutionWholeArray(outputHandle, ARRAY_SIZE), outputFieldArray); @@ -99,8 +94,7 @@ struct DoTestWorklet outputHandle = vtkm::cont::ArrayHandle(); vtkm::cont::DynamicArrayHandle outputFieldDynamic(outputFieldArray); - dispatcher.Invoke(counting, - vtkm::exec::ExecutionWholeArrayConst(inputHandle), + dispatcher.Invoke(counting, vtkm::exec::ExecutionWholeArrayConst(inputHandle), vtkm::exec::ExecutionWholeArray(outputHandle, ARRAY_SIZE), outputFieldDynamic); @@ -112,21 +106,18 @@ struct DoTestWorklet void TestWorkletMapFieldExecArg() { - typedef vtkm::cont::DeviceAdapterTraits< - VTKM_DEFAULT_DEVICE_ADAPTER_TAG> DeviceAdapterTraits; + typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; std::cout << "Testing Worklet with ExecutionWholeArray on device adapter: " << DeviceAdapterTraits::GetName() << std::endl; std::cout << "--- Worklet accepting all types." << std::endl; - vtkm::testing::Testing::TryTypes( - map_exec_field::DoTestWorklet< TestExecObjectWorklet >(), - vtkm::TypeListTagCommon()); - + vtkm::testing::Testing::TryTypes(map_exec_field::DoTestWorklet(), + vtkm::TypeListTagCommon()); } } // anonymous namespace -int UnitTestWorkletMapFieldExecArg(int, char *[]) +int UnitTestWorkletMapFieldExecArg(int, char* []) { return vtkm::cont::testing::Testing::Run(map_exec_field::TestWorkletMapFieldExecArg); } diff --git a/vtkm/worklet/testing/UnitTestWorkletMapFieldWholeArray.cxx b/vtkm/worklet/testing/UnitTestWorkletMapFieldWholeArray.cxx index bdb37d0a8..a71623d06 100644 --- a/vtkm/worklet/testing/UnitTestWorkletMapFieldWholeArray.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletMapFieldWholeArray.cxx @@ -29,19 +29,13 @@ class TestWholeArrayWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(WholeArrayIn<>, - WholeArrayInOut<>, - WholeArrayOut<>); + typedef void ControlSignature(WholeArrayIn<>, WholeArrayInOut<>, WholeArrayOut<>); typedef void ExecutionSignature(WorkIndex, _1, _2, _3); - template - VTKM_EXEC - void operator()(const vtkm::Id &index, - const InPortalType &inPortal, - const InOutPortalType &inOutPortal, - const OutPortalType &outPortal) const + template + VTKM_EXEC void operator()(const vtkm::Id& index, const InPortalType& inPortal, + const InOutPortalType& inOutPortal, + const OutPortalType& outPortal) const { typedef typename InPortalType::ValueType inT; if (!test_equal(inPortal.Get(index), TestValue(index, inT()))) @@ -50,8 +44,7 @@ public: } typedef typename InOutPortalType::ValueType inOutT; - if (!test_equal(inOutPortal.Get(index), - TestValue(index, inOutT()) + inOutT(100))) + if (!test_equal(inOutPortal.Get(index), TestValue(index, inOutT()) + inOutT(100))) { this->RaiseError("Got wrong input/output value."); } @@ -69,17 +62,16 @@ public: typedef void ExecutionSignature(WorkIndex, _2); typedef _1 InputDomain; - template - VTKM_EXEC - void operator()(const vtkm::Id &index, - const AtomicArrayType &atomicArray) const + template + VTKM_EXEC void operator()(const vtkm::Id& index, const AtomicArrayType& atomicArray) const { typedef typename AtomicArrayType::ValueType ValueType; atomicArray.Add(0, static_cast(index)); } }; -namespace map_whole_array { +namespace map_whole_array +{ static const vtkm::Id ARRAY_SIZE = 10; @@ -89,18 +81,17 @@ struct DoTestWholeArrayWorklet // This just demonstrates that the WholeArray tags support dynamic arrays. VTKM_CONT - void CallWorklet(const vtkm::cont::DynamicArrayHandle &inArray, - const vtkm::cont::DynamicArrayHandle &inOutArray, - const vtkm::cont::DynamicArrayHandle &outArray) const + void CallWorklet(const vtkm::cont::DynamicArrayHandle& inArray, + const vtkm::cont::DynamicArrayHandle& inOutArray, + const vtkm::cont::DynamicArrayHandle& outArray) const { std::cout << "Create and run dispatcher." << std::endl; vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(inArray, inOutArray, outArray); } - template - VTKM_CONT - void operator()(T) const + template + VTKM_CONT void operator()(T) const { std::cout << "Set up data." << std::endl; T inArray[ARRAY_SIZE]; @@ -112,10 +103,8 @@ struct DoTestWholeArrayWorklet inOutArray[index] = TestValue(index, T()) + T(100); } - vtkm::cont::ArrayHandle inHandle = - vtkm::cont::make_ArrayHandle(inArray, ARRAY_SIZE); - vtkm::cont::ArrayHandle inOutHandle = - vtkm::cont::make_ArrayHandle(inOutArray, ARRAY_SIZE); + vtkm::cont::ArrayHandle inHandle = vtkm::cont::make_ArrayHandle(inArray, ARRAY_SIZE); + vtkm::cont::ArrayHandle inOutHandle = vtkm::cont::make_ArrayHandle(inOutArray, ARRAY_SIZE); vtkm::cont::ArrayHandle outHandle; // Output arrays must be preallocated. outHandle.Allocate(ARRAY_SIZE); @@ -136,37 +125,34 @@ struct DoTestAtomicArrayWorklet // This just demonstrates that the WholeArray tags support dynamic arrays. VTKM_CONT - void CallWorklet(const vtkm::cont::DynamicArrayHandle &inOutArray) const + void CallWorklet(const vtkm::cont::DynamicArrayHandle& inOutArray) const { std::cout << "Create and run dispatcher." << std::endl; vtkm::worklet::DispatcherMapField dispatcher; dispatcher.Invoke(vtkm::cont::ArrayHandleIndex(ARRAY_SIZE), inOutArray); } - template - VTKM_CONT - void operator()(T) const + template + VTKM_CONT void operator()(T) const { std::cout << "Set up data." << std::endl; T inOutValue = 0; - vtkm::cont::ArrayHandle inOutHandle = - vtkm::cont::make_ArrayHandle(&inOutValue, 1); + vtkm::cont::ArrayHandle inOutHandle = vtkm::cont::make_ArrayHandle(&inOutValue, 1); this->CallWorklet(vtkm::cont::DynamicArrayHandle(inOutHandle)); std::cout << "Check result." << std::endl; T result = inOutHandle.GetPortalConstControl().Get(0); - VTKM_TEST_ASSERT(result == (ARRAY_SIZE*(ARRAY_SIZE-1))/2, + VTKM_TEST_ASSERT(result == (ARRAY_SIZE * (ARRAY_SIZE - 1)) / 2, "Got wrong summation in atomic array."); } }; void TestWorkletMapFieldExecArg() { - typedef vtkm::cont::DeviceAdapterTraits< - VTKM_DEFAULT_DEVICE_ADAPTER_TAG> DeviceAdapterTraits; + typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; std::cout << "Testing Worklet with WholeArray on device adapter: " << DeviceAdapterTraits::GetName() << std::endl; @@ -177,12 +163,11 @@ void TestWorkletMapFieldExecArg() std::cout << "--- Worklet accepting atomics." << std::endl; vtkm::testing::Testing::TryTypes(map_whole_array::DoTestAtomicArrayWorklet(), vtkm::exec::AtomicArrayTypeListTag()); - } } // anonymous namespace -int UnitTestWorkletMapFieldWholeArray(int, char *[]) +int UnitTestWorkletMapFieldWholeArray(int, char* []) { return vtkm::cont::testing::Testing::Run(map_whole_array::TestWorkletMapFieldExecArg); } diff --git a/vtkm/worklet/testing/UnitTestWorkletMapTopologyExplicit.cxx b/vtkm/worklet/testing/UnitTestWorkletMapTopologyExplicit.cxx index 41daff4dc..f889e3230 100644 --- a/vtkm/worklet/testing/UnitTestWorkletMapTopologyExplicit.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletMapTopologyExplicit.cxx @@ -31,47 +31,39 @@ #include #include -namespace test_explicit { +namespace test_explicit +{ class MaxPointOrCellValue : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(FieldInCell inCells, - FieldInPoint inPoints, - CellSetIn topology, - FieldOutCell outCells); + typedef void ControlSignature(FieldInCell inCells, FieldInPoint inPoints, + CellSetIn topology, FieldOutCell outCells); typedef void ExecutionSignature(_1, _4, _2, PointCount, CellShape, PointIndices); typedef _3 InputDomain; VTKM_CONT - MaxPointOrCellValue() { } + MaxPointOrCellValue() {} - template - VTKM_EXEC - void operator()(const InCellType &cellValue, - OutCellType &maxValue, - const InPointVecType &pointValues, - const vtkm::IdComponent &numPoints, - const CellShapeTag &vtkmNotUsed(type), - const PointIndexType &vtkmNotUsed(pointIDs)) const + template + VTKM_EXEC void operator()(const InCellType& cellValue, OutCellType& maxValue, + const InPointVecType& pointValues, const vtkm::IdComponent& numPoints, + const CellShapeTag& vtkmNotUsed(type), + const PointIndexType& vtkmNotUsed(pointIDs)) const { //simple functor that returns the max of cellValue and pointValue maxValue = static_cast(cellValue); for (vtkm::IdComponent pointIndex = 0; pointIndex < numPoints; ++pointIndex) { - maxValue = vtkm::Max(maxValue, - static_cast(pointValues[pointIndex])); + maxValue = vtkm::Max(maxValue, static_cast(pointValues[pointIndex])); } } }; - } -namespace { +namespace +{ static void TestMaxPointOrCell(); static void TestAvgPointToCell(); @@ -79,32 +71,26 @@ static void TestAvgCellToPoint(); void TestWorkletMapTopologyExplicit() { - typedef vtkm::cont::DeviceAdapterTraits< - VTKM_DEFAULT_DEVICE_ADAPTER_TAG> DeviceAdapterTraits; + typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; std::cout << "Testing Topology Worklet ( Explicit ) on device adapter: " << DeviceAdapterTraits::GetName() << std::endl; - TestMaxPointOrCell(); - TestAvgPointToCell(); - TestAvgCellToPoint(); + TestMaxPointOrCell(); + TestAvgPointToCell(); + TestAvgCellToPoint(); } - -static void -TestMaxPointOrCell() +static void TestMaxPointOrCell() { - std::cout<<"Testing MaxPointOfCell worklet"< result; - vtkm::worklet::DispatcherMapTopology< ::test_explicit::MaxPointOrCellValue > - dispatcher; - dispatcher.Invoke(dataSet.GetField("cellvar"), - dataSet.GetField("pointvar"), - dataSet.GetCellSet(0), - result); + vtkm::worklet::DispatcherMapTopology<::test_explicit::MaxPointOrCellValue> dispatcher; + dispatcher.Invoke(dataSet.GetField("cellvar"), dataSet.GetField("pointvar"), + dataSet.GetCellSet(0), result); std::cout << "Make sure we got the right answer." << std::endl; VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(0), 100.1f), @@ -113,20 +99,17 @@ TestMaxPointOrCell() "Wrong result for PointToCellMax worklet"); } -static void -TestAvgPointToCell() +static void TestAvgPointToCell() { - std::cout<<"Testing AvgPointToCell worklet"< result; - vtkm::worklet::DispatcherMapTopology< vtkm::worklet::CellAverage > dispatcher; - dispatcher.Invoke(dataSet.GetCellSet(), - dataSet.GetField("pointvar"), - result); + vtkm::worklet::DispatcherMapTopology dispatcher; + dispatcher.Invoke(dataSet.GetCellSet(), dataSet.GetField("pointvar"), result); std::cout << "Make sure we got the right answer." << std::endl; VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(0), 20.1333f), @@ -134,8 +117,7 @@ TestAvgPointToCell() VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(1), 35.2f), "Wrong result for PointToCellAverage worklet"); - std::cout << "Try to invoke with an input array of the wrong size." - << std::endl; + std::cout << "Try to invoke with an input array of the wrong size." << std::endl; bool exceptionThrown = false; try { @@ -143,31 +125,25 @@ TestAvgPointToCell() dataSet.GetField("cellvar"), // should be pointvar result); } - catch (vtkm::cont::ErrorBadValue &error) + catch (vtkm::cont::ErrorBadValue& error) { - std::cout << " Caught expected error: " << error.GetMessage() - << std::endl; + std::cout << " Caught expected error: " << error.GetMessage() << std::endl; exceptionThrown = true; } - VTKM_TEST_ASSERT(exceptionThrown, - "Dispatcher did not throw expected exception."); + VTKM_TEST_ASSERT(exceptionThrown, "Dispatcher did not throw expected exception."); } -static void -TestAvgCellToPoint() +static void TestAvgCellToPoint() { - std::cout<<"Testing AvgCellToPoint worklet"< result; - - vtkm::worklet::DispatcherMapTopology< vtkm::worklet::PointAverage > dispatcher; - dispatcher.Invoke(dataSet.GetCellSet(), - dataSet.GetField("cellvar"), - result); + vtkm::worklet::DispatcherMapTopology dispatcher; + dispatcher.Invoke(dataSet.GetCellSet(), dataSet.GetField("cellvar"), result); std::cout << "Make sure we got the right answer." << std::endl; VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(0), 100.1f), @@ -175,8 +151,7 @@ TestAvgCellToPoint() VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(1), 100.15f), "Wrong result for CellToPointAverage worklet"); - std::cout << "Try to invoke with an input array of the wrong size." - << std::endl; + std::cout << "Try to invoke with an input array of the wrong size." << std::endl; bool exceptionThrown = false; try { @@ -184,19 +159,17 @@ TestAvgCellToPoint() dataSet.GetField("pointvar"), // should be cellvar result); } - catch (vtkm::cont::ErrorBadValue &error) + catch (vtkm::cont::ErrorBadValue& error) { - std::cout << " Caught expected error: " << error.GetMessage() - << std::endl; + std::cout << " Caught expected error: " << error.GetMessage() << std::endl; exceptionThrown = true; } - VTKM_TEST_ASSERT(exceptionThrown, - "Dispatcher did not throw expected exception."); + VTKM_TEST_ASSERT(exceptionThrown, "Dispatcher did not throw expected exception."); } } // anonymous namespace -int UnitTestWorkletMapTopologyExplicit(int, char *[]) +int UnitTestWorkletMapTopologyExplicit(int, char* []) { - return vtkm::cont::testing::Testing::Run(TestWorkletMapTopologyExplicit); + return vtkm::cont::testing::Testing::Run(TestWorkletMapTopologyExplicit); } diff --git a/vtkm/worklet/testing/UnitTestWorkletMapTopologyUniform.cxx b/vtkm/worklet/testing/UnitTestWorkletMapTopologyUniform.cxx index 243a37c12..be5e5d3c8 100644 --- a/vtkm/worklet/testing/UnitTestWorkletMapTopologyUniform.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletMapTopologyUniform.cxx @@ -31,74 +31,61 @@ #include #include -namespace test_uniform { +namespace test_uniform +{ class MaxPointOrCellValue : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(FieldInCell inCells, - FieldInPoint inPoints, - CellSetIn topology, - FieldOutCell outCells); + typedef void ControlSignature(FieldInCell inCells, FieldInPoint inPoints, + CellSetIn topology, FieldOutCell outCells); typedef void ExecutionSignature(_1, _4, _2, PointCount, CellShape, PointIndices); typedef _3 InputDomain; VTKM_CONT - MaxPointOrCellValue() { } + MaxPointOrCellValue() {} - template - VTKM_EXEC - void operator()(const InCellType &cellValue, - OutCellType &maxValue, - const InPointVecType &pointValues, - const vtkm::IdComponent &numPoints, - const CellShapeTag &vtkmNotUsed(type), - const PointIndexType &vtkmNotUsed(pointIDs)) const + template + VTKM_EXEC void operator()(const InCellType& cellValue, OutCellType& maxValue, + const InPointVecType& pointValues, const vtkm::IdComponent& numPoints, + const CellShapeTag& vtkmNotUsed(type), + const PointIndexType& vtkmNotUsed(pointIDs)) const { //simple functor that returns the max of cellValue and pointValue maxValue = static_cast(cellValue); for (vtkm::IdComponent pointIndex = 0; pointIndex < numPoints; ++pointIndex) { - maxValue = vtkm::Max(maxValue, - static_cast(pointValues[pointIndex])); + maxValue = vtkm::Max(maxValue, static_cast(pointValues[pointIndex])); } } }; -struct CheckStructuredUniformPointCoords - : public vtkm::worklet::WorkletMapPointToCell +struct CheckStructuredUniformPointCoords : public vtkm::worklet::WorkletMapPointToCell { - typedef void ControlSignature(CellSetIn topology, - FieldInPoint pointCoords); + typedef void ControlSignature(CellSetIn topology, FieldInPoint pointCoords); typedef void ExecutionSignature(_2); VTKM_CONT - CheckStructuredUniformPointCoords() { } + CheckStructuredUniformPointCoords() {} - template - VTKM_EXEC - void operator()( - const vtkm::VecRectilinearPointCoordinates & - vtkmNotUsed(coords)) const + template + VTKM_EXEC void operator()( + const vtkm::VecRectilinearPointCoordinates& vtkmNotUsed(coords)) const { // Success if here. } - template - VTKM_EXEC - void operator()(const PointCoordsVecType &vtkmNotUsed(coords)) const + template + VTKM_EXEC void operator()(const PointCoordsVecType& vtkmNotUsed(coords)) const { this->RaiseError("Got wrong point coordinates type."); } }; - } -namespace { +namespace +{ static void TestMaxPointOrCell(); static void TestAvgPointToCell(); @@ -107,36 +94,32 @@ static void TestStructuredUniformPointCoords(); void TestWorkletMapTopologyUniform() { - typedef vtkm::cont::DeviceAdapterTraits< - VTKM_DEFAULT_DEVICE_ADAPTER_TAG> DeviceAdapterTraits; - std::cout << "Testing Topology Worklet ( Uniform ) on device adapter: " - << DeviceAdapterTraits::GetName() << std::endl; + typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; + std::cout << "Testing Topology Worklet ( Uniform ) on device adapter: " + << DeviceAdapterTraits::GetName() << std::endl; - TestMaxPointOrCell(); - TestAvgPointToCell(); - TestAvgCellToPoint(); - TestStructuredUniformPointCoords(); + TestMaxPointOrCell(); + TestAvgPointToCell(); + TestAvgCellToPoint(); + TestStructuredUniformPointCoords(); } -static void -TestMaxPointOrCell() +static void TestMaxPointOrCell() { - std::cout<<"Testing MaxPointOfCell worklet"< result; - vtkm::worklet::DispatcherMapTopology< ::test_uniform::MaxPointOrCellValue > dispatcher; - dispatcher.Invoke(dataSet.GetField("cellvar"), - dataSet.GetField("pointvar"), - // We know that the cell set is a structured 2D grid and - // The worklet does not work with general types because - // of the way we get cell indices. We need to make that - // part more flexible. - dataSet.GetCellSet(0).ResetCellSetList( - vtkm::cont::CellSetListTagStructured2D()), - result); + vtkm::worklet::DispatcherMapTopology<::test_uniform::MaxPointOrCellValue> dispatcher; + dispatcher.Invoke( + dataSet.GetField("cellvar"), dataSet.GetField("pointvar"), + // We know that the cell set is a structured 2D grid and + // The worklet does not work with general types because + // of the way we get cell indices. We need to make that + // part more flexible. + dataSet.GetCellSet(0).ResetCellSetList(vtkm::cont::CellSetListTagStructured2D()), result); std::cout << "Make sure we got the right answer." << std::endl; VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(0), 100.1f), @@ -145,25 +128,22 @@ TestMaxPointOrCell() "Wrong result for MaxPointOrCell worklet"); } -static void -TestAvgPointToCell() +static void TestAvgPointToCell() { - std::cout<<"Testing AvgPointToCell worklet"< result; - vtkm::worklet::DispatcherMapTopology< vtkm::worklet::CellAverage > dispatcher; + vtkm::worklet::DispatcherMapTopology dispatcher; dispatcher.Invoke( - // We know that the cell set is a structured 2D grid and - // The worklet does not work with general types because - // of the way we get cell indices. We need to make that - // part more flexible. - dataSet.GetCellSet(0).ResetCellSetList( - vtkm::cont::CellSetListTagStructured2D()), - dataSet.GetField("pointvar"), - result); + // We know that the cell set is a structured 2D grid and + // The worklet does not work with general types because + // of the way we get cell indices. We need to make that + // part more flexible. + dataSet.GetCellSet(0).ResetCellSetList(vtkm::cont::CellSetListTagStructured2D()), + dataSet.GetField("pointvar"), result); std::cout << "Make sure we got the right answer." << std::endl; VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(0), 30.1f), @@ -171,50 +151,43 @@ TestAvgPointToCell() VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(1), 40.1f), "Wrong result for PointToCellAverage worklet"); - std::cout << "Try to invoke with an input array of the wrong size." - << std::endl; + std::cout << "Try to invoke with an input array of the wrong size." << std::endl; bool exceptionThrown = false; try { - dispatcher.Invoke(// We know that the cell set is a structured 2D grid and - // The worklet does not work with general types because - // of the way we get cell indices. We need to make that - // part more flexible. - dataSet.GetCellSet().ResetCellSetList( - vtkm::cont::CellSetListTagStructured2D()), - dataSet.GetField("cellvar"), // should be pointvar - result); + dispatcher.Invoke( // We know that the cell set is a structured 2D grid and + // The worklet does not work with general types because + // of the way we get cell indices. We need to make that + // part more flexible. + dataSet.GetCellSet().ResetCellSetList(vtkm::cont::CellSetListTagStructured2D()), + dataSet.GetField("cellvar"), // should be pointvar + result); } - catch (vtkm::cont::ErrorBadValue &error) + catch (vtkm::cont::ErrorBadValue& error) { - std::cout << " Caught expected error: " << error.GetMessage() - << std::endl; + std::cout << " Caught expected error: " << error.GetMessage() << std::endl; exceptionThrown = true; } - VTKM_TEST_ASSERT(exceptionThrown, - "Dispatcher did not throw expected exception."); + VTKM_TEST_ASSERT(exceptionThrown, "Dispatcher did not throw expected exception."); } -static void -TestAvgCellToPoint() +static void TestAvgCellToPoint() { - std::cout<<"Testing AvgCellToPoint worklet"< result; - vtkm::worklet::DispatcherMapTopology< vtkm::worklet::PointAverage > dispatcher; + vtkm::worklet::DispatcherMapTopology dispatcher; dispatcher.Invoke( - // We know that the cell set is a structured 2D grid and - // The worklet does not work with general types because - // of the way we get cell indices. We need to make that - // part more flexible. - dataSet.GetCellSet(0).ResetCellSetList( - vtkm::cont::CellSetListTagStructured2D()), - dataSet.GetField("cellvar"), - result); + // We know that the cell set is a structured 2D grid and + // The worklet does not work with general types because + // of the way we get cell indices. We need to make that + // part more flexible. + dataSet.GetCellSet(0).ResetCellSetList(vtkm::cont::CellSetListTagStructured2D()), + dataSet.GetField("cellvar"), result); std::cout << "Make sure we got the right answer." << std::endl; VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(0), 100.1f), @@ -222,53 +195,45 @@ TestAvgCellToPoint() VTKM_TEST_ASSERT(test_equal(result.GetPortalConstControl().Get(1), 150.1f), "Wrong result for CellToPointAverage worklet"); - std::cout << "Try to invoke with an input array of the wrong size." - << std::endl; + std::cout << "Try to invoke with an input array of the wrong size." << std::endl; bool exceptionThrown = false; try { - dispatcher.Invoke(// We know that the cell set is a structured 2D grid and - // The worklet does not work with general types because - // of the way we get cell indices. We need to make that - // part more flexible. - dataSet.GetCellSet().ResetCellSetList( - vtkm::cont::CellSetListTagStructured2D()), - dataSet.GetField("pointvar"), // should be cellvar - result); + dispatcher.Invoke( // We know that the cell set is a structured 2D grid and + // The worklet does not work with general types because + // of the way we get cell indices. We need to make that + // part more flexible. + dataSet.GetCellSet().ResetCellSetList(vtkm::cont::CellSetListTagStructured2D()), + dataSet.GetField("pointvar"), // should be cellvar + result); } - catch (vtkm::cont::ErrorBadValue &error) + catch (vtkm::cont::ErrorBadValue& error) { - std::cout << " Caught expected error: " << error.GetMessage() - << std::endl; + std::cout << " Caught expected error: " << error.GetMessage() << std::endl; exceptionThrown = true; } - VTKM_TEST_ASSERT(exceptionThrown, - "Dispatcher did not throw expected exception."); + VTKM_TEST_ASSERT(exceptionThrown, "Dispatcher did not throw expected exception."); } -static void -TestStructuredUniformPointCoords() +static void TestStructuredUniformPointCoords() { - std::cout << "Testing uniform point coordinates in structured grids" - << std::endl; + std::cout << "Testing uniform point coordinates in structured grids" << std::endl; vtkm::cont::testing::MakeTestDataSet testDataSet; - vtkm::worklet::DispatcherMapTopology< - ::test_uniform::CheckStructuredUniformPointCoords> dispatcher; + vtkm::worklet::DispatcherMapTopology<::test_uniform::CheckStructuredUniformPointCoords> + dispatcher; vtkm::cont::DataSet dataSet3D = testDataSet.Make3DUniformDataSet0(); - dispatcher.Invoke(dataSet3D.GetCellSet(), - dataSet3D.GetCoordinateSystem()); + dispatcher.Invoke(dataSet3D.GetCellSet(), dataSet3D.GetCoordinateSystem()); vtkm::cont::DataSet dataSet2D = testDataSet.Make2DUniformDataSet0(); - dispatcher.Invoke(dataSet2D.GetCellSet(), - dataSet2D.GetCoordinateSystem()); + dispatcher.Invoke(dataSet2D.GetCellSet(), dataSet2D.GetCoordinateSystem()); } } // anonymous namespace -int UnitTestWorkletMapTopologyUniform(int, char *[]) +int UnitTestWorkletMapTopologyUniform(int, char* []) { - return vtkm::cont::testing::Testing::Run(TestWorkletMapTopologyUniform); + return vtkm::cont::testing::Testing::Run(TestWorkletMapTopologyUniform); } diff --git a/vtkm/worklet/testing/UnitTestWorkletReduceByKey.cxx b/vtkm/worklet/testing/UnitTestWorkletReduceByKey.cxx index ae5e43193..fb73b982f 100644 --- a/vtkm/worklet/testing/UnitTestWorkletReduceByKey.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletReduceByKey.cxx @@ -27,48 +27,39 @@ #include -namespace { +namespace +{ #define STRINGIFY(x) STRINGIFY_IMPL(x) #define STRINGIFY_IMPL(x) #x -#define TEST_ASSERT_WORKLET(condition) \ - do { \ - if (!(condition)) \ - { \ - this->RaiseError("Test assert failed: " #condition \ - "\n" __FILE__ ":" STRINGIFY(__LINE__)); \ - return; \ - } \ +#define TEST_ASSERT_WORKLET(condition) \ + do \ + { \ + if (!(condition)) \ + { \ + this->RaiseError("Test assert failed: " #condition "\n" __FILE__ ":" STRINGIFY(__LINE__)); \ + return; \ + } \ } while (false) static const vtkm::Id ARRAY_SIZE = 1033; static const vtkm::IdComponent GROUP_SIZE = 10; -static const vtkm::Id NUM_UNIQUE = ARRAY_SIZE/GROUP_SIZE; +static const vtkm::Id NUM_UNIQUE = ARRAY_SIZE / GROUP_SIZE; struct CheckKeyValuesWorklet : vtkm::worklet::WorkletReduceByKey { - typedef void ControlSignature(KeysIn keys, - ValuesIn<> keyMirror, - ValuesIn<> indexValues, - ValuesInOut<> valuesToModify, - ValuesOut<> writeKey); + typedef void ControlSignature(KeysIn keys, ValuesIn<> keyMirror, ValuesIn<> indexValues, + ValuesInOut<> valuesToModify, ValuesOut<> writeKey); typedef void ExecutionSignature(_1, _2, _3, _4, _5, WorkIndex, ValueCount); typedef _1 InputDomain; - template - VTKM_EXEC - void operator()(const T &key, - const KeyMirrorVecType &keyMirror, - const IndexValuesVecType &valueIndices, - ValuesToModifyVecType &valuesToModify, - WriteKeysVecType &writeKey, - vtkm::Id workIndex, - vtkm::IdComponent numValues) const + template + VTKM_EXEC void operator()(const T& key, const KeyMirrorVecType& keyMirror, + const IndexValuesVecType& valueIndices, + ValuesToModifyVecType& valuesToModify, WriteKeysVecType& writeKey, + vtkm::Id workIndex, vtkm::IdComponent numValues) const { // These tests only work if keys are in sorted order, which is how we group // them. @@ -81,11 +72,10 @@ struct CheckKeyValuesWorklet : vtkm::worklet::WorkletReduceByKey TEST_ASSERT_WORKLET(valuesToModify.GetNumberOfComponents() == numValues); TEST_ASSERT_WORKLET(writeKey.GetNumberOfComponents() == numValues); - for (vtkm::IdComponent iComponent = 0; iComponent < numValues; iComponent++) { TEST_ASSERT_WORKLET(test_equal(keyMirror[iComponent], key)); - TEST_ASSERT_WORKLET(valueIndices[iComponent]%NUM_UNIQUE == workIndex); + TEST_ASSERT_WORKLET(valueIndices[iComponent] % NUM_UNIQUE == workIndex); T value = valuesToModify[iComponent]; valuesToModify[iComponent] = static_cast(key + value); @@ -97,19 +87,13 @@ struct CheckKeyValuesWorklet : vtkm::worklet::WorkletReduceByKey struct CheckReducedValuesWorklet : vtkm::worklet::WorkletReduceByKey { - typedef void ControlSignature(KeysIn, - ReducedValuesOut<> extractKeys, - ReducedValuesIn<> indexReference, - ReducedValuesInOut<> copyKeyPair); + typedef void ControlSignature(KeysIn, ReducedValuesOut<> extractKeys, + ReducedValuesIn<> indexReference, ReducedValuesInOut<> copyKeyPair); typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); - template - VTKM_EXEC - void operator()(const T &key, - T &reducedValueOut, - vtkm::Id indexReference, - vtkm::Pair ©KeyPair, - vtkm::Id workIndex) const + template + VTKM_EXEC void operator()(const T& key, T& reducedValueOut, vtkm::Id indexReference, + vtkm::Pair& copyKeyPair, vtkm::Id workIndex) const { // This check only work if keys are in sorted order, which is how we group // them. @@ -124,24 +108,21 @@ struct CheckReducedValuesWorklet : vtkm::worklet::WorkletReduceByKey } }; -template +template void TryKeyType(KeyType) { KeyType keyBuffer[ARRAY_SIZE]; for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { - keyBuffer[index] = TestValue(index%NUM_UNIQUE, KeyType()); + keyBuffer[index] = TestValue(index % NUM_UNIQUE, KeyType()); } - vtkm::cont::ArrayHandle keyArray = - vtkm::cont::make_ArrayHandle(keyBuffer, ARRAY_SIZE); + vtkm::cont::ArrayHandle keyArray = vtkm::cont::make_ArrayHandle(keyBuffer, ARRAY_SIZE); vtkm::cont::ArrayHandle sortedKeys; - vtkm::cont::DeviceAdapterAlgorithm:: - Copy(keyArray, sortedKeys); + vtkm::cont::DeviceAdapterAlgorithm::Copy(keyArray, sortedKeys); - vtkm::worklet::Keys keys(sortedKeys, - VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); + vtkm::worklet::Keys keys(sortedKeys, VTKM_DEFAULT_DEVICE_ADAPTER_TAG()); vtkm::cont::ArrayHandle valuesToModify; valuesToModify.Allocate(ARRAY_SIZE); @@ -149,31 +130,23 @@ void TryKeyType(KeyType) vtkm::cont::ArrayHandle writeKey; - vtkm::worklet::DispatcherReduceByKey - dispatcherCheckKeyValues; - dispatcherCheckKeyValues.Invoke(keys, - keyArray, - vtkm::cont::ArrayHandleIndex(ARRAY_SIZE), - valuesToModify, - writeKey); + vtkm::worklet::DispatcherReduceByKey dispatcherCheckKeyValues; + dispatcherCheckKeyValues.Invoke(keys, keyArray, vtkm::cont::ArrayHandleIndex(ARRAY_SIZE), + valuesToModify, writeKey); - VTKM_TEST_ASSERT(valuesToModify.GetNumberOfValues() == ARRAY_SIZE, - "Bad array size."); - VTKM_TEST_ASSERT(writeKey.GetNumberOfValues() == ARRAY_SIZE, - "Bad array size."); + VTKM_TEST_ASSERT(valuesToModify.GetNumberOfValues() == ARRAY_SIZE, "Bad array size."); + VTKM_TEST_ASSERT(writeKey.GetNumberOfValues() == ARRAY_SIZE, "Bad array size."); for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) { - KeyType key = TestValue(index%NUM_UNIQUE, KeyType()); + KeyType key = TestValue(index % NUM_UNIQUE, KeyType()); KeyType value = TestValue(index, KeyType()); - VTKM_TEST_ASSERT( - test_equal(static_cast(key+value), - valuesToModify.GetPortalConstControl().Get(index)), - "Bad in/out value."); + VTKM_TEST_ASSERT(test_equal(static_cast(key + value), + valuesToModify.GetPortalConstControl().Get(index)), + "Bad in/out value."); - VTKM_TEST_ASSERT( - test_equal(key, writeKey.GetPortalConstControl().Get(index)), - "Bad out value."); + VTKM_TEST_ASSERT(test_equal(key, writeKey.GetPortalConstControl().Get(index)), + "Bad out value."); } vtkm::cont::ArrayHandle keyPairIn; @@ -183,13 +156,9 @@ void TryKeyType(KeyType) vtkm::cont::ArrayHandle keyPairOut; keyPairOut.Allocate(NUM_UNIQUE); - vtkm::worklet::DispatcherReduceByKey - dispatcherCheckReducedValues; - dispatcherCheckReducedValues.Invoke( - keys, - writeKey, - vtkm::cont::ArrayHandleIndex(NUM_UNIQUE), - vtkm::cont::make_ArrayHandleZip(keyPairIn, keyPairOut)); + vtkm::worklet::DispatcherReduceByKey dispatcherCheckReducedValues; + dispatcherCheckReducedValues.Invoke(keys, writeKey, vtkm::cont::ArrayHandleIndex(NUM_UNIQUE), + vtkm::cont::make_ArrayHandleZip(keyPairIn, keyPairOut)); VTKM_TEST_ASSERT(writeKey.GetNumberOfValues() == NUM_UNIQUE, "Reduced values output not sized correctly."); @@ -200,10 +169,9 @@ void TryKeyType(KeyType) void TestReduceByKey() { - typedef vtkm::cont::DeviceAdapterTraits< - VTKM_DEFAULT_DEVICE_ADAPTER_TAG> DeviceAdapterTraits; - std::cout << "Testing Map Field on device adapter: " - << DeviceAdapterTraits::GetName() << std::endl; + typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; + std::cout << "Testing Map Field on device adapter: " << DeviceAdapterTraits::GetName() + << std::endl; std::cout << "Testing vtkm::Id keys." << std::endl; TryKeyType(vtkm::Id()); @@ -220,7 +188,7 @@ void TestReduceByKey() } // anonymous namespace -int UnitTestWorkletReduceByKey(int, char*[]) +int UnitTestWorkletReduceByKey(int, char* []) { return vtkm::cont::testing::Testing::Run(TestReduceByKey); } diff --git a/vtkm/worklet/tetrahedralize/TetrahedralizeExplicit.h b/vtkm/worklet/tetrahedralize/TetrahedralizeExplicit.h index a13a1c324..d949a41f4 100644 --- a/vtkm/worklet/tetrahedralize/TetrahedralizeExplicit.h +++ b/vtkm/worklet/tetrahedralize/TetrahedralizeExplicit.h @@ -37,8 +37,10 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ /// \brief Compute the tetrahedralize cells for an explicit grid data set template @@ -53,9 +55,7 @@ public: class TetrahedraPerCell : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn<> shapes, - ExecObject tables, - FieldOut<> tetrahedronCount); + typedef void ControlSignature(FieldIn<> shapes, ExecObject tables, FieldOut<> tetrahedronCount); typedef _3 ExecutionSignature(_1, _2); typedef _1 InputDomain; @@ -64,8 +64,9 @@ public: VTKM_EXEC vtkm::IdComponent operator()( - vtkm::UInt8 shape, - const vtkm::worklet::internal::TetrahedralizeTablesExecutionObject &tables) const + vtkm::UInt8 shape, + const vtkm::worklet::internal::TetrahedralizeTablesExecutionObject& tables) + const { return tables.GetCount(vtkm::CellShapeTagGeneric(shape)); } @@ -78,38 +79,29 @@ public: class TetrahedralizeCell : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(CellSetIn cellset, - ExecObject tables, + typedef void ControlSignature(CellSetIn cellset, ExecObject tables, FieldOutCell<> connectivityOut); typedef void ExecutionSignature(CellShape, PointIndices, _2, _3, VisitIndex); typedef _1 InputDomain; typedef vtkm::worklet::ScatterCounting ScatterType; VTKM_CONT - ScatterType GetScatter() const + ScatterType GetScatter() const { return this->Scatter; } + + template + VTKM_CONT TetrahedralizeCell(const CellArrayType& cellArray) + : Scatter(cellArray, DeviceAdapter()) { - return this->Scatter; } - template - VTKM_CONT - TetrahedralizeCell(const CellArrayType &cellArray) - : Scatter(cellArray, DeviceAdapter()) - { } - // Each cell produces tetrahedra and write result at the offset - template - VTKM_EXEC - void operator()(CellShapeTag shape, - const ConnectivityInVec &connectivityIn, - const vtkm::worklet::internal::TetrahedralizeTablesExecutionObject &tables, - ConnectivityOutVec &connectivityOut, - vtkm::IdComponent visitIndex) const + template + VTKM_EXEC void operator()( + CellShapeTag shape, const ConnectivityInVec& connectivityIn, + const vtkm::worklet::internal::TetrahedralizeTablesExecutionObject& tables, + ConnectivityOutVec& connectivityOut, vtkm::IdComponent visitIndex) const { - vtkm::Vec tetIndices = - tables.GetIndices(shape, visitIndex); + vtkm::Vec tetIndices = tables.GetIndices(shape, visitIndex); connectivityOut[0] = connectivityIn[tetIndices[0]]; connectivityOut[1] = connectivityIn[tetIndices[1]]; connectivityOut[2] = connectivityIn[tetIndices[2]]; @@ -121,18 +113,16 @@ public: }; template - vtkm::cont::CellSetSingleType<> Run(const CellSetType &cellSet, - vtkm::cont::ArrayHandle &outCellsPerCell) + vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, + vtkm::cont::ArrayHandle& outCellsPerCell) { vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName()); // Input topology - auto inShapes = - cellSet.GetShapesArray(vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell()); - auto inNumIndices = - cellSet.GetNumIndicesArray(vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell()); + auto inShapes = + cellSet.GetShapesArray(vtkm::TopologyElementTagPoint(), vtkm::TopologyElementTagCell()); + auto inNumIndices = + cellSet.GetNumIndicesArray(vtkm::TopologyElementTagPoint(), vtkm::TopologyElementTagCell()); // Output topology vtkm::cont::ArrayHandle outConnectivity; @@ -140,29 +130,21 @@ public: vtkm::worklet::internal::TetrahedralizeTables tables; // Determine the number of output cells each input cell will generate - vtkm::worklet::DispatcherMapField - tetPerCellDispatcher; - tetPerCellDispatcher.Invoke(inShapes, - tables.PrepareForInput(DeviceAdapter()), - outCellsPerCell); + vtkm::worklet::DispatcherMapField tetPerCellDispatcher; + tetPerCellDispatcher.Invoke(inShapes, tables.PrepareForInput(DeviceAdapter()), outCellsPerCell); // Build new cells TetrahedralizeCell tetrahedralizeWorklet(outCellsPerCell); - vtkm::worklet::DispatcherMapTopology - tetrahedralizeDispatcher(tetrahedralizeWorklet); - tetrahedralizeDispatcher.Invoke(cellSet, - tables.PrepareForInput(DeviceAdapter()), + vtkm::worklet::DispatcherMapTopology + tetrahedralizeDispatcher(tetrahedralizeWorklet); + tetrahedralizeDispatcher.Invoke(cellSet, tables.PrepareForInput(DeviceAdapter()), vtkm::cont::make_ArrayHandleGroupVec<4>(outConnectivity)); // Add cells to output cellset - outCellSet.Fill(cellSet.GetNumberOfPoints(), - vtkm::CellShapeTagTetra::Id, - 4, - outConnectivity); + outCellSet.Fill(cellSet.GetNumberOfPoints(), vtkm::CellShapeTagTetra::Id, 4, outConnectivity); return outCellSet; } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/tetrahedralize/TetrahedralizeStructured.h b/vtkm/worklet/tetrahedralize/TetrahedralizeStructured.h index e6fc2d403..6e8900e79 100644 --- a/vtkm/worklet/tetrahedralize/TetrahedralizeStructured.h +++ b/vtkm/worklet/tetrahedralize/TetrahedralizeStructured.h @@ -35,27 +35,18 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace detail { +namespace detail +{ VTKM_EXEC_CONSTANT const static vtkm::IdComponent StructuredTetrahedronIndices[2][5][4] = { - { - { 0, 1, 3, 4 }, - { 1, 4, 5, 6 }, - { 1, 4, 6, 3 }, - { 1, 3, 6, 2 }, - { 3, 6, 7, 4 } - }, - { - { 2, 1, 5, 0 }, - { 0, 2, 3, 7 }, - { 2, 5, 6, 7 }, - { 0, 7, 4, 5 }, - { 0, 2, 7, 5 } - } + { { 0, 1, 3, 4 }, { 1, 4, 5, 6 }, { 1, 4, 6, 3 }, { 1, 3, 6, 2 }, { 3, 6, 7, 4 } }, + { { 2, 1, 5, 0 }, { 0, 2, 3, 7 }, { 2, 5, 6, 7 }, { 0, 7, 4, 5 }, { 0, 2, 7, 5 } } }; } // namespace detail @@ -74,30 +65,22 @@ public: class TetrahedralizeCell : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(CellSetIn cellset, - FieldOutCell<> connectivityOut); + typedef void ControlSignature(CellSetIn cellset, FieldOutCell<> connectivityOut); typedef void ExecutionSignature(PointIndices, _2, ThreadIndices); typedef _1 InputDomain; typedef vtkm::worklet::ScatterUniform ScatterType; VTKM_CONT - ScatterType GetScatter() const - { - return ScatterType(5); - } + ScatterType GetScatter() const { return ScatterType(5); } VTKM_CONT - TetrahedralizeCell() - { } + TetrahedralizeCell() {} // Each hexahedron cell produces five tetrahedron cells - template - VTKM_EXEC - void operator()(const ConnectivityInVec &connectivityIn, - ConnectivityOutVec &connectivityOut, - const ThreadIndicesType threadIndices) const + template + VTKM_EXEC void operator()(const ConnectivityInVec& connectivityIn, + ConnectivityOutVec& connectivityOut, + const ThreadIndicesType threadIndices) const { vtkm::Id3 inputIndex = threadIndices.GetInputIndex3D(); @@ -106,40 +89,39 @@ public: vtkm::IdComponent visitIndex = threadIndices.GetVisitIndex(); - connectivityOut[0] = connectivityIn[detail::StructuredTetrahedronIndices[indexType][visitIndex][0]]; - connectivityOut[1] = connectivityIn[detail::StructuredTetrahedronIndices[indexType][visitIndex][1]]; - connectivityOut[2] = connectivityIn[detail::StructuredTetrahedronIndices[indexType][visitIndex][2]]; - connectivityOut[3] = connectivityIn[detail::StructuredTetrahedronIndices[indexType][visitIndex][3]]; + connectivityOut[0] = + connectivityIn[detail::StructuredTetrahedronIndices[indexType][visitIndex][0]]; + connectivityOut[1] = + connectivityIn[detail::StructuredTetrahedronIndices[indexType][visitIndex][1]]; + connectivityOut[2] = + connectivityIn[detail::StructuredTetrahedronIndices[indexType][visitIndex][2]]; + connectivityOut[3] = + connectivityIn[detail::StructuredTetrahedronIndices[indexType][visitIndex][3]]; } }; template - vtkm::cont::CellSetSingleType<> Run(const CellSetType &cellSet, - vtkm::cont::ArrayHandle &outCellsPerCell) + vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, + vtkm::cont::ArrayHandle& outCellsPerCell) { typedef vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName()); vtkm::cont::ArrayHandle connectivity; - vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke(cellSet, - vtkm::cont::make_ArrayHandleGroupVec<4>(connectivity)); + vtkm::worklet::DispatcherMapTopology dispatcher; + dispatcher.Invoke(cellSet, vtkm::cont::make_ArrayHandleGroupVec<4>(connectivity)); // Fill in array of output cells per input cell DeviceAlgorithm::Copy( - vtkm::cont::ArrayHandleConstant(5, cellSet.GetNumberOfCells()), - outCellsPerCell); + vtkm::cont::ArrayHandleConstant(5, cellSet.GetNumberOfCells()), + outCellsPerCell); // Add cells to output cellset - outCellSet.Fill(cellSet.GetNumberOfPoints(), - vtkm::CellShapeTagTetra::Id, - 4, - connectivity); + outCellSet.Fill(cellSet.GetNumberOfPoints(), vtkm::CellShapeTagTetra::Id, 4, connectivity); return outCellSet; } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/triangulate/TriangulateExplicit.h b/vtkm/worklet/triangulate/TriangulateExplicit.h index b14885b11..4f046cbd4 100644 --- a/vtkm/worklet/triangulate/TriangulateExplicit.h +++ b/vtkm/worklet/triangulate/TriangulateExplicit.h @@ -37,8 +37,10 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ /// \brief Compute the triangulate cells for an explicit grid data set template @@ -53,11 +55,9 @@ public: class TrianglesPerCell : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn<> shapes, - FieldIn<> numPoints, - ExecObject tables, + typedef void ControlSignature(FieldIn<> shapes, FieldIn<> numPoints, ExecObject tables, FieldOut<> triangleCount); - typedef _4 ExecutionSignature(_1,_2,_3); + typedef _4 ExecutionSignature(_1, _2, _3); typedef _1 InputDomain; VTKM_CONT @@ -65,9 +65,8 @@ public: VTKM_EXEC vtkm::IdComponent operator()( - vtkm::UInt8 shape, - vtkm::IdComponent numPoints, - const vtkm::worklet::internal::TriangulateTablesExecutionObject &tables) const + vtkm::UInt8 shape, vtkm::IdComponent numPoints, + const vtkm::worklet::internal::TriangulateTablesExecutionObject& tables) const { return tables.GetCount(vtkm::CellShapeTagGeneric(shape), numPoints); } @@ -80,39 +79,29 @@ public: class TriangulateCell : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(CellSetIn cellset, - ExecObject tables, + typedef void ControlSignature(CellSetIn cellset, ExecObject tables, FieldOutCell<> connectivityOut); typedef void ExecutionSignature(CellShape, PointIndices, _2, _3, VisitIndex); typedef _1 InputDomain; typedef vtkm::worklet::ScatterCounting ScatterType; VTKM_CONT - ScatterType GetScatter() const + ScatterType GetScatter() const { return this->Scatter; } + + template + VTKM_CONT TriangulateCell(const CountArrayType& countArray) + : Scatter(countArray, DeviceAdapter()) { - return this->Scatter; } - template - VTKM_CONT - TriangulateCell(const CountArrayType &countArray) - : Scatter(countArray, DeviceAdapter()) - { } - // Each cell produces triangles and write result at the offset - template - VTKM_EXEC - void operator()( - CellShapeTag shape, - const ConnectivityInVec &connectivityIn, - const vtkm::worklet::internal::TriangulateTablesExecutionObject &tables, - ConnectivityOutVec &connectivityOut, - vtkm::IdComponent visitIndex) const + template + VTKM_EXEC void operator()( + CellShapeTag shape, const ConnectivityInVec& connectivityIn, + const vtkm::worklet::internal::TriangulateTablesExecutionObject& tables, + ConnectivityOutVec& connectivityOut, vtkm::IdComponent visitIndex) const { - vtkm::Vec triIndices = - tables.GetIndices(shape, visitIndex); + vtkm::Vec triIndices = tables.GetIndices(shape, visitIndex); connectivityOut[0] = connectivityIn[triIndices[0]]; connectivityOut[1] = connectivityIn[triIndices[1]]; connectivityOut[2] = connectivityIn[triIndices[2]]; @@ -123,18 +112,16 @@ public: }; template - vtkm::cont::CellSetSingleType<> Run(const CellSetType &cellSet, - vtkm::cont::ArrayHandle &outCellsPerCell) + vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, + vtkm::cont::ArrayHandle& outCellsPerCell) { vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName()); // Input topology - auto inShapes = - cellSet.GetShapesArray(vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell()); - auto inNumIndices = - cellSet.GetNumIndicesArray(vtkm::TopologyElementTagPoint(), - vtkm::TopologyElementTagCell()); + auto inShapes = + cellSet.GetShapesArray(vtkm::TopologyElementTagPoint(), vtkm::TopologyElementTagCell()); + auto inNumIndices = + cellSet.GetNumIndicesArray(vtkm::TopologyElementTagPoint(), vtkm::TopologyElementTagCell()); // Output topology vtkm::cont::ArrayHandle outConnectivity; @@ -142,30 +129,23 @@ public: vtkm::worklet::internal::TriangulateTables tables; // Determine the number of output cells each input cell will generate - vtkm::worklet::DispatcherMapField - triPerCellDispatcher; - triPerCellDispatcher.Invoke(inShapes, - inNumIndices, - tables.PrepareForInput(DeviceAdapter()), + vtkm::worklet::DispatcherMapField triPerCellDispatcher; + triPerCellDispatcher.Invoke(inShapes, inNumIndices, tables.PrepareForInput(DeviceAdapter()), outCellsPerCell); // Build new cells TriangulateCell triangulateWorklet(outCellsPerCell); - vtkm::worklet::DispatcherMapTopology - triangulateDispatcher(triangulateWorklet); - triangulateDispatcher.Invoke(cellSet, - tables.PrepareForInput(DeviceAdapter()), + vtkm::worklet::DispatcherMapTopology triangulateDispatcher( + triangulateWorklet); + triangulateDispatcher.Invoke(cellSet, tables.PrepareForInput(DeviceAdapter()), vtkm::cont::make_ArrayHandleGroupVec<3>(outConnectivity)); // Add cells to output cellset - outCellSet.Fill(cellSet.GetNumberOfPoints(), - vtkm::CellShapeTagTriangle::Id, - 3, + outCellSet.Fill(cellSet.GetNumberOfPoints(), vtkm::CellShapeTagTriangle::Id, 3, outConnectivity); return outCellSet; } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/triangulate/TriangulateStructured.h b/vtkm/worklet/triangulate/TriangulateStructured.h index bd7e2553b..512baf3de 100644 --- a/vtkm/worklet/triangulate/TriangulateStructured.h +++ b/vtkm/worklet/triangulate/TriangulateStructured.h @@ -35,16 +35,16 @@ #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace detail { +namespace detail +{ VTKM_EXEC_CONSTANT -const static vtkm::IdComponent StructuredTriangleIndices[2][3] = { - { 0, 1, 2 }, - { 0, 2, 3 } -}; +const static vtkm::IdComponent StructuredTriangleIndices[2][3] = { { 0, 1, 2 }, { 0, 2, 3 } }; } // namespace detail @@ -62,28 +62,22 @@ public: class TriangulateCell : public vtkm::worklet::WorkletMapPointToCell { public: - typedef void ControlSignature(CellSetIn cellset, - FieldOutCell<> connectivityOut); + typedef void ControlSignature(CellSetIn cellset, FieldOutCell<> connectivityOut); typedef void ExecutionSignature(PointIndices, _2, VisitIndex); typedef _1 InputDomain; typedef vtkm::worklet::ScatterUniform ScatterType; VTKM_CONT - ScatterType GetScatter() const - { - return ScatterType(2); - } + ScatterType GetScatter() const { return ScatterType(2); } VTKM_CONT - TriangulateCell() - { } + TriangulateCell() {} // Each quad cell produces 2 triangle cells - template - VTKM_EXEC - void operator()(const ConnectivityInVec &connectivityIn, - ConnectivityOutVec &connectivityOut, - vtkm::IdComponent visitIndex) const + template + VTKM_EXEC void operator()(const ConnectivityInVec& connectivityIn, + ConnectivityOutVec& connectivityOut, + vtkm::IdComponent visitIndex) const { connectivityOut[0] = connectivityIn[detail::StructuredTriangleIndices[visitIndex][0]]; connectivityOut[1] = connectivityIn[detail::StructuredTriangleIndices[visitIndex][1]]; @@ -92,8 +86,8 @@ public: }; template - vtkm::cont::CellSetSingleType<> Run(const CellSetType &cellSet, - vtkm::cont::ArrayHandle &outCellsPerCell) + vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, + vtkm::cont::ArrayHandle& outCellsPerCell) { typedef vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; @@ -101,25 +95,19 @@ public: vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName()); vtkm::cont::ArrayHandle connectivity; - vtkm::worklet::DispatcherMapTopology dispatcher; - dispatcher.Invoke(cellSet, - vtkm::cont::make_ArrayHandleGroupVec<3>(connectivity)); + vtkm::worklet::DispatcherMapTopology dispatcher; + dispatcher.Invoke(cellSet, vtkm::cont::make_ArrayHandleGroupVec<3>(connectivity)); // Fill in array of output cells per input cell DeviceAlgorithm::Copy( - vtkm::cont::ArrayHandleConstant(2, cellSet.GetNumberOfCells()), - outCellsPerCell); + vtkm::cont::ArrayHandleConstant(2, cellSet.GetNumberOfCells()), + outCellsPerCell); // Add cells to output cellset - outCellSet.Fill( - cellSet.GetNumberOfPoints(), - vtkm::CellShapeTagTriangle::Id, - 3, - connectivity); + outCellSet.Fill(cellSet.GetNumberOfPoints(), vtkm::CellShapeTagTriangle::Id, 3, connectivity); return outCellSet; } }; - } } // namespace vtkm::worklet diff --git a/vtkm/worklet/wavelets/FilterBanks.h b/vtkm/worklet/wavelets/FilterBanks.h index 0c7929ba5..0ae1b6daa 100644 --- a/vtkm/worklet/wavelets/FilterBanks.h +++ b/vtkm/worklet/wavelets/FilterBanks.h @@ -23,16 +23,18 @@ #ifndef vtk_m_worklet_wavelets_filterbanks_h #define vtk_m_worklet_wavelets_filterbanks_h - #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace wavelets { +namespace wavelets +{ - const vtkm::Float64 hm4_44[9] = { - /* From VAPoR +const vtkm::Float64 hm4_44[9] = { + /* From VAPoR 0.037828455507264, -0.023849465019557, -0.110624404418437, @@ -43,21 +45,15 @@ namespace wavelets { -0.023849465019557, 0.037828455507264 */ - /* From http://wavelets.pybytes.com/wavelet/bior4.4/ and its git repo: + /* From http://wavelets.pybytes.com/wavelet/bior4.4/ and its git repo: * https://github.com/nigma/pywt/blob/035e1fa14c2cd70ca270da20b1523e834a7ae635/src/wavelets_coeffs.template.h */ - 0.03782845550726404, - -0.023849465019556843, - -0.11062440441843718, - 0.37740285561283066, - 0.85269867900889385, - 0.37740285561283066, - -0.11062440441843718, - -0.023849465019556843, - 0.03782845550726404 - }; + 0.03782845550726404, -0.023849465019556843, -0.11062440441843718, + 0.37740285561283066, 0.85269867900889385, 0.37740285561283066, + -0.11062440441843718, -0.023849465019556843, 0.03782845550726404 +}; - const vtkm::Float64 h4[9] = { - /* From VAPoR +const vtkm::Float64 h4[9] = { + /* From VAPoR 0.0, -0.064538882628697, -0.040689417609164, @@ -68,70 +64,80 @@ namespace wavelets { -0.0645388826286971, 0.0 */ - /* From http://wavelets.pybytes.com/wavelet/bior4.4/ and its git repo: + /* From http://wavelets.pybytes.com/wavelet/bior4.4/ and its git repo: * https://github.com/nigma/pywt/blob/035e1fa14c2cd70ca270da20b1523e834a7ae635/src/wavelets_coeffs.template.h */ - 0.0, - -0.064538882628697058, - -0.040689417609164058, - 0.41809227322161724, - 0.7884856164055829, - 0.41809227322161724, - -0.040689417609164058, - -0.064538882628697058, - 0.0 - }; - - const vtkm::Float64 hm2_22[6] = { - -0.1767766952966368811002110905262, - 0.3535533905932737622004221810524, - 1.0606601717798212866012665431573, - 0.3535533905932737622004221810524, - -0.1767766952966368811002110905262 - }; - - const vtkm::Float64 h2[18] = { - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.3535533905932737622004221810524, - 0.7071067811865475244008443621048, - 0.3535533905932737622004221810524, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0 - }; - - const vtkm::Float64 hm1_11[2] = { - 0.70710678118654752440084436210, - 0.70710678118654752440084436210 - }; - - const vtkm::Float64 h1[10] = { - 0.0, 0.0, 0.0, 0.0, - 0.70710678118654752440084436210, - 0.70710678118654752440084436210, - 0.0, 0.0, 0.0, 0.0 - }; - - const vtkm::Float64 hm3_33[8] = { - 0.0662912607362388304125791589473, - -0.1988737822087164912377374768420, - -0.1546796083845572709626847042104, - 0.9943689110435824561886873842099, - 0.9943689110435824561886873842099, - -0.1546796083845572709626847042104, - -0.1988737822087164912377374768420, - 0.0662912607362388304125791589473 - }; - - const vtkm::Float64 h3[20] = { - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.1767766952966368811002110905262, - 0.5303300858899106433006332715786, - 0.5303300858899106433006332715786, - 0.1767766952966368811002110905262, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 - }; - + 0.0, + -0.064538882628697058, + -0.040689417609164058, + 0.41809227322161724, + 0.7884856164055829, + 0.41809227322161724, + -0.040689417609164058, + -0.064538882628697058, + 0.0 }; +const vtkm::Float64 hm2_22[6] = { -0.1767766952966368811002110905262, + 0.3535533905932737622004221810524, + 1.0606601717798212866012665431573, + 0.3535533905932737622004221810524, + -0.1767766952966368811002110905262 }; + +const vtkm::Float64 h2[18] = { 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.3535533905932737622004221810524, + 0.7071067811865475244008443621048, + 0.3535533905932737622004221810524, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 }; + +const vtkm::Float64 hm1_11[2] = { 0.70710678118654752440084436210, + 0.70710678118654752440084436210 }; + +const vtkm::Float64 h1[10] = { + 0.0, 0.0, 0.0, 0.0, 0.70710678118654752440084436210, 0.70710678118654752440084436210, + 0.0, 0.0, 0.0, 0.0 +}; + +const vtkm::Float64 hm3_33[8] = { + 0.0662912607362388304125791589473, -0.1988737822087164912377374768420, + -0.1546796083845572709626847042104, 0.9943689110435824561886873842099, + 0.9943689110435824561886873842099, -0.1546796083845572709626847042104, + -0.1988737822087164912377374768420, 0.0662912607362388304125791589473 +}; + +const vtkm::Float64 h3[20] = { 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.1767766952966368811002110905262, + 0.5303300858899106433006332715786, + 0.5303300858899106433006332715786, + 0.1767766952966368811002110905262, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 }; +}; } } diff --git a/vtkm/worklet/wavelets/WaveletBase.h b/vtkm/worklet/wavelets/WaveletBase.h index f8033afdd..9684f9302 100644 --- a/vtkm/worklet/wavelets/WaveletBase.h +++ b/vtkm/worklet/wavelets/WaveletBase.h @@ -21,384 +21,324 @@ #ifndef vtk_m_worklet_wavelets_waveletbase_h #define vtk_m_worklet_wavelets_waveletbase_h - #include #include #include #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace wavelets { +namespace wavelets +{ // Functionalities are similar to MatWaveBase in VAPoR. class WaveletBase { public: - - // Constructor - WaveletBase( WaveletName name ) : wname ( name ), - filter( name ) + WaveletBase(WaveletName name) + : wname(name) + , filter(name) { - if( wname == CDF9_7 || wname == BIOR4_4 || - wname == CDF5_3 || wname == BIOR2_2 ) + if (wname == CDF9_7 || wname == BIOR4_4 || wname == CDF5_3 || wname == BIOR2_2) { - this->wmode = SYMW; // Default extension mode, see MatWaveBase.cpp + this->wmode = SYMW; // Default extension mode, see MatWaveBase.cpp } - else if( wname == HAAR || wname == BIOR1_1 || - wname == CDF8_4 || wname == BIOR3_3 ) + else if (wname == HAAR || wname == BIOR1_1 || wname == CDF8_4 || wname == BIOR3_3) { this->wmode = SYMH; } } - // Returns length of approximation coefficients from a decompostition pass. - vtkm::Id GetApproxLength( vtkm::Id sigInLen ) + vtkm::Id GetApproxLength(vtkm::Id sigInLen) { if (sigInLen % 2 != 0) { - return((sigInLen+1) / 2); + return ((sigInLen + 1) / 2); } else { - return((sigInLen) / 2); + return ((sigInLen) / 2); } } - // Returns length of detail coefficients from a decompostition pass - vtkm::Id GetDetailLength( vtkm::Id sigInLen ) + vtkm::Id GetDetailLength(vtkm::Id sigInLen) { if (sigInLen % 2 != 0) { - return((sigInLen-1) / 2); + return ((sigInLen - 1) / 2); } else { - return((sigInLen) / 2); + return ((sigInLen) / 2); } } - // Returns length of coefficients generated in a decompostition pass - vtkm::Id GetCoeffLength( vtkm::Id sigInLen ) + vtkm::Id GetCoeffLength(vtkm::Id sigInLen) { - return( GetApproxLength( sigInLen ) + GetDetailLength( sigInLen ) ); + return (GetApproxLength(sigInLen) + GetDetailLength(sigInLen)); } - vtkm::Id GetCoeffLength2( vtkm::Id sigInX, vtkm::Id sigInY ) + vtkm::Id GetCoeffLength2(vtkm::Id sigInX, vtkm::Id sigInY) { - return( GetCoeffLength( sigInX) * GetCoeffLength( sigInY ) ); + return (GetCoeffLength(sigInX) * GetCoeffLength(sigInY)); } - vtkm::Id GetCoeffLength3( vtkm::Id sigInX, vtkm::Id sigInY, vtkm::Id sigInZ) + vtkm::Id GetCoeffLength3(vtkm::Id sigInX, vtkm::Id sigInY, vtkm::Id sigInZ) { - return( GetCoeffLength( sigInX) * GetCoeffLength( sigInY ) * GetCoeffLength( sigInZ ) ); + return (GetCoeffLength(sigInX) * GetCoeffLength(sigInY) * GetCoeffLength(sigInZ)); } - - // Returns maximum wavelet decompostion level - vtkm::Id GetWaveletMaxLevel( vtkm::Id sigInLen ) + vtkm::Id GetWaveletMaxLevel(vtkm::Id sigInLen) { vtkm::Id filterLen = this->filter.GetFilterLength(); vtkm::Id level; - this->WaveLengthValidate( sigInLen, filterLen, level ); + this->WaveLengthValidate(sigInLen, filterLen, level); return level; } - - // perform a device copy. The whole 1st array to a certain start location of the 2nd array - template< typename ArrayType1, typename ArrayType2, typename DeviceTag > - void DeviceCopyStartX( const ArrayType1 &srcArray, - ArrayType2 &dstArray, - vtkm::Id startIdx, - DeviceTag ) + template + void DeviceCopyStartX(const ArrayType1& srcArray, ArrayType2& dstArray, vtkm::Id startIdx, + DeviceTag) { - typedef vtkm::worklet::wavelets::CopyWorklet CopyType; - CopyType cp( startIdx ); - vtkm::worklet::DispatcherMapField< CopyType, DeviceTag > dispatcher( cp ); - dispatcher.Invoke( srcArray, dstArray ); + typedef vtkm::worklet::wavelets::CopyWorklet CopyType; + CopyType cp(startIdx); + vtkm::worklet::DispatcherMapField dispatcher(cp); + dispatcher.Invoke(srcArray, dstArray); } - - // Assign zero value to a certain location of an array - template< typename ArrayType, typename DeviceTag > - void DeviceAssignZero( ArrayType &array, vtkm::Id index, DeviceTag ) + template + void DeviceAssignZero(ArrayType& array, vtkm::Id index, DeviceTag) { typedef vtkm::worklet::wavelets::AssignZeroWorklet ZeroWorklet; - ZeroWorklet worklet( index ); - vtkm::worklet::DispatcherMapField< ZeroWorklet, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( array ); + ZeroWorklet worklet(index); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(array); } - - // Assign zeros to a certain row to a matrix - template< typename ArrayType, typename DeviceTag > - void DeviceAssignZero2DRow( ArrayType &array, vtkm::Id dimX, vtkm::Id dimY, // input - vtkm::Id rowIdx, DeviceTag ) + template + void DeviceAssignZero2DRow(ArrayType& array, vtkm::Id dimX, vtkm::Id dimY, // input + vtkm::Id rowIdx, DeviceTag) { - typedef vtkm::worklet::wavelets::AssignZero2DWorklet AssignZero2DType; - AssignZero2DType zeroWorklet( dimX, dimY, -1, rowIdx ); - vtkm::worklet::DispatcherMapField< AssignZero2DType, DeviceTag > - dispatcher( zeroWorklet ); - dispatcher.Invoke( array ); + typedef vtkm::worklet::wavelets::AssignZero2DWorklet AssignZero2DType; + AssignZero2DType zeroWorklet(dimX, dimY, -1, rowIdx); + vtkm::worklet::DispatcherMapField dispatcher(zeroWorklet); + dispatcher.Invoke(array); } - - // Assign zeros to a certain column to a matrix - template< typename ArrayType, typename DeviceTag > - void DeviceAssignZero2DColumn( ArrayType &array, vtkm::Id dimX, vtkm::Id dimY, // input - vtkm::Id colIdx, DeviceTag ) + template + void DeviceAssignZero2DColumn(ArrayType& array, vtkm::Id dimX, vtkm::Id dimY, // input + vtkm::Id colIdx, DeviceTag) { - typedef vtkm::worklet::wavelets::AssignZero2DWorklet AssignZero2DType; - AssignZero2DType zeroWorklet( dimX, dimY, colIdx, -1 ); - vtkm::worklet::DispatcherMapField< AssignZero2DType, DeviceTag > - dispatcher( zeroWorklet ); - dispatcher.Invoke( array ); + typedef vtkm::worklet::wavelets::AssignZero2DWorklet AssignZero2DType; + AssignZero2DType zeroWorklet(dimX, dimY, colIdx, -1); + vtkm::worklet::DispatcherMapField dispatcher(zeroWorklet); + dispatcher.Invoke(array); } - - // Assign zeros to a plane that's perpendicular to the X axis (Left-Right direction) - template< typename ArrayType, typename DeviceTag > - void DeviceAssignZero3DPlaneX( ArrayType &array, // input array - vtkm::Id dimX, vtkm::Id dimY, vtkm::Id dimZ, // dims of input - vtkm::Id zeroX, // X idx to set zero - DeviceTag ) + template + void DeviceAssignZero3DPlaneX(ArrayType& array, // input array + vtkm::Id dimX, vtkm::Id dimY, vtkm::Id dimZ, // dims of input + vtkm::Id zeroX, // X idx to set zero + DeviceTag) { - typedef vtkm::worklet::wavelets::AssignZero3DWorklet AssignZero3DType; - AssignZero3DType zeroWorklet( dimX, dimY, dimZ, zeroX, -1, -1 ); - vtkm::worklet::DispatcherMapField< AssignZero3DType, DeviceTag > dispatcher( zeroWorklet ); - dispatcher.Invoke( array ); + typedef vtkm::worklet::wavelets::AssignZero3DWorklet AssignZero3DType; + AssignZero3DType zeroWorklet(dimX, dimY, dimZ, zeroX, -1, -1); + vtkm::worklet::DispatcherMapField dispatcher(zeroWorklet); + dispatcher.Invoke(array); } - - // Assign zeros to a plane that's perpendicular to the Y axis (Top-Down direction) - template< typename ArrayType, typename DeviceTag > - void DeviceAssignZero3DPlaneY( ArrayType &array, // input array - vtkm::Id dimX, vtkm::Id dimY, vtkm::Id dimZ, // dims of input - vtkm::Id zeroY, // Y idx to set zero - DeviceTag ) + template + void DeviceAssignZero3DPlaneY(ArrayType& array, // input array + vtkm::Id dimX, vtkm::Id dimY, vtkm::Id dimZ, // dims of input + vtkm::Id zeroY, // Y idx to set zero + DeviceTag) { - typedef vtkm::worklet::wavelets::AssignZero3DWorklet AssignZero3DType; - AssignZero3DType zeroWorklet( dimX, dimY, dimZ, -1, zeroY, -1 ); - vtkm::worklet::DispatcherMapField< AssignZero3DType, DeviceTag > dispatcher( zeroWorklet ); - dispatcher.Invoke( array ); + typedef vtkm::worklet::wavelets::AssignZero3DWorklet AssignZero3DType; + AssignZero3DType zeroWorklet(dimX, dimY, dimZ, -1, zeroY, -1); + vtkm::worklet::DispatcherMapField dispatcher(zeroWorklet); + dispatcher.Invoke(array); } - - // Assign zeros to a plane that's perpendicular to the Z axis (Front-Back direction) - template< typename ArrayType, typename DeviceTag > - void DeviceAssignZero3DPlaneZ( ArrayType &array, // input array - vtkm::Id dimX, vtkm::Id dimY, vtkm::Id dimZ, // dims of input - vtkm::Id zeroZ, // Y idx to set zero - DeviceTag ) + template + void DeviceAssignZero3DPlaneZ(ArrayType& array, // input array + vtkm::Id dimX, vtkm::Id dimY, vtkm::Id dimZ, // dims of input + vtkm::Id zeroZ, // Y idx to set zero + DeviceTag) { - typedef vtkm::worklet::wavelets::AssignZero3DWorklet AssignZero3DType; - AssignZero3DType zeroWorklet( dimX, dimY, dimZ, -1, -1, zeroZ ); - vtkm::worklet::DispatcherMapField< AssignZero3DType, DeviceTag > dispatcher( zeroWorklet ); - dispatcher.Invoke( array ); + typedef vtkm::worklet::wavelets::AssignZero3DWorklet AssignZero3DType; + AssignZero3DType zeroWorklet(dimX, dimY, dimZ, -1, -1, zeroZ); + vtkm::worklet::DispatcherMapField dispatcher(zeroWorklet); + dispatcher.Invoke(array); } - - // Sort by the absolute value on device struct SortLessAbsFunctor { - template< typename T > - VTKM_EXEC - bool operator()(const T& x, const T& y) const + template + VTKM_EXEC bool operator()(const T& x, const T& y) const { return vtkm::Abs(x) < vtkm::Abs(y); } }; - template< typename ArrayType, typename DeviceTag > - void DeviceSort( ArrayType &array, DeviceTag ) + template + void DeviceSort(ArrayType& array, DeviceTag) { - vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Sort - ( array, SortLessAbsFunctor() ); + vtkm::cont::DeviceAdapterAlgorithm::Sort(array, SortLessAbsFunctor()); } - - // Reduce to the sum of all values on device - template< typename ArrayType, typename DeviceTag > - typename ArrayType::ValueType DeviceSum( const ArrayType &array, DeviceTag ) + template + typename ArrayType::ValueType DeviceSum(const ArrayType& array, DeviceTag) { - return vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Reduce - ( array, static_cast(0.0) ); + return vtkm::cont::DeviceAdapterAlgorithm::Reduce( + array, static_cast(0.0)); } - - // Helper functors for finding the max and min of an array struct minFunctor { - template< typename FieldType > - VTKM_EXEC - FieldType operator()(const FieldType &x, const FieldType &y) const { + template + VTKM_EXEC FieldType operator()(const FieldType& x, const FieldType& y) const + { return Min(x, y); } }; struct maxFunctor { - template< typename FieldType > - VTKM_EXEC - FieldType operator()(const FieldType& x, const FieldType& y) const { + template + VTKM_EXEC FieldType operator()(const FieldType& x, const FieldType& y) const + { return vtkm::Max(x, y); } }; - - // Device Min and Max functions - template< typename ArrayType, typename DeviceTag > - typename ArrayType::ValueType DeviceMax( const ArrayType &array, DeviceTag ) + template + typename ArrayType::ValueType DeviceMax(const ArrayType& array, DeviceTag) { typename ArrayType::ValueType initVal = array.GetPortalConstControl().Get(0); - return vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Reduce - ( array, initVal, maxFunctor() ); + return vtkm::cont::DeviceAdapterAlgorithm::Reduce(array, initVal, maxFunctor()); } - template< typename ArrayType, typename DeviceTag > - typename ArrayType::ValueType DeviceMin( const ArrayType &array, DeviceTag ) + template + typename ArrayType::ValueType DeviceMin(const ArrayType& array, DeviceTag) { typename ArrayType::ValueType initVal = array.GetPortalConstControl().Get(0); - return vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Reduce - ( array, initVal, minFunctor() ); + return vtkm::cont::DeviceAdapterAlgorithm::Reduce(array, initVal, minFunctor()); } - - // Max absolute value of an array struct maxAbsFunctor { - template< typename FieldType > - VTKM_EXEC - FieldType operator()(const FieldType& x, const FieldType& y) const { - return vtkm::Max( vtkm::Abs(x), vtkm::Abs(y) ); + template + VTKM_EXEC FieldType operator()(const FieldType& x, const FieldType& y) const + { + return vtkm::Max(vtkm::Abs(x), vtkm::Abs(y)); } }; - template< typename ArrayType, typename DeviceTag > - typename ArrayType::ValueType DeviceMaxAbs( const ArrayType &array, DeviceTag ) + template + typename ArrayType::ValueType DeviceMaxAbs(const ArrayType& array, DeviceTag) { typename ArrayType::ValueType initVal = array.GetPortalConstControl().Get(0); - return vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Reduce - ( array, initVal, maxAbsFunctor() ); + return vtkm::cont::DeviceAdapterAlgorithm::Reduce(array, initVal, maxAbsFunctor()); } - - // Calculate variance of an array - template< typename ArrayType, typename DeviceTag > - vtkm::Float64 DeviceCalculateVariance( ArrayType &array, DeviceTag ) + template + vtkm::Float64 DeviceCalculateVariance(ArrayType& array, DeviceTag) { - vtkm::Float64 mean = static_cast(this->DeviceSum( array, DeviceTag() )) / - static_cast(array.GetNumberOfValues()); + vtkm::Float64 mean = static_cast(this->DeviceSum(array, DeviceTag())) / + static_cast(array.GetNumberOfValues()); - vtkm::cont::ArrayHandle< vtkm::Float64 > squaredDeviation; + vtkm::cont::ArrayHandle squaredDeviation; // Use a worklet typedef vtkm::worklet::wavelets::SquaredDeviation SDWorklet; - SDWorklet sdw( mean ); - vtkm::worklet::DispatcherMapField< SDWorklet, DeviceTag > dispatcher( sdw ); - dispatcher.Invoke( array, squaredDeviation ); + SDWorklet sdw(mean); + vtkm::worklet::DispatcherMapField dispatcher(sdw); + dispatcher.Invoke(array, squaredDeviation); - vtkm::Float64 sdMean = this->DeviceSum( squaredDeviation, DeviceTag() ) / - static_cast( squaredDeviation.GetNumberOfValues() ); + vtkm::Float64 sdMean = this->DeviceSum(squaredDeviation, DeviceTag()) / + static_cast(squaredDeviation.GetNumberOfValues()); return sdMean; } - - // Copy a small rectangle to a big rectangle - template< typename SmallArrayType, typename BigArrayType, typename DeviceTag> - void DeviceRectangleCopyTo( const SmallArrayType &smallRect, - vtkm::Id smallX, - vtkm::Id smallY, - BigArrayType &bigRect, - vtkm::Id bigX, - vtkm::Id bigY, - vtkm::Id startX, - vtkm::Id startY, - DeviceTag ) + template + void DeviceRectangleCopyTo(const SmallArrayType& smallRect, vtkm::Id smallX, vtkm::Id smallY, + BigArrayType& bigRect, vtkm::Id bigX, vtkm::Id bigY, vtkm::Id startX, + vtkm::Id startY, DeviceTag) { - typedef vtkm::worklet::wavelets::RectangleCopyTo CopyToWorklet; - CopyToWorklet cp( smallX, smallY, bigX, bigY, startX, startY ); - vtkm::worklet::DispatcherMapField< CopyToWorklet, DeviceTag > dispatcher( cp ); + typedef vtkm::worklet::wavelets::RectangleCopyTo CopyToWorklet; + CopyToWorklet cp(smallX, smallY, bigX, bigY, startX, startY); + vtkm::worklet::DispatcherMapField dispatcher(cp); dispatcher.Invoke(smallRect, bigRect); } - - // Copy a small cube to a big cube - template< typename SmallArrayType, typename BigArrayType, typename DeviceTag> - void DeviceCubeCopyTo( const SmallArrayType &smallCube, - vtkm::Id smallX, vtkm::Id smallY, vtkm::Id smallZ, - BigArrayType &bigCube, - vtkm::Id bigX, vtkm::Id bigY, vtkm::Id bigZ, - vtkm::Id startX, vtkm::Id startY, vtkm::Id startZ, - DeviceTag ) + template + void DeviceCubeCopyTo(const SmallArrayType& smallCube, vtkm::Id smallX, vtkm::Id smallY, + vtkm::Id smallZ, BigArrayType& bigCube, vtkm::Id bigX, vtkm::Id bigY, + vtkm::Id bigZ, vtkm::Id startX, vtkm::Id startY, vtkm::Id startZ, DeviceTag) { - typedef vtkm::worklet::wavelets::CubeCopyTo CopyToWorklet; - CopyToWorklet cp( smallX, smallY, smallZ, bigX, bigY, bigZ, startX, startY, startZ ); - vtkm::worklet::DispatcherMapField< CopyToWorklet, DeviceTag > dispatcher( cp ); + typedef vtkm::worklet::wavelets::CubeCopyTo CopyToWorklet; + CopyToWorklet cp(smallX, smallY, smallZ, bigX, bigY, bigZ, startX, startY, startZ); + vtkm::worklet::DispatcherMapField dispatcher(cp); dispatcher.Invoke(smallCube, bigCube); } - - - - template< typename ArrayType > - void Print2DArray( const std::string &str, const ArrayType &arr, vtkm::Id dimX ) + template + void Print2DArray(const std::string& str, const ArrayType& arr, vtkm::Id dimX) { std::cerr << str << std::endl; - for( vtkm::Id i = 0; i < arr.GetNumberOfValues(); i++ ) + for (vtkm::Id i = 0; i < arr.GetNumberOfValues(); i++) { std::cerr << arr.GetPortalConstControl().Get(i) << " "; - if( i % dimX == dimX - 1 ) + if (i % dimX == dimX - 1) { std::cerr << std::endl; } } } - - protected: - WaveletName wname; - DWTMode wmode; - WaveletFilter filter; + WaveletName wname; + DWTMode wmode; + WaveletFilter filter; - void WaveLengthValidate( vtkm::Id sigInLen, vtkm::Id filterLength, vtkm::Id &level) + void WaveLengthValidate(vtkm::Id sigInLen, vtkm::Id filterLength, vtkm::Id& level) { - if( sigInLen < filterLength ) + if (sigInLen < filterLength) { level = 0; } else { - level = static_cast( vtkm::Floor( 1.0 + - vtkm::Log2( static_cast(sigInLen) / - static_cast(filterLength) ) ) ); + level = static_cast( + vtkm::Floor(1.0 + vtkm::Log2(static_cast(sigInLen) / + static_cast(filterLength)))); } } -}; // class WaveletBase. +}; // class WaveletBase. +} // namespace wavelets -} // namespace wavelets - -} // namespace worklet -} // namespace vtkm +} // namespace worklet +} // namespace vtkm #endif diff --git a/vtkm/worklet/wavelets/WaveletDWT.h b/vtkm/worklet/wavelets/WaveletDWT.h index b863fdd36..4983e3daf 100644 --- a/vtkm/worklet/wavelets/WaveletDWT.h +++ b/vtkm/worklet/wavelets/WaveletDWT.h @@ -18,7 +18,6 @@ // this software. //============================================================================ - #ifndef vtk_m_worklet_wavelets_waveletdwt_h #define vtk_m_worklet_wavelets_waveletdwt_h @@ -33,402 +32,324 @@ #include #include -namespace vtkm { -namespace worklet { -namespace wavelets { +namespace vtkm +{ +namespace worklet +{ +namespace wavelets +{ class WaveletDWT : public WaveletBase { public: - // Constructor - WaveletDWT( WaveletName name ) : WaveletBase( name ) {} + WaveletDWT(WaveletName name) + : WaveletBase(name) + { + } // Function: extend a cube in X direction - template< typename SigInArrayType, typename ExtensionArrayType, typename DeviceTag > - vtkm::Id Extend3DLeftRight( - const SigInArrayType &sigIn, // input - vtkm::Id sigDimX, vtkm::Id sigDimY, vtkm::Id sigDimZ, - vtkm::Id sigStartX, vtkm::Id sigStartY, vtkm::Id sigStartZ, - vtkm::Id sigPretendDimX, vtkm::Id sigPretendDimY, vtkm::Id sigPretendDimZ, - ExtensionArrayType &ext1, // output - ExtensionArrayType &ext2, // output - vtkm::Id addLen, - vtkm::worklet::wavelets::DWTMode ext1Method, - vtkm::worklet::wavelets::DWTMode ext2Method, - bool pretendSigPaddedZero, - bool padZeroAtExt2, - DeviceTag ) + template + vtkm::Id Extend3DLeftRight(const SigInArrayType& sigIn, // input + vtkm::Id sigDimX, vtkm::Id sigDimY, vtkm::Id sigDimZ, + vtkm::Id sigStartX, vtkm::Id sigStartY, vtkm::Id sigStartZ, + vtkm::Id sigPretendDimX, vtkm::Id sigPretendDimY, + vtkm::Id sigPretendDimZ, + ExtensionArrayType& ext1, // output + ExtensionArrayType& ext2, // output + vtkm::Id addLen, vtkm::worklet::wavelets::DWTMode ext1Method, + vtkm::worklet::wavelets::DWTMode ext2Method, bool pretendSigPaddedZero, + bool padZeroAtExt2, DeviceTag) { // pretendSigPaddedZero and padZeroAtExt2 cannot happen at the same time - VTKM_ASSERT( !pretendSigPaddedZero || !padZeroAtExt2 ); + VTKM_ASSERT(!pretendSigPaddedZero || !padZeroAtExt2); - if( addLen == 0 ) // Haar kernel + if (addLen == 0) // Haar kernel { - ext1.PrepareForOutput( 0, DeviceTag() ); // No extension on the left side - if( pretendSigPaddedZero || padZeroAtExt2 ) // plane of size 1*dimY*dimZ + ext1.PrepareForOutput(0, DeviceTag()); // No extension on the left side + if (pretendSigPaddedZero || padZeroAtExt2) // plane of size 1*dimY*dimZ { - ext2.PrepareForOutput( sigPretendDimY * sigPretendDimZ, DeviceTag() ); - WaveletBase::DeviceAssignZero3DPlaneX( ext2, - 1, sigPretendDimY, sigPretendDimZ, - 0, - DeviceTag() ); + ext2.PrepareForOutput(sigPretendDimY * sigPretendDimZ, DeviceTag()); + WaveletBase::DeviceAssignZero3DPlaneX(ext2, 1, sigPretendDimY, sigPretendDimZ, 0, + DeviceTag()); } else { - ext2.PrepareForOutput( 0, DeviceTag() ); // No extension on the right side + ext2.PrepareForOutput(0, DeviceTag()); // No extension on the right side } return 0; } - typedef typename SigInArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle< ValueType > ExtendArrayType; - typedef vtkm::worklet::wavelets::ExtensionWorklet3D ExtensionWorklet; - typedef typename vtkm::worklet::DispatcherMapField< ExtensionWorklet, DeviceTag > - DispatcherType; - vtkm::Id extDimX, extDimY, extDimZ; - vtkm::worklet::wavelets::ExtensionDirection dir; + typedef typename SigInArrayType::ValueType ValueType; + typedef vtkm::cont::ArrayHandle ExtendArrayType; + typedef vtkm::worklet::wavelets::ExtensionWorklet3D ExtensionWorklet; + typedef typename vtkm::worklet::DispatcherMapField DispatcherType; + vtkm::Id extDimX, extDimY, extDimZ; + vtkm::worklet::wavelets::ExtensionDirection dir; - { // First work on left extension - dir = LEFT; - extDimX = addLen; - extDimY = sigPretendDimY; - extDimZ = sigPretendDimZ; + { // First work on left extension + dir = LEFT; + extDimX = addLen; + extDimY = sigPretendDimY; + extDimZ = sigPretendDimZ; - ext1.PrepareForOutput( extDimX * extDimY * extDimZ, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, extDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, ext1Method, - dir, - false ); // not treating input signal as having zeros - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext1, sigIn ); + ext1.PrepareForOutput(extDimX * extDimY * extDimZ, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ, sigStartX, + sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + ext1Method, dir, + false); // not treating input signal as having zeros + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext1, sigIn); } // Then work on right extension - dir = RIGHT; + dir = RIGHT; extDimY = sigPretendDimY; extDimZ = sigPretendDimZ; - if( !pretendSigPaddedZero && !padZeroAtExt2 ) + if (!pretendSigPaddedZero && !padZeroAtExt2) { extDimX = addLen; - ext2.PrepareForOutput( extDimX * extDimY * extDimZ, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, extDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - ext2Method, - dir, - false ); - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext2, sigIn ); + ext2.PrepareForOutput(extDimX * extDimY * extDimZ, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ, sigStartX, + sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + ext2Method, dir, false); + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext2, sigIn); } - else if( !pretendSigPaddedZero && padZeroAtExt2 ) - { // This case is not exactly padding a zero at the end of Ext2. - // Rather, it is to increase extension length by one and fill it - // to be whatever mirrorred. - extDimX = addLen+1; - ext2.PrepareForOutput( extDimX * extDimY * extDimZ, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, extDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - ext2Method, - dir, - false ); - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext2, sigIn ); + else if (!pretendSigPaddedZero && padZeroAtExt2) + { // This case is not exactly padding a zero at the end of Ext2. + // Rather, it is to increase extension length by one and fill it + // to be whatever mirrorred. + extDimX = addLen + 1; + ext2.PrepareForOutput(extDimX * extDimY * extDimZ, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ, sigStartX, + sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + ext2Method, dir, false); + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext2, sigIn); } - else // pretendSigPaddedZero + else // pretendSigPaddedZero { ExtendArrayType ext2Temp; extDimX = addLen; - ext2Temp.PrepareForOutput( extDimX * extDimY * extDimZ, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, extDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - ext2Method, - dir, - true ); // pretend sig is padded a zero - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext2Temp, sigIn ); + ext2Temp.PrepareForOutput(extDimX * extDimY * extDimZ, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ, sigStartX, + sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + ext2Method, dir, + true); // pretend sig is padded a zero + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext2Temp, sigIn); // Give ext2 one layer thicker to hold the pretend zeros from signal. - ext2.PrepareForOutput( (extDimX+1) * extDimY * extDimZ, DeviceTag() ); - WaveletBase::DeviceCubeCopyTo( ext2Temp, - extDimX, extDimY, extDimZ, - ext2, - extDimX+1, extDimY, extDimZ, - 1, 0, 0, - DeviceTag() ); - WaveletBase::DeviceAssignZero3DPlaneX( ext2, - extDimX+1, extDimY, extDimZ, - 0, - DeviceTag() ); + ext2.PrepareForOutput((extDimX + 1) * extDimY * extDimZ, DeviceTag()); + WaveletBase::DeviceCubeCopyTo(ext2Temp, extDimX, extDimY, extDimZ, ext2, extDimX + 1, extDimY, + extDimZ, 1, 0, 0, DeviceTag()); + WaveletBase::DeviceAssignZero3DPlaneX(ext2, extDimX + 1, extDimY, extDimZ, 0, DeviceTag()); } return 0; } // Function: extend a cube in Y direction - template< typename SigInArrayType, typename ExtensionArrayType, typename DeviceTag > - vtkm::Id Extend3DTopDown( - const SigInArrayType &sigIn, // input - vtkm::Id sigDimX, vtkm::Id sigDimY, vtkm::Id sigDimZ, - vtkm::Id sigStartX, vtkm::Id sigStartY, vtkm::Id sigStartZ, - vtkm::Id sigPretendDimX, vtkm::Id sigPretendDimY, vtkm::Id sigPretendDimZ, - ExtensionArrayType &ext1, // output - ExtensionArrayType &ext2, // output - vtkm::Id addLen, - vtkm::worklet::wavelets::DWTMode ext1Method, - vtkm::worklet::wavelets::DWTMode ext2Method, - bool pretendSigPaddedZero, - bool padZeroAtExt2, - DeviceTag ) + template + vtkm::Id Extend3DTopDown(const SigInArrayType& sigIn, // input + vtkm::Id sigDimX, vtkm::Id sigDimY, vtkm::Id sigDimZ, vtkm::Id sigStartX, + vtkm::Id sigStartY, vtkm::Id sigStartZ, vtkm::Id sigPretendDimX, + vtkm::Id sigPretendDimY, vtkm::Id sigPretendDimZ, + ExtensionArrayType& ext1, // output + ExtensionArrayType& ext2, // output + vtkm::Id addLen, vtkm::worklet::wavelets::DWTMode ext1Method, + vtkm::worklet::wavelets::DWTMode ext2Method, bool pretendSigPaddedZero, + bool padZeroAtExt2, DeviceTag) { // pretendSigPaddedZero and padZeroAtExt2 cannot happen at the same time - VTKM_ASSERT( !pretendSigPaddedZero || !padZeroAtExt2 ); + VTKM_ASSERT(!pretendSigPaddedZero || !padZeroAtExt2); - if( addLen == 0 ) // Haar kernel + if (addLen == 0) // Haar kernel { - ext1.PrepareForOutput( 0, DeviceTag() ); // No extension on the top side - if( pretendSigPaddedZero || padZeroAtExt2 ) // plane of size dimX*dimZ + ext1.PrepareForOutput(0, DeviceTag()); // No extension on the top side + if (pretendSigPaddedZero || padZeroAtExt2) // plane of size dimX*dimZ { - ext2.PrepareForOutput( sigPretendDimX * 1 * sigPretendDimZ, DeviceTag() ); - WaveletBase::DeviceAssignZero3DPlaneY( ext2, - sigPretendDimX, 1, sigPretendDimZ, - 0, - DeviceTag() ); + ext2.PrepareForOutput(sigPretendDimX * 1 * sigPretendDimZ, DeviceTag()); + WaveletBase::DeviceAssignZero3DPlaneY(ext2, sigPretendDimX, 1, sigPretendDimZ, 0, + DeviceTag()); } else { - ext2.PrepareForOutput( 0, DeviceTag() ); // No extension on the right side + ext2.PrepareForOutput(0, DeviceTag()); // No extension on the right side } return 0; } - typedef typename SigInArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle< ValueType > ExtendArrayType; - typedef vtkm::worklet::wavelets::ExtensionWorklet3D ExtensionWorklet; - typedef typename vtkm::worklet::DispatcherMapField< ExtensionWorklet, DeviceTag > - DispatcherType; - vtkm::Id extDimX, extDimY, extDimZ; - vtkm::worklet::wavelets::ExtensionDirection dir; + typedef typename SigInArrayType::ValueType ValueType; + typedef vtkm::cont::ArrayHandle ExtendArrayType; + typedef vtkm::worklet::wavelets::ExtensionWorklet3D ExtensionWorklet; + typedef typename vtkm::worklet::DispatcherMapField DispatcherType; + vtkm::Id extDimX, extDimY, extDimZ; + vtkm::worklet::wavelets::ExtensionDirection dir; - { // First work on top extension - dir = TOP; - extDimX = sigPretendDimX; - extDimY = addLen; - extDimZ = sigPretendDimZ; + { // First work on top extension + dir = TOP; + extDimX = sigPretendDimX; + extDimY = addLen; + extDimZ = sigPretendDimZ; - ext1.PrepareForOutput( extDimX * extDimY * extDimZ, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, extDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - ext1Method, - dir, - false ); // not treating input signal as having zeros - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext1, sigIn ); + ext1.PrepareForOutput(extDimX * extDimY * extDimZ, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ, sigStartX, + sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + ext1Method, dir, + false); // not treating input signal as having zeros + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext1, sigIn); } // Then work on bottom extension - dir = BOTTOM; + dir = BOTTOM; extDimX = sigPretendDimX; extDimZ = sigPretendDimZ; - if( !pretendSigPaddedZero && !padZeroAtExt2 ) + if (!pretendSigPaddedZero && !padZeroAtExt2) { extDimY = addLen; - ext2.PrepareForOutput( extDimX * extDimY * extDimZ, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, extDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - ext2Method, - dir, - false ); - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext2, sigIn ); + ext2.PrepareForOutput(extDimX * extDimY * extDimZ, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ, sigStartX, + sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + ext2Method, dir, false); + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext2, sigIn); } - else if( !pretendSigPaddedZero && padZeroAtExt2 ) - { // This case is not exactly padding a zero at the end of Ext2. - // Rather, it is to increase extension length by one and fill it - // to be whatever mirrorred. + else if (!pretendSigPaddedZero && padZeroAtExt2) + { // This case is not exactly padding a zero at the end of Ext2. + // Rather, it is to increase extension length by one and fill it + // to be whatever mirrorred. extDimY = addLen + 1; - ext2.PrepareForOutput( extDimX * extDimY * extDimZ, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, extDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - ext2Method, - dir, - false ); - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext2, sigIn ); + ext2.PrepareForOutput(extDimX * extDimY * extDimZ, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ, sigStartX, + sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + ext2Method, dir, false); + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext2, sigIn); } - else // pretendSigPaddedZero + else // pretendSigPaddedZero { ExtendArrayType ext2Temp; extDimY = addLen; - ext2Temp.PrepareForOutput( extDimX * extDimY * extDimZ, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, extDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - ext2Method, - dir, - true ); // pretend sig is padded a zero - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext2Temp, sigIn ); + ext2Temp.PrepareForOutput(extDimX * extDimY * extDimZ, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ, sigStartX, + sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + ext2Method, dir, + true); // pretend sig is padded a zero + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext2Temp, sigIn); // Give ext2 one layer thicker to hold the pretend zeros from signal. - ext2.PrepareForOutput( extDimX * (extDimY+1) * extDimZ, DeviceTag() ); - WaveletBase::DeviceCubeCopyTo( ext2Temp, - extDimX, extDimY, extDimZ, - ext2, - extDimX, extDimY + 1, extDimZ, - 0, 1, 0, - DeviceTag() ); - WaveletBase::DeviceAssignZero3DPlaneY( ext2, - extDimX, extDimY + 1, extDimZ, - 0, - DeviceTag() ); + ext2.PrepareForOutput(extDimX * (extDimY + 1) * extDimZ, DeviceTag()); + WaveletBase::DeviceCubeCopyTo(ext2Temp, extDimX, extDimY, extDimZ, ext2, extDimX, extDimY + 1, + extDimZ, 0, 1, 0, DeviceTag()); + WaveletBase::DeviceAssignZero3DPlaneY(ext2, extDimX, extDimY + 1, extDimZ, 0, DeviceTag()); } return 0; } // Function: extend a cube in Z direction - template< typename SigInArrayType, typename ExtensionArrayType, typename DeviceTag > - vtkm::Id Extend3DFrontBack( - const SigInArrayType &sigIn, // input - vtkm::Id sigDimX, vtkm::Id sigDimY, vtkm::Id sigDimZ, - vtkm::Id sigStartX, vtkm::Id sigStartY, vtkm::Id sigStartZ, - vtkm::Id sigPretendDimX, vtkm::Id sigPretendDimY, vtkm::Id sigPretendDimZ, - ExtensionArrayType &ext1, // output - ExtensionArrayType &ext2, // output - vtkm::Id addLen, - vtkm::worklet::wavelets::DWTMode ext1Method, - vtkm::worklet::wavelets::DWTMode ext2Method, - bool pretendSigPaddedZero, - bool padZeroAtExt2, - DeviceTag ) + template + vtkm::Id Extend3DFrontBack(const SigInArrayType& sigIn, // input + vtkm::Id sigDimX, vtkm::Id sigDimY, vtkm::Id sigDimZ, + vtkm::Id sigStartX, vtkm::Id sigStartY, vtkm::Id sigStartZ, + vtkm::Id sigPretendDimX, vtkm::Id sigPretendDimY, + vtkm::Id sigPretendDimZ, + ExtensionArrayType& ext1, // output + ExtensionArrayType& ext2, // output + vtkm::Id addLen, vtkm::worklet::wavelets::DWTMode ext1Method, + vtkm::worklet::wavelets::DWTMode ext2Method, bool pretendSigPaddedZero, + bool padZeroAtExt2, DeviceTag) { // pretendSigPaddedZero and padZeroAtExt2 cannot happen at the same time - VTKM_ASSERT( !pretendSigPaddedZero || !padZeroAtExt2 ); + VTKM_ASSERT(!pretendSigPaddedZero || !padZeroAtExt2); - if( addLen == 0 ) // Haar kernel + if (addLen == 0) // Haar kernel { - ext1.PrepareForOutput( 0, DeviceTag() ); // No extension on the front side - if( pretendSigPaddedZero || padZeroAtExt2 ) // plane of size dimX * dimY + ext1.PrepareForOutput(0, DeviceTag()); // No extension on the front side + if (pretendSigPaddedZero || padZeroAtExt2) // plane of size dimX * dimY { - ext2.PrepareForOutput( sigPretendDimX * sigPretendDimY * 1, DeviceTag() ); - WaveletBase::DeviceAssignZero3DPlaneZ( ext2, - sigPretendDimX, sigPretendDimY, 1, - 0, - DeviceTag() ); + ext2.PrepareForOutput(sigPretendDimX * sigPretendDimY * 1, DeviceTag()); + WaveletBase::DeviceAssignZero3DPlaneZ(ext2, sigPretendDimX, sigPretendDimY, 1, 0, + DeviceTag()); } else { - ext2.PrepareForOutput( 0, DeviceTag() ); // No extension on the right side + ext2.PrepareForOutput(0, DeviceTag()); // No extension on the right side } return 0; } - typedef typename SigInArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle< ValueType > ExtendArrayType; - typedef vtkm::worklet::wavelets::ExtensionWorklet3D ExtensionWorklet; - typedef typename vtkm::worklet::DispatcherMapField< ExtensionWorklet, DeviceTag > - DispatcherType; - vtkm::Id extDimX, extDimY, extDimZ; - vtkm::worklet::wavelets::ExtensionDirection dir; + typedef typename SigInArrayType::ValueType ValueType; + typedef vtkm::cont::ArrayHandle ExtendArrayType; + typedef vtkm::worklet::wavelets::ExtensionWorklet3D ExtensionWorklet; + typedef typename vtkm::worklet::DispatcherMapField DispatcherType; + vtkm::Id extDimX, extDimY, extDimZ; + vtkm::worklet::wavelets::ExtensionDirection dir; - { // First work on front extension - dir = FRONT; - extDimX = sigPretendDimX; - extDimY = sigPretendDimY; - extDimZ = addLen; + { // First work on front extension + dir = FRONT; + extDimX = sigPretendDimX; + extDimY = sigPretendDimY; + extDimZ = addLen; - ext1.PrepareForOutput( extDimX * extDimY * extDimZ, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, extDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - ext1Method, - dir, - false ); // not treating input signal as having zeros - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext1, sigIn ); + ext1.PrepareForOutput(extDimX * extDimY * extDimZ, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ, sigStartX, + sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + ext1Method, dir, + false); // not treating input signal as having zeros + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext1, sigIn); } // Then work on back extension - dir = BACK; + dir = BACK; extDimX = sigPretendDimX; extDimY = sigPretendDimY; - if( !pretendSigPaddedZero && !padZeroAtExt2 ) + if (!pretendSigPaddedZero && !padZeroAtExt2) { extDimZ = addLen; - ext2.PrepareForOutput( extDimX * extDimY * extDimZ, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, extDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - ext2Method, - dir, - false ); - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext2, sigIn ); + ext2.PrepareForOutput(extDimX * extDimY * extDimZ, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ, sigStartX, + sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + ext2Method, dir, false); + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext2, sigIn); } - else if( !pretendSigPaddedZero && padZeroAtExt2 ) - { // This case is not exactly padding a zero at the end of Ext2. - // Rather, it is to increase extension length by one and fill it - // to be whatever mirrorred. + else if (!pretendSigPaddedZero && padZeroAtExt2) + { // This case is not exactly padding a zero at the end of Ext2. + // Rather, it is to increase extension length by one and fill it + // to be whatever mirrorred. extDimZ = addLen + 1; - ext2.PrepareForOutput( extDimX * extDimY * extDimZ, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, extDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - ext2Method, - dir, - false ); - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext2, sigIn ); + ext2.PrepareForOutput(extDimX * extDimY * extDimZ, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ, sigStartX, + sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + ext2Method, dir, false); + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext2, sigIn); } - else // pretendSigPaddedZero + else // pretendSigPaddedZero { ExtendArrayType ext2Temp; extDimZ = addLen; - ext2Temp.PrepareForOutput( extDimX * extDimY * extDimZ, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, extDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - ext2Method, - dir, - true ); // pretend sig is padded a zero - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext2Temp, sigIn ); + ext2Temp.PrepareForOutput(extDimX * extDimY * extDimZ, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ, sigStartX, + sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + ext2Method, dir, + true); // pretend sig is padded a zero + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext2Temp, sigIn); // Give ext2 one layer thicker to hold the pretend zeros from signal. - ext2.PrepareForOutput( extDimX * extDimY * (extDimZ+1), DeviceTag() ); - WaveletBase::DeviceCubeCopyTo( ext2Temp, - extDimX, extDimY, extDimZ, - ext2, - extDimX, extDimY, extDimZ + 1, - 0, 0, 1, - DeviceTag() ); - WaveletBase::DeviceAssignZero3DPlaneZ( ext2, - extDimX, extDimY, extDimZ + 1, - 0, - DeviceTag() ); + ext2.PrepareForOutput(extDimX * extDimY * (extDimZ + 1), DeviceTag()); + WaveletBase::DeviceCubeCopyTo(ext2Temp, extDimX, extDimY, extDimZ, ext2, extDimX, extDimY, + extDimZ + 1, 0, 0, 1, DeviceTag()); + WaveletBase::DeviceAssignZero3DPlaneZ(ext2, extDimX, extDimY, extDimZ + 1, 0, DeviceTag()); } return 0; } - - // L[3] L[15] // ----------------------- // / / /| @@ -454,36 +375,34 @@ public: // // Performs one level of 3D discrete wavelet transform on a small cube of input array // The output has the same size as the small cube - template< typename ArrayInType, typename ArrayOutType, typename DeviceTag > - vtkm::Float64 DWT3D ( - ArrayInType &sigIn, - vtkm::Id sigDimX, vtkm::Id sigDimY, vtkm::Id sigDimZ, - vtkm::Id sigStartX, vtkm::Id sigStartY, vtkm::Id sigStartZ, - vtkm::Id sigPretendDimX, vtkm::Id sigPretendDimY, vtkm::Id sigPretendDimZ, - ArrayOutType &coeffOut, - bool discardSigIn, // discard sigIn on devices - DeviceTag ) + template + vtkm::Float64 DWT3D(ArrayInType& sigIn, vtkm::Id sigDimX, vtkm::Id sigDimY, vtkm::Id sigDimZ, + vtkm::Id sigStartX, vtkm::Id sigStartY, vtkm::Id sigStartZ, + vtkm::Id sigPretendDimX, vtkm::Id sigPretendDimY, vtkm::Id sigPretendDimZ, + ArrayOutType& coeffOut, + bool discardSigIn, // discard sigIn on devices + DeviceTag) { std::vector L(27, 0); // LLL - L[0] = WaveletBase::GetApproxLength( sigPretendDimX ); - L[1] = WaveletBase::GetApproxLength( sigPretendDimY ); - L[2] = WaveletBase::GetApproxLength( sigPretendDimZ ); + L[0] = WaveletBase::GetApproxLength(sigPretendDimX); + L[1] = WaveletBase::GetApproxLength(sigPretendDimY); + L[2] = WaveletBase::GetApproxLength(sigPretendDimZ); // LLH - L[3] = L[0]; - L[4] = L[1]; - L[5] = WaveletBase::GetDetailLength( sigPretendDimZ ); + L[3] = L[0]; + L[4] = L[1]; + L[5] = WaveletBase::GetDetailLength(sigPretendDimZ); // LHL - L[6] = L[0]; - L[7] = WaveletBase::GetDetailLength( sigPretendDimY ); - L[8] = L[2]; + L[6] = L[0]; + L[7] = WaveletBase::GetDetailLength(sigPretendDimY); + L[8] = L[2]; // LHH - L[9] = L[0]; + L[9] = L[0]; L[10] = L[7]; L[11] = L[5]; // HLL - L[12] = WaveletBase::GetDetailLength( sigPretendDimX ); + L[12] = WaveletBase::GetDetailLength(sigPretendDimX); L[13] = L[1]; L[14] = L[2]; // HLH @@ -503,146 +422,104 @@ public: L[25] = sigPretendDimY; L[26] = sigPretendDimZ; - vtkm::Id filterLen = WaveletBase::filter.GetFilterLength(); - bool oddLow = true; - if( filterLen % 2 != 0 ) + bool oddLow = true; + if (filterLen % 2 != 0) { oddLow = false; } - vtkm::Id addLen = filterLen / 2; + vtkm::Id addLen = filterLen / 2; - typedef typename ArrayInType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle ArrayType; - typedef vtkm::worklet::wavelets::ForwardTransform3DLeftRight< DeviceTag > LeftRightXFormType; - typedef vtkm::worklet::wavelets::ForwardTransform3DTopDown< DeviceTag > TopDownXFormType; - typedef vtkm::worklet::wavelets::ForwardTransform3DFrontBack< DeviceTag > FrontBackXFormType; - typedef vtkm::worklet::DispatcherMapField< LeftRightXFormType, DeviceTag > LeftRightDispatcherType; - typedef vtkm::worklet::DispatcherMapField< TopDownXFormType, DeviceTag > TopDownDispatcherType; - typedef vtkm::worklet::DispatcherMapField< FrontBackXFormType, DeviceTag > FrontBackDispatcherType; + typedef typename ArrayInType::ValueType ValueType; + typedef vtkm::cont::ArrayHandle ArrayType; + typedef vtkm::worklet::wavelets::ForwardTransform3DLeftRight LeftRightXFormType; + typedef vtkm::worklet::wavelets::ForwardTransform3DTopDown TopDownXFormType; + typedef vtkm::worklet::wavelets::ForwardTransform3DFrontBack FrontBackXFormType; + typedef vtkm::worklet::DispatcherMapField + LeftRightDispatcherType; + typedef vtkm::worklet::DispatcherMapField TopDownDispatcherType; + typedef vtkm::worklet::DispatcherMapField + FrontBackDispatcherType; vtkm::cont::Timer timer; vtkm::Float64 computationTime = 0.0; // First transform in X direction - ArrayType afterX; - afterX.PrepareForOutput( sigPretendDimX * sigPretendDimY * sigPretendDimZ, DeviceTag() ); + ArrayType afterX; + afterX.PrepareForOutput(sigPretendDimX * sigPretendDimY * sigPretendDimZ, DeviceTag()); { - ArrayType leftExt, rightExt; - this->Extend3DLeftRight( sigIn, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - leftExt, - rightExt, - addLen, - WaveletBase::wmode, - WaveletBase::wmode, - false, - false, - DeviceTag() ); - LeftRightXFormType worklet( WaveletBase::filter.GetLowDecomposeFilter(), - WaveletBase::filter.GetHighDecomposeFilter(), - filterLen, - L[0], - oddLow, - addLen, sigPretendDimY, sigPretendDimZ, - sigDimX, sigDimY, sigDimZ, - sigStartX, sigStartY, sigStartZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - addLen, sigPretendDimY, sigPretendDimZ ); + ArrayType leftExt, rightExt; + this->Extend3DLeftRight(sigIn, sigDimX, sigDimY, sigDimZ, sigStartX, sigStartY, sigStartZ, + sigPretendDimX, sigPretendDimY, sigPretendDimZ, leftExt, rightExt, + addLen, WaveletBase::wmode, WaveletBase::wmode, false, false, + DeviceTag()); + LeftRightXFormType worklet( + WaveletBase::filter.GetLowDecomposeFilter(), WaveletBase::filter.GetHighDecomposeFilter(), + filterLen, L[0], oddLow, addLen, sigPretendDimY, sigPretendDimZ, sigDimX, sigDimY, sigDimZ, + sigStartX, sigStartY, sigStartZ, sigPretendDimX, sigPretendDimY, sigPretendDimZ, addLen, + sigPretendDimY, sigPretendDimZ); LeftRightDispatcherType dispatcher(worklet); timer.Reset(); - dispatcher.Invoke( leftExt, sigIn, rightExt, afterX ); + dispatcher.Invoke(leftExt, sigIn, rightExt, afterX); computationTime += timer.GetElapsedTime(); } - if( discardSigIn ) + if (discardSigIn) { sigIn.ReleaseResourcesExecution(); } // Then do transform in Y direction - ArrayType afterY; - afterY.PrepareForOutput( sigPretendDimX * sigPretendDimY * sigPretendDimZ, DeviceTag() ); + ArrayType afterY; + afterY.PrepareForOutput(sigPretendDimX * sigPretendDimY * sigPretendDimZ, DeviceTag()); { - ArrayType topExt, bottomExt; - this->Extend3DTopDown( afterX, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - 0, 0, 0, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - topExt, - bottomExt, - addLen, - WaveletBase::wmode, - WaveletBase::wmode, - false, - false, - DeviceTag() ); - TopDownXFormType worklet( WaveletBase::filter.GetLowDecomposeFilter(), - WaveletBase::filter.GetHighDecomposeFilter(), - filterLen, - L[1], - oddLow, - sigPretendDimX, addLen, sigPretendDimZ, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - 0, 0, 0, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - sigPretendDimX, addLen, sigPretendDimZ ); - TopDownDispatcherType dispatcher( worklet ); + ArrayType topExt, bottomExt; + this->Extend3DTopDown(afterX, sigPretendDimX, sigPretendDimY, sigPretendDimZ, 0, 0, 0, + sigPretendDimX, sigPretendDimY, sigPretendDimZ, topExt, bottomExt, + addLen, WaveletBase::wmode, WaveletBase::wmode, false, false, + DeviceTag()); + TopDownXFormType worklet( + WaveletBase::filter.GetLowDecomposeFilter(), WaveletBase::filter.GetHighDecomposeFilter(), + filterLen, L[1], oddLow, sigPretendDimX, addLen, sigPretendDimZ, sigPretendDimX, + sigPretendDimY, sigPretendDimZ, 0, 0, 0, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + sigPretendDimX, addLen, sigPretendDimZ); + TopDownDispatcherType dispatcher(worklet); timer.Reset(); - dispatcher.Invoke( topExt, afterX, bottomExt, afterY ); + dispatcher.Invoke(topExt, afterX, bottomExt, afterY); computationTime += timer.GetElapsedTime(); } // Then do transform in Z direction - afterX.ReleaseResources(); // release afterX + afterX.ReleaseResources(); // release afterX { - ArrayType frontExt, backExt; - coeffOut.PrepareForOutput( sigPretendDimX * sigPretendDimY * sigPretendDimZ, DeviceTag() ); - this->Extend3DFrontBack( afterY, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - 0, 0, 0, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - frontExt, - backExt, - addLen, - WaveletBase::wmode, - WaveletBase::wmode, - false, - false, - DeviceTag() ); - FrontBackXFormType worklet( WaveletBase::filter.GetLowDecomposeFilter(), - WaveletBase::filter.GetHighDecomposeFilter(), - filterLen, - L[1], - oddLow, - sigPretendDimX, sigPretendDimY, addLen, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - 0, 0, 0, - sigPretendDimX, sigPretendDimY, sigPretendDimZ, - sigPretendDimX, sigPretendDimY, addLen ); - FrontBackDispatcherType dispatcher( worklet ); + ArrayType frontExt, backExt; + coeffOut.PrepareForOutput(sigPretendDimX * sigPretendDimY * sigPretendDimZ, DeviceTag()); + this->Extend3DFrontBack(afterY, sigPretendDimX, sigPretendDimY, sigPretendDimZ, 0, 0, 0, + sigPretendDimX, sigPretendDimY, sigPretendDimZ, frontExt, backExt, + addLen, WaveletBase::wmode, WaveletBase::wmode, false, false, + DeviceTag()); + FrontBackXFormType worklet( + WaveletBase::filter.GetLowDecomposeFilter(), WaveletBase::filter.GetHighDecomposeFilter(), + filterLen, L[1], oddLow, sigPretendDimX, sigPretendDimY, addLen, sigPretendDimX, + sigPretendDimY, sigPretendDimZ, 0, 0, 0, sigPretendDimX, sigPretendDimY, sigPretendDimZ, + sigPretendDimX, sigPretendDimY, addLen); + FrontBackDispatcherType dispatcher(worklet); timer.Reset(); - dispatcher.Invoke( frontExt, afterY, backExt, coeffOut ); + dispatcher.Invoke(frontExt, afterY, backExt, coeffOut); computationTime += timer.GetElapsedTime(); } return computationTime; } - - // Performs one level of IDWT on a small cube of a big cube // The output array has the same dimensions as the small cube. - template< typename ArrayInType, typename ArrayOutType, typename DeviceTag > - vtkm::Float64 IDWT3D( ArrayInType &coeffIn, - vtkm::Id inDimX, vtkm::Id inDimY, vtkm::Id inDimZ, - vtkm::Id inStartX, vtkm::Id inStartY, vtkm::Id inStartZ, - const std::vector &L, - ArrayOutType &sigOut, - bool discardCoeffIn, // can we discard coeffIn? - DeviceTag ) + template + vtkm::Float64 IDWT3D(ArrayInType& coeffIn, vtkm::Id inDimX, vtkm::Id inDimY, vtkm::Id inDimZ, + vtkm::Id inStartX, vtkm::Id inStartY, vtkm::Id inStartZ, + const std::vector& L, ArrayOutType& sigOut, + bool discardCoeffIn, // can we discard coeffIn? + DeviceTag) { //VTKM_ASSERT( L.size() == 27 ); //VTKM_ASSERT( inDimX * inDimY * inDimZ == coeffIn.GetNumberOfValues() ); @@ -651,213 +528,184 @@ public: vtkm::Id inPretendDimZ = L[2] + L[5]; vtkm::Id filterLen = WaveletBase::filter.GetFilterLength(); - typedef vtkm::cont::ArrayHandle BasicArrayType; - typedef vtkm::worklet::wavelets::InverseTransform3DLeftRight LeftRightXFormType; - typedef vtkm::worklet::wavelets::InverseTransform3DTopDown TopDownXFormType; - typedef vtkm::worklet::wavelets::InverseTransform3DFrontBack FrontBackXFormType; - typedef vtkm::worklet::DispatcherMapField LeftRightDispatcherType; - typedef vtkm::worklet::DispatcherMapField TopDownDispatcherType; - typedef vtkm::worklet::DispatcherMapField FrontBackDispatcherType; + typedef vtkm::cont::ArrayHandle BasicArrayType; + typedef vtkm::worklet::wavelets::InverseTransform3DLeftRight LeftRightXFormType; + typedef vtkm::worklet::wavelets::InverseTransform3DTopDown TopDownXFormType; + typedef vtkm::worklet::wavelets::InverseTransform3DFrontBack FrontBackXFormType; + typedef vtkm::worklet::DispatcherMapField + LeftRightDispatcherType; + typedef vtkm::worklet::DispatcherMapField TopDownDispatcherType; + typedef vtkm::worklet::DispatcherMapField + FrontBackDispatcherType; vtkm::cont::Timer timer; vtkm::Float64 computationTime = 0.0; // First, inverse transform in Z direction - BasicArrayType afterZ; - afterZ.PrepareForOutput( inPretendDimX * inPretendDimY * inPretendDimZ, DeviceTag() ); + BasicArrayType afterZ; + afterZ.PrepareForOutput(inPretendDimX * inPretendDimY * inPretendDimZ, DeviceTag()); { - BasicArrayType ext1, ext2, ext3, ext4; - vtkm::Id extDimX = inPretendDimX; - vtkm::Id extDimY = inPretendDimY; - vtkm::Id ext1DimZ, ext2DimZ, ext3DimZ, ext4DimZ; - this->IDWTHelper3DFrontBack( coeffIn, - inDimX, inDimY, inDimZ, - inStartX, inStartY, inStartZ, - inPretendDimX, inPretendDimY, inPretendDimZ, - L[2], L[5], - ext1, ext2, ext3, ext4, - ext1DimZ, ext2DimZ, ext3DimZ, ext4DimZ, - filterLen, - wmode, - DeviceTag() ); - FrontBackXFormType worklet( - WaveletBase::filter.GetLowReconstructFilter(), - WaveletBase::filter.GetHighReconstructFilter(), - filterLen, - extDimX, extDimY, ext1DimZ, // ext1 - extDimX, extDimY, ext2DimZ, // ext2 - extDimX, extDimY, ext3DimZ, // ext3 - extDimX, extDimY, ext4DimZ, // ext4 - inPretendDimX, inPretendDimY, L[2], // cA - inPretendDimX, inPretendDimY, L[5], // cD - inDimX, inDimY, inDimZ, // coeffIn - inStartX, inStartY, inStartZ ); // coeffIn - FrontBackDispatcherType dispatcher( worklet ); + BasicArrayType ext1, ext2, ext3, ext4; + vtkm::Id extDimX = inPretendDimX; + vtkm::Id extDimY = inPretendDimY; + vtkm::Id ext1DimZ, ext2DimZ, ext3DimZ, ext4DimZ; + this->IDWTHelper3DFrontBack(coeffIn, inDimX, inDimY, inDimZ, inStartX, inStartY, inStartZ, + inPretendDimX, inPretendDimY, inPretendDimZ, L[2], L[5], ext1, + ext2, ext3, ext4, ext1DimZ, ext2DimZ, ext3DimZ, ext4DimZ, + filterLen, wmode, DeviceTag()); + FrontBackXFormType worklet(WaveletBase::filter.GetLowReconstructFilter(), + WaveletBase::filter.GetHighReconstructFilter(), filterLen, extDimX, + extDimY, ext1DimZ, // ext1 + extDimX, extDimY, ext2DimZ, // ext2 + extDimX, extDimY, ext3DimZ, // ext3 + extDimX, extDimY, ext4DimZ, // ext4 + inPretendDimX, inPretendDimY, L[2], // cA + inPretendDimX, inPretendDimY, L[5], // cD + inDimX, inDimY, inDimZ, // coeffIn + inStartX, inStartY, inStartZ); // coeffIn + FrontBackDispatcherType dispatcher(worklet); timer.Reset(); - dispatcher.Invoke( ext1, ext2, ext3, ext4, coeffIn, afterZ ); + dispatcher.Invoke(ext1, ext2, ext3, ext4, coeffIn, afterZ); computationTime += timer.GetElapsedTime(); } - if( discardCoeffIn ) + if (discardCoeffIn) { coeffIn.ReleaseResourcesExecution(); } // Second, inverse transform in Y direction - BasicArrayType afterY; - afterY.PrepareForOutput( inPretendDimX * inPretendDimY * inPretendDimZ, DeviceTag() ); + BasicArrayType afterY; + afterY.PrepareForOutput(inPretendDimX * inPretendDimY * inPretendDimZ, DeviceTag()); { - BasicArrayType ext1, ext2, ext3, ext4; + BasicArrayType ext1, ext2, ext3, ext4; vtkm::Id extDimX = inPretendDimX; vtkm::Id extDimZ = inPretendDimZ; vtkm::Id ext1DimY, ext2DimY, ext3DimY, ext4DimY; - this->IDWTHelper3DTopDown( afterZ, - inPretendDimX, inPretendDimY, inPretendDimZ, - 0, 0, 0, - inPretendDimX, inPretendDimY, inPretendDimZ, - L[1], L[7], - ext1, ext2, ext3, ext4, - ext1DimY, ext2DimY, ext3DimY, ext4DimY, - filterLen, - wmode, - DeviceTag() ); - TopDownXFormType worklet( - WaveletBase::filter.GetLowReconstructFilter(), - WaveletBase::filter.GetHighReconstructFilter(), - filterLen, - extDimX, ext1DimY, extDimZ, // ext1 - extDimX, ext2DimY, extDimZ, // ext2 - extDimX, ext3DimY, extDimZ, // ext3 - extDimX, ext4DimY, extDimZ, // ext4 - inPretendDimX, L[1], inPretendDimZ, // cA - inPretendDimX, L[7], inPretendDimZ, // cD - inPretendDimX, inPretendDimY, inPretendDimZ, // actual signal - 0, 0, 0 ); - TopDownDispatcherType dispatcher( worklet ); + this->IDWTHelper3DTopDown(afterZ, inPretendDimX, inPretendDimY, inPretendDimZ, 0, 0, 0, + inPretendDimX, inPretendDimY, inPretendDimZ, L[1], L[7], ext1, ext2, + ext3, ext4, ext1DimY, ext2DimY, ext3DimY, ext4DimY, filterLen, + wmode, DeviceTag()); + TopDownXFormType worklet(WaveletBase::filter.GetLowReconstructFilter(), + WaveletBase::filter.GetHighReconstructFilter(), filterLen, extDimX, + ext1DimY, extDimZ, // ext1 + extDimX, ext2DimY, extDimZ, // ext2 + extDimX, ext3DimY, extDimZ, // ext3 + extDimX, ext4DimY, extDimZ, // ext4 + inPretendDimX, L[1], inPretendDimZ, // cA + inPretendDimX, L[7], inPretendDimZ, // cD + inPretendDimX, inPretendDimY, inPretendDimZ, // actual signal + 0, 0, 0); + TopDownDispatcherType dispatcher(worklet); timer.Reset(); - dispatcher.Invoke( ext1, ext2, ext3, ext4, afterZ, afterY ); + dispatcher.Invoke(ext1, ext2, ext3, ext4, afterZ, afterY); computationTime += timer.GetElapsedTime(); } // Lastly, inverse transform in X direction afterZ.ReleaseResources(); { - BasicArrayType ext1, ext2, ext3, ext4; - vtkm::Id extDimY = inPretendDimY; - vtkm::Id extDimZ = inPretendDimZ; + BasicArrayType ext1, ext2, ext3, ext4; + vtkm::Id extDimY = inPretendDimY; + vtkm::Id extDimZ = inPretendDimZ; vtkm::Id ext1DimX, ext2DimX, ext3DimX, ext4DimX; - this->IDWTHelper3DLeftRight( afterY, - inPretendDimX, inPretendDimY, inPretendDimZ, - 0, 0, 0, - inPretendDimX, inPretendDimY, inPretendDimZ, - L[0], L[12], - ext1, ext2, ext3, ext4, - ext1DimX, ext2DimX, ext3DimX, ext4DimX, - filterLen, - wmode, - DeviceTag() ); - sigOut.PrepareForOutput( inPretendDimX * inPretendDimY * inPretendDimZ, DeviceTag() ); - LeftRightXFormType worklet( - WaveletBase::filter.GetLowReconstructFilter(), - WaveletBase::filter.GetHighReconstructFilter(), - filterLen, - ext1DimX, extDimY, extDimZ, // ext1 - ext2DimX, extDimY, extDimZ, // ext2 - ext3DimX, extDimY, extDimZ, // ext3 - ext4DimX, extDimY, extDimZ, // ext4 - L[0], inPretendDimY, inPretendDimZ, // cA - L[12], inPretendDimY, inPretendDimZ, // cD - inPretendDimX, inPretendDimY, inPretendDimZ, // actual signal - 0, 0, 0 ); - LeftRightDispatcherType dispatcher( worklet ); + this->IDWTHelper3DLeftRight(afterY, inPretendDimX, inPretendDimY, inPretendDimZ, 0, 0, 0, + inPretendDimX, inPretendDimY, inPretendDimZ, L[0], L[12], ext1, + ext2, ext3, ext4, ext1DimX, ext2DimX, ext3DimX, ext4DimX, + filterLen, wmode, DeviceTag()); + sigOut.PrepareForOutput(inPretendDimX * inPretendDimY * inPretendDimZ, DeviceTag()); + LeftRightXFormType worklet(WaveletBase::filter.GetLowReconstructFilter(), + WaveletBase::filter.GetHighReconstructFilter(), filterLen, + ext1DimX, extDimY, extDimZ, // ext1 + ext2DimX, extDimY, extDimZ, // ext2 + ext3DimX, extDimY, extDimZ, // ext3 + ext4DimX, extDimY, extDimZ, // ext4 + L[0], inPretendDimY, inPretendDimZ, // cA + L[12], inPretendDimY, inPretendDimZ, // cD + inPretendDimX, inPretendDimY, inPretendDimZ, // actual signal + 0, 0, 0); + LeftRightDispatcherType dispatcher(worklet); timer.Reset(); - dispatcher.Invoke( ext1, ext2, ext3, ext4, afterY, sigOut ); + dispatcher.Invoke(ext1, ext2, ext3, ext4, afterY, sigOut); computationTime += timer.GetElapsedTime(); } return computationTime; } - - - //============================================================================= - template< typename SigInArrayType, typename ExtensionArrayType, typename DeviceTag > - vtkm::Id Extend2D (const SigInArrayType &sigIn, // Input - vtkm::Id sigDimX, vtkm::Id sigDimY, - vtkm::Id sigStartX, vtkm::Id sigStartY, - vtkm::Id sigPretendDimX, vtkm::Id sigPretendDimY, - ExtensionArrayType &ext1, // left/top extension - ExtensionArrayType &ext2, // right/bottom extension - vtkm::Id addLen, - vtkm::worklet::wavelets::DWTMode ext1Method, - vtkm::worklet::wavelets::DWTMode ext2Method, - bool pretendSigPaddedZero, - bool padZeroAtExt2, - bool modeLR, // true = left-right - // false = top-down - DeviceTag ) + template + vtkm::Id Extend2D(const SigInArrayType& sigIn, // Input + vtkm::Id sigDimX, vtkm::Id sigDimY, vtkm::Id sigStartX, vtkm::Id sigStartY, + vtkm::Id sigPretendDimX, vtkm::Id sigPretendDimY, + ExtensionArrayType& ext1, // left/top extension + ExtensionArrayType& ext2, // right/bottom extension + vtkm::Id addLen, vtkm::worklet::wavelets::DWTMode ext1Method, + vtkm::worklet::wavelets::DWTMode ext2Method, bool pretendSigPaddedZero, + bool padZeroAtExt2, + bool modeLR, // true = left-right + // false = top-down + DeviceTag) { // pretendSigPaddedZero and padZeroAtExt2 cannot happen at the same time - VTKM_ASSERT( !pretendSigPaddedZero || !padZeroAtExt2 ); + VTKM_ASSERT(!pretendSigPaddedZero || !padZeroAtExt2); - if( addLen == 0 ) // Haar kernel + if (addLen == 0) // Haar kernel { - ext1.PrepareForOutput( 0, DeviceTag() ); // no need to extend on left/top - if( pretendSigPaddedZero || padZeroAtExt2 ) + ext1.PrepareForOutput(0, DeviceTag()); // no need to extend on left/top + if (pretendSigPaddedZero || padZeroAtExt2) { - if( modeLR ) // right extension + if (modeLR) // right extension { - ext2.PrepareForOutput( sigPretendDimY, DeviceTag() ); - WaveletBase::DeviceAssignZero2DColumn( ext2, 1, sigPretendDimY, 0, DeviceTag() ); + ext2.PrepareForOutput(sigPretendDimY, DeviceTag()); + WaveletBase::DeviceAssignZero2DColumn(ext2, 1, sigPretendDimY, 0, DeviceTag()); } - else // bottom extension + else // bottom extension { - ext2.PrepareForOutput( sigPretendDimX, DeviceTag() ); - WaveletBase::DeviceAssignZero2DRow( ext2, sigPretendDimX, 1, 0, DeviceTag() ); + ext2.PrepareForOutput(sigPretendDimX, DeviceTag()); + WaveletBase::DeviceAssignZero2DRow(ext2, sigPretendDimX, 1, 0, DeviceTag()); } } else { - ext2.PrepareForOutput( 0, DeviceTag() ); + ext2.PrepareForOutput(0, DeviceTag()); } return 0; } - typedef typename SigInArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle< ValueType > ExtendArrayType; - typedef vtkm::worklet::wavelets::ExtensionWorklet2D ExtensionWorklet; - typedef typename vtkm::worklet::DispatcherMapField< ExtensionWorklet, DeviceTag > - DispatcherType; - vtkm::Id extDimX, extDimY; - vtkm::worklet::wavelets::ExtensionDirection dir; + typedef typename SigInArrayType::ValueType ValueType; + typedef vtkm::cont::ArrayHandle ExtendArrayType; + typedef vtkm::worklet::wavelets::ExtensionWorklet2D ExtensionWorklet; + typedef typename vtkm::worklet::DispatcherMapField DispatcherType; + vtkm::Id extDimX, extDimY; + vtkm::worklet::wavelets::ExtensionDirection dir; - { // Work on left/top extension - if( modeLR ) - { - dir = LEFT; - extDimX = addLen; - extDimY = sigPretendDimY; - } - else - { - dir = TOP; - extDimX = sigPretendDimX; - extDimY = addLen; - } - ext1.PrepareForOutput( extDimX * extDimY, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, sigDimX, sigDimY, - sigStartX, sigStartY, sigPretendDimX, sigPretendDimY, // use this area - ext1Method, dir, false ); // not treating sigIn as having zeros - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext1, sigIn ); + { // Work on left/top extension + if (modeLR) + { + dir = LEFT; + extDimX = addLen; + extDimY = sigPretendDimY; + } + else + { + dir = TOP; + extDimX = sigPretendDimX; + extDimY = addLen; + } + ext1.PrepareForOutput(extDimX * extDimY, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, sigDimX, sigDimY, sigStartX, sigStartY, + sigPretendDimX, sigPretendDimY, // use this area + ext1Method, dir, false); // not treating sigIn as having zeros + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext1, sigIn); } // Work on right/bottom extension - if( !pretendSigPaddedZero && !padZeroAtExt2 ) + if (!pretendSigPaddedZero && !padZeroAtExt2) { - if( modeLR ) + if (modeLR) { dir = RIGHT; extDimX = addLen; @@ -869,33 +717,32 @@ public: extDimX = sigPretendDimX; extDimY = addLen; } - ext2.PrepareForOutput( extDimX * extDimY, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, sigDimX, sigDimY, - sigStartX, sigStartY, sigPretendDimX, sigPretendDimY, // use this area - ext2Method, dir, false ); - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext2, sigIn ); + ext2.PrepareForOutput(extDimX * extDimY, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, sigDimX, sigDimY, sigStartX, sigStartY, + sigPretendDimX, sigPretendDimY, // use this area + ext2Method, dir, false); + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext2, sigIn); } - else if( !pretendSigPaddedZero && padZeroAtExt2 ) + else if (!pretendSigPaddedZero && padZeroAtExt2) { - if( modeLR ) + if (modeLR) { dir = RIGHT; - extDimX = addLen+1; + extDimX = addLen + 1; extDimY = sigPretendDimY; } else { dir = BOTTOM; extDimX = sigPretendDimX; - extDimY = addLen+1; + extDimY = addLen + 1; } - ext2.PrepareForOutput( extDimX * extDimY, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, sigDimX, sigDimY, - sigStartX, sigStartY, sigPretendDimX, sigPretendDimY, - ext2Method, dir, false ); - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext2, sigIn ); + ext2.PrepareForOutput(extDimX * extDimY, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, sigDimX, sigDimY, sigStartX, sigStartY, + sigPretendDimX, sigPretendDimY, ext2Method, dir, false); + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext2, sigIn); /* Pad a zero at the end of cDTemp, when cDTemp is forced to have the same length as cATemp. For example, with odd length signal, cA is 1 element longer than cD. @@ -910,10 +757,10 @@ public: * extDimY-1, DeviceTag() ); */ } - else // pretendSigPaddedZero + else // pretendSigPaddedZero { ExtendArrayType ext2Temp; - if( modeLR ) + if (modeLR) { dir = RIGHT; extDimX = addLen; @@ -925,117 +772,107 @@ public: extDimX = sigPretendDimX; extDimY = addLen; } - ext2Temp.PrepareForOutput( extDimX * extDimY, DeviceTag() ); - ExtensionWorklet worklet( extDimX, extDimY, sigDimX, sigDimY, - sigStartX, sigStartY, sigPretendDimX, sigPretendDimY, - ext2Method, dir, true ); // pretend sig is padded a zero - DispatcherType dispatcher( worklet ); - dispatcher.Invoke( ext2Temp, sigIn ); + ext2Temp.PrepareForOutput(extDimX * extDimY, DeviceTag()); + ExtensionWorklet worklet(extDimX, extDimY, sigDimX, sigDimY, sigStartX, sigStartY, + sigPretendDimX, sigPretendDimY, ext2Method, dir, + true); // pretend sig is padded a zero + DispatcherType dispatcher(worklet); + dispatcher.Invoke(ext2Temp, sigIn); - if( modeLR ) + if (modeLR) { - ext2.PrepareForOutput( (extDimX+1) * extDimY, DeviceTag() ); - WaveletBase::DeviceRectangleCopyTo( ext2Temp, extDimX, extDimY, - ext2, extDimX+1, extDimY, - 1, 0, DeviceTag() ); - WaveletBase::DeviceAssignZero2DColumn( ext2, extDimX+1, extDimY, - 0, DeviceTag() ); + ext2.PrepareForOutput((extDimX + 1) * extDimY, DeviceTag()); + WaveletBase::DeviceRectangleCopyTo(ext2Temp, extDimX, extDimY, ext2, extDimX + 1, extDimY, + 1, 0, DeviceTag()); + WaveletBase::DeviceAssignZero2DColumn(ext2, extDimX + 1, extDimY, 0, DeviceTag()); } else { - ext2.PrepareForOutput( extDimX * (extDimY+1), DeviceTag() ); - WaveletBase::DeviceRectangleCopyTo( ext2Temp, extDimX, extDimY, - ext2, extDimX, extDimY+1, - 0, 1, DeviceTag() ); - WaveletBase::DeviceAssignZero2DRow( ext2, extDimX, extDimY+1, - 0, DeviceTag() ); + ext2.PrepareForOutput(extDimX * (extDimY + 1), DeviceTag()); + WaveletBase::DeviceRectangleCopyTo(ext2Temp, extDimX, extDimY, ext2, extDimX, extDimY + 1, + 0, 1, DeviceTag()); + WaveletBase::DeviceAssignZero2DRow(ext2, extDimX, extDimY + 1, 0, DeviceTag()); } } return 0; } - - // Extend 1D signal - template< typename SigInArrayType, typename SigExtendedArrayType, typename DeviceTag > - vtkm::Id Extend1D( const SigInArrayType &sigIn, // Input - SigExtendedArrayType &sigOut, // Output - vtkm::Id addLen, - vtkm::worklet::wavelets::DWTMode leftExtMethod, - vtkm::worklet::wavelets::DWTMode rightExtMethod, - bool attachZeroRightLeft, - bool attachZeroRightRight, - DeviceTag ) + template + vtkm::Id Extend1D(const SigInArrayType& sigIn, // Input + SigExtendedArrayType& sigOut, // Output + vtkm::Id addLen, vtkm::worklet::wavelets::DWTMode leftExtMethod, + vtkm::worklet::wavelets::DWTMode rightExtMethod, bool attachZeroRightLeft, + bool attachZeroRightRight, DeviceTag) { // "right extension" can be attached a zero on either end, but not both ends. - VTKM_ASSERT( !attachZeroRightRight || !attachZeroRightLeft ); + VTKM_ASSERT(!attachZeroRightRight || !attachZeroRightLeft); - typedef typename SigInArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle< ValueType > ExtensionArrayType; - typedef vtkm::cont::ArrayHandleConcatenate< ExtensionArrayType, SigInArrayType> - ArrayConcat; + typedef typename SigInArrayType::ValueType ValueType; + typedef vtkm::cont::ArrayHandle ExtensionArrayType; + typedef vtkm::cont::ArrayHandleConcatenate ArrayConcat; - ExtensionArrayType leftExtend, rightExtend; + ExtensionArrayType leftExtend, rightExtend; - if( addLen == 0 ) // Haar kernel + if (addLen == 0) // Haar kernel { - if( attachZeroRightLeft || attachZeroRightRight ) + if (attachZeroRightLeft || attachZeroRightRight) { - leftExtend.PrepareForOutput( 0, DeviceTag() ); - rightExtend.PrepareForOutput(1, DeviceTag() ); - WaveletBase::DeviceAssignZero( rightExtend, 0, DeviceTag() ); + leftExtend.PrepareForOutput(0, DeviceTag()); + rightExtend.PrepareForOutput(1, DeviceTag()); + WaveletBase::DeviceAssignZero(rightExtend, 0, DeviceTag()); } else { - leftExtend.PrepareForOutput( 0, DeviceTag() ); - rightExtend.PrepareForOutput(0, DeviceTag() ); + leftExtend.PrepareForOutput(0, DeviceTag()); + rightExtend.PrepareForOutput(0, DeviceTag()); } - ArrayConcat leftOn( leftExtend, sigIn ); - sigOut = vtkm::cont::make_ArrayHandleConcatenate( leftOn, rightExtend ); + ArrayConcat leftOn(leftExtend, sigIn); + sigOut = vtkm::cont::make_ArrayHandleConcatenate(leftOn, rightExtend); return 0; } - leftExtend.PrepareForOutput( addLen, DeviceTag() ); + leftExtend.PrepareForOutput(addLen, DeviceTag()); vtkm::Id sigInLen = sigIn.GetNumberOfValues(); - typedef vtkm::worklet::wavelets::LeftSYMHExtentionWorklet LeftSYMH; - typedef vtkm::worklet::wavelets::LeftSYMWExtentionWorklet LeftSYMW; + typedef vtkm::worklet::wavelets::LeftSYMHExtentionWorklet LeftSYMH; + typedef vtkm::worklet::wavelets::LeftSYMWExtentionWorklet LeftSYMW; typedef vtkm::worklet::wavelets::RightSYMHExtentionWorklet RightSYMH; typedef vtkm::worklet::wavelets::RightSYMWExtentionWorklet RightSYMW; - typedef vtkm::worklet::wavelets::LeftASYMHExtentionWorklet LeftASYMH; - typedef vtkm::worklet::wavelets::LeftASYMWExtentionWorklet LeftASYMW; + typedef vtkm::worklet::wavelets::LeftASYMHExtentionWorklet LeftASYMH; + typedef vtkm::worklet::wavelets::LeftASYMWExtentionWorklet LeftASYMW; typedef vtkm::worklet::wavelets::RightASYMHExtentionWorklet RightASYMH; typedef vtkm::worklet::wavelets::RightASYMWExtentionWorklet RightASYMW; - switch( leftExtMethod ) + switch (leftExtMethod) { case SYMH: { - LeftSYMH worklet( addLen ); - vtkm::worklet::DispatcherMapField< LeftSYMH, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( leftExtend, sigIn ); - break; + LeftSYMH worklet(addLen); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(leftExtend, sigIn); + break; } case SYMW: { - LeftSYMW worklet( addLen ); - vtkm::worklet::DispatcherMapField< LeftSYMW, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( leftExtend, sigIn ); - break; + LeftSYMW worklet(addLen); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(leftExtend, sigIn); + break; } case ASYMH: { - LeftASYMH worklet( addLen ); - vtkm::worklet::DispatcherMapField< LeftASYMH, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( leftExtend, sigIn ); - break; + LeftASYMH worklet(addLen); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(leftExtend, sigIn); + break; } case ASYMW: { - LeftASYMW worklet( addLen ); - vtkm::worklet::DispatcherMapField< LeftASYMW, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( leftExtend, sigIn ); - break; + LeftASYMW worklet(addLen); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(leftExtend, sigIn); + break; } default: { @@ -1044,47 +881,47 @@ public: } } - if( !attachZeroRightLeft ) // no attach zero, or only attach on RightRight + if (!attachZeroRightLeft) // no attach zero, or only attach on RightRight { // Allocate memory - if( attachZeroRightRight ) + if (attachZeroRightRight) { - rightExtend.PrepareForOutput( addLen+1, DeviceTag() ); + rightExtend.PrepareForOutput(addLen + 1, DeviceTag()); } else { - rightExtend.PrepareForOutput( addLen, DeviceTag() ); + rightExtend.PrepareForOutput(addLen, DeviceTag()); } - switch( rightExtMethod ) + switch (rightExtMethod) { case SYMH: { - RightSYMH worklet( sigInLen ); - vtkm::worklet::DispatcherMapField< RightSYMH, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( rightExtend, sigIn ); - break; + RightSYMH worklet(sigInLen); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(rightExtend, sigIn); + break; } case SYMW: { - RightSYMW worklet( sigInLen ); - vtkm::worklet::DispatcherMapField< RightSYMW, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( rightExtend, sigIn ); - break; + RightSYMW worklet(sigInLen); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(rightExtend, sigIn); + break; } case ASYMH: { - RightASYMH worklet( sigInLen ); - vtkm::worklet::DispatcherMapField< RightASYMH, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( rightExtend, sigIn ); - break; + RightASYMH worklet(sigInLen); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(rightExtend, sigIn); + break; } case ASYMW: { - RightASYMW worklet( sigInLen ); - vtkm::worklet::DispatcherMapField< RightASYMW, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( rightExtend, sigIn ); - break; + RightASYMW worklet(sigInLen); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(rightExtend, sigIn); + break; } default: { @@ -1092,53 +929,52 @@ public: return 1; } } - if( attachZeroRightRight ) + if (attachZeroRightRight) { - WaveletBase::DeviceAssignZero( rightExtend, addLen, DeviceTag() ); + WaveletBase::DeviceAssignZero(rightExtend, addLen, DeviceTag()); } } - else // attachZeroRightLeft mode + else // attachZeroRightLeft mode { - typedef vtkm::cont::ArrayHandleConcatenate - ConcatArray; + typedef vtkm::cont::ArrayHandleConcatenate ConcatArray; // attach a zero at the end of sigIn - ExtensionArrayType singleValArray; - singleValArray.PrepareForOutput(1, DeviceTag() ); - WaveletBase::DeviceAssignZero( singleValArray, 0, DeviceTag() ); - ConcatArray sigInPlusOne( sigIn, singleValArray ); + ExtensionArrayType singleValArray; + singleValArray.PrepareForOutput(1, DeviceTag()); + WaveletBase::DeviceAssignZero(singleValArray, 0, DeviceTag()); + ConcatArray sigInPlusOne(sigIn, singleValArray); // allocate memory for extension - rightExtend.PrepareForOutput( addLen, DeviceTag() ); + rightExtend.PrepareForOutput(addLen, DeviceTag()); - switch( rightExtMethod ) + switch (rightExtMethod) { case SYMH: { - RightSYMH worklet( sigInLen + 1 ); - vtkm::worklet::DispatcherMapField< RightSYMH, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( rightExtend, sigInPlusOne ); - break; + RightSYMH worklet(sigInLen + 1); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(rightExtend, sigInPlusOne); + break; } case SYMW: { - RightSYMW worklet( sigInLen + 1 ); - vtkm::worklet::DispatcherMapField< RightSYMW, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( rightExtend, sigInPlusOne ); - break; + RightSYMW worklet(sigInLen + 1); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(rightExtend, sigInPlusOne); + break; } case ASYMH: { - RightASYMH worklet( sigInLen + 1 ); - vtkm::worklet::DispatcherMapField< RightASYMH, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( rightExtend, sigInPlusOne ); - break; + RightASYMH worklet(sigInLen + 1); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(rightExtend, sigInPlusOne); + break; } case ASYMW: { - RightASYMW worklet( sigInLen + 1 ); - vtkm::worklet::DispatcherMapField< RightASYMW, DeviceTag > dispatcher( worklet ); - dispatcher.Invoke( rightExtend, sigInPlusOne ); - break; + RightASYMW worklet(sigInLen + 1); + vtkm::worklet::DispatcherMapField dispatcher(worklet); + dispatcher.Invoke(rightExtend, sigInPlusOne); + break; } default: { @@ -1149,38 +985,36 @@ public: // make a copy of rightExtend with a zero attached to the left ExtensionArrayType rightExtendPlusOne; - rightExtendPlusOne.PrepareForOutput( addLen + 1, DeviceTag() ); - WaveletBase::DeviceCopyStartX( rightExtend, rightExtendPlusOne, 1, DeviceTag() ); - WaveletBase::DeviceAssignZero( rightExtendPlusOne, 0, DeviceTag() ); - rightExtend = rightExtendPlusOne ; + rightExtendPlusOne.PrepareForOutput(addLen + 1, DeviceTag()); + WaveletBase::DeviceCopyStartX(rightExtend, rightExtendPlusOne, 1, DeviceTag()); + WaveletBase::DeviceAssignZero(rightExtendPlusOne, 0, DeviceTag()); + rightExtend = rightExtendPlusOne; } - ArrayConcat leftOn( leftExtend, sigIn ); - sigOut = vtkm::cont::make_ArrayHandleConcatenate( leftOn, rightExtend ); + ArrayConcat leftOn(leftExtend, sigIn); + sigOut = vtkm::cont::make_ArrayHandleConcatenate(leftOn, rightExtend); return 0; } - - // Performs one level of 1D discrete wavelet transform // It takes care of boundary conditions, etc. - template< typename SignalArrayType, typename CoeffArrayType, typename DeviceTag> - vtkm::Float64 DWT1D( const SignalArrayType &sigIn, // Input - CoeffArrayType &coeffOut, // Output: cA followed by cD - std::vector &L, // Output: how many cA and cD. - DeviceTag ) + template + vtkm::Float64 DWT1D(const SignalArrayType& sigIn, // Input + CoeffArrayType& coeffOut, // Output: cA followed by cD + std::vector& L, // Output: how many cA and cD. + DeviceTag) { vtkm::Id sigInLen = sigIn.GetNumberOfValues(); - if( GetWaveletMaxLevel( sigInLen ) < 1 ) + if (GetWaveletMaxLevel(sigInLen) < 1) { - vtkm::cont::ErrorInternal( "Signal is too short to perform DWT!" ); + vtkm::cont::ErrorInternal("Signal is too short to perform DWT!"); return -1; } //VTKM_ASSERT( L.size() == 3 ); - L[0] = WaveletBase::GetApproxLength( sigInLen ); - L[1] = WaveletBase::GetDetailLength( sigInLen ); + L[0] = WaveletBase::GetApproxLength(sigInLen); + L[1] = WaveletBase::GetDetailLength(sigInLen); L[2] = sigInLen; //VTKM_ASSERT( L[0] + L[1] == L[2] ); @@ -1188,27 +1022,27 @@ public: vtkm::Id filterLen = WaveletBase::filter.GetFilterLength(); bool doSymConv = false; - if( WaveletBase::filter.isSymmetric() ) + if (WaveletBase::filter.isSymmetric()) { - if( ( WaveletBase::wmode == SYMW && ( filterLen % 2 != 0 ) ) || - ( WaveletBase::wmode == SYMH && ( filterLen % 2 == 0 ) ) ) + if ((WaveletBase::wmode == SYMW && (filterLen % 2 != 0)) || + (WaveletBase::wmode == SYMH && (filterLen % 2 == 0))) { doSymConv = true; } } - vtkm::Id sigConvolvedLen = L[0] + L[1]; // approx + detail coeffs - vtkm::Id addLen; // for extension - bool oddLow = true; + vtkm::Id sigConvolvedLen = L[0] + L[1]; // approx + detail coeffs + vtkm::Id addLen; // for extension + bool oddLow = true; bool oddHigh = true; - if( filterLen % 2 != 0 ) + if (filterLen % 2 != 0) { oddLow = false; } - if( doSymConv ) + if (doSymConv) { addLen = filterLen / 2; - if( sigInLen % 2 != 0 ) + if (sigInLen % 2 != 0) { sigConvolvedLen += 1; } @@ -1220,69 +1054,64 @@ public: vtkm::Id sigExtendedLen = sigInLen + 2 * addLen; - typedef typename SignalArrayType::ValueType SigInValueType; - typedef vtkm::cont::ArrayHandle SigInBasic; + typedef typename SignalArrayType::ValueType SigInValueType; + typedef vtkm::cont::ArrayHandle SigInBasic; - typedef vtkm::cont::ArrayHandleConcatenate< SigInBasic, SignalArrayType > - ConcatType1; - typedef vtkm::cont::ArrayHandleConcatenate< ConcatType1, SigInBasic > - ConcatType2; + typedef vtkm::cont::ArrayHandleConcatenate ConcatType1; + typedef vtkm::cont::ArrayHandleConcatenate ConcatType2; ConcatType2 sigInExtended; - this->Extend1D( sigIn, sigInExtended, addLen, WaveletBase::wmode, - WaveletBase::wmode, false, false, DeviceTag() ); + this->Extend1D(sigIn, sigInExtended, addLen, WaveletBase::wmode, WaveletBase::wmode, false, + false, DeviceTag()); //VTKM_ASSERT( sigInExtended.GetNumberOfValues() == sigExtendedLen ); // initialize a worklet for forward transform - vtkm::worklet::wavelets::ForwardTransform forwardTransform - ( WaveletBase::filter.GetLowDecomposeFilter(), - WaveletBase::filter.GetHighDecomposeFilter(), - filterLen, L[0], L[1], oddLow, oddHigh ); + vtkm::worklet::wavelets::ForwardTransform forwardTransform( + WaveletBase::filter.GetLowDecomposeFilter(), WaveletBase::filter.GetHighDecomposeFilter(), + filterLen, L[0], L[1], oddLow, oddHigh); - coeffOut.PrepareForOutput( sigExtendedLen, DeviceTag() ); - vtkm::worklet::DispatcherMapField, DeviceTag> - dispatcher(forwardTransform); + coeffOut.PrepareForOutput(sigExtendedLen, DeviceTag()); + vtkm::worklet::DispatcherMapField, + DeviceTag> + dispatcher(forwardTransform); // put a timer vtkm::cont::Timer timer; - dispatcher.Invoke( sigInExtended, - coeffOut ); + dispatcher.Invoke(sigInExtended, coeffOut); vtkm::Float64 elapsedTime = timer.GetElapsedTime(); //VTKM_ASSERT( L[0] + L[1] <= coeffOut.GetNumberOfValues() ); - coeffOut.Shrink( L[0] + L[1] ); + coeffOut.Shrink(L[0] + L[1]); return elapsedTime; } - - // Performs one level of inverse wavelet transform // It takes care of boundary conditions, etc. - template< typename CoeffArrayType, typename SignalArrayType, typename DeviceTag > - vtkm::Float64 IDWT1D( const CoeffArrayType &coeffIn, // Input, cA followed by cD - std::vector &L, // Input, how many cA and cD - SignalArrayType &sigOut, // Output - DeviceTag ) + template + vtkm::Float64 IDWT1D(const CoeffArrayType& coeffIn, // Input, cA followed by cD + std::vector& L, // Input, how many cA and cD + SignalArrayType& sigOut, // Output + DeviceTag) { vtkm::Id filterLen = WaveletBase::filter.GetFilterLength(); bool doSymConv = false; - vtkm::worklet::wavelets::DWTMode cALeftMode = WaveletBase::wmode; + vtkm::worklet::wavelets::DWTMode cALeftMode = WaveletBase::wmode; vtkm::worklet::wavelets::DWTMode cARightMode = WaveletBase::wmode; - vtkm::worklet::wavelets::DWTMode cDLeftMode = WaveletBase::wmode; + vtkm::worklet::wavelets::DWTMode cDLeftMode = WaveletBase::wmode; vtkm::worklet::wavelets::DWTMode cDRightMode = WaveletBase::wmode; - if( WaveletBase::filter.isSymmetric() ) // this is always true with the 1st 4 filters. + if (WaveletBase::filter.isSymmetric()) // this is always true with the 1st 4 filters. { - if(( WaveletBase::wmode == SYMW && (filterLen % 2 != 0) ) || - ( WaveletBase::wmode == SYMH && (filterLen % 2 == 0) ) ) + if ((WaveletBase::wmode == SYMW && (filterLen % 2 != 0)) || + (WaveletBase::wmode == SYMH && (filterLen % 2 == 0))) { - doSymConv = true; // doSymConv is always true with the 1st 4 filters. + doSymConv = true; // doSymConv is always true with the 1st 4 filters. - if( WaveletBase::wmode == SYMH ) + if (WaveletBase::wmode == SYMH) { cDLeftMode = ASYMH; - if( L[2] % 2 != 0 ) + if (L[2] % 2 != 0) { cARightMode = SYMW; cDRightMode = ASYMW; @@ -1295,7 +1124,7 @@ public: else { cDLeftMode = SYMH; - if( L[2] % 2 != 0 ) + if (L[2] % 2 != 0) { cARightMode = SYMW; cDRightMode = SYMH; @@ -1308,65 +1137,62 @@ public: } } - vtkm::Id cATempLen, cDTempLen; //, reconTempLen; + vtkm::Id cATempLen, cDTempLen; //, reconTempLen; vtkm::Id addLen = 0; - vtkm::Id cDPadLen = 0; - if( doSymConv ) // extend cA and cD + vtkm::Id cDPadLen = 0; + if (doSymConv) // extend cA and cD { - addLen = filterLen / 4; // addLen == 0 for Haar kernel - if( (L[0] > L[1]) && (WaveletBase::wmode == SYMH) ) + addLen = filterLen / 4; // addLen == 0 for Haar kernel + if ((L[0] > L[1]) && (WaveletBase::wmode == SYMH)) { cDPadLen = L[0]; } cATempLen = L[0] + 2 * addLen; - cDTempLen = cATempLen; // same length + cDTempLen = cATempLen; // same length } - else // not extend cA and cD - { // (biorthogonal kernels won't come into this case) + else // not extend cA and cD + { // (biorthogonal kernels won't come into this case) cATempLen = L[0]; cDTempLen = L[1]; } - typedef vtkm::cont::ArrayHandleCounting< vtkm::Id > IdArrayType; - typedef vtkm::cont::ArrayHandlePermutation< IdArrayType, CoeffArrayType > - PermutArrayType; + typedef vtkm::cont::ArrayHandleCounting IdArrayType; + typedef vtkm::cont::ArrayHandlePermutation PermutArrayType; // Separate cA and cD - IdArrayType approxIndices( 0, 1, L[0] ); - IdArrayType detailIndices( L[0], 1, L[1] ); - PermutArrayType cA( approxIndices, coeffIn ); - PermutArrayType cD( detailIndices, coeffIn ); + IdArrayType approxIndices(0, 1, L[0]); + IdArrayType detailIndices(L[0], 1, L[1]); + PermutArrayType cA(approxIndices, coeffIn); + PermutArrayType cD(detailIndices, coeffIn); - typedef typename CoeffArrayType::ValueType CoeffValueType; - typedef vtkm::cont::ArrayHandle< CoeffValueType > ExtensionArrayType; - typedef vtkm::cont::ArrayHandleConcatenate< ExtensionArrayType, PermutArrayType > - Concat1; - typedef vtkm::cont::ArrayHandleConcatenate< Concat1, ExtensionArrayType > - Concat2; + typedef typename CoeffArrayType::ValueType CoeffValueType; + typedef vtkm::cont::ArrayHandle ExtensionArrayType; + typedef vtkm::cont::ArrayHandleConcatenate Concat1; + typedef vtkm::cont::ArrayHandleConcatenate Concat2; Concat2 cATemp, cDTemp; - if( doSymConv ) // Actually extend cA and cD + if (doSymConv) // Actually extend cA and cD { // first extend cA to be cATemp - this->Extend1D( cA, cATemp, addLen, cALeftMode, cARightMode, false, false, DeviceTag() ); + this->Extend1D(cA, cATemp, addLen, cALeftMode, cARightMode, false, false, DeviceTag()); // Then extend cD based on extension needs - if( cDPadLen > 0 ) + if (cDPadLen > 0) { // Add back the missing final cD, 0.0, before doing extension - this->Extend1D( cD, cDTemp, addLen, cDLeftMode, cDRightMode, true, false, DeviceTag() ); + this->Extend1D(cD, cDTemp, addLen, cDLeftMode, cDRightMode, true, false, DeviceTag()); } else { vtkm::Id cDTempLenWouldBe = L[1] + 2 * addLen; - if( cDTempLenWouldBe == cDTempLen ) + if (cDTempLenWouldBe == cDTempLen) { - this->Extend1D( cD, cDTemp, addLen, cDLeftMode, cDRightMode, false, false, DeviceTag()); + this->Extend1D(cD, cDTemp, addLen, cDLeftMode, cDRightMode, false, false, DeviceTag()); } - else if( cDTempLenWouldBe == cDTempLen - 1 ) + else if (cDTempLenWouldBe == cDTempLen - 1) { - this->Extend1D( cD, cDTemp, addLen, cDLeftMode, cDRightMode, false, true , DeviceTag()); + this->Extend1D(cD, cDTemp, addLen, cDLeftMode, cDRightMode, false, true, DeviceTag()); } else { @@ -1379,58 +1205,55 @@ public: { // make cATemp ExtensionArrayType dummyArray; - dummyArray.PrepareForOutput(0, DeviceTag() ); - Concat1 cALeftOn( dummyArray, cA ); - cATemp = vtkm::cont::make_ArrayHandleConcatenate< Concat1, ExtensionArrayType > - ( cALeftOn, dummyArray ); + dummyArray.PrepareForOutput(0, DeviceTag()); + Concat1 cALeftOn(dummyArray, cA); + cATemp = + vtkm::cont::make_ArrayHandleConcatenate(cALeftOn, dummyArray); // make cDTemp - Concat1 cDLeftOn( dummyArray, cD ); - cDTemp = vtkm::cont::make_ArrayHandleConcatenate< Concat1, ExtensionArrayType > - ( cDLeftOn, dummyArray ); + Concat1 cDLeftOn(dummyArray, cD); + cDTemp = + vtkm::cont::make_ArrayHandleConcatenate(cDLeftOn, dummyArray); } - vtkm::cont::ArrayHandleConcatenate< Concat2, Concat2> - coeffInExtended( cATemp, cDTemp ); + vtkm::cont::ArrayHandleConcatenate coeffInExtended(cATemp, cDTemp); // Allocate memory for sigOut - sigOut.PrepareForOutput( cATempLen + cDTempLen, DeviceTag() ); + sigOut.PrepareForOutput(cATempLen + cDTempLen, DeviceTag()); vtkm::Float64 elapsedTime = 0; - if( filterLen % 2 != 0 ) + if (filterLen % 2 != 0) { - vtkm::worklet::wavelets::InverseTransformOdd inverseXformOdd - ( WaveletBase::filter.GetLowReconstructFilter(), - WaveletBase::filter.GetHighReconstructFilter(), - filterLen, L[0], cATempLen ); - vtkm::worklet::DispatcherMapField, DeviceTag> dispatcher( inverseXformOdd ); + vtkm::worklet::wavelets::InverseTransformOdd inverseXformOdd( + WaveletBase::filter.GetLowReconstructFilter(), + WaveletBase::filter.GetHighReconstructFilter(), filterLen, L[0], cATempLen); + vtkm::worklet::DispatcherMapField, + DeviceTag> + dispatcher(inverseXformOdd); // use a timer vtkm::cont::Timer timer; - dispatcher.Invoke( coeffInExtended, sigOut ); + dispatcher.Invoke(coeffInExtended, sigOut); elapsedTime = timer.GetElapsedTime(); } else { - vtkm::worklet::wavelets::InverseTransformEven inverseXformEven - ( WaveletBase::filter.GetLowReconstructFilter(), - WaveletBase::filter.GetHighReconstructFilter(), - filterLen, L[0], cATempLen, !doSymConv ); - vtkm::worklet::DispatcherMapField, DeviceTag> dispatcher( inverseXformEven ); + vtkm::worklet::wavelets::InverseTransformEven inverseXformEven( + WaveletBase::filter.GetLowReconstructFilter(), + WaveletBase::filter.GetHighReconstructFilter(), filterLen, L[0], cATempLen, !doSymConv); + vtkm::worklet::DispatcherMapField, + DeviceTag> + dispatcher(inverseXformEven); // use a timer vtkm::cont::Timer timer; - dispatcher.Invoke( coeffInExtended, sigOut ); + dispatcher.Invoke(coeffInExtended, sigOut); elapsedTime = timer.GetElapsedTime(); } - sigOut.Shrink( L[2] ); + sigOut.Shrink(L[2]); return elapsedTime; } - - // Performs one level of 2D discrete wavelet transform // It takes care of boundary conditions, etc. // N.B. @@ -1454,226 +1277,174 @@ public: // // Performs one level of 2D discrete wavelet transform on a small rectangle of input array // The output has the same size as the small rectangle - template< typename ArrayInType, typename ArrayOutType, typename DeviceTag > - vtkm::Float64 DWT2D ( const ArrayInType &sigIn, - vtkm::Id sigDimX, - vtkm::Id sigDimY, - vtkm::Id sigStartX, - vtkm::Id sigStartY, - vtkm::Id sigPretendDimX, - vtkm::Id sigPretendDimY, - ArrayOutType &coeffOut, - std::vector &L, - DeviceTag ) + template + vtkm::Float64 DWT2D(const ArrayInType& sigIn, vtkm::Id sigDimX, vtkm::Id sigDimY, + vtkm::Id sigStartX, vtkm::Id sigStartY, vtkm::Id sigPretendDimX, + vtkm::Id sigPretendDimY, ArrayOutType& coeffOut, std::vector& L, + DeviceTag) { - L[0] = WaveletBase::GetApproxLength( sigPretendDimX ); L[2] = L[0]; - L[1] = WaveletBase::GetApproxLength( sigPretendDimY ); L[5] = L[1]; - L[3] = WaveletBase::GetDetailLength( sigPretendDimY ); L[7] = L[3]; - L[4] = WaveletBase::GetDetailLength( sigPretendDimX ); L[6] = L[4]; + L[0] = WaveletBase::GetApproxLength(sigPretendDimX); + L[2] = L[0]; + L[1] = WaveletBase::GetApproxLength(sigPretendDimY); + L[5] = L[1]; + L[3] = WaveletBase::GetDetailLength(sigPretendDimY); + L[7] = L[3]; + L[4] = WaveletBase::GetDetailLength(sigPretendDimX); + L[6] = L[4]; L[8] = sigPretendDimX; L[9] = sigPretendDimY; vtkm::Id filterLen = WaveletBase::filter.GetFilterLength(); - bool oddLow = true; - if( filterLen % 2 != 0 ) + bool oddLow = true; + if (filterLen % 2 != 0) { oddLow = false; } - vtkm::Id addLen = filterLen / 2; + vtkm::Id addLen = filterLen / 2; - typedef typename ArrayInType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle ArrayType; + typedef typename ArrayInType::ValueType ValueType; + typedef vtkm::cont::ArrayHandle ArrayType; typedef vtkm::worklet::wavelets::ForwardTransform2D ForwardXForm; - typedef typename vtkm::worklet::DispatcherMapField< ForwardXForm, DeviceTag > - DispatcherType; + typedef typename vtkm::worklet::DispatcherMapField DispatcherType; vtkm::cont::Timer timer; vtkm::Float64 computationTime = 0.0; - ArrayType afterX; - afterX.PrepareForOutput( sigPretendDimX * sigPretendDimY, DeviceTag() ); + ArrayType afterX; + afterX.PrepareForOutput(sigPretendDimX * sigPretendDimY, DeviceTag()); // First transform on rows { - ArrayType leftExt, rightExt; - this->Extend2D ( sigIn, - sigDimX, sigDimY, - sigStartX, sigStartY, - sigPretendDimX, sigPretendDimY, - leftExt, rightExt, addLen, - WaveletBase::wmode, WaveletBase::wmode, false, false, - true, DeviceTag() ); // Extend in left-right direction - ForwardXForm worklet( WaveletBase::filter.GetLowDecomposeFilter(), - WaveletBase::filter.GetHighDecomposeFilter(), - filterLen, L[0], oddLow, true, // left-right - addLen, sigPretendDimY, - sigDimX, sigDimY, - sigStartX, sigStartY, - sigPretendDimX, sigPretendDimY, - addLen, sigPretendDimY ); + ArrayType leftExt, rightExt; + this->Extend2D(sigIn, sigDimX, sigDimY, sigStartX, sigStartY, sigPretendDimX, sigPretendDimY, + leftExt, rightExt, addLen, WaveletBase::wmode, WaveletBase::wmode, false, + false, true, DeviceTag()); // Extend in left-right direction + ForwardXForm worklet(WaveletBase::filter.GetLowDecomposeFilter(), + WaveletBase::filter.GetHighDecomposeFilter(), filterLen, L[0], oddLow, + true, // left-right + addLen, sigPretendDimY, sigDimX, sigDimY, sigStartX, sigStartY, + sigPretendDimX, sigPretendDimY, addLen, sigPretendDimY); DispatcherType dispatcher(worklet); timer.Reset(); - dispatcher.Invoke( leftExt, sigIn, rightExt, afterX ); + dispatcher.Invoke(leftExt, sigIn, rightExt, afterX); computationTime += timer.GetElapsedTime(); } // Then do transform in Y direction { - ArrayType topExt, bottomExt; - coeffOut.PrepareForOutput( sigPretendDimX * sigPretendDimY, DeviceTag() ); - this->Extend2D ( afterX, - sigPretendDimX, sigPretendDimY, - 0, 0, - sigPretendDimX, sigPretendDimY, - topExt, bottomExt, addLen, - WaveletBase::wmode, WaveletBase::wmode, false, false, - false, DeviceTag() ); // Extend in top-down direction - ForwardXForm worklet( WaveletBase::filter.GetLowDecomposeFilter(), - WaveletBase::filter.GetHighDecomposeFilter(), - filterLen, L[1], oddLow, false, // top-down - sigPretendDimX, addLen, - sigPretendDimX, sigPretendDimY, - 0, 0, - sigPretendDimX, sigPretendDimY, - sigPretendDimX, addLen ); - DispatcherType dispatcher( worklet ); + ArrayType topExt, bottomExt; + coeffOut.PrepareForOutput(sigPretendDimX * sigPretendDimY, DeviceTag()); + this->Extend2D(afterX, sigPretendDimX, sigPretendDimY, 0, 0, sigPretendDimX, sigPretendDimY, + topExt, bottomExt, addLen, WaveletBase::wmode, WaveletBase::wmode, false, + false, false, DeviceTag()); // Extend in top-down direction + ForwardXForm worklet(WaveletBase::filter.GetLowDecomposeFilter(), + WaveletBase::filter.GetHighDecomposeFilter(), filterLen, L[1], oddLow, + false, // top-down + sigPretendDimX, addLen, sigPretendDimX, sigPretendDimY, 0, 0, + sigPretendDimX, sigPretendDimY, sigPretendDimX, addLen); + DispatcherType dispatcher(worklet); timer.Reset(); - dispatcher.Invoke( topExt, afterX, bottomExt, coeffOut ); + dispatcher.Invoke(topExt, afterX, bottomExt, coeffOut); computationTime += timer.GetElapsedTime(); } return computationTime; } - - // Performs one level of IDWT. // The output array has the same dimensions as the small rectangle. - template< typename ArrayInType, typename ArrayOutType, typename DeviceTag > - vtkm::Float64 IDWT2D ( const ArrayInType &coeffIn, - vtkm::Id inDimX, - vtkm::Id inDimY, - vtkm::Id inStartX, - vtkm::Id inStartY, - const std::vector &L, - ArrayOutType &sigOut, - DeviceTag ) + template + vtkm::Float64 IDWT2D(const ArrayInType& coeffIn, vtkm::Id inDimX, vtkm::Id inDimY, + vtkm::Id inStartX, vtkm::Id inStartY, const std::vector& L, + ArrayOutType& sigOut, DeviceTag) { vtkm::Id inPretendDimX = L[0] + L[4]; vtkm::Id inPretendDimY = L[1] + L[3]; vtkm::Id filterLen = WaveletBase::filter.GetFilterLength(); - typedef vtkm::cont::ArrayHandle BasicArrayType; - typedef vtkm::worklet::wavelets::InverseTransform2D IDWT2DWorklet; - typedef vtkm::worklet::DispatcherMapField Dispatcher; + typedef vtkm::cont::ArrayHandle BasicArrayType; + typedef vtkm::worklet::wavelets::InverseTransform2D IDWT2DWorklet; + typedef vtkm::worklet::DispatcherMapField Dispatcher; vtkm::cont::Timer timer; vtkm::Float64 computationTime = 0.0; // First inverse transform on columns - BasicArrayType afterY; + BasicArrayType afterY; { - BasicArrayType ext1, ext2, ext3, ext4; - vtkm::Id extDimX = inPretendDimX; - vtkm::Id ext1DimY, ext2DimY, ext3DimY, ext4DimY; - this->IDWTHelper2DTopDown( coeffIn, - inDimX, inDimY, - inStartX, inStartY, - inPretendDimX, inPretendDimY, - L[1], L[3], - ext1, ext2, - ext3, ext4, - ext1DimY, ext2DimY, - ext3DimY, ext4DimY, - filterLen, - wmode, - DeviceTag() ); + BasicArrayType ext1, ext2, ext3, ext4; + vtkm::Id extDimX = inPretendDimX; + vtkm::Id ext1DimY, ext2DimY, ext3DimY, ext4DimY; + this->IDWTHelper2DTopDown(coeffIn, inDimX, inDimY, inStartX, inStartY, inPretendDimX, + inPretendDimY, L[1], L[3], ext1, ext2, ext3, ext4, ext1DimY, + ext2DimY, ext3DimY, ext4DimY, filterLen, wmode, DeviceTag()); - afterY.PrepareForOutput( inPretendDimX * inPretendDimY, DeviceTag() ); - IDWT2DWorklet worklet( WaveletBase::filter.GetLowReconstructFilter(), - WaveletBase::filter.GetHighReconstructFilter(), - filterLen, - extDimX, ext1DimY, // ext1 - inPretendDimX, L[1], // cA - extDimX, ext2DimY, // ext2 - extDimX, ext3DimY, // ext3 - inPretendDimX, L[3], // cD - extDimX, ext4DimY, // ext4 - inDimX, inDimY, // coeffIn - inStartX, inStartY, // coeffIn - false ); // top-down - Dispatcher dispatcher( worklet ); - timer.Reset(); - dispatcher.Invoke( ext1, ext2, ext3, ext4, coeffIn, afterY ); - computationTime += timer.GetElapsedTime(); + afterY.PrepareForOutput(inPretendDimX * inPretendDimY, DeviceTag()); + IDWT2DWorklet worklet(WaveletBase::filter.GetLowReconstructFilter(), + WaveletBase::filter.GetHighReconstructFilter(), filterLen, extDimX, + ext1DimY, // ext1 + inPretendDimX, L[1], // cA + extDimX, ext2DimY, // ext2 + extDimX, ext3DimY, // ext3 + inPretendDimX, L[3], // cD + extDimX, ext4DimY, // ext4 + inDimX, inDimY, // coeffIn + inStartX, inStartY, // coeffIn + false); // top-down + Dispatcher dispatcher(worklet); + timer.Reset(); + dispatcher.Invoke(ext1, ext2, ext3, ext4, coeffIn, afterY); + computationTime += timer.GetElapsedTime(); } // Then inverse transform on rows { - BasicArrayType ext1, ext2, ext3, ext4; - vtkm::Id extDimY = inPretendDimY; - vtkm::Id ext1DimX, ext2DimX, ext3DimX, ext4DimX; - this->IDWTHelper2DLeftRight( afterY, - inPretendDimX, inPretendDimY, - 0, 0, - inPretendDimX, inPretendDimY, - L[0], L[4], - ext1, ext2, - ext3, ext4, - ext1DimX, ext2DimX, - ext3DimX, ext4DimX, - filterLen, - wmode, - DeviceTag() ); - sigOut.PrepareForOutput( inPretendDimX * inPretendDimY, DeviceTag() ); - IDWT2DWorklet worklet( WaveletBase::filter.GetLowReconstructFilter(), - WaveletBase::filter.GetHighReconstructFilter(), - filterLen, - ext1DimX, extDimY, // ext1 - L[0], inPretendDimY, // cA - ext2DimX, extDimY, // ext2 - ext3DimX, extDimY, // ext3 - L[4], inPretendDimY, // cA - ext4DimX, extDimY, // ext4 - inPretendDimX, inPretendDimY, - 0, 0, - true ); // left-right - Dispatcher dispatcher( worklet ); - timer.Reset(); - dispatcher.Invoke( ext1, ext2, ext3, ext4, afterY, sigOut ); - computationTime += timer.GetElapsedTime(); + BasicArrayType ext1, ext2, ext3, ext4; + vtkm::Id extDimY = inPretendDimY; + vtkm::Id ext1DimX, ext2DimX, ext3DimX, ext4DimX; + this->IDWTHelper2DLeftRight(afterY, inPretendDimX, inPretendDimY, 0, 0, inPretendDimX, + inPretendDimY, L[0], L[4], ext1, ext2, ext3, ext4, ext1DimX, + ext2DimX, ext3DimX, ext4DimX, filterLen, wmode, DeviceTag()); + sigOut.PrepareForOutput(inPretendDimX * inPretendDimY, DeviceTag()); + IDWT2DWorklet worklet(WaveletBase::filter.GetLowReconstructFilter(), + WaveletBase::filter.GetHighReconstructFilter(), filterLen, ext1DimX, + extDimY, // ext1 + L[0], inPretendDimY, // cA + ext2DimX, extDimY, // ext2 + ext3DimX, extDimY, // ext3 + L[4], inPretendDimY, // cA + ext4DimX, extDimY, // ext4 + inPretendDimX, inPretendDimY, 0, 0, + true); // left-right + Dispatcher dispatcher(worklet); + timer.Reset(); + dispatcher.Invoke(ext1, ext2, ext3, ext4, afterY, sigOut); + computationTime += timer.GetElapsedTime(); } return computationTime; } - - // decides the correct extension modes for cA and cD separately, // and fill the extensions (2D matrices) - template< typename ArrayInType, typename ArrayOutType, typename DeviceTag > - void IDWTHelper2DLeftRight( - const ArrayInType &coeffIn, - vtkm::Id inDimX, vtkm::Id inDimY, - vtkm::Id inStartX, vtkm::Id inStartY, - vtkm::Id inPretendDimX, vtkm::Id inPretendDimY, - vtkm::Id cADimX, vtkm::Id cDDimX, - ArrayOutType &ext1, ArrayOutType &ext2, // output - ArrayOutType &ext3, ArrayOutType &ext4, // output - vtkm::Id &ext1DimX, vtkm::Id &ext2DimX, // output - vtkm::Id &ext3DimX, vtkm::Id &ext4DimX, // output - vtkm::Id filterLen, - DWTMode mode, - DeviceTag ) + template + void IDWTHelper2DLeftRight(const ArrayInType& coeffIn, vtkm::Id inDimX, vtkm::Id inDimY, + vtkm::Id inStartX, vtkm::Id inStartY, vtkm::Id inPretendDimX, + vtkm::Id inPretendDimY, vtkm::Id cADimX, vtkm::Id cDDimX, + ArrayOutType& ext1, ArrayOutType& ext2, // output + ArrayOutType& ext3, ArrayOutType& ext4, // output + vtkm::Id& ext1DimX, vtkm::Id& ext2DimX, // output + vtkm::Id& ext3DimX, vtkm::Id& ext4DimX, // output + vtkm::Id filterLen, DWTMode mode, DeviceTag) { - VTKM_ASSERT( inPretendDimX = cADimX + cDDimX ); + VTKM_ASSERT(inPretendDimX = cADimX + cDDimX); // determine extension modes DWTMode cALeft, cARight, cDLeft, cDRight; cALeft = cARight = cDLeft = cDRight = mode; - if( mode == SYMH ) + if (mode == SYMH) { cDLeft = ASYMH; - if( inPretendDimX % 2 != 0 ) + if (inPretendDimX % 2 != 0) { cARight = SYMW; cDRight = ASYMW; @@ -1683,10 +1454,10 @@ public: cDRight = ASYMH; } } - else // mode == SYMW + else // mode == SYMW { cDLeft = SYMH; - if( inPretendDimX % 2 != 0 ) + if (inPretendDimX % 2 != 0) { cARight = SYMW; cDRight = SYMH; @@ -1698,9 +1469,9 @@ public: } // determine length after extension vtkm::Id cAExtendedDimX, cDExtendedDimX; - vtkm::Id cDPadLen = 0; - vtkm::Id addLen = filterLen / 4; // addLen == 0 for Haar kernel - if( (cADimX > cDDimX) && (mode == SYMH) ) + vtkm::Id cDPadLen = 0; + vtkm::Id addLen = filterLen / 4; // addLen == 0 for Haar kernel + if ((cADimX > cDDimX) && (mode == SYMH)) { cDPadLen = cADimX; } @@ -1709,37 +1480,33 @@ public: // extend cA vtkm::Id cADimY = inPretendDimY; - this->Extend2D ( coeffIn, inDimX, inDimY, inStartX, inStartY, cADimX, cADimY, - ext1, ext2, addLen, cALeft, cARight, - false, false, true, DeviceTag() ); + this->Extend2D(coeffIn, inDimX, inDimY, inStartX, inStartY, cADimX, cADimY, ext1, ext2, addLen, + cALeft, cARight, false, false, true, DeviceTag()); ext1DimX = ext2DimX = addLen; // extend cD vtkm::Id cDDimY = inPretendDimY; - if( cDPadLen > 0 ) + if (cDPadLen > 0) { - this->Extend2D ( coeffIn, inDimX, inDimY, inStartX + cADimX, inStartY, - cDDimX, cDDimY, ext3, ext4, addLen, cDLeft, cDRight, - true, false, true, DeviceTag() ); + this->Extend2D(coeffIn, inDimX, inDimY, inStartX + cADimX, inStartY, cDDimX, cDDimY, ext3, + ext4, addLen, cDLeft, cDRight, true, false, true, DeviceTag()); ext3DimX = addLen; ext4DimX = addLen + 1; } else { vtkm::Id cDExtendedWouldBe = cDDimX + 2 * addLen; - if( cDExtendedWouldBe == cDExtendedDimX ) + if (cDExtendedWouldBe == cDExtendedDimX) { - this->Extend2D ( coeffIn, inDimX, inDimY, inStartX + cADimX, inStartY, - cDDimX, cDDimY, ext3, ext4, addLen, cDLeft, cDRight, - false, false, true, DeviceTag()); + this->Extend2D(coeffIn, inDimX, inDimY, inStartX + cADimX, inStartY, cDDimX, cDDimY, ext3, + ext4, addLen, cDLeft, cDRight, false, false, true, DeviceTag()); ext3DimX = ext4DimX = addLen; } - else if( cDExtendedWouldBe == cDExtendedDimX - 1 ) + else if (cDExtendedWouldBe == cDExtendedDimX - 1) { - this->Extend2D ( coeffIn, inDimX, inDimY, inStartX + cADimX, inStartY, - cDDimX, cDDimY, ext3, ext4, addLen, cDLeft, cDRight, - false, true, true, DeviceTag()); + this->Extend2D(coeffIn, inDimX, inDimY, inStartX + cADimX, inStartY, cDDimX, cDDimY, ext3, + ext4, addLen, cDLeft, cDRight, false, true, true, DeviceTag()); ext3DimX = addLen; ext4DimX = addLen + 1; } @@ -1752,30 +1519,25 @@ public: // decides the correct extension modes for cA and cD separately, // and fill the extensions (2D matrices) - template< typename ArrayInType, typename ArrayOutType, typename DeviceTag > - void IDWTHelper2DTopDown( - const ArrayInType &coeffIn, - vtkm::Id inDimX, vtkm::Id inDimY, - vtkm::Id inStartX, vtkm::Id inStartY, - vtkm::Id inPretendDimX, vtkm::Id inPretendDimY, - vtkm::Id cADimY, vtkm::Id cDDimY, - ArrayOutType &ext1, ArrayOutType &ext2, // output - ArrayOutType &ext3, ArrayOutType &ext4, // output - vtkm::Id &ext1DimY, vtkm::Id &ext2DimY, // output - vtkm::Id &ext3DimY, vtkm::Id &ext4DimY, // output - vtkm::Id filterLen, - DWTMode mode, - DeviceTag ) + template + void IDWTHelper2DTopDown(const ArrayInType& coeffIn, vtkm::Id inDimX, vtkm::Id inDimY, + vtkm::Id inStartX, vtkm::Id inStartY, vtkm::Id inPretendDimX, + vtkm::Id inPretendDimY, vtkm::Id cADimY, vtkm::Id cDDimY, + ArrayOutType& ext1, ArrayOutType& ext2, // output + ArrayOutType& ext3, ArrayOutType& ext4, // output + vtkm::Id& ext1DimY, vtkm::Id& ext2DimY, // output + vtkm::Id& ext3DimY, vtkm::Id& ext4DimY, // output + vtkm::Id filterLen, DWTMode mode, DeviceTag) { - VTKM_ASSERT( inPretendDimY = cADimY + cDDimY ); + VTKM_ASSERT(inPretendDimY = cADimY + cDDimY); // determine extension modes DWTMode cATopMode, cADownMode, cDTopMode, cDDownMode; cATopMode = cADownMode = cDTopMode = cDDownMode = mode; - if( mode == SYMH ) + if (mode == SYMH) { cDTopMode = ASYMH; - if( inPretendDimY % 2 != 0 ) + if (inPretendDimY % 2 != 0) { cADownMode = SYMW; cDDownMode = ASYMW; @@ -1785,10 +1547,10 @@ public: cDDownMode = ASYMH; } } - else // mode == SYMW + else // mode == SYMW { cDTopMode = SYMH; - if( inPretendDimY % 2 != 0 ) + if (inPretendDimY % 2 != 0) { cADownMode = SYMW; cDDownMode = SYMH; @@ -1800,45 +1562,41 @@ public: } // determine length after extension vtkm::Id cAExtendedDimY, cDExtendedDimY; - vtkm::Id cDPadLen = 0; - vtkm::Id addLen = filterLen / 4; // addLen == 0 for Haar kernel - if( (cADimY > cDDimY) && (mode == SYMH) ) + vtkm::Id cDPadLen = 0; + vtkm::Id addLen = filterLen / 4; // addLen == 0 for Haar kernel + if ((cADimY > cDDimY) && (mode == SYMH)) cDPadLen = cADimY; cAExtendedDimY = cADimY + 2 * addLen; cDExtendedDimY = cAExtendedDimY; // extend cA - vtkm::Id cADimX = inPretendDimX; - this->Extend2D ( coeffIn, inDimX, inDimY, inStartX, inStartY, cADimX, cADimY, - ext1, ext2, addLen, cATopMode, cADownMode, - false, false, false, DeviceTag() ); + vtkm::Id cADimX = inPretendDimX; + this->Extend2D(coeffIn, inDimX, inDimY, inStartX, inStartY, cADimX, cADimY, ext1, ext2, addLen, + cATopMode, cADownMode, false, false, false, DeviceTag()); ext1DimY = ext2DimY = addLen; // extend cD - vtkm::Id cDDimX = inPretendDimX; - if( cDPadLen > 0 ) + vtkm::Id cDDimX = inPretendDimX; + if (cDPadLen > 0) { - this->Extend2D ( coeffIn, inDimX, inDimY, inStartX, inStartY + cADimY, - cDDimX, cDDimY, ext3, ext4, addLen, cDTopMode, cDDownMode, - true, false, false, DeviceTag() ); + this->Extend2D(coeffIn, inDimX, inDimY, inStartX, inStartY + cADimY, cDDimX, cDDimY, ext3, + ext4, addLen, cDTopMode, cDDownMode, true, false, false, DeviceTag()); ext3DimY = addLen; ext4DimY = addLen + 1; } else { vtkm::Id cDExtendedWouldBe = cDDimY + 2 * addLen; - if( cDExtendedWouldBe == cDExtendedDimY ) + if (cDExtendedWouldBe == cDExtendedDimY) { - this->Extend2D ( coeffIn, inDimX, inDimY, inStartX, inStartY + cADimY, - cDDimX, cDDimY, ext3, ext4, addLen, cDTopMode, cDDownMode, - false, false, false, DeviceTag()); + this->Extend2D(coeffIn, inDimX, inDimY, inStartX, inStartY + cADimY, cDDimX, cDDimY, ext3, + ext4, addLen, cDTopMode, cDDownMode, false, false, false, DeviceTag()); ext3DimY = ext4DimY = addLen; } - else if( cDExtendedWouldBe == cDExtendedDimY - 1 ) + else if (cDExtendedWouldBe == cDExtendedDimY - 1) { - this->Extend2D ( coeffIn, inDimX, inDimY, inStartX, inStartY + cADimY, - cDDimX, cDDimY, ext3, ext4, addLen, cDTopMode, cDDownMode, - false, true, false, DeviceTag()); + this->Extend2D(coeffIn, inDimX, inDimY, inStartX, inStartY + cADimY, cDDimX, cDDimY, ext3, + ext4, addLen, cDTopMode, cDDownMode, false, true, false, DeviceTag()); ext3DimY = addLen; ext4DimY = addLen + 1; } @@ -1849,34 +1607,28 @@ public: } } - - // decides the correct extension modes for cA and cD separately, // and fill the extensions (3D cubes) - template< typename ArrayInType, typename ArrayOutType, typename DeviceTag > - void IDWTHelper3DLeftRight( - const ArrayInType &coeffIn, - vtkm::Id inDimX, vtkm::Id inDimY, vtkm::Id inDimZ, - vtkm::Id inStartX, vtkm::Id inStartY, vtkm::Id inStartZ, - vtkm::Id inPretendDimX, vtkm::Id inPretendDimY, vtkm::Id inPretendDimZ, - vtkm::Id cADimX, vtkm::Id cDDimX, - ArrayOutType &ext1, ArrayOutType &ext2, // output - ArrayOutType &ext3, ArrayOutType &ext4, // output - vtkm::Id &ext1DimX, vtkm::Id &ext2DimX, // output - vtkm::Id &ext3DimX, vtkm::Id &ext4DimX, // output - vtkm::Id filterLen, - DWTMode mode, - DeviceTag ) + template + void IDWTHelper3DLeftRight(const ArrayInType& coeffIn, vtkm::Id inDimX, vtkm::Id inDimY, + vtkm::Id inDimZ, vtkm::Id inStartX, vtkm::Id inStartY, + vtkm::Id inStartZ, vtkm::Id inPretendDimX, vtkm::Id inPretendDimY, + vtkm::Id inPretendDimZ, vtkm::Id cADimX, vtkm::Id cDDimX, + ArrayOutType& ext1, ArrayOutType& ext2, // output + ArrayOutType& ext3, ArrayOutType& ext4, // output + vtkm::Id& ext1DimX, vtkm::Id& ext2DimX, // output + vtkm::Id& ext3DimX, vtkm::Id& ext4DimX, // output + vtkm::Id filterLen, DWTMode mode, DeviceTag) { - VTKM_ASSERT( inPretendDimX = cADimX + cDDimX ); + VTKM_ASSERT(inPretendDimX = cADimX + cDDimX); // determine extension modes DWTMode cALeftMode, cARightMode, cDLeftMode, cDRightMode; cALeftMode = cARightMode = cDLeftMode = cDRightMode = mode; - if( mode == SYMH ) + if (mode == SYMH) { cDLeftMode = ASYMH; - if( inPretendDimX % 2 != 0 ) + if (inPretendDimX % 2 != 0) { cARightMode = SYMW; cDRightMode = ASYMW; @@ -1886,10 +1638,10 @@ public: cDRightMode = ASYMH; } } - else // mode == SYMW + else // mode == SYMW { cDLeftMode = SYMH; - if( inPretendDimX % 2 != 0 ) + if (inPretendDimX % 2 != 0) { cARightMode = SYMW; cDRightMode = SYMH; @@ -1902,9 +1654,9 @@ public: // determine length after extension vtkm::Id cAExtendedDimX, cDExtendedDimX; - vtkm::Id cDPadLen = 0; - vtkm::Id addLen = filterLen / 4; // addLen == 0 for Haar kernel - if( (cADimX > cDDimX) && (mode == SYMH) ) + vtkm::Id cDPadLen = 0; + vtkm::Id addLen = filterLen / 4; // addLen == 0 for Haar kernel + if ((cADimX > cDDimX) && (mode == SYMH)) { cDPadLen = cADimX; } @@ -1914,85 +1666,69 @@ public: // extend cA vtkm::Id cADimY = inPretendDimY; vtkm::Id cADimZ = inPretendDimZ; - this->Extend3DLeftRight( coeffIn, - inDimX, inDimY, inDimZ, - inStartX, inStartY, inStartZ, - cADimX, cADimY, cADimZ, - ext1, ext2, - addLen, - cALeftMode, cARightMode, - false, false, - DeviceTag() ); + this->Extend3DLeftRight(coeffIn, inDimX, inDimY, inDimZ, inStartX, inStartY, inStartZ, cADimX, + cADimY, cADimZ, ext1, ext2, addLen, cALeftMode, cARightMode, false, + false, DeviceTag()); ext1DimX = ext2DimX = addLen; // extend cD vtkm::Id cDDimY = inPretendDimY; vtkm::Id cDDimZ = inPretendDimZ; bool pretendSigPaddedZero, padZeroAtExt2; - if( cDPadLen > 0 ) + if (cDPadLen > 0) { ext3DimX = addLen; ext4DimX = addLen + 1; pretendSigPaddedZero = true; - padZeroAtExt2 = false; + padZeroAtExt2 = false; } else { vtkm::Id cDExtendedWouldBe = cDDimX + 2 * addLen; - if( cDExtendedWouldBe == cDExtendedDimX ) + if (cDExtendedWouldBe == cDExtendedDimX) { ext3DimX = ext4DimX = addLen; pretendSigPaddedZero = false; - padZeroAtExt2 = false; + padZeroAtExt2 = false; } - else if( cDExtendedWouldBe == cDExtendedDimX - 1 ) + else if (cDExtendedWouldBe == cDExtendedDimX - 1) { ext3DimX = addLen; ext4DimX = addLen + 1; pretendSigPaddedZero = false; - padZeroAtExt2 = true; + padZeroAtExt2 = true; } else { - pretendSigPaddedZero = padZeroAtExt2 = false; // so the compiler doesn't complain + pretendSigPaddedZero = padZeroAtExt2 = false; // so the compiler doesn't complain vtkm::cont::ErrorInternal("cDTemp Length not match!"); } } - this->Extend3DLeftRight( coeffIn, - inDimX, inDimY, inDimZ, - inStartX + cADimX, inStartY, inStartZ, - cDDimX, cDDimY, cDDimZ, - ext3, ext4, - addLen, - cDLeftMode, cDRightMode, - pretendSigPaddedZero, padZeroAtExt2, - DeviceTag() ); + this->Extend3DLeftRight(coeffIn, inDimX, inDimY, inDimZ, inStartX + cADimX, inStartY, inStartZ, + cDDimX, cDDimY, cDDimZ, ext3, ext4, addLen, cDLeftMode, cDRightMode, + pretendSigPaddedZero, padZeroAtExt2, DeviceTag()); } - template< typename ArrayInType, typename ArrayOutType, typename DeviceTag > - void IDWTHelper3DTopDown( - const ArrayInType &coeffIn, - vtkm::Id inDimX, vtkm::Id inDimY, vtkm::Id inDimZ, - vtkm::Id inStartX, vtkm::Id inStartY, vtkm::Id inStartZ, - vtkm::Id inPretendDimX, vtkm::Id inPretendDimY, vtkm::Id inPretendDimZ, - vtkm::Id cADimY, vtkm::Id cDDimY, - ArrayOutType &ext1, ArrayOutType &ext2, // output - ArrayOutType &ext3, ArrayOutType &ext4, // output - vtkm::Id &ext1DimY, vtkm::Id &ext2DimY, // output - vtkm::Id &ext3DimY, vtkm::Id &ext4DimY, // output - vtkm::Id filterLen, - DWTMode mode, - DeviceTag ) + template + void IDWTHelper3DTopDown(const ArrayInType& coeffIn, vtkm::Id inDimX, vtkm::Id inDimY, + vtkm::Id inDimZ, vtkm::Id inStartX, vtkm::Id inStartY, vtkm::Id inStartZ, + vtkm::Id inPretendDimX, vtkm::Id inPretendDimY, vtkm::Id inPretendDimZ, + vtkm::Id cADimY, vtkm::Id cDDimY, ArrayOutType& ext1, + ArrayOutType& ext2, // output + ArrayOutType& ext3, ArrayOutType& ext4, // output + vtkm::Id& ext1DimY, vtkm::Id& ext2DimY, // output + vtkm::Id& ext3DimY, vtkm::Id& ext4DimY, // output + vtkm::Id filterLen, DWTMode mode, DeviceTag) { - VTKM_ASSERT( inPretendDimY = cADimY + cDDimY ); + VTKM_ASSERT(inPretendDimY = cADimY + cDDimY); // determine extension modes DWTMode cATopMode, cADownMode, cDTopMode, cDDownMode; cATopMode = cADownMode = cDTopMode = cDDownMode = mode; - if( mode == SYMH ) + if (mode == SYMH) { cDTopMode = ASYMH; - if( inPretendDimY % 2 != 0 ) + if (inPretendDimY % 2 != 0) { cADownMode = SYMW; cDDownMode = ASYMW; @@ -2002,10 +1738,10 @@ public: cDDownMode = ASYMH; } } - else // mode == SYMW + else // mode == SYMW { cDTopMode = SYMH; - if( inPretendDimY % 2 != 0 ) + if (inPretendDimY % 2 != 0) { cADownMode = SYMW; cDDownMode = SYMH; @@ -2018,9 +1754,9 @@ public: // determine length after extension vtkm::Id cAExtendedDimY, cDExtendedDimY; - vtkm::Id cDPadLen = 0; - vtkm::Id addLen = filterLen / 4; // addLen == 0 for Haar kernel - if( (cADimY > cDDimY) && (mode == SYMH) ) + vtkm::Id cDPadLen = 0; + vtkm::Id addLen = filterLen / 4; // addLen == 0 for Haar kernel + if ((cADimY > cDDimY) && (mode == SYMH)) { cDPadLen = cADimY; } @@ -2030,85 +1766,69 @@ public: // extend cA vtkm::Id cADimX = inPretendDimX; vtkm::Id cADimZ = inPretendDimZ; - this->Extend3DTopDown( coeffIn, - inDimX, inDimY, inDimZ, - inStartX, inStartY, inStartZ, - cADimX, cADimY, cADimZ, - ext1, ext2, - addLen, - cATopMode, cADownMode, - false, false, - DeviceTag() ); + this->Extend3DTopDown(coeffIn, inDimX, inDimY, inDimZ, inStartX, inStartY, inStartZ, cADimX, + cADimY, cADimZ, ext1, ext2, addLen, cATopMode, cADownMode, false, false, + DeviceTag()); ext1DimY = ext2DimY = addLen; // extend cD vtkm::Id cDDimX = inPretendDimX; vtkm::Id cDDimZ = inPretendDimZ; bool pretendSigPaddedZero, padZeroAtExt2; - if( cDPadLen > 0 ) + if (cDPadLen > 0) { ext3DimY = addLen; ext4DimY = addLen + 1; pretendSigPaddedZero = true; - padZeroAtExt2 = false; + padZeroAtExt2 = false; } else { vtkm::Id cDExtendedWouldBe = cDDimY + 2 * addLen; - if( cDExtendedWouldBe == cDExtendedDimY ) + if (cDExtendedWouldBe == cDExtendedDimY) { ext3DimY = ext4DimY = addLen; pretendSigPaddedZero = false; - padZeroAtExt2 = false; + padZeroAtExt2 = false; } - else if( cDExtendedWouldBe == cDExtendedDimY - 1 ) + else if (cDExtendedWouldBe == cDExtendedDimY - 1) { ext3DimY = addLen; ext4DimY = addLen + 1; pretendSigPaddedZero = false; - padZeroAtExt2 = true; + padZeroAtExt2 = true; } else { - pretendSigPaddedZero = padZeroAtExt2 = false; // so the compiler doesn't complain + pretendSigPaddedZero = padZeroAtExt2 = false; // so the compiler doesn't complain vtkm::cont::ErrorInternal("cDTemp Length not match!"); } } - this->Extend3DTopDown( coeffIn, - inDimX, inDimY, inDimZ, - inStartX, inStartY + cADimY, inStartZ, - cDDimX, cDDimY, cDDimZ, - ext3, ext4, - addLen, - cDTopMode, cDDownMode, - pretendSigPaddedZero, padZeroAtExt2, - DeviceTag() ); + this->Extend3DTopDown(coeffIn, inDimX, inDimY, inDimZ, inStartX, inStartY + cADimY, inStartZ, + cDDimX, cDDimY, cDDimZ, ext3, ext4, addLen, cDTopMode, cDDownMode, + pretendSigPaddedZero, padZeroAtExt2, DeviceTag()); } - template< typename ArrayInType, typename ArrayOutType, typename DeviceTag > - void IDWTHelper3DFrontBack( - const ArrayInType &coeffIn, - vtkm::Id inDimX, vtkm::Id inDimY, vtkm::Id inDimZ, - vtkm::Id inStartX, vtkm::Id inStartY, vtkm::Id inStartZ, - vtkm::Id inPretendDimX, vtkm::Id inPretendDimY, vtkm::Id inPretendDimZ, - vtkm::Id cADimZ, vtkm::Id cDDimZ, - ArrayOutType &ext1, ArrayOutType &ext2, // output - ArrayOutType &ext3, ArrayOutType &ext4, // output - vtkm::Id &ext1DimZ, vtkm::Id &ext2DimZ, // output - vtkm::Id &ext3DimZ, vtkm::Id &ext4DimZ, // output - vtkm::Id filterLen, - DWTMode mode, - DeviceTag ) + template + void IDWTHelper3DFrontBack(const ArrayInType& coeffIn, vtkm::Id inDimX, vtkm::Id inDimY, + vtkm::Id inDimZ, vtkm::Id inStartX, vtkm::Id inStartY, + vtkm::Id inStartZ, vtkm::Id inPretendDimX, vtkm::Id inPretendDimY, + vtkm::Id inPretendDimZ, vtkm::Id cADimZ, vtkm::Id cDDimZ, + ArrayOutType& ext1, ArrayOutType& ext2, // output + ArrayOutType& ext3, ArrayOutType& ext4, // output + vtkm::Id& ext1DimZ, vtkm::Id& ext2DimZ, // output + vtkm::Id& ext3DimZ, vtkm::Id& ext4DimZ, // output + vtkm::Id filterLen, DWTMode mode, DeviceTag) { - VTKM_ASSERT( inPretendDimZ = cADimZ + cDDimZ ); + VTKM_ASSERT(inPretendDimZ = cADimZ + cDDimZ); // determine extension modes DWTMode cAFrontMode, cABackMode, cDFrontMode, cDBackMode; cAFrontMode = cABackMode = cDFrontMode = cDBackMode = mode; - if( mode == SYMH ) + if (mode == SYMH) { cDFrontMode = ASYMH; - if( inPretendDimZ % 2 != 0 ) + if (inPretendDimZ % 2 != 0) { cABackMode = SYMW; cDBackMode = ASYMW; @@ -2118,10 +1838,10 @@ public: cDBackMode = ASYMH; } } - else // mode == SYMW + else // mode == SYMW { cDFrontMode = SYMH; - if( inPretendDimZ % 2 != 0 ) + if (inPretendDimZ % 2 != 0) { cABackMode = SYMW; cDBackMode = SYMH; @@ -2134,9 +1854,9 @@ public: // determine length after extension vtkm::Id cAExtendedDimZ, cDExtendedDimZ; - vtkm::Id cDPadLen = 0; - vtkm::Id addLen = filterLen / 4; // addLen == 0 for Haar kernel - if( (cADimZ > cDDimZ) && (mode == SYMH) ) + vtkm::Id cDPadLen = 0; + vtkm::Id addLen = filterLen / 4; // addLen == 0 for Haar kernel + if ((cADimZ > cDDimZ) && (mode == SYMH)) { cDPadLen = cADimZ; } @@ -2146,65 +1866,52 @@ public: // extend cA vtkm::Id cADimX = inPretendDimX; vtkm::Id cADimY = inPretendDimY; - this->Extend3DFrontBack( coeffIn, - inDimX, inDimY, inDimZ, - inStartX, inStartY, inStartZ, - cADimX, cADimY, cADimZ, - ext1, ext2, - addLen, - cAFrontMode, cABackMode, - false, false, - DeviceTag() ); + this->Extend3DFrontBack(coeffIn, inDimX, inDimY, inDimZ, inStartX, inStartY, inStartZ, cADimX, + cADimY, cADimZ, ext1, ext2, addLen, cAFrontMode, cABackMode, false, + false, DeviceTag()); ext1DimZ = ext2DimZ = addLen; // extend cD vtkm::Id cDDimX = inPretendDimX; vtkm::Id cDDimY = inPretendDimY; bool pretendSigPaddedZero, padZeroAtExt2; - if( cDPadLen > 0 ) + if (cDPadLen > 0) { ext3DimZ = addLen; ext4DimZ = addLen + 1; pretendSigPaddedZero = true; - padZeroAtExt2 = false; + padZeroAtExt2 = false; } else { vtkm::Id cDExtendedWouldBe = cDDimZ + 2 * addLen; - if( cDExtendedWouldBe == cDExtendedDimZ ) + if (cDExtendedWouldBe == cDExtendedDimZ) { ext3DimZ = ext4DimZ = addLen; pretendSigPaddedZero = false; - padZeroAtExt2 = false; + padZeroAtExt2 = false; } - else if( cDExtendedWouldBe == cDExtendedDimZ - 1 ) + else if (cDExtendedWouldBe == cDExtendedDimZ - 1) { ext3DimZ = addLen; ext4DimZ = addLen + 1; pretendSigPaddedZero = false; - padZeroAtExt2 = true; + padZeroAtExt2 = true; } else { - pretendSigPaddedZero = padZeroAtExt2 = false; // so the compiler doesn't complain + pretendSigPaddedZero = padZeroAtExt2 = false; // so the compiler doesn't complain vtkm::cont::ErrorInternal("cDTemp Length not match!"); } } - this->Extend3DFrontBack( coeffIn, - inDimX, inDimY, inDimZ, - inStartX, inStartY, inStartZ + cADimZ, - cDDimX, cDDimY, cDDimZ, - ext3, ext4, - addLen, - cDFrontMode, cDBackMode, - pretendSigPaddedZero, padZeroAtExt2, - DeviceTag() ); + this->Extend3DFrontBack(coeffIn, inDimX, inDimY, inDimZ, inStartX, inStartY, inStartZ + cADimZ, + cDDimX, cDDimY, cDDimZ, ext3, ext4, addLen, cDFrontMode, cDBackMode, + pretendSigPaddedZero, padZeroAtExt2, DeviceTag()); } - }; -} // namespace wavelets -} // namespace worklet -} // namespace vtkm +} // namespace wavelets +} // namespace worklet +} // namespace vtkm #endif diff --git a/vtkm/worklet/wavelets/WaveletFilter.h b/vtkm/worklet/wavelets/WaveletFilter.h index df3884c64..9905c2fde 100644 --- a/vtkm/worklet/wavelets/WaveletFilter.h +++ b/vtkm/worklet/wavelets/WaveletFilter.h @@ -27,20 +27,24 @@ #include -namespace vtkm { -namespace worklet { +namespace vtkm +{ +namespace worklet +{ -namespace wavelets { +namespace wavelets +{ -enum WaveletName { +enum WaveletName +{ CDF9_7, CDF5_3, CDF8_4, HAAR, - BIOR4_4, // the same as CDF9_7 - BIOR3_3, // the same as CDF8_4 - BIOR2_2, // the same as CDF5_3 - BIOR1_1 // the same as HAAR + BIOR4_4, // the same as CDF9_7 + BIOR3_3, // the same as CDF8_4 + BIOR2_2, // the same as CDF5_3 + BIOR1_1 // the same as HAAR }; // Wavelet filter class; @@ -49,48 +53,49 @@ class WaveletFilter { public: // constructor - WaveletFilter( WaveletName wtype ) : Symmetricity(true), - FilterLength(0), - LowDecomposeFilter(nullptr), - HighDecomposeFilter(nullptr), - LowReconstructFilter(nullptr), - HighReconstructFilter(nullptr) + WaveletFilter(WaveletName wtype) + : Symmetricity(true) + , FilterLength(0) + , LowDecomposeFilter(nullptr) + , HighDecomposeFilter(nullptr) + , LowReconstructFilter(nullptr) + , HighReconstructFilter(nullptr) { - if( wtype == CDF9_7 || wtype == BIOR4_4 ) + if (wtype == CDF9_7 || wtype == BIOR4_4) { this->FilterLength = 9; this->AllocateFilterMemory(); - this->wrev( vtkm::worklet::wavelets::hm4_44, LowDecomposeFilter, FilterLength ); - this->qmf_wrev( vtkm::worklet::wavelets::h4, HighDecomposeFilter, FilterLength ); - this->verbatim_copy( vtkm::worklet::wavelets::h4, LowReconstructFilter, FilterLength ); - this->qmf_even( vtkm::worklet::wavelets::hm4_44, HighReconstructFilter, FilterLength ); + this->wrev(vtkm::worklet::wavelets::hm4_44, LowDecomposeFilter, FilterLength); + this->qmf_wrev(vtkm::worklet::wavelets::h4, HighDecomposeFilter, FilterLength); + this->verbatim_copy(vtkm::worklet::wavelets::h4, LowReconstructFilter, FilterLength); + this->qmf_even(vtkm::worklet::wavelets::hm4_44, HighReconstructFilter, FilterLength); } - else if( wtype == CDF8_4 || wtype == BIOR3_3 ) + else if (wtype == CDF8_4 || wtype == BIOR3_3) { this->FilterLength = 8; this->AllocateFilterMemory(); - this->wrev( vtkm::worklet::wavelets::hm3_33, LowDecomposeFilter, FilterLength ); - this->qmf_wrev( vtkm::worklet::wavelets::h3+6, HighDecomposeFilter, FilterLength ); - this->verbatim_copy( vtkm::worklet::wavelets::h3+6, LowReconstructFilter, FilterLength ); - this->qmf_even( vtkm::worklet::wavelets::hm3_33, HighReconstructFilter, FilterLength ); + this->wrev(vtkm::worklet::wavelets::hm3_33, LowDecomposeFilter, FilterLength); + this->qmf_wrev(vtkm::worklet::wavelets::h3 + 6, HighDecomposeFilter, FilterLength); + this->verbatim_copy(vtkm::worklet::wavelets::h3 + 6, LowReconstructFilter, FilterLength); + this->qmf_even(vtkm::worklet::wavelets::hm3_33, HighReconstructFilter, FilterLength); } - else if( wtype == CDF5_3 || wtype == BIOR2_2 ) + else if (wtype == CDF5_3 || wtype == BIOR2_2) { this->FilterLength = 5; this->AllocateFilterMemory(); - this->wrev( vtkm::worklet::wavelets::hm2_22, LowDecomposeFilter, FilterLength ); - this->qmf_wrev( vtkm::worklet::wavelets::h2+6, HighDecomposeFilter, FilterLength ); - this->verbatim_copy( vtkm::worklet::wavelets::h2+6, LowReconstructFilter, FilterLength ); - this->qmf_even( vtkm::worklet::wavelets::hm2_22, HighReconstructFilter, FilterLength ); + this->wrev(vtkm::worklet::wavelets::hm2_22, LowDecomposeFilter, FilterLength); + this->qmf_wrev(vtkm::worklet::wavelets::h2 + 6, HighDecomposeFilter, FilterLength); + this->verbatim_copy(vtkm::worklet::wavelets::h2 + 6, LowReconstructFilter, FilterLength); + this->qmf_even(vtkm::worklet::wavelets::hm2_22, HighReconstructFilter, FilterLength); } - else if( wtype == HAAR || wtype == BIOR1_1 ) + else if (wtype == HAAR || wtype == BIOR1_1) { this->FilterLength = 2; this->AllocateFilterMemory(); - this->wrev( vtkm::worklet::wavelets::hm1_11, LowDecomposeFilter, FilterLength ); - this->qmf_wrev( vtkm::worklet::wavelets::h1+4, HighDecomposeFilter, FilterLength ); - this->verbatim_copy( vtkm::worklet::wavelets::h1+4, LowReconstructFilter, FilterLength ); - this->qmf_even( vtkm::worklet::wavelets::hm1_11, HighReconstructFilter, FilterLength ); + this->wrev(vtkm::worklet::wavelets::hm1_11, LowDecomposeFilter, FilterLength); + this->qmf_wrev(vtkm::worklet::wavelets::h1 + 4, HighDecomposeFilter, FilterLength); + this->verbatim_copy(vtkm::worklet::wavelets::h1 + 4, LowReconstructFilter, FilterLength); + this->qmf_even(vtkm::worklet::wavelets::hm1_11, HighReconstructFilter, FilterLength); } this->MakeArrayHandles(); } @@ -98,84 +103,66 @@ public: // destructor ~WaveletFilter() { - if( LowDecomposeFilter ) + if (LowDecomposeFilter) { delete[] LowDecomposeFilter; - LowDecomposeFilter = HighDecomposeFilter = - LowReconstructFilter = HighReconstructFilter = nullptr ; + LowDecomposeFilter = HighDecomposeFilter = LowReconstructFilter = HighReconstructFilter = + nullptr; } } - vtkm::Id GetFilterLength() - { - return this->FilterLength; - } + vtkm::Id GetFilterLength() { return this->FilterLength; } - bool isSymmetric() - { - return this->Symmetricity; - } + bool isSymmetric() { return this->Symmetricity; } typedef vtkm::cont::ArrayHandle FilterType; - const FilterType& GetLowDecomposeFilter() const - { - return this->LowDecomType; - } - const FilterType& GetHighDecomposeFilter() const - { - return this->HighDecomType; - } - const FilterType& GetLowReconstructFilter() const - { - return this->LowReconType; - } - const FilterType& GetHighReconstructFilter() const - { - return this->HighReconType; - } + const FilterType& GetLowDecomposeFilter() const { return this->LowDecomType; } + const FilterType& GetHighDecomposeFilter() const { return this->HighDecomType; } + const FilterType& GetLowReconstructFilter() const { return this->LowReconType; } + const FilterType& GetHighReconstructFilter() const { return this->HighReconType; } private: - bool Symmetricity; - vtkm::Id FilterLength; - vtkm::Float64* LowDecomposeFilter; - vtkm::Float64* HighDecomposeFilter; - vtkm::Float64* LowReconstructFilter; - vtkm::Float64* HighReconstructFilter; - FilterType LowDecomType; - FilterType HighDecomType; - FilterType LowReconType; - FilterType HighReconType; + bool Symmetricity; + vtkm::Id FilterLength; + vtkm::Float64* LowDecomposeFilter; + vtkm::Float64* HighDecomposeFilter; + vtkm::Float64* LowReconstructFilter; + vtkm::Float64* HighReconstructFilter; + FilterType LowDecomType; + FilterType HighDecomType; + FilterType LowReconType; + FilterType HighReconType; void AllocateFilterMemory() { - LowDecomposeFilter = new vtkm::Float64[ FilterLength * 4 ]; - HighDecomposeFilter = LowDecomposeFilter + FilterLength; - LowReconstructFilter = HighDecomposeFilter + FilterLength; - HighReconstructFilter = LowReconstructFilter + FilterLength; + LowDecomposeFilter = new vtkm::Float64[FilterLength * 4]; + HighDecomposeFilter = LowDecomposeFilter + FilterLength; + LowReconstructFilter = HighDecomposeFilter + FilterLength; + HighReconstructFilter = LowReconstructFilter + FilterLength; } void MakeArrayHandles() { - LowDecomType = vtkm::cont::make_ArrayHandle( LowDecomposeFilter, FilterLength ); - HighDecomType = vtkm::cont::make_ArrayHandle( HighDecomposeFilter, FilterLength ); - LowReconType = vtkm::cont::make_ArrayHandle( LowReconstructFilter, FilterLength); - HighReconType = vtkm::cont::make_ArrayHandle( HighReconstructFilter, FilterLength ); + LowDecomType = vtkm::cont::make_ArrayHandle(LowDecomposeFilter, FilterLength); + HighDecomType = vtkm::cont::make_ArrayHandle(HighDecomposeFilter, FilterLength); + LowReconType = vtkm::cont::make_ArrayHandle(LowReconstructFilter, FilterLength); + HighReconType = vtkm::cont::make_ArrayHandle(HighReconstructFilter, FilterLength); } // Flipping operation; helper function to initialize a filter. - void wrev( const vtkm::Float64* arrIn, vtkm::Float64* arrOut, vtkm::Id length ) + void wrev(const vtkm::Float64* arrIn, vtkm::Float64* arrOut, vtkm::Id length) { - for( vtkm::Id count = 0; count < length; count++) + for (vtkm::Id count = 0; count < length; count++) { arrOut[count] = arrIn[length - count - 1]; } } // Quadrature mirror filtering operation: helper function to initialize a filter. - void qmf_even ( const vtkm::Float64* arrIn, vtkm::Float64* arrOut, vtkm::Id length ) + void qmf_even(const vtkm::Float64* arrIn, vtkm::Float64* arrOut, vtkm::Id length) { - if( length % 2 == 0 ) + if (length % 2 == 0) { for (vtkm::Id count = 0; count < length; count++) { @@ -200,12 +187,13 @@ private: } // Flipping and QMF at the same time: helper function to initialize a filter. - void qmf_wrev ( const vtkm::Float64* arrIn, vtkm::Float64* arrOut, vtkm::Id length ) + void qmf_wrev(const vtkm::Float64* arrIn, vtkm::Float64* arrOut, vtkm::Id length) { - qmf_even( arrIn, arrOut, length ); + qmf_even(arrIn, arrOut, length); vtkm::Float64 tmp; - for (vtkm::Id count = 0; count < length/2; count++) { + for (vtkm::Id count = 0; count < length / 2; count++) + { tmp = arrOut[count]; arrOut[count] = arrOut[length - count - 1]; arrOut[length - count - 1] = tmp; @@ -213,7 +201,7 @@ private: } // Verbatim Copying: helper function to initialize a filter. - void verbatim_copy ( const vtkm::Float64* arrIn, vtkm::Float64* arrOut, vtkm::Id length ) + void verbatim_copy(const vtkm::Float64* arrIn, vtkm::Float64* arrOut, vtkm::Id length) { for (vtkm::Id count = 0; count < length; count++) { @@ -221,11 +209,10 @@ private: } } -}; // class WaveletFilter. -} // namespace wavelets. +}; // class WaveletFilter. +} // namespace wavelets. - -} // namespace worklet -} // namespace vtkm +} // namespace worklet +} // namespace vtkm #endif diff --git a/vtkm/worklet/wavelets/WaveletTransforms.h b/vtkm/worklet/wavelets/WaveletTransforms.h index 289305e2e..45f9fcafb 100644 --- a/vtkm/worklet/wavelets/WaveletTransforms.h +++ b/vtkm/worklet/wavelets/WaveletTransforms.h @@ -26,63 +26,71 @@ #include -namespace vtkm { -namespace worklet { -namespace wavelets { +namespace vtkm +{ +namespace worklet +{ +namespace wavelets +{ -enum DWTMode { // boundary extension modes +enum DWTMode +{ // boundary extension modes SYMH, SYMW, ASYMH, ASYMW }; -enum ExtensionDirection { // which side of a cube to extend - LEFT, // X direction - RIGHT, // X direction Y - TOP, // Y direction | Z - BOTTOM, // Y direction | / - FRONT, // Z direction | / - BACK // Z direction |/________ X +enum ExtensionDirection +{ // which side of a cube to extend + LEFT, // X direction + RIGHT, // X direction Y + TOP, // Y direction | Z + BOTTOM, // Y direction | / + FRONT, // Z direction | / + BACK // Z direction |/________ X }; - // Worklet for 3D signal extension // It operates on a specified part of a big cube class ExtensionWorklet3D : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayOut < ScalarAll >, // extension - WholeArrayIn < ScalarAll > ); // signal - typedef void ExecutionSignature( _1, _2, WorkIndex ); - typedef _1 InputDomain; + typedef void ControlSignature(WholeArrayOut, // extension + WholeArrayIn); // signal + typedef void ExecutionSignature(_1, _2, WorkIndex); + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - ExtensionWorklet3D ( vtkm::Id extdimX, vtkm::Id extdimY, vtkm::Id extdimZ, - vtkm::Id sigdimX, vtkm::Id sigdimY, vtkm::Id sigdimZ, - vtkm::Id sigstartX, vtkm::Id sigstartY, vtkm::Id sigstartZ, - vtkm::Id sigpretendX, vtkm::Id sigpretendY, vtkm::Id sigpretendZ, - DWTMode m, // SYMH, SYMW, etc. - ExtensionDirection dir, - bool pad_zero ) - : - extDimX( extdimX ), extDimY( extdimY ), extDimZ( extdimZ ), - sigDimX( sigdimX ), sigDimY( sigdimY ), sigDimZ( sigdimZ ), - sigStartX( sigstartX ), sigStartY( sigstartY ), sigStartZ( sigstartZ ), - sigPretendDimX( sigpretendX ), - sigPretendDimY( sigpretendY ), - sigPretendDimZ( sigpretendZ ), - mode(m), - direction( dir ), - padZero( pad_zero ) + ExtensionWorklet3D(vtkm::Id extdimX, vtkm::Id extdimY, vtkm::Id extdimZ, vtkm::Id sigdimX, + vtkm::Id sigdimY, vtkm::Id sigdimZ, vtkm::Id sigstartX, vtkm::Id sigstartY, + vtkm::Id sigstartZ, vtkm::Id sigpretendX, vtkm::Id sigpretendY, + vtkm::Id sigpretendZ, + DWTMode m, // SYMH, SYMW, etc. + ExtensionDirection dir, bool pad_zero) + : extDimX(extdimX) + , extDimY(extdimY) + , extDimZ(extdimZ) + , sigDimX(sigdimX) + , sigDimY(sigdimY) + , sigDimZ(sigdimZ) + , sigStartX(sigstartX) + , sigStartY(sigstartY) + , sigStartZ(sigstartZ) + , sigPretendDimX(sigpretendX) + , sigPretendDimY(sigpretendY) + , sigPretendDimZ(sigpretendZ) + , mode(m) + , direction(dir) + , padZero(pad_zero) { (void)sigDimZ; } // Index translation helper VTKM_EXEC_CONT - void Ext1Dto3D ( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z ) const + void Ext1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const { z = idx / (extDimX * extDimY); y = (idx - z * extDimX * extDimY) / extDimX; @@ -91,50 +99,48 @@ public: // Index translation helper VTKM_EXEC_CONT - vtkm::Id Sig3Dto1D( vtkm::Id x, vtkm::Id y, vtkm::Id z) const + vtkm::Id Sig3Dto1D(vtkm::Id x, vtkm::Id y, vtkm::Id z) const { return z * sigDimX * sigDimY + y * sigDimX + x; } // Index translation helper VTKM_EXEC_CONT - vtkm::Id SigPretend3Dto1D( vtkm::Id x, vtkm::Id y, vtkm::Id z ) const + vtkm::Id SigPretend3Dto1D(vtkm::Id x, vtkm::Id y, vtkm::Id z) const { return (z + sigStartZ) * sigDimX * sigDimY + (y + sigStartY) * sigDimX + x + sigStartX; } - template< typename PortalOutType, typename PortalInType > - VTKM_EXEC - void operator()( PortalOutType &portalOut, - const PortalInType &portalIn, - const vtkm::Id &workIndex) const + template + VTKM_EXEC void operator()(PortalOutType& portalOut, const PortalInType& portalIn, + const vtkm::Id& workIndex) const { - vtkm::Id extX, extY, extZ; - vtkm::Id sigPretendX, sigPretendY, sigPretendZ; - Ext1Dto3D( workIndex, extX, extY, extZ ); + vtkm::Id extX, extY, extZ; + vtkm::Id sigPretendX, sigPretendY, sigPretendZ; + Ext1Dto3D(workIndex, extX, extY, extZ); typename PortalOutType::ValueType sym = 1.0; - if( mode == ASYMH || mode == ASYMW ) + if (mode == ASYMH || mode == ASYMW) { sym = -1.0; } - if( direction == LEFT ) + if (direction == LEFT) { sigPretendY = extY; sigPretendZ = extZ; - if( mode == SYMH || mode == ASYMH ) + if (mode == SYMH || mode == ASYMH) { sigPretendX = extDimX - extX - 1; } - else // mode == SYMW || mode == ASYMW + else // mode == SYMW || mode == ASYMW { sigPretendX = extDimX - extX; } } - else if( direction == RIGHT ) + else if (direction == RIGHT) { sigPretendY = extY; sigPretendZ = extZ; - if( mode == SYMH || mode == ASYMH ) + if (mode == SYMH || mode == ASYMH) { sigPretendX = sigPretendDimX - extX - 1; } @@ -142,29 +148,29 @@ public: { sigPretendX = sigPretendDimX - extX - 2; } - if( padZero ) + if (padZero) { sigPretendX++; } } - else if( direction == TOP ) + else if (direction == TOP) { sigPretendX = extX; sigPretendZ = extZ; - if( mode == SYMH || mode == ASYMH ) + if (mode == SYMH || mode == ASYMH) { sigPretendY = extDimY - extY - 1; } - else // mode == SYMW || mode == ASYMW + else // mode == SYMW || mode == ASYMW { sigPretendY = extDimY - extY; } } - else if( direction == BOTTOM ) + else if (direction == BOTTOM) { sigPretendX = extX; sigPretendZ = extZ; - if( mode == SYMH || mode == ASYMH ) + if (mode == SYMH || mode == ASYMH) { sigPretendY = sigPretendDimY - extY - 1; } @@ -172,29 +178,29 @@ public: { sigPretendY = sigPretendDimY - extY - 2; } - if( padZero ) + if (padZero) { sigPretendY++; } } - else if( direction == FRONT ) + else if (direction == FRONT) { sigPretendX = extX; sigPretendY = extY; - if( mode == SYMH || mode == ASYMH ) + if (mode == SYMH || mode == ASYMH) { sigPretendZ = extDimZ - extZ - 1; } - else // mode == SYMW || mode == ASYMW + else // mode == SYMW || mode == ASYMW { sigPretendZ = extDimZ - extZ; } } - else if( direction == BACK ) + else if (direction == BACK) { sigPretendX = extX; sigPretendY = extY; - if( mode == SYMH || mode == ASYMH ) + if (mode == SYMH || mode == ASYMH) { sigPretendZ = sigPretendDimZ - extZ - 1; } @@ -202,40 +208,38 @@ public: { sigPretendZ = sigPretendDimZ - extZ - 2; } - if( padZero ) + if (padZero) { sigPretendZ++; } } else { - sigPretendX = sigPretendY = sigPretendZ = 0; // so the compiler doesn't complain + sigPretendX = sigPretendY = sigPretendZ = 0; // so the compiler doesn't complain vtkm::cont::ErrorInternal("Invalid extension mode for cubes!"); } - if( sigPretendX == sigPretendDimX || // decides to pad a zero - sigPretendY == sigPretendDimY || - sigPretendZ == sigPretendDimZ ) + if (sigPretendX == sigPretendDimX || // decides to pad a zero + sigPretendY == sigPretendDimY || sigPretendZ == sigPretendDimZ) { - portalOut.Set( workIndex, 0.0 ); + portalOut.Set(workIndex, 0.0); } else { - portalOut.Set( workIndex, sym * portalIn.Get( - SigPretend3Dto1D(sigPretendX, sigPretendY, sigPretendZ) )); + portalOut.Set(workIndex, + sym * portalIn.Get(SigPretend3Dto1D(sigPretendX, sigPretendY, sigPretendZ))); } } private: - const vtkm::Id extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ; - const vtkm::Id sigStartX, sigStartY, sigStartZ; // defines a small cube to work on - const vtkm::Id sigPretendDimX, sigPretendDimY, sigPretendDimZ; // small cube dims - const DWTMode mode; - const ExtensionDirection direction; - const bool padZero; // treat sigIn as having a zero at the end + const vtkm::Id extDimX, extDimY, extDimZ, sigDimX, sigDimY, sigDimZ; + const vtkm::Id sigStartX, sigStartY, sigStartZ; // defines a small cube to work on + const vtkm::Id sigPretendDimX, sigPretendDimY, sigPretendDimZ; // small cube dims + const DWTMode mode; + const ExtensionDirection direction; + const bool padZero; // treat sigIn as having a zero at the end }; - //============================================================================= // Y @@ -252,18 +256,25 @@ private: class IndexTranslator3CubesLeftRight { public: - IndexTranslator3CubesLeftRight( - vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, - vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, - vtkm::Id startx_2, vtkm::Id starty_2, vtkm::Id startz_2, - vtkm::Id pretendx_2, vtkm::Id pretendy_2, vtkm::Id pretendz_2, - vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3 ) - : - dimX1(x_1), dimY1(y_1), dimZ1(z_1), - dimX2(x_2), dimY2(y_2), dimZ2(z_2), - startX2( startx_2 ), startY2( starty_2 ), startZ2(startz_2), - pretendDimX2(pretendx_2), pretendDimY2(pretendy_2), pretendDimZ2(pretendz_2), - dimX3(x_3), dimY3(y_3), dimZ3(z_3) + IndexTranslator3CubesLeftRight(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, + vtkm::Id y_2, vtkm::Id z_2, vtkm::Id startx_2, vtkm::Id starty_2, + vtkm::Id startz_2, vtkm::Id pretendx_2, vtkm::Id pretendy_2, + vtkm::Id pretendz_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3) + : dimX1(x_1) + , dimY1(y_1) + , dimZ1(z_1) + , dimX2(x_2) + , dimY2(y_2) + , dimZ2(z_2) + , startX2(startx_2) + , startY2(starty_2) + , startZ2(startz_2) + , pretendDimX2(pretendx_2) + , pretendDimY2(pretendy_2) + , pretendDimZ2(pretendz_2) + , dimX3(x_3) + , dimY3(y_3) + , dimZ3(z_3) { (void)dimZ1; (void)dimZ2; @@ -273,21 +284,21 @@ public: } VTKM_EXEC_CONT - void Translate3Dto1D( vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, // 3D indices as input - vtkm::Id &cube, vtkm::Id &idx ) const // which cube, and idx of that cube + void Translate3Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, // 3D indices as input + vtkm::Id& cube, vtkm::Id& idx) const // which cube, and idx of that cube { - if ( dimX1 <= inX && inX < (dimX1 + pretendDimX2) ) + if (dimX1 <= inX && inX < (dimX1 + pretendDimX2)) { vtkm::Id inX_local = inX - dimX1; cube = 2; idx = (inZ + startZ2) * dimX2 * dimY2 + (inY + startY2) * dimX2 + (inX_local + startX2); } - else if ( 0 <= inX && inX < dimX1 ) + else if (0 <= inX && inX < dimX1) { cube = 1; idx = inZ * dimX1 * dimY1 + inY * dimX1 + inX; } - else if ( (dimX1 + pretendDimX2) <= inX && inX < (dimX1 + pretendDimX2 + dimX3) ) + else if ((dimX1 + pretendDimX2) <= inX && inX < (dimX1 + pretendDimX2 + dimX3)) { vtkm::Id inX_local = inX - dimX1 - pretendDimX2; cube = 3; @@ -300,27 +311,34 @@ public: } private: - const vtkm::Id dimX1, dimY1, dimZ1; // left extension - const vtkm::Id dimX2, dimY2, dimZ2; // actual signal dims - const vtkm::Id startX2, startY2, startZ2, pretendDimX2, pretendDimY2, pretendDimZ2; - const vtkm::Id dimX3, dimY3, dimZ3; // right extension + const vtkm::Id dimX1, dimY1, dimZ1; // left extension + const vtkm::Id dimX2, dimY2, dimZ2; // actual signal dims + const vtkm::Id startX2, startY2, startZ2, pretendDimX2, pretendDimY2, pretendDimZ2; + const vtkm::Id dimX3, dimY3, dimZ3; // right extension }; class IndexTranslator3CubesTopDown { public: - IndexTranslator3CubesTopDown ( - vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, - vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, - vtkm::Id startx_2, vtkm::Id starty_2, vtkm::Id startz_2, - vtkm::Id pretendx_2, vtkm::Id pretendy_2, vtkm::Id pretendz_2, - vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3 ) - : - dimX1(x_1), dimY1(y_1), dimZ1(z_1), - dimX2(x_2), dimY2(y_2), dimZ2(z_2), - startX2( startx_2 ), startY2( starty_2 ), startZ2(startz_2), - pretendDimX2(pretendx_2), pretendDimY2(pretendy_2), pretendDimZ2(pretendz_2), - dimX3(x_3), dimY3(y_3), dimZ3(z_3) + IndexTranslator3CubesTopDown(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, vtkm::Id y_2, + vtkm::Id z_2, vtkm::Id startx_2, vtkm::Id starty_2, + vtkm::Id startz_2, vtkm::Id pretendx_2, vtkm::Id pretendy_2, + vtkm::Id pretendz_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3) + : dimX1(x_1) + , dimY1(y_1) + , dimZ1(z_1) + , dimX2(x_2) + , dimY2(y_2) + , dimZ2(z_2) + , startX2(startx_2) + , startY2(starty_2) + , startZ2(startz_2) + , pretendDimX2(pretendx_2) + , pretendDimY2(pretendy_2) + , pretendDimZ2(pretendz_2) + , dimX3(x_3) + , dimY3(y_3) + , dimZ3(z_3) { (void)dimZ1; (void)dimZ2; @@ -330,21 +348,21 @@ public: } VTKM_EXEC_CONT - void Translate3Dto1D( vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, // 3D indices as input - vtkm::Id &cube, vtkm::Id &idx ) const // which cube, and idx of that cube + void Translate3Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, // 3D indices as input + vtkm::Id& cube, vtkm::Id& idx) const // which cube, and idx of that cube { - if ( dimY1 <= inY && inY < (dimY1 + pretendDimY2) ) + if (dimY1 <= inY && inY < (dimY1 + pretendDimY2)) { vtkm::Id inY_local = inY - dimY1; cube = 2; idx = (inZ + startZ2) * dimX2 * dimY2 + (inY_local + startY2) * dimX2 + inX + startX2; } - else if ( 0 <= inY && inY < dimY1 ) + else if (0 <= inY && inY < dimY1) { cube = 1; idx = inZ * dimX1 * dimY1 + inY * dimX1 + inX; } - else if ( (dimY1 + pretendDimY2) <= inY && inY < (dimY1 + pretendDimY2 + dimY3) ) + else if ((dimY1 + pretendDimY2) <= inY && inY < (dimY1 + pretendDimY2 + dimY3)) { vtkm::Id inY_local = inY - dimY1 - pretendDimY2; cube = 3; @@ -357,27 +375,34 @@ public: } private: - const vtkm::Id dimX1, dimY1, dimZ1; // left extension - const vtkm::Id dimX2, dimY2, dimZ2; // actual signal dims - const vtkm::Id startX2, startY2, startZ2, pretendDimX2, pretendDimY2, pretendDimZ2; - const vtkm::Id dimX3, dimY3, dimZ3; // right extension + const vtkm::Id dimX1, dimY1, dimZ1; // left extension + const vtkm::Id dimX2, dimY2, dimZ2; // actual signal dims + const vtkm::Id startX2, startY2, startZ2, pretendDimX2, pretendDimY2, pretendDimZ2; + const vtkm::Id dimX3, dimY3, dimZ3; // right extension }; class IndexTranslator3CubesFrontBack { public: - IndexTranslator3CubesFrontBack ( - vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, - vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, - vtkm::Id startx_2, vtkm::Id starty_2, vtkm::Id startz_2, - vtkm::Id pretendx_2, vtkm::Id pretendy_2, vtkm::Id pretendz_2, - vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3 ) - : - dimX1(x_1), dimY1(y_1), dimZ1(z_1), - dimX2(x_2), dimY2(y_2), dimZ2(z_2), - startX2( startx_2 ), startY2( starty_2 ), startZ2(startz_2), - pretendDimX2(pretendx_2), pretendDimY2(pretendy_2), pretendDimZ2(pretendz_2), - dimX3(x_3), dimY3(y_3), dimZ3(z_3) + IndexTranslator3CubesFrontBack(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, + vtkm::Id y_2, vtkm::Id z_2, vtkm::Id startx_2, vtkm::Id starty_2, + vtkm::Id startz_2, vtkm::Id pretendx_2, vtkm::Id pretendy_2, + vtkm::Id pretendz_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3) + : dimX1(x_1) + , dimY1(y_1) + , dimZ1(z_1) + , dimX2(x_2) + , dimY2(y_2) + , dimZ2(z_2) + , startX2(startx_2) + , startY2(starty_2) + , startZ2(startz_2) + , pretendDimX2(pretendx_2) + , pretendDimY2(pretendy_2) + , pretendDimZ2(pretendz_2) + , dimX3(x_3) + , dimY3(y_3) + , dimZ3(z_3) { (void)dimZ2; (void)pretendDimX2; @@ -385,21 +410,21 @@ public: } VTKM_EXEC_CONT - void Translate3Dto1D( vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, // 3D indices as input - vtkm::Id &cube, vtkm::Id &idx ) const // which cube, and idx of that cube + void Translate3Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, // 3D indices as input + vtkm::Id& cube, vtkm::Id& idx) const // which cube, and idx of that cube { - if ( dimZ1 <= inZ && inZ < (dimZ1 + pretendDimZ2) ) + if (dimZ1 <= inZ && inZ < (dimZ1 + pretendDimZ2)) { vtkm::Id inZ_local = inZ - dimZ1; cube = 2; idx = (inZ_local + startZ2) * dimX2 * dimY2 + (inY + startY2) * dimX2 + inX + startX2; } - else if ( 0 <= inZ && inZ < dimZ1 ) + else if (0 <= inZ && inZ < dimZ1) { cube = 1; idx = inZ * dimX1 * dimY1 + inY * dimX1 + inX; } - else if ( (dimZ1 + pretendDimZ2) <= inZ && inZ < (dimZ1 + pretendDimZ2 + dimZ3) ) + else if ((dimZ1 + pretendDimZ2) <= inZ && inZ < (dimZ1 + pretendDimZ2 + dimZ3)) { vtkm::Id inZ_local = inZ - dimZ1 - pretendDimZ2; cube = 3; @@ -412,13 +437,12 @@ public: } private: - const vtkm::Id dimX1, dimY1, dimZ1; // left extension - const vtkm::Id dimX2, dimY2, dimZ2; // actual signal dims - const vtkm::Id startX2, startY2, startZ2, pretendDimX2, pretendDimY2, pretendDimZ2; - const vtkm::Id dimX3, dimY3, dimZ3; // right extension + const vtkm::Id dimX1, dimY1, dimZ1; // left extension + const vtkm::Id dimX2, dimY2, dimZ2; // actual signal dims + const vtkm::Id startX2, startY2, startZ2, pretendDimX2, pretendDimY2, pretendDimZ2; + const vtkm::Id dimX3, dimY3, dimZ3; // right extension }; - //============================================================================= // @@ -433,24 +457,37 @@ private: class IndexTranslator6CubesLeftRight { public: - IndexTranslator6CubesLeftRight( - vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, - vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, - vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, - vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, - vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, - vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, - vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, - vtkm::Id start_x5, vtkm::Id start_y5, vtkm::Id start_z5 ) - : - dimX1(x_1), dimY1(y_1), dimZ1(z_1), - dimX2(x_2), dimY2(y_2), dimZ2(z_2), - dimX3(x_3), dimY3(y_3), dimZ3(z_3), - dimX4(x_4), dimY4(y_4), dimZ4(z_4), - dimXa(x_a), dimYa(y_a), dimZa(z_a), - dimXd(x_d), dimYd(y_d), dimZd(z_d), - dimX5(x_5), dimY5(y_5), dimZ5(z_5), - startX5(start_x5), startY5(start_y5), startZ5(start_z5) + IndexTranslator6CubesLeftRight(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, + vtkm::Id y_2, vtkm::Id z_2, vtkm::Id x_3, vtkm::Id y_3, + vtkm::Id z_3, vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, + vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, vtkm::Id x_d, + vtkm::Id y_d, vtkm::Id z_d, vtkm::Id x_5, vtkm::Id y_5, + vtkm::Id z_5, vtkm::Id start_x5, vtkm::Id start_y5, + vtkm::Id start_z5) + : dimX1(x_1) + , dimY1(y_1) + , dimZ1(z_1) + , dimX2(x_2) + , dimY2(y_2) + , dimZ2(z_2) + , dimX3(x_3) + , dimY3(y_3) + , dimZ3(z_3) + , dimX4(x_4) + , dimY4(y_4) + , dimZ4(z_4) + , dimXa(x_a) + , dimYa(y_a) + , dimZa(z_a) + , dimXd(x_d) + , dimYd(y_d) + , dimZd(z_d) + , dimX5(x_5) + , dimY5(y_5) + , dimZ5(z_5) + , startX5(start_x5) + , startY5(start_y5) + , startZ5(start_z5) { (void)dimYa; (void)dimYd; @@ -464,43 +501,44 @@ public: } VTKM_EXEC_CONT - void Translate3Dto1D( vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, // 3D indices as input - vtkm::Id &cube, vtkm::Id &idx ) const // which cube, and idx of that cube + void Translate3Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, // 3D indices as input + vtkm::Id& cube, vtkm::Id& idx) const // which cube, and idx of that cube { - if ( dimX1 <= inX && inX < (dimX1 + dimXa) ) + if (dimX1 <= inX && inX < (dimX1 + dimXa)) { vtkm::Id inX_local = inX - dimX1; - cube = 5; // cAcD - idx = (inZ + startZ5) * dimX5 * dimY5 + (inY + startY5) * dimX5 + (inX_local + startX5 ); + cube = 5; // cAcD + idx = (inZ + startZ5) * dimX5 * dimY5 + (inY + startY5) * dimX5 + (inX_local + startX5); } - else if ( (dimX1 + dimXa + dimX2 + dimX3) <= inX && inX < (dimX1 + dimXa + dimX2 + dimX3 + dimXd) ) + else if ((dimX1 + dimXa + dimX2 + dimX3) <= inX && + inX < (dimX1 + dimXa + dimX2 + dimX3 + dimXd)) { - vtkm::Id inX_local = inX - dimX1 - dimX2 - dimX3; // no -dimXa since this is on the same cube - cube = 5; // cAcD - idx = (inZ + startZ5) * dimX5 * dimY5 + (inY + startY5) * dimX5 + (inX_local + startX5 ); + vtkm::Id inX_local = inX - dimX1 - dimX2 - dimX3; // no -dimXa since this is on the same cube + cube = 5; // cAcD + idx = (inZ + startZ5) * dimX5 * dimY5 + (inY + startY5) * dimX5 + (inX_local + startX5); } - else if ( 0 <= inX && inX < dimX1 ) + else if (0 <= inX && inX < dimX1) { - cube = 1; // ext1 + cube = 1; // ext1 idx = inZ * dimX1 * dimY1 + inY * dimX1 + inX; } - else if ( (dimX1 + dimXa) <= inX && inX < (dimX1 + dimXa + dimX2) ) + else if ((dimX1 + dimXa) <= inX && inX < (dimX1 + dimXa + dimX2)) { vtkm::Id inX_local = inX - dimX1 - dimXa; - cube = 2; // ext2 + cube = 2; // ext2 idx = inZ * dimX2 * dimY2 + inY * dimX2 + inX_local; } - else if ( (dimX1 + dimXa + dimX2) <= inX && inX < (dimX1 + dimXa + dimX2 + dimX3) ) + else if ((dimX1 + dimXa + dimX2) <= inX && inX < (dimX1 + dimXa + dimX2 + dimX3)) { vtkm::Id inX_local = inX - dimX1 - dimXa - dimX2; - cube = 3; // ext3 + cube = 3; // ext3 idx = inZ * dimX3 * dimY3 + inY * dimX3 + inX_local; } - else if ( (dimX1 + dimXa + dimX2 + dimX3 + dimXd) <= inX && - inX < (dimX1 + dimXa + dimX2 + dimX3 + dimXd + dimX4) ) + else if ((dimX1 + dimXa + dimX2 + dimX3 + dimXd) <= inX && + inX < (dimX1 + dimXa + dimX2 + dimX3 + dimXd + dimX4)) { vtkm::Id inX_local = inX - dimX1 - dimXa - dimX2 - dimX3 - dimXd; - cube = 4; // ext4 + cube = 4; // ext4 idx = inZ * dimX4 * dimY4 + inY * dimX4 + inX_local; } else @@ -510,33 +548,45 @@ public: } private: - const vtkm::Id dimX1, dimY1, dimZ1, dimX2, dimY2, dimZ2; // extension cube sizes - const vtkm::Id dimX3, dimY3, dimZ3, dimX4, dimY4, dimZ4; // extension cube sizes - const vtkm::Id dimXa, dimYa, dimZa, dimXd, dimYd, dimZd; // signal cube sizes - const vtkm::Id dimX5, dimY5, dimZ5, startX5, startY5, startZ5; // entire cube size + const vtkm::Id dimX1, dimY1, dimZ1, dimX2, dimY2, dimZ2; // extension cube sizes + const vtkm::Id dimX3, dimY3, dimZ3, dimX4, dimY4, dimZ4; // extension cube sizes + const vtkm::Id dimXa, dimYa, dimZa, dimXd, dimYd, dimZd; // signal cube sizes + const vtkm::Id dimX5, dimY5, dimZ5, startX5, startY5, startZ5; // entire cube size }; class IndexTranslator6CubesTopDown { public: - IndexTranslator6CubesTopDown( - vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, - vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, - vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, - vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, - vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, - vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, - vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, - vtkm::Id start_x5, vtkm::Id start_y5, vtkm::Id start_z5 ) - : - dimX1(x_1), dimY1(y_1), dimZ1(z_1), - dimX2(x_2), dimY2(y_2), dimZ2(z_2), - dimX3(x_3), dimY3(y_3), dimZ3(z_3), - dimX4(x_4), dimY4(y_4), dimZ4(z_4), - dimXa(x_a), dimYa(y_a), dimZa(z_a), - dimXd(x_d), dimYd(y_d), dimZd(z_d), - dimX5(x_5), dimY5(y_5), dimZ5(z_5), - startX5(start_x5), startY5(start_y5), startZ5(start_z5) + IndexTranslator6CubesTopDown(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, vtkm::Id y_2, + vtkm::Id z_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, vtkm::Id x_4, + vtkm::Id y_4, vtkm::Id z_4, vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, + vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, vtkm::Id x_5, vtkm::Id y_5, + vtkm::Id z_5, vtkm::Id start_x5, vtkm::Id start_y5, + vtkm::Id start_z5) + : dimX1(x_1) + , dimY1(y_1) + , dimZ1(z_1) + , dimX2(x_2) + , dimY2(y_2) + , dimZ2(z_2) + , dimX3(x_3) + , dimY3(y_3) + , dimZ3(z_3) + , dimX4(x_4) + , dimY4(y_4) + , dimZ4(z_4) + , dimXa(x_a) + , dimYa(y_a) + , dimZa(z_a) + , dimXd(x_d) + , dimYd(y_d) + , dimZd(z_d) + , dimX5(x_5) + , dimY5(y_5) + , dimZ5(z_5) + , startX5(start_x5) + , startY5(start_y5) + , startZ5(start_z5) { (void)dimXa; (void)dimXd; @@ -550,43 +600,44 @@ public: } VTKM_EXEC_CONT - void Translate3Dto1D( vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, // 3D indices as input - vtkm::Id &cube, vtkm::Id &idx ) const // which cube, and idx of that cube + void Translate3Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, // 3D indices as input + vtkm::Id& cube, vtkm::Id& idx) const // which cube, and idx of that cube { - if ( dimY1 <= inY && inY < (dimY1 + dimYa) ) + if (dimY1 <= inY && inY < (dimY1 + dimYa)) { vtkm::Id inY_local = inY - dimY1; - cube = 5; // cAcD - idx = (inZ + startZ5) * dimX5 * dimY5 + (inY_local + startY5 ) * dimX5 + (inX + startX5); - } - else if ( (dimY1 + dimYa + dimY2 + dimY3) <= inY && inY < (dimY1 + dimYa + dimY2 + dimY3 + dimYd) ) - { - vtkm::Id inY_local = inY - dimY1 - dimY2 - dimY3; - cube = 5; // cAcD + cube = 5; // cAcD idx = (inZ + startZ5) * dimX5 * dimY5 + (inY_local + startY5) * dimX5 + (inX + startX5); } - else if ( 0 <= inY && inY < dimY1 ) + else if ((dimY1 + dimYa + dimY2 + dimY3) <= inY && + inY < (dimY1 + dimYa + dimY2 + dimY3 + dimYd)) { - cube = 1; // ext1 + vtkm::Id inY_local = inY - dimY1 - dimY2 - dimY3; + cube = 5; // cAcD + idx = (inZ + startZ5) * dimX5 * dimY5 + (inY_local + startY5) * dimX5 + (inX + startX5); + } + else if (0 <= inY && inY < dimY1) + { + cube = 1; // ext1 idx = inZ * dimX1 * dimY1 + inY * dimX1 + inX; } - else if ( (dimY1 + dimYa) <= inY && inY < (dimY1 + dimYa + dimY2) ) + else if ((dimY1 + dimYa) <= inY && inY < (dimY1 + dimYa + dimY2)) { vtkm::Id inY_local = inY - dimY1 - dimYa; - cube = 2; // ext2 + cube = 2; // ext2 idx = inZ * dimX2 * dimY2 + inY_local * dimX2 + inX; } - else if ( (dimY1 + dimYa + dimY2) <= inY && inY < (dimY1 + dimYa + dimY2 + dimY3) ) + else if ((dimY1 + dimYa + dimY2) <= inY && inY < (dimY1 + dimYa + dimY2 + dimY3)) { vtkm::Id inY_local = inY - dimY1 - dimYa - dimY2; - cube = 3; // ext3 + cube = 3; // ext3 idx = inZ * dimX3 * dimY3 + inY_local * dimX3 + inX; } - else if ( (dimY1 + dimYa + dimY2 + dimY3 + dimYd) <= inY && - inY < (dimY1 + dimYa + dimY2 + dimY3 + dimYd + dimY4) ) + else if ((dimY1 + dimYa + dimY2 + dimY3 + dimYd) <= inY && + inY < (dimY1 + dimYa + dimY2 + dimY3 + dimYd + dimY4)) { vtkm::Id inY_local = inY - dimY1 - dimYa - dimY2 - dimY3 - dimYd; - cube = 4; // ext4 + cube = 4; // ext4 idx = inZ * dimX4 * dimY4 + inY_local * dimX4 + inX; } else @@ -596,34 +647,47 @@ public: } private: - const vtkm::Id dimX1, dimY1, dimZ1, dimX2, dimY2, dimZ2; // extension cube sizes - const vtkm::Id dimX3, dimY3, dimZ3, dimX4, dimY4, dimZ4; // extension cube sizes - const vtkm::Id dimXa, dimYa, dimZa, dimXd, dimYd, dimZd; // signal cube sizes - const vtkm::Id dimX5, dimY5, dimZ5, startX5, startY5, startZ5; // entire cube size + const vtkm::Id dimX1, dimY1, dimZ1, dimX2, dimY2, dimZ2; // extension cube sizes + const vtkm::Id dimX3, dimY3, dimZ3, dimX4, dimY4, dimZ4; // extension cube sizes + const vtkm::Id dimXa, dimYa, dimZa, dimXd, dimYd, dimZd; // signal cube sizes + const vtkm::Id dimX5, dimY5, dimZ5, startX5, startY5, startZ5; // entire cube size }; class IndexTranslator6CubesFrontBack { public: VTKM_EXEC_CONT - IndexTranslator6CubesFrontBack( - vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, - vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, - vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, - vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, - vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, - vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, - vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, - vtkm::Id start_x5, vtkm::Id start_y5, vtkm::Id start_z5 ) - : - dimX1(x_1), dimY1(y_1), dimZ1(z_1), - dimX2(x_2), dimY2(y_2), dimZ2(z_2), - dimX3(x_3), dimY3(y_3), dimZ3(z_3), - dimX4(x_4), dimY4(y_4), dimZ4(z_4), - dimXa(x_a), dimYa(y_a), dimZa(z_a), - dimXd(x_d), dimYd(y_d), dimZd(z_d), - dimX5(x_5), dimY5(y_5), dimZ5(z_5), - startX5(start_x5), startY5(start_y5), startZ5(start_z5) + IndexTranslator6CubesFrontBack(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, + vtkm::Id y_2, vtkm::Id z_2, vtkm::Id x_3, vtkm::Id y_3, + vtkm::Id z_3, vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, + vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, vtkm::Id x_d, + vtkm::Id y_d, vtkm::Id z_d, vtkm::Id x_5, vtkm::Id y_5, + vtkm::Id z_5, vtkm::Id start_x5, vtkm::Id start_y5, + vtkm::Id start_z5) + : dimX1(x_1) + , dimY1(y_1) + , dimZ1(z_1) + , dimX2(x_2) + , dimY2(y_2) + , dimZ2(z_2) + , dimX3(x_3) + , dimY3(y_3) + , dimZ3(z_3) + , dimX4(x_4) + , dimY4(y_4) + , dimZ4(z_4) + , dimXa(x_a) + , dimYa(y_a) + , dimZa(z_a) + , dimXd(x_d) + , dimYd(y_d) + , dimZd(z_d) + , dimX5(x_5) + , dimY5(y_5) + , dimZ5(z_5) + , startX5(start_x5) + , startY5(start_y5) + , startZ5(start_z5) { (void)dimXd; (void)dimXa; @@ -633,43 +697,44 @@ public: } VTKM_EXEC_CONT - void Translate3Dto1D( vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, // 3D indices as input - vtkm::Id &cube, vtkm::Id &idx ) const // which cube, and idx of that cube + void Translate3Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, // 3D indices as input + vtkm::Id& cube, vtkm::Id& idx) const // which cube, and idx of that cube { - if ( dimZ1 <= inZ && inZ < (dimZ1 + dimZa) ) + if (dimZ1 <= inZ && inZ < (dimZ1 + dimZa)) { vtkm::Id inZ_local = inZ - dimZ1; - cube = 5; // cAcD - idx = (inZ_local + startZ5) * dimX5 * dimY5 + (inY + startY5 ) * dimX5 + (inX + startX5); - } - else if ( (dimZ1 + dimZa + dimZ2 + dimZ3) <= inZ && inZ < (dimZ1 + dimZa + dimZ2 + dimZ3 + dimZd) ) - { - vtkm::Id inZ_local = inZ - dimZ1 - dimZ2 - dimZ3; - cube = 5; // cAcD + cube = 5; // cAcD idx = (inZ_local + startZ5) * dimX5 * dimY5 + (inY + startY5) * dimX5 + (inX + startX5); } - else if ( 0 <= inZ && inZ < dimZ1 ) + else if ((dimZ1 + dimZa + dimZ2 + dimZ3) <= inZ && + inZ < (dimZ1 + dimZa + dimZ2 + dimZ3 + dimZd)) { - cube = 1; // ext1 + vtkm::Id inZ_local = inZ - dimZ1 - dimZ2 - dimZ3; + cube = 5; // cAcD + idx = (inZ_local + startZ5) * dimX5 * dimY5 + (inY + startY5) * dimX5 + (inX + startX5); + } + else if (0 <= inZ && inZ < dimZ1) + { + cube = 1; // ext1 idx = inZ * dimX1 * dimY1 + inY * dimX1 + inX; } - else if ( (dimZ1 + dimZa) <= inZ && inZ < (dimZ1 + dimZa + dimZ2) ) + else if ((dimZ1 + dimZa) <= inZ && inZ < (dimZ1 + dimZa + dimZ2)) { vtkm::Id inZ_local = inZ - dimZ1 - dimZa; - cube = 2; // ext2 + cube = 2; // ext2 idx = inZ_local * dimX2 * dimY2 + inY * dimX2 + inX; } - else if ( (dimZ1 + dimZa + dimZ2) <= inZ && inZ < (dimZ1 + dimZa + dimZ2 + dimZ3) ) + else if ((dimZ1 + dimZa + dimZ2) <= inZ && inZ < (dimZ1 + dimZa + dimZ2 + dimZ3)) { vtkm::Id inZ_local = inZ - dimZ1 - dimZa - dimZ2; - cube = 3; // ext3 + cube = 3; // ext3 idx = inZ_local * dimX3 * dimY3 + inY * dimX3 + inX; } - else if ( (dimZ1 + dimZa + dimZ2 + dimZ3 + dimZd) <= inZ && - inZ < (dimZ1 + dimZa + dimZ2 + dimZ3 + dimZd + dimZ4) ) + else if ((dimZ1 + dimZa + dimZ2 + dimZ3 + dimZd) <= inZ && + inZ < (dimZ1 + dimZa + dimZ2 + dimZ3 + dimZd + dimZ4)) { vtkm::Id inZ_local = inZ - dimZ1 - dimZa - dimZ2 - dimZ3 - dimZd; - cube = 4; // ext4 + cube = 4; // ext4 idx = inZ_local * dimX4 * dimY4 + inY * dimX4 + inX; } else @@ -679,222 +744,203 @@ public: } private: - const vtkm::Id dimX1, dimY1, dimZ1, dimX2, dimY2, dimZ2; // extension cube sizes - const vtkm::Id dimX3, dimY3, dimZ3, dimX4, dimY4, dimZ4; // extension cube sizes - const vtkm::Id dimXa, dimYa, dimZa, dimXd, dimYd, dimZd; // signal cube sizes - const vtkm::Id dimX5, dimY5, dimZ5, startX5, startY5, startZ5; // entire cube size + const vtkm::Id dimX1, dimY1, dimZ1, dimX2, dimY2, dimZ2; // extension cube sizes + const vtkm::Id dimX3, dimY3, dimZ3, dimX4, dimY4, dimZ4; // extension cube sizes + const vtkm::Id dimXa, dimYa, dimZa, dimXd, dimYd, dimZd; // signal cube sizes + const vtkm::Id dimX5, dimY5, dimZ5, startX5, startY5, startZ5; // entire cube size }; - - //============================================================================= // Worklet: 3D forward transform along X (left-right) -template< typename DeviceTag > -class ForwardTransform3DLeftRight: public vtkm::worklet::WorkletMapField +template +class ForwardTransform3DLeftRight : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(WholeArrayIn, // left extension - WholeArrayIn, // signal - WholeArrayIn, // right extension - WholeArrayOut); // cA followed by cD + typedef void ControlSignature(WholeArrayIn, // left extension + WholeArrayIn, // signal + WholeArrayIn, // right extension + WholeArrayOut); // cA followed by cD typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); - typedef _4 InputDomain; + typedef _4 InputDomain; VTKM_EXEC_CONT - ForwardTransform3DLeftRight ( - const vtkm::cont::ArrayHandle &loFilter, - const vtkm::cont::ArrayHandle &hiFilter, - vtkm::Id filter_len, - vtkm::Id approx_len, - bool odd_low, - vtkm::Id dimX1, vtkm::Id dimY1, vtkm::Id dimZ1, - vtkm::Id dimX2, vtkm::Id dimY2, vtkm::Id dimZ2, - vtkm::Id startX2, vtkm::Id startY2, vtkm::Id startZ2, - vtkm::Id pretendX2, vtkm::Id pretendY2, vtkm::Id pretendZ2, - vtkm::Id dimX3, vtkm::Id dimY3, vtkm::Id dimZ3 ) - : - lowFilter( loFilter.PrepareForInput( DeviceTag() ) ), - highFilter( hiFilter.PrepareForInput( DeviceTag() ) ), - filterLen( filter_len ), - approxLen( approx_len ), - outDimX( pretendX2 ), outDimY( pretendY2 ), outDimZ( pretendZ2 ), - translator( dimX1, dimY1, dimZ1, - dimX2, dimY2, dimZ2, - startX2, startY2, startZ2, - pretendX2, pretendY2, pretendZ2, - dimX3, dimY3, dimZ3 ) + ForwardTransform3DLeftRight(const vtkm::cont::ArrayHandle& loFilter, + const vtkm::cont::ArrayHandle& hiFilter, + vtkm::Id filter_len, vtkm::Id approx_len, bool odd_low, + vtkm::Id dimX1, vtkm::Id dimY1, vtkm::Id dimZ1, vtkm::Id dimX2, + vtkm::Id dimY2, vtkm::Id dimZ2, vtkm::Id startX2, vtkm::Id startY2, + vtkm::Id startZ2, vtkm::Id pretendX2, vtkm::Id pretendY2, + vtkm::Id pretendZ2, vtkm::Id dimX3, vtkm::Id dimY3, vtkm::Id dimZ3) + : lowFilter(loFilter.PrepareForInput(DeviceTag())) + , highFilter(hiFilter.PrepareForInput(DeviceTag())) + , filterLen(filter_len) + , approxLen(approx_len) + , outDimX(pretendX2) + , outDimY(pretendY2) + , outDimZ(pretendZ2) + , translator(dimX1, dimY1, dimZ1, dimX2, dimY2, dimZ2, startX2, startY2, startZ2, pretendX2, + pretendY2, pretendZ2, dimX3, dimY3, dimZ3) { this->lstart = odd_low ? 1 : 0; this->hstart = 1; } VTKM_EXEC_CONT - void Output1Dto3D( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z ) const + void Output1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const { z = idx / (outDimX * outDimY); y = (idx - z * outDimX * outDimY) / outDimX; x = idx % outDimX; } VTKM_EXEC_CONT - vtkm::Id Output3Dto1D( vtkm::Id x, vtkm::Id y, vtkm::Id z ) const + vtkm::Id Output3Dto1D(vtkm::Id x, vtkm::Id y, vtkm::Id z) const { return z * outDimX * outDimY + y * outDimX + x; } - // Use 64-bit float for convolution calculation - #define VAL vtkm::Float64 - #define MAKEVAL(a) (static_cast(a)) - template - VTKM_EXEC_CONT - VAL GetVal( const InPortalType1 &portal1, const InPortalType2 &portal2, - const InPortalType3 &portal3, vtkm::Id inCube, vtkm::Id inIdx ) const +// Use 64-bit float for convolution calculation +#define VAL vtkm::Float64 +#define MAKEVAL(a) (static_cast(a)) + template + VTKM_EXEC_CONT VAL GetVal(const InPortalType1& portal1, const InPortalType2& portal2, + const InPortalType3& portal3, vtkm::Id inCube, vtkm::Id inIdx) const { - if( inCube == 2 ) + if (inCube == 2) { - return MAKEVAL( portal2.Get(inIdx) ); + return MAKEVAL(portal2.Get(inIdx)); } - else if( inCube == 1 ) + else if (inCube == 1) { - return MAKEVAL( portal1.Get(inIdx) ); + return MAKEVAL(portal1.Get(inIdx)); } - else if( inCube == 3 ) + else if (inCube == 3) { - return MAKEVAL( portal3.Get(inIdx) ); + return MAKEVAL(portal3.Get(inIdx)); } else { - vtkm::cont::ErrorInternal("Invalid cube index!"); - return -1; + vtkm::cont::ErrorInternal("Invalid cube index!"); + return -1; } } - template - VTKM_EXEC_CONT - void operator()(const InPortalType1 &inPortal1, // left extension - const InPortalType2 &inPortal2, // signal - const InPortalType3 &inPortal3, // right extension - OutputPortalType &coeffOut, - const vtkm::Id &workIndex) const + template + VTKM_EXEC_CONT void operator()(const InPortalType1& inPortal1, // left extension + const InPortalType2& inPortal2, // signal + const InPortalType3& inPortal3, // right extension + OutputPortalType& coeffOut, const vtkm::Id& workIndex) const { - vtkm::Id workX, workY, workZ, output1D; - Output1Dto3D( workIndex, workX, workY, workZ ); - vtkm::Id inputCube, inputIdx; + vtkm::Id workX, workY, workZ, output1D; + Output1Dto3D(workIndex, workX, workY, workZ); + vtkm::Id inputCube, inputIdx; typedef typename OutputPortalType::ValueType OutputValueType; - if( workX % 2 == 0 ) // calculate cA + if (workX % 2 == 0) // calculate cA { vtkm::Id xl = lstart + workX; VAL sum = MAKEVAL(0.0); - for( vtkm::Id k = filterLen - 1; k > -1; k-- ) + for (vtkm::Id k = filterLen - 1; k > -1; k--) { - translator.Translate3Dto1D( xl, workY, workZ, inputCube, inputIdx ); - sum += lowFilter.Get(k) * - GetVal( inPortal1, inPortal2, inPortal3, inputCube, inputIdx ); + translator.Translate3Dto1D(xl, workY, workZ, inputCube, inputIdx); + sum += lowFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx); xl++; } - output1D = Output3Dto1D( workX/2, workY, workZ ); - coeffOut.Set( output1D, static_cast(sum) ); + output1D = Output3Dto1D(workX / 2, workY, workZ); + coeffOut.Set(output1D, static_cast(sum)); } - else // calculate cD + else // calculate cD { vtkm::Id xh = hstart + workX - 1; - VAL sum=MAKEVAL(0.0); - for( vtkm::Id k = filterLen - 1; k > -1; k-- ) + VAL sum = MAKEVAL(0.0); + for (vtkm::Id k = filterLen - 1; k > -1; k--) { - translator.Translate3Dto1D( xh, workY, workZ, inputCube, inputIdx ); - sum += highFilter.Get(k) * - GetVal( inPortal1, inPortal2, inPortal3, inputCube, inputIdx ); + translator.Translate3Dto1D(xh, workY, workZ, inputCube, inputIdx); + sum += highFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx); xh++; } - output1D = Output3Dto1D( (workX-1)/2 + approxLen, workY, workZ ); - coeffOut.Set( output1D, static_cast(sum) ); + output1D = Output3Dto1D((workX - 1) / 2 + approxLen, workY, workZ); + coeffOut.Set(output1D, static_cast(sum)); } } - #undef MAKEVAL - #undef VAL +#undef MAKEVAL +#undef VAL private: const typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst - lowFilter, highFilter; - const vtkm::Id filterLen, approxLen; - const vtkm::Id outDimX, outDimY, outDimZ; - const IndexTranslator3CubesLeftRight translator; - vtkm::Id lstart, hstart; + lowFilter, + highFilter; + const vtkm::Id filterLen, approxLen; + const vtkm::Id outDimX, outDimY, outDimZ; + const IndexTranslator3CubesLeftRight translator; + vtkm::Id lstart, hstart; }; -template< typename DeviceTag > -class ForwardTransform3DTopDown: public vtkm::worklet::WorkletMapField +template +class ForwardTransform3DTopDown : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(WholeArrayIn, // left extension - WholeArrayIn, // signal - WholeArrayIn, // right extension - WholeArrayOut); // cA followed by cD + typedef void ControlSignature(WholeArrayIn, // left extension + WholeArrayIn, // signal + WholeArrayIn, // right extension + WholeArrayOut); // cA followed by cD typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); - typedef _4 InputDomain; + typedef _4 InputDomain; VTKM_EXEC_CONT - ForwardTransform3DTopDown ( - const vtkm::cont::ArrayHandle &loFilter, - const vtkm::cont::ArrayHandle &hiFilter, - vtkm::Id filter_len, - vtkm::Id approx_len, - bool odd_low, - vtkm::Id dimX1, vtkm::Id dimY1, vtkm::Id dimZ1, - vtkm::Id dimX2, vtkm::Id dimY2, vtkm::Id dimZ2, - vtkm::Id startX2, vtkm::Id startY2, vtkm::Id startZ2, - vtkm::Id pretendX2, vtkm::Id pretendY2, vtkm::Id pretendZ2, - vtkm::Id dimX3, vtkm::Id dimY3, vtkm::Id dimZ3 ) - : - lowFilter( loFilter.PrepareForInput( DeviceTag() ) ), - highFilter( hiFilter.PrepareForInput( DeviceTag() ) ), - filterLen( filter_len ), - approxLen( approx_len ), - outDimX( pretendX2 ), outDimY( pretendY2 ), outDimZ( pretendZ2 ), - translator( dimX1, dimY1, dimZ1, - dimX2, dimY2, dimZ2, - startX2, startY2, startZ2, - pretendX2, pretendY2, pretendZ2, - dimX3, dimY3, dimZ3 ) + ForwardTransform3DTopDown(const vtkm::cont::ArrayHandle& loFilter, + const vtkm::cont::ArrayHandle& hiFilter, + vtkm::Id filter_len, vtkm::Id approx_len, bool odd_low, vtkm::Id dimX1, + vtkm::Id dimY1, vtkm::Id dimZ1, vtkm::Id dimX2, vtkm::Id dimY2, + vtkm::Id dimZ2, vtkm::Id startX2, vtkm::Id startY2, vtkm::Id startZ2, + vtkm::Id pretendX2, vtkm::Id pretendY2, vtkm::Id pretendZ2, + vtkm::Id dimX3, vtkm::Id dimY3, vtkm::Id dimZ3) + : lowFilter(loFilter.PrepareForInput(DeviceTag())) + , highFilter(hiFilter.PrepareForInput(DeviceTag())) + , filterLen(filter_len) + , approxLen(approx_len) + , outDimX(pretendX2) + , outDimY(pretendY2) + , outDimZ(pretendZ2) + , translator(dimX1, dimY1, dimZ1, dimX2, dimY2, dimZ2, startX2, startY2, startZ2, pretendX2, + pretendY2, pretendZ2, dimX3, dimY3, dimZ3) { this->lstart = odd_low ? 1 : 0; this->hstart = 1; } VTKM_EXEC_CONT - void Output1Dto3D( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z ) const + void Output1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const { z = idx / (outDimX * outDimY); y = (idx - z * outDimX * outDimY) / outDimX; x = idx % outDimX; } VTKM_EXEC_CONT - vtkm::Id Output3Dto1D( vtkm::Id x, vtkm::Id y, vtkm::Id z ) const + vtkm::Id Output3Dto1D(vtkm::Id x, vtkm::Id y, vtkm::Id z) const { return z * outDimX * outDimY + y * outDimX + x; } - // Use 64-bit float for convolution calculation - #define VAL vtkm::Float64 - #define MAKEVAL(a) (static_cast(a)) - template - VTKM_EXEC_CONT - VAL GetVal( const InPortalType1 &portal1, const InPortalType2 &portal2, - const InPortalType3 &portal3, vtkm::Id inCube, vtkm::Id inIdx ) const +// Use 64-bit float for convolution calculation +#define VAL vtkm::Float64 +#define MAKEVAL(a) (static_cast(a)) + template + VTKM_EXEC_CONT VAL GetVal(const InPortalType1& portal1, const InPortalType2& portal2, + const InPortalType3& portal3, vtkm::Id inCube, vtkm::Id inIdx) const { - if( inCube == 2 ) + if (inCube == 2) { - return MAKEVAL( portal2.Get(inIdx) ); + return MAKEVAL(portal2.Get(inIdx)); } - else if( inCube == 1 ) + else if (inCube == 1) { - return MAKEVAL( portal1.Get(inIdx) ); + return MAKEVAL(portal1.Get(inIdx)); } - else if( inCube == 3 ) + else if (inCube == 3) { - return MAKEVAL( portal3.Get(inIdx) ); + return MAKEVAL(portal3.Get(inIdx)); } else { @@ -903,132 +949,122 @@ public: } } - template - VTKM_EXEC_CONT - void operator()(const InPortalType1 &inPortal1, // top extension - const InPortalType2 &inPortal2, // signal - const InPortalType3 &inPortal3, // down extension - OutputPortalType &coeffOut, - const vtkm::Id &workIndex) const + template + VTKM_EXEC_CONT void operator()(const InPortalType1& inPortal1, // top extension + const InPortalType2& inPortal2, // signal + const InPortalType3& inPortal3, // down extension + OutputPortalType& coeffOut, const vtkm::Id& workIndex) const { - vtkm::Id workX, workY, workZ, output1D; - Output1Dto3D( workIndex, workX, workY, workZ ); - vtkm::Id inputCube, inputIdx; + vtkm::Id workX, workY, workZ, output1D; + Output1Dto3D(workIndex, workX, workY, workZ); + vtkm::Id inputCube, inputIdx; typedef typename OutputPortalType::ValueType OutputValueType; - if( workY % 2 == 0 ) // calculate cA + if (workY % 2 == 0) // calculate cA { vtkm::Id yl = lstart + workY; VAL sum = MAKEVAL(0.0); - for( vtkm::Id k = filterLen - 1; k > -1; k-- ) + for (vtkm::Id k = filterLen - 1; k > -1; k--) { - translator.Translate3Dto1D( workX, yl, workZ, inputCube, inputIdx ); - sum += lowFilter.Get(k) * - GetVal( inPortal1, inPortal2, inPortal3, inputCube, inputIdx ); + translator.Translate3Dto1D(workX, yl, workZ, inputCube, inputIdx); + sum += lowFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx); yl++; } - output1D = Output3Dto1D( workX, workY/2, workZ ); - coeffOut.Set( output1D, static_cast(sum) ); + output1D = Output3Dto1D(workX, workY / 2, workZ); + coeffOut.Set(output1D, static_cast(sum)); } - else // calculate cD + else // calculate cD { vtkm::Id yh = hstart + workY - 1; - VAL sum=MAKEVAL(0.0); - for( vtkm::Id k = filterLen - 1; k > -1; k-- ) + VAL sum = MAKEVAL(0.0); + for (vtkm::Id k = filterLen - 1; k > -1; k--) { - translator.Translate3Dto1D( workX, yh, workZ, inputCube, inputIdx ); - sum += highFilter.Get(k) * - GetVal( inPortal1, inPortal2, inPortal3, inputCube, inputIdx ); + translator.Translate3Dto1D(workX, yh, workZ, inputCube, inputIdx); + sum += highFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx); yh++; } - output1D = Output3Dto1D( workX, (workY-1)/2 + approxLen, workZ ); - coeffOut.Set( output1D, static_cast(sum) ); + output1D = Output3Dto1D(workX, (workY - 1) / 2 + approxLen, workZ); + coeffOut.Set(output1D, static_cast(sum)); } } - #undef MAKEVAL - #undef VAL +#undef MAKEVAL +#undef VAL private: const typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst - lowFilter, highFilter; - const vtkm::Id filterLen, approxLen; - const vtkm::Id outDimX, outDimY, outDimZ; - const IndexTranslator3CubesTopDown translator; - vtkm::Id lstart, hstart; + lowFilter, + highFilter; + const vtkm::Id filterLen, approxLen; + const vtkm::Id outDimX, outDimY, outDimZ; + const IndexTranslator3CubesTopDown translator; + vtkm::Id lstart, hstart; }; -template< typename DeviceTag > -class ForwardTransform3DFrontBack: public vtkm::worklet::WorkletMapField +template +class ForwardTransform3DFrontBack : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(WholeArrayIn, // left extension - WholeArrayIn, // signal - WholeArrayIn, // right extension - WholeArrayOut); // cA followed by cD + typedef void ControlSignature(WholeArrayIn, // left extension + WholeArrayIn, // signal + WholeArrayIn, // right extension + WholeArrayOut); // cA followed by cD typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); - typedef _4 InputDomain; + typedef _4 InputDomain; VTKM_EXEC_CONT - ForwardTransform3DFrontBack ( - const vtkm::cont::ArrayHandle &loFilter, - const vtkm::cont::ArrayHandle &hiFilter, - vtkm::Id filter_len, - vtkm::Id approx_len, - bool odd_low, - vtkm::Id dimX1, vtkm::Id dimY1, vtkm::Id dimZ1, - vtkm::Id dimX2, vtkm::Id dimY2, vtkm::Id dimZ2, - vtkm::Id startX2, vtkm::Id startY2, vtkm::Id startZ2, - vtkm::Id pretendX2, vtkm::Id pretendY2, vtkm::Id pretendZ2, - vtkm::Id dimX3, vtkm::Id dimY3, vtkm::Id dimZ3 ) - : - lowFilter( loFilter.PrepareForInput( DeviceTag() ) ), - highFilter( hiFilter.PrepareForInput( DeviceTag() ) ), - filterLen( filter_len ), - approxLen( approx_len ), - outDimX( pretendX2 ), outDimY( pretendY2 ), outDimZ( pretendZ2 ), - translator( dimX1, dimY1, dimZ1, - dimX2, dimY2, dimZ2, - startX2, startY2, startZ2, - pretendX2, pretendY2, pretendZ2, - dimX3, dimY3, dimZ3 ) + ForwardTransform3DFrontBack(const vtkm::cont::ArrayHandle& loFilter, + const vtkm::cont::ArrayHandle& hiFilter, + vtkm::Id filter_len, vtkm::Id approx_len, bool odd_low, + vtkm::Id dimX1, vtkm::Id dimY1, vtkm::Id dimZ1, vtkm::Id dimX2, + vtkm::Id dimY2, vtkm::Id dimZ2, vtkm::Id startX2, vtkm::Id startY2, + vtkm::Id startZ2, vtkm::Id pretendX2, vtkm::Id pretendY2, + vtkm::Id pretendZ2, vtkm::Id dimX3, vtkm::Id dimY3, vtkm::Id dimZ3) + : lowFilter(loFilter.PrepareForInput(DeviceTag())) + , highFilter(hiFilter.PrepareForInput(DeviceTag())) + , filterLen(filter_len) + , approxLen(approx_len) + , outDimX(pretendX2) + , outDimY(pretendY2) + , outDimZ(pretendZ2) + , translator(dimX1, dimY1, dimZ1, dimX2, dimY2, dimZ2, startX2, startY2, startZ2, pretendX2, + pretendY2, pretendZ2, dimX3, dimY3, dimZ3) { this->lstart = odd_low ? 1 : 0; this->hstart = 1; } VTKM_EXEC_CONT - void Output1Dto3D( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z ) const + void Output1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const { z = idx / (outDimX * outDimY); y = (idx - z * outDimX * outDimY) / outDimX; x = idx % outDimX; } VTKM_EXEC_CONT - vtkm::Id Output3Dto1D( vtkm::Id x, vtkm::Id y, vtkm::Id z ) const + vtkm::Id Output3Dto1D(vtkm::Id x, vtkm::Id y, vtkm::Id z) const { return z * outDimX * outDimY + y * outDimX + x; } - // Use 64-bit float for convolution calculation - #define VAL vtkm::Float64 - #define MAKEVAL(a) (static_cast(a)) - template - VTKM_EXEC_CONT - VAL GetVal( const InPortalType1 &portal1, const InPortalType2 &portal2, - const InPortalType3 &portal3, vtkm::Id inCube, vtkm::Id inIdx ) const +// Use 64-bit float for convolution calculation +#define VAL vtkm::Float64 +#define MAKEVAL(a) (static_cast(a)) + template + VTKM_EXEC_CONT VAL GetVal(const InPortalType1& portal1, const InPortalType2& portal2, + const InPortalType3& portal3, vtkm::Id inCube, vtkm::Id inIdx) const { - if( inCube == 2 ) + if (inCube == 2) { - return MAKEVAL( portal2.Get(inIdx) ); + return MAKEVAL(portal2.Get(inIdx)); } - else if( inCube == 1 ) + else if (inCube == 1) { - return MAKEVAL( portal1.Get(inIdx) ); + return MAKEVAL(portal1.Get(inIdx)); } - else if( inCube == 3 ) + else if (inCube == 3) { - return MAKEVAL( portal3.Get(inIdx) ); + return MAKEVAL(portal3.Get(inIdx)); } else { @@ -1037,63 +1073,58 @@ public: } } - template - VTKM_EXEC_CONT - void operator()(const InPortalType1 &inPortal1, // top extension - const InPortalType2 &inPortal2, // signal - const InPortalType3 &inPortal3, // down extension - OutputPortalType &coeffOut, - const vtkm::Id &workIndex) const + template + VTKM_EXEC_CONT void operator()(const InPortalType1& inPortal1, // top extension + const InPortalType2& inPortal2, // signal + const InPortalType3& inPortal3, // down extension + OutputPortalType& coeffOut, const vtkm::Id& workIndex) const { - vtkm::Id workX, workY, workZ, output1D; - Output1Dto3D( workIndex, workX, workY, workZ ); - vtkm::Id inputCube, inputIdx; + vtkm::Id workX, workY, workZ, output1D; + Output1Dto3D(workIndex, workX, workY, workZ); + vtkm::Id inputCube, inputIdx; typedef typename OutputPortalType::ValueType OutputValueType; - if( workZ % 2 == 0 ) // calculate cA + if (workZ % 2 == 0) // calculate cA { vtkm::Id zl = lstart + workZ; VAL sum = MAKEVAL(0.0); - for( vtkm::Id k = filterLen - 1; k > -1; k-- ) + for (vtkm::Id k = filterLen - 1; k > -1; k--) { - translator.Translate3Dto1D( workX, workY, zl, inputCube, inputIdx ); - sum += lowFilter.Get(k) * - GetVal( inPortal1, inPortal2, inPortal3, inputCube, inputIdx ); + translator.Translate3Dto1D(workX, workY, zl, inputCube, inputIdx); + sum += lowFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx); zl++; } - output1D = Output3Dto1D( workX, workY, workZ/2 ); - coeffOut.Set( output1D, static_cast(sum) ); + output1D = Output3Dto1D(workX, workY, workZ / 2); + coeffOut.Set(output1D, static_cast(sum)); } - else // calculate cD + else // calculate cD { vtkm::Id zh = hstart + workZ - 1; - VAL sum=MAKEVAL(0.0); - for( vtkm::Id k = filterLen - 1; k > -1; k-- ) + VAL sum = MAKEVAL(0.0); + for (vtkm::Id k = filterLen - 1; k > -1; k--) { - translator.Translate3Dto1D( workX, workY, zh, inputCube, inputIdx ); - sum += highFilter.Get(k) * - GetVal( inPortal1, inPortal2, inPortal3, inputCube, inputIdx ); + translator.Translate3Dto1D(workX, workY, zh, inputCube, inputIdx); + sum += highFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx); zh++; } - output1D = Output3Dto1D( workX, workY, (workZ-1)/2 + approxLen ); - coeffOut.Set( output1D, static_cast(sum) ); + output1D = Output3Dto1D(workX, workY, (workZ - 1) / 2 + approxLen); + coeffOut.Set(output1D, static_cast(sum)); } } - #undef MAKEVAL - #undef VAL +#undef MAKEVAL +#undef VAL private: const typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst - lowFilter, highFilter; - const vtkm::Id filterLen, approxLen; - const vtkm::Id outDimX, outDimY, outDimZ; - const IndexTranslator3CubesFrontBack translator; - vtkm::Id lstart, hstart; + lowFilter, + highFilter; + const vtkm::Id filterLen, approxLen; + const vtkm::Id outDimX, outDimY, outDimZ; + const IndexTranslator3CubesFrontBack translator; + vtkm::Id lstart, hstart; }; - - //============================================================================= // @@ -1107,90 +1138,79 @@ private: // The following 3 classes perform the same functionaliry in 3 directions // // Worklet: perform a simple 3D inverse transform along X direction (Left-right) -template< typename DeviceTag > -class InverseTransform3DLeftRight: public vtkm::worklet::WorkletMapField +template +class InverseTransform3DLeftRight : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayIn< ScalarAll >, // ext1 - WholeArrayIn< ScalarAll >, // ext2 - WholeArrayIn< ScalarAll >, // ext3 - WholeArrayIn< ScalarAll >, // ext4 - WholeArrayIn< ScalarAll >, // cA+cD (signal) - FieldOut< ScalarAll> ); // outptu coefficients - typedef void ExecutionSignature( _1, _2, _3, _4, _5, _6, WorkIndex ); - typedef _6 InputDomain; + typedef void ControlSignature(WholeArrayIn, // ext1 + WholeArrayIn, // ext2 + WholeArrayIn, // ext3 + WholeArrayIn, // ext4 + WholeArrayIn, // cA+cD (signal) + FieldOut); // outptu coefficients + typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, WorkIndex); + typedef _6 InputDomain; // Constructor VTKM_EXEC_CONT - InverseTransform3DLeftRight( - const vtkm::cont::ArrayHandle &lo_fil, - const vtkm::cont::ArrayHandle &hi_fil, - vtkm::Id fil_len, - vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, // ext1 - vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, // ext2 - vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, // ext3 - vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, // ext4 - vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, // cA - vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, // cD - vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, // signal, actual dims - vtkm::Id startX5, vtkm::Id startY5, vtkm::Id startZ5 ) - : - lowFilter( lo_fil.PrepareForInput( DeviceTag() ) ), - highFilter( hi_fil.PrepareForInput( DeviceTag() ) ), - filterLen( fil_len ), - outDimX(x_a + x_d), outDimY( y_a ), outDimZ( z_a ), - cALenExtended( x_1 + x_a + x_2 ), - translator(x_1, y_1, z_1, - x_2, y_2, z_2, - x_3, y_3, z_3, - x_4, y_4, z_4, - x_a, y_a, z_a, - x_d, y_d, z_d, - x_5, y_5, z_5, - startX5, startY5, startZ5 ) - { } + InverseTransform3DLeftRight(const vtkm::cont::ArrayHandle& lo_fil, + const vtkm::cont::ArrayHandle& hi_fil, + vtkm::Id fil_len, vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, // ext1 + vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, // ext2 + vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, // ext3 + vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, // ext4 + vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, // cA + vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, // cD + vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, // signal, actual dims + vtkm::Id startX5, vtkm::Id startY5, vtkm::Id startZ5) + : lowFilter(lo_fil.PrepareForInput(DeviceTag())) + , highFilter(hi_fil.PrepareForInput(DeviceTag())) + , filterLen(fil_len) + , outDimX(x_a + x_d) + , outDimY(y_a) + , outDimZ(z_a) + , cALenExtended(x_1 + x_a + x_2) + , translator(x_1, y_1, z_1, x_2, y_2, z_2, x_3, y_3, z_3, x_4, y_4, z_4, x_a, y_a, z_a, x_d, + y_d, z_d, x_5, y_5, z_5, startX5, startY5, startZ5) + { + } VTKM_EXEC_CONT - void Output1Dto3D( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z ) const + void Output1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const { z = idx / (outDimX * outDimY); y = (idx - z * outDimX * outDimY) / outDimX; x = idx % outDimX; } - // Use 64-bit float for convolution calculation - #define VAL vtkm::Float64 - #define MAKEVAL(a) (static_cast(a)) +// Use 64-bit float for convolution calculation +#define VAL vtkm::Float64 +#define MAKEVAL(a) (static_cast(a)) template - VTKM_EXEC_CONT - VAL GetVal( const InPortalType1 &ext1, - const InPortalType2 &ext2, - const InPortalType3 &ext3, - const InPortalType4 &ext4, - const InPortalType5 &sig5, - vtkm::Id inCube, - vtkm::Id inIdx ) const + typename InPortalType4, typename InPortalType5> + VTKM_EXEC_CONT VAL GetVal(const InPortalType1& ext1, const InPortalType2& ext2, + const InPortalType3& ext3, const InPortalType4& ext4, + const InPortalType5& sig5, vtkm::Id inCube, vtkm::Id inIdx) const { - if( inCube == 2 ) + if (inCube == 2) { - return MAKEVAL( ext2.Get(inIdx) ); + return MAKEVAL(ext2.Get(inIdx)); } - else if( inCube == 4 ) + else if (inCube == 4) { - return MAKEVAL( ext4.Get(inIdx) ); + return MAKEVAL(ext4.Get(inIdx)); } - else if( inCube == 1 ) + else if (inCube == 1) { - return MAKEVAL( ext1.Get(inIdx) ); + return MAKEVAL(ext1.Get(inIdx)); } - else if( inCube == 3 ) + else if (inCube == 3) { - return MAKEVAL( ext3.Get(inIdx) ); + return MAKEVAL(ext3.Get(inIdx)); } - else if( inCube == 5 ) + else if (inCube == 5) { - return MAKEVAL( sig5.Get(inIdx) ); + return MAKEVAL(sig5.Get(inIdx)); } else { @@ -1199,60 +1219,58 @@ public: } } - template< typename InPortalType1, typename InPortalType2, typename InPortalType3, - typename InPortalType4, typename InPortalType5, typename OutputValueType > - VTKM_EXEC - void operator() (const InPortalType1 &portal1, - const InPortalType2 &portal2, - const InPortalType3 &portal3, - const InPortalType4 &portal4, - const InPortalType5 &portal5, - OutputValueType &coeffOut, - const vtkm::Id &workIdx ) const + template + VTKM_EXEC void operator()(const InPortalType1& portal1, const InPortalType2& portal2, + const InPortalType3& portal3, const InPortalType4& portal4, + const InPortalType5& portal5, OutputValueType& coeffOut, + const vtkm::Id& workIdx) const { - vtkm::Id workX, workY, workZ; - vtkm::Id k1, k2, xi; - vtkm::Id inputCube, inputIdx; - Output1Dto3D( workIdx, workX, workY, workZ ); + vtkm::Id workX, workY, workZ; + vtkm::Id k1, k2, xi; + vtkm::Id inputCube, inputIdx; + Output1Dto3D(workIdx, workX, workY, workZ); - if( filterLen % 2 != 0 ) // odd filter + if (filterLen % 2 != 0) // odd filter { - if( workX % 2 != 0 ) + if (workX % 2 != 0) { - k1 = filterLen - 2; k2 = filterLen - 1; + k1 = filterLen - 2; + k2 = filterLen - 1; } else { - k1 = filterLen - 1; k2 = filterLen - 2; + k1 = filterLen - 1; + k2 = filterLen - 2; } VAL sum = 0.0; xi = (workX + 1) / 2; - while( k1 > -1 ) + while (k1 > -1) { - translator.Translate3Dto1D( xi, workY, workZ, inputCube, inputIdx ); - sum += lowFilter.Get(k1) * GetVal( portal1, portal2, portal3, portal4, portal5, - inputCube, inputIdx ); + translator.Translate3Dto1D(xi, workY, workZ, inputCube, inputIdx); + sum += lowFilter.Get(k1) * + GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx); xi++; k1 -= 2; } xi = workX / 2; - while( k2 > -1 ) + while (k2 > -1) { - translator.Translate3Dto1D( xi + cALenExtended, workY, workZ, inputCube, inputIdx ); - sum += highFilter.Get(k2) * GetVal( portal1, portal2, portal3, portal4, portal5, - inputCube, inputIdx ); + translator.Translate3Dto1D(xi + cALenExtended, workY, workZ, inputCube, inputIdx); + sum += highFilter.Get(k2) * + GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx); xi++; k2 -= 2; } - coeffOut = static_cast< OutputValueType> (sum); + coeffOut = static_cast(sum); } - else // even filter + else // even filter { - if( (filterLen/2) % 2 != 0 ) // odd length half filter + if ((filterLen / 2) % 2 != 0) // odd length half filter { xi = workX / 2; - if( workX % 2 != 0 ) + if (workX % 2 != 0) { k1 = filterLen - 1; } @@ -1261,10 +1279,10 @@ public: k1 = filterLen - 2; } } - else // even length half filter + else // even length half filter { xi = (workX + 1) / 2; - if( workX % 2 != 0 ) + if (workX % 2 != 0) { k1 = filterLen - 2; } @@ -1275,142 +1293,128 @@ public: } VAL cA, cD; VAL sum = 0.0; - while( k1 > -1 ) + while (k1 > -1) { - translator.Translate3Dto1D( xi, workY, workZ, inputCube, inputIdx ); - cA = GetVal( portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx ); - translator.Translate3Dto1D( xi + cALenExtended, workY, workZ, inputCube, inputIdx ); - cD = GetVal( portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx ); + translator.Translate3Dto1D(xi, workY, workZ, inputCube, inputIdx); + cA = GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx); + translator.Translate3Dto1D(xi + cALenExtended, workY, workZ, inputCube, inputIdx); + cD = GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx); sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD; xi++; k1 -= 2; } - coeffOut = static_cast< OutputValueType >(sum); + coeffOut = static_cast(sum); } } - #undef MAKEVAL - #undef VAL +#undef MAKEVAL +#undef VAL private: const typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst - lowFilter, highFilter; - const vtkm::Id filterLen; - vtkm::Id outDimX, outDimY, outDimZ; - vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD - const IndexTranslator6CubesLeftRight translator; + lowFilter, + highFilter; + const vtkm::Id filterLen; + vtkm::Id outDimX, outDimY, outDimZ; + vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD + const IndexTranslator6CubesLeftRight translator; }; -template< typename DeviceTag > -class InverseTransform3DTopDown: public vtkm::worklet::WorkletMapField +template +class InverseTransform3DTopDown : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayIn< ScalarAll >, // ext1 - WholeArrayIn< ScalarAll >, // ext2 - WholeArrayIn< ScalarAll >, // ext3 - WholeArrayIn< ScalarAll >, // ext4 - WholeArrayIn< ScalarAll >, // cA+cD (signal) - FieldOut< ScalarAll> ); // outptu coefficients - typedef void ExecutionSignature( _1, _2, _3, _4, _5, _6, WorkIndex ); - typedef _6 InputDomain; + typedef void ControlSignature(WholeArrayIn, // ext1 + WholeArrayIn, // ext2 + WholeArrayIn, // ext3 + WholeArrayIn, // ext4 + WholeArrayIn, // cA+cD (signal) + FieldOut); // outptu coefficients + typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, WorkIndex); + typedef _6 InputDomain; // Constructor VTKM_EXEC_CONT - InverseTransform3DTopDown( - const vtkm::cont::ArrayHandle &lo_fil, - const vtkm::cont::ArrayHandle &hi_fil, - vtkm::Id fil_len, - vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, // ext1 - vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, // ext2 - vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, // ext3 - vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, // ext4 - vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, // cA - vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, // cD - vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, // signal, actual dims - vtkm::Id startX5, vtkm::Id startY5, vtkm::Id startZ5 ) - : - lowFilter( lo_fil.PrepareForInput( DeviceTag() ) ), - highFilter( hi_fil.PrepareForInput( DeviceTag() ) ), - filterLen( fil_len ), - outDimX( x_a ), outDimY(y_a + y_d), outDimZ( z_a ), - cALenExtended( y_1 + y_a + y_2 ), - translator(x_1, y_1, z_1, - x_2, y_2, z_2, - x_3, y_3, z_3, - x_4, y_4, z_4, - x_a, y_a, z_a, - x_d, y_d, z_d, - x_5, y_5, z_5, - startX5, startY5, startZ5 ) - { } + InverseTransform3DTopDown(const vtkm::cont::ArrayHandle& lo_fil, + const vtkm::cont::ArrayHandle& hi_fil, vtkm::Id fil_len, + vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, // ext1 + vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, // ext2 + vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, // ext3 + vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, // ext4 + vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, // cA + vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, // cD + vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, // signal, actual dims + vtkm::Id startX5, vtkm::Id startY5, vtkm::Id startZ5) + : lowFilter(lo_fil.PrepareForInput(DeviceTag())) + , highFilter(hi_fil.PrepareForInput(DeviceTag())) + , filterLen(fil_len) + , outDimX(x_a) + , outDimY(y_a + y_d) + , outDimZ(z_a) + , cALenExtended(y_1 + y_a + y_2) + , translator(x_1, y_1, z_1, x_2, y_2, z_2, x_3, y_3, z_3, x_4, y_4, z_4, x_a, y_a, z_a, x_d, + y_d, z_d, x_5, y_5, z_5, startX5, startY5, startZ5) + { + } VTKM_EXEC_CONT - void Output1Dto3D( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z ) const + void Output1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const { z = idx / (outDimX * outDimY); y = (idx - z * outDimX * outDimY) / outDimX; x = idx % outDimX; } - // Use 64-bit float for convolution calculation - #define VAL vtkm::Float64 - #define MAKEVAL(a) (static_cast(a)) +// Use 64-bit float for convolution calculation +#define VAL vtkm::Float64 +#define MAKEVAL(a) (static_cast(a)) template - VTKM_EXEC_CONT - VAL GetVal( const InPortalType1 &ext1, - const InPortalType2 &ext2, - const InPortalType3 &ext3, - const InPortalType4 &ext4, - const InPortalType5 &sig5, - vtkm::Id inCube, - vtkm::Id inIdx ) const + typename InPortalType4, typename InPortalType5> + VTKM_EXEC_CONT VAL GetVal(const InPortalType1& ext1, const InPortalType2& ext2, + const InPortalType3& ext3, const InPortalType4& ext4, + const InPortalType5& sig5, vtkm::Id inCube, vtkm::Id inIdx) const { - if( inCube == 2 ) + if (inCube == 2) { - return MAKEVAL( ext2.Get(inIdx) ); + return MAKEVAL(ext2.Get(inIdx)); } - else if( inCube == 4 ) + else if (inCube == 4) { - return MAKEVAL( ext4.Get(inIdx) ); + return MAKEVAL(ext4.Get(inIdx)); } - else if( inCube == 1 ) + else if (inCube == 1) { - return MAKEVAL( ext1.Get(inIdx) ); + return MAKEVAL(ext1.Get(inIdx)); } - else if( inCube == 3 ) + else if (inCube == 3) { - return MAKEVAL( ext3.Get(inIdx) ); + return MAKEVAL(ext3.Get(inIdx)); } - else if( inCube == 5 ) + else if (inCube == 5) { - return MAKEVAL( sig5.Get(inIdx) ); + return MAKEVAL(sig5.Get(inIdx)); } else { - vtkm::cont::ErrorInternal("Invalid matrix index!"); - return -1; + vtkm::cont::ErrorInternal("Invalid matrix index!"); + return -1; } } - template< typename InPortalType1, typename InPortalType2, typename InPortalType3, - typename InPortalType4, typename InPortalType5, typename OutputValueType > - VTKM_EXEC - void operator() (const InPortalType1 &portal1, - const InPortalType2 &portal2, - const InPortalType3 &portal3, - const InPortalType4 &portal4, - const InPortalType5 &portal5, - OutputValueType &coeffOut, - const vtkm::Id &workIdx ) const + template + VTKM_EXEC void operator()(const InPortalType1& portal1, const InPortalType2& portal2, + const InPortalType3& portal3, const InPortalType4& portal4, + const InPortalType5& portal5, OutputValueType& coeffOut, + const vtkm::Id& workIdx) const { - vtkm::Id workX, workY, workZ; - vtkm::Id k1, k2, yi; - vtkm::Id inputCube, inputIdx; - Output1Dto3D( workIdx, workX, workY, workZ ); + vtkm::Id workX, workY, workZ; + vtkm::Id k1, k2, yi; + vtkm::Id inputCube, inputIdx; + Output1Dto3D(workIdx, workX, workY, workZ); - if( filterLen % 2 != 0 ) // odd filter + if (filterLen % 2 != 0) // odd filter { - if( workY % 2 != 0 ) + if (workY % 2 != 0) { k1 = filterLen - 2; k2 = filterLen - 1; @@ -1423,31 +1427,31 @@ public: VAL sum = 0.0; yi = (workY + 1) / 2; - while( k1 > -1 ) + while (k1 > -1) { - translator.Translate3Dto1D( workX, yi, workZ, inputCube, inputIdx ); - sum += lowFilter.Get(k1) * GetVal( portal1, portal2, portal3, portal4, portal5, - inputCube, inputIdx ); + translator.Translate3Dto1D(workX, yi, workZ, inputCube, inputIdx); + sum += lowFilter.Get(k1) * + GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx); yi++; k1 -= 2; } yi = workY / 2; - while( k2 > -1 ) + while (k2 > -1) { - translator.Translate3Dto1D( workX, yi + cALenExtended, workZ, inputCube, inputIdx ); - sum += highFilter.Get(k2) * GetVal( portal1, portal2, portal3, portal4, portal5, - inputCube, inputIdx ); + translator.Translate3Dto1D(workX, yi + cALenExtended, workZ, inputCube, inputIdx); + sum += highFilter.Get(k2) * + GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx); yi++; k2 -= 2; } - coeffOut = static_cast< OutputValueType >(sum); + coeffOut = static_cast(sum); } - else // even filter + else // even filter { - if( (filterLen/2) % 2 != 0 ) + if ((filterLen / 2) % 2 != 0) { yi = workY / 2; - if( workY % 2 != 0 ) + if (workY % 2 != 0) { k1 = filterLen - 1; } @@ -1459,7 +1463,7 @@ public: else { yi = (workY + 1) / 2; - if( workY % 2 != 0 ) + if (workY % 2 != 0) { k1 = filterLen - 2; } @@ -1470,145 +1474,130 @@ public: } VAL cA, cD; VAL sum = 0.0; - while( k1 > -1 ) + while (k1 > -1) { - translator.Translate3Dto1D( workX, yi, workZ, inputCube, inputIdx ); - cA = GetVal( portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx ); - translator.Translate3Dto1D( workX, yi + cALenExtended, workZ, inputCube, inputIdx ); - cD = GetVal( portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx ); + translator.Translate3Dto1D(workX, yi, workZ, inputCube, inputIdx); + cA = GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx); + translator.Translate3Dto1D(workX, yi + cALenExtended, workZ, inputCube, inputIdx); + cD = GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx); sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD; yi++; k1 -= 2; } - coeffOut = static_cast< OutputValueType >(sum); + coeffOut = static_cast(sum); } } - #undef MAKEVAL - #undef VAL +#undef MAKEVAL +#undef VAL private: const typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst - lowFilter, highFilter; - const vtkm::Id filterLen; - vtkm::Id outDimX, outDimY, outDimZ; - vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD - const IndexTranslator6CubesTopDown translator; + lowFilter, + highFilter; + const vtkm::Id filterLen; + vtkm::Id outDimX, outDimY, outDimZ; + vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD + const IndexTranslator6CubesTopDown translator; }; -template< typename DeviceTag > -class InverseTransform3DFrontBack: public vtkm::worklet::WorkletMapField +template +class InverseTransform3DFrontBack : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayIn< ScalarAll >, // ext1 - WholeArrayIn< ScalarAll >, // ext2 - WholeArrayIn< ScalarAll >, // ext3 - WholeArrayIn< ScalarAll >, // ext4 - WholeArrayIn< ScalarAll >, // cA+cD (signal) - FieldOut< ScalarAll> ); // outptu coefficients - typedef void ExecutionSignature( _1, _2, _3, _4, _5, _6, WorkIndex ); - typedef _6 InputDomain; + typedef void ControlSignature(WholeArrayIn, // ext1 + WholeArrayIn, // ext2 + WholeArrayIn, // ext3 + WholeArrayIn, // ext4 + WholeArrayIn, // cA+cD (signal) + FieldOut); // outptu coefficients + typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, WorkIndex); + typedef _6 InputDomain; // Constructor VTKM_EXEC_CONT - InverseTransform3DFrontBack( - const vtkm::cont::ArrayHandle &lo_fil, - const vtkm::cont::ArrayHandle &hi_fil, - vtkm::Id fil_len, - vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, // ext1 - vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, // ext2 - vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, // ext3 - vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, // ext4 - vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, // cA - vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, // cD - vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, // signal, actual dims - vtkm::Id startX5, vtkm::Id startY5, vtkm::Id startZ5 ) - : - lowFilter( lo_fil.PrepareForInput( DeviceTag() ) ), - highFilter( hi_fil.PrepareForInput( DeviceTag() ) ), - filterLen( fil_len ), - outDimX( x_a ), outDimY( y_a ), outDimZ(z_a + z_d), - cALenExtended( z_1 + z_a + z_2 ), - translator(x_1, y_1, z_1, - x_2, y_2, z_2, - x_3, y_3, z_3, - x_4, y_4, z_4, - x_a, y_a, z_a, - x_d, y_d, z_d, - x_5, y_5, z_5, - startX5, startY5, startZ5 ) + InverseTransform3DFrontBack(const vtkm::cont::ArrayHandle& lo_fil, + const vtkm::cont::ArrayHandle& hi_fil, + vtkm::Id fil_len, vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, // ext1 + vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, // ext2 + vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, // ext3 + vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, // ext4 + vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, // cA + vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, // cD + vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, // signal, actual dims + vtkm::Id startX5, vtkm::Id startY5, vtkm::Id startZ5) + : lowFilter(lo_fil.PrepareForInput(DeviceTag())) + , highFilter(hi_fil.PrepareForInput(DeviceTag())) + , filterLen(fil_len) + , outDimX(x_a) + , outDimY(y_a) + , outDimZ(z_a + z_d) + , cALenExtended(z_1 + z_a + z_2) + , translator(x_1, y_1, z_1, x_2, y_2, z_2, x_3, y_3, z_3, x_4, y_4, z_4, x_a, y_a, z_a, x_d, + y_d, z_d, x_5, y_5, z_5, startX5, startY5, startZ5) { /* printf("InverseTransform3DFrontBack: \n"); printf(" output dims: (%lld, %lld, %lld)\n", outDimX, outDimY, outDimZ ); */ } VTKM_EXEC_CONT - void Output1Dto3D( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z ) const + void Output1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const { z = idx / (outDimX * outDimY); y = (idx - z * outDimX * outDimY) / outDimX; x = idx % outDimX; } - // Use 64-bit float for convolution calculation - #define VAL vtkm::Float64 - #define MAKEVAL(a) (static_cast(a)) +// Use 64-bit float for convolution calculation +#define VAL vtkm::Float64 +#define MAKEVAL(a) (static_cast(a)) template - VTKM_EXEC_CONT - VAL GetVal( const InPortalType1 &ext1, - const InPortalType2 &ext2, - const InPortalType3 &ext3, - const InPortalType4 &ext4, - const InPortalType5 &sig5, - vtkm::Id inCube, - vtkm::Id inIdx ) const + typename InPortalType4, typename InPortalType5> + VTKM_EXEC_CONT VAL GetVal(const InPortalType1& ext1, const InPortalType2& ext2, + const InPortalType3& ext3, const InPortalType4& ext4, + const InPortalType5& sig5, vtkm::Id inCube, vtkm::Id inIdx) const { - if( inCube == 2 ) + if (inCube == 2) { - return MAKEVAL( ext2.Get(inIdx) ); + return MAKEVAL(ext2.Get(inIdx)); } - else if( inCube == 4 ) + else if (inCube == 4) { - return MAKEVAL( ext4.Get(inIdx) ); + return MAKEVAL(ext4.Get(inIdx)); } - else if( inCube == 1 ) + else if (inCube == 1) { - return MAKEVAL( ext1.Get(inIdx) ); + return MAKEVAL(ext1.Get(inIdx)); } - else if( inCube == 3 ) + else if (inCube == 3) { - return MAKEVAL( ext3.Get(inIdx) ); + return MAKEVAL(ext3.Get(inIdx)); } - else if( inCube == 5 ) + else if (inCube == 5) { - return MAKEVAL( sig5.Get(inIdx) ); + return MAKEVAL(sig5.Get(inIdx)); } else { - vtkm::cont::ErrorInternal("Invalid matrix index!"); - return -1; + vtkm::cont::ErrorInternal("Invalid matrix index!"); + return -1; } } - template< typename InPortalType1, typename InPortalType2, typename InPortalType3, - typename InPortalType4, typename InPortalType5, typename OutputValueType > - VTKM_EXEC - void operator() (const InPortalType1 &portal1, - const InPortalType2 &portal2, - const InPortalType3 &portal3, - const InPortalType4 &portal4, - const InPortalType5 &portal5, - OutputValueType &coeffOut, - const vtkm::Id &workIdx ) const + template + VTKM_EXEC void operator()(const InPortalType1& portal1, const InPortalType2& portal2, + const InPortalType3& portal3, const InPortalType4& portal4, + const InPortalType5& portal5, OutputValueType& coeffOut, + const vtkm::Id& workIdx) const { - vtkm::Id workX, workY, workZ; - vtkm::Id k1, k2, zi; - vtkm::Id inputCube, inputIdx; - Output1Dto3D( workIdx, workX, workY, workZ ); + vtkm::Id workX, workY, workZ; + vtkm::Id k1, k2, zi; + vtkm::Id inputCube, inputIdx; + Output1Dto3D(workIdx, workX, workY, workZ); - if( filterLen % 2 != 0 ) // odd filter + if (filterLen % 2 != 0) // odd filter { - if( workZ % 2 != 0 ) + if (workZ % 2 != 0) { k1 = filterLen - 2; k2 = filterLen - 1; @@ -1621,31 +1610,31 @@ public: VAL sum = 0.0; zi = (workZ + 1) / 2; - while( k1 > -1 ) + while (k1 > -1) { - translator.Translate3Dto1D( workX, workY, zi, inputCube, inputIdx ); - sum += lowFilter.Get(k1) * GetVal( portal1, portal2, portal3, portal4, portal5, - inputCube, inputIdx ); + translator.Translate3Dto1D(workX, workY, zi, inputCube, inputIdx); + sum += lowFilter.Get(k1) * + GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx); zi++; k1 -= 2; } zi = workZ / 2; - while( k2 > -1 ) + while (k2 > -1) { - translator.Translate3Dto1D( workX, workY, zi + cALenExtended, inputCube, inputIdx ); - sum += highFilter.Get(k2) * GetVal( portal1, portal2, portal3, portal4, portal5, - inputCube, inputIdx ); + translator.Translate3Dto1D(workX, workY, zi + cALenExtended, inputCube, inputIdx); + sum += highFilter.Get(k2) * + GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx); zi++; k2 -= 2; } - coeffOut = static_cast< OutputValueType >(sum); + coeffOut = static_cast(sum); } - else // even filter + else // even filter { - if( (filterLen/2) % 2 != 0 ) + if ((filterLen / 2) % 2 != 0) { zi = workZ / 2; - if( workZ % 2 != 0 ) + if (workZ % 2 != 0) { k1 = filterLen - 1; } @@ -1657,7 +1646,7 @@ public: else { zi = (workZ + 1) / 2; - if( workZ % 2 != 0 ) + if (workZ % 2 != 0) { k1 = filterLen - 2; } @@ -1668,34 +1657,32 @@ public: } VAL cA, cD; VAL sum = 0.0; - while( k1 > -1 ) + while (k1 > -1) { - translator.Translate3Dto1D( workX, workY, zi, inputCube, inputIdx ); - cA = GetVal( portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx ); - translator.Translate3Dto1D( workX, workY, zi + cALenExtended, inputCube, inputIdx ); - cD = GetVal( portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx ); + translator.Translate3Dto1D(workX, workY, zi, inputCube, inputIdx); + cA = GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx); + translator.Translate3Dto1D(workX, workY, zi + cALenExtended, inputCube, inputIdx); + cD = GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx); sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD; zi++; k1 -= 2; } - coeffOut = static_cast< OutputValueType >(sum); + coeffOut = static_cast(sum); } } - #undef MAKEVAL - #undef VAL +#undef MAKEVAL +#undef VAL private: const typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst - lowFilter, highFilter; - const vtkm::Id filterLen; - vtkm::Id outDimX, outDimY, outDimZ; - vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD - const IndexTranslator6CubesFrontBack translator; + lowFilter, + highFilter; + const vtkm::Id filterLen; + vtkm::Id outDimX, outDimY, outDimZ; + vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD + const IndexTranslator6CubesFrontBack translator; }; - - - //============================================================================= // --------------------------------------------------- @@ -1713,28 +1700,32 @@ private: class IndexTranslator6Matrices { public: - IndexTranslator6Matrices( vtkm::Id x_1, vtkm::Id y_1, - vtkm::Id x_a, vtkm::Id y_a, - vtkm::Id x_2, vtkm::Id y_2, - vtkm::Id x_3, vtkm::Id y_3, - vtkm::Id x_d, vtkm::Id y_d, - vtkm::Id x_4, vtkm::Id y_4, - vtkm::Id x_5, vtkm::Id y_5, // actual size of matrix5 - vtkm::Id start_x5, vtkm::Id start_y5,// start indices of pretend matrix - bool mode ) - : - x1(x_1), y1(y_1), - xa(x_a), ya(y_a), - x2(x_2), y2(y_2), - x3(x_3), y3(y_3), - xd(x_d), yd(y_d), - x4(x_4), y4(y_4), - x5(x_5), y5(y_5), - startX5(start_x5), startY5(start_y5), - modeLR (mode) + IndexTranslator6Matrices(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id x_a, vtkm::Id y_a, vtkm::Id x_2, + vtkm::Id y_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id x_d, vtkm::Id y_d, + vtkm::Id x_4, vtkm::Id y_4, vtkm::Id x_5, + vtkm::Id y_5, // actual size of matrix5 + vtkm::Id start_x5, vtkm::Id start_y5, // start indices of pretend matrix + bool mode) + : x1(x_1) + , y1(y_1) + , xa(x_a) + , ya(y_a) + , x2(x_2) + , y2(y_2) + , x3(x_3) + , y3(y_3) + , xd(x_d) + , yd(y_d) + , x4(x_4) + , y4(y_4) + , x5(x_5) + , y5(y_5) + , startX5(start_x5) + , startY5(start_y5) + , modeLR(mode) { // Get pretend matrix dims - if( modeLR ) + if (modeLR) { pretendX5 = xa + xd; pretendY5 = y1; @@ -1748,39 +1739,39 @@ public: } VTKM_EXEC_CONT - void Translate2Dto1D( vtkm::Id inX, vtkm::Id inY, // 2D indices as input - vtkm::Id &mat, vtkm::Id &idx ) const // which matrix, and idx of that matrix + void Translate2Dto1D(vtkm::Id inX, vtkm::Id inY, // 2D indices as input + vtkm::Id& mat, vtkm::Id& idx) const // which matrix, and idx of that matrix { - if( modeLR ) // left-right mode + if (modeLR) // left-right mode { - if ( 0 <= inX && inX < x1 ) + if (0 <= inX && inX < x1) { - mat = 1; // ext1 + mat = 1; // ext1 idx = inY * x1 + inX; } - else if ( x1 <= inX && inX < (x1 + xa) ) + else if (x1 <= inX && inX < (x1 + xa)) { - mat = 5; // cAcD - idx = (inY + startY5) * x5 + (inX - x1 + startX5 ); + mat = 5; // cAcD + idx = (inY + startY5) * x5 + (inX - x1 + startX5); } - else if ( (x1 + xa) <= inX && inX < (x1 + xa + x2) ) + else if ((x1 + xa) <= inX && inX < (x1 + xa + x2)) { - mat = 2; // ext2 + mat = 2; // ext2 idx = inY * x2 + (inX - x1 - xa); } - else if ( (x1 + xa + x2) <= inX && inX < (x1 + xa + x2 + x3) ) + else if ((x1 + xa + x2) <= inX && inX < (x1 + xa + x2 + x3)) { - mat = 3; // ext3 + mat = 3; // ext3 idx = inY * x3 + (inX - x1 - xa - x2); } - else if ( (x1 + xa + x2 + x3) <= inX && inX < (x1 + xa + x2 + x3 + xd) ) + else if ((x1 + xa + x2 + x3) <= inX && inX < (x1 + xa + x2 + x3 + xd)) { - mat = 5; // cAcD - idx = (inY + startY5) * x5 + (inX - x1 - x2 - x3 + startX5 ); + mat = 5; // cAcD + idx = (inY + startY5) * x5 + (inX - x1 - x2 - x3 + startX5); } - else if ( (x1 + xa + x2 + x3 + xd) <= inX && inX < (x1 + xa + x2 + x3 + xd + x4) ) + else if ((x1 + xa + x2 + x3 + xd) <= inX && inX < (x1 + xa + x2 + x3 + xd + x4)) { - mat = 4; // ext4 + mat = 4; // ext4 idx = inY * x4 + (inX - x1 - xa - x2 - x3 - xd); } else @@ -1788,36 +1779,36 @@ public: vtkm::cont::ErrorInternal("Invalid index!"); } } - else // top-down mode + else // top-down mode { - if ( 0 <= inY && inY < y1 ) + if (0 <= inY && inY < y1) { - mat = 1; // ext1 + mat = 1; // ext1 idx = inY * x1 + inX; } - else if ( y1 <= inY && inY < (y1 + ya) ) + else if (y1 <= inY && inY < (y1 + ya)) { - mat = 5; // cAcD - idx = (inY - y1 + startY5 ) * x5 + inX + startX5; + mat = 5; // cAcD + idx = (inY - y1 + startY5) * x5 + inX + startX5; } - else if ( (y1 + ya) <= inY && inY < (y1 + ya + y2) ) + else if ((y1 + ya) <= inY && inY < (y1 + ya + y2)) { - mat = 2; // ext2 + mat = 2; // ext2 idx = (inY - y1 - ya) * x2 + inX; } - else if ( (y1 + ya + y2) <= inY && inY < (y1 + ya + y2 + y3) ) + else if ((y1 + ya + y2) <= inY && inY < (y1 + ya + y2 + y3)) { - mat = 3; // ext3 + mat = 3; // ext3 idx = (inY - y1 - ya - y2) * x3 + inX; } - else if ( (y1 + ya + y2 + y3) <= inY && inY < (y1 + ya + y2 + y3 + yd) ) + else if ((y1 + ya + y2 + y3) <= inY && inY < (y1 + ya + y2 + y3 + yd)) { - mat = 5; // cAcD - idx = (inY - y1 - y2 - y3 + startY5 ) * x5 + inX + startX5; + mat = 5; // cAcD + idx = (inY - y1 - y2 - y3 + startY5) * x5 + inX + startX5; } - else if ( (y1 + ya + y2 + y3 + yd) <= inY && inY < (y1 + ya + y2 + y3 + yd + y4) ) + else if ((y1 + ya + y2 + y3 + yd) <= inY && inY < (y1 + ya + y2 + y3 + yd + y4)) { - mat = 4; // ext4 + mat = 4; // ext4 idx = (inY - y1 - ya - y2 - y3 - yd) * x4 + inX; } else @@ -1828,13 +1819,11 @@ public: } private: - const vtkm::Id x1, y1, xa, ya, x2, y2, x3, y3, xd, yd, x4, y4; - vtkm::Id x5, y5, startX5, startY5, pretendX5, pretendY5; - const bool modeLR ; // true = left-right mode; false = top-down mode. + const vtkm::Id x1, y1, xa, ya, x2, y2, x3, y3, xd, yd, x4, y4; + vtkm::Id x5, y5, startX5, startY5, pretendX5, pretendY5; + const bool modeLR; // true = left-right mode; false = top-down mode. }; - - // ................ // . . // -----.--------------.----- @@ -1848,40 +1837,43 @@ private: class IndexTranslator3Matrices { public: - IndexTranslator3Matrices( vtkm::Id x_1, vtkm::Id y_1, - vtkm::Id x_2, vtkm::Id y_2, // actual dims of mat2 - vtkm::Id startx_2, vtkm::Id starty_2, // start idx of pretend - vtkm::Id pretendx_2, vtkm::Id pretendy_2,// pretend dims - vtkm::Id x_3, vtkm::Id y_3, - bool mode ) - : - dimX1(x_1), dimY1(y_1), - dimX2(x_2), dimY2(y_2), - startX2( startx_2 ), startY2( starty_2 ), - pretendDimX2( pretendx_2 ), pretendDimY2( pretendy_2 ), - dimX3(x_3), dimY3(y_3), - mode_lr(mode) + IndexTranslator3Matrices(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id x_2, + vtkm::Id y_2, // actual dims of mat2 + vtkm::Id startx_2, vtkm::Id starty_2, // start idx of pretend + vtkm::Id pretendx_2, vtkm::Id pretendy_2, // pretend dims + vtkm::Id x_3, vtkm::Id y_3, bool mode) + : dimX1(x_1) + , dimY1(y_1) + , dimX2(x_2) + , dimY2(y_2) + , startX2(startx_2) + , startY2(starty_2) + , pretendDimX2(pretendx_2) + , pretendDimY2(pretendy_2) + , dimX3(x_3) + , dimY3(y_3) + , mode_lr(mode) { (void)dimY2; } VTKM_EXEC_CONT - void Translate2Dto1D( vtkm::Id inX, vtkm::Id inY, // 2D indices as input - vtkm::Id &mat, vtkm::Id &idx ) const // which matrix, and idx of that matrix + void Translate2Dto1D(vtkm::Id inX, vtkm::Id inY, // 2D indices as input + vtkm::Id& mat, vtkm::Id& idx) const // which matrix, and idx of that matrix { - if( mode_lr ) // left-right mode + if (mode_lr) // left-right mode { - if ( 0 <= inX && inX < dimX1 ) + if (0 <= inX && inX < dimX1) { mat = 1; idx = inY * dimX1 + inX; } - else if ( dimX1 <= inX && inX < (dimX1 + pretendDimX2) ) + else if (dimX1 <= inX && inX < (dimX1 + pretendDimX2)) { mat = 2; idx = (inY + startY2) * dimX2 + (inX + startX2 - dimX1); } - else if ( (dimX1 + pretendDimX2) <= inX && inX < (dimX1 + pretendDimX2 + dimX3) ) + else if ((dimX1 + pretendDimX2) <= inX && inX < (dimX1 + pretendDimX2 + dimX3)) { mat = 3; idx = inY * dimX3 + (inX - dimX1 - pretendDimX2); @@ -1891,19 +1883,19 @@ public: vtkm::cont::ErrorInternal("Invalid index!"); } } - else // top-down mode + else // top-down mode { - if ( 0 <= inY && inY < dimY1 ) + if (0 <= inY && inY < dimY1) { mat = 1; idx = inY * dimX1 + inX; } - else if ( dimY1 <= inY && inY < (dimY1 + pretendDimY2) ) + else if (dimY1 <= inY && inY < (dimY1 + pretendDimY2)) { mat = 2; idx = (inY + startY2 - dimY1) * dimX2 + inX + startX2; } - else if ( (dimY1 + pretendDimY2) <= inY && inY < (dimY1 + pretendDimY2 + dimY3) ) + else if ((dimY1 + pretendDimY2) <= inY && inY < (dimY1 + pretendDimY2 + dimY3)) { mat = 3; idx = (inY - dimY1 - pretendDimY2) * dimX3 + inX; @@ -1916,48 +1908,45 @@ public: } private: - const vtkm::Id dimX1, dimY1; - const vtkm::Id dimX2, dimY2, startX2, startY2, pretendDimX2, pretendDimY2; - const vtkm::Id dimX3, dimY3; - const bool mode_lr; // true: left right mode; false: top down mode. + const vtkm::Id dimX1, dimY1; + const vtkm::Id dimX2, dimY2, startX2, startY2, pretendDimX2, pretendDimY2; + const vtkm::Id dimX3, dimY3; + const bool mode_lr; // true: left right mode; false: top down mode. }; - - // Worklet for 2D signal extension // This implementation operates on a specified part of a big rectangle class ExtensionWorklet2D : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayOut < ScalarAll >, // extension part - WholeArrayIn < ScalarAll > ); // signal part - typedef void ExecutionSignature( _1, _2, WorkIndex ); - typedef _1 InputDomain; + typedef void ControlSignature(WholeArrayOut, // extension part + WholeArrayIn); // signal part + typedef void ExecutionSignature(_1, _2, WorkIndex); + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - ExtensionWorklet2D ( vtkm::Id extdimX, vtkm::Id extdimY, - vtkm::Id sigdimX, vtkm::Id sigdimY, - vtkm::Id sigstartX, vtkm::Id sigstartY, - vtkm::Id sigpretendX, vtkm::Id sigpretendY, - DWTMode m, - ExtensionDirection dir, - bool pad_zero) - : - extDimX( extdimX ), extDimY( extdimY ), - sigDimX( sigdimX ), sigDimY( sigdimY ), - sigStartX( sigstartX ), sigStartY( sigstartY ), - sigPretendDimX( sigpretendX ), sigPretendDimY( sigpretendY ), - mode( m ), - direction( dir ), - padZero( pad_zero ) + ExtensionWorklet2D(vtkm::Id extdimX, vtkm::Id extdimY, vtkm::Id sigdimX, vtkm::Id sigdimY, + vtkm::Id sigstartX, vtkm::Id sigstartY, vtkm::Id sigpretendX, + vtkm::Id sigpretendY, DWTMode m, ExtensionDirection dir, bool pad_zero) + : extDimX(extdimX) + , extDimY(extdimY) + , sigDimX(sigdimX) + , sigDimY(sigdimY) + , sigStartX(sigstartX) + , sigStartY(sigstartY) + , sigPretendDimX(sigpretendX) + , sigPretendDimY(sigpretendY) + , mode(m) + , direction(dir) + , padZero(pad_zero) { (void)sigDimY; } // Index translation helper VTKM_EXEC_CONT - void Ext1Dto2D ( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y ) const + void Ext1Dto2D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y) const { x = idx % extDimX; y = idx / extDimX; @@ -1965,60 +1954,55 @@ public: // Index translation helper VTKM_EXEC_CONT - vtkm::Id Sig2Dto1D( vtkm::Id x, vtkm::Id y ) const - { - return y * sigDimX + x; - } + vtkm::Id Sig2Dto1D(vtkm::Id x, vtkm::Id y) const { return y * sigDimX + x; } // Index translation helper VTKM_EXEC_CONT - vtkm::Id SigPretend2Dto1D( vtkm::Id x, vtkm::Id y ) const + vtkm::Id SigPretend2Dto1D(vtkm::Id x, vtkm::Id y) const { return (y + sigStartY) * sigDimX + x + sigStartX; } - template< typename PortalOutType, typename PortalInType > - VTKM_EXEC - void operator()( PortalOutType &portalOut, - const PortalInType &portalIn, - const vtkm::Id &workIndex) const + template + VTKM_EXEC void operator()(PortalOutType& portalOut, const PortalInType& portalIn, + const vtkm::Id& workIndex) const { vtkm::Id extX, extY, sigPretendX, sigPretendY; sigPretendX = sigPretendY = 0; - Ext1Dto2D( workIndex, extX, extY ); + Ext1Dto2D(workIndex, extX, extY); typename PortalOutType::ValueType sym = 1.0; - if( mode == ASYMH || mode == ASYMW ) + if (mode == ASYMH || mode == ASYMW) { sym = -1.0; } - if( direction == LEFT ) + if (direction == LEFT) { sigPretendY = extY; - if( mode == SYMH || mode == ASYMH ) + if (mode == SYMH || mode == ASYMH) { sigPretendX = extDimX - extX - 1; } - else // mode == SYMW || mode == ASYMW + else // mode == SYMW || mode == ASYMW { sigPretendX = extDimX - extX; } } - else if( direction == TOP ) + else if (direction == TOP) { sigPretendX = extX; - if( mode == SYMH || mode == ASYMH ) + if (mode == SYMH || mode == ASYMH) { sigPretendY = extDimY - extY - 1; } - else // mode == SYMW || mode == ASYMW + else // mode == SYMW || mode == ASYMW { sigPretendY = extDimY - extY; } } - else if( direction == RIGHT ) + else if (direction == RIGHT) { sigPretendY = extY; - if( mode == SYMH || mode == ASYMH ) + if (mode == SYMH || mode == ASYMH) { sigPretendX = sigPretendDimX - extX - 1; } @@ -2026,15 +2010,15 @@ public: { sigPretendX = sigPretendDimX - extX - 2; } - if( padZero ) + if (padZero) { sigPretendX++; } } - else if( direction == BOTTOM ) + else if (direction == BOTTOM) { sigPretendX = extX; - if( mode == SYMH || mode == ASYMH ) + if (mode == SYMH || mode == ASYMH) { sigPretendY = sigPretendDimY - extY - 1; } @@ -2042,7 +2026,7 @@ public: { sigPretendY = sigPretendDimY - extY - 2; } - if( padZero ) + if (padZero) { sigPretendY++; } @@ -2052,96 +2036,86 @@ public: vtkm::cont::ErrorInternal("Invalid extension mode for matrices!"); } - if( sigPretendX == sigPretendDimX || sigPretendY == sigPretendDimY ) + if (sigPretendX == sigPretendDimX || sigPretendY == sigPretendDimY) { - portalOut.Set( workIndex, 0.0 ); + portalOut.Set(workIndex, 0.0); } else { - portalOut.Set( workIndex, sym * - portalIn.Get( SigPretend2Dto1D(sigPretendX, sigPretendY) )); + portalOut.Set(workIndex, sym * portalIn.Get(SigPretend2Dto1D(sigPretendX, sigPretendY))); } } private: - const vtkm::Id extDimX, extDimY, sigDimX, sigDimY; - const vtkm::Id sigStartX, sigStartY, sigPretendDimX, sigPretendDimY; - const DWTMode mode; - const ExtensionDirection direction; - const bool padZero; // treat sigIn as having a column/row zeros + const vtkm::Id extDimX, extDimY, sigDimX, sigDimY; + const vtkm::Id sigStartX, sigStartY, sigPretendDimX, sigPretendDimY; + const DWTMode mode; + const ExtensionDirection direction; + const bool padZero; // treat sigIn as having a column/row zeros }; - - // Worklet: perform a simple 2D forward transform -template< typename DeviceTag > -class ForwardTransform2D: public vtkm::worklet::WorkletMapField +template +class ForwardTransform2D : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(WholeArrayIn, // left/top extension - WholeArrayIn, // sigIn - WholeArrayIn, // right/bottom extension - WholeArrayOut); // cA followed by cD + typedef void ControlSignature(WholeArrayIn, // left/top extension + WholeArrayIn, // sigIn + WholeArrayIn, // right/bottom extension + WholeArrayOut); // cA followed by cD typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); - typedef _4 InputDomain; - + typedef _4 InputDomain; // Constructor VTKM_EXEC_CONT - ForwardTransform2D ( const vtkm::cont::ArrayHandle &loFilter, - const vtkm::cont::ArrayHandle &hiFilter, - vtkm::Id filter_len, vtkm::Id approx_len, - bool odd_low, bool mode_lr, - vtkm::Id x1, vtkm::Id y1, // dims of left/top extension - vtkm::Id x2, vtkm::Id y2, // dims of signal - vtkm::Id startx2, vtkm::Id starty2, // start idx of signal - vtkm::Id pretendx2, vtkm::Id pretendy2, // pretend dims of signal - vtkm::Id x3, vtkm::Id y3 ) // dims of right/bottom extension - : - lowFilter( loFilter.PrepareForInput( DeviceTag() ) ), - highFilter( hiFilter.PrepareForInput( DeviceTag() ) ), - filterLen( filter_len ), approxLen( approx_len ), - outDimX( pretendx2 ), outDimY( pretendy2 ), - oddlow( odd_low ), modeLR( mode_lr ), - translator( x1, y1, - x2, y2, - startx2, starty2, - pretendx2, pretendy2, - x3, y3, - mode_lr ) - { this->SetStartPosition(); } + ForwardTransform2D(const vtkm::cont::ArrayHandle& loFilter, + const vtkm::cont::ArrayHandle& hiFilter, vtkm::Id filter_len, + vtkm::Id approx_len, bool odd_low, bool mode_lr, vtkm::Id x1, + vtkm::Id y1, // dims of left/top extension + vtkm::Id x2, vtkm::Id y2, // dims of signal + vtkm::Id startx2, vtkm::Id starty2, // start idx of signal + vtkm::Id pretendx2, vtkm::Id pretendy2, // pretend dims of signal + vtkm::Id x3, vtkm::Id y3) // dims of right/bottom extension + : lowFilter(loFilter.PrepareForInput(DeviceTag())), + highFilter(hiFilter.PrepareForInput(DeviceTag())), + filterLen(filter_len), + approxLen(approx_len), + outDimX(pretendx2), + outDimY(pretendy2), + oddlow(odd_low), + modeLR(mode_lr), + translator(x1, y1, x2, y2, startx2, starty2, pretendx2, pretendy2, x3, y3, mode_lr) + { + this->SetStartPosition(); + } VTKM_EXEC_CONT - void Output1Dto2D( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y ) const + void Output1Dto2D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y) const { x = idx % outDimX; y = idx / outDimX; } VTKM_EXEC_CONT - vtkm::Id Output2Dto1D( vtkm::Id x, vtkm::Id y ) const - { - return y * outDimX + x; - } + vtkm::Id Output2Dto1D(vtkm::Id x, vtkm::Id y) const { return y * outDimX + x; } - // Use 64-bit float for convolution calculation - #define VAL vtkm::Float64 - #define MAKEVAL(a) (static_cast(a)) - template - VTKM_EXEC_CONT - VAL GetVal( const InPortalType1 &portal1, const InPortalType2 &portal2, - const InPortalType3 &portal3, vtkm::Id inMatrix, vtkm::Id inIdx ) const +// Use 64-bit float for convolution calculation +#define VAL vtkm::Float64 +#define MAKEVAL(a) (static_cast(a)) + template + VTKM_EXEC_CONT VAL GetVal(const InPortalType1& portal1, const InPortalType2& portal2, + const InPortalType3& portal3, vtkm::Id inMatrix, vtkm::Id inIdx) const { - if( inMatrix == 1 ) + if (inMatrix == 1) { - return MAKEVAL( portal1.Get(inIdx) ); + return MAKEVAL(portal1.Get(inIdx)); } - else if( inMatrix == 2 ) + else if (inMatrix == 2) { - return MAKEVAL( portal2.Get(inIdx) ); + return MAKEVAL(portal2.Get(inIdx)); } - else if( inMatrix == 3 ) + else if (inMatrix == 3) { - return MAKEVAL( portal3.Get(inIdx) ); + return MAKEVAL(portal3.Get(inIdx)); } else { @@ -2150,106 +2124,99 @@ public: } } - template - VTKM_EXEC_CONT - void operator()(const InPortalType1 &inPortal1, // left/top extension - const InPortalType2 &inPortal2, // signal - const InPortalType3 &inPortal3, // right/bottom extension - OutputPortalType &coeffOut, - const vtkm::Id &workIndex) const + template + VTKM_EXEC_CONT void operator()(const InPortalType1& inPortal1, // left/top extension + const InPortalType2& inPortal2, // signal + const InPortalType3& inPortal3, // right/bottom extension + OutputPortalType& coeffOut, const vtkm::Id& workIndex) const { vtkm::Id workX, workY, output1D; - Output1Dto2D( workIndex, workX, workY ); + Output1Dto2D(workIndex, workX, workY); vtkm::Id inputMatrix, inputIdx; typedef typename OutputPortalType::ValueType OutputValueType; - if( modeLR ) + if (modeLR) { - if( workX % 2 == 0 ) // calculate cA + if (workX % 2 == 0) // calculate cA { vtkm::Id xl = lstart + workX; VAL sum = MAKEVAL(0.0); - for( vtkm::Id k = filterLen - 1; k > -1; k-- ) + for (vtkm::Id k = filterLen - 1; k > -1; k--) { - translator.Translate2Dto1D( xl, workY, inputMatrix, inputIdx ); - sum += lowFilter.Get(k) * - GetVal( inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx ); + translator.Translate2Dto1D(xl, workY, inputMatrix, inputIdx); + sum += lowFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx); xl++; } - output1D = Output2Dto1D( workX/2, workY ); - coeffOut.Set( output1D, static_cast(sum) ); + output1D = Output2Dto1D(workX / 2, workY); + coeffOut.Set(output1D, static_cast(sum)); } - else // calculate cD + else // calculate cD { vtkm::Id xh = hstart + workX - 1; - VAL sum=MAKEVAL(0.0); - for( vtkm::Id k = filterLen - 1; k > -1; k-- ) + VAL sum = MAKEVAL(0.0); + for (vtkm::Id k = filterLen - 1; k > -1; k--) { - translator.Translate2Dto1D( xh, workY, inputMatrix, inputIdx ); - sum += highFilter.Get(k) * - GetVal( inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx ); + translator.Translate2Dto1D(xh, workY, inputMatrix, inputIdx); + sum += highFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx); xh++; } - output1D = Output2Dto1D( (workX-1)/2 + approxLen, workY ); - coeffOut.Set( output1D, static_cast(sum) ); + output1D = Output2Dto1D((workX - 1) / 2 + approxLen, workY); + coeffOut.Set(output1D, static_cast(sum)); } } - else // top-down order + else // top-down order { - if( workY % 2 == 0 ) // calculate cA + if (workY % 2 == 0) // calculate cA { vtkm::Id yl = lstart + workY; VAL sum = MAKEVAL(0.0); - for( vtkm::Id k = filterLen - 1; k > -1; k-- ) + for (vtkm::Id k = filterLen - 1; k > -1; k--) { - translator.Translate2Dto1D( workX, yl, inputMatrix, inputIdx ); - sum += lowFilter.Get(k) * - GetVal( inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx ); + translator.Translate2Dto1D(workX, yl, inputMatrix, inputIdx); + sum += lowFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx); yl++; } - output1D = Output2Dto1D( workX, workY/2 ); - coeffOut.Set( output1D, static_cast(sum) ); + output1D = Output2Dto1D(workX, workY / 2); + coeffOut.Set(output1D, static_cast(sum)); } - else // calculate cD + else // calculate cD { vtkm::Id yh = hstart + workY - 1; - VAL sum=MAKEVAL(0.0); - for( vtkm::Id k = filterLen - 1; k > -1; k-- ) + VAL sum = MAKEVAL(0.0); + for (vtkm::Id k = filterLen - 1; k > -1; k--) { - translator.Translate2Dto1D( workX, yh, inputMatrix, inputIdx ); - sum += highFilter.Get(k) * - GetVal( inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx ); + translator.Translate2Dto1D(workX, yh, inputMatrix, inputIdx); + sum += highFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx); yh++; } - output1D = Output2Dto1D( workX, (workY-1)/2 + approxLen ); - coeffOut.Set( output1D, static_cast(sum) ); + output1D = Output2Dto1D(workX, (workY - 1) / 2 + approxLen); + coeffOut.Set(output1D, static_cast(sum)); } } } - #undef MAKEVAL - #undef VAL +#undef MAKEVAL +#undef VAL private: - const typename vtkm::cont::ArrayHandle::ExecutionTypes:: - PortalConst lowFilter, highFilter; + const typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst + lowFilter, + highFilter; const vtkm::Id filterLen, approxLen; const vtkm::Id outDimX, outDimY; - bool oddlow; - bool modeLR; // true = left right; false = top down. - const IndexTranslator3Matrices translator; + bool oddlow; + bool modeLR; // true = left right; false = top down. + const IndexTranslator3Matrices translator; vtkm::Id lstart, hstart; VTKM_EXEC_CONT void SetStartPosition() { - this->lstart = this->oddlow ? 1 : 0; + this->lstart = this->oddlow ? 1 : 0; this->hstart = 1; } }; - - // --------------------------------------------------- // | | | | | | | // | | | | | | | @@ -2263,43 +2230,38 @@ private: // portal4: ext4 // portal5: cA + cD // Worklet: perform a simple 2D inverse transform -template< typename DeviceTag > -class InverseTransform2D: public vtkm::worklet::WorkletMapField +template +class InverseTransform2D : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayIn< ScalarAll >, // ext1 - WholeArrayIn< ScalarAll >, // ext2 - WholeArrayIn< ScalarAll >, // ext3 - WholeArrayIn< ScalarAll >, // ext4 - WholeArrayIn< ScalarAll >, // cA+cD (signal) - FieldOut< ScalarAll> ); // outptu coeffs - typedef void ExecutionSignature( _1, _2, _3, _4, _5, _6, WorkIndex ); - typedef _6 InputDomain; + typedef void ControlSignature(WholeArrayIn, // ext1 + WholeArrayIn, // ext2 + WholeArrayIn, // ext3 + WholeArrayIn, // ext4 + WholeArrayIn, // cA+cD (signal) + FieldOut); // outptu coeffs + typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, WorkIndex); + typedef _6 InputDomain; // Constructor VTKM_EXEC_CONT - InverseTransform2D( const vtkm::cont::ArrayHandle &lo_fil, - const vtkm::cont::ArrayHandle &hi_fil, - vtkm::Id fil_len, - vtkm::Id x_1, vtkm::Id y_1, // ext1 - vtkm::Id x_a, vtkm::Id y_a, // cA - vtkm::Id x_2, vtkm::Id y_2, // ext2 - vtkm::Id x_3, vtkm::Id y_3, // ext3 - vtkm::Id x_d, vtkm::Id y_d, // cD - vtkm::Id x_4, vtkm::Id y_4, // ext4 - vtkm::Id x_5, vtkm::Id y_5, - vtkm::Id startX5, vtkm::Id startY5, - bool mode_lr ) - : - lowFilter( lo_fil.PrepareForInput( DeviceTag() ) ), - highFilter( hi_fil.PrepareForInput( DeviceTag() ) ), - filterLen( fil_len ), - translator(x_1, y_1, x_a, y_a, x_2, y_2, - x_3, y_3, x_d, y_d, x_4, y_4, - x_5, y_5, startX5, startY5, mode_lr ), - modeLR( mode_lr ) + InverseTransform2D(const vtkm::cont::ArrayHandle& lo_fil, + const vtkm::cont::ArrayHandle& hi_fil, vtkm::Id fil_len, + vtkm::Id x_1, vtkm::Id y_1, // ext1 + vtkm::Id x_a, vtkm::Id y_a, // cA + vtkm::Id x_2, vtkm::Id y_2, // ext2 + vtkm::Id x_3, vtkm::Id y_3, // ext3 + vtkm::Id x_d, vtkm::Id y_d, // cD + vtkm::Id x_4, vtkm::Id y_4, // ext4 + vtkm::Id x_5, vtkm::Id y_5, vtkm::Id startX5, vtkm::Id startY5, bool mode_lr) + : lowFilter(lo_fil.PrepareForInput(DeviceTag())) + , highFilter(hi_fil.PrepareForInput(DeviceTag())) + , filterLen(fil_len) + , translator(x_1, y_1, x_a, y_a, x_2, y_2, x_3, y_3, x_d, y_d, x_4, y_4, x_5, y_5, startX5, + startY5, mode_lr) + , modeLR(mode_lr) { - if( modeLR ) + if (modeLR) { outputDimX = x_a + x_d; outputDimY = y_1; @@ -2314,72 +2276,63 @@ public: } VTKM_EXEC_CONT - void Output1Dto2D( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y ) const + void Output1Dto2D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y) const { x = idx % outputDimX; y = idx / outputDimX; } - // Use 64-bit float for convolution calculation - #define VAL vtkm::Float64 - #define MAKEVAL(a) (static_cast(a)) +// Use 64-bit float for convolution calculation +#define VAL vtkm::Float64 +#define MAKEVAL(a) (static_cast(a)) template - VTKM_EXEC_CONT - VAL GetVal( const InPortalType1 &ext1, - const InPortalType2 &ext2, - const InPortalType3 &ext3, - const InPortalType4 &ext4, - const InPortalTypecAcD &cAcD, - vtkm::Id inMatrix, vtkm::Id inIdx ) const + typename InPortalType4, typename InPortalTypecAcD> + VTKM_EXEC_CONT VAL GetVal(const InPortalType1& ext1, const InPortalType2& ext2, + const InPortalType3& ext3, const InPortalType4& ext4, + const InPortalTypecAcD& cAcD, vtkm::Id inMatrix, vtkm::Id inIdx) const { - if( inMatrix == 1 ) + if (inMatrix == 1) { - return MAKEVAL( ext1.Get(inIdx) ); + return MAKEVAL(ext1.Get(inIdx)); } - else if( inMatrix == 2 ) + else if (inMatrix == 2) { - return MAKEVAL( ext2.Get(inIdx) ); + return MAKEVAL(ext2.Get(inIdx)); } - else if( inMatrix == 3 ) + else if (inMatrix == 3) { - return MAKEVAL( ext3.Get(inIdx) ); + return MAKEVAL(ext3.Get(inIdx)); } - else if( inMatrix == 4 ) + else if (inMatrix == 4) { - return MAKEVAL( ext4.Get(inIdx) ); + return MAKEVAL(ext4.Get(inIdx)); } - else if( inMatrix == 5 ) + else if (inMatrix == 5) { - return MAKEVAL( cAcD.Get(inIdx) ); + return MAKEVAL(cAcD.Get(inIdx)); } else { - vtkm::cont::ErrorInternal("Invalid matrix index!"); - return -1; + vtkm::cont::ErrorInternal("Invalid matrix index!"); + return -1; } } - template< typename InPortalType1, typename InPortalType2, typename InPortalType3, - typename InPortalType4, typename InPortalTypecAcD, - typename OutputValueType > - VTKM_EXEC - void operator() (const InPortalType1 &portal1, - const InPortalType2 &portal2, - const InPortalType3 &portal3, - const InPortalType4 &portal4, - const InPortalTypecAcD &portalcAcD, - OutputValueType &coeffOut, - const vtkm::Id &workIdx ) const + template + VTKM_EXEC void operator()(const InPortalType1& portal1, const InPortalType2& portal2, + const InPortalType3& portal3, const InPortalType4& portal4, + const InPortalTypecAcD& portalcAcD, OutputValueType& coeffOut, + const vtkm::Id& workIdx) const { vtkm::Id workX, workY; vtkm::Id k1, k2, xi, yi, inputMatrix, inputIdx; - Output1Dto2D( workIdx, workX, workY ); + Output1Dto2D(workIdx, workX, workY); // left-right, odd filter - if( modeLR && (filterLen % 2 != 0) ) + if (modeLR && (filterLen % 2 != 0)) { - if( workX % 2 != 0 ) + if (workX % 2 != 0) { k1 = filterLen - 2; k2 = filterLen - 1; @@ -2392,30 +2345,30 @@ public: VAL sum = 0.0; xi = (workX + 1) / 2; - while( k1 > -1 ) + while (k1 > -1) { - translator.Translate2Dto1D( xi, workY, inputMatrix, inputIdx ); - sum += lowFilter.Get(k1) * GetVal( portal1, portal2, portal3, portal4, - portalcAcD, inputMatrix, inputIdx ); + translator.Translate2Dto1D(xi, workY, inputMatrix, inputIdx); + sum += lowFilter.Get(k1) * + GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx); xi++; k1 -= 2; } xi = workX / 2; - while( k2 > -1 ) + while (k2 > -1) { - translator.Translate2Dto1D( xi + cALenExtended, workY, inputMatrix, inputIdx ); - sum += highFilter.Get(k2) * GetVal( portal1, portal2, portal3, portal4, - portalcAcD, inputMatrix, inputIdx ); + translator.Translate2Dto1D(xi + cALenExtended, workY, inputMatrix, inputIdx); + sum += highFilter.Get(k2) * + GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx); xi++; k2 -= 2; } - coeffOut = static_cast< OutputValueType> (sum); + coeffOut = static_cast(sum); } // top-down, odd filter - else if ( !modeLR && (filterLen % 2 != 0) ) + else if (!modeLR && (filterLen % 2 != 0)) { - if( workY % 2 != 0 ) + if (workY % 2 != 0) { k1 = filterLen - 2; k2 = filterLen - 1; @@ -2428,33 +2381,33 @@ public: VAL sum = 0.0; yi = (workY + 1) / 2; - while( k1 > -1 ) + while (k1 > -1) { - translator.Translate2Dto1D( workX, yi, inputMatrix, inputIdx ); - VAL cA = GetVal( portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx ); + translator.Translate2Dto1D(workX, yi, inputMatrix, inputIdx); + VAL cA = GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx); sum += lowFilter.Get(k1) * cA; yi++; k1 -= 2; } yi = workY / 2; - while( k2 > -1 ) + while (k2 > -1) { - translator.Translate2Dto1D( workX, yi + cALenExtended, inputMatrix, inputIdx ); - VAL cD = GetVal( portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx ); + translator.Translate2Dto1D(workX, yi + cALenExtended, inputMatrix, inputIdx); + VAL cD = GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx); sum += highFilter.Get(k2) * cD; yi++; k2 -= 2; } - coeffOut = static_cast< OutputValueType >(sum); + coeffOut = static_cast(sum); } // left-right, even filter - else if( modeLR && (filterLen % 2 == 0) ) + else if (modeLR && (filterLen % 2 == 0)) { - if( (filterLen/2) % 2 != 0 ) // odd length half filter + if ((filterLen / 2) % 2 != 0) // odd length half filter { xi = workX / 2; - if( workX % 2 != 0 ) + if (workX % 2 != 0) { k1 = filterLen - 1; } @@ -2463,10 +2416,10 @@ public: k1 = filterLen - 2; } } - else // even length half filter + else // even length half filter { xi = (workX + 1) / 2; - if( workX % 2 != 0 ) + if (workX % 2 != 0) { k1 = filterLen - 2; } @@ -2477,28 +2430,26 @@ public: } VAL cA, cD; VAL sum = 0.0; - while( k1 > -1 ) + while (k1 > -1) { - translator.Translate2Dto1D( xi, workY, inputMatrix, inputIdx ); - cA = GetVal( portal1, portal2, portal3, portal4, portalcAcD, - inputMatrix, inputIdx ); - translator.Translate2Dto1D( xi + cALenExtended, workY, inputMatrix, inputIdx ); - cD = GetVal( portal1, portal2, portal3, portal4, portalcAcD, - inputMatrix, inputIdx ); + translator.Translate2Dto1D(xi, workY, inputMatrix, inputIdx); + cA = GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx); + translator.Translate2Dto1D(xi + cALenExtended, workY, inputMatrix, inputIdx); + cD = GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx); sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD; xi++; k1 -= 2; } - coeffOut = static_cast< OutputValueType >(sum); + coeffOut = static_cast(sum); } // top-down, even filter else { - if( (filterLen/2) % 2 != 0 ) + if ((filterLen / 2) % 2 != 0) { yi = workY / 2; - if( workY % 2 != 0 ) + if (workY % 2 != 0) { k1 = filterLen - 1; } @@ -2510,7 +2461,7 @@ public: else { yi = (workY + 1) / 2; - if( workY % 2 != 0 ) + if (workY % 2 != 0) { k1 = filterLen - 2; } @@ -2521,158 +2472,151 @@ public: } VAL cA, cD; VAL sum = 0.0; - while( k1 > -1 ) + while (k1 > -1) { - translator.Translate2Dto1D( workX, yi, inputMatrix, inputIdx ); - cA = GetVal( portal1, portal2, portal3, portal4, portalcAcD, - inputMatrix, inputIdx ); - translator.Translate2Dto1D( workX, yi + cALenExtended, inputMatrix, inputIdx ); - cD = GetVal( portal1, portal2, portal3, portal4, portalcAcD, - inputMatrix, inputIdx ); + translator.Translate2Dto1D(workX, yi, inputMatrix, inputIdx); + cA = GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx); + translator.Translate2Dto1D(workX, yi + cALenExtended, inputMatrix, inputIdx); + cD = GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx); sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD; yi++; k1 -= 2; } - coeffOut = static_cast< OutputValueType >(sum); + coeffOut = static_cast(sum); } } - #undef MAKEVAL - #undef VAL +#undef MAKEVAL +#undef VAL private: - const typename vtkm::cont::ArrayHandle:: - ExecutionTypes::PortalConst lowFilter, highFilter; + const typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst + lowFilter, + highFilter; const vtkm::Id filterLen; - vtkm::Id outputDimX, outputDimY; - vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD - const IndexTranslator6Matrices translator; + vtkm::Id outputDimX, outputDimY; + vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD + const IndexTranslator6Matrices translator; const bool modeLR; }; - - // Worklet: perform a simple 1D forward transform -template< typename DeviceTag > -class ForwardTransform: public vtkm::worklet::WorkletMapField +template +class ForwardTransform : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(WholeArrayIn, // sigIn - WholeArrayOut); // cA followed by cD + typedef void ControlSignature(WholeArrayIn, // sigIn + WholeArrayOut); // cA followed by cD typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - ForwardTransform( const vtkm::cont::ArrayHandle &loFilter, - const vtkm::cont::ArrayHandle &hiFilter, - vtkm::Id filLen, vtkm::Id approx_len, vtkm::Id detail_len, - bool odd_low, bool odd_high ) - : - lowFilter( loFilter.PrepareForInput(DeviceTag()) ), - highFilter( hiFilter.PrepareForInput(DeviceTag()) ), - filterLen( filLen ), - approxLen( approx_len ), - detailLen( detail_len ), - oddlow ( odd_low ), - oddhigh ( odd_high ) + ForwardTransform(const vtkm::cont::ArrayHandle& loFilter, + const vtkm::cont::ArrayHandle& hiFilter, vtkm::Id filLen, + vtkm::Id approx_len, vtkm::Id detail_len, bool odd_low, bool odd_high) + : lowFilter(loFilter.PrepareForInput(DeviceTag())) + , highFilter(hiFilter.PrepareForInput(DeviceTag())) + , filterLen(filLen) + , approxLen(approx_len) + , detailLen(detail_len) + , oddlow(odd_low) + , oddhigh(odd_high) { this->SetStartPosition(); } - // Use 64-bit float for convolution calculation - #define VAL vtkm::Float64 - #define MAKEVAL(a) (static_cast(a)) +// Use 64-bit float for convolution calculation +#define VAL vtkm::Float64 +#define MAKEVAL(a) (static_cast(a)) template - VTKM_EXEC - void operator()(const InputPortalType &signalIn, - OutputPortalType &coeffOut, - const vtkm::Id &workIndex) const + VTKM_EXEC void operator()(const InputPortalType& signalIn, OutputPortalType& coeffOut, + const vtkm::Id& workIndex) const { typedef typename OutputPortalType::ValueType OutputValueType; - if( workIndex < approxLen + detailLen ) + if (workIndex < approxLen + detailLen) { - if( workIndex % 2 == 0 ) // calculate cA + if (workIndex % 2 == 0) // calculate cA { vtkm::Id xl = xlstart + workIndex; - VAL sum=MAKEVAL(0.0); - for( vtkm::Id k = filterLen - 1; k >= 0; k-- ) + VAL sum = MAKEVAL(0.0); + for (vtkm::Id k = filterLen - 1; k >= 0; k--) { - sum += lowFilter.Get(k) * MAKEVAL( signalIn.Get(xl++) ); + sum += lowFilter.Get(k) * MAKEVAL(signalIn.Get(xl++)); } vtkm::Id outputIdx = workIndex / 2; // put cA at the beginning - coeffOut.Set( outputIdx, static_cast(sum) ); + coeffOut.Set(outputIdx, static_cast(sum)); } - else // calculate cD + else // calculate cD { - VAL sum=MAKEVAL(0.0); + VAL sum = MAKEVAL(0.0); vtkm::Id xh = xhstart + workIndex - 1; - for( vtkm::Id k = filterLen - 1; k >= 0; k-- ) + for (vtkm::Id k = filterLen - 1; k >= 0; k--) { - sum += highFilter.Get(k) * MAKEVAL( signalIn.Get(xh++) ); + sum += highFilter.Get(k) * MAKEVAL(signalIn.Get(xh++)); } - vtkm::Id outputIdx = approxLen + (workIndex-1) / 2; // put cD after cA - coeffOut.Set( outputIdx, static_cast(sum) ); + vtkm::Id outputIdx = approxLen + (workIndex - 1) / 2; // put cD after cA + coeffOut.Set(outputIdx, static_cast(sum)); } } } - #undef MAKEVAL - #undef VAL +#undef MAKEVAL +#undef VAL private: - const typename vtkm::cont::ArrayHandle:: - ExecutionTypes::PortalConst lowFilter, highFilter; - const vtkm::Id filterLen, approxLen, detailLen; // filter and outcome coeff length. + const typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst + lowFilter, + highFilter; + const vtkm::Id filterLen, approxLen, detailLen; // filter and outcome coeff length. bool oddlow, oddhigh; vtkm::Id xlstart, xhstart; VTKM_EXEC_CONT void SetStartPosition() { - this->xlstart = this->oddlow ? 1 : 0; + this->xlstart = this->oddlow ? 1 : 0; this->xhstart = this->oddhigh ? 1 : 0; } }; - - // Worklet: perform an 1D inverse transform for odd length, symmetric filters. -template< typename DeviceTag > -class InverseTransformOdd: public vtkm::worklet::WorkletMapField +template +class InverseTransformOdd : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(WholeArrayIn, // Input: coeffs, - // cA followed by cD - WholeArrayOut); // output + typedef void ControlSignature(WholeArrayIn, // Input: coeffs, + // cA followed by cD + WholeArrayOut); // output typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - InverseTransformOdd( const vtkm::cont::ArrayHandle &loFilter, - const vtkm::cont::ArrayHandle &hiFilter, - vtkm::Id filLen, vtkm::Id ca_len, vtkm::Id ext_len ) - : - lowFilter( loFilter.PrepareForInput(DeviceTag()) ), - highFilter( hiFilter.PrepareForInput(DeviceTag()) ), - filterLen( filLen ), cALen( ca_len ), - cALen2( ca_len * 2 ), cALenExtended( ext_len ) {} - - // Use 64-bit float for convolution calculation - #define VAL vtkm::Float64 - #define MAKEVAL(a) (static_cast(a)) - template - VTKM_EXEC - void operator()(const InputPortalType &coeffs, - OutputPortalType &sigOut, - const vtkm::Id &workIndex) const + InverseTransformOdd(const vtkm::cont::ArrayHandle& loFilter, + const vtkm::cont::ArrayHandle& hiFilter, vtkm::Id filLen, + vtkm::Id ca_len, vtkm::Id ext_len) + : lowFilter(loFilter.PrepareForInput(DeviceTag())) + , highFilter(hiFilter.PrepareForInput(DeviceTag())) + , filterLen(filLen) + , cALen(ca_len) + , cALen2(ca_len * 2) + , cALenExtended(ext_len) { - if( workIndex < cALen2 ) // valid calculation region + } + +// Use 64-bit float for convolution calculation +#define VAL vtkm::Float64 +#define MAKEVAL(a) (static_cast(a)) + template + VTKM_EXEC void operator()(const InputPortalType& coeffs, OutputPortalType& sigOut, + const vtkm::Id& workIndex) const + { + if (workIndex < cALen2) // valid calculation region { - vtkm::Id xi; // coeff indices - vtkm::Id k1, k2; // indices for low and high filter + vtkm::Id xi; // coeff indices + vtkm::Id k1, k2; // indices for low and high filter VAL sum = 0.0; - if( workIndex % 2 != 0 ) + if (workIndex % 2 != 0) { k1 = this->filterLen - 2; k2 = this->filterLen - 1; @@ -2683,79 +2627,79 @@ public: k2 = this->filterLen - 2; } - xi = (workIndex+1) / 2; - while( k1 > -1 ) // k1 >= 0 + xi = (workIndex + 1) / 2; + while (k1 > -1) // k1 >= 0 { - sum += lowFilter.Get(k1) * MAKEVAL( coeffs.Get(xi++) ); + sum += lowFilter.Get(k1) * MAKEVAL(coeffs.Get(xi++)); k1 -= 2; } xi = workIndex / 2; - while( k2 > -1 ) // k2 >= 0 + while (k2 > -1) // k2 >= 0 { - sum += highFilter.Get(k2) * MAKEVAL( coeffs.Get( this->cALenExtended + xi++ ) ); + sum += highFilter.Get(k2) * MAKEVAL(coeffs.Get(this->cALenExtended + xi++)); k2 -= 2; } - sigOut.Set(workIndex, static_cast( sum ) ); + sigOut.Set(workIndex, static_cast(sum)); } - } - #undef MAKEVAL - #undef VAL +#undef MAKEVAL +#undef VAL private: - const typename vtkm::cont::ArrayHandle::ExecutionTypes:: - PortalConst lowFilter, highFilter; - const vtkm::Id filterLen; // filter length. - const vtkm::Id cALen; // Number of actual cAs - const vtkm::Id cALen2; // = cALen * 2 - const vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD + const typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst + lowFilter, + highFilter; + const vtkm::Id filterLen; // filter length. + const vtkm::Id cALen; // Number of actual cAs + const vtkm::Id cALen2; // = cALen * 2 + const vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD }; - - // Worklet: perform an 1D inverse transform for even length, symmetric filters. -template< typename DeviceTag > -class InverseTransformEven: public vtkm::worklet::WorkletMapField +template +class InverseTransformEven : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(WholeArrayIn, // Input: coeffs, - // cA followed by cD - WholeArrayOut); // output + typedef void ControlSignature(WholeArrayIn, // Input: coeffs, + // cA followed by cD + WholeArrayOut); // output typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - InverseTransformEven( const vtkm::cont::ArrayHandle &loFilter, - const vtkm::cont::ArrayHandle &hiFilter, - vtkm::Id filtL, vtkm::Id cAL, vtkm::Id cALExt, bool m ) - : - lowFilter( loFilter.PrepareForInput(DeviceTag()) ), - highFilter( hiFilter.PrepareForInput(DeviceTag()) ), - filterLen( filtL ), cALen( cAL ), cALen2( cAL * 2 ), - cALenExtended( cALExt ), matlab( m ) {} - - // Use 64-bit float for convolution calculation - #define VAL vtkm::Float64 - #define MAKEVAL(a) (static_cast(a)) - template - VTKM_EXEC - void operator()(const InputPortalType &coeffs, - OutputPortalType &sigOut, - const vtkm::Id &workIndex) const + InverseTransformEven(const vtkm::cont::ArrayHandle& loFilter, + const vtkm::cont::ArrayHandle& hiFilter, vtkm::Id filtL, + vtkm::Id cAL, vtkm::Id cALExt, bool m) + : lowFilter(loFilter.PrepareForInput(DeviceTag())) + , highFilter(hiFilter.PrepareForInput(DeviceTag())) + , filterLen(filtL) + , cALen(cAL) + , cALen2(cAL * 2) + , cALenExtended(cALExt) + , matlab(m) { - if( workIndex < cALen2 ) // valid calculation region + } + +// Use 64-bit float for convolution calculation +#define VAL vtkm::Float64 +#define MAKEVAL(a) (static_cast(a)) + template + VTKM_EXEC void operator()(const InputPortalType& coeffs, OutputPortalType& sigOut, + const vtkm::Id& workIndex) const + { + if (workIndex < cALen2) // valid calculation region { - vtkm::Id xi; // coeff indices - vtkm::Id k; // indices for low and high filter + vtkm::Id xi; // coeff indices + vtkm::Id k; // indices for low and high filter VAL sum = 0.0; - if( matlab || (filterLen/2) % 2 != 0 ) // odd length half filter + if (matlab || (filterLen / 2) % 2 != 0) // odd length half filter { xi = workIndex / 2; - if( workIndex % 2 != 0 ) + if (workIndex % 2 != 0) { k = filterLen - 1; } @@ -2767,7 +2711,7 @@ public: else { xi = (workIndex + 1) / 2; - if( workIndex % 2 != 0 ) + if (workIndex % 2 != 0) { k = filterLen - 2; } @@ -2777,402 +2721,373 @@ public: } } - while( k > -1 ) // k >= 0 + while (k > -1) // k >= 0 { - sum += lowFilter.Get(k) * MAKEVAL( coeffs.Get( xi ) ) + // cA - highFilter.Get(k) * MAKEVAL( coeffs.Get( xi + cALenExtended) ); // cD + sum += lowFilter.Get(k) * MAKEVAL(coeffs.Get(xi)) + // cA + highFilter.Get(k) * MAKEVAL(coeffs.Get(xi + cALenExtended)); // cD xi++; k -= 2; } - sigOut.Set(workIndex, static_cast( sum ) ); + sigOut.Set(workIndex, static_cast(sum)); } } - #undef MAKEVAL - #undef VAL +#undef MAKEVAL +#undef VAL private: - const typename vtkm::cont::ArrayHandle::ExecutionTypes:: - PortalConst lowFilter, highFilter; - const vtkm::Id filterLen; // filter length. - const vtkm::Id cALen; // Number of actual cAs - const vtkm::Id cALen2; // = cALen * 2 - const vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD - bool matlab; // followed the naming convention from VAPOR - // It's always false for the 1st 4 filters. + const typename vtkm::cont::ArrayHandle::ExecutionTypes::PortalConst + lowFilter, + highFilter; + const vtkm::Id filterLen; // filter length. + const vtkm::Id cALen; // Number of actual cAs + const vtkm::Id cALen2; // = cALen * 2 + const vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD + bool matlab; // followed the naming convention from VAPOR + // It's always false for the 1st 4 filters. }; - - class ThresholdWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( FieldInOut ); // Thresholding in-place - typedef void ExecutionSignature( _1 ); - typedef _1 InputDomain; + typedef void ControlSignature(FieldInOut); // Thresholding in-place + typedef void ExecutionSignature(_1); + typedef _1 InputDomain; // Constructor - ThresholdWorklet( vtkm::Float64 t ) : threshold( t ), // must pass in a positive val - neg_threshold( t*-1.0 ) {} - - template - VTKM_EXEC - void operator()( ValueType &coeffVal ) const + ThresholdWorklet(vtkm::Float64 t) + : threshold(t) + , // must pass in a positive val + neg_threshold(t * -1.0) { - if( neg_threshold < coeffVal && coeffVal < threshold ) + } + + template + VTKM_EXEC void operator()(ValueType& coeffVal) const + { + if (neg_threshold < coeffVal && coeffVal < threshold) { coeffVal = 0.0; } } private: - vtkm::Float64 threshold; // positive - vtkm::Float64 neg_threshold; // negative + vtkm::Float64 threshold; // positive + vtkm::Float64 neg_threshold; // negative }; - - -class SquaredDeviation: public vtkm::worklet::WorkletMapField +class SquaredDeviation : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn, - FieldOut); - typedef _2 ExecutionSignature( _1 ); - typedef _1 InputDomain; + typedef void ControlSignature(FieldIn, FieldOut); + typedef _2 ExecutionSignature(_1); + typedef _1 InputDomain; // Constructor template - VTKM_EXEC_CONT - SquaredDeviation( ValueType t ) + VTKM_EXEC_CONT SquaredDeviation(ValueType t) { this->mean = static_cast(t); } template - VTKM_EXEC - ValueType operator()( const ValueType &num ) const + VTKM_EXEC ValueType operator()(const ValueType& num) const { - vtkm::Float64 num64 = static_cast( num ); + vtkm::Float64 num64 = static_cast(num); vtkm::Float64 diff = this->mean - num64; - return static_cast( diff * diff ); + return static_cast(diff * diff); } private: vtkm::Float64 mean; }; - - -class Differencer: public vtkm::worklet::WorkletMapField +class Differencer : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn, - FieldIn, - FieldOut); - typedef _3 ExecutionSignature( _1, _2 ); - typedef _1 InputDomain; + typedef void ControlSignature(FieldIn, FieldIn, FieldOut); + typedef _3 ExecutionSignature(_1, _2); + typedef _1 InputDomain; - template - VTKM_EXEC - ValueType1 operator()( const ValueType1 &v1, const ValueType2 &v2 ) const + template + VTKM_EXEC ValueType1 operator()(const ValueType1& v1, const ValueType2& v2) const { return v1 - static_cast(v2); } }; - - class SquareWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature(FieldIn< ScalarAll>, - FieldOut); - typedef _2 ExecutionSignature( _1 ); - typedef _1 InputDomain; + typedef void ControlSignature(FieldIn, FieldOut); + typedef _2 ExecutionSignature(_1); + typedef _1 InputDomain; template - VTKM_EXEC - ValueType operator()( const ValueType &v ) const + VTKM_EXEC ValueType operator()(const ValueType& v) const { return (v * v); } }; - - class CopyWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayIn< ScalarAll >, - WholeArrayOut< ScalarAll > ); - typedef void ExecutionSignature( _1, _2, WorkIndex ); - typedef _1 InputDomain; + typedef void ControlSignature(WholeArrayIn, WholeArrayOut); + typedef void ExecutionSignature(_1, _2, WorkIndex); + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - CopyWorklet( vtkm::Id idx ) - { - this->startIdx = idx; - } + CopyWorklet(vtkm::Id idx) { this->startIdx = idx; } - template< typename PortalInType, typename PortalOutType > - VTKM_EXEC - void operator()( const PortalInType &portalIn, - PortalOutType &portalOut, - const vtkm::Id &workIndex) const + template + VTKM_EXEC void operator()(const PortalInType& portalIn, PortalOutType& portalOut, + const vtkm::Id& workIndex) const { - portalOut.Set( (startIdx + workIndex), portalIn.Get(workIndex) ); + portalOut.Set((startIdx + workIndex), portalIn.Get(workIndex)); } private: vtkm::Id startIdx; }; - - // Worklet for 1D signal extension no. 1 class LeftSYMHExtentionWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayOut < ScalarAll >, // extension part - WholeArrayIn < ScalarAll > ); // signal part - typedef void ExecutionSignature( _1, _2, WorkIndex ); - typedef _1 InputDomain; + typedef void ControlSignature(WholeArrayOut, // extension part + WholeArrayIn); // signal part + typedef void ExecutionSignature(_1, _2, WorkIndex); + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - LeftSYMHExtentionWorklet( vtkm::Id len ) : addLen( len ) {} - - template< typename PortalOutType, typename PortalInType > - VTKM_EXEC - void operator()( PortalOutType &portalOut, - const PortalInType &portalIn, - const vtkm::Id &workIndex) const + LeftSYMHExtentionWorklet(vtkm::Id len) + : addLen(len) { - portalOut.Set( workIndex, portalIn.Get(this->addLen - workIndex - 1) ); + } + + template + VTKM_EXEC void operator()(PortalOutType& portalOut, const PortalInType& portalIn, + const vtkm::Id& workIndex) const + { + portalOut.Set(workIndex, portalIn.Get(this->addLen - workIndex - 1)); } private: vtkm::Id addLen; }; - - // Worklet for 1D signal extension no. 2 class LeftSYMWExtentionWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayOut < ScalarAll >, // extension part - WholeArrayIn < ScalarAll > ); // signal part - typedef void ExecutionSignature( _1, _2, WorkIndex ); - typedef _1 InputDomain; + typedef void ControlSignature(WholeArrayOut, // extension part + WholeArrayIn); // signal part + typedef void ExecutionSignature(_1, _2, WorkIndex); + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - LeftSYMWExtentionWorklet( vtkm::Id len ) : addLen( len ) {} - - template< typename PortalOutType, typename PortalInType > - VTKM_EXEC - void operator()( PortalOutType &portalOut, - const PortalInType &portalIn, - const vtkm::Id &workIndex) const + LeftSYMWExtentionWorklet(vtkm::Id len) + : addLen(len) { - portalOut.Set( workIndex, portalIn.Get(this->addLen - workIndex) ); + } + + template + VTKM_EXEC void operator()(PortalOutType& portalOut, const PortalInType& portalIn, + const vtkm::Id& workIndex) const + { + portalOut.Set(workIndex, portalIn.Get(this->addLen - workIndex)); } private: vtkm::Id addLen; }; - - // Worklet for 1D signal extension no. 3 class LeftASYMHExtentionWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayOut < ScalarAll >, // extension part - WholeArrayIn < ScalarAll > ); // signal part - typedef void ExecutionSignature( _1, _2, WorkIndex ); - typedef _1 InputDomain; + typedef void ControlSignature(WholeArrayOut, // extension part + WholeArrayIn); // signal part + typedef void ExecutionSignature(_1, _2, WorkIndex); + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - LeftASYMHExtentionWorklet( vtkm::Id len ) : addLen (len) {} - - template< typename PortalOutType, typename PortalInType > - VTKM_EXEC_CONT - void operator()( PortalOutType &portalOut, - const PortalInType &portalIn, - const vtkm::Id &workIndex) const + LeftASYMHExtentionWorklet(vtkm::Id len) + : addLen(len) { - portalOut.Set( workIndex, portalIn.Get( addLen - workIndex - 1) * (-1.0) ); + } + + template + VTKM_EXEC_CONT void operator()(PortalOutType& portalOut, const PortalInType& portalIn, + const vtkm::Id& workIndex) const + { + portalOut.Set(workIndex, portalIn.Get(addLen - workIndex - 1) * (-1.0)); } private: vtkm::Id addLen; }; - - // Worklet for 1D signal extension no. 4 class LeftASYMWExtentionWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayOut < ScalarAll >, // extension part - WholeArrayIn < ScalarAll > ); // signal part - typedef void ExecutionSignature( _1, _2, WorkIndex ); - typedef _1 InputDomain; + typedef void ControlSignature(WholeArrayOut, // extension part + WholeArrayIn); // signal part + typedef void ExecutionSignature(_1, _2, WorkIndex); + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - LeftASYMWExtentionWorklet( vtkm::Id len ) : addLen (len) {} - - template< typename PortalOutType, typename PortalInType > - VTKM_EXEC_CONT - void operator()( PortalOutType &portalOut, - const PortalInType &portalIn, - const vtkm::Id &workIndex) const + LeftASYMWExtentionWorklet(vtkm::Id len) + : addLen(len) { - portalOut.Set( workIndex, portalIn.Get( addLen - workIndex ) * (-1.0) ); + } + + template + VTKM_EXEC_CONT void operator()(PortalOutType& portalOut, const PortalInType& portalIn, + const vtkm::Id& workIndex) const + { + portalOut.Set(workIndex, portalIn.Get(addLen - workIndex) * (-1.0)); } private: vtkm::Id addLen; }; - - // Worklet for 1D signal extension no. 5 class RightSYMHExtentionWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayOut < ScalarAll >, // extension part - WholeArrayIn < ScalarAll > ); // signal part - typedef void ExecutionSignature( _1, _2, WorkIndex ); - typedef _1 InputDomain; + typedef void ControlSignature(WholeArrayOut, // extension part + WholeArrayIn); // signal part + typedef void ExecutionSignature(_1, _2, WorkIndex); + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - RightSYMHExtentionWorklet ( vtkm::Id sigInl ) : sigInLen( sigInl ) {} - - template< typename PortalOutType, typename PortalInType > - VTKM_EXEC - void operator()( PortalOutType &portalOut, - const PortalInType &portalIn, - const vtkm::Id &workIndex) const + RightSYMHExtentionWorklet(vtkm::Id sigInl) + : sigInLen(sigInl) { - portalOut.Set( workIndex, portalIn.Get(this->sigInLen - workIndex - 1) ); + } + + template + VTKM_EXEC void operator()(PortalOutType& portalOut, const PortalInType& portalIn, + const vtkm::Id& workIndex) const + { + portalOut.Set(workIndex, portalIn.Get(this->sigInLen - workIndex - 1)); } private: vtkm::Id sigInLen; }; - - // Worklet for 1D signal extension no. 6 class RightSYMWExtentionWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayOut < ScalarAll >, // extension part - WholeArrayIn < ScalarAll > ); // signal part - typedef void ExecutionSignature( _1, _2, WorkIndex ); - typedef _1 InputDomain; + typedef void ControlSignature(WholeArrayOut, // extension part + WholeArrayIn); // signal part + typedef void ExecutionSignature(_1, _2, WorkIndex); + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - RightSYMWExtentionWorklet ( vtkm::Id sigInl ) : sigInLen( sigInl ) {} - - template< typename PortalOutType, typename PortalInType > - VTKM_EXEC - void operator()( PortalOutType &portalOut, - const PortalInType &portalIn, - const vtkm::Id &workIndex) const + RightSYMWExtentionWorklet(vtkm::Id sigInl) + : sigInLen(sigInl) { - portalOut.Set( workIndex, portalIn.Get(this->sigInLen - workIndex - 2) ); + } + + template + VTKM_EXEC void operator()(PortalOutType& portalOut, const PortalInType& portalIn, + const vtkm::Id& workIndex) const + { + portalOut.Set(workIndex, portalIn.Get(this->sigInLen - workIndex - 2)); } private: vtkm::Id sigInLen; }; - - // Worklet for 1D signal extension no. 7 class RightASYMHExtentionWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayOut < ScalarAll >, // extension part - WholeArrayIn < ScalarAll > ); // signal part - typedef void ExecutionSignature( _1, _2, WorkIndex ); - typedef _1 InputDomain; + typedef void ControlSignature(WholeArrayOut, // extension part + WholeArrayIn); // signal part + typedef void ExecutionSignature(_1, _2, WorkIndex); + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - RightASYMHExtentionWorklet ( vtkm::Id sigInl ) : sigInLen( sigInl ) {} - - template< typename PortalOutType, typename PortalInType > - VTKM_EXEC_CONT - void operator()( PortalOutType &portalOut, - const PortalInType &portalIn, - const vtkm::Id &workIndex) const + RightASYMHExtentionWorklet(vtkm::Id sigInl) + : sigInLen(sigInl) { - portalOut.Set( workIndex, portalIn.Get( sigInLen - workIndex - 1) * (-1.0) ); + } + + template + VTKM_EXEC_CONT void operator()(PortalOutType& portalOut, const PortalInType& portalIn, + const vtkm::Id& workIndex) const + { + portalOut.Set(workIndex, portalIn.Get(sigInLen - workIndex - 1) * (-1.0)); } private: vtkm::Id sigInLen; }; - - // Worklet for 1D signal extension no. 8 class RightASYMWExtentionWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayOut < ScalarAll >, // extension part - WholeArrayIn < ScalarAll > ); // signal part - typedef void ExecutionSignature( _1, _2, WorkIndex ); - typedef _1 InputDomain; + typedef void ControlSignature(WholeArrayOut, // extension part + WholeArrayIn); // signal part + typedef void ExecutionSignature(_1, _2, WorkIndex); + typedef _1 InputDomain; // Constructor VTKM_EXEC_CONT - RightASYMWExtentionWorklet ( vtkm::Id sigInl ) : sigInLen( sigInl ) {} - - template< typename PortalOutType, typename PortalInType > - VTKM_EXEC_CONT - void operator()( PortalOutType &portalOut, - const PortalInType &portalIn, - const vtkm::Id &workIndex) const + RightASYMWExtentionWorklet(vtkm::Id sigInl) + : sigInLen(sigInl) { - portalOut.Set( workIndex, portalIn.Get( sigInLen - workIndex - 2) * (-1.0) ); + } + + template + VTKM_EXEC_CONT void operator()(PortalOutType& portalOut, const PortalInType& portalIn, + const vtkm::Id& workIndex) const + { + portalOut.Set(workIndex, portalIn.Get(sigInLen - workIndex - 2) * (-1.0)); } private: vtkm::Id sigInLen; }; - - // Assign zero to a single index class AssignZeroWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayInOut< ScalarAll > ); - typedef void ExecutionSignature( _1, WorkIndex ); + typedef void ControlSignature(WholeArrayInOut); + typedef void ExecutionSignature(_1, WorkIndex); // Constructor VTKM_EXEC_CONT - AssignZeroWorklet( vtkm::Id idx ) : zeroIdx( idx ) { } - - template< typename PortalType > - VTKM_EXEC - void operator()( PortalType &array, - const vtkm::Id &workIdx ) const + AssignZeroWorklet(vtkm::Id idx) + : zeroIdx(idx) { - if( workIdx == this->zeroIdx ) + } + + template + VTKM_EXEC void operator()(PortalType& array, const vtkm::Id& workIdx) const + { + if (workIdx == this->zeroIdx) { - array.Set( workIdx, static_cast(0.0) ); + array.Set(workIdx, static_cast(0.0)); } } @@ -3180,196 +3095,187 @@ private: vtkm::Id zeroIdx; }; - - // Assign zero to a row or a column in a 2D array. // Change row or column is controlled by negative indices. class AssignZero2DWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayInOut< ScalarAll > ); - typedef void ExecutionSignature( _1, WorkIndex ); + typedef void ControlSignature(WholeArrayInOut); + typedef void ExecutionSignature(_1, WorkIndex); // Constructor VTKM_EXEC_CONT - AssignZero2DWorklet( vtkm::Id x, vtkm::Id y, vtkm::Id zero_x, vtkm::Id zero_y ) - : dimX( x ), dimY( y ), zeroX( zero_x ), zeroY( zero_y ) + AssignZero2DWorklet(vtkm::Id x, vtkm::Id y, vtkm::Id zero_x, vtkm::Id zero_y) + : dimX(x) + , dimY(y) + , zeroX(zero_x) + , zeroY(zero_y) { (void)dimY; } // Index translation helper VTKM_EXEC_CONT - void GetLogicalDim( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y ) const + void GetLogicalDim(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y) const { x = idx % dimX; y = idx / dimX; } - template< typename PortalType > - VTKM_EXEC - void operator()( PortalType &array, - const vtkm::Id &workIdx ) const + template + VTKM_EXEC void operator()(PortalType& array, const vtkm::Id& workIdx) const { vtkm::Id x, y; - GetLogicalDim( workIdx, x, y ); - if( zeroY < 0 && x == zeroX ) // assign zero to a column + GetLogicalDim(workIdx, x, y); + if (zeroY < 0 && x == zeroX) // assign zero to a column { - array.Set( workIdx, static_cast(0.0) ); + array.Set(workIdx, static_cast(0.0)); } - else if( zeroX < 0 && y == zeroY ) // assign zero to a row + else if (zeroX < 0 && y == zeroY) // assign zero to a row { - array.Set( workIdx, static_cast(0.0) ); + array.Set(workIdx, static_cast(0.0)); } } private: vtkm::Id dimX, dimY; - vtkm::Id zeroX, zeroY; // element at (zeroX, zeroY) will be assigned zero. - // each becomes a wild card if negative + vtkm::Id zeroX, zeroY; // element at (zeroX, zeroY) will be assigned zero. + // each becomes a wild card if negative }; - - // Assign zero to a plane (2D) in a 3D cube. // Which plane to assign zero is controlled by negative indices. class AssignZero3DWorklet : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( WholeArrayInOut< ScalarAll > ); - typedef void ExecutionSignature( _1, WorkIndex ); + typedef void ControlSignature(WholeArrayInOut); + typedef void ExecutionSignature(_1, WorkIndex); // Constructor VTKM_EXEC_CONT - AssignZero3DWorklet( vtkm::Id x, vtkm::Id y, vtkm::Id z, - vtkm::Id zero_x, vtkm::Id zero_y, vtkm::Id zero_z ) - : dimX( x ), dimY( y ), dimZ( z ), - zeroX( zero_x ), zeroY( zero_y ), zeroZ( zero_z ) + AssignZero3DWorklet(vtkm::Id x, vtkm::Id y, vtkm::Id z, vtkm::Id zero_x, vtkm::Id zero_y, + vtkm::Id zero_z) + : dimX(x) + , dimY(y) + , dimZ(z) + , zeroX(zero_x) + , zeroY(zero_y) + , zeroZ(zero_z) { (void)dimZ; } // Index translation helper VTKM_EXEC_CONT - void GetLogicalDim( vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z ) const + void GetLogicalDim(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const { z = idx / (dimX * dimY); y = (idx - z * dimX * dimY) / dimX; x = idx % dimX; } - template< typename PortalType > - VTKM_EXEC - void operator()( PortalType &array, - const vtkm::Id &workIdx ) const + template + VTKM_EXEC void operator()(PortalType& array, const vtkm::Id& workIdx) const { - vtkm::Id x, y, z; - GetLogicalDim( workIdx, x, y, z ); - if( zeroZ < 0 && zeroY < 0 && x == zeroX ) // plane perpendicular to X axis + vtkm::Id x, y, z; + GetLogicalDim(workIdx, x, y, z); + if (zeroZ < 0 && zeroY < 0 && x == zeroX) // plane perpendicular to X axis { - array.Set( workIdx, static_cast(0.0) ); + array.Set(workIdx, static_cast(0.0)); } - else if( zeroZ < 0 && zeroX < 0 && y == zeroY ) // plane perpendicular to Y axis + else if (zeroZ < 0 && zeroX < 0 && y == zeroY) // plane perpendicular to Y axis { - array.Set( workIdx, static_cast(0.0) ); + array.Set(workIdx, static_cast(0.0)); } - else if( zeroY < 0 && zeroX < 0 && z == zeroZ ) // plane perpendicular to Z axis + else if (zeroY < 0 && zeroX < 0 && z == zeroZ) // plane perpendicular to Z axis { - array.Set( workIdx, static_cast(0.0) ); + array.Set(workIdx, static_cast(0.0)); } } private: - vtkm::Id dimX, dimY, dimZ; - vtkm::Id zeroX, zeroY, zeroZ; // element at (zeroX, zeroY, zeroZ) will be assigned zero. - // each becomes a wild card if negative + vtkm::Id dimX, dimY, dimZ; + vtkm::Id zeroX, zeroY, zeroZ; // element at (zeroX, zeroY, zeroZ) will be assigned zero. + // each becomes a wild card if negative }; - - // Worklet: Copys a small rectangle to become a part of a big rectangle class RectangleCopyTo : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( FieldIn< ScalarAll >, // Input, small rectangle - WholeArrayOut< ScalarAll > ); // Output, big rectangle - typedef void ExecutionSignature( _1, _2, WorkIndex ); + typedef void ControlSignature(FieldIn, // Input, small rectangle + WholeArrayOut); // Output, big rectangle + typedef void ExecutionSignature(_1, _2, WorkIndex); // Constructor VTKM_EXEC_CONT - RectangleCopyTo( vtkm::Id inx, vtkm::Id iny, - vtkm::Id outx, vtkm::Id outy, - vtkm::Id xStart, vtkm::Id yStart ) - : - inXLen (inx), inYLen ( iny ), - outXLen (outx), outYLen ( outy ), - outXStart(xStart), outYStart( yStart ) + RectangleCopyTo(vtkm::Id inx, vtkm::Id iny, vtkm::Id outx, vtkm::Id outy, vtkm::Id xStart, + vtkm::Id yStart) + : inXLen(inx) + , inYLen(iny) + , outXLen(outx) + , outYLen(outy) + , outXStart(xStart) + , outYStart(yStart) { (void)outYLen; (void)inYLen; } VTKM_EXEC_CONT - void GetLogicalDimOfInputRect( const vtkm::Id &idx, - vtkm::Id &x, - vtkm::Id &y ) const + void GetLogicalDimOfInputRect(const vtkm::Id& idx, vtkm::Id& x, vtkm::Id& y) const { x = idx % inXLen; y = idx / inXLen; } VTKM_EXEC_CONT - vtkm::Id Get1DIdxOfOutputRect( vtkm::Id x, - vtkm::Id y ) const - { - return y * outXLen + x; - } + vtkm::Id Get1DIdxOfOutputRect(vtkm::Id x, vtkm::Id y) const { return y * outXLen + x; } - template< typename ValueInType, typename PortalOutType > - VTKM_EXEC - void operator()( const ValueInType &valueIn, - PortalOutType &arrayOut, - const vtkm::Id &workIdx ) const + template + VTKM_EXEC void operator()(const ValueInType& valueIn, PortalOutType& arrayOut, + const vtkm::Id& workIdx) const { vtkm::Id xOfIn, yOfIn; - GetLogicalDimOfInputRect( workIdx, xOfIn, yOfIn ); - vtkm::Id outputIdx = Get1DIdxOfOutputRect( xOfIn+outXStart, yOfIn+outYStart ); - arrayOut.Set( outputIdx, valueIn ); + GetLogicalDimOfInputRect(workIdx, xOfIn, yOfIn); + vtkm::Id outputIdx = Get1DIdxOfOutputRect(xOfIn + outXStart, yOfIn + outYStart); + arrayOut.Set(outputIdx, valueIn); } private: - vtkm::Id inXLen, inYLen; - vtkm::Id outXLen, outYLen; + vtkm::Id inXLen, inYLen; + vtkm::Id outXLen, outYLen; vtkm::Id outXStart, outYStart; }; - - // Worklet: Copys a small cube to become a part of a big cube class CubeCopyTo : public vtkm::worklet::WorkletMapField { public: - typedef void ControlSignature( FieldIn< ScalarAll >, // Input, small cube - WholeArrayOut< ScalarAll > ); // Output, big cube - typedef void ExecutionSignature( _1, _2, WorkIndex ); + typedef void ControlSignature(FieldIn, // Input, small cube + WholeArrayOut); // Output, big cube + typedef void ExecutionSignature(_1, _2, WorkIndex); // Constructor VTKM_EXEC_CONT - CubeCopyTo( vtkm::Id inx, vtkm::Id iny, vtkm::Id inz, - vtkm::Id outx, vtkm::Id outy, vtkm::Id outz, - vtkm::Id xStart, vtkm::Id yStart, vtkm::Id zStart ) - : - inDimX( inx ), inDimY( iny ), inDimZ( inz ), - outDimX( outx ), outDimY( outy ), outDimZ( outz ), - outStartX( xStart), outStartY( yStart ), outStartZ( zStart ) + CubeCopyTo(vtkm::Id inx, vtkm::Id iny, vtkm::Id inz, vtkm::Id outx, vtkm::Id outy, vtkm::Id outz, + vtkm::Id xStart, vtkm::Id yStart, vtkm::Id zStart) + : inDimX(inx) + , inDimY(iny) + , inDimZ(inz) + , outDimX(outx) + , outDimY(outy) + , outDimZ(outz) + , outStartX(xStart) + , outStartY(yStart) + , outStartZ(zStart) { (void)outDimZ; (void)inDimZ; } VTKM_EXEC_CONT - void GetLogicalDimOfInputCube( vtkm::Id idx, - vtkm::Id &x, vtkm::Id &y, vtkm::Id &z ) const + void GetLogicalDimOfInputCube(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const { z = idx / (inDimX * inDimY); y = (idx - z * inDimX * inDimY) / inDimX; @@ -3377,32 +3283,29 @@ public: } VTKM_EXEC_CONT - vtkm::Id Get1DIdxOfOutputCube( vtkm::Id x, vtkm::Id y, vtkm::Id z ) const + vtkm::Id Get1DIdxOfOutputCube(vtkm::Id x, vtkm::Id y, vtkm::Id z) const { return z * outDimX * outDimY + y * outDimX + x; } - template< typename ValueInType, typename PortalOutType > - VTKM_EXEC - void operator()( const ValueInType &valueIn, - PortalOutType &arrayOut, - const vtkm::Id &workIdx ) const + template + VTKM_EXEC void operator()(const ValueInType& valueIn, PortalOutType& arrayOut, + const vtkm::Id& workIdx) const { - vtkm::Id inX, inY, inZ; - GetLogicalDimOfInputCube( workIdx, inX, inY, inZ ); - vtkm::Id outputIdx = Get1DIdxOfOutputCube( inX+outStartX, inY+outStartY, inZ+outStartZ ); - arrayOut.Set( outputIdx, valueIn ); + vtkm::Id inX, inY, inZ; + GetLogicalDimOfInputCube(workIdx, inX, inY, inZ); + vtkm::Id outputIdx = Get1DIdxOfOutputCube(inX + outStartX, inY + outStartY, inZ + outStartZ); + arrayOut.Set(outputIdx, valueIn); } private: - const vtkm::Id inDimX, inDimY, inDimZ; // input small cube - const vtkm::Id outDimX, outDimY, outDimZ; // output big cube - const vtkm::Id outStartX, outStartY, outStartZ; // where to put + const vtkm::Id inDimX, inDimY, inDimZ; // input small cube + const vtkm::Id outDimX, outDimY, outDimZ; // output big cube + const vtkm::Id outStartX, outStartY, outStartZ; // where to put }; - -} // namespace wavelets -} // namespace worlet -} // namespace vtkm +} // namespace wavelets +} // namespace worlet +} // namespace vtkm #endif // vtk_m_worklet_Wavelets_h