Add LookupAVXBackend

This commit is contained in:
Bram Veenboer
2025-08-01 14:53:36 +02:00
parent 92679639a3
commit b3a73ceb53
7 changed files with 264 additions and 1 deletions

View File

@@ -10,6 +10,10 @@ FetchContent_MakeAvailable(catch2)
add_executable(test_lookup test_lookup.cpp)
target_link_libraries(test_lookup PRIVATE trigdx Catch2::Catch2WithMain)
# LookupAVX backend test
add_executable(test_lookup_avx test_lookup_avx.cpp)
target_link_libraries(test_lookup_avx PRIVATE trigdx Catch2::Catch2WithMain)
# MKL backend test
if(USE_MKL)
add_executable(test_mkl test_mkl.cpp)

19
tests/test_lookup_avx.cpp Normal file
View File

@@ -0,0 +1,19 @@
#include <catch2/catch_test_macros.hpp>
#include <trigdx/lookup_avx.hpp>
#include "test_utils.hpp"
TEST_CASE("sinf") {
test_sinf<LookupAVXBackend<16384>>(1e-2f);
test_sinf<LookupAVXBackend<32768>>(1e-2f);
}
TEST_CASE("cosf") {
test_cosf<LookupAVXBackend<16384>>(1e-2f);
test_cosf<LookupAVXBackend<32768>>(1e-2f);
}
TEST_CASE("sincosf") {
test_sincosf<LookupAVXBackend<16384>>(1e-2f);
test_sincosf<LookupAVXBackend<32768>>(1e-2f);
}