Skip to content

Commit 2c03fa4

Browse files
authored
Merge pull request #36 from DCM-UPB/polish
unmerged changes + polish
2 parents d813768 + 3fa5dff commit 2c03fa4

File tree

259 files changed

+1042
-2813
lines changed

Some content is hidden

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

259 files changed

+1042
-2813
lines changed

.gitignore

Lines changed: 6 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -- Mac OS files (from github's Global/OSX.gitignore) --
1+
<# -- Mac OS files (from github's Global/OSX.gitignore) --
22
.DS_Store
33
.AppleDouble
44
.LSOverride
@@ -58,85 +58,13 @@ xcuserdata
5858
DerivedData
5959
*.xcuserstate
6060

61-
# -- Automake files (http://www.gnu.org/software/automake)
62-
63-
Makefile
64-
Makefile.in
65-
.libs
66-
.dirstamp
67-
test-suite.log
68-
/ar-lib
69-
/mdate-sh
70-
/py-compile
71-
/test-driver
72-
/ylwrap
73-
74-
# --- Autoconf files (http://www.gnu.org/software/autoconf)
75-
76-
aminclude_static.am
77-
config.h
78-
config.h.in
79-
config.h.in~
80-
config.log
81-
config.status
82-
.deps
83-
autom4te.cache
84-
/autoscan.log
85-
/autoscan-*.log
86-
/aclocal.m4
87-
/compile
88-
/config.guess
89-
/config.h.in
90-
/config.sub
91-
/configure
92-
/configure.scan
93-
/depcomp
94-
/install-sh
95-
/missing
96-
/stamp-h1
97-
98-
# --- Files added by autoreconf -i
99-
100-
/ltmain.sh
101-
libtool
102-
COPYING
103-
INSTALL
104-
105-
# --- Texinfo files (http://www.gnu.org/software/texinfo)
106-
107-
/texinfo.tex
108-
109-
# --- M4 files (http://www.gnu.org/software/m4)
110-
111-
m4/libtool.m4
112-
m4/ltoptions.m4
113-
m4/ltsugar.m4
114-
m4/ltversion.m4
115-
m4/lt~obsolete.m4
116-
11761
# -- project specific ignores --
62+
lib*
63+
build
11864
config.sh
119-
exe
120-
exe.prof*
121-
vgcore*
122-
*.o
123-
*.dSYM
124-
*.swp
125-
*.swo
126-
*.gcno
127-
*.lo
128-
*.la
129-
*.gcda
130-
*.log
131-
*.trs
65+
vgcore*
13266

133-
test/*.txt
134-
test/ut*/*.txt
135-
136-
benchmark/*/benchmark_*.out
137-
138-
examples/*/*.txt
139-
examples/*/*/*.txt
67+
benchmark/*/*.out
14068

14169
doc/*.aux
14270
doc/*.dvi
@@ -149,8 +77,6 @@ doc/*.fdb_latexmk
14977
doc/*.fls
15078
doc/*.ilg
15179
doc/*.ind
152-
doc/*.lb
15380
doc/auto
81+
15482
doc/doxygen/*/*
155-
!doc/doxygen/doxygen.conf
156-
!doc/doxygen/doxygen.html

.travis.yml

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,93 @@
1-
sudo: required
2-
dist: trusty
1+
dist: xenial
32
language: c++
43
services:
54
- docker
65

6+
addons:
7+
apt:
8+
packages:
9+
- valgrind
10+
- libgsl-dev
11+
12+
homebrew:
13+
packages:
14+
- valgrind
15+
- gsl
16+
717
matrix:
818
include:
9-
#- os: linux
10-
# env:
11-
# - MATRIX_EVAL="wget ftp://ftp.gnu.org/gnu/gsl/gsl-2.3.tar.gz && tar -xvf gsl-2.3.tar.gz && cd gsl-2.3 && ./configure && make -j2 && sudo make install && cd ../ && export LDFLAGS=-L/usr/local/lib && export CPPFLAGS=-I/usr/local/include"
12-
# - USE_DOCKER="FALSE"
13-
# - USE_GCOV="FALSE"
14-
1519
- os: linux // arch linux docker
1620
env:
21+
- MYCXX="g++"
1722
- USE_DOCKER="TRUE"
18-
- USE_OPENMP="FALSE"
1923
- USE_GCOV="FALSE"
20-
21-
- os: linux // with enabled openmp
22-
env:
23-
- USE_DOCKER="TRUE"
2424
- USE_OPENMP="TRUE"
25-
- USE_GCOV="FALSE"
2625

2726
- os: osx
28-
osx_image: xcode8
27+
osx_image: xcode10.1
2928
env:
30-
- MATRIX_EVAL="brew update && brew install gsl valgrind"
3129
- MYCXX="g++"
3230
- USE_DOCKER="FALSE"
33-
- USE_GCOV="FALSE"
31+
- USE_GCOV="TRUE"
32+
- USE_OPENMP="FALSE"
3433

3534
- os: osx
36-
osx_image: xcode8
35+
osx_image: xcode10.1
3736
env:
38-
- MATRIX_EVAL="brew update && brew install gsl valgrind"
3937
- MYCXX="clang++"
4038
- USE_DOCKER="FALSE"
41-
- USE_GCOV="TRUE"
39+
- USE_GCOV="FALSE"
40+
- USE_OPENMP="FALSE"
4241

4342
before_install:
4443
- |
4544
if [[ "$USE_DOCKER" == "TRUE" ]]; then
4645
docker pull nnvmc/base;
47-
local configopt="--enable-debug"
48-
if [[ "$USE_OPENMP" == "TRUE" ]]; then configopt="${configopt} --enable-openmp"; fi;
49-
if [[ "$USE_GCOV" == "TRUE" ]]; then configopt="${configopt} --enable-coverage"; fi;
50-
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo && ./autogen.sh && ./configure ${configopt}";
5146
else
52-
eval "${MATRIX_EVAL}" && ${MYCXX} -v;
53-
./autogen.sh
54-
local configopt="--enable-debug"
55-
if [[ "$USE_GCOV" == "TRUE" ]]; then pip install cpp-coveralls; configopt="${configopt} --enable-coverage"; fi;
56-
./configure CXX=${MYCXX} ${configopt};
47+
${MYCXX} -v;
5748
fi;
49+
echo "CXX_COMPILER=${MYCXX}" >> config.sh;
50+
echo "CXX_FLAGS=\"-O0 -g -Wall -Wno-unused-function ${configopt}\"" >> config.sh;
51+
if [[ "$USE_GCOV" == "TRUE" ]]; then
52+
echo "USE_COVERAGE=1" >> config.sh;
53+
else
54+
echo "USE_COVERAGE=0" >> config.sh;
55+
fi;
56+
if [[ "$USE_OPENMP" == "TRUE" ]]; then
57+
echo "USE_OPENMP=1" >> config.sh;
58+
else
59+
echo "USE_OPENMP=0" >> config.sh;
60+
fi;
61+
echo "GSL_ROOT=" >> config.sh;
5862
5963
script:
6064
- |
6165
if [[ "$USE_DOCKER" == "TRUE" ]]; then
62-
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo && make check" || exit 1;
63-
if [[ "$USE_GCOV" == "TRUE" ]]; then
64-
docker run -e TRAVIS=$TRAVIS -e TRAVIS_JOB_ID=$TRAVIS_JOB_ID -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "pip install cpp-coveralls && cd /root/repo && coveralls -b lib -e test -e benchmark -e include -e lib -e examples -e script -i src --gcov-options '\-lp'";
66+
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo && ./build.sh" || exit 1;
67+
else
68+
./build.sh || exit 1;
6569
fi;
70+
71+
- |
72+
if [[ "$USE_DOCKER" == "TRUE" ]]; then
73+
if [[ "$USE_OPENMP" == "TRUE" ]]; then
74+
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/build && make test";
75+
elif [[ "$USE_GCOV" == "TRUE" ]]; then
76+
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/build && make test";
77+
docker run -e TRAVIS=$TRAVIS -e TRAVIS_JOB_ID=$TRAVIS_JOB_ID -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "pip install cpp-coveralls && cd /root/repo/build && coveralls --verbose -b ./ -r ../ -i include -i src -x .cpp -x .hpp --gcov-options '\-lp'";
6678
else
67-
make check || exit 1;
68-
if [[ "$USE_GCOV" == "TRUE" ]]; then coveralls -b lib -e test -e benchmark -e include -e lib -e examples -e script -i src --gcov-options '\-lp' ; fi;
79+
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/test && ./run.sh";
80+
fi;
81+
else
82+
if [[ "$USE_OPENMP" == "TRUE" ]]; then
83+
cd build && make test && cd ..;
84+
elif [[ "$USE_GCOV" == "TRUE" ]]; then
85+
cd build && make test;
86+
sudo pip install cpp-coveralls && coveralls --verbose -b ./ -r ../ -i include -i src -x .cpp -x .hpp --gcov-options '\-lp' && cd .. ;
87+
else
88+
cd test && ./run.sh && cd .. ;
89+
fi;
6990
fi;
70-
- cat test/test-suite.log test/exe.log test/ut*/exe.log
7191
7292
notifications:
7393
email:

CMakeLists.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
cmake_minimum_required (VERSION 3.5)
2+
include(FindPackageHandleStandardArgs)
3+
4+
project (ffnn LANGUAGES CXX VERSION 0.0.1)
5+
6+
set(CMAKE_CXX_STANDARD 11)
7+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
8+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
9+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${USER_CXX_FLAGS}")
10+
11+
if (USE_COVERAGE)
12+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
13+
endif()
14+
15+
# find packages
16+
message(STATUS "Configured GSL_ROOT_DIR: ${GSL_ROOT_DIR}")
17+
18+
if (USE_OPENMP)
19+
find_package(OpenMP)
20+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -DOPENMP")
21+
message(STATUS "OPENMP_LIBRARY_PATHS: ${OpenMP_CXX_LIBRARY}")
22+
message(STATUS "OPENMP_LIBRARIES: ${OpenMP_CXX_LIBRARIES}")
23+
endif()
24+
25+
find_package(GSL)
26+
message(STATUS "GSL_INCLUDE_DIRS: ${GSL_INCLUDE_DIRS}")
27+
message(STATUS "GSL_LIBRARIES: ${GSL_LIBRARIES}")
28+
29+
message(STATUS "Configured CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
30+
message(STATUS "Configured CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
31+
32+
# set header / library paths
33+
include_directories(include/ "${GSL_INCLUDE_DIRS}") # headers
34+
35+
enable_testing()
36+
37+
# continue with subdirectories
38+
add_subdirectory(src)
39+
add_subdirectory(test)
40+
add_subdirectory(benchmark)
41+
add_subdirectory(examples)

Makefile.am

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

0 commit comments

Comments
 (0)