Merge topic 'algorithm-fill-fixes'
64dede748 Fix Compilation bug with Fill method Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Allison Vacanti <allison.vacanti@kitware.com> Merge-request: !1889
This commit is contained in:
commit
23f55ad0ef
@ -594,7 +594,7 @@ struct Algorithm
|
||||
template <typename WordType>
|
||||
VTKM_CONT static void Fill(vtkm::cont::BitField& bits, WordType word)
|
||||
{
|
||||
FillBitField(vtkm::cont::DeviceAdapterTagAny{}, bits, word);
|
||||
Fill(vtkm::cont::DeviceAdapterTagAny{}, bits, word);
|
||||
}
|
||||
|
||||
template <typename T, typename S>
|
||||
|
@ -134,7 +134,7 @@ struct DeviceAdapterAlgorithm
|
||||
template <typename WordType>
|
||||
VTKM_CONT static void Fill(vtkm::cont::BitField& bits, WordType word, vtkm::Id numBits);
|
||||
template <typename WordType>
|
||||
VTKM_CONT static void Fill(vtkm::cont::BitField& bits, WordType word, bool value);
|
||||
VTKM_CONT static void Fill(vtkm::cont::BitField& bits, WordType word);
|
||||
/// @}
|
||||
|
||||
/// Fill @a array with @a value. If @a numValues is specified, the array will
|
||||
@ -253,16 +253,6 @@ struct DeviceAdapterAlgorithm
|
||||
VTKM_CONT static T ScanInclusive(const vtkm::cont::ArrayHandle<T, CIn>& input,
|
||||
vtkm::cont::ArrayHandle<T, COut>& output);
|
||||
|
||||
/// \brief Streaming version of scan exclusive
|
||||
///
|
||||
/// Computes a scan one block at a time.
|
||||
///
|
||||
/// \return The total sum.
|
||||
///
|
||||
template <typename T, class CIn, class COut>
|
||||
VTKM_CONT static T StreamingScanExclusive(const vtkm::Id numBlocks,
|
||||
const vtkm::cont::ArrayHandle<T, CIn>& input,
|
||||
vtkm::cont::ArrayHandle<T, COut>& output);
|
||||
|
||||
/// \brief Compute an inclusive prefix sum operation on the input ArrayHandle.
|
||||
///
|
||||
@ -378,6 +368,17 @@ struct DeviceAdapterAlgorithm
|
||||
const vtkm::cont::ArrayHandle<U, VIn>& values,
|
||||
vtkm::cont::ArrayHandle<U, VOut>& output);
|
||||
|
||||
/// \brief Streaming version of scan exclusive
|
||||
///
|
||||
/// Computes a scan one block at a time.
|
||||
///
|
||||
/// \return The total sum.
|
||||
///
|
||||
template <typename T, class CIn, class COut>
|
||||
VTKM_CONT static T StreamingScanExclusive(const vtkm::Id numBlocks,
|
||||
const vtkm::cont::ArrayHandle<T, CIn>& input,
|
||||
vtkm::cont::ArrayHandle<T, COut>& output);
|
||||
|
||||
/// \brief Compute an extended prefix sum operation on the input ArrayHandle.
|
||||
///
|
||||
/// Computes an extended prefix sum operation on the \c input ArrayHandle,
|
||||
|
@ -23,6 +23,22 @@ namespace
|
||||
//
|
||||
static constexpr vtkm::Id ARRAY_SIZE = 10;
|
||||
|
||||
void FillTest()
|
||||
{
|
||||
vtkm::cont::BitField bits;
|
||||
vtkm::cont::ArrayHandle<vtkm::Id> array;
|
||||
|
||||
bits.Allocate(ARRAY_SIZE);
|
||||
array.Allocate(ARRAY_SIZE);
|
||||
|
||||
vtkm::cont::Algorithm::Fill(bits, true);
|
||||
vtkm::cont::Algorithm::Fill(bits, true, 5);
|
||||
vtkm::cont::Algorithm::Fill(bits, vtkm::UInt8(0xab));
|
||||
vtkm::cont::Algorithm::Fill(bits, vtkm::UInt8(0xab), 5);
|
||||
vtkm::cont::Algorithm::Fill(array, vtkm::Id(5));
|
||||
vtkm::cont::Algorithm::Fill(array, vtkm::Id(5), 5);
|
||||
}
|
||||
|
||||
void CopyTest()
|
||||
{
|
||||
vtkm::cont::ArrayHandle<vtkm::Id> input;
|
||||
@ -171,6 +187,7 @@ void UniqueTest()
|
||||
|
||||
void TestAll()
|
||||
{
|
||||
FillTest();
|
||||
CopyTest();
|
||||
BoundsTest();
|
||||
ReduceTest();
|
||||
|
Loading…
Reference in New Issue
Block a user