提交 27b65d4b 编写于 作者: S Superjom

code clean

上级 56bd9287
......@@ -25,27 +25,6 @@ int ReserviorSample(int num_samples, int num_records) {
return -1;
}
// IM::IM(StorageBase::Type type, StorageBase::Mode mode) {
// switch (type) {
// case StorageBase::Type::kMemory: {
// storage_.reset(new MemoryStorage);
// } break;
// default:
// CHECK(false) << "Unsupported storage kind " << type;
// }
// switch (mode) {
// case StorageBase::Mode::kRead:
// dynamic_cast<MemoryStorage *>(storage_.get())->StartReadService(500);
// break;
// case StorageBase::Mode::kWrite:
// dynamic_cast<MemoryStorage *>(storage_.get())->StartWriteSerice(500);
// break;
// default:
// break;
// }
// }
void IM::SetPersistDest(const std::string &path) {
CHECK(storage_->mutable_data()->dir().empty())
<< "duplicate set storage's path";
......
......@@ -103,15 +103,3 @@ def scalar(im, tag, dtype='float'):
}
obj = dtype2obj[dtype](im)
return _Scalar(obj)
# def read_scalar(tag, dtype='float'):
# tablet = core.im().tablet(tag)
# dtype2obj = {
# 'float': tablet.as_float_scalar,
# 'double': tablet.as_double_scalar,
# 'int32': tablet.as_int32_scalar,
# 'int64': tablet.as_int64_scalar,
# }
# obj = dtype2obj[dtype]()
# return _Scalar(obj)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册