mirror of https://github.com/milvus-io/milvus.git
optimize test_c_api.cpp (#6637)
* optimize test_c_api.cpp Signed-off-by: yudong.cai <yudong.cai@zilliz.com> * clean redundant file Signed-off-by: yudong.cai <yudong.cai@zilliz.com> * change DIM to const Signed-off-by: yudong.cai <yudong.cai@zilliz.com> * optimize test_c_api.cpp Signed-off-by: yudong.cai <yudong.cai@zilliz.com> * update reduce testcase Signed-off-by: yudong.cai <yudong.cai@zilliz.com>pull/6682/head
parent
fd7846700e
commit
744f2c7f51
|
@ -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());
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,14 +0,0 @@
|
|||
// 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.
|
||||
//
|
Loading…
Reference in New Issue