Commit 13db2e92 by liyinqiao

Optimize the unit test.

Use the _CheckData without tolerance in some unit test to speedup the test process.
parent 93c0807d
......@@ -305,9 +305,9 @@ bool TestSumDim3()
cUser = SumDim(*a, *b, 1);
/* check results */
cpuTest = _CheckData(c, answer->data, aUnitNum, 1e-4F) &&
_CheckData(cMe, answer->data, aUnitNum, 1e-4F) &&
_CheckData(&cUser, answer->data, aUnitNum, 1e-4F);
cpuTest = _CheckData(c, answer->data, aUnitNum) &&
_CheckData(cMe, answer->data, aUnitNum) &&
_CheckData(&cUser, answer->data, aUnitNum);
#ifdef USE_CUDA
/* GPU test */
......@@ -331,9 +331,9 @@ bool TestSumDim3()
cUserGPU = SumDim(*aGPU, *bGPU, 1);
/* check results */
gpuTest = _CheckData(cGPU, answer->data, aUnitNum, 1e-4F) &&
_CheckData(cMeGPU, answer->data, aUnitNum, 1e-4F) &&
_CheckData(&cUserGPU, answer->data, aUnitNum, 1e-4F);
gpuTest = _CheckData(cGPU, answer->data, aUnitNum) &&
_CheckData(cMeGPU, answer->data, aUnitNum) &&
_CheckData(&cUserGPU, answer->data, aUnitNum);
/* destroy variables */
delete a;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论