Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d81799e
[doc] fixing the readme
simogasp Jan 30, 2020
2cb056f
[doc] LICENSE -> COPYING
simogasp Jan 30, 2020
c2cacc2
[github] github templates for issues and pr
simogasp Jan 30, 2020
4a9a777
[github] stale settings for issues
simogasp Jan 30, 2020
fed7a9c
[doc] code of conduct and contributing
simogasp Jan 30, 2020
89cd83e
[cmake] removed FindPopsift and move Config.cmake to root
simogasp Jan 30, 2020
5886b4f
[cmake] config and version headers inside cmake and refactoring
simogasp Jan 30, 2020
02fa995
[cmake] just formatting
simogasp Jan 30, 2020
b568a8e
[cmake] added languages to the project
simogasp Jan 31, 2020
36762cc
[cmake] just lowercase
simogasp Jan 31, 2020
318036f
[cmake] building everything in (system)-(architecture)
simogasp Jan 31, 2020
9d99e22
[cmake] using GNUInstallDirs
simogasp Jan 31, 2020
47c87f1
[cmake] fix target_include_directories
simogasp Jan 31, 2020
4682c05
added clangformat
simogasp Jan 31, 2020
4269560
[ci] using cmake 3.13.5
simogasp Jan 31, 2020
d327f6c
[cmake] build shared by default
simogasp Jan 31, 2020
f1d57d0
[doc] ack and fixes
simogasp Jan 31, 2020
2a45751
[cmake] CUDA_INCLUDE_DIRECTORIES not necessary for higher versions
simogasp Jan 31, 2020
ddb1950
[cmake] useless define version
simogasp Jan 31, 2020
474c027
[cmake] maquillage
simogasp Jan 31, 2020
1212888
[cmake] prepend popsift_ to avoid conflicts
simogasp Jan 31, 2020
f98c68e
[cmake] add build recap messages
simogasp Feb 3, 2020
23143e9
[cmake] fix path to popsift-demo in scripts
simogasp Feb 3, 2020
35daced
[cmake] avoid possible conflicts
simogasp Feb 3, 2020
ff5ea23
using POPSIFT_USE_NVTX instead of def USE_NVTX
simogasp Feb 3, 2020
3a2a7da
using c std library c++ way
simogasp Feb 3, 2020
a134a90
[cmake] allows include "config" and <popsift/config> when in-tree
simogasp Feb 3, 2020
1d540fb
[cmake] using gnudir
simogasp Feb 3, 2020
46e5557
[app] add print popsift version
simogasp Feb 3, 2020
79e92a6
[cmake] add target file for in-build use
simogasp Feb 3, 2020
eb3d9b3
[cmake] removed redundant flags
simogasp Feb 4, 2020
10ea9a0
[cmake] minimum version 3.12
simogasp Feb 13, 2020
845cba4
[doc] add changelog
simogasp Feb 13, 2020
1f218a9
[doc] describe float* input option to readme
Feb 21, 2020
63cc139
[doc] added CII badge
simogasp Feb 21, 2020
956bf22
[cmake] add message when popsift found in apps
simogasp Feb 25, 2020
85946b3
[doc] added codacy badge
simogasp Feb 26, 2020
f49263d
Merge branch 'develop' into dev/cleaning
simogasp Feb 26, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
BasedOnStyle: Mozilla
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeInheritanceComma: false
ColumnLimit: 120
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
Cpp11BracedListStyle: true
DerivePointerAlignment: false
IndentCaseLabels: true
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
PointerAlignment: Left
ReflowComments: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Never
SpaceInEmptyParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug report
about: Create a report to help us improve
title: "[bug]"
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Log**
If applicable, copy paste the relevant log output (please embed the text in a markdown code tag "\`\`\`" )

