Part of Thrust is a set of one and two parameter functors. FunctionalProgramming is extended in the latest release (Version 1.5.1) which contains placeholders which mean that transformations can be done on the fly to whole vectors of data.

This example will add one to each element in X and store it in the elements of W.