|
Bugzilla – Full Text Bug Listing |
| Summary: | Store spectrum conversion matrix in CSR format | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Alexander Krotov <krotov> |
| Component: | spectrum | Assignee: | Nicola Baldo <nicola> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | ns-bugs |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
Proposed patch
Benchmark scenario Proposed patch |
||
I checked that patch results in much less multiplications, but the improvement in time is not that great. Probably it needs more benchmarking in large scenarios and feedback. Created attachment 2524 [details]
Benchmark scenario
For attached scenario proposed patch shows about 30% reduction in time on my computer (from ~30 seconds to ~20 seconds).
Hi Alex, thanks a lot for this patch, it looks very good! I think it would be very nice to include it. The only (minor) comment I have is to change operator [] to .at() for accessing std::vector elements. Other than this, the implementation looks very neat! Please go ahead and push it. Created attachment 2620 [details]
Proposed patch
I have updated patch to use at() and tested it.
I can't push it as I have no write access to ns-3-dev.
Pushed in changeset 608e628ef4b5 |
Created attachment 2518 [details] Proposed patch Spectrum conversion matrix is usually sparse. In most cases bands of TX and RX correspond one-to-one, so the matrix is diagonal even. So I decided that matrix should be stored in CSR format instead of vector of vectors. Proposed patch is attached.