본문 바로가기
반응형

Program Language/OpenCL19

Intel OpenCL visual studio 설정 http://software.intel.com/sites/landingpage/opencl/user-guide/index.htm 1. Intel OpenCL SDK 받기http://software.intel.com/en-us/articles/vcsource-tools/ http://software.intel.com/en-us/articles/vcsource-tools-opencl-sdk/ 2. visual studio project settingOpen the project property pages by selecting Project > Properties.In the C/C++ > General property page, under Additional Include Directories, enter.. 2012. 8. 8.
amd opencl __constant AMD에서 __kernel argument 를 __constant 로 못받는듯하다; HOST:: //create buffer read onlycl_mem cltmp = clCreateBuffer(context, CL_MEM_READ_ONLY, 2048, 0, &err);clEnqueueWriteBuffer(... cltmp...);cl_mem clarg = cltmp; //copy buffer clSetKernelArg(... clarg...);clEnqueueTask(...); DEVICE::__kernel void k(... __const mem...){} 이렇게 하면 Intel 에선 잘 작동하지만. amd에선 argument가 cl_mem주소가 아닌 0으로 넘어온다.. 왜그런진 모르겠지만. 2012. 6. 20.
standard functions in OpenCL memset in OpenCL 커널에서도 memset이된다! memset(dst_ptr, value, size); printf in OpenCL Intel 에선 그냥 쓰면된다. AMD에선 #pragma OPENCL EXTENSION cl_amd_printf : enable Calling clFinish on a command queue flushes all pending output by printf in previously enqueued and completed commands to the implementation-defined output stream.근데 잘안되네; 2012. 6. 4.
clBuildProgram clBuildProgramBuilds (compiles and links) a program executable from the program source or binary.cl_int clBuildProgram (cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, void (*pfn_notify)(cl_program, void *user_data), void *user_data)ParametersprogramThe program objectdevice_listA pointer to a list of devices that are in program. If device_list is NU.. 2012. 6. 2.