Skip to content

Commit 5d4b09b

Browse files
v1.0.0 (#6)
1 parent d959668 commit 5d4b09b

File tree

98 files changed

+10709
-2264
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+10709
-2264
lines changed

.bazelrc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# general build options
22
build --compilation_mode=dbg
3+
build --host_compilation_mode=fastbuild
34
build --verbose_failures
45
build --experimental_strict_action_env
56
build --experimental_guard_against_concurrent_changes
@@ -18,6 +19,7 @@ build --enable_runfiles --build_runfile_links
1819
test --test_output=errors
1920

2021
build:release --compilation_mode=opt
22+
build:release --host_compilation_mode=opt
2123

2224
build:ci --keep_going
2325
build:ci --announce_rc
@@ -28,15 +30,17 @@ build:linux --copt="-fvisibility=hidden"
2830
build:linux --copt="-fno-omit-frame-pointer" # for friendlier stack traces
2931
build:linux --copt="-Wno-error"
3032
build:linux --copt="-mavx"
33+
build:linux --copt="-Wsequence-point"
34+
build:linux --copt="-Wsign-compare"
3135
build:linux --cxxopt="-std=c++17"
32-
build:linux --linkopt="-lm"
33-
build:linux --linkopt="-latomic"
34-
build:linux --linkopt="-ldl"
3536

3637
build:linux-release --config=release
3738
build:linux-release --config=linux
3839
build:linux-release --copt="-O3"
3940

41+
build:benchmark --config=linux-release
42+
build:benchmark --copt="-g" # To get code references in vtune
43+
4044
build:macos --copt="-fvisibility=hidden"
4145
build:macos --copt="-Wno-error"
4246
build:macos --cxxopt="-std=c++17"
@@ -49,13 +53,16 @@ build:windows --features=static_link_msvcrt
4953
# the remote cache to never be hit due to differing build graph hashes.
5054
build:windows --action_env TMP=C:/Windows/Temp
5155
build:windows --action_env TEMP=C:/Windows/Temp
56+
build:windows --cxxopt="/DWIN32_LEAN_AND_MEAN"
5257

5358
# Config for when tests are running in a "slow" environment such as Valgrind or TSan
5459
build:slow-tests --copt="-DIMPROBABLE_SLOW_TEST"
5560

5661
# Valgrind config.
62+
build:valgrind-memcheck --config=linux
5763
build:valgrind-memcheck --config=slow-tests
5864
test:valgrind-memcheck --run_under=//tools/runners/sanitizers/valgrind-memcheck
65+
run:valgrind-memcheck --run_under=//tools/runners/sanitizers/valgrind-memcheck
5966

6067
# Sanitizer configs; for an overview of the sanitizers, see https://github.com/google/sanitizers/wiki
6168
# For more specific information on sanitizers:

.github/workflows/bazel.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Bazel build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: Run bazel
8+
runs-on: ubuntu-latest
9+
10+
defaults:
11+
run:
12+
shell: bash
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Setup bazel
19+
# install bazelisk to install the appropriate bazel version
20+
run: |
21+
export PATH=$PATH:$HOME/bin && mkdir -p $HOME/bin
22+
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.5.0/bazelisk-linux-amd64 && chmod +x bazelisk-linux-amd64 && mv bazelisk-linux-amd64 $HOME/bin/bazel
23+
wget https://github.com/bazelbuild/buildtools/releases/download/0.22.0/buildifier && chmod +x buildifier && mv buildifier $HOME/bin/
24+
25+
- name: Build
26+
shell: bash
27+
run: bazel build ...
28+
29+
- name: Test
30+
shell: bash
31+
run: bazel test ...

.github/workflows/cmake.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CMake build
2+
3+
on: [push]
4+
5+
env:
6+
BUILD_TYPE: Release
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Create Build Environment
16+
run: cmake -E make_directory ${{github.workspace}}/build
17+
18+
- name: Configure CMake
19+
# Use a bash shell so we can use the same syntax for environment variable
20+
# access regardless of the host operating system
21+
shell: bash
22+
working-directory: ${{github.workspace}}/build
23+
# Note the current convention is to use the -S and -B options here to specify source
24+
# and build directories, but this is only available with CMake 3.13 and higher.
25+
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
26+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
27+
28+
- name: Build
29+
working-directory: ${{github.workspace}}/build
30+
shell: bash
31+
# Execute the build. You can specify a specific target with "--target <NAME>"
32+
run: cmake --build . --config $BUILD_TYPE
33+
34+
- name: Test
35+
working-directory: ${{github.workspace}}/build
36+
shell: bash
37+
# Execute tests defined by the CMake configuration.
38+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
39+
# TODO Currently tests are run via bazel only.
40+
run: ctest -C $BUILD_TYPE

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
!.bazelversion
44
!.clang-format
55
!.gitignore
6-
!.travis.yml
6+
!.github
77
bazel-*
8+
!bazel-*.sh
89
compile_commands.json
910
perf.data*
1011
build
12+

.travis.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

BUILD

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ config_setting(
1212
constraint_values = ["@bazel_tools//platforms:osx"],
1313
)
1414

15+
config_setting(
16+
name = "macos_not_ios",
17+
constraint_values = ["@bazel_tools//platforms:osx"],
18+
)
19+
1520
config_setting(
1621
name = "windows",
1722
constraint_values = ["@bazel_tools//platforms:windows"],
@@ -33,6 +38,11 @@ config_setting(
3338
},
3439
)
3540

41+
config_setting(
42+
name = "windows-x86_64",
43+
constraint_values = ["@bazel_tools//platforms:windows"],
44+
)
45+
3646
# Buildifier
3747

3848
sh_binary(

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,33 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
- Nothing yet.
9+
10+
11+
## [1.0.0] - 2021-03-23
12+
### Added
13+
- API: `MultiMap`: A wrapper that makes PH-Tree behave as a multi-map.
14+
- API: `erase(iterator)`
15+
- API: `emplace_hint(iterator, ...)`
16+
- API for `PhTreeF` and `PhTreeBoxF`: 32bit floating point options
17+
- Support for custom key classes
18+
19+
### Changed
20+
- BREAKING CHANGE: The query functions now require a query box as input (instead of a min/max point pair)
21+
- BREAKING CHANGE: `phtree_box_d.h` has been removed, please use `phtree.h instead.
22+
- BREAKING CHANGE: `phtree_d.h` has been removed, please use `phtree.h` instead.
23+
- BREAKING CHANGE: Data converters (IEEE, Multiply, etc) are now structs i.o. functions/functors
24+
- BREAKING CHANGE: `PhFilterNoOp` has been renamed to `FilterNoOp`
25+
- BREAKING CHANGE: kNN queries now always require the distance function to be specified.
26+
- BREAKING CHANGE: Preprocessors have been refactored and renamed to Converter/ScalarConverter
27+
- Moved CI builds from Travis to GitHub actions
28+
29+
### Removed
30+
- Nothing.
31+
32+
### Fixed
33+
- GCC warnings from `-Wsign-compare` and `-Wsequence-point`.
34+
835

936
## 0.1.0 - 2020-07-02
1037
### Added

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.14)
22

33
# set the project name
4-
project(PH_Tree_Main VERSION 0.1.0
4+
project(PH_Tree_Main VERSION 1.0.0
55
DESCRIPTION "PH-Tree C++"
66
LANGUAGES CXX)
77

@@ -12,7 +12,7 @@ endif()
1212
# specify the C++ standard
1313
set(CMAKE_CXX_STANDARD 17)
1414
set(CMAKE_CXX_STANDARD_REQUIRED True)
15-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
15+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fpermissive")
1616
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
1717

1818
add_subdirectory(phtree)

0 commit comments

Comments
 (0)