COMP 40: Solutions for Homeworks

For the intro assignment you can see the brightness.c and fgroups.c. There is also an auxiliary getline module with interface and implementation.

For the Interfaces, Implementations, and Images assignment you can see some individual components of the code, including Array2 (with .c and .h), Bit2 (with .c and .h), sudoku, and unblackedges.

For the locality assignment you can see the design, experimental evaluation and implementation in one document. There is also

  • Array2b with .c and .h
  • A separate rotate module with both blocked annd unblocked .c files, which are derived from a common body

    A particularly noteworthy aspect is that all the functions in the interface have the same type, as do many other array transformations, so all could be stored in a function pointer or list of function pointers (for a sequence of transformations).

  • A simple array-test program which also comes in blocked and unblocked versions