Commit 8eb004f7 by xiaotong

correct bad code

parent 699f5116
...@@ -129,8 +129,12 @@ bool TestConcatenateSolely1() ...@@ -129,8 +129,12 @@ bool TestConcatenateSolely1()
return cpuTest && gpuTest; return cpuTest && gpuTest;
#else #else
/* destroy variables */ /* destroy variables */
delete s1, s2, t; delete s1;
delete[] sDimSize1, sDimSize2, tDimSize; delete s2;
delete t;
delete[] sDimSize1;
delete[] sDimSize2;
delete[] tDimSize;
return cpuTest; return cpuTest;
#endif // USE_CUDA #endif // USE_CUDA
......
...@@ -95,8 +95,10 @@ bool TestHardTanH1() ...@@ -95,8 +95,10 @@ bool TestHardTanH1()
return cpuTest && gpuTest; return cpuTest && gpuTest;
#else #else
/* destroy variables */ /* destroy variables */
delete x, y; delete x;
delete[] xDimSize, yDimSize; delete y;
delete[] xDimSize;
delete[] yDimSize;
return cpuTest; return cpuTest;
#endif // USE_CUDA #endif // USE_CUDA
......
...@@ -109,8 +109,12 @@ bool TestMultiplyElementWise1() ...@@ -109,8 +109,12 @@ bool TestMultiplyElementWise1()
return cpuTest && gpuTest; return cpuTest && gpuTest;
#else #else
/* destroy variables */ /* destroy variables */
delete s1, s2, t; delete s1;
delete[] sDimSize1, sDimSize2, tDimSize; delete s2;
delete t;
delete[] sDimSize1;
delete[] sDimSize2;
delete[] tDimSize;
return cpuTest; return cpuTest;
#endif // USE_CUDA #endif // USE_CUDA
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论