Skip to content

[math] math::Matrix class size limitation #1005

@hshose

Description

@hshose

There are a few places in the matrix_impl.hpp, like here, where the matrix size is limited to 256 elements, if I see correctly. This is a 16 by 16 matrix which is very small - even on a microcontroller.

Is there a reason for having this?

Otherwise changing, e.g.,

	for (uint_fast8_t i = 0; i < getNumberOfElements(); ++i) { element[i] = data[i]; }

to

	for (uint_fast16_t i = 0; i < getNumberOfElements(); ++i) { element[i] = data[i]; }

would make sense?

If not, it would probably be good to explicitly state this limit in the documentation?

Also, maybe change the template from template<typename T, uint8_t ROWS, uint8_t COLUMNS>
to template<typename T, uint16_t ROWS, uint16_t COLUMNS> alltogether, which would probably cover all relevant matrix applications on microcontrollers? (I would see applications where one might want to use a matrix that has more than 256 entries in one dimension...).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions