| 949 | } |
| 950 | |
| 951 | static std::string getProgramSourceString(const char** strings, const size_t* lengths, |
| 952 | cl_uint count) { |
| 953 | if (strings == NULL) { |
| 954 | return "NULL"; |
| 955 | } |
| 956 | if (count == 0) { |
| 957 | return "[]"; |
| 958 | } |
| 959 | std::ostringstream ss; |
| 960 | ss << '['; |
| 961 | |
| 962 | for (cl_uint i = 0; i < count; ++i) { |
| 963 | std::string src; |
| 964 | if (lengths != NULL && lengths[i] != 0) { |
| 965 | src = std::string(strings[i], lengths[i]); |
| 966 | } else { |
| 967 | src = strings[i]; |
| 968 | } |
| 969 | if (i != 0) { |
| 970 | ss << ','; |
| 971 | } |
| 972 | ss << getStringString(src.c_str()); |
| 973 | } |
| 974 | |
| 975 | ss << ']'; |
| 976 | return ss.str(); |
| 977 | } |
| 978 | |
| 979 | static cl_icd_dispatch_table original_dispatch; |
| 980 |
no test coverage detected