multi_permutation_iterator resolves issue 70 , which was opened based on a request  I made over two years ago.
This iterator is general purpose, but is of particular significance due to its application in efficiently implementing stencil operations and multi-dimensional arrays, both of which are areas in which Thrust is currently lacking.
If a proliferation of new iterators is to be avoided then perhaps the functionality provided by multi_permutation_iterator could be integrated into permutation_iterator, to directly generalize permutation_iterators present capabilities? As it stands they have analogous functionality, both index into another iterator. Their difference only lies in the types of indexes allowed: in the case of permutation iterator only types such as int can be used as indexes and therefore permutation_iterator dereferences to produces a single value, whereas multi_permutation_iterator allows for tuples to be used as input and therefore dereferences to produce multiple values.
PS: My apologies for the duplicate pull request. I accidentally closed the previous one, and couldn't figure out how to re-open it.
upgrades multi_permutation_iterator to match thrust@d8d58ab
I just wanted to mention that I've made multi_permutation_iterator compatible with the latest improvements to iterator_facade and iterator_adapter.
Merge branch 'master' of https://github.com/thrust/thrust
__thrust_hd_warning_disable__ for multi_permutation_iterator