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

Function allocated_fn

test/memory.cpp:674–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672};
673
674af_err allocated_fn(af_memory_manager manager, size_t *out, void *ptr) {
675 auto &table = getMemoryManagerPayload<E2ETestPayload>(manager)->table;
676 if (table.find(ptr) == table.end()) {
677 *out = 0;
678 } else {
679 *out = table[ptr];
680 }
681 return AF_SUCCESS;
682}
683
684af_err user_lock_fn(af_memory_manager manager, void *ptr) {
685 auto *payload = getMemoryManagerPayload<E2ETestPayload>(manager);

Callers

nothing calls this directly

Calls 1

findMethod · 0.80

Tested by

no test coverage detected