Add hilbert unittest
This commit is contained in:
@@ -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<ret1.getDataSize(); ++i)
|
||||
{
|
||||
EXPECT_NEAR(ret1[i], ret2.getValue(i), 0.01);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user