Unified checks#1097
Conversation
Will be re-enabled when static test data is generated, thus reducing discrepancies between different backends.
* See ArrayInfo.hpp more more details * Added getBackend function into all backends instead of using macros
* Checks whether all input arrays are for the active backend * Throws error 503 for mismatch
|
As additional information, we tried to do the af_array checks in the CALL macro using templates etc. The problem that we ran into was that there are functions that have arguments as void* / T* and these arguments we're going to the af_array (which is a void*) templated function. So right now, the CHECK_ARRAYS macro is the best solution we found. |
|
Do we really need another name space Another question is about, why can't we have CHECK_ARRAYS in ArrayFire C-API instead of unified API ? That way, we can add all the checks for |
|
Adding the unified namespace was @umar456's recommendation. Having check array's in the c-api is of no use. When someone is using that backend by default (instead of going through the unified API), those checks will not do anything except add code. The role of these checks is limited to the unified api. |
* Use this function when checking arrays in unified backend
|
I think code(checks) fragmentation is much worse issue than having one or two additional statements that doesn't degrade performance. Sure, the their role as they are written now is limited to unified API. But if we have individual checks in respective backend, we won't need to do this CHECK_ARRAYS in unified API all together. Yes, i think that is possible. |
… into unified_checks
…nified_checks Conflicts: include/af/defines.h
* Tests were failing on compute 53 for int,uint,char,uchar,short,ushort
…nto unified_checks Conflicts: include/af/defines.h
|
Just to confirm: if I do something like |
|
@jramapuram, that is the idea yes. |
|
build arrayfire tegra ci |
Fixes #1068
Includes #1091 #1093 #1085