Commit 80811ca0 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixing the save and load methods in vectors and arrays.

parent 6723242c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/implementation/core )
set( tnl_implementation_core_SOURCES
     ${CURRENT_DIR}/tnlArray_impl.cpp
     ${CURRENT_DIR}/tnlMultiArray_impl.cpp
     ${CURRENT_DIR}/tnlMultiVector_impl.cpp
     ${CURRENT_DIR}/tnlSharedVector_impl.cpp
     ${CURRENT_DIR}/tnlVector_impl.cpp
     ${CURRENT_DIR}/tnlTimerRT.cpp
+2 −2
Original line number Diff line number Diff line
@@ -107,13 +107,13 @@ void tnlMultiVector< 1, Element, Device, Index > :: setElement( const Index i, E
template< typename Element, typename Device, typename Index >
Element& tnlMultiVector< 1, Element, Device, Index > :: operator()( const Index element )
{
   return tnlVector< Element, Device, Index > :: operator[]( getLongVectorIndex( element ) );
   return tnlVector< Element, Device, Index > :: operator[]( getElementIndex( element ) );
}

template< typename Element, typename Device, typename Index >
const Element& tnlMultiVector< 1, Element, Device, Index > :: operator()( const Index element ) const
{
   return tnlVector< Element, Device, Index > :: operator[]( getLongVectorIndex( element ) );
   return tnlVector< Element, Device, Index > :: operator[]( getElementIndex( element ) );
}

template< typename Element, typename Device, typename Index >
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ template< typename Element, typename Device, typename Index >
bool tnlMultiVector< 2, Element, Device, Index > :: setDimensions( const Index jSize,
                                                                       const Index iSize )
{
   tnlAssert( xSize > 0 && ySize > 0,
   tnlAssert( iSize > 0 && jSize > 0,
              cerr << "iSize = " << iSize
                   << "jSize = " << jSize );

+2 −2
Original line number Diff line number Diff line
@@ -101,8 +101,8 @@ Index tnlMultiVector< 3, Element, Device, Index > :: getElementIndex( const Inde
                                                                     const Index i ) const
{
   tnlAssert( i >= 0 && i < this -> dimensions[ 0 ] &&
              j >= 0 && j < this -> dimensions[ 1 ] &&,
              k >= 0 && k < this -> dimensions[ 2 ]
              j >= 0 && j < this -> dimensions[ 1 ] &&
              k >= 0 && k < this -> dimensions[ 2 ],
              cerr << " i = " << i
                   << " j = " << j
                   << " k = " << k
+2 −2
Original line number Diff line number Diff line
@@ -108,9 +108,9 @@ Index tnlMultiVector< 4, Element, Device, Index > :: getElementIndex( const Inde
                                                                          const Index i ) const
{
   tnlAssert( i >= 0 && i < this -> dimensions[ 0 ] &&
              j >= 0 && j < this -> dimensions[ 1 ] &&,
              j >= 0 && j < this -> dimensions[ 1 ] &&
              k >= 0 && k < this -> dimensions[ 2 ] &&
              l >= 0 && l < this -> dimensions[ 3 ]
              l >= 0 && l < this -> dimensions[ 3 ],
              cerr << " i = " << i
                   << " j = " << j
                   << " k = " << k
Loading