Commit f346c5e1 authored by incardon's avatar incardon
Browse files

Workaround GCC 4.9.2

parent aceed8f4
......@@ -17,7 +17,7 @@ m4_ifdef([ACX_MPI],,[m4_include([m4/acx_mpi.m4])])
m4_ifdef([AX_OPENMP],,[m4_include([m4/ax_openmp.m4])])
m4_ifdef([AX_CUDA],,[m4_include([m4/ax_cuda.m4])])
CXXFLAGS+=" --std=c++11 -march=native -mtune=native "
CXXFLAGS+=" --std=c++11 -march=native -mtune=native -Wno-signed-compare -Wno-unused-local-typedefs "
NVCCFLAGS=" "
INCLUDES_PATH=" "
......
......@@ -166,4 +166,127 @@ struct comb
};
/*! brief specialization of comb in case of dim 0
*
* GCC 4.9.2 does not accept structures of size 0
*
*/
template<>
struct comb<0>
{
//! FIX
char c[1];
/*! \brief check if it is a valid combination
*
* \return true if it is valid
*
*/
inline bool isValid()
{
return true;
}
/*! \brief Check if the combination is a sub-element
*
* \param cmb combination to check if it is sub-element
*
* \return true if cmb is a sub-element of this combination
*
*/
inline bool isSub(comb<0> cmb)
{
return true;
}
/*! \brief Set all the elements to zero
*
*/
inline void zero()
{
}
/*! \brief Compare two combination
*
* check if they match
*
* \param t combination to check
* \return true if the two combination match, false otherwise
*
*/
inline bool operator!=(const comb<0> & t) const
{
// They match
return true;
}
/*! \brief Compare two combination
*
* check if they match
*
* \param t combination to check
* \return true if the two combination match, false otherwise
*
*/
inline bool operator==(const comb<0> & t) const
{
return true;
}
/*! \brief Get the i combination coefficient
*
* \param i coefficent
* \return the coefficent of the combination at position i
*
*/
inline char operator[](int i)
{
return 0;
}
/*! \brief get the combination array pointer
*
* \return an array of char representing the combination
*
*/
inline char * getComb()
{
return c;
}
/*! \brief get the index i of the combination
*
* NOTE: used on expression template
*
* \param i index
*
* \return value of the i index
*
*/
inline char value(int i) const
{
return c[i];
}
/* \brief It return the number of zero in the combination
*
* \return number of zero
*
*/
inline int n_zero()
{
return 0;
}
};
#endif
......@@ -117,14 +117,14 @@ struct is_typedef_and_data_same<false,T>
*
*/
template<unsigned int N, typename v>
/*template<unsigned int N, typename v>
struct el_size
{
//! total_size
size_t total_size;
//! List of properties
const size_t (& prp)[N];
const size_t (& prp)[N];*/
/*! \brief constructor
*
......@@ -135,7 +135,7 @@ struct el_size
* \param obj object we have to set in grid_src
*
*/
el_size(const size_t (& prp)[N])
/* el_size(const size_t (& prp)[N])
:total_size(0),prp(prp)
{};
......@@ -157,6 +157,6 @@ template<unsigned int N,typename v> size_t ele_size(const size_t (& prp)[N])
boost::mpl::for_each_ref< boost::mpl::range_c<int,0,N> >(sz);
return sz.size();
}
}*/
#endif
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