Skip to content

Commit deab76b

Browse files
committed
Merge branch 'develop' into feature/remove-boost-from-core
2 parents f763f12 + bf1c559 commit deab76b

32 files changed

+616
-225
lines changed

.clang-format

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
BasedOnStyle: Mozilla
3+
AlignTrailingComments: true
4+
AllowAllParametersOfDeclarationOnNextLine: true
5+
AllowShortBlocksOnASingleLine: true
6+
AllowShortCaseLabelsOnASingleLine: true
7+
AllowShortFunctionsOnASingleLine: All
8+
AllowShortIfStatementsOnASingleLine: false
9+
AllowShortLoopsOnASingleLine: false
10+
AlwaysBreakAfterReturnType: None
11+
AlwaysBreakAfterDefinitionReturnType: None
12+
AlwaysBreakTemplateDeclarations: true
13+
BinPackArguments: false
14+
BinPackParameters: false
15+
BreakBeforeBraces: Custom
16+
BraceWrapping:
17+
AfterClass: true
18+
AfterControlStatement: true
19+
AfterEnum: true
20+
AfterFunction: true
21+
AfterNamespace: false
22+
AfterObjCDeclaration: false
23+
AfterStruct: true
24+
AfterUnion: true
25+
AfterExternBlock: true
26+
BeforeCatch: true
27+
BeforeElse: true
28+
IndentBraces: false
29+
SplitEmptyFunction: false
30+
SplitEmptyRecord: false
31+
SplitEmptyNamespace: false
32+
BreakBeforeInheritanceComma: false
33+
ColumnLimit: 120
34+
CompactNamespaces: false
35+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
36+
Cpp11BracedListStyle: true
37+
DerivePointerAlignment: false
38+
IndentCaseLabels: true
39+
IndentWidth: 4
40+
KeepEmptyLinesAtTheStartOfBlocks: false
41+
Language: Cpp
42+
PointerAlignment: Left
43+
ReflowComments: true
44+
SpaceBeforeAssignmentOperators: true
45+
SpaceBeforeParens: Never
46+
SpaceInEmptyParentheses: false
47+
SpacesInContainerLiterals: false
48+
SpacesInParentheses: false
49+
SpacesInSquareBrackets: false
50+
Standard: Cpp11
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[bug]"
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Log**
27+
If applicable, copy paste the relevant log output (please embed the text in a markdown code tag "\`\`\`" )
28+
29+
**Desktop (please complete the following and other pertinent information):**
30+
- OS: [e.g. win 10, osx, ]
31+
- PopSift version: please specify if you are using a release version or your own build
32+
- Binary version (if applicable) [e.g. 2019.1]
33+
- Commit reference (if applicable) [e.g. 08ddbe2]
34+
35+
**Additional context**
36+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[request]"
5+
labels: feature request
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Question or help needed
3+
about: Ask question or for help for issues not related to program failures (e.g. "where I can find this feature", "my image is not recognized", "which parameter setting shall I use" etc...)
4+
title: "[question]"
5+
labels: type:question
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the problem**
11+
A clear and concise description of what the problem is.
12+
13+
**Screenshots**
14+
If applicable, add screenshots to help explain your problem.
15+
16+
**Dataset**
17+
If applicable, add a link or *few* images to help better understand where the problem may come from.
18+
19+
**Log**
20+
If applicable, copy paste the relevant log output (please embed the text in a markdown code tag "\`\`\`" )
21+
22+
**Desktop (please complete the following and other pertinent information):**
23+
- OS: [e.g. win 10, osx, ]
24+
- PopSift version: please specify if you are using a release version or your own build
25+
- Binary version (if applicable) [e.g. 2019.1]
26+
- Commit reference (if applicable) [e.g. 08ddbe2]
27+
28+
**Additional context**
29+
Add any other context about the problem here.

.github/pull_request_template.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!-- Checklist before submission:
2+
3+
- I have read the [contribution guidelines](../CONTRIBUTING.md).
4+
- I have updated the documentation, if applicable.
5+
- I have ensured that the change is tested somewhere.
6+
- I have followed the prevailing code style (for history readability and limit conflicts for maintainance).
7+
8+
-->
9+
## Description
10+
11+
12+
13+
## Features list
14+
15+
<!--
16+
- [ ] Feature one. Fix #XXX
17+
- [ ] Improve something else
18+
- [ ] Connect to #3 (to declare link to issues without closing it when the PR is merged).
19+
- [X] Add "X" when it is done.
20+
-->
21+
22+
23+
## Implementation remarks
24+
25+
26+
<!--
27+
Explain main implementation choices.
28+
It is also the right place to ask for feedback and help when you hesitate on the implementation.
29+
-->

