vtk-m/vtkm/cont/testing
Kenneth Moreland 723c9ed2f0 Support Fill for ArrayHandleStride
Previously, if you called `Fill` on an `ArrayHandleStride`, you would get
an exception that said the feature was not supported. It turns out that
filling values is very useful in situations where, for example, you need to
initialize an array when processing an unknown type (and thus dealing with
extracted components).

This implementation of `Fill` first attempts to call `Fill` on the
contained array. This only works if the stride is set to 1. If this does
not work, then the code leverages the precompiled `ArrayCopy`. It does this
by first creating a new `ArrayHandleStride` containing the fill value and a
modulo of 1 so that value is constantly repeated. It then reconstructs an
`ArrayHandleStride` for itself with a modified size and offset to match the
start and end indices.

Referencing the `ArrayCopy` was tricky because it kept creating circular
dependencies among `ArrayHandleStride`, `ArrayExtractComponent`, and
`UnknownArrayHandle`. These dependencies were broken by having
`ArrayHandleStride` directly use the internal `ArrayCopyUnknown` function
and to use a forward declaration of `UnknownArrayHandle` rather than
including its header.
2024-02-02 13:50:21 -05:00
..
CMakeLists.txt Merge topic 'runtime-vec-array' 2023-02-17 13:35:47 -05:00
ExplicitTestData.h
MakeTestDataSet.h clang-tidy: fix readability-avoid-const-params-in-decls lints 2023-12-01 07:01:11 -05:00
Testing.h Add module mechanism 2022-10-26 12:51:05 -06:00
TestingDeviceAdapter.h Remove deprecated virtual methods 2022-10-28 10:56:52 -06:00
TestingRuntimeDeviceConfiguration.h Remove NUMA regions option 2023-01-30 09:53:57 -07:00
TestingSerialization.h diy,mpi: Enable GPU AWARE MPI buffers 2023-05-30 12:13:03 -04:00
UnitTestAbort.cxx Fix unreferenced local variable warning 2023-02-13 13:29:26 -05:00
UnitTestAlgorithm.cxx Check results of Algorithm tests 2022-07-07 15:21:25 -06:00
UnitTestArrayCopy.cxx Support Fill for ArrayHandleStride 2024-02-02 13:50:21 -05:00
UnitTestArrayExtractComponent.cxx Support Fill for ArrayHandleStride 2024-02-02 13:50:21 -05:00
UnitTestArrayGetValues.cxx Allow ArrayExtractComponent to work with Vec-like value types 2022-01-25 10:55:41 -07:00
UnitTestArrayHandle.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleCartesianProduct.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleCast.cxx Remove TestingFancyArrayHandles.h 2022-07-13 11:52:11 -06:00
UnitTestArrayHandleCompositeVector.cxx Add Fill method for non-standard Storage 2022-01-04 10:35:53 -07:00
UnitTestArrayHandleConcatenate.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleConstant.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleCounting.cxx ArrayHandle::StorageType should be public 2023-04-14 11:26:37 -04:00
UnitTestArrayHandleDecorator.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleDiscard.cxx Add Fill method for non-standard Storage 2022-01-04 10:35:53 -07:00
UnitTestArrayHandleExtractComponent.cxx Add DEVICE_SOURCES to vtkm_unit_tests 2022-07-08 06:28:51 -06:00
UnitTestArrayHandleGroupVec.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleGroupVecVariable.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleImplicit.cxx Remove TestingFancyArrayHandles.h 2022-07-13 11:52:11 -06:00
UnitTestArrayHandleIndex.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleMultiplexer.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleOffsetsToNumComponents.cxx Consolidate count-to-offset algorithms 2021-09-16 14:24:41 -06:00
UnitTestArrayHandlePermutation.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleRandomStandardNormal.cxx Reduce data size to operate on in unit tests. 2021-04-12 18:51:52 -04:00
UnitTestArrayHandleRandomUniformBits.cxx
UnitTestArrayHandleRandomUniformReal.cxx Reduce data size to operate on in unit tests. 2021-04-12 18:51:52 -04:00
UnitTestArrayHandleRecombineVec.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleReverse.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleRuntimeVec.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleSOA.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleSwizzle.cxx
UnitTestArrayHandleThreadSafety.cxx
UnitTestArrayHandleTransform.cxx Remove TestingFancyArrayHandles.h 2022-07-13 11:52:11 -06:00
UnitTestArrayHandleUniformPointCoordinates.cxx
UnitTestArrayHandleView.cxx Add GetNumberOfComponentsFlat method to ArrayHandle 2023-10-03 10:31:38 -04:00
UnitTestArrayHandleXGCCoordinates.cxx Add DEVICE_SOURCES to vtkm_unit_tests 2022-07-08 06:28:51 -06:00
UnitTestArrayHandleZip.cxx Remove TestingFancyArrayHandles.h 2022-07-13 11:52:11 -06:00
UnitTestArrayPortalFromIterators.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestArrayPortalToIterators.cxx
UnitTestArrayRangeCompute.cxx Advanced Compute Range 2023-07-04 11:54:56 -04:00
UnitTestBitField.cxx Changes for compiling with SYCL 2023-02-15 14:38:59 -07:00
UnitTestBuffer.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestCellLocatorChooser.cxx Add DEVICE_SOURCES to vtkm_unit_tests 2022-07-08 06:28:51 -06:00
UnitTestCellLocatorGeneral.cxx Add function to reduce code in tests. 2022-08-10 11:57:18 -04:00
UnitTestCellLocatorPartitioned.cxx Make source parameters more clear 2022-12-01 08:13:58 -07:00
UnitTestCellLocatorRectilinearGrid.cxx Removed ExecutionWholeArray class 2022-10-27 15:07:41 -06:00
UnitTestCellLocatorUniformGrid.cxx Consolidate UnitTestCellLocator* 2022-07-13 12:03:25 -06:00
UnitTestCellLocatorUnstructured.cxx Add a new unstructured cell locator 2022-11-22 09:51:40 -05:00
UnitTestCellSet.cxx Remove deprecated features from VTK-m 2022-11-17 07:12:31 -06:00
UnitTestCellSetExplicit.cxx CI: remove unused variable warnings 2022-10-25 15:40:48 -04:00
UnitTestCellSetExtrude.cxx Fix warnings about unreachable statements 2022-07-08 06:35:13 -06:00
UnitTestCellSetPermutation.cxx Deprecate old methods from DynamicCellSet 2022-01-05 08:18:17 -07:00
UnitTestColorTable.cxx LookupTable: Shift computed idx by 1 2023-08-18 08:29:50 -04:00
UnitTestComputeRange.cxx Consolidate UnitTestComputeRange 2022-07-13 12:07:10 -06:00
UnitTestControlSignatureTag.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestContTesting.cxx
UnitTestDataSetBuilderCurvilinear.cxx Coordinate systems are stored as Fields 2022-11-11 06:17:58 -07:00
UnitTestDataSetBuilderExplicit.cxx Coordinate systems are stored as Fields 2022-11-11 06:17:58 -07:00
UnitTestDataSetBuilderRectilinear.cxx Coordinate systems are stored as Fields 2022-11-11 06:17:58 -07:00
UnitTestDataSetBuilderUniform.cxx Coordinate systems are stored as Fields 2022-11-11 06:17:58 -07:00
UnitTestDataSetConvertToExpected.cxx Check to make sure that the fields in a DataSet are the proper length 2022-11-01 12:05:59 -06:00
UnitTestDataSetExplicit.cxx Coordinate systems are stored as Fields 2022-11-11 06:17:58 -07:00
UnitTestDataSetPermutation.cxx Change CellAverage to work on fields of any type 2023-02-03 14:51:40 -05:00
UnitTestDataSetRectilinear.cxx Rename structured connectivity index conversion methods 2023-06-02 15:31:24 -04:00
UnitTestDataSetSingleType.cxx Consolidate UnitTestDataSet* 2022-07-13 12:09:24 -06:00
UnitTestDataSetUniform.cxx Rename structured connectivity index conversion methods 2023-06-02 15:31:24 -04:00
UnitTestDeviceAdapterAlgorithmDependency.cxx CI: remove unused variable warnings 2022-10-25 15:40:48 -04:00
UnitTestDeviceAdapterAlgorithmGeneral.cxx Remove deprecated virtual methods 2022-10-28 10:56:52 -06:00
UnitTestDeviceSelectOnThreads.cxx Add DEVICE_SOURCES to vtkm_unit_tests 2022-07-08 06:28:51 -06:00
UnitTestError.cxx Update UnitTestError.cxx 2021-04-16 17:46:43 +00:00
UnitTestFieldRangeCompute.cxx
UnitTestFieldRangeGlobalCompute.cxx
UnitTestImplicitFunction.cxx add multi plane for clip 2023-08-23 02:32:17 +00:00
UnitTestInitialize.cxx Remove NUMA regions option 2023-01-30 09:53:57 -07:00
UnitTestIteratorFromArrayPortal.cxx Fix operator for IteratorFromArrayPortal 2023-05-16 09:31:17 -06:00
UnitTestLateDeallocate.cxx Add test for array and datas that are cleaned up after finalize 2022-07-01 12:36:55 -06:00
UnitTestLogging.cxx Remove deprecated features from VTK-m 2022-11-17 07:12:31 -06:00
UnitTestMergePartitionedDataSet.cxx add merge data sets filter 2023-11-21 15:31:59 -05:00
UnitTestMoveConstructors.cxx Be more conservative about is_trivial support 2021-03-01 15:12:27 -07:00
UnitTestParticleArrayCopy.cxx Hide Particle class members 2022-12-13 13:19:21 -05:00
UnitTestPartitionedDataSet.cxx Coordinate systems are stored as Fields 2022-11-11 06:17:58 -07:00
UnitTestPointLocatorSparseGrid.cxx Consolidate UnitTestPointLocatorSparseGrid 2022-07-13 13:27:38 -06:00
UnitTestRuntimeConfigurationOptions.cxx Remove NUMA regions option 2023-01-30 09:53:57 -07:00
UnitTestRuntimeDeviceInformation.cxx Add DEVICE_SOURCES to vtkm_unit_tests 2022-07-08 06:28:51 -06:00
UnitTestRuntimeDeviceNames.cxx Add DEVICE_SOURCES to vtkm_unit_tests 2022-07-08 06:28:51 -06:00
UnitTestScopedRuntimeDeviceTracker.cxx Add DEVICE_SOURCES to vtkm_unit_tests 2022-07-08 06:28:51 -06:00
UnitTestSerializationArrayHandle.cxx Automatically convert between ArrayHandleBasic and ArrayHandleRuntimeVec 2023-02-20 07:39:49 -07:00
UnitTestSerializationDataSet.cxx Simplify serialization of DataSet objects 2023-03-03 09:17:44 -07:00
UnitTestStorageList.cxx
UnitTestTimer.cxx Fix intermittent UnitTestTimer failures with CUDA 2022-07-12 08:52:12 -06:00
UnitTestToken.cxx Revert removal of print statements. 2021-04-12 18:51:53 -04:00
UnitTestTransportArrayIn.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestTransportArrayInOut.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestTransportArrayOut.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestTransportCellSetIn.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestTransportExecObject.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestTransportWholeArray.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestTryExecute.cxx Add DEVICE_SOURCES to vtkm_unit_tests 2022-07-08 06:28:51 -06:00
UnitTestTypeCheckArray.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestTypeCheckCellSet.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestTypeCheckExecObject.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestTypeCheckKeys.cxx Add module mechanism 2022-10-26 12:51:05 -06:00
UnitTestUnknownArrayHandle.cxx Enable new instances of unknown arrays with dynamic sizes 2023-11-07 16:59:25 -05:00
UnitTestUnknownCellSet.cxx Add UncertainCellSet 2021-12-15 12:59:18 -07:00