MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TF_ApiDefMapPut

Function TF_ApiDefMapPut

tensorflow/c/c_api.cc:2409–2425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2407void TF_DeleteApiDefMap(TF_ApiDefMap* apimap) { delete apimap; }
2408
2409void TF_ApiDefMapPut(TF_ApiDefMap* api_def_map, const char* text,
2410 size_t text_len, TF_Status* status) {
2411#if defined(IS_MOBILE_PLATFORM) || defined(IS_SLIM_BUILD)
2412 status->status = tensorflow::errors::Unimplemented(
2413 "ApiDefMap is not supported on mobile.");
2414#else
2415 mutex_lock l(api_def_map->lock);
2416 if (api_def_map->update_docs_called) {
2417 status->status = FailedPrecondition(
2418 "TF_ApiDefMapPut cannot be called after TF_ApiDefMapGet has been "
2419 "called.");
2420 return;
2421 }
2422 string api_def_text(text, text_len);
2423 status->status = api_def_map->api_def_map.LoadApiDef(api_def_text);
2424#endif // defined(IS_MOBILE_PLATFORM) || defined(IS_SLIM_BUILD)
2425}
2426
2427TF_Buffer* TF_ApiDefMapGet(TF_ApiDefMap* api_def_map, const char* name,
2428 size_t name_len, TF_Status* status) {

Callers 1

TESTFunction · 0.85

Calls 3

UnimplementedFunction · 0.85
FailedPreconditionFunction · 0.85
LoadApiDefMethod · 0.80

Tested by 1

TESTFunction · 0.68