Correctness Tests

Backend Tests

In the Compute layer, only the vector backends are tested explicitly. The directory compute/backend/test contains these tests. There are two kinds of tests, exhaustive tests and random tests. The exhaustive tests test all possible numeric values within the same field. For an operation with two operands and a 7-bit scalar, this means 8 + 8 + 7 = 23 bits of combinations, which will take some time on slower platforms. The random tests vary all parameters randomly. The build system creates and runs the tests for both the SIMD backend and the SWAR backend in all possible word sizes using the RC_FORCE_SIZE override mechanism.

API Tests

All API functions are tested by the regression tests in the test directory. The Check framework is used if present, otherwise the tests are run without it. The framework runs the tests in a separate process so that memory errors do not interfere with the actual test application.

There are reference implementations for most of the exported functions, located in the test/reference directory. Most tests check the RAPP implementations against the reference implementation using random data and parameters. The tests are designed to be as complete as possible, rather than just covering a few hand-coded cases. When writing a test, it is important to test images that are wide enough. With binary images, a single vector operation may process 128 pixels at a time, so the test images will have to be wider than that in order to test all cases.

Installation Tests

After running make install, the installation can be tested by configuring, building and running a simple application. There's such an application located in test/installtest for which those steps are done by make installcheck.

Next section: License

Generated on 1 Jun 2016 for RAPP Compute by  doxygen 1.6.1