String Request::getInfoString(int type, DWORD size) { String txt; if (HttpQueryInfo(_hRequest , type , txt.useBuffer<char>(size) , &size , 0)) { txt.releaseBuffer<char>(size); return txt; } else { if (GetLastError()==ERROR_INSUFFICIENT_BUFFER) { return getInfoString(type, size + 1); } else { return ""; } } }
String Request::getLocation() { return getInfoString(HTTP_QUERY_LOCATION); }
std::string Device::version() const { return getInfoString(CL_DEVICE_VERSION); }
std::string Device::driverVersion() const { return getInfoString(CL_DRIVER_VERSION); }
std::string Device::vendor() const { return getInfoString(CL_DEVICE_VENDOR); }
std::string Device::profile() const { return getInfoString(CL_DEVICE_PROFILE); }
std::string Device::versionOpenCLC() const { return getInfoString(CL_DEVICE_OPENCL_C_VERSION); }
std::string Device::name() const { return getInfoString(CL_DEVICE_NAME); }
std::vector<std::string> Device::getExtensions() const { return common::split(getInfoString(CL_DEVICE_EXTENSIONS), " "); }