MCPcopy Create free account
hub / github.com/ROCm/rocPRIM / testHistogramRangeIncorrectInput

Function testHistogramRangeIncorrectInput

test/rocprim/test_device_histogram.cpp:391–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389TYPED_TEST_SUITE(RocprimDeviceHistogramRange, Params2);
390
391void testHistogramRangeIncorrectInput()
392{
393 int device_id = test_common_utils::obtain_device_from_ctest();
394 SCOPED_TRACE(testing::Message() << "with device_id = " << device_id);
395 HIP_CHECK(hipSetDevice(device_id));
396
397 hipStream_t stream = 0;
398
399 size_t temporary_storage_bytes = 0;
400 int * d_input = nullptr;
401 int * d_histogram = nullptr;
402 int * d_levels = nullptr;
403
404 // This check happens on host so there is nothing to capture for hipGraph.
405 hipError_t result = rocprim::histogram_range(
406 nullptr, temporary_storage_bytes,
407 d_input, 123,
408 d_histogram,
409 1, d_levels, stream
410 );
411
412 ASSERT_EQ(result, hipErrorInvalidValue);
413}
414
415TEST(RocprimDeviceHistogramRange, RangeIncorrectInput)
416{

Callers 1

TESTFunction · 0.85

Calls 2

obtain_device_from_ctestFunction · 0.85
histogram_rangeFunction · 0.85

Tested by

no test coverage detected