Go to the documentation of this file.
11 #ifndef vtk_m_worklet_ComputeNDHistogram_h
12 #define vtk_m_worklet_ComputeNDHistogram_h
32 #pragma GCC diagnostic push
33 #pragma GCC diagnostic ignored "-Wconversion"
39 const T fieldRange = fieldMaxValue - fieldMinValue;
40 return fieldRange /
static_cast<typename VecType::ComponentType
>(num);
43 #pragma GCC diagnostic pop
47 template <
typename FieldType>
111 template <
typename T,
typename Storage>
126 setHistogramBinDispatcher(binWorklet);
159 vtkm::Id& oneVariableIndexOut)
const
162 bin1DIndexOut = (bin1DIndexIn - oneVariableIndexOut) /
numberOfBins;
169 #endif // vtk_m_worklet_ComputeNDHistogram_h
void(FieldIn value, FieldIn binIndexIn, FieldOut binIndexOut) ControlSignature
Definition: ComputeNDHistogram.h:51
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm::Range & MinMax
Definition: ComputeNDHistogram.h:133
Groups connected points that have the same field value.
Definition: Atomic.h:19
Binary Predicate that takes two arguments argument x, and y and returns a vtkm::Vec<T,...
Definition: BinaryOperators.h:112
A control signature tag for output fields.
Definition: WorkletMapField.h:60
vtkm::Float64 & BinDelta
Definition: ComputeNDHistogram.h:134
vtkm::cont::ArrayHandle< vtkm::Id > & Bin1DIdx
Definition: ComputeNDHistogram.h:131
VTKM_CONT T ArrayGetValue(vtkm::Id id, const vtkm::cont::ArrayHandle< T, S > &data)
Obtain a small set of values from an ArrayHandle with minimal device transfers.
Definition: ArrayGetValues.h:264
VTKM_CONT SetHistogramBin(vtkm::Id numberOfBins0, vtkm::Float64 minValue0, vtkm::Float64 delta0)
Definition: ComputeNDHistogram.h:60
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
VTKM_EXEC void operator()(const FieldType &value, const vtkm::Id &binIndexIn, vtkm::Id &binIndexOut) const
Definition: ComputeNDHistogram.h:68
VTKM_CONT ComputeBins(vtkm::cont::ArrayHandle< vtkm::Id > &_bin1DIdx, vtkm::Id &_numOfBins, vtkm::Range &_minMax, vtkm::Float64 &_binDelta, bool _rangeProvided)
Definition: ComputeNDHistogram.h:98
Definition: ComputeNDHistogram.h:139
VTKM_CONT ConvertHistBinToND(vtkm::Id numberOfBins0)
Definition: ComputeNDHistogram.h:151
T compute_delta(T fieldMinValue, T fieldMaxValue, vtkm::Id num)
Definition: ComputeNDHistogram.h:36
Dispatcher for worklets that inherit from WorkletMapField.
Definition: DispatcherMapField.h:25
vtkm::Float64 minValue
Definition: ComputeNDHistogram.h:56
vtkm::Id & NumOfBins
Definition: ComputeNDHistogram.h:132
A control signature tag for input fields.
Definition: WorkletMapField.h:49
vtkm::Float64 delta
Definition: ComputeNDHistogram.h:57
Definition: ComputeNDHistogram.h:48
#define VTKM_CONT
Definition: ExportMacros.h:57
_1 InputDomain
Definition: ComputeNDHistogram.h:53
void(_1, _2, _3) ExecutionSignature
Definition: ComputeNDHistogram.h:52
_1 InputDomain
Definition: ComputeNDHistogram.h:146
VTKM_EXEC void operator()(const vtkm::Id &bin1DIndexIn, vtkm::Id &bin1DIndexOut, vtkm::Id &oneVariableIndexOut) const
Definition: ComputeNDHistogram.h:157
vtkm::Float64 Min
Definition: Range.h:33
static VTKM_CONT U Reduce(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, U initialValue)
Definition: Algorithm.h:656
double Float64
Definition: Types.h:155
vtkm::Id numberOfBins
Definition: ComputeNDHistogram.h:55
vtkm::Float64 Max
Definition: Range.h:34
VTKM_CONT ComputeBins(vtkm::cont::ArrayHandle< vtkm::Id > &_bin1DIdx, vtkm::Id &_numOfBins, vtkm::Range &_minMax, vtkm::Float64 &_binDelta)
Definition: ComputeNDHistogram.h:85
bool RangeProvided
Definition: ComputeNDHistogram.h:135
void(_1, _2, _3) ExecutionSignature
Definition: ComputeNDHistogram.h:145
Definition: ComputeNDHistogram.h:81
void(FieldIn bin1DIndexIn, FieldOut bin1DIndexOut, FieldOut oneVariableIndexOut) ControlSignature
Definition: ComputeNDHistogram.h:144
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38
VTKM_CONT void operator()(const vtkm::cont::ArrayHandle< T, Storage > &field) const
Definition: ComputeNDHistogram.h:112
vtkm::Id numberOfBins
Definition: ComputeNDHistogram.h:148
Represent a continuous scalar range of values.
Definition: Range.h:31