  An algorithm has been devised to compute the inner and outer product between
two arbitrary multi-dimensional arrays A and B in a single piece of code. It
was derived using A Mathematics of Arrays (MoA) and the $\psi$-calculus.
Extensive tests of the new algorithm are presented for running in sequential as
well as OpenMP multiple processor modes.
