Commit 2bc54529 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Added missing guards against explicit templates instantiation

parent eab48a79
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -20,17 +20,21 @@

#include <functors/tnlTestFunction.h>

#ifdef INSTANTIATE_FLOAT
template class tnlTestFunction< 1, float, tnlHost >;
template class tnlTestFunction< 2, float, tnlHost >;
template class tnlTestFunction< 3, float, tnlHost >;
#endif

template class tnlTestFunction< 1, double, tnlHost >;
template class tnlTestFunction< 2, double, tnlHost >;
template class tnlTestFunction< 3, double, tnlHost >;

#ifdef INSTANTIATE_LONG_DOUBLE
template class tnlTestFunction< 1, long double, tnlHost >;
template class tnlTestFunction< 2, long double, tnlHost >;
template class tnlTestFunction< 3, long double, tnlHost >;
#endif

#endif
+6 −2
Original line number Diff line number Diff line
@@ -20,17 +20,21 @@

#include <functors/tnlTestFunction.h>

#ifdef INSTANTIATE_FLOAT
template class tnlTestFunction< 1, float, tnlCuda >;
template class tnlTestFunction< 2, float, tnlCuda >;
template class tnlTestFunction< 3, float, tnlCuda >;
#endif

template class tnlTestFunction< 1, double, tnlCuda >;
template class tnlTestFunction< 2, double, tnlCuda >;
template class tnlTestFunction< 3, double, tnlCuda >;

/*template class tnlTestFunction< 1, long double, tnlCuda >;
#ifdef INSTANTIATE_LONG_DOUBLE
template class tnlTestFunction< 1, long double, tnlCuda >;
template class tnlTestFunction< 2, long double, tnlCuda >;
template class tnlTestFunction< 3, long double, tnlCuda >;*/
template class tnlTestFunction< 3, long double, tnlCuda >;
#endif

#endif
#endif
+10 −2
Original line number Diff line number Diff line
@@ -413,30 +413,38 @@ tnlTestFunction< FunctionDimensions, Real, Device >::

#ifdef TEMPLATE_EXPLICIT_INSTANTIATION

#ifdef INSTANTIATE_FLOAT
extern template class tnlTestFunction< 1, float, tnlHost >;
extern template class tnlTestFunction< 2, float, tnlHost >;
extern template class tnlTestFunction< 3, float, tnlHost >;
#endif

extern template class tnlTestFunction< 1, double, tnlHost >;
extern template class tnlTestFunction< 2, double, tnlHost >;
extern template class tnlTestFunction< 3, double, tnlHost >;

#ifdef INSTANTIATE_LONG_DOUBLE
extern template class tnlTestFunction< 1, long double, tnlHost >;
extern template class tnlTestFunction< 2, long double, tnlHost >;
extern template class tnlTestFunction< 3, long double, tnlHost >;
#endif

#ifdef HAVE_CUDA
#ifdef INSTANTIATE_FLOAT
extern template class tnlTestFunction< 1, float, tnlCuda>;
extern template class tnlTestFunction< 2, float, tnlCuda >;
extern template class tnlTestFunction< 3, float, tnlCuda >;
#endif

extern template class tnlTestFunction< 1, double, tnlCuda >;
extern template class tnlTestFunction< 2, double, tnlCuda >;
extern template class tnlTestFunction< 3, double, tnlCuda >;

/*extern template class tnlTestFunction< 1, long double, tnlCuda >;
#ifdef INSTANTIATE_LONG_DOUBLE
extern template class tnlTestFunction< 1, long double, tnlCuda >;
extern template class tnlTestFunction< 2, long double, tnlCuda >;
extern template class tnlTestFunction< 3, long double, tnlCuda >;*/
extern template class tnlTestFunction< 3, long double, tnlCuda >;
#endif
#endif

#endif