-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0e3feaa
Showing
18 changed files
with
5,043 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/**/usage.statistics.xml | ||
.idea/**/dictionaries | ||
.idea/**/shelf | ||
|
||
# AWS User-specific | ||
.idea/**/aws.xml | ||
|
||
# Generated files | ||
.idea/**/contentModel.xml | ||
|
||
# Sensitive or high-churn files | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
.idea/**/dbnavigator.xml | ||
|
||
# Gradle | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
|
||
# Gradle and Maven with auto-import | ||
# When using Gradle or Maven with auto-import, you should exclude module files, | ||
# since they will be recreated, and may cause churn. Uncomment if using | ||
# auto-import. | ||
# .idea/artifacts | ||
# .idea/compiler.xml | ||
# .idea/jarRepositories.xml | ||
# .idea/modules.xml | ||
# .idea/*.iml | ||
# .idea/modules | ||
# *.iml | ||
# *.ipr | ||
|
||
# CMake | ||
cmake-build-*/ | ||
|
||
# Mongo Explorer plugin | ||
.idea/**/mongoSettings.xml | ||
|
||
# File-based project format | ||
*.iws | ||
|
||
# IntelliJ | ||
out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Cursive Clojure plugin | ||
.idea/replstate.xml | ||
|
||
# SonarLint plugin | ||
.idea/sonarlint/ | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
# Editor-based Rest Client | ||
.idea/httpRequests | ||
|
||
# Android studio 3.1+ serialized cache file | ||
.idea/caches/build_file_checksums.ser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
cmake_minimum_required(VERSION 3.26) | ||
project(clustering) | ||
|
||
include(CheckCXXCompilerFlag) | ||
include(cmake/CPM.cmake) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
||
set(CLUSTERING_BUILD_BENCHMARK ON CACHE BOOL "Build benchmark") | ||
set(CLUSTERING_USE_AVX2 OFF CACHE BOOL "Use AVX2") | ||
set(CLUSTERING_BUILD_WITH_SANITIZER OFF CACHE BOOL "Build with sanitizer") | ||
|
||
add_library(clustering_header_lib INTERFACE) | ||
target_include_directories(clustering_header_lib INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include) | ||
|
||
add_executable(clustering_demo app/main.cpp) | ||
target_link_libraries(clustering_demo PRIVATE clustering_header_lib) | ||
|
||
if (CLUSTERING_USE_AVX2) | ||
CHECK_CXX_COMPILER_FLAG("-mavx2" COMPILER_SUPPORTS_AVX2) | ||
if(COMPILER_SUPPORTS_AVX2) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx2") | ||
else() | ||
message(FATAL_ERROR "AVX2 not supported but requested") | ||
endif() | ||
target_compile_definitions(clustering_header_lib INTERFACE CLUSTERING_USE_AVX2) | ||
endif() | ||
|
||
if (CLUSTERING_BUILD_WITH_SANITIZER) | ||
target_compile_options(clustering_header_lib INTERFACE -fsanitize=thread -fno-omit-frame-pointer) | ||
target_link_options(clustering_header_lib INTERFACE -fsanitize=thread) | ||
message(STATUS "Build with sanitizer") | ||
endif() | ||
|
||
if (CLUSTERING_BUILD_BENCHMARK) | ||
CPMAddPackage( | ||
NAME benchmark | ||
GITHUB_REPOSITORY google/benchmark | ||
VERSION 1.8.3 | ||
OPTIONS "BENCHMARK_ENABLE_GTEST_TESTS OFF;BENCHMARK_ENABLE_TESTING OFF" | ||
) | ||
add_executable(kdtree_benchmark benchmark/kdtree_benchmark.cpp) | ||
|
||
target_link_libraries(kdtree_benchmark benchmark::benchmark clustering_header_lib) | ||
endif() | ||
|
||
CPMAddPackage( | ||
NAME tsl | ||
GITHUB_REPOSITORY Tessil/hopscotch-map | ||
GIT_TAG v2.3.1 | ||
) | ||
target_link_libraries(clustering_header_lib INTERFACE tsl::hopscotch_map) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.