ad1e7b5bdb
This mechanism sets up CMake variables that allow a user to select which modules/libraries to create. Dependencies will be tracked down to ensure that all of a module's dependencies are also enabled. The modules are also arranged into groups. Groups allow you to set the enable flag for a group of modules at once. Thus, if you have several modules that are likely to be used together, you can create a group for them. This can be handy in converting user-friendly CMake options (such as `VTKm_ENABLE_RENDERING`) to the modules that enable that by pointing to the appropriate group.
68 lines
1.7 KiB
C++
68 lines
1.7 KiB
C++
//============================================================================
|
|
// 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.
|
|
//============================================================================
|
|
#ifndef vtk_m_exec_arg_testing_ThreadIndicesTesting_h
|
|
#define vtk_m_exec_arg_testing_ThreadIndicesTesting_h
|
|
|
|
#include <vtkm/Types.h>
|
|
|
|
namespace vtkm
|
|
{
|
|
namespace exec
|
|
{
|
|
namespace arg
|
|
{
|
|
|
|
/// \brief Simplified version of ThreadIndices for unit testing purposes
|
|
///
|
|
class ThreadIndicesTesting
|
|
{
|
|
public:
|
|
VTKM_EXEC_CONT
|
|
ThreadIndicesTesting(vtkm::Id index)
|
|
: 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)
|
|
{
|
|
}
|
|
|
|
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_EXEC_CONT
|
|
vtkm::Id GetOutputIndex() const { return this->OutputIndex; }
|
|
|
|
VTKM_EXEC_CONT
|
|
vtkm::IdComponent GetVisitIndex() const { return this->VisitIndex; }
|
|
|
|
VTKM_EXEC_CONT
|
|
vtkm::Id GetThreadIndex() const { return this->OutputIndex; }
|
|
|
|
private:
|
|
vtkm::Id InputIndex;
|
|
vtkm::Id OutputIndex;
|
|
vtkm::IdComponent VisitIndex;
|
|
};
|
|
}
|
|
}
|
|
} // namespace vtkm::exec::arg
|
|
|
|
#endif //vtk_m_exec_arg_testing_ThreadIndicesTesting_h
|