**Desktop (please complete the following and other pertinent information):**
- OS: [e.g. win 10, osx, ]
- PopSift version: please specify if you are using a release version or your own build
- Binary version (if applicable) [e.g. 2019.1]
- Commit reference (if applicable) [e.g. 08ddbe2]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[request]"
labels: feature request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/question_help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Question or help needed
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...)
title: "[question]"
labels: type:question
assignees: ''

---

**Describe the problem**
A clear and concise description of what the problem is.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Dataset**
If applicable, add a link or *few* images to help better understand where the problem may come from.

**Log**
If applicable, copy paste the relevant log output (please embed the text in a markdown code tag "\`\`\`" )

**Desktop (please complete the following and other pertinent information):**
- OS: [e.g. win 10, osx, ]
- PopSift version: please specify if you are using a release version or your own build
- Binary version (if applicable) [e.g. 2019.1]
- Commit reference (if applicable) [e.g. 08ddbe2]

**Additional context**
Add any other context about the problem here.
29 changes: 29 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- Checklist before submission:

- I have read the [contribution guidelines](../CONTRIBUTING.md).
- I have updated the documentation, if applicable.
- I have ensured that the change is tested somewhere.
- I have followed the prevailing code style (for history readability and limit conflicts for maintainance).

-->
## Description



## Features list

<!--
- [ ] Feature one. Fix #XXX
- [ ] Improve something else
- [ ] Connect to #3 (to declare link to issues without closing it when the PR is merged).
- [X] Add "X" when it is done.
-->


## Implementation remarks


<!--
Explain main implementation choices.
It is also the right place to ask for feedback and help when you hesitate on the implementation.
-->
28 changes: 28 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 120
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- "do not close"

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: true

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: true

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: true

# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
This issue is closed due to inactivity. Feel free to re-open if new information
is available.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ env:
- POPSIFT_APP_INSTALL=${POPSIFT_APP_BUILD}/install
# CMAKE
# - CMAKE_URL="https://cmake.org/files/v3.6/cmake-3.6.1-Linux-x86_64.tar.gz"
- CMAKE_URL="https://cmake.org/files/v3.4/cmake-3.4.1-Linux-x86_64.tar.gz"
- CMAKE_URL="https://cmake.org/files/v3.13/cmake-3.13.5-Linux-x86_64.tar.gz"
- CMAKE_ROOT=${TRAVIS_BUILD_DIR}/cmake
- CMAKE_SOURCE=${CMAKE_ROOT}/source
- CMAKE_INSTALL=${CMAKE_ROOT}/install
Expand Down
22 changes: 22 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# PopSift Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

### Changed

### Fixed

### Removed

## [1.0.0] - YYYY-MM-DD

- Support for cuda 9 and 10
- Support for RTX architecture
- Optional grid filtering
82 changes: 62 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
# CMake below 3.4 does not work with CUDA separable compilation at all
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.12)

project(PopSift VERSION 1.0.0)
project(PopSift VERSION 1.0.0 LANGUAGES CXX)

# Set build path as a folder named as the platform (linux, windows, darwin...) plus the processor type
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
set(LIBRARY_OUTPUT_PATH "${PROJECT_BINARY_DIR}/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")

option(PopSift_BUILD_EXAMPLES "Build PopSift applications." ON)
option(PopSift_USE_NVTX_PROFILING "Use CUDA NVTX for profiling." OFF)
option(PopSift_ERRCHK_AFTER_KERNEL "Synchronize and check CUDA error after every kernel." OFF)
option(PopSift_USE_POSITION_INDEPENDENT_CODE "Generate position independent code." ON)
option(PopSift_USE_GRID_FILTER "Switch off grid filtering to massively reduce compile time while debugging other things." ON)
option(PopSift_USE_NORMF "The __normf function computes Euclidian distance on large arrays. Fast but stability is uncertain." OFF)
option(PopSift_USE_TEST_CMD "Add testing step for functional verification" OFF)
option(PopSift_BOOST_USE_STATIC_LIBS "Link with static Boost libraries" OFF)
option(PopSift_NVCC_WARNINGS "Switch on several additional warning for CUDA nvcc" OFF)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)

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

