Go to the documentation of this file.
   10 #ifndef vtk_m_cont_DeviceAdapterAlgorithm_h 
   11 #define vtk_m_cont_DeviceAdapterAlgorithm_h 
   20 #include <sys/timeb.h> 
   21 #include <sys/types.h> 
   40 template <
class DeviceAdapterTag>
 
   42 #ifdef VTKM_DOXYGEN_ONLY
 
   48   template <
typename IndicesStorage>
 
   59   template <
typename T, 
typename U, 
class CIn, 
class COut>
 
   74   template <
typename T, 
typename U, 
class CIn, 
class CStencil, 
class COut>
 
   90   template <
typename T, 
typename U, 
class CIn, 
class CStencil, 
class COut, 
class UnaryPredicate>
 
   94                                UnaryPredicate unary_predicate);
 
  114   template <
typename T, 
typename U, 
class CIn, 
class COut>
 
  133   template <
typename WordType>
 
  135   template <
typename WordType>
 
  142   template <
typename T, 
typename S>
 
  144   template <
typename T, 
typename S>
 
  159   template <
typename T, 
class CIn, 
class CVal, 
class COut>
 
  174   template <
typename T, 
class CIn, 
class CVal, 
class COut, 
class BinaryCompare>
 
  178                                     BinaryCompare binary_compare);
 
  187   template <
class CIn, 
class COut>
 
  200   template <
typename T, 
typename U, 
class CIn>
 
  213   template <
typename T, 
typename U, 
class CIn, 
class BinaryFunctor>
 
  216                             BinaryFunctor binary_functor);
 
  226   template <
typename T,
 
  237                                     BinaryFunctor binary_functor);
 
  251   template <
typename T, 
class CIn, 
class COut>
 
  268   template <
typename T, 
class CIn, 
class COut, 
class BinaryFunctor>
 
  271                                    BinaryFunctor binary_functor);
 
  281   template <
typename T,
 
  286             typename BinaryFunctor>
 
  290                                            BinaryFunctor binary_functor);
 
  299   template <
typename T, 
typename U, 
typename KIn, 
typename VIn, 
typename VOut>
 
  316   template <
typename T, 
class CIn, 
class COut>
 
  332   template <
typename T, 
class CIn, 
class COut, 
class BinaryFunctor>
 
  335                                    BinaryFunctor binaryFunctor,
 
  336                                    const T& initialValue)
 
  339     template <
typename T,
 
  355                                              const U& initialValue,
 
  356                                              BinaryFunctor binaryFunctor);
 
  365   template <
typename T, 
typename U, 
class KIn, 
typename VIn, 
typename VOut>
 
  394   template <
typename T, 
class CIn, 
class COut>
 
  419   template <
typename T, 
class CIn, 
class COut, 
class BinaryFunctor>
 
  422                                      BinaryFunctor binaryFunctor,
 
  423                                      const T& initialValue);
 
  442   template <
class Functor>
 
  467   template <
class Functor, 
class IndiceType>
 
  475   template <
typename T, 
class Storage>
 
  485   template <
typename T, 
class Storage, 
class BinaryCompare>
 
  487                              BinaryCompare binary_compare);
 
  494   template <
typename T, 
typename U, 
class StorageT, 
class StorageU>
 
  505   template <
typename T, 
typename U, 
class StorageT, 
class StorageU, 
class BinaryCompare>
 
  508                                   BinaryCompare binary_compare)
 
  524   template <
typename T,
 
  530             typename BinaryFunctor>
 
  534                                   BinaryFunctor binaryFunctor);
 
  543   template <
typename T, 
class Storage>
 
  556   template <
typename T, 
class Storage, 
class BinaryCompare>
 
  558                                BinaryCompare binary_compare);
 
  569   template <
typename T, 
class CIn, 
class CVal, 
class COut>
 
  584   template <
typename T, 
class CIn, 
class CVal, 
class COut, 
class BinaryCompare>
 
  588                                     BinaryCompare binary_compare);
 
  597   template <
class CIn, 
class COut>
 
  601 #else  // VTKM_DOXYGEN_ONLY 
  603 #endif //VTKM_DOXYGEN_ONLY 
  612 template <
class DeviceAdapterTag>
 
  667                  "Start() function should be called first then trying to call GetElapsedTime().");
 
  689     ::ftime(¤tTime);
 
  690     retval.