.github/stale.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 120
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
6+
exemptLabels:
7+
- "do not close"
8+
9+
# Set to true to ignore issues in a project (defaults to false)
10+
exemptProjects: true
11+
12+
# Set to true to ignore issues in a milestone (defaults to false)
13+
exemptMilestones: true
14+
15+
# Set to true to ignore issues with an assignee (defaults to false)
16+
exemptAssignees: true
17+
18+
# Label to use when marking an issue as stale
19+
staleLabel: stale
20+
# Comment to post when marking an issue as stale. Set to `false` to disable
21+
markComment: >
22+
This issue has been automatically marked as stale because it has not had
23+
recent activity. It will be closed if no further activity occurs. Thank you
24+
for your contributions.
25+
# Comment to post when closing a stale issue. Set to `false` to disable
26+
closeComment: >
27+
This issue is closed due to inactivity. Feel free to re-open if new information
28+
is available.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ env:
3434
- POPSIFT_APP_INSTALL=${POPSIFT_APP_BUILD}/install
3535
# CMAKE
3636
# - CMAKE_URL="https://cmake.org/files/v3.6/cmake-3.6.1-Linux-x86_64.tar.gz"
37-
- CMAKE_URL="https://cmake.org/files/v3.4/cmake-3.4.1-Linux-x86_64.tar.gz"
37+
- CMAKE_URL="https://cmake.org/files/v3.13/cmake-3.13.5-Linux-x86_64.tar.gz"
3838
- CMAKE_ROOT=${TRAVIS_BUILD_DIR}/cmake
3939
- CMAKE_SOURCE=${CMAKE_ROOT}/source
4040
- CMAKE_INSTALL=${CMAKE_ROOT}/install

CHANGES.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# PopSift Changelog
2+
3+
All notable changes to this project are documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
### Changed
13+
14+
### Fixed
15+
16+
### Removed
17+
18+
## [1.0.0] - YYYY-MM-DD
19+
20+
- Support for cuda 9 and 10
21+
- Support for RTX architecture
22+
- Optional grid filtering

CMakeLists.txt

Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
# CMake below 3.4 does not work with CUDA separable compilation at all
2-
cmake_minimum_required(VERSION 3.4)
2+
cmake_minimum_required(VERSION 3.12)
33

