MCPcopy Create free account
hub / github.com/ROCm/clr / getProgramSourceString

Function getProgramSourceString

opencl/tools/cltrace/cltrace.cpp:951–977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

949}
950
951static 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
979static cl_icd_dispatch_table original_dispatch;
980

Callers 1

Calls 2

getStringStringFunction · 0.85
stringFunction · 0.50

Tested by

no test coverage detected