Implement device generate with device for_each.
Implement device generate with device for_each.

--HG--
extra : convert_revision : svn%3A83215879-3e5a-4751-8c9d-778f44bb06a5/trunk%40539

egaburov/thrust,thrust/thrust,sarvex/thrust,zeryx/thrust,mohamed-ali/thrust,Ricardo666666/thrust,jaredhoberock/thrust,sarvex/thrust,GrimDerp/thrust,jaredhoberock/thrust,zhenglaizhang/thrust,arnabgho/thrust,GrimDerp/thrust,dachziegel/thrust,egaburov/thrust,thrust/thrust,marksantos/thrust,zhenglaizhang/thrust,andrewcorrigan/thrust-multi-permutation-iterator,sarvex/thrust,egaburov/thrust,dachziegel/thrust,xiongzhanblake/thrust,sdalton1/thrust,arnabgho/thrust,arnabgho/thrust,sdalton1/thrust,mohamed-ali/thrust,marksantos/thrust,Ricardo666666/thrust,xiongzhanblake/thrust_src,xiongzhanblake/thrust_src,andrewcorrigan/thrust-multi-permutation-iterator,jaredhoberock/thrust,zeryx/thrust,thvasilo/thrust,xiongzhanblake/thrust,Ricardo666666/thrust,mohamed-ali/thrust,dachziegel/thrust,zeryx/thrust,raygit/thrust,jaredhoberock/thrust,sdalton1/thrust,thrust/thrust,zhenglaizhang/thrust,andrewcorrigan/thrust-multi-permutation-iterator,xiongzhanblake/thrust_src,jaredhoberock/thrust,thrust/thrust,thvasilo/thrust,marksantos/thrust,GrimDerp/thrust,xiongzhanblake/thrust,raygit/thrust,raygit/thrust,thvasilo/thrust,thrust/thrust