Commit 34b694fa authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixing the unit tests.

parent 3798b380
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

TARGET=TNL
INSTALL_PREFIX=${HOME}/local
WITH_CUDA=no
WITH_CUDA=yes
WITH_CUSPARSE=no
CUDA_ARCHITECTURE=2.0
TEMPLATE_EXPLICIT_INSTANTIATION=yes
+4 −4
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ class tnlFile
	            const Index elements );

	template< typename Type, typename Device >
	bool write( Type* buffer );
	bool write( const Type* buffer );
#else        
   template< typename Type, typename Device = tnlHost, typename Index = int >
   bool read( Type* buffer,
@@ -132,7 +132,7 @@ class tnlFile
               const Index elements );

   template< typename Type, typename Device = tnlHost >
   bool write( Type* buffer );
   bool write( const Type* buffer );

#endif

@@ -149,7 +149,7 @@ bool tnlFile :: read( Type* buffer )
};

template< typename Type, typename Device >
bool tnlFile :: write( Type* buffer )
bool tnlFile :: write( const Type* buffer )
{
   return write< Type, Device, int >( buffer, 1 );
};
+1 −1
Original line number Diff line number Diff line
@@ -192,7 +192,7 @@ bool copyMemoryCudaToHost( DestinationElement* destination,
   abort(); // TODO: fix this
   cudaMemcpy( destination,
               source,
               size * sizeof( Element ),
               size * sizeof( SourceElement ),
               cudaMemcpyDeviceToHost );
   if( ! checkCudaDevice )
   {
+2 −4
Original line number Diff line number Diff line
@@ -354,7 +354,7 @@ bool tnlLinearGridGeometry< 2, Real, Device, Index > :: save( tnlFile& file ) co
{
   if( ! this -> parametricStep. save( file ) ||
       ! this -> proportions. save( file ) ||
       ! file. write( &this -> numberOfSegments ) ||
       ! file. write< IndexType, DeviceType >( &this -> numberOfSegments ) ||       
       ! this -> ySegments. save( file ) ||
       ! this -> ySegmentsLeftOffsets. save( file ) ||
       ! this -> ySegmentsRightOffsets. save( file ) )
@@ -369,13 +369,11 @@ bool tnlLinearGridGeometry< 2, Real, Device, Index > :: load( tnlFile& file )
{
   if( ! this -> parametricStep. load( file ) ||
       ! this -> proportions. load( file ) ||
       ! file. read( &this -> numberOfSegments ) ||
       ! file. read< IndexType, DeviceType >( &this -> numberOfSegments ) ||
       ! this -> ySegments. load( file ) ||
       ! this -> ySegmentsLeftOffsets. load( file ) ||
       ! this -> ySegmentsRightOffsets. load( file ) )
   {
      return false;
   }
   return true;
};

+1 −1
Original line number Diff line number Diff line
@@ -500,7 +500,7 @@ template< typename Real, typename Device, typename Index >
bool tnlRgCSRMatrix< Real, Device, Index > :: copyFrom( const tnlRgCSRMatrix< Real, Device2, Index >& rgCSRMatrix )
{
   dbgFunctionName( "tnlRgCSRMatrix< Real, Device, Index >", "copyFrom" );
   tnlAssert( rgCSRMatrix. getSize() > 0, cerr << "Copying from matrix " < rgCSRMatrix. getName() << " with non-positiove size." );
   tnlAssert( rgCSRMatrix. getSize() > 0, cerr << "Copying from matrix " << rgCSRMatrix. getName() << " with non-positiove size." );

   this -> cudaBlockSize = rgCSRMatrix. cudaBlockSize;
   this -> groupSize = rgCSRMatrix. groupSize;
Loading