2015-02-04 22:40:31 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2015-02-04 22:40:31 +00:00
|
|
|
// 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.
|
|
|
|
//============================================================================
|
2015-08-03 16:06:59 +00:00
|
|
|
#ifndef vtk_m_exec_arg_CellShape_h
|
|
|
|
#define vtk_m_exec_arg_CellShape_h
|
2015-02-04 22:40:31 +00:00
|
|
|
|
|
|
|
#include <vtkm/exec/arg/ExecutionSignatureTagBase.h>
|
2017-05-18 14:51:24 +00:00
|
|
|
#include <vtkm/exec/arg/Fetch.h>
|
2015-02-04 22:40:31 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace exec
|
|
|
|
{
|
|
|
|
namespace arg
|
|
|
|
{
|
2015-02-04 22:40:31 +00:00
|
|
|
|
2015-08-03 16:06:59 +00:00
|
|
|
/// \brief Aspect tag to use for getting the cell shape.
|
2015-02-04 22:40:31 +00:00
|
|
|
///
|
2015-08-03 16:06:59 +00:00
|
|
|
/// The \c AspectTagCellShape aspect tag causes the \c Fetch class to
|
|
|
|
/// obtain the type of element (e.g. cell cell) from the topology object.
|
2015-02-04 22:40:31 +00:00
|
|
|
///
|
2017-05-18 14:29:41 +00:00
|
|
|
struct AspectTagCellShape
|
|
|
|
{
|
|
|
|
};
|
2015-02-04 22:40:31 +00:00
|
|
|
|
2015-08-03 16:06:59 +00:00
|
|
|
/// \brief The \c ExecutionSignature tag to use to get the cell shape.
|
2015-02-04 22:40:31 +00:00
|
|
|
///
|
2015-08-03 16:06:59 +00:00
|
|
|
struct CellShape : vtkm::exec::arg::ExecutionSignatureTagBase
|
2015-02-04 22:40:31 +00:00
|
|
|
{
|
2018-02-27 14:25:25 +00:00
|
|
|
static constexpr vtkm::IdComponent INDEX = 1;
|
2017-08-16 15:34:21 +00:00
|
|
|
using AspectTag = vtkm::exec::arg::AspectTagCellShape;
|
2015-02-04 22:40:31 +00:00
|
|
|
};
|
|
|
|
|
2020-04-14 15:00:46 +00:00
|
|
|
template <typename FetchTag, typename ExecObjectType>
|
|
|
|
struct Fetch<FetchTag, vtkm::exec::arg::AspectTagCellShape, ExecObjectType>
|
2015-02-04 22:40:31 +00:00
|
|
|
{
|
2015-09-24 14:39:48 +00:00
|
|
|
VTKM_SUPPRESS_EXEC_WARNINGS
|
2020-04-14 15:00:46 +00:00
|
|
|
template <typename ThreadIndicesType>
|
|
|
|
VTKM_EXEC auto Load(const ThreadIndicesType& indices, const ExecObjectType&) const
|
|
|
|
-> decltype(indices.GetCellShape())
|
2015-08-19 16:32:01 +00:00
|
|
|
{
|
2015-10-07 18:14:00 +00:00
|
|
|
return indices.GetCellShape();
|
2015-02-04 22:40:31 +00:00
|
|
|
}
|
|
|
|
|
2020-04-14 15:00:46 +00:00
|
|
|
template <typename ThreadIndicesType, typename ValueType>
|
|
|
|
VTKM_EXEC void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const
|
2015-02-04 22:40:31 +00:00
|
|
|
{
|
|
|
|
// Store is a no-op.
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // namespace vtkm::exec::arg
|
|
|
|
|
2015-08-03 16:06:59 +00:00
|
|
|
#endif //vtk_m_exec_arg_CellShape_h
|