The complexity of reshaping arrays on boolean cubes
Abstract
Reshaping of arrays is a convenient programming primitive. For arrays encoded in a binary-reflected Gray code reshaping implies code change. We show that an axis splitting, or combining of two axes, requires communica tion in exactly one dimension, and that for multiple axes split tings the exchanges in the different dimensions can be ordered arbitrarily. The nnmber of element transfers in sequence is independent of the number of dimensions requiring coniniunication for large local data sets, and concurrent conuiiunication. The lower bound for the number of element transfers in sequence is K/2 with K elements per processor. We present algorithius that is of this complexity for some cases, and of complexity K in the worst case. Conversion between binary code and binary-reflected Gray code is a special case of reshaping.