BigUglySpider / EmuLibs

Selection of libraries designed to be used with Emu projects. This was originally a Math library only, but has since been changed to hold all Emu libraries to enable consistency in changes to dependencies (such as EmuCore modifications).
https://biguglyspider.github.io/math
0 stars 0 forks source link

Matrix Contiguity Lacks Reliability; Update to improve this #44

Closed BigUglySpider closed 2 years ago

BigUglySpider commented 2 years ago

While the construction of a Matrix as two EmuMath Vectors is useful in some rights, it results in a compiler-specific dependency: One compiler may create a contiguous matrix, whereas another compiler will make the same matrix non-contiguous due to padding. The same compiler could also result in different contiguity dependent on the target build platform.

This issue proposes the following:


Additional checklist added after initial proposal

BigUglySpider commented 2 years ago

As of commit 90e47c67a45feb5cf378c95336a392245618f1be data is stored contiguously within a Matrix.

Work is still being done to accommodate for these changes, such as column/row access.

As of this comment, all construction methods have been rebuilt and optimised to defer construction to the underlying storage to reduce code duplication and assist the compiler with RVO.

BigUglySpider commented 2 years ago

As of commit e5f1d1ff9f62f08dc2585a36e12527ea813679dd (f5395e17f71356bbc7bf8c0bbb2b152521d204f5 for diff), all items in this issue's proposal have been implemented.

This issue will be closed after a final cleanup phase, which aims to clean up references to dead code, and update outdated expectations of Matrix behaviour.

BigUglySpider commented 2 years ago

As of 0c0800af7fcc2b8a84db0de42a75233bdb05a76d, this issue is resolved, with pull request #46.