| 119 | } |
| 120 | |
| 121 | std::string |
| 122 | Config::device() const |
| 123 | { |
| 124 | std::string name; |
| 125 | cl_int err; |
| 126 | size_t sz; |
| 127 | char *dname; |
| 128 | |
| 129 | err = clGetDeviceInfo(device_, CL_DEVICE_NAME, 0, NULL, &sz); |
| 130 | if (err != CL_SUCCESS) { |
| 131 | return ""; |
| 132 | } |
| 133 | dname = new char[sz + 1]; |
| 134 | err = clGetDeviceInfo(device_, CL_DEVICE_NAME, sz, dname, NULL); |
| 135 | if (err != CL_SUCCESS) { |
| 136 | delete[] dname; |
| 137 | return ""; |
| 138 | } |
| 139 | name = dname; |
| 140 | delete[] dname; |
| 141 | return name; |
| 142 | } |
| 143 | |
| 144 | const std::string& |
| 145 | Config::buildOptions() const |