提交 650dac73 编写于 作者: L liuruilong

Merge remote-tracking branch 'upstream/opencl' into opencl

......@@ -76,7 +76,7 @@ if (GPU_CL)
# opencl version
add_definitions(-DCL_TARGET_OPENCL_VERSION=220)
link_libraries(/Users/liuruilong/GitHub/paddle-mobile/third_party/opencl/libOpenCL.so)
link_libraries(${CMAKE_CURRENT_LIST_DIR}/third_party/opencl/libOpenCL.so)
include_directories(third_party/opencl/OpenCL-Headers)
else()
file(GLOB_RECURSE _tmp_list src/framework/cl/*.cpp src/operators/kernel/cl/*.cpp)
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册