The invention belongs to the technical field of
embedded software testing, and provides a VSIPL vector
library function testing method and device.The method comprises the steps that operator functions to be tested are classified and abstracted into uniform function pointers, test cases are constructed based on the function pointers, and a corresponding relation table of the test cases and VSIPL data object specifications is established; automatically generating a matched VSIPL data object according to the relation table, calling the
operator function to be tested and the reference
operator function corresponding to the
operator function to perform calculation on the same data, outputting a test result based on a calculation result and consumed time, and releasing resources. According to the method, on-demand self-adaptive generation of
test data and unified scheduling of operator functions are realized through a cooperation mechanism of a
function pointer and a relation table, the
automation degree, coverage integrity and cross-platform
verification efficiency of VSIPL vector
library test are remarkably improved, batch performance and precision evaluation is supported, and the method is suitable for popularization and application. And the
correctness and the acceleration effect of the optimized version function are effectively ensured.