| 516 | } |
| 517 | |
| 518 | static 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 | |
| 543 | static std::string getBufferCreateString(cl_buffer_create_type type, const void* info) { |
| 544 | std::ostringstream ss; |
no outgoing calls
no test coverage detected