Skip to content

Commit

Permalink
Merge pull request #5 from philippeganz/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
philippeganz committed Apr 22, 2018
2 parents 67d3ccf + 29b46c4 commit 11465dc
Show file tree
Hide file tree
Showing 35 changed files with 4,133 additions and 1,904 deletions.
92 changes: 63 additions & 29 deletions ASTROQUT.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,26 @@
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-Wnon-virtual-dtor" />
<Add option="-Wshadow" />
<Add option="-Winit-self" />
<Add option="-Wredundant-decls" />
<Add option="-Wcast-align" />
<Add option="-Wundef" />
<Add option="-Wfloat-equal" />
<Add option="-Winline" />
<Add option="-Wunreachable-code" />
<Add option="-Wmissing-declarations" />
<Add option="-Wmissing-include-dirs" />
<Add option="-Wswitch-enum" />
<Add option="-Wswitch-default" />
<Add option="-Weffc++" />
<Add option="-Wzero-as-null-pointer-constant" />
<Add option="-Wmain" />
<Add option="-pedantic" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-g" />
<Add option="-ftemplate-backtrace-limit=0" />
</Compiler>
</Target>
<Target title="DebugOg">
<Option output="bin/DebugOg/AstroQUT" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/DebugOg/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-Og" />
<Add option="-g" />
</Compiler>
</Target>
<Target title="ReleaseO1">
<Option output="bin/ReleaseO1/AstroQUT" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/ReleaseO1/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O1" />
</Compiler>
</Target>
<Target title="ReleaseO2">
Expand All @@ -42,7 +41,6 @@
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
<Add option="-g" />
</Compiler>
</Target>
<Target title="ReleaseO3">
Expand All @@ -52,13 +50,31 @@
<Option compiler="gcc" />
<Compiler>
<Add option="-O3" />
<Add option="-g" />
</Compiler>
</Target>
</Build>
<Compiler>
<Add option="-Wnon-virtual-dtor" />
<Add option="-Wshadow" />
<Add option="-Winit-self" />
<Add option="-Wredundant-decls" />
<Add option="-Wcast-align" />
<Add option="-Wundef" />
<Add option="-Wfloat-equal" />
<Add option="-Winline" />
<Add option="-Wunreachable-code" />
<Add option="-Wmissing-declarations" />
<Add option="-Wmissing-include-dirs" />
<Add option="-Wswitch-enum" />
<Add option="-Wswitch-default" />
<Add option="-Weffc++" />
<Add option="-Wzero-as-null-pointer-constant" />
<Add option="-Wmain" />
<Add option="-pedantic" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-m64" />
<Add option="-fopenmp -std=c++17 -march=native -mavx2" />
<Add option="-fopenmp -std=c++17 -march=native -mno-sse5" />
<Add directory="include" />
<Add directory="extern_include/eigen-eigen-5a0156e40feb" />
</Compiler>
Expand All @@ -76,12 +92,15 @@
<Unit filename="include/test/matrix.hpp" />
<Unit filename="include/test/operator.hpp" />
<Unit filename="include/utils/linearop.hpp" />
<Unit filename="include/utils/matrix.hpp" />
<Unit filename="include/utils/matrix/functions.hpp" />
<Unit filename="include/utils/operator.hpp" />
<Unit filename="include/utils/operator/convolution.hpp" />
<Unit filename="include/utils/operator/matmult.hpp" />
<Unit filename="include/utils/operators.hpp" />
<Unit filename="include/utils/linearop/matrix.hpp" />
<Unit filename="include/utils/linearop/operator.hpp" />
<Unit filename="include/utils/linearop/operator/abeltransform.hpp" />
<Unit filename="include/utils/linearop/operator/convolution.hpp" />
<Unit filename="include/utils/linearop/operator/convolution/blur.hpp" />
<Unit filename="include/utils/linearop/operator/fourier.hpp" />
<Unit filename="include/utils/linearop/operator/matmult.hpp" />
<Unit filename="include/utils/linearop/operator/matmult/spline.hpp" />
<Unit filename="include/utils/linearop/operator/wavelet.hpp" />
<Unit filename="src/WS.cpp" />
<Unit filename="src/fista/poisson.cpp" />
<Unit filename="src/main.cpp" />
Expand All @@ -90,10 +109,25 @@
<Unit filename="src/test/fista.cpp" />
<Unit filename="src/test/matrix.cpp" />
<Unit filename="src/test/operator.cpp" />
<Unit filename="src/utils/linearop/operator/abeltransform/apply.cpp" />
<Unit filename="src/utils/linearop/operator/abeltransform/generate.cpp" />
<Unit filename="src/utils/linearop/operator/convolution/blur.cpp" />
<Unit filename="src/utils/linearop/operator/matmult/spline.cpp" />
<Unit filename="src/utils/linearop/operator/wavelet/dwt.cpp" />
<Unit filename="src/utils/linearop/operator/wavelet/makeonfilter.cpp" />
<Extensions>
<code_completion />
<envvars />
<debugger />
<DoxyBlocks>
<comment_style block="0" line="1" />
<doxyfile_project />
<doxyfile_build />
<doxyfile_warnings warn_if_undocumented="1" />
<doxyfile_output />
<doxyfile_dot />
<general />
</DoxyBlocks>
</Extensions>
</Project>
</CodeBlocks_project_file>
13 changes: 4 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
CC := g++
CFLAGS := -std=c++14 -O2 -fopenmp -pedantic -Wall
DFLAGS := -MM -std=c++14
CFLAGS := -std=c++17 -O3 -fopenmp -pedantic -Wall -m64

