본문 바로가기
반응형

분류 전체보기205

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.
sizeof main() { int arr[16]; int* nptr; int* ptr; ptr = malloc(sizeof(int)*16); printf("SIZE arr=%d , nptr=%d, ptr=%d\n", sizeof(arr), sizeof(nptr), sizeof(ptr)); } 결과 : SIZE arr=64 , nptr=4, ptr=4 main() { char arr[16]; char* nptr; char* ptr; ptr = malloc(sizeof(char)*16); printf("SIZE arr=%d , nptr=%d, ptr=%d\n", sizeof(arr), sizeof(nptr), sizeof(ptr)); } 결과 : SIZE arr=16 , nptr=4, ptr=4 배열 크기는 하나크기*.. 2012. 6. 4.
Ctrl + F5눌러도 안 멈출때 With the new visual studio 2010 you might see this behavior even when you use ctrl f5 aka "start without debugging". This is most likely because you created an "empty project" instead of a "Win32 console application". If you create the project as a "Win32 console application" you can disregard this as it does not apply.In the older versions it would default to the console subsystem even if you s.. 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.