| 175 | } |
| 176 | |
| 177 | std::string Tensor::whereToString() const |
| 178 | { |
| 179 | static const std::unordered_map<MemoryType, std::string> mem_to_string{ |
| 180 | {MEMORY_CPU, "CPU"}, {MEMORY_CPU_PINNED, "CPU_PINNED"}, {MEMORY_GPU, "GPU"}}; |
| 181 | return mem_to_string.at(where); |
| 182 | } |
| 183 | |
| 184 | std::string Tensor::toString() const |
| 185 | { |