Compare commits
1 Commits
add-cmake-
...
add-gitign
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8eef1e966b |
72
.gitignore
vendored
Normal file
72
.gitignore
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
# Generated files
|
||||
**/.DS_Store
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
*.smod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
|
||||
# CMake-related
|
||||
**/cmake-build-debug
|
||||
**/CMakeCache.txt
|
||||
**/cmake_install.cmake
|
||||
**/install_manifest.txt
|
||||
**/CMakeFiles/
|
||||
**/CTestTestfile.cmake
|
||||
**/Makefile
|
||||
**/*.cbp
|
||||
**/CMakeScripts
|
||||
**/compile_commands.json
|
||||
**/CMakeLists.txt.user
|
||||
**/_deps
|
||||
**/Testing
|
||||
**/CMakeUserPresets.json
|
||||
|
||||
# Local
|
||||
build/**/*
|
||||
lib/*
|
||||
bin/*
|
||||
test/test_runner
|
||||
*.user*
|
||||
|
||||
# Visual Studio work directory
|
||||
.vs/
|
||||
# Visual Studio build directory
|
||||
out/
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
|
||||
# CLion work directory
|
||||
.idea/
|
||||
# CLion build directories
|
||||
cmake-build-*/
|
||||
|
||||
# Virtual environments
|
||||
env
|
||||
venv
|
||||
.env
|
||||
.venv
|
||||
@@ -4,9 +4,9 @@ project(trigdx LANGUAGES CXX)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
option(TRIGDX_USE_MKL "Enable Intel MKL backend" OFF)
|
||||
option(TRIGDX_USE_GPU "Enable GPU backend" OFF)
|
||||
option(TRIGDX_USE_XSIMD "Enable XSIMD backend" OFF)
|
||||
option(USE_MKL "Enable Intel MKL backend" OFF)
|
||||
option(USE_GPU "Enable GPU backend" OFF)
|
||||
option(USE_XSIMD "Enable XSIMD backend" OFF)
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||
|
||||
|
||||
@@ -7,17 +7,17 @@ target_link_libraries(benchmark_lookup PRIVATE trigdx)
|
||||
add_executable(benchmark_lookup_avx benchmark_lookup_avx.cpp)
|
||||
target_link_libraries(benchmark_lookup_avx PRIVATE trigdx)
|
||||
|
||||
if(TRIGDX_USE_MKL)
|
||||
if(USE_MKL)
|
||||
add_executable(benchmark_mkl benchmark_mkl.cpp)
|
||||
target_link_libraries(benchmark_mkl PRIVATE trigdx)
|
||||
endif()
|
||||
|
||||
if(TRIGDX_USE_GPU)
|
||||
if(USE_GPU)
|
||||
add_executable(benchmark_gpu benchmark_gpu.cpp)
|
||||
target_link_libraries(benchmark_gpu PRIVATE trigdx gpu)
|
||||
endif()
|
||||
|
||||
if(TRIGDX_USE_XSIMD)
|
||||
if(USE_XSIMD)
|
||||
add_executable(benchmark_lookup_xsimd benchmark_lookup_xsimd.cpp)
|
||||
target_link_libraries(benchmark_lookup_xsimd PRIVATE trigdx)
|
||||
endif()
|
||||
|
||||
@@ -4,13 +4,13 @@ target_include_directories(trigdx PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
||||
|
||||
target_compile_options(trigdx PRIVATE -O3 -march=native)
|
||||
|
||||
if(TRIGDX_USE_MKL)
|
||||
if(USE_MKL)
|
||||
find_package(MKL REQUIRED)
|
||||
target_sources(trigdx PRIVATE mkl.cpp)
|
||||
target_link_libraries(trigdx PRIVATE MKL::MKL)
|
||||
endif()
|
||||
|
||||
if(TRIGDX_USE_GPU)
|
||||
if(USE_GPU)
|
||||
enable_language(CUDA)
|
||||
find_package(CUDAToolkit REQUIRED)
|
||||
add_library(gpu SHARED gpu/gpu.cu)
|
||||
@@ -19,7 +19,7 @@ if(TRIGDX_USE_GPU)
|
||||
target_link_libraries(trigdx PRIVATE gpu)
|
||||
endif()
|
||||
|
||||
if(TRIGDX_USE_XSIMD)
|
||||
if(USE_XSIMD)
|
||||
find_package(xsimd REQUIRED)
|
||||
target_sources(trigdx PRIVATE lookup_xsimd.cpp)
|
||||
target_link_libraries(trigdx PRIVATE xsimd)
|
||||
|
||||
@@ -15,7 +15,7 @@ add_executable(test_lookup_avx test_lookup_avx.cpp)
|
||||
target_link_libraries(test_lookup_avx PRIVATE trigdx Catch2::Catch2WithMain)
|
||||
|
||||
# MKL backend test
|
||||
if(TRIGDX_USE_MKL)
|
||||
if(USE_MKL)
|
||||
add_executable(test_mkl test_mkl.cpp)
|
||||
target_link_libraries(test_mkl PRIVATE trigdx Catch2::Catch2WithMain)
|
||||
endif()
|
||||
@@ -23,17 +23,17 @@ endif()
|
||||
include(CTest)
|
||||
add_test(NAME test_lookup COMMAND test_lookup)
|
||||
|
||||
if(TRIGDX_USE_MKL)
|
||||
if(USE_MKL)
|
||||
add_test(NAME test_mkl COMMAND test_mkl)
|
||||
endif()
|
||||
|
||||
if(TRIGDX_USE_GPU)
|
||||
if(USE_GPU)
|
||||
add_executable(test_gpu test_gpu.cpp)
|
||||
target_link_libraries(test_gpu PRIVATE trigdx Catch2::Catch2WithMain)
|
||||
add_test(NAME test_gpu COMMAND test_gpu)
|
||||
endif()
|
||||
|
||||
if(TRIGDX_USE_XSIMD)
|
||||
if(USE_XSIMD)
|
||||
add_executable(test_lookup_xsimd test_lookup_xsimd.cpp)
|
||||
target_link_libraries(test_lookup_xsimd PRIVATE trigdx Catch2::Catch2WithMain)
|
||||
add_test(NAME test_lookup_xsimd COMMAND test_lookup_xsimd)
|
||||
|
||||
Reference in New Issue
Block a user