Compare commits
1 Commits
add-gitign
...
add-cmake-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d04fb8933d |
72
.gitignore
vendored
72
.gitignore
vendored
@@ -1,72 +0,0 @@
|
|||||||
# 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 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
option(USE_MKL "Enable Intel MKL backend" OFF)
|
option(TRIGDX_USE_MKL "Enable Intel MKL backend" OFF)
|
||||||
option(USE_GPU "Enable GPU backend" OFF)
|
option(TRIGDX_USE_GPU "Enable GPU backend" OFF)
|
||||||
option(USE_XSIMD "Enable XSIMD backend" OFF)
|
option(TRIGDX_USE_XSIMD "Enable XSIMD backend" OFF)
|
||||||
|
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/include)
|
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)
|
add_executable(benchmark_lookup_avx benchmark_lookup_avx.cpp)
|
||||||
target_link_libraries(benchmark_lookup_avx PRIVATE trigdx)
|
target_link_libraries(benchmark_lookup_avx PRIVATE trigdx)
|
||||||
|
|
||||||
if(USE_MKL)
|
if(TRIGDX_USE_MKL)
|
||||||
add_executable(benchmark_mkl benchmark_mkl.cpp)
|
add_executable(benchmark_mkl benchmark_mkl.cpp)
|
||||||
target_link_libraries(benchmark_mkl PRIVATE trigdx)
|
target_link_libraries(benchmark_mkl PRIVATE trigdx)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_GPU)
|
if(TRIGDX_USE_GPU)
|
||||||
add_executable(benchmark_gpu benchmark_gpu.cpp)
|
add_executable(benchmark_gpu benchmark_gpu.cpp)
|
||||||
target_link_libraries(benchmark_gpu PRIVATE trigdx gpu)
|
target_link_libraries(benchmark_gpu PRIVATE trigdx gpu)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_XSIMD)
|
if(TRIGDX_USE_XSIMD)
|
||||||
add_executable(benchmark_lookup_xsimd benchmark_lookup_xsimd.cpp)
|
add_executable(benchmark_lookup_xsimd benchmark_lookup_xsimd.cpp)
|
||||||
target_link_libraries(benchmark_lookup_xsimd PRIVATE trigdx)
|
target_link_libraries(benchmark_lookup_xsimd PRIVATE trigdx)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ target_include_directories(trigdx PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
|||||||
|
|
||||||
target_compile_options(trigdx PRIVATE -O3 -march=native)
|
target_compile_options(trigdx PRIVATE -O3 -march=native)
|
||||||
|
|
||||||
if(USE_MKL)
|
if(TRIGDX_USE_MKL)
|
||||||
find_package(MKL REQUIRED)
|
find_package(MKL REQUIRED)
|
||||||
target_sources(trigdx PRIVATE mkl.cpp)
|
target_sources(trigdx PRIVATE mkl.cpp)
|
||||||
target_link_libraries(trigdx PRIVATE MKL::MKL)
|
target_link_libraries(trigdx PRIVATE MKL::MKL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_GPU)
|
if(TRIGDX_USE_GPU)
|
||||||
enable_language(CUDA)
|
enable_language(CUDA)
|
||||||
find_package(CUDAToolkit REQUIRED)
|
find_package(CUDAToolkit REQUIRED)
|
||||||
add_library(gpu SHARED gpu/gpu.cu)
|
add_library(gpu SHARED gpu/gpu.cu)
|
||||||
@@ -19,7 +19,7 @@ if(USE_GPU)
|
|||||||
target_link_libraries(trigdx PRIVATE gpu)
|
target_link_libraries(trigdx PRIVATE gpu)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_XSIMD)
|
if(TRIGDX_USE_XSIMD)
|
||||||
find_package(xsimd REQUIRED)
|
find_package(xsimd REQUIRED)
|
||||||
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)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ add_executable(test_lookup_avx test_lookup_avx.cpp)
|
|||||||
target_link_libraries(test_lookup_avx PRIVATE trigdx Catch2::Catch2WithMain)
|
target_link_libraries(test_lookup_avx PRIVATE trigdx Catch2::Catch2WithMain)
|
||||||
|
|
||||||
# MKL backend test
|
# MKL backend test
|
||||||
if(USE_MKL)
|
if(TRIGDX_USE_MKL)
|
||||||
add_executable(test_mkl test_mkl.cpp)
|
add_executable(test_mkl test_mkl.cpp)
|
||||||
target_link_libraries(test_mkl PRIVATE trigdx Catch2::Catch2WithMain)
|
target_link_libraries(test_mkl PRIVATE trigdx Catch2::Catch2WithMain)
|
||||||
endif()
|
endif()
|
||||||
@@ -23,17 +23,17 @@ endif()
|
|||||||
include(CTest)
|
include(CTest)
|
||||||
add_test(NAME test_lookup COMMAND test_lookup)
|
add_test(NAME test_lookup COMMAND test_lookup)
|
||||||
|
|
||||||
if(USE_MKL)
|
if(TRIGDX_USE_MKL)
|
||||||
add_test(NAME test_mkl COMMAND test_mkl)
|
add_test(NAME test_mkl COMMAND test_mkl)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_GPU)
|
if(TRIGDX_USE_GPU)
|
||||||
add_executable(test_gpu test_gpu.cpp)
|
add_executable(test_gpu test_gpu.cpp)
|
||||||
target_link_libraries(test_gpu PRIVATE trigdx Catch2::Catch2WithMain)
|
target_link_libraries(test_gpu PRIVATE trigdx Catch2::Catch2WithMain)
|
||||||
add_test(NAME test_gpu COMMAND test_gpu)
|
add_test(NAME test_gpu COMMAND test_gpu)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_XSIMD)
|
if(TRIGDX_USE_XSIMD)
|
||||||
add_executable(test_lookup_xsimd test_lookup_xsimd.cpp)
|
add_executable(test_lookup_xsimd test_lookup_xsimd.cpp)
|
||||||
target_link_libraries(test_lookup_xsimd PRIVATE trigdx Catch2::Catch2WithMain)
|
target_link_libraries(test_lookup_xsimd PRIVATE trigdx Catch2::Catch2WithMain)
|
||||||
add_test(NAME test_lookup_xsimd COMMAND test_lookup_xsimd)
|
add_test(NAME test_lookup_xsimd COMMAND test_lookup_xsimd)
|
||||||
|
|||||||
Reference in New Issue
Block a user