| 92 | } |
| 93 | |
| 94 | af_err af_get_device_id(int* device, const af_array in) { |
| 95 | try { |
| 96 | if (in) { |
| 97 | const ArrayInfo& info = getInfo(in, false); |
| 98 | *device = static_cast<int>(info.getDevId()); |
| 99 | } else { |
| 100 | return AF_ERR_ARG; |
| 101 | } |
| 102 | } |
| 103 | CATCHALL; |
| 104 | return AF_SUCCESS; |
| 105 | } |
| 106 | |
| 107 | af_err af_get_active_backend(af_backend* result) { |
| 108 | *result = static_cast<af_backend>(getBackend()); |