SWDEV-527851 SWDEV-527890 SWDEV-529456 - Update vector types test (#172)

* Update vector types test

* update MakeVector to be host+device function

* Add regression testing

* Add tests for subscript operator

Change-Id: Ifac85aaa6cd6d6bd96c4239414e38f284e2a2d54

* Fix unused vars

Change-Id: I6bc2da76dbf962db5d75ea5a84bf16b66f8ba6ba

---------

Co-authored-by: Aidan Belton <abeltons@amd.com>

[ROCm/hip-tests commit: ef6c95f6ce]
This commit is contained in:
Belton-Schure, Aidan
2025-05-29 17:08:20 +01:00
committed by GitHub
szülő 98c34321f1
commit c8a720088f
7 fájl változott, egészen pontosan 197 új sor hozzáadva és 95 régi sor törölve
@@ -388,6 +388,30 @@ TEMPLATE_TEST_CASE("Unit_Device_Complex_Cast_Host_Sanity_Positive", "", hipFloat
REQUIRE(result.y == static_cast<decltype(CastType_t<TestType>().x)>(input_i));
}
/**
* Test Description
* ------------------------
* - Test that checks hipComplexDoubleToFloat/hipComplexFloatToDouble single value
* constructor only initializes the real component.
*
* Test source
* ------------------------
* - unit/complex/complex.cc
* Test requirements
* ------------------------
* - HIP_VERSION >= 5.2
*/
TEMPLATE_TEST_CASE("Unit_Device_Complex_Constructor_Host", "", hipFloatComplex,
hipDoubleComplex) {
decltype(TestType().x) input_r = GENERATE(-0.25, 0.25);
TestType input{input_r};
CastType_t<TestType> result = CastComplexType<CastType_t<TestType>>(input);
REQUIRE(result.x == static_cast<decltype(CastType_t<TestType>().x)>(input_r));
REQUIRE(result.y != static_cast<decltype(CastType_t<TestType>().x)>(input_r));
}
/**
* End doxygen group ComplexTest.
* @}