I wonder if there is a light, straight forward way to have loops such as for
and range based-for
loops compute in parallel in C++. How would you implement such a thing? From Scala I know the map
, filter
and foreach
functions and maybe it would also be possible to perform these in parallel? Is there an easy way to achieve this in C++?
My primary platform is Linux, but it would be nice if it worked cross-platform.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…