\brief size_t_to_string macro \param size the size to convert \return the string representation of the size
| 170 | /// \param size the size to convert |
| 171 | /// \return the string representation of the size |
| 172 | inline std::string size_t_to_string(size_t size){ |
| 173 | if (size / 1024 == 0) { |
| 174 | return std::to_string(size); |
| 175 | } else if (size / (1024 * 1024) == 0) { |
| 176 | return std::to_string(size / 1024) + "K"; |
| 177 | } else if (size / (1024 * 1024) == 0){ |
| 178 | return std::to_string(size / (1024 * 1024)) + "M"; |
| 179 | } else { |
| 180 | return std::to_string(size / (1024 * 1024 * 1024)) + "G"; |
| 181 | } |
| 182 | } |