请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TMDXIDK57X-LCD 工具/软件:TI C/C++编译器
大家好、
root@am57xx-EVM:~ g++-O3 -std=c++11 matmul_ocl.cpp -lOpenCL -locl_util -o matmpy 、包含在/usr/include/ocl_util.h:37:0中、 从 matmul_OCL.CPP:5: /usr/include/CL/cl.hpp /usr/include/CL/cl.hpp /usr/include/CL/cl.hpp:945:1:错误:程序中的"`"_ param_name_info_1_0 (_声明_参数_ 参数_参数_参数_参数);^/usr/include/CL/cl.hpp:945:1:错误:程序中的"杂散'`^ ^:4021:0:错误:未终止参数列表 调用 CL_macros___enmaterie_param_params:_enmateries/params:14: /usr/include/ocl_util.h:inquality_param_params:16:1:inquality_param_param_enches/params:16_param_enchs_: 命名空间'cl'中的'event'不会将类型 命名为 void OCL_event_times (const cl::Event &EV、const char* name); ^ /usr/include/ocl_util.h:42:36:错误:命名空间'cl'中的'event'不会将类型 命名为 void OCL_relational_times (const cl::Event &EV、const char* name、cl_ulong 引用); ^ matmul_ocl.cpp:在函数'void cl:::detail:::mat_mpy_ocl (float*、float*、float*、int、int、int、 int、std:::size_t)': matmul_ocl.cpp:49:33:错误:变量'cl:上下文'具有初始化程序、但类型不完整 背景 上下文(CL_DEVICE_TYPE_Accelerator); ^ matmul_ocl.cpp:50:72:错误:")"令牌之前的预期主表达式 std::向量 设备= context.getinfo (); ^ matmul_OCL.CPP:51:29:错误:变量'cl:CommandQueue Q'具有初始化程序、但类型不完整 CommandQueue q (上下文、设备[0]); ^ matmul_ocl.cpp:54:6:错误:嵌套名称说明符中使用的不完整类型'cl:Program' 程序::源(1、std:::make_pair (kernelSrc.c_str()、 ^ matmul_ocl.cpp:56:26:错误:变量'cl:Program P'具有初始化程序、但类型不完整 程序 P =程序(上下文、来源); ^ matmul_ocl.cpp:56:47:错误:未在此范围内声明'source' 程序 P =程序(上下文、来源); ^ matmul_ocl.cpp:56:53:错误:不完整类型'class cl:Program'的无效使用 程序 P =程序(上下文、来源); ^ 包含在/usr/include/ocl_util.h:37:0中、 从 matmul_ocl.cpp:5: /usr/include/CL/cl.hpp:201:7:注意:'class cl: Program' class Program'的正向声明; ^ matmul_ocl.cpp:60:6:错误:未在此范围内声明'buffer' 缓冲区 bufA (context、CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR、MAT_SIZE、A); ^ matmul_ocl.cpp:61:13:错误:'bufB'前的预期';' 缓冲区 bufB (context、CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR、MAT_SIZE、B); ^ matmul_ocl.cpp:62:13:错误:'bufC'前的预期';' 缓冲器 bufC (context、CL_MEM_WRITE_ONLY | CL_MEM_USE_HOST_PTR、MAT_SIZE、C); ^ matmul_ocl.cpp:65:6:错误:未在此范围内声明'kernel' 内核 K (P、"OCL_matmpy"); ^ matmul_ocl.cpp:66:6:错误:没有在此范围内声明"K" K.setArg(0、bufA); ^ matmul_ocl.cpp:66:18:错误:'bufA'未在此范围内声明 K.setArg(0、bufA); ^ matmul_ocl.cpp:67:18:错误:'bufB'未在此范围内声明 K.setArg(1、bufB); ^ matmul_ocl.cpp:68:18:错误:'bufC'未在此范围内声明 K.setArg(2、bufC); ^ matmul_ocl.cpp:73:6:错误:'event'未在此范围内声明 事件 E; ^ matmul_ocl.cpp:74:32:错误:"NullRange"未在此范围内声明 Q.enqueueNDRangeKernel (K、NullRange、NDRange (MAT_M)、NDRange (1)、NULL、 (&E); ^ matmul_ocl.cpp:74:56:错误:未在此范围内声明'NDRange' Q.enqueueNDRangeKernel (K、NullRange、NDRange (MAT_M)、NDRange (1)、NULL、 (&E); ^ matmul_ocl.cpp:74:78:错误:'e'未在此范围内声明 Q.enqueueNDRangeKernel (K、NullRange、NDRange (MAT_M)、NDRange (1)、NULL、 (&E); ^ matmul_OCL.CPP:80:40:错误:未在此范围内声明'OCL_DECODE_ERROR' << OCL_DECODE_ERROR (ERR.ERR ())<<")<< endl; ^ matmul_OCL.cpp:在全局范围内: matmul_OCL.cpp:113:1:错误:输入末尾应为'} ^ matmul_OCL.cpp:113:1:错误: /usr/include/c 中包含的文件输入末尾应为'}' 来自/usr/include/CL/cl.hpp:173、 来自/usr/include/ocl_util.h:37、 从 matmul_ocl.cpp:5: /usr/include/c ++/5.3.1/bits/stl_vector.h:实例化'std::vector <_Tp, _Alloc>::引用 std::向量 <_Tp, _Alloc>:operator[](std::vector <_Tp, _Alloc>::size_type)[使用_TP = cl:Device;_Alloc = std::分配器 ; std::向量 <_Tp, _Alloc>::reference = cl::Device&;std::vector <_Tp, _Alloc>::size_type = unsigned int]': matmul_ocl.cpp:51:47:从此处需要 /usr/include/c ++/5.3.1/bits/stl_vector.h:780:41:错误:未完整类型'class cl:Device '的无效使用 {return *(this ->_M_impl._M_START +_n);} ^ 包含在/usr/include/ocl_util.h:37:0中、 从 matmul_OCL.CPP:5: /usr/include/CL/cl.hpp:202:7:注意:'class cl: Device' class Device 的正向声明; ^ 包含在/usr/include/c 中的文件中++/5.3.1/向量:64:0、 来自/usr/include/CL/cl.hpp:173、 来自/usr/include/ocl_util.h:37、 从 matmul_ocl.cpp:5: /usr/include/c ++/5.3.1/bits/stl_vector.h:在'std::_Vector_BASE 的实例化中 <_Tp, _Alloc>::~ Vector_BASE ()[使用_TP = cl:Device;_Alloc = std::分配器 ]': /usr/include/c ++/5.3.1/bits/stl_vector.h:425:33:从'STD::向量中需要 <_Tp, _Alloc>::~vector()[使用_TP = cl:Device;_Alloc = std::分配器 ]' matmul_ocl.cpp:50:72:从此处需要 /usr/include/c ++/5.3.1/bits/stl_vector.h:161:9:错误:不完整类型'class cl:Device '的无效使用 -此->_M_impl._M_START);} ^ 包含在/usr/include/ocl_util.h:37:0中、 从 matmul_OCL.CPP:5: /usr/include/CL/cl.hpp:202:7:注意:'class cl: Device' class Device 的正向声明; ^ 在/usr/include/c 中包含的文件中、++/5.3.1/向量:62:0、 来自/usr/include/CL/cl.hpp:173、 来自/usr/include/ocl_util.h:37、 从 matmul_OCL.CPP:5: /usr/include/c ++/5.3.1/bits/stl_construct.h:在'void std:::_destroy (_Forwarder、_Forwarder)的实例化中[使用_Forcl Isetator = std::Device *]':/usr/include/c +/5.3.1/bits/stassertil_Forwarder:151:stdstasset_forwarder:_structure_forstdh <_T2>&)[带_ForwardIterator = cl:Device *;_TP = cl:Device ]' /usr/include/c ++/5.3.1/bits/stl_vector.h:424:22:从'std::vector 需要 <_Tp, _Alloc>::~vector()[使用_TP = cl:Device;_Alloc = std::分配器 ]' matmul_ocl.cpp:50:72:从此处需要 /usr/include/c ++/5.3.1/bits/stl_construct.h:127:11:错误:未完整类型'std::迭代器_特征的无效使用 :value_type{aka class cl::Device}' __destroy (__first、__last); ^ 包含在/usr/include/ocl_util.h:37:0中、 从 matmul_OCL.CPP:5: /usr/include/CL/cl.hpp:202:7:注意:'STD::迭代器_特征的正向声明 :value_type{aka class cl::Device}' class Device; ^ root@am57xx-EVM:~#
如果有任何帮助、我们将不胜感激、
B.R、
Alex。