PROJECTNAME := ASTROQUT
PROJECTNAME := AstroQUT

SOURCEDIR := src
SOURCES := $(shell find $(SOURCEDIR) -name '*.cpp')
HEADERDIR := include
EXTERNALHEADERDIR := extern_include/eigen-eigen-5a0156e40feb
OBJECTDIR := obj
OBJECTS := $(addprefix $(OBJECTDIR)/,$(SOURCES:%.cpp=%.o))
DEPENDS := $(addprefix $(OBJECTDIR)/,$(SOURCES:%.cpp=%.d))
Expand All @@ -22,12 +22,7 @@ $(PROJECTNAME): $(OBJECTS)
-include $(DEPENDS)

$(OBJECTDIR)/%.o: %.cpp
mkdir -p $(OBJECTDIR)/$(dir $<) && $(CC) $(CFLAGS) -I $(HEADERDIR) -c $< -o $@
$(CC) $(DFLAGS) -I $(HEADERDIR) $< > $(OBJECTDIR)/$(*D)/$(*F).d
@mv -f $(OBJECTDIR)/$(*D)/$(*F).d $(OBJECTDIR)/$(*D)/$(*F).d.tmp
@sed -e 's|.*:|$(OBJECTDIR)/$(*D)/$(*F).o:|' < $(OBJECTDIR)/$(*D)/$(*F).d.tmp > $(OBJECTDIR)/$(*D)/$(*F).d
@sed -e 's/.*://' -e 's/\\$$//' < $(OBJECTDIR)/$(*D)/$(*F).d.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $(OBJECTDIR)/$(*D)/$(*F).d
@rm -f $(OBJECTDIR)/$(*D)/$(*F).d.tmp
mkdir -p $(OBJECTDIR)/$(dir $<) && $(CC) $(CFLAGS) -I $(HEADERDIR) -I $(EXTERNALHEADERDIR) -c $< -o $@

.PHONY: clean

Expand Down
6 changes: 3 additions & 3 deletions include/WS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
/// \brief AstroQUT solver header
/// \author Jairo Diaz <[email protected]> 2016-2017
/// \author Philippe Ganz <[email protected]> 2017
/// \version 0.2.0
/// \date 2017-12-28
/// \version 0.3.0
/// \date 2018-02-25
/// \copyright GPL-3.0
///

#ifndef ASTROQUT_WS_HPP
#define ASTROQUT_WS_HPP

#include "utils/matrix.hpp"
#include "utils/linearop/matrix.hpp"


