提交 f270c38d 编写于 作者: H HexToString

Optimize pybind efficiency again

上级 dbfdaac6
......@@ -221,7 +221,7 @@ int PredictorClient::numpy_predict(
}
int nbytes = float_feed[vec_idx].nbytes();
// int ndims = float_feed[vec_idx].ndim();
void *rawdata_ptr = reinterpret_cast<void *>(float_feed[vec_idx].data(0));
void *rawdata_ptr = (void *)float_feed[vec_idx].data(0);
int total_number = float_feed[vec_idx].size();
// float* end_ptr = (rawdata_ptr + total_number);
Tensor *tensor = tensor_vec[idx];
......@@ -251,7 +251,7 @@ int PredictorClient::numpy_predict(
}
Tensor *tensor = tensor_vec[idx];
int nbytes = int_feed[vec_idx].nbytes();
void *rawdata_ptr = reinterpret_cast<void *>(int_feed[vec_idx].data(0));
void *rawdata_ptr = (void *)int_feed[vec_idx].data(0);
int total_number = int_feed[vec_idx].size();
for (uint32_t j = 0; j < int_shape[vec_idx].size(); ++j) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册