| 413 | void TFE_DeleteContext(TFE_Context* ctx) { delete ctx; } |
| 414 | |
| 415 | TF_DeviceList* TFE_ContextListDevices(TFE_Context* ctx, TF_Status* status) { |
| 416 | TF_DeviceList* list = new TF_DeviceList; |
| 417 | ctx->context->local_device_mgr()->ListDeviceAttributes(&list->response); |
| 418 | if (ctx->context->remote_device_mgr()) { |
| 419 | ctx->context->remote_device_mgr()->ListDeviceAttributes(&list->response); |
| 420 | } |
| 421 | return list; |
| 422 | } |
| 423 | |
| 424 | void TFE_ContextClearCaches(TFE_Context* ctx) { ctx->context->ClearCaches(); } |
| 425 |