Loading src/core/arrays/tnlStaticArray.h +8 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ class tnlStaticArray template< typename Array > bool operator != ( const Array& array ) const; void setValue( const ElementType& val ); bool save( tnlFile& file ) const; bool load( tnlFile& file); Loading Loading @@ -183,6 +185,8 @@ class tnlStaticArray< 1, Element > template< typename Array > bool operator != ( const Array& array ) const; void setValue( const ElementType& val ); bool save( tnlFile& file ) const; bool load( tnlFile& file); Loading Loading @@ -290,6 +294,8 @@ class tnlStaticArray< 2, Element > template< typename Array > bool operator != ( const Array& array ) const; void setValue( const ElementType& val ); bool save( tnlFile& file ) const; bool load( tnlFile& file); Loading Loading @@ -409,6 +415,8 @@ class tnlStaticArray< 3, Element > template< typename Array > bool operator != ( const Array& array ) const; void setValue( const ElementType& val ); bool save( tnlFile& file ) const; bool load( tnlFile& file); Loading src/implementation/core/arrays/tnlArray_impl.h +1 −5 Original line number Diff line number Diff line Loading @@ -272,8 +272,6 @@ template< typename Element, typename Index > void tnlArray< Element, Device, Index > :: setValue( const Element& e ) { tnlAssert( this -> size != 0, cerr << "Array name is " << this -> getName() ); tnlArrayOperations< Device > :: setMemory( this -> getData(), e, this -> getSize() ); } Loading Loading @@ -322,8 +320,6 @@ template< typename Element, typename Index > bool tnlArray< Element, Device, Index > :: save( tnlFile& file ) const { tnlAssert( this -> size != 0, cerr << "You try to save empty vector. Its name is " << this -> getName() ); if( ! tnlObject :: save( file ) ) return false; #ifdef HAVE_NOT_CXX11 Loading Loading @@ -363,9 +359,9 @@ bool tnlArray< Element, Device, Index > :: load( tnlFile& file ) cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << endl; return false; } setSize( _size ); if( _size ) { setSize( _size ); if( ! tnlArrayIO< Element, Device, Index >::load( file, this -> data, this -> size ) ) { cerr << "I was not able to load " << this->getType() Loading src/implementation/core/arrays/tnlStaticArray1D_impl.h +6 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,12 @@ bool tnlStaticArray< 1, Element >::operator != ( const Array& array ) const return ! this->operator == ( array ); } template< typename Element > void tnlStaticArray< 1, Element >::setValue( const ElementType& val ) { data[ 0 ] = val; } template< typename Element > bool tnlStaticArray< 1, Element >::save( tnlFile& file ) const { Loading src/implementation/core/arrays/tnlStaticArray2D_impl.h +6 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,12 @@ bool tnlStaticArray< 2, Element >::operator != ( const Array& array ) const return ! this->operator == ( array ); } template< typename Element > void tnlStaticArray< 2, Element >::setValue( const ElementType& val ) { data[ 1 ] = data[ 0 ] = val; } template< typename Element > bool tnlStaticArray< 2, Element >::save( tnlFile& file ) const { Loading src/implementation/core/arrays/tnlStaticArray3D_impl.h +6 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,12 @@ bool tnlStaticArray< 3, Element >::operator != ( const Array& array ) const return ! this->operator == ( array ); } template< typename Element > void tnlStaticArray< 3, Element >::setValue( const ElementType& val ) { data[ 2 ] = data[ 1 ] = data[ 0 ] = val; } template< typename Element > bool tnlStaticArray< 3, Element >::save( tnlFile& file ) const { Loading Loading
src/core/arrays/tnlStaticArray.h +8 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ class tnlStaticArray template< typename Array > bool operator != ( const Array& array ) const; void setValue( const ElementType& val ); bool save( tnlFile& file ) const; bool load( tnlFile& file); Loading Loading @@ -183,6 +185,8 @@ class tnlStaticArray< 1, Element > template< typename Array > bool operator != ( const Array& array ) const; void setValue( const ElementType& val ); bool save( tnlFile& file ) const; bool load( tnlFile& file); Loading Loading @@ -290,6 +294,8 @@ class tnlStaticArray< 2, Element > template< typename Array > bool operator != ( const Array& array ) const; void setValue( const ElementType& val ); bool save( tnlFile& file ) const; bool load( tnlFile& file); Loading Loading @@ -409,6 +415,8 @@ class tnlStaticArray< 3, Element > template< typename Array > bool operator != ( const Array& array ) const; void setValue( const ElementType& val ); bool save( tnlFile& file ) const; bool load( tnlFile& file); Loading
src/implementation/core/arrays/tnlArray_impl.h +1 −5 Original line number Diff line number Diff line Loading @@ -272,8 +272,6 @@ template< typename Element, typename Index > void tnlArray< Element, Device, Index > :: setValue( const Element& e ) { tnlAssert( this -> size != 0, cerr << "Array name is " << this -> getName() ); tnlArrayOperations< Device > :: setMemory( this -> getData(), e, this -> getSize() ); } Loading Loading @@ -322,8 +320,6 @@ template< typename Element, typename Index > bool tnlArray< Element, Device, Index > :: save( tnlFile& file ) const { tnlAssert( this -> size != 0, cerr << "You try to save empty vector. Its name is " << this -> getName() ); if( ! tnlObject :: save( file ) ) return false; #ifdef HAVE_NOT_CXX11 Loading Loading @@ -363,9 +359,9 @@ bool tnlArray< Element, Device, Index > :: load( tnlFile& file ) cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << endl; return false; } setSize( _size ); if( _size ) { setSize( _size ); if( ! tnlArrayIO< Element, Device, Index >::load( file, this -> data, this -> size ) ) { cerr << "I was not able to load " << this->getType() Loading
src/implementation/core/arrays/tnlStaticArray1D_impl.h +6 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,12 @@ bool tnlStaticArray< 1, Element >::operator != ( const Array& array ) const return ! this->operator == ( array ); } template< typename Element > void tnlStaticArray< 1, Element >::setValue( const ElementType& val ) { data[ 0 ] = val; } template< typename Element > bool tnlStaticArray< 1, Element >::save( tnlFile& file ) const { Loading
src/implementation/core/arrays/tnlStaticArray2D_impl.h +6 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,12 @@ bool tnlStaticArray< 2, Element >::operator != ( const Array& array ) const return ! this->operator == ( array ); } template< typename Element > void tnlStaticArray< 2, Element >::setValue( const ElementType& val ) { data[ 1 ] = data[ 0 ] = val; } template< typename Element > bool tnlStaticArray< 2, Element >::save( tnlFile& file ) const { Loading
src/implementation/core/arrays/tnlStaticArray3D_impl.h +6 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,12 @@ bool tnlStaticArray< 3, Element >::operator != ( const Array& array ) const return ! this->operator == ( array ); } template< typename Element > void tnlStaticArray< 3, Element >::setValue( const ElementType& val ) { data[ 2 ] = data[ 1 ] = data[ 0 ] = val; } template< typename Element > bool tnlStaticArray< 3, Element >::save( tnlFile& file ) const { Loading