4-
project(PopSift VERSION 1.0.0)
4+
project(PopSift VERSION 1.0.0 LANGUAGES CXX)
5+
6+
# Set build path as a folder named as the platform (linux, windows, darwin...) plus the processor type
7+
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
8+
set(LIBRARY_OUTPUT_PATH "${PROJECT_BINARY_DIR}/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
9+
10+
option(PopSift_BUILD_EXAMPLES "Build PopSift applications." ON)
11+
option(PopSift_USE_NVTX_PROFILING "Use CUDA NVTX for profiling." OFF)
12+
option(PopSift_ERRCHK_AFTER_KERNEL "Synchronize and check CUDA error after every kernel." OFF)
13+
option(PopSift_USE_POSITION_INDEPENDENT_CODE "Generate position independent code." ON)
14+
option(PopSift_USE_GRID_FILTER "Switch off grid filtering to massively reduce compile time while debugging other things." ON)
15+
option(PopSift_USE_NORMF "The __normf function computes Euclidian distance on large arrays. Fast but stability is uncertain." OFF)
16+
option(PopSift_USE_TEST_CMD "Add testing step for functional verification" OFF)
17+
option(PopSift_NVCC_WARNINGS "Switch on several additional warning for CUDA nvcc" OFF)
18+
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
519

6-
OPTION(PopSift_BUILD_EXAMPLES "Build PopSift applications." ON)
7-
OPTION(PopSift_USE_NVTX_PROFILING "Use CUDA NVTX for profiling." OFF)
8-
OPTION(PopSift_ERRCHK_AFTER_KERNEL "Synchronize and check CUDA error after every kernel." OFF)
9-
OPTION(PopSift_USE_POSITION_INDEPENDENT_CODE "Generate position independent code." ON)
10-
OPTION(PopSift_USE_GRID_FILTER "Switch off grid filtering to massively reduce compile time while debugging other things." ON)
11-
OPTION(PopSift_USE_NORMF "The __normf function computes Euclidian distance on large arrays. Fast but stability is uncertain." OFF)
12-
OPTION(PopSift_USE_TEST_CMD "Add testing step for functional verification" OFF)
13-
OPTION(PopSift_NVCC_WARNINGS "Switch on several additional warning for CUDA nvcc" OFF)
1420

1521
if(PopSift_USE_POSITION_INDEPENDENT_CODE)
1622
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@@ -26,14 +32,20 @@ else()
2632
message(STATUS "Building in ${CMAKE_BUILD_TYPE} configuration")
2733
endif()
2834

29-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
30-
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
35+
# for some reason this line is necessary to propagate the standard to nvcc
3136
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
3237
set(CMAKE_CXX_STANDARD 11)
3338
set(CMAKE_CXX_STANDARD_REQUIRED ON)
39+
set(CMAKE_CUDA_STANDARD 11)
40+
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
41+
42+
# ==============================================================================
43+
# GNUInstallDirs CMake module
44+
# - Define GNU standard installation directories
45+
# - Provides install directory variables as defined by the GNU Coding Standards.
46+
# ==============================================================================
47+
include(GNUInstallDirs)
3448

35-
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -G")
36-
# set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -G")
3749

3850
if(BUILD_SHARED_LIBS)
3951
message(STATUS "BUILD_SHARED_LIBS ON")
@@ -53,6 +65,9 @@ endif()
5365
# Require threads because of std::thread.
5466
find_package(Threads REQUIRED)
5567

68+
###################
69+
# CUDA
70+
###################
5671
find_package(CUDA 7.0 REQUIRED)
5772

5873
if(NOT CUDA_FOUND)
@@ -136,9 +151,9 @@ if( ( CUDA_VERSION VERSION_EQUAL "7.5" ) OR ( CUDA_VERSION VERSION_GREATER "7.5"
136151
endif()
137152

138153
if(PopSift_USE_NORMF AND CUDA_VERSION VERSION_GREATER "7.4")
139-
set(HAVE_NORMF 1)
154+
set(PopSift_HAVE_NORMF 1)
140155
else()
141-
set(HAVE_NORMF 0)
156+
set(PopSift_HAVE_NORMF 0)
142157
endif()
143158

144159
if( ( CUDA_VERSION VERSION_EQUAL "9.0" ) OR ( CUDA_VERSION VERSION_GREATER "9.0") )
@@ -160,7 +175,9 @@ cuda_find_library_local_first(CUDA_CUDADEVRT_LIBRARY cudadevrt "\"cudadevrt\" li
160175
if(PopSift_USE_NVTX_PROFILING)
161176
# library required for NVTX profiling of the CPU
162177
cuda_find_library_local_first(CUDA_NVTX_LIBRARY nvToolsExt "NVTX library")
163-
add_definitions(-DUSE_NVTX)
178+
set(PopSift_USE_NVTX 1)
179+
else()
180+
set(PopSift_USE_NVTX 0)
164181
endif()
165182

166183
add_subdirectory(src)
@@ -175,5 +192,27 @@ CONFIGURE_FILE(
175192
"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
176193
IMMEDIATE @ONLY)
177194
ADD_CUSTOM_TARGET(uninstall
178-
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake")
179-
195+
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake")
196+
197+
198+
######################################
199+
# SUMMARY
200+
######################################
201+
message("\n")
202+
message("******************************************")
203+
message("Building configuration:\n")
204+
message(STATUS "PopSift version: " ${PROJECT_VERSION})
205+
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
206+
message(STATUS "Build Shared libs: " ${BUILD_SHARED_LIBS})
207+
message(STATUS "Build examples: " ${PopSift_BUILD_EXAMPLES})
208+
message(STATUS "Generate position independent code: " ${PopSift_USE_POSITION_INDEPENDENT_CODE})
209+
message(STATUS "Use CUDA NVTX for profiling: " ${PopSift_USE_NVTX_PROFILING})
210+
message(STATUS "Synchronize and check CUDA error after every kernel: " ${PopSift_ERRCHK_AFTER_KERNEL})
211+
message(STATUS "Grid filtering: " ${PopSift_USE_GRID_FILTER})
212+
message(STATUS "Testing step: " ${PopSift_USE_TEST_CMD})
213+
message(STATUS "Link with static Boost libraries: " ${PopSift_BOOST_USE_STATIC_LIBS})
214+
message(STATUS "Additional warning for CUDA nvcc: " ${PopSift_NVCC_WARNINGS})
215+
message(STATUS "Compiling for CUDA CCs: ${PopSift_CUDA_CC_LIST}")
216+
message(STATUS "Install path: " ${CMAKE_INSTALL_PREFIX})
217+
message("\n******************************************")
218+
message("\n")

0 commit comments

Comments
 (0)