diff --git a/test/Function1D_Cuda_Test.cpp b/test/Function1D_Cuda_Test.cpp index 78239cd..57818b5 100644 --- a/test/Function1D_Cuda_Test.cpp +++ b/test/Function1D_Cuda_Test.cpp @@ -270,3 +270,27 @@ TEST_F(Function1D_Cuda_Test, repmat) EXPECT_EQ(result1[i], result2[i]); } } + +TEST_F(Function1D_Cuda_Test, log) +{ + Aurora::Matrix hostMatrix = Aurora::Matrix::fromRawData(new float[8]{1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8}, 2,4); + Aurora::CudaMatrix deviceMatrix = hostMatrix.toDeviceMatrix(); + + auto result1 = Aurora::log(hostMatrix); + auto result2 = Aurora::log(deviceMatrix).toHostMatrix(); + EXPECT_EQ(result2.getDataSize(), result1.getDataSize()); + EXPECT_EQ(result2.getValueType(), result1.getValueType()); + for(size_t i=0; i