//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notice for more information. // // Copyright 2014 Sandia Corporation. // Copyright 2014 UT-Battelle, LLC. // Copyright 2014 Los Alamos National Security. // // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this software. // // Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National // Laboratory (LANL), the U.S. Government retains certain rights in // this software. //============================================================================ #ifndef vtk_m_TypeListTag_h #define vtk_m_TypeListTag_h #ifndef VTKM_DEFAULT_TYPE_LIST_TAG #define VTKM_DEFAULT_TYPE_LIST_TAG ::vtkm::TypeListTagCommon #endif #include #include namespace vtkm { /// A list containing the type vtkm::Id. /// struct TypeListTagId : vtkm::ListTagBase { }; /// A list containing the type vtkm::Id2. /// struct TypeListTagId2 : vtkm::ListTagBase { }; /// A list containing the type vtkm::Id3. /// struct TypeListTagId3 : vtkm::ListTagBase { }; /// A list containing the type vtkm::IdComponent /// struct TypeListTagIdComponent : vtkm::ListTagBase { }; /// A list containing types used to index arrays. Contains vtkm::Id, vtkm::Id2, /// and vtkm::Id3. /// struct TypeListTagIndex : vtkm::ListTagBase { }; /// A list containing types used for scalar fields. Specifically, contains /// floating point numbers of different widths (i.e. vtkm::Float32 and /// vtkm::Float64). struct TypeListTagFieldScalar : vtkm::ListTagBase { }; /// A list containing types for values for fields with two dimensional /// vectors. /// struct TypeListTagFieldVec2 : vtkm::ListTagBase, vtkm::Vec > { }; /// A list containing types for values for fields with three dimensional /// vectors. /// struct TypeListTagFieldVec3 : vtkm::ListTagBase, vtkm::Vec > { }; /// A list containing types for values for fields with four dimensional /// vectors. /// struct TypeListTagFieldVec4 : vtkm::ListTagBase, vtkm::Vec > { }; /// A list containing common types for values in fields. Specifically contains /// floating point scalars and vectors of size 2, 3, and 4 with floating point /// components. /// struct TypeListTagField : vtkm::ListTagBase, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec > { }; /// A list of all scalars defined in vtkm/Types.h. A scalar is a type that /// holds a single number. /// struct TypeListTagScalarAll : vtkm::ListTagBase { }; /// A list of the most commonly use Vec classes. Specifically, these are /// vectors of size 2, 3, or 4 containing either unsigned bytes, signed /// integers of 32 or 64 bits, or floating point values of 32 or 64 bits. /// struct TypeListTagVecCommon : vtkm::ListTagBase, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec > { }; namespace internal { /// A list of uncommon Vec classes with length up to 4. This is not much /// use in general, but is used when joined with \c TypeListTagVecCommon /// to get a list of all vectors up to size 4. /// struct TypeListTagVecUncommon : vtkm::ListTagBase, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec, vtkm::Vec > { }; } // namespace internal /// A list of all vector classes with standard types as components and /// lengths between 2 and 4. /// struct TypeListTagVecAll : vtkm::ListTagJoin< vtkm::TypeListTagVecCommon, vtkm::internal::TypeListTagVecUncommon> { }; /// A list of all basic types listed in vtkm/Types.h. Does not include all /// possible VTK-m types like arbitrarily typed and sized Vecs (only up to /// length 4) or math types like matrices. /// struct TypeListTagAll : vtkm::ListTagJoin { }; /// A list of the most commonly used types across multiple domains. Includes /// integers, floating points, and 3 dimensional vectors of floating points. /// struct TypeListTagCommon : vtkm::ListTagBase, vtkm::Vec > { }; // Special implementation of ListContains for TypeListTagAll to always be // true. Although TypeListTagAll is necessarily finite, the point is to // be all inclusive. Besides, this should speed up the compilation when // checking a list that should contain everything. template struct ListContains { static const bool value = true; }; } // namespace vtkm #endif //vtk_m_TypeListTag_h