Add trigdx_config.hpp and trigdx.hpp header files
This commit is contained in:
@@ -10,6 +10,10 @@ option(TRIGDX_USE_XSIMD "Enable XSIMD backend" OFF)
|
|||||||
option(TRIGDX_BUILD_TESTS "Build tests" ON)
|
option(TRIGDX_BUILD_TESTS "Build tests" ON)
|
||||||
option(TRIGDX_BUILD_BENCHMARKS "Build tests" ON)
|
option(TRIGDX_BUILD_BENCHMARKS "Build tests" ON)
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/cmake/trigdx_config.hpp.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/include/trigdx/trigdx_config.hpp @ONLY)
|
||||||
|
|
||||||
if(TRIGDX_BUILD_TESTS OR TRIGDX_BUILD_BENCHMARKS)
|
if(TRIGDX_BUILD_TESTS OR TRIGDX_BUILD_BENCHMARKS)
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include <trigdx/gpu.hpp>
|
#include <trigdx/trigdx.hpp>
|
||||||
|
|
||||||
#include "benchmark_utils.hpp"
|
#include "benchmark_utils.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include <trigdx/lookup.hpp>
|
#include <trigdx/trigdx.hpp>
|
||||||
|
|
||||||
#include "benchmark_utils.hpp"
|
#include "benchmark_utils.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include <trigdx/lookup_avx.hpp>
|
#include <trigdx/trigdx.hpp>
|
||||||
|
|
||||||
#include "benchmark_utils.hpp"
|
#include "benchmark_utils.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include <trigdx/lookup_xsimd.hpp>
|
#include <trigdx/trigdx.hpp>
|
||||||
|
|
||||||
#include "benchmark_utils.hpp"
|
#include "benchmark_utils.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include <trigdx/mkl.hpp>
|
#include <trigdx/trigdx.hpp>
|
||||||
|
|
||||||
#include "benchmark_utils.hpp"
|
#include "benchmark_utils.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include <trigdx/reference.hpp>
|
#include <trigdx/trigdx.hpp>
|
||||||
|
|
||||||
#include "benchmark_utils.hpp"
|
#include "benchmark_utils.hpp"
|
||||||
|
|
||||||
|
|||||||
5
cmake/trigdx_config.hpp.in
Normal file
5
cmake/trigdx_config.hpp.in
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define TRIGDX_USE_MKL @TRIGDX_USE_MKL@
|
||||||
|
#define TRIGDX_USE_GPU @TRIGDX_USE_GPU@
|
||||||
|
#define TRIGDX_USE_XSIMD @TRIGDX_USE_XSIMD@
|
||||||
19
include/trigdx/trigdx.hpp
Normal file
19
include/trigdx/trigdx.hpp
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <trigdx/trigdx_config.hpp>
|
||||||
|
|
||||||
|
#include <trigdx/reference.hpp>
|
||||||
|
#include <trigdx/lookup.hpp>
|
||||||
|
#include <trigdx/lookup_avx.hpp>
|
||||||
|
|
||||||
|
#if TRIGDX_USE_MKL
|
||||||
|
#include <trigdx/mkl.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if TRIGDX_USE_GPU
|
||||||
|
#include <trigdx/gpu.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if TRIGDX_USE_XSIMD
|
||||||
|
#include <trigdx/lookup_xsimd.hpp>
|
||||||
|
#endif
|
||||||
@@ -33,3 +33,7 @@ if(TRIGDX_USE_XSIMD)
|
|||||||
target_sources(trigdx PRIVATE lookup_xsimd.cpp)
|
target_sources(trigdx PRIVATE lookup_xsimd.cpp)
|
||||||
target_link_libraries(trigdx PRIVATE xsimd)
|
target_link_libraries(trigdx PRIVATE xsimd)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(
|
||||||
|
trigdx INTERFACE $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>)
|
||||||
|
|||||||
Reference in New Issue
Block a user