In order to simplify AOCL-DA C APIs, the results of computations are stored within the da_handle.
Results can be extracted from handles using da_handle_get_result_d(), da_handle_get_result_s() and da_handle_get_result_int(), depending on the datatype of the required result.
Each of these routines takes four arguments:
the
da_handleused in the computation,a
da_resultenumeration, specifying which result is required,a pointer to the size of the array which the result will be written to,
an array in which to write the result.
The specific results available (i.e. the possible values of da_result) are described in the documentation for the particular computational API you are using.
If the array supplied is too small, then the error da_status_invalid_array_dimension will be returned and the pointer to the size of the array will be overwritten with the minimum size required to hold the result.