Commit a6e80a24 authored by Pietro Incardona's avatar Pietro Incardona

Small changes

parent 9d44c008
......@@ -17,6 +17,8 @@ m4_ifdef([AX_BOOST_BASE],,[m4_include([m4/ax_boost_base.m4])])
m4_ifdef([AX_BOOST_IOSTREAMS],,[m4_include([m4/ax_boost_iostreams.m4])])
m4_ifdef([AX_BOOST_PROGRAM_OPTIONS],,[m4_include([m4/ax_boost_program_options.m4])])
m4_ifdef([AX_BOOST_UNIT_TEST_FRAMEWORK],,[m4_include([m4/ax_boost_unit_test_framework.m4])])
m4_ifdef([AX_BOOST_TIMER],,[m4_include(m4/ax_boost_timer.m4)])
m4_ifdef([AX_BOOST_SYSTEM],,[m4_include(m4/ax_boost_system.m4)])
case $host_os in
*cygwin*)
......@@ -261,6 +263,9 @@ AX_BOOST_BASE([1.52],[],[echo "boost not found"
AX_BOOST_UNIT_TEST_FRAMEWORK
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_IOSTREAMS
AX_BOOST_SYSTEM
AX_BOOST_CHRONO
AX_BOOST_TIMER
if test x"$ax_cv_boost_unit_test_framework" = x"no"; then
echo "Notify boost not usable"
......
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_boost_chrono.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_BOOST_CHRONO
#
# DESCRIPTION
#
# Test for System library from the Boost C++ libraries. The macro requires
# a preceding call to AX_BOOST_BASE. Further documentation is available at
# <http://randspringer.de/boost/index.html>.
#
# This macro calls:
#
# AC_SUBST(BOOST_CHRONO_LIB)
#
# And sets:
#
# HAVE_BOOST_CHRONO
#
# LICENSE
#
# Copyright (c) 2012 Xiyue Deng <manphiz@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 1
AC_DEFUN([AX_BOOST_CHRONO],
[
AC_ARG_WITH([boost-chrono],
AS_HELP_STRING([--with-boost-chrono@<:@=special-lib@:>@],
[use the Chrono library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-chrono=boost_chrono-gcc-mt ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_chrono_lib=""
else
want_boost="yes"
ax_boost_user_chrono_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_BUILD])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS -lboost_system"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::Chrono library is available,
ax_cv_boost_chrono,
[AC_LANG_PUSH([C++])
CXXFLAGS_SAVE=$CXXFLAGS
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/chrono.hpp>]],
[[boost::chrono::system_clock::time_point time;]])],
ax_cv_boost_chrono=yes, ax_cv_boost_chrono=no)
CXXFLAGS=$CXXFLAGS_SAVE
AC_LANG_POP([C++])
])
if test "x$ax_cv_boost_chrono" = "xyes"; then
AC_SUBST(BOOST_CPPFLAGS)
AC_DEFINE(HAVE_BOOST_CHRONO,,[define if the Boost::Chrono library is available])
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
LDFLAGS_SAVE=$LDFLAGS
if test "x$ax_boost_user_chrono_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_chrono*.so* $BOOSTLIBDIR/libboost_chrono*.dylib* $BOOSTLIBDIR/libboost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_chrono.*\)\.so.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
[BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
[link_chrono="no"])
done
if test "x$link_chrono" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_chrono*.dll* $BOOSTLIBDIR/boost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_chrono.*\)\.dll.*$;\1;' -e 's;^\(boost_chrono.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
[BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
[link_chrono="no"])
done
fi
else
for ax_lib in $ax_boost_user_chrono_lib boost_chrono-$ax_boost_user_chrono_lib; do
AC_CHECK_LIB($ax_lib, exit,
[BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
[link_chrono="no"])
done
fi
if test "x$ax_lib" = "x"; then
AC_MSG_ERROR(Could not find a version of the library!)
fi
if test "x$link_chrono" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_BOOST_SYSTEM
#
# DESCRIPTION
#
# Test for System library from the Boost C++ libraries. The macro requires
# a preceding call to AX_BOOST_BASE. Further documentation is available at
# <http://randspringer.de/boost/index.html>.
#
# This macro calls:
#
# AC_SUBST(BOOST_SYSTEM_LIB)
#
# And sets:
#
# HAVE_BOOST_SYSTEM
#
# LICENSE
#
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
# Copyright (c) 2008 Michael Tindal
# Copyright (c) 2008 Daniel Casimiro <dan.casimiro@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 18
AC_DEFUN([AX_BOOST_SYSTEM],
[
AC_ARG_WITH([boost-system],
AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@],
[use the System library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-system=boost_system-gcc-mt ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_system_lib=""
else
want_boost="yes"
ax_boost_user_system_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_BUILD])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::System library is available,
ax_cv_boost_system,
[AC_LANG_PUSH([C++])
CXXFLAGS_SAVE=$CXXFLAGS
CXXFLAGS=
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]],
[[boost::system::error_category *a = 0;]])],
ax_cv_boost_system=yes, ax_cv_boost_system=no)
CXXFLAGS=$CXXFLAGS_SAVE
AC_LANG_POP([C++])
])
if test "x$ax_cv_boost_system" = "xyes"; then
AC_SUBST(BOOST_CPPFLAGS)
AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available])
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
LDFLAGS_SAVE=$LDFLAGS
if test "x$ax_boost_user_system_lib" = "x"; then
for libextension in `ls -r $BOOSTLIBDIR/libboost_system* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
[link_system="no"])
done
if test "x$link_system" != "xyes"; then
for libextension in `ls -r $BOOSTLIBDIR/boost_system* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
[link_system="no"])
done
fi
else
for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do
AC_CHECK_LIB($ax_lib, exit,
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
[link_system="no"])
done
fi
if test "x$ax_lib" = "x"; then
AC_MSG_ERROR(Could not find a version of the library!)
fi
if test "x$link_system" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_boost_timer.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_BOOST_TIMER
#
# DESCRIPTION
#
# Test for System library from the Boost C++ libraries. The macro requires
# a preceding call to AX_BOOST_BASE. Further documentation is available at
# <http://randspringer.de/boost/index.html>.
#
# This macro calls:
#
# AC_SUBST(BOOST_TIMER_LIB)
#
# And sets:
#
# HAVE_BOOST_TIMER
#
# LICENSE
#
# Copyright (c) 2012 Xiyue Deng <manphiz@gmail.com>
# Copyright (c) 2012 Murray Cumming <murrayc@openismus.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 2 (based on serial 1 of ax_boost_locale.m4 with some simple find/replace by Murray Cumming)
AC_DEFUN([AX_BOOST_TIMER],
[
AC_ARG_WITH([boost-timer],
AS_HELP_STRING([--with-boost-timer@<:@=special-lib@:>@],
[use the Timer library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-timer=boost_timer-gcc-mt ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_timer_lib=""
else
want_boost="yes"
ax_boost_user_timer_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_BUILD])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS -lboost_chrono -lboost_system"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::Timer library is available,
ax_cv_boost_timer,
[AC_LANG_PUSH([C++])
CXXFLAGS_SAVE=$CXXFLAGS
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/timer/timer.hpp>]],
[[boost::timer::cpu_timer().stop();]])],
ax_cv_boost_timer=yes, ax_cv_boost_timer=no)
CXXFLAGS=$CXXFLAGS_SAVE
AC_LANG_POP([C++])
])
if test "x$ax_cv_boost_timer" = "xyes"; then
AC_SUBST(BOOST_CPPFLAGS)
AC_DEFINE(HAVE_BOOST_TIMER,,[define if the Boost::Timer library is available])
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
LDFLAGS_SAVE=$LDFLAGS
if test "x$ax_boost_user_timer_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_timer*.so* $BOOSTLIBDIR/libboost_timer*.dylib* $BOOSTLIBDIR/libboost_timer*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_timer.*\)\.so.*$;\1;' -e 's;^lib\(boost_timer.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_timer.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
[BOOST_TIMER_LIB="-l$ax_lib"; AC_SUBST(BOOST_TIMER_LIB) link_timer="yes"; break],
[link_timer="no"])
done
if test "x$link_timer" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_timer*.dll* $BOOSTLIBDIR/boost_timer*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_timer.*\)\.dll.*$;\1;' -e 's;^\(boost_timer.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
[BOOST_TIMER_LIB="-l$ax_lib"; AC_SUBST(BOOST_TIMER_LIB) link_timer="yes"; break],
[link_timer="no"])
done
fi
else
for ax_lib in $ax_boost_user_timer_lib boost_timer-$ax_boost_user_timer_lib; do
AC_CHECK_LIB($ax_lib, exit,
[BOOST_TIMER_LIB="-l$ax_lib"; AC_SUBST(BOOST_TIMER_LIB) link_timer="yes"; break],
[link_timer="no"])
done
fi
if test "x$ax_lib" = "x"; then
AC_MSG_ERROR(Could not find a version of the library!)
fi
if test "x$link_timer" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
......@@ -327,12 +327,12 @@ class Graph_CSR
// get the number of adjacent vertex
size_t id_x_end = v_l.template get<0>(v1);
#ifdef DEBUG
#ifdef SE_CLASS1
// Check that v1 and v2 exist
if (v1 >= v.size() || v2 >= v.size())
{
//std::cout << "Warning graph: creating an edge between vertex that does not exist" << "\n";
std::cout << "Warning graph: creating an edge between vertex that does not exist" << std::endl;
}
// Check that the edge does not already exist
......@@ -341,7 +341,7 @@ class Graph_CSR
{
if (e_l.template get<e_map::vid>(v1 * v_slot + s) == v2)
{
std::cerr << "Error graph: the edge already exist\n";
std::cerr << "Error graph: the edge already exist" << std::endl;
}
}
#endif
......@@ -743,15 +743,15 @@ public:
inline size_t getChild(size_t v, size_t i) const
{
#ifdef DEBUG
#ifdef SE_CLASS1
if (i >= v_l.template get<0>(v))
{
std::cerr << "Error " << __FILE__ << " line: " << __LINE__ << " vertex " << v << " does not have edge " << i << "\n";
std::cerr << "Error " << __FILE__ << " line: " << __LINE__ << " vertex " << v << " does not have edge " << i << std::endl;
}
if (e.size() <= e_l.template get<e_map::vid>(v * v_slot + i))
{
std::cerr << "Error " << __FILE__ << " " << __LINE__ << " edge " << v << " does not have edge "<< i << "\n";
std::cerr << "Error " << __FILE__ << " " << __LINE__ << " vertex " << v << " does not have edge "<< i << std::endl;
}
#endif
// Get the edge id
......@@ -769,15 +769,15 @@ public:
inline size_t getChild(typename openfpm::vector<V, Memory, layout_v, layout_v_base, grow_p>::iterator_key & v, size_t i)
{
#ifdef DEBUG
#ifdef SE_CLASS1
if (i >= v_l.template get<0>(v.get()))
{
std::cerr << "Error " << __FILE__ << " line: " << __LINE__ << " vertex " << v.get() << " does not have edge " << i << "\n";
std::cerr << "Error " << __FILE__ << " line: " << __LINE__ << " vertex " << v.get() << " does not have edge " << i << std::endl;
}
if (e.size() <= e_l.template get<e_map::eid>(v.get() * v_slot + i))
{
std::cerr << "Error " << __FILE__ << " " << __LINE__ << " edge " << v.get() << " does not have edge "<< i << "\n";
std::cerr << "Error " << __FILE__ << " " << __LINE__ << " vertex " << v.get() << " does not have edge "<< i << std::endl;
}
#endif
......
......@@ -256,9 +256,9 @@ public:
//! set the grid key from a list of numbers
template<typename a, typename ...T>void set(a v, T...t)
{
#ifdef DEBUG
#ifdef SE_CLASS1
if (sizeof...(t) != dim -1)
std::cerr << "Error grid_key: " << __FILE__ << " " << __LINE__ << "setting a key of dimension " << dim << " require " << dim << " numbers " << sizeof...(t) + 1 << " provided" << "\n";
std::cerr << "Error grid_key: " << __FILE__ << " " << __LINE__ << "setting a key of dimension " << dim << " require " << dim << " numbers " << sizeof...(t) + 1 << " provided" << std::endl;
#endif
k[dim-1] = v;
invert_assign(t...);
......
......@@ -22,7 +22,7 @@ BOOST_AUTO_TEST_CASE(grid_performance_set_obj)
fill_grid<3>(c3);
Point_test<float> f;
Point_test<float> f __attribute__((aligned(16)));
f.fill();
std::vector<double> times(N_STAT + 1);
......@@ -47,6 +47,8 @@ BOOST_AUTO_TEST_CASE(grid_performance_set_obj)
t.stop();
times[i] = t.getwct();
std::cout << "Time " << times[i] << std::endl;
}
std::sort(times.begin(),times.end());
sleep(5);
......
......@@ -8,7 +8,7 @@
#ifndef OPENFPM_DATA_SRC_GRID_ITERATORS_GRID_KEY_DX_ITERATOR_HPP_
#define OPENFPM_DATA_SRC_GRID_ITERATORS_GRID_KEY_DX_ITERATOR_HPP_
#include "Grid/grid_sm.hpp"
/**
*
......@@ -26,7 +26,7 @@
template<unsigned int dim>
class grid_key_dx_iterator
{
#ifdef DEBUG
#ifdef SE_CLASS1
// Actual status of the iterator, when the iterator is not initialized cannot be used
// and reinitialize must be called
bool initialized = false;
......@@ -61,7 +61,7 @@ public:
*/
grid_key_dx_iterator()
{
#ifdef DEBUG
#ifdef SE_CLASS1
initialized = false;
#endif
}
......@@ -80,7 +80,7 @@ public:
gk.set_d(i,g_it.get_gk(i));
}
#ifdef DEBUG
#ifdef SE_CLASS1
initialized = true;
#endif
}
......@@ -94,7 +94,7 @@ public:
{
reset();
#ifdef DEBUG
#ifdef SE_CLASS1
initialized = true;
#endif
}
......@@ -194,7 +194,7 @@ public:
* \return the actual key
*
*/
const grid_key_dx<dim> & get()
const grid_key_dx<dim> & get() const
{
return gk;
}
......@@ -215,10 +215,21 @@ public:
*/
void reset()
{
//! Initialize to 0 the index
// Initialize to 0 the index
for (size_t i = 0 ; i < dim ; i++)
{gk.set_d(i,0);}
// here we check if grid have a size equal to zero or negative
// in this case the grid has no points
for (size_t i = 0 ; i < dim ; i++)
{
// If the size of the grid is zero in any dimension set the iterator
// to the end point
if (grid_base.size(i) == 0)
gk.set_d(dim-1,grid_base.size(dim-1));
}
}
};
......
......@@ -8,6 +8,9 @@
#ifndef OPENFPM_DATA_SRC_GRID_ITERATORS_GRID_KEY_DX_ITERATOR_SUB_HPP_
#define OPENFPM_DATA_SRC_GRID_ITERATORS_GRID_KEY_DX_ITERATOR_SUB_HPP_
#include "grid_key_dx_iterator.hpp"
#include "Grid/grid_key.hpp"
/* \brief grid_key_dx_iterator_sub can adjust the domain if the border go out-of-side
* in this case a warning is produced
*
......@@ -211,8 +214,8 @@ public:
// Initialize the start and stop point
for (unsigned int i = 0 ; i < dim ; i++)
{
gk_start.set(i,m);
gk_stop.set(i,g.size(i)-m);
gk_start.set_d(i,m);
gk_stop.set_d(i,g.size(i)-m-1);
}
//
......@@ -321,7 +324,7 @@ public:
/*! \brief Return the actual grid key iterator
*
*/
inline grid_key_dx<dim> get()
inline grid_key_dx<dim> get() const
{
#ifdef DEBUG
if (initialized == false)
......
......@@ -8,7 +8,7 @@
#ifndef OPENFPM_DATA_SRC_GRID_ITERATORS_GRID_KEY_DX_ITERATOR_SUB_BC_HPP_
#define OPENFPM_DATA_SRC_GRID_ITERATORS_GRID_KEY_DX_ITERATOR_SUB_BC_HPP_
#include "grid_key_dx_iterator_sub.hpp"
/*! \brief The same as grid_key_dx_iterator_sub_p but with periodic boundary
*
......@@ -47,14 +47,40 @@ class grid_key_dx_iterator_sub_bc : public grid_key_dx_iterator_sub<dim,warn>
public:
/*! \brief Constructor
*
*
*/
grid_key_dx_iterator_sub_bc()
:act(0)
{
}
/*! \brief Constructor
*
* \param g Grid information
* \param
* \param start starting point
* \param stop stop point
* \param bc boundary conditions
*
*/
template<typename T> grid_key_dx_iterator_sub_bc(const grid_sm<dim,T> & g, const grid_key_dx<dim> & start , const grid_key_dx<dim> & stop, const size_t (& bc)[dim])
:act(0)
{
Initialize(g,start,stop,bc);
}
/*! \brief Initialize the iterator
*
* \param g Grid information
* \param start starting point
* \param stop stop point
* \param bc boundary conditions
*
*/
template<typename T> void Initialize(const grid_sm<dim,T> & g, const grid_key_dx<dim> & start , const grid_key_dx<dim> & stop, const size_t (& bc)[dim])
{
// copy the boundary conditions
......@@ -122,7 +148,6 @@ public:
grid_key_dx_iterator_sub<dim,warn>::reinitialize(grid_key_dx_iterator_sub<dim,warn>(g,boxes[0].getKP1(),boxes[0].getKP2()));
}
/*! \brief Get the next element
*
* Get the next element
......@@ -164,7 +189,7 @@ public:
/*! \brief Return the actual grid key iterator
*
*/
inline grid_key_dx<dim> get()
inline const grid_key_dx<dim> get() const
{
return grid_key_dx_iterator_sub<dim,warn>::get();
}
......
LINKLIBS = $(PTHREAD_LIBS) $(OPT_LIBS) $(BOOST_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIB) $(CUDA_LIBS) $(BOOST_IOSTREAMS_LIB) $(LOCAL_LIBS)
LINKLIBS = $(PTHREAD_LIBS) $(OPT_LIBS) $(BOOST_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIB) $(CUDA_LIBS) $(BOOST_IOSTREAMS_LIB) $(LOCAL_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(BOOST_CHRONO_LIB) $(BOOST_TIMER_LIB) $(BOOST_SYSTEM_LIB)
if BUILDCUDA
CUDA_SOURCES=../../openfpm_devices/src/memory/CudaMemory.cu
......@@ -8,7 +8,7 @@ else
endif
noinst_PROGRAMS = mem_map
mem_map_SOURCES = ../../openfpm_devices/src/Memleak_check.cpp main.cpp $(CUDA_SOURCES) ../../openfpm_devices/src/memory/HeapMemory.cpp ../../openfpm_devices/src/memory/PtrMemory.cpp
mem_map_SOURCES = ../../openfpm_devices/src/Memleak_check.cpp main.cpp $(CUDA_SOURCES) ../../openfpm_devices/src/memory/HeapMemory.cpp ../../openfpm_devices/src/memory/PtrMemory.cpp Grid/iterators/grid_iterators_unit_tests.cpp