提交 413cbb84 编写于 作者: L Liang Zhao

fix a variable definition bug

上级 043859b5
...@@ -96,14 +96,14 @@ public: ...@@ -96,14 +96,14 @@ public:
int* ids = nullptr; int* ids = nullptr;
int* lbl = nullptr; int* lbl = nullptr;
IVectorPtr dest = IVector::create(maxIds_->getSize(), false);
IVectorPtr dest2 = IVector::create(label->getSize(), false);
if (useGpu(arguments[0].deviceId)) { if (useGpu(arguments[0].deviceId)) {
IVectorPtr dest = IVector::create(maxIds_->getSize(), false);
hl_memcpy_device2host((void*)dest->getData(), hl_memcpy_device2host((void*)dest->getData(),
(void*)maxIds_->getData(), (void*)maxIds_->getData(),
sizeof(int) * maxIds_->getSize()); sizeof(int) * maxIds_->getSize());
ids = dest->getData(); ids = dest->getData();
IVectorPtr dest2 = IVector::create(label->getSize(), false);
hl_memcpy_device2host((void*)dest2->getData(), hl_memcpy_device2host((void*)dest2->getData(),
(void*)label->getData(), (void*)label->getData(),
sizeof(int) * label->getSize()); sizeof(int) * label->getSize());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册