MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / af_read_array_key

Function af_read_array_key

src/api/c/stream.cpp:346–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346af_err af_read_array_key(af_array *out, const char *filename, const char *key) {
347 try {
348 AF_CHECK(af_init());
349 ARG_ASSERT(1, filename != NULL);
350 ARG_ASSERT(2, key != NULL);
351
352 // Find index of key. Then call read by index
353 int index = checkVersionAndFindIndex(filename, key);
354
355 if (index == -1) { AF_ERROR("Key not found", AF_ERR_INVALID_ARRAY); }
356
357 af_array output = checkVersionAndRead(filename, index);
358 std::swap(*out, output);
359 }
360 CATCHALL;
361 return AF_SUCCESS;
362}
363
364af_err af_read_array_key_check(int *index, const char *filename,
365 const char *key) {

Callers 1

readArrayFunction · 0.50

Calls 4

checkVersionAndFindIndexFunction · 0.85
checkVersionAndReadFunction · 0.85
swapFunction · 0.85
af_initFunction · 0.70

Tested by

no test coverage detected