c++ - how do i get opencl to run on my gpu -
i using tutorial http://www.obellianne.fr/alexandre/tutorials/opencl/tuto_opencl_codeblocks.php gpu radeon hd 6970 , amd app , drivers date os windows 8 when run code in tutorial recognizes cpu
looking through source code of project, see following lines:
cl_int result = clgetplatformids(num_entries, platforms, &available); err = clgetdeviceids(platforms[0], cl_device_type_all, maxdevices, deviceids, &numdevices);
the code querying 1 platform in system devices. don't know platform is, gpu devices in different platform cpu devices, , platforms vary depending on manufacturer responsible (intel, amd, nvidia, etc.).
you'll need modify code query devices each platform id returned, not first platform.
Comments
Post a Comment