Add LookupAVXBackend
This commit is contained in:
@@ -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
19
tests/test_lookup_avx.cpp
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user