提交 86bddd07 编写于 作者: D DannyIsFunny

test=develop

上级 2425f9a1
......@@ -142,8 +142,8 @@ class Buffer {
if (target != target_ || cl_image2d_width_ < img_w_req ||
cl_image2d_height_ < img_h_req || host_ptr != nullptr) {
CHECK_EQ(own_data_, true) << "Can not reset unowned buffer.";
cl_image2d_width_ = std::max(cl_image2d_width_, img_w_req);
cl_image2d_height_ = std::max(cl_image2d_height_, img_h_req);
cl_image2d_width_ = (std::max)(cl_image2d_width_, img_w_req);
cl_image2d_height_ = (std::max)(cl_image2d_height_, img_h_req);
Free();
data_ = TargetWrapperCL::MallocImage<T>(
cl_image2d_width_, cl_image2d_height_, host_ptr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册