Seconds = currentTime.time;
 
  694     gettimeofday(¤tTime, 
nullptr);
 
  695     retval.
Seconds = currentTime.tv_sec;
 
  716 template <
class DeviceAdapterTag>
 
  725 #ifdef VTKM_DOXYGEN_ONLY 
  743 template <
typename DeviceTag>
 
  748 #endif //vtk_m_cont_DeviceAdapterAlgorithm_h 
  
TimeStamp StopTime
Definition: DeviceAdapterAlgorithm.h:704
 
Manages an array-worth of data.
Definition: ArrayHandle.h:283
 
VTKM_CONT void Start()
Definition: DeviceAdapterAlgorithm.h:636
 
static VTKM_CONT void Copy(const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::cont::ArrayHandle< U, COut > &output)
Copy the contents of one ArrayHandle to another.
 
VTKM_CONT DeviceAdapterTimerImplementation()
When a timer is constructed, all threads are synchronized and the current time is marked so that GetE...
Definition: DeviceAdapterAlgorithm.h:624
 
static VTKM_CONT void ScanExtended(const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::cont::ArrayHandle< T, COut > &output)
Compute an extended prefix sum operation on the input ArrayHandle.
 
Groups connected points that have the same field value.
Definition: Atomic.h:19
 
static VTKM_CONT T VIn
Definition: DeviceAdapterAlgorithm.h:349
 
static VTKM_CONT void Fill(vtkm::cont::BitField &bits, bool value, vtkm::Id numBits)
Fill the BitField with a specific pattern of bits.
 
static VTKM_CONT U Reduce(const vtkm::cont::ArrayHandle< T, CIn > &input, U initialValue)
Compute a accumulated sum operation on the input ArrayHandle.
 
vtkm::Int64 Seconds
Definition: DeviceAdapterAlgorithm.h:618
 
VTKM_CONT bool Started() const
Definition: DeviceAdapterAlgorithm.h:649
 
static VTKM_CONT void LowerBounds(const vtkm::cont::ArrayHandle< T, CIn > &input, const vtkm::cont::ArrayHandle< T, CVal > &values, vtkm::cont::ArrayHandle< vtkm::Id, COut > &output)
Output is the first index in input for each item in values that wouldn't alter the ordering of input.
 
static VTKM_CONT T KIn
Definition: DeviceAdapterAlgorithm.h:348
 
static VTKM_CONT void Sort(vtkm::cont::ArrayHandle< T, Storage > &values)
Unstable ascending sort of input array.
 
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
 
static VTKM_CONT vtkm::Id BitFieldToUnorderedSet(const vtkm::cont::BitField &bits, vtkm::cont::ArrayHandle< Id, IndicesStorage > &indices)
Create a unique, unsorted list of indices denoting which bits are set in a bitfield.
 
static VTKM_CONT T ScanExclusive(const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::cont::ArrayHandle< T, COut > &output)
Compute an exclusive prefix sum operation on the input ArrayHandle.
 
Class providing a device-specific runtime support detector.
Definition: DeviceAdapterRuntimeDetectorCuda.h:25
 
vtkm::Int64 Microseconds
Definition: DeviceAdapterAlgorithm.h:619
 
static VTKM_CONT void Transform(const vtkm::cont::ArrayHandle< T, StorageT > &input1, const vtkm::cont::ArrayHandle< U, StorageU > &input2, vtkm::cont::ArrayHandle< V, StorageV > &output, BinaryFunctor binaryFunctor)
Apply a given binary operation function element-wise to input arrays.
 
static VTKM_CONT T ScanInclusive(const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::cont::ArrayHandle< T, COut > &output)
Compute an inclusive prefix sum operation on the input ArrayHandle.
 
bool StartReady
Definition: DeviceAdapterAlgorithm.h:701
 
bool StopReady
Definition: DeviceAdapterAlgorithm.h:702
 
VTKM_CONT void Reset()
Resets the timer.
Definition: DeviceAdapterAlgorithm.h:630
 
Class providing a device-specific support for selecting the optimal Task type for a given worklet.
Definition: DeviceAdapterAlgorithm.h:744
 
#define VTKM_CONT
Definition: ExportMacros.h:57
 
