From a89637fc44241697ed6ca3e84db703f2a6c1394d Mon Sep 17 00:00:00 2001 From: kradchen Date: Wed, 20 Dec 2023 15:23:20 +0800 Subject: [PATCH] Add hilbert unittest --- test/Function2D_Cuda_Test.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/Function2D_Cuda_Test.cpp b/test/Function2D_Cuda_Test.cpp index b340214..7af762c 100644 --- a/test/Function2D_Cuda_Test.cpp +++ b/test/Function2D_Cuda_Test.cpp @@ -984,3 +984,16 @@ TEST_F(Function2D_Cuda_Test, std){ EXPECT_FLOAT_EQ(1.7321, fourDecimalRound(D.getValue(2))); } + +TEST_F(Function2D_Cuda_Test, hilbert) { + float* dataB = Aurora::random(2500); + B = Aurora::Matrix::fromRawData(dataB, 500, 5); + auto dD = B.toDeviceMatrix(); + auto ret1 = Aurora::hilbert(B); + auto ret2 = Aurora::hilbert(dD); + + for(unsigned int i=0; i