提交 e5756160 编写于 作者: D dolphin8

fix cl_image

上级 b6dfa51b
......@@ -38,7 +38,7 @@ class CLImage {
size_t W = tensorDims_[3];
size_t width = W * ((C + 3) / 4);
size_t height = H * N;
std::unique_ptr<half_t[]> imageData();
std::unique_ptr<half_t[]> imageData{};
if (tensorInput != nullptr) {
imageData.reset(new half_t[width * height * 4]);
float *p = tensorInput;
......@@ -76,7 +76,7 @@ class CLImage {
}
void Init(cl_context context, DDim ddim) {
Init(cl_context context, nullptr, DDim ddim);
Init(context, nullptr, ddim);
}
inline CLImage &Resize(const DDim &dims) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册