namespace astroqut{
Expand Down
6 changes: 4 additions & 2 deletions include/const.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
/// \file include/const.hpp
/// \brief Constant values used throughout the whole project
/// \author Philippe Ganz <[email protected]>
/// \version 0.2.0
/// \date 2018-01-07
/// \version 0.3.0
/// \date 2018-03-30
/// \copyright GPL-3.0
///

#ifndef ASTROQUT_CONST_HPP
#define ASTROQUT_CONST_HPP

//#define DEBUG
//#define VERBOSE
#define DO_ARGCHECKS

#endif // ASTROQUT_CONST_HPP
11 changes: 6 additions & 5 deletions include/fista/poisson.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
/// \brief FISTA (Fast Iterative Shrinkage Tresholding Algorithm) solver for Poisson distributed noise.
/// \author Hatef Monajemi <[email protected]> 2012-2014
/// \author Philippe Ganz <[email protected]> 2017-2018
/// \version 0.2.0
/// \date 2018-01-04
/// \version 0.3.0
/// \date 2018-02-25
/// \copyright GPL-3.0
///

#ifndef ASTROQUT_FISTA_POISSON_HPP
#define ASTROQUT_FISTA_POISSON_HPP

#include "utils/matrix.hpp"
#include "utils/operator/matmult.hpp"
#include "utils/operator/convolution.hpp"
#include "utils/linearop/matrix.hpp"
#include "utils/linearop/operator/matmult.hpp"
#include "utils/linearop/operator/convolution.hpp"

#include <iostream>
#include <iomanip>
Expand All @@ -32,6 +32,7 @@ struct Parameters
Parameters() noexcept
: tol(1e-6)
, max_iter(2000)
, init_value{}
, log(true)
, log_period(10)
{}
Expand Down
2 changes: 1 addition & 1 deletion include/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// \file include/settings.hpp
/// \brief Constant optimization values used throughout the whole project
/// \author Philippe Ganz <[email protected]>
/// \version 0.2.0
/// \version 0.3.0
/// \date 2018-01-07
/// \copyright GPL-3.0
///
Expand Down
52 changes: 47 additions & 5 deletions include/test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,64 @@
/// \file include/test.hpp
/// \brief Test suites to validate the project code
/// \author Philippe Ganz <[email protected]>
/// \version 0.2.0
/// \date 2017-12-28
/// \version 0.3.0
/// \date 2018-03-30
/// \copyright GPL-3.0
///

#ifndef ASTROQUT_TEST_HPP
#define ASTROQUT_TEST_HPP

#include "test/matrix.hpp"
#include "test/fista.hpp"
#include "test/matrix.hpp"
#include "test/operator.hpp"

#include <chrono>
#include <iostream>
#include <random>

namespace astroqut{
namespace test{

bool Matrix();
bool FISTA();
template <class T>
bool PerfTest(size_t length)
{
using namespace matrix;

Time<T>(length);

bool transpose_square = TransposeSquare<T>();
bool transpose_rect = TransposeRect<T>();

bool add = Add<T>();
bool sub = Sub<T>();
bool mult_square = MultSquare<T>();
bool mult_rect = MultRect<T>();
bool vect_mat = MultVectMat<T>();
bool mat_vect = MultMatVect<T>();

bool norm_one = NormOne<T>();
bool norm_two = NormTwo<T>();
bool norm_inf = NormInf<T>();

bool sum = Sum<T>();

bool shrink = Shrink<T>();

return transpose_square && transpose_rect && add && sub && mult_square && mult_rect && vect_mat && mat_vect && norm_one && norm_two && norm_inf && sum && shrink;
}

template <class T>
void PerfTestOptional(size_t length)
{
using namespace matrix;

Optimizations<T>(length);
}

bool OperatorTest();

bool FISTATest();

} // namespace test
} // namespace astroqut
Expand Down
8 changes: 3 additions & 5 deletions include/test/fista.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/// \file include/test/fista.hpp
/// \brief Test suite to validate the FISTA class.
/// \author Philippe Ganz <[email protected]>
/// \version 0.2.0
/// \date 2018-01-04
/// \version 0.3.0
/// \date 2018-01-12
/// \copyright GPL-3.0
///

Expand All @@ -21,9 +21,7 @@ namespace astroqut{
namespace test{
namespace fista{

bool SmallExample1();
bool SmallExample2();
bool SmallExample3();
bool SmallExample();

void Time(size_t length);

Expand Down
Loading

0 comments on commit 11465dc

Please sign in to comment.