未验证 提交 744f2c7f 编写于 作者: C Cai Yudong 提交者: GitHub

optimize test_c_api.cpp (#6637)

* optimize test_c_api.cpp
Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>

* clean redundant file
Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>

* change DIM to const
Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>

* optimize test_c_api.cpp
Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>

* update reduce testcase
Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>
上级 fd784670
......@@ -16,26 +16,18 @@
CCollection
NewCollection(const char* schema_proto_blob) {
auto proto = std::string(schema_proto_blob);
auto collection = std::make_unique<milvus::segcore::Collection>(proto);
// std::cout << "create collection " << collection->get_collection_name() << std::endl;
return (void*)collection.release();
}
void
DeleteCollection(CCollection collection) {
auto col = (milvus::segcore::Collection*)collection;
// std::cout << "delete collection " << col->get_collection_name() << std::endl;
delete col;
}
const char*
GetCollectionName(CCollection collection) {
auto col = (milvus::segcore::Collection*)collection;
return strdup(col->get_collection_name().data());
}
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
// or implied. See the License for the specific language governing permissions and limitations under the License
//
// Created by mike on 1/21/21.
//
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册