VTK  9.5.20251010
Protected Member Functions | Protected Attributes | List of all members
vtkmAlgorithm< AlgorithmT > Class Template Reference

Base class for VTK-m algorithms. More...

#include <vtkmAlgorithm.h>

Inherits AlgorithmT.

Public Member Functions

 vtkTemplateTypeMacro (vtkmAlgorithm, AlgorithmT)
 Standard methods for instantiation, type information, and printing.
 
virtual bool GetForceVTKm ()
 When this flag is off (the default), then the computation will fall back to the serial VTK version if Viskores fails to run.
 
virtual void SetForceVTKm (bool)
 When this flag is off (the default), then the computation will fall back to the serial VTK version if Viskores fails to run.
 
virtual void ForceVTKmOn ()
 When this flag is off (the default), then the computation will fall back to the serial VTK version if Viskores fails to run.
 
virtual void ForceVTKmOff ()
 When this flag is off (the default), then the computation will fall back to the serial VTK version if Viskores fails to run.
 

Protected Member Functions

 vtkmAlgorithm ()=default
 

Protected Attributes

bool ForceVTKm = false
 

Detailed Description

template<class AlgorithmT>
class vtkmAlgorithm< AlgorithmT >

Base class for VTK-m algorithms.

This class is used to define methods and properties that are common to all VTK-m algorithms.

Warning
Python wrapping of subclasses require special handling. Here is an example ensuring wrapping works as expected, implementing a temporal algorithm as a vtkPassInputTypeAlgorithm:
#include <vtkmAlgorithm.h>
#ifndef __VTK_WRAP__
#define vtkPassInputTypeAlgorithm vtkmAlgorithm<vtkPassInputTypeAlgorithm>
#endif
// We make the wrapper think that we inherit from vtkPassInputTypeAlgorithm
class MyVTKmFilter : vtkPassInputTypeAlgorithm
{
public:
vtkTypeMacro(MyVTKmFilter, vtkPassInputTypeAlgorithm);
// We do not need to trick the wrapper with the superclass name anymore
#ifndef __VTK_WRAP__
#undef vtkPassInputTypeAlgorithm
#endif
Superclass for algorithms that produce output of the same type as input.
See also
vtkTemporalAlgorithm

Definition at line 47 of file vtkmAlgorithm.h.

Constructor & Destructor Documentation

◆ vtkmAlgorithm()

template<class AlgorithmT >
vtkmAlgorithm< AlgorithmT >::vtkmAlgorithm ( )
protecteddefault

Member Function Documentation

◆ vtkTemplateTypeMacro()

template<class AlgorithmT >
vtkmAlgorithm< AlgorithmT >::vtkTemplateTypeMacro ( vtkmAlgorithm< AlgorithmT >  ,
AlgorithmT   
)

Standard methods for instantiation, type information, and printing.

◆ GetForceVTKm()

template<class AlgorithmT >
virtual bool vtkmAlgorithm< AlgorithmT >::GetForceVTKm ( )
virtual

When this flag is off (the default), then the computation will fall back to the serial VTK version if Viskores fails to run.

When the flag is on, the filter will generate an error if Viskores fails to run. This is mostly useful in testing to make sure the expected algorithm is run.

◆ SetForceVTKm()

template<class AlgorithmT >
virtual void vtkmAlgorithm< AlgorithmT >::SetForceVTKm ( bool  )
virtual

When this flag is off (the default), then the computation will fall back to the serial VTK version if Viskores fails to run.

When the flag is on, the filter will generate an error if Viskores fails to run. This is mostly useful in testing to make sure the expected algorithm is run.

◆ ForceVTKmOn()

template<class AlgorithmT >
virtual void vtkmAlgorithm< AlgorithmT >::ForceVTKmOn ( )
virtual

When this flag is off (the default), then the computation will fall back to the serial VTK version if Viskores fails to run.

When the flag is on, the filter will generate an error if Viskores fails to run. This is mostly useful in testing to make sure the expected algorithm is run.

◆ ForceVTKmOff()

template<class AlgorithmT >
virtual void vtkmAlgorithm< AlgorithmT >::ForceVTKmOff ( )
virtual

When this flag is off (the default), then the computation will fall back to the serial VTK version if Viskores fails to run.

When the flag is on, the filter will generate an error if Viskores fails to run. This is mostly useful in testing to make sure the expected algorithm is run.

Member Data Documentation

◆ ForceVTKm

template<class AlgorithmT >
bool vtkmAlgorithm< AlgorithmT >::ForceVTKm = false
protected

Definition at line 75 of file vtkmAlgorithm.h.


The documentation for this class was generated from the following file: