提交 c32ade74 编写于 作者: Y Yu Yang

Add todo

上级 8a1e32d8
......@@ -55,6 +55,10 @@ PD_API int PDIVecDestroy(PD_IVector ivec);
PD_API int PDIVectorGet(PD_IVector ivec, int** buffer);
PD_API int PDIVectorResize(PD_IVector ivec, uint64_t size);
PD_API int PDIVectorGetSize(PD_IVector ivec, uint64_t* size);
/**
* Matrix functions. Return will be a PD_Error type.
*/
......
......@@ -39,4 +39,14 @@ int PDIVectorGet(PD_IVector ivec, int** buffer) {
*buffer = v->vec->getData();
return kPD_NO_ERROR;
}
int PDIVectorResize(PD_IVector ivec, uint64_t size) {
// TODO(lizhao): Complete this method.
return 0;
}
int PDIVectorGetSize(PD_IVector ivec, uint64_t* size) {
// TODO(lizhao): Complete this method.
return 0;
}
}
......@@ -18,5 +18,9 @@ limitations under the License. */
TEST(CAPIVector, create) {
PD_IVector vec;
ASSERT_EQ(kPD_NO_ERROR, PDIVecCreateNone(&vec));
ASSERT_EQ(kPD_NO_ERROR, PDIVectorResize(vec, 1000));
uint64_t size;
ASSERT_EQ(kPD_NO_ERROR, PDIVectorGetSize(vec, &size));
ASSERT_EQ(1000, size);
ASSERT_EQ(kPD_NO_ERROR, PDIVecDestroy(vec));
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册