Loading src/core/arrays/tnlArray_impl.h +32 −34 Original line number Diff line number Diff line Loading @@ -28,8 +28,6 @@ #include "tnlArray.h" using namespace std; template< typename Element, typename Device, typename Index > Loading Loading @@ -178,8 +176,8 @@ tnlArray< Element, Device, Index >:: setSize( const Index size ) { tnlAssert( size >= 0, cerr << "You try to set size of tnlArray to negative value." << "New size: " << size << endl ); std::cerr << "You try to set size of tnlArray to negative value." << "New size: " << size << std::endl ); if( this->size == size && allocationPointer && ! referenceCounter ) return true; this->releaseData(); tnlArrayOperations< Device >::allocateMemory( this->allocationPointer, size ); Loading @@ -187,8 +185,8 @@ setSize( const Index size ) this->size = size; if( ! this->allocationPointer ) { cerr << "I am not able to allocate new array with size " << ( double ) this->size * sizeof( ElementType ) / 1.0e9 << " GB." << endl; std::cerr << "I am not able to allocate new array with size " << ( double ) this->size * sizeof( ElementType ) / 1.0e9 << " GB." << std::endl; this->size = 0; return false; } Loading @@ -204,8 +202,8 @@ tnlArray< Element, Device, Index >:: setLike( const Array& array ) { tnlAssert( array. getSize() >= 0, cerr << "You try to set size of tnlArray to negative value." << "Array size: " << array. getSize() << endl ); std::cerr << "You try to set size of tnlArray to negative value." << "Array size: " << array. getSize() << std::endl ); return setSize( array.getSize() ); }; Loading Loading @@ -315,7 +313,7 @@ tnlArray< Element, Device, Index >:: setElement( const Index& i, const Element& x ) { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for setElement method in tnlArray " std::cerr << "Wrong index for setElement method in tnlArray " << " index is " << i << " and array size is " << this->getSize() ); return tnlArrayOperations< Device > :: setMemoryElement( &( this->data[ i ] ), x ); Loading @@ -329,7 +327,7 @@ tnlArray< Element, Device, Index >:: getElement( const Index& i ) const { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for getElement method in tnlArray " std::cerr << "Wrong index for getElement method in tnlArray " << " index is " << i << " and array size is " << this->getSize() ); return tnlArrayOperations< Device > :: getMemoryElement( & ( this->data[ i ] ) ); Loading @@ -344,7 +342,7 @@ tnlArray< Element, Device, Index >:: operator[] ( const Index& i ) { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for operator[] in tnlArray " std::cerr << "Wrong index for operator[] in tnlArray " << " index is " << i << " and array size is " << this->getSize() ); return this->data[ i ]; Loading @@ -359,7 +357,7 @@ tnlArray< Element, Device, Index >:: operator[] ( const Index& i ) const { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for operator[] in tnlArray " std::cerr << "Wrong index for operator[] in tnlArray " << " index is " << i << " and array size is " << this->getSize() ); return this->data[ i ]; Loading @@ -373,8 +371,8 @@ tnlArray< Element, Device, Index >:: operator = ( const tnlArray< Element, Device, Index >& array ) { tnlAssert( array. getSize() == this->getSize(), cerr << "Source size: " << array. getSize() << endl << "Target size: " << this->getSize() << endl ); std::cerr << "Source size: " << array. getSize() << std::endl << "Target size: " << this->getSize() << std::endl ); tnlArrayOperations< Device > :: template copyMemory< Element, Element, Loading @@ -394,8 +392,8 @@ tnlArray< Element, Device, Index >:: operator = ( const Array& array ) { tnlAssert( array. getSize() == this->getSize(), cerr << "Source size: " << array. getSize() << endl << "Target size: " << this->getSize() << endl ); std::cerr << "Source size: " << array. getSize() << std::endl << "Target size: " << this->getSize() << std::endl ); tnlArrayOperations< Device, typename Array :: DeviceType > :: template copyMemory< Element, Loading Loading @@ -498,8 +496,8 @@ bool tnlArray< Element, Device, Index > :: save( tnlFile& file ) const #endif if( this->size != 0 && ! tnlArrayIO< Element, Device, Index >::save( file, this->data, this->size ) ) { cerr << "I was not able to save " << this->getType() << " with size " << this->getSize() << endl; std::cerr << "I was not able to save " << this->getType() << " with size " << this->getSize() << std::endl; return false; } return true; Loading @@ -524,7 +522,7 @@ load( tnlFile& file ) #endif if( _size < 0 ) { cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << endl; std::cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << std::endl; return false; } setSize( _size ); Loading @@ -532,8 +530,8 @@ load( tnlFile& file ) { if( ! tnlArrayIO< Element, Device, Index >::load( file, this->data, this->size ) ) { cerr << "I was not able to load " << this->getType() << " with size " << this->getSize() << endl; std::cerr << "I was not able to load " << this->getType() << " with size " << this->getSize() << std::endl; return false; } } Loading @@ -559,7 +557,7 @@ boundLoad( tnlFile& file ) #endif if( _size < 0 ) { cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << endl; std::cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << std::endl; return false; } if( this->getSize() != 0 ) Loading @@ -576,8 +574,8 @@ boundLoad( tnlFile& file ) { if( ! tnlArrayIO< Element, Device, Index >::load( file, this->data, this->size ) ) { cerr << "I was not able to load " << this->getType() << " with size " << this->getSize() << endl; std::cerr << "I was not able to load " << this->getType() << " with size " << this->getSize() << std::endl; return false; } } Loading @@ -594,14 +592,14 @@ boundLoad( const tnlString& fileName ) tnlFile file; if( ! file. open( fileName, tnlReadMode ) ) { cerr << "I am not bale to open the file " << fileName << " for reading." << endl; std::cerr << "I am not bale to open the file " << fileName << " for reading." << std::endl; return false; } if( ! this->boundLoad( file ) ) return false; if( ! file. close() ) { cerr << "An error occurred when I was closing the file " << fileName << "." << endl; std::cerr << "An error occurred when I was closing the file " << fileName << "." << std::endl; return false; } return true; Loading src/core/arrays/tnlConstSharedArray_impl.h +12 −14 Original line number Diff line number Diff line Loading @@ -25,8 +25,6 @@ #include <core/mfuncs.h> #include <core/param-types.h> using namespace std; template< typename Element, typename Device, typename Index > Loading Loading @@ -77,10 +75,10 @@ void tnlConstSharedArray< Element, Device, Index > :: bind( const Element* data, const Index size ) { tnlAssert( size >= 0, cerr << "You try to set size of tnlConstSharedArray to negative value." << "New size: " << size << endl ); std::cerr << "You try to set size of tnlConstSharedArray to negative value." << "New size: " << size << std::endl ); tnlAssert( data != 0, cerr << "You try to use null pointer to data for tnlConstSharedArray." ); std::cerr << "You try to use null pointer to data for tnlConstSharedArray." ); this->size = size; this->data = data; Loading Loading @@ -138,7 +136,7 @@ template< typename Element, Element tnlConstSharedArray< Element, Device, Index > :: getElement( Index i ) const { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for getElement method in tnlConstSharedArray with name " std::cerr << "Wrong index for getElement method in tnlConstSharedArray with name " << " index is " << i << " and array size is " << this->getSize() ); return tnlArrayOperations< Device >::getMemoryElement( &( this->data[ i ] ) ); Loading @@ -151,7 +149,7 @@ __cuda_callable__ const Element& tnlConstSharedArray< Element, Device, Index > :: operator[] ( Index i ) const { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for operator[] in tnlConstSharedArray with name " std::cerr << "Wrong index for operator[] in tnlConstSharedArray with name " << " index is " << i << " and array size is " << this->getSize() ); // TODO: add static assert - this does not make sense for tnlCudaDevice Loading Loading @@ -237,7 +235,7 @@ template< typename Element, bool tnlConstSharedArray< Element, Device, Index > :: save( tnlFile& file ) const { tnlAssert( this->size != 0, cerr << "You try to save empty array." ); std::cerr << "You try to save empty array." ); if( ! tnlObject :: save( file ) ) return false; #ifdef HAVE_NOT_CXX11 Loading @@ -248,8 +246,8 @@ bool tnlConstSharedArray< Element, Device, Index > :: save( tnlFile& file ) cons return false; if( ! file. write< Element, Device, Index >( this->data, this->size ) ) { cerr << "I was not able to WRITE tnlConstSharedArray " << " with size " << this->getSize() << endl; std::cerr << "I was not able to WRITE tnlConstSharedArray " << " with size " << this->getSize() << std::endl; return false; } return true; Loading src/core/arrays/tnlSharedArray_impl.h +24 −26 Original line number Diff line number Diff line Loading @@ -26,8 +26,6 @@ #include <core/mfuncs.h> #include <core/param-types.h> using namespace std; template< typename Element, typename Device, typename Index > Loading Loading @@ -108,10 +106,10 @@ void tnlSharedArray< Element, Device, Index > :: bind( Element* data, const Index size ) { tnlAssert( size >= 0, cerr << "You try to set size of tnlSharedArray to negative value." << "New size: " << size << endl ); std::cerr << "You try to set size of tnlSharedArray to negative value." << "New size: " << size << std::endl ); tnlAssert( data != 0, cerr << "You try to use null pointer to data for tnlSharedArray." ); std::cerr << "You try to use null pointer to data for tnlSharedArray." ); this->size = size; this->data = data; Loading Loading @@ -191,7 +189,7 @@ template< typename Element, void tnlSharedArray< Element, Device, Index > :: setElement( const Index& i, const Element& x ) { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for setElement method in tnlSharedArray " std::cerr << "Wrong index for setElement method in tnlSharedArray " << " index is " << i << " and array size is " << this->getSize() ); return tnlArrayOperations< Device >::setMemoryElement( & ( this->data[ i ] ), x ); Loading @@ -203,7 +201,7 @@ template< typename Element, Element tnlSharedArray< Element, Device, Index > :: getElement( const Index& i ) const { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for getElement method in tnlSharedArray " std::cerr << "Wrong index for getElement method in tnlSharedArray " << " index is " << i << " and array size is " << this->getSize() ); return tnlArrayOperations< Device >::getMemoryElement( &( this->data[ i ] ) ); Loading @@ -216,7 +214,7 @@ __cuda_callable__ Element& tnlSharedArray< Element, Device, Index > :: operator[] ( const Index& i ) { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for operator[] in tnlSharedArray " std::cerr << "Wrong index for operator[] in tnlSharedArray " << " index is " << i << " and array size is " << this->getSize() ); return this->data[ i ]; Loading @@ -229,7 +227,7 @@ __cuda_callable__ const Element& tnlSharedArray< Element, Device, Index > :: operator[] ( const Index& i ) const { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for operator[] in tnlSharedArray " std::cerr << "Wrong index for operator[] in tnlSharedArray " << " index is " << i << " and array size is " << this->getSize() ); return this->data[ i ]; Loading @@ -242,8 +240,8 @@ tnlSharedArray< Element, Device, Index >& tnlSharedArray< Element, Device, Index > :: operator = ( const tnlSharedArray< Element, Device, Index >& array ) { tnlAssert( array. getSize() == this->getSize(), cerr << "Source size: " << array. getSize() << endl << "Target size: " << this->getSize() << endl ); std::cerr << "Source size: " << array. getSize() << std::endl << "Target size: " << this->getSize() << std::endl ); tnlArrayOperations< Device > :: template copyMemory< Element, Element, Loading @@ -261,8 +259,8 @@ template< typename Element, tnlSharedArray< Element, Device, Index >& tnlSharedArray< Element, Device, Index > :: operator = ( const Array& array ) { tnlAssert( array. getSize() == this->getSize(), cerr << "Source size: " << array. getSize() << endl << "Target size: " << this->getSize() << endl ); std::cerr << "Source size: " << array. getSize() << std::endl << "Target size: " << this->getSize() << std::endl ); tnlArrayOperations< typename Array :: DeviceType, Device > :: template copyMemory< Element, Loading Loading @@ -352,7 +350,7 @@ template< typename Element, bool tnlSharedArray< Element, Device, Index > :: save( tnlFile& file ) const { tnlAssert( this->size != 0, cerr << "You try to save empty array." << endl ); std::cerr << "You try to save empty array." << std::endl ); if( ! tnlObject :: save( file ) ) return false; #ifdef HAVE_NOT_CXX11 Loading @@ -363,7 +361,7 @@ bool tnlSharedArray< Element, Device, Index > :: save( tnlFile& file ) const return false; if( ! file. write< Element, Device, Index >( this->data, this->size ) ) { cerr << "I was not able to WRITE tnlSharedArray with size " << this->getSize() << endl; std::cerr << "I was not able to WRITE tnlSharedArray with size " << this->getSize() << std::endl; return false; } return true; Loading Loading @@ -394,15 +392,15 @@ bool tnlSharedArray< Element, Device, Index > :: load( tnlFile& file ) #endif if( _size != this->size ) { cerr << "Error: The size " << _size << " of the data to be load is different from the " << "allocated array. This is not possible in the shared array." << endl; std::cerr << "Error: The size " << _size << " of the data to be load is different from the " << "allocated array. This is not possible in the shared array." << std::endl; return false; } if( _size ) { if( ! file. read< Element, Device, Index >( this->data, this->size ) ) { cerr << "I was not able to READ tnlSharedArray with size " << this->getSize() << endl; std::cerr << "I was not able to READ tnlSharedArray with size " << this->getSize() << std::endl; return false; } } Loading src/core/mpi-supp.h +1 −3 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ #include <iostream> #include <cstdlib> using namespace std; #ifdef HAVE_MPI #include <mpi.h> #else Loading Loading @@ -108,7 +106,7 @@ template< class T > void MPIBcast( T& data, inline void MPIBcast( tnlString& data, int cout, int root, MPI_Comm comm = MPI_COMM_WORLD ) { cerr << "Call method MPIBcast of mString instead of function MPIBcast( mString&, ... ) " << endl; std::cerr << "Call method MPIBcast of mString instead of function MPIBcast( mString&, ... ) " << std::endl; abort(); } #else Loading src/core/tnlFile.h +0 −2 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ #include <core/tnlHost.h> #include <core/tnlCuda.h> using namespace std; enum tnlIOMode { tnlUndefinedMode = 0, tnlReadMode = 1, tnlWriteMode = 2 }; Loading Loading
src/core/arrays/tnlArray_impl.h +32 −34 Original line number Diff line number Diff line Loading @@ -28,8 +28,6 @@ #include "tnlArray.h" using namespace std; template< typename Element, typename Device, typename Index > Loading Loading @@ -178,8 +176,8 @@ tnlArray< Element, Device, Index >:: setSize( const Index size ) { tnlAssert( size >= 0, cerr << "You try to set size of tnlArray to negative value." << "New size: " << size << endl ); std::cerr << "You try to set size of tnlArray to negative value." << "New size: " << size << std::endl ); if( this->size == size && allocationPointer && ! referenceCounter ) return true; this->releaseData(); tnlArrayOperations< Device >::allocateMemory( this->allocationPointer, size ); Loading @@ -187,8 +185,8 @@ setSize( const Index size ) this->size = size; if( ! this->allocationPointer ) { cerr << "I am not able to allocate new array with size " << ( double ) this->size * sizeof( ElementType ) / 1.0e9 << " GB." << endl; std::cerr << "I am not able to allocate new array with size " << ( double ) this->size * sizeof( ElementType ) / 1.0e9 << " GB." << std::endl; this->size = 0; return false; } Loading @@ -204,8 +202,8 @@ tnlArray< Element, Device, Index >:: setLike( const Array& array ) { tnlAssert( array. getSize() >= 0, cerr << "You try to set size of tnlArray to negative value." << "Array size: " << array. getSize() << endl ); std::cerr << "You try to set size of tnlArray to negative value." << "Array size: " << array. getSize() << std::endl ); return setSize( array.getSize() ); }; Loading Loading @@ -315,7 +313,7 @@ tnlArray< Element, Device, Index >:: setElement( const Index& i, const Element& x ) { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for setElement method in tnlArray " std::cerr << "Wrong index for setElement method in tnlArray " << " index is " << i << " and array size is " << this->getSize() ); return tnlArrayOperations< Device > :: setMemoryElement( &( this->data[ i ] ), x ); Loading @@ -329,7 +327,7 @@ tnlArray< Element, Device, Index >:: getElement( const Index& i ) const { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for getElement method in tnlArray " std::cerr << "Wrong index for getElement method in tnlArray " << " index is " << i << " and array size is " << this->getSize() ); return tnlArrayOperations< Device > :: getMemoryElement( & ( this->data[ i ] ) ); Loading @@ -344,7 +342,7 @@ tnlArray< Element, Device, Index >:: operator[] ( const Index& i ) { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for operator[] in tnlArray " std::cerr << "Wrong index for operator[] in tnlArray " << " index is " << i << " and array size is " << this->getSize() ); return this->data[ i ]; Loading @@ -359,7 +357,7 @@ tnlArray< Element, Device, Index >:: operator[] ( const Index& i ) const { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for operator[] in tnlArray " std::cerr << "Wrong index for operator[] in tnlArray " << " index is " << i << " and array size is " << this->getSize() ); return this->data[ i ]; Loading @@ -373,8 +371,8 @@ tnlArray< Element, Device, Index >:: operator = ( const tnlArray< Element, Device, Index >& array ) { tnlAssert( array. getSize() == this->getSize(), cerr << "Source size: " << array. getSize() << endl << "Target size: " << this->getSize() << endl ); std::cerr << "Source size: " << array. getSize() << std::endl << "Target size: " << this->getSize() << std::endl ); tnlArrayOperations< Device > :: template copyMemory< Element, Element, Loading @@ -394,8 +392,8 @@ tnlArray< Element, Device, Index >:: operator = ( const Array& array ) { tnlAssert( array. getSize() == this->getSize(), cerr << "Source size: " << array. getSize() << endl << "Target size: " << this->getSize() << endl ); std::cerr << "Source size: " << array. getSize() << std::endl << "Target size: " << this->getSize() << std::endl ); tnlArrayOperations< Device, typename Array :: DeviceType > :: template copyMemory< Element, Loading Loading @@ -498,8 +496,8 @@ bool tnlArray< Element, Device, Index > :: save( tnlFile& file ) const #endif if( this->size != 0 && ! tnlArrayIO< Element, Device, Index >::save( file, this->data, this->size ) ) { cerr << "I was not able to save " << this->getType() << " with size " << this->getSize() << endl; std::cerr << "I was not able to save " << this->getType() << " with size " << this->getSize() << std::endl; return false; } return true; Loading @@ -524,7 +522,7 @@ load( tnlFile& file ) #endif if( _size < 0 ) { cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << endl; std::cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << std::endl; return false; } setSize( _size ); Loading @@ -532,8 +530,8 @@ load( tnlFile& file ) { if( ! tnlArrayIO< Element, Device, Index >::load( file, this->data, this->size ) ) { cerr << "I was not able to load " << this->getType() << " with size " << this->getSize() << endl; std::cerr << "I was not able to load " << this->getType() << " with size " << this->getSize() << std::endl; return false; } } Loading @@ -559,7 +557,7 @@ boundLoad( tnlFile& file ) #endif if( _size < 0 ) { cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << endl; std::cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << std::endl; return false; } if( this->getSize() != 0 ) Loading @@ -576,8 +574,8 @@ boundLoad( tnlFile& file ) { if( ! tnlArrayIO< Element, Device, Index >::load( file, this->data, this->size ) ) { cerr << "I was not able to load " << this->getType() << " with size " << this->getSize() << endl; std::cerr << "I was not able to load " << this->getType() << " with size " << this->getSize() << std::endl; return false; } } Loading @@ -594,14 +592,14 @@ boundLoad( const tnlString& fileName ) tnlFile file; if( ! file. open( fileName, tnlReadMode ) ) { cerr << "I am not bale to open the file " << fileName << " for reading." << endl; std::cerr << "I am not bale to open the file " << fileName << " for reading." << std::endl; return false; } if( ! this->boundLoad( file ) ) return false; if( ! file. close() ) { cerr << "An error occurred when I was closing the file " << fileName << "." << endl; std::cerr << "An error occurred when I was closing the file " << fileName << "." << std::endl; return false; } return true; Loading
src/core/arrays/tnlConstSharedArray_impl.h +12 −14 Original line number Diff line number Diff line Loading @@ -25,8 +25,6 @@ #include <core/mfuncs.h> #include <core/param-types.h> using namespace std; template< typename Element, typename Device, typename Index > Loading Loading @@ -77,10 +75,10 @@ void tnlConstSharedArray< Element, Device, Index > :: bind( const Element* data, const Index size ) { tnlAssert( size >= 0, cerr << "You try to set size of tnlConstSharedArray to negative value." << "New size: " << size << endl ); std::cerr << "You try to set size of tnlConstSharedArray to negative value." << "New size: " << size << std::endl ); tnlAssert( data != 0, cerr << "You try to use null pointer to data for tnlConstSharedArray." ); std::cerr << "You try to use null pointer to data for tnlConstSharedArray." ); this->size = size; this->data = data; Loading Loading @@ -138,7 +136,7 @@ template< typename Element, Element tnlConstSharedArray< Element, Device, Index > :: getElement( Index i ) const { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for getElement method in tnlConstSharedArray with name " std::cerr << "Wrong index for getElement method in tnlConstSharedArray with name " << " index is " << i << " and array size is " << this->getSize() ); return tnlArrayOperations< Device >::getMemoryElement( &( this->data[ i ] ) ); Loading @@ -151,7 +149,7 @@ __cuda_callable__ const Element& tnlConstSharedArray< Element, Device, Index > :: operator[] ( Index i ) const { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for operator[] in tnlConstSharedArray with name " std::cerr << "Wrong index for operator[] in tnlConstSharedArray with name " << " index is " << i << " and array size is " << this->getSize() ); // TODO: add static assert - this does not make sense for tnlCudaDevice Loading Loading @@ -237,7 +235,7 @@ template< typename Element, bool tnlConstSharedArray< Element, Device, Index > :: save( tnlFile& file ) const { tnlAssert( this->size != 0, cerr << "You try to save empty array." ); std::cerr << "You try to save empty array." ); if( ! tnlObject :: save( file ) ) return false; #ifdef HAVE_NOT_CXX11 Loading @@ -248,8 +246,8 @@ bool tnlConstSharedArray< Element, Device, Index > :: save( tnlFile& file ) cons return false; if( ! file. write< Element, Device, Index >( this->data, this->size ) ) { cerr << "I was not able to WRITE tnlConstSharedArray " << " with size " << this->getSize() << endl; std::cerr << "I was not able to WRITE tnlConstSharedArray " << " with size " << this->getSize() << std::endl; return false; } return true; Loading
src/core/arrays/tnlSharedArray_impl.h +24 −26 Original line number Diff line number Diff line Loading @@ -26,8 +26,6 @@ #include <core/mfuncs.h> #include <core/param-types.h> using namespace std; template< typename Element, typename Device, typename Index > Loading Loading @@ -108,10 +106,10 @@ void tnlSharedArray< Element, Device, Index > :: bind( Element* data, const Index size ) { tnlAssert( size >= 0, cerr << "You try to set size of tnlSharedArray to negative value." << "New size: " << size << endl ); std::cerr << "You try to set size of tnlSharedArray to negative value." << "New size: " << size << std::endl ); tnlAssert( data != 0, cerr << "You try to use null pointer to data for tnlSharedArray." ); std::cerr << "You try to use null pointer to data for tnlSharedArray." ); this->size = size; this->data = data; Loading Loading @@ -191,7 +189,7 @@ template< typename Element, void tnlSharedArray< Element, Device, Index > :: setElement( const Index& i, const Element& x ) { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for setElement method in tnlSharedArray " std::cerr << "Wrong index for setElement method in tnlSharedArray " << " index is " << i << " and array size is " << this->getSize() ); return tnlArrayOperations< Device >::setMemoryElement( & ( this->data[ i ] ), x ); Loading @@ -203,7 +201,7 @@ template< typename Element, Element tnlSharedArray< Element, Device, Index > :: getElement( const Index& i ) const { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for getElement method in tnlSharedArray " std::cerr << "Wrong index for getElement method in tnlSharedArray " << " index is " << i << " and array size is " << this->getSize() ); return tnlArrayOperations< Device >::getMemoryElement( &( this->data[ i ] ) ); Loading @@ -216,7 +214,7 @@ __cuda_callable__ Element& tnlSharedArray< Element, Device, Index > :: operator[] ( const Index& i ) { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for operator[] in tnlSharedArray " std::cerr << "Wrong index for operator[] in tnlSharedArray " << " index is " << i << " and array size is " << this->getSize() ); return this->data[ i ]; Loading @@ -229,7 +227,7 @@ __cuda_callable__ const Element& tnlSharedArray< Element, Device, Index > :: operator[] ( const Index& i ) const { tnlAssert( 0 <= i && i < this->getSize(), cerr << "Wrong index for operator[] in tnlSharedArray " std::cerr << "Wrong index for operator[] in tnlSharedArray " << " index is " << i << " and array size is " << this->getSize() ); return this->data[ i ]; Loading @@ -242,8 +240,8 @@ tnlSharedArray< Element, Device, Index >& tnlSharedArray< Element, Device, Index > :: operator = ( const tnlSharedArray< Element, Device, Index >& array ) { tnlAssert( array. getSize() == this->getSize(), cerr << "Source size: " << array. getSize() << endl << "Target size: " << this->getSize() << endl ); std::cerr << "Source size: " << array. getSize() << std::endl << "Target size: " << this->getSize() << std::endl ); tnlArrayOperations< Device > :: template copyMemory< Element, Element, Loading @@ -261,8 +259,8 @@ template< typename Element, tnlSharedArray< Element, Device, Index >& tnlSharedArray< Element, Device, Index > :: operator = ( const Array& array ) { tnlAssert( array. getSize() == this->getSize(), cerr << "Source size: " << array. getSize() << endl << "Target size: " << this->getSize() << endl ); std::cerr << "Source size: " << array. getSize() << std::endl << "Target size: " << this->getSize() << std::endl ); tnlArrayOperations< typename Array :: DeviceType, Device > :: template copyMemory< Element, Loading Loading @@ -352,7 +350,7 @@ template< typename Element, bool tnlSharedArray< Element, Device, Index > :: save( tnlFile& file ) const { tnlAssert( this->size != 0, cerr << "You try to save empty array." << endl ); std::cerr << "You try to save empty array." << std::endl ); if( ! tnlObject :: save( file ) ) return false; #ifdef HAVE_NOT_CXX11 Loading @@ -363,7 +361,7 @@ bool tnlSharedArray< Element, Device, Index > :: save( tnlFile& file ) const return false; if( ! file. write< Element, Device, Index >( this->data, this->size ) ) { cerr << "I was not able to WRITE tnlSharedArray with size " << this->getSize() << endl; std::cerr << "I was not able to WRITE tnlSharedArray with size " << this->getSize() << std::endl; return false; } return true; Loading Loading @@ -394,15 +392,15 @@ bool tnlSharedArray< Element, Device, Index > :: load( tnlFile& file ) #endif if( _size != this->size ) { cerr << "Error: The size " << _size << " of the data to be load is different from the " << "allocated array. This is not possible in the shared array." << endl; std::cerr << "Error: The size " << _size << " of the data to be load is different from the " << "allocated array. This is not possible in the shared array." << std::endl; return false; } if( _size ) { if( ! file. read< Element, Device, Index >( this->data, this->size ) ) { cerr << "I was not able to READ tnlSharedArray with size " << this->getSize() << endl; std::cerr << "I was not able to READ tnlSharedArray with size " << this->getSize() << std::endl; return false; } } Loading
src/core/mpi-supp.h +1 −3 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ #include <iostream> #include <cstdlib> using namespace std; #ifdef HAVE_MPI #include <mpi.h> #else Loading Loading @@ -108,7 +106,7 @@ template< class T > void MPIBcast( T& data, inline void MPIBcast( tnlString& data, int cout, int root, MPI_Comm comm = MPI_COMM_WORLD ) { cerr << "Call method MPIBcast of mString instead of function MPIBcast( mString&, ... ) " << endl; std::cerr << "Call method MPIBcast of mString instead of function MPIBcast( mString&, ... ) " << std::endl; abort(); } #else Loading
src/core/tnlFile.h +0 −2 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ #include <core/tnlHost.h> #include <core/tnlCuda.h> using namespace std; enum tnlIOMode { tnlUndefinedMode = 0, tnlReadMode = 1, tnlWriteMode = 2 }; Loading