Skip to content
Snippets Groups Projects
Commit eb4c6cb6 authored by Vít Hanousek's avatar Vít Hanousek
Browse files

Nyni lze přeložit celé TNL s ICPC.

parent c67ededc
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ mv ./initial.tnl init.tnl
--discrete-solver euler \
--snapshot-period 0.0005 \
--final-time 0.1 \
--time-step 0.000001
--time-step 0.00005
./tnl-view-dbg --mesh mesh.tnl \
--input-files *.tnl \
......
......@@ -374,9 +374,9 @@ class tnlStaticArray< 3, Element >
};
template< int Size, typename Element >
/*template< int Size, typename Element >
ostream& operator << ( ostream& str, const tnlStaticArray< Size, Element >& a );
*/
#include <core/arrays/tnlStaticArray_impl.h>
#include <core/arrays/tnlStaticArray1D_impl.h>
#include <core/arrays/tnlStaticArray2D_impl.h>
......
......@@ -194,6 +194,7 @@ void tnlStaticArray< 1, Element >::sort()
}
template< typename Element >
__device_callable__
ostream& tnlStaticArray< 1, Element >::write( ostream& str, const char* separator ) const
{
str << data[ 0 ];
......
......@@ -221,6 +221,7 @@ void tnlStaticArray< 2, Element >::sort()
}
template< typename Element >
__device_callable__
ostream& tnlStaticArray< 2, Element >::write( ostream& str, const char* separator ) const
{
str << data[ 0 ] << separator << data[ 1 ];
......
......@@ -248,6 +248,7 @@ void tnlStaticArray< 3, Element >::sort()
}
template< typename Element >
__device_callable__
ostream& tnlStaticArray< 3, Element >::write( ostream& str, const char* separator ) const
{
str << data[ 0 ] << separator << data[ 1 ] << separator << data[ 2 ];
......
......@@ -195,6 +195,7 @@ void tnlStaticArray< Size, Element >::sort()
}
template< int Size, typename Element >
__device_callable__
ostream& tnlStaticArray< Size, Element >::write( ostream& str, const char* separator ) const
{
for( int i = 0; i < Size - 1; i++ )
......@@ -205,6 +206,7 @@ ostream& tnlStaticArray< Size, Element >::write( ostream& str, const char* separ
template< int Size, typename Element >
__device_callable__
ostream& operator << ( ostream& str, const tnlStaticArray< Size, Element >& a )
{
a.write( str, "," );
......
......@@ -22,8 +22,6 @@
* Debugging assert
*/
#define NDEBUG
#ifndef NDEBUG
......@@ -65,6 +63,7 @@
___tnl__assert_command; \
throw EXIT_FAILURE; \
}
#endif /* HAVE_CUDA */
#else /* #ifndef NDEBUG */
#define tnlAssert( ___tnl__assert_condition, ___tnl__assert_command )
......
......@@ -20,18 +20,22 @@
#else
#define __cuda_callable__
#endif
*/
//NEW, better __device_callable__ --used only with MIC touch code
//NEW, not implemented yet
#ifdef HAVE_MIC
#define __device_callable__ __attribute__((target(mic)))
#define __cuda_callable__ __attribute__((target(mic)))
#elif HAVE_CUDA
#define __device_callable__ __device__ __host__
#define __cuda_callable__ __device__ __host__
#else
#define __device_callable__
#define __cuda_callable__
#endif
*/
#define __cuda_callable__ __attribute__((target(mic)))
#define __device_callable__ __attribute__((target(mic)))
//#define __cuda_callable__ __attribute__((target(mic)))
//#define __device_callable__ __attribute__((target(mic)))
#endif /* TNLDEVICE_CALLABLE_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment