提交 11479901 编写于 作者: H hedaoyuan

some bug fix

上级 956b661c
...@@ -93,6 +93,11 @@ float construct(int height, int width) { ...@@ -93,6 +93,11 @@ float construct(int height, int width) {
return 0.5; return 0.5;
} }
template <>
double construct(int height, int width) {
return 0.5;
}
template <> template <>
size_t construct(int height, int width) { size_t construct(int height, int width) {
size_t offset = std::rand() % (height < width ? height : width); size_t offset = std::rand() % (height < width ? height : width);
......
...@@ -290,8 +290,8 @@ void testMatrixDeepSwap(int height, int width) { ...@@ -290,8 +290,8 @@ void testMatrixDeepSwap(int height, int width) {
// swap matrix cpuA and cpuB // swap matrix cpuA and cpuB
cpuA->deepSwap(*cpuB); cpuA->deepSwap(*cpuB);
MatrixCheckEqual(*cpuA, *cpuCopyB); TensorCheckEqual(*cpuA, *cpuCopyB);
MatrixCheckEqual(*cpuB, *cpuCopyA); TensorCheckEqual(*cpuB, *cpuCopyA);
} }
void testMatrixTranspose(int height, int width) { void testMatrixTranspose(int height, int width) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册