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

Function genTestOutputArray

test/arrayfire_test.cpp:700–712  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

698// array that testWriteToOutputArray will use to check if the af_* function
699// correctly uses an existing array as its output
700void 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
714void genTestOutputArray(af_array *out_ptr, double val, const unsigned ndims,
715 const dim_t *const dims, const af_dtype ty,

Callers 7

testSpclOutArrayMethod · 0.85
testSpclOutArrayMethod · 0.85
testSpclOutArrayMethod · 0.85
SetUpMethod · 0.85
testSpclOutArrayMethod · 0.85

Calls 5

genRegularArrayFunction · 0.85
genSubArrayFunction · 0.85
genReorderedArrayFunction · 0.85
getOutputArrayTypeMethod · 0.80
getOutputMethod · 0.80

Tested by

no test coverage detected