mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
feature: Adding support for OCL C support queries to ocloc
Feature needed for automated OCL C compilation with ocloc as backend. Added queries : * CL_DEVICE_EXTENSIONS * CL_DEVICE_EXTENSIONS_WITH_VERSION * CL_DEVICE_PROFILE * CL_DEVICE_OPENCL_C_ALL_VERSIONS * CL_DEVICE_OPENCL_C_FEATURES Sample command line: ocloc query -device skl CL_DEVICE_OPENCL_C_FEATURES Related-To: GSD-7420 Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d99104d5bf
commit
7e795cd3c1
@@ -218,6 +218,27 @@ class ConstStringRef {
|
||||
return ('\0' == *rhs);
|
||||
}
|
||||
|
||||
template <typename ContainerT>
|
||||
std::string join(const ContainerT &container) {
|
||||
std::string ret;
|
||||
if (container.empty()) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
size_t len = container.size() - 1;
|
||||
for (const auto &substr : container) {
|
||||
len += substr.size();
|
||||
}
|
||||
ret.reserve(len);
|
||||
|
||||
ret.append(*container.begin());
|
||||
for (auto it = container.begin() + 1, e = container.end(); it != e; ++it) {
|
||||
ret.append(this->ptr, this->len);
|
||||
ret.append(*it);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
protected:
|
||||
ConstStringRef(std::nullptr_t) = delete;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user