generated from SylvanBrocard/dpu_trees
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The algorithm failed when n_clusters*n_features > 256. New limits: - n_clusters <= 32 - n_features < 256 - n_clusters * n_features <= 4096
- Loading branch information
Showing
15 changed files
with
541 additions
and
328 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
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,68 @@ | ||
# from here: | ||
# | ||
# https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md | ||
|
||
function(dpu_kmeans_set_project_warnings project_name CLANG_WARNINGS | ||
GCC_WARNINGS) | ||
if("${CLANG_WARNINGS}" STREQUAL "") | ||
set(CLANG_WARNINGS | ||
-Wall | ||
-Wextra # reasonable and standard | ||
-Wshadow # warn the user if a variable declaration shadows one from a | ||
# parent context | ||
-Wnon-virtual-dtor # warn the user if a class with virtual functions has | ||
# a non-virtual destructor. This helps | ||
# catch hard to track down memory errors | ||
-Wold-style-cast # warn for c-style casts | ||
-Wcast-align # warn for potential performance problem casts | ||
-Wunused # warn on anything being unused | ||
-Woverloaded-virtual # warn if you overload (not override) a virtual | ||
# function | ||
-Wpedantic # warn if non-standard C++ is used | ||
-Wconversion # warn on type conversions that may lose data | ||
-Wsign-conversion # warn on sign conversions | ||
-Wnull-dereference # warn if a null dereference is detected | ||
-Wdouble-promotion # warn if float is implicit promoted to double | ||
-Wformat=2 # warn on security issues around functions that format output | ||
# (ie printf) | ||
-Wimplicit-fallthrough # warn on statements that fallthrough without an | ||
# explicit annotation | ||
) | ||
endif() | ||
|
||
if("${GCC_WARNINGS}" STREQUAL "") | ||
set(GCC_WARNINGS | ||
${CLANG_WARNINGS} | ||
-Wmisleading-indentation # warn if indentation implies blocks where | ||
# blocks do not exist | ||
-Wduplicated-cond # warn if if / else chain has duplicated conditions | ||
-Wduplicated-branches # warn if if / else branches have duplicated code | ||
-Wlogical-op # warn about logical operations being used where bitwise | ||
# were probably wanted | ||
-Wuseless-cast # warn if you perform a cast to the same type | ||
-Wsuggest-override # warn if an overridden member function is not marked | ||
# 'override' or 'final' | ||
) | ||
endif() | ||
|
||
if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang" OR CMAKE_C_COMPILER_ID MATCHES | ||
".*Clang") | ||
set(PROJECT_WARNINGS_CXX ${CLANG_WARNINGS}) | ||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
set(PROJECT_WARNINGS_CXX ${GCC_WARNINGS}) | ||
else() | ||
message( | ||
AUTHOR_WARNING | ||
"No compiler warnings set for CXX compiler: '${CMAKE_CXX_COMPILER_ID}'") | ||
endif() | ||
|
||
# use the same warning flags for C | ||
set(PROJECT_WARNINGS_C "${PROJECT_WARNINGS_CXX}") | ||
|
||
target_compile_options( | ||
${project_name} | ||
PRIVATE # C++ warnings | ||
$<$<COMPILE_LANGUAGE:CXX>:${PROJECT_WARNINGS_CXX}> | ||
# C warnings | ||
$<$<COMPILE_LANGUAGE:C>:${PROJECT_WARNINGS_C}>) | ||
endfunction() |
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
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
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
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
Oops, something went wrong.