1 //============================================================================
2 //  Copyright (c) Kitware, Inc.
3 //  All rights reserved.
4 //  See LICENSE.txt for details.
5 //  This software is distributed WITHOUT ANY WARRANTY; without even
6 //  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
7 //  PURPOSE.  See the above copyright notice for more information.
8 //
9 //  Copyright 2015 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
10 //  Copyright 2015 UT-Battelle, LLC.
11 //  Copyright 2015 Los Alamos National Security.
12 //
13 //  Under the terms of Contract DE-NA0003525 with NTESS,
14 //  the U.S. Government retains certain rights in this software.
15 //
16 //  Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
17 //  Laboratory (LANL), the U.S. Government retains certain rights in
18 //  this software.
19 //============================================================================
20 #ifndef vtk_m_cont_BoundsGlobalCompute_h
21 #define vtk_m_cont_BoundsGlobalCompute_h
22 
23 #include <vtkm/Bounds.h>
24 #include <vtkm/cont/vtkm_cont_export.h>
25 
26 namespace vtkm
27 {
28 namespace cont
29 {
30 
31 class DataSet;
32 class MultiBlock;
33 
34 //@{
35 /// \brief Functions to compute bounds for a dataset or multiblock globally
36 ///
37 /// These are utility functions that compute bounds for the dataset or
38 /// multiblock globally i.e. across all ranks when operating in a distributed
39 /// environment. When VTK-m not operating in an distributed environment, these
40 /// behave same as `vtkm::cont::BoundsCompute`.
41 ///
42 /// Note that if the provided CoordinateSystem does not exists, empty bounds
43 /// are returned. Likewise, for MultiBlock, blocks without the chosen CoordinateSystem
44 /// are skipped.
45 VTKM_CONT_EXPORT
46 VTKM_CONT
47 vtkm::Bounds BoundsGlobalCompute(const vtkm::cont::DataSet& dataset,
48                                  vtkm::Id coordinate_system_index = 0);
49 
50 VTKM_CONT_EXPORT
51 VTKM_CONT
52 vtkm::Bounds BoundsGlobalCompute(const vtkm::cont::MultiBlock& multiblock,
53                                  vtkm::Id coordinate_system_index = 0);
54 
55 VTKM_CONT_EXPORT
56 VTKM_CONT
57 vtkm::Bounds BoundsGlobalCompute(const vtkm::cont::DataSet& dataset,
58                                  const std::string& coordinate_system_name);
59 
60 VTKM_CONT_EXPORT
61 VTKM_CONT
62 vtkm::Bounds BoundsGlobalCompute(const vtkm::cont::MultiBlock& multiblock,
63                                  const std::string& coordinate_system_name);
64 //@}
65 }
66 }
67 #endif
68