15 Commits

Author SHA1 Message Date
3ffb1eeca9 Add conditional test includes and fix inconsistent file naming 2024-10-08 00:21:38 -07:00
eadb3678fe Fix missing include directories while compiling tests 2024-10-08 00:15:40 -07:00
a449c4f749 Add conditional test compilation and split matrix instantiations
This commit adds the ability to conditionally compile tests. To
implement this, common source files needed to be moved to a subdirectory
`common`.

Additionally, this commit splits each `mat` template instantiation into
a separate source file. This enables the linker to discard unused
instantations. If each instantiation is placed in the same file and also
into the .iwram section, the linker will include every symbol in the
resulting binary, leading to an extremely high IWRAM usage. To introduce
this split, a new header file "mat_impl.hpp" was added containing
implementation details for the template instantiations. "mat_impl.hpp"
should ONLY be included by the source files containing explicit
instantiations of `mat`.
2024-10-07 23:49:01 -07:00
b7decb3923 Add fixed point multiplication tests 2024-08-29 22:07:08 -07:00
813a499734 Change architecture dependent compilation to not use janky hacks
Previously didn't add the source to the target if a source of the same
name already existed. This was janky because these files would be
considered the same: src/foo.cpp src/armv4t/bar/baz/foo.cpp, even though
they really shouldn't. What should happen instead, is that the symbols
of the architecture-specific code should not be overridden by the common
implementation regardless of where the file is placed. This means that
if the files src/foo.cpp and src/armv4t/bar.cpp contain implementations
of the function foo, the armv4t implementation will be exported
even though it uses a different filename from the common
implementation. This commit implements this behaviour by using
the way symbols are naturally resolved. Multiple smaller
libraries are built for each architecture dependent code.
Afterwards the libraries are linked into one, with the arch specific
libraries linked first.
2024-04-04 04:11:07 -06:00
844904cca4 Change CMake to not build the common implementation when there is a
platform specific alternative
2024-03-27 00:31:15 -06:00
d2f6e26d43 Add source directory for GBA specific files 2024-03-26 23:24:48 -06:00
198f3d3f72 Remove armv4t specific include directory from build
Directory was removed in a previous commit.
2024-03-25 17:18:31 -06:00
f394929e0a Add support for debug-build specific files 2024-03-12 00:40:02 -06:00
c8162e6974 Update CMakeLists.txt to use globbing, and support arch. dependent files
CONFIGURE_DEPENDS option was added in CMake v3.12. This option allows the
build system to automatically re-run CMake if the glob changes, solving the
major issue with globbing. May have a performance impact, but it should be
negligible compared to the time spent building.
2024-03-10 21:55:50 -06:00
913e54252a Add initial string_view implementation 2024-03-07 14:24:10 -07:00
34495b580b Add initial fixed point number implementation 2024-03-06 23:42:48 -07:00
f872bcc0c9 Add finite state machine header to cmake 2024-03-06 23:05:15 -07:00
dd0e7e63e0 Fix incorrect paths in CMakeLists.txt 2024-03-04 20:56:36 -07:00
3f8bcf2f61 Add cmake files and initial memcpy/string implementation 2024-03-04 20:44:58 -07:00