Commit 57433749 authored by incardon's avatar incardon

Fixing performance tests

parent cbef620d
......@@ -8,7 +8,7 @@
#ifndef OPENFPM_DATA_SRC_GRID_GRID_PERFORMANCE_TESTS_HPP_
#define OPENFPM_DATA_SRC_GRID_GRID_PERFORMANCE_TESTS_HPP_
#include "grid_util_test.hpp"
#include "Grid/grid_util_test.hpp"
#include "util/stat/common_statistics.hpp"
// Property tree
......@@ -220,11 +220,11 @@ BOOST_AUTO_TEST_CASE(grid_performance_write_report)
GoogleChart cg;
std::string file_xml_ref(test_dir);
file_xml_ref += std::string("/openfpm_pdata/grid_performance_funcs_ref.xml");
file_xml_ref += std::string("/openfpm_data/grid_performance_funcs_ref.xml");
StandardXMLPerformanceGraph("grid_performance_funcs.xml",file_xml_ref,cg);
addUpdtateTime(cg);
addUpdtateTime(cg,1);
cg.write("grid_performance_funcs.html");
}
......
......@@ -960,7 +960,8 @@ public:
* \return An iterator across the neighhood particles
*
*/
template<unsigned int impl=NO_CHECK> inline CellNNIterator<dim,CellList<dim,T,Mem_type,transform,vector_pos_type>,(int)FULL,impl> getNNIterator(size_t cell)
template<unsigned int impl=NO_CHECK>
__attribute__((always_inline)) inline CellNNIterator<dim,CellList<dim,T,Mem_type,transform,vector_pos_type>,(int)FULL,impl> getNNIterator(size_t cell)
{
CellNNIterator<dim,CellList<dim,T,Mem_type,transform,vector_pos_type>,(int)FULL,impl> cln(cell,NNc_full,*this);
return cln;
......@@ -977,7 +978,8 @@ public:
* \return An iterator across the neighborhood particles
*
*/
template<unsigned int impl=NO_CHECK> inline CellNNIteratorRadius<dim,CellList<dim,T,Mem_type,transform,vector_pos_type>,impl> getNNIteratorRadius(size_t cell, T r_cut)
template<unsigned int impl=NO_CHECK>
__attribute__((always_inline)) inline CellNNIteratorRadius<dim,CellList<dim,T,Mem_type,transform,vector_pos_type>,impl> getNNIteratorRadius(size_t cell, T r_cut)
{
openfpm::vector<long int> & NNc = rcache[r_cut];
......@@ -1012,7 +1014,7 @@ public:
*
*/
template<unsigned int impl>
inline CellNNIteratorSym<dim,CellList<dim,T,Mem_type,transform,vector_pos_type>,vector_pos_type,(unsigned int)SYM,impl>
__attribute__((always_inline)) inline CellNNIteratorSym<dim,CellList<dim,T,Mem_type,transform,vector_pos_type>,vector_pos_type,(unsigned int)SYM,impl>
getNNIteratorSym(size_t cell, size_t p, const vector_pos_type & v)
{
#ifdef SE_CLASS1
......@@ -1047,7 +1049,7 @@ public:
*
*/
template<unsigned int impl, typename vector_pos_type2>
inline CellNNIteratorSymMP<dim,CellList<dim,T,Mem_type,transform,vector_pos_type>,vector_pos_type2,(unsigned int)SYM,impl>
__attribute__((always_inline)) inline CellNNIteratorSymMP<dim,CellList<dim,T,Mem_type,transform,vector_pos_type>,vector_pos_type2,(unsigned int)SYM,impl>
getNNIteratorSymMP(size_t cell, size_t p, const vector_pos_type2 & v_p1, const vector_pos_type2 & v_p2)
{
#ifdef SE_CLASS1
......@@ -1115,7 +1117,7 @@ public:
* \return the index
*
*/
inline const typename Mem_type::local_index_type & getStartId(typename Mem_type::local_index_type cell_id) const
__attribute__((always_inline)) inline const typename Mem_type::local_index_type & getStartId(typename Mem_type::local_index_type cell_id) const
{
return Mem_type::getStartId(cell_id);
}
......@@ -1127,7 +1129,7 @@ public:
* \return the stop index
*
*/
inline const typename Mem_type::local_index_type & getStopId(typename Mem_type::local_index_type cell_id) const
__attribute__((always_inline)) inline const typename Mem_type::local_index_type & getStopId(typename Mem_type::local_index_type cell_id) const
{
return Mem_type::getStopId(cell_id);
}
......@@ -1139,7 +1141,7 @@ public:
* \return the neighborhood id
*
*/
inline const typename Mem_type::local_index_type & get_lin(const typename Mem_type::local_index_type * part_id) const
__attribute__((always_inline)) inline const typename Mem_type::local_index_type & get_lin(const typename Mem_type::local_index_type * part_id) const
{
return Mem_type::get_lin(part_id);
}
......
......@@ -59,7 +59,7 @@ protected:
/*! \brief Select non-empty cell
*
*/
inline void selectValid()
__attribute__((always_inline)) inline void selectValid()
{
while (start_id == stop_id)
{
......@@ -89,7 +89,7 @@ public:
* \param cl Cell structure
*
*/
inline CellNNIterator(size_t cell, const NNc_array<dim,NNc_size> &NNc, Cell & cl)
__attribute__((always_inline)) inline CellNNIterator(size_t cell, const NNc_array<dim,NNc_size> &NNc, Cell & cl)
:NNc_id(0),cell(cell),cell_id(NNc[NNc_id] + cell),cl(cl),NNc(NNc)
{
start_id = &cl.getStartId(cell_id);
......@@ -102,7 +102,7 @@ public:
* \return true if there is the next element
*
*/
inline bool isNext()
__attribute__((always_inline)) inline bool isNext()
{
if (NNc_id >= NNc_size)
return false;
......@@ -114,7 +114,7 @@ public:
* \return itself
*
*/
inline CellNNIterator & operator++()
__attribute__((always_inline)) inline CellNNIterator & operator++()
{
start_id++;
......@@ -128,7 +128,7 @@ public:
* \return the next element object
*
*/
inline const typename Cell::Mem_type_type::local_index_type & get()
__attribute__((always_inline)) inline const typename Cell::Mem_type_type::local_index_type & get()
{
return cl.get_lin(start_id);
}
......@@ -138,7 +138,7 @@ public:
* \return the next element object
*
*/
inline const typename Cell::Mem_type_type::local_index_type & get() const
__attribute__((always_inline)) inline const typename Cell::Mem_type_type::local_index_type & get() const
{
return cl.get_lin(start_id);
}
......@@ -173,7 +173,7 @@ class CellNNIteratorSym : public CellNNIterator<dim,Cell,NNc_size,impl>
/*! Select the next valid element
*
*/
inline void selectValid()
__attribute__((always_inline)) inline void selectValid()
{
if (this->NNc[this->NNc_id] == 0)
{
......@@ -212,7 +212,7 @@ public:
* \param cl Cell structure
*
*/
inline CellNNIteratorSym(size_t cell, size_t p, const NNc_array<dim,NNc_size> &NNc, Cell & cl, const vector_pos_type & v)
__attribute__((always_inline)) inline CellNNIteratorSym(size_t cell, size_t p, const NNc_array<dim,NNc_size> &NNc, Cell & cl, const vector_pos_type & v)
:CellNNIterator<dim,Cell,NNc_size,impl>(cell,NNc,cl),p(p),v(v)
{
selectValid();
......@@ -224,7 +224,7 @@ public:
* \return itself
*
*/
inline CellNNIteratorSym<dim,Cell,vector_pos_type,NNc_size,impl> & operator++()
__attribute__((always_inline)) inline CellNNIteratorSym<dim,Cell,vector_pos_type,NNc_size,impl> & operator++()
{
this->start_id++;
......@@ -265,7 +265,7 @@ class CellNNIteratorSymMP : public CellNNIterator<dim,Cell,NNc_size,impl>
/*! Select the next valid element
*
*/
inline void selectValid()
__attribute__((always_inline)) inline void selectValid()
{
if (this->NNc[this->NNc_id] == 0)
{
......@@ -304,7 +304,7 @@ public:
* \param cl Cell structure
*
*/
inline CellNNIteratorSymMP(size_t cell,
__attribute__((always_inline)) inline CellNNIteratorSymMP(size_t cell,
size_t p,
const NNc_array<dim,NNc_size> &NNc,
Cell & cl,
......@@ -321,7 +321,7 @@ public:
* \return itself
*
*/
inline CellNNIteratorSymMP<dim,Cell,vector_pos_type,NNc_size,impl> & operator++()
__attribute__((always_inline)) inline CellNNIteratorSymMP<dim,Cell,vector_pos_type,NNc_size,impl> & operator++()
{
this->start_id++;
......@@ -357,7 +357,7 @@ public:
* \param cl Cell on which iterate
*
*/
inline CellIterator(const size_t cell, Cell & cl)
__attribute__((always_inline)) inline CellIterator(const size_t cell, Cell & cl)
:cl(cl),ele_id(0),cell(cell)
{
}
......@@ -367,7 +367,7 @@ public:
* \return true if there are still neighborhood particles
*
*/
inline bool isNext()
__attribute__((always_inline)) inline bool isNext()
{
return cl.getNelements(cell) > ele_id;
}
......@@ -377,7 +377,7 @@ public:
* \return itself
*
*/
inline CellIterator & operator++()
__attribute__((always_inline)) inline CellIterator & operator++()
{
ele_id++;
......@@ -389,7 +389,7 @@ public:
* \return the next element object
*
*/
inline typename Cell::value_type & get()
__attribute__((always_inline)) inline typename Cell::value_type & get()
{
return cl.get(cell,ele_id);
}
......@@ -399,7 +399,7 @@ public:
* \return the next element object
*
*/
inline const typename Cell::value_type & get() const
__attribute__((always_inline)) inline const typename Cell::value_type & get() const
{
return cl.get(cell,ele_id);
}
......
......@@ -61,7 +61,7 @@ protected:
/*! \brief Select non-empty cell
*
*/
inline void selectValid()
__attribute__((always_inline)) inline void selectValid()
{
while (start_id == stop_id)
{
......@@ -92,7 +92,7 @@ public:
* \param cl Cell structure
*
*/
inline CellNNIterator(size_t cell, const long int * NNc, size_t NNc_size, Cell & cl)
__attribute__((always_inline)) inline CellNNIterator(size_t cell, const long int * NNc, size_t NNc_size, Cell & cl)
:NNc_id(0),NNc_size(NNc_size),cell(cell),cell_id(NNc[NNc_id] + cell),cl(cl),NNc(NNc)
{
start_id = &cl.getStartId(cell_id);
......@@ -105,7 +105,7 @@ public:
* \return true if there is the next element
*
*/
inline bool isNext()
__attribute__((always_inline)) inline bool isNext()
{
if (NNc_id >= NNc_size)
return false;
......@@ -117,7 +117,7 @@ public:
* \return itself
*
*/
inline CellNNIterator & operator++()
__attribute__((always_inline)) inline CellNNIterator & operator++()
{
start_id++;
......@@ -131,7 +131,7 @@ public:
* \return the next element object
*
*/
inline const typename Cell::Mem_type_type::loc_index & get()
__attribute__((always_inline)) inline const typename Cell::Mem_type_type::loc_index & get()
{
return cl.get_lin(start_id);
}
......@@ -166,7 +166,7 @@ class CellNNIteratorSym<dim,Cell,vector_pos_type,RUNTIME,impl> : public CellNNIt
/*! Select the next valid element
*
*/
inline void selectValid()
__attribute__((always_inline)) inline void selectValid()
{
if (this->NNc[this->NNc_id] == 0)
{
......@@ -205,7 +205,7 @@ public:
* \param cl Cell structure
*
*/
inline CellNNIteratorSym(size_t cell,
__attribute__((always_inline)) inline CellNNIteratorSym(size_t cell,
size_t p,
const long int * NNc,
size_t NNc_size,
......@@ -225,7 +225,7 @@ public:
* \return itself
*
*/
inline CellNNIteratorSym<dim,Cell,vector_pos_type,RUNTIME,impl> & operator++()
__attribute__((always_inline)) inline CellNNIteratorSym<dim,Cell,vector_pos_type,RUNTIME,impl> & operator++()
{
this->start_id++;
......
......@@ -34,7 +34,7 @@ BOOST_AUTO_TEST_SUITE( performance )
//// Include tests ////////
#include "Grid/grid_performance_tests.hpp"
#include "Grid/performance/grid_performance_tests.hpp"
#include "Vector/performance/vector_performance_test.hpp"
BOOST_AUTO_TEST_SUITE_END()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment