mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
code cleanup.
This commit is contained in:
parent
81a655414b
commit
ef2b97838c
@ -25,27 +25,27 @@ public:
|
||||
this->ClearTerminate();
|
||||
}
|
||||
|
||||
VTKM_EXEC_CONT void SetOk() { this->set(SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckOk() const { return this->test(SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT void SetOk() { this->set(this->SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckOk() const { return this->test(this->SUCCESS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetFail() { this->reset(SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckFail() const { return !this->test(SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT void SetFail() { this->reset(this->SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckFail() const { return !this->test(this->SUCCESS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetTerminate() { this->set(TERMINATE_BIT); }
|
||||
VTKM_EXEC_CONT void ClearTerminate() { this->reset(TERMINATE_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckTerminate() const { return this->test(TERMINATE_BIT); }
|
||||
VTKM_EXEC_CONT void SetTerminate() { this->set(this->TERMINATE_BIT); }
|
||||
VTKM_EXEC_CONT void ClearTerminate() { this->reset(this->TERMINATE_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckTerminate() const { return this->test(this->TERMINATE_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetSpatialBounds() { this->set(SPATIAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT void ClearSpatialBounds() { this->reset(SPATIAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckSpatialBounds() const { return this->test(SPATIAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT void SetSpatialBounds() { this->set(this->SPATIAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT void ClearSpatialBounds() { this->reset(this->SPATIAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckSpatialBounds() const { return this->test(this->SPATIAL_BOUNDS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetTemporalBounds() { this->set(TEMPORAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT void ClearTemporalBounds() { this->reset(TEMPORAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckTemporalBounds() const { return this->test(TEMPORAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT void SetTemporalBounds() { this->set(this->TEMPORAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT void ClearTemporalBounds() { this->reset(this->TEMPORAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckTemporalBounds() const { return this->test(this->TEMPORAL_BOUNDS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetTookAnySteps() { this->set(TOOK_ANY_STEPS_BIT); }
|
||||
VTKM_EXEC_CONT void ClearTookAnySteps() { this->reset(TOOK_ANY_STEPS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckTookAnySteps() const { return this->test(TOOK_ANY_STEPS_BIT); }
|
||||
VTKM_EXEC_CONT void SetTookAnySteps() { this->set(this->TOOK_ANY_STEPS_BIT); }
|
||||
VTKM_EXEC_CONT void ClearTookAnySteps() { this->reset(this->TOOK_ANY_STEPS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckTookAnySteps() const { return this->test(this->TOOK_ANY_STEPS_BIT); }
|
||||
|
||||
private:
|
||||
static constexpr vtkm::Id SUCCESS_BIT = 0;
|
||||
|
@ -49,8 +49,8 @@ set(unit_tests
|
||||
UnitTestPointTransform.cxx
|
||||
UnitTestProbe.cxx
|
||||
UnitTestSplitSharpEdgesFilter.cxx
|
||||
# UnitTestStreamlineFilter.cxx
|
||||
# UnitTestStreamSurfaceFilter.cxx
|
||||
UnitTestStreamlineFilter.cxx
|
||||
UnitTestStreamSurfaceFilter.cxx
|
||||
UnitTestSurfaceNormalsFilter.cxx
|
||||
UnitTestTetrahedralizeFilter.cxx
|
||||
UnitTestThresholdFilter.cxx
|
||||
|
@ -39,21 +39,21 @@ public:
|
||||
VTKM_EXEC_CONT GridEvaluatorStatus(){};
|
||||
VTKM_EXEC_CONT GridEvaluatorStatus(bool ok, bool spatial, bool temporal)
|
||||
{
|
||||
this->set(SUCCESS_BIT, ok);
|
||||
this->set(SPATIAL_BOUNDS_BIT, spatial);
|
||||
this->set(TEMPORAL_BOUNDS_BIT, temporal);
|
||||
this->set(this->SUCCESS_BIT, ok);
|
||||
this->set(this->SPATIAL_BOUNDS_BIT, spatial);
|
||||
this->set(this->TEMPORAL_BOUNDS_BIT, temporal);
|
||||
};
|
||||
VTKM_EXEC_CONT void SetOk() { this->set(this->SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckOk() const { return this->test(this->SUCCESS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetFail() { this->reset(SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckFail() const { return !this->test(SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT void SetFail() { this->reset(this->SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckFail() const { return !this->test(this->SUCCESS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetSpatialBounds() { this->set(SPATIAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckSpatialBounds() const { return this->test(SPATIAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT void SetSpatialBounds() { this->set(this->SPATIAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckSpatialBounds() const { return this->test(this->SPATIAL_BOUNDS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetTemporalBounds() { this->set(TEMPORAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckTemporalBounds() const { return this->test(TEMPORAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT void SetTemporalBounds() { this->set(this->TEMPORAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckTemporalBounds() const { return this->test(this->TEMPORAL_BOUNDS_BIT); }
|
||||
|
||||
private:
|
||||
static constexpr vtkm::Id SUCCESS_BIT = 0;
|
||||
|
@ -36,28 +36,28 @@ public:
|
||||
VTKM_EXEC_CONT IntegratorStatus(const bool& ok, const bool& spatial, const bool& temporal)
|
||||
{
|
||||
this->set(this->SUCCESS_BIT, ok);
|
||||
this->set(SPATIAL_BOUNDS_BIT, spatial);
|
||||
this->set(TEMPORAL_BOUNDS_BIT, temporal);
|
||||
this->set(this->SPATIAL_BOUNDS_BIT, spatial);
|
||||
this->set(this->TEMPORAL_BOUNDS_BIT, temporal);
|
||||
}
|
||||
|
||||
VTKM_EXEC_CONT IntegratorStatus(const GridEvaluatorStatus& es)
|
||||
{
|
||||
this->set(SUCCESS_BIT, es.CheckOk());
|
||||
this->set(SPATIAL_BOUNDS_BIT, es.CheckSpatialBounds());
|
||||
this->set(TEMPORAL_BOUNDS_BIT, es.CheckTemporalBounds());
|
||||
this->set(this->SUCCESS_BIT, es.CheckOk());
|
||||
this->set(this->SPATIAL_BOUNDS_BIT, es.CheckSpatialBounds());
|
||||
this->set(this->TEMPORAL_BOUNDS_BIT, es.CheckTemporalBounds());
|
||||
}
|
||||
|
||||
VTKM_EXEC_CONT void SetOk() { this->set(SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckOk() const { return this->test(SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT void SetOk() { this->set(this->SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckOk() const { return this->test(this->SUCCESS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetFail() { this->reset(SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckFail() const { return !this->test(SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT void SetFail() { this->reset(this->SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckFail() const { return !this->test(this->SUCCESS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetSpatialBounds() { this->set(SPATIAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckSpatialBounds() const { return this->test(SPATIAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT void SetSpatialBounds() { this->set(this->SPATIAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckSpatialBounds() const { return this->test(this->SPATIAL_BOUNDS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetTemporalBounds() { this->set(TEMPORAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckTemporalBounds() const { return this->test(TEMPORAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT void SetTemporalBounds() { this->set(this->TEMPORAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckTemporalBounds() const { return this->test(this->TEMPORAL_BOUNDS_BIT); }
|
||||
|
||||
private:
|
||||
static constexpr vtkm::Id SUCCESS_BIT = 0;
|
||||
|
@ -35,52 +35,6 @@ namespace worklet
|
||||
namespace particleadvection
|
||||
{
|
||||
|
||||
#if 0
|
||||
class IntegratorStatus : public vtkm::Bitset<vtkm::UInt8>
|
||||
{
|
||||
public:
|
||||
VTKM_EXEC_CONT IntegratorStatus() {}
|
||||
|
||||
VTKM_EXEC_CONT IntegratorStatus(const bool& ok, const bool& spatial, const bool& temporal)
|
||||
{
|
||||
this->set(this->SUCCESS_BIT, ok);
|
||||
this->set(SPATIAL_BOUNDS_BIT, spatial);
|
||||
this->set(TEMPORAL_BOUNDS_BIT, temporal);
|
||||
}
|
||||
|
||||
VTKM_EXEC_CONT IntegratorStatus(const GridEvaluatorStatus& es)
|
||||
{
|
||||
this->set(SUCCESS_BIT, es.CheckOk());
|
||||
this->set(SPATIAL_BOUNDS_BIT, es.CheckSpatialBounds());
|
||||
this->set(TEMPORAL_BOUNDS_BIT, es.CheckTemporalBounds());
|
||||
}
|
||||
|
||||
VTKM_EXEC_CONT void SetOk() { this->set(SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckOk() const { return this->test(SUCCESS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetFail() { this->reset(SUCCESS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckFail() const { return !this->test(SUCCESS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetSpatialBounds() { this->set(SPATIAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckSpatialBounds() const { return this->test(SPATIAL_BOUNDS_BIT); }
|
||||
|
||||
VTKM_EXEC_CONT void SetTemporalBounds() { this->set(TEMPORAL_BOUNDS_BIT); }
|
||||
VTKM_EXEC_CONT bool CheckTemporalBounds() const { return this->test(TEMPORAL_BOUNDS_BIT); }
|
||||
|
||||
private:
|
||||
static constexpr vtkm::Id SUCCESS_BIT = 0;
|
||||
static constexpr vtkm::Id SPATIAL_BOUNDS_BIT = 1;
|
||||
static constexpr vtkm::Id TEMPORAL_BOUNDS_BIT = 2;
|
||||
};
|
||||
|
||||
inline VTKM_CONT std::ostream& operator<<(std::ostream& s, const IntegratorStatus& status)
|
||||
{
|
||||
s << "[" << status.CheckOk() << " " << status.CheckSpatialBounds() << " "
|
||||
<< status.CheckTemporalBounds() << "]";
|
||||
return s;
|
||||
}
|
||||
#endif
|
||||
|
||||
class Integrator : public vtkm::cont::ExecutionObjectBase
|
||||
{
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user