FEAT Function to return allocated bytes#1630
FEAT Function to return allocated bytes#1630umar456 merged 3 commits intoarrayfire:develfrom shehzan10:allocated-bytes
Conversation
src/api/c/internal.cpp
Outdated
| size_t res = 0; | ||
|
|
||
| switch (ty) { | ||
| case f32: res = getArray<float >(arr).getDataDims().elements() * sizeof(float); break; |
There was a problem hiding this comment.
Can you move this into the backend? This type of functionality should not be exposed in the API layer.
There was a problem hiding this comment.
getDataDims() is already available as a method to C-API. Whats the need to call it in the backend? It's just going to add redundant code.
There was a problem hiding this comment.
There is a logical separation between the api and the backend codes. The api calls should not implement any functionality. It should only expose the backend state to the user.
There was a problem hiding this comment.
This file is located misleadingly. This should have ideally been under src/backend/internal.cpp. All backends use this file internally so this is technically part of the backend code, not the api code.
|
build arrayfire linux ci |
Fixes #1607