-
Notifications
You must be signed in to change notification settings - Fork 10
Quick Start: Utilities
Xinlei Wang edited this page Jul 18, 2021
·
1 revision
ZPC provides some useful constructs to make physics-based simulation programming more simple.
/// ranged-for way
for (auto &&e : a)
e...;
/// indexed range-for loop
for (auto &&[id, e] : enumerate(a))
id, e...;
/// zipped range-for loop
for (auto &&[ea, eb] : zip(a, b))
ea, eb...;
/// indexed-way
for (auto iter = a.begin(), ed = a.end(); iter != ed; ++iter)
*iter...;