Open emlys opened 4 months ago
@phargogh this is finally ready for re-review! The biggest change is I figured out how to implement the iterators properly, so they can be iterated with the usual syntax, solving the issues with tracking/incrementing values properly.
Description
This PR reimplements the
ManagedRaster
class in C++ for better performance. Tested withsdr.calculate_sediment_deposition
and the SDR sample data, it's now just slightly faster than the original implementation onmain
(0.59 vs 0.61 seconds), whereas the python implementation onfeature/routing-refactor
takes nearly twice as long.I'm a beginner at C++ so I'm sure I'm not always using the right conventions or design patterns, but this seems like an okay starting point. I took some guidance from the Google C++ style guide. Ignoring some guidelines that don't seem to make sense in this context. For instance, I have all the code in a header file because splitting it out into
ManagedRaster.h
andManagedRaster.cpp
significantly slowed it down.Happy to discuss and walk through this PR on a zoom call as well.
Checklist