Open 99600036 opened 4 years ago
in line 123 need use calloc cl_int mem = (cl_int )calloc(mem_length, sizeof(cl_int) );
whithout it Ive got root@njm-amd:~/OpenCL/openCL-helloWorld# ./openCL-helloWorld Number of OpenCL platforms available: 1 The number of OpenCL devices available: 1 OpenCL version support: OpenCL 1.2 AMD-APP (2906.7) Device max mem alloc size: 4244635648 --- Before --- mem[0]: 0 mem[1]: 0 mem[2]: 231473152 mem[3]: 21952 mem[4]: 1212 mem[5]: 0 mem[6]: 2 mem[7]: 0 mem[8]: 48 mem[9]: 0 --- After --- mem[0]: 0 mem[1]: 1 mem[2]: 231473154 mem[3]: 21955 mem[4]: 1216 mem[5]: 5 mem[6]: 8 mem[7]: 7 mem[8]: 56 mem[9]: 9
Hm... immediately line after (124) I use memset(mem, 0, mem_length);
It have to clean array. Can you check it?
yes ofcause... I sent my work variant... in my hardware...
in line 123 need use calloc cl_int mem = (cl_int )calloc(mem_length, sizeof(cl_int) );
whithout it Ive got root@njm-amd:~/OpenCL/openCL-helloWorld# ./openCL-helloWorld Number of OpenCL platforms available: 1 The number of OpenCL devices available: 1 OpenCL version support: OpenCL 1.2 AMD-APP (2906.7) Device max mem alloc size: 4244635648 --- Before --- mem[0]: 0 mem[1]: 0 mem[2]: 231473152 mem[3]: 21952 mem[4]: 1212 mem[5]: 0 mem[6]: 2 mem[7]: 0 mem[8]: 48 mem[9]: 0 --- After --- mem[0]: 0 mem[1]: 1 mem[2]: 231473154 mem[3]: 21955 mem[4]: 1216 mem[5]: 5 mem[6]: 8 mem[7]: 7 mem[8]: 56 mem[9]: 9