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

Function getMapFlagsString

opencl/tools/cltrace/cltrace.cpp:518–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516}
517
518static std::string getMapFlagsString(cl_map_flags flags) {
519 if (flags == 0) {
520 return "0";
521 }
522
523 std::ostringstream ss;
524 while (flags) {
525 if (flags & CL_MAP_READ) {
526 ss << "CL_MAP_READ";
527 flags &= ~CL_MAP_READ;
528 } else if (flags & CL_MAP_WRITE) {
529 ss << "CL_MAP_WRITE";
530 flags &= ~CL_MAP_WRITE;
531 } else {
532 ss << "0x" << std::hex << (int)flags;
533 flags = 0;
534 }
535 if (flags != 0) {
536 ss << '|';
537 }
538 }
539
540 return ss.str();
541}
542
543static std::string getBufferCreateString(cl_buffer_create_type type, const void* info) {
544 std::ostringstream ss;

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected