Partner function of testWriteToOutputArray. This generates the "special" array that testWriteToOutputArray will use to check if the af_* function correctly uses an existing array as its output
| 698 | // array that testWriteToOutputArray will use to check if the af_* function |
| 699 | // correctly uses an existing array as its output |
| 700 | void genTestOutputArray(af_array *out_ptr, const unsigned ndims, |
| 701 | const dim_t *const dims, const af_dtype ty, |
| 702 | TestOutputArrayInfo *metadata) { |
| 703 | switch (metadata->getOutputArrayType()) { |
| 704 | case FULL_ARRAY: genRegularArray(metadata, ndims, dims, ty); break; |
| 705 | case SUB_ARRAY: genSubArray(metadata, ndims, dims, ty); break; |
| 706 | case REORDERED_ARRAY: |
| 707 | genReorderedArray(metadata, ndims, dims, ty); |
| 708 | break; |
| 709 | default: break; |
| 710 | } |
| 711 | *out_ptr = metadata->getOutput(); |
| 712 | } |
| 713 | |
| 714 | void genTestOutputArray(af_array *out_ptr, double val, const unsigned ndims, |
| 715 | const dim_t *const dims, const af_dtype ty, |
no test coverage detected