if(PopSift_BOOST_USE_STATIC_LIBS)
set(Boost_USE_STATIC_LIBS ON)
Expand All @@ -31,15 +37,24 @@ else()
message(STATUS "Building in ${CMAKE_BUILD_TYPE} configuration")
endif()

set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
# for some reason this line is necessary to propagate the standard to nvcc
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_STANDARD 11)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)

# ==============================================================================
# GNUInstallDirs CMake module
# - Define GNU standard installation directories
# - Provides install directory variables as defined by the GNU Coding Standards.
# ==============================================================================
include(GNUInstallDirs)

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

#################
# BOOST
#################
find_package(Boost 1.53.0 REQUIRED COMPONENTS system thread)
if(WIN32)
add_definitions("-DBOOST_ALL_NO_LIB")
Expand All @@ -62,6 +77,9 @@ else()
set(CUDA_USE_STATIC_CUDA_RUNTIME ON)
endif()

###################
# CUDA
###################
find_package(CUDA 7.0 REQUIRED)

if(NOT CUDA_FOUND)
Expand Down Expand Up @@ -145,9 +163,9 @@ if( ( CUDA_VERSION VERSION_EQUAL "7.5" ) OR ( CUDA_VERSION VERSION_GREATER "7.5"
endif()

if(PopSift_USE_NORMF AND CUDA_VERSION VERSION_GREATER "7.4")
set(HAVE_NORMF 1)
set(PopSift_HAVE_NORMF 1)
else()
set(HAVE_NORMF 0)
set(PopSift_HAVE_NORMF 0)
endif()

if( ( CUDA_VERSION VERSION_EQUAL "9.0" ) OR ( CUDA_VERSION VERSION_GREATER "9.0") )
Expand All @@ -169,7 +187,9 @@ cuda_find_library_local_first(CUDA_CUDADEVRT_LIBRARY cudadevrt "\"cudadevrt\" li
if(PopSift_USE_NVTX_PROFILING)
# library required for NVTX profiling of the CPU
cuda_find_library_local_first(CUDA_NVTX_LIBRARY nvToolsExt "NVTX library")
add_definitions(-DUSE_NVTX)
set(PopSift_USE_NVTX 1)
else()
set(PopSift_USE_NVTX 0)
endif()

add_subdirectory(src)
Expand All @@ -184,5 +204,27 @@ CONFIGURE_FILE(
"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake")

"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake")


######################################
# SUMMARY
######################################
message("\n")
message("******************************************")
message("Building configuration:\n")
message(STATUS "PopSift version: " ${PROJECT_VERSION})
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
message(STATUS "Build Shared libs: " ${BUILD_SHARED_LIBS})
message(STATUS "Build examples: " ${PopSift_BUILD_EXAMPLES})
message(STATUS "Generate position independent code: " ${PopSift_USE_POSITION_INDEPENDENT_CODE})
message(STATUS "Use CUDA NVTX for profiling: " ${PopSift_USE_NVTX_PROFILING})
message(STATUS "Synchronize and check CUDA error after every kernel: " ${PopSift_ERRCHK_AFTER_KERNEL})
message(STATUS "Grid filtering: " ${PopSift_USE_GRID_FILTER})
message(STATUS "Testing step: " ${PopSift_USE_TEST_CMD})
message(STATUS "Link with static Boost libraries: " ${PopSift_BOOST_USE_STATIC_LIBS})
message(STATUS "Additional warning for CUDA nvcc: " ${PopSift_NVCC_WARNINGS})
message(STATUS "Compiling for CUDA CCs: ${PopSift_CUDA_CC_LIST}")
message(STATUS "Install path: " ${CMAKE_INSTALL_PREFIX})
message("\n******************************************")
message("\n")
Loading