MCPcopy Create free account
hub / github.com/Kitware/VTK / TestStridedArray

Function TestStridedArray

Common/Core/Testing/Cxx/TestStridedArray.cxx:288–323  ·  view source on GitHub ↗

* Test vtkStridedArray using 2-components array at offset 1 * base on an externally allocated buffer. */

Source from the content-addressed store, hash-verified

286 * base on an externally allocated buffer.
287 */
288int TestStridedArray(int, char*[])
289{
290 if (!::TestGenericDataArrayAPI())
291 {
292 std::cerr << "Error with vtkGenericDataArray API test\n";
293 return EXIT_FAILURE;
294 }
295
296 if (!::TestMemoryAllocations())
297 {
298 std::cerr << "Error with memory allocations checks.\n";
299 return EXIT_FAILURE;
300 }
301
302 if (!::TestCopies())
303 {
304 std::cerr << "Error with copy\n";
305 return EXIT_FAILURE;
306 }
307#ifdef VTK_DISPATCH_STRIDED_ARRAYS
308 using Dispatcher = vtkArrayDispatch::DispatchByArray<vtkArrayDispatch::AllArrays>;
309 DispatcherCheckerWorker worker;
310 vtkNew<vtkStridedArray<float>> stridedArrayFloat;
311 if (!Dispatcher::Execute(stridedArrayFloat, worker))
312 {
313 return EXIT_FAILURE;
314 }
315 vtkNew<vtkStridedArray<double>> stridedArrayDouble;
316 if (!Dispatcher::Execute(stridedArrayDouble, worker))
317 {
318 return EXIT_FAILURE;
319 }
320#endif // VTK_DISPATCH_IMPLICIT_POINT_ARRAYS
321
322 return EXIT_SUCCESS;
323}

Callers

nothing calls this directly

Calls 4

TestMemoryAllocationsFunction · 0.85
TestCopiesFunction · 0.85
TestGenericDataArrayAPIFunction · 0.70
ExecuteFunction · 0.50

Tested by

no test coverage detected