matrix operations

This commit is contained in:
Jorijn van der Graaf 2026-05-18 18:03:20 +02:00
commit ad5ba21b4d
6 changed files with 1433 additions and 613 deletions

View file

@ -28,10 +28,10 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
cfg.GetInterfacesAndImplementations(ifaces, impls);
}
auto addVectorTest = [&](std::string march, std::string mtune) {
auto addTest = [&](std::string_view testName, std::string march, std::string mtune) {
Test t;
t.config.path = "./";
t.config.name = std::format("Vector-{}", march);
t.config.name = std::format("{}-{}", testName, march);
t.config.outputName = t.config.name;
t.config.target = cfg.target;
t.config.type = ConfigurationType::Executable;
@ -40,13 +40,15 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
t.config.debug = cfg.debug;
std::array<fs::path, 8> ifaces;
std::ranges::copy(mathInterfaces, ifaces.begin());
std::array<fs::path, 1> impls = { "tests/Vector" };
std::array<fs::path, 1> impls = { fs::path{std::format("tests/{}", testName)} };
t.config.GetInterfacesAndImplementations(ifaces, impls);
cfg.tests.push_back(std::move(t));
};
addVectorTest("sapphirerapids", "native");
addVectorTest("x86-64-v4", "generic");
addVectorTest("x86-64-v3", "generic");
for (std::string_view name : { "Vector", "Intersection", "Matrix" }) {
addTest(name, "sapphirerapids", "native");
addTest(name, "x86-64-v4", "generic");
addTest(name, "x86-64-v3", "generic");
}
return cfg;
}