Struct containing device adapter algorithms.
Definition: DeviceAdapterAlgorithm.h:41
 
VTKM_CONT bool Ready() const
Definition: DeviceAdapterAlgorithm.h:653
 
static VTKM_CONT T VOut
Definition: DeviceAdapterAlgorithm.h:350
 
static VTKM_CONT T U
Definition: DeviceAdapterAlgorithm.h:347
 
static VTKM_CONT void Unique(vtkm::cont::ArrayHandle< T, Storage > &values)
Reduce an array to only the unique values it contains.
 
VTKM_CONT TimeStamp GetCurrentTime() const
Definition: DeviceAdapterAlgorithm.h:682
 
@ Error
Important but non-fatal errors, such as device fail-over.
 
#define VTKM_LOG_S(level,...)
Writes a message using stream syntax to the indicated log level.
Definition: Logging.h:261
 
Class providing a device-specific timer.
Definition: DeviceAdapterAlgorithm.h:613
 
static VTKM_CONT vtkm::Id CountSetBits(const vtkm::cont::BitField &bits)
Returns the total number of "1" bits in BitField.
 
static VTKM_CONT bool CopySubRange(const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::Id inputStartIndex, vtkm::Id numberOfElementsToCopy, vtkm::cont::ArrayHandle< U, COut > &output, vtkm::Id outputIndex=0)
Copy the contents of a section of one ArrayHandle to another.
 
Definition: BitField.h:497
 
VTKM_CONT bool Stopped() const
Definition: DeviceAdapterAlgorithm.h:651
 
VTKM_CONT vtkm::Float64 GetElapsedTime() const
Returns the elapsed time in seconds between the construction of this class or the last call to Reset ...
Definition: DeviceAdapterAlgorithm.h:661
 
static VTKM_CONT void SortByKey(vtkm::cont::ArrayHandle< T, StorageT > &keys, vtkm::cont::ArrayHandle< U, StorageU > &values)
Unstable ascending sort of keys and values.
 
Definition: DeviceAdapterAlgorithm.h:616
 
static VTKM_CONT void CopyIf(const vtkm::cont::ArrayHandle< T, CIn > &input, const vtkm::cont::ArrayHandle< U, CStencil > &stencil, vtkm::cont::ArrayHandle< T, COut > &output)
Conditionally copy elements in the input array to the output array.
 
static VTKM_CONT void Schedule(Functor functor, vtkm::Id numInstances)
Schedule many instances of a function to run on concurrent threads.
 
double Float64
Definition: Types.h:155
 
static VTKM_CONT void UpperBounds(const vtkm::cont::ArrayHandle< T, CIn > &input, const vtkm::cont::ArrayHandle< T, CVal > &values, vtkm::cont::ArrayHandle< vtkm::Id, COut > &output)
Output is the last index in input for each item in values that wouldn't alter the ordering of input.
 
static VTKM_CONT void ReduceByKey(const vtkm::cont::ArrayHandle< T, CKeyIn > &keys, const vtkm::cont::ArrayHandle< U, CValIn > &values, vtkm::cont::ArrayHandle< T, CKeyOut > &keys_output, vtkm::cont::ArrayHandle< U, CValOut > &values_output, BinaryFunctor binary_functor)
Compute a accumulated sum operation on the input key value pairs.
 
static VTKM_CONT void ScanInclusiveByKey(const vtkm::cont::ArrayHandle< T, KIn > &keys, const vtkm::cont::ArrayHandle< U, VIn > &values, vtkm::cont::ArrayHandle< U, VOut > &values_output, BinaryFunctor binary_functor)
Compute a segmented inclusive prefix sum operation on the input key value pairs.
 
VTKM_CONT bool Exists() const
Returns true if the given device adapter is supported on the current machine.
 
TimeStamp StartTime
Definition: DeviceAdapterAlgorithm.h:703
 
VTKM_CONT void Stop()
Definition: DeviceAdapterAlgorithm.h:643
 
static VTKM_CONT T class BinaryFunctor VTKM_CONT static void ScanExclusiveByKey(const vtkm::cont::ArrayHandle< T, KIn > &keys, const vtkm::cont::ArrayHandle< U, VIn > &values, vtkm::cont::ArrayHandle< U, VOut > &output, const U &initialValue, BinaryFunctor binaryFunctor)