Utilisation avancée des processeurs graphiques avec Qt
Utilisation avancée des processeurs graphiques avec Qt
Utilisation avancée des processeurs graphiques avec Qt
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Version C<br />
<strong>Utilisation</strong> <strong>avancée</strong> <strong>des</strong> <strong>processeurs</strong> <strong>graphiques</strong> <strong>avec</strong> <strong>Qt</strong> par Rémi Achard Guillaume Belz<br />
char value[256] = "";<br />
err = clGetPlatformInfo(clPlatform, CL_PLATFORM_PROFILE, 256, value, NULL);<br />
err = clGetPlatformInfo(clPlatform, CL_PLATFORM_VERSION, 256, value, NULL);<br />
err = clGetPlatformInfo(clPlatform, CL_PLATFORM_NAME, 256, value, NULL);<br />
err = clGetPlatformInfo(clPlatform, CL_PLATFORM_VENDOR, 256, value, NULL);<br />
err = clGetPlatformInfo(clPlatform, CL_PLATFORM_EXTENSIONS, 256, value, NULL);<br />
// TODO : code spécifique C ?<br />
std::string extensions(value);<br />
bool as_fp64 = (extensions.find("cl_khr_fp64") != string::npos);<br />
Version C++<br />
std::string platformVendor;<br />
platformList[0].getInfo((cl_platform_info)CL_PLATFORM_VENDOR, &platformVendor);<br />
std::cerr