| 208 | } |
| 209 | |
| 210 | const char *af_err_to_string(const af_err err) { |
| 211 | switch (err) { |
| 212 | case AF_SUCCESS: return "Success"; |
| 213 | case AF_ERR_NO_MEM: return "Device out of memory"; |
| 214 | case AF_ERR_DRIVER: return "Driver not available or incompatible"; |
| 215 | case AF_ERR_RUNTIME: return "Runtime error "; |
| 216 | case AF_ERR_INVALID_ARRAY: return "Invalid array"; |
| 217 | case AF_ERR_ARG: return "Invalid input argument"; |
| 218 | case AF_ERR_SIZE: return "Invalid input size"; |
| 219 | case AF_ERR_TYPE: return "Function does not support this data type"; |
| 220 | case AF_ERR_DIFF_TYPE: return "Input types are not the same"; |
| 221 | case AF_ERR_BATCH: return "Invalid batch configuration"; |
| 222 | case AF_ERR_DEVICE: |
| 223 | return "Input does not belong to the current device."; |
| 224 | case AF_ERR_NOT_SUPPORTED: return "Function not supported"; |
| 225 | case AF_ERR_NOT_CONFIGURED: return "Function not configured to build"; |
| 226 | case AF_ERR_NONFREE: |
| 227 | return "Function unavailable. " |
| 228 | "ArrayFire compiled without Non-Free algorithms support"; |
| 229 | case AF_ERR_NO_DBL: |
| 230 | return "Double precision not supported for this device"; |
| 231 | case AF_ERR_NO_GFX: |
| 232 | return "Graphics functionality unavailable. " |
| 233 | "ArrayFire compiled without Graphics support"; |
| 234 | case AF_ERR_NO_HALF: |
| 235 | return "Half precision floats not supported for this device"; |
| 236 | case AF_ERR_LOAD_LIB: return "Failed to load dynamic library. "; |
| 237 | case AF_ERR_LOAD_SYM: return "Failed to load symbol"; |
| 238 | case AF_ERR_ARR_BKND_MISMATCH: |
| 239 | return "There was a mismatch between an array and the current " |
| 240 | "backend"; |
| 241 | case AF_ERR_INTERNAL: return "Internal error"; |
| 242 | case AF_ERR_UNKNOWN: return "Unknown error"; |
| 243 | } |
| 244 | return "Unknown error. Please open an issue and add this error code to the " |
| 245 | "case in af_err_to_string."; |
| 246 | } |
| 247 | |
| 248 | namespace arrayfire { |
| 249 | namespace common { |
no outgoing calls
no test coverage detected